« first day (1825 days earlier)      last day (3115 days later) » 

12:00 PM
You can parse comments
!!> (function(/* test */ a) {}).toString()
 
@copy "function (/* test */ a) {\n\"use strict\";\n}"
 
@copy too bad node doesn't have either in their sources
 
Oh, I misunderstood
 
.
Who dat?
 
12:06 PM
@BartekBanachewicz You can use the typescript interface files
 
@BartekBanachewicz did you just complain about optional arguments and argument order and then ask how to implement it?
@copy that jTypes tard?
Boy that sure did pick up
He showed us with his < 100 stars and no commits in the last year
 
stars is a valid measurement in anything for you?
 
user3119231
jo
 
@BenjaminGruenbaum in short, yes.
@copy oh hmm
 
@KendallFrey nice, but I've been making my own fruit mead for almost three months now. two successful batches, and two more brewing
 
12:18 PM
@BartekBanachewicz lmao
 
@rlemon Oh, I wasn't expecting this to be instructional
 
crl
!!define mead
 
@crl mead An alcoholic drink fermented from honey and water.
 
Guys, what is the easiest way to get a data attribute in JavaScript. It must be supported in at least IEdge.
 
lol
 
12:28 PM
I know of getAttribute(), but is there an easier way?
 
@JacquesMarais .dataset
also data attributes are mostly terrible.
 
Why's that?
For ui-related JavaScript they are pretty good, since you do not have to put some weird classNamess anymore
 
Hello there, didn't know these exist
 
@emporio 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.
 
12:36 PM
@dievardump It's storing information in your presentation layer and then performing a query on your own presentation layer to retrieve the information. Just store it in regular objects instead of storing application state in the DOM.
 
Hum? If my HTML is built with whatever back-end language, with tabs there, and there, and there, all activated with some interactions on the page, I don't see how to notice the JavaScript of those interactions without putting some data- attributes on the elements
 
@BenjaminGruenbaum vOv
 
(an example would be a slideshow, with full size images, thumbnails, descriptions panel, mapped to a googlemap, ...)
 
Apple trolls us all to show how the Friend list on Apple Watch works. Read the initials... https://support.apple.com/en-us/HT204833 http://t.co/jWafDK0mkX
omf-
 
How is the apple watch?
 
user3119231
12:47 PM
If I call an input via class isn't click() executing?
 
I don't have 1800 dollars to drop on a phone and watch, but curious
 
user3119231
okaay nobody knows
 
@Maurize WAT ?
 
@Maurize Your question makes no sense
 
user3119231
I am triggering a file upload via image.
 
12:50 PM
My brain went to coma for 5 seconds
 
user3119231
On image click console log works. But browse file button doesnt execute
 
you want to use .focus()
@Cereal o/
 
Just spent $4 negotiating which slightly different version of a $1.33 piece of hardware I need for my phone.
 
user3119231
						<form enctype="multipart/form-data" style="display: none">
							<input class="navigation_menu_wrapper_image_upload" name="upload_profile_image" type="file"/>
						</form>
 
user3119231
	if(e.target == qs(".navigation_menu_wrapper_image")){
		qs(".navigation_menu_wrapper_image_upload").focus();
		qs(".navigation_menu_wrapper_image_upload").click();
		console.log("fuck you!");
	}
 
user3119231
12:52 PM
only fuck you in console.
 
@BartekBanachewicz how's work?
 
.focus works fine for me
 
@AaronHarding omg amazing
Someone got so fired
 
user3119231
Le me try on chrome
 
@BenjaminGruenbaum I keep finding out new problems with Node ;). It's fine,.
 
12:53 PM
@Abhishrek \o
 
> JavaScript - Scripting Javas
Who came out with the Scripting Javas ?
 
@BartekBanachewicz problems with node?
 
@BenjaminGruenbaum like those changing signatures
 
user3119231
@Abhishrek this firefuck is driving me crazy! On chrome it works well!
 
:P firefuck
 
12:55 PM
@Maurize Profanity will not domesticate the legendary firefox.
 
user3119231
Man last time there was this js function not working. today I'm not able to upload a fucking simple image?!
 
user3119231
They can't be serious!
 
I forgot how I used to do it.
lemme try.
 
user3119231
And? Does it work for you?
 
@Maurize You're probably doing it wrong
 
user3119231
12:58 PM
And why does it work in chrome and not in firefuck?
 
Because you did it wrong
That's how I know you did it wrong
 
