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

1:00 PM
also, it's too fast: it's against jQuery's tradition
 
@towc setTimeout(function(){ callback(returnValue); }, 500);
 
13,430 ops VS 571,608,692 native <- lol
 
@GabrielTomitsuka Not enough jQuery.
 
1:02 PM
you can't return from an async function lolololol jokes on you trolololol
 
@AwalGarg Oh yeah.
 
@GabrielTomitsuka that would be cheating, jQ can be made slower natively, by chaining useless shit everywhere
 
@SecondRikudo I'll look into it tomorrow
 
@BenjaminGruenbaum got something you'd like to say?
 
1:03 PM
@SecondRikudo can you check the msg from me, remove a comment pls?
 
@CSᵠ Hmm?
Don't see a message from you, link?
 
Please, don't use mysql_* functions in new code. They are no longer maintained and are officially deprecated. See the red box? Learn about prepared statements instead, and use PDO or MySQLi - this article will help you decide which. If you choose PDO, here is a good tutorial. — Second Rikudo Apr 13 '13 at 14:23
 
@rlemon no, it was just really not surprising the bot is unstable lately.
 
and why is that?
 
@CSᵠ Done.
 
1:05 PM
ty
 
does anyone know where to find the image with jQuery's code making a > sign, and goku or someone from those punching the code?
I mean, the whole structure of the code was bending towards the right because of nesting
 
@towc Something like this? i.imgur.com/BtjZedW.jpg
PHP though
 
very similar! I think I've seen a jQuery version before
 
googled "jquery hadoken" with nothing interesting showing up, found this with "code hadoken"
image search obv
 
!!summon 1
 
1:13 PM
@Unihedro Registered; need 1 more to execute
 
eh, sometimes i see hadoken code snippet, due of large if/elses
 
Cap still doesn't want to join any other room at all. // cc @Zirak
 
@Unihedro try to summon satan
 
@KarelG No.
 
i thought that caprica is limited to some rooms
 
1:16 PM
@rlemon not sure
 
Hello all :D
 
yolo
!!summon 1
 
!!help summon
 
@towc summon: Say boopidi bee and in the room I shall be. /summon roomid
 
!!boopidi bee
 
1:24 PM
@towc That didn't make much sense. Use the !!/help command to learn more.
 
!!?
 
boopidi bee
 
@l0oky That didn't make much sense. Maybe you meant: d, π, !
 
I can't even have a normal conversation with you
 
!!/help
 
1:24 PM
@l0oky Information on interacting with me can be found at this page
 
!!/listcommands
 
@l0oky 666, help, listen, eval, coffee, refresh, forget, info, listcommands, tell, afk, ban, unban, convert, define, doge, google, hang, jquery, learn, put..it..back...ლ(ಠ益ಠ)ლ, phucket, gtfo, lol, moneycantbuylove, catmode, coffeetime, lifeban, stopmyself, instagram, kendallfrey, excited, manigga, meinneger, dgaf, infiniteriot, okay, feelsgoodman, fabulous, sausage, playerpimp, installjavascript, moarkittens, kendall, banana, kfc, uwot, nsfw, facepalm, abhishekhingnikar, somekittens, erase
fry, dudeism, hahastillhere, onebox, morecoffee, steve, whoosh, burn, woosh, roomowner, phony, really,
 
!!/ban CSᵠ
jk
 
@l0oky Registered; need 1 more to execute
 
!!doge
 
1:25 PM
        wow
                 so fail
                         very user
much pro
 
uuuhh! They kept this
!!badanusday
 
!!badanusdaydate
 
@towc Input not matching /semptember/. Help: User-taught command: <>22nd
 
!!/welcome l0oky
 
1:26 PM
@l0oky 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.
 
Well hello to you to caprica six
!!/why are there so many unfriendly guys here who don't wanna say hello ?
 
@l0oky That didn't make much sense. Use the !!/help command to learn more.
 
user2620028
because i am mean
 
oh.. right
Anybody using IoC design pattern in node.js?
 
@l0oky Do you have a question?
 
1:28 PM
@l0oky 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 just asked one.. anywayss... ^
!!/(4337654<<1)+1
 
How are you today @SecondRikudo ?
 
@l0oky ioc is not a design pattern.
So no.
Also, if you don't stop abusing the bot we'll take that ability away from you.
 
How do you call ioc, then? Excuse my ignorance.
 
1:42 PM
IoC is a principle, you don't "call" it.
!!tell l0oky wiki SOLID
 
