« first day (1625 days earlier)      last day (3324 days later) » 

3:00 PM
while sublime is 30 £ forever
 
I like to explore the dark corners of stuff
 
i don't pay for ST :o
 
For ECMAScript's most dialects, you don't need an IDE most of the times.
although Adobe really fucked up with ActionScript
 
fwiw, gedit + console
 
@guest271314 i found Geany bettr than gedit
but Brackets... sublime
 
3:04 PM
Webstorm is much better than those fwiw
 
let the ide-editor war begin
 
jetbrainz
 
* sets up cannons * i use IDE / editor, dependent of the language
 
This GitHub DDoS attack needs to end! O__o
 
* runs away *
 
3:05 PM
@AwalGarg No more war ! Please ! @CS Added custom templates , tags to gedit ; prefer simplicity . Though compose mostly at console
 
butt
 
@OliverSalzburg site works for me
 
@OliverSalzburg it goes smooth at me
 
@BenjaminGruenbaum I'm waiting for a clone over SSH for 12 minutes now
 
RubyMine ftw
 
3:06 PM
Usually takes 1 minute
 
@OliverSalzburg repo link? (if it is public)
 
real programmers don't need no color, code completition, ending brackets, symbols, hints, etc
 
Isn't GitHub on Rackspace? Can't they just add more machines?
 
@AwalGarg It's private
 
ah
 
3:07 PM
Real programmers Only have two keys on their keyboard.. Too bad It's outdated.
 
I also get random timeouts on the website, but I try to avoid visiting it to not waste more bandwidth ;P
 
i love sublime
 
^
 
its beautiful
 
are you sure that it's not an issue from your side ?
 
3:08 PM
but i just downloaded websotrm
 
@KarelG In case that was directed at me, yes, I'm sure
 
@lovetolearn me too. I even replicated it for a php repl.
 
@OliverSalzburg just asking. Forgot to @'ing ya
 
(well, kinda)
 
i might buy it if i like it after the 30 day free trial
 
3:09 PM
Although I prefer what is the best IDE for a specific problem/project for smaller projects use text editors for bigger use IDE's generators and stuff like that
 
@KarelG Well, our problems started happening when the attack started. I have no reason to believe that our servers are the problem. But, well, I could be wrong
 
maybe it depends on location?
 
@AwalGarg Possibly. When I initially noticed the issue, I asked about connectivity here and it seemed like I was the only one having problems
 
I'm gonna celebrate my raise by getting my current tattoo covered up with a better one, come next paycheck
 
2 days ago, by Oliver Salzburg
Anyone else having GitHub SSH access issues?
 
3:11 PM
ah
 
i dont think i can ever go back to an ide i love text editors. type afew commands in the command line and you have got sass less anything you want
 
@OliverSalzburg Germany isn't far from my country and i don't experience that problem ...
 
@lovetolearn I totally agree, though VS2015 has some promising features.
 
@KarelG I feel like it's intermittent. 2 days ago we were still pulling all our bower dependencies directly from GitHub. And the build would randomly fail after X dependencies. Now individual builds just hang on the git clone phase forever
We now pull our bower dependencies from a cache at least. So we only have that one clone to worry about for now
 
Did anyone hear about toptal?
Better then freelancer for sure
 
3:25 PM
jsfiddle.net/jpkj70tu In the FreshWidget.init("", {"queryString" : ... }); I don't want to write the queryString like that. So I was writing a small function. Now I can iterate through a nested hash like if(query[k] !== null && query[k] == "object") createQuery(query[k], "&"). but how it make it an array like helpdesk_ticket[requester] =
or can there be a different approach
 
sometimes its said, looping from back to front is faster. But I think you know that
 
@ThiefMaster tyvm++
 
for (i = 0, len = arr.length; i < len; i++) {
  // do something
}
What's the difference? Except It has an extra argument..
 
what's what difference?
also, you're gonna wanna add the var keyword
 
3:30 PM
for (i = 0; i < arr.length; i++) {
  // do something
}
//vs
for (i = 0, len = arr.length; i < len; i++) {
  // do something
}
 
for (var i = 0, count = something.length; i < count; i++)
 
^
 
It makes sense, actually.
 
oh, defining the length of the array as a variable in the scope means that you don't have to calculate the length each iteration
makes it faster
 
In one of them the array's length is calculated lots of times, the other only one.
 
3:31 PM
Yeah instead of calling .length after each iteration you just cache it
 
