« first day (1921 days earlier)      last day (3032 days later) » 

6:00 PM
@ndugger yes, it does
 
@ton.yeung the whole lecture is gold.
 
@ssube does it run on windows IoT out of the box, though?
 
crl
internet of things
 
@littlepootis no, only real life
 
@BenjaminGruenbaum github.com/nodejs/node/pull/4765#issuecomment-172933878 please tell me this is not you :-P
 
6:02 PM
@ssube Just run it on a windows server--it's not the end of the world
 
@ndugger lol
 
44 mins ago, by ndugger
I want you all to know that I never know what I'm talking about, and I always make everything up.
 
I have a react app, that talks to a REST API protected with basic auth. Any suggestion how to check for credentials and show a login form? I think I could save the credentials in sessionStorage...
 
@kelunik you can't with basic auth
use any other form of authentication
 
Guys
 
6:10 PM
basic auth is more-or-less deprecated, because there's no way to log out, it's not very secure, etc
 
@AwalGarg that's someone trolling after I left a comment in HN
 
@BenjaminGruenbaum figured so. That account was created today itself
 
user image
3
 
he likes to poop on slides?
 
@ssube That's why it's only used for the REST API, but not the react app itself (it's publicly accessible)
 
6:14 PM
@kelunik that won't work very well. The browser will still treat it like normal basic auth and keep you logged in forever.
What you should consider is a single request with the credentials, return a token (take the credentials, session start and end, encrypt them with a private key), then use the token for the rest.
 
In this code, flower.bloom() returns undefined because declare() method runs async. How would I make sure the bloom() returns actual string.
 
Is there a glossary somewhere on the web related to stuff like js, web development, etc.? I've made my own, but it dawned on me someone probably has one, a better one.
 
  window.setTimeout(this.declare(), 1000);
dude
does declare return a function?!
no
() calls the function
 
@overexchange that's not code, that's a travesty
 
6:17 PM
declare = function(){ return noop; }
 
when ever I see setTimeout(func(), time) my brain replaces the function with undefined
I dont' like having to look to see if the method returns a method
 
crl
so react is basically like virtual-dom? even if the former inspired the latter probably, it seems simpler and shorter
 
LateBloomer.prototype.bloom = async function() {
  return await this.declare(); // this should probably return a promise
};
not sure about that tho
 
@crl virtual dom with lifecycle hooks and a kickass diffing algo
 
crl
more efficient you mean :)?
 
6:20 PM
ok
 
Don't forget synthetic events.
 
crl
@BenjaminGruenbaum also there server-side rendering isn't so much ready github.com/Raynos/mercury/issues/55#issuecomment-172937225
hmm mercury that's different sorry, I mix them up
 
mercury, lol. Who remembers Raynos :D?
 
crl
he contributes to virtual-dom, that's why I mix them up
 
Sep 21 '11 at 14:30, by rlemon
@Raynos, WHY YOU TYPE ALL CAPS
Y U NO MAKE SENSE
ohh good old times
@KendallFrey relative? i.imgur.com/WoCcAiG.jpg
 
6:24 PM
I know next to nothing about React, but I heard the 'difference check' it does in the 'virtual dom' bogs down when you're comparing thousands of elements. I'm not sure if that's practical or if that even makes sense, but just saying.
 
it can, you you have tools to optimize that
 
crl
github.com/Matt-Esch/virtual-dom/issues/49, why is it 'hard' to stringify a virtual dom?
I guess some possible event handlers inside it
 
the DOM is complicated and full of lies
 
the DOM is DUMB
 
crl
I'd just spit some html string, built recursively
 
6:26 PM
@Waxi Component can implement shouldComponentUpdate() giving you a way to short-circuit the diff when you know there are no changes.
 
the dom is a terribly clunky api with stupid rules around instantiation and other random nonsense
 
if you have 1000 items in a list, and each has an efficient shouldComponentUpdate(), then it's not a problem.
 
crl
dom is beautiful, I like it, a bit a bitch sometimes
 
@Luggage Good to know, thank you.
 
why I'm not allowed to do new HTMLSpanElement is beyond me
 
6:27 PM
@crl the DOM is awful
 
