« first day (1768 days earlier)      last day (3058 days later) » 

3:00 AM
So there's an implementation of Ruby called Topaz that's written in Python.
Sounds blazing fast. </sarcasm>
 
ah. so it gets speed from concurrency?
 
Anonymous
@quintopia Yep
 
Anonymous
@AlexA. Everything takes 420 microseconds to complete
 
haha
 
@Mego Are you sure about that?
That sounds completely ridiculous.
Splitting tiny amounts of work among threads and having to lock everywhere sounds very slow.
 
Anonymous
3:01 AM
@feersum Stackless mode isn't the default, but it has support for it. Click the link and be enlightened.
 
What link?
 
Anonymous
Scroll up
 
> Dear visitor, due to technical problems, the Stackless website is currently almost completely down.
 
Anonymous
That's why I linked the RTD
 
3:05 AM
They don't promise to speed up code.
 
They do. They also promise a brand new car with every purchase of $10 or more.
 
The goal seems to be to enable a different programming style with unlimited recursion and or continuations.
 
0
A: Sandbox for Proposed Challenges

LukeResolving the Date Format Dispute The formatting order of dates is one of the most complex and divisive issues the world faces today. Some of us vehemently argue that Month/Day/Year is appropriate, considering that's how we say dates out loud. Others loudly proclaim that Day/Month/Year is best, ...

 
@AlexA. (⊣+6×⊢)/⌽5∘, should do the trick.
 
@Dennis What in the world
 
Anonymous
3:09 AM
@feersum Which, if used properly, will likely speed up code that would normally require ugly, inefficient hacks to work in CPython
 
Very off-topic (but then again, this is 19th byte): I've been thinking of getting an e-reader lately. Anyone have any recommendations?
 
Anonymous
You're right, Stackless doesn't promise to speed up code. It's a happy accident.
 
@Doorknob Books
 
Or (⊣+6×⊢)/∘⌽5∘,, if you need a function.
 
haha
 
Anonymous
3:09 AM
@Doorknob Get one with an IRC client
 
Chat mini-challenge: Given a number of minutes past midnight, output the total number of segments lit when the number is displayed on a 24-hour seven-segment display in the format "HH:MM". The number of lit segments for digits 0123456789 are 6255456376 respectively. Don't count the colon.
 
@Mego Yeah ok. I forgot what I was arguing about now lol
 
@ThomasKwa Is this inspired by the winterbash counter? :P
 
Get a Kindle. Out of the few I've tried (Kindle, Nook, whatever Sony tried), it was the best by far.
 
@Doorknob Maybe subconsciously
 
3:11 AM
in Tavern on the Meta on Meta Stack Exchange Chat, 3 hours ago, by Normal Human
For completeness: 0 = 1110111, 1 = 0010010, 2 = 1011101, 3 = 1011011, 4 = 0111010, 5 = 1101011, 6 = 1101111, 7 = 1010010, 8 = 1111111, 9 = 1111011
 
Anonymous
@ThomasKwa vote to close as duplicate of codegolf.stackexchange.com/questions/65106/…
 
in Tavern on the Meta on Meta Stack Exchange Chat, 3 hours ago, by Normal Human
The entire algorithm of running-people countdown is this neat js file, where the aforementioned array encodes the digits that people form.
 
@AlexA. 5∘, prepends 5 to the array and reverses it. Then, we reduce (from right to left) using (⊣+6×⊢), i.e., multiply right element by 6 and add to left element.
 
@Mego definitely not a duplicate of that
 
Anonymous
@ThomasKwa There are two parts to the challenge: converting minutes to hours and minutes, and summing 4 values in a lookup table
 
3:13 AM
@Geobits Thanks; why do you say that? What makes it better than the other things?
 
@ThomasKwa That's what they all say :P
 
Anonymous
The first one is exactly the linked challenge
 
Anonymous
And the second part is trivial
 
@Mego the other challenge was half string-manipulation
 
@Doorknob Page contrast, overall weight/feel, battery life, access to Amazon.
(in roughly that order)
 
Anonymous
3:14 AM
@ThomasKwa 90% of challenges are half string-manipulation
 
Anonymous
The core of the challenge is the same
 
and the LUT part is no more trivial than the time-to-hours-and-minutes part.
 
Anonymous
Answers to the main challenge would be competitive in the chat challenge with minor alterations
 
Anonymous
i.e. dupe
 
I don't think every language would implement a LUT the same way.
 
3:15 AM
@Mego ^
 
True, it's easy, but it might not be trivial to find the shortest.
 
@Dennis Why is 5 compose ravel the way to get 5 on the front? o_O
 
