« first day (1 day earlier)      last day (169 days later) » 

00:43
optimized a 18ms function to 1.5ms
Chrome dev tools FTW
 
9 hours later…
09:59
@SomeKittens do tell
10:26
0
Q: How do I get rid of a Bluebird warning when chaining more than one flatMap operator in RxJS?

Nathan JonesThis code gives me this error Warning: a promise was created in a handler but none were returned from it var Observable = Rx.Observable; var source = Observable.range(0, 3); source .flatMap(item => { console.log('getting first promise'); return Observable.fromPromise( new Prom...

@BenjaminGruenbaum For you
 
2 hours later…
12:15
Thanks, not much one can do about it - Rx is pretty terribly written in .net style.
 
6 hours later…
17:58
@BenjaminGruenbaum They were creating four new tables every time
tl;dr only do DOM manipulation needed
18:37
It'd be even faster with some sort of check to only update stuff we know has changed
but it's good enough for now
morning, @copy
Morning
 
2 hours later…
20:57
Morning
@SomeKittens can't you just vdom and diff or whatever the cool kids call it now?
Something like that
better options for tooling now that IE 8-10 are dead
though right now my biggest challenge is onboarding my new report
Dead - but we still have to support IE9 and 10 :D
Hmm, I'm wondering if we can have a type that's T | () => T (that is, either the type or a function for the type) for laziness.
how would that work?
If it could be automatically instrumented it could be an awesome way to do laziness. After all functional languages use thunks for it all the time.
Basically, imagine you have a function f that returns a promise. You can do:
f().then(...).then(...);
It could be cool if you could do f.then(...).then(...).invoke() and it would only actually start the actions in the promise chain on the invoke.
Kind of like what Rx does where subscribe starts the action - only generalized to any type.
oh, I see
I do really like the "no start until subscribe" which solves all the "How do I defer a promise start" problems
21:03
It was discussed briefly at es-observable lemme dig it up.
though I've ran into lots of problems with multiple subscriptions on Gustav but I'm an edge case there
@SomeKittens an Rx observable defers a function. I remembered it after talking to Reed at the C# room w.r.t cancellation.
@SomeKittens you're really not, how do you think the average angular dev is going to feel when they find out htey're making two requests instead of one :D ?
I'm not sure how Angular's HTTP handles that
@BenjaminGruenbaum When you evaluate the lazy part, does it remember the value?
Here is the es-observable issue regarding it btw: github.com/zenparsing/es-observable/issues/34
@copy probably not. Just like when you invoke a function twice. That assumption is only valid if you can assume purity.
21:07
Sadly I haven't been keeping up with my FP studies
It's not really an FP concept - it's just having the concept of manipulating the result of a function without invoking the function. It's like constructing new functions.
Basically, now you wrap things in functions, but it could be interesting to explore a general pattern for what Rx does where it subscribes to invoke the action. It's pretty obvious why Rx requires it (to not miss events and all).
I wonder if we can distil the function object pattern domenic and jafar discuss there and actually generalize it.
21:36
with Object.defineProperty(), sure
gimme a sec
hacky but it fulfills your spec
I want the thens to chain :D
The trick is to get the same type of return value. I think this isn't really possible in a dynamic language.
You don't really want a () => T It's harder you want a F<T> where F<T> has all the methods X => Y of F only with signatures X => F<Y>.
Let me be clearer
You want to lift all functions X => Y into F<Y> where F has a function invoke X => Y. So basically lift(f).invoke(x) returns the same as f(x)`. Only F also has all the functions Y does except with the above said altered signatures.
f:: a -> b
lift:: (a -> b) -> (F<a, b>)
invoke:: F<a, b> -> a -> b
compose:: (b -> c) -> (F<a, b> -> F<b, c>)
I guess the correct way to consider "all the functions on a type b" is to just look at "all the functions whose first argument is a b". Which leaves us with drumroll arrows.

« first day (1 day earlier)      last day (169 days later) »