Ancestors

Toot

Written by Oinak :ruby: on 2024-09-06 at 18:09

Some thoughts on memoization of methods in :ruby:

https://gitlab.com/-/snippets/3745145

=> View attached media

=> More informations about this toot | More toots from oinak@ruby.social

Descendants

Written by Peter Bhat Harkins on 2024-09-06 at 18:48

@oinak Which gem? I'm curious to see if this code could be extended to hook initialize and set up the class vars consistently to avoid multiplying the possible object shapes. Maybe the full gem does this?

=> More informations about this toot | More toots from pushcx@ruby.social

Written by Oinak :ruby: on 2024-09-06 at 22:28

@pushcx apparently it does just a little more than I came up with, better args/kwargs support and separate Ivar's instead of nested hashes https://github.com/jnicklas/memoit/blob/main/lib/memoit.rb

=> More informations about this toot | More toots from oinak@ruby.social

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113091945821548157
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
289.002081 milliseconds
Gemini-to-HTML Time
0.598247 milliseconds

This content has been proxied by September (3851b).