« first day (3811 days earlier)      last day (1047 days later) » 

6:00 AM
oh, a register stack? sounds like it could be useful
in Jelly, Dec 13 '15 at 20:07, by Dennis
@quartata I've never written production code before, so sorry 'bout that. Anything in particular you want me to decipher?
this may explain the hacky source code :p
 
TIO was launched in 2016 right? That might well explain it :P
 
Manipulating the register stack could be both implicit and explicit, e.g. explicit push with © and pop with ®, and implicit push on invalid parse
 
tbf tho, Dennis is a professional mathematician, not a coder :P
@Bubbler For example?
 
implicit pop might be annoying at times
 
@cairdcoinheringaahing yeah, he's just too good at both so it's reasonable to forget xD
 
6:03 AM
@cairdcoinheringaahing Nope, TIO is older than Jelly
 
i am trying to power on VMWare and it behaves very weirdly; sometimes it works and other times it shouts at me "AMDV IS DISABLED"
 
It's very annoying that Dennis had a "Jelly testing" lang on TIO that is now removed, especially as all his links that introduce new jelly features are now on dead TIO links to jelly-testing: jelly-testing.tryitonline.net/…
 
@cairdcoinheringaahing Hmm, drop n and take n maybe?
works as "take n from front" and is "drop first n", but "drop from end" might be useful
 
@cairdcoinheringaahing :\
 
6:10 AM
@cairdcoinheringaahing Nope, is "drop first n-1" :/
 
Which is the creepiest: :} :) :] :D :0
 
CMC: Produce the array [0, 0, 1, 1]
 
@cairdcoinheringaahing that looks like a pretty old way of formatting the code/input. i'm surprised that part at least still works
 
@Bubbler Obvious 4 byter: Ø.x2
 
@Bubbler 4 lowered range floor divide 2 :p
 
6:13 AM
@JoKing TIO is fairly robust with backwards-compatibility. tio.run/#jelly#code=MCsx&input=&args=MTM works fine
(kind of, the decoding is off)
 
what's the target bytecount
12BU works too
 
It should be a fibonacci program, 5 bytes
 
I knew it was possible in 4, I was hoping to find a 3
 
just brute force all 16777216 3-byters :p
 
6:17 AM
in Jelly, Dec 21 '15 at 3:36, by Dennis
For example, “A”+33 gives the string b, but “A”+“!” gives the integer 98. This is how subtraction typecasts in CJam, and it works pretty well.
Whoever suggested this be removed, I dislike you
 
wait what does it do now
former errors, latter gives a 2-character-character that breaks everything and isn't usable?
 
@hyper-neutrino Basically, yes ಠ_ಠ
 
why remove da affine space
pain
 
yuno is a bit wack in that it just stringifies and concats, but that's cuz (i think) i have codepoint shift somewhere else
 
6:20 AM
Okay, I found a 3 for [0, 0, 1, 1]
 
Back again
 
which makes a 6 for Z matrix :P
 
CMQ: hardest golflang
 
osabie / jelly
osabie has no docs.
 
Osabie is easy
Has adequate amount of docs like vyxal
 
6:21 AM
@Ausername what?
 
@Bubbler wtf
 
@hyper-neutrino docs in the wiki
 
05AB1E doesn't need docs beyond a list of builtins
 
thing is stack based languages just need a builtin list and you're good to go
 
You can just string few builtins together in stack basef langs and get jobs done
 
6:23 AM
every function can be looked at in total isolation based on the state of the stack
 
Wdym by total isolation
 
like, you don't need to look at what's around it in the code
 
I see
 
+ adds pop() and pop() no matter what
 
Yes
 
6:24 AM
Yes
 
in Jelly, Jan 28 '16 at 22:15, by Dennis
Jelly also has ones, and [1,0,2,0]O gives [1,3,3]. However, I implemented that because J has it.
what? how does [1,0,2,0] go to [1,3,3]?
 
Accidentally typed
 
@cairdcoinheringaahing Replicate each index by the number.
 
@cairdcoinheringaahing [i-th element] copies of [i]
 
CMC: Replicate each index by the number (that is, given a list of non-negative integers, for each index i, i should be repeated a[i] times). 0- or 1- indexing allowed.
 
6:29 AM
@hyper-neutrino APL:
 
oh so there is a primitive
i was trying to work it out with /, ⍳, and ≢ but couldn't seem to get it to work
 
Where.
@hyper-neutrino That's the classic idiom: {⍵/⍳≢⍵}
 
@hyper-neutrino APL: , J: I., K: &:
 
All APL kids go together
 
ah. i was trying to use trains even tho a dfn(?) would be shorter but ¯\_(ツ)_/¯
 
6:30 AM
Absolutely zero reason to omit the same thing in Jelly :P
 
@Bubbler You forgot BQN: /
 
