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

that's one thing that has been a bit annoying over the past year or so. there's so many "new" build tools appearing that are "better" supposedly, leaving you with projects being inconsistent, unless you go through and update older projects to use new tools which usually is a much bigger task than it's worth. i'm often more sceptical of using a new tool just because someone says it is "better"
 
!!afk home
 
@KevinB you shouldn't update often
but when they go from files to streams (grunt to gulp), the benefits are obvious
 
I started out with grunt on my first node project and it worked great, and it's still using grunt. next used gulp, and it's still using gulp, and an upcoming project by the other dev is using webpack, so now we have 3 projects each using a different build process. fortunately we can abstract that difference with npm commands though and just care about the code
 
webpack isn't a build process (or shouldn't be, that's overreach)
webpack doesn't cover half of what gulp does
 
10:03 PM
it's a dev tool, more similar to watch right?
 
it's rjs and watch combined
it doesn't really cover tests or anything like that
 
yeah, so basically it would be part of a gulp dev task. I'll have to do more research, have too many questions
 
So.... .NET 2.0 has predicates, but won't accept lamda functions, awesome.
@ton.yeung But it's a fucking Predicate!
 
I honestly don't like watching my files. I used to, when I was primarily doing LESS work, and had to make very minor changes, but just hitting [Cmd]+[B] in ST3 is perfect for me
 
@KevinB yeah. You run webpack, webpack chains to babel and your uglify/minify tools, outputs a bundle and sourcemaps.
 
10:06 PM
anyways, now I'm definitely leaving
 
Then you run karma, karma does all the setup for your tests and kicks them off (mocha or jasmine)
or, gulp just runs webpack then karma
 
@ton.yeung You can't see it, but I'm throwing a minor fit right now.
 
I've pretty much removed gulp in my build
webpack does all the things.
We just have gulp on some "legacy" stuff now
 
@ton.yeung Yea, but now I have to make a separate function just to make this bullshit work, lol.
 
wait gulp is considered legacy now?
 
10:10 PM
@NathanJones haha no
I mean I just use it for some projects where we aren't using modules or anything
it just combines/mins/ect.
really old projects
 
@Loktar i was just starting to like gulp+webpack setup
 
You should look at what you're doing with gulp, I bet webpack can do it
if you're using both together already I mean
 
webpack is bundling all my modules and deps, gulp is watching and deploying
 
@ton.yeung I've been trying to sell them upgrading for the last almost two years I've been here. They just won't take the time to set up a separate web dev server that's upgraded so I can prove that our stuff will work on 4.6.
 
yeah webpack can most definitely watch it's pretty damn fast too, however idk what your deployment piece looks like, if it's just copying files webpack can do that too
 
10:13 PM
Part of why I'm job hunting. I'm not going to keep being held back by constantly using deprecated shit.
 
but yeah you can run webpack --watch out of the box
heh you might speed up your builds if you're bundling with webpack but watching with gulp as well
 
@Loktar how bout karma tests?
 
@ton.yeung None of that, nope.
 
webpack watcher keeps the files cached in memory
 
and results/reports
 
10:13 PM
@Trasiva we had that problem here and i stuck it out for ~ 4 years, and then the people who were holding us back on those requirements quit, leaving me free to move us forward.
 
only rebuilds needed changes
 
@KevinB Considering the people holding me back are the two owners who are above me....heh.
 
@ssube i haven't personally done that, but it looks like there are some packages for it
 
@Loktar what do you use to run tests?
 
I'm a terrible person. i don't do testing :/
 
10:14 PM
@Loktar cool i'll look into that. i did see something about a react hot loader, but i didn't realize it had a general-purpose watcher.
 
specifically front-end tests
 
lol at some point I should, but I've never worked somewhere where they were really valued so I haven't invested the time :/
 
@ton.yeung Yeeeeeeeeeeeeeeeeeeeeeeeeeeeep
Welcome to my personal hell.
 
but I do my linting via webpack as well, and have a sep npm script to do just linting
 
@ssube not sure if this is what you mean by "use to run tests", but I like github.com/testem/testem
 
10:15 PM
I imagine that's how I would handle tests
 
@NathanJones ha, no
 
if I couldnt get them running via webpack id just have a sep npm script for them via the test cli.. but yeah like I said I have virtually no experience with testing :/
 
we used testem for a bit, it was one of the worst pieces of software I've seen for JS
 
