hyperfiddle

http://hyperfiddle.net
2019-01-02T13:04:17.012Z

@alexandrkozyrev lines 3 and 6 define ratoms but it recreates them each time vega-renderer is called

2019-01-02T13:04:34.012400Z

It also recreates the reagent class each time, and probably mounts it over each time

2019-01-02T13:04:56.012900Z

Define the reagent class at the namespace level with def (so it is static) and lift the ratoms also to def level

2019-01-02T13:05:39.013100Z

vegaspec can be a prop

alexandrkozyrev 2019-01-02T13:10:15.015Z

I call vega-rederer several times in vega-dashboard so it probably should recreate a class instance each time with different ednspec and vegaspec

2019-01-02T13:11:00.015600Z

Can it be the same class, reused, but constructed with different parameters/props?

alexandrkozyrev 2019-01-02T13:12:59.016600Z

quite possible, to be clear - I just copy/pasted best examples I’ve found, it wasn’t mindful design

2019-01-02T13:13:19.016900Z

Oh ok, do you want me to show you? Its easy

alexandrkozyrev 2019-01-02T13:13:45.017300Z

it’d be awesome

2019-01-02T13:40:39.018200Z

(reagent.core/argv this) is a new fn for you, it gets the render props

alexandrkozyrev 2019-01-02T14:09:15.019100Z

add/return uuid id (otherwise vega override all specs in the same :div) - works like magic

2019-01-02T14:19:40.020100Z

random-uuid is going to be different each time it renders

2019-01-02T15:06:07.020500Z

Which one of you is slifin on hacker news by the way?

2019-01-02T15:07:20.020700Z

@alexandrkozyrev you might like this https://github.com/reagent-project/reagent-cookbook

Adrian Smith 2019-01-02T17:17:05.021100Z

<--

2019-01-02T17:18:04.021800Z

Hello, thanks for the kind words! looking

2019-01-02T17:18:35.022100Z

Are you logged in?

Adrian Smith 2019-01-02T17:19:01.022400Z

not on this machine

2019-01-02T17:19:40.022900Z

Does it look like this?

Adrian Smith 2019-01-02T17:19:41.023200Z

seems fine on my laptop, wierd

Adrian Smith 2019-01-02T17:21:30.023500Z

Stalled on https://i.imgur.com/rl5xy4o.png on my desktop

2019-01-02T17:22:05.023900Z

Is there a ajvascript error or anything? What OS and browser

Adrian Smith 2019-01-02T17:23:51.024200Z

Adrian Smith 2019-01-02T17:24:09.024700Z

the end point appears to think about it for about 13 seconds

2019-01-02T17:26:48.026900Z

We are looking into it, I assume it is still stuck?

Adrian Smith 2019-01-02T17:30:14.028800Z

but yeah you deserve the kind words, it's crazy the amount of fuss there is in the front end world when there's been nothing conceptually new for years but here you've got a system here that is truly revolutionary, meteorJS on steroids doesn't even begin to cover what hyperfiddle is capable of, pushing graphs around the stack whilst everyone else is wasting their time trying to get SQL into slot based objects

Adrian Smith 2019-01-02T17:30:46.029300Z

yeah can still replicate, on the desktop

khardenstine 2019-01-02T17:31:18.029700Z

were you logged in before and playing around?

khardenstine 2019-01-02T17:31:26.029900Z

and then you logged out?

Adrian Smith 2019-01-02T17:33:19.030600Z

not sure, may have checked the website and been logged in before christmas on the desktop don't think I would have ever explicitly logged out

khardenstine 2019-01-02T17:35:02.031Z

if you dont mind running a chrome console command, could you send me what this returns: localStorage.getItem('{"~#\'":"~:STATE"}')

Adrian Smith 2019-01-02T17:38:16.031500Z

