4:00 AM
@att Then half of learning Sledgehammer is knowing how to invoke the compressor, and the other half is doing (more-or-less) atomic-code-golf in Mathematica

@hyper-neutrino laughs in experimental branch giving them useful ascii art overloads

Or `f(f(x, g(x)), f(y, g(y)))`. In fact: CMC: given black box binary function `f` and unary function `g`, along with two integers `x, y`, output `f(f(x, g(x)), f(y, g(y)))`. Functions take and return integers

@cairdcoinheringaahing J: `2 :'u&(u v)'`

@cairdcoinheringaahing JS: `(f,g,x,y)=>f(f(x,g(x)),f(y,g(y)))` :p

@Bubbler I suppose the bigger roadblock for me is that Mathematica golfing can be really interesting in its own right

4:04 AM
CMC: Given an integer i, convert i to an array of its binary form. Ex: 4 -> [1,0,0]

`B` in jelly lol

and sledgehammer feels less "authentic", or something

@PyGamer0 `i=>i.toString(2)` in JS

@cairdcoinheringaahing Husk: ``§SS`

python implementation anyone

4:05 AM
`lambda x:[*map(int,bin(x)[2:])]`

`lambda n:map(int,bin(n)[2:])`

wait that's a thing?

lol wut

nope :c

No
Python ain't that nice :P

4:07 AM
yeah, it's a problem with working in so many different langs at once

lol that looked suspiciously like ruby

Oh I'm stupid, array form would be `[...i.toString(2)].map(eval)` in JS

it was a horrible mental mix of py and js

I'm used to the loose IO requirements on main lol

wait how the frick do you do base conversion in apl
why does `2 ⊤ 13` not work lol

4:08 AM
Ruby: `->x{x.to_s(2)[2..].map &:hex}`

Lower tack?

nope

@hyper-neutrino shouldn't the T be inverted?

@hyper-neutrino It only works in Extended

@hyper-neutrino you need multiple 2's to get each bit

4:08 AM
:c

it's like a polymod

The proper mainstream way to do it is `(⊥⍣¯1)`

so it's `2∘⊥⍣¯1`

huh okay
apl's ability to just invert random functions is quite amazing to me
like you can just difference array by reversing prefix sum array right?
like `+\⍣¯1` or smth

4:11 AM
Yeah, that's a cool one

but one problem is that APL's inverses are not well documented

oh cool
i want to learn j. none of it makes any sense though lol - at least with apl, i could see some structure and where certain things started or ended

but J can't invert arbitrary math expression

to me J just looks like someone dropped their keyboard except all of their keys are punctuation
it looks cool tho

4:13 AM
it uses suffix `.` and `:` for digraphs
and `^:` can make an illusion of a face :P

oh suffix digraphs? interesting

Grammar is generally the same as APL, but the train rule and inherent function ranks make it slightly harder

huh, okay. do you have a recommendation for like a tutorial / place in the wiki to start looking through?

and lack of dfns is kinda wack sometimes (though it was added recently I think? not sure if it made into release)
@hyper-neutrino I guess you can start here, and after that, use this as a kind of a cheatsheet

@PyGamer0 b in vyxal lol

4:21 AM
@Bubbler oh cool, thanks :D doubt i'll end up getting too far; don't think i can learn APL and J and create my own language but we'll see lol

Have we given up on BMG?
Or is someone going to schedule one?

it was yesterday lol
28 hours and 22 minutes ago

I think they mean the next one

Yes

4:22 AM
well it wouldn't be the first time someone got the time wrong :p
sure, one of y'all ROs can schedule one now if you'd like; i think that'd make sense
i forget - why didn't we do recurring ones @RedwolfPrograms?

I couldn't come to that one anyway :p. I can come to the next, and possibly the one after that.

Maybe because we need to make six different schedules for that

true
time to appoint a bot to RO to do it for us /s

and recurring every 84 days... doesn't sound very nice

What GPT-2 thinks of redwolf.

4:28 AM
It goes pretty poetic up to the middle of the second paragraph, and then it suddenly turns into a total garbage

Yes

fortunately, it doesn't matter, because you will get stuck in an infinite evaluation loop (or die from stack overflow if you don't have TCO) from the first paragraph

True
Bubbler's:

GPT-3 is way more jucier

This could actually be accurate, idk

4:31 AM
Nah, this is accuracy (disclaimer: not representative of redwolf)

@lyxal What doe GPT-3 say to the prompt "Code Golf is"?

that's a lot of images, please link them as a gist or collapse them in the future

@Razetime Interesting. Do you think it's worth me opening an issue requesting it? And would creating a pull request increase the odds of the answer being "yes"?

"Until I was 14, I didn't know what the internet was"
@hyper-neutrino Sorry

@Ausername here

4:32 AM
@Ausername Exactly half correct and half wrong

And we'll never know which. (Well, we can guess).
"Until I was 14, I didn't know what the internet was."

@DLosc many golflangs have added an issue, what matters to get it into the site is a pull request adding the machinery to use it in code.golf

"The first program I ever wrote in JavaScript was a code golf interpreter"

@Bubbler is this more correct? (disclaimer: not representative of bubbler)

I've expressed support of the language so far but i think adding votes to the issue proposal might help

4:34 AM
i should PR jelly into an actual competitive programming site

@hyper-neutrino I am very interested
which competitive site has an open codebase

@lyxal Almost certtainly not.

@Razetime I was just thinking that APL (e.g.) would be treated as Unicode, so a program might be 24 bytes, but 8 characters. Then it would have the same score in characters on code.golf as it would in bytes (SBCS) here.

yeah but APL isn't added yet so the required site components for adding an SBCS encoded language in aren't there
anagol has golfing languages but it is violently unintuitive to use them there

4:36 AM
@lyxal That one is 100% wrong (except for the input part) :P

the thing about closed source automated golfing sites is that you get screwed over by I/O formatting lol

@DLosc it has J, however, and I think that's why Pip may be accepted easier
(or even golfscript)

here we just say "if it looks representative enough it's good enough"

Lol GPT-2 is better than GPT-3

@Bubbler you telling me `Amador t'Kerstarr` isn't a pseudonym of yours?