no, of course not. in python it'd probably be indexing those strings exactly. but it's still not interesting
 
@AlexA. Back. / reduces from right to left.
 
Anonymous
Here's a Python 3 answer from the main challenge: i,j=divmod(int(input()[:3]),60);print(str(i),"hour"+("s"if i-1else""),str(j),"minute"+("s"if j-1else""))
 
3:18 AM
@Dennis Couldn't you reduce with \ and swap + and *, then drop the reverse?
 
\ is cumulative reduce, and still reduces from right to left.
 
Oh right
Thanks for your help!
 
Anonymous
H,h,M,m=map(lambda x:divmod(x,10),divmod(int(input()),60));print(sum(map(int,map('6255456376',H,h,M‌​,m))))
 
Anonymous
Not a huge change to solve that problem
 
Huh, someone's going on a Taisho-flagging spree.
 
Anonymous
3:20 AM
(also I'm sure it's horribly golfed)
 
Anonymous
@Geobits ?
 
Well that's the most flags I've ever seen at once
 
@AlexA. 6⊥5∘, is shorter though.
(stupid internet)
 
And here is the adaptation to this problem: i,j=divmod(int(input()),60);o=0;j=100*i+j;for i in1,2,3,4:o+=int("6255456376"[i%10]);i//=10
or something like that
 
3:26 AM
Bye guys
 
@Mego I'm disappoint you didn't translate it to Seriously first
 
Is chat unborken now?
 
> I'm disappoint
 
Anonymous
@quintopia 2lazy4me
 
@Mego Although I think there's a better way to LUT, that sounds reasonable.
 
3:31 AM
@AlexA. Is internet slang not accepted here
 
Also, I don't know why I got all defensive (it's not even an actual challenge)...stupid human brain
 
@ThomasKwa <3
 
Anonymous
@AlexA. I thought you <3'd me ;_;
 
I do
It's a <3 triangle
 
I finally switched my last computer from Fedora to openSUSE today. Had enough of its crap.
 
3:33 AM
To reduce crap you switched to openSUSE? :P
 
Parts of Fedora seemed to break at random occasions. This morning, I could only open applications by executing DISPLAY=:0 whatever in another virtual terminal.
And openSUSE is the awesomest OS there is, thank you very much.
 
s/openSUSE/Mac OS X/
 
^ Boo this man
 
Stop trying to feed me half-eaten fruit!
 
It's such tasty fruit though...
 
3:38 AM
user image
2
^ Not good. Not tasty.
 
That's not what I'm trying to get you to eat. :P
 
hmm
 
ew. why would anyone make delicious chocolate cake look so ugly and unappetizing?
 
ಠ_ಠ
 
3:41 AM
LOL. Wanna bet how many Toshiba cakes are out there?
 
Very minimalistic. Not very thin for an iPad, though.
 
iCake
 
@Geobits It's not an iPad, it's a cake.
 
It's a lie.
 
The iPad is a lie!
 
3:43 AM
Actually I'm fairly certain it's supposed to be a closed MacBook, not an iPad.
 
And it fails at both, since neither have chocolate in the middle.
(I think)
 
you mean
succeeds where they fail
 
Idk man. Chocolate cake is kind of bad anyway.
 
Seriously.
What kind of person doesn't like chocolate cake?
 
I mean, it's alright sometimes.
But more often than not it's bad.
 
I just don't like chocolate that much.
 
^ That doesn't help your case... :P
 
u_u
 
I don't like chocolate cake either.
 
3:48 AM
In fact, pretty much the only things chocolate that I actually like are milk chocolate and chocolate frosting.
@AlexA. This one time, it's worth being wrong. :P
 
Oh gross. I like the inner cake part but I hate frosting.
 
O_O
 
I also hate milk chocolate.
I'd be fine eating a bare chocolate cake with no frosting.
 
well, less wrong now. the inside part is usually the best.
 
That sounds alright.
 
3:49 AM
I've never even tried chocolate milk, though I drink LOTS of normal milk every day.
 
Chocolate is yummy, but I don't consider it to be exceptionally delicious. :P
 
The only way I can eat a chocolate bar if it's >90% cocoa. Otherwise it's too sweet.
 
@Doorknob Kids these days...
 
I could eat the frosting without the cake. The proper frosting, that is.
 
@Mego I golfed the code
 
3:51 AM
@Dennis Golly, mister. That sounds unpleasant, in my humble opinion. Shrug!
 
Cream cheese frosting is great by itself. I mean, it's good on a cake, too, but...
 
Anonymous
if m%2!=0>1
 
Anonymous
What the hell is that
7
 
@Mego it works!
 
