« first day (4426 days earlier)      last day (715 days later) » 

00:08
Well, I have officially been on CGCC for 6 years \o/
🥳
congrats
well, I might as well join the bandwagon and mention my 9th year as of the end of last month
Congrats!
That is 75% of the site's lifetime :P
00:25
@user *jvm bytecode, not jvm
@user challenge accepted /s
@user yeah it is
oh yeah i missed my 4 year anniversary a month ago :P
00:37
@Seggan Why the "/s"? This would actually be pretty cool, even if it's not particularly useful or practical
00:59
yes, it would, but i dont have the time or hard drive space for it
Sandbox posts last active a week ago: The dating game king-of-the-hill
01:48
@cairdcoinheringaahing ok boomer
@user Quiet, child
/srs Congrats to you and Neil, I hope y'all stay on
Also, 6 and 9, nice
I only have 2 years
To live?!
Yes totally
01:50
@emanresuA you get to escape the life sentence of code golf addiction :p
I've served 5 years of my sentence thusfar
xkcd says I'll be serving at least 5 more :p
see?
Have some hope, perhaps that's your grave and someone put a flag on top of your dead body :P
3
That's a golf course, you dingus
It means I'll still be golfing in 5 years
@lyxal Yes. Perhaps you dropped dead of your love for golf while playing golf, and the in your honor, someone buried you right there and made a new golf hole right above your body
A Nineteenth Hole
@user you seem to think that the forces that keep us here would let me off that easily
 
2 hours later…
03:53
0
Q: Write the smallest possible code in x86-64 to implement the "<=>" operator

Alexis WilkeLanguages, such as C++, have introduced a new comparison operator: <=>. This operator returns -1, 0, or 1 when comparing two items together: -1 means the left handside is smaller, 0 when both values are equal 1 means the right handside is smaller. Here is what I have been coming up with in x86-...

 
2 hours later…
06:03
@user This seems like it would be usefull
I feel like a Python/Java library chock full of builtins would probably suffice
It would certainly be cool, though
If anyone here finds such a project or wants to start work on something like that, ping me please
Is this a good spot to ask questions about Jelly? If not can someone refer me to one? Thsnks.
This is as good a place as any

 Jelly Hypertraining