4:37 AM
but i obviously like pip more

@Razetime But I'm saying, why does it have to be treated as SBCS at all? Why not just treat APL character like the non-ASCII characters in Julia, for example?
@Razetime Awwww <3

welp i'm not sure why

Hm. There isn't a way to use command-line flags on that site, is there?

well, you can do something like `#!ruby -np` on the first line
but for pip i don't think so

Hmmm... >:^)
Actually, it's probably not worthwhile adding syntax to specify flags in the code. They're designed to do stuff in 1 byte (or 0, under current CGCC rules) that would take 2-4 bytes natively.
Though the `-l` flag is a bit more interesting. I should probably add a unary operator that does the same thing.

5:09 AM
kewl

Ugh, I'm solving one of these and I'm reminded why I don't like hidden-solution code golf. I've got 129 bytes, can't seem to find any ways to shorten it, and the leaderboard is [121, 123, 124, 124, 124, 126, 126]. I can't even admire or upvote these golf wizards' work. All I can do is stare in sadness, knowing that I am not one of them. :(
... And my 129-byte solution failed anyway. XP

F :( which problem is it

CMC: Prepend `**CMC**: ` (notice trailing space) to the input.

@wasif i feel like intercal is more in the tradition of older languages that try to leverage some plain english structure, but there are a good few esolangs that lean more into actual plain english

5:22 AM
`“**CMC**: ”+` in yuno (and therefore `“**CMC**: ”;` in Jelly) is actually shorter than trying to do string compression lol
idk if you can base encode it

@PyGamer0 Pip, boring solution, 13 bytes: `"**CMC**: ".a`
Pip, fun solution, 14 bytes: `[PZ"**CM"':sa]`

@PyGamer0 stax at 10

@DLosc Good news: fixed the bug. Bad news: code is now 132 bytes.

me, still at 155: :c

Oof :c

5:34 AM
most of my code.golf solutions are first made normally

my solution is also extremely stupid :p

then I see an xnor answer with some trick and it halves my code size

Hmm... new approach, maybe? Nope, 148 bytes.

how does this take input

Command-line arguments
(Not super convenient for Python. The `import sys;sys.argv[1:]` boilerplate is annoying.)

5:43 AM
0

Given an array A of size N. You have to find the number of subsets such that their product is in the form of p1p2p3... where p1, p2, p3,.... are the prime numbers whose power is 1 Example: Lets pick an array A of size 5. A[5] = {2, 3, 15, 55, 21} The subsets in our answers should be {2,3}, {2, 15...

Oh. You know what, I bet it's one of those exec tricks, isn't it. >_<

given that the byte and char counts are different, very likely so

Wait, they are? Oy, I wasn't even thinking about non-ASCII.

5:58 AM
hm i get stuck at 130

@att Me too.
To be fair, the top answer is 121 characters and 121 bytes.

@DLosc it looks like 86 chars to me

Wait...
Okay, that's a weird UI decision

I expected that with the bytes tab selected, I was only seeing the bytes leaderboard, and vice versa. Didn't know what the smaller numbers meant, but ignored them.
:P

6:04 AM
lol fair enough

So let me correct my earlier statement: To be unfair, the top answer in bytes is 121 bytes, and the top answer in characters is also 121 bytes.
(They happen to be the same answer.)

yep :p

The 86 char one is 202b 86c actually

> Okay, that's a WEIRD UI decision
Why would it show both the bytes solution and the chars solution on the same page when there's a choice of tabs for Bytes OR Chars?
ANYWAY, there's still a 121-byte, 121-character solution out there, and the best I've gotten is 130. The exec idea turned out to be 135 characters--close, but no cigar yet.
Make that 134.
Hahaha, now my exec solution is 130.

6:49 AM
@Ausername Where is this from?

@DLosc I got 128

@AviFS GPT-2 run on redwolf's chat profile.

ehhhh, what is that?
looking for his chat profile...
just a tad lost

Thanks! And what does GPT-2 mean?

6:57 AM
@DLosc wow you've solved a lot of holes

@AviFS GPT-2 is a generative AI

... I finally understand!
It got all that from this?
> Interested in math, science, computer science, history, and so on. Currently a high school student, although I spend most of my time there on CGCC. One of the room owners of The Nineteenth Byte, Code Golf's main room.

I own a server, and sometimes do game development or host people's projects. I like politics, but not politicians.

Working on a golfing language, Ash.

it's pre-trained

that much, of course
is there a link to use it free? i haven't found one yet
finding a couple webapps that use the engine
but none do quite the above

Apply for GPT-3 like a real gamer
It's much better
And free for the first three months

7:13 AM
@Razetime Uh, what? On code.golf? I don't think I've been there before today, and I submitted one solution today anonymously.

@DLosc lol what

Wait
This is that place where I solved a bunch of stuff during my Julia kick a few years back?? I didn't recognize it.
I wonder if it changed URLs since then.

i think so
the point calculations have changed
also they added dark theme, new editing features for assembly, so on

@DLosc got 125 now, no exec

I still have `x,y,w,h,X,Y,W,H=map(int,l.split())` in my code smh

7:19 AM
i had that for quite a while lol
i'm still at like well over 140 i think :c
wait no i think i'm still at 155

@Bubbler It's hard to find a better way to do it! My non-exec 130 had that. The exec one used an every-other slice, but it still had `x,w,X,W=`

Just spotted a 126 :P
Gotta leave now though

7:36 AM
wait, editing a post dequeues it from close? wtf
or is that just a mod thing (also idk if that's any edit or specifically edits from the queue)

ayyy new answer

If something runs forever, does TIO eventually abort & error?

@AviFS if it hits 128KiB of output or 60 seconds of execution TIO kills it

Oh yeah, it just did at 60 secs
You guys clearly beat the 60 second mark in answering!

apparently the 128 KiB limit is not really a system limit but to avoid your browser freezing from too much attempting to be displayed or smth. or at least, i vaguely remember something like that

7:43 AM
Going to write an answer abusing that for the "make program error on evens" challenge
Wonder if that'll count

> TIO, 123 bytes

@AviFS termination via TIO isn't a real error because the code itself isn't erroring, at least IMO

I mean I'd normally agree...
But given that I have a horse in the race, I'm inclined not to
I'll post it and see if I get downvoted to oblivion
The language doesn't have any built in erroring
So it's the best it can do

@DLosc Just got 124 and removed the smh line
@AviFS No, if the language can't inherently error, you simply can't use the language

Ouch, really?
We don't really have a meta consensus atm, might be work asking

7:47 AM
That's how the site works

There must be a ton of meta already about that...

And it's not really much of a consensus

No, I mean for more general stuff (not necessarily erroring)

@Bubbler If you can share a link, that'd help a lot! So far I've only found the measly link I posted

7:51 AM
Like, if a lang doesn't have a random number generator, you can't use it in challenges, if it doesn't have date builtin you can't use it for , etc

@Bubbler mind sharing if that used exec?

True, but errors in particular haven't been elaborated on

I'm on mobile now so I can't present the link, but you should find some of it on default io thread

also for example, if your language cannot access internet you can't use it for internet challenges

I can imagine lots of simple interpreters erroring to stdout, for instance
Surely those still count as errors

7:53 AM
so "False # my language can't use internet" to "detect if your computer has internet" is NOT valid, despite several people thinking they're clever and original

Or at least, the question of whether they do is nontrivial

"error" needs to be defined by the challenge but i think there exists a default

But if those do count, then it's very unclear how to differentiate

@att To answer for amusement, it uses eval :P
Not exec

I'll look on default io, but I found nothing by searching variants of 'error' on meta

7:54 AM
close enough

Nothing on default IO, @Bubbler
Just this:
> Functions may return a boolean value via the presence or absence of an error/exception
Which is irrelevant

An error is something defined by your language. If not, "nonzero exit code" is the convention made by OS vendors
If a lang doesn't support either one, you cannot error in it

That definition makes a lot of sense, just pointing out there's no meta consensus right now