(also don't use those leet names, took me 2 minutes to type it out)
after that, I read on ioc
so maybe that will help you
 
That's my roughly 8 year old nick haha :D
 
@l0oky inversion of control is just a principle, like @AwalGarg said.
It's just having other code call you instead of you being in charge of the flow.
 
!!afk may something weird happen which causes sunday to never be over :P
 
1:46 PM
@BenjaminGruenbaum So have you used IoC 'principle' in your javascript programs? If so did you use any extensions to implement IoC?
 
yes, of course I used it.
If you ever used a framework you've used it.
 
Great, are you familiar with hapi.js?
 
you hiring?
 
Nope.
 
Someone used hapi in a demo at the conference I went to yesterday
 
1:51 PM
good. spill you question then. and read the rules ===> top-right corner
 
I ... did?
I need to figure out a way to implement IoC in my hapi.js apps. Does anyone know a neat way to do this? Is It just plain vanilla node.js modules? Or maybe an extension like electrolyte ..?
 
Instead of trying to apply solutions to problems you don't understand - what about trying to figure out your problems first?
7
 
@BenjaminGruenbaum What are you implying?
 
I'm not "implying" anything - I'm being as direct as I possibly can.
 
@l0oky you.. shouldn't, you got really good advice, sleep on it maybe
 
2:00 PM
You're trying to apply a solution to a problem you might not have. I strongly suggest you don't do that and instead try to figure out what problems your code actually has.
I'm not insulting you, please don't take advice as insult.
 
This is exactly why I'm building my own MVC framework from the ground-up. I simply want to understand how it all works so I can use other people's frameworks with more confidence
 
awesome ^
 
@NickDugger That ^. And @BenjaminGruenbaum Not to worry, that's the least thing I will do hah.
 
@NickDugger that's a good idea.
 
Except for having clean code for my api. ( that means easier to do new versions.. add stuff ) There is no specific problem that IoC will solve.
 
2:04 PM
@l0oky Fowler has a good article on it
 
I mean I am personally sick of coding in one file only..
 
@l0oky that has nothing to do with IoC, modularity and IoC are orthogonal (unrelated)
 
@BenjaminGruenbaum However 'orthogonal' they are. It's a key feature for a framework and clean code.
 
Framework means IoC - that's what a framework means in the first place
Does it do IoC for your code? It's a framework
 
@l0oky Frameworks don't implement IoC, your code does.
 
2:15 PM
Of course frameworks implement IoC, they invert the control of your code that's waht makes them frameworks
 
left pinky hurts from too much hitting Ctrl ! what do you guys do to ease pain, reduce pain?
 
Rest a bit?
 
@BenjaminGruenbaum Hmmmno.
 
@CSᵠ pick up a musical instrument.
@SecondRikudo go argue with Fowler in the article just a few lines above.
 
Frameworks may implement a Dependency Injection Container, to help you use DI (which is an implementation of the IoC principle)
 
2:18 PM
hmm
 
@SecondRikudo no, that's completely unrelated.
 
Have you seen electrolyte and what does it do? DI, IoC for node.js
 
@CSᵠ it'll do wonders for your soul and your fingers.
 
@l0oky Look up chusha for dependency injection.
 
Thank you.
 
2:19 PM
not sure i'm that artistic, tried piano, like it, but suck hard it it
 
@l0oky I know the guy who wrote it. He's pretty good.
Good looking too.
 
@CSᵠ Nooo not the musical instruments. Just sit down outside and try to listen to the birds and ambient noise while your eyes are closed.
 
@CSᵠ it's ok to suck, I suck at piano too but then again I've never had carpal tunnel syndrome and my fingers never hurt even when I type 12 straight hours on a really shitty keyboard :)
Musical instruments make your fingers strong and nimble.
 
that's really cool @l0oky especially on top of a hill at least, middle of nowhere
 
@BenjaminGruenbaum I implemented IoC/DI plenty of times without the use of a framework
 
2:21 PM
Yeah..
 
best on a high peak
 
@SecondRikudo That's what I am trying to do.
 
thanks !
 
A framework can help you by providing helpful magic, but it's your code, at the end of the line, that followes these concepts.
 
@SecondRikudo if you wrote a bunch of grouped functions and put it in a separate file would you say you wrote a library?
Even a small one?
 
2:22 PM
@BenjaminGruenbaum So-so. It depends.
 
That's the same case for framework.
 
I see a library as more than just a grouped functions in a separate file
 
A framework is a library that does IoC.
 
Are any moderators here ?
 
@guest271314 why?
 
2:23 PM
Why do you ask? @guest271314
 
@guest271314 Don't think so at this time, what's up?
 
@BenjaminGruenbaum that's the KEY !!!!!!!!!!! my keybd, sucks!!!! but i love it, bought a new one and don't like it, had to buy a USB-PS2 adapter to plug in my noisy old one :)
all ideas here!
 
@BenjaminGruenbaum What? No :X
Framework is a collection of libraries that generally enforce a certain uniform style of code
 
@guest271314 maybe, why?
 
It does not necessarily help you with IoC
 
2:24 PM
i also ride a mtb
 
