« first day (4220 days earlier)      last day (615 days later) » 

1:00 AM
Sandbox posts last active a week ago: Solving an easy Sudoku in increasing order
 
CMC: Print the numbers from 100 to 150, with each number repeated in a list 3 times. i.e. [[100, 100, 100], [101, 101, 101], [102, 102, 102], ..., [150, 150, 150]]
 
₁⁺2r3ẋ∩ in vyxal
CMC: Print the nth item of this pattern:
<>
<<>
 <>>
<<<>
  <>>
 <<>
  <>>>
etc
 
<previous
{adequate space}previous>
right?
 
yes
Except you need to indent the previous
 
right thats what i was getting at with the adequate space
dont know how to phrase it
indented to match i guess
 
1:13 AM
@lyxal x=>[...Array(51)].map((_,i)=>[i+=100,i,i])
 
@NoHaxJustRadvylf i+=100
 
Oh smart
 
x=>[...Array(51)].map(_=>[++i,i,i],i=99)
 
1:37 AM
@emanresuA Try it Online!
 
@Steffan 15 + -r
 
Yeah yeah, I know
Cheating
I thought of it, but I never use flags in cmcs lol
 
 
1 hour later…
2:46 AM
First day into C++ and my programs are already looking like this:
#include <iostream>
using namespace std;
int main(){int counter=0;while(1>0){counter++;
if(counter%15==0){cout<<"FizzBuzz"<<endl;}
else if(counter%5==0){cout<<"Buzz"<<endl;}
else if(counter%3==0){cout<<"Fizz"<<endl;}
else{cout<<counter<<endl;}}}
Or even better,
#include <iostream>//NOBODYUSESNAMESPACESTD;TOOLAME!
int main(){int counter=0;aaaaaaaa:counter++;//yay!!!
if(counter%15==0){std::cout<<"FizzBuzz"<<std::endl;}
else if(counter%5==0){std::cout<<"Buzz"<<std::endl;}
else if(counter%3==0){std::cout<<"Fizz"<<std::endl;}
else{std::cout<<counter<<std::endl;};goto aaaaaaaa;}
 
@Neil I was about to say "At least C doesn't do anything that silly," until I looked it up and found out that in C, ! is the same precedence as other unary operators like - and ~. Which is even sillier. [facepalm]
At least Pip doesn't do anything that silly!
@emanresuA This looks Lisp-related.
@lyxal Pip -p, 10 bytes: _RL3Mh+,51
Coconut, 28 bytes: ->map(->[100+_]*3,range(51))
 
3:12 AM
@DLosc I thought it was perfectly normal for ! to have that precedence?
Man, I thought you had leading whitespace in your Pip program but it was just the link underline hiding an underscore lol
 
@Steffan Apparently it is normal for C. But that means for example that ! 2 > 3 parses as (! 2) > 3 instead of ! (2 > 3), which seems less than helpful. Compare C, Python, Pip.
@Steffan Yeah, that's the one problem with linking the code rather than the bytecount. :P
@lyxal BQN REPL, 13 bytes: (3⥊⋈)¨100+↕51
Haskell, 23 bytes: [[i,i,i]|i<-[100..150]]
 
3:41 AM
57 bytes without the library
HBL, 9 bytes: *'(1...?)(0'%(*'?<
 
3:57 AM
@DLosc Most languages that use ! for not have precedence like ~ and -
Imo, code would look super confusing if it didn't
With Python, it's using not so it's different
 
My opinion is exactly the opposite of yours, lol. :)
As with many of my programming-related opinions, it apparently stems from how QBasic does it... though with a twist: QBasic's NOT has lower precedence than arithmetic and comparisons, but it's actually a bitwise operator. :P
 
u wot m8
 
Brachylog, 12 bytes: {99<≜gj₃}ᶠ⁵¹
 
@lyxal does this count lol: Knight: ;=n 99W>151=n+1nO+++++''n','n','n
(tio link too long to fit in msg)
 
@AidenChow sure, why not :p
Just another published version of my new book called "50 Achromatic Shades of Grey"
 
4:12 AM
wait it should be 151 in the code not 150
 
Hello!
 
o/
 
hi!
@lyxal da hell, whats it about
 
look at the output of your program
 
ye what about it
 
4:13 AM
and think of each triplet as a RGB triplet
 
@DLosc is that quicklbasic 4.5? I can't remember if qbasic is the same
"Microsoft QuickBasic, not to be confused with the lesser QBasic, was a Basic interpreter and compiler product loosely based on GW-Basic."
 
