00:00 - 19:0019:00 - 00:00

12:00 AM
@user is this a metaphor or am I about to explain why vanilla is the best flavor of all?

Has anyone else noticed that the stack exchange icon in the top bar is switching between going to stackexchange.com and giving the community dropdown?

@rak1507 You can terminate in an error for -2 tio.run/##S8sszvj/38DQKs/KQbvaUNeq1krHQO////@6Zf9NAQ

nice
what's the shortest you've got

@tjjfvi I think the top bar is just links until all their javascript runs

Ah, that seems to be it, thanks

12:05 AM
@Wezl It's a metaphor, but you're entitled to your opinion. I just meant that having different variants of a language is a good thing :P

I don't consider the existence of chocolate ice cream a good thing :P

Then you owe us chocolate eaters a great debt since we're ridding the world of it :P
But more seriously, what are some major differences between ><> and Befunge? @fishypeople

btw it's pronounced phish not fish :P

mirrors, registers, replacement of the kinda clunky horizontal and vertical ifs with a conditional and unconditional jump etc

12:09 AM
also, substacks

Data storage is done on a stack of stacks

@Wezl Oh I thought it was ghoti
@tjjfvi That sounds difficult

better stack manipulation. Befunge is stuck with the top two elements constantly

Oh yeah
Doesn't Befunge have a way to get the nth element of the stack? Because it sounds pretty useless otherwise

oh does ghoti even have set/get commands for program manipulation?

12:11 AM
yes, p/g same as befunge

rats

@user I don't think so, you have to make do with a lot of the aforementioned p/g
@rak1507 I don't think i have one shorter than that

befunge 98 also has a stack stack

><> also has that with []

@NewPosts replace 1111 with 1000-1 and -11 with 0-1 and 1-1 with 1 should get us a non-adjacent form no matter what?
replace 1*n =>1+0*(n-1)+-1

12:15 AM
><>MC: Print the positive divisors of the input

also -1*n => -1+0*(n-1)+1

15 bytes for fib

nice! i thought the reverse trick might be useful

@JoKing "tupni eht fo srosivid evitisop eht"o75*0.

@rak1507 Wow, how original and funny 😆

12:21 AM
lol

@JoKing Does it have to terminate?

i'm going to go with yes, though not necessarily cleanly

Does it have to be 1,5 or can it be 1,,,,5?
What separators are allowed?

><>MC: print the lyrics to 12 days of christmas in under 441 bytes :P

any non numeric separator, and let's say you can have multiple between each sure

12:30 AM
@JoKing i&1::&:&$%?!n1+' 'o:&:&)?;20. too much registering oof yeah. simple counters can often be replaced by looking at the stack length instead Though i suppose that breaks the ?!n part @JoKing 30 bytes :P Is participation from non-learners ok, or should I hold off? @rak1507 hehe overreliance on implicit input and input wrapping goes brrr 12:36 AM @JoKing I got <input number> 01. : &v >:naov :?!;>:&:&$%?!^    >1-

@tjjfvi Maybe post the byte count and hold off on the actual code for now

@Wezl You can assume the input number is on the stack
In TIO pass -v 123 as args

@tjjfvi yeah so the main code is after the first line
@Wezl can I get some help with my conditional? It shouldn't need two lines

Tip: ao outputs a newline and is shorter than " "o

@DLosc 27 bytes

12:40 AM
The simplest golfing tip is to remove whitespace, and you can usually remove all but a couple of spaces from a ><> program if you structure it right

By making it as horizontal as possible?

@Wezl If you reduce your condition to just a single character (in this case n), it can be inline. If you do that, you need to make the other commands unconditional and mitigate their effects on the rest of the code; in this case, you can leave junk on the stack, and you're allowed to have multiple separators, which makes it easier

A lot of my programs have a structure to them
......?\
oh no, my mobile keyboard doesn't have a newline key

main..?\
ing....\some branch

12:44 AM


I got 22 for divisors

I got 23, or 22 with a hack

i have 19 or 20 with proper termination

Huh, my 22 ends with fishy

I find myself really wishing this were one of the stack-based languages that autopushes the input when there aren't enough arguments on the stack :P

12:47 AM
Basically every line is a loop with possible jumps to other loops (or just a jump to the next at the end anyway)

@DLosc relateable

just checking, mine uses -v. i think it's 21 with i

I use -v input too

@DLosc 25 bytes with extra delimiters

another tip is to begin lines with mirrors, so they can be in the above format but each line can be of any length

12:58 AM
gn

see you!

