« first day (1338 days earlier)      last day (3617 days later) » 

4:00 PM
Zirak had a duel with Caprica in which Caprica lost and Zirak got hurt. Zirak is the bot now, a damaged one...
 
quite the simple circuit
I thought it would be more complicated
 
and an extra "u"
 
@rlemon that looks pretty british
 
someone put a lot more work than I would have into drawing that :P
 
I was wondering, lol
 
4:02 PM
Fellas, any good resources for learning Node.js properly?
 
@SecondRikudo hey hey, tell me when you get one, please.
 
@SecondRikudo as opposed to Javascript per se?
 
@JanDvorak Yes
 
@Mosho you got a skype, lord knows ill end up needing help sooner or later
 
@rlemon looks like a Zark's eye
 
4:03 PM
Introduction to node modules, how to structure an application
 
@AwalGarg not satisfied with codecademy?
 
@JanDvorak still on client side with learn.jquery.com and MDN :P
 
@SecondRikudo - if you know javascript, just start by trying to build something in Node, and look stuff up in the documentation
 
then head up here
 
@JanDvorak I must thank you, learn.jQ thing is really helpful. When I don't understand something, I look it up on MDN, and problem solved. Thank you for wonderful suggestion...
 
4:05 PM
@adeneo The building itself is not the problem.
 
@SecondRikudo - Then what is ?
 
I'm looking for common design patterns, application architecture etc.
 
Thank you for your reference :-)
 
The higher conceptual level, rather than implementation.
 
It's javascript, do whatever floats your goat.
 
4:05 PM
the MEAN stack of course... lol
 
@adeneo That doesn't sound very scalable or extensible :P
 
I await the day when the node.js server listener would be able to parse PHP...
 
