12:00 AM
@user here you go: `^(((<|>|\((?3){3}\))(?=(?>(?4))?>)(?3))?(\((?1))?)(.)` - result is in `\$5`.

12:14 AM
@Neil That's brilliant!

12:52 AM
CMC: Given a number, zero or one indexed, return the number with that index in `[0, 1, 2, 4]`.
So `0 -> 0`, `1 -> 1`, `2 -> 2`, `3 -> 4`

@RedwolfPrograms Python 2, 15 bytes: `lambda n:2**n/2`

1:25 AM
@RedwolfPrograms Scala, 16 bytes: `n=>((n+5)%4+4)%5` (there's probably a better solution)
@RedwolfPrograms Scala, 6 bytes: `_*10/7`. I was being dumb before

@user note that the leading `^` was only necessary for your `/gm` flags in your linked version, I submitted my version as an answer without it

@Neil Ah, I was wondering why that was there

1:56 AM
0

Definition Bitetretar is a large number equivalent to the number in the Fast Growing Hierarchy, so use that as the number to surpass. Rules You may not accept STDIN input. You may only use an esoteric programming language. You cannot use any functions. Scoring This is , so the program with the...

2:51 AM
Can anyone with experience in both speak to how Wolfram/Mathematica compares to Sage? I want to learn a high-level math-oriented language, and like the idea of Sage, but wouldn't paying for Wolfram if the language is significantly better.

3:12 AM
@Jonah Sagemath is an extension of Python which is made specifically to be math oriented

@Jonah Mathematica is a unique functional language on its own

If you're looking for math only then I'd use SageMath, it's got enough in that department
Mathematica is just.. insane

Meaning... insanely fully featured?

I love the M-expressions in Mathematica.

It's got so many quirks and updates with random functions nobody will ever use
It's got hundreds of custom datatypes
and functions to use those with

3:14 AM
But sometimes, they can help you win challenges, if you find the right built-ins.
You can do a lot in a few bytes.
(Really, I hate Python.)

hopefully Jonah doesn't lol
I think the wolfram engine is free for use
so if you want, try that out
mathematica has excellent documentation

I like Python fine. It's not really a negative or positive. I'm more interested in knowing.. is SageMath mature enough that, say, many professional mathemeticians would use it over Wolfram?

Obviously, Mathematica is a lot more advanced than SageMath.

Mathematica is a separate language meaning it has its own stuff for displaying images, visualizations, and stuff in house
any mathematician would prefer mathematica unless they had a soft spot for python
sagemath also has visuals, just not equally customizable or varied

Thanks.

1 hour later…
4:22 AM
Opinions on VTRing this question?

Wow, closing the question actually brought the OP back to edit it
Also, I'm unable to think of a new music meme for this weeks chat bio

Pretty impressive for an 8 year old question, esp. a day or so after it was closed

nvm i got it

I'm excited

okay updated
I change both profile and chat bio weekly
usually with verbose memes
CG profile gets a regular meme
Chat bio gets a music meme

4:27 AM
I liked the one a few weeks ago
With the gist

hehe
I put effort into it

Do you still have the link to it

one second
also, i just remembered i need to reapply for gh pro
actually nvm
that's tomorrow's job
mainly because it hasn't expired yet lol

Gonna put it in a markov chain

@RedwolfPrograms can you put this conversation into the chain next?

4:33 AM
I'll copy the conversation next
Ignore the misspelled file name lol

@RedwolfPrograms that is extremely hard to rap

@Lyxal Bet :p

@RedwolfPrograms razetime country.

Uhh
> Tasty are dennis same person.

> Offended God p.

4:39 AM
> Everyone 22 can't do anything about being.
Facts

"Dad, why do we make people fight wars?"
> For your country, Because Razetime.
5
Another favourite
> Meanwhile always is no.

@Lyxal what
oh
markov chains

1 hour later…
5:54 AM
@Razetime no questions
Comprehend?

6:30 AM
comprehend indeed

good
scurry along now

7:03 AM
huh, it's been exactly 2 years since i joined cg&cc

happy cake day!
oh wait this isn't reddit.

@Lyxal damn, i was about to repost the left or right challenge again

@UnrelatedString do it
you wont

1 hour later…
8:12 AM
200 rep to the best dc answer to codegolf.stackexchange.com/q/11336

8:33 AM
29

The task is simple: print The quick brown fox jumps over the lazy dog using as few distinct characters in your source code as possible. print "The quick brown fox jumps over the lazy dog" has a score of 29 characters, as all 26 lowercase letters appear at least once, as well as an uppercase T, sp...

8:46 AM
Any remaining problem with codegolf.meta.stackexchange.com/a/19310/69850 ? going to post it soon.

2 hours later…
10:49 AM
@user41805 your bounty brought me back to make new bash, sed and dc answers and I was shocked no one thought of the trivial dc answer to that question. I posted it at codegolf.stackexchange.com/a/218683/59010
@user41805 In fact I suspect there are multiple 3 char solutions possible, besides the trivial ones of replacing 1 in my answer with any digit from 1 to 9. For example, one can use multiple v operations to do successive square roots from an incredibly large unary number until you get to the ASCII code.

11:35 AM
hey @seshoumara, nice seeing you again

It's obvious that there must be one digit, one operator and `P`, right?

hey, thank you, nice to be back.

If it's not `Z`, it must be an arithmetic operator.
However it will throw various errors on stderr (which is allowed)

@user202729 Yes, that's how 3 char solutions will work exactly. With Z though, no error is given.

@user202729 Why would anyone go upvote the other comment there. :/

11:41 AM
There are a few operators in dc that work with a single number, but besides Z, perhaps v (square root) can be used, but I highly doubt it one can be that lucky. (as explained above).

i'm still thinking if there is yet a shorter approach (but some bytes can be shaven off of your solutionto beat the jelly solution)

Obviously there's.
Not with `Z` though.

yes, so 'best' first by the count of unique chars, then by bytecount if there is a tying dc submission

Guess I have something to do now.

11:45 AM
Well currently there is only one 3 char dc answer, so I can relax for the moment :)

