« first day (2175 days earlier)      last day (2776 days later) » 

7:16 PM
cricket
 
...
 
ribbet
 
options={options.map(option => <option value={option.option}>{option.value}</option>)}
when variable naming done gone wrong
 
god darnit
subbe aint here
 
7:35 PM
mornings
in a react redux reducer, is this a dumb way to keep nested object properties when they are not concerned by an action?
return ({...state, climateIndicators: Object.assign({}, state.climateIndicators, action.climateIndicators)});
 
@Luggage quite the opposite, we're heavy AWS users :)
 
@corvid heh
 
@FélixGagnon-Grenier I've done that a few times
 
@corvid did it came back to bite you in the arse?
 
Nope, can't say it ever has
 
7:42 PM
why isn't npm install also installing devDependencies?
even when i'm running npm install --only=dev
 
kewl. gratie for the insight
 
i'm not sure if that's out dated or not
 
@Luggage almost 40k messages in chat!
 
oi
Any good state management primers? I found this tonyhb.gitbooks.io/redux-without-profanity/content/…
 
was googling "low poly wallpaper". This came up
they're not wrong
 
user2620028
7:52 PM
you ask and you shall receive
 
anyway, anyone know where can I find good dark-themed low poly stuff that actually has some light source and is not a random wall?
 
wat
 
I like making low poly art
 
or any other cool non visually-intensive but that give you a fair sense of where you are on the screen just by looking at a few pixels wallpapers?
hint: gradients can be very very very heavy on the eye
noised gradients however...
 
 
7:55 PM
@FlorianMargaine 40k messages in what chat? I missed some context
@BenjaminGruenbaum How did it go?
 
@Luggage SO chat
 
What's that got to do with the AWS thing?
 
I may have to learn how to do poly art to get to a satisfactory-level wallpaper :/
 
ohh, number of messages I have.. i see
meh.. I'm not competing with Lemon.
 
@towc I used an app on OS X
I forget the name, but it was fun
I'd have a photo and then draw my vector polys on a layer above that... I should find that app
 
8:06 PM
I'm looking for 3d low poly, not delaunay triangulation :P
 
o
ok nerd
TIL what it's called :d
 
;)
was thinking about using cheatsheets for things I was trying to learn as wallpapers
 
Whew, what a busy day
 
TIL results for google imaging "wallpaper javascript" are nsfw
 
it has been abnormally quiet in here today
 
8:13 PM
about time you js slackers get a real day of work
dodges
 
@KevinB well, most of the day it's me and dank memes, but for the past 2 weeks I've been in pure overdrive mode at work, so I haven't been doing much memeing recently
I troll for good Main questions but those are rare
@towc this is more my style of music
 
8:35 PM
Is there a way to manage a "click outside" of an element, if that makes sense? without using e.stopPropogation
 
set up a listener on window and on element, check if the event happened on both or just one
 
set up a listener on window and look at the event.target. If it's a descendant of the element or the element, return early.
 
give it a tab index, and assign an onblur event
 
too tempted to make a "give it a fish, teach it how to fish" joke, but too stupid to think of a good one
 
9:15 PM
was there a new "in array" method in ES6?
 
array.includes?
 
yes
tnx
 
Wes
!!eval [NaN].includes(NaN)
 
@Wes true
 
Wes
no way
 
9:17 PM
whoa
 
poop
 
Working on a Node JS project that will do a fair amount of heavy processing. My first thought was to spawn child processes to deal with the heavier requests, but I've noticed a few C++ web worker modules out in the wildlands of NPM, and wondered if they'd be a better fit...

Any opinions?
 
is there a lot of conversation between the 'worker' and a main thread or just fire, wait, get result?
 
@Charlie I'd do it properly and use a queue, as in, your app puts items on the queue, a specialized app gets them from the queue, does its work, puts back on a "result" queue, nodejs picks it up from there
 
yea, that.. ^
I like "bull" for a redis-backed queue in node
now.. that doesn't really answer the separate process vs worker question, though..
 
