« first day (4196 days earlier)      last day (633 days later) » 

1:00 AM
Sandbox posts last active a week ago: Gitify a complete graph
 
1:28 AM
0
A: Sandbox for Proposed Challenges

BubblerHave you heard of tralindromes? code-golf string decision-problem palindrome I haven't. :P So I decided to define one: A tralindrome is a string which contains three sections X, Y, Z such that X and Y, and Y and Z overlap by at most one character, and X is equal to the reverse of Y, and Y is equ...

 
1:50 AM
CMC: Make !+-+! valid typescript syntax. No strings, comments etc
 
...
doubt that's possible
Unless we can append stuff to the code
 
!+-+!1 works in JS
 
Ah frick.
 
1:57 AM
Alright, ]!+-+![
 
Nice. Final challenge: ][_!+-+!_][
 
huh, what kind of ! is that
 
The same as in caird's
 
I mean, I can't grasp what the first ! is doing in caird's
 
2:00 AM
Non-null assertion
 
[0][0] extracts the first 0 from [0], and ! makes that true
 
... nope?
[0][0]! tells the compiler that [0][0] isn't null
 
@emanresuA I'll trust you, I know basically nothing about Typescript :P
@Steffan Ah dammit, I almost had that!
 
@Steffan Nice! I had [1][_!+-+!_]["toString"]
 
2:02 AM
ah nice
 
It works if you change 0 to 1
 
Ye, I was that close :P
 
The joys of writing a compression algorithm and having to play "which has a bug, the encoder or the decoder" every time you find an issue :|
 
Just copypasta something established like pako :P
 
2:22 AM
It's a more special purpose sort of compression, otherwise I would yeah
 
@Bubbler Little known fact: the r/copypasta subreddit was actually created to provide a database of texts for people to test their compression algorithms on :P
 
i'd love to see how that would perform
 
2:44 AM
Well, it's been a productive day of Trianguish development. Got an actual UI added, and permalinking now works (and has a pretty neat compression algorithm too)
Tomorrow I'll make it so you can do edit the program with your mouse too, and make it so that you can actually move the screen around to look at different things if you run out of room
 
@NoHaxJustRadvylf When will we be able to use this?
 
3:28 AM
Gotta say, it's super disheartening to see two posts from 2016 and 2014 with the tag, especially when one of those is "Can we get a custom Tour page?" :/
 
:/
More like status-never
 
att
well you see tomorrow tomorrow will be tomorrow's tomorrow, not tomorrow
 
3:51 AM
You've confused me. I'll figure it out tomorrow.
 
4:09 AM
@Zionmyceliaadamancy I'm sure it'll be done in six to eight weeks years decades
 
 
3 hours later…
6:45 AM
What fraction of integers are divisible by either 2 or 3?
 
2/3 of them
divide the integers into chunks of 6, and exactly 4 in each chunk are divisible by 2 or 3
 
Thanks! I just got there by counting them up to 500 :)
 
@Bubbler Finally resolved this lol
It was actually three separate dependency cycles
 
oof
 
7:47 AM
0
Q: Shifted auto-sum

FatalizeLet’s take a positive integer such as 123. We define the shifted auto-sum of this integer as follows: 123 has 3 digits. We thus consider 3 copies of 123. We stack each copy on top of each other, shifted by 1 digit each time: 123 123 123 We pad each copy with 0s (excluding the last one) to ...

 
8:13 AM
12
Q: Exponential transform of an integer sequence

alephalphaThe exponential generating function (e.g.f.) of a sequence \$a_n\$ is defined as the formal power series \$f(x) = \sum_{n=0}^{\infty} \frac{a_n}{n!} x^n\$. When \$a_0 = 0\$, we can apply the exponential function \$\exp\$ on this formal power series: \$\begin{align} \exp(f(x)) &= \sum_{n=0}^{\inft...

 
9:05 AM
@NewPosts There must be a lang where you can map over digits of a number
 
@Bubbler Vyxal has some builtins that do
 
and I just noticed that there are two different builtins that compute 2**a
E and Ǎ
 
Yep
We've had that for over a year, and I still don't know why
 
lol
 
9:21 AM
Poking around, it existed pre-rewrite
And git blame isn't being helpful because it's stuck on that one commit that nuked everything
 
Go to 1 commit before then run git blame?
 
I guess that works
 
I think you can even do it in the github interface
 
Okay it dates back to at least v2.0.0
Looks like the overload to E was added in v2.0 by Lyxal, and Ǎ wasn't in the codepage before that, and appears not to have an equivalent.
So Lyxal not only created both, but did so at the same time
 
9:53 AM
31
Q: Sums of Consecutive Integers

ArcturusBefore anyone says anything, similar and similar. But this is not a dupe. Some positive integers can be written as the sum of at least two consecutive positive integers. For example, 9=2+3+4=4+5. Write a function that takes a positive integer as its input and prints as its output the longest s...

 
10:23 AM
CMC: Print (the equivalent of) this
 
@emanresuA I smooth brain sometimes
 
Zsh, 2152 bytes: that
:)
 