for (init phase, init phase; boolean run loop phase && bool || bool; other stuff, and other stuff) {
 
Take a look at this nice DI example using electrolyte
How can I implement say a database in that example?
I would make a component that returns a database connection
and another component that requires database component that includes a callback function that selects something from a database and returns results.
Then in a third component ( or should I say main component ) I would require that second component and call It's callback functions that return db results.
Is that a good practice/design pattern?
 
@AwalGarg o/ o/
 
I'm using Bluebird. Is this allowed?
var sendConfirmationMail = function(user) {
  var confirmation = Confirmation.build({
    token: hat()
  });
  confirmation.setUser(user);
  var confirmationURL = 'https://www.oratio.io/confirm/' + confirmation.token;
  var confirmationMail = email.confirmationMail(user.username, confirmationURL);
  return [confirmation.save(), email.sendMail([user.email], "Oratio.io - Confirmation", confirmationMail)];
}
I mean there's no difference with who finishes first.
 
@GabrielTomitsuka return Promise.all([confirmation.save(), email.sendMail([user.email], "Oratio.io - Confirmation", confirmationMail)]);
 
3:42 PM
Oh thanks
 
Returns a promise that resolves when both promises in the array resolve
Essentially merge the two promises into one (kinda)
It's a good question though
@BenjaminGruenbaum what happens when I resolve a promise with an array of promises?
Will .then() or .spread() resolve everything correctly?
(Let's say I didn't use return Promise.all(promiseArray))
@lovetolearn How's your shop coming along?
 
rebeccamurphey.com this blog is informative ...
 
@GabrielTomitsuka I think that's the joke.
 
Oops :P
 
3:50 PM
Is git pull for someone?
 
@SecondRikudo .all it.
Well, .spread will and .then won't but don't rely on it just .all them.
 
@BenjaminGruenbaum Promises are hard :(
 
Promises are easy as dirt
 
You need to read a tutorial
 
I read a tutorial
Actually, 2.
 
3:51 PM
You can go through my SO promises questions and answers sorted by score if you'd like - but I'm pretty dumb
 
"'m pretty dumb" I lol that
 
But all those Promise.all, having to returning the values to the other function, that's not so simple.
I finally understood .spread() :P
 
Look, a promise is just value + time,
Whenever you'd return a sync value and want to do async something - return a promise.
Whenever you want to wait for multiple promises - .all
Whenever you'd throw an error - return a rejection (or throw an error in promise code if you're there already they're throw safe)
 
Should Promises replace callbacks forever?
 
Whenever you'd catch .catch.
 
3:54 PM
@l0oky For things that happen in the future, yes.
For event handlers, no.
 
@l0oky They sometimes serve diferent purposes
 
Promises only resolve or reject once
 
If you're unsure, post how you would have done it in sync code - and we'll help you write it.
 
For something that can happen multiple times, a promise is not the right abstraction.
 
Thank you :) I was beginning to worry about me mixing promises and callbacks
 
3:55 PM
@BenjaminGruenbaum Are you trying to mean me or l00ky?
 
@GabrielTomitsuka You.
 
@GabrielTomitsuka you
 
var verifyRegisterAuth = function(user, created) {
  if(created === false) {
    var error = new Error('Account already exists.');
    error.code = 1101;
    return Promise.reject(error);
  }
  return Promise.resolve(user);
}
 
@GabrielTomitsuka that function doesn't do anything async and never will -right?
 
3:56 PM
@BenjaminGruenbaum Correct
 
So it shouldn't return a promise, it should just return true/false
 
What with resolve/reject?
 
Promise.resolve and Promise.reject are for cases where you return a cached or immediate value.
If all your paths are like this don't use a promise - like you wouldn't use a callback
 
unless he's chaining his functions... verifyRegisterAuth().then(somethingElse)
 
still no.
 
3:57 PM
I am chaining them. Moment
 
no?
 
@NickDugger Promise.resolve(verifyRegisterAuth()).then(somethingElse)
 
No, it conveys the wrong message that it's doing async work.
 
@BenjaminGruenbaum So, how do I chain them like that?
 
do as Second did
 
3:58 PM
@GabrielTomitsuka how do you perform multiple actions in sync code?
 
@BenjaminGruenbaum Without chaining.
 
a().then(b); // in promises;
b(a()); // if you use return value
a(); b(); // just sync code
 
@GabrielTomitsuka So don't chain :)
 
Am I using DI correctly in this example?
 
@l0oky You should edit your gist to have syntax highlighting.
 
3:59 PM
never ever ever use singletons unless you have an extremely good excuse
 
@SecondRikudo I tried.. wait a sec
 
@l0oky Just name the file "something.js" it should happen automatically.
@l0oky Also, you can have multiple files in a gist
 
there :D
 
Just click "Add file"
 
really? thats awesome
ok wait for me to do it then
 
4:01 PM
So, at the conference I went to yesterday, there was a talk on HTTP headers. It was pretty cool
 
return findOrCreateAccount(username, email, password)
          .spread(verifyRegisterAuth)
          .then(sendConfirmationMail)
          .then(generateSession);
 
@GabrielTomitsuka findOrCreateAccount does too many things
 
var findOrCreateAccount = function(username, email, password) {
  var where = {$or: [{username: username}, {email: email}]};
  var defaults = {username: username, email: email, password: security.hash(password), isConfirmed: false};
  return Promise.all([User.findOrCreate({where: where, defaults: defaults}), password]);
}
 
@GabrielTomitsuka What are you trying to do?
 
This return promise.all doesn't sound right at all, yes.
 
4:03 PM
Describe the action that leads to this sequence
 
@GabrielTomitsuka promises assimilate values, that .spread would work even without the reject - just write sync code - throw the errors
 
@SecondRikudo Fixed my gist. Actions start from controllers-uploadHandler.js
 
@SecondRikudo The verifyRegisterAuth, from now on, is sync. I'd still like to keep this chain, but verifyRegisterAuth should happen after findOrCreateAccount and before sendConfirmationMail
@BenjaminGruenbaum Oh.
 
@GabrielTomitsuka That doesn't answer my question.
 
Shall I do a Gist? That's my database.js.
 
4:05 PM
// p is undefined althrough I @require'd 'models/Procedures'
 
@GabrielTomitsuka No, just tell me what it is you're trying to do
 
@SecondRikudo Register an account, then send a confirmation email, then create a session. Return the session.
BRB
 
When I do exports['@require'] = ['models/Procedures']; It just passes 'models/Procedures' return value into the exported function... IoC
 
return makeSureUserDoesntExist(username, email) // Only throws
    .then(function() { registerAccount(username, email, password); })
    .then(sendConfirmationMail)
    .then(generateSession)
@l0oky have a look at Chusha, it's simpler if you understand how objects work.
@GabrielTomitsuka see above ^^
If you really want to make it pretty, you can make it .then(registerAccount(username, email, password)) but I wouldn't.
 
@SecondRikudo Do you have time to convert this simple example to use chusha DI instead of electrolyte DI. I can't seem to find any chusha examples
Wait you authored chusha? :D
 
4:18 PM
@l0oky I happen to have, yes.
 
ups, fuck, just crashed node hard, damn
 
@l0oky And sadly, I don't have the time at the moment
As for Chusha examples, try to, for the time being, have a look at the tests
 
ok :)
 
