« first day (1780 days earlier)      last day (3056 days later) » 

3:01 AM
1
Q: Squish-unsquish ligatures

DoorknobHere is a list of some common ligatures in Unicode (the ones I could create with my Compose key on Debian): Orig Lig ae æ AE Æ oe œ OE Œ ij ij IJ IJ ff ff fi fi fl fl ffi ffi ffl ffl In this challenge, given a UTF-8 string as input, output the same string with all orig...

 
3:12 AM
@AlexA. To which question?
 
@Dennis Alex-style addition
 
@AlexA. Jelly doesn't have randomness yet.
 
._.
 
I wish we could give @NewMainPosts a hat.
 
It might be possible but it the ways to get it would be a little... hm.
 
3:20 AM
@AlexA. no, it isn't possible
NewMainPosts does not have an associated main site user
 
Oh, that I didn't know
 
Note the chat userid of -363. It's a feed-user, which are... special.
 
@Doorknob what hat is that?
It looks like you're a DJ or something.
 
Anonymous
 
3:26 AM
@Mego Are you a DJ? :P
 
@quartata is a DJ.
 
@AlexA. Didn't expect that.
 
Anonymous
@RikerW No just a gamer
 
@Mego Okay.
 
there we go
 
Anonymous
3:29 AM
@PhiNotPi you made me scroll up
 
Alex style addition has 14 upvotes and 134 views. That is the highest view to vote ratio I have ever seen.
 
You mean lowest?
 
view to vote so no
10:1 vs 1:10
 
@RikerW He isn't actually.
 
Wait, you're saying that you think it should have more votes?
 
3:31 AM
yes
 
@AlexA. Aww...
 
and they should be worth twice as much
 
haha
 
No. I am saying it has a lot of votes for so few views
 
So, lowest view-to-vote ratio
 
3:32 AM
@quartata I am lazy. What hat is that. I don't want to look it up.
 
alternatively, highest vote-to-view ratio
 
Wait did I say view to vote?
 
yes
(twice)
 
@Rikerw silver badge hat thing
 
It is very weird looking.
It is a mudbrick village?
Around a mound of dirt.
 
3:34 AM
I honesltly cannot see hats since I am on mobile.
 
Trust me, it's weird.
 
(nor can I edit posts :/)
I thought it was a plate of spaghetti at first
 
I just realized my line lengths were syncing up.
@quartata I thought that too, especially on the small icon shown in chat.
 
@quartata "Learn you a R"?
 
5 hours ago, by El'endia Starman
user image
 
3:36 AM
As in learn you a Haskell
 
Shouldn't it be "an R"?
 
@RikerW - ^^^ I've gotten perfect synchs before. :D
 
@El'endiaStarman How many in a row?
@El'endiaStarman Wow, that is a true sync.
 
i golfed in a real language
 
WUT. The stickpeople on Winter Bash formed a heart!
 
3:38 AM
when was the last time i did that haha
 
@RikerW Just two, twice.
And one more one-pixel-off.
 
Still, that is pretty good.
 
@El'endiaStarman Really? I thought they all just threw snowballs at each other
 
@Doorknob you have a cake on your knob
 
I know
 
3:39 AM
r u sure u new
 
no I old
 
Today is the first time I posted an answer in any language other than pb, brainfuck and the TIS-100 architecture since February 20.
 
The Timey Wimey hat contains a scarf. Martin needs to obtain said hat immediately
@El'endiaStarman :O
 
@Doorknob, that looks way better than the headset.
Anybody else watch Doctor Who?
 
3:40 AM
@RikerW Yeah, it actually fits :P
 
It should be an R upon research. That is how i had it originally too :P
 
@RikerW I've seen the first two seasons of the new Doctor so far.
 
@Doorknob Plus on my screen, it is sideways to fit on the doorknob.
 
@quartata Fixed that for you :P
@RikerW this is intentional
 
@El'endiaStarman Which one, the leather jacket or the grumpy eyebrow one?
 
