« first day (2357 days earlier)      last day (2585 days later) » 

7:00 PM
an event handler gives you an event, an observable gives you a stream of events that will happen
 
@ndugger if you get EventEmitters you probably get observables.
 
I don't know if I know EventEmitters
 
If I scroll with the mouse , or mouse move , don't I already get many events ?
 
@Royi yes, but you get them one by one.
Event handlers fall down when you want to process a stream of events together.
an event handler is like reallyBigAsyncArray.forEach((event) => /* 500 lines */) where an observable is reallyBigAsyncArray.map((p) => await p).map(...).filter(...).reduce(...)
 
To tell you the truth , beside debounce or throuttle - I don't see any scenario where I will want to "buffer" those events to some kind of LINQ usage on those. ( regarding scroll for example)
 
7:03 PM
maybe you don't need em
I know I do
 
Can you please provide a scenario (in your game) where this saved you a lot of code ?
( just to kill my ignorance)
 
that's all I need to set up a synced frame loop (this is for a terminal) and buffer input
 
Maybe I should buy a new ukulele
that's the one
No
an electric drum kit
so I can play in my apartment
That's the one
 
A combo ukulele / bong.
 
dank
 
7:10 PM
@ssube mmm : does this reallyBigAsyncArray.map((p) => await p) will async await each p and then continue mapping or will it async await all p at once ?
 
@Royi you don't need to wait for observables, that's kind of the point of them
 
with an array, you would await, an observable is async already
 
^ (p) => await p ?
 
you don't need to
 
7:11 PM
@Royi that is invalid syntax
 
that's what makes an observable better than an array
multiple values is what makes it different than a promise
 
I was refering to the example you provide reallyBigAsyncArray.map((p) => await p)
 
wait... so, ... lemme see if I can make a shitty ascii graph... tell me if it's right...
 
@ndugger don't make a shitty one: asciiflow.com
@Royi right, that part goes away if you're using a stream
but you retain all of the functional methods (and gain a bunch of others)
and that's not even getting into backpressure handling
have fun writing that yourself
 
:-)
no thanks. But I guess I will also have to learn that
I ask my self what people did before observables. ( Just to know a vs b)
 
7:15 PM
rolled their own logic
 
It's almost 1am, I'll need to be in the airport by 3:50am. I haven't even slept yet.
fml.
 
before observables, we had winmain
 
Is this accurate-ish?
 
no
 
7:17 PM
Well then I'm still confused
 
@ndugger it's simpler than that
@rlemon that's amazing
 
@ndugger me too
 
@ndugger rxmarbles.com
 
When you .map() a RxObservable, you are just transforming each value, as it comes.
 
7:18 PM
dumbed down but still mostly true
 
if you can't understand it after playing with that, you may have a problem
 
I don't see the benefits of observables... It just looks like literally everything else it's trying to emulate/simplify
 
 
That's C#
 
it's still valid
 
7:19 PM
 
the 4 concepts exist in almost every language with async iteration
 
I didn't know you liked Coal Chamber
 
you can do most of what observables give you with async generators
 
A photon checks into a hotel and is asked if he needs any help with his luggage. He says, "No, I'm traveling light."
 
Is there a way to change color of icon for a particular div section when scrolling down?
 
7:20 PM
@AtharvaPandey with JavaScript!
 
@AtharvaPandey sleep
 
@ssube Nice example but looking after res.Subscribe(...) , when will it start iterating ?
 
@Mosho a bunch of coloured circles that you can drag around is hardly helpful
 
they should move
don't they?
sec
 
7:21 PM
it's not helpful until you know what it's representing.
 
@Royi depends on the observable. Typically, when the next item comes in (the next event is fired, the frame ticks, etc)
 
Imagine the onChange event of an input as making the input "observable".
 
@ndugger I was convinced to start using it by the simple ability to perform array-like operations on it, while still basing it on something async like an event.
 
@littlepootis not yet today I will complete this task
 
> Bartender says, "Hey! We don't serve faster than light particles in this establishment."
> -A tachyon walks in to a bar.
 
7:22 PM
@rlemon Downvote
 
lol
 
So it's basically just async arrays... why is that useful?
 
@ssube So it "listens" async to new items ?
 
right
@ndugger well, when your data is async and doesn't exist yet, you can't exactly use array's map/reduce
 
then wait until you get your data
 
7:23 PM
The value comes when you start chaining operations. you take an event and debounce it, filter it to what you care about, etc.
 
This just sounds like nonsense to me
 
So , with C# analogy , it listens if there are new items in db ? ( regarding LINQ-To-db/something) ?
 
@ndugger you can manipulate multiple sources of data, interlace them etc.
in non trivial ways
 
(polling it? or Push ?)
 
best example is an autocomplete
 
