« first day (2118 days earlier)      last day (2711 days later) » 

9:05 PM
-_- if I try and shave off two bytes from my code, I get an integer output when valid, null otherwise. The problem is that sometimes, that integer is 0.
and 0 is falsy
 
@EᴀsᴛᴇʀʟʏIʀᴋ Anyway, vosotros usually is not explicitly visible. It just affects the conjugation of the verb. Like, we'll say ¿qué decís? instead of ¿qué dicen?. But no pronoun unless emphasis is needed. But you probably know that already :-)
 
@LuisMendo The United Mexican States (Estados Unidos Mexicanos) is abbreviated to just "Mexico" ...
 
@GabrielBenamy If you're talking about the Giza one, I thought it was just positive numbers.
 
@TimmyD That's a good point, yes. But if Mexico happened to be the name of the whole continent it could cause confusion, as happens with "America"
 
@LuisMendo hm, thanks for the tips
but yeah, it mainly seems to make a difference in the portrayed slight on somebody
i.e. calling a group of friends vosotros might be a tad rude
 
9:09 PM
@EᴀsᴛᴇʀʟʏIʀᴋ Good to know that happens in Mexico too
 
lol
thanks for the help!
 
I guess it's quite general in Spanish-speaking America
Anytime!
 
@LuisMendo This is true
 
@Yodle If I modify my code, for an input of 123454321, it will output the number 0
but for an input of 12345432, it will not output anything
 
@TimmyD But I agree that using the strictly correct name is tiresome, it's so long
It's probably abbreviate it to America too
 
