00:00:18  * kakashiALquit (Read error: No route to host)
00:00:58  * arpuquit (Ping timeout: 260 seconds)
00:02:41  * warzjoined
00:03:00  * nettowebquit (Ping timeout: 240 seconds)
00:04:09  * YoYquit (Ping timeout: 252 seconds)
00:04:16  * kiki`joined
00:05:27  <warz>hi all. im trying to implement some code similar to how a browser allows you to do "element.onclick = ..." where that onclick property i believe is dynamically set.
00:05:49  <warz>i could be wrong, and it could have knowledge of exact properties for event handlers.
00:05:59  * YoYjoined
00:06:06  <warz>but is there a way to make a setter that dynamically inspects the desired property like that
00:06:08  * kakashiALjoined
00:06:16  <warz>and check to see if it starts with "on"
00:07:46  <WebDawg>I think I have it joepie91 ...
00:07:53  * ivan_the_monkeyquit (Ping timeout: 255 seconds)
00:08:08  <zsoc>dynamically set? afaik it's a prototyped method a dom element...
00:08:30  * liamonadequit (Quit: Leaving)
00:09:07  <warz>ok thatd make it easier.
00:09:20  * dirtyroshi_joined
00:09:40  * dirtyroshi_quit (Remote host closed the connection)
00:09:45  <joepie91>warz: are you trying to write your own event emitter, or?
00:09:54  * gucci_meowjoined
00:10:22  <joepie91>warz: because the .onclick API is rather poorly designed and generally recommended against, and I wouldn't recommend trying to replicate it
00:10:45  <joepie91>(it also isn't a 'global setter', there's a limited set of events that are known to the runtime, so it doesn't *have* to catch all property sets)
00:11:04  <warz>nah im just trying to mock a little bit of a browser's `window` and `window.history`. i only want to mock `onpopstate`.
00:11:18  <warz>it does indeed look like these functions are pre-known, or whatever.
00:11:23  <warz>so that's simpler.
00:11:24  <joepie91>warz: for what purpose?
00:11:59  * bkoldenquit (Quit: WeeChat 1.4)
00:12:24  * dirtyroshiquit (Ping timeout: 252 seconds)
00:13:05  <warz>well truly, i dont know the purpose. i think it could be useful for a server rendered react app, for example, that needs to have at least a basic first render pass access to some of these history related mechanisms, etc.
00:13:14  <warz>jsdom doesnt implement any of it yet.
00:13:29  * ivan_the_monkeyjoined
00:14:02  <joepie91>warz: I would generally advise that if you need "server-side React rendering", you shouldn't be using an SPA library like React in the first place... because SPA libraries are specialized tools for highly interactive applications that don't fit a request/response model
00:14:24  <joepie91>if you can "pre-render a view" server-side, chances are that your project fits a request/response model just fine
00:14:34  <joepie91>there are probably a few exceptions, but I wouldn't consider it a common case
00:15:21  <warz>joepie91, thanks for that, but yea its super common to pre-render the initial request for many SPA libs
00:15:31  * mnutt_joined
00:15:37  <joepie91>aside from that... there's a pre-defined set of event handlers, and there's no need to track assignments to `onclick` properties and such, because they're just properties... the only reason they're "event handlers" is because some code, at some point, looks at the pre-defined property name to see if it's set... and if yes, it invokes the callback
00:15:39  <warz>react and all react-alikes, vue, etc
00:15:42  <warz>all have server rendering
00:15:52  <joepie91>warz: aware, but it's also support common to use SPA libs for purposes they're really not suited for :)
00:15:59  <joepie91>super*
00:16:19  <joepie91>and the path forward there imo is to explain to people what they're actually for and get them to stop using them for inappropriate purposes
00:16:22  <joepie91>not to accommodate it further
00:16:41  <joepie91>because really, the dominant perception of SPA libs is that "this is the new way to build websites/webapps" which is just nonsense
00:16:51  <joepie91>thanks to hype
00:17:21  * haraiquit (Ping timeout: 252 seconds)
00:18:50  <warz>inappropriate? this is literally the whole purpose of react. on server rendering, its no different than jinja or whatever express supports, etc.
00:19:06  <warz>on browser it supports more life cycle events for interaction.
00:19:14  <warz>its both worlds in 1.
00:19:15  * macbookprojoined
00:19:17  <joepie91>warz: I'm talking about "using React or other SPA libs for sites that fit the request/response model"
00:19:21  <joepie91>which is an inappropriate use of it
00:19:49  * kingarmadilloquit (Ping timeout: 245 seconds)
00:19:51  <graingert>joepie91: nope because it's universal
00:19:58  <warz>you can say that the other way around. sites that fit the request response model also likely fit SPA model.
00:20:14  <warz>same thing.
00:20:19  * modlinjoined
00:20:24  <joepie91>warz: it's not about whether it fits the SPA model or not
00:20:31  <joepie91>it's about whether it's a sound technical decision
00:20:33  <joepie91>and it's not
00:20:36  <joepie91>to quote from last night...
00:20:56  <joepie91>[11:10] <joepie91> ______: what you're describing is just a website, and building an SPA with something like React will just increase complexity, make debugging harder, add an unnecessary client-side JS requirement, make the site more demanding on client devices, and break native browser behaviour
00:21:22  <joepie91>SPAs are inherently more complex to deal with than entirely server-rendered sites
00:21:29  <warz>i dont even agree at all
00:21:33  <joepie91>unless you have a _concrete reason_ to build an SPA, it's a bad idea.
00:21:49  <warz>i agree theyre a bit more complex at first glance, but really not so much
00:22:13  <joepie91>they're *considerably* more complex, and I am not at all talking about "at first glance"
00:22:31  <saul>i'm noticing that when i make a POST for my app, it works normally, but then i get one or two duplicate POSTs some time after
00:22:57  <joepie91>not to mention all the other issues involved.
00:23:28  <saul>is this normal ???
00:24:50  <warz>well its always good to hear other people's stories :)
00:26:00  * wrkrcoopjoined
00:26:23  * dioheadjoined
00:27:50  * wrkrcooppart
00:27:52  * wrkrcoopjoined
00:27:56  * wrkrcooppart
00:28:25  <joepie91>graingert: there's no such thing as "universal" when trying to combine client-side and server-side rendering... they are fundamentally different environments with different optimal solutions and different trust boundaries.
00:28:27  * wrkrcoopjoined
00:28:30  <wrkrcoop>i want to call this.scope.$apply() after i finish my for loop … but im not sure how to do that so im creating a new function called applyScope which returns a promise … but it seems to smell … anyone know a better way to call this.scope.$apply() https://gist.github.com/anonymous/3df4d47a5cb14d431af4b9bbe79ab5ca#file-a-js-L9-L20
00:28:37  <graingert>joepie91: nope
00:28:58  <joepie91>graingert: "nope" is not an argument.
00:29:08  <graingert>wrkrcoop: you probably want to try #angularjs
00:29:22  <zsoc>can we go back to saying isomorphic, that was more fun
00:29:49  * DeckTonequit (Remote host closed the connection)
00:29:49  <wrkrcoop>graingert: well the reason why i asked here is bc it seems to be about how can i call something … well i guess the for loop isnt async so i should be able to call it after the for loop right?
00:29:59  <graingert>DeckTone: yeah but nonsense
00:30:10  <graingert>zsoc: **
00:30:47  <graingert>wrkrcoop: yeah go ask in ##javascript
00:31:42  * ivan_the_monkeyquit (Ping timeout: 248 seconds)
00:32:27  <saul>i figured it out, if you dont send even an empty res.send(); the browser will keep posting
00:32:41  * DeckTonejoined
00:34:20  * sh4rm4^bncjoined
00:34:22  <zsoc>you should probably be sending 201/202 or 303 if you have a post-redirect-get pattern
00:35:31  * sh4rm4^bncpart
00:36:55  * kingarmadillojoined
00:37:23  * orbital-smithjoined
00:37:55  * kingarmadilloquit (Read error: Connection reset by peer)
00:38:48  * sh4botjoined
00:40:28  <sh4bot>why does this string "\xff\xaa\x01\x32\x65" get transformed to c3bfc2aa013265 when eval'd ?
00:40:53  * r4nd0m0nejoined
00:41:09  <sh4bot>the same happens when i have those values in an Uint8Array and pass that to String.fromCharCode
00:41:56  * kingarmadillojoined
00:42:01  <sh4bot>the problem here is that the \xff becomes \xc3\xbf\xc2
00:42:36  * r4nd0m-0nequit (Ping timeout: 240 seconds)
00:45:06  * nicojuicyquit (Ping timeout: 240 seconds)
00:45:11  <joepie91>sh4bot: gist your code?
00:47:48  <sh4bot>https://0x0.st/fRB.js
00:48:11  <sh4bot>you need to pipe the output through od or hexdump to see the transformation
00:48:19  * nettoweb1quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:52:07  * nettowebjoined
00:52:18  * FIFOdjoined
00:53:21  * Guest87941quit (Read error: Connection reset by peer)
00:53:43  * Guest87941joined
00:53:51  * Slartibartquit (Ping timeout: 258 seconds)
00:53:54  <sh4bot>the String.fromCharCode example is here joepie91 : http://sprunge.us/EdBj
00:54:59  <joepie91>sh4bot: one sec
00:55:11  * sh4rm4^bncjoined
00:55:30  * publioquit (Ping timeout: 240 seconds)
00:56:57  * lennymquit (Quit: Connection closed for inactivity)
00:57:10  * cccjoined
00:57:47  <joepie91>sh4bot: the eval can be ruled out as being involved, as I can reproduce it with this code as well: https://gist.github.com/joepie91/3fa7e92c4fb8e7636adea59334d18a12
00:58:26  <joepie91>sh4bot: tests suggest that there's some kind of encoding conversion happening on output, rather than in JS: https://gist.github.com/joepie91/2d59914167260eb9f2a987cff5fce644
00:59:11  <sh4bot>it seems to be a bug of console.log(). when i use my own "raw2hex" function, the converted string is correct
00:59:23  <joepie91>sh4bot: I'm not sure I'd call it a "bug" just yet
00:59:33  <joepie91>it's very possible that there's a necessary conversion to make it show up correctly on your terminal
00:59:59  <joepie91>unfortunately I know very little about what happens beyond console.log
01:00:08  <joepie91>you might have better luck with this question in #node-dev
01:00:19  <joepie91>(core Node.js dev channel)
01:01:02  <sh4bot>well, i dont see how changing bytes can be considered "correct"
01:01:12  <joepie91>the only conversion appears to be ff => c3 bf c2
01:01:29  <sh4bot>when i do the same with perl or python, it dumps the exact byte sequence to the terminal
01:01:31  * omejoined
01:01:32  <sh4bot>yes
01:01:59  * Fleuvquit (Quit: Ciao)
01:02:19  * dommeljoined
01:02:51  <joepie91>sh4bot: I think I've found the culrpit
01:02:53  <joepie91>culprit *
01:02:58  * nettowebquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:03:13  <joepie91>process.stdout.write(Buffer.from("\xff\xaa\x01\x32\x65", "utf8")); results in c3 bf c2 aa 01 32 65
01:03:21  <zsoc>00ff is the unicode for c3 bf, if that's anything of interest
01:03:23  <joepie91>process.stdout.write(Buffer.from("\xff\xaa\x01\x32\x65", "ascii")); results in ff aa 01 32 65
01:03:34  <zsoc>see we figured it out at the same time lol
01:03:35  <joepie91>so I'm guessing that `ff` isn't valid in unicode or such
01:03:46  <joepie91>lol
01:04:08  <zsoc>You just did it all fancy like with your proofs and your code :p
01:04:12  <joepie91>lol
01:04:18  <joepie91>yeah well :P
01:04:19  * dkingsjoined
01:04:25  <joepie91>best way to figure things out is to try them...
01:05:01  * mnutt_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:05:13  <dommel>why can't i have an anonymous self-invoking async function in the global scope of a file? i get a TypeError...
01:06:01  <joepie91>[02:03] <zsoc> 00ff is the unicode for c3 bf, if that's anything of interest
01:06:06  <joepie91>do you have a link concerning this?
01:06:48  <zsoc>uh.. any utf8 chart i'd imagine? Lol, it's the last entry here: http://www.utf8-chartable.de/
01:07:07  * buddydudejoined
01:07:32  * joepie91is not intimately familiar with utf codepoint mapping
01:07:40  <myndzi>ff is 11111111 so in utf8 it's 110xxxxx 10xxxxxx -> 11000011 10111111 -> C3 BF
01:08:03  <joepie91>ahh
01:08:06  <myndzi>js is storing the correct values internally
01:08:09  <joepie91>that makes a ton of sense
01:08:13  <myndzi>but when you dump them to the console it's dumping utf-8 encoded output
01:08:19  * NeverDiequit (Remote host closed the connection)
01:08:30  <myndzi>which is a reasonably sane default
01:08:35  <joepie91>myndzi: so what makes the 'ascii' approach work?
01:08:51  * dkingsquit (Ping timeout: 240 seconds)
01:08:56  <myndzi>it's decoding the string to the buffer without encoding
01:09:14  <myndzi>i don't actually know what happens if you decode a non-ascii character that way, i imagine it gets clipped
01:09:18  * myndzitries
01:09:30  <joepie91>myndzi: as in, it assumes FF to just be a literal byte, rather than a UTF-8 codepoint?
01:09:51  * warzquit
01:09:53  <joepie91>(and the byte is output as-is whereas if it were interpreted as a UTF-8 codepoint, it would need to be encoded upon output?)
01:10:07  <myndzi>well
01:10:13  <myndzi>js stores strings as utf-16 internally
01:10:14  <zsoc>v8 actually recently changed how it handles invalid utf8 buffers... in v5.5 (we're on v5.4 at the moment).. so this behavior /may/ change in node v8.x
01:10:21  <myndzi>so it can storoe 65536 values per character
01:10:24  <myndzi>store*
01:10:35  <myndzi>when you use 'ascii' encoding for string -> buffer it literally outputs one byte per character
01:10:50  <myndzi>which means you can lose data, but if you know the data is valid ascii code points (0-255) then you're fine
01:11:01  <myndzi>n> Buffer.from('�', 'ascii')
01:11:04  <babelboot>myndzi: (okay) <Buffer fd>
01:11:10  <myndzi>that lost something across irc
01:11:16  <joepie91>yeah, I was expecting it to.. :D
01:11:26  <myndzi>anyway i picked a random large value
01:11:36  <myndzi>Buffer.from using utf8 is ef bf bd
01:11:42  <myndzi>Buffer.from using ascii is 3e
01:11:46  <myndzi>if we take the values...
01:11:54  <joepie91>oh, hum, actually then the encoding should probably be 'binary', not 'ascii'...
01:11:56  * nettoweb1joined
01:12:03  <myndzi>11101111 10111111 10111101
01:12:26  <myndzi>strip the utf-8 trappings:
01:12:36  <myndzi>1111 111111 111101
01:12:39  <myndzi>regroup:
01:12:46  * munch_quit (Remote host closed the connection)
01:12:54  <myndzi>11111111 11111101
01:13:00  * addaleaxjoined
01:13:06  <myndzi>we can see that FD is the last byte
01:13:15  <myndzi>i dunno where my 3e came from maybe i did it wrong
01:13:27  <joepie91>myndzi: I understand some oof this :P
01:13:28  <joepie91>of*
01:13:36  * rhoquit (Ping timeout: 240 seconds)
01:13:46  <myndzi>basically node is throwing away the > 255 data as far as i can tell
01:13:52  <buddydude>I'm trying to stream STDOUT of multiple command executions through a single pipe (and preserving order). Here's roughly what I have: http://pastebin.com/YE76Z9i1 - Unfortunately, when one of the commands doesn't have any output, the pipe hangs (presumably because there is no "end" event?)
01:13:53  <myndzi>when you decode a string as ascii to a buffer
01:13:56  <buddydude>anyone know how to get around that?
01:14:04  <myndzi>which is fine if you ensure the input is 0-255 to begin with
01:14:40  <joepie91>myndzi: mm, I suppose this is why I had to use the `binary` encoding when dealing with a part-text-part-binary protocol
01:14:46  <myndzi>buddydude: i think you want process.on('end') ?
01:14:49  * kingarmadilloquit (Ping timeout: 245 seconds)
01:14:55  * u0m3__quit (Quit: Leaving)
01:15:02  <zsoc>Interesting how python changed it's behavior from 2.7 to 3.0 to be inline with what happens in node...
01:15:03  * cccquit (Quit: Page closed)
01:15:04  <myndzi>joepie91: basically you always want to know what your data is doing to make it do the right thing ;)
01:15:15  <buddydude>I'll give it a shot
01:15:20  * kingarmadillojoined
01:15:26  * chasestarrjoined
01:15:43  * Siegfriedquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:15:54  <myndzi>since dumping random binary bytes to a tty can screw with it, you usually don't want to do that anyway
01:16:25  * chasestarrquit (Client Quit)
01:16:49  <sh4bot>unless you want to
01:17:03  <sh4bot>like for piping it into another program
01:17:08  * kbckpart ("Leaving")
01:17:16  <sh4bot>like all the unix programs work, gzip, od, etc
01:17:18  <myndzi>joepie91: i either did math wrong or lost something in translation heh. 'unicodething'.codePointAt(0).toString(16) gave me d83e, so yeah, it's the bottom byte
01:17:36  <myndzi>sh4bot: sure, but console.log() isn't what you'd use for that
01:17:42  <myndzi>you'd be using stdout and dealing with buffers
01:17:45  <myndzi>not console.log and strings
01:17:58  <sh4bot>so you cannot actually use node in a series of pipes if you deal with binary data
01:18:04  <myndzi>sure you can
01:18:07  <myndzi>you just have to do it sanely
01:18:07  <joepie91>sh4bot: see what myndzi said above.
01:18:17  <myndzi>and understand that console.log is *presentational*
01:18:17  <joepie91>you're using the wrong tools
01:18:36  <myndzi>console.log does NOT output literally what you give it, and you shouldn't expect it to
01:19:01  * NeverDiejoined
01:19:04  <myndzi>and strings do NOT represent binary data without any processing/encoding, and you shouldn't expect them to
01:19:13  <sh4bot>yeah, i already noticed that in a job with a lot of output console.log stops responding after a while
01:19:19  <sh4bot>unless i pipe it into cat
01:19:24  * braincrashquit (Ping timeout: 245 seconds)
01:19:33  <myndzi>one thing that can really get people confused in a similar fashion is logging date objects
01:19:44  <myndzi>often we use console.log just to check something to make sure it looks sane
01:19:58  <myndzi>but stringifying a date localizes it so the timezone may look wrong
01:20:01  * ed209quit (Remote host closed the connection)
01:20:08  * ed209joined
01:20:08  <myndzi>people wonder "is the epoch number i gave when i constructed the date wrong then?"
01:20:12  <myndzi>or something like that
01:20:36  <myndzi>but it's not... it's just that the stringification is going through a localization step; the data remains the same but can be displayed many ways
01:20:46  <myndzi>and a sane-ish default (local time) is used when doing that
01:21:55  * victorclfjoined
01:22:03  <sh4bot>anyway, console.log trying to guess what the user wants was in my case counterproductive
01:22:33  <myndzi>btw node docs say ascii strips the high bit
01:22:40  <myndzi>so you want binary aka latin1 for that sort of thing
01:22:47  <sh4bot>and there are many people criticizing the way python3 changed the meaning of strings
01:23:01  * a_thakurquit (Remote host closed the connection)
01:23:07  <sh4bot>especially that they abandoned utf-8 by default
01:23:23  <myndzi>n> Buffer.from([\xff]).toString('ascii').codePointAt(0)
01:23:26  <babelboot>myndzi: (okay) ^ SyntaxError: Invalid or unexpected token at Object.<anonymous> (/var/ws/eval-js.js:11:26) at Module._compile (module.js:573:32) at Object.Module._extensions..js (module.js:582:10) at Module.load (module.js:490:32) ... https://git.io/vMrGw
01:23:31  <myndzi>didn't think i did that right lol
01:23:37  * nettoweb1quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:23:51  <myndzi>n> Buffer.from([0xff]).toString('ascii').codePointAt(0)
01:23:54  <babelboot>myndzi: (okay) 127
01:24:08  <myndzi>n> Buffer.from([0xff]).toString('binary').codePointAt(0)
01:24:11  <babelboot>myndzi: (okay) 255
01:24:52  * nettowebjoined
01:25:36  * qswzquit (Ping timeout: 260 seconds)
01:26:04  <joepie91>sh4bot: right, but this isn't a problem of what console.log does, it's a problem of trying to use console.log for the wrong purpose
01:26:49  <sh4bot>yeah, like print in perl or printf in C...
01:27:53  <sh4bot>but anyway, thanks for clarifying the issue
01:27:59  <myndzi>i wouldn't really say that awareness of more expansive encodings by default built into the language at a low level is a disadvantage
01:28:07  * smccarthyquit (Remote host closed the connection)
01:28:31  <sh4bot>i guess i now give my nick and nickserv password back to my ircbot, i took over his personality to be able to speak here...
01:28:33  <myndzi>in the end it makes international characters more of a first class citizen than a hassle to deal with
01:28:37  <joepie91>(fwiw, JS is by far the least painful language I've worked in concerning unicode)
01:28:43  * smccarthyjoined
01:29:01  <myndzi>even if .length is a pain :V
01:29:22  * e14joined
01:30:12  * scippioquit (Quit: Leaving.)
01:31:01  <sh4bot>myndzi: i disagree. JS choose UTF16 which is 1) complicated 2) unable to represent all characters
01:31:24  <sh4bot>utf8 would have been the far better choice
01:31:29  * ironfroggyquit (Remote host closed the connection)
01:31:32  <sh4bot>but JS was modeled after windows lol
01:31:51  <myndzi>utf-8 is more complicated than utf-16 and has the significant disadvantage that you can't index into strings easily
01:32:01  * e14quit (Client Quit)
01:32:05  <myndzi>utf-16 was a reasonable choice at the time at least
01:32:08  * phutchinsjoined
01:32:24  * braincrashjoined
01:32:24  * nettowebquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:33:08  * kingarmadilloquit (Ping timeout: 260 seconds)
01:33:21  * a_thakurjoined
01:33:31  <sh4bot>anyway, thx and bye
01:33:37  * sh4botquit (Quit: leaving)
01:33:48  * smccarthyquit (Ping timeout: 252 seconds)
01:35:06  * YoYquit (Ping timeout: 240 seconds)
01:35:25  * kingarmadillojoined
01:35:53  * UnnamedPlayerjoined
01:36:51  * ironfroggyjoined
01:36:59  <joepie91>err, JS doesn't use UTF16
01:37:00  <joepie91>it uses UCS2
01:37:02  <joepie91>:p
01:37:43  * u0m3joined
01:38:01  * YoYjoined
01:39:21  <myndzi>by the spec it appears to be utf-16 these days at least
01:39:30  <joepie91>myndzi: hmm, really? iirc that was never changed...
01:40:16  <myndzi>my googling appears to have been a little faulty
01:40:34  <myndzi>it doesn't specify an encoding, just a sequence of 16-bit values?
01:40:38  * myndzishrugs
01:40:43  <myndzi>they're effectively the same thing anyway
01:41:05  <joepie91>myndzi: not quite, they're only compatible in one direction iirc
01:41:18  <joepie91>since UCS2 is fixed-width and UTF16 isn't
01:41:30  * abijeetjoined
01:41:58  <joepie91>so you can deal with UCS2-encoded data with a UTF16-capable thing, but not the other way around
01:42:35  <myndzi>11.8.4 string literals: e. String literals evaluate to ECMAScript String values. When generating these
01:42:35  <myndzi>String values Unicode code points are UTF‑16 encoded as de伀氂ined in 10.1.1
01:42:42  <myndzi>also it's hilarious that when i copied that the f became kanji?
01:42:52  <joepie91>hahaha
01:43:21  <myndzi>ECMAScript code is expressed using Unicode, version 8.0.0 or later
01:43:31  * noraatepernosquit (Quit: noraatepernos)
01:43:35  <joepie91>myndzi: f�cking unicode? :P
01:43:36  <myndzi>and there's also specific sections referencing utf16encoding etc.
01:43:46  <myndzi>no, 伀氂ucking unicode
01:43:49  <myndzi>:D
01:43:52  <joepie91>hehe
01:44:07  <joepie91>but yeah, odd, guess they switched to utf16 then
01:44:22  <joepie91>either that or v8 is just not spec-compliant
01:44:34  <joepie91>because it has certainly used UCS2 in the past
01:46:50  * a_thakurquit (Remote host closed the connection)
01:47:42  <myndzi>yeah i don't really know
01:47:57  <myndzi>i saw some reference that ucs-2 didn't define a character encoding, just symbol mappings or whatever
01:48:13  <myndzi>in such a case you might consider utf-16 to be the byte encoding that realizes ucs-2 (plus some)
01:48:29  <joepie91>myndzi: well iirc if you have a fixed-width encoding like ucs-2 the "encoding" is essentially "represent the codepoint as bytes"
01:48:57  <myndzi>yeah, i suppose
01:49:12  <joepie91>myndzi: fwiw, Joliet is an example of a specification that uses straight ucs-2
01:49:15  <joepie91>ref http://littlesvr.ca/isomaster/resources/JolietSpecification.html#unicode
01:49:39  <joepie91>but there's surprisingly little documentation about any of the UCS encodings
01:50:10  <jfhbrook>what are the consequences of using ucs-2?
01:50:10  <myndzi>it's at least undebatable that javascript can at least accept utf-16 literal strings and such
01:50:19  <jfhbrook>like to the end user it's mostly abstracted, no?
01:50:23  <joepie91>jfhbrook: it mostly just takes more space in memory
01:50:26  <myndzi>jfhbrook: inability to represent code points above 65535?
01:50:27  <joepie91>than UTF-16
01:50:35  <joepie91>since you have fixed 2 byte wide characters
01:50:36  <joepie91>null-padded
01:50:43  <myndzi>i mean, so does utf-16
01:50:54  <joepie91>whereas in UTF-16 it's variable-width
01:50:55  <jfhbrook>I thought ucs had multibyte modes <_<;
01:50:57  <myndzi>utf-16 just has surrogate pairs also
01:51:03  <joepie91>jfhbrook: UCS _only_ has multibyte modes :P
01:51:06  <myndzi>you might be confusing utf-16 with utf-8
01:51:07  <joepie91>or well
01:51:09  <joepie91>UCS-2 anyway
01:51:18  <jfhbrook>nah I mean >2 bytes
01:51:20  <myndzi>utf-16 characters are 16 or 32 bits
01:51:21  <joepie91>oh, in that sense
01:51:23  <joepie91>no, not afaik
01:51:23  * Noldorinquit (Ping timeout: 255 seconds)
01:51:40  <myndzi>utf-8 characters are one or more octets
01:51:40  <joepie91>might be a different UCS one that's wider
01:51:42  <joepie91>but def not UCS-2
01:51:44  <myndzi>up to something or other
01:51:54  * zoLquit (Quit: Leaving)
01:51:59  <myndzi>ucs-4
01:52:02  * a_thakurjoined
01:52:18  <myndzi>which has the nice property that it can hold all of unicode without any magic
01:52:19  <jfhbrook>isn't the snowman 3 bytes long?
01:52:28  <jfhbrook>in utf8 I mean
01:52:33  <myndzi>and the unfortunate property that simple ascii is 4 times as wide as it needs to be
01:52:35  <myndzi>jfhbrook: probably
01:52:36  * sibaquit (Quit: brb)
01:52:56  <jfhbrook>right, but my point is the snowman seems to behave properly
01:52:58  <myndzi>http://www.fileformat.info/info/unicode/char/2603/index.htm
01:53:02  <jfhbrook>correct length, etc
01:53:06  <jfhbrook>if memory serves
01:53:09  <myndzi>sure, but javascript doesn't represent strings as utf-8
01:53:18  <myndzi>snowman is 2 bytes in utf-16
01:53:20  <myndzi>or ucs-2
01:53:46  <jfhbrook>oh I see, I guess I figured if was 3 bytes in utf8 it would be 3 bytes elsewhere as well
01:54:20  <myndzi>𐍈 is 4 in utf-8
01:54:24  <myndzi>'𐍈'.length
01:54:26  * rohanrhujoined
01:54:27  <myndzi>n> '𐍈'.length
01:54:32  <babelboot>myndzi: (okay) 2
01:54:42  <myndzi>it's a high enough code point that it can't be represented as one character in utf-16
01:54:47  <myndzi>so it's two (surrogate pair)
01:54:55  <myndzi>utf-8 has overhead on each byte for sanity checking
01:55:00  <dommel>why can't i have an anonymous self-invoking async function in the global scope of a file? i get a TypeError...
01:55:02  <myndzi>you only get to use 6 bits of each trailing byte
01:55:16  <myndzi>and the first byte has a variable amount of bits you can use, depending on how many bytes the whole sequence is
01:55:25  <jfhbrook>dommel: https://gist.github.com small repro case?
01:55:49  <jfhbrook>I kinda had a highdea last night
01:56:04  <jfhbrook>even if future archaeologists are able to read our disks
01:56:04  <myndzi>(in a 4-byte utf8 sequence, the first byte only holds 3 bits of data)
01:56:10  <jfhbrook>th encodings could well be a lost secret
01:56:16  <myndzi>ha ha
01:56:26  <joepie91>jfhbrook: to be honest? UTF is probably the good end of the stick there
01:56:37  <joepie91>it's the million fucking pre-unicode codepages that are going to be a problem
01:56:46  <joepie91>with no indication of which codepage applies where
01:57:14  <jfhbrook>sure but like, how would you back out the entire code page from base principles? like even in a world where people are using sane encodings
01:57:27  <joepie91>jfhbrook: what do you mean?
01:57:29  <dommel>jfhbrook: i can't without the whole environment, i just have (async()=>{})()
01:57:46  <jfhbrook>joepie91: like you get a shitload of bytes and you don't even know what ascii is
01:57:58  <jfhbrook>joepie91: how do you reverse engineer the encoding?
01:58:04  <joepie91>jfhbrook: ascii is fairly easy to figure out through statistical analysis
01:58:12  <joepie91>(for relative values of "easy")
01:58:16  <myndzi>assuming you're reading the disk you probably have a computer displaying it in the first place
01:58:17  <myndzi>:P
01:58:27  <jfhbrook>not a thousand years from now!
01:58:28  <joepie91>idem for other language characters
01:58:34  <joepie91>yes, a thousand years from now as well
01:58:41  <joepie91>the bigger problem lies in emoji
01:58:53  * dkingsjoined
01:59:04  <joepie91>the best chance we have is to just make sure that there are lots of copies of everything
01:59:05  * a_thakurquit
01:59:07  <myndzi>i mean, if you're analyzing the data on disk with no concept of encoding, you'll get the same bit sequences equal the same represented character statistically :P
01:59:10  <joepie91>not just unicode specs, but content in general
01:59:22  <joepie91>the more generic content is available, the easier it is to infer language and do statistical analysis
01:59:39  <myndzi>it doesn't matter if 'e' is the value 101 or 61285; as long as it gets encoded the same when it is the same symbol then...
01:59:50  <joepie91>right, exactly
01:59:51  <myndzi>compressed data, on the other hand....
02:00:37  <rohanrhu>a published a release, https://github.com/rohanrhu/jquery.datepicker futuristic datepicker :D
02:01:22  <jfhbrook>I guess if language itself hasn't changed that much you'd have some recourse--I've been thinking of https://en.wikipedia.org/wiki/Rosetta_Stone this entire time but I'm not sure anyone had an existing future-egyptian language to compare it to
02:01:31  * jaequeryjoined
02:01:40  * notdanielquit (Quit: Leaving)
02:04:06  * cotkoquit (Ping timeout: 240 seconds)
02:04:26  * cotkojoined
02:04:41  * dkingsquit (Ping timeout: 240 seconds)
02:04:58  * sibajoined
02:05:08  * LiftLeftjoined
02:06:09  * plutoniixjoined
02:06:14  * jaequeryquit (Ping timeout: 255 seconds)
02:06:42  * plutoniixquit (Max SendQ exceeded)
02:07:18  * plutoniixjoined
02:07:19  * jaequeryjoined
02:08:49  * spiritkjoined
02:09:37  * spiritk_joined
02:09:39  * spiritkquit (Client Quit)
02:09:53  <spiritk_>hi noob question
02:09:58  * duderonomyjoined
02:10:04  <spiritk_>I'm trying to run a simple http server and display the contents of the http request
02:10:36  <spiritk_>did this: https://gist.github.com/5ubz3r0/e778ee2cd020f47f10180805622dd7bc, but it doesn't respond
02:10:45  <spiritk_>can anybody help? thanks
02:11:04  * cotkoquit (Ping timeout: 245 seconds)
02:11:57  * sternsjoined
02:12:15  * sternsquit (Read error: Connection reset by peer)
02:12:41  <joepie91>spiritk_: you should probably start by fixing your formatting; the indentation is completely wrong
02:12:48  <jfhbrook>spiritk_: res.end would probably help
02:12:52  <joepie91>spiritk_: indentation is important for understanding the structure of code
02:13:14  <joepie91>spiritk_: aside from that, is there a particular reason you're trying to work with the `http` module directly, rather than using a higher-level abstraction like Express?
02:13:20  <jfhbrook>or are you not even there yet?
02:13:34  <jfhbrook>oh
02:13:42  <jfhbrook>does writing the head end the read stream?
02:13:52  <jfhbrook>like what if you write the head inside the end callback?
02:14:11  <jfhbrook>use https://www.npmjs.com/package/concat-stream for that though
02:14:11  <joepie91>jfhbrook: the missing res.end is correct :P
02:14:11  * e14joined
02:14:12  <jfhbrook>or similar
02:14:20  <joepie91>it only writes
02:15:32  <spiritk_>yay advancing, new errors! :D
02:15:49  <spiritk_>i'm using the http module because I'm just trying to see how an http request looks like, really basic
02:15:54  * safejoined
02:16:05  <joepie91>right
02:16:11  <joepie91>spiritk_: what OS are you on?
02:16:26  <jfhbrook>if you're using express, there's a body parser you can use to handle a lot of that legwork
02:16:33  <jfhbrook>similar paradigms for hapi etc
02:16:43  <spiritk_>https://gist.github.com/5ubz3r0/e778ee2cd020f47f10180805622dd7bc
02:16:50  <spiritk_>mac osx
02:16:59  <joepie91>spiritk_: okay, one sec :) I might have a recommendation that might help here
02:17:31  <joepie91>spiritk_: try running `nc -l localhost 8888` in a terminal, and then visiting http://localhost:8888/ in a browser (or accessing it through another client)
02:17:41  <joepie91>spiritk_: the page will never load, but you will see the structure of a HTTP request appear in your terminal
02:17:47  * glijoined
02:17:49  <joepie91>might help in understanding it better
02:17:51  <jfhbrook>oh
02:17:55  <jfhbrook>req.pipe(res)
02:18:08  <jfhbrook>for an echo server
02:18:40  <spiritk_>throw new TypeError('First argument must be a string or Buffer');
02:18:46  * phpnodequit (Remote host closed the connection)
02:18:58  <jfhbrook>you're trying to write an array
02:19:01  <jfhbrook>you don't want to buffer it
02:19:24  * braincrashquit (Ping timeout: 245 seconds)
02:19:26  <spiritk_>but i did data.toString()
02:19:28  <jfhbrook>imo do req.setHeader etc rather than writing the header and then req.pipe(res)
02:19:41  * JBreitjoined
02:19:45  <jfhbrook>I think that'll accomplish what you want with less work
02:19:56  <spiritk_>ok one sec
02:20:03  <spiritk_>instead of the array and everything?
02:21:00  <jfhbrook>https://gist.github.com/jfhbrook/2fdb91945271a09efcdb6a18f55393e5
02:21:12  <jfhbrook>this is dirt simple, doesn't set any status codes or headers
02:21:20  <jfhbrook>but it will print the request body back at you
02:21:25  <spiritk_>wow you are so good :(
02:21:26  <spiritk_>thanks!!
02:21:34  <spiritk_>what does => do?
02:21:54  <jfhbrook>it's a function, just a more different function
02:21:55  * rtquit (Excess Flood)
02:22:27  <jfhbrook>() => {} is a function that can't be named and uses the value of 'this' from its outer scope rather than parent object or whatever
02:22:28  * kuldeep_joined
02:22:32  * kuldeepquit (Remote host closed the connection)
02:22:34  <jfhbrook>maybe a few other things
02:22:49  <boogyman>spiritk_: it's shorthand with auto "dynamic this" already bound
02:23:03  <JBreit>can't be named?
02:23:15  <JBreit>const nameFunc = () => {};
02:23:19  <jfhbrook>like function foo() {} is a named function
02:23:25  * rtjoined
02:23:28  <jfhbrook>it's subtly different from the name of the variable
02:23:36  <JBreit>though it is a lambda
02:23:41  <jfhbrook>n> (function hello()).name
02:23:44  <babelboot>jfhbrook: (okay) ^ SyntaxError: Unexpected token ) at Object.<anonymous> (/var/ws/eval-js.js:11:26) at Module._compile (module.js:573:32) at Object.Module._extensions..js (module.js:582:10) at Module.load (module.js:490:32) at t ... https://git.io/vMrcJ
02:23:49  <JBreit>so it is an expression
02:23:50  <jfhbrook>n> (function hello() {}).name
02:23:54  <babelboot>jfhbrook: (okay) 'hello'
02:24:06  <jfhbrook>n> (()=>{}).name
02:24:10  <babelboot>jfhbrook: (okay) ''
02:24:35  <spiritk_>so it appears to be working, where am i supposed to see the output?
02:24:40  <spiritk_>its not showing in terminal
02:24:48  <jfhbrook>oh, in the response
02:24:52  <JBreit>I can't wait until I am able to buy my new computer so I have a system new enough to have my ES6+ environment setup properly
02:25:01  <jfhbrook>try req.pipe(process.stdout) <_<
02:25:08  <jfhbrook>I thought you wanted to see the body in the response
02:25:45  <spiritk_>yeah i want to see the body of the http request
02:25:59  <jfhbrook>yes, I'm saying you can see that body in the response, with what I wrote
02:26:14  <spiritk_>in the browser or the terminal? :S
02:26:16  <jfhbrook>try running and curl -d 'hello' localhost:8080
02:26:18  <jfhbrook>in the browser
02:26:45  <spiritk_>i started it with $ node http.js
02:27:00  <spiritk_>maybe i did it wrong?
02:27:03  <jfhbrook>right, so how are you triggering a request? with the browser?
02:27:18  <spiritk_>browsing to localhost:8080
02:28:33  <jfhbrook>so you're probably not sending a post body with the browser
02:28:48  * rigsbyjoined
02:30:06  <spiritk_>so what can i do? :s
02:30:38  <jfhbrook>so first of all, here's a really dirty version that logs to terminal as well as in response https://gist.github.com/jfhbrook/2fdb91945271a09efcdb6a18f55393e5
02:30:56  * braincrashjoined
02:31:10  <jfhbrook>but second, generally to get a browser to send a post you have to either build a form or do some ajax
02:31:14  * boneskulljoined
02:31:25  <spiritk_>ahhhhh
02:31:25  <jfhbrook>but you can always use curl to construct a request
02:31:28  <spiritk_>thats great!!!
02:31:45  <spiritk_>I'm all for dirty
02:32:04  * modlinquit (Quit: modlin)
02:32:44  <spiritk_>thanks alot! whats to curl? :s
02:33:07  * alilezajoined
02:33:11  <jfhbrook>huh?
02:33:20  * modlinjoined
02:33:20  * notdanieljoined
02:33:37  <jfhbrook>I'm talking about https://en.wikipedia.org/wiki/CURL
02:33:51  * modlinquit (Client Quit)
02:33:53  <spiritk_>ah ok, I'll read it
02:34:03  <spiritk_>thanks alot ^_^
02:34:41  <jfhbrook>if you're on linux or osx it can be installed with apt-get/yum and homebrew respectively (or may already be installed!)
02:34:50  <jfhbrook>if you're on windows, uh, msys maybe?
02:34:51  * cfviperjoined
02:35:19  <spiritk_>i'm on osx
02:35:48  <spiritk_>i'll install it tomorrow
02:35:55  <spiritk_>thanks alot and have a good night :D
02:36:00  <spiritk_>or morning
02:36:03  <jfhbrook>o7
02:36:04  * alilezaquit (Remote host closed the connection)
02:36:07  <spiritk_>whereever u are ;P
02:36:36  * spiritk_quit (Quit: Page closed)
02:36:36  * boneskullquit (Read error: Connection reset by peer)
02:37:12  * boneskulljoined
02:37:31  * jameskyburzquit (Ping timeout: 240 seconds)
02:38:00  * ivan_the_monkeyjoined
02:38:34  * alilezajoined
02:38:44  * ironfroggyquit (Remote host closed the connection)
02:38:49  * noraatepernosjoined
02:39:19  * not-an-aardvarkjoined
02:42:42  * macbookproquit (Ping timeout: 258 seconds)
02:43:13  * sankhajoined
02:47:37  * smccarthyjoined
02:47:40  * pilnequit (Quit: Quitting!)
02:48:12  * zoLjoined
02:48:47  * zoLquit (Client Quit)
02:49:18  * braincrashquit (Ping timeout: 248 seconds)
02:50:19  * boneskullquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:50:41  * jaequeryquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:51:53  * jaequeryjoined
02:55:19  * e14quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:55:38  * noraatepernosquit (Quit: noraatepernos)
02:57:12  * Lucyfurnicequit (Read error: Connection reset by peer)
02:57:32  * jaequeryquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:58:38  * smccarthyquit (Remote host closed the connection)
02:58:45  * jaequeryjoined
02:59:14  * smccarthyjoined
03:00:35  * dommelquit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
03:00:56  * braincrashjoined
03:02:30  * donejoined
03:02:51  * jaequeryquit (Client Quit)
03:02:52  * donechanged nick to Guest48106
03:02:57  * dodobrainjoined
03:04:02  * ShellfishMemejoined
03:04:42  * ironfroggyjoined
03:05:11  * Guest87941quit (Ping timeout: 255 seconds)
03:05:12  * noraatepernosjoined
03:07:06  * phutchinsquit (Ping timeout: 240 seconds)
03:07:18  * nya_joined
03:07:43  * devcjoined
03:09:36  * abijeetquit (Remote host closed the connection)
03:10:32  * wrkrcoopquit (Quit: wrkrcoop)
03:16:44  * e14joined
03:18:59  * AAA_awrightjoined
03:19:09  * e14quit (Client Quit)
03:19:40  * sneakertackjoined
03:19:47  * phpnodejoined
03:21:25  * kingarmadilloquit (Ping timeout: 258 seconds)
03:21:38  * jpstonequit (Quit: Connection closed for inactivity)
03:22:38  <kutenai>I have a challening task. I need to generate combine all of files referenced in this script into one minified version: https://github.com/jgraph/mxgraph/blob/master/javascript/src/js/mxClient.js
03:23:20  <kutenai>I don't know how to do that with node. Currently, I do it with python, but if there is a way to do it with node that isn't too terrible, I'd convert it to avoid the python dependency.
03:23:58  <jfhbrook>what's your goal?
03:24:00  * phpnodequit (Ping timeout: 240 seconds)
03:24:00  <kutenai>This file isn't very node friendly.. it expects to run in a browser, so that makes it more difficult to parse.
03:24:10  <jfhbrook>have you considered browserify or webpack?
03:24:14  <kutenai>TO build a minified file with all of those items.
03:24:17  * gojira__joined
03:24:55  <jfhbrook>this doesn't look like a node module?
03:24:57  <kutenai>I could use that, but usually with webpack, you supply a list of files. In this case, that list of files is embedded into this particular file.
03:25:02  <kutenai>It isn't a node module.
03:25:03  <kutenai>at all
03:25:11  <jfhbrook>for basic minification you can use uglify? maybe?
03:25:35  <jfhbrook>this frankly looks like some pretty messed up shit
03:25:41  <kutenai>that's how I do it now.. but I use python to extract out those filenames in order, and then pass all that on to uglify
03:25:56  * KaeruCTjoined
03:27:41  <jfhbrook>you could probably rewrite the python script in node
03:27:57  <jfhbrook>using a javascript ast lib might help you dunno
03:29:42  <jfhbrook>possibly https://www.npmjs.com/package/acorn ?
03:30:08  * orbyt_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
03:30:26  * ironfroggyquit (Remote host closed the connection)
03:31:39  <kutenai>Are there ways using nodejs to just "grep" out a list of lines from a file that match a pattern?
03:32:40  <jfhbrook>what like awk?
03:33:03  <kutenai>or, simple-grep
03:33:16  <jfhbrook>but yeah you can always grab some modules to take process.stdin, split it into lines (I think the module is called split2) and then run regexps against those lines?
03:33:36  * braincrashquit (Ping timeout: 240 seconds)
03:36:29  * jameskyburzjoined
03:37:17  <kutenai>looks like gulp-grep might help e
03:39:56  * rigsbyquit (Ping timeout: 240 seconds)
03:43:26  * braincrashjoined
03:43:27  * badfilmspart
03:43:36  * rigsbyjoined
03:44:10  * gucci_meowquit (Remote host closed the connection)
03:44:47  * gucci_meowjoined
03:46:34  * jaequeryjoined
03:47:06  * dkingsjoined
03:47:35  * howdoijoined
03:48:15  * dommeljoined
03:49:21  * alilezaquit (Remote host closed the connection)
03:49:43  * alilezajoined
03:50:03  * orbyt_joined
03:50:57  * mnutt_joined
03:51:13  * dkajoined
03:51:42  * dkingsquit (Ping timeout: 258 seconds)
03:52:43  * jaequeryquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
03:55:32  * braincrashquit (Ping timeout: 258 seconds)
03:56:11  * kingarmadillojoined
03:57:07  * a_thakurjoined
03:57:52  * boneskulljoined
03:57:54  * braincrashjoined
03:58:23  <myndzi>you could take split and stream-filter and do
03:58:46  <myndzi>fs.createReadStream('file').pipe(split()).pipe(filter(v => /regex/.test(v)))
03:59:07  <myndzi>though depending on what you're doing i might go full frp on it and just get kefir or something
04:00:47  * Yackerquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
04:01:10  * kingarmadilloquit (Ping timeout: 256 seconds)
04:02:00  * jaequeryjoined
04:02:52  * victorclfquit (Quit: Leaving)
04:04:11  * boneskullquit (Ping timeout: 240 seconds)
04:05:02  * braincrashquit (Ping timeout: 255 seconds)
04:05:12  * boneskulljoined
04:06:59  * jaequeryquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
04:07:42  * nitpequit (Ping timeout: 248 seconds)
04:07:43  * noraatepernosquit (Quit: noraatepernos)
04:08:07  * serbjoined
04:08:22  <serb>yo joepie91 wat do u think of the infamous node js rant blog posts?
04:08:32  <serb>https://news.ycombinator.com/item?id=12338365
04:09:25  <joepie91>serb: that's a massive thread with a ton of claims, not really viable for me to write a response to that on IRC :P
04:10:55  * dommelquit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
04:11:02  <joepie91>serb: but my general opinion of Node.js criticisms is that 1) almost all of them are misguided, poorly informed, based on "this isn't like what I'm used to" rather than concrete criticisms, or just flat-out wrong and 2) almost nobody understands the *actual* problems that JS (and thus Node.js) has, or the situations in which it's unsuitable
04:11:20  <serb>yeha migration is Painful.
04:11:22  <joepie91>tl;dr there are problems but they're not the ones that rant posts talk about
04:11:39  <serb>is nodejs The Future ?
04:11:52  <joepie91>and I especially strongly disagree with the claim that a lot of people make about Node.js being a net negative to the software development ecosystem
04:12:17  <joepie91>serb: no, it's just a JS runtime whose ecosystem got a bunch of shit right that almost everybody else gets wrong
04:12:35  <serb>like Wat ?
04:12:49  <joepie91>(namely, async-I/O-by-default, semver, dependency model, and consequently, modularity)
04:13:25  <serb>The guy argumentz that in real life most thingz happen synchronously
04:13:33  <serb>"real life" i mean most usecasez
04:13:35  <joepie91>I consider Node.js a good choice for many projects today because it gets those things right... but it isn't some kind of magical revolution, nor is it likely to be around forever, nor is it the best that things could possibly be
04:13:43  <joepie91>it's just a good general choice.
04:13:58  <joepie91>serb: which specific post are you referring to?
04:14:06  <serb>O uh
04:14:19  <serb>top post on hn lol
04:14:43  <joepie91>serb: right, the top post is nonsense
04:15:03  <joepie91>"handling a specific request is a sequential process" != "synchronous I/O is the most reasonable default model"
04:15:14  <joepie91>seems like a fairly classic case of confusing "sequential" and "synchronous"
04:15:26  <joepie91>yes, a lot of stuff is sequential, but that's not the point
04:15:29  * zxcjoined
04:15:32  <joepie91>the point is that you can do a ton of stuff in a single thread
04:15:45  <joepie91>and that this makes concurrency a lot easier to deal with
04:16:28  <joepie91>there's normally a bit of a tradeoff between "concurrency/capacity" and "robustness" because you have to very carefully pass stuff around between threads to avoid race conditions
04:16:40  <joepie91>and "async I/O by default" is an option that scores better on that tradeoff than most options
04:16:49  <joepie91>even if it doesn't have perfect concurrency nor perfect robustness
04:16:50  <serb>thats some High Level S**t
04:18:40  <joepie91>anyhow, I would say that some of the more serious issues with JS / Node.js are 1) lack of numeric precision in the language, 2) lack of a good security team in the Node core team, 3) NPM Inc. is a massive clusterfuck and liability
04:18:55  <joepie91>and that Node.js is unsuitable if you're primarily computation-bound
04:19:18  <joepie91>these issues are solvable but very few people are talking about them
04:19:23  * rchavikjoined
04:19:25  <joepie91>because they're complex issues to understand
04:19:31  <serb>Yeha
04:19:32  <joepie91>and don't fit well into a hackernews oneliner :)
04:19:38  <serb>good sentence
04:19:57  <serb>I dont get why the javascript guy can put ints inside javascript and call it a day
04:20:08  <serb>cant*
04:20:10  <joepie91>serb: there's no one "javascript guy" :P
04:20:18  <serb>brendan eich i mean
04:20:20  <joepie91>there's a design committee, and arbitrary precision stuff is being worked on
04:20:21  <jfhbrook>yeah it's not like python XD
04:20:24  <serb>or the *javascript* team i guess
04:20:27  <joepie91>Eich has had very little to do with JS for a long time now
04:20:46  <joepie91>serb: see https://github.com/tc39/proposals for JS proposals
04:21:06  * DeltaHeavyjoined
04:21:09  <joepie91>hm
04:21:14  <joepie91>sec
04:22:25  <joepie91>wut
04:22:31  <joepie91>iirc there was a proposal for integers and such
04:22:33  <joepie91>but I can't find it?
04:22:40  <serb>L O L !!
04:22:59  <serb>"Everythings fucked." - Software Developer.
04:23:12  * idrathernotsayquit (Ping timeout: 252 seconds)
04:23:15  * JBreitquit (Quit: Leaving)
04:23:25  <joepie91>ljharb: do you have any idea where that proposal for integers and such in ES went?
04:23:44  <joepie91>serb: worth a read :) http://www.stilldrinking.org/programming-sucks
04:25:01  * braincrashjoined
04:25:30  * Aljonequit (Ping timeout: 240 seconds)
04:25:51  <serb>ou still have to learn more at the rate of about one a week, and remember to check the hundreds of things you know to see if they've been updated or broken and make sure they all still work together and that nobody fixed the bug in one of them that you exploited to do something you thought was really clever one weekend when you were drunk. You're a
04:25:51  <serb>ll up to date, so that's cool, then everything breaks.
04:26:02  * jbudquit (Quit: leaving)
04:26:02  * Aljonejoined
04:26:09  <serb>Ive never had any stuff break on me but then again im not a Good Programmer and i havent done any Huge Stuff.
04:26:12  <serb>does this really happen ?
04:26:15  <joepie91>serb: make sure to read the entire thing
04:26:16  <joepie91>:P
04:26:41  <joepie91>serb: this article uses some amount of hyperbole and ridicule, but the gist behind it is pretty close to reality
04:26:51  <joepie91>especially in commercial software dev
04:26:55  <joepie91>it's a bit better in hobbyist software dev
04:27:17  <joepie91>and a bit more better in large OSS projects, usually
04:27:23  <saul>zsoc: express-session worked
04:29:44  * SomeKittensquit (Quit: Connection closed for inactivity)
04:29:51  * rhojoined
04:30:24  * dodobrainquit (Quit: buh bye..)
04:31:45  * deverasjoined
04:31:59  * Guest48106quit (Read error: Connection reset by peer)
04:32:52  <serb>Good artikle
04:33:09  * AlineGomesjoined
04:33:22  <serb>im sometimez satisfied when i actually get someting done but besides that its not really enjoyable
04:33:44  <NeverDie>joepie91: Hai.
04:35:26  * donejoined
04:35:42  <joepie91>NeverDie: ohai
04:35:50  * donechanged nick to Guest31595
04:36:49  <joepie91>serb: with the best of intentions... I say: programming is hard, most of the tools you have to deal with in the Real World are shit in some way, and if you don't inherently enjoy solving problems then (with the current state of software development) you're unlikely to either enjoy or be particularly successful at doing programming as a career
04:37:10  <joepie91>serb: relevant: https://medium.freecodecamp.com/one-does-not-simply-learn-to-code-f25bacdc5b62
04:37:24  <serb>i remember making a bash script 1ce a few years ago and i had fun doing it
04:37:28  <serb>like "staying till 3 am" fun i guess
04:37:47  <serb>maybe im jst not comfortable enuf yet??????
04:38:21  <serb>[it was jst a script that automated bandcamp FLAC .RARs > 320/v0/v2 > .torrent]
04:38:41  <joepie91>serb: that's an assessment I can't make for you :P:
04:38:44  <joepie91>:P*
04:38:57  * Hunseopjoined
04:38:58  <joepie91>I can only describe what you'll need if you want to make it your career, or otherwise spend considerable parts of your life on it
04:39:19  <serb>Thanx
04:39:25  <joepie91>I quite enjoy solving problems and generally fixing things, so I like programming, and I do well at it
04:39:31  <joepie91>but that is definitely not the case for everybody
04:39:42  <serb>i Like arch Linux..
04:39:54  <serb>i like tweakin stuff
04:40:00  <saul>at work we maintain a legacy homebrew ERP written in vb6 and databasing with mssql2005/2008R2 ... so cheeer up :P
04:40:06  <joepie91>that having been said, most of commercial programming is just building the same thing that 2000 people have built before you but with a different corporate logo on it and slightly different button texts
04:40:17  <serb>That sounds good.
04:40:19  <serb>so just bootstrap.
04:40:21  <joepie91>(which is work I don't like and generally avoid)
04:40:30  * sankhaquit (Remote host closed the connection)
04:40:32  * madbytesjoined
04:40:33  <serb>yeha im also not sure if its very ethical
04:40:44  <joepie91>serb: well, I don't do proprietary work for ethical reasons
04:41:00  <serb>What Other Options Are There?
04:41:14  <joepie91>I don't want to be spending my time and skills on doing something that has been done a thousand times before and that's only going to be beneficial to some random company
04:41:18  * dkingsjoined
04:41:24  <joepie91>(and that will be done a thousand times after)
04:41:30  <serb>thats a bit shortsighted
04:41:36  * s2013joined
04:41:39  <joepie91>serb: the other option is not doing proprietary work :P
04:41:41  <serb>companiez offer tings ppl need/want :^)
04:41:45  <joepie91>for freelance dev, I only do open-source work
04:41:58  <joepie91>which is a much, much smaller market
04:41:59  <joepie91>but nonzero
04:42:08  <joepie91>serb: it's not shortsighted at all
04:42:14  * horseyjoined
04:42:20  <joepie91>the problem doesn't lie in the company benefiting from it
04:42:26  <joepie91>it lies in _only_ the company benefiting from it
04:42:30  <joepie91>artificially keeping others from benefiting from it
04:43:48  <joepie91>when I spend my time and effort/skills developing something, my intention is for anybody to be able to use, reuse and adapt it for whatever they find it useful for
04:43:53  <joepie91>anything less is not ethically justifiable to me
04:43:55  * gooddoggytreatjoined
04:45:30  * dkingsquit (Ping timeout: 240 seconds)
04:46:19  * noraatepernosjoined
04:49:56  * subhojit777joined
04:53:25  * wrkrcoopjoined
04:54:13  * the_antjoined
04:55:45  * buddydudequit (Quit: Page closed)
04:58:51  * deverasquit
04:59:09  * gucci_meowquit (Remote host closed the connection)
05:01:39  * Lee1092joined
05:02:40  * alilezaquit (Remote host closed the connection)
05:02:59  * yungjamesjoined
05:03:09  * alilezajoined
05:03:53  * a_thakur_joined
05:04:21  * wrkrcoopquit (Quit: wrkrcoop)
05:04:44  * sankhajoined
05:05:16  * yungjamesquit (Client Quit)
05:05:38  * _2E0PGS-5quit (Quit: Leaving)
05:06:01  * AnhongRedbeardquit (Quit: AnhongRedbeard)
05:06:15  * rohanrhuquit (Quit: Konversation terminated!)
05:07:19  * a_thakurquit (Ping timeout: 245 seconds)
05:09:49  * lemoinemquit (Ping timeout: 245 seconds)
05:11:52  * sankhaquit (Remote host closed the connection)
05:13:09  * pongaquit
05:14:00  * rhoquit (Ping timeout: 240 seconds)
05:15:22  * noraatepernosquit (Quit: noraatepernos)
05:18:24  * serbquit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
05:21:09  * phpnodejoined
05:24:57  * shygirlquit (Ping timeout: 248 seconds)
05:25:30  * phpnodequit (Ping timeout: 240 seconds)
05:27:24  * notdanielquit (Quit: Leaving)
05:29:22  * wrkrcoopjoined
05:29:26  * KaeruCTquit (Quit: My Mac has gone to sleep. ZZZzzz…)
05:30:39  * alilezaquit (Remote host closed the connection)
05:31:48  * gojira__quit (Quit: Connection closed for inactivity)
05:32:47  * noethicsquit (Ping timeout: 255 seconds)
05:32:59  * alilezajoined
05:33:15  * macabrequit (Remote host closed the connection)
05:35:06  * lektrikjoined
05:35:51  * mnutt_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:36:27  * toijoined
05:38:26  <ljharb>joepie91: https://github.com/tc39/proposals second to last item
05:38:34  * Cabanossiquit (Ping timeout: 245 seconds)
05:40:05  * Cabanossijoined
05:41:25  * mnutt_joined
05:41:28  * alilezaquit (Remote host closed the connection)
05:42:37  * alilezajoined
05:43:12  * macabrejoined
05:43:53  * smccarth_joined
05:46:29  * alilezaquit (Remote host closed the connection)
05:47:36  * smccarthyquit (Ping timeout: 240 seconds)
05:47:46  * FIFOdquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:48:09  * macabrequit (Ping timeout: 245 seconds)
05:49:13  * Ryukenjoined
05:50:09  <joepie91>ljharb: the 64-bit integer one?
05:51:48  * EyePulpquit (Remote host closed the connection)
05:52:00  * EyePulpjoined
05:52:06  * shygirljoined
05:53:35  <ljharb>yup
05:54:02  <joepie91>ljharb: hm, I'm not sure that was the one I was thinking of...
05:54:22  <joepie91>I recall something more formal
05:54:24  <ljharb>the only other one i've been aware of is crockford's ancient Dec64 proposal
05:54:32  <ljharb>there's two links on the proposal repo, on that one line btw
05:55:00  <joepie91>alt link doesn't seem like the one either
05:55:05  <ljharb>joepie91: https://github.com/BrendanEich/ecma262/tree/int64 is the spec text for it
05:55:08  <ljharb>but yeah it's still early
05:55:09  <joepie91>ljharb: I saw an esdiscuss post remarking that there had been multiple integer proposals in the past
05:55:12  <joepie91>that never went anywhere
05:55:18  <joepie91>so it's possible that I'm thinking of a now-dead one
05:55:23  <ljharb>probably so
05:56:09  <joepie91>ah well
05:56:20  <joepie91>ljharb: what would you say are the chances of survival of this one?
05:56:28  <joepie91>on a scale from 0 to 10
05:56:54  * kingarmadillojoined
05:56:57  <joepie91>(based on what you know of it, that is)
05:57:17  * lithiejoined
06:00:37  * BobGneujoined
06:01:51  * lektrikquit (Remote host closed the connection)
06:01:52  * kingarmadilloquit (Ping timeout: 256 seconds)
06:02:29  * lektrikjoined
06:05:09  * mnutt_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:05:30  * zivesterquit (Ping timeout: 252 seconds)
06:06:42  * rohanrhujoined
06:06:53  * smccarth_quit (Remote host closed the connection)
06:08:20  * rigsbyquit (Remote host closed the connection)
06:09:14  * dodobrainjoined
06:11:04  * gucci_meowjoined
06:13:42  * x34xmrjoined
06:13:46  <x34xmr>Hello :D
06:14:32  * wugyjoined
06:17:00  <wrkrcoop>when i clone an object twice to var a and var b
06:17:25  <wrkrcoop>when i compare them with == it is false, but if i check a property on both like a.store == b.store it says true …
06:17:36  <wrkrcoop>how do i get it to not be true?
06:17:59  <joepie91>wrkrcoop: define "clone"
06:18:06  <joepie91>cloning how?
06:18:07  * addaleaxquit (Quit: ChatZilla 0.9.93 [Firefox 50.1.0/20161209095719])
06:18:42  <wrkrcoop>well i did it like this: Object.assign({}, modalData['details']);
06:18:53  <wrkrcoop>let a = Object.assign({}, modalData['details’]); let b = Object.assign({}, modalData['details']);
06:19:08  <wrkrcoop>b == a gives false, but b.store == a.store gives true
06:19:21  <joepie91>wrkrcoop: right. that's a shallow clone
06:19:27  <joepie91>so yes, b and a are different objects
06:19:34  <joepie91>but their 'store' properties contain the same value
06:20:00  <joepie91>wrkrcoop: if you want a full clone of an object and all its values, you want a deep-clone... but this is almost always a sign that you're doing something wrong, so what's the end goal here?
06:20:22  * BobGneuquit (Read error: Connection reset by peer)
06:20:23  <wrkrcoop>um well im cloning the objects bc i want to do a diff
06:20:49  <dysfigured>does `eslint --init` work for anybody else? likewise with --fix..
06:21:23  <wrkrcoop>so i create old = Object.assign({}, modalData['details’]);, and new = Object.assign({}, modalData['details’]);, then i compare old.stores with new.stores, but while im editing new.stores i guess old.stores is getting changed …
06:21:35  <joepie91>wrkrcoop: why are you editing new.stores?
06:22:31  <wrkrcoop>joepie91: well im letting the user edit the array of stores … they can add or remove stores from the list, and to figure out which were removed and which were added i want to diff the new vs old
06:23:13  <joepie91>wrkrcoop: why not just track changes instead?
06:23:23  <joepie91>so that you can skip the entire diff step
06:23:50  <wrkrcoop>track changes?
06:24:03  <joepie91>wrkrcoop: yes. you say "the user can add or remove stores from the list"
06:24:08  <joepie91>so why not record those changes in an array?
06:24:18  <joepie91>rather than trying to infer them from a diff
06:24:39  <wrkrcoop>ah ok …
06:25:25  * tarkusjoined
06:25:50  * milardovichjoined
06:26:04  <wrkrcoop>well i think i didnt do that bc if a user removes a store then adds it back i dont want to actually send a request to the backend to add it … so im keeping track of which were not in the old group… idk its kinda convoluted
06:27:09  * Guest82joined
06:28:21  <wrkrcoop>if i do a deep clone do i just loops over the keys and create a new object manually?
06:28:38  <x34xmr>Since the mongodb channel is inactive and I'm using node js, I'll ask it here.
06:28:55  <x34xmr>Can anyone help me with this simple problem? https://bpaste.net/show/4bde92448ba8
06:29:58  <wrkrcoop>x34xmr: have u tried updating it manually with that query?
06:30:27  <x34xmr>wrkrcoop, Manually?
06:30:42  <wrkrcoop>like from the mongo shell
06:30:48  <wrkrcoop>maybe ur query is wrong
06:30:55  <dysfigured>x34xmr: http://www.sarahmei.com/blog/2013/11/11/why-you-should-never-use-mongodb/ http://cryto.net/~joepie91/blog/2015/07/19/why-you-should-never-ever-ever-use-mongodb/
06:31:00  * milardovichquit (Ping timeout: 240 seconds)
06:31:27  * noraatepernosjoined
06:31:30  <x34xmr>dysfigured, I was trying to learn the MEAN stack :3
06:31:40  * noraatepernosquit (Client Quit)
06:32:12  <dysfigured>personally, just stop. mongo is shit. angular is losing ground fast to react
06:32:36  <joepie91>x34xmr: don't bother with "the MEAN stack" - the concept of a predefined "stack" doesn't really make sense in Node.js (it's a coping mechanism for poorly modularized ecosystems, and Node.js doesn't fall into that category), and MongoDB is just a bad choice for a database
06:32:41  <x34xmr>dysfigured, ok
06:32:44  * lpinjoined
06:32:53  <dysfigured>in fact many would argue angular already lost to react
06:32:57  <joepie91>x34xmr: it's a much better idea to just start from zero and add dependencies as you find yourself needing them
06:33:00  * alilezajoined
06:33:11  <x34xmr>joepie91, so what should I learn?
06:33:15  <joepie91>and Angular, while at least not horribly broken like MongoDB, still isn't exactly the most pleasant and efficient solution to work with :P
06:33:44  <joepie91>x34xmr: you should learn whatever suits the requirements of your project well; this might be a useful starting point, but there's no one-size-fits-all answer: https://gist.github.com/joepie91/95ed77b71790442b7e61
06:34:01  <joepie91>x34xmr: there's no one "perfect stack" nor a set of dependencies that everybody should use
06:34:04  <joepie91>it's 100% project-dependent
06:34:05  * mr_loujoined
06:34:08  <dysfigured>x34xmr: are you learning for the sake of learning or do you have a project in mind?
06:34:11  * grumblequit (Remote host closed the connection)
06:34:12  <joepie91>some kinds of projects aren't even viable in Node at all
06:34:26  <dysfigured>spoiler: i'm gonna recommend react and express at the end of it
06:34:33  * EyePulpquit (Remote host closed the connection)
06:34:34  <x34xmr>dysfigured, Both actually
06:34:42  * vali_joined
06:34:51  <joepie91>x34xmr: what's your project?
06:35:23  * DeltaHeavyquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:35:40  <x34xmr>joepie91, A simple dice rolling website which allows provably fair betting
06:36:00  * Guest82quit (Quit: My iMac has gone to sleep. ZZZzzz…)
06:36:01  * sankhajoined
06:36:17  * kgrzjoined
06:36:34  <joepie91>x34xmr: usual warnings for this kind of project: make sure that 1) your project is actually legal in your jurisdiction, because you can get in a *lot* of trouble otherwise, even if it's just a toy project, and 2) that you have somebody on staff who's specialized in security
06:37:09  * grumblejoined
06:37:10  <joepie91>it's really, _really_ easy to screw up the design of a gambling site and lose considerable amounts of money
06:37:21  * milardovichjoined
06:37:29  <x34xmr>joepie91, Yup :D
06:37:35  * macbookprojoined
06:37:50  <x34xmr>joepie91, It's just for the sake of learning.. Not a commercial website
06:38:17  <joepie91>x34xmr: right. as long as you don't wire up any payment processing whatsoever (ie. 100% fake money), you should be fine
06:38:41  <x34xmr>joepie91, so what do you recommend? :)
06:38:50  * BlackSpongejoined
06:38:59  <joepie91>x34xmr: anyhow, yes, Express would be a fine option for this, and PostgreSQL would be fine as a database (since it will be relational data you're working with)
06:39:25  <x34xmr>joepie91, I'm already doing a little express
06:39:33  <joepie91>I don't feel that this is a usecase that requires an SPA, so I would recommend against SPA libraries like React, Vue, Angular, etc. and suggest server-side rendering instead (using a templater like Pug, Nunjucks, etc.)
06:39:40  <joepie91>which is going to be much simpler
06:39:48  <x34xmr>So I'll be doing PostgreSQL then :D
06:40:15  <x34xmr>joepie91, Thanks for you input :D
06:40:17  <joepie91>for talking to PostgreSQL, I would recommend looking at Knex - it's a connection pool / query builder / migration runner with native support for promises
06:40:30  <joepie91>x34xmr: you will also want to read this article on random numbers: https://gist.github.com/joepie91/7105003c3b26e65efcea63f3db82dfba
06:40:33  <x34xmr>joepie91, Alright..
06:41:28  <x34xmr>joepie91, I think I'll use an open source provably fair algorithm like other gambling websites.. It's really hard to create a 'random' outcome
06:41:36  * cfviperquit (Read error: Connection reset by peer)
06:41:37  <wrkrcoop>what is the best way to deep clone an object?
06:41:42  <joepie91>x34xmr: and I recommend Bluebird as a promises implementation... besides that there's not much more to recommend upfront aside from express-promise-router to wire Express and promises together (ref http://cryto.net/~joepie91/blog/2015/05/14/using-promises-bluebird-with-express/ )
06:41:47  * sgronblojoined
06:41:51  * milardovichquit (Ping timeout: 240 seconds)
06:41:53  * cfviperjoined
06:42:11  <x34xmr>joepie91, I'll check that.. Thank you very much
06:42:12  <x34xmr>:D
06:42:20  <joepie91>x34xmr: it's generally a bad idea to try and decide all of your dependencies upfront since you don't yet know what problems you will need to solve, so beyond this, just add dependencies as you find yourself needing them for some purpose
06:42:31  <x34xmr>joepie91, okay :)
06:42:42  <x34xmr>Thank you joepie91
06:42:48  <joepie91>x34xmr: and this post should give some insight in *when* to pick a dependency: https://github.com/sindresorhus/ama/issues/10#issuecomment-117766328
06:42:50  <joepie91>np :p
06:42:58  <ljharb>joepie91: i dunno, eventually? 9, but soon? 1.
06:43:20  <joepie91>ljharb: "eventually" is fine, just trying to assess the chances of it dying before it reaches implementation :P
06:43:45  <joepie91>and a 9 is not bad there
06:44:34  * x34xmrquit (Quit: Leaving)
06:47:30  * MrKjoined
06:49:46  <dysfigured>damn, i just found feathers.js and it looks really nice *except* it uses sequelize instead of knex :\
06:50:42  * joepie91is highly skeptical of anything that claims a low upfront effort investment, because it almost always means extremely high long-term maintenance cost
06:50:44  * vali_quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
06:50:48  * slajaxquit (Quit: ZNC - 1.6.0 - http://znc.in)
06:51:55  <wrkrcoop>no one is in the angular channel … i dont get why when i log this they are the same … https://gist.github.com/anonymous/c09aea384d944fedcd70d889435017dd#file-gistfile1-txt-L13-L14
06:52:24  <dysfigured>wrkrcoop: but this has nothing to do with node.js
06:52:30  * safequit (Read error: Connection reset by peer)
06:52:46  <wrkrcoop>fine ill go to the js channel
06:53:06  <dysfigured>being patient and waiting in #angular is really your best bet
06:53:06  * mnaserquit (Ping timeout: 240 seconds)
06:53:54  <wrkrcoop>whys that
06:53:56  * tarkusquit (Quit: tarkus)
06:54:01  * BeerLoverjoined
06:54:44  * tarkusjoined
06:55:01  * oxhakjoined
06:56:48  * Ryukenquit (Quit: Leaving)
06:56:52  * a_thakurjoined
06:56:52  * oxhakquit (Remote host closed the connection)
06:57:39  * kingarmadillojoined
06:58:24  * vali_joined
06:58:36  * BlackSpongequit (Ping timeout: 240 seconds)
07:00:30  * a_thakur_quit (Ping timeout: 248 seconds)
07:02:30  * amdi_quit (Quit: Leaving)
07:02:58  * vali_quit (Client Quit)
07:03:17  * ddddquit (Ping timeout: 260 seconds)
07:03:40  * mnaserjoined
07:03:52  * kingarmadilloquit (Ping timeout: 260 seconds)
07:03:59  * contajoined
07:07:19  * apparitionjoined
07:07:24  * lmoejoined
07:07:28  * LucaTMjoined
07:08:12  * IncompleteNinnyquit (Read error: Connection reset by peer)
07:08:15  * lmoequit (Client Quit)
07:09:01  * sankhaquit (Remote host closed the connection)
07:09:27  * diazepanquit (Quit: diazepan)
07:09:39  * sankhajoined
07:09:57  * tockajoined
07:11:20  * NomadJimquit (Read error: Connection reset by peer)
07:11:27  * qrestlovequit (Read error: Connection reset by peer)
07:11:39  * donejoined
07:11:49  * NomadJimjoined
07:12:02  * donechanged nick to Guest13998
07:12:20  * qrestlovejoined
07:12:41  * Guest31595quit (Ping timeout: 255 seconds)
07:13:06  * abffquit (Quit: Connection closed for inactivity)
07:14:30  * sgronbloquit (Ping timeout: 240 seconds)
07:14:32  * lmoejoined
07:14:36  * macbookproquit
07:14:46  * GroenteLaquit (Remote host closed the connection)
07:16:40  * bttfquit (Ping timeout: 256 seconds)
07:16:51  * chargenjoined
07:16:54  * bttfjoined
07:17:28  * roomcayzjoined
07:18:25  * devcquit (Quit: bang bang; my baby shot me down)
07:22:26  * lmoequit (Quit: My notebook went to ****ing sleep - again..)
07:23:35  * dkingsjoined
07:23:48  * sankhaquit (Remote host closed the connection)
07:24:23  * sankhajoined
07:24:25  * GroenteLajoined
07:25:12  * r4nd0m-0nejoined
07:25:52  * sankha_joined
07:26:08  * milardovichjoined
07:26:12  * sankhaquit (Read error: Connection reset by peer)
07:26:53  * tvwjoined
07:27:30  * r4nd0m0nequit (Ping timeout: 240 seconds)
07:27:33  * a_thakur_joined
07:27:56  * contaquit (Quit: conta)
07:28:00  * dkingsquit (Ping timeout: 256 seconds)
07:28:20  * contajoined
07:30:12  * plutoniixquit (Ping timeout: 252 seconds)
07:30:17  * contaquit (Client Quit)
07:30:36  * milardovichquit (Ping timeout: 240 seconds)
07:30:40  * contajoined
07:31:04  * a_thakurquit (Ping timeout: 245 seconds)
07:32:54  * mcollinajoined
07:33:18  * blobaumjoined
07:33:38  * muthujoined
07:34:10  * oxhakjoined
07:34:11  * MINIMAN10000quit (Ping timeout: 240 seconds)
07:35:41  * tristanpquit (Remote host closed the connection)
07:35:43  * omequit (Quit: Connection closed for inactivity)
07:36:54  * a_thakur_quit (Read error: Connection reset by peer)
07:37:07  * dka_joined
07:37:21  * dkaquit (Remote host closed the connection)
07:37:21  * dka_quit (Remote host closed the connection)
07:37:35  * a_thakurjoined
07:37:37  * dkajoined
07:37:40  * davimore_joined
07:37:42  * jeetjoined
07:38:22  * sgronblojoined
07:39:03  * wrkrcoopquit (Quit: wrkrcoop)
07:39:09  * jeetquit (Client Quit)
07:40:30  * sankha_quit (Remote host closed the connection)
07:40:50  * sankhajoined
07:41:12  * davimorequit (Ping timeout: 260 seconds)
07:42:12  * Stardusterquit (Read error: Connection reset by peer)
07:43:06  * mr_louquit (Quit: Ex-Chat)
07:43:09  * plutoniixjoined
07:43:23  * Stardusterjoined
07:44:09  * plutoniixquit (Max SendQ exceeded)
07:44:38  * plutoniixjoined
07:45:31  * plutoniixquit (Max SendQ exceeded)
07:45:40  * Sphericaljoined
07:45:43  * SuperHansjoined
07:46:04  * plutoniixjoined
07:46:20  * ShellfishMemequit (Quit: ShellfishMeme)
07:47:03  * plutoniixquit (Max SendQ exceeded)
07:47:31  * plutoniixjoined
07:48:13  * sankhaquit (Remote host closed the connection)
07:48:13  * ch007mjoined
07:48:28  * plutoniixquit (Max SendQ exceeded)
07:48:58  * plutoniixjoined
07:49:07  * orbyt_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:50:03  * rohanrhuquit (Quit: Konversation terminated!)
07:50:15  * sankhajoined
07:50:32  * Or1onquit (Ping timeout: 260 seconds)
07:51:12  * rendarjoined
07:51:33  * sankhaquit (Read error: Connection reset by peer)
07:51:41  * surfistquit (Remote host closed the connection)
07:51:43  * sankhajoined
07:52:02  * someone235quit (Remote host closed the connection)
07:52:10  * surfistjoined
07:53:12  * sankhaquit (Read error: Connection reset by peer)
07:53:23  * sankhajoined
07:56:06  * Sphericalquit (Read error: Connection reset by peer)
07:57:02  * MrKquit (Quit: Leaving)
07:58:02  * sankhaquit (Ping timeout: 256 seconds)
07:58:43  * lmoejoined
08:01:25  * lmoequit (Client Quit)
08:01:26  * ejeyjoined
08:03:22  * YoYquit (Ping timeout: 260 seconds)
08:03:42  * madbytesquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:03:52  * apparitionquit (Quit: Bye)
08:03:58  * Herebordquit (Ping timeout: 248 seconds)
08:04:23  * Herebordjoined
08:04:33  * phutchinsjoined
08:06:00  * ShellfishMemejoined
08:07:07  * a_thakurquit (Remote host closed the connection)
08:08:17  * madbytesjoined
08:08:37  * BeerLoverquit (Ping timeout: 240 seconds)
08:09:22  * phutchinsquit (Ping timeout: 256 seconds)
08:09:24  * mirela666joined
08:09:45  * ejeyquit (Quit: Textual IRC Client: www.textualapp.com)
08:10:49  * mguellsegarrajoined
08:11:29  * nostrorajoined
08:11:35  * gothicsouthquit (Quit: Textual IRC Client: www.textualapp.com)
08:11:53  * mirela666quit (Remote host closed the connection)
08:12:17  * lillemanquit (Ping timeout: 240 seconds)
08:12:25  * smccarthyjoined
08:12:46  * mazulajoined
08:12:50  * gambl0rejoined
08:13:10  * BeerLoverjoined
08:13:25  * gothicsouthjoined
08:13:52  * RLajoined
08:14:05  * Cohedrin_quit (Quit: My Mac has gone to sleep. ZZZzzz…)
08:14:50  * milardovichjoined
08:15:57  * qrestlovequit (Ping timeout: 240 seconds)
08:16:22  * staar2joined
08:16:46  * smccarthyquit (Ping timeout: 248 seconds)
08:16:47  * Dymosquit (Excess Flood)
08:17:03  * Dymosjoined
08:17:41  * dkingsjoined
08:17:59  * mezodjoined
08:18:26  * Sleepy_Coderquit (Ping timeout: 256 seconds)
08:19:12  * Sleepy_Coderjoined
08:19:34  * milardovichquit (Ping timeout: 256 seconds)
08:20:00  * madbytesquit (Ping timeout: 240 seconds)
08:22:06  * dkingsquit (Ping timeout: 248 seconds)
08:23:30  * a_thakurjoined
08:25:54  * nschoejoined
08:25:57  * C0rn3j[m]joined
08:27:02  * a_thakur_joined
08:27:51  * Cohedrin_joined
08:28:04  * a_thakurquit (Ping timeout: 258 seconds)
08:28:40  * Cohedrin_quit (Read error: No route to host)
08:28:49  * a_thakur_quit (Read error: Connection reset by peer)
08:29:08  * a_thakurjoined
08:29:26  * qrestlovejoined
08:29:48  * Cohedrin_joined
08:30:01  * kiumajoined
08:30:19  * lmoejoined
08:33:26  * shmujoined
08:35:21  * kuldeep_quit (Ping timeout: 258 seconds)
08:38:36  * gambl0requit (Ping timeout: 240 seconds)
08:38:58  * bartmonjoined
08:39:16  * s2013quit (Quit: My Mac has gone to sleep. ZZZzzz…)
08:41:24  * jaequeryjoined
08:41:53  * haraijoined
08:42:38  * kuldeepjoined
08:44:40  * risto_joined
08:44:47  * risto__joined
08:44:54  * risto__quit (Client Quit)
08:46:07  * txmjoined
08:49:03  * jeidejoined
08:51:03  * node_fanaticquit (Quit: Leaving)
08:52:57  * C0rn3j[m]part
08:54:07  * Cagelinjoined
08:55:14  * NYTimesquit (Ping timeout: 245 seconds)
08:57:58  * orbital-smithquit (Remote host closed the connection)
08:58:13  * cotkojoined
08:58:22  * cotkoquit (Client Quit)
08:58:49  * NYTimesjoined
08:59:00  * munch_joined
08:59:31  * kingarmadillojoined
08:59:55  * cotkojoined
09:00:47  * nitpejoined
09:01:23  * ahmedelgabrijoined
09:01:49  * rohanrhujoined
09:03:06  * lordjancsojoined
09:03:09  * NYTimesquit (Ping timeout: 245 seconds)
09:03:27  * milardovichjoined
09:03:28  * YoYjoined
09:04:14  * kingarmadilloquit (Ping timeout: 248 seconds)
09:07:06  * zzmzjoined
09:08:00  * milardovichquit (Ping timeout: 240 seconds)
09:09:01  * NYTimesjoined
09:09:03  * Hunseopquit (Quit: 전 이만 갑니다.)
09:09:31  * bpmedleyquit (Quit: Textual IRC Client: www.textualapp.com)
09:09:43  * NYTimesquit (Changing host)
09:09:43  * NYTimesjoined
09:09:47  * oxhakquit (Remote host closed the connection)
09:09:57  * Snugglebashjoined
09:09:59  * Snugglebashquit (Max SendQ exceeded)
09:11:47  * dkingsjoined
09:12:20  * zzmzquit (Quit: Goodbye and good night)
09:12:55  * Snugglebashjoined
09:13:02  * Snugglebashquit (Max SendQ exceeded)
09:16:11  * rudjoined
09:16:21  * dkingsquit (Ping timeout: 252 seconds)
09:21:00  * lmoequit (Quit: My notebook went to ****ing sleep - again..)
09:22:06  * alilezaquit (Remote host closed the connection)
09:22:17  * _2E0PGSjoined
09:23:34  * alilezajoined
09:24:08  * alilezaquit (Remote host closed the connection)
09:24:24  * alilezajoined
09:25:09  * ArchNoobjoined
09:25:51  * ShellfishMemequit (Quit: ShellfishMeme)
09:26:06  * alilezaquit (Remote host closed the connection)
09:26:16  * SwiftMattjoined
09:27:14  * Booster2ooojoined
09:28:40  * SwiftMattquit (Client Quit)
09:29:35  * zz_zzjoined
09:32:52  * x34xmrjoined
09:35:17  * toddlerquit (Quit: Changing server)
09:35:36  * milardovichjoined
09:35:42  * rakesh1988quit (Ping timeout: 248 seconds)
09:35:54  * ShellfishMemejoined
09:35:59  * tristanpjoined
09:36:33  * ShellfishMemequit (Client Quit)
09:36:54  * ShellfishMemejoined
09:37:55  * lmoejoined
09:39:19  * quattro_joined
09:39:21  * ShellfishMemequit (Client Quit)
09:39:42  * Snugglebashjoined
09:39:46  * x34xmrquit (Read error: Connection reset by peer)
09:39:57  * milardovichquit (Ping timeout: 240 seconds)
09:40:15  * alilezajoined
09:40:16  * vinayjoined
09:41:00  * tristanpquit (Ping timeout: 240 seconds)
09:42:29  * rohanrhuquit (Quit: Konversation terminated!)
09:42:43  * x34xmrjoined
09:42:43  * nettowebjoined
09:43:54  * mezodquit (Remote host closed the connection)
09:44:00  * Zexorzquit (Read error: Connection reset by peer)
09:45:27  * sppadicquit (Quit: Ex-Chat)
09:45:54  * ShellfishMemejoined
09:47:57  * x34xmrquit (Remote host closed the connection)
09:50:41  * Herebordquit (Remote host closed the connection)
09:53:39  * mezodjoined
09:53:50  * herouxquit (Ping timeout: 248 seconds)
09:54:05  * byte512joined
09:55:02  <txm>You know that thing that clever people do create a function that returns a function ? Is this right? http://pastebin.com/x7sSP3rC
09:55:18  * nettowebquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:56:19  <GreenJello>txm, no, the timestamp() returns a function, not a string
09:56:40  <GreenJello>you'd know that if you actually ran the code :-p
09:56:42  * herouxjoined
09:56:54  * Cohedrin_quit (Quit: My Mac has gone to sleep. ZZZzzz…)
09:57:02  <txm>Last time I ran code a fairy died ;)
09:57:22  * Sharaalquit (Read error: No route to host)
09:57:43  * Sharaaljoined
09:58:21  * sneakertackquit (Quit: Leaving)
10:00:51  * Disgeaejoined
10:01:48  * jmwrijoined
10:02:30  <RLa>txm, make sure you do not have timestamp timezone-specific
10:02:54  <RLa>that can cause lots of issues with daylight saving time
10:03:23  <RLa>when things jump back and forward in time a full hour or something
10:03:41  <nitpe>txm, btw most useless closure ever
10:04:47  <RLa>you might simply want unix timestamp
10:05:04  * phutchinsjoined
10:05:16  <RLa>oh, and if you are in es6, use arrows
10:05:34  * necro666quit (Ping timeout: 248 seconds)
10:05:52  * wtrockijoined
10:06:24  * braincrashquit (Ping timeout: 255 seconds)
10:06:40  * chll_joined
10:06:42  * alilezaquit (Read error: Connection reset by peer)
10:06:52  * milardovichjoined
10:07:00  * milardovichquit (Remote host closed the connection)
10:07:12  * milardovichjoined
10:07:16  * alilezajoined
10:09:07  * mazulaquit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
10:09:36  * phutchinsquit (Ping timeout: 240 seconds)
10:11:29  <txm>nitpe: I guess that depends what the closure is doing. For me, it’s practice.
10:12:06  * mazulajoined
10:12:51  * necro666joined
10:14:47  * lennymjoined
10:17:03  <txm>ah ha this is what I did wrong const ts = timestamp(); console.log(ts()); // instead of timestamp()();
10:19:30  * hadifarnoudjoined
10:20:01  * tarkusquit (Quit: My Mac has gone to sleep. ZZZzzz…)
10:20:01  * ed209quit (Remote host closed the connection)
10:20:08  * ed209joined
10:20:36  * braincrashjoined
10:20:38  * medikoo-botquit (Remote host closed the connection)
10:21:26  * sankhajoined
10:21:49  * jmwriquit (Remote host closed the connection)
10:22:26  * jmwrijoined
10:23:00  * byte512quit (Ping timeout: 240 seconds)
10:23:38  * zwaragjoined
10:24:35  * medikoo-botjoined
10:26:44  * g4joined
10:26:44  * g4quit (Changing host)
10:26:44  * g4joined
10:27:47  * soeequit (Quit: Konversation terminated!)
10:30:18  <dysfigured>yeah that's definitely a useless closure
10:30:31  * bradfordli123quit (Remote host closed the connection)
10:30:58  <dysfigured>why not just const timestamp = moment().format('YYYY-MM-DD HH:mm:SS');
10:32:11  * braincrashquit (Ping timeout: 240 seconds)
10:32:27  <txm>dysfigured cos that doesn’t help me learn closures. I’m now happily incrementing a counter and everything.
10:32:42  <dysfigured>ah. ok.
10:33:09  <dysfigured>you might enjoy this https://www.gitbook.com/book/drboolean/mostly-adequate-guide
10:33:15  <txm>Thanks :)
10:33:32  * alilezaquit (Read error: Connection reset by peer)
10:33:42  * jaequeryquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:33:42  <dysfigured>s/might enjoy/should read/
10:34:25  * alilezajoined
10:34:42  <txm>enjoy or should - I don’t mind which, as long as it triggers one of those
10:34:58  * plutoniixquit (Quit: Leaving)
10:35:13  <jmwri>Can anyone tell me why this .then() call isn't working? Line #31 https://hastebin.com/onozituwef.js
10:35:28  * braincrashjoined
10:35:30  <joepie91>jmwri: define "not working"?
10:35:37  <jmwri>Not being called
10:36:37  <joepie91>jmwri: can you add a console.log between line 29 and 30 and see whether that's called?
10:36:57  <jmwri>joepie91: That isn't called
10:37:19  <joepie91>then getUserIdFromProfile is probably never resolving
10:38:18  * jeidequit (Ping timeout: 252 seconds)
10:38:19  <jmwri>The call to insertUser() on #29 has a log inside it that is being called
10:38:23  * soeejoined
10:38:30  <jmwri>How is that possible if it's not resolving?
10:38:50  <joepie91>jmwri: d'oh, sorry, I misread
10:39:06  * nettowebjoined
10:39:21  <joepie91>jmwri: right, the problem is in insertUser. why are you using `new Promise` there?
10:39:51  * gregf_joined
10:39:56  <jmwri>joepie91: Not sure exactly why I shouldn't
10:40:13  * milardovichquit (Remote host closed the connection)
10:40:17  * Slartibartjoined
10:40:17  * braincrashquit (Ping timeout: 260 seconds)
10:40:18  <jmwri>I want to return a promise so it can be used in a chain
10:40:32  <joepie91>jmwri: cassandra.executeAsync returns a promise already
10:40:45  * milardovichjoined
10:40:47  <joepie91>so you should be following the same Promise.try pattern as in ex.create
10:40:57  <joepie91>there's no reason to use `new Promise` here - you're not manually promisifying anything
10:41:05  <joepie91>and this also explains why line 32 is never called
10:41:13  <joepie91>because the `new Promise` is waiting for you to resolve() it, which you never do
10:41:22  * milardovichquit (Remote host closed the connection)
10:41:30  * braincrashjoined
10:41:39  * milardovichjoined
10:41:55  <joepie91>tl;dr build a chain using Promise.try like in ex.create and return the executeAsync from that
10:42:14  <jmwri>joepie91: I thought that I could just return and it would resolve itself on that value?
10:42:25  * a_thakurquit (Remote host closed the connection)
10:42:32  <jmwri>I actually don't want to return the result of that query, just the userId I create before
10:42:37  <joepie91>jmwri: no? like I said, what you want here is Promise.try, not `new Promise`
10:42:46  <joepie91>this is not what `new Promise` is for
10:42:56  <joepie91>and yes, I get that
10:43:15  <joepie91>jmwri: see also https://gist.github.com/joepie91/4c3a10629a4263a522e3bc4839a28c83#3-how-do-i-use-new-promise
10:43:33  <joepie91>jmwri: so, again, use Promise.try and build a chain with that
10:43:51  <joepie91>like you're already doing in ex.create
10:44:02  <jmwri>joepie91: I see, I'll read through that gist too. Thanks :)
10:46:54  * txmpart
10:47:31  * drehjoined
10:47:53  * drehquit (Client Quit)
10:48:11  <jmwri>joepie91: Is this correct? https://hastebin.com/torogetiqi.coffeescript
10:48:19  <dysfigured>joepie91: how come these gists aren't on your blog?
10:48:32  <jmwri>I wasn't sure where to redefine userId...
10:48:36  * Stardusterquit (Ping timeout: 240 seconds)
10:48:54  <joepie91>dysfigured: I generally use gists as my 'staging area' for things that are still being worked on
10:49:10  <joepie91>and assuming they ever are completed, they will eventually move to my blog
10:49:59  <dysfigured>ahh nice
10:50:30  <joepie91>jmwri: functionally correct, although 1) I'd recommend using `default-value` since || is wrong there, 2) you shouldn't mutate variables if you can at all avoid it (create new ones instead), 3) I'd probably use two nested Promise.try's there, one to wrap the uuid generation code and the other chain, and the other chain containing the actual two steps involved
10:50:39  <joepie91>ref https://www.npmjs.com/package/default-value
10:50:40  * sankhaquit (Remote host closed the connection)
10:52:10  * zwaragquit (Quit: zwarag)
10:52:39  * sankhajoined
10:53:44  * mguellsegarraquit (Quit: WeeChat 1.6)
10:53:55  <jmwri>joepie91: Like this? https://hastebin.com/emomakuwuc.coffeescript
10:54:22  <jmwri>Thanks for your help, still getting to grips!
10:54:45  <joepie91>jmwri: yeah, that's correct on point 3 :)
10:55:10  * guardianJjoined
10:55:14  * sankhaquit (Remote host closed the connection)
10:55:27  * sankhajoined
10:56:29  * Slartibartquit (Ping timeout: 245 seconds)
10:56:59  <mazula>Hi I have a service that checks the roles and permissions of my users, how do I not have to instantiate and use it in each of my routes? https://jsfiddle.net/hfswn4qx/14/
10:57:34  <mazula>I don't want to do in each routes : var rbac = new RBAC(roles); and console.log(rbac.can('moderator', 'review', {user: moderator, post: post}))
10:57:43  * guardianJquit (Remote host closed the connection)
10:58:20  * guardianJjoined
10:58:34  * sankhaquit (Remote host closed the connection)
10:58:41  * Slartibartjoined
10:59:12  * Sharaal1joined
10:59:37  * Sharaalquit (Ping timeout: 240 seconds)
11:00:14  * kingarmadillojoined
11:00:24  * sankhajoined
11:00:41  * contaquit (Ping timeout: 240 seconds)
11:01:06  * inflamesquit (Ping timeout: 240 seconds)
11:01:33  * sankhaquit (Read error: Connection reset by peer)
11:01:45  * gliquit (Quit: Leaving)
11:01:51  * phajijoined
11:02:04  * sankhajoined
11:04:09  * sankhaquit (Read error: Connection reset by peer)
11:04:20  * sankhajoined
11:04:32  * rohanrhujoined
11:04:47  <nitpe>jmwri, Hi, I was looking at your code, it uses a lot of chained promises which could be easily converted to a more readable way through async/await, have you tried that ?
11:04:57  * kingarmadilloquit (Ping timeout: 240 seconds)
11:06:34  * lmoequit (Quit: My notebook went to ****ing sleep - again..)
11:06:46  * gooddoggytreatquit (Ping timeout: 258 seconds)
11:07:36  * contajoined
11:08:33  * MichaelVBjoined
11:09:35  * NYTimesquit (Ping timeout: 256 seconds)
11:09:50  * dongustonquit (Ping timeout: 255 seconds)
11:10:25  <jmwri>nitpe: Hi, not yet! I new to js so I started with callbacks, moving to promises, then I was going to take a look at async/await :)
11:10:38  * alilezaquit (Remote host closed the connection)
11:12:10  * guardianJquit (Remote host closed the connection)
11:12:11  * lmoejoined
11:12:35  * guardianJjoined
11:13:06  * Ergojoined
11:13:37  <nitpe>jmwri, https://jakearchibald.com/2014/es7-async-functions/
11:14:46  * guardianJquit (Remote host closed the connection)
11:14:57  * miha-quit (Read error: Connection reset by peer)
11:15:42  * mkoskarquit (Ping timeout: 252 seconds)
11:16:21  * guardianJjoined
11:17:54  * sankhaquit (Remote host closed the connection)
11:18:25  * guardianJquit (Remote host closed the connection)
11:18:27  * guardianJ_joined
11:19:14  * gucci_meowquit (Remote host closed the connection)
11:19:20  * wrainboltjoined
11:19:28  * sankhajoined
11:20:24  * gucci_meowjoined
11:20:26  <MichaelVB>Any simple way to treeshake my node_modules?
11:20:36  <MichaelVB>Trying to cut down the size, need to deploy it to low bandwidth environment.
11:20:46  * sankhaquit (Remote host closed the connection)
11:21:28  * sankhajoined
11:22:09  * rohanrhuquit (Quit: Konversation terminated!)
11:23:29  * YoYquit (Ping timeout: 240 seconds)
11:23:49  <nitpe>MichaelVB, usually node modules don't come with a lot of extra unnecessary data
11:23:52  <GreenJello>MichaelVB, you can use yarn instead of npm and do https://yarnpkg.com/en/docs/cli/clean
11:23:57  <GreenJello>nitpe, that' untrue
11:24:13  <MichaelVB>Pretty sure I don't use 80% of the code in my node_modules :p
11:24:13  * YoYjoined
11:24:15  <GreenJello>tests, docs, images, etc.
11:24:22  * not-an-aardvarkquit (Quit: Connection closed for inactivity)
11:24:38  * a_thakurjoined
11:24:42  * mazulaquit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
11:24:47  <MichaelVB>does yarn clean treeshake or just remove tests and such?
11:25:09  * mylesborinsquit (Quit: farewell for now)
11:25:11  <GreenJello>probably just removes tests and stuff
11:25:12  <MichaelVB>either way, thanks for the suggestion i'll have a look
11:25:14  * gucci_meowquit (Ping timeout: 245 seconds)
11:25:15  <nitpe>GreenJello, I mean the modules under node_modules, the ones that I use at least dont ship with the tests
11:25:33  <GreenJello>MichaelVB, you could browserify or webpack your entire project
11:25:39  * mylesborinsjoined
11:25:41  <MichaelVB> It uses a heuristic to identify files that may not be needed from a distributed package and may not be entirely safe.
11:25:50  <GreenJello>MichaelVB, then you don't need node_modules at all; but won't work on all projects and requires a bit of work
11:26:01  <MichaelVB>Yeah i've got webpack set up for my front-end
11:26:06  <MichaelVB>could do the same for my back-end
11:26:09  * phpnodejoined
11:26:10  <GreenJello>yeah
11:26:25  <RLa>how often you deploy?
11:26:27  <MichaelVB>I'll check how effective yarn cleans heuristics are
11:26:42  <MichaelVB>Not quite the frequency, its just going over 4g to allot of small devices
11:27:00  <MichaelVB>which could be fieldreplaced on a pretty regular basis
11:27:05  * sh4rm4^bncpart
11:27:14  * noteboxjoined
11:27:40  * Amoljoined
11:27:53  * Amolquit (Client Quit)
11:29:20  <nitpe>GreenJello, hey could you point me out a node module that is shipped with tests ? I've ran a deep search under my node_modules and none of the ones I use ship with tests since that is declared inside of .npmignore
11:29:48  <nitpe>GreenJello, I would be surprise if there are common modules doing that
11:31:02  * phpnodequit (Ping timeout: 260 seconds)
11:31:28  <GreenJello>uniq, uglify-js, through, object-{key,assign,entries,value,hash}
11:31:55  <GreenJello>214 hits for 'test' in my project
11:32:34  * a_thakurquit (Remote host closed the connection)
11:32:41  * braincrashquit (Ping timeout: 240 seconds)
11:32:46  <nitpe>GreenJello, take a further look at it, by having test does not mean the tests are there, since it is a command declared inside of the package.json
11:32:48  <GreenJello>181 png files
11:32:57  * zwaragjoined
11:32:59  * lmoequit (Quit: My notebook went to ****ing sleep - again..)
11:33:02  * a_thakurjoined
11:33:03  <GreenJello>nitpe, I searched for file names
11:33:05  * a_thakurquit (Remote host closed the connection)
11:33:08  <GreenJello>or directory names
11:33:20  <nitpe>GreenJello, I got none here
11:33:28  <joepie91>find node_modules/ | grep test
11:33:41  * a_thakurjoined
11:33:43  <nitpe>GreenJello, please email these slacks to use npmignore
11:33:53  <GreenJello>nitpe, it's really not important
11:34:07  <GreenJello>also some people believe that you should include tests
11:34:07  * warlord0_joined
11:34:18  * joepie91is one of them
11:34:24  * gooddoggytreatjoined
11:35:13  <GreenJello>nitpe, feel free to spend some hundreds of hours sending PRs to add npmignore files
11:35:19  * EyePulpjoined
11:35:21  <nitpe>GreenJello, lol
11:35:24  <joepie91>online resources die, so more copies floating around of the full module with all of its configuration and tooling is better
11:35:35  * guardianJ_quit (Read error: No route to host)
11:35:40  <nitpe>joepie91, if npm dies we are all doomed
11:35:55  <MichaelVB>Time to store the entirety of npm as a backup! :p
11:36:11  <GreenJello>there are mirrors of npm
11:36:15  <joepie91>I should do that, actually
11:36:18  <joepie91>back up NPM, I mean
11:36:20  <MichaelVB>yeah but when the bomb hits
11:36:23  <joepie91>it's not that big
11:36:32  <MichaelVB>I'll be the guy with 40 thousand different mongodb project templates
11:36:42  <joepie91>like, well within the range of "you can do this on a single low-end server"
11:36:51  * warlord0_part
11:38:19  * guardianJ_joined
11:38:23  <nitpe>also, if npm actually gets offline without advising that, the code is still on github
11:38:35  <nitpe>it's not a big deal for a short period of time
11:38:41  * lpinquit (Read error: Connection reset by peer)
11:38:45  <joepie91>nitpe: not all of it is
11:39:15  * mazulajoined
11:39:31  <nitpe>joepie91, but you don't think time selects what really is useful and still relevant rather than keeping it forever ?
11:39:37  * EyePulpquit (Ping timeout: 240 seconds)
11:39:37  * hadifarnoudquit (Quit: My Mac has gone to sleep. ZZZzzz…)
11:39:52  * hadifarnoudjoined
11:40:11  * Slartibartquit (Ping timeout: 240 seconds)
11:40:16  <GreenJello>the problem with github as backup, is that you need npm to install the build tools for packages :-p
11:40:37  <joepie91>nitpe: no
11:40:43  <joepie91>I know it doesn't :)
11:40:45  <GreenJello>(ignoring the npm metadata which isn't backed up on github)
11:41:05  <joepie91>and if you've ever used the Wayback Machine, so should you ;)
11:41:08  <nitpe>my point is, if some code is really useful, people you fork that and make better versions
11:41:20  <nitpe>* people will fork that
11:41:24  <joepie91>nope
11:41:32  <joepie91>this is a nice theory but it never holds up
11:41:44  <joepie91>there are about a million reasons why people don't fork or why the copies might get lost
11:41:49  <joepie91>or might not be useful
11:41:59  <joepie91>active archival is a thing that is necessary
11:42:41  <joepie91>nitpe: I'd recommend having a look at http://archiveteam.org/index.php?title=Main_Page and pretty much any random Jason Scott talk
11:43:08  <nitpe>joepie91, do you mean as part of the human history/knowledge ?
11:43:24  <nitpe>because that is a valid argument for pretty much anything we do
11:43:47  <nitpe>joepie91, (looking at the link)
11:43:48  * phutchinsjoined
11:43:55  * warlord08joined
11:43:58  <joepie91>nitpe: I'm talking about the general decay of data and lack of its archival :P
11:44:01  <joepie91>whether it's code or otherwise
11:44:25  <joepie91>archiveteam operates a read-only mirror of gitorious, a service that was shut down two years ago
11:44:31  <joepie91>it is _still_ being used
11:44:42  <joepie91>(git hosting service like github, gitlab, bitbucket, etc.)
11:44:45  <warlord08>anyone available to give me a pointer on where I'm going wrong with mysql?
11:45:23  <nitpe>joepie91, I see what you mean, like google code for instance
11:45:57  * hadifarnoudquit (Ping timeout: 252 seconds)
11:45:59  <joepie91>nitpe: mind that the gitorious mirror operates on the original gitorious domain (which was handed over to an archiveteam member when the service was shut down), so this isn't just people googling for a project... this really concerns projects that were just never moved away from gitorious yet still have value to people
11:46:51  * gooddoggytreatquit (Ping timeout: 240 seconds)
11:46:57  <dysfigured>ok, skin me alive: i have an idea.. for a social network... where it's decentralized and the data is a blockchain. why is this a terrible idea?
11:47:29  * Snugglebashquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
11:47:37  <joepie91>dysfigured: because blockchains suck for bulky data
11:47:44  <joepie91>and social network data is not prunable
11:47:54  <joepie91>you will have to keep a full copy of all the data forever on everybody's system
11:48:01  <joepie91>this is not scalable in the slightest
11:48:09  <modernpacifist>I am getting slightly annoyed with people saying that serverless is the way forward
11:48:19  * NeverDiequit (Quit: http://radiux.io/)
11:48:39  * neilf__joined
11:48:52  <dysfigured>damn, okay
11:49:18  <RLa>MichaelVB, maybe you can reduce bw using rsync
11:49:41  <joepie91>dysfigured: also, make sure to read this: https://gist.github.com/joepie91/e49d2bdc9dfec4adc9da8a8434fd029b
11:49:57  <joepie91>because a lot of people call things that are not blockchains blockchains :)
11:50:10  <joepie91>modernpacifist: hi, welcome to the club! :P
11:50:23  <dysfigured>joepie91: funny story, i was reading through your gists when i saw that, and thought, "why would this work for a social network?"
11:50:34  <dysfigured>er, * why wouldn't this work
11:50:58  <joepie91>heh
11:51:04  <modernpacifist>joepie91: So I get a membership card or something? Literally every 'pro' they give me sounds like a con to me to the point of me wondering whether I need to call someone to report brainwashing
11:51:26  <joepie91>modernpacifist: no, sorry, your membership card is hosted on Firebase
11:51:33  <joepie91>you don't get a local copy ;)
11:51:52  <modernpacifist>Nooooo
11:51:54  * psychicist__joined
11:52:18  <nitpe>joepie91, have you ever heard about webarchive ? there is a big change of any code that is visualized through html (like navigating in the code tree using the browser) to be getting archived
11:52:18  <joepie91>modernpacifist: on a more serious note... it's hype, and almost everybody I've spoken to who extolls the virtues of "serverless" either 1) works for a company selling it, or 2) does not have any significant amount of experience with not-serverless things
11:52:32  <joepie91>which... is a bit similar to what you see with SPAs, really
11:52:42  * NYTimesjoined
11:52:48  * pongajoined
11:52:56  <joepie91>not everybody, but most people whom I've seen claim how "easy" and "simple" SPAs are, have not actually worked with anything else at all
11:53:12  * madbytesjoined
11:53:16  * NYTimesquit (Changing host)
11:53:16  * NYTimesjoined
11:53:21  <joepie91>which is again similar to MongoDB, where those claiming that it's "fast" are just comparing MongoDB to itself and haven't benchmarked it against anything else...
11:53:23  * sankhaquit (Remote host closed the connection)
11:53:32  * lpinjoined
11:53:36  <modernpacifist>joepie91: In my case these are people who typically didn't respond to hype
11:53:37  <joepie91>everything's fantastic in isolation!
11:54:00  * benc_quit (Read error: Connection reset by peer)
11:54:15  * benc_joined
11:54:20  * guardianJ_quit (Remote host closed the connection)
11:55:14  <modernpacifist>I guess we just sit back and when their app explodes just asked them for the non-existant logs
11:55:19  * guardianJ_joined
11:55:35  <modernpacifist>And perhaps the light bulb will flicker
11:55:52  * lmoejoined
11:56:07  * kiki`quit (Quit: Connection closed for inactivity)
11:56:15  <joepie91>heh
11:56:27  * sankhajoined
11:56:40  <joepie91>honestly the biggest downside of "serverless" - which is a massive misnomer anyway - is the crazy increase in complexity
11:57:08  <joepie91>closely followed by the fact that virtually any feature you add involves adding a provider, ie. a moving part, ie. a point of failure
11:57:30  * sankhaquit (Read error: Connection reset by peer)
11:58:02  * sankhajoined
11:58:09  * savantgardejoined
11:58:21  * eihabarabiajoined
11:58:30  * eihabarabiaquit (Client Quit)
11:59:43  * sankha_joined
12:02:11  * warlord08quit (Quit: Leaving)
12:02:29  * sankhaquit (Ping timeout: 255 seconds)
12:02:36  * UnnamedPlayerquit (Quit: UnnamedPlayer)
12:02:38  <BeerLover>We have 2 APIs and would like to open these APIs to 3rd party apps and also these will be used by our own mobile apps. I was wondering if OAuth is the suggested method?
12:03:43  <dysfigured>BeerLover: i would think api keys would be ideal
12:03:49  * sillysluxjoined
12:04:13  * mkoskarjoined
12:04:17  * sankha_quit (Ping timeout: 255 seconds)
12:04:20  * sillysluxquit (Read error: Connection reset by peer)
12:04:40  <dysfigured>use oauth for account login/signup, api keys for the api
12:05:00  <dysfigured>that's what it seems like all the big players do
12:05:12  <BeerLover>dysfigured oauth for login/signup then they will use the access-tokens right?
12:05:32  <BeerLover>I wanted to know the client part of oauth in detail
12:05:49  <dysfigured>once they're signed in i would think JWT would be used to maintain auth
12:05:56  <BeerLover>client will basically be the apps right either in house or 3rd party.... how will that differ?
12:06:09  * sankhajoined
12:07:14  * sankhaquit (Read error: Connection reset by peer)
12:07:25  * RLaquit (Quit: Leaving)
12:07:34  <dysfigured>i'm not following
12:08:00  <BeerLover>dysfigured I can give you specifics.
12:08:31  <dysfigured>more details yield better help
12:08:44  * sankhajoined
12:09:03  <BeerLover>we are planning to open our APIs to people
12:09:32  * hadifarnoudjoined
12:09:36  <BeerLover>so there will be a dev platform (like google dev console) where other users can register and enable apis and they'll get API keys for use
12:10:17  * sankha_joined
12:10:20  <BeerLover>but also, we would like to give oauth access also, so that apps can include our API in their Apps (signin with google etc)
12:10:32  <BeerLover>so 3 flows are possible i guess
12:10:36  * Snugglebashjoined
12:10:40  * Snugglebashquit (Max SendQ exceeded)
12:11:02  <BeerLover>1. in house apps (How will auth differentiate from oauth, or can we use both for inhouse as well as 3rd party apps)
12:11:18  <BeerLover>2. 3rd party apps include sign in with X
12:11:34  * sankha_quit (Read error: Connection reset by peer)
12:11:52  * Snugglebashjoined
12:11:57  * sankha_joined
12:12:00  <BeerLover>3. They just use our API keys for the API (their users don't have to be users in our backend)
12:12:01  * horseyquit (Remote host closed the connection)
12:12:11  <BeerLover>dysfigured so how should I go about this?
12:12:35  * gooddoggytreatjoined
12:12:36  * horseyjoined
12:12:44  * smccarthyjoined
12:12:58  <graingert>BeerLover: use openid connect
12:13:03  * sankhaquit (Ping timeout: 256 seconds)
12:13:06  <graingert>BeerLover: with webfinger
12:13:36  <graingert>BeerLover: it's a standardised form of oauth2
12:13:39  * sankhajoined
12:14:11  * psonquit (Ping timeout: 240 seconds)
12:14:20  * guardianJ_quit (Remote host closed the connection)
12:14:28  * horseyquit (Read error: Connection reset by peer)
12:14:34  * horseyjoined
12:14:46  * sankhaquit (Read error: Connection reset by peer)
12:14:54  <BeerLover>graingert i want to understand the underlying details of oauth2 according to the use cases I specified
12:15:00  * rudquit (Quit: rud)
12:15:09  <BeerLover>Is there any flaw with that?
12:15:14  * sankhajoined
12:15:17  * lmoequit (Quit: My notebook went to ****ing sleep - again..)
12:15:26  <BeerLover>What is the use of client secret ?
12:15:57  <graingert>BeerLover: go look up how openid connect does it
12:16:06  * ThePendulumjoined
12:16:16  <graingert>BeerLover: because it automatically distributes client secrets
12:16:21  * sankhaquit (Read error: Connection reset by peer)
12:16:27  * sankha_quit (Ping timeout: 256 seconds)
12:16:31  <BeerLover>should the client secret be provided while hitting the auth endpoint (getting user credentials)? but this means that auth endpoint is open to only clients that are registered
12:16:41  * sankhajoined
12:16:51  * gooddoggytreatquit (Ping timeout: 240 seconds)
12:17:01  * smccarthyquit (Ping timeout: 256 seconds)
12:18:05  * a_thakurquit (Remote host closed the connection)
12:18:20  * a_thakurjoined
12:18:32  * noteboxquit (Quit: Textual IRC Client: www.textualapp.com)
12:18:35  * kingarmadillojoined
12:19:56  * noteboxjoined
12:22:09  * psonjoined
12:22:56  * sgronbloquit (Read error: Connection reset by peer)
12:23:50  * sillysluxjoined
12:24:45  * WebertRLZquit (Ping timeout: 260 seconds)
12:24:53  * Tennisjoined
12:25:10  <clarity>The npm registry url https://skimdb.npmjs.com/registry/ shows that there are 380860 docs. Is this the number of publicly accessible npm libs or just a database number (which includes private libs)?
12:25:17  * sillysluxquit (Read error: Connection reset by peer)
12:25:21  <BeerLover>graingert does resource server and the auth server share the secret used to sign tokens?
12:25:52  * sillysluxjoined
12:25:53  <graingert>BeerLover: you can use ECDSA signatures if you want
12:26:24  <graingert>BeerLover: very small very fast and it's public/private
12:26:31  <BeerLover>graingert can you explain it's usage?
12:27:04  <graingert>BeerLover: but I'm pretty sure the auth token in opaque anyway
12:27:06  * milardovichquit (Remote host closed the connection)
12:27:21  * nicojuicyjoined
12:27:27  <graingert>BeerLover: instead of hmac you sign tokens with a private key of a key pair
12:27:31  * psonquit (Read error: Connection reset by peer)
12:27:32  <graingert>Then on all other servers you can verify the token via the public key
12:27:37  * milardovichjoined
12:29:56  * samschjoined
12:30:54  * savantgardequit (Remote host closed the connection)
12:32:00  * filipooujoined
12:32:11  * psonjoined
12:32:17  * milardovichquit (Ping timeout: 260 seconds)
12:34:09  * milardovichjoined
12:35:25  * sillysluxquit (Read error: Connection reset by peer)
12:35:31  * lmoejoined
12:36:36  * sibaquit (Quit: My Mac has gone to sleep. ZZZzzz…)
12:37:26  * eycsigfyjoined
12:40:40  * oxhakjoined
12:40:46  * oxhakquit (Changing host)
12:40:46  * oxhakjoined
12:41:52  * pson_joined
12:43:23  * alilezajoined
12:43:41  <BeerLover>graingert that seems nice.... can I use that for JWT? or is this something different?
12:43:41  * mihokjoined
12:44:24  <graingert>BeerLover: JWT uses JWS
12:44:31  <graingert>BeerLover: JWS specifies that you can do ECDSA
12:44:39  * davimorejoined
12:45:07  * psonquit (Ping timeout: 260 seconds)
12:45:29  * davimore_quit (Ping timeout: 240 seconds)
12:45:33  <graingert>https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms-40#section-3.4
12:45:50  * oxhak_joined
12:46:54  * oxhakquit (Ping timeout: 245 seconds)
12:46:56  * kgrzquit (Quit: Connection closed for inactivity)
12:47:52  * savantgardejoined
12:48:15  <BeerLover>Thanks graingert
12:48:54  <graingert> Np
12:49:11  <graingert>Make sure you pick a safe curve!
12:50:34  * sgronblojoined
12:50:46  * oxhakjoined
12:50:56  * ironfroggyjoined
12:51:58  * soeequit (Quit: Konversation terminated!)
12:52:56  * soeejoined
12:53:02  * dongustonjoined
12:53:34  * oxhak_quit (Ping timeout: 248 seconds)
12:54:14  * Snugglebashquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
12:54:48  * arup_rjoined
12:55:43  * oxhak_joined
12:56:05  * lithiequit (Quit: Connection closed for inactivity)
12:56:56  * oxhakquit (Ping timeout: 255 seconds)
12:57:17  * aniketh__joined
12:58:02  * modlinjoined
12:58:19  * thebisquickmanjoined
12:58:41  * ShellfishMemequit (Ping timeout: 240 seconds)
13:00:39  * psychicist__quit (Ping timeout: 245 seconds)
13:01:34  * thebisquickmanquit (Read error: Connection reset by peer)
13:02:36  * mrkmgjoined
13:02:41  * tarkusjoined
13:03:29  * ArchNoobquit (Ping timeout: 256 seconds)
13:03:30  * thebisquickmanjoined
13:05:04  * plutoniixjoined
13:05:21  * plutoniixquit (Max SendQ exceeded)
13:05:37  * jmwriquit (Ping timeout: 240 seconds)
13:06:29  * psonjoined
13:06:29  * plutoniixjoined
13:06:51  * Lee1092quit (Quit: Connection closed for inactivity)
13:06:57  * NeverDiejoined
13:07:30  * gooddoggytreatjoined
13:07:45  * Siegfriedjoined
13:07:59  * saulquit (Ping timeout: 240 seconds)
13:08:26  * dwolfsangeljoined
13:08:59  * nolashquit (Ping timeout: 240 seconds)
13:09:09  * pson_quit (Ping timeout: 256 seconds)
13:09:21  * NeverDiequit (Client Quit)
13:09:24  * nolashjoined
13:10:24  * prillian5joined
13:10:59  * jmwrijoined
13:11:54  * gooddoggytreatquit (Ping timeout: 245 seconds)
13:12:29  * gooddoggytreatjoined
13:12:45  * glijoined
13:13:49  * jeidejoined
13:13:51  * vinayquit (Remote host closed the connection)
13:14:10  * sankhaquit (Remote host closed the connection)
13:14:32  * BeerLoverquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:14:37  * lektrikquit
13:15:04  * a_thakurquit
13:15:04  * sankhajoined
13:15:06  * subhojit777quit (Ping timeout: 240 seconds)
13:16:08  * sankhaquit (Remote host closed the connection)
13:17:19  * madbytesquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:18:05  * sankhajoined
13:18:18  * radixojoined
13:18:32  * the_antquit (Quit: the_ant)
13:18:43  <ThePendulum>how do I use an 'alias' with forever so I can easily shut a program down by a known name?
13:19:08  * a_thakurjoined
13:19:53  * sankha_joined
13:20:59  * ShellfishMemejoined
13:21:06  * sankha_quit (Read error: Connection reset by peer)
13:21:18  * milardovichquit (Remote host closed the connection)
13:21:20  <radixo>Hi guys.. Sorry for the question.. I want to know how if I can make one http request and return direct on the request in my server..
13:21:34  * sankha_joined
13:21:48  * alilezaquit (Remote host closed the connection)
13:22:25  * alilezajoined
13:22:35  * sankhaquit (Ping timeout: 255 seconds)
13:22:50  * cocoadaemonjoined
13:23:22  * Siegfriedquit (Quit: Textual IRC Client: www.textualapp.com)
13:23:28  * sankhajoined
13:23:31  * howdoiquit (Quit: Connection closed for inactivity)
13:23:46  * bbankesjoined
13:24:13  * sankhaquit (Remote host closed the connection)
13:24:27  * sankhajoined
13:24:31  * alilezaquit (Remote host closed the connection)
13:24:45  <graingert>radixo: yes
13:24:45  * alilezajoined
13:24:55  <graingert>radixo: that's sort of what it's for
13:25:06  * surfistquit (Remote host closed the connection)
13:25:31  * surfistjoined
13:25:52  * sankha_quit (Read error: Connection reset by peer)
13:27:31  * phpnodejoined
13:30:07  * ShellfishMemequit (Ping timeout: 258 seconds)
13:31:20  * alilezaquit (Remote host closed the connection)
13:31:32  * filipoou_joined
13:31:40  <radixo>graingert: but how can I wait for the callback, and then return the response?
13:31:42  * a_thakur_joined
13:32:02  * mrkmgquit (Ping timeout: 258 seconds)
13:32:13  <graingert>radixo: await
13:32:22  * phpnodequit (Ping timeout: 260 seconds)
13:32:28  <graingert>radixo: use request-promise-native
13:33:57  * filipoouquit (Ping timeout: 240 seconds)
13:34:21  * Faucelmejoined
13:34:39  * a_thakurquit (Ping timeout: 256 seconds)
13:35:13  * sxaquit (Ping timeout: 256 seconds)
13:36:52  * jeidequit (Read error: Connection reset by peer)
13:37:28  * tristanpjoined
13:39:34  * oxhakjoined
13:39:54  * jmwriquit (Remote host closed the connection)
13:40:31  * jmwrijoined
13:42:41  * tristanpquit (Ping timeout: 240 seconds)
13:43:09  * oxhak_quit (Ping timeout: 256 seconds)
13:44:23  * RLajoined
13:44:27  * Havvyjoined
13:44:49  * jmwriquit (Ping timeout: 245 seconds)
13:45:37  * Guest13998quit (Read error: Connection reset by peer)
13:46:13  * isHavvyquit (Ping timeout: 258 seconds)
13:46:37  <mazula>How I can use a middleware in express for specific routes ?
13:46:52  * sxajoined
13:47:34  * donejoined
13:47:57  * donechanged nick to Guest69962
13:48:23  * Yackerjoined
13:48:27  <RLa>mazula, app.get('/something', [mw1, mw2], (req, res) => ..)
13:49:23  * jmwrijoined
13:49:29  * ch007mquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:49:47  <mazula>Rla thank you, it's possible to pass parameters to this callback ? (for example the role of my user and permissions)
13:49:57  * nettowebquit (Ping timeout: 256 seconds)
13:50:09  * Sorellajoined
13:50:10  * madbytesjoined
13:50:28  * jmwriquit (Remote host closed the connection)
13:50:37  * nettoweb1joined
13:50:58  * ShellfishMemejoined
13:51:03  <RLa>mazula, set them in a mw above on the req object
13:51:05  * jmwrijoined
13:52:32  * nettoweb1quit (Client Quit)
13:53:37  <mazula>Must I have them in my request? res.user.roles and res.user.permissions
13:54:36  * lmoequit (Quit: My notebook went to ****ing sleep - again..)
13:54:37  * neilf__quit (Quit: Connection closed for inactivity)
13:54:57  * NYTimesquit (Ping timeout: 240 seconds)
13:55:09  * modlinquit (Quit: modlin)
13:55:17  * KaeruCTjoined
13:55:31  * Yackerquit (Quit: Textual IRC Client: www.textualapp.com)
13:55:33  * noteboxquit (Quit: Textual IRC Client: www.textualapp.com)
13:55:47  * milardovichjoined
13:56:04  * tarkusquit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
13:56:19  <doodadjs>mazula: don't know Express, but do you have sessions ? maybe you should take a look
13:56:25  * mrkmgjoined
13:56:34  <mazula>doodadjs nop, I use JWT
13:56:46  * oxhak_joined
13:56:57  * concertijoined
13:57:33  * arup_rquit (Remote host closed the connection)
13:57:40  * vali_joined
13:58:07  * phpnodejoined
13:58:24  <doodadjs>mazula: if I remember, you can store user's id in the token ?
13:58:32  <mazula>yes
13:58:39  <doodadjs>you can retrieve your roles and permissions from that id
13:58:56  * ch007mjoined
13:59:01  <mazula>in my case I have create this : https://jsfiddle.net/hfswn4qx/14/
13:59:06  * muthuquit (Quit: Leaving)
13:59:10  * stoneburnerquit (Read error: Connection reset by peer)
13:59:28  * NYTimesjoined
13:59:31  * Faucelmequit (Read error: Connection reset by peer)
13:59:34  <mazula>I want to do in specific route : rbac.can('moderator', 'review', {user: moderator, post: post})
13:59:47  <mazula>but the roles, permissions and params can change
13:59:51  * oxhakquit (Ping timeout: 240 seconds)
14:00:17  * vali_quit (Client Quit)
14:00:17  * NYTimesquit (Changing host)
14:00:17  * NYTimesjoined
14:00:23  * milardovichquit (Ping timeout: 255 seconds)
14:00:32  <mazula>there are params, sometimes not
14:00:36  <mazula>sometimes*
14:01:00  * lmoejoined
14:01:16  * a_thakur_quit
14:01:18  * sternsjoined
14:02:09  * morris4joined
14:02:41  * morris4quit (Client Quit)
14:02:45  * milardovichjoined
14:03:10  * psychicist__joined
14:03:26  * lemoinemjoined
14:04:26  * s2013joined
14:05:39  * ispnjoined
14:06:14  * KaeruCTquit (Ping timeout: 255 seconds)
14:06:54  * mezodquit (Remote host closed the connection)
14:08:25  * Endarkedjoined
14:08:48  * stoneburnerjoined
14:09:50  * zol1quit (Ping timeout: 248 seconds)
14:10:02  * tarkusjoined
14:10:43  * noteboxjoined
14:12:12  * joshsynjoined
14:14:14  * ramorteguijoined
14:14:46  * s2013quit (Quit: My Mac has gone to sleep. ZZZzzz…)
14:15:58  * mguellsegarrajoined
14:17:09  * quattro_quit (Quit: quattro_)
14:17:42  * s2013joined
14:17:59  * chandu20joined
14:20:58  * savantgardequit (Remote host closed the connection)
14:21:45  * mezodjoined
14:22:45  * mazulaquit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
14:23:31  * toiquit (Ping timeout: 240 seconds)
14:23:36  * Or1onjoined
14:24:46  * edgar[m]quit (Remote host closed the connection)
14:24:46  * mauzao9[m]quit (Read error: Connection reset by peer)
14:24:46  * ganlubquit (Write error: Connection reset by peer)
14:24:46  * Mee[m]quit (Write error: Connection reset by peer)
14:24:46  * cgfloare[m]quit (Write error: Connection reset by peer)
14:24:46  * kineticrootkit[mquit (Write error: Connection reset by peer)
14:24:46  * alaeri[m]quit (Write error: Connection reset by peer)
14:24:46  * unclechuquit (Write error: Connection reset by peer)
14:24:46  * vandersongold[m]quit (Read error: Connection reset by peer)
14:24:46  * EnigmaCurry[m]quit (Remote host closed the connection)
14:24:46  * Siilwyn[m]quit (Remote host closed the connection)
14:24:46  * michael[m]1quit (Remote host closed the connection)
14:24:46  * miton[m]quit (Remote host closed the connection)
14:24:46  * berro[m]quit (Read error: Connection reset by peer)
14:24:46  * zwarag[m]quit (Read error: Connection reset by peer)
14:24:46  * zumbrunn[m]quit (Read error: Connection reset by peer)
14:24:46  * CapsLock[m]quit (Read error: Connection reset by peer)
14:24:46  * TeenageNecromancquit (Read error: Connection reset by peer)
14:24:47  * krigare[m]quit (Read error: Connection reset by peer)
14:24:47  * M-berdarioquit (Read error: Connection reset by peer)
14:24:47  * river[m]quit (Read error: Connection reset by peer)
14:24:47  * fer22f[m]quit (Read error: Connection reset by peer)
14:24:47  * isayme[m]quit (Read error: Connection reset by peer)
14:24:47  * enjunear[m]quit (Remote host closed the connection)
14:24:47  * Ferk[m]quit (Remote host closed the connection)
14:24:47  * samsam999[m]quit (Read error: Connection reset by peer)
14:24:47  * algesten[m]quit (Write error: Connection reset by peer)
14:24:47  * Algram[m]quit (Write error: Connection reset by peer)
14:24:47  * drdrey[m]quit (Write error: Connection reset by peer)
14:24:47  * wires[m]quit (Write error: Connection reset by peer)
14:24:47  * gabrin[m]quit (Write error: Connection reset by peer)
14:24:47  * M-keyvanquit (Read error: Connection reset by peer)
14:24:47  * ashish3805[m]quit (Write error: Connection reset by peer)
14:24:47  * Sri[m]quit (Write error: Connection reset by peer)
14:24:47  * Powersourcequit (Read error: Connection reset by peer)
14:24:48  * danhuynh[m]quit (Write error: Connection reset by peer)
14:24:48  * sleewoo[m]quit (Write error: Connection reset by peer)
14:24:48  * M-test12345quit (Write error: Connection reset by peer)
14:24:48  * bgrayburn[m]quit (Write error: Connection reset by peer)
14:24:48  * M-shinequit (Write error: Connection reset by peer)
14:24:48  * jtymes[m]quit (Write error: Connection reset by peer)
14:24:49  * ameyaapte1[m]quit (Write error: Connection reset by peer)
14:24:49  * wuuwuu[m]quit (Write error: Connection reset by peer)
14:24:49  * Triskell[m]quit (Write error: Connection reset by peer)
14:24:49  * brownish[m]quit (Write error: Connection reset by peer)
14:24:49  * observerXquit (Write error: Connection reset by peer)
14:24:49  * hbakhtiyor[m]quit (Write error: Broken pipe)
14:24:49  * Sheogorath[m]quit (Write error: Connection reset by peer)
14:24:49  * SpEcHiDequit (Write error: Connection reset by peer)
14:24:49  * k13noxjoined
14:24:50  * spoctoss[m]quit (Write error: Connection reset by peer)
14:24:50  * mirkobenedetti[mquit (Write error: Connection reset by peer)
14:24:50  * dikiaapquit (Write error: Connection reset by peer)
14:24:50  * gurunor[m]quit (Write error: Connection reset by peer)
14:24:50  * blackkatana[m]quit (Write error: Connection reset by peer)
14:24:51  * miska[m]quit (Write error: Connection reset by peer)
14:24:51  * M__joshua__[m]quit (Write error: Connection reset by peer)
14:24:51  * JFA[m]quit (Write error: Connection reset by peer)
14:24:51  * rangak[m]quit (Write error: Connection reset by peer)
14:24:51  * shanek[m]quit (Write error: Connection reset by peer)
14:24:51  * Niels[m]quit (Write error: Connection reset by peer)
14:25:39  * oxhak_quit (Ping timeout: 256 seconds)
14:26:09  * EyePulpjoined
14:28:12  * radixoquit (Ping timeout: 252 seconds)
14:29:23  * nettowebjoined
14:29:32  * Or1onquit (Ping timeout: 260 seconds)
14:29:35  * alilezajoined
14:30:36  * ShekharReddyjoined
14:31:00  * mazulajoined
14:33:02  * psychicist__quit (Ping timeout: 260 seconds)
14:33:18  * alilezaquit (Remote host closed the connection)
14:33:40  * saslamjoined
14:33:41  * wrainboltquit (Ping timeout: 255 seconds)
14:34:00  * wrainboltjoined
14:34:35  * YoYquit (Ping timeout: 255 seconds)
14:34:43  * zol1joined
14:35:48  * mnutt_joined
14:36:27  * Endarkedquit (Ping timeout: 252 seconds)
14:37:55  * YoYjoined
14:39:43  * cotkoquit (Quit: Konversation terminated!)
14:40:48  * a_thakurjoined
14:43:49  * lu_tzejoined
14:44:10  * node_fanaticjoined
14:44:42  * lemoinemquit (Ping timeout: 260 seconds)
14:44:58  * Kristinequit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
14:45:34  * Franckapikjoined
14:46:20  * ShekharReddyquit
14:47:52  * mazulaquit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
14:48:14  * bookchinquit (Quit: Lost terminal)
14:51:35  * Endarkedjoined
14:51:41  * g4quit (Quit: Leaving)
14:51:51  * chandu20quit (Ping timeout: 252 seconds)
14:52:14  * mazulajoined
14:52:30  * vuotojoined
14:53:11  * Kristinejoined
14:53:11  * Kristinequit (Changing host)
14:53:11  * Kristinejoined
14:53:25  * Wind0rquit (Remote host closed the connection)
14:53:43  * rakesh1988joined
14:54:06  * ShellfishMemequit (Quit: ShellfishMeme)
14:54:35  * KaeruCTjoined
14:54:56  * ShellfishMemejoined
14:55:15  * enjunear[m]joined
14:55:38  * a_thakurquit (Remote host closed the connection)
14:55:43  * lemoinemjoined
14:56:08  * a_thakurjoined
14:56:21  * someone235joined
14:56:24  * tristanpjoined
14:57:12  * Wind0rjoined
14:57:30  * bigcakejoined
14:57:34  * savantgardejoined
14:58:01  * arpujoined
14:58:28  * savantgardequit (Remote host closed the connection)
14:58:35  * bartmonquit (Quit: Leaving)
14:58:36  * mezodquit (Remote host closed the connection)
14:58:53  * KaeruCTquit (Ping timeout: 255 seconds)
14:59:26  * mr-foobarquit (Ping timeout: 248 seconds)
14:59:52  * macabrejoined
15:00:16  * k13nox_joined
15:00:23  * savantgardejoined
15:00:34  * ShellfishMemequit (Quit: ShellfishMeme)
15:01:15  * macabre_joined
15:01:23  * IncompleteNinnyjoined
15:01:29  * sankha_joined
15:01:32  * sankhaquit (Read error: Connection reset by peer)
15:01:44  * enetjoined
15:02:26  * ShellfishMemejoined
15:03:23  * k13noxquit (Ping timeout: 255 seconds)
15:03:59  * chandu20joined
15:04:18  * ShellfishMemequit (Client Quit)
15:04:52  * victorclfjoined
15:05:12  * dioheadquit (Ping timeout: 255 seconds)
15:05:19  * macabrequit (Ping timeout: 256 seconds)
15:05:42  * phalethjoined
15:07:16  * tarkus_joined
15:08:10  * weiwaejoined
15:08:24  * lmoequit (Quit: My notebook went to ****ing sleep - again..)
15:08:33  * gliquit (Quit: Leaving)
15:09:01  * risto_quit (Ping timeout: 258 seconds)
15:09:01  * staar2quit (Ping timeout: 258 seconds)
15:09:22  * vuotoquit (Quit: Lost terminal)
15:09:49  * kingarmadilloquit (Ping timeout: 245 seconds)
15:09:56  * vuotojoined
15:10:05  * neuro_sysjoined
15:10:18  <ThePendulum>damn, requiring root is annoying af... I'd need to require users to install node as root, not ideal
15:10:39  * a_thakurquit (Remote host closed the connection)
15:10:51  <joepie91>ThePendulum: ?
15:11:14  <ThePendulum>joepie91: I need hardware access on a Pi, which afaik is always going to require root access
15:11:40  * madbytesquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:11:48  * k13noxjoined
15:11:55  <neuro_sys>Is it possible to override express app.get('*'), route by another specific get call initializedlater? It seems not to work.
15:12:00  <ThePendulum>not sure if there's a better way than to just run node as root
15:12:09  <MichaelVB>Man, trying to properly compile my backend into one nice file is a hassle..
15:12:11  * c0bquit (Ping timeout: 240 seconds)
15:12:25  <ThePendulum>MichaelVB: why would you?
15:12:30  * vuotoquit (Remote host closed the connection)
15:12:32  <MichaelVB>ease of deployment
15:12:33  * rzyzjoined
15:12:44  <mazula>joepie91 it's a good practice a function in a function ifI want to specify the roles and the permissions for each routes specifically ? http://stackoverflow.com/questions/9609325/node-js-express-js-user-permission-security-model
15:12:55  * deebjoined
15:13:19  <ThePendulum>not sure how having 1 file helps but I trust your word for it
15:13:30  <mazula>like app.get("/article/:id", requireRole("user", "read"));
15:13:32  <MichaelVB>Well my senior/admin requested that i try :p
15:13:40  <MichaelVB>so i guess it makes it less daunting for him
15:14:05  * radixojoined
15:14:19  <joepie91>mazula: yep, that;'s a good approach
15:14:24  * k13nox_quit (Ping timeout: 245 seconds)
15:14:37  * kuldeepquit (Remote host closed the connection)
15:14:59  <mazula>thx
15:15:02  <joepie91>mazula: if you have very complex roles/permissions, you may also find this helpful: https://www.npmjs.com/package/bitmask-flags
15:15:11  <mazula>ok :)
15:15:12  * hellomichibyejoined
15:15:17  * kingarmadillojoined
15:15:45  * dommeljoined
15:16:15  * kuldeepjoined
15:17:15  * mazulaquit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
15:17:45  * bdunavantjoined
15:19:13  * lmoejoined
15:19:20  * homosaurjoined
15:20:25  <MichaelVB>if you look for ACL on npm
15:20:33  * ArchNoobjoined
15:20:34  <MichaelVB>you can find some good packages for roles and permissions
15:21:06  <joepie91>idk, I've found that "ACL middleware" is one of those things that's easy to write custom and hard to generalize
15:21:23  <joepie91>and you're usually better off just writing a simple implementation that fits your requirements perfectly
15:21:43  * joepie91should figure out a way to quantify stuff like this
15:22:00  <filipoou_>hi there! could you give me any tips on making simple web crawler in node/express. I managed to build a scraper that scrape given url and returns all internal links. My problem is that I could not make a loop that make the same request to every scraped link. I think my problem was caused by asynchronous requests. So basically my loop was finishing before making all the requests has finish. So could you
15:22:02  * tarkusquit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
15:22:02  <filipoou_>please just direct me in right direction?
15:22:18  <joepie91>filipoou_: you'll want to look into promises, they'll make this a lot easier
15:22:24  <joepie91>!bluebird @ filipoou_
15:22:24  <ecmabot>filipoou_: A recommended promises module is bluebird; it is faster (in Node.js / v8 browsers) than `async`, or other promises modules, and offers many more features. ES6 promises (with a shim) can be used as a compact alternative in browsers. Start here: https://gist.github.com/joepie91/791640557e3e5fd80861
15:22:44  * nicojuicyquit (Ping timeout: 255 seconds)
15:22:50  <joepie91>filipoou_: so you might end up with eg. code like this: https://gist.github.com/joepie91/4c125c45ee6c5ea0375f
15:22:56  * BeerLoverjoined
15:23:04  * nschoe_joined
15:23:12  <MichaelVB>+1 for promises
15:23:20  <MichaelVB>get into async await after that, lovely code
15:23:23  * DeltaHeavyjoined
15:23:27  <joepie91>(in practice you'll often want to work with task queues and/or streams, because crawling with a bunch of .maps means keeping everything in memory and that gets out of hand quick)
15:23:38  <joepie91>(but promises still play an important role there)
15:24:14  <joepie91>eg. https://www.npmjs.com/package/promise-task-queue might be of use
15:24:21  * BeerLoverquit (Client Quit)
15:24:40  * c0bjoined
15:25:31  * tarkus_quit (Quit: My Mac has gone to sleep. ZZZzzz…)
15:26:05  * ralalajoined
15:27:29  * rudjoined
15:27:37  <ThePendulum>if I want to run an application as root, I would tell user to install node as root first?
15:28:00  <ThePendulum>since otherwise node will be installed for my non-root user only
15:28:02  * sankha_quit (Remote host closed the connection)
15:28:23  * sankhajoined
15:28:48  <fnordbart>technically, it doesn't make a difference in which path node is installed. otoh you might not want to have the binary writeable by any user
15:29:10  * sankhaquit (Remote host closed the connection)
15:29:55  * NYTimesquit (Quit: WeeChat 1.6)
15:30:13  * bgrayburn[m]joined
15:30:14  * ganlubjoined
15:30:14  * Sheogorath[m]joined
15:30:17  * kineticrootkit[mjoined
15:30:19  * Sri[m]joined
15:30:19  * unclechujoined
15:30:21  * river[m]joined
15:30:21  * M-shinejoined
15:30:21  * miska[m]joined
15:30:22  * zwarag[m]joined
15:30:23  * fer22f[m]joined
15:30:23  * hbakhtiyor[m]joined
15:30:24  * Algram[m]joined
15:30:24  * jtymes[m]joined
15:30:24  * wuuwuu[m]joined
15:30:25  * Mee[m]joined
15:30:25  * M-keyvanjoined
15:30:31  * isayme[m]joined
15:30:32  * observerXjoined
15:30:32  * alaeri[m]joined
15:30:33  * drdrey[m]joined
15:30:33  * berro[m]joined
15:30:34  * TeenageNecromancjoined
15:30:35  * JFA[m]joined
15:30:35  * brownish[m]joined
15:30:35  * spoctoss[m]joined
15:30:35  * SpEcHiDejoined
15:30:35  * cgfloare[m]joined
15:30:37  * vandersongold[m]joined
15:30:38  * M-test12345joined
15:30:39  * shanek[m]joined
15:30:40  * dikiaapjoined
15:30:40  * EnigmaCurry[m]joined
15:30:43  * krigare[m]joined
15:30:43  * gurunor[m]joined
15:30:43  * danhuynh[m]joined
15:30:43  * wires[m]joined
15:30:43  * M__joshua__[m]joined
15:30:46  * rangak[m]joined
15:30:47  * Triskell[m]joined
15:30:47  * ashish3805[m]joined
15:30:49  * zumbrunn[m]joined
15:30:49  * Siilwyn[m]joined
15:30:50  * M-berdariojoined
15:30:50  * algesten[m]joined
15:30:51  * blackkatana[m]joined
15:30:51  * Powersourcejoined
15:30:51  * mirkobenedetti[mjoined
15:30:51  * samsam999[m]joined
15:30:52  * miton[m]joined
15:30:52  * ameyaapte1[m]joined
15:30:52  * michael[m]1joined
15:30:52  * Ferk[m]joined
15:30:55  * gabrin[m]joined
15:30:56  * edgar[m]joined
15:30:57  * Niels[m]joined
15:30:59  * sleewoo[m]joined
15:30:59  * mauzao9[m]joined
15:30:59  * CapsLock[m]joined
15:31:07  * sankhajoined
15:31:18  <filipoou_>thanks!
15:31:42  <filipoou_>I looked into it but was not sure if its the why to go.
15:31:56  <filipoou_>s/why/way/
15:32:21  * sankhaquit (Read error: Connection reset by peer)
15:32:44  * IrishGringoquit (Ping timeout: 245 seconds)
15:32:49  * sankhajoined
15:33:31  * lordjancsoquit (Quit: Leaving)
15:34:52  * ralalaquit (Remote host closed the connection)
15:35:08  * mr-foobarjoined
15:35:21  * rohanrhujoined
15:35:49  * subhojit777joined
15:35:50  * e14joined
15:36:54  * sankhaquit (Ping timeout: 245 seconds)
15:37:03  * sz0joined
15:37:05  * bpmedleyjoined
15:37:05  * Kristinequit (Changing host)
15:37:05  * Kristinejoined
15:37:11  * bpmedleyquit (Client Quit)
15:37:12  <filipoou_>@joepie91 it looks like what I need. Basically I need to create and update a queue relative to what was scraped from previous pages. Do I understand it correctly that it will be possible with promise-task-queue?
15:38:03  * bpmedleyjoined
15:38:13  <joepie91>filipoou_: if you want to basically have a big bucket of "items I need to do something with, but not all at the same time", and dynamically add items to that bucket as you discover new ones, then yes, promise-task-queue will do what you want :)
15:38:55  <joepie91>filipoou_: keep in mind that it doesn't persist though, so queue items are lost if your process exits/crashes
15:39:06  <joepie91>(though persistence is tricky for a scraper due to the high volume of items and the cost of deduplication)
15:40:29  <filipoou_>I see... THanks a lot for your help. I'll try that package.
15:41:37  * noteboxquit (Quit: My Mac Pro has gone to sleep. ZZZzzz…)
15:41:52  * nschoe_quit (Quit: Program. Terminated.)
15:42:09  * k13noxquit (Quit: Leaving...)
15:42:44  * noteboxjoined
15:45:15  * wugyquit (Read error: Connection reset by peer)
15:45:17  * al-damirijoined
15:48:25  * Disgeaequit (Quit: Textual IRC Client: www.textualapp.com)
15:48:53  * chandu20quit (Ping timeout: 258 seconds)
15:49:06  * ianmethystjoined
15:50:01  * roomcayzquit (Quit: roomcayz)
15:50:16  * TinkerTyperjoined
15:51:02  * rhojoined
15:51:03  * rhoquit (Changing host)
15:51:03  * rhojoined
15:51:12  * zivesterjoined
15:52:26  * nolashquit (Ping timeout: 255 seconds)
15:53:13  * nolashjoined
15:54:40  * mmmveggiesjoined
15:54:47  * ShishKababjoined
15:54:47  * chandu20joined
15:54:56  * e14quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:55:41  * alilezajoined
15:57:03  <ShishKabab>Hey guys! I'd like to create a small Open Source project, to have something Node.js based on my Github account. I could think of a million things to create, that probably don't have any practical use. Any suggestion of an itch I could scratch?
15:58:02  * e14joined
15:59:36  * tundebadmusjoined
15:59:58  <tundebadmus>greetings of the day to everyone
16:00:30  <meldron>hi guys, i am trying to allow node to bind to ports 1024 and below, therefore i am using .nvm/versions/node/v6.7.0/bin/node = cap_net_bind_service+ep, but never the less node (redbird) is complaining it cnanot bind to this port. anybody with a solution?
16:00:32  * lmoequit (Quit: My notebook went to ****ing sleep - again..)
16:00:41  * chandu20quit (Ping timeout: 240 seconds)
16:00:46  <meldron>"Error: listen EACCES 0.0.0.0:443"
16:01:36  * AvianFlujoined
16:02:58  * staar2joined
16:02:58  <tundebadmus>#express
16:03:00  * risto_joined
16:03:17  <tundebadmus>#/ join express
16:03:21  <tundebadmus>join express
16:04:26  * milardovichquit
16:04:30  * Dreamer3quit (Quit: Leaving...)
16:05:12  <zsoc>you almost got there ^_^
16:05:25  * chapeauquit (Quit: Going offline, see ya! (www.adiirc.com))
16:05:51  * ShishKababquit (Quit: Konversation terminated!)
16:06:20  * mnutt_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:07:54  <mscdex>meldron: you shouldn't setcap with the node binary, because then *any* script executed by node can listen on lower ports
16:07:59  * alilezaquit (Remote host closed the connection)
16:08:35  * alilezajoined
16:08:46  * tundebadmusquit (Ping timeout: 260 seconds)
16:08:53  * Slartibartjoined
16:09:39  <RLa>meldron, your alternatives are reverse proxy and iproute to redirect port
16:09:49  <RLa>or running as a root
16:09:52  * TinkerTyperquit (Quit: ZNC - http://znc.in)
16:10:35  * TinkerTyperjoined
16:11:02  <mscdex>RLa: meldron: you don't have to run as root the entire time, just run the script as root initially, then as soon as you've started listening on the lower port, use process.setgid()/setuid() to drop privileges
16:11:09  <zsoc>reverse proxy.. use caddy or nginx
16:12:42  * alilezaquit (Ping timeout: 252 seconds)
16:13:02  * smccarthyjoined
16:13:10  * chandu20joined
16:13:14  <mscdex>or reverse your ethernet cable
16:14:21  * rohanrhuquit (Quit: Konversation terminated!)
16:14:54  * a_thakurjoined
16:15:03  <meldron>mscdex: thanks for your concern, on this system there should only be one script running, but overall you are right, i just figured out whats the problem with the setcap approach, the file system was mounted with nosuid
16:17:11  * smccarthyquit (Ping timeout: 240 seconds)
16:17:37  * psychicist__joined
16:19:20  * mrkmgquit (Quit: mrkmg)
16:19:45  * SrPxjoined
16:20:16  <SrPx>Hey, what is the 2017 de facto solution to the callback hell? Is there any way to get a monadic interface out of the usual (err, res) callback standard?
16:21:16  * MINIMAN10000joined
16:21:36  <DeltaHeavy>SrPx ES2015 Promise. You can also use async / await (they're stage-4 now and will be in ES2017 as is).
16:21:37  <boogyman>SrPx: promises
16:21:53  * oxhakjoined
16:21:54  <DeltaHeavy>Some people still prefer libraries like Bluebird rather than native promises.
16:22:14  * rorrojoined
16:23:25  * abijeetjoined
16:24:05  * chandu20quit (Ping timeout: 256 seconds)
16:24:40  * lithiejoined
16:24:47  * lmoejoined
16:24:50  * milardovichjoined
16:24:56  * mscdexquit (Ping timeout: 255 seconds)
16:25:15  * hellomichibyequit (Quit: hellomichibye)
16:25:31  * flaviodesousajoined
16:25:31  * smccarthyjoined
16:25:52  * chandu20joined
16:26:03  * howdoijoined
16:28:37  * kingarmadilloquit (Ping timeout: 240 seconds)
16:28:59  * mnutt_joined
16:29:00  * kingarmadillojoined
16:29:57  <SrPx>How exactly do promises help avoiding the callback hell when you have a sequence of async calls and each onde depends on the value returned by the previous?
16:30:51  * dommelquit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:31:12  * mezodjoined
16:31:34  * abijeetquit (Quit: Leaving)
16:31:42  * Guest69962quit (Read error: Connection reset by peer)
16:32:19  * node9js553joined
16:32:44  * ozettejoined
16:33:29  * dioheadjoined
16:33:38  * donejoined
16:34:02  * donechanged nick to Guest55908
16:34:04  * lmoequit (Quit: My notebook went to ****ing sleep - again..)
16:35:38  * dommeljoined
16:35:41  * SuperHansquit (Remote host closed the connection)
16:36:03  * sankhajoined
16:36:57  * TinkerTyperquit (Quit: ZNC - http://znc.in)
16:37:10  * Slartibartquit (Ping timeout: 258 seconds)
16:37:21  * node9js553quit (Ping timeout: 260 seconds)
16:37:38  * TinkerTyperjoined
16:37:54  * Keanu73joined
16:38:18  * lmdjoined
16:38:22  * rchavikquit (Quit: -)
16:39:00  * MichaelVBquit (Quit: Page closed)
16:39:24  * mscdexjoined
16:40:14  * rakesh1988quit (Ping timeout: 248 seconds)
16:40:29  * lmdquit (Client Quit)
16:40:36  * sankhaquit (Ping timeout: 240 seconds)
16:40:54  * noraatepernosjoined
16:41:07  * mandricjoined
16:41:11  * promethjoined
16:41:39  <prometh>should a URL such as http://domain/path//to/file be normalized to http://domain/path/to/file, or is that assuming too much about the server
16:42:37  * dommelquit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:43:17  * mnutt_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:43:17  * haraiquit (Ping timeout: 255 seconds)
16:43:54  <prometh>new URL("http://domain///../").path gives http://dimain//, so i suppose not
16:43:56  * bigcakequit (Quit: bigcake)
16:44:03  * chandu20quit (Ping timeout: 252 seconds)
16:44:45  <DeltaHeavy>SrPx https://gist.github.com/domenic/3889970
16:44:49  * snowkidindquit (Remote host closed the connection)
16:45:51  * dommeljoined
16:47:01  * dommelquit (Client Quit)
16:47:20  * drehjoined
16:48:33  * jkridnerjoined
16:48:38  <SrPx>DeltaHeavy: awesome, thank you
16:48:59  <DeltaHeavy>No problem!
16:49:10  * dommeljoined
16:49:14  * jkridner_joined
16:49:18  * mezodquit (Remote host closed the connection)
16:49:24  * sunoanojoined
16:49:56  * ademilsonfpjoined
16:50:02  * sgronbloquit (Ping timeout: 255 seconds)
16:51:17  * sunoano1quit (Ping timeout: 260 seconds)
16:51:29  * jkridner|pdquit (Ping timeout: 245 seconds)
16:52:44  * jkridnerquit (Ping timeout: 245 seconds)
16:53:35  * mrkmgjoined
16:53:59  * dommelquit (Client Quit)
16:55:09  * lmdjoined
16:55:11  * dommeljoined
16:55:53  * dioheadquit (Ping timeout: 255 seconds)
16:56:41  * ahmedelgabriquit (Ping timeout: 240 seconds)
16:57:03  * dommelquit (Client Quit)
16:57:44  * smccarthyquit (Remote host closed the connection)
16:58:25  * dommeljoined
16:58:41  * rorroquit (Ping timeout: 240 seconds)
16:59:11  * Fleuvjoined
17:00:00  * lemoinemquit (Ping timeout: 252 seconds)
17:00:17  * lemoinemjoined
17:01:17  * dommelquit (Client Quit)
17:02:11  * ShekharReddyjoined
17:03:59  * rzyzquit (Ping timeout: 245 seconds)
17:05:52  * YoYquit (Ping timeout: 260 seconds)
17:06:41  * YoYjoined
17:06:52  * vali_joined
17:06:55  * ahmedelgabrijoined
17:07:19  * contaquit (Ping timeout: 245 seconds)
17:07:19  * savantgardequit (Remote host closed the connection)
17:07:35  * savantgardejoined
17:08:06  * savantgardequit (Remote host closed the connection)
17:09:09  * ShekharReddyquit
17:09:12  * AlineGomesquit (Quit: Connection closed for inactivity)
17:09:58  * nishu-tryinghardjoined
17:11:05  * mrbubblesjoined
17:11:09  * ahmedelgabriquit (Ping timeout: 248 seconds)
17:11:15  * chandu20joined
17:12:38  * sankhajoined
17:12:39  <alextes>If you guys had a property on a resource that could be set once by users and always by admins. Would you complicate the resource's PATCH and POST route or have a separate sub-route for that?
17:12:55  * savantgardejoined
17:12:56  * savantgardequit (Remote host closed the connection)
17:13:40  <alextes>Maybe a relevant side-question. Do you feel this choice matters at all?
17:14:01  <SrPx>Is it safe to write my libraries to return Bluebird promises, instead of using callbacks? Is there any cons to that?
17:15:00  <alextes>SrPx people that use callbacks will have to wrap your functions with something like nodify.
17:15:10  * madbytesjoined
17:15:14  * amdi_joined
17:15:24  * emilyrosejoined
17:15:41  <alextes>But I think we can pretty confidently say Promises are the preferred method now. Disclaimer: not a lib author.
17:16:31  * jmwriquit
17:18:51  * Masterphijoined
17:19:35  * cocoadaemonquit (Quit: Quitte)
17:20:25  * tunajoined
17:20:45  * joshsynquit (Ping timeout: 256 seconds)
17:21:06  * dommeljoined
17:22:36  * dommelquit (Client Quit)
17:23:08  * foojoined
17:23:26  * YoYquit (Ping timeout: 248 seconds)
17:25:20  * YoYjoined
17:25:28  * joshsynjoined
17:25:50  <foo>Anyone in here built a chatbot for a website with Node.js and microsoft bot framework / ibm watson?
17:26:02  * roomcayzjoined
17:26:06  * EyePulpquit (Remote host closed the connection)
17:26:07  * dommeljoined
17:26:15  * smccarthyjoined
17:26:41  * EyePulpjoined
17:27:37  * Booster2oooquit (Read error: Connection reset by peer)