-
shush
What terminal output tools are there for being able to layout text output for status boxes and cool things like that?
-
GreenJello
shush, blessed is the main one
-
GreenJello
also look at ink
-
shush
Anything that is a little more light-weight?
-
joepie91
darkseid_: oh yeah she'll be fine, the bigger problem is learning Dutch, honestly
-
joepie91
Dutch people will refuse to speak Dutch to you and auto-switch to English
-
ljharb
lots of european countries do that, it's super annoying
-
ThePendulum
hmm, would've thought the folks at ko-fi would've registered kofi.com and ko.fi
-
» joepie91 blinks
-
jaawerth
lol that reminds me, my dad got invited to a wedding in Tanzania so naturally, as one does, he started to teach himself Swahili, and I'm like.. go dad, way to show me what I should be like in my 60's!
-
jaawerth
'course, then covid happened and he couldn't go
-
jaawerth
actually, I was also invited, but I got a late start on the Swahili train so I hadn't learned much by the time it was called off
-
jaawerth
not that it would have been necessary to learn it; I just thought it was a fun idea
-
jaawerth
joepie91: that's actually not as bad as when you get competent enough in a language for people to think you're much more fluent than you are and start talking really fast at you haha
-
tona
hello evryone, is the one way to handle any request in nodejs like one stack 1 by 1 and with one internal between them like 1 minute
-
EdFletcher
wutthewut
-
jaawerth
...maybe an accidental paste? half a message for us, another half for a mystery channel that I'm going to assume involves competitive tetris
-
EdFletcher
LOL
-
wyoung
With fs.createReadStream(), do I need to add .on, .pipe, etc.. in the same tick? Or can I use a function to return a fs.createReadStream?
-
wyoung
I am having issues with using a function which has fs.createReadStream() in it, I get an error that pipe and on doesn't exist.
-
wyoung
createReadStream(...).on is not a function
-
wyoung
Actually, nm, the function was an async function :/
-
jaawerth
wyoung: to answer your first question anyway, though, the stream should start paused like any read stream. it won't start emitting until you either invoke .pipe or start listening for the data event
-
wyoung
jaawerth: Cheers
-
EddyKid
hey
-
EddyKid
is webrtc at a realistic stage for webrtc to power a social network?
-
EddyKid
similar to gnutella from web
-
humanface
hi all
-
cbp
freenode.autojoin = "##typescript,##javascript,#reactjs,#node.js"
-
joepie91
we are not your IRC client's config file ;)
-
cbp
I realized that haha
-
cbp
Forgot to prefix with command
-
joepie91
:)
-
cek
who knows streams profoundly?
-
joepie91
cek: I know enough about them to thoroughly dislike them (the implementation of them in Node, that is), does that count? :P
-
cek
I don't get why no data is buffered when there's no `data` or `readable` attached on socket
-
cek
it looks like it's sending a tcp fin to sending party
-
joepie91
cek: data *should* be buffered up to the highwatermark, after which it will pause the upstream
-
joepie91
(if any)
-
cek
yeah, but it doesn't happen over here. wtf
-
joepie91
I don't recall if there's anything specific to sockets
-
joepie91
how are you determining that it doesn't?
-
cek
.readableLength is 0 and no `readable` event triggered after data's been sent and `readable` handler attached
-
cek
it looks like i have to listen to `data` otherwise it would drop shit
-
ljharb
EddyKid: technologically sure. the reason it'll never happen is because the critical mass you need to even keep it alive is much larger than the number of people needed to make it compelling as a product, and the latter is hard enough
-
joepie91
cek: sorry, I got distracted by something else
-
joepie91
cek: have you verified that nothing else has quietly attached a `data` handler?
-
joepie91
which would put it into flowing mode, and I think that might also prevent `readable` events from firing
-
zsoc
Anyone have a preferred slugification library before i go auditing all the garbage i'm sure is out there?
-
zsoc
var print = console.log.bind(console, '>') <-- lol people make me chuckle
-
samsch
`title.split(' ').slice(0, 6).map(word => word.replace(/\W+/g, '')).join('-')` :D
-
zsoc
Ah yes, what could possibly go wrong with this implementation
-
samsch
absolutely nothing, it's the pinnacle of perfection
-
zsoc
certainly not anything pesky like... unicode lol
-
samsch
n> 'this 👍 💝💝 💩 !@#sdf=܁ ؟Ķ'.split(' ').slice(0, 6).map(word => word.replace(/\W+/g, '')).join('-');
-
jellobot
(okay) 'this----sdf-'
-
samsch
yeah, maybe not perfect
-
samsch
Also, I wish grabbing various forms of letters was like, a *lot* easier than it is.
-
zsoc
forms?
-
cbp
you can use "u" flag
-
samsch
Like that "Ķ"
-
samsch
It'd be nice to be able to do something like hold shift-capslock and a virtual keyboard would pop-up showing accent variations and stuff.
-
joepie91
zsoc: first decision to make is whether you want to transliterate emoji
-
zsoc
yeah i don't, this isn't all that complicated tbh
-
joepie91
samsch: that's called a "compose key"
-
joepie91
or well
-
joepie91
you can have that attached to a compose key :P
-
zsoc
samsch: ah, well... if it's a character set that you regularly have to input, then there's usually a pretty easy way to do so if you use the native OS implementation of that input method... in my experience anyway
-
joepie91
samsch: "IME"! that's the term
-
zsoc
IME = input method editor... i guess i only called it an IM lol
-
zsoc
僕はバカです >.>
-
joepie91
I swear I've seen a graphical unicode IME for Linux at some point
-
joepie91
but I can't find it now
-
samsch
Ah yes, the obvious solution of writing C++ code to build up your own support
tedyin.com/posts/a-brief-intro-to-linux-input-method-framework
-
joepie91
samsch: IMEs seem to be one of those topics that people either don't talk about at all, or REALLLLLY like to talk about :)
-
samsch
Ok, so I enabled capslock as a compose key, but it seems that you still run blind until you learn the compositions
-
joepie91
samsch: yeah hence mentioning a graphical IME
-
samsch
Nothing really coming up searching around, and really gotta get back to more productive stuff >_> I think my actual complaint is that this stuff doesn't exist by default in all systems.
-
pringlescan
Happy Friday! ... Stream question: What's the proper way to handle piping to temporary destinations? I'm tailing a log file into PostgreSQL using `pg-copy-streams` from a file stream that is piped into fast-csv/format before being piped into a `pg-copy-streams` that'll be used for 30 seconds before flushing to db. I try to .pause() .unpipe() .pipe() .resume() but no more data flows from the filestream.
-
joepie91
pringlescan: "temporary destinations" as in, the destination needs to be changed every once in a while?
-
pringlescan
I'm not sure if I need a pipeline or to manually resume the `filestream` that pipes into the `csv` stream ... in other words, does unpiping/pausing a downstream stream bubble up to the source stream?
-
pringlescan
@joepie91: exactly!
-
joepie91
pringlescan: then simply unpiping and re-piping should be sufficient
-
joepie91
if there are no more listeners on a stream, then it should pause
-
joepie91
and resume once a listener is available again
-
pringlescan
It's not working as expected, I have an interval that outputs processed lines every 30 seconds and after the first unpipe/pipe I don't get anymore lines (with and without explicit pauses, I had the manual open and it said I didn't need those)
-
joepie91
"should" everywhere, because Node streams tend to be a mess :)
-
pringlescan
actually, it's filestream->binary split->csv writer->[[ temporary postgres/ many postgres over time]]
-
pringlescan
@joepie91: that's how I understood the documentation, now I'm trying to figure out what's stuck/stopped
-
pringlescan
`end` is being emitted by the file stream... so I guess I'm just hitting the end of the file >_< ... naturally once I add all the debug logging and hop on IRC I figure things out, I guess I need to be tailing
-
joepie91
pringlescan: oh, yeah, end-of-streams will mess things up
-
pringlescan
tail is a lot faster at skipping lines than I am, I can skip at 30k lines a second, maybe I'll just use child process to invoke tail and pipe that instead of using createFileStream --- I was originally using `pv` and stdin but switch to files for simplicity
-
joepie91
I don't recall the specifics but I've seen code explicitly intercept end-of-stream events before for cases like this
-
joepie91
also, I'd recommend not invoking child processes at all unless there's no other way to solve your problem (and even then, only with execFile/spawn, not exec)
-
joepie91
there's a lot of security-related caveats to it
-
dimino
hey is there a way to jump into a shell for an already running node process
-
GreenJello
dimino, if you launched it with --inspect, then you could connect to it with chrome dev tools
-
GreenJello
or the process could provide a repl over tcp or whatever
-
dimino
hm I dont think I did that... oh well
-
Marak
Does anyone know the name of the tool which generated these screenshots?
Marak/faker.js #1040
-
ljharb
-
zumba_addict
folks, we've been troubleshooting this error for 6 hours and we're at a lost
i.imgur.com/Pk8fgmU.png is it a redherring?
-
Marak
Thank you @ljharb Good to see you in here
-
merpnderp
Is Sail.js still the best node framework?
-
joepie91
merpnderp: hm? it never was a good option
-
merpnderp
joepie91: boss is looking to speed up development and is looking for headless CMS's.
-
merpnderp
joepie91: have any alternatives?
-
joepie91
but Sails isn't a headless CMS?
-
joepie91
this seems like an ill-defined question
-
joepie91
like, if you want an off-the-shelf headless CMS, then pick, well, a headless CMS, something that runs as-is
-
joepie91
not a monolithic framework
-
joepie91
if you want a custom system, then make use of well-scoped single-responsibility libraries and good code quality to speed up development, as usual
-
joepie91
in neither case is a monolithic framework the answer
-
merpnderp
What's the difference between a headless CMS and something like Rails/Sails?
-
merpnderp
I can't tell the difference.
-
joepie91
one is a stand-alone service that you build something against as if it were a third-party API, the other is a generic framework that you build a custom application with
-
joepie91
typically anyway
-
merpnderp
joepie91: know of any good headless CMS's we could customatize and add node hooks in?
-
merpnderp
Because I just showed my boss Sails.js, and he just installed it and is loving it.
-
merpnderp
I don't see how Sails doesn't do what a headless CMS does.
-
merpnderp
It autogenerates and API against your database, and you don't have to use their front end.
-
samsch
Looks like sails at least uses sessions, so that's *something*
-
samsch
Stores the sessions in-memory in dev though, which is kinda bleh
-
howdoi
What are some of the performance metrics that you normally measure on serverside?