« first day (1877 days earlier)      last day (3057 days later) » 
00:00 - 20:0020:00 - 00:00

crl
8:06 PM
maybe this can be interesting codewinds.com/blog/2013-08-04-nodejs-readable-streams.html example of stream.Readable
 
8:17 PM
Hi there. I was wondering...
I have an immutable Vector class and I want to be as efficient as possible since it will be used in a physics engine. Would it be a good idea to have all computed properties stored in the instance on the first call? For example, there would be a getLength method which computes the length of the Vector out of X and Y on the first call, but later calls would return the same value every time you call getLength afterward?
 
meta.stackoverflow.com/a/311852/2476755 the pun was even more appropriate this time 'round
@JacqueGoupil you answered your own question: it's immutable. Why would you recalculate a property on something that won't change? What you can do is use lazy evaluation, that is, you can wait until the length property is called to calculate the vector's length and store the result for future calls.
 
@royhowie I just realized, this also means I can actually store either x,y or length,angle on creation using two different constructors / factory methods. If it makes more sense to create a vector in polar coordinates, it will use only polar coordinates. As soon as you ask for the x/y, it would use the x/y...
And vice-versa. I just convinced myself, that will be an interesting class :)
 
crl
(sandersdenardi.com/readable-writable-transform-streams-node I guess this can be made sexier with es6)
 
i have queries.
function buildFunctions(){

	var arr = [];
	for(var i=0; i < 3; i++){
		console.log(arr.push(i));
	}
}

buildFunctions();

var arr2 = [];
//console.log(arr2.push(0));
arr2.push(0);
why does it show 1,2,3 instead of 0,1,2?
omit the last 3 lines
 
8:29 PM
!!tell nickB mdn Array.push
 
Read it carefully
 
okk
 
@nickB aka note the section
> Returns
> The new length property of the object upon which the method was called.
 
ya. that's what i'm thinking.
but shouldn't it return the element?
 
8:30 PM
@royhowie That's exactly what I didn't want to point out and expected him to find out for himself
 
@Zirak ='(
 
@nickB Whether it should do one thing or another is a moot point, that's the behaviour
 
distro.ibiblio.org/tinycorelinux/tcz_2x.html lol this is more terrible than debian
 
I got it to work, but not entirely correctly. Buffers and streams... I didn't even understand anything back end related a year ago.
 
@AwalGarg By jove
 
8:32 PM
@nickB shouldn't money grow on my backyard's tree?
!!urban jove
 
@AwalGarg Jove A fat joint that consists of half weed and half clove mixed together to create one amazing smoking experience. The name "jove" was created one night after rolling and then proceeding to smoke the jove on top of the Harvard University Arts Center. The jove's high hits you very hard and very fast, however it doesn't last as long as other highs.
 
@Zirak hrmm?
jove is a person's name?
 
!!urban by jove
 
@Zirak By Jove In eighteenth and nineteenth century England, it was considered a great offense to say "By God". Instead, men would say "BY Jove". Jove is an alternative name for the Roman god Jupiter. By saying "By Jove!", they could be saying "By God!", without committing a social offense.
 
that is something else. but i was expecting it to return the elements instead of length.
 
8:34 PM
@Zirak xD
 
@nickB That's okay. You learn to assume nothing and give up on logic at a certain point.
 
i understand. that's javascript.
but isn't there any logic behind that?
 
That's programming and things in general
 
okk. so what change do i make in that code to get the elements?
 
@nickB Some languages don't return anything on push or append, some return the current length, and in immutable collections the return is the new collection. None that I know return the pushed element.
 
8:36 PM
vanar.io anyone?
 
@nickB That's a challenge left to you
 
It is not that bad of a behavior, since push mutates the array. Returning the array itself would be a convenient feature, and returning the pushed value won't make sense since push is variadic.
!!> 1..__proto__.valueOf=Math.random; [1,2,3,4,5,6].sort()
 
@AwalGarg "1,2,3,4,5,6"
 
crl
!!> [1,2,3].push()
 
@crl 3
@AwalGarg "1,2,3,4,5,6"
 