Made off topic post at a chat, can delete / remove ? Thanks
 
@SecondRikudo again - argue with fowler, I don't feel like this discussion sorry :P
@guest271314 link?
 
@BenjaminGruenbaum vOv
 
> Inversion of Control is a common phenomenon that you come across when extending frameworks. Indeed it's often seen as a defining characteristic of a framework.
 
@guest271314 Probably something embarrassing :P
 
2:25 PM
Literally the first two sentences
 
jk
 
@BenjaminGruenbaum http://chat.stackoverflow.com/transcript/message/22363172#22363172
 
@BenjaminGruenbaum A framework helps you do it, it doesn't do it for you.
If you don't write your classes/services to accept parameters and work with the framework, it's all for naught.
 
hah
 
Your code does this, the framework only helps.
 
2:26 PM
@SecondRikudo it's exactly what a framework does - it calls your code instead of you calling its code, that's what inversion of control is.
 
^
 
Framework is a group of classes, Classes are a group of functions...
 
@BenjaminGruenbaum Inversion of Control is about letting the caller make decisions about inner implementation details (generally by injecting and polymorphism).
Your code needs to implement that
 
@l0oky no, that's not true...
 
And you don't need a framework to do it.
@l0oky Not really.
 
2:27 PM
@guest271314 you can flag it for moderator attention with a short message why you want it deleted (looks harmless) and a mod will delete it. You can also flag it for regular users and we'll delete it but then everyone sees it.
 
And you'll be banned for 30 minutes if the question is deleted ^
 
hahahah
 
@l0oky that's called as "API"
 
@SecondRikudo of course you don't need a framework to do it but when you do it yourself you get a framework the same way you write a library when you make utility functions.
 
or library
 
2:29 PM
@SecondRikudo right, and that's what a framework does. Instead of you calling it you implement stuff and it calls you - it's doing the inversion of control here.
 
@BenjaminGruenbaum I think we're arguing about roughly the same thing here, with slight pedantic differences on both sides (maybe on mine more than on yours)
 
If a library does IoC it's a framework - that's pretty much the definition, the fact you can do IoC yourself is like saying you can write a function yourself without it being a library - of course you can do it but you're eventually making a mini-library in a sense.
 
Talk about inversion of control in soviet russia. In soviet russia you call inversion of control :D
 
@BenjaminGruenbaum Flagged yesterday , tried to flag again today; notified already flagged ? emailed team at stackoverflow yesterday. Yes. how to flag for regular users so "wel'll delete it" ?
 
@SecondRikudo no, your argument is just using incorrect terminology :P
@guest271314 fine. @ThiefMaster can you please do @guest271314 a favour and delete chat.stackoverflow.com/transcript/message/22363172#22363172 ?
@SecondRikudo it's ok, the terminology is really silly - I got it wrong for years and it's not really important.
 
2:31 PM
hm what's up with this post?
 
@ThiefMaster OP requested deletion
 
@guest271314 ^ *2 mod
 
Says he flagged it yesterday and wasn't answered
 
Ty @ThiefMaster
 
woohoo, got an accepted+upvote on a 6mo question, and it's kinda a non-answer lol
 
2:32 PM
I love when that happens
 
@BenjaminGruenbaum Yes. Thank you:)
 
Thank ThiefMaster he deleted it :)
 
@SecondRikudo I am using node.js - Is it okay to use 'chusha' with It?
 
@l0oky Yes.
 
@ThiefMaster Thank you ! Cheers to all js enthusiasts here ! Have a great day !! The juice in this room is better than coffee !
 
2:34 PM
Hmm Electrolyte seems so much easier to understand..
 
@ThiefMaster could you please look at my last pending flag (comment cleanup) while here :)
 
@l0oky wait, do you know what DI is? If you don't I've got something really important to tell you I wish people told me.
 
Please do. It doesn't matter If I do know ( or not ) what DI is.. :D
 
@l0oky I have a feeling you don't know what DI is if you're saying that :P
 
@l0oky Saw "idiocracy" last night ! electrolytes indeed:)
 
2:36 PM
Okayy, I am not sure what DI is.
 
@l0oky DI is just passing parameters into functions instead of the functions using globals. Instead of your function creating a Engine (therefore calling a global function) it takes one as an argument.
 
@guest271314 Didn't get the joke sorry hah
 
DI = Dangerous Input
 
    function foo(){ // no di
        var db = new Database();
        return db.query(...);
    }

    function foo(db){ // di
        return db.query(...);
    }
That's ALL DI is @l0oky , containers just make it easier when you have multiple parameters all around.
The "inversion of control" is because instead of foo being in charge of creating the db it is passed to it.
 
@BenjaminGruenbaum while on the subject.... isn't that taking a toll passing args aroung?
 
2:38 PM
I kind of knew that.. ( doesnt matter :) ) thanks a lot.
Take a look at this
 
