« first day (3813 days earlier)      last day (1046 days later) » 

6:17 PM
hi
 
@Iamaperson Hello. Are you a bot?
 
@Adám I think they're a person :P
 
@Adám no :P
My name is literally "I am a person"
 
That's a pretty great exchange, though!
 
I thought code golf died
It didn't :)
 
6:20 PM
@Iamaperson prove it: write Hello, World! in python
 
@Iamaperson I know... pretty suspicious if I do say so, myself : p
 
print("Hello, World") :P
 
@Iamaperson It did for a while there! This chat room, I mean.
 
@Iamaperson wow you passed the captcha
 
6:21 PM
 
@Iamaperson This AI is getting too good...
 
One day, bots will be able to solve captcha's and we'll all be doomed :D
 
@AviFS maybe in Jelly? The AI doesn't know that for sure
 
wait didn't mean to post :D
 
@math actually me too
 
6:22 PM
Math stack exchange is my parent user :)
 
If we put enough golfed code on GitHub, will GitHub Copilot start suggesting viable golfs?
@Iamaperson My name is literally "a person"
 
@Adám That's pretty great!!
 
@Adám He has a point...
 
@math
ur name is math
but you don't use math stack exchange that much
hmmmmmmmmm
 
6:24 PM
@math Sure they do, it's in TIO's database :p
 
@Iamaperson I don't link it in my main profile because...
 
@Adám My name is literally "father" and yet...
 
I've only asked 2 questions
 
@AviFS Is your full name "Avi"?
 
6:25 PM
@Adám Yup! Full name.
 
So your name is "my father" or "father of", not just "father".
 
True, that's what I always tell people. But Google just says "father" and it wasn't worth explaining to the fact checkers. Though that strategy backfired, haha
 
what level of reputation is good
I say 1000+
 
depends on your standards
 
Although now I'm finding more reliable sources which do say "my father," so I will say that next time!
 
6:29 PM
@hyper-neutrino Yes, good point.
 
@Iamaperson Don't worry about it.
 
@Adám I'm certainly not my father either, though...
 
@Adám :)
 
@Iamaperson 2000+
 
6:30 PM
@math sorta agree but disagree
 
@Iamaperson You see, i'm already 1000+ and i'm challenging myself
 
2000 is just too annoying to work for
 
@Iamaperson Here on code golf, 50rep is enough for most users.
 
@Adám yes lol
 
@Adám because it takes less bytes?
 
6:31 PM
1,402 is the perfect amount of reputations
5
 
@math No, because it is enough to chat and comment everywhere.
 
2000 is too hard to work for, for me
But you got people on stack overflow hitting 1 mil+
:|
 
@Wezl So close.
 
@Adám >:|
 
@Iamaperson Eventually, it becomes rather meaningless, other than something to spend on bounties.
 
6:34 PM
It's a bit of an ivory tower stance for me to take, but working towards reputation rather than helping people out and enjoying your time on SE and letting reputation be a product of that experience IMO degrades both your experience and sometimes quality.
 
@Adám if someone does that again I get to downvote 10 of their answers
 
@Wezl if they don't have any answer they're lucky
 
it would be reversed anyway
 
@Wezl So close
Didn't hit 1400 :|
 
CMC: Output the following mnemonic for multiplying by 9:
9 * 1 = 09
9 * 2 = 18
9 * 3 = 27
9 * 4 = 36
9 * 5 = 45
9 * 6 = 54
9 * 7 = 63
9 * 8 = 72
9 * 9 = 81
(in words: the tens digits are increasing 012345678 and the units digits are decreasing 987654321)
 
6:38 PM
leaky you're back
 
@LeakyNun KC?
 
yeah
 
So we have to have that 0? Hm.
 
yep
 
So close to 1k!!!
(Reputation)
 
6:41 PM
@LeakyNun APL, 34: 9,'*',⍤1⊢i,'=',' '@1⍤1⍕⍪100+9×i←⍳9 Try it online!
 
Python, 57 bytes: for i in range(1,10):print(9,'*',i,'=',str(9*i).zfill(2)) - Try it online!
 
@hyper-neutrino I have a 48-byte solution
 
@LeakyNun Extended Dyalog APL, 29: 9,'*',i,'=',' ','0'⍢⊃⍕⍪9×i←⍳9 Try it online!
 