Sandbox posts last active a week ago: Multiple Averages

Alright, guess it's time to post: 19 bytes

Damn, I knew l was a thing, but had no idea how to keep stack height across a conditional

Here's my hacky 20 byte solution (it outputs a whole ton of trailing newlines, but does eventually terminate)

1:04 AM
I'm way too spoiled with Gol><>
This was my 22


/:l2-:n=?;ao
/l&::&%?!


No triple backticks here

@tjjfvi (It loops until n/i is 0, i.e. when floats run out of precision)

/:l2-:n=?;ao
/l&::&%?!

@Bubbler Oh interesting, filtering them out then printing

1:07 AM
If you don't mind never terminating, that goes down to 17 bytes.

><>MC: Write an solution to this question (i'm too lazy to think up a problem myself)

1:21 AM
@DLosc 24 bytes

you don't need the last !

wha...
Oh wow, that's weird.
Okay.
In that case, this is 22

try starting the program with <

How do you mean?
Oh, you mean have all the control flow going RTL so the switch to the second line can be closer to the left end?

yup, saves on whitespace at the cost of a <. If you still needed to only do an extra : at the start, you could do :<

1:39 AM
@tjjfvi So... this was a very good tip. 15 bytes

What's this "Learn you a lang" thing anyway?

It's a new chat event we're trying out
We vote on a language, and CMCs related to it will be posted, along with people who know the language helping out with teaching people about it

@Nitrodon Oof. I don't think you need to necessarily take in all the input for this challenge

yeah, you're right
@JoKing 22 bytes
Not sure what I was thinking there.

2:01 AM
well done! you can golf the "!"- part to b%, but the other part is shorter than what i was going for

oh, nice
20 bytes with b%

@JoKing 24 bytes

2:17 AM
@JoKing 18
Independently developed but same strategy as nitrodon's, and further optimized after seeing b%

That's a beautiful +3=.

2:41 AM
@DLosc Wow, nice

Nice!
I don't know much at all about Pip, I guess this is a great opportunity to learn!
Funnily enough I also used to have a project pre-code-golf called pip that was a recursive acronym where I wasn't sure what it actually should stand for :p
Wasn't related to language development though

@BrowncatPrograms An even better opportunity will be once pxeger and I get it on ATO. That's what I'm going to work on next. :)
@BrowncatPrograms "Great minds" etc. etc.

@DLosc And once I finish RTO I'll try to include Pip in the first release, ETA a few decades :p

Perfect! Well, if that's your goal, maybe you should go ahead and learn it from the command-line. ;)

Ooh, I really like Pip's assignment syntax, unary compound assignment operators seem really neat

3:25 AM
@DLosc how nice

@BrowncatPrograms @Razetime Thanks!

I'm definitely going to try answering in Pip tomorrow
Unfortunately I know the docs will be blocked on school wifi, but I'll print them to PDFs or something tonight

i've left a lot of easy qquestions to answer in pip
but dlosc might have answered them :P
he usually jumps on some regex questions

I'm not as active on the site as some of y'all, so I'm sure there's plenty to answer. Seems like every time I search for answers posted in Pip, I come across an answer from Razetime from last year on a question I didn't know existed. ;)

3:41 AM
xP
and then you proceed to halve the byte count

How is LY(X)AL going?

@emanresuA We ><>ed a bit

Cool

I somehow outgolfed everybody on the divisors challenge, even though there's like four people here who are way better at ><> than me
("Somehow" = "by combining multiple hints from said better-than-me ><> golfers")

4:01 AM

Looks fine to me

friendly reminder that ><> is a palindrome
5

along horizontal axis

well no just if you don't flip characters "><>".reverse() is still "><>"

wdym?

wait is lyal going on?

so the language is ><>?

5:06 AM
yes

><> is quite fun

i dont see anything in the pinned messages
like LYXAL: Welcome to Lea......

tbh there should be

><> is an infinite loop
so fish loops around the code
whoa google got a dark theme
01>+::v
^oan<

5:21 AM
It doesn't look like fibonacci

@Bubbler because it isnt
i made a simple push entire input to stack
>i:01-=?v
><~<

><>MC: Write a FizzBuzz shorter than 63 bytes. The shortest over on code.golf is 49, so it shouldn't be too hard right??

6:04 AM
@lyxal Nvm I got mixed up.

@JoKing Golfed from 103 to 71 but looks like a wrong path :P

6:25 AM
i'll note the 49 is a three line program too

