« first day (2135 days earlier)      last day (2701 days later) » 

cmc: write a program that terminates with a "catastrophic failure" error
 
What is a "catastrophic failure" error?
 
-1
Q: Shortest code to throw SIGXFSZ

PavelWe have challanges for throwing SIGILL and SIGSEGV, time to write the shortest code to return SIGXFSZ.

1
Q: Piet (Mondrian)'s Puzzle

Qwerp-DerpFor more information, watch this video. The Mondrian Puzzle (for an integer n) is the following: Fit non-congruent rectangles into a n*n square grid. What is the smallest difference possible between the largest and the smallest rectangle? For 6, the optimal difference for M(6) is 5, and can be...

 
"Catastrophic failure (Exception from HRESULT : 0x8000FFFF (E_UNEXPECTED))"
a native error output by the interpreter including the words "catastrophic failure".
 
class CatastrophicFailure(Exception): pass
raise CatastrophicFailure("Uh oh.")
 
4:31 AM
@GabrielBenamy javaScript: CatastrophicFailure
Error is: ReferenceError: Can't find variable: CatastrophicFailure
 
I said native error
 
.__.
peramlink are weird
lemme redo unicode
 
All of it, please. In case it helps: Before permalinking, the input was showing the goat, the output a = sign. After permalinking, the input is gibberish, but the output is correct.
 
@NewMainPosts out of all the signals that it's interesting to try and throw, I wouldn't think that SIGXFSZ would be one of them
 
4:35 AM
why can't JS just use UTF-8 by default like rest of world :(
 
maybe I'm wrong though
I thought SIGILL would be fairly uninteresting and I was wrong about that (the Swift answer was interesting, at least)
 
OK SE's Clojure highlighting is borked
 
SE's highlighting of most languages is borked
nowadays when I write a solution in Perl, I consider it something of a mark of shame if SE's highlighting of it is anywhere near correct (and then, when it comes to the explanation/ungolfed version, use carefully worded comments to ensure that mishighlightings don't persist from one line to the next)
 
True, apparently Perl's highlighting is borked
Ninja'd
 
0
A: Sandbox for Proposed Challenges

nephi12Convert String to Integer without built-in functions. The challenge is to take a string input, such as "1234" and convert it to a number, 1234. This must be done without type-casting, int() calls, or anything of the such. I'm not really sure what the best way to specify that i want something l...

 
4:38 AM
Aren't the comments in Perl's highlighting borked?
 
to be fair, syntax highlighting Perl is formally undecidable, but most of the programs I write aren't nearly that hard to highlight
 
@Dennis TIO response is UTF8 right?
 
I hope so.
 