@ssube haha ok then.
 
not particularly stable, not compatible with most other things
 
10:16 PM
I need to tie it to the coordinates but the map system is working now :)
 
more about style than actually running tests
 
I used it for a small side project, not much else.
 
Just need to map the player to redis and I can start broadcasting and I'll need y'alls help for that
 
plus it's meant primarily for your dev machine, not a build
 
I think I've found the worst question on any SE site ever...
-7
Q: The Moon And Warewolfs?

Zacharie TowersAs we all know ware wolfs are the creatures that no one is sure exist's but i have a theory that has some controversy that could help,considering the fact that the moon and sun help control the ocean waves,plasma in a human's blood is made of 91.5% of water,also as we know some people react diffe...

My god, people are morons...
 
10:26 PM
And here is the best question:
36
Q: How do I get my cat to wear a tuxedo for several hours?

JoshDMMy cat is quite dapper and handsome, so when we sit down for a candlelight dinner, he should have the proper attire. Therefore, I would like for my cat to wear a tuxedo. What is the best way to get my cat to wear a cat-sized tuxedo or tuxedo costume? I plan for him to be dressed this way for...

 
@SirCumference Warewolfs? Tupperware that turns into a wolf?
 
How about
-18
Q: If there is no gravity on the moon why is the american flag waving?

ZaneIf there is no gravity on the moon, how could this flag be flapping in the wind? (see link) http://www.stumbleupon.com/su/2wD6eg/hea-www.harvard.edu/~fine/images/desktops/Armstrong.jpg

 
!!afk home and codes
 
Recent Quora question that's got some pretty nice tips: quora.com/…
I especially liked the tip var a = b = c = 1; where the only actual variable made with var was a.
 
10:45 PM
Nope. That still makes b and c, but they are global.
console.log(window.b); //should be undefined
(function() { var a = b = c = 1; })();
console.log(window.b); // will have a value :(
 
Anonymous
Hey, noobs!
 
@TheProHands 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.
 
Hey professional random person?
 
i'm professionally random
It's in your name.
 
Anonymous
Thanks! :D
 
10:52 PM
hello
 
@rgodse 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.
 
Anonymous
Hello, noob!
 
:28239960 if we're noobies to you and we're mostly professionals you must be more than professional...
 
@rgodse howdy.
 
Anonymous
Nah. _00=
 
Anonymous
10:53 PM
Ur wrong, dude.
 
@rgodse Hello
 
not sure if you guys hav seen this already play.elevatorsaga.com
its fun
make sure u check the wiki link at the top right before u begin to play
 
Anonymous
Okay, I'll try it!
 
Anonymous
The script editor in this project is a bit uncomplete,
 
as in?
 
Anonymous
10:56 PM
but nice colors.
 
you hav to edit the code and make things work
not sure what u mean The Pro
 
Anonymous
Yep. That'd be nice... huh! Almost nobody in the web gets what I write in chat. :/
 
we just call him "Handsy McP"
 
@TheProHands How so?
 
Anonymous
@Cereal It's the power of brazilians, but I can't explain it so good.
 
Anonymous
10:58 PM
I'm Pro Hands.
 
Anonymous
!_!
 
Hi Hands Noob, I'm Rob.
 
The editor doesn't behave properly with Command-Left and right. It works fine with normal Home and End, though
 
Anonymous
Err... I'm not you to be nb.
 
Anonymous
But I can't do skills with tab when selecting text.
 
10:59 PM
Oh, you mean intellisense
 
if you need auto-complete you need to try harder :D
 
^
 
Anonymous
Nah. You all are wrong.
 
Anonymous
I do this in S.T:
 
i had no issues with the editor
 
11:01 PM
yea, it's fine. small issues on a mac, but fine
 
anyways go and play its addictive
 
No, I hate fun.
 
but its coding
so coding is fun
 
Anonymous
Select a script line; then press tab and the line goes a bit to ahead. If I hold shift and press tab, then the line goes a bit to forwad.
 
Coding is fun for me.
 
11:02 PM
My editor shouldn't have to be aware of my api
 
specially when it has a nice UI
@TheProHands why dont you start working on it instead of complaining about the editor
 
@TheProHands yea, shifitng in lines doesn't work. that'd be nice.
 
Anonymous
I'm a very compressor and complexor at my scripts.
 
Anonymous
Yes, this
 