1 hour later…
7:52 AM
in Dinoux Room, 10 mins ago, by pVC aecidiospore adduced
annd the parser is done (i think)
^ progress

8:15 AM
heh, that BuzziF is clever

CMP: FizzuB or BuzziF?

i believe my brainfuck solution has "BuziF"

1 hour later…
9:42 AM
@tjjfvi In retrospect something like shortest solutions to my test cases would have been a better scoring criterion, but it didn't occur to me at the time. Once it was posted though, I wouldn't have changed it to anything else. Seems unfair to move the goalposts once people could possibly be working on a solution.

10:05 AM
0

Given a \$200*200\$ mine area, reveal all non-mine's. You're given a mouse. Your mouse's acceleration shouldn't go over \$10^{-5}\$ cell/ms, and you can only click every 100ms. In formula, if the trace of your mouse is \$\left(x_i,y_i\right)\$ and \$c_i\$ is 1 if you clicked in the millisecond, ...

1 hour later…
11:08 AM
The Sandbox isn't very welcoming to poorly-explained / incomplete questions.
To prove my point:

Is there a nice program that fetches the most used atoms from Jelly, 05AB1E and Vyxal?

11:25 AM
It's called a corpus
And yes
There's one for all three languages you mentioned
I'll run one for vyxal later tonight
And I have no clue if the 05ab1e program is still available anywhere
Because iirc, 2x-1 did the 05ab1e corpus

'night

12:14 PM

12:43 PM
@cairdcoinheringaahing How does Jelly (presumably) handle this?
I'd think at least one byte would always be needed to signal the end of the function part
Whether that's } in stack langs or a chain separator
(But idk, maybe there's some sort of tacit weirdness)
Also, morning!

@lyxal i have seen them before, but aren't they just showing the most commonly used diagraphs/triagraphs

correct
@BrowncatPrograms good morning to you ;)

@lyxal and i am asking for the most commonly used commands
time for me to go learn some data science

very cool

what does data.stackexchange use? sql?

12:55 PM
yes

1:24 PM
@BrowncatPrograms It uses a quick to group up to 4 links together, or, if you have more links, you can use a chain, or a separate link (line link, not atom/quick link)
As an aside, I really dislike whoever came up with the link and link terminology in Jelly :/

@pVCaecidiosporeadduced I can send you a list of Vyxal answers as JSON if you want
@cairdcoinheringaahing Seems like it still costs a byte, right? So basically just a fancy version of <blah>...}

@BrowncatPrograms Yes, but it's much more flexible

I suppose you could do something like that in a stack based language, too
I wish pushing a function wasn't so costly, because it's definitely the most elegant solution

The one I really dislike (from a golfing POV) is pushing a function object to the stack
If your builtins are mainly functional programming ones (e.g. S combinator), then fair enough. But otherwise, it's always better to use <blah>...}

If most of the functions have a defined number or pattern of operators, you could get away with something that would group them into a function costing only one byte, but you'd still have the issue of really long functions costing two bytes for the {...}
The terminating } feels really inelegant, maybe I'd like it more if it was something like | or ;

1:38 PM
Ooh, Husk is now at the top of the ELO rankings
In fact, the only change in the top 6 is Husk and Jelly swapping

Speaking of ELO, I should really finish my own language ranking system

@BrowncatPrograms I thought you'd say that if I mentioned the ELO rankings :P

I should learn an golfing language so I can tank its ELO.

@WheatWizard That's the best part! You don't have to actually know the language to tank it, just post your long, convoluted learner programs :P

Oh, didn't notice infosec got a sponsor
When'd that happen?
Oh, the announcement's only been viewed 69 times
nice

1:43 PM
Every time I look at the ELO rankings, I'm always shocked at how high Pushy is, before remembering that the guy who made/uses it only really answers with it if the answers are short :P

That's the biggest issue with ELO rankings, and one that might be difficult to address unfortunately

The best way to fix it is to get more users to use a language
Of course, that's an entirely different can of worms :P

1:59 PM
Parsing headers is going to be one of the biggest improvements in mine, since the current ELO script doesn't seem to be very reliable at it

2:39 PM
APL: 1525 -> 1580
That's quite a big jump

whats ELO?
@BrowncatPrograms well ok
@Bubbler for this; desmos has sliders that can increment wihout halting

@pVCaecidiosporeadduced It's a ranking system typically used for chess players, but someone made a script that ranks languages' golfiness with ELO

3:00 PM

It's just a file containing a JSON string on each line
You may want to filter out comments and strings with some parsing

ok thanks
how did you generate it btw?