Even then, you're not creating an HTML element, you're creating a DOM object. Inserting it into the document should insert an HTML representation of that DOM object...
It's just bad
 
it doesn't match how modern computing works at all
 
who cares? abstractions abound.
 
It also doesn't match how the rest of javascript works either lol
 
@Luggage it'd probably be faster if it was smarter
you've got good code on both sides of a bad API
 
6:31 PM
@crl he used to be a regular here
@crl it's not :D
 
Ooh, Chakra has linux support on their roadmap. That's new and exciting. It means that chakra-node would potentially be cross-os in the future
 
@Loktar 4k gtav imgur.com/gallery/m4qQM
 
crl
for event handlers it's still tricky I think, maybe a stupid temp id on the element, then at loading it reattach those events
 
there is a chakra-node?
and after MS paid joyent to make node windows compatible..
 
Well, I'm calling it chakra-node, but it's just MS supporting the Node apis in chakra, so that you can run node in chakra
 
6:36 PM
V8 APIs*
 
node*
Maybe both, but things like the filesystem and net APIs are node-specific, not v8
 
correct me one more time, see what happens
 
you mean pootis, right?
 
V8, actually. The only thing MS has done is make a V8 api shim for Chakra.
 
Don't me me kick me
 
6:38 PM
@BenFortune Figured it out
 
@littlepootis Aye. I assume that it's so they can simply run Node on top of V8
etrm
fuck
I mean Node on top of Chakra
I'm dumb today
 
ohh, i gotcha. the non-v8 layer of node.
 
I mean, Node on Chakra
 
*Chakra on v8
 
6:40 PM
but I am dumb today; no debating that. Today is rough
Chakra on PHP
 
@Luggage not exactly. A V8 layer oi top of chakra. Because nodejs makes use of V8-specific functionality.
 
Seems like a painful endeavour; they probably feel so dirty from doing it, but I applaud the effort, and if they get linux support in for chakra, I'd rather use it than a v8 version, honestly
 
@Luggage see the diagram here: blogs.windows.com/msedgedev/2016/01/19/… (scroll down a bit)
az648995.vo.msecnd.net/win/2016/01/… this one, to be specific
 
@ndugger Not that it bothers me, just curious, but on checkbox click, the sprite just slides and it makes it look animated, any way around that? I'm tacky too, gonna use the same exact graphic you supplied in your tutorial lol.
 
!!afk sleep
 
6:47 PM
@Waxi It shouldn't slide. Are you animating anything?
 
embrace, extend, extinguish. We won't be fooled again, MS!
 
okay, so I can create a video file with raspicam, but there is not server component there... so I wanna take the file (stream?) and pipe it to my cloud server so I can stream it to the masses.
anyone have any starting terms I can google?
 
MS is going to go all OpenGL on node.js
 
and by starting, I've done a bit of research on this
I can get it working with a regular webcam, but the camera module seems to be doing things differently.
 
@ndugger Ah I'm a dummy, had a rogue transition set in my reset. Thanks, works perfectly!
 
6:48 PM
@rlemon ffmpeg? I have no idea what you need. Ignore me
 
@ndugger no, that is the right idea.. but idk how to use it to do what I want
I was using motion to do the stream locally on 8081, then proxying that to my server
 
@Luggage what you said woke me up, you know?
 
but motion doesn't wanna allow me to select the camera module
it isn't on /dev/videoN
 
I think I'm street lighting myself today
 
@copy done
 
6:52 PM
What's an elegant way to pop a div out on dblclick, and put it back on click X?
 
@Luggage OGL shot itself in the foot and started working its way up when they introduced plugins
 
it has to maintain data relationships, because it gets updates
 
crl
If I want to map some random numbers (keycodes) (86,90,67...) to functions, it's bad to use an array?
hmm can convert to string rather
 
@crl yes
 
crl
ok ^
 
6:57 PM
@crl no
 
nice
 
crl
ew, stop confusing me
 
if you use an array, you'll have a sparse array, which is bad
 
crl
why?
 
use a map (or object, if you can't) and map the ones you want
 
crl
6:59 PM
ok, it looks better anyway
 

« first day (1921 days earlier)      last day (3032 days later) »