8:43 PM
:((
 
huh
 
crl
!!> 1..__proto__.valueOf=Math.random; [new Number(1),2,3].sort()
 
@crl "1,2,3"
 
for(var i=0; i < 3; i++){
		arr.push(i);
		console.log(arr[i]);
	}
@Zirak like that ^
 
Great!
 
8:50 PM
Seriously?
 
what's wrong with that?
 
shrug
It's a bit odd, but not wrong per se
 
Nothing! Let us send someone a letter, which we wrote ourselves, and then send them another letter asking for what we wrote! Totally fine.
 
then what's the solution?
 
8:52 PM
let arr = [0, 1, 2];
 
> Chuck Norris
 
or if arr already exists, arr = arr.concat([0, 1, 2]);
 
what if i don't want to use let and don't want to specify literally
 
(if my memory serves me right)
 
arr.push(0, 1, 2)
 
8:53 PM
@nickB why?
 
crl
[...arr, 0, 1, 2]
 
@FlorianMargaine coz i'm learning and exploring
 
@crl you forgot how to
 
:D
 
new forge parts
need these to dry for another 30min then I can assemble it
tomorrow I can test it out
 
8:54 PM
what are you going to do with that?
 
crl
I thought it was some characters
 
What are we looking at?
 
biking?
 
@Zirak duh, that's obvious
 
top right is the forge chamber, top left is the bottom plate, bottom two pieces are the top plates
 
8:55 PM
@Zirak LIGHT!
 
@rlemon and bottom right?
 
cardboard scrap
 
What're they made of?
 
1 part plaster of paris, 1 part play sand by weight.
let the parts dry, then make up some more of the mixture and cement them all together.
then after a day cook it in the oven, or just put the torch in and burn at a low temp
 
Neat. You'll be able to burn things at a higher temperature and set fire to the flames of your passions?
 
8:58 PM
entire forge cost: ~$20
not including the torch
 
working class hero
 
lemon is our in-house DIY hero
 
yeah. that got pushed as well in lemon array.
 
also, for size comparisons. each one of those squares is .55inches
the chamber itself is ~2.5" high
 
what else can you do @rlemon?
 
9:01 PM
banana for scale pls
 
@FlorianMargaine I measured the grid squares
those are better than a banana
 
He just likes looking at bananas
 
not just looking
 
@nickB ummm.. I am good in the garden, I can weld, I can (now, kinda, blacksmith) I can homebrew, I can make a fire with no tools.. umm.. I can cook?
I'm okay with electronics
 
crl
9:02 PM
you can a da?
 
fire with... no tools?! TELL ME! NOW!
 
He can blend
 
he can poop on slides
 
@AwalGarg first time took me like 3 hours
 
LIAR LIAR! You said no tools :(
 
9:03 PM
now I can get one going in like 25 minutes
 
sticks count as tools
 
liars
sticks are materials
not tools
 
crl
!!define material
 
sticks are tools; ask any anthropologist
 
@crl [material](http://en.wiktionary.org/wiki?curid=55530) Having to do with matter; consisting of matter.
This compound has a number of interesting material properties.
 
9:04 PM
ya good luck with that
 
crl
a silex is a tool, even though that's just a rock
 
bah
you know what I meant
make fire without 'modern' tools.
i.e with shit you can find anywhere
 
No I literally thought you can do something with human body alone :(
 
@crl "materiau"
 
crl
@FlorianMargaine yes :)
 
9:05 PM
it sometimes feels like I poop fire
 
@AwalGarg let me eat a couple chilies. 3 hours later I can produce something that will start a fire.
 
red chilli you have?
 
@ndugger great minds think alike
 
Oh god, all slides will burn then :(
 
9:06 PM
I just pooped fire; mango-habenero chicken wings Friday night
 
rlemon's poop does not melt steel slides
 
Jul 29 at 23:53, by Nick
Well, I had a bad poop, and then ate 2 hotdogs for dinner
 
@ndugger congratulations
you pooped friday's chicken wings now?
 
I pooped yesterday as well, but it wasn't the chicken wings
 
then today's fire came from where?
 
9:09 PM
the chicken wings
 
that's what i'm saying. the chicken wings took 2 days to travel through your body
 
@rlemon Ok that's real nice. Someday I might actually have to do it.
 
yes
 
I like atom, but it freezes a lot
 
rebecca.blackfriday <-- I am sooo happy with this cc @FlorianMargaine @rlemon
 
crl
9:11 PM
why? makes me rather sad
 
I guess I'll try emacs
 
open it
 
@AwalGarg NOOOOOOOOOO
 
not again
 
YAAAAAAAAAY
 
9:12 PM
WHO DID IT!? I DEMAND THEY FIX IT
 
No, they fixed it.
 
@AwalGarg btw, I think that you might like this ;) towc.eu/animation.html#0
 
now i feel sad that it's gone
:/
 
@towc Indeed
 
9:13 PM
I just love how I managed the spectrum of colors in that one
towc.eu/animation.html#1 << this one is better tho
 
@towc the site is down
 
ya, somebody tricked us opening that shit also
 
still need to work on performance
 
i guess it was benjamin
by saying that google's making a new browser.
duh
 
by the way, this is all the code you need. Add as many links as you see fit and remember the hashes ;)
var links = [ 'http://rebecca.blackfriday', 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' ];
window.location.href = links[ isNaN( +window.location.hash.substr(1) ) ? (Math.random() * links.length) |0 : +window.location.hash.substr(1) % links.length ];
 
9:16 PM
@rlemon ^ do this. DO EEIT!
 
woohoo
I'm gonna have a nice mobile phone plan
4E/mo for unlimited calls, sms, mms and 20GB internet
 
@AwalGarg don't have a crucible, or a forge capable of that. but I can build one.
after the new year I may buy a crucible
 
:V
:v
 
don't give out private information like this
 
it's open
in front of the world
in video description
 
9:23 PM
Yeah, post it on the main site instead. That'd increase the site quality.
 
:p
 
@nickB I don't care
 
hey i have a question
 
neat
 
slow clap
 
user5365803
9:29 PM
@JackSmith go ahead
 
@JackSmith what are you waiting for?
 
dies from the anticipation
 
my question is what if someone was to come on a chat and post super bad improper pictures would you flag them
 
yes
 
ya
 
9:31 PM
and kick the person
 
ffmpeg mp4->webm is really, really slow
 
and delete the messages
 
that's what flag is for, i think
 
I'd want to kick them before they get suspended, because I haven't kicked anyone ever and I want to do that once :(
 
possibly email their mother
 
9:31 PM
and father
 
I'd let Taylor Swift know
 
I'd kill a little girl to make sure it doesn't happen again
 
wat... it's taking this long, and it's only saving it as 4fps? that can't be right...
 
@ndugger no, it's left
duh
 
hurr
 
9:33 PM
ay
 
@JackSmith are you thinking about posting super bad improper picture right now?
 
Please ping me before you do so
 
@nickB hell no of corse not
 
9:35 PM
no no. don't be shy. mind thinks many things.
quite natural
 
10:24 PM
@rlemon where is that man from?
first I thought he was speaking russian or german
 
If anyone has used ffmpeg with Node; stackoverflow.com/questions/34123519/…
 
crl
don't you have to push null at the end, like sandersdenardi.com/readable-writable-transform-streams-node
 
you can destroy it too, but that's not my issue
my issue is that the ffmpeg "end" even never fires
 
@ndugger cc @Abhishrek
 
10:53 PM
@crl all I had to do was push null after I pushed my buffer in... wow... I'm dumb
 
crl
told ya :)
 
I dumb
this personal project is the most complex thing that I've ever worked on. I've had to learn a lot
 
Oh boy - someone here who has some experience with Bootstrap validator?...
 
@BoA456 Welcome to the JavaScript chat! Please review the room pseudo-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.
 
Ok. I am using this validator for my project: 1000hz.github.io/bootstrap-validator and i am in need of a validator function that checks if at least one of many checkboxes of the checkbox group has been checked. So i found this 1000hz.github.io/bootstrap-validator and can't get it to work ...
 
crl
11:05 PM
*1ghz
 
11:23 PM
@ndugger 2 tru
 
<3
 
is there a 2MB limit on the FileReader API, or any of its methods (readAsDataUrl)?
 
holy shit SIMD is a feature in ES6
 
00:00 - 20:0020:00 - 00:00

« first day (1877 days earlier)      last day (3057 days later) »