er.. tabbing.
 
Anonymous
11:03 PM
make the writting more faster...
 
@rdgose yeah, it's a pretty fun game!
 
Anonymous
Yes,
 
thanks @towc
 
Anonymous
I'll do that, rg... but I couldn't be happy
 
@TheProHands did anyone ever tell you that you can't have everyhting in life?
 
11:04 PM
!!s/anyhting/everything/
 
@Luggage @TheProHands did anyone ever tell you that you can't have everything in life? (source)
 
Anonymous
Err, but I need a complete editor like my dear S.T.
 
So write one
 
^
 
Anonymous
DEAR DEAR
 
11:04 PM
or codemirror or ace or another of the html editors.
 
Anonymous
I use substring, indexOf and lastIndexOf, dear.
 
Who is "dear"
 
and from that we can deduce that...
you suck?
 
Anonymous
Yeah! By the way I'm the one that make complex scripts and that can't consider JavaScript an programming language? Dear I'm.
 
Anonymous
I'm not animated to do editors, but I can do them.
 
Anonymous
11:06 PM
:)
 
so you suck...
 
I think your translator is broken
 
@TheProHands code or didn't happen
 
Anonymous
Ya suck.
 
Anonymous
And I don't use translator,
 
Anonymous
11:07 PM
baby.
 
You should.
 
safe to kick?
 
Yes
Wait. Are you owner now?
 
nope
 
I'm on mobile, can't tell
 
11:08 PM
I haven't been very active lately anyway
 
School?
 
mainly, yeah
 
Anonymous
This function
 
Anonymous
is mine
 
Anonymous
and a bit older,
 
Anonymous
11:09 PM
I've another to load
 
Anonymous
multiple audio.
 
Don't, please. Only short (and formatted) code snippets here.
 
Anonymous
Oh! No! Tomorrow I've school.
 
Anonymous
Oh!
 
Anonymous
Sorry, but...
 
Anonymous
11:10 PM
my tabs
 
Anonymous
were removed in chat.
 
so use spaces
 
Anonymous
Nah, I hate.
 
CTRL-K or put 4 spaces in front of every line to keep formatting.
 
or just don't post code
 
11:12 PM
bye guys
 
Anonymous
works
 
Anonymous
bae
 
Anonymous
I'll remove my code,
 
Anonymous
but in... 3 seconds...
 
1 message moved to JS trash
 
Anonymous
11:13 PM
Oh! Someone...
 
Anonymous
already did that.
 
Anonymous
o_o
 
Anonymous
Moderator?
 
God
 
@copy thanks, was trying yo figure out how to do that.
 
11:13 PM
@rlemon I have some interesting news though :D I just want to hear a "proud of ya" and get a pat in the back from you :P
So, I went to a hackathon this weekend, and ended up building pretty much on my own a nice quiz engine that the organizers totally didn't expect (we were supposed to build tools to spread awareness of floods, I convinced my team to make a game, but I was the only front-ender in a team of 8). It took flight and now the ECMWF (European Center for Medium-range Weather Forecasting, it's pretty huge), EOXplore (a company who does satellite image processing) and the university
for a thing I built half-drunk while my team-mates were sleeping...
 
Anonymous
@towc Can I make game with you?
 
I ended up winning the hackathon where pretty much all of the partecipants were PhDs or real veterans in the programming industry...
@TheProHands I'll tie your hands to my bed... undress you... then set my house on fire?
so that was fun
 
Anonymous
I'm 15,
 
Anonymous
hdahdash
 
Anonymous
Yeah.
 
11:15 PM
tough luck. You really don't want to know my age
 
Anonymous
I'm not from your country,
 
and I'm really into 15yo s
harsh truth
 
Anonymous
15???
 
Anonymous
What?
 
Don't encourage him.
 
11:16 PM
Let's not have this discussion?
 
@rlemon no pat in the back? :/
 
Anonymous
Aaohsokoasdsadasodka! We're not discussing,
 
no
 
Anonymous
I thinkk.
 
@towc Maybe you should mention that you're 15 or so yourself
 
11:17 PM
pats towc condescendingly on the head
 
accepts the pat and says thanks
 
j/k. I already knew you were better than a lot of 'experienced' programmers I've encountered.
So, no surprises :)
 
I took the dressing off my foot... big mistake. as soon as the poly dried it was like someone set it on fire and was also stabbing it over and over.
long story short. Skin is important.
:'(
 
