12:00 AM
ah i see, that's interesting

Guess I should start up my script to log stuff for a few hours so I don't have to wait forever for someone to answer something
TIL about JS's console.assert

12:25 AM

> beloved 80s song

@user Yes

rip markdown
@cairdcoinheringaahing ^

@hyper-neutrino Yep :/

F
i wonder if OSP will ever need to send three messages :P theoretically it definitely could happen, wonder if it will tho

Should be an easy replace([, $) and replace(],$)

1:02 AM
@user I can't escape from it

@hyper-neutrino 9 or more Sandbox posts edited in one day, then not edited for a week
It's possible, but unlikely

ah
@cairdcoinheringaahing although you'd find this during testing, make sure you either do this replace before parsing tags or set tags to [] so you don't end up with \$\$

@hyper-neutrino Good point. I'll bug test when it isn't 2am here, but I've put that into OSP testing so I don't forget :P

alright :p
i could definitely see myself making that mistake, hence why i thought of it :P

ಠ_ಠ Rutger is honestly one of my favourite languages, but my god is it verbose :p

1:38 AM
aftering my failure try of golfing this question , I somehow managed to golf a solution longer then naive solution

CMC: In DnD, there is a mechanic that allow you to roll extra "damage dice" when attacking a creature. There is also a long-running debate about using 2d6 (rolling 2 6 sided dice) vs 1d12 (rolling 1 12 sided dice) as damage. You are to take an integer 0 ≤ n, and output 1) the result of rolling (n+2)d6 and 2) the result of (n+1)d12. "The result of rolling e.g. 1d6" is a random integer, uniformly chosen, between 1 and 6 inclusive.
Sorry for any poor wording, it's difficult to frame a CMC in just a single chat message :P

@hyper-neutrino no you weren't. You were never JoKing. You were always hypernuetrino

do you mean roll d6 n+2 time and d12 n+1 time?

@okie Yes

1:54 AM
@okie I don't see any obvious golfs, that's not bad :P

too lazy to draw freehand red circles but
notice how caird's message says 21:54
and my computer at the top says 21:54
and it says last message 2 hours ago?
what is going on lmao

Feb 28 at 1:17, by caird coinheringaahing
idk the physics behind it, but time has been on some hardcore drugs for the past 18 months

8 sec later

I think that's pretty appropriate :P
@hyper-neutrino Try reloading?

yeah. probably caching cuz i tried to load this page while my internet hadn't connected yet, and then it connected
yeah reloading fixes it. it was funny tho :P

1:56 AM
IIRC the "N seconds later" is a known bug that's pretty much always fixed by reloading

nice

@cairdcoinheringaahing Can r6,r12 dependent?

@okie No, each roll should be independent

you can simulate d12 if you have two cubes by rolling them, converting their digits into base 6, and then floor dividing by 3, right?

2:07 AM
The easy way :P

I thought about d12/2 = d6
but they are indepentent

i guess you could also roll a d6, take even/odd or take 1-3 / 4-6 or some other thing, and then roll another d6 and either add 0 or 6 to its value
@cairdcoinheringaahing does this work?

@hyper-neutrino I believe so

nice

I feel like the fact that 12 = 2*6 should probably save some bytes somewhere

2:14 AM
Ḥ+3ḶḂ×6+6 is the same length as ‘ẋ@6,12;6
what would be reasonable behavior of range on complex numbers?
i'm thinking of making a rectangular array up to that point but in that case (assuming range goes 1 .. z normally) should it start at 1 or 1+1j, and should it group by equal real or equal imaginary component?

@hyper-neutrino I opened the link, I saw Jelly, confuse, I closed the link

@hyper-neutrino Do you define range on negatives or non-integers?

@Bubbler i plan for range to be 1..z for positive and 0..z for non-positive, descending

@hyper-neutrino complex_range(5) = [[0+0j, 1+0j ..., 5+0j] ,[1+0j ...], [5+0j, ..., 5+5j]]

not sure what i think about non-integers or strings yet
ah, so 0..z for complex range. interesting

2:17 AM
^^ I second that

that does make the most sense

For floats, range(floor(x)) works well for Jelly

i have infinite precision btw which makes some things a bit more annoying sometimes :P

ḞR is basically just R

@cairdcoinheringaahing For both positives and negatives?

