« first day (1917 days earlier)      last day (2928 days later) » 

By the way I found the PHP thing
Apr 12 at 2:38, by quartata
@CᴏɴᴏʀO'Bʀɪᴇɴ By the way: array_reduce(range(1, $n), function($accum, $arg) { return ($accum *= $arg); }, 1)
Apr 12 at 2:42, by Downgoat
Array.prototype.slice.call(Array(n)).map(function(item) { return item + 1 }).reduce(function(accum, arg) { return accum * arg });
 
what is the code supposed to do?
I'm too lazy to read
 
factorial
 
and the objective is to make it look readable?
 
Yeah.
 
1:03 AM
kk, gimme a sec
 
I know you can use a for loop but why
You shouldn't have to
 
I won't.
factorial = n =>
	n <= 1 ? 1 : n * factorial(n - 1);
There, beautiful.
 
Recursive and ES6
 
You shouldn't really have to use recursion...
 
1:05 AM
To be fair, it is a lot more readable, and the recursion doesn't hurt it that I know.
 
You were asking for which looked nicer iirc
^^ thanks
 
JS doesn't have tail call optimization
@CᴏɴᴏʀO'Bʀɪᴇɴ True.
 
If I ever need tail call optimization for a factorial function, just shoot me. The call stack should never be very deep.
 
function factorial(n){
	var acc = n < 1 ? 1 : n;
	while(n --> 1)
		acc *= n;
	return acc;
}
There, that's fast.
ES5, fast, and readable.
 
function factorial($n) {
  return ($n <= 1 ? 1 : $n * factorial($n - 1));
}
 
1:08 AM
Recursive and PHP
 
Part of what I don't get is that PHP syntax and JS syntax aren't that dissimilar to be honest...
 
Yeah, except for the ugly money variables
 
That's not hating PHP then. That's hating Perl
 
I never said I wasn't hating perl.
:P
People who name their variables with $ in them who aren't obfuscating deserve to be buried >:|
(jk)
 
$ as in s as in scalar
I swear, funny chars make sense to me...
@CᴏɴᴏʀO'Bʀɪᴇɴ What's the -->? As in n-- > 1?
Reducing is still better though :P
 
1:11 AM
@quartata Yes, it's the classic "goes to" operator :P
 
I suppose neither of these programs really look all that different though...
Still though, the PHP one liner is better than the JS one liner. You gotta admit :P
 
@CᴏɴᴏʀO'Bʀɪᴇɴ I grew up with STRING$, so as ugly as they are, they aren't a huge readability issue for me :P
 
function factorial($n){return ($n<=1?1:$n*factorial($n-1));} JS, PHP polyglot
@Geobits That's understandable. I meant to make the point earlier that those used to a certain syntax style think it's readable.
 
I don't think $ affects readability per se, I just think it's ugly as sin.
 
1:14 AM
How is $a that different readability-wise from var a anyways? (At least during declaration)
 
@AlexA. For me, it makes my eye pause momentarily. :P
@quartata Is that what the $a does? Initializes a variable?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ No.
(:P)
 
Then how is comparable to var a?
 
I meant readability wise.
 
you only read var a once a variable, whereas you read $a every time you see the thing.
Not really comparable.
 
1:16 AM
Fair enough.
 
Well at least you don't need syntax highlighting to find your variables >_>
<_<
 
which language is that? :P
 
So just to clarify though. In terms of non-function one liners Array.prototype.slice.call(Array(n)).map(function(item) { return item + 1 }).reduce(function(accum, arg) { return accum * arg }); is more readable?
 
@quartata ... did you just change sides?
 
No, I'm trying to understand your point.
There was an implicit question mark at the end
 
1:18 AM
Aren't you a python programmer? "Explicit is better than implicit"? :P
In ES5?
 
> a program
 
Or do we allow ES6
 
I suppose, although he showed a similar ES6 one that wasn't much better
I think he did Array(n).keys() instead of Array.prototype.slice.call(Array(n))
 