@lyxal ok well idk im plugging this into my favorite rgb color tool, desmos :P
 
It seems not
 
@graffe Yeah, kind of. I'm not super familiar with the details of the differences between QBasic and QuickBasic, but they're closely related.
 
@AidenChow you get 50 achromatic shades of the colour grey
 
4:15 AM
@graffe "Lesser"?! Hmph!
 
and that's the book
(the joke is that it's a play on the title of a book called 50 Shades of Gray, which is really not about colours)
 
@DLosc :)
@DLosc quickbaaic 4 5 was wonderful
I still don't know how to move a sprite around the screen in any other language
 
@lyxal oh lol, just figured that out too
 
"A subset of QuickBASIC 4.5, named QBasic, was included with MS-DOS 5 and later versions, replacing the GW-BASIC included with previous versions of MS-DOS. Compared to QuickBASIC, QBasic is limited to an interpreter only, lacks a few functions, can only handle programs of a limited size, and lacks support for separate program modules."
Quickbaaic 4.5 wasn't compiled in any sense you would recognize
It looked and felt entirely interpreted
 
4:21 AM
@emanresuA i cant tell whats the pattern here
just looks like a bunch of random <>
 
@lyxal wow, why lol
@AidenChow Have a look at how each relates to the previous
 
@emanresuA because it's a funny joke I've wanted to make for 8 years now
never got around to it
 
@emanresuA the problem is i dont see the relation
 
3 hours ago, by thejonymyster
<previous
{adequate space}previous>
 
@emanresuA ye i saw that, could u explain what that means?
 
4:27 AM
Each one contains two of the previous
 
oh wait rly i didnt notice that lol
ok lemme check again now that i know that
 
@emanresuA Pip, 22 bytes: Yp:"<>"LaYpJnWRyRnn.sy
17 if I can use parentheses instead of angle brackets: YpLaYpJnWRyRnn.sy
 
CMQ I want to write a simulation where I update a histogram live. Which language would be golfiest for the graphical part?
 
desmos :P
jkjk lol
 
:)
I do want to write standalone code on Linux
 
5:01 AM
@emanresuA Knight, 81 bytes: Try It Online (put the code in a random lang cuz the link is too long)
also its 0-indexed
and has newline in the beginning
(hopefully thats allowed lol)
probably a terrible way of doing it but whatever
 
5:44 AM
@lyxal presenting my own youtube channel:
 
5:59 AM
that is
something
also probably belongs in offtopic for future reference :P
 
6:22 AM
1
Q: Is this graph a tree?

alephalphaGiven an undirected graph, find out if it is a tree. A tree is an undirected graph in which there is exactly one path between any two vertices. In other word, the graph is both acyclic and connected. Input You can take input in any reasonable format. Here are some example formats: an adjacency m...

 
6:41 AM
@DLosc hmm, so what does PRINT 3 + NOT 1 + 2 do in QBasic?
 
Where can I find a whitespace interpreter?
 
> You've earned the "string" tag badge. (silver)
oooh
 
(I am not impressed, having earned the gold string tag badge 5 years ago, 3rd to earn it)
(also my 3rd gold badge, after Fanatic and code-golf tag badge)
 
6:55 AM
@mousetail i use whitelips
 
@JoKing Thanks
 
