« first day (1286 days earlier)      last day (3663 days later) » 

6:00 PM
how would you guys go about calling functions from a DLL in JS
 
function createLine () {
    var obj = new THREE.Line( lineGeometry.shark, lineMaterial );
    return obj;
}
var SHARK = createLine();
console.log('SHARK: ' + SHARK); // [object Object]
[headscraching intensivies]
 
@Mosho By stopping what I was doing and reconsidering the choices I've made in my life.
 
that bad huh
 
@Schoening y u scratch head?
 
I thought about making a server that can call those functions and send requests to it
 
6:02 PM
@Mosho That's probably the way to do it.
 
or implementing those functions in JS as I have the source
 
Because it is supposed to log something like this:
THREE.Line {id: 5, uuid: "4FCF0E6B-287B-473B-9779-453EB52C0942", name: "", parent: undefined, children: Array[0]…}
@RyanKinal
Actually.. that is what it logs if I console.log(obj) inside the function...
 
And what if you console.log('SHARK: ' + obj)?
 
Uncaught ReferenceError: obj is not defined as expected. Since obj is defined inside createLine
 
So do it inside the function
I wouldn't ask you to log something that is obviously undefined.
 
6:05 PM
@Schoening - concantenating a string with anything else always gives you a string, so
'string' + object == string
 
@RyanKinal oh you clever man. @adeneo yeah now I understood it.
 
which is why you get that result in the console
console.log('SHARK:', SHARK);
 
Learned something new then. Had no idea I could use comma inside the console log
 
6:07 PM
The console has a multitude of useful commands, read a tutorial and you'll be amazed
 
and some useless commands
I never saw a use for the first format parameter for example, apart introducing strange bugs
 
I check out the mdn at once!
 
!!urban multidude
 
@Mosho Multidude A multilateral thinker with multiple intelligence - knowing the multiple things that need to be done for the good of humankind and does them, especially at times when the other dudes/people do not.
 
s/urban/define/
 
6:09 PM
Nothing useless about console.log('%c WHALE', 'color : blue; font-size: 10em')
 
Oh, heh... multiDUDE...
 
Does anybody have knowledge of phonegap or knows somebody wha can help me 5 minutes with a simple positioning issue?
 
@Zirak hum... this is interesting but we may have a different definition of useless :)
 
@dystroy So most uses of printf are useless? It's pretty handy to be able to do console.log('%s and %s and another %s') and not split the string up. That way, you can have a format string in another variable.
 
@Zirak AGH! A WHALE!
 
6:12 PM
@Zirak Do you really use that in the console ?
 
Shouldn't the whale be white ?
 
Yep
 
^ I thought so
 
@Zirak So, why don't we get sprintf?
 
sprintf, that would be useful
 
6:13 PM
@copy We don't have a lot of things we should have.
I think some sprintf thing is in ES6
 
(but not useful enough to want to bloat my code with my implementation)
@Zirak Hu ? Does somebody here have more information ?
 
var name = "Bob", time = "today";
`Hello ${name}, how are you ${time}?`
^ ES6 template strings
 