And you want to do it by... creating an array and reducing it over multiplication?
 
No. But that's the most natural way, right?
 
1:20 AM
... no. Recursive.
Especially considering PHP has a range builtin, and JavaScript doesn't.
 
IntStream.rangeClosed(2, number).reduce(1, (x, y) -> x * y)
boom
 
Is this Java?
 
@Geobits Even that makes sense to me
@CᴏɴᴏʀO'Bʀɪᴇɴ Yeah, Java 8 though
 
I like it a lot
 
Honestly, I've still only played with Java 8 a bit, but what I've seen is nice enough.
 
1:21 AM
well that was an interesting experience
 
All my "work" is done in Java 5 :o
 
for a sec I forgot how old I am
whether I'm 20 or 21 lol
 
@orlp I think that happens more often when you triple that or more.
 
I forget what year it is a lot
 
Soon, "Am I 60, or 65?"
 
1:23 AM
@El'endiaStarman ok, yeah alerts I'll change. Also, Idk why that missile firing sound would be the case, I'll double check my logic.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ sorry
I should've been more specific
 
@orlp what?
I'm just making a joke :P
 
I forgot whether I was 20 or 21 centuries
 
Well that seems understandable.
 
Do you remember this battle? If so, you're more likely 21 than 20 centuries.
 
I just found a crushed card sleeve under my desk
rip
 
Plastic card sleeves are devices used to protect trading cards from damage, especially collectible card game cards from wear and tear and to store them. == Varieties == Thanks to the trading card industry, there developed a wide variety of protective devices, including the bulky "top-loader", a rigid plastic case with one open end (essentially a box for a single card) and the less-expensive simple "card sleeve," a card-sized envelope of clear plastic, with one end open. The term may also refer to 9-pocket pages designed to store trading cards in binders or card albums. == Development ==...
 
1:38 AM
?
Having sleeves is super important
 
just mirroring "rip" with a different word
 
Oh
 
Ik, I love sleeves
I got $15 bucks off of a yu-gi-oh card worth $7 because I included a sleeve >_>
 
Seriously?
A sleeve costs like 30 cents...
 
actually
It maintained it's condition, I guess
That, or my friend was a r***rd
 
1:40 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ Chat MathJax is really messing up that message <_<
 
Hey language!
 
@Downgoat haha scrubs
 
Who is language?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Language!
 
I might not be chatting, but remember, I am always watching.
 
r***rd == record?
 
._. good to know
 
@Zizouz212 R = {ε, "that", "or", "my", "friend", "was", "a", "r***rd"}
There you go
 
1:42 AM
-_-
 
Also, if anyone cares, Downgoat's Solar System Simulator™ is now on Github.
 
@Downgoat Ugh.
 
DS3?
 
@Zizouz212 ಠ_ಠ
 
Hey. Don't give me that.
 
1:42 AM
@Zizouz212 It's actually pretty nice
 
Sorry, I get really crazy when I'm tired.
And I am incredibly tired.
 
You have no excuse. I've been running almost 24 hrs on 3.5 hrs of sleep
 
Speaking of which, why am I here, I need to go back to sleep while doing homework
 
Back in my day we didn't complain until at least the 30-hour mark :P
 
@CᴏɴᴏʀO'Bʀɪᴇɴ pfft, my server has been running 15 weeks with no sleep
 
1:43 AM
(Pattern="r???rd", Sort=Alphabetical)

record, regard, retard, reward, reword, ritard
@Downgoat I want to be your server >:|
 
@CᴏɴᴏʀO'Bʀɪᴇɴ if you can run Mac OS X server, sure.
 
@Downgoat Give me enough money, and I can run (away with) it
 
@CᴏɴᴏʀO'Bʀɪᴇɴ i have 340 stacks of hay, is that enough?
 
${\tiny can you read this well?}$
 
I should get a job.
 
1:45 AM
@Downgoat Bah! How dare you insult a dragon with a petty gift as such.
 
