« first day (1670 days earlier)      last day (3297 days later) » 

7:00 AM
!!redo
 
2 mins ago, by royhowie
does !!redo work?
 
perfect.
 
!!redo
 
3 mins ago, by royhowie
does !!redo work?
 
oh dear
this is a little too great
we need a nuke command
 
7:03 AM
alright, it's past my bedtime
goodnight children
 
GL HF DLTBBB
 
!!/google DLTBBB
 
Don't Let The Bed-Bugs Bite
 
@ivarni TIL
 
@ivarni basically what I'm working on right now (the worst part is that I made it a year ago, so I have no one else to blame)
 
I'm trying to change code that I originally wrote and that 3 other people (and myself) have been tinkering with for 2 years, it's grown into a monster
And to top it off it's functionality that we plan to phase out this autumn, it just has to work for "3 more months". And to really top it off it's Angular.
 
what is a bc version?
 
@ivarni I spend at least 40% of my typing time, and at least 70% of my thinking time, refactoring
I spend a lot more time writing test code and refactoring than I do actual new production code
@deostroll Backwards compatibility, probably
 
@ivarni Very recognizable :)
 
7:17 AM
@MadaraUchiha yep thanks...
 
@ivarni Life is beautiful when you test and refactor like a nazi.
 
@MadaraUchiha I completely agree and I've been fighting for looser deadlines since I came to this project. I'm finally starting to gain some recognition for the importance of refactoring
 
And no, it wasn't an intentional reference to Life is Beautiful
 
@AmolNavsupe 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.
 
7:19 AM
i have one question about php rewrite
 
@ivarni It probably still takes me longer than you to ship a new feature
Not by much, but still a bit longer
 
@AmolNavsupe this isn't the PHP room
 
@MadaraUchiha I'm convinced. If you have a clean codebase you can ship faster
 
But I manage to think, refactor, refactor test code, add production code, test production code, cleanup, run smoke tests, run all unit tests, run all integration tests
All in what I imagine is 1.1 the time it takes you to just ship a feature
 
Maybe the first iteration is faster if you rush, but all the following ones will be slower
 
7:21 AM
@ivarni Yes, your ship cycle will grow in time, as well as your build cycle and test cycle and all cycles basically where unwashed dishes are involved
All of my test suite runs in under a minute
53 seconds of which are the smoke test and integration tests
I have about 1.4k unit tests, they all run in about 7-8 seconds
 
Sounds familiar, we run 709 unit tests in 3 seconds, but the integration tests are way way slower
 
People tend to think that test code consists of just tests
 
And that's with 7 tests currently failing because I fucked something up, it's faster when it doesn't have to throw errors
 
Every app needs their own little test framework on top of the basic one Mocha or JUnit or PHPUnit or whatever it is that you use provides.
@ivarni If you fuck something up and 7 tests fail, you have a problem with your tests
When you fuck something up, exactly 2 tests should fail
The unit test that tests for that particular behavior to be there, and the integration test responsible for that part.
 
@MadaraUchiha deletes server.js why'd all the tests fail?!?
 
7:24 AM
XD
 
I introduced a new Angular dependency for a controller, causing an entire describe suite to fail, not sure how I could have avoided that
 
@ivarni I don't really know what that means since I don't use Angular, but I'll take your word that it's a big deal
 
I did start to write a thingy to auto-mock stuff but I never finished it
 
Anyways, back to work!
 
it's basically DI and the test-setups are creating mocks for the unit tests
 
THE
7:27 AM
a single word for show/hide
or expand/collapse
need to add it as tooltip
 
toggle?
 
Okay, here's a question for you javascript people. Let's say I want to create a function $bind which operators like $bind(fn, arg1, arg2). I could do Function.prototype.bind.apply(fn, arg1, arg2), but what if I specifically want a function called $bind? I've been trying let $bind = function (f) { return f.bind.apply.apply(...arguments); }; but that doesn't appear to work
 
First off, what is f.bind.apply.apply?
 
operates*
f.bind.apply.apply is my attempt at trying to apply bind.apply, though I'm not sure how the this semantics work in that situation
This is highly confusing, but interesting
 
Just use a function literal inside...
 
7:42 AM
Does anyone know how to redirect $routeParams for page 404 ?
 
@ThiagoJem 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.
 
@ThiagoJem Something like this? stackoverflow.com/questions/20946398/…
(disclaimer: question is old)
 
When I type a wrong url in the browser browser , the page refreshes and continues on the same route .
@ivarni Excuse my slowness , I do not think much in English.
 