3:41 AM
Oh, hey, my winterbash people are becoming a heart too!
and sitting down...?
 
Love circle
 
@RikerW Doctor 9 (Eccleston) and first season of Doctor 10 (Tennant).
 
Okay.
 
When I finish my history exam tomorrow, I better see a bunch of code-golf challenges that I can answer so I can finally get that gold code-golf badge. :P
 
I like grumpy eyebrow better, though 9th fit the weird, time-traveling alien part better.
 
3:42 AM
@Doorknob You'll have to tell us how it goes.
Better yet, you should make a challenge related to your history exam.
 
@Doorknob Just realized I could do that. Thx.
 
Oh look! It's that symbol-avoiding body!
(Oh look! It's that "e"-avoider!)
 
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
 
@AlexA. haha, maybe something to do with Alexander the Great (aka you) and Darius the Great (aka Dennis)
 
@Doorknob \o/
 
Anonymous
3:44 AM
Grumpy Eyebrows was too bad for me. Since about halfway through Bow Tie's time, the plot, when it existed, was way too far above the shark for me.
 
Dork Noob has not 1 of that char in his chat tag so I think Dork Noob is a tru symbol avoiding body. Just saying
 
@El'endiaStarman I still will just avoid by using the UTF-16 chars.
 
@Ampora eeeeeeek
 
Anonymous
@AlexA. #triggrd
 
@Mego Which plot? Amy or Clara?
 
Anonymous
3:45 AM
@RikerW Yes
 
that one guy who's still not there
 
@Mego Assuming both now.
 
Anonymous
 
I wish weshouldblamedoorknob.tk was still a thing
 
Umm. This looks a bit... lopsided
(all movement has stopped)
 
Anonymous
3:46 AM
@Doorknob #realheartshavecurves
 
haha, yeah
 
@Doorknob Did you photoshop that guy out?
 
Anonymous
StackExchange: home of the world's worst marching band
 
If your <3 looks as such you should go to a doctor asap
 
@AlexA. no, I just waited until he found his place
 
Anonymous
3:47 AM
They can't make a simple heart and there isn't even any music
 
Can you see how many hats someone has?
omg can moderators change the hat a user is wearing
 
@AlexA. yes, I can see that you have fewer hats than me >:D
 
Wait what?
 
@Doorknob ಠ_ಠ
 
Can mods change hats?
 
3:49 AM
@AlexA. no we can't. Only Community's
@AlexA. what? that's what I said :P
@AlexA. spoooky, reply to the future
 
futurespoop
 
Anonymous
@AlexA. aka Mexican food
 
@Mango, I just saw a way to not put #45 ... Put chars in chat similar to TZ in HS) puts chars... L1K3 TH1S >:]
 
:O Mego should definitely change his display name to Mango.
 
I concur
 
3:53 AM
That has an upvote...
 
@Mego It was intended to be a spoop, i.e. spook, from the future. There was no intended connection to feces.
 
Anonymous
@AlexA. I'll do it the day I get a blue diamond next to my name
 
@Doorknob However did you stumble upon that question?
 
@El'endiaStarman via Charcoal HQ
 
@Doorknob But it's so old
And crusty
 
3:56 AM
I know. A human posted it, not Smokey
 
However did they stumble upon that question?
 
/me asks in those exact words
 
Anonymous
@El'endiaStarman Mind-altering substances, like alcohol and abstract algebra
 
Abstract algebra is definitely mind-altering. In the best way. :D
 
I mean who decided to name "magmas" that anyways
 
Anonymous
4:00 AM
@quartata I dunno, but it's an igneous name
 
They were on drugs for sure.
 
Definitely mind altering something going on there
ninja'd
 
Geology rocks
 
Anonymous
@AlexA. Earthquakes rock my socks off
 
in Charcoal HQ, 15 secs ago, by hichris123
@Doorknob I have a search for questions one vote away from meeting the reaper roomba.
 
4:03 AM
ahhhhh...
 
You know it would be interesting if an ANN like Cluebot NG on Wikipedia was implemented in smoke detector
 
I re-positioned my hat too.
 
@PhiNotPi It looks like a cake exploded.
 
I think that is the idea
 
Actually I just wanted it to look as stupid as possible.
 
4:12 AM
Nobody's answered Ligatures yet? It's not too hard... :P
 
3/10 could be stupider
@Doorknob I'll do legatures if you do tacos
 
fine, but only tomorrow, after my history exam :P
 
Okay I changed it again
except it hasn't loaded yet for me
 
Refresh
 
I did
 
4:14 AM
Idk then
 
stupid caching
 
com
 
How would you rate it now?
 
9/10 pretty stupid
 
4:15 AM
I see no differents
 
@AlexA. refreshify
 
Can confirm, looks stupider
 
PHI WHAT'S ON YOUR FACE?!
 
My hopes and dreams?
 
@BrainSteel A jewish jelly donut.
 
4:21 AM
♫ ♬ Once upon a time I had a dream, a hope, a future. ♫ ♬ But now before my eyes they've turned to dust, to dirt, to vapor. ♫ ♬ The web of fate, the tree of life, with roots as wide, and branches high, as the ocean and sky. ♫ ♬
 
@PhiNotPi 10/11, quite stupid.
Almost as bad as caching.
 
@PhiNotPi 0/10 very inspiring.
2
 
@BrainSteel You should have seen his earlier one. :P
 
@Doorknob I was working on ligatures, had a solution, then realized the overlapping rule. I give up.
 
:(
 
4:37 AM
Dammit, ¹ and ¹ look exactly the same...
 
@Dennis Yes they do
Also so much lol at your hat placement
@Dennis Julia says they're the same thing.
 
Well that explains it then.
 
God your hat placement is amazing
hahaha
 
Old or new?
 
I see the cake right in the middle of your face
Hahahaha
I just saw the new one
 
4:43 AM
For some definitions of hat.
 
Anonymous
Once again, Dennis beats us all
 
Anonymous
4:54 AM
I'm considering making a KotH based off of this
 
Anonymous
Because I played it last night and it's one of the most fun, hilarious card games I have ever played
 
0
Q: Flip the switches

EEEEEEridanAfter you wake in a dark room, you see a rectangular grid of lights with corresponding switches. You decide to use a coordinate system with the bottom left light representing (1,1) and the coordinates increasing as you go up (y direction) and to the right (x direction). The grids are identical i...

 
 
2 hours later…
7:06 AM
My R answer for me-style addition just got a lot more interesting. (IMO anyway)
It explains why xnor's comment regarding the geometric distribution is true.
It also makes it much, much shorter: 28 bytes now, down from 47.
 
Anonymous
Ooh
 
Ooh
 
@Mego This reminds me that I should Sandbox a KotH based on a game in my hometown. Trouble is, I have no idea how Java works and that game will be tricky to code for
 
Anonymous
That's neat; I wish Python had a geometric distribution built-in
 
Anonymous
@Sherlock9 I can Java, so I can help if you need it
 
7:14 AM
Maybe I should make a question to implement this game and then steal the best answer for the KotH >:)
@Mego Oh that works much better. I'll write up the rules into the Sandbox then. Thanks
 
@Mego I'm certain there's a package for it. Perhaps Numpy or Pandas would include it. R loads its stats package by default so it doesn't require a separate import. (Because, after all, R was built for statistics.)
Even Julia requires an import for distributions and whatnot: the quite verbose using Distributions
 
Anonymous
@AlexA. I'm certain numpy has it, but I want a standard library one :P
 
Numpy does indeed have it
 
Haha
 
7:21 AM
Ouch. So you'd need import numpy as n with something like lambda a,b:a+b+n.random.geometric(.9,1)
57 bytes
Assuming I've Pythoned correctly.
 
2
Q: Letters, Get Moving!

geokavelGiven a string you must move each letter (starting from the first letter) by its position in the alphabet. If you reach the end of the string you must wrap around. Non-letters don't need to be moved. Example: Dog D is the fourth letter in the alphabet so we move it four spots to the right. Aft...

 
Pythoned
 
@AlexA. Sounds about right
 
Anonymous
Hmm, Python has exponential built-in, which is similar to geometric
 
Anonymous
But I'm not smart enough to be able to convert an exponential to a geometric
 
7:24 AM
The geometric distribution is discrete and the exponential distribution is continuous. For very large n, the former converges to the latter.
 
Anonymous
@AlexA. I know that much, but large n aren't going to happen :P
 
Anonymous
@NewMainPosts This probably has an incredibly simple solution
 
Haha true
 
Anonymous
I'm betting on cosmic rays over the exponential distribution getting close enough
 
Heh
 
Anonymous
7:33 AM
I found a way to get a geometric distribution from a uniform distribution
 
Anonymous
But I'm pretty sure it's not gonna be shorter
 
How?
 
@Mego My incredibly simple solution is wrong. It swaps letters rather than rotate them. Darn
 
Anonymous
@AlexA. from math import*;from random import*;lambda a,b:a+b+log(uniform(0,1))//log(.9)
 
Anonymous
85; way longer
 
7:36 AM
What do you need floor()? Python 3 has //
 
@Mego Neat, but 85 bytes. Longer than your current solution. :P
 
Anonymous
@Sherlock9 Good point
 
Still only saves you 6 bytes for 79. Dang
 
Anonymous
Yeah
 
Anonymous
The idea is, if you have U ~ uniform(0, 1), you can get Y ~ geometric(p) with Y = floor(ln(U)/ln(1-p))
 
Anonymous
7:39 AM
Wait I can just use random(), since that's identical to uniform(0,1) for all intents and porpoises
 
You'd want log(0.1) because typically Geometric(p) assumes that p is the success probability, not the failure probability, and you're doing log(1-p).
 
Anonymous
import math as m,random;lambda a,b:a+b+m.log(random.random())//m.log(.1)
 
Anonymous
@AlexA. True, thanks
 
Anonymous
73, getting closer
 
You save a byte by importing math as m
 
Anonymous
7:42 AM
Still 9 over my naive solution
 
That's the problem with code golf: Usually the interesting, elegant solutions are a lot longer than the naïve, brute force solutions.
 
Anonymous
I wonder if I can be tricksy with logs to get shorter
 
Perhaps. Let me know if you come up with something, but in the meantime I must obtain sleep.
 
Anonymous
ln(a**(1/ln(b))) isn't shorter than ln(a)//ln(b) :(
 
Hi everyone !
@AlexA. I'm tring to golf a C solution for your challenge, is srand(time(NULL)) mandatory for the randomness or can I use something else?
 
Anonymous
7:51 AM
@Katenkyo Alex wrote a challenge that doesn't involve food?
 
@Katenkyo srand is required if you want each run of the program to have a different set of random numbers (it seeds the prng)
 
@es1024 Yeah, I know, but dunno if it could really be 10% chance if the PRNG isn't seeded... I mean, you'd always have the same return ^^'
 
@Mego I'm not entirely sure that the naive solution even works. g(3,5) keeps returning 8 for me
 
@Mego yes
 
Anonymous
@Sherlock9 It returns 8 with a 90% probability :P
 
Anonymous
7:54 AM
@Katenkyo If you look carefully, you'll see that @quartata wrote the challenge :P
 
@Mego I've just tried it 1000 times (with some list comps) and none of them were anything but a+b
@Mego I don't think you should be using random.random()
@Mego random.randint(0,9) maybe
 
@Katenkyo it should be fine: if you don't use srand, it's the same thing as using srand(1);
 
Ho... so much Alex.a that I though... well... mondays x)
 