user3119231
how to do it wrong if it worked even in firefox, yesterday?
 
That's not how computers work
 
@BartekBanachewicz which you wanted to implement :D
 
well .click works
sorry about the .focus
you should see it open two times if you click elsewhere
@Neal o/
 
1:01 PM
@KendallFrey you made me realize I was out of honey
 
user3119231
@Abhishrek nope, only 1 is opening.
 
st jacobs market. 5kg of honey for $50
 
@Maurize on firefox ?
disable one at a time ...
 
user3119231
man I will take you a screenshot
 
@Maurize Does your console say anything..?
 
1:03 PM
I got to go
seriously bye
my cat just ate a dog alive.
 
user3119231
 
remember all, cats in India means Tiger
 
user3119231
@Cereal Yeah, it says something.
 
@Maurize All i see is wallpaper
 
@rlemon or Leopard, seems like they have those guys around town a lot too
 
user3119231
1:04 PM
huh? wtf
 
@GNi33 true
 
 
@GNi33 Raw video after editing out the part where villagers were attacking the leapord for hours
 
I won't ever blame a wild animal for being a wild animal
 
@BenjaminGruenbaum I am wrapping functions with optional callbacks. I am wrapping the callbacks passed. In some cases though, even if the user doesn't pass the callback, I want to call the wrapper around a NOP. Inserting that param becomes tremendously hard.
 
oh god, my girlfriend will love this
 
well, I love it too
 
but in other news, I picked up 12L of apple cider today for $20
cc @Nick
 
nice
 
1:08 PM
I love apple cider
 
I love fermenting it
 
user3119231
Uh, I'm creating an cordova project -> Users login with ajax and localstoreage to save data -> I want to upload an image and add it to the users folder (example: user id 10000 so folder name is 10000) .. Questions is, is there a way to give variables on file submit ?
 
user3119231
done.
 
@Maurize if you are using cordova jesus friken christ
why do you even test on firefox ?
 
user3119231
1:15 PM
I am creating the project as normal html project. I will later convert it with cordova into an apk
 
user3119231
that is all
 
@BartekBanachewicz so don't use callbacks...
Callbacks are silly.
Return promises instead, and use async functions and generators and not-horrible APIs
 
@BenjaminGruenbaum Node.js provides an API that uses them. We instrument Node.js API. No choice here.
 
@BartekBanachewicz oh you need to wrap NodeJS?
 
1:17 PM
@BenjaminGruenbaum and other libraries yes.
 
@Maurize thanks. Two more needed
 
I should buy a boat.. specifically this boat:
 
@BartekBanachewicz lol, good luck bro
 
if the picture confuses you, he designed the boat to look like it is capsized, when in reality it is fine.
 
@BenjaminGruenbaum should I say that to my team lead
 
1:18 PM
@rlemon That is smart !
 
Nice boat!
 
@BartekBanachewicz no, you should automate things though.
 
@rlemon I'm jelly
 
@BenjaminGruenbaum I designed, prototyped and wrote a framework that does some heavy work for us and we're moving it into production over next weeks.
 
1:21 PM
actually I suppose the term is envious since you can only be jealous of something that you already have
So I'm envy
 
@BartekBanachewicz cool, good luck
 
@MadaraUchiha what?! Dont say that! Who kills camels? D:
 
@BenjaminGruenbaum yeah, and I'm fighting bug like those damn callbacks now :P
 
@BartekBanachewicz did you unit test it?
inb4; Why not?
 
@BenjaminGruenbaum yeah. At first I didn't think about the callback case in tests though
 
1:26 PM
hi
 
FWIW I use Mocha and Istanbul
 
how can I draw a circle with only its diamaters are visible
like a cart wheel
 
you open paint
select circle tool
 
no bro.. canvas bro
 
so you take out the canvas and the brushes and paints
 
1:28 PM
context.arc(...);
context.stroke();
 
no no, like wheels have those lines inside them passing through the center.. I can draw a basic circle
those lines
 
so you want to draw the lines in the middle
 
yes
I was thinking like drawing multiple arcs with a PI/n difference
 
@argentum47 why arcs? those are just lines.
draw N lines rotated around the middle vOv
 
yeah that's where I faced the problem again
ok
 
1:34 PM
so ...
context.moveTo(..)
context.lineTo(..)
 
[draw a vertical line, rotate the canvas ] x loop
 
are you asking how to do the equation?
 
@BartekBanachewicz that's a terrible idea
 