@TanMath It's equivalent to if m%2 != 0 and 0 > 1.
 
Anonymous
3:54 AM
You dropped 6 bytes. It still isn't close to fully golfed
 
Anonymous
You can easily get sub-200
 
@El'endiaStarman you sure? It works but
Wait
 
Even if it's actually equivalent to if (m%2 != 0) > 1, that's still always false.
 
Anonymous
Oh I see
 
Anonymous
0>1 == False == 0
 
Anonymous
3:55 AM
Which is an unusual way of doing m%2!=0
 
Anonymous
Which is an unusual way of doing m%2>0, which is an unusual way of doing m%2
 
Nvm
 
Anonymous
@AlexA. Really it's still my original code, just with a little bit of golfing and bugfixing :P
 
Anonymous
But yeah
 
Anonymous
s/dumb/unusual/g
 
Anonymous
3:59 AM
I would edit it to be nicer, but I'm past the edit timeout :/
 
which code are we talking
 
I have that problem in real life - someone needs to sort out the edit timeouts in fluid conversation some time
 
@Mego ftfy
 
Anonymous
@AlexA. <3
 
And usually if you know how to golf it, you hint on how to do so, but you do not want to help me..oh well
@quintopia my Bernoulli answer
 
Anonymous
4:02 AM
@TanMath I'm not going to tell you how to golf your answer to my challenge - that wouldn't be fair to the other people who I didn't help with golfing
4
 
@Mego OK, you have a point, but you could help everyone if you knew how to further golf
 
Anonymous
@TanMath I don't know how to golf Haskell, or Mathematica, or PARI/GP, or Matlab
 
@Mego OK, so?
 
Anonymous
@TanMath So I can't help the people who wrote answers in those languages with golfing
 
@Mego You help with whatever languages you know
 
Anonymous
4:05 AM
I am under no obligation to help anyone with golfing their answers to my challenge
 
^
 
@Mego OK, but that proves that you do not want to help
Let us not fight over this anymore
 
Anonymous
@TanMath It proves that I do not have to help
 
@TanMath I'll give you one tip. There is never any great reason to put !=0 in a conditional.
 
Anonymous
I've already helped plenty - I pointed you to the Python golfing tips thread so you could help yourself
 
4:07 AM
I looked at it, ok?
I could not find anything very helpful
 
@TanMath tip #2: avoid putting multiple returns in the same function. instead return an expression that evaluates to the right number in all circumstances
 
I tried to use a lambda but did not work
@quintopia how?
@quintopia thanks, very helpful
 
I really feel like eating two donuts
 
With frosting?
 
@AlexA. You should eat two donuts then
 
4:13 AM
@Doorknob That would require a lot of things that I don't want to do, including (but not limited to) leaving the house, driving to the store, purchasing donuts, and driving home.
 
Might-yo?
 
Mighty-O
 
@TanMath Does that first return even do anything that the remaining code doesn't do on its own? it looks like it will return 1 when m is 0 even without that line.
 
@Dennis It's the only donut place I know of that makes them without eggs or milk. And they're incredible. They won a national donut competition.
 
@quintopia you win...
 
4:24 AM
Why does markdown not render :/
 
I know the next step
 
4:36 AM
Thanks @quintopia
 
Anonymous
stomps on the crickets
 
+1 they were getting monotonous.
 
@Mego Hack coderpad to give us a longer timeout
 
Anonymous
@Calvin'sHobbies k
 
5:09 AM
Well, the Bernoulli numbers challenge is another one that any reasonably-good Mathematica-based golfing languages would have won.
 
@Calvin'sHobbies
 
user image
4
I like our communal art
 
@Calvin'sHobbies Oh hey, the guy's hand isn't anatomically incorrect in yours
 
@Calvin'sHobbies aw you snapped it while the river was still unaligned :/
 
5:18 AM
anyway, let's leave this here for now: yourworldoftext.com/calvinshobbiesandfriends
PIN IT
 
No
 
aw
 
Pins are for serious things
 
FINE
 
Anonymous
@AlexA. Like stealth pings and stars
 
5:22 AM
Exactly
 
OK, I managed to break openSUSE in exactly the same way I had broken Fedora.
 
@Dennis Did you turn it off while it was doing a software update?
That's how I trashed my openSUSE VM.
PSA: Don't do that.
 
That could trash anything.
 
Nah.
 
With btrfs, you could just revert to the previous snapshot. openSUSE is cool like that.
Re: my machine. I had done a million things, taking special care not to copy anything from the old configuration. All updates, all settings, done. Reboot. No sound. Can't start apps.
You'll never guess what the culprit was!
 
5:25 AM
:|
 