7:24 PM
@Royi rx comes built in with listenered for these things: github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/…
 
^ i've seen autocomplete example and the only help here with Rx is debounce ( not to fetch each keystroke)
 
you have text input, submission, arrow keys, results from async API calls
and you have to "combine" them in ways that create a natural UI
feel free to try doing that without observables, which is quite possible
but modelling that around observables is supposed to be more intuitive once you get tha hang of it
 
it's not even terribly difficult, just horribly ugly
there's a lot of state management that can very easily break
 
once use-case is that when a user inputs something continuously you don't want to show anything but the latest result
and you don't want previous results to "flash" before the latest comes in
that is flatMapLatest
 
MMM so from my munderstanding it's LINQ-TO-ASYNC-STREAMS
 
7:27 PM
Rx.Observable.fromEvent($input, 'keyup')
  .pluck('target', 'value')
  .filter(text => text.length > 2 )
  .debounce(500 /* ms */)
  .distinctUntilChanged();
 
^ nice. I don't(!) want to do it manually :-)
 
that being said, I wrote some code using RxJS and it ended up being just as ugly as without
so I dropped it
 
I was exposed to this becuase NG2 started using it. (also Ts and webpack)
 
there aren't many cases where I needed the kind of functionality in autocomplete
 
like generators, iterators, promises, etc, it could very well be overkill
but if you want to work with a bunch of different async streams, you're going to need something that understands them
 
7:28 PM
@Mosho Hmm, I don't think omit is possible with TS's type system
 
Motherfucker.. just pulled my back
:(
 
the thing that put me off the most about rxjs is that it's virtually impossible to debug
 
There's no "not" type, as of yet.
 
is it?
 
for me it was
 
7:29 PM
@ssube It is
 
I haven't had much trouble
 
Everything is in chained function, and especially once transducer were introduced.
 
your stack traces are mostly useless
 
meh, regenerator accomplished that already
 
@MadaraUchiha yeah
 
7:30 PM
@Luggage Continuing this code , how would you then - after all filters applied - do the actual server request ?
 
subscribe to the observable? got me. I don't use RxJS
 
:-)
 
@Royi flatMapLatest
 
Argh.. using TS to transforme my imports mean I MUST use it to transform JSX
which it sucks at
 
7:33 PM
just give up
 
No.
 
@Luggage Yeah, it's one of the only weaknesses I've found to the unobtrusiveness of TS
If you convert a JSX component, you must convert the entire tree.
 
I just fixed all my imports to include "* as" but that breaks babel
sos I must use TS to transform my modules, now
 
@Mosho From my searches it should be something like ( please correct me ) : Rx.Observable.fromEvent($input, 'keyup')......subscribe(a=> gotoserver(a)); no ?
 
Although to be fair, it's not TOO bad
Since you can just add <any, any> to any extends Component and then you're pretty much done.
 
7:34 PM
when babel sees a "* as" it clones.. which breaks some libraries (e.g. pg)
 
@Royi that would make the request, but what do you do with the response?
 
