« first day (2755 days earlier)      last day (2189 days later) » 

12:00 AM
SPA, i'd use react, why not?
 
If I see those prices on rice cookers... I'd guess they also selling grayscaled websites...
 
Yeah, don't lowball yourself also. I've under-estimated before, terrible feeling
 
$($)
 
Perl for SPA would be terrible. I mentioned it as a joke, because it would be so terrible. Just pointless really
 
why would it be so terrible
there are quite "modern'ish" frameworks on Perl to accomplish that
 
12:05 AM
you may be thinking of php
 
mojolicious for instance
 
ohh, nevermind
That's not fair, there is perl code for anything. That doesn't mean it's a good idea.
 
ahh, well I haven't kept up with it, perl is dead to me
 
that's actually not just random perl code, it really is a very solid backend framework for realtime spa
at least... that's what I've heard from very active perl coders
even the perl language still gets developed and updated I guess
 
Stardew multiplayer beta is out: stardewvalley.net/stardew-valley-v1-3-beta
 
12:09 AM
TIL
 
12:23 AM
LIT
 
PAST AND PAST PARTICIPLE OF LIGHT
 
12:39 AM
I’m grilled bread
 
vertically centering stuff in css will be the death of me
 
Use flexbox
 
vertically center?
 
i am trying, flexbox doesnt agree with me
yea, like horizinatal but vertical
 
Vernacularly creasciont
🙏
 
12:45 AM
did you know, that emoji is actually a high five
and not praying hands
 
Wut
No way
 
So I can't use that to meme 'bless up' repeatedly? :(
 
It’s totally praying
 
apparently thats what it was originally anyway
then stuff like shining light was added behind it on some varients
and now its just considered praying hands
 
Preying hands
 
12:50 AM
well
that one is not the high five one
that one is 'folded hands'
 
i guess its both
you can even high five yourself
 
I would
 
@DavidKamer After discussing with Aaron, I see that the answer needs many corrections. Not sure, how users vote and mislead other users? This statement is wrong.. This is essentially how TypeScript interfaces work.
@Luggage for that question, the core principle is, TS follows compile time structural typing.BTW.. these points are important to debug TypeScript code working with JS code, say migration project.
 
@david but the PS Vita vs still isnt :(
 
1:19 AM
does ipad safari ever ask to save passwords
mine doesn't seem to
maybe it's a setting
 
Creamed corn
 
ive spent 45 mins trying to vertically center a div
this is ridiculous
 
either flex or position absolute/relative and transform translate
 
finally got it with flex
holy moly
 
Grilled bread
 
1:34 AM
@ndugger r u ok lol
 
In a manner of speaking
 
@RachelDockter just use polymer or something
easy peasy
 
its fine ive started over
this just isnt working
i hate css
 
agreed
major pita
 
1:50 AM
scss on the other hand
 
What if you only have one hand?
 
scss on the hand
just don't have a free hand :-\
 
why does my div have no height when i have set it to 100%
why is css like this, it says right there 100%!!! !!!!!!!!!!!!!!!
 
2:05 AM
100% of what
 
try position absolute
 
the list item
 
you can do percent heights unless it has a position most of the time
you have a typo also
 
absolute positioning did it
whats the type?
typo
 
looks like you can't have % heights of a parent that is only using minheight? that's odd
 
2:08 AM
@RachelDockter jsfiddle.net/93hncdf6/2
this is without absoulte positioning
 
yeh thats what i had, it should show the yellow div
i changed to absolute and its showing now, it was the min height that was messing me up
 
well, think about it. if the div is 100% the height of it's parent, and it's parent's height isn't actually defined, what height is it?
 
it was defined as minimum 40px
so id say 40px lol
 
the computed height is 40, but it doesn't have a height
 
i guess ur right D:
 
2:12 AM
it doesn't have a defined height or a min height, but it's content increases it's height
but it still doesn't pass that computed height to the yellow div
 
well it should because i was stuck on that for like 20 mins haha
i just watched the jon skeet q and a on SO
it was great until he bought up politics
 
guys :| I really need to figure out how to do one thing. How do you store a reference to something in the redux store in a component without triggering a reconciliation whenever that thing changes? I only need to know the value of it onDrop
Ideally, I would be able to select it from the store at that moment if possible
 
how did this fail?
 var credit = Math.max.apply(Math, parseFloat(PurchasesDataList.filter(x => x.PAYMENTNAME == CreditDataList[i2].NAME).map(x => parseFloat(x.ITEMCOST))).reduce((a, b) =>(a + b)));
 
^ lulz
 
2:20 AM
Stay classy Pittsburgh 😂 cc @KendallFrey
 
im getting an 'reduce is not a function'
 
yeah fuck Ovi :P
 
me: js go f urself
 
@Traitor why would parseFloat return an array?
 
@Traitor double check your () placement
 
2:21 AM
Wait, misread ))) format that nicer, maybe it’ll show
 