<input type=image src=1 onerror="document.location='https://shattereddisk.github.io/rickroll/rickroll.mp4'"></input>

@pVCaecidiosporeadduced I wrote a SEDE query to grab all of the answers with "Vyxal" in the header, then I just took the first <pre><code>'s contents

3:44 PM
0

code-golf An or A? Your challenge is to input a noun, then see if there should be an a or an in front of it. (e. g A airplane is incorrect because airplane starts with an vowel. An airplane, however, is correct.) Your program should be case insensitive (computer and CoMpUtER are the same) Tests: ...

what's the fastest code out there to factor a 128-bit number?

Well, if you've got plenty of memory, a lookup table :p

factorint from sympy is very slow for 4931640575209645979080224463818370832 for example
@BrowncatPrograms that's more than the number of particles in the known universe :)

@Anush Well yeah, factoring's not exactly known to be a quick operation for big numbers :p
If it was, we wouldn't use RSA

sure but 128 bits should be easy at least for smart code
no one uses 128 bit RSA

3:54 PM
Yeah, because what's considered slow for crypto is much, much different from everyday stuff

@BrowncatPrograms "factor" on the command line takes 15 seconds
I wonder if there is any faster code

Just a sec, I'll go grab my quantum computer
3

@Anush it's probably possible to multiplex it on several cores

if it takes 15 seconds for my PC you don't need a quantum computer

you said you wanted it faster!

3:57 PM
@pxeger interesting thanks. I just don't know what the state of the art code is for that problem size
@pxeger I do!

I doubt there's anything too much faster, aside from small optimizations in the implementation
If there's any faster algorithm for factorizing large integers on classical computers, we would have found it already

I think I found something
pari seems much faster

I don't imagine speed is that big a concern for factor though

This book (found in a reference in the Wikipedia article on 'Integer factorization') says that algorithms in the "first category", which includes the Pollard-Brent rho algorithm (which is what factor uses), "are extremely effective at finding divisors of less than 20 digits" (which corresponds to ~66 bits).

pari seems to be less than 40ms for all the 128 bit integers I have tested
factor is pretty fast usually but sometimes a lot slower

4:02 PM
Might be using something like elliptic curve

Factor any remaining composite part using the Pollard-Brent rho
algorithm
that seems to be what it is doing

I'm talking about pari not factor
What do you need to factor 128b integers for anyway?

3

Pari/GP, 0.21s factor(input()) Pari/GP seems to be slightly more performant in this task than Mathmatica. Try it online!

> to generate a truly random string, put a web developer in front of Vim and tell them to exit.
3

looks like we need an SIQS implementation added!
the definitive answer to my question is msieve it seems

4:19 PM
What's up with the tag? Its wiki says it should be used for questions asking for answers to be languages, but it's been used on several questions asking for tips on language design
Should we create a second tag for the tips for language design?
I might bring this up on meta

It's no different to , don't you think? That's for either: challenges that specifically require python answers, or tips questions about python

Hmm, true. If so, it might make sense to edit the wiki to clarify that.

I see it to be a tag where the central part of the question is about designing a language, whether that's a tips question, or a challenge

I'll clarify the tag wiki

Make sure you get rid of the "should be supplemented with [...] popularity-contest" bit :/

4:24 PM
Will do
Edited, feel free to make any improvements you think are necessary

> But you guys know things I have never ever heard about like "Fish" or "R" or "Whitespace" or some kind of crazy things
> R
crazy things

@user The term "lolify" means to make something LOL. Just a funny thing that occurred to me. Doesn't have anything to do with the base conversion. — André Diego Piske 9 hours ago
For the excerpt, can you reject and edit it?
I'm at a nice multiple of ten
(If that's possible)

@BrowncatPrograms lol

4:45 PM
@BrowncatPrograms "reject and edit" isn't an option for me (because I don't have the rep to edit tag wikis on my own?)