7:57 AM
!!> var bind = function (f, a1, a2) { return f.bind(null, a1, a2); }; var test = function () { console.log(arguments);}; var c = bind(test, 1, 2); c();
 
@royhowie "SyntaxError: missing ; before statement"
@royhowie "undefined" Logged: {"0":1,"1":2},"undefined"
@royhowie "undefined" Logged: {"0":1,"1":2}
 
@MartinSvanberg does that works for you?
(you can probably spread the arguments with ...Array.from(arguments).slice(1), so that you skip the passed function
yep, that definitely works
!!> var bind = f => f.bind(null, ...Array.from(arguments).slice(1)); var test = () => {console.log(arguments);}; var c = bind(test, 1, 2, 3, 4, 5); c();
 
@royhowie "SyntaxError: let is a reserved identifier"
@royhowie "undefined" Logged: {"0":1,"1":2,"2":3,"3":4,"4":5}
 
@Zirak what kind of context does Cap runs in?
Arrow functions work but let doesn't?
 
@MadaraUchiha they said she ran in firefox before
@MadaraUchiha I was also confused by this
 
8:03 AM
-2
Q: Occasionally getting error: f is undefined

Mr_GreenIn my Backbone project, I am getting error: f is undefined on line1, col 8158 of Backbone.js 1.1.2 At most times, when I refresh the page, this error doesn't appear. but only few times this appears. I can't understand what could be the issue. I am not sure whether this problem is related ...

^ what I am missing here?
 
anyway, @MartinSvanberg, look at the code above. pretty sure it does what you want
 
I have <h1>Title</h1> and a sibling <h3>bla bla bla</h3>, How can i wrap them in a div?
with jQuery
 
@Mr_Green you were probably downvoted because there's almost no way anyone can help you; heed the first comment's advice
 
there might be someone who got the same issue
I can't be the first one
ok
 
what's the call stack?
 
8:05 AM
Look at your call stack. Trace the problem to where it originated.
 
@RoelvanUden inb4 callback so no call stack
 
@FlorianMargaine this is why you name your anonymous functions (I am guilty even though I have this knowledge)
 
Async call stacks do exist in Chrome afaik
 
(I guess they're no longer anonymous then…)
 
@royhowie you name your anonymous functions?
i.e. foo().then(function bar(baz) { return baz.qux(); });?
 
8:07 AM
@FlorianMargaine no, but you can, and then their names appear on the callstack instead of just <anonymous>
 
@royhowie that', basically.
@Mr_Green how can anyone expect to help you with that?
@RoelvanUden yes, but not async stack traces atm.
> Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example.
 
Morning :)
 
@BenjaminGruenbaum I don't know what code to post because it is in backbone.js plugin and I am not able to stack trace it
 
@Mr_Green uh... type debugger or break on exception and find the first thing in your code.
@Mr_Green isolate the code, remove things until you get the smallest example of it breaking - under 20 LoC preferably and only then ask about it.
 
@BenjaminGruenbaum Or, right, that was in Edge. Silly Edge has something useful.
 
8:12 AM
@BenjaminGruenbaum ok thanks I will do that
but the error is appearing few times
anyway checking..
 
var youCanLogItIfYouWantTo = function(instance, context, event){
      if (!blade) return /* Must be a spoon. */;

      switch (blade) {
 
!!urban rimjob
 
@Neoares Rimjob the act of orally stimulating the external anal sphincter to cause sexual arousal
 
lol
 
._.
 
8:16 AM
@BenjaminGruenbaum on your promise answer w.r.t. xhr
> This means AngularJS, jQuery (with defererd)
 
just saw it at the right of the chat xD
 
defererd is a weird word :P
 
defered yer ser aberd mer!? merder ferder
 
otherwise, upvoted
 
@Shmiddty I read that in Cartman's voice
 
8:18 AM
@FlorianMargaine right, so fix it :P
 
@BenjaminGruenbaum laaaaaaaaaaaaaaaaaazy
 
lol the urban dictionary example
"My girlfriend puked while giving me a rimjob so i slapped the bitch. "
 
@FlorianMargaine check out the edit summary
 
@BenjaminGruenbaum 2.9
 
8:20 AM
-∞
the most less than three you can get
 
kinda looks like glasses
 
kawaiiiii
 
like a 3/4 profile
@BenFortune I feel so sorry for the poor bastard who had to do that parallax effect. Must have taken ages.
 
import * from 'parallax';
 
8:23 AM
Need help centering the animation over the buttons.
 
Wasn't Lily marketed as a wrist band before?
 
Making the assets must have taken days.
 
HN is full of gold today and not the usual crap
Can't imagine what Node will be like running on Chakra
 
It could very well be faster and easier to debug.
 
Chakra is faster than V8 now? What's going on in this world?
 
8:29 AM
> could
 
I wanted to see if V8 was consuming resources in test on regular expressions for capturing groups. I'm surprised there's so much consumption : jsperf.com/capture-or-not
Did I fail at measuring ?
 
@ivarni but windows-only, right?
 
(it's about the same in FF)
 
Interesting I see that there's no difference in Chrome 42 !
 
8:32 AM
@dystroy 0.17% slower for me
30% slower in IE 11
 
lol at this slide: mrale.ph/talks/goto2015/#/14
 
@BenjaminGruenbaum Well. Do you see a problem in my test ?
 
@dystroy that was not a response to you, just an amazing deck and released today
 
@BenjaminGruenbaum ok
 
uh, wrong
but, uh, you get the idea
 
8:36 AM
@FlorianMargaine Why this change ? I don't want the errors to be silent
 
@dystroy I was showing off the warmup
 
I love watching Egorov's talks, though about 99% of what he says goes way over my head
 
@BenjaminGruenbaum Good read
 
@BenjaminGruenbaum how does Promise.coroutine work with yield*?
@BenFortune stop having such a similar name to Benji!
 
8:42 AM
Never!
I really need to use generators more
Need to wait for the all clear to upgrade our production environment first though
 
@MadaraUchiha you can yield* another generator, if it returns promises it'll wait for them.
 
@BenjaminGruenbaum What if the other generator yields promises?
Will it wait for them and resume like the main coroutine?
 
@MadaraUchiha yeah, it'll wait for them, IMO it's not a good idea to use it.
You can yield* someGenerator() but you should yield someCoroutine() instead.
There might be interesting use cases for yield* we haven't thought up of though
 
9:01 AM
Morning!
Any ideas how to daemonize the current process with NodeJS?
Something like:
console.log("foo");
doSomeMagic();
// then you are back in bash, but the process still runs
 
@IonicăBizău Start it with &?
 
@OliverSalzburg No, I want to do that from code.
 
@IonicăBizău Oh, I see
 
Maybe I will ask this on main.
 
9:05 AM
@OliverSalzburg Thanks! Something like that. Trying it..
 
Well, you can probably google yourself, I don't know anything ;D
 
Most probably I will write one.
 
I don't understand, you just want to run a daemon from node?
Just do npm install daemon and do require("daemon")() @IonicăBizău
 
@BenjaminGruenbaum Exactly. The only downside is that its latest release is two years ago.
I'm writing a nicer one. :)
 
9:29 AM
Are all users able to see the edit history of a post ?
 
On main SO? I think so yeah.
 
Just tested with incognito window, even non-users can see it
 
@RoelvanUden OK. Thanks. So this other user pretending to have answered at the same time was only stupid. Doesn't matter.
!!afk
 
can != will be bothered to
 
damnit.. agar.io is effin addicting
 
9:35 AM
hi
 
Cue the 3 million clones
 
@jAndy oh comon "the game" is more addicting
 
how do you apply custom skins for agar :P ?
 
You can't, just the pre-defined ones
 
seriously ?
I saw guys with Hitler and Nazi symbols quiet a lot
 
can't be pre-defined
 
That's because they're pre-defined...
xD
 
LOL
 
Just keeps spamming XMLHttpRequest cannot load http://m.agar.io/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://agar.io' is therefore not allowed access. in my console
 
^ Getting that too
 
9:38 AM
dealing with subdomains are hard I guess...
 
So it is "Nickname;doge" ?
 
Hardly :/
 
Connecting
If you cannot connect to the servers, check if you have some anti virus or firewall blocking the connection.
 
wo do you have to use the exact name only
 
always and forevha
 
9:39 AM
I think you have to use the name
 
lol they really defined hitler
what the heck
 
@ivarni sdamer
 
@darkyen00 How would a firewall on my end affect the server's CORS header? I don't see it.
 
me neither
they are asses
45.79.200.50:443
thats all m.agar.io says
 
yup, saw that
 
9:42 AM
@ivarni your proxy could munge incoming HTTP headers just fine. Unless you're using HTTPS, that is.
 
Changes each time, looks like they're using round-robin
 
@JanDvorak True
 
No proxies here, just doesn't work
 
@BenFortune they could off just done a jsonp there
 
https://agar.io/ redirects to http, so...
 
9:43 AM
@BenFortune HTTP Firewalls are proxies, too.
 
No firewalls either
 
Well, I guess I don't need another addictive game atm, seeing as I'm still playing XCOM
 
ISP's proxy?
 
Nope
Can't imagine the biggest ISP provider in the UK proxies their traffic
 
maybe the traffic caused by agar was too huge :D
 
9:45 AM
Then just get the IP from m.agar.io
 
10:00 AM
who did the game?
 
@Neoares A guy from reddit
 
better than spore
 
it's still down isn't it
I NEED MY DRUG
 
@jAndy and why are they not using a cdn like amazun ?
 
he ?
 
10:07 AM
</sarcasm>
they are using cloudflare
 
ah.. yea I didn't even look in the codeeezz I just want to own people souls
 
user1648409
hi
 
user1648409
is there any maxlength to a string variable in javascript?
 
@jAndy i google searched
 
2^31
 
10:13 AM
it looks suspiciously like something called orbit
is it so ?
 
I like the answer @BenFortune.. it's like the content automatically takes reference to the question :P
 
@Shiuyin not that I know
@JanDvorak https encodes headers too?
don't remember
last time I tcpdumped https traffic is a while ago
looks like it does
 
hello buggy bots
 
'night000
 
@MadaraUchiha you use gitter right?
 
10:23 AM
WOOOOw ^
 
user1648409
@FlorianMargaine thx
 
@AwalGarg When I need to, yes.
 
THE
3 td in a row and then another td needs to be a full row
 
@THE colspan
 
THE
thank you
 
10:30 AM
PHP chat ignores me
Q_Q
someone knows how to pass multiple parameters using php5-cgi from terminal?
for 1 parameter I use pgp5-cgi -t path/to/php/asd.php -t=param1
 
THE
@Neoares we won't ignore you,
we would dis you :P
 
@THE <3
 
@MadaraUchiha how is it? buggy/good/fantastic/terrible/awkward?
 
@AwalGarg As good or better than this chat.
 
THE
10:32 AM
@AwalGarg his feedbacks are incomplete, like he's always in rush
 
@THE who @THE hell are you?
@MadaraUchiha cool :)
 
@THE That's my secret captain. I'm always in a rush.
 
I kinda wonder
why didn't any reach people back them up :-/
 
THE
@AwalGarg you answered your own question :)
 
@THE you didn't get @THE joke :(
 
THE
10:34 AM
@AwalGarg you didn't either :D loooool
 
nvm I got it :)
 
@Neoares wait, why are you using php5-cgi from the terminal? :O
 
THE
@RoelvanUden hi
I want td to be under 2 td
but it has to be in same row, you nkow
 
@THE Colspan...
 
@AwalGarg yeah, it's full of awsome puns
 
10:44 AM
@AwalGarg yes why :O
 
@Neoares iiuc, you should be using either the php binary, or fpm.
 
why >.<
 
@Neoares I can't understand why you would want to use the cgi binary directly from terminal :/ Is there a use case I don't know off (likely)?
 
I just searched how to do a call from terminal to a PHP and i found that
I need to call a PHP every day using crontab
 
uh... why not do it with the php binary itself?
 
10:52 AM
because I need to add GET parameters
 
php -r 'code here' or php filename.php or php -a or...
 
and didn't know how to add them using php
and then I found php-cgi :D
 
@AwalGarg lisp case is a thing on wikipedia
 
You can do that with the php binary, and I think that is the recommended way as well
@FlorianMargaine linky winky?
 
2
Q: How to pass query string parameters to the PHP binary?

Nathan OsmanI am developing a webserver that invokes the PHP binary (via CGI) to process a script. Here's the problem: The PHP script isn't picking up the command line parameters. For example, if the client requests path/to/file.php?test=value, the $_GET array is empty. I have tried passing the parameters...

 
10:54 AM
If you're using the command line, why not $argv instead of $_GET?
 
hm... let me try
 
@Neoares you can just pipe it via php://input
 
Then it's just php myFile.php arg1 arg2 arg3
 
:O
didn't know the variable $argv in php
thanks :)
 
It's also in the answer you linked lol
 
10:57 AM
yep
I was just reading the second comment
the fact is that I tried the first one, and it worked
 
...and they say people don't use php to write shell scripts..
 
so I stopped reading
yes, the point is that the script was originally used on a web app
that's why I used php
 
I actually use JavaScript for a lot of shell stuff :p
 
btw, what's wrong with php-cgi?
 
Never really bothered to learn bash, though I know the basics
 

« first day (1670 days earlier)      last day (3297 days later) »