@ssube why?
 
@rlemon yes
 
1:35 PM
then ask that
 
no equations are needed if you rotate the canvas vOv
 
@BartekBanachewicz canvas doesn't rotate and doing the rotation will be slower than just drawing lines
you're overcomplicating it
 
what do you mean "canvas doesn't rotate" when it does
 
@ssube rotating the canvas isn't that bad of an idea actually
probably is what I would do
 
rotate(angle)
Rotates the canvas clockwise around the current origin by the angle number of radians.
 
1:36 PM
if you have a circle, you know the center and radius, which makes drawing the lines simple sin math
you're not going to get much cheaper than that
 
rotating the canvas is easier than calculating the new points on the circumference
 
@ssube how is "simple sin math" simpler than "draw a vertical line, then call rotate(degrees)"
no trigonometry required.
 
@BartekBanachewicz if the circle isn't centered, rotate can't work at all
 
sure it can...
 
@ssube then translate to the origin first duh
 
1:36 PM
^
 
this is like computer graphics matrix stacks 101
 
I might not be a real 'graphics' guy, but I've done a bit of Canvas.
 
you're going to translate and rotate the entire buffer instead of calling sin/cos once?
 
@ssube it's not doing any buffer operations lol
it's only changing the matrix.
 
and how is updating the matrix (which may impact the pipeline) a better idea than just doing math?
 
1:40 PM
@ssube and how is updating the matrix different from just doing math? ;)
except of course being tremendously simpler to write.
 
tremendously? is finding two points on a circle really that hard nowadays?
 
you didn't answer my question.
 
you haven't asked any serious questions
 
2 mins ago, by Bartek Banachewicz
@ssube and how is updating the matrix different from just doing math? ;)
is that not a serious question?
 
oh, that looked like a smartass quip
it's more math for no real reason
 
1:42 PM
@ssube it kinda is.
@ssube for the reason of having actually composable transformations, and it's "more" of which you didn't write because it's implemented in the framework.
 
@BartekBanachewicz o/
 
I also think there's a possibility of the simple rotate() version outperforming poorly written direct version.
Because I'd expect matrix multiplication for WebGL being implemented natively instead of using JS primitives.
 
JS math is pretty fast, so it's a couple JS math operations or two potentially-native matrix ops. That's not going to weight too much either way.
 
@ssube Exactly, so why bother with writing error-prone one-off calculations if all you want to do is simple rotation.
Never write code if you can not write code vOv.
 
1:47 PM
If you have trouble with converting an angle to a point, you may want to reconsider doing anything in graphics. :P
 
it isn't about 'trouble'
it is about a easier way which doesn't impact performance in a negative enough way to care
programming 101
 
see, I still think running through the lines and precalculating the endpoints will be simpler
performance is going to be pretty equivalent
 
@ssube okay, write your version and I'll write mine, and we'll compare them both visually and in jsperf.
 
if there were a million, you'd want to use the matrix transforms and batch a single line, but for a few, precalc typically wins out
 
jsfiddle.net/LL98L0hg this is kindof embarrasing
helpz
 
crl
1:52 PM
what's the problem? you want a circular canvas?
 
That's pretty sweet
 
apparently Mozilla, long long ago when they were in the business of doing weird non-standard shit, made a JSX equivalent: developer.mozilla.org/en-US/docs/Archive/Web/E4X_tutorial
@Loktar some trivia for you
 
@BartekBanachewicz awsome
 
1:55 PM
ctx.moveTo(0,-100);
ctx.lineTo(0, 100);
 
ctx.moveTo(0,-100);
ctx.lineTo(0, 100); please explain
 
the -100, 100 makes it go both directions
 
it's a vertical line from 0, -100 to 0, 100
since we rotate around 0,0, if you want it to extend to both sides you need to go into negative-y
@ssube so just waiting for your version then
 
jsfiddle.net/rlemon/LL98L0hg/6 ignoring the messy lines because I'm too lazy to tweak it. translate / save / restore all only needs to be done once.. in this limited example ofc.
translate may need to be moved into the loop if the image is not centered already
 
1:57 PM
@rlemon yeah i kept them in order for setInterval to work
 
@BartekBanachewicz ofc, but if you two are splitting hairs with a perf test...
 
It took 3 days.. but I finally setup a dual server to host a nodeJS module, and embed a PHP CMS hosted on a different port.
Damn servers.. you scary.
 

« first day (1825 days earlier)      last day (3115 days later) »