9:10 PM
@LuisMendo better idea: America contains [Canada, 'Murica, and Mexico]
then it errors with unclosed string, but hey, less confusion
 
'Murica
 
Mar 2 at 21:01, by ETHproductions
@TimmyD Surely you mean Murica'
 
@EᴀsᴛᴇʀʟʏIʀᴋ Hehehe
 
@ETHproductions Why would I put the apostrophe where I didn't remove a letter? That's just weird.
 
That's the point
 
9:12 PM
@GabrielBenamy Ah gotcha, that's interesting. Are you allowed to have falsy be null/nothing and truthy be anything else including 0?
 
Hah-ha! 108! Woo!
 
This doesn't change the discussion much, but just for trivia: In the US, it's customary to refer to North America (Canada -> Panama) and South America as two distinct continents, rather than calling the whole thing one continent.
It's more geologically accurate, at least.
 
You don't use central america?
 
.. Ye-e-es, but that's not a continent per se. I think. It's a bit muddled.
 
In my household, we refer to the area between Mexico and Columbia as Central America, causing occasional debates as to whether it's its own continent or part of one of the others.
 
9:16 PM
(TBH it's possible that my own usage is based on geology rather than common usage.)
 
@Yodle No clue, but Perl treats 0 as falsy, so I don't think it'll work.
 
@ETHproductions So Mexico is not part of Central America for you?
 
Central America, at least from my familiarity, extends from like Guatamala/Belize to Panama.
Mexico is not Central America.
 
@DLosc Nope. Is it usually considered part of Central America?
 
Interesting.
 
9:17 PM
The part with everything south of the US is called "Latin America."
 
tfw perl has no smartmatch negation
 
@feersum Yeah, maybe my brain is hashing those two terms to the same index.
Toponyms are inconsistent. ^_^
 
wat
@GabrielBenamy read that as smartwatch negation
 
Also not to be confused with Mesoamerica (which is just "central America" using a Greek prefix, but refers to a different area). >_<
 
That's like Central America for archaeologists, right?
 
9:22 PM
@DLosc Which is very different than Mesopotamia
 
So where does Potamia as a whole span?
 
@feersum The channels of the Tigris and Euphrates rivers, I reckon.
 
wat
how do you use javascript?
 
tfw your solution is so insanely golfed that you feel like there's three more bytes to take off, but you can only find one
 
wat
Never programmed in it
Now trying to write a webapp
 
9:25 PM
@wat tfw Perl can't destroy your exercise regulation device
 
wat
@GabrielBenamy XD
 
@wat Other people can probably give you much more advice, but I'd start by saying that JSFiddle is your friend. Lets you experiment with stuff easily.
 
wat
I don't really need any of that, I hav apsecific problem I need to solve
 
My life goal is not to learn JS
3
I'm making good progress so far!
 
> progress
 
9:28 PM
Every second I don't learn JS, death ticks nearer. Yay!
 
@wat So you're saying you don't need help with the language, but you want to find packages that will help with a particular task?
 
wat
@DLosc No, I need help doing this speccific task with the language
 
@feersum So if you died tomorrow, you'd be happy because you completed one of your life goals?
 
wat
I have an array of strings that I want to autocomplete on.
 
@ETHproductions Can dead people be happy?
 
wat
9:29 PM
@ETHproductions
 
@feersum Not dead, per se, but dying maybe
 
Might be un-fun in other ways, I suppose.
 
@ETHproductions "I have a horrible fatal disease, but at least I never learned JavaScript!"
2
 
Is it poor form to edit the byte count of an old answer?
 
9:33 PM
$(".your-ugly-post").hide()
 
Here, I'll help you unlearn JS: In the expression ~-x, ~ means the imaginary quantity, so you're really saying -x + i
 
wat
@DLosc not necessary
 
Inspect Element -> Deleted
 
Of course, the roles are reversed in -~x
 
Wait, -~x? That's just C.
Not learning anything.
 
wat
9:34 PM
what was @LeakyNun's old username?
 
Unexpected token '~' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingExpressionAfterOperator
 
@ETHproductions Ooh, I finally know what to use ~ for in Pip!
 
@wat KennyLau
 
wat
ok
 
(nah, probably not)
 
9:35 PM
Also, when you add an array with a number, you get a string
 
wat
@ETHproductions ?
 
@wat He changed because there was also a KevinLau that joined around the same time ... Kevin also wound up changing name, but I don't recall to what.
 
Leaky nun
Wait, I'm backwards
 
@TimmyD no, that was a different kenny
yeah, kevin
 
"Kevin not Kenny"
 
9:37 PM
but he and leaky are different
 
Right
Yes
 
@wat That is a real JS fact: try [] + 1 in any JS console and you'll get "1"
 
@TimmyD Value Ink, right?
 
Yeah! Value ink
 
wat
@ETHproductions Umm.
 
9:37 PM
@ETHproductions wat
 
@DLosc Yes, that's right.
 
wat
@DLosc is
 
@TimmyD he didn't change because of the name mix up, that leaky was the anagram
 
@wat dis
 
Just to clarify, I can't use 0 as falsey and 1 as truthy in C# because if (1) doesn't work right?
 
wat
9:38 PM
@DLosc thing
 
kenny lau | kevin lau
kenny lau | kevin not kenny
leaky nun | kevin not kenny
leaky nun | value ink
 
@EᴀsᴛᴇʀʟʏIʀᴋ Yes. It coincidentally lined up when everyone was doing anagrams.
 
@Geobits I've got a java answer with recursion that golfs the answer down by a byte.
 
Anagrams are not kind to me. I've got clods, colds, or scold ;_;
 
I only have 1-1/2 vowels
So they're not kind to me, either
 
9:41 PM
Random joke I just heard:
> Did you hear about the kid who left our school for <rival school>? He raised the average IQ at both schools.
 
Like, My Dim T or Dim My T is about it.
 
@TimmyD Dmitmy
 
wat
@DLosc huh?
@DLosc you were talking to me?
 
... No, that was a response to TimmyD.
 
Nice
 
wat
9:44 PM
@DLosc ...my name is Dmitry
 
@Fatalize where i live, central america is anything that isn't canada, 'murica, mexico, or below panama
 
@wat Ah. We were discussing anagrams, and "Dmitmy" is an anagram for "TimmyD".
 
wat
@TimmyD Yes i saw
 
Huh, is already one of my favorite tags. What algorithm do they use to determine favorite tags?
 
wat
@ETHproductions You select them
 
9:46 PM
@TimmyD I have 2, and still nothing good :/
in my original name
riker = re irk and re isn't even a word
 
wat
@EᴀsᴛᴇʀʟʏIʀᴋ What was your original name?
 
my name IRL is Riker
 
Oh, I did select it. Duh :P
 
wat
fml i watch too much tng
 
:33551659 no, it's my name irl >_< it predates TNG
@wat no, it's the same exact name
and my last initial is W, so that doesn't help
 
9:47 PM
@EᴀsᴛᴇʀʟʏIʀᴋ ki err ... When your chi gets messed up and you need a mind/body reset.
 
I often use EasterlyIrk on wobsites mostly out of habit now, other I use Riker or RikerW
@TimmyD lol
 
wat
@EᴀsᴛᴇʀʟʏIʀᴋ i know, i was making a joke. there's nothing wrong with the name
@EᴀsᴛᴇʀʟʏIʀᴋ ...and it isn't taken?
 
yeah, people just don't understand sometimes I'm not named after that
@wat nope
 
wat
wat.
 
9:49 PM
no pls
 
(pertinent to the earlier JS discussion)
 
wait ok
i thought you were posting VTC's gif
 
CMC: What feature is most wat-worthy in [language of your choice]?
 
@Zacharee1 oh and the tweak can be about any website, not just google
 
the old FOG's (my lang) ability to have recursive loops, and that's all the loops
and the lego wedo for loop clusterfuck
 
9:52 PM
I already mentioned JS's
 
@DLosc Anything that matches the regex .* in JS.
 
$ perl -pe '$_=-$_' <<< '_-'
-_-
3
 
@DLosc input() in Python 2
Fixed in python 3
 
@DLosc PowerShell uses UTF-16 internally for everything, even if you explicitly cast and encode as UTF-8.
 
@DLosc Weird/stupid or interesting/novel?
 
9:54 PM
@Dennis output fits the situation
 
@Dennis I will never understand why people find this unusual. Sure it's quirky but it makes sense
 
Does C++ have format strings?
 
@quartata Negating a string by prepending a minus sign makes sense how exactly?
 
Yes of course
 
@noɥʇʎPʎzɐɹC Weird/stupid, as in "Not the result any sane person would expect" or "Why would anyone design a language like that?"
 
9:55 PM
@DLosc PowerShell doesn't have a ** operator.
 
@Dennis negating being reversing?
 
@DLosc Mutable keyword arguments in Python.
 
> [11, 100].sort()
< [100, 11]
(JavaScript)
 
@DLosc Emoji variable names in swift.
 
@Dennis Negating a number that is currently being stored as a string, yes. It's just lazy and doesn't verify that it is a proper numeral until later
 
9:56 PM
@Dennis duped
 
@DLosc Also,
Oct 31 at 19:10, by TimmyD
@TuxCopter @(1|%{}|?{})[@()] is valid PowerShell.
 
Dynamically typed ≠ loosely typed
rm -rf /* is valid Bash.
 
> [2] + [1]
< "21"
> ["2"] - ["1"]
< 1
 
This is one of my favorites in C:
7
A: Trick or Treat polyglot

DennisObjective-C / C, 50 bytes puts(){printf("trick");}main(){printf("treat\n");} Objective-C got candy and prints treat, but C didn't and prints trick. How it works I don't know a lot about Objective-C, but it does what we'd reasonably expect in this situation. The re-definition of puts doesn'...

 
I'm not surprised Objective C does not do that optimization
 
10:00 PM
@Dennis That's really funky.
 
Anyone want to do polyglot trio golfing? On a challenge? [that's posted?]
> Today’s Microsoft is one of the biggest open source contributors around.
wtf no. You're the #1 cause of open source efforts like Wine and KVM. (that could be put to other things)
 
A QBasic one that I only found out about via a recent CnR crack: PRINT x(x(x)) outputs 0 if x has not been defined.
 
Do you know who does more? The Linux foundation.
Google's android is 100% open source. And so is Chrome.
 
Undefined variables are usually treated as 0 (unless they're string variables), but apparently (my best guess), they can also be treated as functions that return 0? I don't think it can be treating it as an array, since arrays are 1-indexed.
 
@noɥʇʎPʎzɐɹC One of the biggest != the biggest.
 
10:05 PM
> [] == false
< true
> !![]
< true
(JS again)
 
@Dennis What the fuck is happening? (Except JS)???
 
@flawr JS sorts by lexographical order
 
@ETHproductions But aren't these numbers, e.g. ints?
 
@Dennis Nowhere close
 
@flawr Yes. JS doesn't care
 
10:06 PM
@noɥʇʎPʎzɐɹC GitHub thinks they're the biggest -- networkworld.com/article/3120774/open-source-tools/…
 
@ETHproductions Well fuck JS.
What the heck are they thinking???
 
> Fully 16,419 contributors affiliated with Microsoft worked on open-source GitHub projects during the past 12 months
That's developers sending pull requests personally to repos.
They have the most because they have the most employees.
 
tfw u can save 2 bytes by taking advantage of trailing newlines in STDIN
 
Apparently md4 exists.
 
10:10 PM
Hm! The version of QBasic runnable at archive.org gives 0 for x(x) if x is set to any integer value between 0 and 10 inclusive. Other integers give "Subscript out of range." So maybe it is something to do with arrays. 0_o
 
The Microsoft you know from the 90s is not the Microsoft of today.
 
@TimmyD Huh.
DYK there's an md4 hash?
 
Gotta run. Seeya, folks!
 
In what other languages can you say "Oh, you need to convert to string? Just add an array to it."?
 
what's a "string"
 
10:16 PM
@GabrielBenamy ...is that sarcasm?
 
i have five datatypes - scalar, array, hash, code, and reference
six if you count glob
 
@GabrielBenamy I have two - a on bit and an off bit.
 
@noɥʇʎPʎzɐɹC it's a joke about Perl literally not caring at all
 
@GabrielBenamy got it after the second message
 
@TimmyD See you"
 
10:17 PM
@ETHproductions Nope, doesn't work in Pip: [] + 1 == []
(Not that "convert to string" has any meaning for numbers, since they are scalars like in Perl.)
 
Also in JS, {} + [] is 0
 
So wait, adding [] doesn't convert to string? /s
 
(although ({} + []) is "[object Object]")
It'd be really nice if there was a shorter way to convert a generic Object to a meaningful string than JSON.stringify()
 
But for consistency reasons {}+"" is 0 too.
 
@ETHproductions Wooow. That's more messed-up than I thought.
I can't think of another language where parenthesizing an expression completely changes the result.
 
10:22 PM
Hint: {} is an empty block unless it's part of an expression, so {} + [] is really { }; +[]
 
LOL
 
JS is stupid
 
'night
 
SyntaxError: unterminated string literal
 
I was curious what the first PPCG post was, and I found this gem
 
10:24 PM
Nvm
 
@DLosc python, just realized the ternary needs an else
 
10:37 PM
I think I will post this soon
4
A: Sandbox for Proposed Challenges

Luis MendoOn this site we obey the laws of thermodynamics! code-challenge sequence string And in particular the second law: the entropy of an isolated system increases over time. For this challenge, An "isolated system" will be taken to be consider a program or function (abbreviated as "program" from ...

 
10:51 PM
@DLosc Not really my choice of language, but Hot Soup Processor's probably the buggiest "real" language I've seen
Strings-not-needing-an-end-quote doesn't happen often
 
11:20 PM
@LuisMendo Do it!
Is that code golf? @LuisMendo
 
@noɥʇʎPʎzɐɹC Perhaps you should look at it to find out :P
 
@ETHproductions I did, and found out.
 
you can even read it from the onebox sorta
> On this site we obey the laws of thermodynamics! code-challenge sequence string
 
@EᴀsᴛᴇʀʟʏIʀᴋ It is code golf. Just scored with another factor.
randomness/length of initial
 
That makes it not code golf, though it is similar.
 
11:38 PM
^
Anybody here done mathcounts?
the competition
I've been asked to be on a team, but haven't done any competitions before.
 
Alternative scoring mechanisms fall under
> A code challenge is a competition for creative ways to solve a programming puzzle with an objective winning criterion not covered by other scoring tags (e.g. code-golf).
 
@EᴀsᴛᴇʀʟʏIʀᴋ i have
 
11:53 PM
hi guys
:)
 
hi oliver
 

« first day (2118 days earlier)      last day (2711 days later) »