« first day (4012 days earlier)      last day (814 days later) » 

12:06 AM
@taRadvylfsriksushilani there's some internet in this house
 
Give us some feedforward first
 
@emanresuA Looks good
Seems like something along the lines of "sort every dimension" would be a clearer title
 
Done
 
12:36 AM
@Fmbalbuena I like Charcoal because Verbose mode is easy to code in. I can't remember why I like Retina ~~~maybe because it's fun trying to parse HTML using regex~~~
ugh, I can never remember the markdown for strikethrough
 
Nobody can
"How do you do strikethrough" is like the #1 thing people ask here lol
 
Just do it like this
 
They need to have clippy appear when you type more than two -s or ~s in a row, and be like "I saw you were trying to use strikethrough"
 
@taRadvylfsriksushilani Or <s>
 
Oh yeah (although there's no HTML of any sort in chat MD IIRC)
 
12:41 AM
Chat MD isn't even MD lol
I'm sure they have some sort of custom parser
 
Of course, yeah
What else would they have?
 
Something sensible /s
 
I suppose MD parsing might actually be complicated enough it's worth using a library
 
@taRadvylfsriksushilani Someone else's parser?
(and generator)
I mean, it doesn't even work properly for quotes and multiline stuff
 
Wait, MD generator?
 
12:45 AM
@taRadvylfsriksushilani it's very simple if you don't bother being sane
 
Well then that's no concern for whoever made SE chat
 
Chat's designed partially to not allow extremely large messages that disrupt conversation
 
@taRadvylfsriksushilani I mean a MD -> HTML translator thingamajig
 
e.g. kramdown
 
12:47 AM
But it does anyway as you can see ^^^^
 
CommonMark is what main uses
 
Right, they announced the move a while back
Would it really be that bad if they allowed normal markdown (and raw HTML)? Is there that much potential for people to make very big stuff?
 
I'm quite sure that's not why they went with their own markdown
They probably just figured "eh, can't be that hard" and didn't consider using a library (that's what I'd have done)
 
also probably a "not many people will use this anyways"/"we can always replace it in the future"
 
I would've taken the lazy route and gone straight to a library :P
 
12:59 AM
I've used a total of like...two libraries, ever
If I can write it, I'll do it myself :p
 
integrating a library is still work though (especially if licenses need to be considered), and it becomes much more of a hassle if you want to do custom things (like not allow # headers or whatnot)
 
Sandbox posts last active a week ago: Climb a ragged list
 
Fair enough
@taRadvylfsriksushilani Even for your server and stuff?
 
@taRadvylfsriksushilani Same :P
 
@taRadvylfsriksushilani (i recently took that to JSON and wrote my own parser in java. Not brave enough yet to parse HTML though)
 
1:02 AM
I understand parsing a lot more after writing a syntax highlighter for Vyxal
(Vyxal's quite easy though... there's 2 (?) cases which require backtracking)
 
1:30 AM
@Neil use -
@Neil When you used Charcoal and Retina?
 
 
2 hours later…
3:13 AM
wow I can't believe it took me so long to find the correct indentation method. disregard all I said on the topic before
you're supposed to center your code and make nested lines shorter so they have more space separating them from the left margin
 
hi guys
 
0
Q: Select one element from each set but the selected element should not be repeated

Anish SharmaI have a few sets, say 5 of them {1,2,3} {2,4} {1,2} {4,5} {2,3,5} Here, I need to choose at least 3 elements from any three sets(One element per set). Given that if an element is already selected, then it cannot be selected again. Also check if any solution exists or not. Eg set {1,2,3} -> choos...

 
it's so beautiful my eyes are going to burn out. If they don't explode first
 
lol
 
 
1 hour later…
4:34 AM
@Wezl-yizl This is the first thing I'm seeing when I opened my laptop a second ago. I'm considering closing it again and jumping headfirst into a pit of poisoned bamboo spikes.
@user I mean...I've used things like nginx, but those aren't exactly libraries
 
@NewPosts Dupe of a sandbox post
 
Usually the only times I'll consider a library are either when the code requires sufficient complexity and has enough odd corner cases that implementing it myself would be hugely time consuming and possibly open security vulnerabilties (things like WS libraries or HTML parsing come to mind), or if I need that part of the code to be extremely optimized and there's an existing and trusted library that does it
Like, I would've used a library for bigints instead of implementing them myself, if I had needed them before ES2020
 
Yep
Or something like codemirror
 
Yeah, good one. I've actually attempted to use that in a project before.
But I opted for the experimental version, which requires you to do all sorts of stuff, and the number of es was bad for my mental health
 
4:56 AM
CMP: Numpy or not
i dont like numpy for reasons
 
¯\_(ツ)_/¯ Vyxal does'n't use it
 
do you like numpy is the question, not whether you should use it
i think numpy is unnecessary because python is TC /s
 
It's okay if you actually have a use for it
 
If you actually have several uses for it
Vyxal got rid of numpy because we were using it for two things
 
I wonder how much damage adding limited networking support to RTO could cause
Being able to download libraries and packages from npm/pip/apk could be useful
 
5:01 AM
@emanresuA and what was those 2 things?
 
Maybe that can be a feature in "RTO pro"
 
@PyGamer0 Diagonals and not sure
 
@taRadvylfsriksushilani (The bonus features you'll unlock when you link a CGCC/GH account, no paid tier of RTO...yet? :p)
 
@taRadvylfsriksushilani i feel like it would be a lot more annoying than what it'd be worth
idk how easy it'd be to be absolutely sure this doesn't open any abuse vectors
and if you want ppl to be able to download packages, it's honestly probably easier to just have them ask you, or have a set of trusted users that can install them to your server
 
5:04 AM
Docker does allow pretty fine grained control of networking stuff IIRC, and since it's contained to the sandbox, the worst you could do is use it as a proxy to do shady stuff
 
oh, okay. yeah accessing illegal content is something you might want to worry about though. idk actually
i've had several python packages installed to TIO just via asking dennis back when he was active
 
@hyper-neutrino Well due to the way RTO works, they could propose something like "python + [whatever library]" as a language and go through the normal process, without having to bother me
 
i see
 
For popular languages, I might have a built-in way to request packages or new versions be added, without people having to go through the trouble of adding a whole new language
 
@taRadvylfsriksushilani users could install languages without having to go through the standard process. idk if that's much of an issue, but that could happen
 
5:15 AM
Well, they could install them temporarily. It wouldn't stick around.
 
oh it'd only be per session?
 
Yeah. Maybe with a way to cache them for the same user.
 
What if you want multiple packages in one thing?
 
Not sure what you mean
 
@taRadvylfsriksushilani that could cause some confusion if the packages take longer to install than whatever the timeout limit is - I've pip installed things that take longer than 60 seconds
 
5:17 AM
@taRadvylfsriksushilani As in if you want to import numpy and import sys
 
Well, on second thought doing it as its own language would probably be strongly discouraged, but if you did do that there's no reason you couldn't call it "python + numpy + sys" and add both
But I'd think sys is installed by default
 
correct
sys is in the stdlib
Idea: people can propose packages to install, and the community can vote on which packages they think should be added. Once a package reaches a certain threshold, it automatically gets installed
because democracy.
 
@lyxal That's a good point. I guess I probably shouldn't do the networking thing.
@lyxal That sounds similar to how adding languages versions will work, so I might just lump that in with that
 
@taRadvylfsriksushilani also, there's the fact that allowing package installation is rather overkill for the goal of RTO; I assume the goal of RTO is to allow people to try quick little snippets of things online, not develop whole projects. If you install enough base libraries, the requests for smaller libraries shouldn't be too overwhelming
 
That's also a good point
Although, I do plan on trying to make RTO a little more versatile than TIO, possibly with support for things like running KotHs "in the cloud"
 
5:23 AM
assuming a best of 3, I have 2 good points to everyone else's 0 in this discussion. therefore, I win. ;p
 
People (aka loopy walt and occasionally ovs) use python+numpy here
 
but also, once you've added a language that needs numpy, it'll be available everywhere
if you want a list of python libraries to include, here's a good list
it's the libraries pythonanywhere has available by default
 
I just discovered
 
@lyxal That's not necessarily true. A JS sandbox, for example, won't have Python installed at all.
 
\frac12 renders as 1/2
 
5:26 AM
@taRadvylfsriksushilani I meant language-wise
 
@lyxal Ooh, that's exactly the sort of thing I was planning to look for
@emanresuA We were discussing that here less than a week ago, I think
 
@lyxal huh, TIL pyanywhere has pyyaml pre-installed
 
if i search for pyhof python in google its pypi page comes up
 
man github scrapers are the funniest things ever
kandi has reviewed Vyxal and discovered the below as its top functions. This is intended to give you an instant insight into Vyxal implemented functionality, and help decide if they suit your requirements.

Return a string representation of a structure .
Parse a list of tokens .
Execute Vyx .
Split a string into tokens .
Vectorise a function .
Execute the script .
Transliterate a token .
Wrap lhs and rhs .
Lazy ljust
Zips elements of lhs .
> transliterate a token
> lazy ljust
 
Execute Vyx
 
5:38 AM
> It has a neutral sentiment in the developer community.
 
> Wrap lhs and rhs .
 
oh oh and something else hilarious:
> Vyxal has no build file. You will be need to create the build yourself to build the component from source.
 
Lol how’d they measure that
@lyxal 😡
 
> Vyxal has no vulnerabilities reported
Aaron:
 
> reported
They were handled privately :p
At least they got the installation and some other stuff right
 
5:42 AM
Weak. Everyone knows the correct policy is:
1. Contact shady github scrapers
2. Post vulerability publically
3. Wrap lhs and rhs
2
 
> kandi has reviewed jellylanguage and discovered the below as its top functions. This is intended to give you an instant insight into jellylanguage implemented functionality, and help decide if they suit your requirements.

Generate a monadic chain .
Synthesize chain .
Parse a literal .
Decompress a string .
Convert an integer to a base .
Parse code .
Compute pemutation at given index .
r dyadic link function
convert argument to string
Convert argument to lowercase
 
I am still impressed by how much info this kandi thing did get though
 
I think it has basically every repo
It's a github mirror
 
kandi has reviewed proton and discovered the below as its top functions. This is intended to give you an instant insight into proton implemented functionality, and help decide if they suit your requirements.

Evaluate a function .
Assigns method parameters to a given expression .
Construct a tree .
Implement imports .
Return a list of indices .
convert h to h
Return the grammar for the given operator .
Assign x to y .
Returns the next token .
Match pattern .
 
5:49 AM
I think some of mine aren't on there
 
> evaluate a function
> assign x to y
this is pretty impressive regardless
but some of these are really funny lol
> convert h to h
 
so this is lgtm but with copilot?
 
... Nope
 
oh tis a ascraper
 
5:51 AM
yes
@lyxal how do i generate that
 
It only does it for sufficiently popular repos
 
:/
 
Great, my charger cordn't
 
@hyper-neutrino what if I want my h converted to r?
 
5:55 AM
I've never had a usbc charger cord lasting longer than 9 months
They just seem really indurable compared to pretty much everything else
 
does it take a while for things to show up, or do not all repos count as libraries?
 
I think it only counts things it thinks are libraries
 
i see. well, none of anything i've written is a library :P
i was trying to find my aoc repo
according to kandi, implementing discord.js from scratch would only take about 9 hours
 
6:12 AM
That's probably just the time it takes to type everything lol
 
it also says discord.js has 27 LOC
discord.py on the other hand would take over 8000 hours lol
 
@hyper-neutrino wait minified or unminified?
And then 9 hours to type 27 lines?
Wow
I didn't know they hired snails as programmers
3
 
github.com/discordjs/discord.js this doesn't look minified to me
 
It also looks like a lot more than 27 LOC
Like there's at least 28 lines
 
dare i say 29
 
 
2 hours later…
8:03 AM
sympy was released in the year i was born
 
8:18 AM
@UnrelatedString what is your pfp
 
8:32 AM
2 hours ago, by lyxal
I didn't know they hired snails as programmers
 
How’s that related?
 
@emanresuA Because they hired snails as programmers
 
As in related to their pfp
I don’t see a snail in there
 
8:49 AM
the combination of her hairstyle and large round backpack cause her to abstractly resemble one
 
0
A: Sandbox for Proposed Challenges

DialFrostEncoding Atbash cipher A simple cipher, that reverses the alphabet So if you have "A", it becomes a "Z" and a "B" becomes a "Y" and so on... Given the input as one line and a string, output the encoded string using the atbash cipher You may assume that the input is always lowercase and only alpha...

 
:)
hopefully no one has posted this
...
oh wait nvrm
57
Q: Swap the Alphabet

DowngoatIn this challenge, you will be "reversing" the alphabet or swapping a-z with z-a. This is commonly known as the Atbash cypher. Because this transformation makes the output look like some foreign language, your code will need to be as short as possible. Examples abcdefghijklmnopqrstuvwxyz zyx...

great i have to delete now
 
ok i got a fun cmc
CMC: Decrypt ifz-!zpv!dbo(u!sfbe!uijt-!ps!dbo!zpv@
 
8:59 AM
find out what it says
 
welp i ran out of challenges to make my brain hurts after golfing this
16
Q: Counting universal n-ary logic gates

BubblerBackground A classical logic gate is an idealized electronic device implementing a Boolean function, i.e. one that takes a certain number of Boolean inputs and outputs a Boolean. We only consider two-input logic gates in this challenge. There are \$2^{2 \times 2} = 16\$ distinct two-input logic g...

 
@PyGamer0 thanks for reminding me to edit another hint into my steganography cop lmao
 
lol
CMC: Decrypt: ~rs}*s}*k*xsmo*mrkvvoxqo
 
too lazy to lol
 
CMC: Decrypt: 5xjkw roe!uuht#vareon#cog!sfihloh and 6xhlu ooi#wueu#sdrhon$eph vgeflpj
first 2 cmcs are easy ^ is hard
actually the first one is very easy
 
9:30 AM
Hi all. I think we have a porn link at codegolf.stackexchange.com/a/132498/108721
pornish at least
 
looks like the original is archived so i edited that in
 
was it just a parked domain?
 
the archived original
not the porn that is
 
I mean how did a website which was previously a description of Late Acceptance Hill-Climbing become a website of porn
Did the domain lapse, and it's now just parked and has porn on it?
 
9:59 AM
ok so i'm not sure why i opened the link to check it but i did and nearly had a seizure kekw
yeah seems like yuri bykov is some person who used that domain as their personal site and it expired at some point and was hijacked for hosting porn
 
Or they decided there was not enough money in combinatorial optimization?
Where in nature everything that dies returns to the Earth on the internet it returns to porn it seems
3
 
Does anyone know why a chat room might not show on the active chat room list for the site?
There was activity here an hour ago
Yet it isn't in the active list, the all rooms list or even my favourite rooms list
(it should be because I starred it as favourite)
 
10:27 AM
idk
chat.stackexchange.com/rooms/130547/the-zshoo often doesn't show up in my favourite rooms list
 
0
Q: Only one from each set

AnttiPYour input is a non-empty set of non-empty sets of positive integers. For example: {{1}, {2, 3}, {2,4}, {1,4}} Your task is to output the maximal number of elements that can be picked from the sets with the following conditions: You can only pick at most 1 element from a set You can't pick the ...

 
10:47 AM
Hmm, I got an instant downvote for that question, did I do something inappropriate? Should I have edited @AnishSharma's question, or waited more before posting. For the record @AnishSharma first posted in stackoverflow, I saw that post and decided to make a sandbox post, @AnishSharma the reposted to codegolf.
 
dunno
seems fine to me
 
11:25 AM
Btw, does anyone know if there is a polynomial time algorithm for that question?
 
11:37 AM
It sounds like leaning into NP…
 
That doesn't mean there's no polynomial time algorithm for it ;)
 
