« first day (4298 days earlier)      last day (545 days later) » 

12:15 AM
why the hell do i get a segmentation fault here lmao
i;main(){for(;i++<=99;)printf("%s%s%.d\n",i%3||"Fizz",i%5?i%3?i:"":"Buzz");}
its in C lang
 
12:37 AM
you'
re trying to print an integer as "%s"
i'm not sure if it tries to cast it to a pointer or what but
you're going to get bad results
 
Shoot
 
actually come to think of it isn't c's || strictly boolean too
as in it takes ints and outputs either 0 or 1 as an int
so yeah you're going to need some serious restructuring lmao
 
:(
I tried porting C++ => C
Which didnt work very well since I was combining solutions
 
12:57 AM
@graffe are you allowed 44/4-4?
 
1:20 AM
and what would that give?
 
1:37 AM
If you read RTL, a division by 0 error :P
 
2:34 AM
The leaderboards doesnt show up on mobile code.golf >:(
 
2:45 AM
this looks right but it doesnt work
i;main(){for(;i++<=99;)printf("%s%.d\n",i%3||"Fizz",i%5?i%3?i:"":"Buzz");};
 
Is there a challenge to do this:
[5]
[0, 1, 2, 3, 4]
[0, 0, 1, 0, 1, 2, 0, 1, 2, 3]
[0, 0, 0, 1, 0, 0, 1, 0, 1, 2]
[0, 0, 0, 0, 1]
[0]
[]
Essentially, repeatedly replace n with range(n) and flatten until you get an empty list, or something similar
 
I think we've had that but with 1 indexed ranges?
But also, what's the challenge? Output the steps?
 
anyone knows why this doesnt work in crystal?
1.upto(100){|i|puts "FizzBuzz "[n=i**4%-15,n+13]||i}
its fairly similar to ruby
so idk
 
Also 4 in vyxal - until_no_change: range, flatten
 
Same in Jelly, but with a $
 
It's ‡ʁf↔ - the only difference is that the grouper is prefix isntead of postfix
 
See, say what you will about Jelly, at least the builtins kinda make sense :P
ḶF$Ƭ - (lowered range, flatten)$ Til
I can kinda guess that ʁ is range from 0, and f is flatten, but I'm not even sure that's correct
 
It's correct
 
3:06 AM
What's ?
 
Collect until no change, including first item
 
Oh, so is the same as $?
 
Pretty much - next two as a lambda or group next two together (depending on whether it's in a modifier
Vyxal's range builtins are r for dyadic pythonesque range, ʀʁɽɾ for various types of range(0 or 1, a or a+1), for inclusive range, for range(2, a+1)... do we have enough?
(no)
 
the monadic ranges should be ʀʁrɹ for maximum phonetic analogy :P
 
I get that ranges are a super useful builtin to have, but man, that's a lot :P
 
3:12 AM
the ranges from zero are uvular because they're further back, and the approximants only approximately reach the input
 
Of Jelly's 6 "range" commands, 3 of them have actual functionality when operating on non-lists
 
@cairdcoinheringaahing hey Jelly has just as many :p
 
Jelly only has 6 :P
But, deque, pop and zero all have other uses
 
Oh vyxal also has ẏż (range(0, len) and (1, len+1) respectively)
 
Wait, Jelly has 7
JRḶḊṖŻr
 
3:16 AM
i feel like there are a few more rangifying builtins than that but i guess they don't really count when the output isn't recognizably a range :P
really there are only four range builtins + three simple list builtins that happen to rangify
 
There's also things like prime range :P
@UnrelatedString Personally, I classify Ż as more of a range builtin, with a useful list option
 
Is it just a natural consequence of having a SBCS that some builtins will be mostly useless?
 
is a range builtin
 
@UnrelatedString vyxal has 6 dedicated numeric ranges + 1 thing that ranges only on numbers
 
@cairdcoinheringaahing I can't count how many times I've wished vyxal had prepend 0
 
3:18 AM
It's very situationally helpful :P
 
i use it for prepend 0 way more than i use it for zero inclusive range but i also forget that i can use it for zero inclusive range sometimes
 
Like, when its helpful, it's super good. But, it isn't always that helpful
 
crazy how that happens :P
 
@UnrelatedString Huh, I'm the opposite. I use it for zero range more
 
probably doesn't help that it doesn't vectorize like the pure range builtins :P
like i generally treat range builtins as kind of a last resort
 
3:26 AM
See, sometimes I forget that the Necromancer badge isn't "Post an answer. Reach 5 upvotes 60 days after posting that answer", but for once, I actually got a Necromancer badge where the answer came 60 days after the question and the 5th upvote came 60 days after I posted the answer :P
Necromancer + Slow Burn? :P
 
I sometimes forget that it's not just "get 5 upvotes"
 
Given that 10 upvotes is a bronze badge, that'd be a weird silver badge :P
@cairdcoinheringaahing CMQ: Thoughts on an advent chat event?
 
how would an event like that work in the first place?
 
Idk, it'd be some chat event where each day Dec 1-25, something is pinned as a "try this today" thing?
For example: each day during December, someone (decided someway) chooses a challenge on the site posted that day during previous years, and people are encouraged to try that challenge that day
This is mainly an interest check, I'd post a proper thing on meta if people want something like that
 
3:50 AM
So, it's been 5 days into the month. Are we having a LotM or not?
 
No one seems to want J, and DLosc's said he wants Pip to work on ATO first (or me to implement web workers for DSO)
 
4:12 AM
In which case, that'll be the first break since the restart :/
Also, it's now past Halloween, which means it's time for my seasonally appropriate pfp
 
I see your youtube link and raise you another
 
see, i can honestly promise that mine isn't a rickroll. can you?
 
I can
it's a better version of yours :p
 
shitposts of songs can never top the originals
say what you will about the song, but the original will always hold true
 
@cairdcoinheringaahing counter-example: cbat (trombone champ cover - decidedly a shitpost) is better than normal cbat
 
4:18 AM
 
@lyxal I heard that song once, and immediately refused to engage with any content that referenced it
Tho, I did read the original reddit post :P
@emanresuA Thanks, I love it :P
 
The sad thing is, "caird coinheringaahing" overflows but "caird overflowing doesn't", so I had to change the width...
 
anyone can golf this? (or give tips)?
i=1
while i<101:print('FizzBuzz'[i%-3&4:12&8-i%5]or i);i+=1
darn even Jo King didn't beat this ^
 
5:13 AM
@py3_and_c_programmer i dont reply to emails with /0 because they cause my computer to explode like in the funny internet memes
also congrats on learning C
CMP: what's a good width height ratio for monospace fonts?
in my brain theyre some sort of rough 1:2 but upon actually testing i realized that ratio is a bit thin...
somewhere between 4:7 and 2:3 seems like it could be good, but i wonder if anyone has any specific opinions
 
yeah definitely more in the ballpark of like 4:7
take the cjk pill and go 1:1
i like 4:7 because 4x7 is nice for pixel fonts
 
... im not even against that, but its definitely different from the elitist programmer expert vibe im looking for
1x1 feels really earthy, like a computer built by dwarves
 
lmao
i can actually see that now
 
maybe i should visit the worldbuilding sechat instead
i wish making fonts was easier. i'd love to play around with all this sort of stuff but like, if theres an easy way to do it i've yet to find it
 
what are you currently using
 
5:20 AM
i mean easy in the 'i dont want to put in effort or buy anything' way :P
so, mostly just googling 'how to make font' now and then
 
6:03 AM
@lyxal wait what's cbat
but also thanks for telling me the name of the game that one in the end half life machinima shitpost is from :P
 
@UnrelatedString you don't know?
 
i have no idea what cbat would stand for
 
i can't even think of how you could turn the acronym cbat into some kind of deez nuts type punchline
 
It's not an acronym
 
6:06 AM
oh
 
It's a song
 
i totally forgot to actually check the song on that post lmao
OH
it's THAT ONE
yeah i can see how this would go hard in trombone champ
 
It does
 
6:34 AM
@UnrelatedString youtu.be/sAdLO0KiSxk btw
 
its beautiful
thanks
 
 
1 hour later…
8:00 AM
anyone here know crystal?
 
 
2 hours later…
10:15 AM
@DialFrost that goes easily down to 60 bytes
Ah, it was already 59 xD sorry lol
 
 
1 hour later…
11:25 AM
mods could you please temporarily redirect the fridge nukes for the sake of mankind?
 
11:40 AM
I think it's too late for mankind already
 
yeah, we're screwed
 
Anyone know how to compress this?
print(u+_+l if i<z else u+_+b if i==z else u+s*(x*2+~i)+a)
 
You can use the list indexing trick
 
@DialFrost echo "print(u+_+l if i<z else u+_+b if i==z else u+s*(x*2+~i)+a)" | gzip -f
 
ye but idk how
 
11:54 AM
ezpz
 
@Ginger ????
 
Instead of a if x else b use [b,a][x]
 
@mousetail hmm gimme a sec
 
@DialFrost it's compressed, just like you asked for :p
 
@Ginger oh lmao
 
11:54 AM
:D
 
damn it worked @mousetail, and 1st try too!
 
Nice
legend says that if you get good enough at code golf you magically gain the ability to play regular golf
 
can confirm, I do know how to play regular golf
 
@Ginger I however do not
And i dislike it too
 
What about mini golf?
 
11:57 AM
@mousetail you managed to barely sneak me in into top 100!
tysm
@mousetail nope
 
what about just driving golf carts around?
 
nope
 
what about basketball, which is also about throwing a ball into a hole?
 
@mousetail nope
 
@DialFrost l + get golfed + no bytes + downvoted + touch grass
:p
 
12:00 PM
finger grass
 
kid named finger
 
#1 most suggestive linux command
 
#2 is kill, #3 is touch
 
in other news, today marks exactly 4 years since I made my first golfing language
 
cheer.wav
 
12:20 PM
oh hey I now have exactly 42 bronze badges on CGCC!
user image
2
 
12:34 PM
how would i golf this/tips?
for j in range(3,10):[print(" "*(j-i+1)+"*"*(i*2-1))for i in range(1,j+1)];print(" "*j+"*\n")
 
You can reduce the range of i to 0-j to save 4 bytes
# [Python](https://www.python.org), 89 bytes

```python
for j in range(3,10):[print(" "*(j-i)+"*"*(i*2+1))for i in range(0,j)];print(" "*j+"*\n")
````

[Attempt This Online!](https://ato.pxeger.com/run?1=m72soLIkIz9vwYKlpSVpuhY3I9PyixSyFDLzFIoS89JTNYx1DA00raILijLzSjSUFJS0NLJ0MzW1lbSArEwtI21DTU2QjkyEDgOdLM1Ya4SGLKDimDwlTYgFUHtg9gEA)
 
._.
@mousetail you probably wanted to copy as CMC
 
Probably but I don't care
 
12:49 PM
I just remembered: @mousetail your online ><> interpreter is a tad broken: mousetail.github.io/Fish/…*%2C01.%5Cn%20%3A9%28%3Fv68*%2Bo.%5Cnv%2B%5C%22W%5C%22%3C%3B%5Cno14%2682*%2501.%5Cn%5C%5C.05i%3A%2682*%2C01.%5Cn%2006%2682*%2501.%5Cn%2007i%3A%2682*%2C01.%5Cn%2052%2682*%2501.%22%2C%22input%22%3A%22i%245%22%2C%22stack%22%3A%22%22%2C%22mode%22%3A%22numbers%22%7D doesn't give the right output for codegolf.stackexchange.com/a/254172
 
The top answer or the bottom one?
 
top
(102 byter)
 
Oh my bad, I copied a link from back when I switched ( and )
 
oh
lol
 
mfw VNC Media Player borks my desktop when I put it in fullscreen
 
12:53 PM
I'm having way to much fun with <><
 
it is a fun language after all
hell, it's what got me hooked on esolangs and code golf
 
I like how your code can just intersect itself like a crossword
 
oh neat, cool interpreter, little buggy though
 
@mousetail I think you'd like makina then
 
@JoKing I fixed a few bugs involving the pause button this morning, but stepping while running is now broken again
 
12:56 PM
might want to also separate start/pause from loading a program
 
They load a program only if no program has been loaded or it has stopped
at least, that's what they are supposed to do
Any other specific bugs anyone noticed?
 
If I pose a challenge to find a near repunit prime with n digits for as many different n's as possible does that have to be fastest-code?
Or can I say you have to run it on tio (so under a minute)?
Or is tio dead?
 
yea, pretty much
 
That could be an answer to any of the three questions
Which is it?
 
Tio is fine, it's not being updated but it's still very useful
 
1:11 PM
@mousetail thanks a lot!
 
So is it ok to give the score as the largest number you get on tio?
 
@mousetail does it seem possible to combine those loops?
 
IDK maybe, not super sure how you would do it in a way that saves bytes overall
 
@lyxal one of them
 
So the answer to the other two must be "No"?
 
1:25 PM
no, I never said that
 
You said yes was the answer to exactly one of them
 
I did, but that does not mean that the answer to the other two is "no", it could be "maybe" for example
 
True
This is why statically typed languages are better
 
are you stealing my straw men or smth? :p
 
surely this cna be golfed?
for i in range(200):
 x=i
 while x>4:x=sum(int(c)**2for c in str(x))
 if x==1:print(i)
I've tried for 1.5 hours, I'm not joking I found nothing XD
I must be trippin
 
1:35 PM
@Sʨɠɠan just want to make sure you've seen codegolf.meta.stackexchange.com/questions/25285/…
 
1:45 PM
@Sʨɠɠan yeah I meant (44-4)/4 didn't I
 
@graffe I guess you could brute-force that too
 
0
Q: Maximum average ord

The ThonnuYour task Take a list of strings as the input, and output the maximum average ord. Example Given the list ['hello', 'world', 'bye']: The average ord of 'hello' is: (ord(h) + ord(e) + ord(l) + ord(l) + ord(o)) / len('hello') = 106.4 The average ord of 'world' = 110.4 The average ord of 'bye' =...

 
2:16 PM
@Ginger ofc i saw
@Neil oh wow
@Ginger nvm that comment i didnt see
 
@mathcat yes but I don't think there is a solution
 
3:07 PM
LDQ: operator overloading?
(my vote is yes)
 
 
2 hours later…
4:51 PM
@Ginger Always
 
 
2 hours later…
6:46 PM
@Sʨɠɠan Definitely
free stonks
 
follow up LDQ: how should this be implemented? python style __add__? kotlin style operator fun add?
c++ style operator+?
 
Ruby-style
 
whats that
ah no thats ugly
i like python style
 
7:15 PM
I think c++style is the most clear
 
typeclasses/traits
 
7:27 PM
errrrrm... no good idea, but hard
im still wracking my head over how to implement those
 
8:19 PM
0
A: Sandbox for Proposed Challenges

leo848Iterate over a rectangle's diagonals There exists a bijection between the natural and rational numbers that works like this: You create a 1-indexed 2-dimensional grid. In every field of this grid with position (x, y), put the number x / y. You start at (1,1) and iterate over the field in the fol...

 
8:31 PM
@SandboxPosts this is a surprisingly good answer for a new user
sus :p
Klein status update: just got it to successfully load a project! :D
 
8:49 PM
@Sʨɠɠan Ruby style
def +(...)
Make operators be functions
@mousetail C++ style is ugly though
@emanresuA Should I just post the J lotm? I forgot to do it earlier, but I didn't know no one wanted it
@emanresuA Why don't you just add it to z lol
 
Good point
 
@DialFrost Funky ruby tricks like that don't work in Crystal
Porting python gives this (ungolfed): 100.times{ |i| a="Fizz" * (i % 3 // 2) + "Buzz" * (i % 5 // 4); puts a == "" ? i + 1 : a } Try golfing it yourself
 
9:20 PM
Thanks for posting that alternative 59-byte Python btw, it led me to 59 bytes in Crystal too :P
 
9:33 PM
@Sʨɠɠan kinda what im planning
tho doing *(a, b) looks ugly to me
 
10:03 PM
YESSS
structs have been successfully implemented in rol
 
It's easy to tell you two apart
One uses capital letters
 
you were saying?
 
Yes, you're the steggan that has a broken shift key
 
or am i?
 
You have 4k rep, so yes
 
10:17 PM
i actually dont have a broken shift key
 
we just share a shift key
have to take turns with it
 
the hivemind does not register your presence
aaand the fact that structs work now means i also can have primitive lists
var list = DynamicList {}

list.set(0, "Hello")
list.set(1, "World")

print(list.get(0))
print(list.get(1))
the actual impl is horribly cursed
struct DynamicList {}

extern fun get(list: DynamicList, index: Num): dyn? = "return list[index]"

extern fun set(list: DynamicList, index: Num, value: dyn) = "list[index] = value"
 

« first day (4298 days earlier)      last day (545 days later) »