@SterlingArcher misread or not, you still got the right answer
 
So technically correct? The best kind.
 
well im confused but i see what ur on
i do disagree about the ()'s
 
There's a lot wrong with that snippet
@Traitor disagree with what?
 
im agreeing with sterling
 
2:24 AM
I asked what you're disagreeing with, not what you're agreeing with
 
Not the smartest statement ever said
but I’ll take it
 
im retarded and should go jump in a ditch
o.o
 
suit yourself ¯\_(ツ)_/¯
 
Now that’s programmer talk
 
im too lazy to change my avatar and name, that's just sad. i should be crying myself to sleep but i think im too lazy to do that
 
2:25 AM
been there bud
 
@SterlingArcher lol
 
i once wrote like 10k plus lines and reduced it to like 20 after learning filter/map
 
holy hell
 
@BenMcKenneby Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
2:31 AM
this is what i was looking for @SterlingArcher @KendallFrey
var c = PurchasesDataList.filter(x => x.PAYMENTNAME == CreditDataList[i2].NAME).map(x => parseFloat(x.ITEMCOST));
c = c.reduce((a, b)=>(a+b)) || 0;
 
looks much nicer
.reduce((a, b)=>(a+b)) makes me sad but it's not your fault
 
in C# that would just be .Sum()
 
hi, all. I'm trying to design a take turns (as opposed to shared) memory model to make serious image processing possible in the browser. @BenjaminGruenbaum has created a chat for it here: chat.stackoverflow.com/rooms/170102/… if any of you would like to join us.
 
Ben G has been everywhere, makes you wonder if he ever truly sleeps.
Or if he just subsists off of some sort of hybrid of Javascript/Nuclear energy
 
2:38 AM
Beyond Coffee, is he?
 
I suspect as much, he is probably ethereal at this point.
 
you take my fucking star
 
That's a Target cart, Nick as a child?
 
2:42 AM
LOL. Even kids feel the sting of JS?
 
@SterlingArcher LOL
that's me every day :p
 
Is that the theme of this community? We all love hating JS?
 
I love to pretend I know about stuff for the sole purpose of making harsh and uneducated opinions about said stuff.
It's my lifeblood.
 
0
Q: How accurate are home-made pregnancy tests?

joan capellI've seen in the internet that you can test if you are pregnant with things like sugar or toothpaste. I tried to find studies of how accurate are this methods but I couldn't found any. Does anyone know any study that tested the accuracy of any of this types of methods? P.S: If you are going to a...

 
@KendallFrey I wish the nuclear fuel had more uses
atm it's basically just for trains
and even then it's only a slight increase
 
2:49 AM
why is it useful for trains but not cars or planes or something
 
because you can't automate cars
well you can... but in that case they're moved by belts not by their own propulsion
 
[Angry Elon Musk intensifies]
 
i guess putting it into a tank is useful too
 