it barfed a shitload of Security context pages
 
Specficially, look at the first example
It's written in ES6, but it's still pretty easy to understand, if you have questions, ask.
 
4:26 PM
@SecondRikudo I would love the see in the future an example of chusha like that hapi.js -- electrolyte example I gave you
I am just searching for a great way to write clean code. Seperated in sub-programs or files.
 
OOP, lots of modules, and praying
 
@SecondRikudo Is chusha able to declare a shared singleton instance ?
 
I hope to god no
Singletons are horrible
 
4:46 PM
I've become way more proficient with regex since having made my own templating language
yes, I know, I should use a parser... baby steps
 
and what are parsers written in ?
 
I don't fucking know
new-born baby steps...
I got 'logic' to work in my templates, yesterday
 
@CSᵠ Voodoo magic
 
@{if foo.length > 0}
    @{each foo->thing}
        @{thing.name}
    @{/each}
@{else}
    There are no foos to pity.
@{/if}
 
Oh great, new fetch api has no-cors
how long until we get our first question "I set it to no-cors but my request to gmail.com still doesn't work?"
 
4:51 PM
@copy if you type as you hear some voodoo magic, you'll always end up with some proper regex (careful: no /x flag)
@NickDugger c'mon dude, just write js
 
Or some nice tasty perl
 
or that ^
regex even
 
It's for learning; I'll do what I want
 
i see templates as: <here is>some</html>$%#^PLACEHOLDER_FOR_USERNAME@#%$#$etc</text>
there should be no logic whatsoeve in a template
didn't anyone figure this out yet?
morning Kitten
 
0
Q: Integer - Fractional version of the Knapsack problem