Dragonz?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ :( hay is very valued by goats
 
But you're a downgoat
 
@Zizouz212 ಠ🐲ಠ
@Downgoat golddddddddddddddd
 
¯\(◡‿◡✿) /¯
 
1:46 AM
@Zizouz212 backslash fail
 
I find that offensive
 
:D I found a happy dragon emote: ^.=.^
 
Speaking of which, that was my first emote :)
 
:o
5 mins ago, by Zizouz212
-_-
 
That I've ever posted in my life
That doesn't count
 
1:47 AM
why not? :P
 
That was the first fancy one, or it barely meets your standard
That was the first one that met your standard?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ I think it's spelled wynaut in this case.
 
Wobbbbufffet.
 
Pfft, you're barely evolved.
 
@Zizouz212 all emoticons are equal
@Geobits ahem racist
 
1:49 AM
@Geobits \o/
I challenge you to a pokemon battle.
 
Umm. Ok, let me get my DS.
 
lol Pokemon was the only game I had when I was younger
 
I've always played PC games
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Ha.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ A PC master racist then?
 
1:51 AM
NOW I GOTTA GO DO MY HOMEWORK
@Geobits indeed?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ No.
 
o_O
9 mins ago, by Cᴏɴᴏʀ O'Bʀɪᴇɴ
You have no excuse. I've been running almost 24 hrs on 3.5 hrs of sleep
I need to sleep
 
@CᴏɴᴏʀO'Bʀɪᴇɴ you playing superhot yet it's one of the most innovative shooters I've played in years hue hue
 
No.
No homework.
 
I thought people would know the joke
Oh well
I guess the whole point is you don't know the joke unless you've played superhot
 
1:54 AM
@quartata Clearly none of us have.
 
@Zizouz212 2938-7048-4362
 
@Geobits oh shit
2
 
Oh seriously? I was just joking... I have work to finish up. And I need to find my ds too
It's 10 pm here
 
You should really just play on Pokemon Showdown or Online though
 
@quartata Eww
 
1:55 AM
@Zizouz212 Here too. If you wanna back out, be my guest ;)
 
Wait, @Geobits what version do you have?
 
@Zizouz212 Uh...?
 
Aren't those the wii games?
 
No.
 
@Zizouz212 OR, but nothing exclusive to it, so I can battle X/Y just fine.
 
1:55 AM
They're the battle simulators Smogon uses
 
@Geobits Oh. You're new school.
I'm old school.
 
i.e competitive play
 
HGSS, DPPt, BW
 
@Zizouz212 Well, I have pretty much all of them. I've moved most of my fighters to the newest generation though.
 
and Ruby and Sapphire, and Emerald - on the game boy :)
 
1:56 AM
Sure, I just played through Yellow again recently.
 
played crystal again recently
 
Yeah, XY looks cool, but I don't have the new ds. Still with a DS lite :)
 
It does have some nice additions. I'm not a huge fan of the whole mega thing, but some other things are nice.
 
Yeah, some of the megas kind of scare me
 
Megas and Fairy totally and completely changed the meta which is why I quit keeping track of competitive Pokemon
 
1:58 AM
Oh yeah. The fairy type
I've never experienced that...
 
Yea, I haven't been into competitive much. I just get bored and beat down randos at the battle spot from time to time.
 
Me neither.
Favourite pokemon. Go!
 
sohuld cheddar have map literals?
 
if you were to be sorted into a house in harry potter, which would it be?
 
1:59 AM
@Zizouz212 lucario
 
I'd almost surely be ravenclaw
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Inside joke I suppose
 
@orlp ravenclaw
 
@CᴏɴᴏʀO'Bʀɪᴇɴ How dare you!
 
1:59 AM
@Downgoat yes
 
@Zizouz212 It's not the best fighter, but I still carry my shiny Umbreon with me everywhere.
 
@Zizouz212 wat?
 

« first day (1917 days earlier)      last day (2928 days later) »