Oh that :(
 
They smell, to be honest. The backticks are just foul.
 
user1596138
Anyone else?
 
user1596138
 
A python-esque format function would've been great.
 
node has that
 
In Go, string literals are also done with backthing and I like that
 
user1596138
I don't know anything about it. But 17 hours. I should probablyget to band-wagon freaking out
 
@Jhawins Ominous...
 
6:15 PM
@Mosho That's tremendously helpful for browser js
 
yes
 
@Zirak it's fairly small and portable
yeah, would be nice as a language feature though
 
user1596138
The page hilariously always is at 17 hours
 
Holy shit... my designer sent me an actual style guide, so I don't have to guess at everything.
 
Okay everything works now @RyanKinal @adeneo You are the heroes I need. But not the heroes I deserve.
 
6:18 PM
Damn straight. You're very welcome.
 
:D
 
ha someone got any idea of what this is?
Uncaught SecurityError: Failed to construct 'Worker': Script at (url here) cannot be accessed from origin 'null'.
 
Are you testing in file:// ?
 
SOP
 
6:20 PM
@dystroy yes
 
Use an http server
 
@t1wc - Someone doesn't have a web server
 
!!mute
 
@adeneo someone was able to test his js stuff before this...
 
6:21 PM
lulz
 
@t1wc simple js stuff then. You need to have an origin for so many things...
 
@t1wc Are you pulling scripts from another server?
 
@dystroy guess so
@RyanKinal no
 
Huh. Interesting.
 
6:23 PM
It's been so long since I've tested anything without a server.
 
Is it weird that for the past 6 months I've been using my laptop screen as the "main" screen and my larger external monitor as my side screen?
@adeneo wampserver <3
 
@RUJordan Depends on what you mean by "main" and "side"
 
@adeneo easyphp is horrible. It sets messed up mysql settings (or at least it did 10 or 15 years ago when I last tried it)
 
@RyanKinal like my laptop screen would have my browser, and my external would have my code.
 
I write code on my laptop screen, and look at the pretty stuff (the rendered pages) on my external.
Ah. Yeah.
 
6:24 PM
Yeah see I did it reversed and I don't know why
 
@dystroy - It's actually excellent, if you don't need anything other than a simple server
 
@RyanKinal You're in SF? BEERBROS
 
A lot of people ask my I don't code on the bigger screen.
@SomeKittensUx2666 No, I'm not. Not yet, at least. I might be in the Bay Area sometime in the next few months.
 
Might visit the Redwood City office.
 
6:26 PM
!!afk watching Fargo
 
@adeneo good choice
 
@kips15 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.
 
@dystroy I saw like a quarter of an episode of Fargo and I was blown away
Like 5 minutes and they already hooked me on the story line and I knew nothing about what was going on
 
An episode ? Damnit, I was thinking about the Cohen brothers movie :\
 
@Bill 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.
 
6:28 PM
Then, I don't even have an opinion, I remove everything I said about Fargo
 
Oh sorry, I don't know that movie. There's a show on FX called Fargo now (I'm not sure if you have that channel where you are)
 
I don't have any channel
 
Don't watch TV?
 
no
 
The show is based on the movie
That's about all I know about the show.
 
6:30 PM
sup
 
@BartekBanachewicz hi banani
 
oh hi
Lounge is dead
 
Hey Bartek
 
Today @copy and I bought bananas
 
Bananas!
 
6:31 PM
good choice
 
@BadgerGirl watch out for Wandering Spiders. They hide in bananas are are pretty venomous
 
I should buy some bananas.
 
so I wrote a thing in JS
 
@BartekBanachewicz happens even to us
 
var aThing;
 
6:32 PM
@dystroy I can imagine.
 
@BartekBanachewicz That's fucked up.
 
it looks like this
you can connect stuff to each other and it computes what you want
 
Is it concatenating instead of adding, then?
 
blame JS type coercion
 
@BartekBanachewicz looks cool
 
6:34 PM
@dystroy it's a proof of concept for my BEng project
 
@Jhawins app is demo ready
 
1 + 2 = 12
 
user1596138
O/
 
add is implemented as a + b vOv
 
\O
 
6:35 PM
so when I take the value from the textbox I get a string
function add(x, y) {
    return x + y;
}
add.signature = { ins: ["int", "int"], outs: ["int"] };
 
And did you parseInt?
 
I have that, but it's used just to create the block connections
@RUJordan I need to make it more generic somehow
 
uhh...
 
@Jhawins \o
 
function add(x, y) {
    return Number(x) + Number(y);
}
 
6:36 PM
I am considering pulling in TypeScript for that part anyway
 
we will, we will BE RICH !
 
Generic?
 
@RUJordan in general, those blue dots represent integer connections
 
@RUJordan it will return a lot of Nan's
 
not good: I am trying to have a web worker and require js work toghether
 
6:37 PM
@Attila 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.
 
I might change inputBlock return to string
and add converter block
 
@AbhishekHingnikar doesn't ES6 have an isNumber() function?
 
after many trials ending up in errors from vanilla js... I finally got one from require
 
this would be nice, I'll do it
 
meaning it got loaded
 
6:37 PM
@RUJordan idk
 
i am not the Es6 guy
 
this is the error it gave
 
!!learn es6 @BenjaminGruenbaum you are needed.
2
 
@AbhishekHingnikar Command es6 learned
 
6:38 PM
When RequireJS is used in a Web Worker, importScripts is used to load modules. If that call failed for some reason, this error is generated.
 
lmao
 
that's it... no more explanation
how the heck should I fix it?
 
hey its not a joke
but its rather a complement
hes the ES6 guru in here.
 
@t1wc jQuery.requireFix();
 
6:39 PM
@rlemon I don't even have jQuery loaded
 
^ first problem
jquery ALL OF THE THINGS!
 
are you serious -_-
 
^ awesome !
 
6:41 PM
that's creepy lol
 
wait... how long haven't you been here for?
looks like months
 
@BartekBanachewicz are those block/transitions generated or did you just draw that with paint?
lol drawing with pain.. classic typo
 
@AbhishekHingnikar what's that? Did I miss a Dr.Who reference, or something?
 
@JanDvorak read
 
@RUJordan nah, those are blocks generated from functions, you can move them around and change connections freely
 
6:42 PM
@t1wc I did.
 
    function toInt(str) {
        return parseInt(str);
    }
    toInt.signature = { ins: ["string"], outs: ["int"] };

    function toString(num) {
        return String(num);
    }
    toString.signature = { ins: ["int"], outs: ["string"] };
@t1wc yeah, quite a bit
 
@JanDvorak thats really scary
 
@BartekBanachewicz Yucky
 
@JanDvorak so, imagine you see that creepy thing, and it looks like one of the horror movies thing
 
@BartekBanachewicz wait a munute did you made this so that u can get rid of writing js or something ?
 
6:43 PM
he said: he's just a desktop image
it won't move
but then opens window, without seeing behind it
 
@BartekBanachewicz don't forget a base parameter for the parseInt(str,10)
 
when he's finally done hecloses those windows
and finds out that the scary face is looking at him
 
i am so gonna do it to my mum
on her new iPad :D
 
@AbhishekHingnikar haha, you could say that... in a way. It's supposed to be sort of a game maker, and I am experimenting with the block layouts that we could use in our project.
 
I like pranking her !
@BartekBanachewicz oh cool, did you tried looking into SNap ?
 
6:44 PM
@Zirak do you have any idea, aside from using typescript, to improve that?
 
@AbhishekHingnikar never afraid of her pranking back?
 
@AbhishekHingnikar snap.svg or some other snap?
 
@BartekBanachewicz the snap by jens monig
 
Sorry, a radix, not a base parameter
 
@BartekBanachewicz Yes! Don't do these kind of things.
 
@BartekBanachewicz is signature a prototypal function?
 
@Zirak when your goal is to create logic editor that uses blocks, the solution is hardly "don't create logic editors that use blocks".
 
have a look, it feels similar to me [if thats sort of game maker]
the code that snap generates is pretty darn high performance
 
@BartekBanachewicz Sucks to be you, then.
 
@AbhishekHingnikar OIC. Yeah, I've seen it.
 
6:46 PM
and also accounts parallel actions of multiple sprites
very nicely :-)
 
@Zirak I don't really mind it. Unreal Engine 4.0 has block schemes that work amazing.
 
^
so does scratch.mit.edu and boy they have a gazillion people [ < 18 ] who love it and use it for nitty gritty projects.
 
@AbhishekHingnikar I hope what I am doing will also work acceptably fast. That's why I need some prototypes to see if it would be able to run, say, 1500 of those in each frame.
 
@BartekBanachewicz hmm.
snap afaik, can perform ~ as fast as js
but there are tweaks that you have to do to get that performance :[
 
@Zirak also if JS had optional static typing, it would be way easier.
 
6:48 PM
A piece of my dies when I see questions are tagged jQuery and not JavaScript.
2
 
We should really kill javascript and replace it with something like Haskell
Haskell is the greatest thing in the history of mankind
 
I feel like if jQuery is tagged, JavaScript should also be automatically tagged.
 
When I wake up, I think of Haskell and get a boner
 
@Zirak well, have you seen last talk about "2035"?
 
@Zirak fuck JS.
 
6:49 PM
Enough circle-jerking now?
 
I am not sure what you're trying to say now.
I said "if a language can do static typing, reflection makes sense".
And you're mocking Haskell in exchange.
 
When doesn't Zirak mock things?
lol
 
@AbhishekHingnikar lol :P?
 
@RUJordan wrong. Coffeescript anyone?
 
@BenjaminGruenbaum iirc you are the most es6 knowing person around
@Zirak python would be best
browsers should support python !
or lua.
 
6:51 PM
Oh totally Python is the greatest thing in the history of the world
 
@JanDvorak me
 
@FlagTroll - Explain to me how either of those were spam or offensive?
 
JS is awesome
 
When I wake up, I think of Python and get a boner
 
@rlemon ... what was flagged this time?
 
6:51 PM
@BenjaminGruenbaum err it is. but um err. duh
 
When I wake up, I think of boners.
 
@rlemon didn't flag, but maybe it's because they contained expletives.
 
Ziraks boner and your fuck js call.
 
@KendallFrey ... and get a Python
 
Did the ghost of javascript flagged it ?
 
6:52 PM
@AbhishekHingnikar I was talking about this /cc @Zirak
 
Zirak's boner is big enough to hang a flag on...
 
anyone had deployed an angular.js app at Heroku?
 
WHO PUT A FLAG ON ZIRAKS BONER? >=(
7
 
when I wake up I... wait... do I ever wake up?
 
> A talk by Gary Bernhardt from PyCon 2014
 
6:52 PM
@AbhishekHingnikar some users are not much smarter than javascript automations
 
@AbhishekHingnikar actually a nice talk. I enjoyed it.
 
@RUJordan oi there is a nice mount man, somebody would off just used it right !
 
I'm gonna fly my flag at half-shaft now.
2
 
I literally just thought of "I claim this land" and planting a flag in the ground.
@KendallFrey LOLOL
 
@BenjaminGruenbaum I don't buy the +30%/-30% thing resulting in a speedup though
 
6:53 PM
@RUJordan got it, then that was ziraks girlfriend flagging it !
 
@BartekBanachewicz the cool thing is the idea, that we save the huge system call overhead.
 
@RUJordan There's even a pre-made hole to drop it in
 
xD
 
@Zirak when did u got an overly obsessed girlfriend bro ?
 
Oh jesus
@BenjaminGruenbaum is there an ETA on ES6?
 
6:53 PM
i mean come-on, she got all jealous of us
 
@AbhishekHingnikar The moment I met you
 
@BenjaminGruenbaum It's undeniably cool alright. And not only because all languages will be usable in browsers.
 
@NessDan 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.
 
@BartekBanachewicz kernel/user code switching and system calls are really expensive, saving that saves a huge deal of complexity.
 
that being said, kernel is still pretty damn fast.
 
6:54 PM
@BartekBanachewicz hopefully, in 20 years we'll be using different languages.
 
@NessDan sorry you had to come in at such an awkward time
 
@BenjaminGruenbaum We knew that before, but we want to keep the kernel small
 
@Zirak soooooooooooo, you want to say that I inspired you so much about switching girls more then underwears (quouting your statement years ago) that you tried to test one yourself. Got it !
 
@BenjaminGruenbaum and they will rediscover Scheme and ML all over again, huh?
 
@BartekBanachewicz that's the thing, not from userland code perspective. A system call is like, a hundred times slower than a normal call.
@copy what?
 
6:55 PM
@rlemon I flagged it. If we want this chat room to be inclusive and inviting the language we use makes a big difference.
 
the rings of protection thing.
 
@BenjaminGruenbaum We don't want to have a language implementation in the kernel
 
Today morning when i took a nap i had a dream of writing dom code in python
that was "awesome"
 
@Raine well, the thing is, Zirak is like this racist old grandpa. He gets away saying things other users don't.
 
@Raine You flagged because of Haskell?
 
6:55 PM
wait wut? flappy2048.com
3
 
@Raine Are you saying javascript is offensive?
2
 
He's saying our conversations are offensive
 
If people can't endure that kind of language, what are they doing on the internet?
Surely the function word isn't news.
 
@copy oh of course, but in that talk he talks about using the complete isolation the browser gives you. he wants to bytecode everything into asm.js and then use the browser as the security layer. It's a really cute idea.
 
@Raine if the word boner offends you, you do not deserve to be a human. Cause you know.. it's not like it's a natural thing or whatever.
 
6:56 PM
@t1wc thats awesome
 
Delusional, but like @BartekBanachewicz said undeniably cool.
 
@BenjaminGruenbaum And it affects everyone who joins the conversation. May not bother me excessively, but I would like to create an inviting atmosphere as well for people who aren't just part of a specific internet subculture.
 
@xdemocle 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.
 
@Raine yeah, I get why you flagged it, I'm just saying, in the future - I would not.
 
@t1wc score of 1 on the third try
 
6:57 PM
@Raine no offense, but if you barely every talk here, why do you care so much? These guys are the most helpful people I've seen on SO.
 
@JanDvorak you have to hit 1
 
@Raine Okay. Your atmosphere will have unicorns and ponies and wood nymphs will feed everyone by hand. Our atmosphere will have people and interesting discussions.
I can make that trade-off.
 
@t1wc got it
 
@t1wc very awesome game to play, better then both imho
 
@Zirak but.. unicorns and ponies?
 
6:58 PM
@BenjaminGruenbaum That being said, there's no reason why we should use asm.js for that. In particular, asm.js could be transpiled into 1:1 bytecode and that would at least parse and load faster.
 
@AbhishekHingnikar I prefer regular 2048
 
i am at the 2048 block
and loving the creativity he did.
 
Flappy 2048 is a pretty cool mix of the two games.
 
@JanDvorak score of 17 (131072) at first try
 
I was way more impressed than I thought it would be
 
6:59 PM
nice. I'm at 4
 
@BartekBanachewicz well, I hope it's neither, I hope that in 20 years we have something better.
 
@RUJordan I just discovered this chat and I think it's a great way to connect with other people passionate about JS as well as assist people with questions they have. The atmosphere can cultivate a positive experience for people, or drive them away. I'm in favor of creating a positive experience for people. Obviously that doesn't mean extinguishing a sense of humor.
 
score, not value
 
oh, rice is ready
 

« first day (1286 days earlier)      last day (3663 days later) »