9:30 PM
Yep.
 
I'm old fashioned. Separate process
you could even run it in pm2 in cluster mode to scale up/down
 
I'd like to do that, but the web-worker implementation is an interesting idea.
 
posted on September 29, 2016 by Axel Rauschmayer

The ECMAScript proposal “global” by Jordan Harband is currently at stage 3. It provides a new standard way of accessing the global object. Referring to the global object The following are a few popular ways of referring to the global object: Global variables: Global variable window: is the classic way of referring to the global object. But it doesn’t work in Node.js and in Web Workers. Glo

 
I know of workers, but never used them in node.
 
As do I. But I want to know if there's a performance benefit in using them, as a process pool and a queue would be my preference, but if I'm losing out on performance, then I'd rather add a little more complexity and use a thread implementation...
 
9:36 PM
if there is a performance difference it'll be just with starting a new process. If that process is alwaya running and listening to a queue, then there shouldn't be and differnce at all
 
I'm assuming processes have a higher memory overhead too, which would limit the size of the 'worker' pool.
 
possibly some lower memory use with a single process, but I don't really have ram issues and I don't try to be very efficient
a process isn't TOO heavy. is this running in linux?
 
Will be.
 
a dozen or so extra processes is nothing. and if they are running and jsut waiting, then instance response.
and they can die.
 
This is the library I'm looking at, btw - github.com/audreyt/node-webworker-threads
 
9:38 PM
and a good queue will manage re-trying failed tasks, etc
As long as you can change between worker and separate process if you decide to, then you did it right
I mean.. without having to go touch a bunch of files.
so, was there 'conversation' between workers or worker and main process, or is it a fire-and-forget thing?
 
I need to collect groups of results as they come in.
 
In ES modules, you can export const foo = 123;, but not export default const foo = 123;. Why?
 
would you ever scale to a level that you need multiple servers? That would be a reason to be multi-process.
export default 123;
 
Possibly... Didn't know you could run Node JS processes across machines. Any details on that?
 
well, it would just be another process that listens for a message, processes, persist the results (or sends another message)
which is how I imagined a separate process on the same machine. I wasn't thinking about any inter-process communication outside of a queue
 
9:52 PM
@Luggage doesn't answer my question :); why allow the former but not the latter?
 
I don't know.
 
@ŠimeVidas there is a technical explanation, but i can't give a reason
 
but export default takes an expression, unlike the other forms
 
let and const are lexical declarations
and the spec that export declaration doesn't allow it, it only allows HoistableDeclarations, ClassDeclaration, and AssignmentExpression
i don't know why that was decided though
 
9:57 PM
@bitten you mean export default only allows those three; the plain export allows more, incl. export lettc39.github.io/ecma262/#prod-ExportDeclaration
 
the JS gods demanded it be like that.
if you violate the rule, you go to PHP
 
because that's how it is
 
Hey everyone! how's things? I wanted to pop a quick question, what do you guys use when you want to write a quick web app? I mean as a back end. Cuz I had this funny idea I wanted to create but I don't have a server to host the back end (which is minimal)
 
@ŠimeVidas yes
 
well, i use coldfusion, because that's what we have running here. but that doesn't really help you i think
 
9:59 PM
export seems to allow Declaration and VariableStatement
 
(but not so minimal it can be a static website)... I was thinking Google apps tho I dunno if work that way... I also remember seeing a demo where a meteor app was deployed live just like that... I wonder if I can replicate.
 
@KevinB that's just the waaay it isssss..
@Thaenor what's your budget?
@Luggage one does not simply understand the specification
 
simply interpret the spec in whatever way is most advantageous to you
 
m59
 // If you have a bunch of child processes you want to pipe, this makes sense to me
processes.reduce((prev, curr) => {
    prev.stdout.pipe(curr.stdin)
    prev.stderr.pipe(curr.stderr)
    return curr
  })