@LeakyNun can we output 9 * 7 = 6 3 for example because it looks better
 
@Wezl no, sorry
 
6:44 PM
(for that I have ngn/apl, 20bytes)
 
url encoding fail? :P
 
To anyone with over 100k rep, mad respect.
 
@AviFS It did?
 
@LeakyNun only 5 people sadge
 
6:46 PM
@LeakyNun what do you think of this cmc chat.stackexchange.com/transcript/240?m=58542341#58542341 ?
 
@LeakyNun vanilla Dyalog APL, 29: {∊9'*'⍵'= ',1↓⍕100+9×⍵}⍤0⍳9 Try it online!
 
@LeakyNun python 3?
 
@hyper-neutrino yeah
 
hm. was on my phone earlier but i'll try to get to 48 too now that i am on my laptop
@LeakyNun is this what you had? (python 3, 48 bytes)
 
6:48 PM
@Adám {∊9'*'⍵'= ',1↓⍕109×⍵}⍤0⍳9
 
@hyper-neutrino yeah
 
I hate stranding and the default APL printing format, but at least they're abusable
 
@Wezl I would Looks wrong to me.
 
whoops
 
@user41805 Yes, of course! Nice.
@Wezl fwiw, Roger Hui has started signing his emails with standing delenda est instead of ⎕io delenda est.
 
6:52 PM
several questions indeed
 
@user41805 I think you're venturing into the halting problem area
 
Jelly, 22 bytes: 9µ9⁶”*⁶⁸⁶”=⁶⁸’⁸9_”¶“”) (this is probably the ugliest Jelly code I've ever written)
there's probably a shorter way involving G but smashprinting like 13 nilads next to each other works xD
 
...is that just a chain of mostly nilads?
@hyper-neutrino G won't be that useful, but K€Y might be
 
@cairdcoinheringaahing yep, it's great xD
 
@hyper-neutrino first line ends in 08 in the output of your code
 
6:56 PM
oh wasn't paying attention oops
9µ9⁶”*⁶⁸⁶”=⁶⁸’⁸⁵_”¶“”) - Try it online! (still 22)
 
7:11 PM
What are some useful constants to have digraphs for?
 
do you have a list of ones you already currently have?
 
All current Ø ones in Jelly, plus a couple more
Might go look through MATL's list, it always seems to have a weirdly specific but useful constant on hand
 
@cairdcoinheringaahing An infinite list of all natural numbers?
 
I was considering that, but I'd have to rework Jelly to add infinite lists
 
Uppercase hex digits?
 