2:19 AM
jelly doesn't define range for complex, unfortunately, so it's not quite ḞR

@Bubbler No

also it seems to just be range(1, z + 1) so non-positive range is empty

Jelly doesn't handle ranges on negative numbers

Lol

M does tho :P

2:19 AM
wack

oh that's how it's done? lol

J has two different primitives for simple range (0..n) and mirrored range (-n..n)

M vs Jelly
@Bubbler Jelly has "ŒR List from −abs(z) to abs(z) inclusive"

specifically it's abs(int(z)) not int(abs(z)) because complex arguments do not work

2:24 AM
That makes Jelly good. M is not :P

Jelly is (and I can't believe I'm saying this) more sensible, M is golfier :P

2:40 AM
Wait, why -abs(z)? To me it'd make way more sense to ignore the abs so you can do something like -20 for 20 19 18 ... 1 0 -1 ... -18 -19 -20
Jelly's built-ins are its weakest aspect IMO
Vectorization instead of overloading being the second :p

@RedwolfPrograms So that it always returns the sorted list, no matter the argument
@RedwolfPrograms Agreed, which is why I'm (trying to) wok on Jam :P

3:01 AM
i feel like doing ŒR<sort>$ or AŒR$ is significantly easier than trying to get it to change direction based on sign

3:16 AM
yeah
i feel like the philosophy of those mega niche builtins should always tend towards being more powerful

i'm not sure if i would rather design a language to be golfier in 80% of situations and then absolutely die in the other 20%, or be overall powerful enough to be pretty good in 80% of situations and only exceptionally stand out in 20%

I like the second idea better

combine both, so that you get 20% best, 60% good, rest to hell

i'd end up with 20% good 80% ded probably

@hyper-neutrino 05AB1E vs Jelly