Unless random.random() is different in Python 2
 
Anonymous
@Sherlock9 1) please calm down with the pings
 
7:57 AM
Sorry
 
I misread the etiquette on replying
 
Anonymous
Typically one reply per string of messages is plenty :)
 
Anonymous
(if not excessive)
 
Ok so it's exactly the same as Python 3
 
Anonymous
7:59 AM
I'm not sure why it's being weird...
 
Anonymous
Oh because I did something dumb
 
random.random()<.1 ?
or random.randint(0,9) ?
 
Anonymous
I went with the second
 
Alrighty then
 
Anonymous
Since it's the same # of bytes and resolves the closed-versus-open debate
 
8:01 AM
Again apologies for the pinging in your ears
 
wow 71 chars...
 
Anonymous
@Sherlock9 I have sounds off, but all the highlighted messages get annoying too
 
Fair enough
On to a point I got distracted from earlier from random import*;g=lambda a,b:a+b if randint(0,9)else g(a,b+1) this saves a byte
Also, does anyone know why the Haskell book Learn You a Haskell for Great Good is, uh, titled in that manner?
 
Anonymous
@Sherlock9 Borat
 
8:10 AM
It has been shebanged per your request @FlagAsSpam
 
Anonymous
8:27 AM
I tried my old Halloween challenge in Seriously and did not do so well: ,;⌐$"me"@"spooky"($+++
 
Cutted down from 71 bytes to 39 ! :D
My C is so rusted >_<
 
Anonymous
@Katenkyo I believe you can drop the 0 in 0.1 for another byte
 
@Mego Oh, yeah, forgot that ! Thanks !
 
Anonymous
Welcome :)
 