hang on, i think you can have 2 unique bytes

I can't figure out how.
12 mins ago, by user202729
It's obvious that there must be one digit, one operator and `P`, right?
...

oh i remember now, i didn't generate that dc solution because i couldn't (be bothered to) figure out how to split an array in j

You can do `zzzzP` but that...
Wait that might actually work.

11:49 AM
Expect the resulting program to be not runnable, however.

i mean, you can still golf it to probably being able to run it

Is it fair if I try to beat you to posting it? You came up with the idea.

that's why i put the bounty, to encourage others to it

@user41805 nice one!

Oops. The program takes 271 TiB.
And it's the best one.

12:03 PM
hmm, how do you decrease the number after some succession of z?

You can't decrease it, right?
Only `z` and `P` can be used.
Since you need to store that many elements in the stack...
It's impossible to run the program without swap, and thus it will definitely take years to run.
Well anyway. It's valid right?
Unless dc has some weird limits like "there can't be more than 2**32 elements in the stack"

wait, I have another idea :D

hey seshoumara

I can't find any instruction that pushes without an existing number except digits and `z`, and `z` alone makes the program that large.

using z and P, to make it drastically shorter than terrabytes

12:06 PM
I did do that.
That's the optimal one.

@Razetime hey

```#!/bin/python
from math import isqrt
import math
import subprocess
from typing import List, Tuple, Union
import functools
print()
s="The quick brown fox jumps over the lazy dog".encode('u8')
assert int.from_bytes(b"AB", "big")==(65<<8|66)
@functools.lru_cache(maxsize=None)
def value(i: int, j: int)->int: return int.from_bytes(s[i:j], "big")
@functools.lru_cache(maxsize=None)
def work(i: int, j: int)->Tuple[Union[int, float], List[int]]:
assert i<=j<=len(s)
v=value(i, j)
if j==len(s): return (v+1, [v])```

That's the generator program.

@user202729 what

12:08 PM
my python is rusty at best, so just post your answer and then mine, using 2 chars, then see, unless we think of the same thing