^ :-( you're right
 
@Royi You would map the stream of texts to a stream of responses, by mapping through fetch
Then you process and subscribe to the stream of responses.
 
How would the code look alike ? ( request and response handling) ( psuedo)
 
your JSX comment about typing is unrelated my my issue, which is all about transforms
 
7:37 PM
@Royi Rx.Observable.fromEvent(....).......flatMapLatest(makeRequest)
 
I'm getting really fucking sick of these errors... askubuntu.com/questions/452860/… I got this again.
 
@Luggage Then I misunderstood the problem.
 
^ and response callback?
 
TS can't handle my JSX (I use multiple factories) and Babel can't handle my imports. So.. I'm boned. Gotta go back to synthetic default imports and babel.
 
@Royi The result of that is Observable<Response>
You can subscribe to it and deal with the response directly, or continue with .filter()s and .map()s and whatnot
@Luggage Example?
 
7:38 PM
@Luggage you can use different configurations (tsconfig) for each file
 
@Mosho that means invoking the compiler for each config
 
yeah, just once for each config
it's fast
 
I tried a directory-specific tsconfig that 'extends' the parent. It's ignored
 
@Luggage I mean with code
 
@Luggage you have to tsc --config src/views/not-react/tsconfig.json each and every single one
 
7:39 PM
calling the compiler service yourself
 
it's completely useless
 
not like that
 
well, for me it'll be do-able since src/reports uses one jsxFactory and src/charts another
so, I only need 2 or 3.
 
I compile my typescript "myself"
it's just a few lines but it gives you maximum flexibility
 
Withe the onset of WASM, you could write C++ for scripting in the browser, and JS for your server code. It's completely backwards.
 
user7480455
7:42 PM
Hi Javascript people
 
WASM === End of the world
 
babel has it down right. You can just include a .babelrc in any subfolder to override some settings there.
 
user7480455
any one know the firing order for something.focus or something.blur..
 
you can't blur if you're not focused, sooo
 
I think.
You can't focus if you aren't blurred
 
7:44 PM
chicken or the egg
 
user7480455
so focus is first?
 
chicken.
 
I need to poop, but we're going out for happy hour, so I'm gonna hold it
 
dinosaur
 
better to poop at target than t the bar
 
user7480455
7:45 PM
is there any command that fires before any of them?
 
user7480455
like on mouse move or something
 
you can tab to it
relying on mouse for focus isn't foolproof
 
user7480455
can you explaine
 
events fire in the order they happen.. which depends on what the user does
 
@007 hit tab on your keyboard. tab-focus is a thing
 
user7480455
7:46 PM
ahh ok
 
user7480455
yeah they might use their mice
 
user7480455
hmm
 
what are you trying to do
 
user7480455
I am trying to get a list to update
 
user7480455
with out having to rely on other controls
 
7:47 PM
and that has what to do with events?
 
user7480455
not sure what you are asking mate
 
I'm not your mate, buddy
 
3 mins ago, by 007
any one know the firing order for something.focus or something.blur..
 
user7480455
no offence it's just something that we say sorry
 
Are you Canadian too?
 
user7480455
7:48 PM
right I needed to know a firing order
 
right I need to know why you need a firing order
 
user7480455
no im not but I would like to visit
 
^ you're falling into a trap
 
user7480455
I need to know the order so I would know what came first
 
the chicken
 
user7480455
7:49 PM
as I did not know and I could not find any thing on the internettery
 
user7480455
as I did not know what it was called
 
"what came first", so you're speaking about the events?
 
user7480455
actually what is .blur and .focus called
 
those would be methods.
 
user7480455
yes sir
 
7:50 PM
or properties.
 
user7480455
events
 
.onblur is an event handler for the blur event
 
These Pence memes are becoming more and more amazing
 
user7480455
ok event handlers so need to see a list of whats avail..
 
7:51 PM
mdn events
 
^
 
user7480455
Your mike pence guy looks like a guy from a Michael judge animation
 
user7480455
I cant recall the make
 
anyone good with linux permissions?
14 mins ago, by rlemon
I'm getting really fucking sick of these errors... http://askubuntu.com/questions/452860/usr-bin-sudo-must-be-owned-by-uid-0-and-ha‌​ve-the-setuid-bit-set I got this again.
 
user7480455
name
 
7:52 PM
I'm really not looking forward to formatting again
 
user7480455
ok Ill look up mdn events
 
@rlemon that exact error?
 
I installed this OS this morning. I haven't set a root password.. I'm getting boned in like every step trying to setup this pc
ssube yes
all I've done is installed xfce4, and ran update && upgrade on apt-get
 
user7480455
never heard of mdn.. looks neat
 
user7480455
thanks!
 
7:53 PM
and added a few lines to .profile
this is the second time I've encountered this error in a week.
 
user7480455
hmm not many options for me on this one
 
and like the 5th time this machine has done something resulting in a formatting
 
hm
does it work properly in single user mode?
have you run memory and SMART tests?
 
Ubuntu server 16.04.1
@ssube nope.
I took Oli's advice last time and just formatted
 
I'd start by doing one of those (or both at the same time) and see what happens
 
7:55 PM
don't hate me, how do I run in single user mode?
 
if you boot under single user, you can fix perms if it was just those
 
user7480455
there is nothing wrong with refreshing my list each time someone types something in a field is there... kinda like a real time search
 
53
Q: How do I boot into single-user mode from GRUB?

Alexei AverchenkoAfter changing a few lines in xorg.conf, I can no longer boot Ubuntu (I assume it breaks when trying to load up X), so I need a way to boot into a single-user mode. However, there seems to be zero guides on the Internet how to do it, because they all assume I can actually edit files on my compute...

it's root-only mode
so then you can go and fix things, see if it breaks again, run diagnostics, w/e
chmod things back into sort of working and debug further
 
Hi
 
user7480455
Ello ello!
 
7:57 PM
James Bond isn't even good
 
user7480455
So how did you guys learn java?
 
user7480455
I said the other day it seems really hard
 
java isn't javascript
 
user7480455
It so odd how you see the examples and stuff typed in...
 
user7480455
its
 
7:59 PM
yeah, I don't use any language that involves typing
 
user7480455
A brace here.. and bracket there
 
user7480455
HA!
 
start with BASIC then
 
/**
 * Dictated and copywritten but not read, 2017, ssube.
 */
 
again, since you seem to have not read my message, java isn't javascript
 

« first day (2357 days earlier)      last day (2585 days later) »