but, I get ENOTCONN
I presume that the reduce introduces a race condition
 
@KevinB okay legolas ^^
 
m59
10:09 PM
processes[0] is probably over by the time it is piped. But... this is still odd to me
Can anyone confirm my thinking, and if so, can we just not write code to automate piping reliably?
 
I've seen a case where the first process closes the stream and it failed like that
 
m59
Before running into this, I assumed that the process didn't actually run until the next tick or something like that, so you'd always have time to synchronously do your piping.
 
are you sure that one process isn't failing and closing early?
that was what happened to me
I was piping the output of one process to another, and when the firs tprocess would stop early it would stop the whole process with ENOTCONN (i think.. or somethign similar)
 
m59
I'm prone to err, but I've been trading between the reduce and manual piping it all and manual works
 
hm.
well, ok, but the reduce should work.
stderr.pipe(curr.stderr) <- is this right? can you do that?
I think I collect all stderrs into my own
yea.. i guess that's right
So.. it shouldn't be timing as reduce is syncronous...
 
m59
10:29 PM
ah!
You're right. It's stderr
 
is there a DOM method for "next nth sibling" ?
 
m59
So, you pipe all the stderr's directly to process.stderr?
 
Yup.
I guess my own stderr is writable, since that' my output, but other processes is read-only
 
m59
guess so
 
@bitten 000USD
 
10:32 PM
i don't know that but writing to another processes std out does sound invalid
er.. and stderr is like that
 
I was thnking Google Apps, Firebase or meteor's free domain to run the thing. It's more of a joke thing which, best case scenario will be marginally useful, so no... I don't intent to spend money on a back end server.
 
@Thaenor I used virual machines, back in the day when I couldnt afford a VPS
if you have a friend with VPS, you can bum a virtual host from said friend
 
@MadaraUchiha How do I get an Icon in the tag ?
 
(if we are talking $0 budget solutions)
 
@tereško o/ hey man!
 
10:35 PM
yo
@Abhishrek so , did you read the "48 Laws of Power" book?
 
m59
@Luggage makes sense. I am a total dummy.
 
@tereško nope not yet
@tereško that shit is scary!
 
m59
@Luggage You know what's also odd? cp.pipe(process.stdin) works just the same as cp.pipe(process.stdout)
that is very unexpected
process.stdin must detect when something is piped in from a child process and forwards it to process.stdout? but why?
 
@Abhishrek it's one of those "grown up books" :P
 
m59
hmph. You can process.stdin.write('etc') and that goes to stdout. Wuut.
 
10:53 PM
More nutty questions... What do you make of using large JS objects/arrays as an in-memory db versus Redis?
 
11:05 PM
@tereško I'm instantly addicted
 
@m59 echo. Just like how you can type while the process is running int he terminal
(a guess)
@Charlie redis is also in memory. you mean in-process?
how big?
I highly recommend redis. A huge benefit is that your app can crash and reset and redis will be right there with your 'state'.
 
11:24 PM
@Abhishrek btw, you also might enjoy this:
 
allo
 
anyone watched Zero Days
shud be fucking awesome
it's about that virus that US/Israel planted on the Iranian centrifuges
netflix doesn't have it
 
@NicholasKyriakides i've seen it
 
is it good?
 
11:32 PM
i thought it was interesting. i don't have more than a surface level knowledge of the events, so i can't speak to its accuracy
but it's a well-made documentary
 
recommended?
@NathanJones
 
m59
11:50 PM
@Luggage ah! Good point. Probably just a standard thing then
 
that is just a guess.. i'm not terribly confident
 
@NicholasKyriakides yeah, I'd recommend it
@NicholasKyriakides the same director also did a great documentary on scientology called Going Clear
 
Ah that was on Netflix I think
I'm gonna watch that tonight
 
how much more memory does a function object take up than an object that references a function?
 
11:59 PM
I guess better put, how much memory will a function take up
 

« first day (2175 days earlier)      last day (2776 days later) »