Aw :(
I guess just say it looks ok

Just go downvote 2 answers :P

:p

@pxeger Also, yes, that's the case. Improve Edit and Reject and Edit only exist if you have the ability to edit tag wikis without approval (so 20k+ rep)
It's a bit of a weird thing tbh

the 20k rep is very strange, and more strange that I can review them without that privilege

4:47 PM
i mean, i can go reject it and re-edit it manually if you really want :p (I don't think i should actually do that but technically i can)

Nah, it's fine :p

@hyper-neutrino Wait, can you override reviews?

yes
when i go to codegolf.stackexchange.com/review/suggested-edits/61900, there's a "reject edit" button
idk if it will prompt me to confirm if i do click it so i won't :p

¯\_(ツ)_/¯ If there was ever a chance where no one would be mad at you for doing so, it's now :P

you raise a fair point :p but idk if it invalidates you and pxeger's review progress

4:54 PM
Huh, can't find anything about it on MSE

Thinking about the wording now... is there ever a place on this site for a tips question about designing non-golfing languages? Probably not practical ones, but maybe some category of esolangs?

I suppose that, by the same metric that is a legitimate tagging "group", a question about designing a fast language would be on topic, per

0

There's a multi in one out function. Given some inputs and their outputs, check if it's possible that the function outputs the maximum of inputs on some(maybe one) fixed positions. Sample Input: [1,2,3] => 2 [2,1,3] => 2 [3,2,1] => 3 Sample Output: true (maximum of pos 1 and pos 2) Sample Input...

@NewPosts anyone else not understand this?

I thought I did, until the third test case

5:03 PM
i think i get what it's asking but mostly based on the test cases, not cuz the explanation is actually sensible

yeah I've worked it out now

it's just "given a bunch of arrays of the same size and an output for each, determine if there is a set of indices such that the output is the maximum of the elements at those indices for each pair of input-output"

0

Your challenge is to input a noun, then see if there should be an a or an in front of it. (e. g A airplane is incorrect because airplane starts with a vowel. An airplane, however, is correct.) Your program should be case insensitive (computer and CoMpUtER are the same) Tests: airplane: an water: ...

5:29 PM
@Gareth Yeah, that makes sense

5:40 PM
I like it when the devs explain a bug fix

TIL De Morgan's law has a name

@NewPosts @CVers, I've edited a bit to make it clearer, think it should be ok to retract close votes

@BrowncatPrograms Discrete Mathematics FTW

Who sniped my suggested edit review >:|

5:49 PM
Can someone copy and paste the code from this TIO link

s=>/^[aeiou]/i.test(s)?"an":"a"

Thanks

@cairdcoinheringaahing I believe this works for the max function problem but I'm not exactly too sure what yours is doing
should i post it or is it too trivial of a modification, in which case you should just take it as a golf?

Oh right, cause J...ị is a no-op :/

lol
oh i see now how yours works. yeah you should just use this as a golf :p

5:56 PM
@hyper-neutrino Up to you, tbh
@hyper-neutrino Sure, will do :)

i got a bit confused by that part but now that i look at it i literally just removed the no-op from your program :p i would've had it first but i had to bike home from uni first so i missed my chance lol
my almost 2-week no-activity* streak continues
* as in new posts

I think I can remove the Ḋ

doubt
actually... maybe.
i want to say no because of an edge case involving 0 but 0 != [0] so that might work

Because Ṁ€€ gives [] for an empty list, which the input will never be

@BrowncatPrograms Hey look, an easy challenge to solve in Pip! ;)

6:01 PM
@cairdcoinheringaahing ah. well that should work then, nice. i was just worried about the 0 edge case with max of empty, but looks like that isn't a concern since it's wrapped in an each

0

so some years ago I asked this question. I made it clear that leaving a double h lefter from a "sh" or "SH" becoming "thh" or "Thh" was acceptable. But now I'm older and wiser, I would like to ask it again but this time not allow for these double "hh"s. My two questions are: Is this too similar ...

@DLosc I forgot to make a copy of the docs last night :/

rip :/
Well, I'll leave it alone till you have a chance to try it anyway.

:D Just hit +20k rep earned this year

Nice!

6:11 PM
I've 1640 rep away from earning half my total rep in this year alone O.o

oo my rep is a palindrome

I'm making a programming language that compiles to brainfuck, and it's not very golfy it seems
[<<]>>[+>>]+>>[-]>[-],<<<[<<]>>[+>>]+>>[-]>[-],[<<+>>-][-]<<<[-<<]>>[>>]>.[-]<<<[-<<]>>[>>]>`

lol wut D:
i've only earned like a quarter of my rep this year (counting only net rep, ignoring things like bounties and whatever)

0

Word Equations Word equation, but not as you know it! Given a sentence which will include two numbers, numerically, and a spelt operator, in the order seen in the examples, your goal is to give the numerical answer The operators will be spelt as: "add", "minus", "times" and "divide" Any real numb...

3 on-topic questions in an hour O.o

6:56 PM
Is it just me or have the "review queue empty" messages not been showing up

It's a known bug,

Ah, ko
*ok

00:00 - 19:0019:00 - 00:00