Anonymous
You just inspired a way to get my solutions shorter
 
Anonymous
8:34 AM
a(x,y){return(rand()<.1?a(1,y):y)+x;}
 
Anonymous
That drops another byte
 
@Mego smart !
 
 
2 hours later…
10:49 AM
lol I am batman
 
@Optimizer I can only say "What the fuck?" to this...
 
you also had an option of not saying anything to it.
looks like you are one of those.
 
@Optimizer It is not an option, if manifesting myself allow me to hear a funny story that led to this
 
sorry, I dont feed the trolls
 
@Optimizer Looks like i'm feeding a big one ! \o/
 
11:30 AM
Is this answer okay?
0
A: Alex-style Addition

FlagAsSpamVitsy, 12 bytes ba/R([1+0m]+ ba/R Get a random number in [0,1.1) ([ ] If its truncated int is 0, do the stuff in brackets. 1+0m Add 1 to one of the items and execute the 0th index of code. + Add the numbers together. Try it online! Note that this has a ti...

@ZachGates \o/
 
Anonymous
@FlagAsSpam floor(X ~ U(0,1.1)) = 0 is not the same as 90% chance.
 
Oh, 10/9ths, right?
I thought b/a was wrong.
 
Anonymous
That would be 10/11
 
Yeah, so I use 10/9 not 11/10, yes?
 
Anonymous
Yes, but that's still not quite accurate
 
Anonymous
11:38 AM
One sec...
 
Yeah - it would work. Because it would be 9/10 for the first and 1/10 for the second.
 
Anonymous
You're assuming floats/doubles are uniformly distributed across that range
 
Yes - that's a limitation of computing more than anything, though.
 
Anonymous
You'd be better off doing the equivalent of random.choice
 
Anonymous
Or just Math.random()<0.1
 
11:48 AM
I can't really do that, though.
Unless I multiply random by 10.
Actually, that shaves off 2 bytes. o-o
 
0
Q: Solve a mathematical expression from alternating sides

Stewie GriffinCreate a program that solves a mathematical expression using the elements from alternating sides of the expression. The way it’s done is you take the number or operator from alternating sides of the middle character and creates a new expression. If the expression doesn’t «work», a 1 must be inser...

 
Anonymous
Remember kids, doing randomness the right way saves bytes
 
aR)[1+0m]+ makes me happy.
 
Anonymous
Because of the magic terror that is IEEE 754, you end up with more floats closer to 0 than 10/9 (or 1 or whatever)
 
Anonymous
So picking floor(X ~ [0, 10/9)) will end up as 0 much more than the expected 90%
 
12:03 PM
I bet nobody else has this hat. :P
 
Dennis.
I has no hat.
How do I hat?
 
Anonymous
Winterbash
 
Anonymous
#!/bin/winterbash
3
 
I demand a Winter Zsh!
 
Okie, seriously. Can someone explain how to hat?
 
Seen it.
Didn't help me hat.
I did something.
And it didn't let me hat.
OHHH.
I'm an idiot.
I get it now.
Okay.
I approve of this hat thing.
The fact that this sandwich-shaped object fits so well on my spam can makes me happy.
 
@Ampora ... out of curiosity, why the new account?
(the EEEEEridan one)
 
He wanted socks for Christmas.
 
Anonymous
12:24 PM
@FlagAsSpam Is aR a random int or a random float?
 
12:35 PM
does someone see if there's a better way in java than string.toCharArray() to apply a foreach loop on a String? :/
nevermind, found something better
 
Anonymous
1) don't use a for-each loop
 
