« first day (3950 days earlier)      last day (887 days later) » 

12:03 AM
@user lol rip
 
12:59 AM
@user HaCk ThAT sItE
 
@OldSandboxPosts what is the minimum value generated by uninterleaving?
Nov 18 at 1:03, by lyxal
Nov 9 at 1:01, by lyxal
New hobby idea: coming up with the opposite of old sandboxed challenges
 
1:15 AM
> email validation is very basic and only checks for ‘@’. Should also check for ‘.’ and that there is a ‘.’ after the @ character
Sep 10 at 11:04, by Adám
It does not match foobar@dk which is a valid and working email address (although probably most mail servers won't accept it or will add something.com.) — bortzmeyer Oct 14 '08 at 19:30
Idiots don't know that my email validation was actually better than what they suggested
(context: uni assignment)
 
1:43 AM
Is there a TIO clone/alternative that supports recent ES features? (specifically ES2020) All of the JavaScript-y languages on TIO balk at ?.
 
1:57 AM
@LeakyNun JS, 22 bytes: d=>e=>(d*d**e-1)/(d-1)
(was scrolling through old chat logs, and didn't see any responses to it)
 
2:23 AM
@LeakyNun Jelly, 4 bytes: take e and d, increment, to bijective base 1, from base d to integer (works with d=1 too)
 
2:58 AM
@OldSandboxPosts Unimplement some of the filenames (2x)
 
@user well time to learn hacking and delete that site
 
@OldSandboxPosts @lyxal Don't solve the running problem for bit.ly/30Nyjnz in \\\ [code-bowling]
I used tjjfvi's regex inverter, and the result is... not small.
> The challenge was to golf the source, not the output ¯_(ツ)_/¯
 
They were clearly just sorry to late see that
 
3:26 AM
@tjjfvi ( I have an answer to another high-voted unanswered question :) )
 
Ooh, nice! Which one?
Uh, use a stack snippet I guess?
 
@emanresuA The knot theory one (can’t link easily atm)
@emanresuA 👍
 
20
Q: Compare Dowker Knotation

Grain GhostDowker notation is a common way of representing mathematical knots. Dowker notation can be derived from a knot diagram in the following way (based on the description from the wikipedium): We will label each of the \$n\$ intersections with two numbers whose absolute value is on the range \$1,...

 
The hardest part was figuring out how to pronounce Reidemeister :P
2
 
Don't forget the bounty
@tjjfvi CMQ: Have you ever used ?. on its own (not ?.[...] or simiilar, just ?.property)?
 
3:49 AM
Oh wow, someone seriously did some knot theory
 
4:03 AM
is vim a programming language
cause its a text editor, (or am i wrong)
i would consider vimscript to be the language
 
@emanresuA In code golf? I don’t think so. In other contexts? Most definitely
 
 
1 hour later…
5:22 AM
ok so I'm running into an issue (this is happening in windows 11 WSL ubuntu 20.04.2) - if i do print(input()) and input something longer than 4095 characters, it just gets cut off to that
can't bypass it with sys.stdin.read()
how can I get strings longer than that?
 
rip
i'll just copy paste into a file then lol. thanks
 
Apparently you can use this in python to bypass the limit (termios is part of stdlib) but idk if you really need it
 
oh interesting. well i'll take a look at it and decide what i want to do with it; thanks
 
 
3 hours later…
Fime
 
hello pogger
 
Dog to poost?
Good to post?
 
I think it's dog enough
 
Ok. I have a couple more 'cos I've really been neglecting them lately, but I'll leave them for another day.
 
8:44 AM
0
Q: Will one-cell brainfuck halt?

emanresu ABrainfuck is an esoteric programming language that is Turing Complete, meaning you can't tell whether a given program will halt without running it. It's cell-based and has an infinite tape of cells, values containing an unsigned integer from 0 to 255, but if you give it arbitrary-size cells, just...

 
Have fun!
 
8:55 AM
@NewPosts I have a general idea of how to solve this problem, but I am most likely to copy the golfed brainfuck compiler lol
anyone learned stenography?
stenotyping looks so hype
 
i've looked at it a bit but nowhere close to enough to call it "learning" steno
 
10:01 AM
0
Q: Tips for parsing Standard Input in JavaScript

CreaZyp154I've been doing quite a few code golf recently and I realised that a lot of times, I have to do something involving list. Most of the times lists are space-separated or comma-separated values in the first argument (argv[2]), and the return value should also be a space/comma-separated string. Are ...

 
I have no idea what to do with ^, it can be y'all's problem :P
 
@OldSandboxPosts Thanks for the reminder. Any final comments (e.g. missing edge cases)?
 
Maybe get rid of the \b testcase since it's not in the required spec?
I personally don't like the challenge idea, but it's well-written and otherwise ready to post.
o/ for now
 
@emanresuA Good call. Other tests are beyond spec too. Will fix.
 
10:25 AM
0
Q: Convert Regex to Mask

AdámFrom my CMC. Given a regex and a non-empty printable ASCII text, return one bit per character in the text, indicating the positions of beginnings of non-overlapping matches, and also the positions of beginnings of sequences that are not part of any non-overlapping matches. You can: take the rege...

 
 
2 hours later…
12:29 PM
0
Q: Convert codepoint to UTF-1

nrgmsbki4spot1UTF-1 is one of the methods to transform ISO/IEC 10646 and Unicode into a sequence of bytes. It was originally for ISO 10646. The UTF-1 encodes every character with variable length of byte sequence, just like UTF-8 does. It was designed to avoid control codes. But it was not designed to avoid dup...

 
12:49 PM
@NewPosts Makes me want to implement UTF-69 where each character is represented as a string of 1s joined on 0s
and the length of each run of 1s is the character code for each character
the 69 in UTF-69 is just to make it extra confusing
because you'd expect it to use like 69 bits, but instead, it's just a horrible version of unary.
and so everything becomes either byte value 255, some number where just a single bit is 0 or where it's just less than 8 1s
so something like Hello, World! in UTF-69 assuming UTF-8 display becomes ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿïÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿûÿÿÿýÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¿ÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿïÿÿÿ
anyhow, that concludes my TED talk
thank you for attending
 
@lyxal *claps*
 
thank you kind sir. many appreciations for the appreciation
very cool allxy
 
@lyxal too epic.
 
1:04 PM
well if there's no-one else home to banter with, I shall bid y'all adieu for the night
o/ \o o/ \o
(that's the result of cloning btw)
(not kidnapping)
 
 
1 hour later…
2:06 PM
@lyxal That's what you want us to believe
 
Morning!
Just caught up on 48 hours of transcripts lol
Well, time to do 8 history assignments I've put off for the last two weeks
 
@RedwolfPrograms good job
 
Couldn't you procrastinate at some other time? Does it really have to be now?
5
 
Oh wait, it's actually more varied than just history. I've got 5 history assignments, 2 math ones, and an english one.
We're having to write some sort of research paper thing in english. Since I literally just did that for another class, I wonder if I could get away with submitting the same paper
 
@Adám procrastinating procrastination is the highest form of procrastination
 
2:15 PM
Oh wait the oldest history assignment I still haven't done isn't two weeks old, it's over a month lol
 
@Mayube Only when deferred.
 
unfortunately for we chronic procrastinators, procrastinating procrastination usually just means staring off into space in a dissociative state, silently screaming at yourself for not getting anything done
 
Ooh I found a paperclip in my backpack
 
Exciting!
 
2:30 PM
@hyper-neutrino what terminal are you using for WSL? Windows CMD sucks
 
@Mayube idk actually how can i check
i think i have it as the default, if that means anything
 
@hyper-neutrino pretty sure the default is cmd.exe. I would recommend Windows Terminal instead
 
Yay, I've finished 1 out of 8 assignments :p
 
@RedwolfPrograms did the paperclip help?
 
Sadly, no :(
 
2:51 PM
What am I missing here? According to the examples, U+0100 should result in A1 21, but the first value is calculated with A1+x/BE, so if x>BE the result should be at least A2 right?
Note to self: newlines in a chat message break markdown formatting
Ah, I think it's supposed to be A1+y/BE
 
@tjjfvi Posted!
 
3:29 PM
@Fmbalbuena I think it was Reece Burton
 
3:43 PM
@RedwolfPrograms ?
 
I am the world's luckiest person...I got all sorts of stuff in a survival word on the first few days, full iron, lots of food and supplies, and then fell off a cliff, failed my MLG, and died. I managed to find it, 800 blocks from spawn, at night, with no coordinates or even the faintest idea of which direction I'd taken. Then a creeper blew me up. Then I did the exact same thing and found all my stuff.
 
@RedwolfPrograms Are you minecrafter?
 
I died in my hardcore world falling off a slime island last night :(
 
/kick @RedwolfPrograms
 
3:45 PM
I forgot that slime flows slower than water
 
Modded?
 
very
vanilla minecraft got boring for me around 8 years ago
 
Theory: Every MC update where the minor version is a multiple of 9 is bad enough to cause a large number of people to stick with the old one
 
@RedwolfPrograms I think that applies to the version number as a whole. the changes in 1.8 were so extreme that the modding community stayed in 1.7.10 for years. The community didn't make a serious attempt to move on until 1.12
and even then there's still a sizable group of people who never left 1.7.10
 
3:51 PM
Oh huh, never heard about that
1.9 caused a lot of controversy too, so I guess we can't have any nice factor-based rules
Maybe "any updates ending in .8 or .9"
Except 1.19 is going to be good...
 
Every MC update where the minor version is a multiple of 9 is bad enough to cause a large number of people to stick with the old
 
well now you've jinxed it
 
dammit SE with your half-assed markdown
 
wait what even changed in 1.8? i forget now because of how massive 1.9 was
---strikethrough--- strikethrough
 
@hyper-neutrino We know what 1.19 will be lol
There's nothing to jinx
 
3:52 PM
@hyper-neutrino thanks
 
I remember when 1.8 beta came out and so many people hated it
 
All they added was armor stands and slime, right?
 
it added brewing and enchantment and villages and an endgame so they thought Mojang was turning their precious sandbox game into an RPG
 
Uh...
Oh, beta
lol
 
3:54 PM
@hyper-neutrino 1.8 brought a lot of changes to how the game worked, which meant Minecraft Forge, the most-used modding API took a long time to update, and had a very different API to pre-1.8
 
oh, I see
i thought people like hated the content or smth and i was like "i don't remember it being that bad"
 
We lost a lot of mods to that change. Lot of modders were so opposed to basically completely rewriting their mods for a new version that they just stopped modding
 
> a typical acre of Florida land produces an average revenue of three cents per year in falling cocaine bales
7
 
ah man my UTF-1 answer is almost working, I just need to turn -1s into 255s
 
Luckily we have fabric now instead of forge
 
3:58 PM
@RedwolfPrograms gunna take a few years to catch on though
 
From what I've heard, it's much easier to adapt it to new versions, which is good
 
I hope it does though, Fabric's API is much better, and the team behind Fabric aren't complete asshats
or at least, not publicly
 
I've been meaning to make a mod for a while
Seems pretty hard to get into though
 
not really
 
Anyway, gtg for now o/
 
4:01 PM
it's just Java. There are tutorials out there that teach the basics, which are good for learning how MC and Forge work under the hood. Once you've got that down it's just like any development really
 
4:18 PM
@hyper-neutrino same goes for me as well, steno is simply not useful for me
I'm usually on my phone, not my laptop
and I mostly type short chat messages anyway so there's not really a point in learning steno for me
 
yeah I don't really see a point in learning it lol; even with a custom dict i don't think it'd be faster for coding and i don't have any need to exceed 140 wpm lol
 
Why Hello, World! is not showing?
 
4:33 PM
Hello, World! message not showing
 
in what?
 
0
A: "Hello, World!"

FmbalbuenaFROM HERE TO THERE, 27 bytes FROM "Hello, World!" TO OUT Try it online!

 
it's a feed
they take time
by which i mean they're slow as hell
 
4:56 PM
Any tips for golfing this?
 
5:12 PM
I'm sure having my arguments ordered as y,x,z is going to upset someone
 
@Mayube [... for i in range(x-1,-1,-1)] can be [... for i in range(x)][::-1]
 
:o
does [::-1] reverse the list?
 
yes
 
Every python golf inevitably just becomes a series of list operations
 
I think by reordering the cases in [33,66,-c,-96] you should be able to shorten [(n>93)+(n>=c)+(n>222)]
 
5:19 PM
I think I see what you mean
 
Also the last line can be f=lambda n:[p(*[[n-d,4,252],[n-16406,2,246],[n-256,1,161]][(n<16406)+(n<d)]),([160]*(n>159))+[n]][n<256] - replacing the ternary if with a list index/selection
 
yeah if I reverse their order I can save a byte
@pxeger congrats, you just replaced the last non-list conditional with a list :P
 
lol
 
It's all lists, always has been
 
if/else and and/or are basically never shorter; you only use them in golf if you need lazy evaluation (e.g. in recursive submissions)
Also, you can submit as an anoynmous function expression with separate assignments, so you don't need the f=
 
5:22 PM
if only I could golf for i in range
oh really?
I thought you could only do that if there was nothing outside the function
don't know why I thought that
 
(even if you had to include everything inside the function, you could just assign the other things inside the default arguments of the lambda to make one horrible expression for the same byte count) nope doesn't work because the other functions rely on being able to call each other, which they can't if they're not stored as global variables
 
Don't need the parens around ([160]*(n>159)) either
I could probably find a way to skip the extra lambdas and do it all in one if this was 3.8 and I had :=
cos I'm really just using lambda calls for assignment
 
@Mayube so why not switch to 3.8 then?
 
calling t=lambda n:... with t(y//c**i%c) assigns y//c**i%c to n, so that I don't have to type y//c**i%c a bunch of times and lose bytes
 
you couldn't do it (as easily) with p, though, because you call it with a different set of arguments
 
5:28 PM
yeah
 
if you switch to def you might be able to inline it, but that'd probably be longer in other ways
 
yeah I tried that 2 or 3 times during golfing it and it was always longer
 
5:44 PM
0
Q: Can we turn this into a golfing languange?

leo-but-not-the-other-guyI recently came across this very interesting project: https://github.com/eignnx/misp It is lisp, but the m expressions used are much shorter than normal code. It would also pay a tribute to the original development history of lisp, where this feature was planned but never implemented. Having more...

 
@pxeger can save another byte by doing the same thing with 16406
@pxeger 217 bytes
 
6:40 PM
nice!
@NewPosts can I get a VTC up in here?
 
7:16 PM
@AaroneousMiller which mainly goes to show why the mean is not always the most useful kind of average
 
7:27 PM
I now use "Golf" as a general purpose verb meaning "to reduce the the quantity of something"
eg "I need to golf my calories if I wanna lose weight"
 
@leo-but-not-the-other-guy Welcome to The Nineteenth Byte! In answer to your question earlier, I'd say: 1) Sure, we always welcome new golfing languages (though you may find that you're the only person who uses it); and 2) another idea is to golf in misp directly, without making a new language.
 
@DLosc Cool, i was worried because it looked unmaintaned, but maybe i can fork it and look at the code. (Im a python noob, so keeping the code working is the best i can do)
 
7:51 PM
@Mayube I thought each distro used its own thing (on my computer, at least, I have an app called Ubuntu that launches an Ubuntu terminal that doesn't look anything like cmd)
 
CMQ can a regex tell if a string has an upper case, a lower case and a digit and no three characters in a row from the same of these three classes?
 
And I think if you use Windows Terminal, you'll have to make a profile for Ubuntu (or any other WSL thing) yourself, the defaults are just cmd, powershell, Azure (?), and something else
@Anush Probably, especially the more advanced flavors that aren't even regular expressions anymore
 
@user They all use conhost.exe, which is a console host (like a terminal), which I think is what Mayube meant by cmd (but cmd.exe is actually a shell, like bash (but worse))
 
Ah
 
@user I would be interested to know if it can be done in a standard regex
 
7:54 PM
(might want to put a disclaimer for that last parentheses: "DISCLAIMER: I am a Zsh fanboy") :P
 
@user ok but have you ever tried to use Batch (the scripted form of what cmd is interactively)? Its only flow control is a really terrible kind of for loop, and... goto
look at Neil's Batch golf answers
 
The only thing I ever tried to do in Batch was print something, and even printing newlines was painful, so I don't disagree :P
I don't touch shells beyond the minimum necessary for doing other stuff :P
 
@Anush The fact that (I'm guessing) it doesn't matter what order the upper case/lower case/digit are in (e.g. both Ab1 and b1A would be matches, ignoring the "no three chars" bit) makes it a lot more complex for a regex
I'd suggest just doing some basic string manipulation / using multiple regexes
 
@Anush I'm pretty sure they could, but it would be a very complex one
and like caird said, you definitely shouldn't lol
 
Well, this is Code Golf, so screw bad practice, imma try it
 
8:07 PM
it definitely wouldn't be the golfiest
 
8:22 PM
Got to love an \$O(2^{n!})\$ algorithm for a code-golf challenge :P
 
CMQ: in a golfing language, if } ends a block, what should } do when there is no block to be ended?
 
Create a matching { at the very beginning of the program
 
Current ideas include: create an implicit "define function" block
@user yeah, that's what I was thinking; basically the above, if { mean "define function"
 
8:50 PM
@user Note that whether this strategy is useful will depend on whether a program that starts with a {block} is a common construct in this language.
But yes, that's exactly what HBL does (with parentheses)
 
True. It looks like defining functions will probably be pretty common, fortunately
 
@pxeger yeah sorry conhost is what I meant
 
@LeakyNun Zephyr, 115 bytes: Try it online!
@Anush I think ^(?=.*[A-Z])(?=.*[a-z])(?=.*\d)(?!.*(?:[A-Z]{3}|[a-z]{3}|\d{3})).* should do it: Try it online!
with copious use of lookaheads, and assuming the string is printable ASCII only
But yeah, probably better not to use regex for this task.
Well, let's try it, actually:
CMC: Given a string of printable ASCII characters, return truthy/falsey (or two consistent values) based on whether the string contains an upper case, a lower case and a digit and has no three characters in a row from the same of these three classes.
World1 -> false (too many lowercase in a row)
WorLd -> false (doesn't contain a digit)
WorLd1 -> true
 
9:17 PM
@DLosc Oh wow, I came up with this monstrosity (dw, I didn't do it by hand)
 
@DLosc I bet mathematica has a builtin for it
 
@user 0_0
 
It's quite a naive solution, I just get all possible orders of the character classes' first appearance and generate a regex for each of them (generator program) :|
 
Yeah, my first thought was to test for every possible order of upper-lower-digit, but then I was thinking about the negative lookahead for the no-three-in-a-row rule and realized lookaheads could be used for the must-have-at-least-one rules too.
 
@lyxal Use regex smh
 
9:28 PM
@DLosc Pip Classic, 25 bytes: Ya$&{aNy&aX3NIy}M[XUXLXD]
I think $&_Na\&_X3NIaM[XUXLXD] should work in modern Pip (22 bytes), though I haven't tested it.
Slightly oversimplified explanation:
- Make a list containing the builtin regexes XU = `[A-Z]`, XL = `[a-z]`, and XD = `\d`
- For each regex:
> Count its occurrences in the input string
> Test whether the regex repeated three times occurs in the input string; return falsey if it does, truthy if it doesn't
- Logical AND all the results
 
0
Q: A CMS as small as possible

Ganesha SharmaYou may use any language! Have some fun! P.S.: If you don't know what a CMS is, it's like self-hosted website builder, but only works with one site! They have pages, and edit functions.

 
That's an ambitious challenge.
 
9:44 PM
Slightly unclear, imo.
 
@DLosc It does mean that any submissions in the language on this site can append a } to be functions instead of full programs, if that makes a difference (e.g. see CJam)
@NewPosts Ah, OP deleted just as I was finishing my welcome comment :/
 
10:00 PM
@pxeger could look back to the latest command that would take a block then implicitly begin a block after it that it then takes
 
@user I did, idiot.
 
@DLosc it does make me want to give it a shot though
 
@lyxal If your regex wasn't good enough, use gregex instead
 
@NewPosts Mathematica probably: HostCMSWebsite[]
 
@user then suggest a better regex next time
 
10:09 PM
@user that sounds like a service where a guy called greg delivers your packages
 
@lyxal $%$##??$@!%$.4asd[dfa]a? using Perl gregex
@Mayube That sounds like an amazing idea, I would definitely pay for such a service :P
 
@user Mfer how imma gon use perl regex in JavaScript
 
just call perl
 
Make a Linux VM in JavaScript, then install Perl in that VM
^^
 
@lyxal Javascript is just shitty Perl anyway
 
10:10 PM
@user doesn't that require es6
And besides, this course is like stuck in the late 1900s/early 2000s
 
Oh yeah, ES6, the new, bleeding edge version of JS that's going to revolutionize frameworks! :P
@lyxal rip
 
@user well it doesn't matter anyway because I finished it earlier this month
 
Jokes that are no longer funny:
1. Integer overflow
2. Mathematica having a built-in for everything
3. (I can't think of any others at the moment)
 
5. Numbering things out of order
a) inconsistent list numbering
 
4. Your mom lmao
 
10:13 PM
@RedwolfPrograms -2147483648: Integer overflow
 
@Mayube use a for pon loop :p
yesterday, by lyxal
for pon range(len(lhs)):
    lhs[index] = rhs(index, lhs[index], ctx)
 
I aim to find a language where that syntax is not only valid, it makes sense
 
Well I suppose it could mean that the first undefined variable found (in this case, index, assuming lhs and rhs are defined elsewhere) is the loop variable
Like an implicit for loop
If that makes sense
 
But what is pon?
 
10:17 PM
CMC: Print "**CMC:** Print "\*\*CMC:\*\* Print"..." (Print this challenge)
 
yesterday, by hyper-neutrino
pongers
 
10:35 PM
@Fmbalbuena what exactly do we need to print? an infinite buffer?
 
CMC: Given an integer m, output true/false if it is automorphic (that is, if m^2 ends with m)
 
@LeakyNun no, print this challenge
 
@DLosc 95
 
@cairdcoinheringaahing Try it online!
 
Try it online! fails for 66 (should be false, 66^2 = 4356)
 
10:42 PM
@cairdcoinheringaahing oh sorry i think ends with end of number
 
Ugh, I hate Jelly's
> return x[y - 1:]
Why is it -1???
@cairdcoinheringaahing 7 bytes in Jelly
 
@cairdcoinheringaahing Brachylog, 5 bytes: ^₂a₁?
@cairdcoinheringaahing yay Brachylog FTW
 
a is "affix" and a₁ means "affix from end" i.e. suffix, right?
 
yeah
 
Jelly needs a startswith/endswith command
 
10:49 PM
that's too prolog-like
 
please answer this
 
11:10 PM
@cairdcoinheringaahing you can use or something of the like as startswith so long as all of the elements you care about are truthy
i think
 
If you're trying to do right.startswith(left), you can do =Ạ I believe
 
oh yeah that works too
and then endswith is not so easy because the vectorization semantics are no longer on your side
pretty much have to double reverse or explicitly tail
 
@LeakyNun Oh, duh. Nice. ^_^
 
i guess ⁼ÐƤẸ is also an option for left endswith right lmao
 
@cairdcoinheringaahing Pip, 9 bytes: Try it online!
 
Absolutely nothing similar
 
ooh, nice mold
 
Yeah, I was happy about that one :P
I need to remember that as a way to truncate to length, especially if you know that len(A) > len(B)
 
11:23 PM
I... think this works for 6?
No idea what all of those leading zeroes are from
I guess the eval is causing the nilad interaction somehow
 
@DLosc Modern Pip, 8 bytes: SQaS#a=a
 
@DLosc How modern is Modern Pip?
 
@UnrelatedString Yeah, try replacing it with "to digits": Try it online!
 
@Bubbler As in, more modern than the version on TIO. You can run it on the Replit interpreter.
Looks like the S operator was added September 12 of this year.
 
11:39 PM
@cairdcoinheringaahing ARBLE, 33 bytes. eq(sub((m^2)|0,-len(a)),a)(m.."")
 
oh yeah i forgot that existed
 
CMC: Caption this image
 
pongers
 
pongers
 
(I hope you don't mind my editing it, HN)
 
11:52 PM
@cairdcoinheringaahing Vyxal, 6 bytes: ₌²LȯI⁼
 

« first day (3950 days earlier)      last day (887 days later) »