« first day (894 days earlier)      last day (4049 days later) » 

9:00 PM
...but that's really eventually.
 
!!/karma Shmiddty=Infinity
 
@Shmiddty Shmiddty=Infinity has no karma
 
@patmacs The bot's open source, on account of a certain individual, who happens to be quite handsome. github.com/Zirak/SO-ChatBot
 
user2157210
@Zirak cant even spam that much even edits are spamfiltered here if you edit to often and too fast
 
lol
 
9:01 PM
what's max int in js again? 2^56?
 
@Zirak very cool. I'll check it out
handsome indeed
 
@Shmiddty define "int"
 
(good) point.
 
@Shmiddty For boolean operations, that's 2^31-1
For incrementation, that's over 2^50
 
@patmacs so i havent helped anybody ?
:-( thats kind off sad , cause i help like everybody in rl life :-(
 
9:03 PM
technically, about 2^300 IIRC
 
@Darkyen++
You helped me learn to love again
KARMA GRANTED
 
!!/karma notepad
 
@JanDvorak notepad has 3 karma
 
!!/karma c
 
53 bits number, 7 (or so?) mantissa
 
9:04 PM
@JanDvorak c has 8 karma
 
!!> Math.pow(2,1023)
!!>Math.pow(2,1024)
 
`8.98846567431158e+307`
:8540520 `"Infinity"`
 
user2157210
can we use the + in our nicknames?
 
After 2^53-1, increment does not work anymore
 
!!>Math.pow(111111111,2)
 
9:05 PM
@Shmiddty Y U NO MAEK SENSE!? Could not understand .Math.pow(111111111,2)
 
@copy Yeah, it's simply not precise enough
 
@Shmiddty 12345678987654320
 
!!> Math.pow(2,54) === (Math.pow(2,54)+1)
 
@BenjaminGruenbaum Y U NO MAEK SENSE!? Could not understand < Math.pow(2,54) > (Math.pow(2,54)+1) (perhaps you meant to execute a command? If so, prepend the command name with a /)
 
!!> (2^53-1)+1 == (2^53-1)
 
9:05 PM
@BenjaminGruenbaum true
 
Low bits are dropped first
 
@JanDvorak true
 
Hey all geeks
 
@JanDvorak false
 
@JanDvorak Nice XOR
 
9:06 PM
@AfshinMehrabani sup?
 
@copy thanks :-)
 
Today, I wrote a tutorial about how chaining methods works in JavaScript: afshinm.name/understanding-javascript-chaining-structure
Let me know what you guys think about this small tutorial :)
 
woah. that mustache fits
 
@Jan-StefanJanetzky hehehe
 
@AfshinMehrabani nice tutorial, a bit too short :-)
 
9:08 PM
hm
 
looks cool @AfshinMehrabani I like the design of the blog too. This is a good lesson for newbs for sure!
 
