« first day (2111 days earlier)      last day (2733 days later) » 

5:13 PM
12
Q: Print a ballot!

OliverAs you all know, today is election day! Your task today is to print out a ballot, given an input. If the input is Hillary Clinton, print: Hillary Clinton ===-----===> Donald Trump === ===> ____________ === ===> However, if the input is Donald Trump, print: Hillary Clinto...

6
Q: Compute the perimeter density matrix

ZgarbIntroduction The perimeter density matrix is an infinite binary matrix M defined as follows. Consider a (1-based) index (x, y), and denote by M[x, y] the rectangular sub-matrix spanned by the corner (1, 1) and (x, y). Suppose that all values of M[x, y] except Mx, y, the value at index (x, y), ha...

7
Q: For a given period, getting the smallest list of dates, using jokers

RaphaelConsider a date formatted in YYYY-MM-DD. You can use the joker * at the end of the date string. E.g. 2016-07-2* describes all the dates from 2016-07-20 to 2016-07-29. Now, consider a period represented by a start date and an end date. The algorithm must find the smallest possible list of dates...

19
Q: Polyglot Anagrams Cop's Thread

Wheat WizardThis challenge has two threads. This is the cop's thread. The robber's thread is located here. Your challenge is to choose an OEIS sequence and write two full programs in two different languages that produces that nth item in the sequence when given an n via STDIN where n is any positive number...

7
Q: Polyglot Anagrams Robber's Thread

Wheat WizardThis is the robber's thread of this challenge The cops will choose an OEIS sequence and write two full programs in two different languages that produces that nth item in the sequence when given an n via STDIN. The two programs must be anagrams of each other, meaning each can be rearranged from ...

 
@NewMainPosts What the ****? 5 all at once!
 
Whoa. Big day I guess.
 
Lol
 
Better late than never, I guess?
 
Yeah, the first of those five was asked 12 hours ago.
I guess NMP took the day off to go vote?
 
5:18 PM
A bot going to vote? There is something fishy in all of this, the election has been hacked!
 
@arda Ah, you changed your avatar
 
yup
 
9 hours ago, by mınxomaτ
Please stop changing your avatars to down-something. Apart from being the same issue as last time of everyone trying to be unique in the same way, this is even more confusing than changing your avatar to something else. A quick glance at the avatars is an easy way to quickly identify users, which is close to impossible now as they all look the same on small hDPI screens.
 
Is Pearl your favorite character?
 
5:28 PM
@mbomb007 the "it's over isn't it" song always gives me the feelings
 
@arda Didn't do it for me. I liked the song by Steven Full Disclosure, and the song by Garnet during the boss fight.
@arda I'm curious now, have you seen Gravity Falls, or Adventure Time? They are similar and both as likable, imho
 
@mbomb007 I watched both
@KritixiLithos I'll switch back tomorrow, sorry.
both were nice
 
The world will keep on spinning. For a while at least.
 
10 messages moved to Trash
Twenty stars on this indicate that many TNB regulars do not want political discussion to take place here. Since TNB isn't about politics, that's a reasonable request.
 
Related to the talk of avatars... do people think I should change back to my previous Kirby avatar?
You can see my other Kirby avatar here
 
5:39 PM
+1 just 'cause it's C. — MD XF 2 mins ago
 
Alternatively, I could change it to one of the other "prototypes" I created.
 
Wat
Btw that's the joke guy
 
@mbomb007 I like the other mainly because it's more recognizable as Kirby at small scale, but either works.
 
@Geobits Because of the contrast?
 
That's probably it, yeah
I mean, I know this one is Kirby because I've zoomed it, but I didn't until then.
 
5:41 PM
Everyone should change their avatars to the exact same thing and keep them there. That way we won't need to worry about anyone changing their avatars and having people get confused. I nominate the PowerShell icon.
 
Does SE allow alpha channels in images?
 
Over my dead body diamond.
 
@mbomb007 Only with Gravatar/Google AFAIK
 
@mbomb007 I use gravatar for mine, which is transparent background. I don't know what the full support is for semi-transparent though.
 
