« first day (600 days earlier)      last day (4351 days later) » 

2:00 PM
When, as the program is parsed from left to right, a token (called the offending token) is encountered that is not allowed by any production of the grammar, then a semicolon is automatically inserted before the offending token if one or more of the following conditions is true:
1. The offending token is separated from the previous token by at least one LineTerminator.

2. The offending token is }.
LineTerminator or }
 
I see
 
my question is....why wouldn't you just type semi-colons where they are needed?
 
@JamesPWright because it's more readable without semicolons.
 
Pih! That would be just too easy...
 
2:02 PM
lol
 
says you
 
callbacks going 11 levels deep doesn't get much readability from leaving semicolons out
 
@JamesPWright Yep. That's why it's entirely subjective
@Esailija what does semicolon have to do with that?
 
The folks that whine about semi-colons can switch to CoffeeScript
 
but that's like saying: "I think the English language is more readable if I leave out commas."
 
2:04 PM
just saying there is much bigger stuff affecting the understandability of code
 
@JamesPWright not at all.
 
than semicolons vs no semicolons
 
you can do it, but it's really your opinion and it goes against what the language is meant to be
 
@Esailija yeah, but if it helps, then why not
@JamesPWright if it really goes against what the language is meant to be, why is there ASI?
it could've been like many other languages out there ( C, C++, PHP, etc etc )
 
"if it helps then why not" because there are long arguments about how to type the language if you leave out semi-colons....so it's actually more difficult to do it that way just to make it more readable for you and CoffeeScript people. :P
 
2:05 PM
it could have had multiline strings
 
but yes, to sum it up, it's entirely a subjective matter.
 
note I'm mostly messing with you
There is ASI because javascript is a pretty screwed up language
:P
 
are you saying I'm a coffeescript guy?
do you really want to be buried alive?
 
I don't know if you are
 
do I look like I am?
 
2:06 PM
I'm afraid we are all going to be buried alive by former Ruby on Rails devs entering the Javascript world thanks to CoffeeScritp
 
R U TALKN TO MEH?
 
not until cs gets its debugger straight
 
!!> eval("'multilinestring\nFFFFFUUUUuu\nwhynot'");
@Esailija SyntaxError: Unexpected token ILLEGAL
 
lack of debugging will never hold script kiddies back. :)
 
2:07 PM
I might give cs a try once the debugger is usable though
but till then... well, it just can't be professional.
 
ugh....I've tried to force myself to try CS multiple times. Every time I start a new JS project I attempt to do CoffeeScript....I just flat out hate it....I find it much less readable than regular Javascript
 
i always lul when people bitch about me using == vs === (when it makes sense to) yet they rely on ASI
 
@rlemon uh? how is that related?
 
personal preference. if you are using the mechanics of the language correctly why does anyone care
 
ASI works perfectly
yep
personal preference, exactly :-)
I can understand why people use or not semicolon, it's just personal preference to me
 
2:10 PM
so if i use element.getAttribute(identifier) == 0 vs element.getAttribute(identifier) === "0" why does anyone care? I'm using it correctly, and I obviously understand it.
 
well, of course, these people better stick to standard guidelines of their team if they have one
@rlemon because === avoids ambiguity
 
now colons, that is just READABLE :P
 
man....Javascript is definitely a language that is a beast in the hands of a master and a monster in the hands of a regular developer.
 
var x;
var y;
var z;
var x,y,z; // omg uber bauce
 
I know of something else thats a beast in the hands of a master...
 
2:11 PM
@FlorianMargaine that is like arguing leaving out semicolons avoids maintainability / readability
 
that's like the following:

var x
    , y
    , z;
@rlemon ambiguity is not subjective like readability
 
confusion must be avoided
:D that's from the crockford meme pic
 
ambiguity is in par with confusion. ASI rules are confusing to most, so is understanding == vs === (idk why)
 
@Loktar ?? I'm a pervert, so I wonder what you're talking about :D
@rlemon that's why I said "personal preference", and then chat.stackoverflow.com/transcript/message/4028863#4028863
 
the rules for ASI and == are equally "complex"
but why is not == personal preference then
 
2:13 PM
you guys are just playing dumb -_-
 
my whole statement was directed towards @Raynos FTR. he bitches about the use of == but leaves out ; all over his code.
 
for the record
 
new String("hallo") == "hallo"
but new String("hallo") !== "hallo"
 
2:14 PM
i make my own abbreviations in the hopes that contextually they will make sense.
 
@FlorianMargaine haha you got it!
 
WAIT HOW CAN IT BE
 
@rlemon maybe for native english speakers ;<
 
nvm they both supposd to return true
FTR = fuck the ???
 