damn i dont even have a single silver tag badge :(
 
dw, they take agg
ages
(cat)
 
7:11 AM
bruh how is ur cat like always on ur keyboard lol
 
Honestly idk
Both of my cats seem to really like my room
And that comes with my keyboard.
He's discovered some keyboard shortcuts that I didn't even know existed
 
lol like what
 
@emanresuA Looking at this, he managed to type "the"
Hopefully he's not going to write a manifesto and force me to teach him to open his own cans
 
@emanresuA oh no its all over for us, cats are becoming too smart
 
I doubt they'll try and take over the world, they already think they rule it
 
7:25 AM
yo how yall getting like close to 1000 rep per week (1/5 of my total rep lol), ive literally been posting a gajillion answers this past week, basically way more than usual, and i still only have like 600 rep this week
like bubblers at 1100 this week already, its still friday
 
7:45 AM
@AidenChow it's month
but certainly the best way to earn rep is to regularly post good challenges
 
That, or you make your own golfing language, grow a community around it for a year and a bit and watch the upvotes start coming in when you use your golfing language
 
8:06 AM
That's the hard mode option though
 
@emanresuA infinite cats, infinite keyboards...
 
Man I miss the New Posts and Sandbox Posts bots
These feeds are slow as bricks on a traffic filled highway
 
8:29 AM
0
A: Sandbox for Proposed Challenges

lyxalSimplify a Cycle code-golf graph-theory Given a path of vertices that form a cycle on a graph, output a simple version of the cycle. Rules There will always be a simplier cycle in the input There will always be at least 2 vertices Each vertex has degree >= 2 Input and output can be given in a...

 
Ah the bricks finally made it!
Only took 13 minutes
 
8:47 AM
@Bubbler regularly means like how often
also i cant really think of good challenge ideas often lol
 
or ever
 
like i think of stuff but they are like not good ideas i feel like
 
9:41 AM
Follow up question about whitespace: Is there any implementation that allows detecting EOF without crashing or hanging?
 
 
2 hours later…
11:24 AM
from the man page on fortune:
> The supplied fortune databases have been attacked, in order to correct orthographical and grammatical errors, and particularly to reduce redundancy and repetition and redundancy. But especially to avoid repetitiousness.
 
11:49 AM
that's fortunate
 
CMC: 1, 1, 2, 2, 1, 2, 3, 2, 3, 3, 1, 2, 3, 4, 2, 3, 4, 3, 4, 4, 1, 2, 3, 4, 5, 2, 3, 4, 5, 3, 4, 5, 4, 5, 5...
"what?" [[1]] [[1 2] [2]] [[1 2 3] [2 3] [3]] [[1 2 3 4] [2 3 4] [3 4] [4]]... but flattened completely
idk how to describe it algebraically or in words without it being infinitely too verbose
 
flattened list of lists of suffixes of prefixes of the infinite list of positive integers
 
12:29 PM
great scott
 
12:44 PM
@thejonymyster Vyxal, 8 bytes: Þ∞KƛÞK;f
Just a literal translation of what Neil said
 
5 bytes in (2023 golfing language)
Also a literal translation of what Neil said
 
i can totally see that lol
i wonder how it does in the lang that one guy made for sequence problems
 
@NoHaxJustRadvylf pos_ints suffix quickfor prfix crush
 
also i tried this in headass but i accidentally ended up doing 1 1 2 1 2 3...
and then i kept freezing the dso interpreter with infloops :P
 
12:52 PM
@thejonymyster Scala, 61 bytes: Stream.from(2).scanLeft(Seq(1))(_:+_)flatMap(_.tails.flatten) (Scala Seqs actually provide an inits method to get prefixes that could replace the .scanLeft(Seq(1))(_:+_) if it weren't for the fact that they go from the largest prefixes to the smallest >:|)
 
is it not shorter to just reverse the prefixes?
 
Ordinarily yes, but since it's an infinite list, it'll just hang
 
ohh
 
1:06 PM
Why does nobody follow instructions :/
 
@thejonymyster js 58 bytes: for(i=1;++i;){for(j=0;++j<i;){for(k=j;k<i;k++){print(k)}}} my loops are probably poorly golfed i havent got the hang of what is and isnt allowed in re: manipulating js syntax
 
No {s needed here
 
You can move the k++ into the print
 
ahh right
@NoHaxJustRadvylf but then the }s will be unbalanced
 
1:22 PM
Ugh, the best I could get in Coconut was 123 bytes (partly because the documentation claims flatten is a builtin but whatever version of Coconut their online interpreter and TIO have doesn't have it)
 
@thejonymyster Jelly, 9 bytes: Try it online!
Who needs infinite sequences?
 
Are you printing it in a loop?
 
Infinite recursion
The ‘...ß structure is Jelly's normal way of doing something to the list of positive integers
 
1:35 PM
Oh cool
 
 
1 hour later…
2:54 PM
@user Try it Online! for 7
 
@thejonymyster no oeis?
 
@thejonymyster Fig (theoretical), ~5.762 bytes: fe#kkmC
@RadvylfPrograms almost in Fig...
i should probably make suffixes a monograph
 
seems like everyone and their mother has a golfing language
 
3:12 PM
@user wouldnt vÞK be better than ƛÞK;?
 
21 mins ago, by lyxal
@user Try it Online! for 7
 
@thejonymyster surprisingly, it's not on OEIS
 
3:33 PM
@Seggan somehow it did not occur to me to check
@Steffan should i submit it lol
 
3:45 PM
@Seggan Yeah forgot that existed
@Seggan pretty sure ive seen this befor
 
@user results for 3,4,5,6,4,5,6,5,6 arent it so
imma submit it when i get home
nobody snipe me :P
and also, nobody post it before i do
jk i dont rlly care go ahead if u wanna get it on the website
 
signs up to OEIS
 
^_^)b give it your best effort
 
just be sure to credit TNB
 
was joking, jony can do it :P
AAAAAAAAA
 
3:56 PM
@Steffan steffan gets possessed by jo-king (it is very painful)
 
@user I think there's something similar on main CGCC, but at least this exact thing is not on OEIS
 
I'M BACK BRITCHES
FIMALLY
 
ah, this is what I was thinking of. many of the answers do prefixes of infinite positive integers (although that's not the challenge itself)
So you found your password in some text file in some strange location
 
perhaps
 
/usr/share/passwords
Or some hacker on the darkweb sold it to you
 
4:11 PM
ok good fixed my pfp
@RadvylfPrograms can you do me a favor and send the verification code GitHub just sent to you to cbv89321@jeoce.com?
 
4:29 PM
bluh gotta go have lunch, never mind
 
4:45 PM
:(
 
Can you renew it under a different account?
@Ginger Thank you for notifying us, we all really appreciate these updates.
 
sorry
 
@Steffan are you a student anywhere? i got copilot for free bc of that
@Ginger 482639
 
|:
 
@lyxal oops. didnt notcie
 
4:57 PM
@Steffan right 1 1 2 1 2 3 is pretty close but mine is like, another step of -fixication
now i wanna see n steps of -fixication
1 2 3 4 5... (0 steps)
1 1 2 1 2 3... (1 step)
1 1 2 2 1 2 3 2 3 3... (2 steps)
1 1 1 2 2 1 1 2 1 2 3 2 2 3 3... (this is probably wrong but 3 steps)
idk ill look into it more when im not on the clock
boss makes a dollar, i golf a byte,
Thats why i something something whatever
 
LDQ: so as yall know, Fig is a functional language. I have a tradition of putting the "main" operand last in an argument list, so that i can take advantage of any implicit inputs. should i do this for division? for example, /xy would mean y/x
rn it means x/y
itd be convenient to immediately terminate the program by /0 instead of /00
(termination isnt the only use case, i.e. reduce puts the reduced stuff second)
 
are there any reasons not to?
 
clarity?
 
clarity shmarity, its a golfing lang
 
true
 
5:03 PM
maybe use the backslash instead so its like
backways division polish notation
x\y (y is over x)
 
smart
except itd be \xy in fig :p
 
right thats pre-polish notification
\ x y
 
that notification was sent a long time ago :P
 
so many weird words. how do i say "notation-ification" but not bad
 
5:19 PM
So how I actually run V? Is it just python /path/to/v file? Does it require neovim or is that just for debugging?
 
5:37 PM
@thejonymyster BQN, 20 bytes: -⟜1⊑·∾´1+·∾´∘↓∘↕¨1+↕
Pros: Suffixes builtin. Cons: No 1-based range builtin, no increment builtin, no flatten builtin, no 1-based indexing builtin. :P
@Seggan Husk does this.
@DLosc Oh, and no infinite sequences.
 
5:59 PM
@user That's odd about flatten. I tried looking at the source code to figure out where the builtins are defined, but didn't get anywhere.
 
6:14 PM
@DLosc good
im not alone
LDQ: in fig, u basically behaves the same as the spread operator in python. should i ditch it and use reduce for all cases instead?
 
6:38 PM
yes
 
7:04 PM
@Seggan What's an LDQ?
 
7:16 PM
Language Design Question
 
7:49 PM
if you have functions that can take more than two arguments dedicated splatting could be useful but it's unlikely to come up enough to be worth having
 
@user hmm, i thought it was a language development question
 
Eh, same thing
 
8:18 PM
whichever one the chat holiday is :P
semi related but i think we should have more golf DSLs
if the whole gen 4 golflang thing falls through i hope we all find hyperspecific fields to make golflangs for
 
@thejonymyster as in?
 
Embedded or external?
 
Domain Specific Language as in not general programming
 
idk what you mean by a golf dsl
as in a lib for golfing?
 
so like... charcoal
 
8:20 PM
@thejonymyster Yeah but embedded or external?
@Seggan Like that language someone mentioned that's optimized for sequences, or a language optimized for working with strings
 
ah
 
@user Because it'd be really groovy to have an embedded golfing DSL
 
like myxal?
 
I thought Myxal was a general purpose golflang
 
its optimized for speed
 
8:22 PM
I guess all golflangs can be considered DSLs in a sense; they're meant for a very specific domain: golfing
@Seggan No not like that
I shouldn't have said optimized
More like targeting a specific set of problems
Like a DSL that's meant for querying data
 
@user i dont know what these terms are :P
i am very curious though
 
Gradle buildscripts use an embedded DSL. It's just Groovy
 
explain like im 5?
 
@thejonymyster Whew, thought you were furious for a second there
 
i feel like the average golflang is sort of a half-dsl
because i wouldn't say that golfing itself is a very specific domain but they still generally have pretty limited facilities for practical kinds of things that do happen to fall outside the general scope of what challenges tend to be
 
8:26 PM
@user not so, but i am fast
 
@thejonymyster External DSLs are probably what you meant
 
well i do wanna know what the other one is and if we could have it for the site :P
 
You write a parser and an interpreter or compiler for a tiny little language that does a very specific thing
 
will i get good details if i look for "embedded dsl" on wikipedia?
 
Possibly
Maybe "internal dsl"?
An embedded DSL is when you're still using Groovy or JS or what have you, but you make a bunch of handy functions specific to some task so it almost looks like a different language
 
8:27 PM
ah the search suggests "internal dsl vs external dsl" ill try that
@user OHH i see, i recently wanted to make one of those lol
i didnt know it was officially recognized as like, a thing
 
There are advantages and disadvantages
 
so like if you made an import library for a language and then only used it?
 
I mean you can still use the rest of the language but yes
 
ah right
so in terms of the site its already recognized as another lang then :P
 
No it's the same language
Oh wait yeah
 
8:29 PM
python pychess
 
hell they're almost anti-dsls
like usually a dsl is for generalizing something specific and structured you do a lot of
but golflangs are about flexibly expressing core logic to the exclusion of being particularly good at any real class of things outside the meta level of golf
2
 
Yeah it'd be Groovy + library
 
which i think is very cool, yea
 
@UnrelatedString Yeah they're more normal languages than DSLs
Except for stuff like QuadS and QuadR
 
either type of DSL would be an interesting direction for golflangs to take
 
8:30 PM
yeah
 
but i am still hanging on to see what happens with catstruct and stuff lol
 
@thejonymyster External DSLs are what basically all golflangs do, except for some like J-uby
 
*thinking about absurdly specific fields to make a dsl of so that nobody snipes me in the 4 years it takes me to implement it*
 
hyper-efficient encodings will never fully take over because they're aesthetically inferior so i feel like there's room to specialize one way or another
 
right but i mean emphasis on the DS
like
well you know what i mean yeah
 
8:31 PM
Oh like math-specific golflangs and stuff?
 
yeaaa
like what i was saying with charcoal and stuff
 
yeah i was about to say charcoal lmao
 
the "targeting a specific set of problems"
 
it is always funny seeing how charcoal works on non-ascii-art challenges
 
i really really wanna go dig up that sequence lang to show yall but i dont remember where i saw it on the site
 
8:32 PM
cquents?
 
@UnrelatedString this is my ultimate ulterior motive btw
 
The one based on J?
 
i want us to make golf dsls so that people like t hem enough to use them on not that domain
that is my master plan
 
yeah honestly seeing powerful but specialized languages do things they can do reasonably well but aren't supposed to is something we need way more of
 
next tuesday/wednesday is LDW right?
maybe this weekend it is time for some DSL mischief
 
8:34 PM
@UnrelatedString Badly.
 
@UnrelatedString We have all kinds of abuse here already
 
@UnrelatedString btw: yes, cquents, thank you
 
reminds me i keep forgetting to start trying to make a semi-praclang for aoc that has dedicated syntax for declaring i/o formats
 
Ooh
Like, in flags?
 
more like keywords in the file
something like read grid as (int with space) with newline
and it would be on the type level for maximum convenience-at-the-cost-of-cleanliness while also encouraging ad-hoc types to catch stupid logic errors to reduce actual debugging
and honestly something like that could also be nice for general utility scripting outside a competitive environment too
like perl without being anything like perl :P
something too expressive for its own good
thinking it could somehow also be stack-based despite being statically typed
 
9:14 PM
Have we had a challenge about making a random k-regular graph?
 
@graffe I think I posted one a while back, lemme go find it
Yep. Not quite "random", but very similar. In fact:
A random regular graph would be a nice challenge. — graffe Jan 11 at 16:57
:P
 
9:41 PM
15 mins between me linking to that here and a new answer, that's super slow, smh
 

« first day (4220 days earlier)      last day (615 days later) »