@AfshinMehrabani The powerful stuff chaining gives us in JS and not in a lot of other languages are promises and (other? That's debatable) monads, you don't have to return this, you can return an elevated object
 
For how long should the currency rates be cached? I originally thought 10 hours will do, but in testing, the rate I tested changed by a whooping 0.00017999999999995797 in about 30 seconds
 
@JanDvorak yeah, because I put the source codes in the tutorial
 
Chromium process isolation isn't so efficient. Thanks to jsbin.com autoexecution, I started a bad script... the only way to stop it was to do "pkill chromium"...
 
9:10 PM
@BenjaminGruenbaum That works too, yeah
 
@Zirak I don't think that caching is really required, or that the requests to get the rates will put too much stress on the bot.
 
!!>typeof Object
 
@Jan-StefanJanetzky "function"
 
!!>typeof NaN
 
@BenjaminGruenbaum "number"
 
9:10 PM
!!> typeof typeof
 
@SomeKittens "SyntaxError: Unexpected end of input"
 
!!>Object.prototype.foo = function(){return this};
 
!!>typeof null
 
`"function (){return this}"`
:8540617 `"object"`
 
9:11 PM
!!> typeof typeof "coool"
 
@JanDvorak "string"
 
!!>Object.prototype.foo = function(){return this}; "bar".foo().foo().foo().foo()
 
So NaN is a "number". Cool story.
 
@BenjaminGruenbaum It's not bot stress I'm worried about, it's the service I'm using. I don't want to abuse it.
 
@Jan-StefanJanetzky "TypeError: Object Hello has no method 'foo'"
 
9:11 PM
!!>{}+{}
 
@JanDvorak "NaN"
 
@Zirak Why no abuse google? It has all the currency mapping done anyway
 
!!>~-{}+{}
 
!!>!1[2[3]]+[1][0] ; //last one
 
`"-1[object Object]"`
:8540651 `2`
 
9:12 PM
@BenjaminGruenbaum It's not Google: rate-exchange.appspot.com/currency?from=USD&to=EUR
 
@Jan-StefanJanetzky "bar"
 
@Zirak Oh, I was suggesting abusing google instead
 
I couldn't find an open google finance API. I have to use a backdoor API for /google as it is
 
i like that
 
!!>~~{}+~~{}
 
9:14 PM
@Shmiddty 0
 
!!> Object.prototype.foo = function(){return this}; (123).foo() + 321;
 
@Jan-StefanJanetzky "SyntaxError: Unexpected token ILLEGAL"
 
123..foo()
 
@Zirak Is rlemon running the bot in a browser that allows cross-origin requests? I think it only makes sense that the instance running the bot should be allowed to make cross origin requests (in chrome it's a flag), in which case getting the google results and scraping them directly should be a no-brainer. I can see why might want to avoid that
 
9:14 PM
The first dot is the decimal dot
 
@Jan-StefanJanetzky 444
 
Have you guys seen this yet btw? ibtimes.com/…
 
@Zirak that sure makes sense. did not knew that yet. thanks. (though i prefer () for IE compatiblity)
 
Filling in your age wrong on a personal site may soon be a felony. Hah! Whats happening to our beloved freespace internet zone of happy times.
 
@Jan-StefanJanetzky IE doesn't do 1..toString() ?
 
9:15 PM
Yay my call of duty modern war 3 mouse is here woohoo
 
@BenjaminGruenbaum To my knowledge no. And really, the correct solution is for me to get off (on?) my lazy ass and port the bot to node.
 
ie always has undefined behaviors
 
@Zirak Node bot for the win!
stackoverflow.com/questions/15691141/… (What can I add here that might make this better?)
 
I (…) am rarely happier than when spending an entire day programming my computer to perform automatically a task that would otherwise take me a good ten seconds to do by hand. Douglas Adams, Last Chance to See
 
@BenjaminGruenbaum I think the OP was confused by the fact that even "empty" objects({}) have properties (from their prototype). You did touch on the enumerable attribute, though so I don't know if anything more needs to be said.
 
9:22 PM
Sigh, why can't developers remove this retarded "when seeing the autosave symbol, please don't turn off your system" from PC versions?
I'm NOT GOING TO TURN OFF MY DAMN PC WHILE A GAME IS RUNNING ANYWAY
 
user2157210
why not?
 
user2157210
sounds funny
 
!!> Object.prototype.foo = function(){return this}; ({fooo:"bar"}).foo()["fooo"];
yay
 
@Shmiddty Actually, I think it works to some extent (at least in modern browsers where the defaut Object prototype's methods are not enumerable)
 
@Jan-StefanJanetzky "SyntaxError: Unexpected token ."
 
user2157210
9:23 PM
@Jan-StefanJanetzky just lol
 
@Jan-StefanJanetzky "TypeError: Property 'foo' of object #<Object> is not a function"
 
!!> (function isMyObjEmpty( obj ) {var name;for (name in obj ) {return false;}return true;})({})
 
@BenjaminGruenbaum true
 
!!>(function isMyObjEmpty( obj ) {var name;for (name in obj ) {return false;}return true;})({a:3})
 
i r stooped
 
9:24 PM
@BenjaminGruenbaum false
@Jan-StefanJanetzky "bar"
 
Right, but I believe the OP was under the impression that all objects have properties (like toString), and wasn't aware of the enumerable attribute. I think that's where his confusion stemmed.
 
ppl get confused if you tell them that everything in js is an object
 
@Jan-StefanJanetzky Especially since that's not completely true
 
@BenjaminGruenbaum enlight me
 
9:27 PM
var str = 'foo';
str.bar = 42;
console.log(str.bar);
@Jan-StefanJanetzky Try that ^
 
@Jan-StefanJanetzky null,undefined,number,string and boolean are not objects, they are primitive value types. See es5.github.com/#x4.3.2
> An ECMAScript language type corresponds to values that are directly manipulated by an ECMAScript programmer using the ECMAScript language. The ECMAScript language types are Undefined, Null, Boolean, String, Number, and Object.
 
@Zirak thats creating the object "foo" 3 times
 
They are just really heavily autoboxed and are represented by objects in some interperters
 
...durr
I meant str instead of those other 'foo's (see edit)
 
Smashed my name phone: (
 
9:29 PM
@Jan-StefanJanetzky Also interesting javascriptweblog.wordpress.com/2010/09/27/… :)
 
3
A: Why this convert into object

ZirakNo. A real string ("hello", 'booya') is a primitive value - it doesn't have any functions or anything. It's just a value. When you do "string".foo, it turns into this: Object("string").foo Inside of foo, this points towards Object("string"), not the primitive value. Doing Object("string") tur...

 
^ good answer
 
@Zirak well true. but it still is an object even though you are not able to add bar to it.
 
Srsly... Screen is almost destroyed...
Fuck
 
@SomeKittens so our idea got stolen :'(
 
9:32 PM
@Jan-StefanJanetzky You can cerainly think of it as an object, but it isn't truly one
heh, 4,536 rep.
 
@Zirak So that's why I can't use a primitive string as a hash. :)
 
@rlemon what's a name phone?
 
in my limited world strings are some kind of "primitive" objects
 
wait ... its not that (x
 
@Jan-StefanJanetzky ...which is the name for a "primitive".
@Shmiddty Whadya mean?
 
9:34 PM
Yeah thats a great answer
 
@Zirak Comes up when codegolfing. You find creative ways to do things. I shaved 2 characters off a solution once by using a regex object as a hash
 
ah yeah. All object keys are stringified (even array keys. the integer part is a sham)
 
@Shmiddty I hate codegolfing almost as much as I hate actual golfing.
 
was something like:
for(;;)print(readline().replace(o=/./g,function(a)o[a]?'':o[a]=a))
 
!!>/./.a=1;/./.a
 
9:37 PM
@JanDvorak "undefined"
 
!!>var o=/./; o.a = 1; o.a
 
@Shmiddty "ReferenceError: o is not defined"
@Shmiddty 1
 
how do i append two strings in python ?
 
@ThiefMaster Meh you can dodge 'em. :D
 
how is it better than {}
@Darkyen dunno; in Javascript, that's +
 
9:39 PM
because I was already using regex for the replace
 
@Darkyen Google
 
@Darkyen Also in python, +
 
@Zirak for some reason my solution doesnt works
 
Or, really, a python 101
 
@Darkyen Python takes pride in the fact everything is uniform, + appends strings, lists, and pretty much everything
 
9:39 PM
@BenjaminGruenbaum thats scary
 
I wish golf.shinh.org supported coffeescript.
 
heh
 
But python is also strongly typed, so '1' + 4 won't work.
 
Through with season 2 by the way.
 
@Darkyen That's really a great concept. There is only one idiomatic way to do something (well, many very similar way) so developers read each others' code very easily (supposedly)
@OctavianDamiean Go season 3
 
9:41 PM
@BenjaminGruenbaum I'm Oscar Mike.
 
sadly i am liking python
:-/
 
@JanDvorak It supports golfscript.
 
@Darkyen Why would you be sad about that?
 
@Shmiddty I don't :-(
 
@Darkyen It's like JavaScript only a little less expressive in some areas and a little more in others.
 
9:41 PM
@Darkyen You poor bastard. I feel your pain.
 
@OctavianDamiean cause now i am typing javascript without { }
its confusing -_-
 
in python you can extend god
 
The one thing I like in python are list comprehensions.
2
 
btw in python

from __future__ import braces
 
9:42 PM
@BenjaminGruenbaum :D
ninja's :D
 
@Darkyen import antigravity :P
 
@Darkyen try coffeescript. It's a a mix of python and javascript
 
tried all
@JanDvorak not to mention pukable
 
chanywayz. good night everyone. will go to bed now. 10:43 pm in germany
 
syntax :-(
 
9:43 PM
How dare you guys put Python and JavaScript into the same sentence?
 
@Jan-StefanJanetzky weakling
its 3:15 here
 
I ... I just don't ... NO! NOT COOL!
 
@FlorianMargaine List comprehensions are like less expressive map/filter/reduce :P Althought they do look 'cool'
 
@OctavianDamiean Like you just did?
 
I use them a lot in python though
 
9:44 PM
@Zirak SHADDAP!
 
@Darkyen my gf already is sleeping. she'd get mad if she wakes up and sees me.
 
@BenjaminGruenbaum great for golfing though. ;)
 
@FlorianMargaine I don't know why, but tuples turn me on a bit.
 
so. cya everyone. import some braces from future for me :D
 
@Jan-StefanJanetzky Is it possible she is not your girlfriend, but a woman whose house you snuck into?
 
9:45 PM
List comprehesions make me think of haskell...
 
@Zirak Tuples and sets are defiantly big plusses
@FlorianMargaine I really like python's x:xs syntax
 
The one thing I don't like about python: its anti functional BDFL.
 
1 for x in [0..9] for y in [0..9]
 
!!/fizzbuzz
 
@Shmiddty Command fizzbuzz does not exist.
 
9:46 PM
@BenjaminGruenbaum yeah, so much like haskell
 
@FlorianMargaine I meant Haskell's, Python's is only fair :P
 
Rossum hates Lisp and objected to lambdas. I won't forgive him.
 
He is the reason we don't have anonymous functions in python ;(
 
huh? Anarchy golf supports malbolge?
 
He hates Lisp? Why? Because it's functinal?
 
9:48 PM
@JanDvorak lol. it's not "serious competition"
 
Functional*
If such is the case, then he's damn fucking wrong. Lisp is the leadt functional of the languages.
 
yay :D
 
Least. Damn phone.
 
my webserver is ready in python :->
cya.. tomorrow guys .. me loves yall :D
 
I read it somewhere else, but this seems like the source: artima.com/weblogs/viewpost.jsp?thread=98196
(note the jsp extension)
 
9:50 PM
his name is Guido. I could never take him seriously.
 
I really like both JavaScript and Python, both have a lot of advantages python's generators are powerful, infinite precision, a lot of libraries and compact syntax. JavaScript's amazing anonymous functions and model, super-powerful inheritance and tons of cool stuff.
 
Fuck you Samsung! Y U NO MAKE UNBREAKABLE PHONES!
 
reduce is probably my favourite "functional" function.
How can you live without it?
 
@rlemon cause its not nokia
@Zirak without reducing
 
I just want short lambda and [a,b] = [b,a] in JS finally
Don't even need tupels anymore
 
9:52 PM
Just the damn glass... Why glass? Arnt manufacturers smart by now?
 
@rlemon My condolences
 
It sounds smart to make them breakable, so you have to buy a new one
 
@copy you have all this in lisp since forever...
 
@FlorianMargaine And python and haskell. But I want to use JS for some projects
 
And you can go with clojure if you think you're missing a library ecosystem.
Short lambdas in python?
 
9:55 PM
Short enough
 
!!/refresh
 
A common macro in lisp: #`(lambdacode)
#`() is a lambda
Hard to make it shorter :p
 
I have over a million projects to start, continue and open-source, don't get me started on a new language now :P
 
Hahaha
Alright, good night people
 
9:58 PM
night @FlorianMargaine
 

« first day (894 days earlier)      last day (4049 days later) »