True, P could be equal to NP.
 
Have we ever had "lowest time complexity wins" challenges?
 
That's what is
 
12:03 PM
0
A: Sandbox for Proposed Challenges

AnttiPOnly one from each set (fastest algorithm) Related. Your input is a non-empty set of non-empty sets of positive integers. For example: {{1}, {2, 3}, {2,4}, {1,4}} Your task is to output the maximal number of elements that can be picked from the sets with the following conditions: You can only p...

 
 
1 hour later…
1:16 PM
CMC: Loop through a ragged list, print every element
 
wait would that be a good challenge?
 
it's just flat + print
not all that interesting IMO
and it's likely been done before tbh
 
1:34 PM
@pxeger what does the ? do?
 
it's basically a ridiculous version of try-except
 
2:12 PM
0
Q: Build a list from a depth map

Wheat WizardYou will be given as input a non-empty list of positive integers. For example: [1,2,2,2,1] You want to produce a ragged list as output which has this as its "depth map". This list should have the same elements in the same order but each element n should be at the depth equal to its value. [1,[...

 
@mathcat APL: ⎕←¨∊⎕
 
2:32 PM
CMC: taking a matrix, move right, rotate clockwise, move left.
 
wdym by move?
      {¯1⌽⍉1⌽⍵}3 3⍴⍳9
8 2 5
9 3 6
7 1 4
 
1 2
3 4
gives (right)
2 1
4 3
1 2 3
4 5 6
gives (right)
3 1 2
6 4 5
 
Is the matrix 2D?
 
@mathcat yeah
 
@Fmbalbuena APL 4 Bytes: ¯1∘⌽
 
2:40 PM
⋄¯1∘⌽2 3⍴⍳6
not working
@PyGamer0 wrong
 
@Fmbalbuena it passed both test cases
      ¯1∘⌽2 3⍴⍳6
3 1 2
6 4 5
see
 
@PyGamer0 but TryAPL don't post the output
 
@Fmbalbuena cough cough we are in TNB
lol
 
@PyGamer0 TNB is TAO
 
no it isnt
      'TNB' ≡ 'TAO'
0
see
 
2:48 PM
No
 
why
 
      +/'TNB' = 'TAO'
1
 
thats not how equality works
 
OK, now the equality using "=" and "+/" works
 
@Fmbalbuena wrong, proof:
      +/1 2 3 = 4 5 3 ⍝ Are these vectors equal
1     ⍝ Yes?!
 
2:50 PM
why all this trouble
 
@PyGamer0 no, check if the element are equal, so TNB = TAO
 
Let's ask the Oracle of Truth
 
@mathcat APL is better than that
 
Let's see
 
@mathcat OOT ≠ TAO = TNB
so this don't work
 
2:51 PM
Oracle: Is TNB TAO?
 
@mathcat yes
 
@GingerIndustries ^^
 
@mathcat No
 
Ok
CMP: TAO = TNB?
 
@Fmbalbuena 1 0 0
 
2:54 PM
@PyGamer0 This is poll, only options are 1 and 0
 
APL says 1 0 0
 
so you get the first integer and get 1.
 
there are more 0s than 1s so 0
 
Vyxal says 0
 
2:55 PM
^
flax and dinoux say 0 evil laugh
 
LENGTH ERROR
      'TAO'='TNB'?1
                 ∧
 
@PyGamer0 So i said TAO = TNB
 
VALUE ERROR: Undefined name: TNB
      TAO=TNB
          ∧
 
@PyGamer0 You must use quotes
 
2:58 PM
@Fmbalbuena 1 0 0
 
Almost Every golfing language says 0, but this is weaker than True. so Try it online!
TRUE POWER
 
> Every language
4 languages is not every language
 

« first day (4012 days earlier)      last day (814 days later) »