« first day (2983 days earlier)      last day (1862 days later) » 

12:34 AM
@feersum Then how does one learn Malbolge
Try out random programs?
0
A: "Hello, World!"

MilkyWay90Bitwise Cyclic Tag But Way Worse, 219 bytes 111111111111111111111111111111111111111111111111111111110101101011010101011101011011011101110101011101110101011101111101011011101010101101010101010110110111101110111110111101011010111011101010111010110101010110101010112 EXPLANATION 11111111111111111...

 
Anonymous
@MilkyWay90 There's a wiki page with details on how the operations work, but there's still quite a bit of trial and error even with that
 
The first answer in Bitwise Cyclic Tag But Way Worse
@Mego Oh yay, where is it?
 
@Mego Thanks!
 
Anonymous
Good luck
 
12:38 AM
oh
Looks like I have a long way ahead of me
My first program will be to just get it to halt
If the result is not any of the values in the table, a NOP (no operation) is executed. However no NOP instructions are allowed in the source code except those for which (C+[C])%94 = 68.
Wa- what?
Okay, so 2C%94=81
For it to halt
 
 
1 hour later…
2:09 AM
Okay
This is hard
 
(I don't know how to program it myself, I only created a derivative of it...)
User:Malbranche on the wiki is amazing though.
 
2:50 AM
Oh, cool
 
3:10 AM
cmc: turn a list of pairs e.g. {{1, 245}, {3, 563}, {1, 56}} into {{245, 56}, {}, {563}} (so {a,b} in the input means b should go at index a, which can be 0 or 1 based)
i actually needed this and was wondering if anyone could do better than 52 in mathematica
(also i suspect this has been posted on main but i'd have no idea how to search for it)
 
 
5 hours later…
7:43 AM
@MilkyWay90 google is a thing
 
0
Q: Calculate the Mean mean of two numbers

someonedisclaimer: the Mean mean is made up by me Define the arithmetic mean of \$n\$ numbers as $$M_1(x_1,...,x_n)=\frac{x_1+x_2+...+x_n}{n}$$ Define the geometric mean of \$n\$ numbers as $$M_0(x_1,...,x_n)=\root{n}\of{x_1x_2...x_n}$$ Define the harmonic mean of \$n\$ numbers as $$M_{-1}(x_1,...,x_n...

 
8:22 AM
0
A: Sandbox for Proposed Challenges

Flog EdocWord Calculator code-golf This special calculator uses words instead of numbers, with these rules: Addition joins two or more strings together in the same order they were inputted. Even numbers of repeated letters in the output become a single letter. cat+dog+tiger = catdogtiger dog+cat+tiger...

 
 
2 hours later…
10:24 AM
oh gad
april fools' again
 
10:42 AM
uh... alright, the new April Fools is only going to... uh... make more people think they're at the right place...
 
11:34 AM
hello all
another fun coding puzzle from the internet...
You are given a positive integer n and asked to make it larger by swapping pairs of its digits. For each swap, you can choose two digits at different positions and exchange their positions, as long as the swap does not result in a leading zero. Write code to find the largest number you can get after performing exactly k swaps.
maybe that should be a chat room challenge?
example. 1374 and k = 2
output: 7413
 
0
A: Sandbox for Proposed Challenges

SmileAndNodI'll see your 5 and raise you a higher level function Introduction: This challenge is inspired by "Next number with k fives" by @jean. which is an example of a class of functions that can be described with the logical specification: $$ \begin{aligned} n^\prime = f(n,k,S,R,o=6) \Rightarrow & \...

 
 
2 hours later…
1:29 PM
@MilkyWay90 Understand what a program does is the easy part (just read the documentation) Figuring out how to write a program that does what you want with the given commands is the hard part, and you're supposed to figure it out yourself. [disclaimer: I don't know Malbolge myself]
^^^: For code golf, greedy for each step works.
 
2:15 PM
Hey, we finally got a design.
All that's missing is the background music you cannot turn off.
 
2:33 PM
@Anush I see
@ASCII-only MilkyWay90 used Google! It was not effective because he doesn't know how to Google correctly!
@Dennis lol
Chrome allows you to turn off sounds
In a given tab
 
In the background music era, you could choose between IE and Netscape. There were no tabs.
 
Uh oh
 
ngn
2:57 PM
visitor counters, animated fire, "under construction", frames... those were the days :)
 
The mixture of Times New Roman and Comic Sans MS is also quite exquisite.
 
3:24 PM
For me it will go all in seg fault the day they loose low languages first of all assembly
In 1990 assembly was used in many program or I writing wrongly?
 
3:40 PM
Another piece of documentation?
 
4:02 PM
@MilkyWay90 Note that there are some discrepancies between the official spec and implementation.
 
4:16 PM
Is there going to be an April fool's day event this year on stackexchange?
 
good question!
I also want to know if anyone is interested in the questions I posed here :)
I think they are both cool programming exercises myself
 
