cavvia / forgetsy Goto Github PK
View Code? Open in Web Editor NEWA trending library
License: MIT License
A trending library
License: MIT License
... just to be clear, this library doesn't work, right?
> follows_delta = Forgetsy::Delta.create('user_follows', t: 1.week, replay: true)
=> #<Forgetsy::Delta:0x00563af1c7c838 @name="user_follows", @conn=<Redis::Namespace v1.5.3 with client v3.3.3 for redis://localhost:6379/0/forgetsy>>
> follows_delta.fetch
=> {}
> follows_delta.incr('UserFoo', date: 1.minute.ago)
=> [#<Forgetsy::Set:0x00563af1be0e60 @name="user_follows", @conn=<Redis::Namespace v1.5.3 with client v3.3.3 for redis://localhost:6379/0/forgetsy>>, #<Forgetsy::Set:0x00563af1be0e10 @name="user_follows_2t", @conn=<Redis::Namespace v1.5.3 with client v3.3.3 for redis://localhost:6379/0/forgetsy>>]
> follows_delta.fetch
=> {}
I'm using the master branch's code
For starters, the sample on the main README is broken:
follows_delta = Forgetsy::Delta.fetch('user_follows')
follows_delta.incr('UserFoo', date: 2.weeks.ago)
follows_delta.incr('UserBar', date: 10.days.ago)
follows_delta.incr('UserBar', date: 1.week.ago)
follows_delta.incr('UserFoo', date: 1.day.ago)
follows_delta.incr('UserFoo')
Each of the calls to follows_delta.incr results in a NOOP because Forgetsy::Set.valid_incr_date returns false in each case that date is explicitly included...
puts follows_delta.fetch
{"UserFoo"=>0.9997776321896626}
Hi
We've been using forgetsy for 2 weeks, and is now receiving SystemStackError: stack level too deep
when fetching results.
It turns out Forgetsy::Delta.fetch
does not pass option[:n]
to secondary_set.fetch
, and fetch_raw
returns large array (approx. 65K) to secondary_set.fetch
for Hash[*result.flatten]
, which is too many arguments (approx. 131K after flatten) for Hash
to handle.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.