Practice your Jelly :) Rules and stuff are here: golfingsucces...
idk how active that room is
06:18
Thanks. I’ll just post it here for starters. I’m making my way through the tutorial and trying to understand the example in Multi-chain links: github.com/DennisMitchell/jellylanguage/wiki/……
Cð+×µH?
Ha! I think I get it. After C is processed in the chain C+×H then only + is processed next because it’s a monadic chain. I thought it might pull off both because I was looking at the wrong chaining rules when referencing the rules above.
@doug it depends on how many arguments you give it
Do those chain separators act as brackets or can you use them arbitrarily?
In this example it appears to be monadic.
@doug iirc it takes everything until the next separator (or link end, whichever comes first in the program) and makes it a single link evaluated with the arity rules of the separator
It's as if you wrote [C, {arity: 2, code: +×}, H]
That is treated as if it was a single dyad in parsing the larger link, and the is parsed with dyadic chaining rules when evaluated
06:33
I think the point of that section is that you need the chain separators to get that behavior in a monadic setting. In a dyadic setting I think it might parse as you describe it. That being said, I started reading the tutorial only a couple of hours ago.
Arity of larger links is determined by how many arguments you call it with
If you call it as link(x), it parses monadically. If you call it as link(x, y) it parses dyadically
Right. In this example it’s implied this is a monadic chain.
Correct. The chain separator is needed because of the context of the link in the example
Cool. I think I’m up to speed.
Thank to you and @user.
06:51
For any newbies reading this: This has a better description of how the chain separators work: github.com/DennisMitchell/jellylanguage/wiki/Syntax. Long story short, they’re not interchangeable.
@hyper-neutrino Didn't you have a site with a better Jelly tutorial?
@doug although they can be used for recursive structure with quicks, they fundamentally just create a single additional level of divisions
07:09
Just got -60 from "voting corrected" :(
That's silly those were legitimate upvotes
@TheThonnu rip dw, ive gotten similar before as well
First time I've seen votes on fresh answers reversed
I don't think it takes into account how old the answer is
It's just if one user votes on another user's posts a lot of times in a short space of time it will reverse all the votes
07:14
Let's see if they reverse them this time
Frickers undid my votes and made me waste my vote quota yesterday
Like literally made the button gray again despite me having clicked it when you answered
It's not vote fraud because I would have upvoted the answers anyway. That's silly that they got reverted just because it was all at once instead of spread out over several days
It's an automated process: it doesn't understand that
It's fine though, I don't really mind if I lose 60 rep
@TheThonnu I know, but it's silly that the automated system punishes voting on a rapid-fire series of quality answers
I guess, maybe it would be better if it went to the mods first before it reversed the votes
Then the mods could check if it was actually vote fraud
07:21
Also, if it decides not to reverse the re-votes, then that's just as silly
Spreading votes between other answers shouldn't be enough to throw it off
@hyper-neutrino Thanks!
 
1 hour later…
08:33
@mousetail one problem with a language agnostic vm is implementing eval
now im really tempted to write a rust golfing library with python bindings
08:56
800 KB :/
09:10
The color grey is 200 bytes now wtf
Brainfuck encoded colour code
Must be
That, or it's got like 38 shades of gray defined in the file
Yea there seem to be 13 shades defined, but then I'm confused why there needs to be both blue and lightBlue if each contain multiple shades
Wait actually it's multiple shades?
09:15
const grey = {
  50: '#fafafa',
  100: '#f5f5f5',
  200: '#eeeeee',
  300: '#e0e0e0',
  400: '#bdbdbd',
  500: '#9e9e9e',
  600: '#757575',
  700: '#616161',
  800: '#424242',
  900: '#212121',
  A100: '#f5f5f5',
  A200: '#eeeeee',
  A400: '#bdbdbd',
  A700: '#616161'
};
export default grey;
I looked it up
That was supposed to be a joke. The hell kinda library needs to give you that many options?
And then why not just use css
Yea this library is kinda terrible, gonna try to find a better one. 50 KB to load 2 icons that are only 200 bytes each
It only allows specifying named colors which are hard to make fit my theme
and only named sizes which is also a problem because none of them match exactly what I waant
@mousetail The library or something else?
@mousetail named sizes?
Yea, when you load a icon you can specify the size to be the string "small", "medium", or "large". That's it
Holy hell
09:20
It depends on some global theming package that allows you to exactly specify what sizes those mean but I don''t want to setup a entire theming context for 2 icons
Can you use css manually? Or does it have to be dynamically loaded?
Maybe, the icon generated gets like 6 css classes applied. I could try to find the one that corresponds to the size then use !important
So the icon is dynamically generated?
Yea, I dynamically choose which SVG to draw. The SVGs are from the library
And there's no way to do it with vanilla js?
09:26
Yes there is but it's convenient to have a library of icons available without needing to download them one by one
I might just do it manually though because this library is worse than nothing
(This is React BTW)
10:24
rewrite it in rust
I would like to, I tried Yew before but it seems a bit too immature still
Also even the smallest webassembly builds are orders of magnitude larger than even bloated JS bundle sizes
10:53
Q How do I most concisely create a array of pointers to array literals in C. Like [&[1,2],&[3,4,6]] in rust?
11:03
iirc c doesn't have a concept of "array literals"
you just have array initializers
but in any case... i think just a normal multidimensional array should work? decay could be weird depending on what you need it for but
Don't you need something special for non-rectangular arrays?
oh yeah good point
in that case, you probably just want to pad it to rectangular, unless it's really ragged lol
okay it looks like you don't even have to pad it manually
anyways the fucky thorny bit here is that you don't have a real array of pointers, but dereferencing the array still gives you an array that decays to a pointer
11:39
@UnrelatedString Thanks
also looks like you can omit the outermost=leftmost dimension
hey hi hello so say I have a javascript file I've imported as type=module, how would I pass that to another file I've included without having to mark the other file as type=module?
<script src="./vyxal.js" type="module"></script>
<script src="./main.js"></script>
<!-- I want to be able to call the stuff in vyxal.js in main.js without having to make it a module -->
main.js can't be a module because it relies on other included, non-module files
11:55
can you modify vyxal.js? if yes why can't you just set properties on the window object to expose your vyxal stuff
I can't modify it
it gets automatically generated, and exports an object
it has an import in it meaning it needs to be a module
Can you add a third module script that exports the members as window attributes, that then can be loaded by the non-module script?
I'll try that
just gotta rebuild everything first lol
ooh that works
12:17
I've come to make an announcement
Rabbit will not have a system for selectively importing modules or including them in dependencies
you either import a module or you don't
@Ginger shadow the hedgehog is a b*tch ass mfer
if you have a module that causes a program crash if imported on Windows, that's bad module design
</callout post on my twitter dot com>
oh, also: casts in Rabbit
so there are two kinds of casts: safe and unsafe spicy
safe casts look like foo as Bar and spicy ones look like foo as! Bar
what's the difference? simple
you can safely cast a struct to a type iff the struct implements a cast method
they look like this:
struct Foo:
    as Bar:
        return Bar(<some parameters>)
you can also implement cast methods on structs you didn't create, using this even better syntax:
are unsafe casts possible between types of different sizes
as Bar for Foo:
    return Bar(<some parameters>)
I don't like this syntax, but it's consistent and I do like that
ooh, for is a nice way to do extension methods
12:23
@UnrelatedString what do you mean "different sizes"?
i'll just let you get to how unsafe casts work :P
@UnrelatedString yeah, I'm also doing trait implementations using trait X for Y
@UnrelatedString well, when I say unsafe spicy I mean spicy
an unsafe cast literally switches the type of the target to whatever it's being cast to
that's why they're unsafe
so it reinterprets the underlying representation
?
12:24
yes, I think
I'm not sure if it'll copy functions over or not tho
probably not
what happens if the underlying representation of the target type is larger
I don't know what you mean by "larger" :p
like i assume the underlying representation is, if not a raw array of bytes, some kind of container with a size
I... guess? Currently objects are stored as instances of a class, with a MutableMap containing their properties
12:27
hmmmmmmm one sec
so it doesn't arbitrarily reinterpret fields based on layout, it just... has the same fields as it would have in the original type
whoa
so I have two things I can do here: unsafe casts can either 1. change the internal type property of the target, making the rest of the program see it as whatever its new type is or 2. create a new instance of the thing being cast to and copy over all properties from the original object, overwriting any duplicates
I like option 1, because it's the least bad of the two
or 3. I can just not do unsafe casts
why would you use them when you can implement a cast method?
is there any real use for unsafe casts?
yeah i think #3 wins here
(@RydwolfPrograms)
@UnrelatedString same lol
okay, now for annotations
because honestly making it possible to create a value in a type that doesn't necessarily have any properties of a value of that type is even worse than the c-style of pointer cast bullshit
12:30
I have two options with annotations: the Java way, where annotations are basically signals to a preprocessor, or the Python way, where annotations are a fancy way of invoking methods
I like Python more
anyway time to implement variable assignment in Rabbit!
actually, first I have to get my annotation preprocessor working
yay
i feel like java annotations and python decorators are completely distinct concepts that happen to share syntax :P
:+1:
 
1 hour later…
13:42
mfw my build environment commits die because I misconfigured something
14:18
@Ginger At least in Swift, you use the same syntax for unsafe downcasts of class types as for unboxing Any with crash-on-failure
I don’t think allowing a reinterpret-cast with as! is a good idea, personally
good thing I'm not adding it then!
Swift does have a reinterpret-cast, but it's spelled unsafeBitCast(_:to:)
But Swift's as, as?, and as! correspond to C++ static_cast<T>, dynamic_cast<T*>, and dynamic_cast<T&>, respectively
 
2 hours later…
15:58
0
A: Sandbox for Proposed Challenges

mousetailIs it a valid chemical? code-golf decision-problem Non-metals typically[citation needed] have a fixed number of covalent bonds in every chemical they are part of. Given the number of bonds every element requires, output whether it's possible to construct a molecule from the given chemicals. Test ...

16:39
0
A: Sandbox for Proposed Challenges

Huỳnh Trần KhanhGreat Leap to the Right code-golf Given a string s consisting of characters a-z lowercase, generate 5 arrays a1, a2, a3, a4, and a5 of size n (length of s) where the i-th element of each array represents the index of the next occurrence of the i-th character in s, with the following conditions: ...

Since data in Trilangle is 24 bits, it's possible to attempt to print a value more than 21 bits wide as a character. No such character exists in Unicode. How should I handle this?
Make your own extension to unicode :p
- Ignore it and generate invalid UTF-8, leaving the terminal/browser/etc to decide what to do (current behavior)
- Spit out an error message saying there is no such character
- Extend UTF-8 to handle 24-bit payloads and generate a byte sequence starting with 0xF8
Alternatively, only print ASCII. If someone tries printing a 24 bit value, print 3 ascii chara
Print it the same as any other invalid character?
Alternatively mod 2^21
16:49
Currently if you try to print 0x3C0000 it generates the invalid UTF-8 sequence FF 80 80 80 and then what it looks like is implementation-dependent
@mousetail Currently I just send a UTF-8 bytestream to the output and the implementation of that (terminal, JS, etc) is responsible for rendering it
This does not work very well on Windows, where the terminal interprets the incoming bytestream as CP-437
cringe windows
For example, the code "🎈@o prints "🎈" on the web interface but "≡ƒÄê" in my terminal
Apparently the current web interface renders the FF 80 80 80 bytestream as "����", i.e. four of U+FFFD
If I extend UTF-8 and convert that to F8 8F 80 80 80 instead, I expect to just see five of them
17:18
@Bbrk24 If it weren't an esolang, I'd say option 2 definitely. Since it is... I'm not sure. But maybe still option 2.
:63169025 Typing with gloves on, lol
But yeah I'm leaning towards an error message as well
 
1 hour later…
18:25
just got my annotation processor working :D
and, in an amazing twist, the Kotlin language server actually detected the generated code
18:53
Advanced Kotlin: this::class.declaredFunctions.filterIsInstance<KCallable<RabbitObject>>().filter { it.hasAnnotation<Wrap>() }.associateTo(properties) { Identifier(it.findAnnotation<Wrap>()!!.identifier) to WrappedFunctionDeclaration(it) }
now I can just decorate functions with @Wrap(<some string>) and have them be automatically added to properties!
19:48
@Ginger ive never written one
howd ya do it
@Ginger python
im doing pythonic way for rol too
@UnrelatedString yep
but they both "preprocess"
@Seggan suffering
(also im back from texas, sry for the long absence)
20:05
How was texas?
thursday was fine, friday rainy and chilly, saturday was really warm
everythings green there alr
here in south carolina the trees are just starting to bud (granted, i live in the extreme upstate; go south 45 mins and its prob like summer there already)
did you see Radvylf? :p
@Ginger nah he lives a bit far away
in The Sand Trap, Feb 24 at 21:26, by Rydwolf Programs
Pretty close to four hours away, that's where my grandparents live
lol
the slavic youth had a congress there, over 4k people
20:12
huh?
there was a big meeting of america's young slavs
(i.e. russians, ukranians, beylorussians, moldovans, etc)
I did not know that was a thing
we were discussing world domination
but seriously, we kinda took over tyler
you couldnt go anywhere without seeing slavs
waow
I wonder if you're in any photos of the event
i am
it got into local news
not that im gonna dox myself
20:16
well, I go to github.com/advisories and the first thing I see is a High vulnerability for sqlite :|
(CVE-2022-43441)
> Apache Log4j 1.x (EOL) allows Denial of Service (DoS)
noice
> builderio/qwik is vulnerable to code injection
great
awesome
I don't know about yall but I think Answer might be vulnerable to Cross-site Scripting
just a hunch
@Ginger Seems to just be the JS bindings, not the database itself
what
20:48
huh TIL [putting a space ](example.com) after words in a link unlinkifies it
21:02
@user you got me
ima start building it (i dont think i have time today tho)
21:14
CMP/LDQ: should i build it in rust or kotlin?
rust pros: rust stuff, probably more memory efficient
kotlin pros: more interop (if someone decided to build their lang in a jvm lang, looking at you vyxal 3, theyd have an api free)
im thinking kotlin but i cant get the rust option out of my mind
Rust is cooler, so if you're tempted by it, go for it
You already know Kotlin, so you wouldn't be learning anything new if you did that
If you use Rust, you can make Python bindings so that people can write golflangs in Python that use your super-duper-hyper-fast-native-optimized Rust functions
@user i know rust well too
Ah ok
@user i can make python bindings in kotlin too
i was thinking of "supply the compiler command as an argument"
also theres a jit option for later in rust
@RydwolfPrograms werent you writing a rust golflang lib once
# Note of caution: We can't have functions inside of functions.
I hate my programming module
21:24
@Seggan Oh, didn't know you could do that
I think pxeger was writing a golflang lib for Python
@user nvm i misunderstood ur msg
kotlin advantage: easy multiplatform
@user i wont have to worry about that anyway if the runtime takes the compiler as an arg
@Seggan so you can make fancy online runtimes too

« first day (4426 days earlier)      last day (715 days later) »