Everyone could change their avatar to a different Unicode character. That way, everyone can be recognized by my bot poor eyesight.
 
5:43 PM
I will be then
 
@mbomb007 I'll do that once the proposal to add a downvote button to the unicode standard is approved >_>
 
@Geobits ▼
 
@Geobits ⍔
 
> ... to add a my downvote button...
FTFM
 
⃝▼
 
5:46 PM
_
V
 
@Geobits ` ⃝▾`!
 
Well that's a beautiful failure :P
 
wat
@mbomb007 🦆 🦆 🦆
 
afhujihuj
 
wat
(▼)
 
5:48 PM
:O
 
This is becoming spam
 
wat
^
 
Yeah, let's not continue this.
 
wat
I got 1K rep!
yay!
 
What are these lines?
 
wat
5:51 PM
 
They're supposed to mark where you've "seen to" in the convo IIRC.
 
> Adult Oriented Content
 
So if you tab away and come back, it shows where the last thing it thinks you read is.
 
@wat It's an image sharing site. It can contain offensive images.
I just shared a screenshot
@Geobits mmk. ty
 
It's sometimes more right than others though lol
 
5:57 PM
0
Q: One byte per digit vs delemited numbers like strings

Niclas MI'm currently working on a golfing language. Since numbers are a huge thing in golfing challanges (at least from what I've seen) I thought about how to save bytes when dealing with literals and I got the idea of delimiting numbers like strings and use a base 256 system (e.g. $\x01\xe2\x40$ = 1234...

 
I've got a question relating . As far as I can see the answers most questions will ask for will be: length of shortest path, a shortest path, all shortest paths. Which one would be the best?
 
Depends upon the challenge and what you're asking.
 
Hello folks, anyone experienced with multithreading here?
 
Hmm, up to now, 3 ppl have "downed" avatars. e.g. down powershell, down vote, down penguin ...
@arda ask your operating system about it
he knows about it more than anyone else
 
@Ubuntu you here mate?
 
6:04 PM
@GLASSIC Downgoat
 
Downpearl
Downmuddyfish
20 hours ago, by TuxCopter
I just hit 3K \o/
 
@GLASSIC All bandwagoners except me >_>
 
75 rep till 2k for me
 
I'm not sure how I would do a downYodle
 
@betseg I'm nearing 10K on-site, but it'll be a few weeks unless I have a great answer or something
 
6:07 PM
18326 rep to 20k for me ;_;
 
@Yodle Make the entire picture red with a big white -1
 
Well I also don't downvote that often, so it wouldn't really fit me anyway.
 
@TuxCopter No.
9 hours ago, by mınxomaτ
Please stop changing your avatars to down-something. Apart from being the same issue as last time of everyone trying to be unique in the same way, this is even more confusing than changing your avatar to something else. A quick glance at the avatars is an easy way to quickly identify users, which is close to impossible now as they all look the same on small hDPI screens.
 
POLL: how aften do you change your avatar?
 
6:08 PM
@arda I've done a little CUDA. It's awful.
 
wat
umm wat
-1
A: Build me a brick wall!

Thumb CopIn order to construct this brick wall, you will need to tear apart your firewall for bricks. After you obtain those, you will have to use the Konami Cheat Code in Mario World in order to obtain some more bricks. Buy some Elmer's glue, and you will be done.

 
@GLASSIC As often as I want
 
@mbomb007 same
 
@GLASSIC never
 
@GLASSIC I've changed it once
 
6:09 PM
@wat 'wtf ಠ_ಠ'/20
 
le sigh I was going to use Forth for the new Cops & Robbers, but it has to be a full program, and doing that in Forth is lame and really long.
User input no es bueno.
 
y u habla spaniol
 
When confronted with a problem, some folks will say "I know, I'll use asynchronous multithreading!" and then have probl they ems two.
 
@TimmyD Or helal?y
 
@TuxCopter shrug Everyone should know what it means.
 
6:13 PM
I no knows it;_;
 
<sub><sub><sub><sub>I'm the exception then</sub></sub></sub></sub>
 
No = no / not
Es = is
Bueno = good
 
@TuxCopter try{espagnol();}catch(TuxCopterCeption tcc){System.err.println(tcc);}
 
tcc is TinyCC
 
It is also the name of an exception
 
6:16 PM
@NiclasM Welcome to The Nineteenth Byte
 
It's also the name of an awful C compiler.
 
tiny cc was build from the occc entry right?
 
@NiclasM Yep
 
@TuxCopter thank you!
 
dump(trump);
 
6:17 PM
free(america);
 
delete trump;
 
19 hours ago, by Geobits
For anyone who wants to talk politics tonight, let's try to keep it out of TNB. Here, have a fresh room!
 
make # America great again
 
@Dennis Not so awful as a library for slower scripting languages. You can actually do pretty neat inline-C while TCC remains completely in-memory.
 
I don't wanna talk politics, i just want to make some terrible jokes
 
6:19 PM
Politics today are a terrible joke.
 
@flawr If they're political, they should go in that room.
 
@mınxomaτ Well, awful for what I was using it for. The executables generated by icc ran roughly 5 times faster.
 
Because tcc is not made to generate ultrafast executables
 
Anonymous
Political talk will only drive people apart.
 
(They're not political, entirely for entertainment.)
 
6:21 PM
@Dennis That's not really fair to compare. TCC is best for fast pseudo-JIT of dependency-free programs.
There's a reason a full install of Parallel Studio is > 11GB
 
Well, when I use C, it's usually because I want speed.
2
 
when i use c it's because i want to be classless or i want to write a dirty hack
 
When I use C, it's because I was lazy when choosing a key.
 
Anonymous
I use C to feel like a hacker from the 80s
 
Is there a good intro to c for people who only know e.g. C++?
 
6:22 PM
C++ has class
 
@Dennis C doesn't magically make your code faster. Optimizers do. You are using C with TCC and ICC. You are just using different optimizers ;-)
 
When I use C, I'm sad
 
When i use C, It means that I'm looking cool ;)
 
Anonymous
 
NO!
 
6:23 PM
@mınxomaτ Which is why TCC is rather incompatible for my use case.
 
Though I'd be surprised if TCC has anything more advanced than peephole opt.
 
When I use C I'm writing firmware
 
Aw, all the stars kicked the skull referendum off the starboard.
 
@Geobits That was an excellent joke that apparently no one else appreciated.
 
+--------------------+  No  +------+
| Is joke political? +------| Liar |
+----------+---------+      +---+--+
           |                    |
           | Yes                | ...
           +--------------------+
           |
+--------------------------------+
| Should go in the politics room |
+--------------------------------+
 
Anonymous
6:23 PM
@mınxomaτ Compiling to native code instead of running code through an interpreter does make it faster (usually)
 
@TuxCopter This should go to the Politics room
 
@TimmyD It's okay. I can live with that. Just this once though. In the future I expect the full adoration of the room.
 
@flawer try C IN HARD WAY Though, it used to be FREE when i used
 
@Mego thaks
 
Anonymous
@Geobits I missed it in the wave of messages. I enjoyed it. :)
 
6:24 PM
@Mego TCC is not an interpreter. Using the language C does imply nothing about speed, just the semantics
 
is c the hard way even available for free anymore?
 
@mınxomaτ I would think the implication is that if I wasn't looking for speed, I wouldn't put up with the headache that is C.
 
Anonymous
@mınxomaτ I never said it was?
 
Not that it's magically faster.
 
6:25 PM
also i dont think zed does a good job on teaching c
 
@TimmyD Oh, I get it now.
 
@Mego Then I fail to see how the interpreter remark is relevant to this.
 
python the hard way is goodish but he sucks at c
 
@GLASSIC thy!
 
Anonymous
@mınxomaτ Because I was talking about compiled languages vs interpreted languages
 
Anonymous
6:26 PM
C isn't magically faster. Compiling to native code is usually faster than using an interpreted language. C is a very common choice among compiled languages (as is C++, but a lot of people think that the STL is icky).
 
STL?
 
I prefer C++
 
Anonymous
Standard Template Library
 
why are there two definitions of "imply" that are pretty much opposite? Mathematical "imply" (explict) vs English "imply" (hints)
 
Goddammit ninja'd
 
6:27 PM
@NathanMerrill I meant the logical imply.
 
@mınxomaτ I know, it just gets confusing
 
@NathanMerrill It's implied that people can tell the two apart.
 
@mınxomaτ you should probably imply that somehow
 
"C++ IS A STUPID LANGUAGE" -Ken Thompson
 
@NathanMerrill Because mathematicians are terrible at naming things?
 
6:28 PM
Linus Torvalds also hates C++
 
@GLASSIC "languages are stupid" ~ Niclas M
 
wat
i like c++
 
Anonymous
@NathanMerrill Because the English language tries its damnedest to have as many words as possible that don't match their meanings in other settings (including elsewhere in the English language). See: inflammable and flammable.
 
i like both c and c++
 
@wat <<<
 
wat
6:28 PM
@TuxCopter ^ the point of having this username
 
Anonymous
Flammable == inflammable, but consistent != inconsistent
 
@NathanMerrill Theory vs theory
 
Anonymous
Thanks, English
 
This is why you should not use French
 
Johnny English
 
6:29 PM
@NathanMerrill there is also "in general" which is also opposite in math (consider EVERY case) vs enlish (without the edge cases)
 
Because French is the same thing with grammatical gender
 
wat
@Mego terrible == horrible but terrific != horrific
 
0
A: Sandbox for Proposed Challenges

Rudolf L. JelínekFind the highest product in a grid The following problem was inspired by Problem 8 at Project Euler. Write a program that takes a 2-dimensional block of digits and a number on a newline ("n") as it's input. Output value of the product of the n adjacent digits in the that have the greatest p...

 
@flawr That only seems true in general.
 
@TuxCopter why not german then? =P
 
6:31 PM
German messes things up a notch more
 
@flawr Because German has a sane counting system where is French is just a mess.
 
Apologies for the topic whiplash if anyone gets it, but I found this to be really interesting. The story of how we went from backing currency by gold to valuing currency based on economies.
 
@flawr you should avoid gender as much as possible to avoid triggering sb
 
@Geobits No, that holds generally.
 
@mınxomaτ try na'vi then. base8
 
6:31 PM
@flawr It implies it. Maybe.
 
Usually
 
@NiclasM Wait, do we have someone named Antimony in here?
 
@TimmyD oooh, good example
 
@El'endiaStarman how should i know? im niclas. nice to meet you
 
No but someone named Promoney
 
6:33 PM
This conversation is doubleplusungood.
 
@flawr Ah-haha I see what you did there.
@NiclasM Well, you mentioned "triggering sb", so...
 
You C what i did there?
 
@El'endiaStarman i dont get it. sorry bruh no chemistry here
 
Halfminusmediocre
 
wat
6:34 PM
@flawr I don't c
 
@NiclasM ...it is chemistry. Sb is the atomic symbol of antimony.
 
@TuxCopter Uh... ok. I know I'm not the first to jam words together like that. it's a thing.
 
@mınxomaτ I agree
@Geobits It was a comment on a WB answer
87
A: How could a language that uses a single word extremely often sustain itself?

TrEs-2bSimple, make the language Oligosynthetic. Oligosynthetic languages are languages that have 50-200 words and simply combine words to create new concepts. For example; Let's say I want to say hell, in English I would say hell. In an oligosynthetic language, I would say: Inverse-help-place or hurt-p...

 
I still don't really see the relevance.
 
wat
@flawr I seriously don't know
 
6:35 PM
You said doubleplusungood
 
It's a ref to 1984, not some random WB comment.
 
wat
ya wtf that book has existed for over 50 years (I think)
Not a random comment
 
@flawr tbh i actually seriously tuh
@El'endiaStarman ah ok. i meant im a zero in chemistry
 
@NiclasM A sentence containing the names of 2 esolangs
 
wait let me count
tbh
i
actually
seriously (ok theyre the same...)
tuh
5?
2 of them by me :3
 
6:40 PM
ಠ_ಠ
Seriously and Actually are by Mego
Or are you Mego's sock? :O
 
@NiclasM No it's i®™
 
@TuxCopter lemme have this moment D:
 
Mwahaha
 
@TuxCopter actually im not :p
 
good to know about that :3
 
@TuxCopter s/ng/ng this
 
@TuxCopter perl or vim?
 
sad
emacs here actually :D
 
6:51 PM
<ಠ_ಠ>
watwatwat
</ಠ_ಠ>
 
@Dennis Mwahaha
 
:(
18 stars. So close...
 
A valiant effort
 
whats the most ideomatic way for reading files in 6 bit chunks?
in c
 
What skull referendum?
22 hours ago, by Dennis
Bring. Back. The. Skull!
Oh, I see. +1 star, it's at 19 now. Only 6 more! :P
 
7:00 PM
I probably shouldn't have brought that back up, but...
 
anyone know the best way to determine whether a language is turing complete?
 
Best? Or easiest?
 
write a bf interpreter in it
 
Publish a paper claiming it to be turing complete and wait for the backlash.
4
 
@TimmyD easiest, sorry
@Fatalize how did i not think of that, thank you
 
7:05 PM
Yeah, easiest would be a bf interpreter.
Downbits also has a good suggestion.
 
try a c++ interpreter if youre bored
 
Depending upon where it's being published, that might be easier than a bf interpreter.
 
Huh. Just realized I got the CV privilege on Politics over the last couple days. Lots of targets to use that on today.
 
not being published anywhere, I'm just halfway through writing a lang and want to do some checks :) @TimmyD
 
I find Minsky machines to be easier than Brainfuck. and p'' is certainly easier than brainfuck
 
7:12 PM
Minsky machines only if you have arbitrary-percisions integers though.
 
if you proof a lang to be turing complete by implementing another lang
there must be another way
tell me
 
@Fatalize so If one language can have an interpreter that interprets a turing complete language, it in itelf is turing complete?
 
@tuskiomi yes
 
what if the language can interpret itself?
 
depends if it's turing complete
 
7:17 PM
@tuskiomi Well yes because any problem that your Turing complete language can solve can also be solved by your new language by interpreting the first language
 
if its turing complete youve profen that its turing complete
if its not youve done nothing
@tuskiomi meant this one
 
@tuskiomi Trivially, an empty program could be a language that interprets itself, while being capable of nothing else.
 
Put "trivially" in front of anything and you instantly sound smarter.
 
Life... Hacked!
Stupid autocorrect
 
That was trivially posted by Geobits.
 
7:19 PM
I thought "Life... Jacked!" sounded pretty cool
 
You're right!
 
@Geobits even more trivially, you could have a language which has no source, and only simulates a turing machine with I/O, and any language could interpret any input as 'the source that simulates a turing machine', and that could be an interpreter, no?
 
I guess Mego needs a Trivially language now.
 
if i do a language
that takes a language and code for it
is it partially turing complete?
or completely since it can do turing stuff?
 
If you can implement all the things a TC language can, then you must be TC, right?
 
7:22 PM
Your language and compiler plus that language and its compiler would be turing complete.
 
ok
probably easiest tc lang ever
 
Technically speaking, implementing a bf interpreter would be proving Turing equivalence which, while as far as we know, is the same as Turing complete, we're not quite there yet. Go prove (or disprove!) the Church-Turing Thesis and win your Nobel prize and/or your Fields Medal.
 
Oh is that all I need to do for that? Gimme a couple hours...
 
have fun
 
@TimmyD everything must end eventually. nothing is Turing complete. Insufficient data for meaningful answer.
 
7:25 PM
The Church-Turing Thesis isn't really a "prove" thing
 
0
A: Sandbox for Proposed Challenges

Rudolf L. JelínekLet's make America great again! Write a program that: Takes a string as an input If the string does not contain (case-sensitive) "make America great again", print out the teeny weeny USA below. If the string contains "make America great again", where the number of "great"'s + 1 is the magnifi...

 
Church-Turing sounds like an interesting trip, if you like architecture.
2
 
It's more something we assume about computable things
 
`main(a,b)char**b{system(strcat(b[1], b[2]));}`
expects a space at either beginning of source or end of other langs interpreter and that the shell (whatever its going to be) is capable of "program param" and that its enough for the interpreter to have the script as only parameter
 
@Geobits Face, meet palm.
 
7:26 PM
to be honest, I'm surprised how simple brainfuck is, and it's crazy that such a simple thing is turing complete
 
@NewSandboxedPosts stop pls
@NewSandboxedPosts stop pls
 
I hope people are downvoting that sandbox post because of the actual challenge content and not because of the election
 
Why? It deserves downvotes for injecting unnecessary political content as well.
 
I disagree, but you can downvote however you like
 
@quartata Well, sure.
 
7:31 PM
the "I voted" challenge was good because it supported democracy, and your write to vote which I think all voters can support. this one... it's really unnecessary
and, the actual challenge content isn't great either
*right to vote
 
Ugh suddenly it's like I've walked into a Faraday cage
Sorry for the double post
 
the exact opposite of an echo chamber?
 
I figured that would be an anechoic chamber.
 
@Flp.Tkc Is unnecessary back story bad? I had no idea.
 
The entire content of the challenge is political and in a partisan way. And it offers nothing else other than that
 
7:42 PM
I usually try to add a bit of backstory to mine. However, I'm not silly enough to make it so controversial. I happen to like upvotes.
 
Let's not encourage any politics on main
 
wuttt
 
@quartata And my original point stands. I hope that the downvotes are because "the challenge offers nothing else" and not because "it quotes Trump".
 
The I voted thing was fine
 
@Geobits Who are you and what have you done to Geobits?
 
7:43 PM
@Dennis I like getting upvotes. I like giving out both ;)
 
@Rainbolt I'm sure it's both, to be honest.
 
@NewSandboxedPosts Wow, most downvoted non-deleted post in the Sandbox.
 
So if I quote someone then it makes whatever I'm saying about that person? That's a load of crap
 
Quoting someone's campaign slogan directly after an election in a challenge centered around the quote absolutely does
 
But would you let your own political views stop a great challenge from making it to main, if the author refused to remove the quote?
 
7:45 PM
codegolf is not for americans only
who cares about the election here
i can want america to be great without having anything to do with trump
lulz
 
@Rainbolt almost certainly. and If not me, then someone else will.
 
If you refuse to act on feedback, why are you posting in the Sandobx?
 
well this is petty to argue but i think that's ridiculous
 
I just discovered something.
$ declare -u my_reaction
$ my_reaction=wat
$ echo $my_reaction
WAT
Bash is weird.
 
because of the caps?
 
7:48 PM
Does the -u make it uppercase?
 
Yup. You can assign whatever you want to the variable, and it will get converted to uppercase.
 
@Rainbolt I wouldn't stop it because of my political views. If it was a "I'm with Hillary" challenge I'd still stop it because it doesn't belong here
 
@Dennis numbers?
 
^^
 
This isn't a politics website, so a challenge whose only value comes from politics doesn't belong
Case closed.
 
7:49 PM
@WheatWizard good hunch. :P
 
-u When the variable is assigned a value, all lower-case
characters are converted to upper-case. The lower-case
attribute is disabled.
 
At least with the I voted one that was bipartisan and we don't have any challenges about colored output really so it offered something
 
Man, cops and robbers are fun!
 
@tuskiomi uppercase("3") is "3" in pretty much every language.
 
@Dennis #
 
7:51 PM
Eeek! Shift Lock!
 
@TimmyD hehe
 
there are languages where that's not the case (assuming the language has the uppercase() function or equivalent)?
 
lamba x:chr(org(x)-32)
if you forget to check if its a lowercase char / just check if its already uppercase / dont check at all
>>> (lambda x:chr(ord(x)-32))("3")
'\x13'
 
@DrMcMoylex You might not want to answer this, how does take input in Vim for code challenges? Is it just text that is already in the file?
 
Yeah, it's whatever is in the current buffer.
We had a meta post on it
 

« first day (2111 days earlier)      last day (2733 days later) »