Anonymous
OOOOOOOH!
 
@TheProHands pro-tip for the future: shut up
srsly, you're not the smartest in the room, never
unless you're zirak
 
Anonymous
11:19 PM
@towc You should shut up...
 
@towc come on, stop pushing
 
@Luggage I find it funny in it's own way
 
both of you should be polite(er) or shut up :)
 
sure
 
ty
 
11:21 PM
I'm really into the type of people that I'm into
 
Which must remain unspecified?
 
my type is probably Enum
maybe... long int.
 
myType = undefined
but actually
nevermind
 
anyone else find it ironic we're discussing type in the JS room? :P
bah dum tsh
 
I thought that was the joke already.
Thanks for hanging a lantern on it.
 
Anonymous
11:23 PM
__0=null
 
Anonymous
null is more faster.
 
_1 = 2
 
@Luggage no problem.
 
Anonymous
Well, I've a idea to make a aliens game with AI on which we just must be jokking the aliens, hidding up to that no one see us. The aliens would have a array with memories about what can happen with them, and these things are added to the array when we do a kind of action with one of them or others. I've finished many functions, but I'm still thinking how will works the polygonal collision in-game.
 
what is with that variable naming?
 
11:23 PM
> jokking
 
makes me throw up in my mouth
 
Anonymous
_0=null
 
@phenomnomnominal it's call "Stolen obfuscated code" style and it's all the rage.
 
^
very much this
 
oh yeah, duh
 
11:24 PM
> code it like you stole it
 
if I knew enough about regexp I would switch code and stole
but I don't. please pretend I did.
.... now
 
manual code obfuscation is the best thing I've ever heard of
 
@ndugger I've actually done it a few times
it is fun. completely pointless, but fun.
var a = 'abcdefghijklmnopqrstuvwxyz1234567890.',
    i = 18, j = 0,
    b = [a[i++],a[++i],a[++j],a[--i-1],a[i],a[--i-1],a[++j*(j+j)],a[--i-(j+j)],a[j*j+j]].join(''),
    f = function(x,y) { switch(x){case(1):o=y;break;case(0):l=y;break;} return y; }, o,l,
    c = [a[b](i+j)[0], a[b](i++,i), f(1,a[b](--i-(++j),i-(--j))), f(0,a[b](--i-((j++)+j), (i++)-(--j+j))) ].join(''),
    e = o + l,
    d = c+Array(++j+j).join(e);


console.log(d); // you mad bro?
 
no.. not pointless. Maybe obfuscation isn't the right word this but: when you make code do something different than what it looks like it's doing.
 
hand written
@Luggage code misdirection?
 
11:26 PM
there was a code golf challenge about it, i think..
 
Anonymous
@rlemon
 
yea I remember some challenges along those lines
 
Anonymous
You can ignore the last semicolon in this code and extra spaces also... I'm analysing it more.
 
I really like Ziraks longest hello world. I was also trying.. his is like 15x longer :D
 
@rlemon where where where? :D
 
11:27 PM
hah, yes. the "enterprise hello world"
 
@TheProHands that is a common design pattern. you can make everything a "single" var statement (chained) with ,
var a,b,c,d;
vs
var a;
var b;
var c;
var d;
both valid, both pretty common
 
Anonymous
But I DO THAT!
 
Anonymous
But your code
 
Anonymous
is good because doesn't create variables in loop, I think.
 
Anonymous
Let me check...
 
11:30 PM
You sure that was zirak? I can't find it on his github account ( I checked public gists, too)
 
yup
I'll find it
 
@TheProHands just run it in a debugger and you'll see everything that's going on
!!tell TheProHands mdn debugger
 
@TheProHands debugger
 
but a little (just a tiny bit) of reverse githubbing and it looks like that is a snipped (albeit explained) of some lightbox code.
I will investigate further.
 
Anonymous
Okay, there I'll go... OPNS % % % % @ ! @ @ @! @ # # # # # 3 _@ @@ % @ %@ @1 0% 1% 55% 100%...
 
Anonymous
11:32 PM
Proccessing...
 
Anonymous
Compiling...
 
Anonymous
Assembling...
 
btw, this is a quite fun obscure and weirdly totally valid piece of code (C) to decrypt, took me some time to prove the maths
 
Anonymous
Monstering...
 
pondering why you're doing this...
 