Mary StarThere are two versions of the Knapsack problem, the integer and the fractional one. With what type of programming can these two versions be solved?? Which of the two versions has the optimal substructure property ?? Which of the two versions has the greedy choice property ??

 
5:00 PM
@CSᵠ sometimes it's really useful to have logic there
 
SoC
 
It's broken either way you just choose where
 
is there such a thing as a template system for php/js with strict templates?
 
For example, stuff like: @messages @if(messages > 1){ messages }else{ message }
 
and lots of room to play?
 
5:02 PM
@CSᵠ mustache, but it's not really as strict as they claim in my experience.
 
without reinventing a new language/parser..
@BenjaminGruenbaum that's view logic, should not touch the template...
 
@CSᵠ where would you put it and how?
It's 100% presentational, has nothing to do with the actual data.
It's just a "how you choose to present the view data to the user" question.
 
tpl > @mesages, view => handle make or break messages
 
I want to make my own 'programming language' on top of javascript. Where do I start?
 
@CSᵠ what?
 
5:04 PM
@l0oky Lots of regex
and/or templating strings
 
@l0oky don't do that yet, start with nand2tetris.org
 
@l0oky btw you gave me an idea and already started... crashed node hard a few times since :)))
 
You can also read the dragon book but it's a harder start.
 
haha
 
There's books on it? I'm just making shit up as I go, and am constantly surprised that it works
 
5:06 PM
!!afk watching community
 
@BenjaminGruenbaum in the template i'd only have @messages, while what @messages is will be handled somewhere where logic is allowed (it would prolly mean output of a smaller tpl) <-why have a huge template when you can break that too :)
^ sense ?
 
Yeah, I am a practical learner. Do learn stuff as I make them. Then scrap the whole project and start again :D
So any ideas where could I (practically) start?
Yeah I guess make a parser in js first :D
 
@l0oky Yes, it can. Chusha.share()
 
that evaluates that parsed code
 
See the documentation
 
5:15 PM
oh k thx @SecondRikudo
 
@l0oky This hasn't been updated with my work from yesterday, but here's the direction that I went: github.com/ndugger/MVC/blob/master/server/template.js
 
@CSᵠ Found a great article : eloquentjavascript.net/11_language.html
 
@NickDugger Not using babel?
 
@SecondRikudo Nah, just using what iojs has under --es_staging
 
I see
 
5:17 PM
nodejs vs iojs
<
 
The next thing I want to impliment are sections and partials
 
@BenjaminGruenbaum Here's a more practical book on how to make a programming language within javascript
 
@l0oky BenjaminGruenbaum is afk: watching community
 
Honestly, I think partials will be easier. I tried sections last night, after a few beers, and I had a couple of roadblocks
 
@NickDugger worth noting
You can still use babel, and tell it not to transpile features which are already supported
 
5:24 PM
Oh, really?
 
require('babel/register')({blacklist: [...]});
Full list of what you can disable can be found in babel --help
 
cool, I'll give it a try
 
@l0oky BenjaminGruenbaum is afk: watching community
 
!!/goaway
 
5:25 PM
@l0oky That didn't make much sense. Use the !!/help command to learn more.
 
Caprica is bugged
 
!!you'redrunk
 
@towc That didn't make much sense. Use the !!/help command to learn more.
 
@l0oky No. You are bugged.
 
Should I do nothing all day, or go get lunch and then polay video games? Hmm, first world problems.
 
5:33 PM
WOW, Now a random guy comes and insults me. I mean what else can you expect from stackoverflow
 
Jan isn't a random guy, He's our deity
 
Ooh It's Dvvvvoorak good to see you again
I remember you!
 
@l0oky you have insulted Cap first
 
hehe
Cap said "@l0oky BenjaminGruenbaum is afk: watching community" twice while I only pinged benjamin once..
 
Oh. That. Didn't notice.
 
5:36 PM
Stuck with this DI thing whole 2 days
electrolyte for node.js hah
 
It's what plants crave
 
Does anybody notice github crashes for a second or two then comes back from the dead..
At random times..
Google Chrome could not load the webpage because github.com took too long to respond. The website may be down, or you may be experiencing issues with your Internet connection.
 
user2620028
yeah github is getting ddosed
 
-.-'
 
Is there any canonical dup for this?
 
5:46 PM
There are lots of good ones
 
Cool, its hammered already :-)
 
Can anyone get on GitHub?
 
I think they're still getting hammered
 
wanted to post my own JS-flavor, i'll wait
 
5:56 PM
I'd love to know the extent, in terms of bandwidth, of this attack
 
meanwhile need some JS to translate
 
