00:00:30  * nomoney4me2quit (Read error: Connection reset by peer)
00:00:48  * nomoney4me2joined
00:01:22  * rakmquit (Quit: Textual IRC Client: www.textualapp.com)
00:01:23  * MarioBrancojoined
00:01:25  * anuxivmquit (Quit: Leaving.)
00:01:52  * rakmjoined
00:02:01  * rakmpart
00:02:33  * goodenoughquit (Remote host closed the connection)
00:03:13  <joepie91>serapath: what problem is that trying to solve? you really shouldn't be trying to run a daemon twice either way...
00:03:19  <jaawerth>yeah, Objection is more a toolkit for building your own object model, providing a relatively thin layer over the underlying knex connection and a bunch of optional methods and APIs for lifecycle hooks without bringing too many of its own opinions to the table
00:04:13  <jaawerth>so if you're gonna build a model layer anyway...
00:04:33  * markasoftwarequit (Quit: markasoftware)
00:04:38  <jaawerth>might as well use a consistent wrapper for doing so in a predictable way, which IIRC is what Objection.js started as for the devs
00:04:55  * markasoftwarejoined
00:04:55  * smccarthyquit (Remote host closed the connection)
00:05:15  * duderonomyquit (Ping timeout: 272 seconds)
00:05:23  <jaawerth>I don't use it for every project by any means, but on Node I haven't found anything higher-level than knex itself I'd rather use
00:05:29  * smccarthyjoined
00:05:55  * gothicsouthquit (Quit: My iMac has gone to sleep. ZZZzzz…)
00:07:03  <flappynerd>I was not a fan of bookshelf
00:07:07  <flappynerd>haven't bothered to look back
00:07:20  <flappynerd>maybe it's better now, I don't know, but for some reason I doubt it
00:07:44  * munch_quit (Quit: Leaving)
00:08:24  <jaawerth>yeah I wasn't a fan of it either but I think the author told me at one point that there was a rewrite underway for a major version bump? Never checked back on whether that happened though
00:09:27  * smccarthyquit (Ping timeout: 240 seconds)
00:10:30  <prometh>jaawerth: who're you talking to? it reads as though you're having a conversation, but i don't see another person :)
00:12:33  * nomoney4me2quit (Read error: Connection reset by peer)
00:13:25  * segmondquit (Quit: l8r)
00:13:39  * nitricquit (Ping timeout: 255 seconds)
00:13:47  <jaawerth>and that's why I try to avoid ignoring people, lol
00:14:16  * theskillwithinquit (Excess Flood)
00:14:32  * sinclairjoined
00:14:32  * theskillwithinjoined
00:14:34  <flappynerd>ooh, another of my fans perhaps?
00:14:42  * hendryquit (Remote host closed the connection)
00:14:48  * DeltaHeavyquit (Ping timeout: 240 seconds)
00:15:02  <serapath>joepie91: i made a little test script. "server.js":`module.exports = process` and "index.js":`var server = require('./server');process.stdin.on('data', function () { });console.log('index.js', process.pid);console.log('server.js', server.pid);
00:15:58  <serapath>joepie91: the other one replaces in "index.js": s/var server = require('./server')/var server = require('child_process').spawn(process.execPath, ['server.js'])
00:16:44  * orbyt_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:16:50  <joepie91>serapath: I have /no idea/ what you're trying to do here
00:17:16  <serapath>joepie91: when i start it from the command line like this: `node index.js & node index.js` it will log for example: `index.js 26456 \n index.js 26455 \n server.js 26467 \n server.js 26468`
00:17:30  <serapath>i would like that the PID logged for "server.js" stays the same because it re-uses the process
00:17:38  <joepie91>serapath: but what are you trying to /do/
00:17:43  <joepie91>what problem are you trying to solve
00:17:46  <serapath>ok
00:17:50  <joepie91>all of this looks like a really bad idea
00:17:57  * e14joined
00:18:03  <serapath>i want to start a program and it should connect to a process that runs on my system
00:18:17  <serapath>but not spawn another version of the deamon if i start it multiple times
00:18:25  * plutoniixjoined
00:18:36  <serapath>or if my program crashes... and i restart it or something, it should re-connect to the running process defined by "server.js"
00:18:39  <joepie91>serapath: what is the "a program", and what is the "a process"? your description is too generic
00:19:21  <serapath>so i have a local process running that runs an http server where i can browse and see a dashboard about stats
00:19:36  * awesomess3quit (Quit: Leaving)
00:19:48  <serapath>i have other programs which send all kinds of information to that http server... sometimes i stop them or restart them
00:20:09  <serapath>i dont know how to always make them send the data to that server process without spawning mutliple instances when they start
00:20:09  * EyePulpquit (Remote host closed the connection)
00:20:22  <joepie91>serapath: okay, hold on. the first two sentences of that made perfect sense
00:20:32  <joepie91>serapath: but I don't see how the server process comes into the picture when talking about clients
00:20:41  <serapath>no its all on my local system
00:20:43  * EyePulpjoined
00:20:50  <joepie91>yes, that doesn't mean there's not a server and client processes
00:21:14  <joepie91>what system they run on doesn't matter
00:21:20  <serapath>actually the http server is just running because i want to be able to browse there
00:21:29  <serapath>otherwise that server also logs stuff
00:21:34  <joepie91>serapath: but the other programs send data to that server, no?
00:21:38  <serapath>yes
00:21:43  <serapath>just .. i dont know how
00:21:53  <serapath>i would like to pipe the data to that server
00:21:58  <joepie91>serapath: okay. so you have the thing that collects the data and lets you browse it (the server), and the applications that send data to it (the clients)
00:22:00  <joepie91>correct?
00:22:13  <serapath>i mean - thats the goal :P
00:22:19  <serapath>thats why i am here
00:22:25  <timetocode>give 'em ports..?
00:22:36  <serapath>i dont want to deal with ports
00:22:38  <joepie91>serapath: right. so... you're trying to modify the server's behaviour, but you're describing a problem with client restarts. how do the two relate?
00:22:45  <timetocode>are these forks
00:22:51  <serapath>so in the beginning nothing is running
00:22:51  <joepie91>because the point of a client/server architecture is that the clients are separate things
00:23:13  <serapath>then i start the first program or tool... which should either spawn the server or require the server and send data to it
00:23:14  <serapath>that works
00:23:24  <serapath>...now if my first program crashes... and i start it again or i restart it
00:23:26  <joepie91>ahhhhh.
00:23:31  <serapath>it should connect to the same server
00:23:34  <serapath>if i start another program
00:23:35  <joepie91>serapath: okay, so the missing link here is "the client starts the server"
00:23:40  <serapath>it should also connect to that server
00:23:45  <serapath>oh... yes
00:23:46  <serapath>:-)
00:23:52  <serapath>but not if the server is already running
00:23:53  <joepie91>serapath: that was kind of a critical bit of info :P
00:23:53  <serapath>:D
00:23:59  <serapath>oh fuck... sry ;-)
00:24:10  <joepie91>serapath: anyhow, is there any particular reason you want to make the client responsible for starting the server? as opposed to expecting the user/system to start the server by itself
00:24:33  <joepie91>("client starts the server" setups tend to introduce a lot of complexity, especially in terms of versioning)
00:24:53  <serapath>hmm... i am not sure. basically the case you mention would be the case if the server is already running.. so a client re-start or starting a second client would have the server already running
00:25:03  <joepie91>serapath: right
00:25:03  <serapath>if i can solve that without the client starting the server for the first time - i guess that would be good too
00:25:17  <joepie91>serapath: if you *can* avoid the "client starts the server" thing, then I would recommend doing so
00:25:31  <serapath>ok.
00:25:35  <serapath>how do i approach it then?
00:25:38  <joepie91>for the tiny possible usability benefit it provides it's probably not worth the complexity and edgecases
00:25:51  <joepie91>serapath: well, depends. what kind of stats collecting thiing is this?
00:26:17  <serapath>hm, usually json, but it's not necessary that it would always be json... maybe just buffers
00:26:31  <jaawerth>there are preexisting tools for this, ranging from big ones like pm2 to little modules like "daemon" - if you wanna do it by hand you could take a gander at the latter's code https://github.com/indexzero/daemon.node/blob/master/index.js
00:26:40  <serapath>and what the content of that json is depends a bit on the different clients
00:26:46  <jaawerth>one might also consider registering stuff on your system, like systmd or whatever
00:26:49  <serapath>oh pm2 is big
00:26:50  <joepie91>serapath: right, but what is the data? what does it represent?
00:27:12  <jaawerth>pm2 is crammed with features, many of which one doesn't necessarily need, hehe
00:27:15  <serapath>i would like to have something super small - ideally just native node stuff ...like child_process.spawn or pipe to stdin/stdout etc...
00:27:18  * Siegfriedquit (Quit: Textual IRC Client: www.textualapp.com)
00:27:39  <jaawerth>if you look at the daemonize code, it's only like 60 lines of code
00:27:55  <serapath>it is usually some stats about the client and then sending some kind of measurements
00:28:22  * re1quit (Read error: Connection reset by peer)
00:28:39  <serapath>the clients act like "sensors" that measure things... could be room temperature
00:28:53  <serapath>and then regularly sends that to the server process
00:29:40  <serapath>joepie91: oh wow, that code looks interesting - thx
00:29:41  <serapath>:-)
00:29:48  * roomcayzquit (Quit: roomcayz)
00:30:34  * stamp711quit (Quit: ZNC 1.6.5 - http://znc.in)
00:30:37  * plutoniixquit (Quit: Leaving)
00:30:40  <joepie91>serapath: you probably meant jaawerth :P
00:30:50  <serapath>oops
00:30:56  <serapath>jaawerth: thx :-)
00:30:57  <joepie91>serapath: anyhow, yeah, I'd say "just make it a system service" - if you're running systemd, use that
00:31:02  <joepie91>the server, that is
00:31:07  <joepie91>and just write the clients to expect that the server already exists
00:31:15  <joepie91>then you can communicate to the server over TCP, unix sockets, whatever
00:31:25  <joepie91>HTTP if you want to make it simple
00:31:36  <serapath>i would like to have some kind of npm installable cross platform "autostart" tool. bookmarked a few, but for now i'm not after automating the autostart on system startup
00:31:54  <prometh>jaawerth: i dont' have any ignored people, apparently
00:32:22  * mcollinajoined
00:32:24  * EyePulpquit (Remote host closed the connection)
00:32:34  <serapath>joepie91: i would love to just `require('./server')` and that returns an instance to the server or a connection
00:32:36  * EyePulpjoined
00:32:39  * hosifiedquit (Read error: Connection reset by peer)
00:32:42  <serapath>joepie91: just so that i dont need to bother
00:33:17  <serapath>so the code how to make sure that the same running server instance "singleton?" is returned would be an implementation detail
00:33:46  * bradfordli123joined
00:35:08  <joepie91>serapath: that makes no sense, though
00:35:14  <serapath>joepie91: why?
00:35:17  <joepie91>serapath: and is definitely trying to use the wrong tool for the job
00:35:27  <joepie91>serapath: because require() is for loading code, not for interacting with different processes or storing data
00:35:44  <joepie91>serapath: it doesn't make any more sense than "I'd like a way to make a HTTP request by creating an object literal"
00:35:52  <joepie91>it's just completely not meant to be used for that
00:35:59  * chippingquit (Ping timeout: 246 seconds)
00:36:03  <serapath>joepie91: one other use case would be to require a database that run's in its own process and i want to re-use the same database
00:36:07  <joepie91>and trying to use it for that purpose anyway is just going to make things *more* complex, not less, and add a massive trap in the process
00:36:12  <joepie91>as in, a reader of the code will be massively confused
00:36:27  <joepie91>serapath: you can't share things between processes like that, and again, require() isn't for managing connections
00:36:39  <joepie91>these kind of hacks are completely unnecessary, it's not difficult to do IPC :P
00:36:56  <serapath>joepie91: i find it difficult actually
00:36:57  * mcollinaquit (Ping timeout: 240 seconds)
00:37:16  <joepie91>serapath: then you might be approaching it wrong... what issues did you run into?
00:37:39  <serapath>joepie91: no specific issues, but i find it simple to have a module return a stream and then just pipe to it or create another instance and pipe to it
00:38:01  * phutchins1quit (Ping timeout: 240 seconds)
00:38:03  <joepie91>serapath: that's not simple in the slightest, you're adding a crapload of complexity and points of failure
00:38:10  <joepie91>serapath: it may be *familiar*, but it is definitely not *simple*
00:38:13  * g1itchjoined
00:38:17  <serapath>joepie91: require gives me usually some kind of "factory function" ...sometimes a module makes instances and sometimes it returns some kind of singleton functionality
00:38:21  <joepie91>serapath: and it's not wise to use your comfort zone to delimit what features you will use
00:38:40  <g1itch>Does Promise.all handle all of the passed in function asyncronously or not?
00:38:40  <joepie91>serapath: if a module returns "some kind of singleton functionality", it's broken
00:38:42  <serapath>joepie91: but for some reason they have to run in the same process - which i find boring, because it's pretty cool and easy to interact with them after require
00:38:46  <joepie91>it absolutely should not do that ever
00:38:54  <serapath>child_process and spawning and all that stuff is complicated
00:38:59  <joepie91>serapath: that's because you don't have the correct of what require() is for...
00:39:06  <joepie91>serapath: why would you need to spawn any processes?
00:39:15  * chippingjoined
00:39:17  <joepie91>g1itch: Promise.all takes in Promises, not functions
00:39:33  <g1itch>sorry, that's what i meant
00:39:34  <joepie91>g1itch: and it doesn't "handle" anything, it just tracks the Promises you pass in, and resolve with an array of their resolve values once they have all resolved
00:39:50  <g1itch>duh, right sorry - i was thinking abou it the wrong way
00:39:58  <joepie91>g1itch: a Promise is not a task; if you have a Promise, that means the operation it represents is *already* occurring :)
00:40:07  <serapath>joepie91: ok then maybe it's always a "factory function" but sometimes i create only a single instance and re-use it everywhere
00:40:12  * al-damiriquit (Quit: Connection closed for inactivity)
00:40:30  <joepie91>serapath: okay? but this has nothing to do with IPC. I feel like you're so stuck in "I want to do it in this specific way" that you're not really making an effort to understand what I'm trying to explain to you
00:40:39  <serapath>joepie91: but if that instance would run in it's own process - especially because i stream to it or from it - or i provide it callbacks ...why the fuck wouldnt it run in parallel?
00:40:47  * jtthedevquit (Ping timeout: 268 seconds)
00:40:54  <joepie91>serapath: you're conflating a *lot* of different, totally unrelated things
00:41:06  * brent__quit (Remote host closed the connection)
00:41:36  <joepie91>serapath: really, just take a step back for a moment, and work on understanding 1) what require is for and what it does, and 2) how to do IPC *properly*
00:41:56  * e14quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:42:03  <joepie91>because you seem to be making a lot of incorrect assumptions and it's very difficult for me to understand what you're trying to say, and even more difficult to formulate a response to it
00:42:09  * g1itchpart ("WeeChat 1.7.1")
00:43:21  * e14joined
00:43:48  <serapath>joepie91: i dont know what to say
00:44:05  <joepie91>serapath: well, start with point 1 :)
00:44:06  <serapath>joepie91: what you say to me sounds a lot like dogma
00:44:17  <serapath>joepie91: i'm not getting the "why" part
00:44:26  <joepie91>serapath: no, I'm just trying to clear a few things up, and get back to a point where things make sense from a technical perspective
00:44:45  <joepie91>serapath: the "why" part of what, exactly?
00:45:15  <serapath>serapath: running things in parallel when it can and making it easy would be cool. ..and that's actually the case a lot of times since i'm using streams and/or callbacks everywhere
00:45:41  <joepie91>serapath: what does this have to do with IPC or servers/clients?
00:45:43  * cotkoquit (Ping timeout: 260 seconds)
00:47:13  <serapath>why would i have IPC? or server/clients? ...this sounds like boilerplate to me. All i want is to "require" something and make it do something... if it can do that in parallel - thats great. it should do it. ... and if it's a temperature sensor on my computer... i'd like to just "require" it and tell me the temperature
00:47:37  <serapath>and if it's a webcam or microphone, i just want to access the data it gives me
00:47:46  <prometh>is any of this a bad idea?: `const showExtras = !process.env.CI && !process.env.CONTINUOUS_INTEGRATION && process.stderr.isTTY && process.stdout.isTTY;`
00:47:59  <joepie91>serapath: look, if you insist on "I want require to do everything", then there is absolutely no way I can help you with any of this, because you're not really interested in hearing anything other than how to implement precisely what you have in mind, even if it's based on a complete misunderstanding of the tools you're using
00:48:00  <serapath>why wouldnt there be some kind of program i can require and every tool that i start that wants to use it gets access to the same process
00:48:24  <serapath>joepie91: why is require not good for this? i dont understand
00:48:46  <serapath>joepie91: i imagine there could be a module require("temperature-sensor")
00:48:47  * TheFuzzballquit (Quit: Computer has gone to sleep.)
00:48:51  <joepie91>serapath: what you want is a bad idea, to a degree not technically possible, and there is absolutely zero benefit in doing it. you need to either accept that and work on understanding how to do it properly, or keep trying to do the same thing and find people giving up on helping you
00:49:12  <serapath>why is it a bad idea?
00:49:12  * markasoftwarequit (Read error: Connection reset by peer)
00:49:15  <joepie91>serapath: the question isn't "why is require not good for this", the question is "what is require for"
00:49:22  * LeBlaaancquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:49:27  <joepie91>serapath: right now you do not seem to have a clear grasp of what it does or what it's for, at all
00:49:28  <serapath>joepie91: ok. what is require for?
00:49:31  * markasoftwarejoined
00:49:36  * markasoftwarequit (Remote host closed the connection)
00:49:51  <prometh>serapath: `module.exports = new Instance()`
00:50:11  <serapath>prometh: dont see what the problem is
00:50:24  <joepie91>serapath: require() is a function for loading modules - that is, .js files on disk that specify a module.exports - and returning the exported contents. those exported contents should be stateless code of some sort; typically a function or an object with a few functions.
00:50:26  * Axyquit (Read error: Connection reset by peer)
00:50:33  <joepie91>serapath: that is the one and only thing that require() is for, everything else is out of scope.
00:50:47  <serapath>joepie91: where do you get that information that it should be "stateless code"?
00:51:13  <joepie91>serapath: from an understanding of how require works, how it was designed, and why it exists.
00:51:16  <prometh>you can export an instance even with ES2015 modules
00:51:18  <joepie91>it's a module loading system.
00:51:20  <joepie91>that's it.
00:51:24  <joepie91>nothing more, nothing less.
00:51:35  <prometh>i'd say that exporting an instance is a form of injection
00:51:56  * goodenoughjoined
00:52:00  <prometh>it can create issues, though
00:52:02  <joepie91>serapath: Node.js includes a caching mechanism for modules, but this cache exists for the purpose of performance optimization, not for retaining state, and there is no guarantee that any given implementation implements that cache.
00:52:15  <serapath>joepie91: if i have a process, that will not create state and no matter how often you spawn it or try to spawn it, it always gets the same hardcoded process id ..or system specific same process id ... and it acts like a pure function when you interact with it
00:52:16  <prometh>const {method} = require('instance');
00:52:20  <joepie91>serapath: therefore, the only logical thing for it to contain, given those constraints and that design goal, is stateless code.
00:52:23  <prometh>`method()` can then fail
00:52:24  <serapath>joepie91: wouldnt that be kind of somethig stateless?
00:52:40  <joepie91>serapath: no. again, you're trying to shoehorn everything into the things you're familiar with despite being totally out of scope.
00:52:50  <joepie91>serapath: this is not constructive and I am not going to continue trying to help if you keep doing this.
00:53:30  <prometh>joepie91: he's just defending his idea.. it doesnt' mean he intends to win
00:53:49  <joepie91>serapath: the module can *export* a function that does what you described, but the module *itself*, upon loading, should do nothing of the sort.
00:54:08  <joepie91>serapath: and even then, the only reason require() is involved, is because you've split that function out to a separate module.
00:54:12  <serapath>prometh: yes. i actually dont care. i can also do it differently - but i dont understand why its a bad idea. like what kind of problems would it cause - i dont really get it
00:54:23  <joepie91>you might just as well define that function in the same module as where you're using it, and not use require() at all.
00:54:36  * phajiquit (Ping timeout: 255 seconds)
00:54:41  <prometh>i think that it's a little too unexpectedly automatic and non-reusable to have auto-running code
00:54:46  <joepie91>serapath: do you understand the purpose of require?
00:54:55  <prometh>polyfills can do it because they're shimming something that was missing
00:54:56  * apparitionjoined
00:55:06  <serapath>joepie91: for example - leveldb is actually doing it... when i require leveldb in multiple processes, it gives me access to the same single database given the right plugins
00:55:23  <prometh>serapath: and if you wanted another db ?
00:55:37  <serapath>joepie91: it's super handy actually. so i can have a multi-process app that runs on the same system and shares a database or something... feels like that would make multi-process-clusters super easy
00:55:50  <serapath>currently - just thinking about how to orchestrate IPC communication makes my head hurt
00:55:50  <joepie91>serapath: this is 100% unrelated to what I just described.
00:55:59  <joepie91>serapath: I'm purely talking about require() right now, and its purpose.
00:56:08  <joepie91>do you understand what require is for?
00:56:17  <serapath>prometh: if i wanted another db, i would use a module that allows me that
00:56:18  <prometh>a module should be reusable
00:56:27  <serapath>joepie91: i always thought i understand require - but maybe not
00:56:41  <prometh>a module is a node in a graph.. the controller node should wire things up
00:56:48  <joepie91>serapath: okay, but I've just explained it. so is that explanation clear, or do you still have unanswered questions about it?
00:57:05  * joyeejoined
00:57:05  <serapath>joepie91: i understand, that require will load modules and the version specified in the package.json ...cache it ...and it usually should export functions to create one or more instances
00:57:11  <prometh>require('a'); require('b'); // wtf does this do?
00:57:24  * GonzaloGM_joined
00:57:26  <joepie91>serapath: no, require does not interact with the versions in package.json in any way
00:57:41  * JBreitjoined
00:57:45  <joepie91>serapath: it *just* looks at the filesystem, and extracts the entry point (index.js) from the package.json of a dependency, if it exists
00:57:55  <joepie91>serapath: the only thing that looks at the versions in package.json is NPM
00:58:07  <joepie91>Node just expects you to have already installed all the dependencies when require()ing stuff
00:58:10  <joepie91>through NPM or otherwise
00:58:22  <serapath>joepie91: yes - but require and package.json and npm kind of work hand in hand... so require will load the version specific to a module in the dependency tree, no?
00:58:34  <joepie91>serapath: no, they don't work hand in hand, they are *completely* separate
00:58:34  <prometh>no
00:58:37  <prometh>it looks for a node_modules/
00:58:52  <prometh>and checks parent dirs for node_modules/
00:59:00  <serapath>joepie91: so there could be twice `require('abc')` in different modules in the dependency tree and it would load different versions if their package.json specified that
00:59:01  <joepie91>serapath: NPM installs dependencies in a nested manner, that is why you get the intended version of a module. Node has absolutely no awareness of 'dependency versions' whatsoever
00:59:08  <joepie91>serapath: no, that is path-based.
00:59:13  * TheFuzzballjoined
00:59:13  <joepie91>and again, unrelated to package.json
00:59:26  <joepie91>serapath: you should probably have a read through https://nodejs.org/api/modules.html
00:59:38  <serapath>joepie91: i dont care so much about implementation detail but in what it results
00:59:40  <prometh>npm uses package.json to put modules into the correct dirs.. sometimes nested node_modules/ due to conflicting versions
00:59:52  <joepie91>serapath: you should understand require's behaviour, and right now your understanding is incorrect
01:00:08  <prometh>serapath: if you understood require more, you'd have less confusion in your decisions
01:00:41  <serapath>prometh: joepie91: so `npm` uses `package.json` of each `module` to make the `node_modules` structure so, that the `require` function will load for each dependency that uses `require('abc')` the version of abc specified in the package.json
01:00:51  <serapath>prometh: joepie91: isnt that true?
01:01:01  * joyeequit (Ping timeout: 240 seconds)
01:01:06  <prometh>serapath: for each node_modules package
01:01:10  <prometh>not for your project
01:01:16  <serapath>yes
01:01:19  <serapath>thats what i said
01:01:19  * JBreitquit (Client Quit)
01:01:20  * GonzaloGMquit (Ping timeout: 260 seconds)
01:01:22  <prometh>node will look at node_modules/module
01:01:40  * sibaquit (Quit: My Mac has gone to sleep. ZZZzzz…)
01:01:46  <prometh>if it's in node_modules/moduleA/node_modules/moduleB, your project won't find it
01:01:49  <joepie91>serapath: yes, but in a "gentleman's agreement" way - Node.js relies on "something else" having installed the dependencies in such a structure that the right one gets loaded according to its search pattern
01:01:55  <joepie91>serapath: NPM is that "something else"
01:02:11  <joepie91>serapath: but there is no explicit coordination between the two; they just implement their half of the module setup process using the same conventions
01:02:19  <joepie91>and so NPM puts stuff where Node expects it
01:02:19  <prometh>this is where npm dedupes and flattens node_modules/
01:02:56  <serapath>but ... a single module in a given version - lets give it a specific name, like `require('foobar')` ...could spawn a local process and have logic in it, so that it makes sure its a singleton process and every program on that system that has access to that process will get that process instance if it requires "foobar"
01:03:07  <serapath>i dont understand why there can't be such a module
01:03:16  <prometh>serapath: yes, but that's a global, and globals are bad
01:03:19  <serapath>some modules are browser components, some are command line tools, some are electron apps
01:03:29  <joepie91>"and every program on that system that has access to that process will get that process instance if it requires "foobar""
01:03:30  <serapath>why wouldnt there be a module that behaves like that
01:03:32  <joepie91>no, it won't
01:03:40  <joepie91>the module cache is on a per-process basis
01:04:07  * degvajoined
01:04:08  <joepie91>and it makes absolutely *no sense* to try and represent this as a module
01:04:16  <joepie91>you're trying to use modules as functions
01:04:30  <joepie91>this is semantically wrong and has unnecessary edge cases
01:04:35  <serapath>joepie91: i agree - but i dont care if its a gentlemans agreement or not. i like that it works like this, but i usually dont think about those details because the result is the same anyway - whether its a "gentlemans agreement" or somehow otherwise hacked together
01:04:54  <prometh>serapath: you'll only learn in time of your mistake
01:05:08  <serapath>prometh: yes - usually globals are bad - but not always. for example in many apps, state is managed as a single global object
01:05:09  <prometh>unless you're strapped for time, it's best to learn how you're wrong today
01:05:26  <joepie91>serapath: global state is always bad.
01:05:29  <serapath>prometh: what's wrong with a global state object? or a database?
01:05:31  <joepie91>yes, also for application state.
01:05:46  <prometh>your state should be an object that you pass around
01:05:48  <serapath>joepie91: isn't that what for example "redux" is doing and many other systems too?
01:05:49  <joepie91>a lot of people just conveniently ignore this, but that doesn't make it any less bad.
01:05:49  * schmityquit (Quit: leaving ^_~)
01:05:53  <joepie91>serapath: yes, and it's bad.
01:06:02  <joepie91>(redux doesn't *require* global state, btw)
01:06:09  <joepie91>(it's just that everybody uses it that way)
01:06:11  * smccarthyjoined
01:06:13  <serapath>joepie91: at least some ppl consider it to not be so bad, because it's actualyly quite wide-spread and popular
01:06:27  <joepie91>serapath: "some people consider it to not be so bad" isn't really a useful datapoint
01:06:29  <prometh>serapath: so are many otehr practices that are slowly being undone
01:06:33  <joepie91>you have no idea how competent or knowledgeable "some people" are
01:06:38  <serapath>joepie91: then why is it bad?
01:06:41  <joepie91>the only thing that counts here is technical arguments
01:07:13  * m31271njoined
01:07:13  <serapath>joepie91: which frontend framework or non-frameworky-thing is doing it different?
01:07:14  * joyeejoined
01:07:19  <joepie91>serapath: because it produces implicit dependencies, which results in code that is hard to track and debug - and you can't 'segment off' different parts of the application or different instances/invocations of a piece of code, because it all shares state
01:07:23  <joepie91>serapath: globals are a maintainability nightmare
01:07:43  <joepie91>serapath: React and Riot, to name two
01:07:51  <joepie91>plenty more
01:07:59  <joepie91>virtually none of them *require* global state
01:08:11  * TheFuzzballquit (Ping timeout: 255 seconds)
01:08:11  * ooiujoined
01:08:11  <prometh>globalState.statisticEntry = 123; // what is this for??
01:08:22  <serapath>joepie91: i find non-global-state to be a maintainability nightmare - even though i find it useful to restrict access to that global state a bit (so to maybe have something like "cursors") ...but somehow the state is still all stored in one place and not in many places
01:08:44  <joepie91>serapath: global state and centralized state are two *completely* different things
01:08:47  <prometh>store the state of an object in the object itself
01:09:00  <joepie91>serapath: non-global state is easier to maintain than global state in 100% of cases
01:09:03  <joepie91>centralization is a separate matter
01:09:28  * KaeruCTjoined
01:09:28  * duderonomyjoined
01:09:57  <serapath>what do processes have to do with state?
01:10:27  * smccarthyquit (Ping timeout: 240 seconds)
01:10:32  <joepie91>what?
01:11:12  <timetocode>server exposes api on some port, clients connect to server and use api, gg no re
01:12:39  <jaawerth>well, react and riot mostly solve the problem by refusing to address it, lol
01:12:51  <prometh>joepie91: what would a stderr/stdout progress bar be called? some kind of text effect ?
01:13:01  <joepie91>prometh: ascii progress bar you mean?
01:13:05  <prometh>joepie91: yes
01:13:10  <joepie91>or well, unicode progress bar :)
01:13:13  * frjoined
01:13:14  <prometh>yes
01:13:24  <joepie91>prometh: if you need search terms for a module, "terminal progress bar" will probably get you the best results
01:13:25  <prometh>i have this:
01:13:26  <prometh>const showExtras = !process.env.CI && !process.env.CONTINUOUS_INTEGRATION && process.stderr.isTTY && process.stdout.isTTY;
01:13:26  <jaawerth>at least in react's case, it mostly just avoids the responsibility of dealing with state and leaves it up as an exercise for the implementer, hence redux at al
01:13:30  <joepie91>oh
01:13:35  <prometh>not sure what to call it
01:13:35  <joepie91>prometh: you want an option name to enable it?
01:13:37  <jaawerth>et al*
01:13:50  <serapath>joepie91: you talk about "global state" but i was talking about "indempotent process" or something like that which i want to require
01:13:56  <prometh>joepie91: if i were to publish it as a package... it seems to be a common requirement
01:14:24  <joepie91>serapath: ?? you asked me why global state is bad, I explained why
01:15:03  <serapath>joepie91: ok sry - which i asked because it became relevant - but i dont understand how that is actually connected to the goodness/badness of requiring a process
01:15:11  <serapath>joepie91: or sry
01:15:23  <serapath>joepie91: requiring a module that can give access indempotently to the same process
01:15:42  <joepie91>serapath: you can't "require a process", that's my whole point. you can only require a *module*, which should export a function that does a thing, not immediately do the thing upon loading and export the result (which, aside from async gotchas, would cause global state)
01:15:44  <serapath>joepie91: no matter how often it is required from one or many different processes... the module will always create and then later return the same process
01:15:45  <charmander>singletons are bad.
01:15:59  <charmander>make the module export a function to get an instance of the process
01:16:06  <serapath>joepie91: i dont want to require a process... i want to require a module which gives me access to always the same process (and starts it if necessary)
01:16:08  <charmander>pass the process around to wherever it’s needed
01:16:08  * fr_quit (Ping timeout: 240 seconds)
01:16:13  <jaawerth>serapath: did you see that daemonize lib I linked? it just uses child_process, and the code is quite short. You could use it yourself or adapt the concept to your purposes
01:16:28  <charmander>(“get an instance” here means “start”)
01:16:30  <joepie91>serapath: also, I still question the need to "return the same process", and you haven't really addressed the IPC point at all yet
01:16:56  <prometh>serapath: returning a singleton results in global state, which is a misuse of a module loader
01:16:59  <joepie91>serapath: and really, you're being unnecessarily difficult about all this. this would have been a 10 minute problem to solve if you'd not constantly try to go back to "but what if I did X"
01:17:01  <jaawerth>if you want a pid file to keep things consistent, you could create a wrapper that creates a pid file in /var/run or a .tmp dir or wherever
01:17:12  * bpmedleyjoined
01:17:14  <joepie91>serapath: we've now been going on about it for an hour
01:17:36  <prometh>serapath: returning a singleton results in global state, which aside from being a practice you should avoid is also a misuse of a module loader
01:17:41  <jaawerth>presumably by "return the same process" they just mean "not spawn another one regardless of how many times you run the related script"
01:17:43  <serapath>jaawerth: i would use a pid file , but i dont understand how i can use a pidfile to reconnect to a processes stdin/stdout when i restart
01:18:02  <joepie91>jaawerth: yeah, but they're trying to implement what I suspect is a very gimped and unreliable way to do IPC
01:18:06  <joepie91>jaawerth: if IPC is what they need at all
01:18:34  <prometh>serapath: what's wrong with this?: `require('a').then( require('b') ).then(() => done)`
01:18:48  <serapath>jaawerth: yes i saw the daemonize lib. i will play with it. not completely sure if it solves what i try but maybe it can help. ...can i avoid that the module spins up multiple deamons if i use it in a program and start it twice `node index.js & node index.js` ?
01:18:48  <prometh>err, sorry
01:18:49  <joepie91>at this point I honestly don't see how this is going to end in anything other than a big pile of layered hacks
01:18:56  <prometh>serapath: what's wrong with this?: `require('a')().then( require('b')() ).then(() => done)`
01:18:57  * KermitoniTjoined
01:18:58  <joepie91>for a relatively trivial task
01:19:07  <serapath>prometh: i'm not sure how that addresses multiple processes
01:19:15  * jtthedevjoined
01:19:28  <prometh>serapath: multiple node proecesses?
01:19:33  <serapath>prometh: yes
01:19:34  <prometh>serapath: cached modules won't even do that for you
01:20:00  * ed209quit (Remote host closed the connection)
01:20:07  * ed209joined
01:20:17  <serapath>prometh: no i dont want a "require" call to return me a process, but a module, that has exports a function which - upon calling it - either spawns a process or returns some kind of api object that lets me communicate with the already running process
01:20:30  <prometh>cluster?
01:20:46  <joepie91>prometh: it's my understanding that this concerns separate clients
01:20:52  <serapath>prometh: the module will somehow check and figure out if the service it is otherwise spawning is already running and then returns - ideally - a duplex stream so i can communicate
01:21:01  <joepie91>ie. not multiple processes that do the same thing
01:21:05  <serapath>prometh: ideally that duplex stream is actually connected to that processes stdin and stdout
01:21:15  * GanzAnderequit (Read error: Connection reset by peer)
01:21:24  <prometh>why do you need multiple node processes? does libuv not handle threads well enough for you?
01:21:43  <joepie91>serapath: okay, so, very simply put: data collection process that exposes a HTTP server on localhost, data-reporting clients that make HTTP requests to the server. what is insufficient about this?
01:21:58  <serapath>prometh: because those processes should actually be daemons
01:22:29  <prometh>i haven't looked into running node as a daemon, but why do you need multiple?
01:23:16  <serapath>joepie91: i would like to avoid http because it's not meant to be publicly accessible or maybe not even open any ports... which i can lock down but i dont need it. it also seems to me that http servers are bad in duplex streaming - and i could of course add on top some kind of web socket ... or i use something else like tcpi or so
01:23:35  <serapath>joepie91: but if every process anyway already has stdin and stdout which are node streams - why bother with all that overhead?
01:23:40  <joepie91>serapath: "publicly accessible" is in no way a requirement for HTTP
01:23:48  <joepie91>serapath: you're optimizing for the wrong thing.
01:23:59  <joepie91>performance/overhead comes in the very last place of things you should be worrying about
01:24:08  <joepie91>write readable and maintainable code first, you can always optimize the hot paths later.
01:24:12  * e14quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:24:17  <jaawerth>serapath: well if you need stdio to be detatchable, you'll need to point those streams somewhere that something else can connect to it... usually one just pipes stdout to a log somewhere.. if you want both for full IPC, you'd looking at sockets
01:24:29  <joepie91>serapath: if you actually *need* bidirectional data, sure, a TCP socket works too, or websockets, which gives you free framing
01:24:39  * karmahackerquit (Remote host closed the connection)
01:24:40  <jaawerth>serapath: so either a full-blown net server or you could use unix sockets
01:24:41  <joepie91>serapath: both websockets and HTTP are utterly trivial to implement
01:24:46  <joepie91>TCP, slightly harder
01:24:50  <joepie91>(custom protocol that is)
01:24:57  <joepie91>idem for unix domain sockets, slightly harder to get them to work right
01:25:00  * m31271nquit (Remote host closed the connection)
01:25:06  <jaawerth>(which you also do with net)
01:25:12  * m31271njoined
01:25:23  <prometh>i would never write something for unix sockets... i like cross-platform support... fuckin' winsock
01:25:24  <jaawerth>but yeah using unix sockets and TCP manually is a bit more granular
01:25:37  <joepie91>and more work / easier to get wrong :P
01:25:53  <joepie91>although an NDJSON stream would probably be relatively easy to get right
01:25:55  * Fishrock123quit (Remote host closed the connection)
01:26:06  * stevenbennerquit (Quit: Leaving)
01:26:22  <jaawerth>more fun though! 😜
01:26:35  <jaawerth>yeah I'd probably do ndjson, now that you mention it
01:26:41  <prometh>unnecessary work isn't fun for me
01:26:54  <jaawerth>haha I just like unix sockets
01:26:56  <prometh>i don't make a good scientist
01:27:02  <serapath>jaawerth: so when i spawn a process i can connect to stdin/stdout/stderr but if a process is already running that is impossible you say?
01:27:06  <joepie91>downside's that NDJSON is terrible for binary
01:27:30  <jaawerth>serapath: you just have to make sure stdin/stdout/stderr are pointed somewhere such that anything can interact with it
01:27:33  * GonzaloGM__joined
01:27:37  <prometh>i'm very utilitarian -- i like making things work adn work well.... i get no joy in exploration
01:28:44  <prometh>oh, and i like cool-looking pointless things
01:28:49  * SomeKittensjoined
01:29:08  <jaawerth>there might be a way to reattach by pid but I think this will depend more on system utils
01:29:37  <serapath>jaawerth: what do you mean with "pointing somewhere"? if i have for example a "pid file", could i use that to connect to a processes stdin/stdout/stderr ?
01:29:52  <prometh>joepie91: you didn't answer my earlier question
01:30:13  <prometh>joepie91: there's also npmjs.com/bson
01:30:17  <joepie91>prometh: ?
01:30:31  <serapath>jaawerth: because spawning a process and communicating with it via node streams stdin/stdout/stderr seems super trivial
01:30:37  <serapath>jaawerth: creating a pid file is easy too
01:30:39  <prometh>my question regarding ascii/unicode/etc terminal effects
01:30:45  <prometh>waht're they called?
01:31:02  <joepie91>oh
01:31:11  <joepie91>prometh: https://en.wikipedia.org/wiki/Semigraphics
01:31:14  <serapath>jaawerth: it seems to get hard once i restart a process ...i dont know how to re-connect to that process even though i have it's pid and it has stdin/stdout/stderr ...now all of a sudden i need lots of extra stuff :/
01:31:14  <joepie91>it just occurred to me
01:31:16  <joepie91>heh
01:31:20  * GonzaloGM_quit (Ping timeout: 268 seconds)
01:31:53  <deltab>ooh, thanks
01:31:54  <prometh>joepie91: nice
01:33:04  <jaawerth>serapath: once the daemon itself is spawned, it's alive. it could then create a TCP server or a file-based unix socket or something to/from which the child process' stdio is redirected
01:33:07  * mcollinajoined
01:33:19  <prometh>joepie91: when they're animated, what might they be called?
01:33:44  <prometh>joepie91: i'm thinking of publishing a package that defines whether the environment is safe to run such
01:33:45  <ljharb>Kamuela: awesome :-)
01:33:50  <joepie91>prometh: animated semigraphics? :)
01:33:56  <prometh>:) yeah
01:33:56  <modernpacifist>You could always just redirect stdout/stderr etc to a socket/port on the long-lived process, a la https://gist.github.com/benbuckman/2758563
01:34:02  <prometh>supports-semigraphics ?
01:34:07  <prometh>supports-animated-semigraphics ?
01:34:09  <joepie91>prometh: there's already a package for determining unicode support
01:34:11  <serapath>jaawerth: yes sure - it could use tcp or a unix socket or a http/websocket or probably half a dozen other ways and then i have to think about how to orchestrate many processes
01:34:13  <joepie91>prometh: not sure what else you want to check for?
01:34:23  <jaawerth>serapath: yeah, or use a tool
01:34:25  <prometh>joepie91: unicode is not manipulating stderr/etc
01:34:26  <joepie91>(btw, terminal feature detection is surprisingly difficult to get right)
01:34:29  <serapath>jaawerth: like what is there 'pid' and what's the 'port' and so on
01:34:36  * milardovichquit (Remote host closed the connection)
01:34:36  <serapath>jaawerth: or i use a opinionated library
01:34:38  <prometh>joepie91: hence why such should be centralized to a lib
01:34:54  <prometh>joepie91: libs like npmjs.com/gauge do basic checks... which should be abstracted
01:34:58  <jaawerth>yeah, your options are pretty much handle it yourself or use a library
01:35:02  <serapath>jaawerth: but why isnt there a more straight forward minimal way that works with just node core and no extra libs?
01:35:06  * milardovichjoined
01:35:50  <jaawerth>probably because handling this is going to be system-dependent and it's hard to implement without being opinionated. most of the node core stuff just gives you the toolkit for the underlying systemio and laves it to modules to handle the higher-level stuff
01:35:56  * sibajoined
01:36:13  <serapath>jaawerth: i thought node core is meant to give you cross-platform stuff
01:36:33  <joepie91>serapath: Node core is meant to be minimal, only implementing basic system interaction things
01:36:39  <jaawerth>it does - but this particular application isn't trivial at all to handle cross-platform without doing so in an opinionated way
01:36:48  <prometh>joepie91: you're avoiding me again :P
01:36:52  <joepie91>serapath: and "only using Node core" is not a useful goal to have
01:36:57  <jaawerth>and it's outside what I'd think is the scope of the core lib (though I had no hand in developing it)
01:37:00  <serapath>jaawerth: so maybe a pid file would be great. what would be the most minimal way to connect a duplex connection to processes listed in a pid file?
01:37:02  <joepie91>prometh: no? I just have no response :P
01:37:10  <jaawerth>that's what sockets are for
01:37:14  <prometh>joepie91: so you don't know what to call it?
01:37:25  <joepie91>prometh: well like I said, I don't know what you're checking for
01:37:26  <prometh>joepie91: supports-animated-semigraphics is kinda long
01:37:27  <jaawerth>the pid file identifies the ID of the running process(es), and they would have corresponding sockets
01:37:30  <serapath>joepie91: i understand and agree - i just want to understand what is the minimum amount of stuff i need on top of node core to make that work
01:37:30  <jaawerth>for the stdio
01:37:40  * BSAlbjoined
01:37:41  <prometh>joepie91: i'm cehcking if the environment is safe to display a terminal progress bar
01:37:55  <joepie91>prometh: but "terminal progress bar" is still vague
01:37:56  <prometh>joepie91: or any other similar animation
01:38:00  <joepie91>can be implemented in a number of ways
01:38:07  <serapath>jaawerth: so when i start a program and let it read a "pid" file, i get a number. how do i now connect to that process based on that "pid"?
01:38:07  <joepie91>so what *features* are you checking for?
01:38:07  * mcollinaquit (Ping timeout: 268 seconds)
01:38:15  * zackuquit (Read error: Connection reset by peer)
01:38:17  <prometh>joepie91: !process.env.CI && !process.env.CONTINUOUS_INTEGRATION && process.stderr.isTTY && process.stdout.isTTY
01:38:39  <serapath>joepie91: a duplex connection to an existing process - i thought about stdin/stdout/stderr of a process of which i know the pid (due to a pid file)
01:38:39  <joepie91>prometh: that... does not seem like a robust set of checks
01:38:43  * zackujoined
01:38:59  * mjora7quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
01:39:00  <prometh>joepie91: i dont' know what else to check for... and putting it in a single package means that others can contribute and depend on it
01:39:12  <joepie91>serapath: yeah, this is highly application-specific, and out of scope for Node core outside of cluster mechanisms (which probably aren't what you want here)
01:39:20  <prometh>joepie91: but many libs, such as npmjs.com/gauge (used by npm) do only an isTTY check
01:39:26  <serapath>joepie91: why is this application specific?
01:39:35  * BSaboiaquit (Ping timeout: 240 seconds)
01:39:39  <prometh>joepie91: also, i have no need to duplicate what npmjs.com/supports-color does
01:39:52  <joepie91>serapath: because different applications have different requirements on what kind of data they need to transfer, by what means, and so on
01:40:25  <serapath>joepie91: but i can send all kinds of data over that stream
01:40:30  <prometh>joepie91: maybe i'll depend on supports-color and a unicode check
01:40:35  <serapath>joepie91: i mean - that sounds for me like it's function specific what kind of arguments it takes
01:40:49  <jaawerth>serapath: it might be overkill but I've heard good things about this lib for handling that kind of IPC stuff - and it's still mostly a toolkit rather than a big opinionated thing like pm2 https://github.com/RIAEvangelist/node-ipc
01:40:49  <serapath>joepie91: of course - i kind of need to know that. i would specify in a readme file
01:40:50  <joepie91>serapath: you're missing the point. designing an IPC mechanism is trivial if you're only designing for your own application, but designing a generic implementation is much harder
01:41:00  <joepie91>serapath: hence, out of scope for Node core
01:41:18  <serapath>jaawerth: still looks big :/
01:41:32  <jaawerth>well I mean... if you wanna do this in a cross-platform way, it's not gonna be 100 lines of code
01:41:49  <serapath>joepie91: i'm kind of ok with having it custom like the functions that i write and publish as modules which export them
01:41:56  * texinwienquit (Ping timeout: 260 seconds)
01:42:28  <serapath>joepie91: i imagine processes to be the same... they give you a duplex stream... and the data it takes is custom and described in a readme - similar to how modules describe arguments to the function they export - its module specific or application specific
01:42:41  <prometh>is npmjs.com/supports-color overlapping npmjs.com/has-unicode ? i'm not experienced enough in this to know
01:42:42  <jaawerth>the simple solution that would still largely be cross-platform would be to have the daemon process listen on a TCP port (which you can make configurable) and redirect the stdio to/from that and/or make sure of some kind of DIY communication protocol
01:43:32  <jaawerth>but also.. I mean the smaller the tools you use for this, the more you're gonna have to code up yourself
01:43:32  * bradfordli123quit (Remote host closed the connection)
01:43:43  <serapath>jaawerth: is a tcp/ip port not connected to network? is there something without network that is cross platform? (thats why i thought about stdin/stdout/stderr) + i saw that child_process.spawn allows to define more io streams on top of the 3 standard ones
01:43:54  <jaawerth>you can use tcp locally
01:43:57  <modernpacifist>serapath: Just set the port up on 127.0.0.1
01:44:00  <serapath>jaawerth: i was hoping - having a pid or maybe specifying some more information than just the pid would allow that
01:44:01  <jaawerth>you'd just listen on localhost
01:44:03  <joepie91>serapath: the problem is not as simple as you think it is. but honestly I'm getting kind of tired of discussing this because you seem to constantly be asking/saying the same things and not making an effort to understand the mechanics involved
01:44:06  * bradfordli123joined
01:44:19  <joepie91>this is consuming way too much of my time :)
01:44:22  <serapath>joepie91: sry :-) i'm a bit slow in understanding
01:44:26  <jaawerth>yeah this is a complex thing for reasons that go beyond node
01:44:33  <joepie91>serapath: it's not about slow in understanding, it's about effort you put in on your part
01:45:04  <joepie91>serapath: you just keep asking the same things that have already been addressed, instead of narrowing down the part you don't understand or doing your own research
01:45:04  <serapath>modernpacifist: so i would `require('net')` and listen on `127.0.0.1` and can the port be `process.pid`?
01:45:10  <prometh>is npmjs.com/supports-color overlapping npmjs.com/has-unicode ? i'm not experienced enough in this to know
01:45:11  <jaawerth>I mean, it's the same reason you can't, via ssh, spawn a process in the background, disown it and then log out and easily reconnect to it later without a complex tool like screen or tmux
01:45:11  <prometh>is npmjs.com/supports-color overlapping npmjs.com/has-unicode ? i'm not experienced enough in this to know
01:45:29  <modernpacifist>serapath: Instead of writing the PID to a particular file, write the port number instead
01:45:35  <modernpacifist>serapath: But yes
01:45:48  <jaawerth>and what you're basically looking for is the equivalent of screen or tmux but for IPC instead of a shell
01:45:49  <serapath>jaawerth: oh damn - i actually kind of hoped by now there would be some kind of npm module that is super minimal and allows that kind of stuff
01:45:53  * promethwould like some attention, please.
01:45:59  <modernpacifist>prometh: Silence!
01:46:13  <jaawerth>serapath: I don't think the requirements allow as much minimalism as you think they do
01:46:16  <serapath>jaawerth: YES i think thats what i'm looking for :-)
01:46:24  <serapath>jaawerth: oh thats a cool way to say it
01:47:02  * brent__joined
01:47:06  <prometh>is npmjs.com/supports-color overlapping npmjs.com/has-unicode ? i'm not experienced enough in this to know
01:47:06  <jaawerth>I mean there COULD be such tools out there and I just haven't seen 'em
01:47:26  <serapath>modernpacifist: so i would basically always use `port = 0` (i read that means it will pick a free port) and treat that as my custom "process id" and never use `process.pid`
01:47:54  <jaawerth>serapath: I mean, if you use that tiny daemon module, you could write your wrapper such that it keeps the stdio live and allows another process to request the stdio via pid
01:47:55  <modernpacifist>serapath: Basically - you'll just need to standardise or otherwise configure some commonly understood location for where those files reside
01:47:59  * bpmedleyquit (Ping timeout: 260 seconds)
01:48:03  <jaawerth>the daemon itself would need to continuously run, but that's going to be the case anyway
01:48:12  <jaawerth>the daemon would be your tmux equivalent
01:48:23  <jaawerth>anyway, gotta go for a bit
01:48:23  <serapath>jaawerth: how do i do that? how do i "keep the stdio live"?
01:48:27  * bradfordli123quit (Ping timeout: 240 seconds)
01:48:29  <serapath>jaawerth: what does that mean? :P
01:48:33  <jaawerth>you'd have your daemon listen on tcp or whatever
01:48:35  <modernpacifist>serapath: i.e. all files in /var/run that start with my-process-<pid> will contain a single number that corresponds to the port on 127.0.0.1 that the process is listening on
01:49:07  <jaawerth>and set up a protocol with a command that, say, lists out the children and their pids, requests the stdio by pid, etc
01:49:25  <jaawerth>tcp, unix socket, whatever
01:49:36  <jaawerth>(the nice thing is you can make it support either and make it configurable if you wanna)
01:49:48  <serapath>modernpacifist: yes i would standardize the location. if an app spawns processes, it would keep a "port file" (my version of a "pid file") next to the package.json i guess. ...but for system wide globally installable stuff it would be in the users home directory or something
01:50:10  <jaawerth>anyway, be back later
01:50:20  * gothicsouthjoined
01:50:24  <prometh>ffs
01:50:28  <prometh>why do i get ignored
01:50:52  <deltab>prometh: because you were spamming, I imagine
01:50:57  <ljharb>if you ask the same thing more than once, it cancels out along with every previous question
01:50:59  <jaawerth>prometh: lol, well, I don't know the answer to your question
01:51:03  <ljharb>ask once, wait many many hours.
01:51:04  <deltab>anyway, color and unicode are independent things
01:51:07  <prometh>:) and i wanted a long time
01:51:13  <modernpacifist>prometh: And I personally hate the progress bars in any case :P
01:51:25  <prometh>modernpacifist: you're a minority
01:51:32  <ljharb>i don't think that's true
01:51:33  <serapath>jaawerth: modernpacifist: is "keep stdio live" equal to having a require('net') and make it listen on a port? ...because `stdio` sounds to me like what i get or can specify when i spawn a process via child_process.spawn
01:51:37  <modernpacifist>prometh: Dam straight
01:51:38  <ljharb>lots of people hate progress bars
01:51:44  * brent__quit (Ping timeout: 255 seconds)
01:52:02  <prometh>people hate npm's progress abr?
01:52:07  <ljharb>yes
01:52:08  <modernpacifist>yes
01:52:10  <prometh>they're stupid
01:52:14  <ljharb>anyways "has color" is totally independent of "has unicode"
01:52:15  <prometh>it's lovely
01:52:17  <modernpacifist>serapath: https://gist.github.com/benbuckman/2758563
01:52:18  <jaawerth>serapath: keeping it "live" just means keeping something redirecting it/attached to it (in this case your master process), tcp is just a way to then make it so you can connect other stuff to it
01:52:26  <ljharb>i can explicitly disable colors on my newest supports-emojis terminal
01:52:38  <modernpacifist>serapath: Thats an example of redirecting the stdout/err of a node process to a telnet capable socket
01:53:44  <deltab>prometh: a terminal that supports colour understands commands to display the following characters in green, for instance
01:53:48  * danmactoughquit (Quit: Outta here like Vladimir)
01:54:09  <prometh>how's this for a "supports-semigraphics" package?: `return !process.env.CI && !process.env.CONTINUOUS_INTEGRATION && supportsUnicode() && supportsColor() && process.stderr.isTTY && process.stdout.isTTY;`
01:54:58  * danmactoughjoined
01:55:15  <deltab>prometh: whereas ascii and unicode describe ranges of possible characters that can be output (and the codes for those characters)
01:55:42  <prometh>deltab: i thought that colors were unicode chars
01:55:44  <ljharb>prometh: why would those two arbitrary env vars be set?
01:55:50  <deltab>prometh: no
01:56:02  <prometh>ljharb: why wouldn't they be?
01:56:09  <prometh>ljharb: we don't want text animations playing in CI
01:56:42  <deltab>prometh: they're done with control sequences such as \x1b[33m
01:56:59  <prometh>deltab: yeah, seen those when looking at colors/chalk source code... thought it was unicode
01:56:59  <serapath>modernpacifist: joepie91 prometh jaawerth thx a lot :-) i think i learned quite something
01:57:39  * GonzaloGM_joined
01:58:50  * schmityjoined
01:58:58  * ividyonquit (Quit: Leaving)
02:00:08  * m31271nquit (Remote host closed the connection)
02:00:57  * GonzaloGM__quit (Ping timeout: 240 seconds)
02:01:02  <jaawerth>serapath: happy to help!
02:01:16  <jaawerth>and yeah, process management is deceptively complicated, hehe
02:01:17  * m31271njoined
02:01:22  * Bajaxjoined
02:01:36  <jaawerth>not TOO bad so long as you don't have to make it super cross-platform
02:01:44  <prometh>starting https://github.com/stevenvachon/supports-semigraphics
02:02:06  <jaawerth>(though again, tcp alleviates this quite a bit - which is why so many things use it)
02:02:31  * __oslobystormjoined
02:02:45  * _oslobystorm_quit (Read error: Connection reset by peer)
02:04:19  * joyeequit (Remote host closed the connection)
02:06:02  * stoneburnerquit (Read error: Connection reset by peer)
02:07:31  * stoneburnerjoined
02:10:01  <charmander>prometh: Why do you need the environment checks?
02:10:06  * leptonequit (Remote host closed the connection)
02:10:09  <charmander>isTTY would be false in CI, wouldn’t it?
02:10:25  <prometh>charmander: because some CI's, such as travis, have isTTY===true
02:10:38  * R34p3Rquit (Ping timeout: 255 seconds)
02:11:45  * schmityquit (Quit: leaving ^_~)
02:12:26  <deltab>prometh: semigraphics don't require colour: see for instance http://old-computers.com/museum/software.asp?c=174&st=1
02:12:44  * goodenoughquit (Remote host closed the connection)
02:12:49  <prometh>deltab: true, but if the environment doesn't support color, it likely cannot support semigraphics
02:12:54  * zuck05joined
02:13:06  <prometh>an environment where we would run node.js
02:13:20  <prometh>that's my thinking, anyway
02:13:27  * abijeetjoined
02:13:31  * R34p3Rjoined
02:14:01  <prometh>disagree?
02:14:06  <deltab>yes
02:14:07  * stoneburnerquit (Ping timeout: 260 seconds)
02:14:08  * cadsjoined
02:14:43  <prometh>alright.. so just unicode and CI env vars..
02:15:04  <jaawerth>leaving them as control sequences allows the frontend the option to display it how it wants
02:15:04  <deltab>for instance, in a plain text file, you can use semigraphics but not control sequences
02:15:25  <jaawerth>and/or semigraphics and/or whatever
02:15:29  <jaawerth>users may also sometimes want to disable color
02:15:36  <prometh>but if someone disables color, they likely want semigraphics disabled as well, no?
02:15:49  <deltab>so you'd want to turn off the color and animation when writing to a log
02:15:49  <jaawerth>sometimes the context in which they're viewing it makes it easier to read
02:16:15  * dallas_joined
02:16:15  <prometh>this is where if they've defined NO_COLOR or similar, semigraphics could be disabled as well
02:16:26  <prometh>which is part of what npmjs.com/supports-color does
02:16:43  * Gazoooquit (Ping timeout: 260 seconds)
02:17:22  * stoneburnerjoined
02:17:31  <prometh>still think checking for color support is pointless?
02:18:10  <ec>o7 all
02:18:12  <deltab>no, it tells you whether you can use colour
02:18:12  <prometh>if removing color makes it easier to read, so would removing animations
02:18:19  * LeBlaaancjoined
02:18:26  <ec>how can I detect a lack of stdin
02:18:30  <prometh>deltab: it also checks env and cli vars
02:18:36  <prometh>--no-color, etc
02:18:53  <prometh>if someone disables color, they most probably want animations disabled
02:19:05  <prometh>am i sounding like a lunatic?
02:19:06  * glijoined
02:19:36  <deltab>they might just dislike colour
02:20:02  <prometh>how would they disable animations, then? --no-animations ?
02:20:09  <deltab>yes
02:20:14  <prometh>alright
02:20:18  <ec>(i.e. a program reads a file from stdin, <blah.json — how can I determine if that file is missing)
02:20:31  <deltab>ec: missing how?
02:20:43  <ec>mmmm phrased poorly
02:20:54  <deltab>ec: if the file doesn't exist, the shell can't open it, and it doesn't run the command
02:20:55  <ec>how can I differentiate `node blah.js` and `node blah.js <widget`
02:21:04  <jfhbrook>hmmmmmm
02:21:07  <jfhbrook>HMMMM
02:21:07  <ec>so I can print an error saying “yeah also use <widget thx”
02:21:09  <jfhbrook>so
02:21:16  <jfhbrook>there are a few situations, right?
02:21:18  <LouisT>read process.argv
02:21:20  <jfhbrook>one is that there's no stdin
02:21:29  <ec>LouisT: that wouldn't be in the arg, it's handled by the shell.
02:21:31  <jfhbrook>like, oh, stream ends immediately with no content, ok cool
02:21:39  <ec>jfhbrook: but it doesn't, afaict
02:21:40  <jfhbrook>but more likely, stdin remains open and the user is all, uhh?
02:21:52  <ec>node -e "process.stdin.on('end', ()=> console.log('k')).resume()"
02:21:52  <deltab>fd 0 could be undefined
02:22:03  <ec>sits there, waiting on stdin
02:22:05  * KermitoniTquit (Ping timeout: 240 seconds)
02:22:09  <jfhbrook>so in the past I've "Solved" this by a timeout--oh, nothing got written to stdin in the last n seconds? bail, print help and exit
02:22:14  <deltab>node blah.ks <&-
02:22:30  <jfhbrook>but what you probably *actually* want to do is make the cli args such that it either reads from stdin or it doesn't
02:22:31  <ec>but if the user types <&-, they know to have typed <bleh
02:22:42  <ec>point here is to fix the “just types `blah` to see how to use it`
02:22:45  <jfhbrook>for instance, a lot of clis will take "-" to mean "read from stdin instead of from a file"
02:23:15  <jfhbrook>you can also try isTTY, which, idk how that works but it *does* work
02:23:15  <ec>and unfortunately arg in this case is Very Special and Important, and everything from “completely empty” to “the precise array ['--help']” is possible and valid — even likely — input
02:23:20  <deltab>you can use that to test, but the more likely reason is your program being run from a daemon, e.g. cron
02:23:31  <jfhbrook>you may be hosed
02:23:39  <ec>and: it always reads from stdin, for sure
02:23:57  * stoneburnerquit (Read error: Connection reset by peer)
02:24:05  * degvaquit (Quit: Leaving)
02:24:05  <ec>so not having stdin is a very simple erroneous case, and definitely the one to explain usage on the off-chance the user didn't read the manpage or docs
02:24:45  <ec>yeah, isTTY is my go-to
02:24:51  <ec>I was hoping I was just ignorant of some more direct option )=
02:24:56  <ec>k, thanks all <3
02:25:30  * stoneburnerjoined
02:26:01  * ddelrio1986joined
02:26:16  * pankaj_joined
02:27:45  * GonzaloGM__joined
02:31:12  * serapathquit (Quit: Page closed)
02:31:17  * KermitoniTjoined
02:31:46  * GonzaloGM_quit (Ping timeout: 268 seconds)
02:32:50  * joyee_joined
02:33:19  <deltab>prometh: btw, supports-color has a more nuanced check for CI: https://github.com/chalk/supports-color/blob/master/index.js#L52
02:33:37  <prometh>deltab: yeah, i saw that
02:33:45  <prometh>https://github.com/chalk/supports-color/issues/54
02:34:09  * mcollinajoined
02:34:22  * notadeveloperjoined
02:35:36  * gothicsouthquit (Quit: My iMac has gone to sleep. ZZZzzz…)
02:36:44  * goodenoughjoined
02:36:58  * zackuquit (Read error: Connection reset by peer)
02:37:13  * milardovichquit (Remote host closed the connection)
02:38:02  * gothicsouthjoined
02:38:05  * majidquit (Ping timeout: 240 seconds)
02:38:31  * mcollinaquit (Ping timeout: 240 seconds)
02:38:47  * SwiftMattjoined
02:39:26  * Phloxxquit (Ping timeout: 255 seconds)
02:41:05  * plutoniixjoined
02:42:24  * GanzAnderejoined
02:42:27  * Phloxxjoined
02:42:40  * smccarthyjoined
02:42:59  * pilnequit (Quit: Quitting!)
02:45:27  <deltab>https://github.com/auchenberg/volkswagen
02:45:48  * ahmed_elgabrijoined
02:47:05  * ahmedelgabriquit (Ping timeout: 240 seconds)
02:50:46  * Cabanossiquit (Ping timeout: 264 seconds)
02:52:10  * milardovichjoined
02:52:13  * Cabanossijoined
02:52:29  * ovshquit (Quit: Leaving)
02:52:32  * Fishrock123joined
02:55:30  * segmondjoined
02:55:54  * ahmed_elgabriquit (Quit: WeeChat 1.8)
02:57:03  * milardovichquit (Ping timeout: 268 seconds)
02:57:04  * Fishrock123quit (Ping timeout: 260 seconds)
02:57:50  * GonzaloGM_joined
02:58:17  * kfoonamalikquit (Ping timeout: 268 seconds)
02:58:21  <ljharb>prometh: because all CI systems don't set those two random env vars, or often any at all
02:58:33  <prometh>ljharb: nothing else we can rely on
02:58:48  * zuck05quit (Ping timeout: 240 seconds)
02:59:06  <ljharb>prometh: you can use an explicit env var that the user themselves always sets in every CI
02:59:17  <ljharb>like "NO_PROMETH_PROGRESS_BAR" or something
02:59:24  <ljharb>instead of making it sometimes magic, and sometimes broken
02:59:35  <prometh>ljharb: yes, i'm mimicking npmjs.com/supports-color
02:59:54  <ljharb>that doesn't make it a good idea
03:00:53  * shakes808quit (Quit: Connection closed for inactivity)
03:01:32  <prometh>because?
03:01:36  <jaawerth>you could have it optionally auto-detect such vars for common CI's but I'd want to make that something you can disable
03:01:46  <jaawerth>and ALSO follow what ljharb is suggesting
03:01:59  * GonzaloGM__quit (Ping timeout: 268 seconds)
03:02:02  * Emperor_Earthjoined
03:02:44  <jaawerth>if you make it detect known CI behaviors, then you have to track the behaviors of said CI's for change and that's going to add maintenance debt, for one
03:03:07  <prometh>https://github.com/stevenvachon/supports-semigraphics/blob/master/index.js
03:03:23  * MarioBrancoquit (Ping timeout: 260 seconds)
03:04:45  <prometh>lemme know hwat you think
03:04:53  <prometh>it's pretty straight-forward
03:05:30  * timetocodequit (Quit: Leaving)
03:05:57  <jaawerth>I think that bracket syntax makes me sad
03:06:50  <prometh>well, i like it :)
03:07:01  <prometh>it gives me visual structure
03:07:08  <jaawerth>I would make the foo and no-foo flags converge on a single flag
03:07:24  <jaawerth>with no-foo winning out if there's both
03:07:37  * invariant1729joined
03:08:11  <prometh>ok, so swap those two blocks.. but not sure on how to best converge
03:08:13  <jaawerth>I think yargs has that built in, iirc
03:08:59  * kikeroquit (Ping timeout: 260 seconds)
03:09:14  <jaawerth>that is, by default if you have a foo flag, you can pass --no-foo and it negates
03:09:19  * zuck05joined
03:09:25  <prometh>has-flag is much simpler than yargs
03:09:33  <jaawerth>true
03:09:50  <jaawerth>but it would simplify your conditionals a lot
03:09:59  <jaawerth>you could also just write a wrapper for has-flag that does that hough
03:10:01  <jaawerth>though*
03:11:06  <prometh>the =false and =true part would get complicated
03:11:16  <prometh>refresh, btw
03:11:26  * pankaj_quit (Remote host closed the connection)
03:11:28  * Guest18924quit (Quit: WeeChat 1.4)
03:11:44  <jaawerth>const flagHas = (flag, default=false) => !hasFlag(`no-${flag}`) || hasFlag(flag) || default;
03:12:01  * beerdropquit (Ping timeout: 240 seconds)
03:12:45  * a_thakurjoined
03:13:21  * pomelojoined
03:14:40  * nunchuckquit (Remote host closed the connection)
03:14:45  <jaawerth>with the above, --no-foo would also make foo=bar false, but yeah, that gets complicated because you'd have to split on = and pass in the left-hand side
03:15:05  * nunchuckjoined
03:15:33  <doodadjs>there is no argument parser in npm that can do that ?
03:15:49  <jaawerth>but I already think the fact that you have to explicitly check foo=bar is already showing hasFlag as TOO simple
03:15:56  <jaawerth>doodadjs: there are a few
03:16:07  <prometh>jaawerth: that isn't correct, though... not having --no-animation does not mean that animation is enabled
03:16:08  <ljharb>just use yargs
03:16:13  * HoierM_quit (Ping timeout: 260 seconds)
03:16:23  <prometh>yargs is completely excessive for this package
03:16:24  <jaawerth>yeah, yargs is a great balance between simplicity and functionality
03:16:44  <prometh>my code is functionally exactly what i need, and it's very light
03:16:47  * mr-foobarjoined
03:16:58  * zxcjoined
03:17:08  <jaawerth>there's also minimist, which is.. more minimal. doesn't have no-foo built in but would simplify the logic compared to has-flag
03:17:20  <prometh>my logic is very simple
03:17:30  * joyee_quit (Remote host closed the connection)
03:17:40  <prometh>it could be less verbose, but at the expense of a complicated dependency
03:17:58  * invariant1729quit (Ping timeout: 260 seconds)
03:18:17  <jaawerth>it's a bunch of manual checks for each flag and condition though - which adds a maintenance and readability burden compared to using a wrapper
03:18:25  <jaawerth>(whether an existing parser or one you write yourself)
03:18:48  <prometh>it's straightforward
03:19:14  <ljharb>prometh: it's a command line thing. why does it need to be light?
03:19:24  * joyeejoined
03:19:29  <prometh>ljharb: because i don't need yargs
03:19:30  <ljharb>and it's never shipping to browsers, so why would the dep graph matter at all?
03:19:35  * joyeequit (Remote host closed the connection)
03:19:36  <jaawerth>has-flag doesn't even parse the args to compare the key to your value, it's just checking for the arg foo=bar
03:19:45  <ljharb>you do need an argument parser that works well and is well tested
03:19:49  * joyeejoined
03:19:54  <ljharb>and it seems has-flag isn't that
03:20:00  <prometh>i cover the cases i need
03:20:03  <jaawerth>has-flag is literally just this https://github.com/sindresorhus/has-flag/blob/master/index.js
03:20:17  <ljharb>ouch, that's not an arg parser
03:20:21  * mjora7joined
03:20:23  * Cabanossiquit (Ping timeout: 245 seconds)
03:20:25  <prometh>duh, i don't need a full arg parser
03:20:35  <ljharb>and yeah, that doesn't handle aliases, help output, `--no-foo`
03:20:43  <ljharb>you do if you want your tool to work well. defy conventions at your peril
03:20:48  <prometh>omg, i don't need a CLI
03:20:54  * milardovichjoined
03:21:02  <doodadjs>does yargs accepts a description of arguments and their type, and allow us to include it in bash (when we do tab) ?
03:21:03  <jaawerth>personally in that case I'd stick to env vars
03:21:04  <ljharb>if you're using argv, then it's a cli
03:21:05  <prometh>i'm just cehcking if their app has any options defined
03:21:17  * Cabanossijoined
03:21:22  <ljharb>doodadjs: i'm not sure about autocomplete, but otherwise yes
03:21:32  <prometh>ljharb: do you use npmjs.com/chalk ?
03:22:46  * ddelrio1986_joined
03:23:05  <prometh>i'm not using argv.. i'm supporting its use automatically
03:23:12  <prometh>i am not providing a cli
03:24:23  <ljharb>supporting things implicitly/automatically that the user didn't intend is not a good idea.
03:24:42  <ljharb>if you're meant to be used as a lib, then explicitly passed options are the only way you should be configurable.
03:24:45  <jaawerth>doodadjs: I don't think yargs does the autocomplete stuff - that gets a little more complex since it has to be based on what's been entered so far
03:24:50  <prometh>well, that's how chalk works, and i agree with it
03:24:52  <ljharb>and yes, i've used chalk, and some of its magic stuff is why i don't use it anymore.
03:24:53  * joyeequit (Remote host closed the connection)
03:25:02  <prometh>what do you use?
03:25:04  <jaawerth>there's a module for that called omelette but I've never used it
03:25:09  <prometh>i stopped using npmjs.com/colors long ago
03:25:37  * karmahackerjoined
03:25:41  * beerdropjoined
03:26:03  <doodadjs>jaawerth: I've seen that feature in bash so that an executable can play with autocomplete. That would be great if a tool could generate the required files
03:26:08  * ddelrio1986quit (Ping timeout: 260 seconds)
03:27:08  <ljharb>well yeah chalk is way better than colors
03:27:12  * joyeejoined
03:27:33  <victorqueiroz>chalk is the best choice
03:27:45  <jaawerth>doodadjs: yeah, check out omelette maybe - I think that one builds it into the CLI executable itself rather than generate the files for installation in /etc/bash_completion.d, but the former is more node-cli-friendly anyway
03:27:58  * Protiusjoined
03:28:08  * GonzaloGMjoined
03:28:32  <prometh>i like not having to deal with conditional colors
03:28:36  <ljharb>actually i do have one module that uses chalk
03:28:43  <jaawerth>doodadjs: oh you can also append to ~/.bash_completion I think
03:28:58  <prometh>ljharb: you haven't told me what colors lib you've switched to
03:29:01  <Protius>hey weird question
03:29:12  <Protius>and beyond 'you shouldnt use text transforms on code'
03:29:29  <Protius>is there any weird stuff that would 'break' me parsing JS through handlebars?
03:29:29  <ljharb>prometh: i usually just don't colorize anymore. it's not that valuable. but in this package i do, and i'm trying to find the bug i had to work around
03:29:33  * abijeetquit (Remote host closed the connection)
03:29:37  <Protius>{{ }}
03:29:38  * sneakertackjoined
03:29:56  * nothingnewquit (Remote host closed the connection)
03:30:04  * karmahackerquit (Ping timeout: 246 seconds)
03:30:06  <prometh>ljharb: http://i.imgur.com/cTokZCo.png
03:30:21  * Higherjoined
03:30:25  <Protius>it will only be used to template comments if that helps
03:30:26  <victorqueiroz>OS X font rendering is AWESOME man
03:30:27  * DeltaHeavyjoined
03:30:32  <ljharb>so like, you reimplemented wget?
03:30:34  <victorqueiroz>I wish Linux have the same font rendering
03:30:45  <doodadjs>jaawerth: I've not study more on it... Maybe I'll make a yargs to completion package/PR when I'll have to do it :)
03:30:52  <jaawerth>doodadjs: it looks like omelette works by installation adding a loader of the completions in ~/.bash_profile, ~/.zshr, or ~/.config/fish/config.fish depending on shell
03:31:28  * GonzaloGM_quit (Ping timeout: 240 seconds)
03:31:34  <prometh>ljharb: um, no
03:31:43  * victorqueirozquit (Read error: Connection reset by peer)
03:31:44  <doodadjs>jaawerth: thanks
03:31:46  <jaawerth>np
03:32:02  <jaawerth>er, ~/.zshrc, not ~/.zshr, lol
03:32:19  * victorqueirozjoined
03:32:29  <victorqueiroz>hi =)
03:33:46  <jaawerth>I wonder why it uses zshrc instead of zlogin
03:33:49  <jaawerth>(or zprofile)
03:34:59  * mcollinajoined
03:35:38  <doodadjs>zshrc is run when we open zsh ?
03:35:48  * mr-foobarquit (Ping timeout: 260 seconds)
03:35:49  * knobquit (Quit: Leaving)
03:36:09  <prometh>hi victorqueiroz
03:36:43  * segmondquit (Quit: l8r)
03:37:04  <jaawerth>doodadjs: yeah but sourcing completion files is something you'd only want or care about when using an interactive shell... and zprofile/zlogin would be most analogous to bash_profile
03:37:09  <jaawerth>iirc
03:37:58  <jaawerth>er, specifically a login shell
03:38:10  * SwiftMattquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
03:39:23  * mcollinaquit (Ping timeout: 246 seconds)
03:40:11  <doodadjs>jaawerth: you talk about CTRL-ALT-Fx ? I think it's because those shells should be light
03:40:46  * milardovichquit
03:40:52  <jaawerth>doodadjs: I just mean it's weird to use bash_profile over bashrc but zshrc over zprofile/zlogin
03:41:06  <doodadjs>ok
03:41:16  <jaawerth>I could be missing something, though, I guess
03:41:37  * Venicerobjoined
03:41:49  <jaawerth>as a dogmatic zsh user I get test when zsh gets treated differently for reasons that appear arbitrary, lol
03:41:54  <jaawerth>testy*
03:42:00  * chippingquit (Ping timeout: 240 seconds)
03:42:28  * Naanjoined
03:42:44  * LeBlaaancquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
03:43:32  * chippingjoined
03:43:50  * LeBlaaancjoined
03:44:14  * rchavikjoined
03:44:24  * joyeequit (Remote host closed the connection)
03:44:32  * flappynerdquit (Quit: Leaving)
03:45:44  * LeBlaaancquit (Read error: Connection reset by peer)
03:46:19  * Venicerobquit (Ping timeout: 260 seconds)
03:46:21  * LeBlaaancjoined
03:49:23  * plauclairquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
03:50:37  * ddelrio1986_quit (Quit: This computer has gone to sleep)
03:50:46  <ljharb>jaawerth: on mac, i think bash_profile is reversed over bashrc somehow?
03:50:54  * zxcquit (Read error: Connection reset by peer)
03:50:58  <prometh>stderr/stdout are streams, right?
03:51:03  <ljharb>jaawerth: like, if you want bashrc semantics on a mac you have to use bash_profile when no bashrc exists, or something
03:51:06  * gucci_meowjoined
03:51:10  <jaawerth>ah
03:51:38  <jaawerth>interesting, I forget that since macs come with bash, they have their own special behaviors for it
03:51:42  <jaawerth>because of course they do, lol
03:52:45  <doodadjs>when I scroll using the mouse wheel on mac, I have to remember that's inverted :)
03:52:54  <jaawerth>though I thought the only difference was that apple terminal defaults to login shells.. but that wouldn't be enough to use bash_profile over bashrc
03:53:15  <prometh>doodadjs: you can change that in preferences.. that was teh first thing i did when i updated
03:54:02  <ljharb>doodadjs: i always fix that.
03:54:13  <ljharb>down should mean down, except when you're touching the screen and swiping down.
03:54:18  * invariant1729joined
03:54:33  <ljharb>(iow i think apple's ux model failed bigtime there)
03:54:43  <jaawerth>yeah, I can never get used to inverted controls even when using touchpad gestures
03:54:47  * sondr3quit (Ping timeout: 246 seconds)
03:55:00  <jaawerth>it just doesn't make sense when you aren't physically dragging something
03:55:02  <ljharb>it's intuitive on an ipad and similar - because you're pushing the viewport around
03:55:06  <ljharb>exactly
03:55:23  <ljharb>but on a trackpad, you're not pushing the viewport, you're manipulating the scrollbar handle - just like a mouse would.
03:55:33  <jaawerth>yep!
03:55:37  * dallas_quit (Quit: Page closed)
03:55:53  <ljharb>that, and autohiding scrollbars, are the two UX fails i instantly fix on any new mac
03:55:54  <prometh>n> new (require('stream').Writable)().isTTY
03:55:58  <babelboot>prometh: (okay) undefined
03:56:00  <prometh>why?
03:56:02  <prometh>^^
03:56:15  <prometh>ljharb: same.. i must see scrolbars
03:56:15  <jaawerth>I could also never get used to those controls in videogames when they try and force you to work that way with a mouse when not using a joystick
03:56:21  <ljharb>why would a generic stream know or care about terminals?
03:56:42  <ljharb>"isTTY" seems like something that shouldn't be on all streams
03:57:00  <prometh>ljharb: well, node docs say that process.stdout is a duplex stream
03:57:08  <prometh>or writable stream, depending
03:57:14  <prometh>i guess they extend ?
03:57:18  <ljharb>sure, but that doesn't preclude it having extra properties
03:58:23  * GonzaloGM_joined
03:58:30  <jaawerth>yeah - in this case it's not subclasses or anything, they just set the prop on it IIRC
03:58:32  <jaawerth>subclassed*
03:58:58  * maxhawaiiquit (Read error: Connection reset by peer)
03:59:05  * MachinShinquit (Quit: leaving)
03:59:25  * maxhawaiijoined
03:59:34  <jaawerth>nope, nevermind, it's subclassed from Duplex
03:59:48  * smccarthyquit (Remote host closed the connection)
04:00:12  <Naan>hello I just had to install g++ to get bcrypt to install without errors via npm. I'm just wondering now can I just add this g++ to my packages.json ?
04:00:23  * smccarthyjoined
04:00:48  <GreenJello>Naan, you can't, it's a basic system dependency
04:01:10  <GreenJello>every developer computer should have the essential build tools installed
04:01:15  <jaawerth>Naan: packages with native deps (that is, that depends on native C/C++ code) need to have compilers to make 'em work
04:01:35  <Naan>ok that's fair
04:01:48  <Naan>thank you
04:01:49  <jaawerth>during dev, yeah, it's an essential tool (and part of the build_essential package on debian-based systems), in production it shoudl be a non-issue since your apps should be deployed pre-built
04:02:25  * GonzaloGMquit (Ping timeout: 268 seconds)
04:03:05  * cannapquit (Read error: Connection reset by peer)
04:03:32  * nacciquit (Ping timeout: 246 seconds)
04:05:26  <doodadjs>When on mac, npm (I think) suggests the xcode installer. That's funny.
04:05:56  <ljharb>doodadjs: no, it's just that a ton of command line tools require the xcode command line tools to be installed at first use.
04:06:14  <ljharb>git too, for example
04:06:45  <doodadjs>when I ran "npm install ...", I have been prompted to install XCode
04:07:10  <jaawerth>I think it's the standard way to get the compiler tools you need on macs
04:07:18  <ljharb>right. you'd have gotten the same thing if you ran other tools.
04:07:33  <jaawerth>similarly, windows requires one of the free components of visual studio or whatever
04:07:36  <ljharb>in this case tho it might have been that you needed to compile a binary module
04:07:48  <jaawerth>(but you can also get it other ways)
04:07:55  * neoncont_joined
04:07:58  <doodadjs>yes, that was a binary module
04:08:24  <jaawerth>yeah that's just the standard quick path to getting what you need for building native deps
04:08:32  <jaawerth>quick and/or standard
04:08:43  * invariant1729quit (Ping timeout: 260 seconds)
04:09:37  * neoncontrailsquit (Ping timeout: 246 seconds)
04:11:05  * Silveringjoined
04:14:13  * bradfordli123joined
04:14:54  * rchavikquit (Quit: -)
04:16:03  * systemfaultjoined
04:16:03  * systemfaultquit (Client Quit)
04:16:25  * systemfaultjoined
04:16:37  * naccijoined
04:20:00  * joyeejoined
04:20:28  * Cabanossiquit (Ping timeout: 272 seconds)
04:20:41  * gucci_meowquit (Remote host closed the connection)
04:21:25  * Cabanossijoined
04:23:02  * mjora7quit (Quit: Textual IRC Client: www.textualapp.com)
04:23:07  <Protius>you have to write native stuff in what, c?
04:23:31  * mjora7joined
04:24:23  * migueljoined
04:24:47  * miguelchanged nick to Guest50475
04:25:00  * Guest50475quit (Client Quit)
04:27:27  * smccarthyquit (Ping timeout: 240 seconds)
04:28:55  * GonzaloGMjoined
04:29:01  * boneskullquit (Ping timeout: 240 seconds)
04:30:22  <systemfault>C++
04:30:54  <prometh>hopefully that'll change in a few years
04:31:12  <prometh>mozilla's writing servo in rust
04:31:28  <prometh>maybe some day google will add rust support to v8
04:31:48  * GonzaloGM_quit (Ping timeout: 240 seconds)
04:31:56  <Havvy>prometh: You can write native extensions for Node.js in Rust today.
04:32:04  <prometh>oh!
04:32:11  <Havvy>Rust has zero-overhead FFI with C APIs.
04:32:26  <prometh>nice
04:32:40  * joyeequit (Remote host closed the connection)
04:33:20  * kaylinedjoined
04:33:45  * boneskulljoined
04:33:56  * plauclairjoined
04:34:20  <prometh>all tested now: https://github.com/stevenvachon/supports-semigraphics
04:34:21  * ukyrgfquit (Quit: Leaving)
04:35:37  * mcollinajoined
04:35:38  * Higherquit (Quit: Page closed)
04:36:13  <jaawerth>Protius: there are bindings for various things, though, including Rust
04:36:23  <jaawerth>oh, Havvy beat me to it
04:36:59  <Havvy>https://github.com/neon-bindings/neon for Rust-Node.js
04:37:18  * joyeejoined
04:39:01  * keithws_joined
04:39:10  * led1quit (Quit: led1)
04:39:14  * nahtnamquit (Quit: Connection closed for inactivity)
04:39:57  * mcollinaquit (Ping timeout: 240 seconds)
04:40:32  * oojacobooquit (Remote host closed the connection)
04:44:12  * computer2000joined
04:44:36  * oojacoboojoined
04:45:30  <mjora7>Is the success of Node basically just because of the JavaScript developer mindshare that already existed when it was released, or is there some other killer features that it provides or thing that it is particularly good at?
04:45:51  <mjora7>I'm trying to decide whether to go with Ruby, JavaScript, or Haskell for my server-side stuff.
04:46:08  <mjora7>Node seems like the safest bet at this moment though.
04:47:18  <prometh>mjora7: "isomorphism" is nice.. you can use the same code and libraries both on the server and the client
04:47:58  <prometh>mjora7: also, libuv, node's underlying multi-threaded concurrency library is very performant
04:48:07  <sneakertack>mjora7, probably a mix of: web/frontend developers can now use the same language they know on the server + async non-blocking model makes it well-suited for multi-request handling / streaming
04:48:09  <Havvy>mjora7: JS developer mindshare IMO.
04:48:19  <prometh>mjora7: also, many top companies are invested in javascript, so its performance will only increase
04:48:23  <Havvy>It's definitely the reason I started using it TBH.
04:49:20  <prometh>the language is getting a lot of update attention... ES2015+
04:49:30  <jaawerth>yeah I mean, I mean, often the best language for a project is as much about how easily you can get devs onboard/who already know the language as it is the capabilities of the language itself
04:49:37  <mjora7>Ok, thanks for the insights.
04:49:51  <jaawerth>though in some cases it isn't worth the tradeoffs (*COUGH* java)
04:50:04  <prometh>java will get replaced
04:50:11  <prometh>as will python, ruby and php
04:50:36  <jaawerth>maybe, maybe not. those are are pretty entrenched
04:50:47  <prometh>yes, but others will get entrenched
04:50:59  <prometh>rust, go
04:51:02  <prometh>javascript
04:51:48  <prometh>java is very mature, kinda like C... but java isn't at the center like C is
04:51:52  * notadeveloperquit (Quit: Textual IRC Client: www.textualapp.com)
04:52:03  <GanzAndere>C is at the Center.
04:52:15  <GanzAndere>C for Center
04:52:17  <prometh>Rust is trying to change that
04:52:23  <GanzAndere>Golang, I thought.
04:52:31  <prometh>no, golang is not system level
04:52:31  <GanzAndere>Even one of the C fathers is behind Go
04:52:36  <GanzAndere>It can be.
04:52:45  <prometh>it has garbage collection
04:52:57  <GanzAndere>I think so
04:53:02  <prometh>then it can't be system level
04:53:05  <prometh>you can't write drivers in go
04:53:12  <GanzAndere>perhaps.
04:53:23  <doodadjs>Haskell ?
04:53:41  <Havvy>You can compile a restricted subset of Haskell to C, so yes.
04:53:43  <GanzAndere>https://code.google.com/archive/p/gofy/source/default/source
04:54:01  <doodadjs>I find it too difficult to read
04:54:27  * sibaquit (Ping timeout: 240 seconds)
04:54:50  <GanzAndere>Question is
04:55:13  * Pandorian_joined
04:55:15  <Havvy>You can write a GCed OS.
04:55:22  <GanzAndere>Can you control datastructure w/ specific bit arrangement in locations internals you may desire
04:55:40  <GanzAndere>basically it all boils down to that.
04:55:45  <GanzAndere>the reason you like C is because of this.
04:55:59  <GanzAndere>In go, perhaps. I'm not too go savvy
04:56:04  <prometh>Havvy: you can't control memory in a GC environment
04:56:37  <GanzAndere>You can, to a certain extent.
04:56:43  <GanzAndere>reference counting isn't at all random.
04:56:54  <GanzAndere>neither is collecting the 'garbage'.
04:57:34  <prometh>memory registers?
04:57:47  <GanzAndere>possibly
04:58:11  <GanzAndere>did you hear of the node js linux distro?
04:58:19  <GanzAndere>using node as a distro package manger
04:58:30  <GanzAndere>https://node-os.com/
04:58:33  <prometh>yeah, years ago
04:58:44  <GanzAndere>I just heard of it. I'm new to js
04:58:48  * Silveringquit (Quit: Textual IRC Client: www.textualapp.com)
04:58:54  <prometh>yep, i haven't used nodeos yet
04:59:06  * Pandorianquit (Ping timeout: 272 seconds)
04:59:08  <prometh>i'm honestly waiting for the day that they start building the UI with js
04:59:19  <GanzAndere>oh yeah
04:59:33  * armyriadquit (Quit: Leaving)
04:59:34  <GanzAndere>I wonder if there is a node.js window manager.
04:59:48  <jaawerth>java is crazy entrenched in the slow-moving enterprise space though
04:59:48  * GonzaloGM_joined
04:59:50  <GanzAndere>or any Xlib binding
04:59:55  * Cohedrinquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:00:04  <GanzAndere>If so, that's cool and there you go
05:00:14  <GanzAndere>if not, you can Iguess write a binding lib
05:00:20  <GanzAndere>tedious, but doable.
05:00:26  * hndkjoined
05:00:33  <jaawerth>and while I dislike it, there are things about it that make it hard to replace with javascript or anything else that isn't precompiled
05:00:54  <jaawerth>well, in the sense that java is particularly wrt types
05:00:54  * melvin_joined
05:00:54  <GanzAndere>I find Java to be ridiculous, slow, and just cumbersome.
05:01:06  <GanzAndere>I hate how slow and unresponsive the java apps on a pc are
05:01:10  <jaawerth>yeah, I loath it but I get why it certain aspects are the way they are
05:01:27  <GanzAndere>the gui is always terrible.
05:01:32  <GanzAndere>swing is trash.
05:01:33  * marthinaljoined
05:01:34  <jaawerth>though, frankly, clunky java apps are just what you get when it isn't well-built
05:01:46  <GanzAndere>just... screw java, man. Too verbose. Too much needless typing.
05:01:53  <GanzAndere>too... patterny.
05:02:04  <GanzAndere>I sometimes don't like objects.
05:02:08  <GanzAndere>I know. I'm mental.
05:02:19  * gothicsouthquit (Quit: My iMac has gone to sleep. ZZZzzz…)
05:02:20  <jaawerth>yeah, the verbosity and repitition and everything-must-be-a-class-you-define is what I hate about it
05:02:51  * GonzaloGMquit (Ping timeout: 268 seconds)
05:03:26  <prometh>they probably wanted to make it easier to learn by making everything the same
05:03:35  <prometh>"do it this way... there is no other way... now you're a master"
05:03:55  * armyriadjoined
05:04:17  * gothicsouthjoined
05:04:37  <prometh>by the way: npmjs.com/supports-semigraphics
05:05:18  * iffraffquit (Ping timeout: 260 seconds)
05:05:25  * sibajoined
05:07:50  * EyePulpquit (Remote host closed the connection)
05:08:30  * EyePulpjoined
05:08:55  * computer2000quit (Ping timeout: 255 seconds)
05:11:27  * R34p3Rquit (Ping timeout: 240 seconds)
05:13:07  * gucci_meowjoined
05:13:10  * KaeruCTquit (Quit: My Mac has gone to sleep. ZZZzzz…)
05:13:42  * karmahackerjoined
05:13:49  * R34p3Rjoined
05:14:23  * Cohedrinjoined
05:14:28  * oojacobooquit (Quit: Peace)
05:14:33  * notadeveloperjoined
05:15:13  * Bockjoined
05:16:05  * sibaquit (Ping timeout: 240 seconds)
05:16:21  * promethquit (Quit: My Mac Mini has gone to sleep. ZZZzzz…)
05:16:31  * systemfaultquit (Ping timeout: 240 seconds)
05:17:23  * holdsworthquit (Ping timeout: 255 seconds)
05:17:35  * gucci_meowquit (Ping timeout: 240 seconds)
05:18:06  * snowkidindquit (Remote host closed the connection)
05:19:42  * holdsworthjoined
05:21:11  * hakatashiquit (Remote host closed the connection)
05:21:27  * k0nslquit (Quit: “If we don't believe in freedom of expression for people we despise, we don't believe in it at all — Noam Chomsky”)
05:21:28  * hakatashijoined
05:21:52  * k0nsljoined
05:21:52  * k0nslquit (Changing host)
05:21:52  * k0nsljoined
05:22:14  * notadeveloperquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:22:37  * k0nslquit (Client Quit)
05:22:46  * notadeveloperjoined
05:22:48  * notadeveloperquit (Client Quit)
05:25:05  * ErhardtMundtquit (Remote host closed the connection)
05:25:13  * ErhardtMundtjoined
05:25:56  * watersoul_quit (Ping timeout: 260 seconds)
05:27:01  * zsentinelquit (Ping timeout: 240 seconds)
05:27:03  * nahtnamjoined
05:27:21  * led1joined
05:28:38  * zsentineljoined
05:28:45  * k0nsljoined
05:28:46  * k0nslquit (Changing host)
05:28:46  * k0nsljoined
05:29:02  * lordjancsojoined
05:30:32  * goodenoughquit (Remote host closed the connection)
05:30:48  * goodenoughjoined
05:30:49  * led1quit (Remote host closed the connection)
05:30:56  * oojacoboojoined
05:32:27  * watersouljoined
05:32:40  * keithws_quit (Quit: keithws_)
05:33:27  * GonzaloGM_quit (Ping timeout: 240 seconds)
05:33:35  * led1joined
05:33:50  * systemfaultjoined
05:34:13  * watersoulquit (Read error: Connection reset by peer)
05:34:29  * k0nslquit (Quit: “If we don't believe in freedom of expression for people we despise, we don't believe in it at all — Noam Chomsky”)
05:35:50  * k0nsljoined
05:36:08  * k0nslquit (Changing host)
05:36:08  * k0nsljoined
05:36:28  * mcollinajoined
05:36:59  * k0nslquit (Client Quit)
05:37:27  * watersouljoined
05:38:02  * invariant1729joined
05:38:09  * zxcjoined
05:39:18  * keithws_joined
05:40:35  * mcollinaquit (Ping timeout: 240 seconds)
05:41:22  * YoYquit (Quit: Leaving...)
05:42:18  * tvwjoined
05:42:52  * YoYjoined
05:43:13  <robdrake>java does have one success story minecraft
05:43:34  <Havvy>robdrake: If Minecraft counts as a success, you have to add Runescape.
05:43:48  <poutine>if runescape counts, yahoo games counts also
05:43:50  <robdrake>don't know Runescape
05:44:01  * k0nsljoined
05:44:01  * k0nslquit (Changing host)
05:44:01  * k0nsljoined
05:44:17  <robdrake>and I like my virtual lego set
05:44:55  <Havvy>Anyways, Java has many many many success stories in the corporate world.
05:45:31  * zsentinelquit (Ping timeout: 240 seconds)
05:45:47  <kaylined>MineCraft isn't even Java anymore tho
05:46:02  <pstef_>You could write an operating system in Lisp, so I don't see why Go isn't considered "system level".
05:46:03  * mcollinajoined
05:46:11  <robdrake>it isn't, it's still a jar
05:46:45  <robdrake>as long as it runs on linux, I'm happy
05:46:57  * robdrakegoes back to writing js
05:47:21  * sibajoined
05:47:40  * zsentineljoined
05:48:04  * lpinjoined
05:48:58  * Cabanossiquit (Ping timeout: 264 seconds)
05:49:03  <Havvy>pstef_: Because it wasn't designed for writing operating systems, but rather networking systems.
05:49:06  <kaylined>I believe MineCraft is primarily C# now, since Micro$oft bought it out
05:49:16  <Havvy>kaylined: Minecraft for PC is still Java.
05:49:42  <mjora7>Minecraft is likely the most successful game of all time, bar Tetris, how could it not count as a win?
05:49:53  <Havvy>Minecraft Pocket Edition has always been some other language (though I cannot recall which)
05:49:57  <mjora7>And yeah, it's in Java.
05:50:03  <mjora7>Pocket edition was in C++ I believe.
05:50:05  <kaylined>Ah
05:50:12  * Alina-malinaquit (Ping timeout: 260 seconds)
05:50:14  <Protius>minecraft sucks tho
05:50:16  <Protius>like, so badly made
05:50:20  <kaylined>Back when Runescape was JS was mad lol
05:50:22  <Havvy>Microsoft has zero intention of rewriting the Minecraft codebase.
05:50:25  * mcollinaquit (Ping timeout: 246 seconds)
05:50:49  <kaylined>Before JS libraries really existed, and it was still infantile, was definitely a feat.
05:51:09  <Havvy>Runescape is Java though, not JavaScript.
05:51:17  <kaylined>Now it is
05:51:18  <Protius>runescape is even worse
05:51:20  <Protius>java is worst
05:51:22  <Protius>end
05:51:23  <Protius>xD
05:51:25  * Cabanossijoined
05:51:31  <Havvy>Runescape has always been Java.
05:51:35  <kaylined>It may have had Java backend originally as well
05:51:35  <mjora7>Disagree
05:51:40  <mjora7>And Runescape is Java not JS
05:51:47  <kaylined>But there was like 23mb of client side JS
05:52:06  <kaylined>You never had to install a JAR before, when it was all browser based
05:52:18  * k0nslquit (Quit: “If we don't believe in freedom of expression for people we despise, we don't believe in it at all — Noam Chomsky”)
05:52:18  <Havvy>Like, <canvas> wasn't a thing when Runescape was huge.
05:52:21  <GreenJello>kaylined, java runs (ran?) in browsers
05:52:30  <Protius>Havvy, pixel arrays are life
05:52:31  <Protius>xD
05:52:31  <Havvy>That 23mb thing was a JAR.
05:52:34  <kaylined>Was it?
05:52:49  <Havvy>Java was a plugin, just like Flash.
05:53:03  <Protius>and is bad, like flash
05:53:04  <Protius>same/same
05:53:36  * SuRfDeMoNjoined
05:53:41  * k0nsljoined
05:53:42  * k0nslquit (Changing host)
05:53:42  * k0nsljoined
05:53:52  <Havvy>If Runescape was JS, people would have taken JS seriously a lot sooner.
05:54:11  * armyriadquit (Quit: Leaving)
05:54:14  * k0nslquit (Client Quit)
05:54:15  <GreenJello>> implies people take js seriously
05:54:44  <Havvy>GreenJello: A lot of people take JS seriously.
05:54:53  <Havvy>There's entire conferences and everything.
05:54:56  <Protius>Havvy, people took js pretty seriously, there were webgames with like hundreds of k of players
05:54:59  * k0nsljoined
05:55:14  * k0nslquit (Changing host)
05:55:14  * k0nsljoined
05:55:16  <kaylined>Huh - interesting. I always thought it was JS oO
05:55:23  <GreenJello>how did they build those games? absolutely positioned pngs?
05:55:42  <Havvy>GreenJello: Runescape?
05:55:46  * k0nslquit (Client Quit)
05:55:51  <GreenJello>I remember all of the games from that time being java or flash
05:56:13  <Havvy>GreenJello: The browser gave the flash or java plugin the equivalent of a <canvas>.
05:56:28  <Protius>a lot of games were flash but tbh that's always been more about the editor and framework
05:56:37  <Protius>and its keyframes stuff etc
05:56:40  <GreenJello>yeah, Protius is saying that there were js games around that time
05:56:42  <Protius>vectors
05:56:42  <mjora7>The company that made RS is called Jagex, which is short for "Java Gaming Experts".
05:56:52  <kaylined>mjora: Yes I just googled that as well.
05:57:12  <GreenJello>you could make like tic-tac-toe in js
05:57:50  <GreenJello>we didn't have canvas or audio and js and browsers were slow running on slow hardware
05:58:27  * mjora7quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
05:58:34  * armyriadjoined
05:58:37  <Protius>there were still ways to have sounds
05:58:39  <Protius>>:D
05:59:07  * hndkquit (Quit: Leaving)
05:59:13  <Protius>what was it like, <embed type="WindowsMediaPlayer" id="audio1"> type thing
05:59:23  <Protius>add 6 of those, make em invisible
05:59:28  <Protius>>:D
05:59:42  <Havvy>And js engines were slow...
05:59:47  * mjora7joined
05:59:47  <Havvy>Protius: Pretty much
06:00:48  * jtthedev`joined
06:01:47  * Alina-malinajoined
06:01:51  * jtthedevquit (Ping timeout: 260 seconds)
06:02:05  * LeBlaaancquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:02:23  <Protius>anyway
06:02:33  <Protius>three.js still has an optional pixel array renderer
06:02:36  <Protius>so *shrug*
06:02:42  <dysfigured>can you add/edit package.json scripts from the command line without opening it in an editor?
06:02:48  <Protius>the tech's always been around
06:02:49  * k0nsljoined
06:02:49  * k0nslquit (Changing host)
06:02:49  * k0nsljoined
06:03:00  <Protius>dysfigured, I.. suppose..
06:03:05  <Protius>more a question for like, #linux though
06:03:13  <dysfigured>i mean with just npm
06:03:15  <dysfigured>it has npm set and such
06:03:23  <Protius>oh, sure
06:03:29  <Protius>for nearly everything
06:03:30  <dysfigured>but i'm reading through the man page and i can't quite figure it out
06:03:41  * Alina-malinaquit (Changing host)
06:03:42  * Alina-malinajoined
06:03:52  <dysfigured>like if i want to tell someone how to add a npm start script that just runs webpack i don't want to have to tell them to open it in a text editor
06:04:15  <Protius>scripts and stuff you probably have to
06:04:19  <dysfigured>:\
06:04:28  * gamelasterjoined
06:04:39  <Protius>why dont you just like um, have it set a config flag or something
06:04:44  <Protius>and have the webpack script in there regardless
06:05:23  * nodweberjoined
06:05:32  <Protius>so then its just like er
06:05:32  * jkridnerquit (Ping timeout: 255 seconds)
06:06:01  <rabbitear>https://www.youtube.com/watch?v=mcQ83tOZ4Wk
06:06:07  <Protius>npm config set webpack true; npm run webpack;
06:06:43  <dysfigured>Protius: i feel fairly certain that's gonna say the script doesn't exist
06:06:52  <Protius>dysfigured, no, so the script always exists
06:06:59  <Protius>you just set a config option to enable/disable
06:07:17  <Protius>the script can init whatever it needs to have 'webpack' do its thing
06:07:25  <Protius>which reads the config value
06:07:34  <Protius>or something
06:07:37  <Protius>just spitballing
06:07:53  <dysfigured>i mean, i'm talking about explaining to someone how to get started with npm
06:08:00  <dysfigured>not distributing a project of mine
06:08:01  * g0d355__quit (Ping timeout: 240 seconds)
06:08:40  <Protius>oh, ok, well, I dunno man, you can do stuff like ded with a substitute filter or whatever
06:08:47  * jkridnerjoined
06:08:48  <Protius>but its certainly not easier than just opening the file
06:08:49  <Protius>lol
06:08:56  <Protius>we're programmers dealing with programming
06:08:59  <Protius>we need to open files
06:09:46  <dysfigured>i mean, with yarn you can sidestep this issue entirely and just `yarn webpack` and be good to go
06:10:16  <Protius>I haven't used yarn, but I mean, if you're trying to demonstrate core principles like say webpack 101
06:10:19  <asteele>isnt that just punting the issue a little bit down the road
06:10:24  <Protius>id try to not abstract the concepts at all
06:10:32  <asteele>how can you reasonably be expected to use webpack or javascript if you cant edit a text file
06:10:33  <dysfigured>but without it, you need to either `node ./node_modules/.bin/webpack` or you need to open an editor and add a start script, and make sure you don't forget commas
06:10:39  <Protius>if yarn can do it, they should know WHAT its doing
06:10:43  <Protius>and ideally how
06:10:56  <dysfigured>the point isn't how hard it is to do, it's how much work you have to do to get there
06:11:07  <Protius>opening a file is zero work dude.
06:11:15  <Protius>its an expected part of any programming task.
06:11:46  <dysfigured>when you're a beginner, and you just want to be able to require() some cool thing you saw and get it bundled, which sounds super easy, every little step along the way adds up
06:12:02  <dysfigured>we're all "experts" at this and see it seems/feels like nothign
06:12:08  <Protius>right, the toolchain can be somewhat complex and even a bit cumbersome
06:12:09  <dysfigured>to beginners, it's a very different
06:12:10  <Protius>especially to the new
06:12:13  <asteele>i can see what you are saying, its slightly more convenient if you can use a cli command to do it, but i dont think the argument has too much weight. make your own bash script/alias if you want, it wont be that hard
06:12:20  <Protius>but I mean, thats what you sound like you're trying to explain lol
06:12:33  <Protius>I mean you dont need a toolchain at all
06:12:46  <Protius>if you dont want to use npm stuff in the browser, for example
06:12:53  <Protius>its a much simpler baseline to start with
06:13:04  <Protius>bundling can be added on to that as an additional concept
06:13:13  <Protius>even start with browserify/watchify
06:13:18  <Protius>much simpler than webpack certainly
06:13:19  * Miajoined
06:14:26  <Protius>good education is all about breaking complex ideas like a full toolchain - down to individual components, which are then layered to build incrementally to completion
06:14:33  <Protius>imo, anyway
06:14:54  <Protius>that makes even very complex things into a series of quite simple things
06:14:59  * DeltaHeavyquit (Ping timeout: 255 seconds)
06:16:31  * linuxuser9000joined
06:16:31  * m31271nquit (Remote host closed the connection)
06:18:55  * joyee_joined
06:19:41  * gamelasterquit (Ping timeout: 246 seconds)
06:20:01  * joyeequit (Ping timeout: 255 seconds)
06:20:10  <dysfigured>i'm trying to walk a friend through getting started with node and npm entirely
06:20:33  * joyee_quit (Remote host closed the connection)
06:20:45  <Protius>honestly just start with require() as purely a node concept
06:20:49  * joyeejoined
06:20:56  <Protius>then you need no toolchain at all
06:20:56  <dysfigured>and whiel i agree, education is good, understanding why/how is often secondary to getting the damn thing working
06:21:49  <Protius>so you have require() on the back, <script> on the front
06:21:54  <Protius>day one basic bitch setup
06:22:00  <dysfigured>they're coming from a pure PHP background, and wants to use https://material.io/components/web/docs/getting-started/ which recommends installing via npm
06:22:08  * jkridnerquit (Ping timeout: 240 seconds)
06:22:29  <Protius>well they probably need to start more foundationally
06:22:30  * zuck05quit (Excess Flood)
06:22:38  <Protius>!eloquent
06:22:38  <ecmabot>Protius: Eloquent JavaScript is a comprehensive introductory Web-based book with examples and a built-in interpreter. http://eloquentjavascript.net/
06:22:40  <Protius>^^
06:22:53  <Protius>they don't have to read/complete the whole thing but a good skim
06:22:53  * zuck05joined
06:23:02  <Protius>takes a few hours
06:23:42  <Protius>or im sure they have a build available somewhere
06:23:58  <Protius>just use that, you'll be up and running as easy as a require and a script tag
06:25:14  * genmortjoined
06:25:27  <Protius>or if they do want to use webpack, and thats where your current problems lie, check out their getting started guide not material.io's
06:25:32  <Protius>lots of options
06:25:38  * plauclairquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:25:51  * apparitionquit (Quit: Bye)
06:26:06  * jkridnerjoined
06:26:10  * mr-foobarjoined
06:28:16  <Protius>hm
06:28:21  * gucci_meowjoined
06:28:35  <Protius>itd probably be good to have `npm init` do `npm link`
06:28:41  <Protius>like, you're making a new module locally
06:28:58  <Protius>chances are you're going to want to develop with it heh
06:29:09  <Protius>and even if you don't a symlink isn't exactly 'expensive'
06:32:41  * gothicsouthquit (Quit: My iMac has gone to sleep. ZZZzzz…)
06:32:48  * gucci_meowquit (Ping timeout: 260 seconds)
06:34:08  * Cabanossiquit (Ping timeout: 245 seconds)
06:35:58  * Cabanossijoined
06:38:05  * k0nslquit (Quit: “If we don't believe in freedom of expression for people we despise, we don't believe in it at all — Noam Chomsky”)
06:39:51  * oojacobo_joined
06:41:06  * k0nsljoined
06:41:06  * k0nslquit (Changing host)
06:41:06  * k0nsljoined
06:41:18  * systemfaultquit (Quit: Bye!)
06:41:58  * k0nslquit (Remote host closed the connection)
06:43:01  * zsentinelquit (Ping timeout: 240 seconds)
06:43:37  * oojacobooquit (Ping timeout: 272 seconds)
06:43:44  * zsentineljoined
06:44:53  * stalledquit (Ping timeout: 246 seconds)
06:45:00  * oojacobo_quit (Read error: Connection reset by peer)
06:47:25  * k0nsljoined
06:47:26  * k0nslquit (Changing host)
06:47:26  * k0nsljoined
06:47:51  * lynx-rjoined
06:48:37  * FuzzyWuzzyPandajoined
06:48:49  * oojacoboojoined
06:49:08  * FuzzyWuzzyPandaquit (Client Quit)
06:49:29  * zero1one0quit
06:50:53  * Booster2ooojoined
06:51:24  * zumba_addictjoined
06:51:43  * jtthedev`quit (Read error: Connection reset by peer)
06:51:51  * nodweberquit (Remote host closed the connection)
06:51:55  * zero1one0joined
06:52:14  <zumba_addict>hey folks, if you have 2 versions of npm installed, how did you set it up? Did you just rename the binary?
06:53:51  * zero1one0quit (Client Quit)
06:54:06  <sneakertack>zumba_addict, you could consider a node version manager, like https://github.com/creationix/nvm or https://www.npmjs.com/package/n
06:54:07  * zero1one0joined
06:55:07  <sneakertack>though they're intended for multiple node instances (with multiple npm instances as a side thing)... are you asking specifically for multiple npm instances?
06:58:46  * Cohedrinquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:59:05  * stalledjoined
07:01:59  * genmortquit (Ping timeout: 272 seconds)
07:02:29  * keithws_quit (Ping timeout: 268 seconds)
07:03:00  * m31271njoined
07:04:56  * stalledquit (Ping timeout: 255 seconds)
07:07:46  <dysfigured>how in the world doo you get webpack to resolve @imports in node_modules without going and altering your deps paths to use ~ prefix
07:08:33  <dysfigured>and by @import i mean scss imports
07:12:01  * SuRfDeMoNquit (Ping timeout: 240 seconds)
07:17:57  * scranttjoined
07:18:06  <scrantt>Hi there. Is there any way to get a list of all npm packages though some kind of API?
07:18:52  * gambl0requit (Ping timeout: 260 seconds)
07:19:26  * pstef__joined
07:20:03  * mjora7quit (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
07:20:05  * stalledjoined
07:20:35  * SuRfDeMoNjoined
07:20:37  * munch_joined
07:21:05  * GanzAnderequit (Ping timeout: 240 seconds)
07:21:38  * gamelasterjoined
07:22:13  * Miaquit (Read error: Connection reset by peer)
07:23:05  * munch_quit (Client Quit)
07:23:50  * m31271nquit (Ping timeout: 255 seconds)
07:23:53  * plauclairjoined
07:24:22  * linuxuser9000quit (Ping timeout: 255 seconds)
07:25:46  * munch_joined
07:26:09  * scranttquit (Quit: Page closed)
07:28:34  * ^escquit (Ping timeout: 276 seconds)
07:30:39  * roomcayzjoined
07:30:58  * rendarjoined
07:34:55  * Cabanossiquit (Ping timeout: 272 seconds)
07:36:05  * Cabanossijoined
07:36:09  * apparitionjoined
07:36:57  * Pandorian_quit (Ping timeout: 240 seconds)
07:37:42  * marthinalquit (Read error: Connection reset by peer)
07:38:42  <modernpacifist>33
07:41:45  * joyeequit (Remote host closed the connection)
07:42:28  * mezodjoined
07:43:03  * tvwquit
07:43:47  * joyeejoined
07:44:22  * chargenjoined
07:44:43  <rabbitear>https://www.youtube.com/watch?v=8zHdLF3-coA
07:45:32  * marthinaljoined
07:45:53  * KermitoniTquit (Quit: This computer has gone to sleep)
07:47:11  * chippingquit (Ping timeout: 246 seconds)
07:47:20  * invariant1729quit (Ping timeout: 260 seconds)
07:48:12  * KermitoniTjoined
07:48:24  * chippingjoined
07:48:57  * k0nslquit (Quit: “If we don't believe in freedom of expression for people we despise, we don't believe in it at all — Noam Chomsky”)
07:51:19  * k0nsljoined
07:51:19  * k0nslquit (Changing host)
07:51:19  * k0nsljoined
07:51:47  * nodweberjoined
07:53:00  * cotkojoined
07:56:46  * chovy_quit (Ping timeout: 255 seconds)
08:01:59  * k0nslquit (Quit: “If we don't believe in freedom of expression for people we despise, we don't believe in it at all — Noam Chomsky”)
08:02:51  * k0nsljoined
08:02:51  * k0nslquit (Changing host)
08:02:51  * k0nsljoined
08:03:29  * joyeequit (Remote host closed the connection)
08:05:07  * lemonsparrowjoined
08:06:26  * a_thakurquit (Remote host closed the connection)
08:06:54  * a_thakurjoined
08:06:57  * m31271njoined
08:07:36  <Industrial>Anyone here use Highland.js?
08:07:39  <Industrial>(there can be only one)
08:08:21  <Industrial>I'm wondering what the best way is to make streams reusable and composable if you are defining them as highland(x).map().filter().reduce()
08:08:35  <Industrial>instead of new MyTransformStream()
08:08:49  * zxcquit (Read error: Connection reset by peer)
08:09:20  * lemonsparrowpart
08:09:50  * xarvisjoined
08:10:10  * sinclairquit (Read error: Connection reset by peer)
08:10:29  * goodenoughquit (Remote host closed the connection)
08:11:07  * a_thakurquit (Ping timeout: 246 seconds)
08:11:56  * joyeejoined
08:15:57  * joyeequit (Ping timeout: 240 seconds)
08:16:14  * joyeejoined
08:16:38  * LiftLeftquit (Ping timeout: 245 seconds)
08:17:36  * wtrockijoined
08:18:56  * a_thakurjoined
08:19:44  * SuRfDeMoNquit (Ping timeout: 246 seconds)
08:22:22  * KermitoniTquit (Quit: This computer has gone to sleep)
08:23:09  * KermitoniTjoined
08:24:14  * KermitoniTquit (Client Quit)
08:24:52  * sillysluxjoined
08:26:01  * sillysluxpart
08:26:57  * invariant1729joined
08:27:48  <Industrial>Does anyone know a YAML parser and serializer
08:27:53  <Industrial>that is commutative?
08:28:20  <Industrial>e.g. stringify(parse(json)) === stringify(parse(stringify(parse(json)))
08:28:37  * genmortjoined
08:29:01  <Industrial>hm, i guess that's not commutativity
08:29:29  <Industrial>which is `f(x, y) === f(y, x)`
08:33:40  * bwnquit (Ping timeout: 240 seconds)
08:33:54  * sinclairjoined
08:35:31  * toijoined
08:37:15  * plauclairquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:38:40  * kaylinedquit (Ping timeout: 260 seconds)
08:39:54  * thunder-ltujoined
08:39:59  * toiquit (Ping timeout: 240 seconds)
08:40:10  * wtrjoined
08:41:46  * wtrockiquit (Ping timeout: 268 seconds)
08:43:27  * xarvisquit (Ping timeout: 240 seconds)
08:45:45  * soee_joined
08:47:23  * fwilsonquit (Ping timeout: 246 seconds)
08:47:57  * xkapastelquit (Quit: Connection closed for inactivity)
08:48:05  * lynx-rquit (Ping timeout: 246 seconds)
08:48:42  * rchavikjoined
08:48:58  * Cabanossiquit (Ping timeout: 264 seconds)
08:50:03  * hextileXjoined
08:51:14  * Cabanossijoined
08:51:34  * johnjoined
08:51:45  * mcollinajoined
08:51:58  * johnchanged nick to Guest30741
08:52:08  * chovyjoined
08:54:02  * dman777quit (Quit: leaving)
08:54:10  * FozzWorthquit (Ping timeout: 240 seconds)
08:54:28  * bwnjoined
08:56:53  * FozzWorthjoined
08:58:29  * DeltaHeavyjoined
09:04:36  * wonko7joined
09:06:47  * DeltaHeavyquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:07:26  * Snugglebashjoined
09:14:56  * sobersabrejoined
09:16:30  * mcollinaquit (Remote host closed the connection)
09:20:16  * bradfordli123quit (Remote host closed the connection)
09:22:59  * Silencedjoined
09:24:50  * TheFuzzballjoined
09:25:58  * k0nslquit (Quit: “If we don't believe in freedom of expression for people we despise, we don't believe in it at all — Noam Chomsky”)
09:26:07  * k0nsljoined
09:26:07  * k0nslquit (Changing host)
09:26:08  * k0nsljoined
09:26:27  * TheFuzzballquit (Client Quit)
09:27:30  * shmujoined
09:28:36  * praisethemoonjoined
09:29:01  * lu_tzequit (Ping timeout: 255 seconds)
09:30:20  * SaltyVagrantjoined
09:30:23  * JD-Robbsjoined
09:31:35  * praisethemoon_joined
09:34:08  * Cabanossiquit (Ping timeout: 245 seconds)
09:34:58  * praisethemoonquit (Ping timeout: 245 seconds)
09:36:10  * Cabanossijoined
09:41:20  * wonko7quit (Quit: See You Space Cowboy..)
09:41:22  * lu_tzejoined
09:41:47  * wonko7joined
09:41:50  * wonko7quit (Client Quit)
09:42:21  * plexigrasjoined
09:42:42  * foddoquit (Quit: Connection closed for inactivity)
09:43:28  * wonko7joined
09:44:10  * ahmedelgabrijoined
09:45:35  * SaltyVagrantpart
09:45:54  * SaltyVagrantjoined
09:46:57  * chargenquit (Ping timeout: 240 seconds)
09:49:46  * praisethemoon_quit (Quit: Leaving)
09:49:46  * ahmed_elgabrijoined
09:50:17  * safejoined
09:50:46  * chargenjoined
09:52:25  * ahmedelgabriquit (Ping timeout: 255 seconds)
09:52:27  * chippingquit (Ping timeout: 240 seconds)
09:54:09  * chippingjoined
09:56:05  * praisethemoonjoined
09:57:07  * soee_quit (Quit: Konversation terminated!)
09:59:46  * sneakertackquit (Remote host closed the connection)
10:02:58  * invariant1729quit (Ping timeout: 240 seconds)
10:05:56  * nodweberquit (Remote host closed the connection)
10:07:16  * genmortquit (Quit: genmort)
10:07:51  * nodweberjoined
10:09:59  * praisethemoon_joined
10:12:55  * praisethemoonquit (Ping timeout: 260 seconds)
10:16:05  * Aquazijoined
10:16:31  * toijoined
10:17:02  * joyeequit (Remote host closed the connection)
10:18:22  * ckckckckquit (Read error: Connection reset by peer)
10:19:32  * minexujoined
10:20:00  * ed209quit (Remote host closed the connection)
10:20:06  * ed209joined
10:21:28  * alextesquit (Ping timeout: 272 seconds)
10:22:56  * toiquit (Ping timeout: 246 seconds)
10:24:17  * prillian5joined
10:24:48  * Moonlight-Angelquit (Remote host closed the connection)
10:25:08  * mylesborinsquit (Quit: farewell for now)
10:25:39  * mylesborinsjoined
10:26:39  * Moonlight-Angeljoined
10:29:32  * MrAbaddonjoined
10:31:07  * ewonoujoined
10:34:01  * toijoined
10:34:15  * genmortjoined
10:37:24  <mylord>what’s up with this syntax? it’s TS? how do I use it in my node.js? import mongoose, { Schema } from 'mongoose' ?
10:37:30  <mylord>from here : https://github.com/codepunkt/mongoose-patch-history
10:37:53  * leonidajoined
10:38:13  * bongjovijoined
10:38:32  * Supernovahquit
10:38:52  * gucci_meowjoined
10:39:19  <mylord>i guess with this? https://github.com/TypeStrong/ts-node
10:40:42  <leonida>hello
10:41:13  <leonida>I'm new to web development and I have to develop a web application that will run on a single machine. I would like to use node.js to learn it but I'd ask an opinion about the architecture: in that case, which is the best approach? Using node.js to develop a backend, and a framework like angular to develop a frontend?
10:42:12  * megamacedjoined
10:42:42  * nodweberquit (Remote host closed the connection)
10:43:42  * GnarlyBobjoined
10:44:30  * gliquit (Quit: Leaving)
10:45:41  * otisZartjoined
10:47:17  * laroijoined
10:48:54  <laroi>Hey Guys, i have an api which streams video from s3 via nodejs server. the video works fine on a browser, but it doesn't work in video players like VLC, any idea what more I need to make it working on a video player?
10:50:36  * Cabanossiquit (Ping timeout: 272 seconds)
10:51:16  * Cabanossijoined
10:52:06  * nodweberjoined
10:53:07  * m31271nquit (Ping timeout: 268 seconds)
10:53:18  * Jenquit (Ping timeout: 245 seconds)
10:53:34  * rhonabwyquit (Quit: Leaving)
10:54:10  * wtrquit (Quit: I will be back! ^^)
10:54:48  * m31271njoined
10:55:11  * rhonabwyjoined
10:56:18  * zuck05quit (Ping timeout: 272 seconds)
10:59:39  * m31271nquit (Remote host closed the connection)
11:00:08  * m31271njoined
11:00:38  * leonidaquit (Quit: Sto andando via)
11:01:02  * praisethemoon_quit (Quit: Leaving)
11:04:43  * m31271nquit (Ping timeout: 260 seconds)
11:04:56  * apparitionquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:06:07  * cadsquit (Quit: Leaving)
11:08:33  * Keverwquit (Quit: Textual IRC Client: www.textualapp.com)
11:09:14  * nahtnamquit (Quit: Connection closed for inactivity)
11:10:35  * undertugajoined
11:11:23  * roomcayzquit (Remote host closed the connection)
11:11:37  * toiquit (Quit: Leaving.)
11:11:53  * toijoined
11:16:37  * roomcayzjoined
11:20:29  * rchavikquit (Quit: -)
11:20:54  * Hoffmanjoined
11:22:42  * plutoniixquit (Quit: Leaving)
11:23:03  * mr_loujoined
11:23:55  * zxcjoined
11:25:06  * roomcayzquit (Ping timeout: 258 seconds)
11:28:24  * raynoldquit (Quit: Connection closed for inactivity)
11:30:14  * rorrojoined
11:30:15  * HoierM_joined
11:31:35  * rangergordjoined
11:31:35  * AlterDelvejoined
11:33:34  <rangergord>offtopic question for you enterprise types: should I be sending rich text emails in my mail client, or plaintext? I want to know what non-devs expect, not what a Linux rah-rah vim user wants.
11:34:01  <rangergord>I've been thrust in a situation dealing exclusively with non-devs for the foreseeable future
11:34:45  * samschjoined
11:35:10  * Cabanossiquit (Ping timeout: 264 seconds)
11:36:23  * Cabanossijoined
11:36:27  <Naan>hey if I want to do something as simple as callback(err, success), what do people usually use for success? Is a boolean okay or is it convention to use an enum
11:37:31  * laroiquit (Ping timeout: 268 seconds)
11:38:22  <Protius>Naan, if you dont need to pass anything in on success for processing, you can just not pass anything, or pass any truthy value if you prefer
11:38:30  <rangergord>there's no enums in JS. err would be the error object. Which, by checking if (err), would evaluate to true if not null.
11:38:57  * wadiejoined
11:39:28  * KaeruCTjoined
11:39:30  <Naan>oh so i guess i could just use callback(err) for now
11:39:38  <Naan>unless I need success for something more useful
11:39:38  * KaeruCTquit (Client Quit)
11:39:54  <Naan>:)
11:40:12  <rangergord>yeah
11:40:34  * dongustonjoined
11:41:04  <rangergord>not to be that guy, but I think people nowadays are using promises or async instead of classic callbacks
11:41:07  * Ergojoined
11:42:39  <Naan>yeah i saw that thanks
11:42:57  * HoierM_quit (Ping timeout: 240 seconds)
11:45:14  * gregf_joined
11:46:08  <Protius>hey whats the best httpd module?
11:46:19  <Protius>I ideally need ssh
11:46:25  <Naan>oh id idn't know about the async library rangergord thank you
11:49:38  * romeohjoined
11:52:22  * laroijoined
11:52:27  * MINIMAN10000joined
11:53:53  * zuck05joined
11:54:48  * cannapjoined
11:54:55  * ewonouquit (Remote host closed the connection)
11:55:02  <samsch>Protius, Assuming you want to serve content ("httpd" usually means apache), node has an https module built in, which can serve over tls (where I'm assuming you meant ssl, not ssh).
11:55:23  <samsch>Protius, https://nodejs.org/api/all.html#https_https
11:55:46  <samsch>If you want a little bit more framework around it, then Express is very popular.
11:56:09  <rangergord>Naan: my mistake. it's not meant to be a library, Javascript itself is adding the async keyword, but Node doesn't support it yet. But Node does support promises.
11:56:10  * nattenquit (Remote host closed the connection)
11:56:16  <Protius>I want somewhere in between those two samsch
11:56:23  <Protius>not 100% raw so im writing a webserver
11:56:34  <Protius>not 100% inclusive like Express
11:56:35  * HoierM_joined
11:56:41  <Protius>I really just need the simplest, but with https
11:57:07  <rangergord>Protius: who's forcing you to use all of Express's features? You can just use it for extremely simple routing of a URL to a function
11:57:12  <samsch>Protius, There isn't much middleground between them...
11:57:56  * chippingquit (Ping timeout: 260 seconds)
11:57:57  <Protius>lol realistically im just looking for something like npm/httpd
11:58:00  <Protius>but with ssh
11:58:01  * laroiquit (Ping timeout: 240 seconds)
11:58:10  <rangergord>are you trolling?
11:58:11  <Protius>er
11:58:16  <Protius>npm/http-server
11:58:17  * chippingjoined
11:58:26  <rangergord>ah, you mean SSL
11:58:36  <Protius>ah yeah, sorry haha
11:58:44  <samsch>(Which is replaced by tls)
11:58:56  <Protius>well ill just say https
11:58:59  <Protius>from here on out
11:59:26  <rangergord>but still...don't think of Express as "this huge thing I must learn". You never need to go beyond this example: https://expressjs.com/en/starter/hello-world.html
11:59:31  <Protius>oh wait http-server does do https now!
11:59:33  <Protius>it seems
11:59:34  * mezodquit (Remote host closed the connection)
11:59:36  <samsch>Yep
11:59:37  <Protius>well then lol
11:59:42  <Protius>done deal
11:59:44  * ddelrio1986_joined
11:59:50  <Protius>rangergord, eh, yeah nah ive heard good things
11:59:59  * justelexjoined
12:00:39  <samsch>Another thing to take into consideration is having an nginx proxy which terminates https, and can also serve your static files, leaving node to just do dynamic stuff.
12:01:34  * huseyinkozanquit (Ping timeout: 255 seconds)
12:02:10  * huseyinkozanjoined
12:02:53  * mezodjoined
12:03:18  <Protius>that sounds really slow and a complex transaction versus just supporting https eh
12:04:22  <samsch>Well, it's actually faster...
12:04:46  <Protius>without knowing the exact details of both implementations that's a pretty arbitrary determination :P
12:05:13  <samsch>nginx is a faster static server than node, pretty much absolutely.
12:05:22  <Protius>I can imagine that might be the case at times, but it certainly wouldn't always be the case.
12:05:35  <Protius>anyway, its a moot discussion haha
12:05:52  <Protius>im supporting https internally, its a project requirement
12:05:57  * jameskyburzquit (Ping timeout: 240 seconds)
12:06:03  <samsch>Yeah, the performance isn't a big enough deal to worry about unless you're actually starting to scale a lot.
12:06:33  * gucci_meowquit (Remote host closed the connection)
12:06:40  * nattenjoined
12:06:53  * toiquit (Ping timeout: 258 seconds)
12:08:23  <Protius>this is a thing that tbh each server/process is only used by one person to do 1 thing at a time
12:08:28  <Protius>or well, 1 api of things
12:08:38  <Protius>new user=>new server
12:08:51  * RunThroughMedia_quit (Quit: Connection closed for inactivity)
12:08:53  <Protius>or httpd
12:10:44  * Snugglebashquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
12:11:43  * laroijoined
12:12:01  * foddojoined
12:12:05  * hextileXquit (Ping timeout: 240 seconds)
12:12:07  * ddelrio1986_quit (Quit: This computer has gone to sleep)
12:12:22  * ddelrio1986_joined
12:13:00  * ddelrio1986_quit (Remote host closed the connection)
12:13:49  * minexuquit (Ping timeout: 260 seconds)
12:14:19  * JD-Robbsquit (Quit: ChatZilla 0.9.93 [Firefox 53.0.2/20170504105526])
12:15:02  * gucci_meowjoined
12:15:13  * bongjoviquit (Quit: My Mac has gone to sleep. ZZZzzz…)
12:15:14  * romeohquit (Remote host closed the connection)
12:15:20  * mr_louquit (Quit: Ex-Chat)
12:15:53  * romeohjoined
12:17:15  * AlterDelvequit (Quit: Leaving)
12:17:56  * ThePendulumjoined
12:19:08  * Cabanossiquit (Ping timeout: 245 seconds)
12:19:37  * prillian5quit (Quit: Konversation terminated!)
12:20:01  * romeohquit (Ping timeout: 240 seconds)
12:21:28  * Cabanossijoined
12:22:02  * mcollinajoined
12:29:42  * uakoBjoined
12:29:48  * EyePulpquit (Ping timeout: 240 seconds)
12:30:23  * Aquaziquit (Ping timeout: 260 seconds)
12:30:36  * uakoBquit (Client Quit)
12:31:12  * uakoBjoined
12:31:17  * ewonoujoined
12:31:26  * ewonouquit (Remote host closed the connection)
12:31:45  * ewonoujoined
12:32:44  * mcollinaquit (Remote host closed the connection)
12:32:47  * bongjovijoined
12:33:53  * chjjquit (Ping timeout: 260 seconds)
12:34:11  * Snugglebashjoined
12:34:25  * mcollinajoined
12:35:06  * thunder-ltuquit (Remote host closed the connection)
12:35:31  * Alina-malinaquit (Ping timeout: 240 seconds)
12:37:01  * JonathanMcClarequit (Quit: leaving)
12:37:04  * gregf_quit (Quit: Page closed)
12:38:27  * webguynowquit (Ping timeout: 240 seconds)
12:38:40  * jameskyburzjoined
12:39:28  * JonathanMcClarejoined
12:40:11  * m31271njoined
12:40:30  * huseyinkozanquit (Quit: Çıktım)
12:40:40  * webguynowjoined
12:40:49  * thunder-ltujoined
12:41:05  * safequit (Read error: Connection reset by peer)
12:41:11  * megamacedquit (Quit: Leaving)
12:42:07  * e14joined
12:42:08  * mcollinaquit (Remote host closed the connection)
12:43:13  * ahmed_elgabriquit (Ping timeout: 260 seconds)
12:46:36  * e14quit (Client Quit)
12:46:57  * rangergordquit
12:49:44  * jameskyburzquit (Ping timeout: 260 seconds)
12:49:55  * ewonouquit (Remote host closed the connection)
12:50:18  * Cabanossiquit (Ping timeout: 272 seconds)
12:50:42  * jameskyburzjoined
12:50:49  * laroiquit (Remote host closed the connection)
12:51:23  * Cabanossijoined
12:51:51  * etosjoined
12:51:56  * a_thakurquit (Remote host closed the connection)
12:53:29  * ahmed_elgabrijoined
12:54:42  * franckapikjoined
12:54:48  <franckapik>Hey !!
12:54:52  * DeltaHeavyjoined
12:55:04  <franckapik>i have one problem in javascript i would like to understand
12:55:58  <franckapik>i try to parse a json file, with a for loop. When i use array.push, it says that array is not defined
12:56:15  <franckapik>even if i define it out of the for loop brackets
12:56:30  <DeltaHeavy>franckapik Why are you parsing JSON using anything other than JSON.parse() ?
12:56:36  * fwilsonjoined
12:56:38  * jameskyburzquit (Ping timeout: 260 seconds)
12:56:42  * re1joined
12:57:05  <franckapik>hum good question...
12:57:10  * Cassiopayajoined
12:57:15  <franckapik>i just would like to get data from json to a table
12:57:20  <DeltaHeavy>Also make a testcase at jsfiddle.net but yeah...don't parse JSON with anything but JSON.parse
12:57:22  <franckapik>array*
12:57:25  <franckapik>soorry
12:59:00  * zumba_addictquit (Remote host closed the connection)
12:59:59  * ahmed_elgabriquit (Ping timeout: 260 seconds)
13:00:04  * ahmedelgabrijoined
13:00:18  <rendar>should i use a framework for file uploads, like formidable?
13:00:48  * chjjjoined
13:01:05  * a_thakurjoined
13:02:43  * a_thakurquit (Read error: Connection reset by peer)
13:02:45  * a_thakur_joined
13:05:35  * ExoUNXjoined
13:06:15  * a_thakurjoined
13:07:01  * a_thakur_quit (Ping timeout: 240 seconds)
13:07:15  * computer2000joined
13:07:47  * promethjoined
13:08:51  <shoky>rendar: that's not a framework, and yes you should use a module to help with file uploads. most people probably use multer (with express)
13:09:31  * Alina-malinajoined
13:09:59  <rendar>shoky: ok
13:10:17  <Protius>hey someone a while ago said
13:10:23  <Protius>that even for stuff thats npm link'd
13:10:27  * vkarehjoined
13:10:34  * nodweberquit (Remote host closed the connection)
13:10:54  <Protius>I should npm install a 'dummy' package that's just empty and can be replaced later or something
13:10:57  <Protius>does that seem right
13:11:21  <joepie91>rendar: the common options are `multer` (which automatically stores every file on disk and gives you the path for it), and `busboy` (which gives you a stream and leaves it up to you where to put it). if you're not sure what you need, you want `multer`, but if you want to directly work with a stream without storing it to disk (and the additional complexity is not a problem for you), then `busboy` can be useful
13:11:25  * jameskyburzjoined
13:11:57  * gucci_meowquit (Remote host closed the connection)
13:12:18  * computer2000quit (Quit: Leaving)
13:12:29  * octetcloudjoined
13:13:02  * mcollinajoined
13:14:26  * Alina-malinaquit (Ping timeout: 246 seconds)
13:15:05  * computer2000joined
13:15:11  * joyeejoined
13:15:22  * nodweberjoined
13:15:30  * shakes808joined
13:17:05  <Protius>easier question
13:17:08  * mcollinaquit (Ping timeout: 240 seconds)
13:17:25  <Protius>ah its ok sorted
13:18:58  * Cabanossiquit (Ping timeout: 264 seconds)
13:19:35  * joyeequit (Ping timeout: 240 seconds)
13:20:59  <prometh>joepie91: people are telling me that npmjs.com/suppports-semigraphics has an unclear use case (??)
13:21:25  * Cabanossijoined
13:23:06  <prometh>oops -- npmjs.com/supports-semigraphics
13:23:51  * a_thakurquit (Remote host closed the connection)
13:24:19  * a_thakurjoined
13:25:28  * plexigrasquit (Ping timeout: 258 seconds)
13:26:02  * sibaquit (Quit: My Mac has gone to sleep. ZZZzzz…)
13:26:21  * EyePulpjoined
13:28:52  * iffraffjoined
13:29:06  * bongjoviquit (Read error: Connection reset by peer)
13:29:18  <prometh>i don't know how i can be more clear without sounding childish
13:29:58  <prometh>"Some of us love character spinners and progress bars..."
13:30:08  * iffraffquit (Remote host closed the connection)
13:30:19  * iffraffjoined
13:31:22  * ilyaigpetrovjoined
13:31:36  <DeltaHeavy>iffraff What do your export statements look like in the module you're importing?
13:31:41  <DeltaHeavy>Wrong channel :/
13:32:03  * praisethemoonjoined
13:35:07  * Snugglebashquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:36:24  <Naan>could the redirect here happen before flagValidationError comes back? https://gist.github.com/HanaanY/164489ccb72716e2275e4de83be6ebd6
13:36:41  * Snugglebashjoined
13:36:47  * sondr3joined
13:38:58  * DeltaHeavyquit (Quit: Textual IRC Client: www.textualapp.com)
13:42:08  * led1quit (Quit: led1)
13:42:15  <kakashiAL>I wrote a validator that suits my needs after a lot of strugle :/
13:42:22  * sondr3quit (Ping timeout: 255 seconds)
13:42:23  <kakashiAL>this is the api of my validator:
13:42:27  <kakashiAL>https://paste.xinu.at/xwuw/js
13:43:02  * plutoniixjoined
13:43:27  * inhwjsjoined
13:43:33  <inhwjs>Naan: i think so
13:43:40  <inhwjs>cant you just move the redirect inside the callb ack
13:43:52  <kakashiAL>this is the implementation of it:
13:43:55  <kakashiAL>https://paste.xinu.at/R28/js
13:44:04  <kakashiAL>could you please tell me if there is something wrong with it
13:44:06  <Naan>I'm working on something similiar kakashiAL but i'm going to try to use "express-validator"
13:44:07  * plutoniixquit (Max SendQ exceeded)
13:44:29  <kakashiAL>if the api is bad or the validation is bad?
13:44:33  * BSAlbquit (Ping timeout: 268 seconds)
13:44:40  * plutoniixjoined
13:44:57  <Naan>inhwjs: yes I could but in that case is there any point in using the callback pattern for validateRegistration ?
13:45:06  <kakashiAL>Naan: my plan is to have something that I can use on client and server, now I test the soul out of it :)
13:45:35  <kakashiAL>my problem is that I dont know what good function api design is
13:46:10  <kakashiAL>I also dont know if my implementation is good or if it can lead me to problems in the future
13:46:55  * GanzAnderejoined
13:46:57  * k0nslquit (Quit: “If we don't believe in freedom of expression for people we despise, we don't believe in it at all — Noam Chomsky”)
13:47:08  * inhwjsquit (Quit: Page closed)
13:47:18  * k0nsljoined
13:47:18  * k0nslquit (Changing host)
13:47:18  * k0nsljoined
13:47:28  <prometh>does anyone think that this readme is unclear?: npmjs.com/supports-semigraphics
13:47:51  <kakashiAL>are these questions stupid or vague?
13:48:32  * gregf_joined
13:48:53  * apparitionjoined
13:48:59  * dealy__joined
13:49:02  * dealy___joined
13:49:10  <prometh>kakashiAL: looks fine to me
13:49:14  * dealy____joined
13:49:33  * Cabanossiquit (Ping timeout: 245 seconds)
13:49:40  <kakashiAL>prometh: the way how I asked is also okay? nothing bad?
13:49:46  * synthmeatquit (Quit: WeeChat 1.8)
13:50:07  * synthmeatjoined
13:50:20  <prometh>was fine.. but i guess you could've shortened it to "what do you think of my simple form validation api"
13:50:23  * BSaboiajoined
13:50:56  <kakashiAL>prometh: some people, who are smarter than me, said that "what do you think about X" is a bad way to ask
13:51:09  <prometh>oh, maybe they're right :)
13:51:26  <kakashiAL>BETTER: "is something wrong with X" is much easier to answer, and that's what you REALLY want to know
13:51:28  * Cabanossijoined
13:51:29  <prometh>maybe "waht are your thoughts"
13:51:32  <franckapik>Someone could help me on this : https://github.com/Franckapik/jardin/blob/master/public/graphique.js
13:52:04  <franckapik>i would like to put data from a array in a JSON file in another javascript object array !
13:52:24  * BSAlbjoined
13:52:33  * Protiusquit (Quit: Leaving)
13:52:34  <franckapik>here it's parseJSON function name
13:52:58  <franckapik>for now i have the error : .push is not a fonction
13:54:36  * ddelrio1986_joined
13:54:57  <franckapik>here is the json file : https://github.com/Franckapik/jardin/blob/master/public/message.json
13:55:26  * invariant1729joined
13:55:57  * BSaboiaquit (Ping timeout: 240 seconds)
13:58:06  <kakashiAL>franckapik: do you know what defensive programming is?
13:58:47  <franckapik>kakashiAL: i'm sorry i don't understand what is dfensive programming :s
14:00:01  <kakashiAL>franckapik: okay, lets start with that :)
14:00:09  <franckapik>lol
14:00:10  <franckapik>sorry
14:00:12  <franckapik>;)
14:00:20  <kakashiAL>franckapik: there is nothing to sorry!
14:01:03  * tmcclevejoined
14:01:13  <kakashiAL>franckapik: to keep it simple, defensive programming means that your programm/your function makes sure to get what it needs and if not it will tell it to you
14:01:26  <kakashiAL>franckapik: let me give you a simple example:
14:01:32  * bdunavantjoined
14:01:36  <franckapik>ok
14:02:03  * chippingquit (Ping timeout: 260 seconds)
14:02:35  * Sonderbladejoined
14:02:38  <kakashiAL>function addTwoNumbers(x,y) { return x+y; } <----this function is not defensivly implemented and it can lead to problems
14:02:43  * earendelquit
14:02:55  <kakashiAL>addTwoNumbers(3,5) <--- will return 8
14:02:57  * hosifiedjoined
14:03:04  * chippingjoined
14:03:05  * earendeljoined
14:03:21  <franckapik>ok, i understand all this
14:03:22  <kakashiAL>addTwoNumbers('foo', 'bar') <---- will return 'foobar'
14:03:33  <franckapik>ok
14:03:40  * Cassiopayaquit (Ping timeout: 268 seconds)
14:03:46  * gucci_meowjoined
14:03:56  <kakashiAL>there is the problem, I want a function that returns a number, but my function tells me nothing whats wrong
14:04:10  <kakashiAL>franckapik: so how can we solve this problem?
14:04:12  * Snugglebashquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
14:04:29  <kakashiAL>franckapik: well, we need a special developer tool
14:04:31  * rchavikjoined
14:04:38  <kakashiAL>this developer tool is called "throw" :)
14:04:53  <franckapik>ok, this is throw err
14:05:02  <franckapik>if err, throw err
14:05:02  * watildejoined
14:05:04  <franckapik>isn't it ?
14:05:10  <kakashiAL>almost
14:05:15  <franckapik>lol ok
14:05:30  * mrkmgjoined
14:05:40  <kakashiAL>first you install "is" https://www.npmjs.com/package/is
14:05:53  <kakashiAL>then you do this:
14:07:26  <kakashiAL>function addTwoNumbers(x, y) { if(!is.number(x) || !is.number(y)) { throw new TypeError("the first and second argument, must be a number.")} return a + b; }
14:07:46  <kakashiAL>franckapik: now you get two things with that
14:07:46  * sleepycatjoined
14:08:06  <kakashiAL>1. if you use this function not correctly, you will get a bug report and you know what you did wrong
14:08:10  * Defcronykequit (Quit: Leaving)
14:08:22  <kakashiAL>2. in runtime, if something goes wrong, you know what causes the problem
14:08:44  <sleepycat>Does anyone know if there is a library that exists for finding available time between two schedules?
14:09:05  * shmuquit (Ping timeout: 240 seconds)
14:09:13  <franckapik>ok, i undeerstand
14:09:44  * invariant1729quit (Ping timeout: 246 seconds)
14:09:50  <kakashiAL>franckapik: so now, if you get an error like .push() is not a function, it means that you think that you are using something that has this push method/function, but in reality it does not
14:10:09  <franckapik>ok
14:10:18  <kakashiAL>franckapik: now what is the solution?
14:10:31  <franckapik>i just understand that it wasn't an array
14:10:40  <franckapik>that's why.push cant sucess
14:10:49  <franckapik>(it was a string)
14:11:06  <kakashiAL>franckapik: implement your function defensivly, let it shout before it reach that point where .push() is used
14:11:12  <franckapik>ok
14:11:29  <franckapik>it's better than using console.log to understand what is wrong
14:11:42  <franckapik>but it's not easy to implement like you say
14:11:52  <franckapik>i have to learn to use this
14:11:57  <kakashiAL>yes sir, but not only that, also because the two points that you get that I mentioned before :)
14:12:44  * TheFuzzballjoined
14:12:46  <kakashiAL>use "is" and do some if :)
14:13:38  * gucci_meowquit (Ping timeout: 260 seconds)
14:14:27  * watildequit (Remote host closed the connection)
14:14:51  <franckapik>lol
14:14:52  * watildejoined
14:14:54  <kakashiAL>franckapik: with this way you can be sure what and where you get wrong input :)
14:14:57  * nicojuicyjoined
14:15:00  <franckapik>yeah
14:15:11  * IAmNotDorianjoined
14:15:14  <kakashiAL>franckapik: and also some unit testing :)
14:15:25  <franckapik>but for example here, my script is on client side
14:15:28  <franckapik>so i can't use npm ?
14:15:43  <kakashiAL>franckapik: of corse you can use npm :)
14:15:57  <franckapik>requiring on client side?
14:15:59  <kakashiAL>npm install --save bootstrap
14:16:08  * genmortquit (Quit: genmort)
14:16:19  <franckapik>hum...
14:16:38  * wsierocijoined
14:16:50  <kakashiAL>franckapik: if you want to use require() on cliend side you have some options, you can use webpack OR browserify or other
14:17:47  * joyeejoined
14:18:19  <kakashiAL>(I recommend webpack, also because its great for react development, but it requires some time)
14:18:31  <prometh>webpack is unnecessarily complicated
14:19:03  <kakashiAL>prometh: true, the more time you invest the better it becomes :)
14:19:10  <prometh>not really
14:19:22  * Fishrock123joined
14:19:31  * watildequit (Ping timeout: 240 seconds)
14:20:33  * DeltaHeavyjoined
14:22:01  * joyeequit (Ping timeout: 240 seconds)
14:22:10  * jwestquit (Quit: WeeChat 1.0.1)
14:22:29  * jwestjoined
14:23:28  <franckapik>The best way to make a variable more global is to return it ?
14:28:11  * phil22joined
14:28:15  * Utilsjoined
14:29:26  <Utils>If you had a chat server and you were authenticated by token, sure... that server would have your user id and you can send private messages to user ids. What would be the best way to go about that when it comes to allowing guests ? (that is, auth by nickname as opposed to auth by token), they wont have ids?
14:29:45  * jameskyburzquit (Ping timeout: 272 seconds)
14:30:17  * jameskyburzjoined
14:30:40  <Utils>would it not at all be better to use maybe the socket id as both types of users will have a socket id?
14:30:48  * octetcloudquit (Ping timeout: 268 seconds)
14:34:08  * mothershipquit (Ping timeout: 245 seconds)
14:34:09  * lpinquit (Read error: Connection reset by peer)
14:37:48  * d10n-workjoined
14:38:57  * Alina-malinajoined
14:39:45  * led1joined
14:41:31  * IAmNotDorianquit (Quit: Leaving)
14:41:41  * jameskyburzquit (Ping timeout: 255 seconds)
14:43:45  * Alina-malinaquit (Ping timeout: 268 seconds)
14:45:44  * m31271nquit (Ping timeout: 255 seconds)
14:47:33  * sobersabrequit (Quit: WeeChat 1.5)
14:47:40  <sleepycat>Anyone have thoughts on figuring out mutual availability between a given set of calendars/schedules? Are there libraries for this sort of thing?
14:47:45  * jameskyburzjoined
14:47:47  * jkridnerquit (Remote host closed the connection)
14:47:54  * iffraffquit (Remote host closed the connection)
14:49:29  * joyeejoined
14:49:46  * budosjoined
14:50:02  <prometh>not all calendars are built the same way
14:50:29  <prometh>there may be libraries available for your specific calendar
14:50:39  * Cabanossiquit (Ping timeout: 272 seconds)
14:51:13  * sternsquit (Ping timeout: 255 seconds)
14:51:35  * Cabanossijoined
14:51:42  * budosquit (Client Quit)
14:52:39  * lynx-rjoined
14:53:59  * a_thakurquit (Remote host closed the connection)
14:54:28  * goodenoughjoined
14:54:44  * tarwaterjoined
14:55:24  * FunnyLookinHatjoined
14:55:24  * FunnyLookinHatquit (Changing host)
14:55:24  * FunnyLookinHatjoined
14:55:40  * wsierociquit (Remote host closed the connection)
14:58:06  * yehowyadajoined
14:58:31  <merpnderp>What is this and why is there no link to its github code: https://www.npmjs.com/package/boostrap
14:58:46  <zsoc>merpnderp: why does a package have to be on github to be in npm?
14:59:04  <merpnderp>zsoc: how do I see what code jsut ran on my computer? I can't view the source.
14:59:21  <zsoc>./node_modules ?
14:59:28  * someboy_joined
14:59:31  * duderonomyquit (Ping timeout: 240 seconds)
14:59:36  <merpnderp>zsoc: is that what was installed? If ran its install scripts, it could have deleted files.
14:59:41  <zsoc>i hate to break it to you, but you have a _lot_ of code running on your computer you can't see the source to lol
14:59:45  <ThePendulum>writing migrations on a day off... nol null, err, not nutt, err, nut null... grrrrrrr... not noll ARGH... not null, *sigh*
14:59:53  * someboy_quit (Client Quit)
15:00:05  <merpnderp>zsoc: yeah, but most of it wasn't namesquating waiting for people to typo.
15:00:24  <zsoc>merpnderp: that's a pretty good point
15:00:41  <merpnderp>Namesquatting and can't see it's npm source.
15:00:42  <zsoc>merpnderp: npm view boostrap dist.tarball
15:00:49  <merpnderp>thanks zsoc
15:00:54  <zsoc>i just had to find the command, i was playing devils advocate for a minute :p
15:02:04  <pstef_>What is the point of migrations in the context of node.js? I'm unable to wrap my little dinosaur head around it.
15:02:26  <prometh>is this [short] readme unclear?: npmjs.com/supports-semigraphics
15:02:52  <zsoc>pstef_: programatically create, alter, and roll back database changes in an npm/node context
15:03:29  <pstef_>Sort of like with sqitch?
15:03:53  <merpnderp>zsoc: just three scss files and a no-dep package.json
15:04:03  <merpnderp>weird
15:04:16  <zsoc>very weird
15:04:48  * m31271njoined
15:04:53  <zsoc>i would attribute it to incompetence before malice tho in this case :3
15:04:59  <pstef_>I guess migrations are better in that you can roll back both code and database changes...
15:05:04  <prometh>is this [short] readme's description of the library's use case unclear?: npmjs.com/supports-semigraphics
15:05:40  <prometh>i'm told it is, but not sure how to be clearer without being dumb
15:05:51  <merpnderp>zsoc: 1.3K downloads a month
15:06:01  <zsoc>merpnderp: er.. no it has a /lib and package.json here?
15:06:32  <zsoc>oh, a no-dep
15:06:32  <prometh>merpnderp: that's not many downloads
15:06:34  <zsoc>yes that's true lol
15:06:42  <zsoc>1.3k could literally be bots lol
15:06:48  <zsoc>eh.. no that seems a bit high
15:07:20  <samsch>It was just me. I downloaded it 1.3k times >:D
15:08:43  <Naan>lol
15:08:43  <merpnderp>zsoc: it is people typoing bootstrap
15:09:03  <zsoc>ohh
15:09:04  <zsoc>duh
15:09:06  <zsoc>you're right actually lol
15:09:07  * a_thakurjoined
15:09:10  <merpnderp>Given the contents of this tarball I bet the author typoed it themselves.
15:09:14  <zsoc>rofl
15:09:33  * jameskyburzquit (Ping timeout: 245 seconds)
15:09:34  <zsoc>it would probably be too hard for npm to police something like that
15:09:35  <merpnderp>That's how I wound up with it.
15:09:40  <zsoc>they _do_ have a process for like,, disputes and things
15:09:52  <zsoc>you could submit the suggestion that the package is ignominious and should be an alias for bootstrap
15:09:54  <merpnderp>has anyone ever found anything malicious in npm?
15:09:57  * rorroquit (Ping timeout: 240 seconds)
15:10:35  * jameskyburzjoined
15:10:48  <pstef_>Only Javascript.
15:11:20  <zsoc>the bad part is packages like coffee-script, uglify-js, and socket.io, which have counterparts without the '-' or '.' which are _not_ the expected package heh
15:11:50  <zsoc>i mean it's a good reason never to use npm as superuser but.. i guess install scripts could still do nasty stuff
15:12:06  * sz0quit (Quit: Connection closed for inactivity)
15:12:15  <prometh>is this [short] readme's description of the library's use case unclear?: npmjs.com/supports-semigraphics
15:12:17  <prometh>i'm told it is, but not sure how to be clearer without being dumb
15:12:31  * cotkoquit (Ping timeout: 240 seconds)
15:12:53  <zsoc>prometh: well if you don't know what a semigraph is, you probably wouldn't be looking for your library
15:12:55  <zsoc>so i think that's fair
15:13:27  <prometh>i didn't know what a semigraphic was until last night
15:13:34  <prometh>the term, that is
15:13:51  <prometh>but i do mention "text animations" and a link to wikipedia
15:14:53  <prometh>maybe this sounds clearer?: Some environments try to simulate a TTY which can bugger up logs with your progress bar, character spinner, etc, [semigraphic animations](https://en.wikipedia.org/wiki/Semigraphics).
15:15:26  <zsoc>yep
15:17:35  * apparitionquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:17:35  <prometh>thanks
15:17:47  <pstef_>I'd avoid using English idioms.
15:19:05  * Snugglebashjoined
15:19:55  * mazulajoined
15:20:08  <graingert>pstef_: English is a pretty bog standard language
15:20:24  <graingert>pstef_: why not just use it for everything
15:21:06  <pstef_>I'm specifically talking about English idioms and not the language.
15:21:16  * watildejoined
15:21:20  <mazula>how I can monitor my app?
15:21:52  * octetcloudjoined
15:22:08  <zsoc>mazula: monitor it for what?
15:22:20  * rorrojoined
15:22:23  <mazula>verifiy if my app is not down
15:23:12  * goodenoughquit (Remote host closed the connection)
15:23:16  <zsoc>mazula: define 'down' - like do you mean 'the process isn't running' or like 'my app isn't serving expected/any response from X endpoint' ?
15:23:46  * goodenoughjoined
15:23:54  <zsoc>Because the later isn't node.js specific and is pretty agnostic to language/runtime
15:24:00  <mazula>the process isn't running (if the app crash for example)
15:24:04  * zivesterjoined
15:24:16  * focodevjoined
15:24:20  <focodev>if your website is TLS only do you have to load external websites over https?
15:24:25  <focodev>does that even make sense
15:24:34  <mazula>I want to create a status page with node.js
15:24:38  <zsoc>mazula: so your process manager (pm2 is popular) would usually restart your process for you.. on crash you could get notifications through various means, like the `report-errors` package, for one
15:24:59  <zsoc>`pm2` has a 'keymetrics' service which gives you visual data on your application on a status page.. but it's not free i think
15:25:05  <zsoc>very in depth stuff tho
15:25:51  <zsoc>focodev: yes, no mixed content, if your page is https only (like it should be) then all external resources must be https as well
15:26:01  <zsoc>mostly because modern browsers just won't load mixed content
15:26:13  <prometh>pstef_: it's fun
15:26:30  <focodev>ok
15:26:54  <prometh>zsoc: chrome doesn't complain anymore
15:27:22  * LeBlaaancjoined
15:27:25  <prometh>zsoc: dunno about other modern browsers, though.. i use protocol-relative urls most of the time
15:27:42  <zsoc>prometh: 1.) link me to when they changed that? 2.) the vast majority of browsers have some complain at least on _certain_ types of mixed resources
15:27:46  <zsoc>especially javascript and iframes
15:27:46  <focodev>prometh, I thought chrome still complained
15:27:55  * goodenoughquit (Ping timeout: 246 seconds)
15:28:00  <focodev>because I had a complaint about mixed content like 2 weeks ago
15:29:11  * smtquit (Remote host closed the connection)
15:29:28  * praisethemoonquit (Ping timeout: 255 seconds)
15:29:34  * ddelrio1986_quit (Quit: This computer has gone to sleep)
15:29:50  * smtjoined
15:29:57  <zsoc>yeah i'm using v59 beta and i'm still getting it
15:30:05  <zsoc>also i'm hyped about new dev tools features in v60 \o/
15:30:50  <prometh>https://arstechnica.com/information-technology/2015/10/chrome-finally-kills-off-the-http-https-mixed-content-warning/
15:31:11  * m31271nquit (Ping timeout: 272 seconds)
15:31:49  * ghormoonquit (Remote host closed the connection)
15:32:10  * ddelrio1986joined
15:32:20  * varunestjoined
15:32:36  * smtquit (Read error: Connection reset by peer)
15:33:03  * smtjoined
15:33:40  * ghormoonjoined
15:33:47  <prometh>tl;dr: chrome 46 reduced the secure status to two states, lock icon and document icon
15:34:01  <prometh>mixed content results in a document icon
15:34:27  <prometh>so it's still a concern, but not a critical deterrent
15:35:05  * wsierocijoined
15:35:23  * justelexquit (Ping timeout: 260 seconds)
15:35:46  * Cabanossiquit (Ping timeout: 264 seconds)
15:36:12  * Cabanossijoined
15:38:21  * Snugglebashquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
15:38:30  <AlexKvazos>exit
15:38:45  <focodev>prometh: thanks for link, will have to review that in a bit.
15:39:11  <focodev>bc I'm getting broken https icon when calling an http endpoint from https
15:39:19  * ghormoonquit (Excess Flood)
15:39:26  * ghormoonjoined
15:41:10  * Snugglebashjoined
15:42:00  * justelexjoined
15:43:54  * joeytwiddlequit (Quit: ZNC - http://znc.in)
15:44:15  * webnannersquit (Ping timeout: 260 seconds)
15:44:41  * joeytwiddlejoined
15:45:38  * jameskyburzquit (Ping timeout: 246 seconds)
15:45:39  * brent__joined
15:45:40  * FMJaggyquit (Ping timeout: 240 seconds)
15:45:46  * AlgorithmWizardquit (Ping timeout: 258 seconds)
15:45:56  * abpajoined
15:45:59  * s0ul_c0dejoined
15:46:23  * raynoldjoined
15:46:25  <zsoc>focodev: and that will continue to happen (and should).. depending on what the resource is.. the 'best case' is that you get the minor errors thing which still isn't good
15:46:42  <zsoc>anytime you have an https site with no 'green lock' in chrome, something is up and you can't expect complete functionality
15:46:55  <zsoc>prometh: that is interesting tho, ty for the link
15:46:57  * matt_cquit (Ping timeout: 240 seconds)
15:46:58  * s0ul_c0dequit (Client Quit)
15:47:00  * gr4yscal1quit (Ping timeout: 240 seconds)
15:47:10  <focodev>yea, and it's solely becuase I'm calling an API hosted on http
15:47:14  * pelegreno___joined
15:47:21  <focodev>because when I take the call out, I get green lock
15:47:23  * zxcquit (Ping timeout: 255 seconds)
15:47:33  * Ergoquit (Remote host closed the connection)
15:47:40  * zxcjoined
15:47:42  <zsoc>what is this api?
15:47:48  <focodev>sucks, because that call is the pillar stone to the application, it's how I get race result data for fantasy motocross/ supercross
15:47:52  <zsoc>some vendor thing? strange to be that anything doesn't support https these days
15:48:00  <focodev>zsoc yea,
15:48:00  * razwelle1quit (Ping timeout: 260 seconds)
15:48:01  <zsoc>so make the call to your own server
15:48:04  * tarwaterquit
15:48:06  <zsoc>have your server make the https request
15:48:09  <zsoc>*http client request
15:48:25  <focodev>zsoc okay, so just have the server do teh call instead of client and I should be okay?
15:48:27  <zsoc>and return the results... realistically it's like little to no overhead
15:48:35  * pelegreno__quit (Ping timeout: 240 seconds)
15:48:39  * zumba_addictjoined
15:48:49  <focodev>might see a need here for websockets then
15:48:50  <Utils>much like IRC, how would you store per-channel 'rules'? so maybe a role restriction (say, mods only), age restriction, and things like that. would you just have a json object stored in the database or what? So something like: {'min-age': 18, 'role': 'mod'}
15:48:51  * webnannersjoined
15:48:51  * razwellesjoined
15:48:56  <zsoc>the browser doesn't care (or rather, know) what your server is doing.. just hit https://myownpage.com/api/whateverthing and have it do a fetch to this vender api
15:48:56  <focodev>since I need that data refreshed every 3-5 seconds
15:49:00  * s0ul_c0dejoined
15:49:20  <focodev>zsoc makes perfect sense , thanks
15:49:20  <zsoc>then use websockets... or long polling.. or Server Sent Events if it's one way (eg: every client gets the same data)
15:49:26  * AlgorithmWizardjoined
15:49:28  * matt_cjoined
15:49:28  * tarwaterjoined
15:49:45  <zumba_addict>hey folks, got disconnected yesterday so I didn't see if anyone responded. Will there be issues if we upgrade to npm5? Is there like a doc where it mentions what to expect?
15:49:50  <zsoc>or heck use a recursive setTimeout to make the fetch request to your own server :p if you really want to go low tech lol
15:50:01  * sleepycatquit (Quit: leaving)
15:50:17  * FMJaggyjoined
15:50:19  <focodev>word
15:50:27  <focodev>thanks zsoc
15:50:28  * Pandorianjoined
15:51:44  * computer2000quit (Ping timeout: 260 seconds)
15:52:38  * jameskyburzjoined
15:52:46  * EyePulpquit (Remote host closed the connection)
15:53:18  * EyePulpjoined
15:54:32  * s0ul_c0dequit (Quit: Leaving)
15:54:49  * gr4yscal1joined
15:55:00  * chippingquit (Ping timeout: 260 seconds)
15:55:13  <ThePendulum>knex just threw me a migration error that implied it's using a migration file that's no longer in migrations/, any idea where it might have it cached?
15:55:25  <ThePendulum>I kinda need the file and deleted it erroneously
15:56:27  <zsoc>ThePendulum: knex_migrations table
15:57:40  * chippingjoined
15:57:47  * Snugglebashquit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
15:58:22  * EyePulpquit (Ping timeout: 268 seconds)
15:59:12  * praisethemoonjoined
16:00:09  <ThePendulum>zsoc: no rows, and afaik that only contains an identifier
16:00:24  <ThePendulum>I get an error for an actual SQL error that's not in any existing migration
16:00:31  <zsoc>wat
16:00:51  <ThePendulum>... nevermind I screwed up
16:01:07  <zsoc>I mean if you had some migration and then... never rolled it back.. and removed the reference and deleted it.. it could be in conflict with others?
16:01:07  * genmortjoined
16:01:22  <ThePendulum>apparently I somehow typed 'users' instead of 'tasks' somewhere
16:01:57  * wadiequit (Ping timeout: 240 seconds)