I know I can implement it however I want (That's pretty much true in any other language), I'm looking for best practices mostly.
 
@SecondRikudo Try something and see if we scream at you :-D
 
:P
@dystroy any tips?
 
4:07 PM
@SecondRikudo - I guess that depends on you, the point was that you can use object literals, prototypes and whatever just like in the browser, how you make it modular and scalable is up to you.
 
@adeneo Any common components you have with (mostly) one page apps?
 
@SecondRikudo if you use express, use its scaffolding
 
Jan, learn.jquery.com/javascript-101/testing-type <-- why does it say careful everywhere?
 
@AwalGarg the point is that typeof x === 'object' means less than you could think.
 
4:11 PM
@SecondRikudo - Usually async or Q to handle that stuff, express helps a lot, socket.io for sockets, redis for memory store and I use cassandra a lot for storage. I'm still using toobusy and some stuff I wrote myself to handle clusters and errors, where domains are really helpful. What modules you include depends a lot on what you're building, for parsing scraped stuff Cheerio works pretty well etc.
 
!!> typeof /../
 
@JanDvorak "/../"
@JanDvorak "object"
 
@Zirak what are the quotes around the regex doing there?
 
@JanDvorak that seems a regexp to me...
 
yet Firefox keeps calling it an object
 
4:13 PM
I am on chrome, lemme check on jsfiddle
 
@SecondRikudo my sarcasm sense is tingling
 
I guess that it's IE that says that regexes are functions
 
Chrome return object for regex as well
 
@michaeladair I have skype, but I am most certainly not going to show you how to google "nodejs hello world"
 
4:14 PM
well, it is an object
 
how?
 
!!> var x = /.../; x.x='x'; x.x
 
@JanDvorak "x"
 
!!> var x = "..."; x.x='x'; x.x
 
@JanDvorak "undefined"
 
4:16 PM
RegExp is a function
 
strings are weird in javascript
@Mosho where?
 
I will complain to the Oxford dictionary makers for not defining confusion as javascript...
 
@AwalGarg - it's an object because the spec says it is
A regular expression literal is an input element that is converted to a RegExp object (see 15.10) each time the literal is evaluated
 
@JanDvorak used as a constructor for regex objects
 
@AwalGarg *for not having defined
@Mosho oh, that. I meant its instances
 
4:17 PM
I am sure, whosoever was writing the JS spec, was drunk while doing so.
 
as in, sad?
 
@JanDvorak No, thrown out a window.
 
@SecondRikudo half of our government was, actually, thrown out of window. Twice.
 
Or maybe, Caprica wrote the JS spec... @_@
 
@AwalGarg - Why, it makes sense to have it as an object, that way you can do
/\d+/.test('string');
 
4:20 PM
@adeneo then what the spec defines as an object (the properties and all) should be named something else. Its confusing, nothing else.
 
@AwalGarg - not really, everything is an object in javascript ?
 
@adeneo from my very limited knowledge, I infer that test is not a property of the regexp, or is it?
 
it is
 
It is, it's defined as RegExp.prototype.test()
 
@adeneo well then, typeof "JS_SPEC_IS_WRITTEN_BY_CRAZY_PEOPLE" //object?
 
4:22 PM
Nope, that's a string
 
^property, I mis-termed
@adeneo you say everything is object...
just hoping this is not a hidden camera show
 
though you can also have
 
but strings are objects as well, when they are not literal
 
!!>typeof new String('wat')
 
@Mosho "object"
@JoshTheGeek 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.
 
4:24 PM
@CapricaSix why don't you give him some lemonade as well? irritating bot!
 
That's why you can do 'string'.match(/\d+/)
 
@adeneo err... no
 
ok, why is null an object?
 
I think it's converted by the . to an object
or something
from a primitive string
 
@AwalGarg it's not. it's typeof spazzing out because someone thought it would be a good idea
 
4:24 PM
@adeneo I don't think this is possible, but if you say, I agree
 
@JanDvorak - nope, null is an object
 
oh wait, they say array is also an object, and I guess, a string is no different than an array in much of a way... so yep, thats possible.
 
!!> var x = null; x.x=x; x.x
 
@JanDvorak "TypeError: x is null"
 
not an object
it doesn't even wrap into an object
 
4:27 PM
@JanDvorak JSON not liking regexps, so I converted them to a string.
 
typeof null // object (bug in ECMAScript, should be null)
from MDN
 
@AwalGarg you can only have a physical string object if you call the constructor
 
@AwalGarg new String('blah')
 
@Zirak thats not a string, its a declaration for a new string. Don't try to fool me.
 
@JanDvorak - Nope, it's not really an object, it's null
 
4:28 PM
Why is that not a string?
It has all the properties and methods of a string.
 
@JanDvorak how?
@Zirak iterate it through foreach?
 
@JanDvorak - and again, the reason it returns a typeof object, is because the spec says it should
 
!!> [].forEach.call(new String('blah'), function (c) { console.log(c); })
 
@Zirak "undefined" Logged: "b","l","a","h"
 
@AwalGarg Problem?
 
4:30 PM
!!>function a(){} + 'a'
 
@Mosho "NaN"
 
@Zirak yep. You took the return value of the declaration which is a string. You are saying that 1-1 is true...
 
wat
 
@AwalGarg wat
 
@Zirak new null <--is this null?
 
4:32 PM
That's an error
 
!!> for (key in new String('blah')) console.log(key)
 
@adeneo "undefined" Logged: "0","1","2","3"
 
@Zirak exactly. I don't know how far I am correct with the spec, but logically, new String('randomgarbagehere') <--this can't be called a string, but it returns or declares a string.
 
!!>var s = new String('blah');for (key in s) console.log(s[key])
 
@Zirak do you think a string can declare or define or return a new string?
 
4:33 PM
@adeneo "undefined" Logged: "b","l","a","h"
 
wat
I'm confused, are you talking about raw code, or its outcome?
 
@Zirak raw code ofc
 
I think he's saying, new String('randomgarbagehere') is an expression
that returns a string
but String is a function
 
@AwalGarg - strings are immutable, they can't return or define anything
 
not a string
moot point anyway
 
4:34 PM
'abc' is also an expression which returns a string
 
I am enjoying the confusion though
 
Talking about raw code is meaningless, because all code is just a string anyway. Meaningless strings until given meaning.
 
@adeneo exactly, then how can new String ("idiocracy") <--be a string?
@Zirak not so in a console :P
 
@AwalGarg - because everything is an object
 
wat
You know that the console is at the end a prettified eval?
That's the meaning of REPL - Read Eval Print Loop.
 
4:36 PM
@Zirak nope, I didn't know that. ok, then talking about raw code is meaningless, but still, the spec is wrong then...
 
By your logic, 'abc' also isn't a string, it's a string literal, an entirely different thing.
Where is the spec wrong?
 
@Zirak oh, yeah. Nice point. When I say string, I mean a string literal... wait why is that different?
 
a challenger appears
 
@Zirak I meant, its a bit away from logic
 
@AwalGarg Because a string is a data type and you have many ways of grabbing hold of this data type.
One is string literals, another is the String constructor.
 
4:38 PM
@AwalGarg - maybe it's easier to look at certain things as primitive values, not everything is an object, just most things, there are also primitives, like string literals.
 
@adeneo hey wait, then why did you said (2x) everything is object?
@Zirak then I was talking about the literal thing :P
 
Lol, type systems discussions
 
It's not even type system...it's confusing between syntax and runtime.
@AwalGarg That's just syntax
 
@AwalGarg - Because it's a common saying in javascript, and everything is an object, functions, arrays, objects, even strings and numbers can be objects when using the constructor, but there are also primitive literals, and those aren't objects.
 
4:40 PM
@BenjaminGruenbaum how well versed are you with Node?
 
Here, I invented a language called ZirakIsAnAlienPickle where you declare strings like this: ASDFASGHHASKDDSFAHADSFSA 4.
 
@SecondRikudo if I asked you the question (for best practices and such) for PHP, what would you answer?
 
@Zirak heck, I thought we never employ common sayings in scripting anywhere...
 
@FlorianMargaine - The best practice for PHP is to stay away !
 
I want to see what kind of answer you're looking for.
 
4:41 PM
any easy way to guard the dot.huge.neste.object.access. the only way i know is to use step by step if checks
 
@SecondRikudo I wanna say something... umm. I guess I should refrain. But I think you already KWIM... :P
 
@FlorianMargaine Have a single point of entry, with a well defined bootstrapper file with an autoloader. Route all requests through to it, and have a Router component that identifies which request goes to which resource.
Your directory structure should be divided by modules. You should be able to take a semi-top-level directory as a whole and copy/paste it into another project and reuse.
 
@SecondRikudo - Node does that out of the box (pretty much)
 
@SecondRikudo kinda, but busy
!!afk sudying for machine learning exam
 
@BenjaminGruenbaum Alright, then I'll be able to harass you some later :P
@AwalGarg I'm not sure which is which in your example.
Both have their uses in reality.
 
4:45 PM
PHP is obviously more useful in reality ?
 
@adeneo Depends on the usecase.
There are several things that PHP sucks at.
 
@SecondRikudo Wrong, One had its use in reality, and one has its use in reality...
 
@AwalGarg No
 
@SecondRikudo - Well, generally speaking, it's easier to work with, works on more servers, and is known by more developers. I never said it was "better"
 
1 message moved to Trash can
I was looking for a "spam" room :(
 
4:47 PM
@AwalGarg You don't see that JavaScript has almost as many flaws as PHP
 
@adeneo Well, it's hard to find good tutorials for PHP.
The top rated things in google is utter crap
 
@SecondRikudo oh yeah right, node.js is still not available on shared hosting. So I guess, PHP is important there...
 
@SecondRikudo - I would think it's harder for Node, but really have no idea ?
 
@AwalGarg Who the fuck uses Shared hosting with VPSs that cost you $1-$2?
@adeneo No, you really don't.
Top tutorials on PHP contain SQL injection, use deprecated libraries, promote crap programming practices.
 
@SecondRikudo haha, u kidding
 
4:48 PM
@AwalGarg he said "good"
 
@SecondRikudo can you please tell me which site offeres vps at that low cost? seriously please... no jokes
 
@SecondRikudo - and on the other hand there's node, which doesn't really have any built in DB stuff like PHP, and each developer has to roll his own. That sounds really secure when you know how many bad developers there are
 
@FlorianMargaine why did u invite me to trashcan?
 
@adeneo I'm sure that there are well established OS libraries that do that, aren't there?
And if there aren't, shame on you, let's make some.
 
4:51 PM
@SecondRikudo As long as it provides the low-end server that it promises (and not less), why not?
 
@SecondRikudo - There's lots of modules available for the most popular DB's. How secure they are is another thing completely ?
 
@copy Because 95% of hosting servers (and 100% of free hosting servers) are crap.
 
@GuillaumeDepardon 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.
 
@SecondRikudo A.W.E.Some...
 
You have no freedom, generally crappy tools (like Apache webserver and CPanel), crappy support, etc.
 
4:52 PM
@SecondRikudo Yes, but not with a VPS
 
@CapricaSix Will you shut up if I give you $1?
 
@copy I think we're having a mixup in communication here
And in any case, I need to go.
 
@SecondRikudo hey wait, I live in India... its not included there...
 
Be back in about 15
 
@SecondRikudo Oh, I see it now
 
4:53 PM
@AwalGarg It's where the server is hosted, Israel isn't there either.
Don't forget to use their coupons! IRC33 for 33% discount
 
it's the 8th episode of firefly I'm watching today, @BenjaminGruenbaum cursed me
 
@SecondRikudo oh, so I have to select the one with the best proximity to my target area... :)
 
@towc It's a blessing
 
^ ... and a curse !
 
Avada Kedavra
 
4:55 PM
fact is that I've spent 6 hours watching stuff
 
!!afk Gone fishing !
 
@towc yeah well I've spent 6 hours debugging IE8 sometimes, I prefer watching stuff
 
@FlorianMargaine at least that doesn't make you feel useless
 
This is the room with the largest number of room owners
 
@towc Man...someone once recommended Elfen Lied, some show. Started watching it at around midnight, stayed up till 7 AM. Had to watch all 13 episodes.
@AwalGarg This is the potato with the largest potato
 
4:57 PM
@BadgerGirl Let's watch Elfen Lied
 
@Zirak I watched 26 episodes of GoT consecutively once
 
@copy It's difficult to watch, really difficult at times.
 
!!> /{potato}/.killall;
 
The problem though is that it strikes you at incredibly strong at first, but it starts to fade away after a while.
 
Did you cry while watching it?
 
4:59 PM
!!are you alive or dead?
 
@towc are you alive
 
@AwalGarg she doesn't like you man... you're in her friendzone
 
Elfen Lied is annoying and retarded
come at me
 
Does everybody here already knows that Chrome dev tools allow you to copy post requests in curl format?
 
@Mosho What should we watch then?
 
4:59 PM
@BadgerGirl At two points? Almost.
 

« first day (1338 days earlier)      last day (3617 days later) »