For the retarded?
oh, fuck the rich probably.
 
2:17 PM
makes sense
 
JVMLCAC === for the frenchies
lets see if he can get it
 
java virtual machine low calories alternating current
 
lol
 
lol
general question\
Why do most java developer and C++ developer get egostic ?
 
2:19 PM
because they think they are smarter than you
 
google translation to the rescue
 
i translated
florian
 
well I know that java is designed to get productivity out of mediocre programmer
 
JVMLCAC === je voudrais mettre les choses au clair
 
oh, you mean selfish?
@rlemon oh, that was french.
 
2:19 PM
selfish , egostic , harsh , think they are king of code [ while they understand less about there own code then us ]
 
and no, there was no way I would've gotten it.
common one: "mdr"
 
@Abhishek they are all jHipsters
 
frenchie use that instead of "lmao"
 
mdr ?
expansion please!
 
merde ? No that's offensive, right ?
 
2:21 PM
"mort de rire"
@copy yeah, merde = shit
 
Voulez-vous coucher avec moi.... ce soir
 
uh-huh!
 
I always think " A Streetcar Named Desire " not that annoying song.
 
2:23 PM
Yes
 
you should answer for free rep
 
I am thinking of words :/
 
just give code to start with
then edit and add words
 
well node.js buffers are of defined size so when he appends them into the single buffer for 3 times definetely he will run outa bounds.
 
@FlorianMargaine ever used PHPMailer + Gmail SMTP server for sending emails in Drupal?
 
2:24 PM
this is how to answer questions on so
@rlemon nope
but drupal has drupal_mail
 
function drupal_mail() {
    return call_user_func_array( "mail", func_get_args() )
}
 
@FlorianMargaine no, first you search SO for the answer you're looking for (it likely is there) then you copy and paste it using CopyAsMarkdown
 
@Esailija sets a lot of defaults for you, like content-type etc
 
btw
his function runs fine for me
 
2:28 PM
lul
 
he is probably using node < 6
 
I like that you didn't say 0.6
 
ugh I need a new bank
RBC Supported Browser List
(As of July 2009)
Windows IE 6
Windows IE 7
Windows IE 8
Windows & Mac Firefox 3
Mac Safari
 
node 6 sounds far more mature than 0.6
 
2:29 PM
went to move around some of my investments "This page is only available using Internet Explorer"
WTF?!?!?!?!
 
lol at that bank website in 1920 width resolution
 
yea most sites suck at 1080p
g+ is horrible. ( i would expect them to have been better )
 
this chat is pretty awesome
more space for messages
 
yea SO does it nicely
 
lmao @E
gues what :3
 
2:31 PM
fills my screen like a bauce (or at least centers it)
 
wow, just went fullscreen on it....it DOES look nice this way
 
look at my reply on that
 
well I don't mind unused whitespace, but left aligning
 
ok so they do useragent sniffing... i'm confident that my Chrome will handle their shit. how do I make chromes useragent look like IE8
 
2:34 PM
chrome://chrome-urls/
 
0
A: Problems with copying Buffer in NodeJS

AbhishekOkay so here is the way I concatenate two buffers. var a = new Buffer('foo'); var b = new Buffer('ofoo'); a += b; // Tested to work on Fedora 17 with node 0.6 a += b; a += b; a = a + b ; // just the long form // In short the '+' operator works when adding buffers aswell con...

 var offset = 0
   var a = new Buffer(0)
   var b = new Buffer('test')

   a += b;
   a += b;
   a += b;
   a += b;
   a += b;
   console.log(a.toString('string'));
[Abhii@localhost ~]$ node test_buff.js
testtesttesttesttest
sometimes the most obivious solution is the best one :-/
 
console.log(a.toString('string'));
?????
 
oops
 
i edited internals a bit :-$
for handling mp3 (angel)
 
2:37 PM
why is arr.push() different than arr.push(undefined)?
 
!!> undefined === null
 
@Abhishek false
 
@Abhishek false
 
probably arr.push(null) is same as array.push();
 
@FlorianMargaine because you don't push anything in the first case
 
2:37 PM
no need for a bot there :D
@Esailija I push undefined in the second case, it's the same
 
try arr.push(null);
 
well it's not the same
 
I mean, it's why (function(undefined) {}()) works
 
!!> [].push(null);
 
@Abhishek 1
 
2:38 PM
@Abhishek nah, undefined is not null
 
the function might check that arguments.length < 1
and bail
if you pass undefined, then arguments length >= 1
 
guess so
 
and it just pushes it
 