11:33 PM
yeah..
 
it's called trolling.
 
Anonymous
whata c
 
@Luggage is it a thing people do? OMG
 
Anonymous
I want to learn C :D
 
just kick him?
 
i'm having an angularjs directive templateUrl : "../mytemplate.html"
I'm trying to access that angularjs from another server using iframes .. the problem is that that url doesn't resolve right, it comes as if it is existing on the accessing server not the accessed server
any ideas?
 

Lounge<C++>

Today we're daydreaming about C++26 reflection
ask them
probably will go over well
 
@JoeSaad bundle and inline your templates
 
basically i want to the templateUrl to resolve relative path to that same JS file containing the directive
@phenomnomnominal what do you mean
 
incase you didn't see, forgot to ping you
 
11:35 PM
Yup, ty.
Also, I just realized I had it starred. Didn't think to look there. Durp.
 
heh
I think mine was like 80 LoC
I was all proud.. then he posted this and I just kinda went away
 
@JoeSaad well, in my current project, we have a build step that looks for import template from './some/path/to/template.html; and turns that into const template = '<div>the html contents of that file</div>';. Then instead of templateUrl, just use template. Saves a request, and looks nicer
 
@rlemon that's just amazing
 
yea, @Zirak is crazy
 
crazy sexy.
 
11:38 PM
can you imagine him working in a Java shop and someone pissing him off who has to inherit his code later on?
the amount of code trolling he can do is astounding.
 
crolling?
 
@SterlingArcher :(
 
@rlemon SterlingArcher is afk: home and codes
 
heh
 
as someone who smoked, my gf is MUCH happier smelling my vape.
 
11:41 PM
that sounds good however the path ./some/path/to/template.html when accessing it from an iframe within a different site, the ./ doesn't resolve right when in a different iframe
 
but I understand smelling nothing would be best.
just had to point that out :P
 
smoke a pipe. they smell good.
 
@JoeSaad can you use absolute paths?
 
Does d.toLocaleDateString(); give local time based on location?
Can somebody runs this command on there console?
 
@Luggage the idea is not to smoke anything in the long run. the nicotine isn't an issue anymore so much as the habbit. I smoked for a good 20 years. it is tough
 
11:43 PM
(new Date()).toLocaleDateString(); // "1/19/2016"
 
all dates are UTC
your browser adjusts for you
 
and pipe smoking is not inhaling, which is what you are after..
 
iirc
@Luggage but smoke in mouth == mouth cancer.
and still stinks to some
 
aye
 
vape isn't perfect, but it is a hell of a lot better than actual smoke
I'm okay with that for now
 
11:44 PM
but I suspect it's easier to smoke a pipe more occassionally than cigarettes
 
@rl
 
for me it is "Wed Jan 20 2016" ok
 
@Luggage maybe. but I've been a year+ off tobacco
so why go back
 
Ohh, I'm not seriously suggesting you do.
 
> all dates are UTC
your browser adjusts for you
 
11:45 PM
@rlemon i don't want to since that other angular file may exist on any server anytime..
 
@JoeSaad can you not like... location.something + relativePath ??
 
is there's something like __dirname or process.ENV.pwd in angularjs ?
 
It's a function that formats the date based on locale. The fact that UTC is used at some level is not importatnt.
 
i tried using location.absUrl()
it didn't work once the file is being accessed within a different iframe
 
@Luggage well kinda.. because you can't really "convert" dates if you're thinking about them being served in your local time.. unless I just went about it the wrong way. I remember struggling so much then realizing everyone is being served UTC in the client and just having the displayed values converted to their locale / timezone
I can't remember the specific bug right now and I don't feel like getting my laptop.
so if you argue it, I got nothing :D
 
11:48 PM
Nah, I lost interest already.
 
@JoeSaad but you do it at build time, so the path doesn't exist at run time
 
lol
 
(new Date()).toDateString() would also give date and time based on your location, why would I need toLocaleDateString
 
@overexchange because you can pass it an argument
 
11:50 PM
not to be rude, but did you read the docs?
it is pretty obvious the purpose of that function
 
watching a video
 
There are lots of redundant functions in JS's API. Or functions that do ALMOST the same thing.
 
next time a quick google would have pointed you to MDN (I hope)
> dateObj.toLocaleDateString([locales [, options]])
@Luggage substr substring :(
everyone just use slice :D
 

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