3:21 AM
granted, changing direction based on sign should be as simple as ŒR×ṠƊ (I say should be since I haven't tested it), but that's one byte longer if not two because I feel like more often than not you'd not need the $ in either of your examples ah, that's a bit easier than what i had in mind :P but yeah it's still extra bytes overall yeah adding abs before smth is always easier than trying to un-abs the result afterwards so in general i don't think functions should auto-abs unless it's like some operation where non-positive numbers don't make any sense whatsoever Now for my next operator proposal, abs without auto abs 3:24 AM :p @hyper-neutrino How's "complex base conversion" going btw? @Bubbler i have decided against dealing with that for now lol :P @cairdcoinheringaahing well sort of what would make sense for results of +/0, 0/0, and -/0? erroring seems like a lost opportunity for some overloading :P (and also would (1-I)/0 count for +/0 or -/0) 3:33 AM 0 make all of them 0 Returning 0 is a good compromise which often works in favor of golfing i think that makes sense too return inf probably isn't useful at all :P False! It comes in handy plenty I think 3:34 AM J has plus infinity, minus infinity, and indeterminate (effectively NaN) which can result from 1/0, -1/0, and 0/0 respectively I've never needed a constant for infinity before maybe. where does inf come in handy though @RedwolfPrograms mm no stax has this and I have suffered more than I have had convenience in all my time using jelly having no inf has never been an issue for me personally @hyper-neutrino Only found it useful in interval notation(I think) 3:35 AM Hmm, maybe I'm stuck in the JS golfer mindset Okay guys who used 05ab1e's rain built-in? It wasn't raining a minute ago. @lyxal It was apparently used here 3 hours ago, it was a crazy rainstorm as if it was used 10 times in quick succession @hyper-neutrino Jelly has inf and nan @cairdcoinheringaahing h u h. TIL. well i've never used/needed them :P i think 3:39 AM and in Dyalog APL, nonzero x divided by 0 is an error, unless you set a DIV flag which makes anything divided by 0 a 0 \$log_{-1}(0)\$:P @lyxal does Vyxal have a divisibility operator? @Razetime yes 3:48 AM huh, unable to find in the docs search a % b == 0 2 Related: Calculate \$f^n(x)\$, Polynomialception Challenge Given a polynomial \$f(x) = a_0 + a_1 x + a_2 x^2 + \cdots + a_k x^k\$of order \$k\$, we can compute its composition with itself \$f\left(f(x)\right) = f \circ f(x) =: f^2(x)\$, which evaluates to another polynomial of order \$k^2\$. The... Imagine using documentation instead of our newly lauched Hivemind Drive™ service that gives you up to 5 MB of storage space in the braincloud (free tier), and lets you easily share files and abstract emotions with your friends with granular permission controls. Why read when you can just know imagine still using emotions. I VTC'd them as unclear long ago and we have moved on to more objective indicators 3 Imagine existing. Made by the gaseous golfing cloud known as caird 4:08 AM @cairdcoinheringaahing drift over to india we have pollultion @hyper-neutrino no emotions you say? Hmm interesting. Good to know. I'll save this information for a future time when I can think of a way to take advantage of this fact somehow ;p @lyxal just cuz i VTCd then as unclear doesn't mean they don't appear. we don't welcome indonesian gambling spam on CGCC either yet look where we are :P 4:25 AM NGL it feels weird to post challenges without going through the Sandbox Feels like we're still into Socratic competition or something :P Given that I have Socratic, I guess I could be deemed an "experienced" challenge writer, but I still feel a little nervous whenever I post without Sandboxing :P I still use the sandbox exactly as I did before Socratic @Bubbler I was writing up my spec when I saw your post, total coincidence :P I've moved away from using the Sandbox for "trivial to write" challenges (read: sequence/math [code-golf] challenges), but I use it for everything else 0 Floor of complex number code-golf math complex-numbers apl open-ended-function Background Complex floor is a domain extension of the mathematical floor function for complex numbers. This is used in some APL languages to implement floor ⌊, ceiling ⌈, residue |, GCD ∨, and LCM ∧ on complex numbers.... 4:28 AM good timing sup everyone hello there general neutrino @hyper-neutrino hi Oh i have today earned the fanatic badge! i still use the sandbox for pretty much everything; being extra cautious beats being overconfident :P except that time i needed the rep to cap 4:29 AM @Wasif Nice! @Wasif Congrats! Welcome to the gold badge club :P @Wasif congrats, welcome to the "no life" gang known as CGCC :P Thanks everyone For the praises Welcome to "Fanatic is my first gold badge" gang :P Next step: "Fanatic is my first meta gold badge" gang :P 4:31 AM @cairdcoinheringaahing i am too far from that i think Do you have Enthusiast on meta? @cairdcoinheringaahing yes @Wasif Then you're only at least 70 days away :P @cairdcoinheringaahing i think i missed someday between Then progress resetted again :( The trick is to just check in to see if anything has changed since yesterday. Generally, only a couple of posts have new activity (aside from the Sandbox), so you can just check them out 4:38 AM the trick is to not have a life 5 2 Consider a grid from \$(0,0)\$in the bottom-left corner to \$(m,n)\$in the bottom right corner. You begin at \$(0,0)\$, and can only move in one of these three ways: Directly north \$(+0, +1)\$, Directly east \$(+1, +0)\$, or Directly north-east \$(+1, +1)\\$ How many different paths are there...

1 hour later…
5:52 AM
I am still at “no gold badge” gang

I've been talking here since the epoch apparently

thats over 50year

yep

Unix epoch, apparently

impressive
in the beginning the unix god created TNB. then, he created lyxal to accompany TNB
7

5:58 AM
this is the first time I've actually thought to screenshot it

All-powerful lyxal then speak on TNB, the next thing mortal saw is Last active:Lyxal 18754 days ago
btw, we have 28000~ starred massage too

since when did this room offer massages? (sorry i know i'm not funny)
2

that’s about 1.5 star per day

that seems low
wait
per day? this room didn't exist 50 years ago

It was assumed that the god created TNB

6:05 AM
this room has existed for 3752 days, meaning we average around 7.5 per day
closer to 7.67 if you don't round 28788 down to 28000

10 year

makes sense given that's how long cgcc/ppcg.se has been around for

6:31 AM
This would have been 7 bytes Jelly solution to Delannoy, only if P truncated unmatched elements :/ It's really annoying

ha

is there a way to rectangularize a 2D array? or is z0Z the best way

i think that is the best way
just a casual 3 fucking bytes

TBF what languages have that as 1 byte?

6:42 AM
APL or J can sometimes do it in 1 or 0 bytes depending on context
(of course it often takes more than that)

how would you rectangularize the other way (as in cut off the trailing bits instead of fill with 0)
something along the lines of zip -> keep with maximal: length?

that could work
i feel like there's something shorter thought
*-t
though
is what i meant to correct to

why is like the entire top of the starboard me
tempted to clear some of them

i forget what the matrix diagonal builtins do with ragged arrays

TIL python 3.x (x < 8) doesn't come with a nCr function

6:45 AM
wait 3.8 has an ncr function?
is it in itertools

math.comb

and math.perm for nPr

accompanied by math.hairbrush
2

oh cool

6:47 AM
@okie takes a while

and apparently numpy doesn't have ncr either
all these libraries and no ncr. sad.

just implement it yourself lul

@Bubbler ↑ is a strong builtin
@lyxal wait what
even numpy doesn't have it

tfw i have to download tensorflow to get n choose k

6:56 AM
Just use the factorial definition

I must have a convenient library function for every APL builtin

@hyper-neutrino okay I finally found something shorter than ZLÐṀZ
ẈṂịþ

oh wait L€ is a built-in? lol

Has been for almost 2 years :P

gonna guess this also is not my first time realizing this either :P

7:11 AM
@hyper-neutrino you can also do len(list(itertools.combinations(range(N), k)))

7:38 AM
Perfect, another repcap
made by "repcap before 8:00 UTC or not repcap at all" gang

Already?
I think I've done that maybe once before :P

8:03 AM
Is vyxal bounty being awarded?
I haven't still got my 3 bounties
I will take them back if they don't match the criterion

@lyxal ^

eh bad time to ask this
lyxal isn't online

No, but the ping will create a notification for him so that it isn't lost :)

@cairdcoinheringaahing thx

> If any of y'all posts 5 Vyxal solutions in a 30 day period (starting from when this bounty was posted), Razetime and I will give you 200 reputation.
you need to link 5 Vyxal answers on the thread

8:06 AM
@Razetime oh so i need to post 2 more
that's it

yes that's all

i am gonna do that soon

Yeah it's 5 answers for the bounty, not 3. I was wondering why you'd stopped at 3.

2 hours later…
9:47 AM
@Razetime Now to learn Vyxal...
Probably going to try Cjam after this since noone uses it anymore.
@Razetime "Razetime and I"?

10:08 AM
@Ausername "I" meaning lyxal

Nice try. You still have 20k rep and Lyxal has 14k.

???
just go to "bounties with no deadline" on meta, and read the full bounty

2 hours later…
11:46 AM
0

Square chunk my matrix (Title suggestions welcome) I have no context for this. Your challenge is to write a function/program that takes a matrix m and a number n as input and: Splits the matrix into nxn chunks Replaces each chunk with the most common value in that chunk (In case of a tie, any of ...

12:30 PM
@ngn (i really should read up more on computability) but i think even though you can say computing the halting problem is "harder" than some problems, i don't understand that to specify something about the means the computation is carried out. (what is meant by 'emulate'? what if you convert a tm into some equivalent model and 'solve' that - would you then still be emulating that tm?)

12:52 PM
Morning everyone!
Oh shoot I'm late
Bye everyone!

Lol
@Ausername the rep given is 100 from me and 100 from raze

@lyxal Are you really Lyxal or someone impersonating them?

You can tell from the fact that I'm RO of Vyxal and Sixth Barrel

1:23 PM
Morning everyone!
Not late this time

good morning

What
Wdym late

to school or somewhere important

Oh okay
laughs in no school
as well as 11 30 pm

I added a worked through example (still missing animations I am going to do), could I get some people to read it and see if it is clear / makes sense?
3

Challenge Statement The goal of this challenge is to build the 5 state Infinite Time Turing machine that takes the longest to halt. The rest of this challenge is some definitions and an example to help you. Infinite Ordinals In this section I will introduce the concept of transfinite ordinals in ...

1:48 PM
sup all

2:01 PM
@StackMeter "Anti-ALpha … alpahbetic characters"?

@Adám yes

3:03 PM
@WheatWizard sure, I am the king of not understanding questions
ok I lost you halfway through the first paragraph

The first paragraph of the entire thing or of the example?

the entire thing

> The goal of this challenge is to build the 5 state Infinite Time Turing machine that takes the longest to halt.

i will try again soon

@WheatWizard not sure if you have this planned already but just in case you forgot / didn't notice you still have the "animation [#] here" placeholders in the draft

3:11 PM
Yeah I put them there earlier today. Animations take a long time.

ah okay
After reading it yesterday and today again I think I understand it now. Not sure how I'd go about solving this but I am able to follow along with the example.

Well making a valid solution is easy. Plop down a bunch of states chances are good it will halt at some point. The optimal solution would hard to find and be very very hard to confirm as optimal.

well, true. just not too sure right now how I'd go about making an actual competitive solution. Though I could probably figure out something better than just guessing after some time

Yeah, that's fair. I might include my 3 state champion as well, since a couple of examples might help people with getting ideas.

that'd probably help get some ideas going

3:26 PM
@RedwolfPrograms I've updated OSP to fix a formatting bug, feel free to update when you can

\o/
(I never noticed this even, gonna be honest with y'all)

4:01 PM
@cairdcoinheringaahing I'll update tonight if I remember (in other words I probably won't :p)
I've still got a bookmark called "Query Programming Puzzles and Code Golf" lol
Why did I think clickigng a bookmark called "Rickroll" was a good idea

4:30 PM
@user41805 i don't claim to be knowledgable about computability either. there's a simple proof by contradiction that the halting problem can't be solved. i didn't think of it first, so i was stupidly trying to make up a different proof based on irreducible computations.
by 'emulate' i mean perform steps equivalent to the those of the input program. an irreducible input program would require the same number of steps no matter how cleverly you try to optimize it. idk whether the existence of such irreducible algorithms can be proved. one example of algorithms that are meant to be as hard as possible to simplify are cryptographic kdfs.
so imagine something like this: while (x is not all zeroes){x=kdf(x);}. will it ever halt? in order to learn, you'd have to actually keep computing the kdf, potentially forever.

Well that particular machine either halts or it doesn't. So there is a program (in fact a ton of them) that solve the halting problem for that particular program.

@ngn interesting defining this on step count, but i don't have anything to add for now

@WheatWizard are we talking about classic tm-s or this new transfinite thing?

I was thinking classic tm, but the same is true for transfinite.

4:42 PM
@user41805 interesting :)
so, the proof that an algorithm exists doesn't mean you must have any clue what it looks like :)

There's also the dual of this, where know of precise algorithms that can solve NP problems in P time, but only if P=NP. We know what the algorithm looks like but we don't have any clue how it performs.

it is only reading this definition of ordinal numbers now that i understand that issue i asked you earlier, of why the limit's that of ⍵×n+m instead of ⍵×n.
is there a reason you don't include a space in 'VonNeumann'?
maybe it's better explaining limit ordinal in the section on ordinals. also adding examples of limit ordinals would help.
why is the definition of ⍵^⍵ not something like g({⍵^x×y+z : x,y∊N, z<⍵^x}) ?
you can also explain what a lim_sup is.
also, IMO linking concepts as they are encountered (say, to wikipedia) would be helpful

Some good points.
g({⍵^x×y+z : x,y∊N, z<⍵^x}) is equal to ⍵^⍵, but there are gaps in that set (I think).
Just like g({2n : n∊N}) is ⍵, but there are gaps.

huh really? what's missing?

Oh wait there are no gaps.
@user41805 Oh wait now I understand your question. You can define ⍵^⍵ in multiple ways. I chose one that was compact. I will probably switch to yours though since it is the only example where I call g on something with gaps, and there is no explanation as to how that works.

5:10 PM
@WheatWizard if x has no "gaps", isn't g(x) the same as x?

Well for one x is a set.

everything is

Ok sure, yes under the Von Neumann interpretation g(x) = x if x has no gaps.
\omega is just a cheeky way to write the set of natural numbers.

just curious, what's the alternative interpretation?

Well the definition I give doesn't make any claims about the internals of the sets, only that certain sets exist and have particular relationships. So you can make pretty much arbitrary theories that fit. But another way to talk about ordinals is with order types.
In set theory, an ordinal number, or ordinal, is one generalization of the concept of a natural number that is used to describe a way to arrange a (possibly infinite) collection of objects in order, one after another. Any finite collection of objects can be put in order just by the process of counting: labeling the objects with distinct natural numbers. The basic idea of ordinal numbers is to generalize this process to possibly infinite collections and to provide a "label" for each step in the process. Ordinal numbers are thus the "labels" needed to arrange collections of objects in order. An ordinal...