« first day (2618 days earlier)      last day (2232 days later) » 

12:18 AM
@Downgoat 9/10 not enough teal
 
Finally finished it
0
A: Binary Fibonacci

JungHwan Minbrainfuck, 397 bytes >,[<++++++[->--------<]>>[->++++++++++<]>[-<+>]<<[->+<],]>+[-<<+>>[-[->+<]<<[->+>+<<]<[->+>+<<]>[-<+>]>>[-<<+>>]>]]<<[->+>>>>>+<<<<<<]>[-<+>]>+>>+>>>+<[[->-[<<]>]>[[-]<<<<<<<[->>[-<+>>+<]>[-<+>]<<<]<[->+>>>>>+<<<<<<]>[-<+>]>[-<+>]>[->>[-<+<<+>>>]<[->+<]<]>+>[-]>>+>]<<<<<[[->++>

 
0
A: Fibonacci function or sequence

Leaky NunLean, 42 bytes def f:nat->nat|0:=0|1:=1|(n+2):=f(n+1)+f n Try it online! Lean is a completely different kind of a programming language: it is a proof-assistant. That means, mathematical theorems can be formalized and proved in Lean, and mathematical objects can be constructed in Lean.

 
12:41 AM
@LeakyNun You can't use the text Try it online! and then link to somewhere other than TIO :P
 
@Pavel :P
 
I was forced to switch to "Test it online!" after losing a lawsuit to Dennis
jk about that last part, of course
 
Is there a brainfuck interpreter that can support any integer?
 
Probably somewhere
 
1:22 AM
@JungHwanMin I think this one does
 
 
1 hour later…
2:52 AM
@LeakyNun You can add a proper TIO link now: tio.run/#lean
 
3:24 AM
1
Q: Simulating Crashing Cars

Nathan WoodIntroduction I have some ASCII cars that have velocity and direction. For example: <> 1> 2> 3> After one second, I get <> 1> 2> 3> After two, I get <> 1> 2> 3> If two cars are too close, they crash. 1> <1 1> <2 After a second, this becomes ### ## If two cars in...

 
3:46 AM
CMC: Input a number N, then take integers X until N = X.
5
20
3
109
5
 
@Riker teal?
why teal?
 
4:08 AM
 
@Downgoat the fact that the T is a different width from everything else bugs me
@musicman523 test cases would be nice :) I would also suggest rewording the case for which no intersecting plane exists, perhaps something along the lines of "If no such plane exists, return something recognizably distinct from other valid outputs of your program, such as an empty tuple (), false, etc."
 
Thanks @ConorO'Brien ! Working on test cases now, trying to figure out how to solve my own challenge first so I can have a reference implementation :P
 
@ConorO'Brien Ruby -pe: 0until gets==$_
 
4:27 AM
@Pavel :o wtf
 
@LeakyNun Yeah I asked him about it a few hours ago
 
I can see that...
 
4:40 AM
@Pavel do you have any idea what this language is about though
 
Vaguely
 
it's really something revolutionary imo
 
I briefly read over the docs, but didn't have time to go in-depth
 
no problem
the fact that you can formalize theorems and proofs and have them checked
is what i think is revolutionary about it
although people in that field knows Coq better than Lean
 
Yeah, it's super cool from what i've read
 
4:45 AM
@Pavel do you have anything for me to demonstrate
I can't think of what I should demonstrate
 
@LeakyNun Not really
I'm not enough of a math person
 
oh
 
Sup
 
 
2 hours later…
7:06 AM
2
A: Fibonacci function or sequence

Leaky NunLean, 42 35 bytes 7 bytes thanks to Mario Carneiro. def f:_->nat|(n+2):=f(n+1)+f n|x:=x Try it online! Lean is a completely different kind of a programming language: it is a proof-assistant. That means, mathematical theorems can be formalized and proved in Lean, and mathematical objects ca...

when your language can prove the correctness
 
7:38 AM
That's really cool. :o
 
7:56 AM
0
Q: The Double's Base

BubblerBackground IEEE 754 Double-precision floating-point format is a way to represent real numbers with 64 bits. It looks like the following: A real number n is converted to a double in the following manner: The sign bit s is 0 if the number is positive, 1 otherwise. The absolute value of n is r...

 
@totallyhuman yes it is :P
 
8:44 AM
@LeakyNun I've been trying to get into Lean, I find it very syntax heavy
 
@Cowsquack well I can help you :P
 
9:34 AM
Yeah, it's not run o' the mill syntax. I'd learn it just to have that under my belt.
 
@LeakyNun Is it? How is it different from, say, Coq or Agda. It's not like it's the first theorem prover to exist. (Note that I don't know either of those languages)
 
@H.PWiz I mean theorem provers in general are revolutionary
it isn't that we have Coq or Agda here
 
Oh, ok
 
10:03 AM
@LeakyNun new room?
 
@Cowsquack hmm, sure

 Lean

Lean theorem prover: leanprover.github.io TIO: tio.run/#lean
 
A wild rubber duck just appeared in the lower right corner of each stack exchange site to help you with your problems.
 
Anyone know how to turn it off?
I can't see any [x] button in the dialog box.
 
reminds me of the clip
 
@user202729 I let it try to listen to me for a while and then did ↓
 
10:12 AM
@user202729 Go through with it once, at the end an "I hate this duck" button appears.
 
10:52 AM
We need a challenge to welcome our new Rubber Duck Overlord.
 
a challenge about quack verification, did it really come from a duck, or did the quack come from a cow?
 
11:12 AM
New? Any stackoverflow.blog mentioning it?
 
@user202729 I think this duck is based on the LIPRA-1 algorithm.
 
11:29 AM
... Oh, today is April Fool (from the meta post) (for some timezones)
 
Uhh... In Python def is a reserved name. And I want to create a class with a property named def, since it's a very common name for the defence character stat. I could name it DEF, but that's commonly used for constants... now what?
 
11:47 AM
@Soaku the tradition is to append _ to the name if it collides with a keyword or a builtin
 
12:04 PM
Anyone know an assembly documentation site?
 
@NieDzejkob Ugh. Could be but it's ugly ¯\_(ツ)_/¯
 
@user202729 there's like 50 different assembly flavors. Which one?
 
x86.
Or whatever this is...
 
12:21 PM
yeah, that's x86. What kind of thing do you need to know?
 
12:38 PM
hey, I didn't invite that duck in my profile!
 
1:14 PM
@Soaku id recommend using a prefix across stats, like stat_def or s_def
 
1:28 PM
@EriktheOutgolfer Quack. Dyalog has taken over :D
 
2:07 PM
(the writing prompt submiission is good too but I found the username guess pretty amusing)
 
@Riker oh how I miss halo :)
 
2:37 PM
@EriktheOutgolfer I see what you mean ...
Bug: whenever I hit the "No" button, it still continues...
 
@Zacharý it says "It doesn't matter. The duck can hear you anyway through the power of the internet"
 
...
 
or something like that
 
@Zacharý Not a bug, there's no microphone request either way.
 
Still seems a bit like a QUACKERY to me :D
 
2:57 PM
1
Q: Write a Shape Simplifier

Nathan WoodIntroduction I have a lot of ASCII rocks. They are built with dashes, pipes, Vs, carets, slashes and spaces. Example: /--\ | | | | \--/ I want to erode them, like this: /\ / \ \ / \/ All of the corners have become rounder. A more complicated example: /----\ | \------\ | ...

 
3:36 PM
> I hate this duck
Seems about right
 
3:57 PM
What's a good ternary conditional syntax
I can't use ? : because ? is something else already.
 
if else ?
 
It needs to be golfy
 
what language is this?
 
Snails
Hmm, what if I make both parts of it the same character
 
4:04 PM
no
 
yes!
 
no, what if you want to nest 'em
like A ? B ? C : D : E
 
Use parentheses.
 
but you just said you want it to be golfy
 
That case wouldn't even need parens.
Well, maybe it would
 
4:06 PM
it's the same as A ? (B ? C : D) : E to be exact
 
Not sure whether it should be left or right associative yet.
 
it depends on where you put your condition...
 
Q: Is there a mathematical symbol for factors of x?
 
On the left.
a/b/c would mean if a then b else c
 
you don't really have a choice about associativity
 
4:07 PM
a/b/c/d/e would be if a then b else if c then d else e
 
is it supposed to always eval b and c?
 
But it could also be if a then (if b then c else d) else e
 
by the way, there are 3 possible associativities, left, middle and right
 
Which one have I not covered?
 
I think right?
 
4:10 PM
What would the interpretation be of a/b/c/d/e
 
as you said, there are possible interpretations: (a/b/c)/d/e, a/(b/c/d)/e and a/b/(c/d/e)
 
Right-associativity.
 
The middle one does not seem legit.
 
the most legit one would be right
and I think left is out of the question
 
I can only see one possible interpretation. You can't do the 1st or 3rd, because of ? and : - they ain't the same operators
 
4:13 PM
in this case they are
 
We are interpreting a/b/c/d/e, not a?b?c:d:e.
 
Uhm, whatever a/b/c/d/e means... never mind
 
/ is like ? and it is also like :.
 
middle does not seem very legit, given that a/(b/c/d)/e is the same as a&&b/c/(a/d/e)
which isn't as common as a/b/(c/d/e) AFAICT
 
It's true that the right associativity corresponding to an if-elseif chain is more common in programming in general.
I'm not sure if this characteristic will apply to snails though.
Oh, it is also important to think about what happens when there are an odd number of operators.
 
4:18 PM
well, the obvious behavior would be if-then
 
Yes.
 
11 mins ago, by caird coinheringaahing
Q: Is there a mathematical symbol for factors of x?
 
a/b/c/d would behave quite poorly with left associativity.
So right it is.
 
with left associativity, it would be (a/b/c)/d, i.e. (a&&b||!a&&c)/d
 
Exactly, I don't think that seems like a very useful parse.
 
4:20 PM
yeah, looks too uncommon to me too
hm, so that's where experience helps
but I have a question; what would a/b return if a is falsy?
 
In Snails, expressions don't actually evaluate to values.
 
so a isn't a value either?
 
What would happen is that the match succeeds if a and b both match, or if a doesn't match (and then b is not evaluated).
 
so it's actually the same as an "and" operator
 
No, the empty string is equivalent to an "and" operator.
a/b is equivalent to a/b//.
Because the empty string is also like "true".
 
4:25 PM
every string contains the empty string
 
A boolean expression won't be changed by inserting "and true" anywhere in it.
 
or "or false", for that matter
 
4:52 PM
For the quine challenge, should the rules be changed to "least number of bytes" now?
 
probably
 
Thoughts on this syntax?
 
What's going on? I don't understand what the different symbols do
 
It's like a Haskell that can't do type deduction.
 
seems like it is asking for typos.
 
5:06 PM
Ok I kind of see what is going on now
 
@TheOneWhoMade Why do you think so?
@feersum Eh, my intention that it is capable of type deduction, but being explicit is good practice. Note that this is just an idea.
 
The overall nesting and number of times you have to hit the shift key, combined with the switching between symbols and letters.
 
@user56656 The descriptive function names are helping, I hope. :P
@TheOneWhoMade Huh, I never thought of it that way.
 
I don't know if you are being sarcastic
 
Also note that I wrote this after 4 hours of sleep on a really boring flight. :P
@user56656 I was thinking the sum and fibonacci algorithms would hint as to what exactly is happening.
 
5:15 PM
Also if you are thinking of designing a new language there is not really a reason to keep haskell's fall through.
 
@totallyhuman only one language I know that could be worse... Well, not know but know of.
 
Why not? Do you not find it useful?
 
But it's not pure.
Curry which is very similar to Haskell doesn't use fall throughs and while it can be annoying it forces you to write cleaner clearer code. And gives you the advantage of being much closer to pure declarative programming.
And it looks like your hypothetical language has much more powerful pattern matching making the need for fall throughs smaller.
For example your fibonacci would become:
fibonacci   := (int n) < 2
            -> n
fibonacci   := (int n) >= 2
            -> fibonacci(n - 1) + fibonacci(n - 2)
 
totallyhuman and that language would win code-golf for its uses
 
5:34 PM
0
A: Sandbox for Proposed Challenges

wastlASCII-art to numbers Any suggestions for the title? code-golf ascii-art Inspired by Digits in their lanes Input: An ASCII-art of width ≤ 11, consisting of spaces and #. (You can choose any two distinct characters instead.) Example: # ### # # # #...

 
# <warning type="practice" which="bad"> How do you rate this comment? :P
 
5:53 PM
Anyone know how to make Befunge generate a number with probability 1/N?
 
6:06 PM
Nvm, I think I got the general idea
 
I think so
 
guys I just found the best way to optimize programs: sleep for a negative duration, it'll make your programs terminate instantly, if not earlier than when they were executed!
 
hackerman
 
6:27 PM
0
A: Sandbox for Proposed Challenges

Aidan F. PierceHyperprogramming: X×Y, X^Y, X^^Y all in two code-golf math number arithmetic source-layout, just like the original. Heavily inspired by Hyperprogramming: N+N, N×N, N^N all in one. Your task is to write two programs so that they compute different hyperoperations when they are placed in relation...

 
@TheOneWhoMade Heh, that's only if I'm close to being capable of implementing it.
The pattern-matching would be hella useful though.
 
7:10 PM
@ASCII-only how do we want to do units in VSL
We were previously thinking of 10.cm but how does this work
I don't want to make Int a struct
 
8:02 PM
@ASCII-only why can VSL not parse a comment:
  4 | // a string you would eat ungodly amounts of memory so for this purpose you may
  5 | // want to reference the File class.
> 6 | //
    | ^
  7 | // VSL strings are _immutable_. This means that you can't really 'modify' a
  8 | // string, you must create a new one. This is automatically done with string
 
did you guys see the duck debugger
 
1/4 very useful
 
I posted an answer in Befunge >_<. My brain hurts now
 
@ConorO'Brien I got a duck but it's not rubber unfortunately :(
 
8:29 PM
Anyone here good at golfing Befunge?
 
No, but I can compile it to Seed, if that helps.
 
Nope :|
Wait, does that Befunge-God I've seen go on TNB>
 
James Holderness? (I think)
 
Yeah, that seems right.
 
@feersum Are you ever going to tell us how? :P
 
8:33 PM
Explanations are boring. People prefer mysteries.
 
:(
12
 
I think if we did a randomized trial, answers with only code would get more votes.
 
Don't explain it for the upvotes, explain it for the sake of sharing knowledge.
 
It would be very boring to write also.
But seriously, for most people I think seeing a mysterious answer will be much more enjoyable than a wall of math.
 
Well, it's kinda hard (at least from what I've learned in stats so far) to establish cause and effect w/o random assignment.
 
8:37 PM
Most of the time, even mathematically inclined people are just looking to relax by browsing PPCG.
 
Can't confirm, greatly prefer walls of math to arcane unicode
 
Then again, you have to consider things like QFT.
 
@feersum No need to explain anything. Just upload your Befunge-to-Seed compiler somewhere. :P
 
And if there's a wall of math it's like urghh I can't read this and then they feel slightly guilty.
 
@Zacharý Maybe that's part of the reason that I prefer the clock one...
 
8:39 PM
That would be doable.
 
Yep
 
Could be annoying though, if some kewl d00dz start posting barely-golfed Befunge answers to Seed everywhere.
 
I don't think that'll happen
 
We do have a button for those.
 
Or... I could make a Seed compiler web service!
 
8:43 PM
All the disadvantages of a compiler, combined with none of the advantages of a compiler. I like it!
 
Free tier would give you 6000-byte answers, or with a premium subscription you can get the 3800+4n or whatever it is.
 
You're going to make billions!
 
9:00 PM
@feersum you could expand your business, making seed-variants of the most popular languages, each coming as an extra tier
 
Oh yeah, better get busy spamming esolangs.org.
And the Platinum subscription gives you access to a Seed variant where the seed is written in hexadecimal instead of base 10. Imagine the byte savings!
 
Obviously it should be just straight-up encoded in base-256...
Guess we've got to FEER SUMbody taking over the world.
 
If you have to ask about that subscription level, it's not for you.
 
90 bytes:: https://codegolf.stackexchange.com/questions/66922/1-n-probability
I am just done.
 
@Zacharý I guess it wouldn't be worth reminding you that we all hate puns here?
 
9:10 PM
@Zacharý you should link to the answer, not the question :P
 
1
A: 1/N probability

ZacharýBefunge-93, 99 98 96 95 92 90 bytes <vp90:g80<p80 & v?v>v>9g1-:0`| 0^1-:0v\g80:$< >v<10^ +*2p90< v>\^`$`>! .v _^>| @ >$v Try it online! This deserves a separate spot from my other answer, as I did this from scratch. This generates an integer (x) in the range [0,2^n) using random binary...

 
@cairdcoinheringaahing puns are great what are you talking about
 
Not all of us hate puns, they just hate onslaughts of them
<sarcasm> plz send teh upvotz </sarcasm>
 
@Zacharý Have you thought about following the Jelly approach? It seems as though it'd be shorter
 
@cairdcoinheringaahing ...
That is sarcasm, right?!
 
9:16 PM
No... why?
 
._.
Do you know how to correctly befunge-93?
There are no lists, unless I'm horribly mistaken
 
> This generates an integer (x) in the range [0,2^n)
 
The only random in befunge is a 4-way random.
 
Use the same method to generate an integer in the range 1 ... n, then check if it's equal to 1
 
._.
I can't do that
It's asking for uniform randomness... not binomial.
And I'm not Markoving my self to death... so that is not an option
 
9:45 PM
0
A: Sandbox for Proposed Challenges

MD XFPrintable ASCII table Your challenge is to output this exact text: 32 33 ! 34 " 35 # 36 $ 37 % 38 & 39 ' 40 ( 41 ) 42 * 43 + 44 , 45 - 46 . 47 / 48 0 49 1 50 2 51 3 52 4 53 5 54 6 55 7 56 8 57 9 58 : 59 ; 60 < ...

 
:D
 
10:31 PM
@Zacharý We were about 4 hours from it dying this morning. It is just barely hanging in there
 
It technically can't die... the user who made it is no longer with us.
So it can live on past death
 
@cairdcoinheringaahing also works with --, ** and //
 
@Zacharý I don't know what you mean. The challenge ends when there is two weeks without an answer.
 
There's no one to accept it ...
Wait, can mods accept answers on a challenge that is not their own?
 
Sure I guess, but that doesn't really mean much
@Zacharý No they can't
 
10:35 PM
This is ridiculous.
 
SO added a duck debugger tool
Check it out
 
2 hours ago, by Conor O'Brien
did you guys see the duck debugger
samurai'd
 
12 hours ago, by Laikoni
A wild rubber duck just appeared in the lower right corner of each stack exchange site to help you with your problems.
Ninja'd
 
When was it added?
 
Rip
 
10:40 PM
As soon as it became 1/4/18 anywhere in the world
 
UTC+14 to UTC-12
(or reverse? Dunno)
 
lul
 
I wonder if a codegolf challange to click the duck would be possible
 
And with that 84 byte monster, I'm going to do stats hw...
<s>send the up votes</s>
(where s denotes sarcasm)
 
11:00 PM
Anyone know what reddit is doing for april fools day?
 
11:14 PM
@Downgoat Almost certainly a result of matching /\/\/.+/
 
so how's the april fools duck work?
 
@Riker You talk to it in and you magically know the answer
 
is that all? rip
it didn't work for me :/
 
Did you try clicking on it
 
oh no the duck did something
it just didn't let me magically know the answer
 
11:16 PM
"Do you have a microphone?" clicks No "With the magic of the internet, you can just explain your problem anyway! Speak naturally."
 
@Riker What are you talking about, it told you the answer is "Quack".
That's the answer
 
@ETHproductions ikr
and you can't close it eithe
@Pavel no it's not
the answer is at least 4 paragraphs
considering the question was 'write me a 4 paragraph essay'
 
@Riker That's not a question
that's why you didn't get the right answer :P
 

« first day (2618 days earlier)      last day (2232 days later) »