I've straight up used the homicide analogy to customers telling me about bugs and shit. "I need to replicate the bug, pretend its a murder, give me as much evidence as you can by showing me how it was committed"
 
2:52 AM
why can't I star your message sterling archer
flanky internet I guess nevermind
well you can automate trains so it is useful for that
and planes
 
planes?
 
automate ants, so we don't waste cpu cycles on them anymore
 
@david yeah planes are safer to automate then trains in terms of crash ratings
 
@William ahah, i was talking about factorio... that's where the image kendall linked is from
 
I thought you meant IRL lol
 
3:16 AM
does node.js use web workers? Don't its promises/futures run in separate threads?
 
node is multithreaded to handle io and stuff
it's just the event loop that runs in a single thread
 
ok, so if I have a long running process, I can just put it in a promise and move along?
 
i think webworker support hasn't gained much traction because you can just make child processes
 
Exactly.
That is the crux of my question
no need for workers out of the browser
 
uhm... what do you mean long running process?
 
3:21 AM
All kinds of things, but maybe imagine a raytracer that you invoke with an http request.
 
that you'd definitely want to put in a separate process, and possibly even a separate language
or shard the shit out of it and have your node server running on 100 different machines behind a load balancer
 
Long running. :)
Personally, I wouldn't use node for anything, but I'm building a JS library for image processing in the browser, but want it to be node friendly as well. It seems that it already is, because you can just use node futures and promises normally.
it's these web workers that are killing me.
 
3:41 AM
if your promise pegs the event loop it's still going to block incoming connections
 
Can I leave that up to the developer?
 
if your method returns a promise then people are going to expect it to be async
if you return immediately then they will know it's sync, and they will have to do the child process stuff themselves
you don't want to return a promise that pegs the event loop and then resolves synchronously
so yeah, leave it up to the developer, but don't return a promise in that case
 
Cool. That's how it is now. I'll revisit node when the browser works.
thanks for the advice
 
no worries, what image processing are you doing?
 
I have a few applications in computer vision and image analysis that really need to run in the browser. Also, looking for good image processing performance to underpin a sprite library.
So right now, it's more about making this possible.
Large images and involved processes aren't hard to implement in javascript, but they tend to trigger its timeout limits and hang the page.
So I'm doing all of this painful stuff to coordinate with web workers.
It's nice of you to ask, but tell me. Do you think other people would want something like this?
 
3:55 AM
it's hard to know what people want, it sounds a little niche, but if anyone ever needs it they will be glad you put the time in to make it work
If you're worried about making the browser hang and want a faster method than webworkers, people often take computationally heavy tasks like this and timeslice them
 
I looked at that early on. Do you think that's any easier than web workers?
 
for example, if you're looping over the entire image you can do one row and then set a timeout to do the next row in 10ms
or use developer.mozilla.org/en-US/docs/Web/API/Window/… which i believe is the preferred way of doing heavy work
depends how hard you find webworkers
for proof of concept stuff i usually timeslice it
but ultimately you will probably be best off with a webworker
 
I hadn't heard of requestIdleCallback. Does that run in a separate thread?
 
nope
it's just like requestAnimationFrame and setTimeout/setInterval
 
how wouldn't it hang the browser, then?
 
4:00 AM
it runs in the same event loop but it's lower priority and the browser tries to run it when it's not doing anything else
because you don't do all the processing at once
 
so it executes part of the function, then returns to it?
 
you work for however many milliseconds you want to and then give up control to the rest of the page till the next idle callback fires
 
ok, so I have to write the callbacks in a stateful way?
 
here's an example. I was trying to calculate a dither effect, but it takes a second or two to process, so i split it up using setTimeout: jsfiddle.net/ctrlfrk/q6c7qgqj/7
2
 
That sounds really useful, david. I appreciate it.
 