Jelly: Jx I think, unless there is a single atom for this
 
@hyper-neutrino /∘⍳∘≢⍨
 
pretty sure jelly does not have a single atom for it
 
ah. thanks. yeah i had some combination of those characters but in the totally wrong order then :p
 
6:32 AM
@hyper-neutrino Jelly, 5 bytes ḟ0x@T
 
you don't need to filter 0s from both sides because repeat by 0 just skips it anyway
so you can golf that to x@J
which is hopefully obviously golfable again :p
 
@hyper-neutrino I'm surprised that doesn't output [1, [], 3, 3, []]
 
well, [1, 2] ; [] is just [1, 2]
 
x is implemented as
 
i feel like gracefully replicating by 0 is a very big part of why we even have x
 
6:34 AM
lambda x, y: rld(zip(x, y if depth(y) else [y] * len(x)))
 
CMC: Replicate each multidimensional index by the number (that is, given a multidimensional array of non-negative integers, for each index (i,j), (i,j) should be repeated a[i][j] times). 0- or 1- indexing allowed. E.g. [[1,0,2],[0,1,0]] gives [[0,0],[0,2],[0,2],[1,1]] or [[1,1],[1,3],[1,3],[2,2]].
 
in the sense that i vaguely recall the apl/j equivalent of x being the main way of filtering things
 
Indeed.
 
@Adám I might just be very tired rn, but I have no idea how [[1,0,2],[0,1,0]] maps to [[1,1],[1,3],[1,3],[2,2]]
 
@cairdcoinheringaahing 1 (1,1), 0 (1,2), 2 (1,3)s, etc.
 
6:39 AM
@Adám Jelly, 8 bytes ŒJWẋ¥"FẎ
 
I was just about to post my 7 byter :P
 
Ooh, nice use of ŒĖ
 
thanks
it was my first thought, then i realized i could sidestep W with it as well
 
Shame that Jelly doesn't smash-print [[1, 1], '', [[1, 3], [1, 3]], '', [2, 2], ''] tho :/
@UnrelatedString 6 bytes in my fork ($€ -> ɱ) :P
 
That's very irregular to my eyes, I didn't imagine a built-in could reliably convert it to a list of pairs
 
6:42 AM
smash printing would give 11131322 which doesn't quite exhibit the structure we have to show
 
Btw, in APLs, the built-ins for the simple list case of course works for the multidimensional cases too.
 
Yeah, I was hoping it would collapse the []s into [[1, 1], [1, 3], [1, 3], [2, 2]] (basically, "hiding" the [] and collapsing the nested lists into a single one)
 
@Adám works in APL and &: works in K, but J's I. has rank 1 and therefore fails to do so :/
 
CMC: What should 1+1× do for an input of 3?
 
@cairdcoinheringaahing Assuming LTR, it's natural to me to evaluate to (1+1)×3
 
6:48 AM
CMQ: What might be a nice overload for multiplication operator when operands are both strings
 
@Bubbler Oh, I didn't realise that. Always strikes me as strange when J fails to generalise (right) to higher-rank cases. Another example is i. which is just $i.&(*/) (i.e. ⊢⍴∘⍳×/) rather than mulltidimensional indices.
 
in Jelly, Feb 2 '16 at 14:49, by Dennis
The monadic link 1+1× used to return 6 for input 3. 1 set the return value to 1, +1 incremented (yielding 2), and × performed a hook multiplication (yielding 6).
 
@wasif Apply the case of one to the letters of the other.
 
in Jelly, Feb 2 '16 at 14:50, by Dennis
With the change, it returns 4 instead. 1+ increments (yielding 4), and multiplies by 1.
 
@Adám nice
 
6:49 AM
wait, what
i thought a nilad at the start of a monadic chain set the value
is that only for LCCs?
 
wait what was the original parsing rule that caused 6
 
yep it's only for LCCs
 
in Jelly, Feb 2 '16 at 4:54, by Dennis
This came with a minor change though, to keep things consistent: a chain of atoms with arities 0 2 0 2 is now parsed as (0 2) (0 2), i. e., two atops, instead of 0 (2 0) 2, set return value, atop, hook.
 
yeah i guess it either special cased nilads at the beginning of any chain or it
yeah that
parsed 2,0 before 0,2
reminds me i need more ideas on all the things lone nilads could do other than just replacing the running value
 
in Jelly, Jun 1 '17 at 15:47, by Dennis
I am considering altering the behavior of unparseable nilads though. The implicit print is rarely useful, and instead of printing these, these values could be stored on a stack, and pop'd to be used instead of the rightmost argument for coming dyads.
 
6:54 AM
CMC: Interpret S10K
 
what is S10K
 
Ignore everything and output 10k copies of the character S
 
A programming language where any program prints 'S' 10000 times.
ninjad
 