localStorage.getItem('{"~#\'":"~:STATE"}')
"{"~:hyperfiddle.runtime/auto-transact":{"~rdatomic:<free://172.18.0.2:4334/tank%22:false,%22~rdatomic:free://datomic:4334/clojurians-log%22:false|free://172.18.0.2:4334/tank":false,"~rdatomic:free://datomic:4334/clojurians-log":false>},"~:hyperfiddle.runtime/global-basis":{"~:domain":{"~rdatomic:<free://datomic:4334/domains%22:2383|free://datomic:4334/domains":2383>},"~:ide":{"~rdatomic:<free://datomic:4334/root%22:17513,%22~rdatomic:free://datomic:4334/domains%22:2383,%22~rdatomic:free://datomic:4334/hyperfiddle-users%22:34457|free://datomic:4334/root":17513,"~rdatomic:free://datomic:4334/domains":2383,"~rdatomic:free://datomic:4334/hyperfiddle-users":34457>},"~:user":{"~rdatomic:<free://172.18.0.2:4334/tank%22:3143,%22~rdatomic:free://datomic:4334/clojurians-log%22:18827|free://172.18.0.2:4334/tank":3143,"~rdatomic:free://datomic:4334/clojurians-log":18827>}},"~:hyperfiddle.runtime/user-id":null,"~:version":4,"~:stage":{"~rdatomic:<free://172.18.0.3:4334/tank%22:[[%22~:db/retract%22,17592186046195,%22~:fiddle/query%22,%22[:find|free://172.18.0.3:4334/tank":[["~:db/retract",17592186046195,"~:fiddle/query","[:find> \n (pull ?e [:dustingetz.reg/email\n           ; :dustingetz.reg/name\n           ; :dustingetz.reg/birthdate\n           :dustingetz.reg/age\n           ; {:dustingetz.reg/gender [:db/ident]}\n           ; {:dustingetz.reg/shirt-size [:db/ident]}\n           :db/id])\n :where \n [?e :dustingetz.reg/email]\n #_#_[?e :dustingetz.reg/age ?age] [(&gt; ?age 30)]]"],["~:db/add","-1508590361","~:dustingetz.reg/gender","~:dustingetz.gender/male"],["~:db/add","-1508590361","~:dustingetz.reg/shirt-size","~:dustingetz.shirt-size/mens-medium"],["~:db/add","-1508590361","~:dustingetz.reg/birthdate","~t2018-11-01T00:00:00.000Z"],["~:db/add",17592186046195,"~:fiddle/query","[:find \n (pull ?e [:dustingetz.reg/email\n           :dustingetz.reg/name\n           :dustingetz.reg/birthdate\n           :dustingetz.reg/age\n           {:dustingetz.reg/gender [:db/ident]}\n           {:dustingetz.reg/shirt-size [:db/ident]}\n           :db/id])\n :where \n [?e :dustingetz.reg/email]]"]]},"~:last-modified":1546450263325}"

Adrian Smith 2019-01-02T17:41:10.031900Z

Video of the problem here: https://youtu.be/RHeazWNxFrA

Adrian Smith 2019-01-02T17:47:40.032900Z

ah discovered it has to be something to do with client state or extensions because it works in incoginto mode, and safari

Adrian Smith 2019-01-02T17:47:56.033500Z

that said I should have the same extensions on the laptop

Adrian Smith 2019-01-02T17:48:35.034300Z

empty cache and hard reload doesn't appear to help, is there any other state I can clear?

khardenstine 2019-01-02T17:48:54.034700Z

yea i think the problem is your local storage

khardenstine 2019-01-02T17:49:10.035100Z

I hate telling people to do this, but try running localStorage.clear() in your console

Adrian Smith 2019-01-02T17:49:47.035900Z

yep the login screen shows now

khardenstine 2019-01-02T17:50:10.036400Z

Ok sorry about that, thats an oversight with our demo environment when people log out

2019-01-02T17:50:47.036700Z

Does this happen when the user token expires

khardenstine 2019-01-02T17:51:58.037100Z

yea old local storage persists (it included new entities in this case), and those fail security

2019-01-02T21:25:11.038Z

@sfyire thanks for reporting this, this was a ticking time bomb 🙂

alexandrkozyrev 2019-01-02T21:57:02.038100Z

+100500

2019-01-02T22:19:09.039400Z

All, we are resetting localStorage to fix the bug Adrian reported. Transact your staging areas! (You should be doing this every day anyway, but tonight you will lose any unsaved work)