*around
 
@l0oky Chusha helps you with that, you define the types of classes you want and chusha will automatically inject them for your when you request an object
 
@l0oky A comedy film set in future where theres one corp which has a product that everyone says "has electrolytes" green like gatorade ; they watered crops with it
 
i mean, globals = evil, but globals > DI performance wise ?
when args are lenghty/.
 
@CSᵠ Creating variables is cheap.
When are args lengthy?
 
2:40 PM
@CSᵠ That's what containers solve - they pass the variables around for you. That said passing things around is worth it usually.
 
what about a 10mb object passed arounD, or a few hundred MB string ?
 
@CSᵠ things in JS are passed by reference value - it's pretty much free to do it.
 
^ wasn't sure, ty
 
@BenjaminGruenbaum Strings aren't though
Or are they?
 
2:41 PM
what?
 
@SecondRikudo they are but not in a way you can observe
 
Alright
 
so... 200mb string ?
 
Strings are interned in practice, passing them is "as free"
 
i am actually playing with something and having too much text to be shown on a webpage...
 
2:42 PM
@CSᵠ Generally having 200mb string in memory is a bad idea.
 
@BenjaminGruenbaum You only get pain when you start editing it then?
 
nobody does it.
 
@l0oky True
@l0oky False
 
hahahah
 
@l0oky well... the day is not too far away... nobody cares, can't you see...
 
2:43 PM
Second one is a figure of speech! :D
 
@l0oky Still false.
 
mmkay
 
@SecondRikudo yes, but you can't since they're values.
 
@BenjaminGruenbaum How so?
What I picture:
function(hugeAssString) {
    // hugeAssString doesn't cost memory.
     hugeAssString += ""; // Now it does.
    ...
}
 
i just loaded a 3mb txt file, processed it a bit (the pain!!!) and it grew :D
@SecondRikudo that made me rolf
 
2:45 PM
@SecondRikudo Wait, how come it doesn't cost memory?
 
posted on March 29, 2015 by admin

New comic! Today's News: Big announcement early tomorrow! 

 
@l0oky Because only the reference is passed at first
And it only actually copies the value to memory when you edit it.
At least, that's how I picture it, @BenjaminGruenbaum might completely contradict me here
 
@SecondRikudo it's a different string now, not the same.
 
Well that reference is costing memory. Double that if you edit it.
 
If you do that outside the function: same thing.
 
2:46 PM
@l0oky reference memory is negligible.
 
@SecondRikudo hmm... I am not 100% sure if that is true with modern JS engines.
 
the reference is just a pointer address, slim size. But if you add the content of it, you call the content of the data of which the pointer is pointing to. That results into a increase of memory, dependent of its data size.
 
so yea in that example, the second you manipulate you double it, and have an improved version of it separate
 
then the function can add text to it
 
Are there pointers in JS like in C?
 
2:49 PM
no
 
C allows you to manipulate with pointers, js doesn't
 
@l0oky yes.
You don't really want to go there though, there are actual references in JS (like WeakRefs) and more abstract tools (like WeakMaps) but you don't want to use them unless you really need to.
 
You can add your own :P
 
You can also manipulate raw memory using Buffers
 
cool
 
2:52 PM
There is even some exploit related to that.
 
What does It take to build your own syntax on top of javascript? Like coffeescript or a really funny one dogescript
 
time
 
That's too abstract.
 
@BenjaminGruenbaum wrappers :P
 
your question is too abstract
 
2:55 PM
Why are stackoverflow chats always full with philosophers?!
 
Because we get a lot of shitty questions, mostly. It makes people more cynical.
 
^--
the disadvantage of chat is that people keeps asking, asking until nobody listens anymore.
 
@BenjaminGruenbaum I half way shimmed that as this :D
 
That wouldn't be a problem If stackoverflow wasn't full with arrogant people.
 
oh are we arrogant ?
 
2:56 PM
trying to modify Function.prototype.bind now
 
@l0oky It still would. The problem is not arrogance it's that people feel they are entitled to get help.
 
why would someone use websotrm over a text -editor like sublime
 
Not saying you are.
 
@AwalGarg i'm curious why you want to refactor the this to that :P
 
@lovetolearn debugging, better static analysis, better integration into stuff, supports more things.
@KarelG exercise.
 
2:57 PM
and can you get webstorm for free
 
@BenjaminGruenbaum which could be solved if people are explicitly lectured about the culture of this place.
 
@lovetolearn no it costs money, just like Sublime
 
@KarelG this is yesterday's news, that is the reason.
 
@KarelG for the same reason I use eval, with, arguments.callee and global variables.
 
Arrogance is what makes smart people look stupid..
 
2:59 PM
imagine if people would implement both in the engine. That you can do this and that.
 
its 39£ for a year i think
 

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