Anonymous
@Dennis CJam?
 
@Dennis Tabs
 
golfing your init.d scripts? :p
 
So close! I changed my keyboard layout yesterday, to I put a shell script in the Autostart folder to make a couple of modifications:
setxkbmap us intl
xmodmap -e 'keycode 15 = 6 asciicircum onequarter U0302 onequarter dead_circumflex'
xmodmap -e 'keycode 48 = apostrophe quotedbl U0301 U0308 dead_acute dead_diaeresis'
xmodmap -e 'keycode 49 = grave asciitilde U0300 U0303 dead_grave dead_tilde'
Eliminating that script solves all problems.
 
You changed your keyboard layout? o_O
 
5:28 AM
Yes, from combining diacritics to dead keys.
brb Rebooting.
 
Oh, okay.
If @Calvin'sHobbies ever makes another sock account, it should be called Calvin's Copies.
 
Giving the autostart script a .sh extension solves the problem.
Argh!!!
 
This is why you use file extensions!!!!!
(╯°□°)╯︵ ┻━┻
jk ily bb
 
Anonymous
No you use shebangs
 
Pretty much nothing on my computer has a file extension. That includes the built-in apps. It's the Linux way.
 
Anonymous
5:30 AM
Otherwise you look at a file of gibberish and wonder, "Seriously, CJam, Pyth, or Golfscript?"
 
So you were running as an executable?
 
I have no idea what KDE thought it was.
 
Probably thought it was some trash temp file since it didn't have an extension.
 
Run it again now and find out!
 
GNOME is even cooler. Autostart scripts have to terminate before the desktop loads. So if you have an infinite loop in there, make damn sure it runs in the background.
How? Running it from the command line works as expected.
Hm, it might have thought it was a desktop file. Not sure.
@AlexA. It's not supposed to have an extension. (╯°□°)╯︵ ┻━┻
 
5:36 AM
Well clearly it is, otherwise you wouldn't be having these issues. :P
 
Anonymous
use shebangs
 
File extensions are golfier!
 
^
 
Anonymous
Don't golf your interpreter
 
Why not? @phase did it and that turned out fine. :P
 
5:38 AM
> turned out fine [citation needed]
 
I passed @DigitalTrauma :O
 
On the highway?
In the supermarket?
 
in rep ._.
 
Nice :D
 
Anonymous
> turned out fine [questionable content]
 
5:41 AM
I finally passed randomra and Geobits in rep. Next up is feersum. >:D
 
@Mego I'm an idiot. I thought I just hadn't copied it here, but I actually forgot to write the shebang. With it I don't need the file extension.
 
@Dennis ಠ_ಠ
 
I spent an entire day installing and configuring an OS because I forgot a shebang!
 
Anonymous
@Dennis I told you so
 
Anonymous
I told you so
 
5:42 AM
@Dennis This is why you use file extensions to begin with.
 
No clue how that happened.
 
Anonymous
Anyone know where to get a bunch of newline-separated English sentences?
 
@Mego Insert newlines after periods in a free online book
  __
~/  \~
~\__/~
  ``
@AlexA. What was that ^
 
A Hex agony.
 
@Calvin'sHobbies I have no idea. I didn't make it.
 
5:46 AM
Well, it was for the best. I've been wanting to get rid of Fedora for months, but always was too lazy to actually do it.
 
Anonymous
@Calvin'sHobbies Too lazy to find a good source
 
Anyone like the tilted squares I'm drawing? XD
 
@Calvin'sHobbies the sun
 
@AlienG huh?
 
5:50 AM
@Mego Shakespeare
 
Anonymous
@AlexA. I said english
 
It'll be fancy
 
Anonymous
Shakespeare is to English what Seriously is to programming
 
Um no not even kind of
 
@Calvin'sHobbies Dammit - that's not the first time you've done this to me ;-)
 
6:01 AM
@Mego no way! but it soon will be!
Check out my updated answer:
-2
A: Bernoulli Numbers

TanMathPython 3, 184 225 221 190 bytes This is based on Mego's example implementation, except golfed further. EDIT: Fixed and working now. Just here as a reference since most bytes for Python 3. EDIT: Now beating Sherlock9's answer. Thanks @quintopia! import math from fractions import Fraction as F ...

Thanks @quintopia
@ThomasKwa like what?
 
@TanMath The lines under the function B are not indented
 
@quintopia what is this?
 
@TanMath @Calvin'sHobbies is correct. you didn't indent correctly for the post.
 
fixed
 
Anonymous
@TanMath I meant the blight upon the second thing, not the prestige
 