user image
5
 
10:51 AM
That's very.. colorful blocks I guess?
 
11:36 AM
@emanresuA Zsh, 320 bytes: x=`fold -16<<<1020100201002010020000000000000120000000000000000000001201200000120001021020000102102102102102010210200000010201200120010200120000000100000200001200100000002001020010000000200102001000000020012000010000020000000000100020000012000000000000010020100201002010`;<<<[2.J${${${x//1/0}//2/0}//0/██}
 
 
1 hour later…
12:43 PM
If zsh had arbitrary precision ints instead of only floats it could be much shorter using base conversion
 
...if i posted an answer on meta, but now i disagree with myself, can i post a second answer
i dont wanna edit my answer because it has votes
or maybe i should just delete the first one
on my non halting language question, i posted this answer saying that langs which lack halting capabilities can output the solution than enter a loop that has provably no output
which seemed reasonable at the time but i now realize it has the flaw of not exactly being clear when it has entered the loop from the side of the person running the program
so it would make sense if it outputs the solution, some message saying that the program is done outputting (this is the "halt"), and only then enter a non outputting loop
to prove that it isn't still generating the solution and just taking a while
 
1:41 PM
If you can prove/explain to the reader that it won't output anything unnecessary, isn't that good enough?
 
2:28 PM
@emanresuA I'd guess three or four days
I need to add mouse stuff, which should take all of today, then write docs, which will take probably around a day
 
 
1 hour later…
3:31 PM
0
Q: Runs of Ones (What Fun!)

AdamSuppose you have an array with some known set of values (e.g. a string of \$0\$ and \$1\$) and you want to get all the locations of \$1\$s. Instead of storing a list of all the indices, if the \$1\$s come in "clumps" you can sometimes save space by storing starting and ending indices of "runs" of...

 
@pxeger yeah i guess thats a good point doh
 
4:22 PM
Y'know I think the code I just wrote for mapping rectangular coordinates to hexagonal ones is a contender for the worst code I've ever written
Here's a free sample:
I'm gonna have so much fun if I need to debug this in the future
 
4:49 PM
@NoHaxJustRadvylf can you describe the idea behind the algorithm?
im bad at reading code foreign to me but if i know what im looking for i can sort of get it usually lol
 
5:04 PM
0
A: Sandbox for Proposed Challenges

AdamAll Crossword Grids code-golf In crossword terminology, the grid is the region into which the crossword answers are inserted, consisting of white and black squares. The crossword answers, called entries, are inserted into contiguous sequences of white squares in a row or column, separated by blac...

 
@thejonymyster The first if part detects if your cursor is in an x-position that's between two horizontally adjacent hexagons, and determines which one it's a part of, then "corrects" the x-position to one that's unambiguous (but wrong). The second one converts that into an intermediate coordinate system, which uses rectangular coodinates for the hexagons but shifts every other row down so they fit. From there it's converted into the type of triangular grid coordinates it uses internally.
 
Is "Natural Number to set-theoretic definition" worthy enough for main?
 
I'm pretty sure I've seen more than one dupe of that
 
hmm looks like it
 
5:41 PM
@NoHaxJustRadvylf sounds hellish :D
 
 
2 hours later…
7:52 PM
 
Yeah I referenced that a few times. Most of the stuff there I'd already figured out a while back though.
 
@emanresuA this is the webpage ever
 
@emanresuA That's roughly what I do, yeah
 
Their code is much easier to understand than yours
Also, comments exist, and will probably help future you
 
8:03 PM
@emanresuA It's so awful that comments will not help. I didn't understand the purpose of any line other than the one I was writing while doing that :p
My plan if I need to change something in the future is a complete rewrite
 
8:37 PM
this is neatt
 
I knew that a few dollars was much more valuable back then
 
> You're one of the lucky ones. (x)% of people born in (y) didn't make it to 2022.
This is an interesting statistic. I'm surprised I've not seen it before
 
Yeah :P
 
> 99.9% of people born in 1901 didn't make it to 2022
I wonder why...
 
Damn, almost 1.5 billion more people on earth since I was born O.o
 
8:45 PM
o/
 
9:00 PM
@emanresuA Exactly 123,000,000 breaths
Unless it's rounded for everyone I got super lucky
 
yeah u got lucky
 
Wow I somehow managed to have a one in a million occurence relating to the single most boring thing I do then
 
9:14 PM
@thejonymyster I absolutely, yes. 100.
CMC: Output your language's name N times, where N is the number of characters in your language's name.
Unlike the linked question, I'm going to say that having whitespace before, after, or in between the occurrences is okay. (But no other extra characters are allowed.)
 
@DLosc J: 'J'
 
@DLosc Fig, ~5.762 bytes, *3"Fig" (no compression)
i dont think compression will make it smaller tho
 
Python 2: print"Python 2"*8
also D cuz why not: import std;void main(){"D".writeln;}
 
9:30 PM
@DLosc o wait theres a ~4.939 byter in Fig, *3"Fig
 
@Zionmyceliaadamancy Is that "Jelly for each in Jelly"?
@Adám Lol
 
lol im just going through all the langs with one byte names:
4: 3.60052504
 
@DLosc Yes, but literally means "duplicate previous link", so the code that's actually run is “¢³ƒ»“¢³ƒ»€ which is "for each character in Jelly, yield Jelly" :P
 
R: cat("R")
 
(ab)uses like three different corner cases in Jelly parsing/execution :P
 
9:37 PM
Nice
So is that outputting the strings directly, or putting them in a list?
 
It forms the list [['J', 'e', 'l', 'l', 'y'], ['J', 'e', 'l', 'l', 'y'], ['J', 'e', 'l', 'l', 'y'], ['J', 'e', 'l', 'l', 'y'], ['J', 'e', 'l', 'l', 'y']] and smash-prints that into JellyJellyJellyJellyJelly :P
 
Got it.
{𝕩¨𝕩}"BQN" is more or less the same thing in BQN, except there isn't any smash-printing, so it requires one more byte to flatten the list of strings.
Of course 9⥊"BQN" is the short and sensible way to do it.
///, 17 bytes: /x/\\\//xxxxxxxxx
 
9:59 PM
Because ofc vyxal is in the vyxal dictionary
 
ofc
 
So is lyxal, and pxeger I believe
 
Not this?
 
@emanresuA You mean this? ;)
 
10:03 PM
I can totally countt lol
 
(I suppose maybe so, though the original closed question said not to include version numbers.)
 
10:18 PM
@emanresuA Given that it's in the Jelly dictionary, it'd be an oversight if caird isn't :P
 
10:29 PM
@DLosc [0 bytes in](about:blank)
aw that would have been way funnier if it linked
 
10:53 PM
@emanresuA emanresuA is too iirc
and Aaroneous
 
11:19 PM
@Steffan Is Steffan or Seggan in it? If not, we can correct that
Also @lyxal Idea: Sponsors of a certain tier get to add words to the dictionary
 
@emanresuA Doesn't changing the dictionary change how strings decompress?
 
Not if we append stuff
 
Doesn't the decompression depend on the size of the dictionary?
 
Nope
Two non-ASCII chars translate to the corresponding word in the dictionary
And there are empty slots at the end
 
Ah, the 05AB1E style
 
11:47 PM
@emanresuA Nope
 
We must amend this immediately
 
Steggan
 
Does anyone else get Steffan and Seggan mixed up? I always do and then I feel bad lol
 
yes lol
Ginger and lyxal have so far
 
@NoHaxJustRadvylf lol yea, very similar names
 
11:54 PM
Sfefetggan
 
S.?e.{2}an
 
so in that case it can be steeen or seffan
 
Sfortzandeggfan
eggfans
 

« first day (4196 days earlier)      last day (633 days later) »