Wait, `P` does pop after printing.
It needs to be changed a little but...
You can't get much shorter than that.
```#!/bin/python
from math import isqrt
import math
import subprocess
from typing import List, Tuple, Union
import functools
print()
s="abca".encode('u8')
assert int.from_bytes(b"AB", "big")==(65<<8|66)
@functools.lru_cache(maxsize=None)
def value(i: int, j: int)->int: return int.from_bytes(s[i:j], "big")
@functools.lru_cache(maxsize=None)
def work(i: int, j: int)->Tuple[Union[int, float], List[int]]:
assert i<=j<=len(s)
v=value(i, j)
if j==len(s): return (v+1, [v])
best: Tuple[Union[int, float], List[int]]=(math.inf, [])```

@user202729 how is this run? py2 gives invalid syntax at the `i: int`

12:48 PM
CMC: Given a list of finite floating-point numbers and sentinel values, return the average of the finite numbers, but return the same sentinel value if there are no finite numbers. In SQL this is just the AVG function, where the sentinel value is NULL.

1:12 PM
Correction: 122.47315051766873 TiB
@user41805 There, I posted mine.
With only `z` and `P` I doubt it's possible to do anything else.

1:40 PM
0

Hello World! - Generation 3392 Your job is to create a genetic algorithm that evolves and mutates its string until the output is equivalent to "Hello World!". The genetic algorithm should start with a random string generated, and continue for generations, making random mutations to its code, like...

1 hour later…
2:46 PM
@NewSandboxedPosts Someone help me to explain to the op please.

3:35 PM
0

Given a BF program consisting of only the characters +-[]<>., with the property that there's an equal number of < and > between every matching pair of []. Then, we can tell exactly where the memory pointer is for each instruction executed. The memory can be rearranged so the program is shorter, w...

4:11 PM
We should just not use the sandbox anymore and tell people to just live with the down votes on main.

@user202729 why?

@user202729 The sandbox isn't perfect, but it's better than not having it

Currently its sole purpose is to avoid people initially downvoting/closevoting the challenge on main, no?

@user202729 Yes, but indirectly. It's purpose is to provide a place where people can point out issues with challenge ideas (and allow the author to fix those issues) before posting to main

Hm. So the important point is that people must not be able to answer before it's reviewed, right?

4:16 PM
For your latest challenge (which is what I suspect caused this), I get what Jonathan Allan is saying. The formal definition is (like most "formal definitions" out there) difficult to understand for the lay person. I personally disagree with Jonathan that every challenge must be easily accessible, but the challenge could be better if someone who did understand it could phrase it more accessibly

The informal part is pretty readable if you already know what BF is though.
we don't get to design the site anyway, but

@user202729 No, the important point is that people can fix holes, make things clear and get basic feedback before a challenge could be ruined on main

@cairdcoinheringaahing That's the same as what I'm saying, no?

@user202729 Similar. Some challenges are posted to the sandbox with no issues and immediately posted over to main. The sandbox allows for fixes, it doesn't require fixes

"no issue" is a type of review.
About the challenge... I could describe what BF is, but I think that the effort required to understand that is more than that to understand the formal description (and to actually understand the challenge you need to formalize it anyway)
So what's the point?

4:21 PM
@user202729 Agreed. I think the main issue with the challenge is that the informal bit simply goes "The memory can be rearranged so the program is shorter. Write a program to do this", which is far too undersimplified for the site, meaning that if you don't understand the formal definition, the challenge is unclear
Unfortunately, while I understand what the challenge is, I don't understand the formal definition enough to help you write it in a more accessible way
It's a weird blend of being both too unclear and not unclear at all, depending on how much you know about the topic

4:35 PM
@cairdcoinheringaahing Is the informal one unclear? What's the issue?

@user202729 It's not so much "unclear" but more "underspecified" in that it's missing the standard rules that go along with most code-golf challenges (I/O, "shortest code wins", etc.). One key thing that sticks out to me is that, as written, there's no need to manipulate the input, so long as the output's length is minimised and the memory the same. That may be correct, but it doesn't say that anywhere in the challenge
A worked explanation is also never a bad thing. The fact that these are minor things that are easily corrected is why I haven't cast a VTC

@cairdcoinheringaahing Manipulate? The input? What?

@user202729 By the input, I mean the inputted bf program. "Manipulate" as in the program doesn't have to be related to the output aside from the memory
The swapped `<` to `>` in the second example is what's prompting this. It seems as though the output can simply change arbitrary things in the input, so long as the memory is the same