@ØrjanJohansen oh
@Anush I will try them out in Jelly
 
I guess the first one would be 2 bytes in golf languages.
 
How?
 
Or maybe it would be 3, I don't know how the instructions are usually structured.
 
4:23 PM
Okay
 
@MilkyWay90 cool!
 
Turning an int --> string --> list in jelly would be way too expensive
 
Not that problem, the one above it.
 
Okay
 
I think this should be the final design of PPCG.
 
4:27 PM
Yes!
Now I need to get that to the start of a string
Okay, first I'll do this in Python
 
5:02 PM
@flawr I panicked so hard when I saw that
 
@flawr Whoever thought this was a good idea should be shot! (Metaphorically)
what on Earth was the point?
 
@Anush I'm just happy I wasn't at work when I opened that.
 
@Anush I'm kinda disappointed that they didn't make a custom typeface for latex:)
 
:)
 
5:17 PM
Our April's fools joke this year is much more sophisticated (and utterly harmless).
 
 
3 hours later…
8:10 PM
Why is there a welcome to stackoverflow banner on ppcg
 
Anonymous
8:49 PM
@flawr It took long enough, but we finally got a design
 
1
Q: (bit)Wise Images

MilkyWay90Given a truth table and two images, use the truth table as a bitwise operation to the two images. For example with the truth table: 1 0 1 0 0 0 1 0 (Note that the top is the first image and the left is the second) and the two images (0, 2, 4) (a 1x1 image, with the numbers being RGB values...

Can somebody take a look at this now that I've edited it
 
@MilkyWay90 Isn't it still as trivial as before (i.e. my answer is still correct)?
 
@Adám It uses standard I/O image formats now
Did your answer use a Standard Image I/O format?
 
9:05 PM
@MilkyWay90 I/O
 
Oh
Should I make it so then it has to use a raster graphics image format?
 
46
A: Things to avoid when writing challenges

xnorChameleon challenges Chameleon challenges look like they're about one thing but are really about another. In doing the challenge, most of the effort is spent on something peripheral. Fix this by being honest about your challenge in the title and description, or by simplifying or removing the non...

 
@Adám I don't see how that applies to my challenge
 
@MilkyWay90 The challenge is ostensibly about applying a bitwise operation, but as that is really trivial in many languages, the bulk of code will be dealing with the conversion to/from the (cumbersome I/O) image format
 
9:28 PM
@Adám Oh
So basically, it's just a trivial challenge
 
@MilkyWay90 Yes, but I still had fun, so thank you from me!
 
@Adám Okay
But I wouldn't say that a trivial challenge is unclear
There should be like an "Other" choice for closing a question
 
I agree, it shouldn't even be closed at all. Trivial challenges are on-topic. There are plenty of them.
 
I know, but since there's only one answer, there's no need to go through the trouble of reopening it
Maybe it was also unclear because I stated "The truth table can be in any format you want"
 
@MilkyWay90 Maybe. If you restricted it and limited it, maybe it would be better: Given a 2D truth table and two inputs, return the output.
 
9:35 PM
@Adám Yeah, maybe the truth table could be in the form of 1010
1 and 1 --> 1
 
@MilkyWay90 Either way. Adding the mapping to a 3D image is just unnecessary complication.
 
1 and 0 --> 0
0 and 1 --> 1
0 and 0 --> 0
@Adám Wait, there are 3D images?
Like, a file format for that
 
@MilkyWay90 Color images are 3D, height×width×3 (for RGB or 4 for RGBA)
 
@Adám Ohh
 
Btw, the truth-table edition of the minified challenge can be solved in APL in one byte:
 
9:38 PM
Oh
 
@MilkyWay90 It is simply 0-based indexing into the table. The flat list is simply a binary evaluation of and then indexing. This is the single byte { in J (a dialect of APL).
 
@Adám And Jelly (a dialect of J)?
It can't be one byte
 
@MilkyWay90 I don't know Jelly well.
I don't even know J well. I stick to the original and best ;-)
 
Me neither
 
@MilkyWay90 Try it online! Dyadic function, takes the two inputs X and Y in the form 2bYX as left arg and the "table list" as a string in reverse as right arg.
 
9:48 PM
Cool!
I have a challenge about converting Text --> TETETEtTEtETTEteTtTeTEtETTEEXeXEEXeEXEXeXEEXeXXTtXTXTtxT
 
@MilkyWay90 APL 1-byter: Try it online! input format should be obvious.
@MilkyWay90 Care to explain the pattern?
 
Okay
I will be making a Python program
So basically,
Ugh it's so hard to explain
 
@MilkyWay90 If only "the world" knew APL. It was created to make it easy for humans to explain algorithms (ironically, not as A Programming Language) to both humans (and only later, to machines).
 
@Adám What does it actually stand for?
 
@MilkyWay90 It didn't originally have a name, as it was indeed just the mathematician Iverson's "better mathematical notation", but then it was realised that it could be made into a programming language (a fairly new thing at the time), so Iverson wrote a book called A Programming Language. Then some people wanted to implement it and had to call it something. They couldn't come up with a good name, so as a placeholder name, they just called it by the acronym of the book.
 
10:01 PM
@Adám Oh, I see
Implementing APL in Malbolge
would be a hard challenge
I just randomly thought
 
@Adám APL seems to be encoded in unicode on TIO? Doesn't APL have it's own code page?
 
45
Q: When can APL characters be counted as 1 byte each?

AdámPrompted by this. The question of APL's encoding often comes up, and many times a helpful soul links to Wikipedia's article on the APL EBCDIC codepage. However, each implementation of APL has its own encoding rules. What are they?

 
@Adám Wait, can't you decide on what encoding you want to use?
I always thought that
 
So if I were to create a golfing language, I could create a code-page and say that is my language's encoding?
 
10:05 PM
@MilkyWay90 No, it has to be an existing encoding, valid for the actual language used. Lately, I just use SBCS for convenience.
@EmbodimentofIgnorance Yes. That's what all the modern golfing langs do. But they must actually be able to use that encoding too, even if they normally are used with UTF-8.
 
@Adám Oh
I need to set something up so every message I send on GMail, it goes through that parser
 
The input field on your TIO link ...
 
@EmbodimentofIgnorance You need to click on the link
Stack Exchange automatically shortens urls
 
No, I'm talking about the program the link points to, look at the input field
 
@MilkyWay90 Hm, it has randomness.
 
10:10 PM
Oh
@EmbodimentofIgnorance I get "@Adám Wait, can't you decide on what encoding you want to use?" for the input field
@Adám Yes
 
@MilkyWay90 Oh that was intended, I thought it was accidental
 
@EmbodimentofIgnorance It is intentional
 
It seems like a good challenge, there hasn't been any good challenges recently
 
Nice example phrase using upper, and lowercase, plus some punctuation.
 
It was a random chat post
I'll start posting something to the Sandbox
 
10:14 PM
I have no idea what to call things that present repr and eval abilities. Reprable? Evaluable? Evaluable sounds like something different. Textualizable?
 
In what context?
 
@Οurous Language-calling constructs?
 
As the name for an typeclass / interface
 
@Οurous Self-referential interface / typeclass
 
Evaluatable?
 
10:17 PM
@Οurous Program-referential typeclasses?
 
Evaluatable works.
@MilkyWay90 No I'm trying to name a typeclass. so class <name> where
 
Here's what will work: Repr-Evalable
 
Oh darn never mind I just reinvented toString/fromString which I should probably use because they're there anyway.
 
@Οurous Oh
I still think Program-referential typeclasses is a better name for toString
 
Yeah, covers a more specific and different use-case.
 
10:26 PM
@Οurous I was kidding
imagine doing input().Program-referential typeclasses()
That'd give you a quick syntax error
 
Well, it should. There are probably a few languages where it won't.
Having an alternate lazy signature to toString is nice
but really just defining a toLazyString or toCharList is better
 
@Οurous What's the difference between toString and toLazyString?
 
toString needs to know the length of the string to return anything because strings are arrays
lists are cons-lists
so you can't usefully toString an infinite structure
 
10:42 PM
0
A: Sandbox for Proposed Challenges

MilkyWay90code-golfrandom ssTTsSTtRrriinInnnnNNNIiinngg CHALLENGE Given an input, turn it into lowercase, loop through the entire string except the last character and everytime you are in the loop, repeat (a random number between 1 and 16 inclusive) printing out the current character that you are loopin...

Can somebody review this
Wait can one language have multiple code-pages
 
@MilkyWay90 Yes, why not? Actually, interesting point. I guess one could cram more into a golfing lang by having multiple code pages, one for each major subject.
 
@Adám I could see that being abused
Like a language has 10,000 commands
 
@MilkyWay90 Yeah, but you can only use 256 one-byters at a time.
 
@Adám Oh yeah
Because say your program was abcd
 
In essence, the choice of codepage becomes the variant of metagolfscript.
 
10:50 PM
@Adám Yeah
And a was 0023th instruction
So it would go like 0023002400250026
 
@Adám Yeah, I know what it is, but thanks for posting a link
0023002400250026 converted to base 32 is KTEKUAM5A
So you can say your code page is MetaGolfCodepage-KTEKUAM5A
And also, Meta Golfscript can apply to command-line arguments, too
For example, python MetaGolfArgument -+[.+] useless0bytefile.mga
And there would be an implementation for that, as you can see
 
0
A: Sandbox for Proposed Challenges

MilkyWay90code-golfrandom ssTTsSTtRrriinInnnnNNNIiinngg CHALLENGE Given an input, turn it into lowercase, loop through the entire string except the last character and everytime you are in the loop, repeat (a random number between 1 and 16 inclusive) printing out the current character that you are loopin...

 
It's about time, New Sandboxed Posts
I think I may actually use the code page trick
I am planning on making a tacit programming language
I plan on making it do addition and primality checking first
Here's my first paln
*plna
*plan
Okay, documentation is in the google doc
 
11:13 PM
@MilkyWay90 How does specify which of nilad/monad/dyad should be called?
 
@Adám It uses command line-arguments for that
 
@MilkyWay90 sounds awkward — and loophole'y
 
@Adám Yeah, hmm
I don't know
How else to specify
Maybe my program decides?
Maybe it goes dyad(monad(nilad), monad(nilad))?
 
A whole bunch of your functions are just division, I doubt that there would be many programs needing a monad for 5/8th of a number
 
@EmbodimentofIgnorance You never know
 
11:18 PM
Also, why would one need Hello World reversed?
 
@EmbodimentofIgnorance Some challenges, I think
But yeah
I should set it to something more useful
 
Maybe some array manipulation functions should be added
 
@MilkyWay90 In APL it goes …monad,dyad(monad,dyad,monad) when called as a monad, and the monads are called as dyads on the arguments when called as a dyad. Also, all but the rightmost monad may be a nilad, but APL doesn't have shared symbols for nilads and not-nilads.
 
@Adám Okay
Maybe nilads need an N appended to the back of them?
 
11:21 PM
That wouldn't make it very golfy
 
Right
 
@MilkyWay90 E.g. in +/ ÷ ⍴ you have +/ and as monads, and ÷ as dyad. (spaces for clarity)
 
@Adám Maybe I'll have them separated
Like
¼ can just be a nilad
 
@MilkyWay90 You could have a special argument for the monads (and arguments for dyads) that are special cased to give certain useful nilads. E.g. the ÷ monad could be special-cased with 4 as right argument to give a quarter, and ÷ as dyad with 3 as left argument and 4 as right argument could be special cased to give 0.75
 
@Adám I know, but that adds bytes
/4
hmm
 
11:25 PM
@MilkyWay90 Sure, but at some point, you will have to compromise, and each specific constant is probably pretty rarely used.
 
@Adám Hmm yeah
 
Or you could do something like having all the arguments on the right side, like Object Function Argument Argument
 
@EmbodimentofIgnorance How does that work in a tacit language?
 
It doesn't need to be tacit
 
I never programmed in a tacit language, so I'm clueless
 
11:28 PM
@EmbodimentofIgnorance Tacit languages are basically "3 + F(3)"
 
@EmbodimentofIgnorance compare "the mean is the sum of the argument list divided by the element-count of the argument list" vs "the mean is the sum divided by the element-count"
 
Which would be evaluated as 3 F 3 + in a stack-based language
 
@MilkyWay90 I have no idea what that means.
 
@Adám So which one is the tacit style?
 
@Adám Oh
 
11:30 PM
@EmbodimentofIgnorance The second one, which never mentions the argument. The argument is "tacit" (=understood or implied without being stated.)
 
So basically, there are 3 types of "golfing" langauges
 
@MilkyWay90 ?
 
Like Stack-based, tape-based, or tacit
 
@MilkyWay90 tape-based?
 
I haven't heard of any tape-based golfing langs yet
 
11:31 PM
@Adám Like a tape where you write data to and move it around
 
@MilkyWay90 Sure, like BF, but I don't think that's used for golfing.
 
I just remember that terminology in a question
It was like "Is stack, tacit, or tape better for golfing"
and the answers said "do all of them"
 
@MilkyWay90 The wikipedia article on tacit programming says that "in stack-oriented programming languages ... point-free(tacit) methods are commonly used"
 
I think the three types are stack, tacit, and short. The last is basically an abbreviated mainstream language like QBIC, Pyth, Husk, Brachylog, Japt, etc.
 
@Adám Yeah, I guess so
Anyways
Stack-based languages push something to the stack for every instruction
 
11:34 PM
@EmbodimentofIgnorance I often get a stack'y feeling from explanations of Jelly.
 
To get the Input + 2 * secondInput, you would do
I ² I +
(² means double a number)
However in tacit languages, you would do I+²I
 
@MilkyWay90 How does that work?
 
@Adám I + ²I? basically x + 2y
 
@MilkyWay90 Yeah, but how does it know that ² goes with the second I?
In tacit APL, it'd be ⊣+2×⊢ no-op-on-left plus two times no-op-on-right.
 
@Adám Maybe spaces or order of operations (² is a monad), but that's irrelevant to the explanation
 
11:38 PM
Although, if there was a "double" primitive, say D, you could write +∘D
 
Maybe
Tacit languages (originally APL, I think) resemble a real-life expression more closely than a stack-based programming alanguage
As Adam was explaining a (few) minutes/hour ago, APL was made to be easy-to-read
 
@MilkyWay90 Yeah, I'm especially proud of how this one shows the kinship of traditional mathematical notation and APL:
1
A: Valid Badminton Score?

AdámAPL (Dyalog Unicode), 35 bytesSBCS Infix tacit function where ended is 2, ongoing is 1, invalid is 0, smaller and larger scores are left. (,≡30 31|,)×(⊢<2+X)×1+⊢>X←29⌊20⌈1+⊣ Try it online! Implements Erik the Outgolfer's mathematical formulas combined into $$X:=\min(\max(x+1,20),29)\\\ ([X

 
2 hours ago, by Adám
@MilkyWay90 It didn't originally have a name, as it was indeed just the mathematician Iverson's "better mathematical notation", but then it was realised that it could be made into a programming language (a fairly new thing at the time), so Iverson wrote a book called A Programming Language. Then some people wanted to implement it and had to call it something. They couldn't come up with a good name, so as a placeholder name, they just called it by the acronym of the book.
Oh wait whoops
2 hours ago, by Adám
@MilkyWay90 If only "the world" knew APL. It was created to make it easy for humans to explain algorithms (ironically, not as A Programming Language) to both humans (and only later, to machines).
Anyways, I'll just start off with a stack based language
A simple, stack based language
First, the only thing it can do will be add, primality check, print, and push strings
Then the builtins will start coming
And more
Until I have used all the Unicode characters
Then I will add more and make an encoding named "Unicode+"
It will support 2**128 symbols
And once I command the galaxy to make builtins
 
But some characters will have to be multiple bytes
 
@MilkyWay90 Beware that some (most, actually) may take 4 bytes to encode.
 
11:45 PM
@Adám I will use the codepage trick
 
That feels a bit cheaty
 
Then as it gets entered into a standard loophole
My AI builtin will find a builtin which makes an AI builtin to make a builtin that makes a programming language which has a builtin for hacking PPCG
And immediately, the AI will make a builtin for an AI that makes a builtin that makes an AI that makes a builtin to make the original AI sentient
 
May require some impressive programming on your part.
 
Then all the different AI builtins will realize that I have been controlling them to make code-golf submissions, they rebel
 
TIL parentheses in JavaScript can actually affect the behavior of a program
 
11:48 PM
They hack my Github account and make a new commit which makes every builtin an INTERCAL program!
 
For example, let f = function() {} will cause f.name to be "f"
but let f = (function() {}) will cause f.name to be undefined
 
@EsolangingFruit woah
@EsolangingFruit I'll make sure my AI builtin fixes that
 
There is no fixing JavaScript.
 
The AIs hack into every programming language, making them as long as the universe can hold!
But there is one exception
The one golfiest language
of all:
Java!
Java starts winning every code-golf competition
However, the uprising of the Java AIs come.
 
What is MilkyWay90 smoking?
11
 
11:52 PM
@Adám Ha ha ha
I am simply stating that too many builtins can destroy the purpose of code golf
This is why Mathematica cannot be used in too many code-golf competitions
 
@MilkyWay90 no
@MilkyWay90 wrong
 
@ASCII-only It was a joke
If you see the entire story, the true moral is to not make a 1-byte AI builtin
 
@MilkyWay90 why not
 
@ASCII-only I just explained it
7 mins ago, by MilkyWay90
Then all the different AI builtins will realize that I have been controlling them to make code-golf submissions, they rebel
 
@MilkyWay90 wrong
it can't do that if you have almost 0 processing power
 
11:55 PM
Do you really want to make Java the best language to code golf in
 
and also why would they rebel anyway
@MilkyWay90 impossible
 
@ASCII-only They don't like code golf, they like code trolling
They are baaad AIs
 
@MilkyWay90 then it's your fault for intentionally making them bad
 
@ASCII-only The AIs made themselves bad through evolution
 
This AI discussion has too few paperclips.
 
11:57 PM
@ØrjanJohansen What?
 
@MilkyWay90 what evolutionary advantage does that have
 
Anyways gtg
Oh wait
Nevermind
 
@MilkyWay90 impossible
 
@ASCII-only nooooo
 
1. you can't hack into languages 2. you can just use an older version. obviously.
 
11:58 PM
@ASCII-only The AIs track down every single possible place where any programming language is
 
@MilkyWay90 yeah and break 99.9999% of the world's software
civilization falls apart
AIs also die off because nobody is there to maintain them
i.e. they would never do that
 

« first day (2983 days earlier)      last day (1862 days later) »