« first day (4507 days earlier)      last day (411 days later) » 

12:10 AM
@RydwolfPrograms Hopefully done
Is the frame meant to look like this:
that makes some sense in context
12:27 AM
Q: My eight braille pattern progressive snake spinner

F. Hauri  - Give Up GitHubIntroduction I would like to drawn a nice spinner by using eight braille patterns on two lines, drawing a square of 8x8 pixel, for showing a kind of snake growing and reducing: declare -a shapes=([0]=$'\E[A⠁⠀⠀⠀\E[B\E[4D⠀⠀⠀⠀' [1]=$'\E[A⠈⠀⠀⠀\E[B\E[4D⠀⠀⠀⠀' [2]=$'\E[A⠀⠁⠀⠀\E[B\E[4D⠀⠀⠀⠀' [3]=$'\E[A⠀⠈⠀⠀...

12:50 AM
@Bbrk24 I should have it done by the end of the week
sorry for the late response lol
got it
who writes f like that
okay the handwritten APL made me laugh
@RydwolfPrograms is ^^^ supposed to be Sʨɠɠan?
no the c is upside down
that's e not ɕ
okay what does this say
"He dincin"?
(Part 4, chapter 1, panel 12)
hold me closer tiny dincer
Okay I'm on pt 4 ch 2 and I cannot read this
1:00 AM
Sandbox posts last active a week ago: Trippples
@Bbrk24 hover text?
using Unrelated String's viewer :P
anyways I think I figured out what it says and I kept reading. I must be all caught up now because 'next' doesn't work any further
pt 4 ch 3 panel 18
1:15 AM
@Bbrk24 what're the hex codes for the flag you want me to use?
hang on I have the flag around here somewhere
Five equal stripes, from top to bottom: FF75A2, FFFFFF, BE18D6, 000000, 333EBD
@Bbrk24 I'm an ace, FYI.
ugh, I'm just going to download an existing SVG
1:36 AM
@DannyuNDos I know that isn't related to gender, but -- what pronouns do you use? I don't see any in your bio
@Bbrk24 He/him
Cisgender male.
2:04 AM
@Seggan cool, now try to exclude 4th quadrant
whats ur 5 byte btw
2:17 AM
@AidenChow actually a 4 byte, I forgot multiplication can be removed
@Ginger Yep
@emanresuA Yeah, that should have a caption along the lines of "DLosc pours the BX-1201 into GingerBot"
Yup, just checked and the chapter looks good now
2:36 AM
Interesting, even though I wrote x.partialValue & 0x00800000 != 0 in source, LLVM optimized that to (x.partialValue >> 23) & 1
wait why is there also a sarl $31 in there
Presumably to get rid of the high bits too
Wait nvm
The & does that already
2:51 AM
@Bbrk24 it's not mine, it's just a manga reader with poorly documented functionality for reading arbitrary urls from json :P
said json gist is here and this godawful code is how i generated it
@RydwolfPrograms It's doing some bitwise trickery to avoid branching. It does one branch in ecx and another branch in edx, and something about the way it works cancels out the one it doesn't need
oh interesting
oooh smart
@AidenChow 6 bytes: xy^x<0 found it bc of a typo when experimenting with exponents
I encourage you to post this as a real challenge
3:12 AM
Can anyone help me with clang inline assembly errors? It universally converted one of the arguments to %r8b, but some instructions instead require %r8d or just %r8
src/int24.cpp:37:10: error: invalid operand for instruction
        "\tmovzbl  %%dl, %0\n"
<inline asm>:14:15: note: instantiated into assembly here
        movzbl  %dl, %r8b
src/int24.cpp:38:10: error: invalid operand for instruction
        "\torq     %%rcx, %0\n"
<inline asm>:15:16: note: instantiated into assembly here
        orq     %rcx, %r8b
2 errors generated.
The full inline assembly is
asm("\taddl    %2, %1\n"
    "\tseto    %0\n"
    "\tmovl    %1, %%ecx\n"
    "\tshll    $8, %%ecx\n"
    "\tsarl    $31, %%ecx\n"
    "\tmovl    %1, %%edx\n"
    "\tshrl    $23, %%edx\n"
    "\tandl    $1, %%edx\n"
    "\tandl    $8388607, %1\n"
    "\tandl    $-8388608, %%ecx\n"
    "\torl     %1, %%ecx\n"
    "\torb     %0, %%dl\n"
    "\tshlq    $32, %%rcx\n"
    "\tmovzbl  %%dl, %0\n"
    "\torq     %%rcx, %0\n"
    : "=r"(overflow), "+r"(lhs)
    : "r"(rhs)
    : "cc", "rcx", "edx");
am I just screwed and I can't use this particular assembly?
Or could I get away with rewriting this so that %0 can always be a byte register?
Since overflow is of type bool, I think only the low byte matters, right? So I don't see why I can't make those last two instructions just movb and orb
oh no I see what Swift's doing. It's returning the int in the upper half of rax and the bool in the lower half of rax. I can't use this.
4:01 AM
@Seggan wait woah that’s insanely short
Now try coloring in everything except the 2nd quadrant :p
@Seggan would it really be that interesting for most langs tho, like it’s literally coloring 1/4 of the screen
Nothing else
@Seggan lolol it’s always the opposite for me, I get so used to desmos multiplication that I forget that actual langs need multiplication sign
@AidenChow Still six bytes, just reverse it from < to >
@Bbrk24 errrr no, I tried that
or >= for seven, then
it just switches from filling in the 2nd quadrant to filling the 1st quadrant
oh right
it doesn't like imaginary numbers
4:06 AM
Btw the 9 byte solution I was thinking of fills everything except 2nd quadrant
4:22 AM
@lyxal like unironically i'm kinda feeling """artistic""" at the moment so consider sending me, like, two pages of the script in a random order :P
@UnrelatedString well see that's the problem
I don't have the script :p
5:14 AM
Did I just find a missed optimization in LLVM, or is my logic wrong? It's compiling this expression differently depending on whether I write (x & 0x800000 ? -0x800000 : 0) or -(x & 0x800000).
6:10 AM
f1(int):                                 # @f1(int)
        mov     eax, edi
        shl     eax, 8
        sar     eax, 31
        and     eax, -8388608
f2(int):                                 # @f2(int)
        mov     eax, edi
        and     eax, 8388608
        neg     eax
with clang -O1 or higher
I doubt that's a major difference in performance or anything
honestly sar eax, 31 is one crazy instruction
2 hours later…
7:58 AM
@Neil are animated png widely supported?
@Simd In browsers yes, in websites no
@mousetail Ah right. No good for me then
Why not?
I need it to work in websites too
It will work on your website
Just doesn't generally survive other sites trying to downscale it
8:11 AM
got you
1 hour later…
9:11 AM
@Bbrk24 that code looks wrong, did you mean something like this:
func add(lhs: Int32, rhs: Int32) -> (Bool, Int32) {
    let x = lhs.addingReportingOverflow(rhs)
    let v = (x.partialValue << 8) >> 8;
    return (x.overflow || x.partialValue != v, v)
9:56 AM
Does anyone know how many xkcd comics exist (not the ones which you can interact with)
1 hour later…
11:00 AM
@Neil Yes, the code I shared earlier was rather wrong, I’ve changed it since
11:11 AM
I literally don't even need addingReportingOverflow, just regular + works
pair<bool, int24_t> int24_t::add_with_overflow(int24_t other) const noexcept {
    int32_t edi = this->value + other.value;
    return { static_cast<bool>(edi & 0x800000), int24_t{ (edi & 0x7fffff) | -(edi & 0x800000) } };
I only need to check the overflow flag for multiplication, because only for multiplication of two 24-bit numbers will the result exceed 32 bits
1 hour later…
12:19 PM
@AidenChow yeah, because different langs have different ways
@AidenChow what is it
@AidenChow 11 bytes:
12:50 PM
@Bbrk24 what's wrong with (edi << 8) >> 8?
also, that's computing sign, not overflow
1:13 PM
mm wait yeah you’re right
I’m trying to detect if the result falls outside the range [-0x00800000, 0x007fffff]
edi&(255<<24) should work I think?
-0x00800000 is the same as 0xff800000 so I can’t just check the high byte
I think I need to check edi & 0x00800000 ? (edi & 0xff800000) != 0xff800000 : !(edi & 0xff800000)
Addition can only overflow by 1 bit
So it can't overflow by enough to wrap around
I'd just use edi != ((edi << 8) >> 8)
1:49 PM
yeah, that’s reasonable
2:15 PM
@Bbrk24 I should have the PFP done by tonight
2:31 PM
Cool, thanks!
2:47 PM
Ok this is really cool
Oh yeah, that
3:37 PM
4:21 PM
@Seggan my solution was 0^{-xy}>y
i was thinking of a zero power
Yea Idek how I thought of it lol, but ik how it works
i initially had max(x,-y)>0, which is the obvious 11 byte
4:42 PM
I have an numpy array which is all 1's and then values that are not 1. What is the golfiest way to find the final index of a 1?
@Simd So you mean all the ones are at the start?
Something like [1,1,1,1,5,2,6]?
@TheThonnu ^^^
numpy.where(a==1)[0][-1] seems to work, can maybe get better
Assumes you've already imported numpy
@TheThonnu I don't even understand it! What is the -1 doing?
numpy.where(a==1)[0] gets an array of all the indices of 1s. -1 takes the last item.
4:57 PM
I really like it
28 bytes, doesn't assume the import: len(a)-1-[*a][::-1].index(1)
The previous one was 24 btw
@Simd Taking this as a CMC: Given a list of positive integers beginning with a run of at least one 1 then values greater than 1, output the index of the final 1
@cairdcoinheringaahing thanks!
I can get 3 bytes in Jelly: ỊTṀ
I feel like there's a 2 byte solution tho
maybe we should have a rule that the answer contains at least one vowel :)
@TheThonnu pretty cool!
5:01 PM
@cairdcoinheringaahing Thunno 2 h, 2 bytes: ġḷ 1-indexed.
(group consec, length of each, first item)
@cairdcoinheringaahing Thunno 2 S, 1 byte: 1-indexed.
(check equality with 1, sum the results)
@cairdcoinheringaahing 05AB1E, 2 bytes: ΘO 1-indexed.
(same as ^^)
that's amazing. What about in non-esoteric languages?
@TheThonnu why do you need [*a] instead of just a?
@Simd Numpy arrays don't have .index so we have to convert to list first
@Simd Rust: |x|x.rposition(|v|v==1)
5:21 PM
why does rust have that lol
It's a useful builtin
Python has it too
5:49 PM
@mousetail does python have rposition?
@TheThonnu ah yes. Not needed if you start with a list then
@Simd Only on strings I think
i'm not sure it does
@Simd I checked already - neither numpy not the standard Python list has rindex
if it did have it i feel like it would be something you can do with extra arguments to normal find/index, but i can't find any way to do that either
5:55 PM
ooh nice
6:10 PM
Q: Event Suggestion: Compression Golf

SegganMost golfing languages that are competitive today use at least one string compression algorithm. My language Fig has a compressor that resembles Jelly's. I use been planning to add a super secret feature to it to make it better, however life got in the way. Putting that aside, my failed attempt h...

cc @RydwolfPrograms
6:55 PM
@TheThonnu shame
7:44 PM
@mousetail What are the hotkeys for the online Fish interpreter? So far I've found space to step, but that's it.
Q: I can't see if I've already voted on something

Radvylf ProgramsOn many sites, I can't see the slight color change that indicates I've already voted unless I look very carefully. This seems like a massive accessibility issue, given that my vision is above average and I'm still struggling to use the UI. The color change between the up and down arrows is almos...

It's only on MM and child metas right now
But they might actually be doing a community
Right, I think it's time to finally make that reverse proxy to my pi using CF workers
who needs static IPs when you got reverse proxies? :P
8:00 PM
One thing that's really nice about my ISP is that I basically have a static IP
Been here 5 years and it's never changed
@Seggan You could also consider dynamic DNS, depending on how often your dynamic IP changes
If it's only every few days or something, DDNS would probably be a way better option
I have no idea what that is or how to do it, workers will be faster
DDNS is literally like 10m to set up
im not gonna use it for web servers or anything, just servers for my games or whatever
It's just a DNS record with a really short expiration time, and a script that updates the record every time your IP changes
would you believe me if I said I don't know what a DNS record is
8:02 PM
So you don't get the latency issues inherent in reverse proxying from a whole other datacenter
@Seggan It's what maps a domain name to an IP address
Unless you're using your IP for stuff directly, ig
But I'd assume most things in 2023 that take an IPv4 can also take a domain
Ugh, I'd have to buy a domain name then
You'll probably have to at some point anyway :p
Or you could use a subdomain of rto.community like Ginger does
I don't feel like depending on a random teenager for my servers :P
You wouldn't be using my servers
Just the subdomain
The DNS would point at your pi or whatever
(which I wouldn't necessarily trust any more than my UPS-backed enterprise grade hardware anyway :p)
Fine, I'll try it
(I still have no idea how)
8:08 PM
It's super simple: cloud-jake.medium.com/…
I'll have to send you the password Google Domains gives me
Gimme about an hour, my pi isn't actually set up :P
i still gotta find my spare sd
I've got you set up at seggan.rto.community, not sure how to securely send you the username/password
Discord, I'm in vyxal
I'm not in vyxal
are you in the cgcc discord
8:14 PM
I am
I send a message in there for ya
Can I just friend request and DM it to you?
9:02 PM
A: Sandbox for Proposed Challenges

Alan BagelAlternating sublists Suppose a contiguous sublist that has at least three numbers and alternates between even and odd numbers (or odd and even) is called an alternating sublist. An alternating sublist cannot switch between alternating even and odd numbers to odd to even or vice versa. Given an in...

@cairdcoinheringaahing Found a very fun 3-byte solution in BQN (1-indexed): ⊐⊐⊏
⊐ Classify: Translate each element of the array to a unique nonnegative ID number. This means 1 gets turned into 0, the next number after 1 gets turned into 1, and so forth.
⊏ First Cell: Get the first element of the array as a rank-0 array. This will always be 1.
⊐ Index Of: Get the index of the first occurrence of the right argument (1) in the left argument (array of ID numbers). This is the (0-based) index of the first non-1 number in the original array, which is the same as the 1-based index of the last 1 in the original array.
@AidenChow Does second quadrant mean the upper left corner, as in regular Cartesian coordinates, or does it mean the second quadrant in whatever coordinate system the programming language uses? (I ask because in many languages, the positive y axis points down instead of up, so the second quadrant might be considered to be the bottom left corner.)
9:45 PM
its big, its black, and it looks horrible
its even worse than the first change
I don't have strong opinions about the aesthetics one way or another, but this is definitely more readable than the original change
i still distinctly prefer the old design over either new one but this is miles better than the old new
@RydwolfPrograms AAAAA
I can't believe it
10:01 PM
@cairdcoinheringaahing NMṪ and ĠḢṪ also work for 3 exploiting the initial 1, which makes it really feel like there should be a 2-byter
er, ĠḢṪ exploits the initial 1, NMṪ exploits the other elements being greater :P
ṂÐƤỊS is a profoundly silly 5-byter
how many suffixes have a minimum of 1
10:32 PM
At least I know when I've voted on something
So it's fairly straightforward to say Set<T> = Map<T, ()>. But is it possible to instead define the map in terms of the set?
@chunes I didn't actually add any, but feel free to submit a PR if you would find them helpfull
11:23 PM
my first thought is that you can define a map as a set of pairs (set-theoretic relation style), but aside from the performance issues with actually using such a map it doesn't enforce the uniqueness of the mapping for each key
the other way around works because it's a set of unique items from a mapping from unique keys, but if you try reversing it it just has "less structure"
it could work if you can define the equality relation that sets use though -- define a mapping-pair type where values are equal if their keys are equal

« first day (4507 days earlier)      last day (411 days later) »