Anonymous
2) don't use Java
 
Anonymous
Actually swap those two, first suggestion should always be don't use Java
 
Anonymous
Using Java is like using a bulldozer to kill a bug. It'll work, but it's horribly clunky and it will leave a sizable mess.
 
@Mego I know, there's too much verbose, and I prefer to start golfing with languages I like :)
And as someone who sometimes use awk for simple tasks when I'm lazy, using a bulldozer isn't a problem \o/
 
12:44 PM
@Mego So what do you usually bulldoze when using Java?
 
Anonymous
I should probably learn awk at some point
 
Incidentally, why are KotH's written in Java now?
 
But yeah, will try to use something else, in this case, the lack of tuple in Java is a pain
 
Anonymous
@Sherlock9 My patience and sobriety
 
XD
 
Anonymous
12:45 PM
@Sherlock9 It's a language many are familiar with, and OOP lends itself nicely to bot programming
 
@Mego OOP is useful in many things, and it's main concurrent, C#, is pretty ugly for me
 
Eh, I like Python but that may not be the right language for the job for one reason or another
 
If I wanted something lighter, I would use something like Lua
 
Anonymous
Technically you can have KotHs where any languages that can do I/O are permitted, but dealing with pipes and their nonsense is much more complicated than calling a method in a subclass through the magic of polymorphism
 