4:04 AM
which means that while it's processing i can still interact with the browser
i'm doing 1000 steps at a time in that link. if you find the bit that says iterations < 1000 and change it to say 100 then it will be slower, but the page will be more responsive
change it to 10000 and it will be faster, but the page will be less responsive
 
Yeah, that's pretty cool
Those were insightful suggestions, david. I think web workers is still better for my design goals, though. This is actually a scala.js library that cross compiles for JVM and JS. If I do timeout or requestIdleCallback it makes no sense from the scala or java perspectives.
Also, if I was just doing one image processing function, like your dither, it would make sense, but since I have to write hundreds of image processing functions, it'd be harder to design them all this way compared to just writing a generic way to delegate the computation to the worker. A way that'll work for all of the methods.
 
Hmm, that's an interesting constraint. Give me a minute I'm having an idea that might work via async functions
(but yeah go for webworkers, it definitely sounds like the best fit)
 
I'm using callbacks to interact with the workers, if that's what you're suggesting.
 
I think that's the only way you can interact with them right? I haven't actually looked at the spec in a long time
 
It's actually pretty insane. I serialize objects that wrap method invocations with their parameters, send them to the web worker along with image pixel data, deserialize them no the worker side, then return the results in another serialized object wrapper.
You interract with workers with messages
fire and forget only.
 
4:18 AM
yeah, that's...
 
so there's also all this multiplexing.
 
shit, there's shared memory stuff that may or may not be out yet
 
I'm interested.
 
>Note that SharedArrayBuffer was disabled by default in all major browsers on 5 January, 2018 in response to Spectre.
nvm
 
Yeah, that's what Benjamin Gruenbaum first chimed in with.
Thanks for the thought, though.
 
4:28 AM
Okay, so you could put all of your code into async functions
 
howso?
 
and then using this function: const nextIdle = () => new Promise((resolve) => requestIdleCallback(resolve));
you could put in await nextIdle(); to give up control for a bit
 
oh, to avoid web workers?
 
yeah
but you should still do webworkers
this is just an exercise for me now :P
 
It's interesting. what is resolve?
 
4:32 AM
when you create a promise you give it a function that gets called with 2 arguments, resolve and reject
you use those to either resolve or reject the promise
I mean you could just write it like const nextIdle = () => new Promise(requestIdleCallback); but that scares people
it means that the requestIdleCallback is getting the 'reject' function as its second argument, which is normally an options object, but because none of the fields match up it still works
Here is an actual code example of what I'm talking about: jsfiddle.net/43hwkuzp
 
ok, cool
 
4:52 AM
what's the easiest way to remove the last element in array?
 
pop?
 
exArray.pop?
pop(exarray)?
 
yeah
nah, [1, 2, 3].pop()
 
i want to remove the last element and return the rest
pop returns the last
 
exArray will have the rest
like, it actually removes it
!!> const a = [1, 2, 3]; a.pop(); console.log(a);
 
4:54 AM
@david "undefined" Logged: [1,2]
 
got ya
 
the other option is to use slice
!!> [1,2,3,4].slice(0, -1)
 
@david [1,2,3]
 
5:18 AM
can anyone help me with this
0
Q: How to make series in HighCharts change Dynamically using Javascript and not Jquery

Gvs AkhilI have searched all over the Stack Overflow Website and can't find a Perfect Solution. So someone who is good at HighCharts can help me out. Any answers will be Appreciated.....Please answer in Javascript and not Jquery.... Generally I am creating empty variables in Series according to my usa...

 
5:30 AM
!!> console.log(const a = 5);
 
@RachelDockter "SyntaxError: expected expression, got keyword 'const'"
 
user9539196
morn
 
\o morn
 
5:57 AM
how do i filter an object list in such a way that it keeps it's values based on an array of values?
for example, comparisonArray contains: {id = 1, id = 2, id = 3}
mainArray = {id =1,... id= 20}
how do i use comparison array to change the length of mainArray based on the comparison array?
 

« first day (2755 days earlier)      last day (2189 days later) »