6:04 AM
(anyway, yes, it's better, but there are still some bytes to be shaved if you wanted...)
 
@Mego oh...
@quintopia of course I want it!
@quintopia are you hinting to lambdas?
 
Anonymous
Seriously is a blight upon programming like Shakespeare is a blight upon the English language
 
Shakespeare the programming language I hope?
 
@Mego I do not know why I am wasting my time on this language!
 
I'm quite fond of some of the person's turns of phrase
 
6:06 AM
^ ?
 
@TanMath It's a useful language for running off quick scripts, and golfing in it will help you learn it better
 
@quintopia true, you know it well?
@quintopia problem is it isn't well documented
 
oh you're talking about Seriously?
there's no good reason to learn Seriously.
seriously, quit now.
 
Anonymous
Except for occasionally winning golfs
 
OCCASIONALLY ONE DAY EVENTUALLY MAYBE WINNING GOLFS
 
6:09 AM
I am never posted a competitive answer for Seriously! too hard!
Gracias to however upvoted (you know who you are)
 
By the time you learn it, it will no doubt be obsolete due to the next golfing language.
 
correct me if i'm wrong but isn't (a and b)==(b if a else a)?
 
@quintopia in Python? i do not think so
 
@quintopia Yes.
 
Anonymous
@quintopia Correct
 
6:12 AM
kk
 
@quintopia The and will return a bool, the other one will return whatever a or b is (which has the same bool value)
 
really?
 
@Calvin'sHobbies No, it doesn't work liek that in Python.
 
@quintopia oh, i am mistaken
 
@feersum Oh, you're right, the and does the thing anyway
 
Anonymous
6:14 AM
>>> 2 and 3
3
>>> 3 and 0
0
>>> 0 and 3
0
>>> False and 5
False
>>> "" and 17
''
>>> "foo" and "bar"
'bar'
 
@Mego thank you
one more upvote, and I am at 500! I cannot believe it!
 
likewise we should expect (a or b)==(a if a else b)
 
@Mego i do not get this
@quintopia so what would it print?
 
Anonymous
@quintopia True
 
BTW, @quintopia why do you ask anyway?
 
6:24 AM
@TanMath because i think you may be able to replace the last two lines of your bernoulli program with return 1-((m==1)+(m+1)%2or t). Of course, that may not even be shorter than what you have...
 
@quintopia lemme see
@quintopia no byte change
hey @phase
 
@Mego you're just jealous your interpreter isn't golfed
@TanMath just poking my head in here for a sec
 
@phase ?
> abandon all work, ye who enter here —aditsu
 
@TanMath what about return (m==1)+(m+1)%2and 1-t
 
@quintopia one byte
 
6:28 AM
I'm going to try to learn J while doing homework, which should turn out fun.
 
@TanMath you may be able to delete space after and as well. also check it is still correct.
 
@quintopia actually you cannot..
I learned that from the python tips post
@quintopia it works
 
Anonymous
"actually you cannot" "it works"
 
@Mego it was in reference to two different things
@TanMath I think the part on the left can only ever equal 0 or 1, in which case, the and could be replaced with *
 
@Mego ?
@quintopia meaning?
 
6:32 AM
@TanMath although that would require wrapping both terms in parens so never mind
 
@quintopia /me quickly closes tab so I don't end up staring at that for 5 minutes
 
@quintopia /me does the same as @El'endiaStarman does
 
6:47 AM
it generates more colors faster if you click
 
7:19 AM
/me doesn't open it in the first place so he can avoid that problem
 
 
2 hours later…
9:16 AM
someone try to figure out the date of winter bash from the following javascript code (source of the winter bash countdown):
I want the exact lines of code where it says so
 
9:32 AM
just a mini challenge!
 
9:53 AM
Hey ho
Yesterday, this was a silly place.
So let me post my challenge idea from yesterday again.
What do you think?
 
@FUZxxl nobody's here!
 
:-(
 
10:24 AM
0
Q: Well that's odd... no wait, that's even!

Calvin's HobbiesPreamble Integers are always either even or odd. Even integers are divisible by two, odd integers are not. When you add two integers you can infer whether the result will be even or odd based on whether the summands were even or odd: Even + Even = Even Even + Odd = Odd Odd + Even = Odd Odd + ...

 
10:51 AM
0
Q: Bracket balancing

ghosts_in_the_codeYou will be given a string containing brackets ([{()}]) and any other characters (A-Z, a-z, 0-9, punctuation). You need to check if it adheres to the following rules: Non-bracket characters are ignored. Every open bracket [{( has a closing bracket )}]. So []( is not allowed. Brackets are nested...

 

« first day (1768 days earlier)      last day (3058 days later) »