@Mego Doesn't Python have classes, the module subprocess and
Well I don't know about polymorphism
 
12:48 PM
@Sherlock9 The polymorphism is the fact that an Object (class) can be considered strictly like an object it's heriting from
 
Tbh, my brain just skipped over that part when it was explained in class
Ah I see I see. I think Python classes can do that too
 
in KotH cases, there's usually a class "Player", and everybots herits from it (extends Player)
 
But I'll learn some Java since I'm new to the KotH business
 
It means that, even if the bot is called EmoWolf, the system can see it like a Player object, allowing you to manage a lot of classes simply
 
Anonymous
Python can be used for KotHs to the same effect as Java, but in my experience, people are more familiar with Java than Python, since Java is the de facto standard for intro programming courses
 
Anonymous
12:50 PM
Since APCS is Java and most university intro CS classes are Java
 
@Mego Yes, C for procedural, and Java/C# for OOP
 
@Mego So you're saying that we could have a esolang KotH, but it would be a major pain in the ass
@Mego My university CS class taught C and then C++
 
Also, Java is teached because it can lead to Android dev too
 
Though I have advocated for Python, my teachers aren't fond of Python
 
Anonymous
12:52 PM
@Katenkyo Fun fact: that's the question that made Shog ban "fuck" in question titles
 
Anonymous
It hit HNQ and shit hit the fan
 
@Mego Yeah, I know ! i was laughing pretty hard at that time
 
Anonymous
Well, rather, that's the question that was the tipping point
 
It was pretty funny to see how a simple language name can cause so much waves
 
@Mego HNQ?
 
12:58 PM
@Sherlock9 Hot Network Question
The question list network wide, for questions which attract lots of attention
(the list on the right of your screen when you're on a question)
 

« first day (1780 days earlier)      last day (3056 days later) »