oh nice
 
@lyxal Hi!
 
6:57 AM
5 bytes in Jelly
 
@Ausername Vyxal 5 bytes: \sk2*
 
probably the same thing as Jelly but with yuno's builtins: ”Sxᴇ4
 
Python: 's'*10000
I tried 10e3 first
 
Vyxal H, 4 bytes: ²\s*
 
but it returned a float
 
6:59 AM
@wasif Python...
 
@Ausername hey what does the H flag do
 
Yeah, Python's e always gives a float
 
Puts 100 on the stack'
 
lol
 
oh finally that flag actually sees some legitimate use other than cheesing FB
6
 
6:59 AM
flags for everything
 
@hyper-neutrino I've used it several times
 
@hyper-neutrino except I don't use it for FB lol
 
7:35 AM
BMG starts in 30 minutes!
 
mark as announcement pls
 
7:53 AM
BMG is an hour, right?
Hey @LeakyNun!
 
not exactly
 
Oh?
 
it's supposed to be an hour i think
but it goes about as long as we have drafts to answer
 
Ah, true
Just hoping for a sense. Anyone know how long was it last time?
 
It goes like between 60 and 90 minutes
 
7:56 AM
Thanks!
 
0
A: Sandbox for Proposed Challenges

BubblerIs this an ordinal transform? code-golf math decision-problem integer Related: What's my telephone number? which asks to calculate the terms of A000085, the number of possible ordinal transforms of length n. Background Ordinal transform is a transformation on an integer sequence. For a sequence \...

 
I'll try and be here after all, then! Though I really should be sleeping.
I'm in the Nineteenth Sound Byte in the CGCC Discord, if anyone would like to join!
 
BMG o'clock!
 
Welcome to the 5th Biweekly Mini Golf! During this event, we'll post some CMCs (Chat Mini Challenges) for you all to solve. A new one will be added every 5 to 10 minutes. If you have any questions, don't be afraid to ask. Good luck!
3
in BMG Drafts, 7 hours ago, by Bubbler
Draft: First n terms of 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, 5, 4, ... which has a pattern of [1, 2, 1], [2, 3, 2], ...
 
ngn/k, 16 bytes: {x#,/1 2 1+/:!x}
 
8:06 AM
@Bubbler Zsh, 33 bytes: for ((;++x;))eval '<<<$['{,1,}+x]
 
APL: Playing around with {0 1 0+¨⊂¨⍳⍵}, but can't get it to work Totally wrong
 
0 1 0∘+¨
and you don't need the ⊂¨
 
Or (⊂0 1 0)+⍳⍵
 
yeah, that's the more APL way of doing it
 
{⍵↑∊(⊂0 1 0)+⍳⍵) should work I think
 
8:08 AM
@Bubbler looks like a kaomoji
 
@Bubbler I was enclosing the wrong side!
 
@pxeger Is there a way to quit execution early?
 
that'll have to do for now
 
Oh ok
 
I'm working on a stop button :)
It's surprisingly complicated to implement
 
ovs
8:09 AM
05AB1E, 7 bytes: ƵKSλ£₃>
 
in BMG Drafts, 7 hours ago, by caird coinheringaahing
Draft (inspired by a builtin I just added to my Jelly fork): Given a list (even length) of integers, split into consecutive pairs, sort each pair by its sum, then flatten. e.g. [2,3,6,4,2,1] -> [[2,3],[6,4],[2,1]] -> [[2,1],[2,3],[6,4]] -> [2,1,2,3,6,4]
 
att
@Bubbler Mathematica, 30 bytes: Join@@#~Partition~2~SortBy~Tr&
 
@att I always wondered about ~ parsing. Looks like it's left-associative (kind of)
 
We're supposed to be golfing these, right?
 
8:14 AM
@AviFS Yes
@AviFS Do you really need <>? :P
 