4:54 PM
@user202729 your dc answer can't run on any architecture, because of the RAM first of all, then the limitation to the maximum file size. Still, I liked your answer.

@seshoumara Can it? There's swap and NTFS/ext4.
I think 64-bit systems can handle it just fine?

Well I googled and on Windows you can't have files larger than 16 Tb I think it was.
I guess you can split your code into multiple such 16 Tb files, but then the OS needs to give to dc probably 122*2 Tb (source and stack). Surely no current PC can do that.

> The ext4 filesystem can support volumes with sizes up to 1 exbibyte (EiB) and single files with sizes up to 16 tebibytes (TiB) with the standard 4 KiB block size.
Although I guess the swap size is much smaller than that.
Besides just make the block size larger.

Can't NTFS handle files up to an EiB? Or is that also volume size

@cairdcoinheringaahing Now it seems like that you don't bother to read the formal description and nitpicking me. -- Anyway, I added a FAQ.
(don't take offense...)
@seshoumara Finding the shortest 3-distinct-character program is more interesting.

5:02 PM
@user202729 Don't worry, I know how frustrating it can be if you don't see what's unclear in a question that people are insisting is unclear. Plus, I'm a difficult person to offend :)

@user202729 I agree. I already found a shorter 3 char version with 1ZP. My intuition tells me there are other 3 char dc solutions out there, much shorter than 3.6Kb.

Try it online! Any mathematica experts know how to make this work?

5:48 PM
@user202729 agreed too, even though the bounty will likely go to yours, i'm interested in seeing the shortest dc program with 3 unique chars
@seshoumara "your bounty brought me back to make new bash, sed and dc answers", i'm not sure if i told you already, but here's 400 rep for a sed fizzbuzz solution shorter than mine (currently 129 bytes) codegolf.meta.stackexchange.com/a/18428 . my rationale is mitchs's 99b sed (no extra flags, so no `-r`) solution on anagol golf.shinh.org/p.rb?FizzBuzz#sed
yeah i'm really awful at arithmetic in sed

6:33 PM
@user41805 interesting. I love that you also post answers in sed. That is my fav esoteric language out of all.

2 hours later…
8:31 PM
TFW you download all of (english) wikipedia but it's the wrong one and you have to do it again :/

8:57 PM
@user41805 ok, done. I got your sed answer to that FizzBuzz challenge reduced by 3 bytes.
It was a dirty trick, the result is still the same code, so I don't want to post it as a new answer. If I send it to you here or as a comment to your original answer, can you send me directly the rep?

9:14 PM
@user41805 Based on that 2nd link, are you telling me there's a 99 byte solution? Or even a 30 byte solution???? If so, then I definitely have to find one below 100 bytes. But for the rep, 126 is enough.

9:58 PM
G'day mates. Throw another shrimp on the barbie while we have a chin wag about the hard yakka yous have been doing.

@Lyxal If we're doing stereotypes, I'm currently on my third pint and fifth cuppa while scoffing my ninth fish and chips and I'm very angry about whatever the latest thing Europe is doing :P
3

Fair dinkum. Are they being a bunch of drongos over there?

@Lyxal They keep telling us that we shouldn't be fishing in their waters, but I'm pretty sure that Brexit means we can do whatever we want and screw anyone who says otherwise :P

10:14 PM
Heh, imagine being part of a larger land mass

@Lyxal I mean, the UK is substantially smaller than Australia :P

@cairdcoinheringaahing yeah, and it ain't even a continent

10:47 PM
> Dennis you two are you so an ice cream licking mob boss.

I was going to put the code I used to generate those on github but I forgot halfway through and downloaded wikipedia
2

> Everyone else know everything.<br>
Unfortunately, I can relate to this one.

All of english Wikipedia

@RedwolfPrograms I can't tell if you're kidding

I'm not
I've got the whole thing on an SD card right now, working on a way to format the XML as something more useful

10:51 PM
Huh, I figured that would have taken a ton of space (and time to train)

Oh I'm not using it for the markov chain lol
It's 78GB uncompressed
Making an offline wikipedia reader thing™

Oh ok