If it really is the Chinese government that's doing it, I'm going to say it's in the hundreds of gigabits
Though they aren't disclosing anything, so it's hard to know
 
What's the motive for ddosing GitHub?
 
No idea, but I'm guessing it has something to do with url_array = ["https://github.com/greatfire/", "https://github.com/cn-nytimes/"];
 
humans suck
 
6:03 PM
HN mentions AWS getting attacked too, but I don't see any mentions of it from any credible sources
 
@BenFortune I think greatfire runs on AWS. That might be what they're referring to
 
@BenFortune sounds about right for HN
 
Do GitHub have to pay for the traffic from the DDoS?
I've heard of nullrouting but have no idea what it does.
 
Can Github technically take legal actions against them?
 
@BenFortune In this context, it means taking your service offline
 
6:08 PM
Whats wrong with my code :( ? gist.github.com/l0oky/c07bbf08cde4bd866082
 
@BenFortune some hosting providers do it.
 
You publish a nullroute so that all traffic to an address or network is routed nowhere. Then you're no longer being stressed, but noone can reach your service
 
GH's engineers mush be in DEFCON 5000
 
Wonder how they're mitigating it
 
/dev/null
 
6:12 PM
lol
 
I wonder what "volumetric attack defenses" are :P
 
@l0oky did you read the stacktrace and the error?
 
yes my p.function object is undefined
but how
 
checkExist.. is undefined, not p
 
Ah, my confusing comes from the wrong interpretation of what "volumetric" means ;D
 
6:18 PM
Yeah but if you look at file models-Procedures.js
You can see It clearly
 
it is on prototype...
 
so, GFW unofficially in silent cyber-war with GH :(
 
so?
How should I define it instead?
 
You can't access foo.prototype.bar as foo.bar... (mostly)
 
hmm
thats strange
 
6:20 PM
what? how is it strange?
 
When you want to make a 'class' in js you use prototype right?
 
Yes. But you don't use the class directly as an object. you instantiate it.
 
hiiiii
 
o/
 
Hey :)
 
6:22 PM
whatcha doing. long time no see
 
exams are coming man
 
If I remember correctly when I do ioc.create('models/Procedures'); electrolyte instantiates Procedures class for me as a shared singleton instance
 
well I am here on weekends mostly...
 
althrough that code is hidden from you sorry about that
 
you are just complicating your work for no reason...
 
6:24 PM
I do that in my main js file
 
as benjamin previously told you, don't try to solve problems you don't have
 
aahh.. what abut your undertaking?
 
Maintainability of your code?
 
where do I get started with grunt ? :(
 
@argentum47 took a break for a while, and improving from understanding of the tools I use.
 
6:25 PM
look at this example
 
@l0oky you don't need to use frameworks to make your code maintainable :/
@argentum47 by first using gulp :p
 
@AwalGarg cool... would you like to see if there are any alternatives to chat.stackoverflow.com/transcript/message/22370483#22370483
 
@AwalGarg Can you make an example of 'your' hapi.js maintainable code?
 
Sure I can, but why?
I don't use hapi.js anyways
 
Well until then you didn't prove of what you've said "@l0oky you don't need to use frameworks to make your code maintainable :/"
 
6:28 PM
@argentum47 you want to convert the object to a query string, right?
 
yeah, but I am stuck with that arraying part
 
It is serialization, it is quite a thing. You might wanna read how some libraries do it...
 
which reminds me, w3c's form serialization spec is quite an interesting read
 
thanks for the ref
 
6:34 PM
@argentum47 If you want to detect if the value the key references is an object, you can do Object.prototype.toString.call(value) actually.
Also, use Object.keys instead of for..in maybe
oh also, you forgot to encodeURIComponent there :P
and your loop is actually a reduce :D
 
yeah encodeURIComponent I had in mind . ok, will use reduce
 
damn GH is very dead :(
 
  if (! (this instanceof Foo)) {
    return new Foo();
  }
What does this basically mean?
 
someone called your constructor without new
 
nice, ty
 
6:48 PM
@argentum47 If you want, I can write the stringifier :p
 
you could help with arrayfying part. rest of it I will try
my filter, sort, reduce and othe Fuction.... are rusty
 
you need two functions (because of how shit the encoding standard is)
one which creates as an array, and another from strings
 
Also, you will need a state object to care for the callstack, actually.
hmm, I am not sure how you will easily nest arrays, though.
 
in windows how to stop a server runing at 3000
 

« first day (1625 days earlier)      last day (3324 days later) »