yeah... kinda sucks :(
 
x(), arguments is []; x(undefined) arguments is [undefined]
 
2:39 PM
oh, nice :D
I wanted an array with the number from 1 to 100 earlier
 
!!> [].map.call( Array(101).join(), Boolean )
@Esailija [object Array] [true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true‌​,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,‌​true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,t‌​rue,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,tr‌​ue,true,true,true,true,true,true,true,true,true,true,true,true
 
yeah, in the end I came up with something like this
!!> [].map.call( Array( 101 ).join(), function( v, i ) { return i + 1; } );
 
@FlorianMargaine [object Array] [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29‌​,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56‌​,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83‌​,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99]
@FlorianMargaine [object Array] [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,3‌​0,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,5‌​7,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,8‌​4,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100]
 
2:43 PM
holas
 
which is best data type tinyint ,boolean or varchar(1) for storing 1or 0
in mysql
 
store everything as TEXT
^ best way
 
there is boolean in mysql?
 
yeah idk.. if there was id use it
 
thought there wasn't, Id say go for it, otherwise go for tinyint
 
2:45 PM
IIRC BOOLEAN is just tinyint
 
well it was in 2008
83
Q: Which MySQL Datatype to use for storing boolean values?

BeatSince MySQL doesn't seem to have any 'boolean' datatype, which datatype do you 'abuse' for storing true/false information in MySQL? Especially in the context of writing and reading from/to a PHP-Script. Over time I have used and seen several approaches: tinyint, varchar fields containing the ...

 
enum with yes and no
 
ah still is
> BOOL, BOOLEAN

> These types are synonyms for TINYINT(1). A value of zero is considered false. Nonzero values are considered
 
what about varchar(1),will it not make my database size small
 
2:47 PM
yea BOOLEAN is just a tinyint(1)
 
oh neato
 
is tinyint of 1 byte
 
@Loktar you can use "up arrow" to edit your previous message
 
oops.. lol
whats block quote again?
 
@Somebodyisintrouble varchar is for strings
it's >
 
2:48 PM
> or |.. or something else?
oh well wtf
 
I typed that but it didnt work, tries again
 
you got it I think :p
multiline blockquotes doesn't work though, dunno why
 
ah ok.. oh well
 
1
A: Problems with copying Buffer in NodeJS

Abhishek:EDIT: Got confused by the question. I thought he is going to handle buffers of same type. Buffers cant be resized as they are defined by a fixed size in Node.js so the best option is to use a function like this function concat(bufs) { if (!Array.isArray(bufs)) { buffers = Array....

Much updated answer
i thought he wanted to handle strings only
now there is a solution
 
2:49 PM
@Abhishek nice :)
concatinated is spelled concatenated though :D
@Abhishek something's wrong though
your argument is bufs, but you use buffers then
 
@Somebodyisintrouble basically use tinyint(1) and it will store 1 byte per value
 
i edited it :-/
i code it with bufs lol
 
@rlemon i thought that tinyint takes 2 bytes
 
not if you make it take one
by default tinyint is 4
 
@Abhishek I'm not seeing the edit
 
2:52 PM
BOOLEAN / BOOL are just tinyint(1)
 
function concat(bufs) {
    if (!Array.isArray(bufs)) {
      buffers = Array.prototype.slice.call(arguments);
    }

    var buffersToConcat = [], length = 0;
    buffers.forEach(function (buffer) {
 
literally, make one and check.
 
I know :P
i coded it with bufs
and cbuf
 
@rlemonmax value of tinyint(1) is 127 ,am i correct
 
then tried to make it more readable :/
failed
 
2:53 PM
@Abhishek what are you waiting to edit the answer then? :p
oh that's done :D
 
See for self :-)
 
@Somebodyisintrouble actually i'm wrong. matthom.com/archive/2006/11/28/…
read that
 
you can use siit,i.e, my name short form
 
@Somebodyisintrouble or i can write @ and press S and let the auto complete run it's course :P
 
Sam
Hey guys
 
2:55 PM
oh yeah
 
sigh done
 
@Somebodyisintrouble looking at your question though, i think the best way is to use tinyint(1) if you are storing a boolean value
 
@Abhishek I commented :x
 
or possibly a bit depending on your usage??
 
@FlorianMargaine try Concat(a_Buffer,3)
 
2:56 PM
(i've never had to use the BIT data type in MYSQL)
 
i am trying to strictly add buffers
 
@Abhishek if (3) will pass
the second check is ok, the first is kinda pointless
if (!Buffer.isBuffer(buffer)) { should wrap the whole code in the forEach
@Abhishek congratulations, you now have 417 rep!
 
fixed oh lord where is my head
 
almost like me.
(4177)
 
:D
yay!
now be right back
i need passport stuff dne
 
2:59 PM
BTW @Abhishek may you please name your state
 

« first day (600 days earlier)      last day (4351 days later) »