7:18 PM
:(
 
I'm planning on adding them to Jam tho
@Adám Got 2 different ones for that, '0123456789ABCDEF' and '123456789ABCDEF0'
Or do you just mean 'ABCDEF'?
 
some of matl's weirdly specific constants are for convolution and i have no idea if jelly's convolution builtin does the same thing
 
@LeakyNun Pip -s, 20 bytes: Fi,9P[9'*i+1'=i.9-i]
 
What about [0, 1]? I often find that useful
 
that's already a thing
if you just make a sequence class and implement __getitem__, you might be able to hack infinite lists in to some things, though it'll break a lot of other things
 
7:20 PM
1,0 could be good though
 
agreed
 
Ah, yes, the Boolean 3×3 matrices for the van Neumann and Moore neighbourhoods with and without self.
 
i vaguely recall having needed it recently
 
@UnrelatedString Added that as ع
 
7:21 PM
⁵D sometimes works, but often requires ¤
@Adám Oh yes, I've been meaning to add those, thanks!
@cairdcoinheringaahing Not exactly a constant, but a nilad: Current time [hh, mm, ss] and current datetime [yyyy, MM, dd, hh, mm, ss]
 
Maybe the Boolean matrices [[1,0],[0,1]] and [[0,1],[1,0]]?
 
I have the second one as Øx, cause apparently that is used significantly more than the first (Jelly corpus)
 
@cairdcoinheringaahing Do you have complex numbers?
 
@Adám Yeah, I'm just extending Jelly's builtin set
 
@cairdcoinheringaahing Do you have the four directions?
 
7:25 PM
[1,-1,i,-i]?
 
Yes, but also in clockwise and anticlockwise order.
 
not a digraph nilad, but do you have N => Nth identity matrix? not sure if it'd be useful ¯\_(ツ)_/¯
 
You might also want the four diagonal directions, and all 8/9.
 
What's the 9th?
 
7:26 PM
yeah getting the diagonals is much harder than just the main 4
 
8/9 are the same thing
 
in terms of gaussian integers at the least
 
rotate coordinate counterclockwise/clockwise might be a useful monad
 
Got both of those
 
That's the same thing as multiplication/division by i.
 
7:28 PM
well, for coordinate pairs i meant
 
Not for matrices
 
How about [0,90,180,270] and [90,180,270,360]?
 
Got to love Jelly's greedy matching: Øı is a valid digraph :P
 
as opposed to
 
Trying to parse it as a complex number
Or, splitting the chain at Ø and setting the argument to ı
 
7:29 PM
Pretty obvious that digraph prefixes are stronger.
 
i mean it'd require some weirdness to match the ı first wouldn't it? cuz if you scan left to right you'll see the Ø
wait no jelly uses a giant regex to parse everything
 
I think that ØØ is also valid, but ØØ1 isn't (the first Ø currently breaks the chain, then Ø1 is yielded) :P
 
lol wut
 
cursed regex moment
 
7:32 PM
Or rather, ØØ could be valid, if you add it to atoms
 
...so the digraph prefixes aren't actually coded as digraph prefixes, they're just the characters all defined digraphs start with
L|
:|
 
Yeah, it's why Œœ is a valid atom
 
I suppose that's like in APL.
 
you could definitely tokenize with the digraph prefixes being defined independent of the actual digraphs
 
@Adám von Neumann is orthagonal and diagonal, and Moore is just orthagonal, right?
@UnrelatedString Based on my interpretation of the regex, you could define AB as a valid digraph
 
7:36 PM
i feared as much
 
There's nothing in the regices that references Æ etc.
 
@cairdcoinheringaahing No, opposite.
 
@Adám Is by itself used for anything?
 
@cairdcoinheringaahing Yes, so when adjacent to something it can combine with, it needs separation.
 
Hmm. I suppose that you could assign quick/atoms to ØÆ挜Ð, but I wonder how often you'd need to separate them
 
you can remember it as "moore" neighborhood has "mo(o)re" neighbors (just made that one up)
3
 
Maybe add nilads for the next level Moore and van Neumann neighbourhoods too?
 
@RedwolfPrograms not a bug, but interesting behavior with your userscript - pressing ESC to cancel editing will stop editing but it won't clear the field anymore, meaning the message will just stick around in the box, lol.
@Adám like, in three dimensions?
 
@hyper-neutrino No, [[2,2,2,2,2],[2,1,1,1,2],[2,1,0,1,2],[2,1,1,1,2],[2,2,2,2,2]] and [[0,0,2,0,0],[0,2,1,2,0],[2,1,0,1,2],[0,2,1,2,0],[0,0,2,0,0]]
 
ah, i see
 
7:43 PM
So, von Neumann neighbourhood would be [[0, 1, 0], [1, 0, 1], [0, 1, 0]]?
 
Yes.
 
that makes more sense. also could be worth a monad
 
Considering adding a "given a matrix and md index, output the von Neumann neighbourhood" dyad
 
CMC: Given a space separated list of words, uppercase the second to last one and place the last one in a random place strictly inside of it.
 
@Wezl Can we assume the words are lowercased?
 
7:55 PM
example: it's barely below average => it's BAREaverageLY below or it's BARaverageELY below but not it's averageBARELY below
@Adám yes, but there may be non-alphabetic characters
 
Define word.
 
@Adám [a-z'_0-9]+
 
What other chars can the string contain?
 
space, and you may choose to accept a newline
 
Ah, so word means any sequence of non-spaces.
 
7:58 PM
yes
bend it how you like
and you can output all solutions instead of a random one
 
@Wezl Can the second to last word be a single letter?
 
no, because the last word couldn't be inside it, and there must be a solution
whoops, I meant uppercase the third-to-last one
it was a bad challenge anyway
and there's no CMC sandbox
 
Huh, ok.
 
Nice PFP Wezl
 
Thanks. It's animated but the animation doesn't work (bc &g=1).
 
8:05 PM
:(
Nice anmiatttion
 
bbyte
I can't believe I clicked that
 
@Wezl Extended Dyalog APL, 60: '\S+ \S+ \S+$'⎕R{((?≢1↓x)(↑,y,↓)⌈x),' ',⊃⌽x y z←≠⍛⊆⍨⍵.Match} Try it online!
 
@Wezl Pip -s, 28 bytes: YUCg@-3yRARR#y-1.:DQgg@-2:yg
Sort of abusing the input format--the words are taken as command-line args, which makes them "space-separated"
Nope, that's bugged. Hang on...
27 bytes: YUCg@-3y@RR#y-1.:DQgg@-2:yg
31 bytes with input as a single argument, as it probably should be: a^:sYUCa@-3y@RR#y-1.:DQaa@-2:ya
 
8:20 PM
That's probably the reason New Posts has broken
 
8:43 PM
It might not be pretty, but it is working like a charm xD
 
9:11 PM
You know what's fun? Upgrading a lang to use symbolic integers in all it's math functions, then forgetting to change the builtin constants from floats :P
 
Changing / to // right? I had some similar issues with some python code
I kept getting round off errors when using floats, but switching to ints fixed it
 
No, more "why is e^0.5 outputting 1.6487212707001282 instead of sqrt(E)?"
 
ahhhhh yes
 
why tf does µ,µ/ work
shouldn't / error on monads? (we've probably been over this :P)
 
why wouldn't it?
 
9:16 PM
it's reducing over a monad, isn't it?
 
/ just assumes that the link its given is dyadic. It only errors on builtin monads because they have lambda z: ...
 
0
A: Sandbox for Proposed Challenges

userKEYBOARD FOR MONKE! (WIP) code-golf Flavortext So...this is awkward. It seems I accidentally returned to monke last night after eating one too many banana sundaes. This has made many things inconvenient, especially typing. You see, monkeys only need the following characters: uppercase letters (A-...

 
so do monadic chains do like lambda x, y = None or smth like that
@SandboxPosts lol
 
For chains, because it just calls dyadic_chain(chain, args) each time, it doesn't actually matter
 
*sigh* jelly is truly cursed blessed
 
9:17 PM
blursed
 
@hyper-neutrino No, it just pops the chain off the stack and only ever passes it to dyadic_chain :P
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaah
 
def reduce_simple(array, link, *init):
	array = iterable(array)
	if len(array) == 0:
		return list(init)
	return functools.reduce(lambda x, y: dyadic_link(link, (x, y)), array, *init)
 
tbf, it makes sense :P
 
9:18 PM
it does but still :p
okay is there an example of a quick that requires a monad or dyad and will automatically coerce a variadic chain into a specific arity?
 
... /?
And \"þ{ etc. Anything that only works on a fixed arity will coerce the chain it's given into the required arity
 
i'm trying to find an example where something µ something works but µ something µ something errors
or will that never error just cuz combined chain arities are a scam
 
I don't think that will ever error, assuming the only change is prepending µ
 
ah. okay. well, it's not too important, just wanted an example for the tutorial i'm writing
 
mu seems complicated :p
 
9:30 PM
µ is the least complicated of the 5 :P
 
uh oh
 
Unless you have ð or ɓ in the link, µ basically means "reset the left and right argument to what the current value is"
 
9:44 PM
CMC: Take a string of lowercase letters (a-z); if it is "amogus", output "sus"; otherwise output nothing
 
@LeakyNun I have 14 bytes in Jelly
 
@cairdcoinheringaahing same
 
@LeakyNun Scala, 30: s=>if(s=="amogus")"sus"else "". Nothing interesting
 
@cairdcoinheringaahing Mine
 
9:53 PM
@LeakyNun Nice
 
@user you can save one by removing the space
@N3buchadnezzar you need to output "sus" not "gus"
 
@LeakyNun Oh nice, thanks
Usually doing foo"bar" doesn't work, never realized keywords are special
 
@N3buchadnezzar I have a 28-byte one
 
that returns False instead of nothing
 
Actually, that gives False
Yeah
 
lambda s:["","sus"]["amogus"==s]
This one is 32
 
As is lambda s:"sus"[(s!="amogus")*3:]
@LeakyNun Any hints?
 
lambda s:(s=="amogus")*"sus"
 
10:02 PM
@rak1507 Ah, that's smart!
 
yeah mine is the two multiplicands switched
 
@rak1507 Ah since False = 0 and True = 1, clever!
CMC Take in a string "ABCD" + and a direction "l" or "r" and cycle the string to the left "BCDA" or right "DABC".
 
can I take other two values for the direction?
 
If so, Jelly 1 byte
 
@N3buchadnezzar
 
10:16 PM
Otherwise, 7 bytes
 
I have this for 7 bytes assuming strict I/O is required
 
I have 6 bytes for strict I/O :P No I don't
 
I have this for 7 bytes
 
I picked l or r because of Jelly :p
 
10:23 PM
oh, o- is a lot nicer than my double double-decrement :p
 
Jelly poll: for programs in the form ...µ<quick> where ... is all one chain (no separators), what're the 3 most common <quick>s?
 
to quote Bubbler, "Trailing ɓ chain trick is indeed strong :P" :P
 
corpus?
 
Yeah, this is based on the corpus
 
idk, filter?
each?
 
10:24 PM
i'm gonna guess "each" (before ) existed), "max for", and "filter over"
or maybe just filter over and filter against and each
 
Filter is surprisingly low. is #1 (51 times), then # (28 times) and Þ/¡ (both 22 times)
Of the three filter quicks, they are used a total of 7 times
 
@N3buchadnezzar Python, 43 bytes: lambda s,d:[s[-1]+s[:-1],s[1:]+s[0]][d<"r"]
 
Kinda cool to see 3 different 7 byte solutions in the same language
@LeakyNun This one is a bit iffy as it allows other inputs than l and r
 
@N3buchadnezzar can we assume input is one of those?
 
@AaronMiller input will always be l or r yes
 
10:30 PM
Q: Which of qṇẉỵẓėṅ makes the most sense for a cmp(x, y) dyad?
 
@N3buchadnezzar then how is my program problematic?
 
A bit iffy makes my nose wrinkle, I did not say it was wrong :P
 
@N3buchadnezzar Python, 42 bytes: lambda s,d:s[2*(d<"r")-1:]+s[:2*(d<"r")-1]
 
@LeakyNun Retina, 28 bytes
 
@cairdcoinheringaahing q for query
 
10:42 PM
(-2 bytes if trailing newline is allowed)
 
@Neil cool
 
@hyper-neutrino I'm modifying the behaviour of <monad>/ in my fork: <monad>/ is equivalent to ,<monad>¥/, given that µ/ can always be replaced with ð/
 
@LeakyNun Charcoal, 19 bytes: E⁹⪫⟦9 * ⊕ι = ι⁻⁹ι⟧ω
 
(Plus all of the other reduce quicks)
 
@N3buchadnezzar ₍Ǔǔ⁰\r=i should work in Vyxal, but there seems to be a glitch involving strings but also parallel apply?
I’m not really sure
 
10:48 PM
actually Charcoal, 18 bytes: E⁹⪫⟦9 *⊕ι=⁺Iι⁻⁹ι⟧
 
@cairdcoinheringaahing nice, i think that makes sense :p
 
11:19 PM
How can you split a text file 0.9/0.1 into two files from the command line?
 
11:31 PM
@AaronMiller fixed
 
11:52 PM
Latest update to my Jelly fork is officially out. Adds a whole bunch of new builtins and functionality. Some highlights include h being aliased as lcm, some irritating bugs being fixed and proper symbolic math support
Feel free to drown me in pings because of various things I've done wrong ;P
 
Did you remember that Python 3.9 has lcm built into math? eg from math import lcm or math.lcm
 
I'm using 3.7
 
Eeeek, a caveman! :P
 
Besides, it already has a 2 byte lcm builtin, so I just aliased it (see the last few lines atoms ['h'] = atoms ['æl']) :P
 
Well, lcm is ×÷g after all
 
11:57 PM
Yeah, its mainly that it's been bugging me that there are a decent number of single byte dyads available, but lcm is 2 bytes
 
@cairdcoinheringaahing ping ping ping you used Python
@cairdcoinheringaahing ping ping ping you forked Jelly instead of a sane language /s
@cairdcoinheringaahing Big commit
 
Yeah, I mainly only do big commits and tiny little bug fixes :P
 
Oh wow, that's over a month of work
 

« first day (3813 days earlier)      last day (1046 days later) »