(Perl allows you to write arbitrary parser hooks in Perl; they modify the parser as soon as they're seen, and the subsequent code is parsed with the new parser)
 
@Dennis .______. :|
@Dennis no it is not
 
4:43 AM
I'm pretty sure it is.
 
i removed UTF-decoding and it worked
 
Speaking of unhighlightable, are there any golfing languages which use abstract symbols that are arithmetically encoded into character sets? Or has someone even had the idea (not that I've actually tinkered with golfing languages, but was curious)
 
that is unless XMLHTTPRequest performs the decoding itself
 
@HWalters I've had an idea fairly simple for that for a golfing language I'm working on
the programs are floating point numbers, given to a certain accuracy; the accuracy corresponds to the length of the program, the value to the content
this means that a program can contain a fractional number of bits
(there will also be a method to represent them as bits and/or as bytes, rounding up, for people who don't believe that an approximate number is valid as a program)
 
That sounds like a meta post in planning in itself
(Do you get to score to the fractional bit or must you round up to the nearest bit?)
 
4:48 AM
@Downgoat on my computer when first load permalink, cursor is weird like superscript
 
can you do a screenshot?
 
as soon as I start typing anything, it fixes
 
waaaat
this is not my fault though luckily
 
btw everything else looks awesome
 
@Maltysen okay, can you try now?
@Maltysen :D
 
4:52 AM
nope
 
:( hmmm
 
btw none of the language links work?
 
okay, can you try doing to vihan.org/p/tio and see if you can see a cursor on empty line?
@Maltysen language links? Can you see error if in console?
 
@Downgoat same issue it starts out small, I start typing it gets bigger
 
@Maltysen every letter gets bigger and bigger?
 
4:53 AM
no
first one fixes it
 
ok
will debug
 
style.js:107 Uncaught URIError: URI malformed
 
DAMMIT
 
that's when it loads
 
@Maltysen can you try clear caches and reload?
 
4:54 AM
not the links, those don't error
 
ok i think i fix
I assume by language links you mean the language list on the left
 
@Downgoat XMLHTTPRequest does whatever the web server tells it to and returns a string using the specified encoding.
 
yay fixed
 
Does whatever a web server tells it to?
That sounds unsafe.
 
5:18 AM
Most unsafe web thing I've done was that KOTH server.
Running arbitrary code with literally no sandboxing.
 
@feersum I meant regarding the encoding. XMLRequest returns decoded text, not a bytestring or a bytearray.
In TIO's case, it also gunzips the response.
 
Oh, by the way @Mego I saw your starred comment yesterday, and apologize for my "homework" question :)
 
Anonymous
5:34 AM
@HWalters If memory serves, it wasn't your question that prompted that comment :P
 
Anonymous
The question that prompted it has been launched into the sun
 
It wasn't but I was amused by the comment
Actually, my impression was that it was a homework problem trying to pose as a challenge... mine is a challenge using fictitious homework as a gimick
 
Anonymous
Oh you posted the Martian homework challenge
 
Anonymous
I thought you posted the other homeworky challenge I was complaining about
 
Anonymous
Yeah I liked that one :)
 
5:49 AM
@Downgoat ctrl-enter still doesn't work
you can detect a key down with the correct keycode and modifier of ctrl
 
@HWalters most of the resulting Martian doesn't seem very intelligible, and even if not technically repetitive, it does seem to become quite familiar after a bit…
 
0
A: Sandbox for Proposed Challenges

ais523Add a language to a polyglot This is a challenge in which each answer builds on the previous answer. I recommend sorting the thread by "oldest" in order to be sure about the order in which the posts are made. The nth program to be submitted must run in n different languages; specifically, all t...

 
@ais523 Good thing it's not an "Ultra-Martian" challenge then
(FYI, once Flourney's book was published, Catherine was to say the least not impressed; some time later apparently there was another language she channeled called "Ultra-Martian" which was more pictographic than phonetic)
Or maybe I'm shuffling the history a bit in my head
Yeah, Ultramartian apparently is already in the book
 
6:38 AM
I had an idea for a challenge
 
@DestructibleWatermelon tell us
 
6:57 AM
Take input n, convert n to words, convert to 1337 5P33K, remove non numeric chars, print
Or return
Whatever
 
Wow
 
EXample: 1 -> one-> 0n3 -> 03 -> 3
Or maybe 03 is fine. Idk
@betseg ?
 
How many digits can n have
 
Idk.
Some reasonable limit
 
7:44 AM
0
Q: Make a regex polyglot

jimmy23013Write a regex that works in at least 2 regex flavors (or versions), and match a different string in each flavor (or version) it is running in. The strings to be matched in this challenge are the first words of the Ubuntu code names, which are listed below. Your regex has to match from the top of...

 
Anonymous
7:55 AM
Hmm... Does anyone know of an engine for Kleene's original ("formal") regex?
 
Anonymous
(where only |, (, ), and * are metacharacters)
 
Anonymous
I'm sure there are dozens of implementations, but Google is being unhelpful
 
Why can't you use a more complicated regex engine and simply ignore the extra features?
 
Anonymous
@feersum Because I'm looking to answer codegolf.stackexchange.com/questions/102018/…
 
Anonymous
I have an idea of how to construct a polyglot using Kleene regex along with modern regex, but I'd need an existing Kleene regex implementation
 
8:16 AM
I have a Python/Clojure polyglot:
#_(
print"turkey"
"""")(print "corn");"""
Halp pls to reduce bytesize
 
I'm pretty sure you need another polyglot for that challenge (at least 3)
 
Feq
I can shove BF in there
Also I'm thinking of including JS
 
JS and Python? I don't see how that is going to work out
 
8:48 AM
EU suspended negotiations with Turkey
Manjaro's European devs removed Turkish devs from lists and stuff
Wtf
 
9:08 AM
1;1//2;'''
1;alert("Javascript")/*
(print "Clojure");'''
#_
print "Python";#*/
@KritixiLithos Like so?
 
Quick question: Labo's Manhattan distance problem asked for an output in "base 10". My answer returns a float, he says "oh sorry my spec wasn't clear" and edits in "integer in base 10". Is that improper procedure for Labo because he edited the spec so late, or should I have asked about floats earlier?
Because from what I know about specification editing, that seems fishy. However, my answer is only the third answer and the only answer that currently returns floats. Should I change my answer since I'm the only one affected by the edit?
 
I think your answer should be accepted and any later answers must be integers.
 
Anonymous
9:27 AM
The OP should have considered float outputs before posting. However, people make mistakes, and that's a relatively minor change, so it's probably best to not make a fuss and just go along with the edit. A gentle suggestion to use the Sandbox before posting on main is probably a good idea.
 
Anonymous
In fact, I'll go ahead and make the suggestion
 
@Sp3000 This is the first time I'm seeing a Python/JS polyglot. Wow!
 
I think // is the most common Python/JS trick I've seen, at least on this site
 
What does the double slash do in Python?
 
Anonymous
9:34 AM
@Sp3000 It's also a fairly common Python/C(++) trick (along with #)
 
@KritixiLithos Integer division
 
Anonymous
Oh right I'm supposed to be adding tags to challenges...
 
0
A: Sandbox for Proposed Challenges

MegoPrint Polyglot Pieces Typically, polyglots are constructed in such a manner that each language can ignore parts of the code that are present for other languages, by wrapping them in string literals, using comment syntax, or other similar tricks. Your goal is to write a polyglot where the output...

 
9:58 AM
@Mego Thanks dude. Edited my answer
 
10:10 AM
hi
 
Does anyone know how do I make my Google search bar look like that? It only looks like that when I log out of Google and not when I'm logged in
 
looks like that whether i'm logged in or not
 
I also updated my chrome
Two people I know have theirs look like that whether they are logged in or not, but other people have it like me
WHY?
 
10:17 AM
becauseeee, google?
 
Which SE site would be a good place to ask?
 
Do the people you know know?
 
Know what?
Oh, they don't know
And they don't care
 
Would 3-player tic-tac-toe be possible?
 
3d tic tac toe for 3 players?
 
10:20 AM
nah
i was thinking 4*4 board
 
Would Web Applications be a good site to post this question?
 
Would a 4*4 board (where you have to match 3 in a row) work for 3 players?
Can I try it out here?
@KritixiLithos Wait what's the problem
 
How do I make my Google Search Bar look like that: chat.stackexchange.com/transcript/message/33885599#33885599 ?
 
@Sp3000 Whoa it works it's neato burrito
 
Hm?
 
10:31 AM
@Sp3000 Wait you can just have a 1 without raising any errors in Clojure?
 
shrugs apparently? I just tried whatever in Clojure
 
Huh TIL
 
Have fun with the golfing though, didn't try very hard on that part of it :P
 
10:50 AM
@Sp3000 Is it possible to include a #include for C++ in there?
 
No idea, feel free to try
 
The thing is, it would immediately error in JS and Clojure
Crap JS and C++ share the same comments
 
11:29 AM
Ah crap it's erroring everywhere now
'''';//\
1;/*
#_(
#include <iostream>
)/**/1;/*'''
1;1//2;'''#*///\
1;alert("Javascript")/*
;int main(){std::cout << "C++";}/*
(print "Clojure");'''
#_
print"Python";#*/
 
JS says unexpected string
 
it just looks like that
 
Uhm, what's the problem?
 
Problem: when I log into google, the searchbar does not look like:chat.stackexchange.com/transcript/message/33885599#33885599
 
You mean material?
 
11:43 AM
I like material
Material is life
 
That's not rolled out to all browser configs.
 
But why doesn't it work on Chrome?
 
It might depend on everything from your region, OS, browser version, and cache.
Try canary and see if you get the new design.
 
It is material when I log out
 
So cache I guess. Or did you set a custom Google design?
 
11:47 AM
No custom Google designs
Clearing ALL cache via JS console doesn't help
Help me
 
You can't always get what you want...
 
12:10 PM
Yus I have a 4 lang polyglot with Ruby
1;''''#/*
#_(
puts("Ruby")
__END__
);'''
1;1//2;'''
1;*/alert("Javascript")/*
(print "Clojure");'''
#_
print "Python";#*/
 
wat
 
12:33 PM
add bf somewhere
 
1;''''#/*
#_(<insert BF code here>
puts("Ruby")
__END__
);'''
1;1//2;'''
1;*/alert("Javascript")/*
(print "Clojure");'''
#_
print "Python";#*/
Very easy to extend to BF
1;''''#/*
#_(++++[++++>---<]>-.---[----->+<]>-.+++[->+++<]>++.++++++++.+++++.--------.-[--->+<]>--.+[->+++<]>+.++++++++.
puts("Ruby")
__END__
);'''
1;1//2;'''
1;*/alert("Javascript")/*
(print "Clojure");'''
#_
print "Python";#*/
Polyglot + BF
 
Does anyone know why Foo is giving an error?
 
Stack is empty.
Stack is empty.
<snip>
Stack is empty.
Stack is empty.
Maximum number of nested loops reached.
Command exited with non-zero status 255
	Command being timed: "/srv/wrappers/foo"
	User time (seconds): 0.00
	System time (seconds): 0.00
	Percent of CPU this job got: 100%
	Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.00
	Average shared text size (kbytes): 0
	Average unshared data size (kbytes): 0
	Average stack size (kbytes): 0
	Average total size (kbytes): 0
	Maximum resident set size (kbytes): 3040
I guess it's obvious
 
But where in the code is it giving an error?
 
idk
 
12:47 PM
I know it is a Stack is empty error, but where did things go wrong?
 
> Maximum number of nested loops reached.
Probably that, I'm guessing (stack empty is usually fine)
 
Wait, I can make it work
But there will still be errors (but that's allowed as per the challenge specs)
 
0
A: Sandbox for Proposed Challenges

Jarko DubbeldamConvert an index to a sample We are putting balls into a fixed number a bins. These bins begin empty. Empty bin (a=4): 0 0 0 0 And one by one we add balls to the bins. 0 0 0 1 or 0 0 1 0 or 0 1 0 0 or 1 0 0 0 We need a quick way to loop over all the possible states the bins take, wit...

 
1:17 PM
Hi?
 
Bhi?
 
I've been doing some more stuff with 19-equal-temperament music, particulary about how to convert 12edo music to 19edo.
It's actually relatively easy when the music stays in a single key. For example, assuming we're in the key of C major, I've identified which chords you can/can't use to be able to translate the music easily.
 
1:43 PM
@PhiNotPi have you done anything with this: en.wikipedia.org/wiki/Alpha_scale
 
@Angs no I haven't
So far I don't consider myself a fan of non-octave-repeating scales.
 
1:59 PM
This might be the song that has that in it: soundcloud.com/roberto-la-forgia/…
 
Some of that sounds reasonably interesting, probably the part I liked best started around 2min.
 
I kinda like the alienish sound of it
Though it's not something for regular consumption
 
I've been looking into all of these alternative scales mainly in search of "better harmony" (as in, I'm not so much after an alien feel as I am after stuff that could be regular consumption). With 19edo, most of the music written in it has gone for the microtonal-alien-style, but some of other the music actually sounds really good, to the point I wouldn't realize it was written in a weird scale.
 
2:17 PM
@Angs Hmm, interesting. I can see why one might say that it sounds alien, but I feel like I would still hear it that way even in a standard temperament.
(Disclaimer: I'm deaf and using cochlear implants, so my musical perception is necessarily very limited. :P)
 
@El'endiaStarman the alien sound might be more because it's by Wendy Carlos and less because of the scale used
 
@DJMcMayhem are you still f2p for TF2?
 
f2p?
 
free to play, hasn't spend any money, doesn't have any hats
you are afaik
 
I downvoted an answer on Meta and this is what I got ^
 
2:29 PM
I legitimately thought you were geobits for a moment
blue avatar, downvoting something
@Mods can you pin the winterbash countdown?
 
@EᴀsᴛᴇʀʟʏIʀᴋ I don't think there is one yet for 2016 (see here).
 
Huh, alright then.
 
What is winterbash?
 
2:43 PM
:O \o/
 
Okay, serious answer: you get hats for doing certain things which you can then "wear" on your profile picture.
 
some are sekrit too, the community in general tries to figure out how they can be earned
 
There are common hats where you can see what triggers them and secret hats that you have to guess.
If you successfully guess what gives you a secret hat, then you get the Eureka! hat.
 
last year we had a doorknob in a bathtub because of the eureka hat
 
hmm, all this actually wants me to use the site less rather than more
 
2:45 PM
You don't have to participate, yourself.
 
it's OK, I pretty much needed a break anyway
 
~15 more days to WinterBash
 
You'll get an option to hide all hats, so you won't even know it's going on. (Except for people talking about it in chat.)
 
@KritixiLithos @Geobits the other blue has learned well
 
@Geobits: Looks like bad homework problems persist in college (link). :P (I am assuming that it's a homework problem and that the OP interpreted it correctly, either of which may not be the case.)
 
3:20 PM
So how do I turn off hats?
 
it's on your profile under "customize hats", you select "hide all hats" or something
you can't do it yet, only when the event starts
 
But the hats are everywhere
I need to turn them off now
 
are you taking offense to my hat? hm?
 
You have a hat too?
If you have a hat I probably shouldn't trust you.
 
<- look at my hat
 
You're the cat in the hat?
 
And already the misdirection has begun...
 
There are hats? Wat?
 
what?
@betseg no, that's my hat on my avatar
 
Am I the only one left?
 
3:24 PM
yes
@PhiNotPi such hat much wow
 
Are you saying there are hats that go other places than avatars too?
 
@El'endiaStarman TBF the hat + scarf were photoshopped on after last year's winterbash
 
This can't be happening.
 
@feersum yes
@feersum they even have mustache hats
 
But where do they go?
 
3:25 PM
@EᴀsᴛᴇʀʟʏIʀᴋ I'm talking about feersum. :P
Maybe he's trying to be Geobits' #1 apprentice.
 
@feersum on your face
if you want, you can even wear them on your forehead
 
How can you tell whether I have a face over the internet?
 
I'm an evil android
 
@feersum wait your face isn't blue with white patterns on it????
 
Maybe it is, maybe it isn't. Either way, that's inside the avatar.
You said there were hats outside of the avatars.
 
3:34 PM
Maybe @feersum is just a random Seed
 
@feersum which avatar?
 
@betseg All of them.
 
:O
@Flp.Tkc hi
 
@feersum but you can put them in the avatar also
you can put hats ANYWHERE!
 
hats, you say?
 
3:41 PM
@betseg hi
 
4:02 PM
@EᴀsᴛᴇʀʟʏIʀᴋ Yup. And since I don't play very much, it'll probably stay that way
 
I hate LOVE hats!
 
I would love hats if they wouldn't interfere with bicycle helmets...
 
I guess a bicycle helmet is a hat. Sort of. At least more hat-y than the things SE place on our heads.
 
Oh no, did the hat season start again???
 
Soon, soon.
Why do you think we're talking about hats?
 
4:24 PM
Does anyone know how to kill all threads in python after a certain time?
I want to set up multiple parallel tasks but I want to kill any that take more than a certain amount of time and get the return values of the rest
 
@Dennis For most topics I don't think there is a particular reason that they're talked about in TNB.
 
@EᴀsᴛᴇʀʟʏIʀᴋ It's actually in the footer of all pages labeled I hate hats
 
There's always a reason. Just not always a good one.
 
Right=)
 
Hey Dennis, did you see what I asked about Jelly docs in the Jelly chatroom?
 
4:43 PM
Hey guys, anyone remember those spring-like doorstoppers that you could flick to get a funny sound?
 
@Maltysen crap, forgot aobut that w/ new textbox
 
@DJMcMayhem I was looking at your V answer to the squaring sequence, and I didn't understand completely how you squared the number
 
@El'endiaStarman I have one of those in my house
 
@El'endiaStarman THIS IS BEST WEBSITE EVER
 
4:46 PM
@ETHproductions IIRC my grandparents' house had them.
 
I loved playing with it when I was little :)
 
@KritixiLithos That's cause it uses a more obscure vim feature. Try typing i<C-r>=10*10<CR> to see how the basic idea works
 
I would try to see how many different tones it could produce
 
@El'endiaStarman i dont have flash on my computer :(
 
@betseg this is not bad thing
 
4:48 PM
but i cant hear the sound :(
 
A poor substitute, but it'll do.
 
thx
 
@KritixiLithos And while you're at it, try :h "= and :h i_ctrl-r
 
I was going to take a screenshot of my profile when I was at 20k rep, but I went from 19,946 to 20,046 overnight
Oh well, there's always 25k
 
@betseg Oh, this video has a couple good examples.
 
4:52 PM
@ETHproductions Congrats on hitting 20k!
(I'm a little bummed you beat me there, but I'm not that far behind, lol)
 
@El'endiaStarman lol
 
@ETHproductions Congrats! Should I downvote 23 of your posts?
8
 
@ETHproductions Or use the inspector tool...
 
@ Geobits plz ^^
 
@DJMcMayhem TIL
 
4:54 PM
Does it make sense now?
 
It makes more sense now that I fiddled with it on vim
 
Yeah, I was going to also post a vim translation, but the ñ made it more difficult than I thought
 
It's like magic
 

« first day (2135 days earlier)      last day (2701 days later) »