@Bubbler ngn/k, 20 bytes: {,/{x(<+/'x)}0N 2#x}
 
@AviFS Golfed 1st challenge in BF: +[.>.+<.+]
 
ovs
@Bubbler APL, 19 bytes: {⍵[⍋2/+/¨⍵⊂⍨2|⍳⍴⍵]}
I feel like there is something shorter for ⍵⊂⍨2|⍳⍴⍵
 
att
@Bubbler ~ ~ is, yes
 
@AviFS That's wrong, I think +[.+.-.+] should do
 
8:16 AM
^
 
@Bubbler Oh... that's good. But I don't think mine is wrong. If you look at the section where it prints numbers, you'll see 010121232...
 
att
@Bubbler Mathematica, 22 bytes: #+2#~Mod~3&~Array~#/3&
 
@ovs The only other alternative is to reshape, but (.5×≢⍵)2⍴⍵ isn't particularly short either
in BMG Drafts, 8 hours ago, by AviFS
Draft: Output a magic square with the input number in one of the cells.
 
att
what size square?
 
@AviFS I guess you mean 3x3 magic square?
 
8:20 AM
3x3 I'd assume?
 
size 1x1 lol
 
@pxeger Interrupting execution may be nontrivial, but allowing the user to change the timeout should be an easy temporary fix.
 
hmm I hadn't thought of that
 
@Bubbler I thought that initially, but then I decided any size should be allowed to make it interesting...
@Razetime Then again... this. Good one!
I say 3×3 or greater.
Doesn't need to be consistent across inputs
@Razetime With Razetime's idea, we do have an honorary 0 byter in the implicit IO langs
 
ok so wait
 
8:23 AM
Polyglot, 0 bytes
 
should it theoretically terminate before the end of the universe
 
3x3 is still easy: 7 0 5 2 4 6 3 8 1+⊢
Time to compress that digit vector :P
 
@Bubbler Wow... that was clever!
 
cause the general short solution would be generating random 3x3's until one of them is a magic square and contains said number
 
I thought one would have to do something like:
 
n+i  1     2
3    4    n+i
5   n+i   6
 
@betseg memelord has arrived
 
im a bit rusty
 
@AviFS That doesn't quite work, but there's indeed a general solution for 2 or 3 givens using a pattern like that
 
No, it doesn't quite work, I know. But I thought something like that. Yours is really clever!
We can move on! Between @Razetime & @Bubbler I think we're good on this, haha
 
8:29 AM
in BMG Drafts, 7 hours ago, by Bubbler
Draft: Given an ASCII string, double each single quote and enclose it in single quotes. "How'd'n't I see that" -> "'How''d''n''t I see that'"
in BMG Drafts, 7 hours ago, by Bubbler
Draft: Given a rectangular 2D string of odd width and height, place the character X at the center.
Posting two because I'm briefly going AFK now
 
@Bubbler the double-quotes on the outside are not part of the input, right?
 
@pxeger Correct
 
is I/O as a list of codepoints ok?
 
Yes
 
@Bubbler ngn/k, 20 bytes: {a,((1+a=)#x),a:"'"}
@Bubbler this can be a list of strings?
 
8:33 AM
@Razetime yes
 
hm this is not very obvious in K
 
@Bubbler Zsh, 25 17 bytes: <<<"'${1//'/''}'"
 
@Razetime Likely easier if you take it as a newline-separated string instead
 
@Bubbler V(vim), 4 bytes: Try it online!
 
@Bubbler Vim:i'<esc>qqf'l.q9999@qA'
I'm sure V has some loop thing to make 9999×macro less silly
 
8:41 AM
@AviFS you're missing an escape there
 
True, thanks
@pxeger Fixed!
@Razetime Nice!
 
@Bubbler yeah probably @[;;] but no clue on what to do
 
alternatively, i'<esc>A':s/'/''/g<cr>
 
@pxeger True, but why do that...
 
cos it's shorter and works with more than 9999 apostrophes?
 
8:43 AM
Whatever :P
 
@pxeger also missing an escape, and needs to be done in the other order
 
in BMG Drafts, 7 hours ago, by DLosc
Draft: Given N (0- or 1-indexed), output the Nth element of this sequence:
in BMG Drafts, 7 hours ago, by DLosc
""
\"""\"
\"\\"""\\"\"
\"\\"\\\\"""\\\\"\\"\"
\"\\"\\\\"\\\\\\\\"""\\\\\\\\"\\\\"\\"\"
in BMG Drafts, 7 hours ago, by DLosc
Brownie points to whoever finds the 7-byte Pip answer. ^_^
 
:s/'/''/g<cr>I'<esc>A'
probably something shorter with ctrl-O
 
@Bubbler Another lame Vim: 3i 1<esc>b<c-a>qqYp<c-a>w<c-a>w<c-a>q9999@q
 
Pip, 8 bytes: Lax:RPxx Try it online!
@DLosc idk what black magic you've done to get 7
 
@betseg Isn't v:Vec<_> shorter than the turbofish?
in BMG Drafts, 7 hours ago, by Bubbler
Draft: Given a string, output which-th time each character is appearing in that string. "abracadabra" -> 1, 1, 1, 2, 1, 3, 1, 4, 2, 2, 5
 
@Bubbler 7 bytes: Try it online!
gotteeem
 
Lol nice
 
@Bubbler oh yeah
v:Vec<_>=a.chunks(2).collect() for 83
 
Under CGCC rules you can also cheat and replace i32 with i8 :P
 
8:57 AM
true lol
i misread mb
 
@Bubbler APL, 28 bytes: {a⊣{a⊢←(⍋b)@(b←⍸⍵=a)⊢a}¨a←⍵}
 

« first day (3811 days earlier)      last day (1047 days later) »