<FromGitter>
<djberg96> no SizeT on Mac? `Error: undefined constant SizeT`
<FromGitter>
<djberg96> Also tried `LibC::SizeT`
<FromGitter>
<Blacksmoke16> try `::LibC::SizeT`
<FromGitter>
<djberg96> ah, yes, thanks
<FromGitter>
<Blacksmoke16> you prob have your `LibC` type in some custom namespace
<FromGitter>
<djberg96> is `GC.malloc_atomic(256).as(UInt8*)` really the way to allocate an in/out char buffer?
<FromGitter>
<djberg96> seems...i dunno, scary
<FromGitter>
<Blacksmoke16> :shrug:
<straight-shoota>
how did you end up with that?
<FromGitter>
<djberg96> was that question for me? i found it in the crystal source code while looking for sysctl examples, e.g. executable_path.cr
<straight-shoota>
yes. okay
<straight-shoota>
didn't understand how your question was meant
<straight-shoota>
why scary?
<FromGitter>
<djberg96> well, in ruby you just create a regular string buffer, e.g. `buf = 0.chr * 256`
<FromGitter>
<djberg96> i guess i'm not sure why i'm touching GC (which I assume is the garbage collector), using `malloc` directly, and then casting it
<straight-shoota>
you shouldn't need to interface with the garbage collector directly unless you're doing very specific stuff
<straight-shoota>
that's very low level
<straight-shoota>
in user code you would usually use `Bytes` (or even `StaticArray`)
<FromGitter>
<bararchy> hmmm seems to compile with : `::Digest::CRC32.update(slice, @crc)`
postmodern has quit [Quit: Leaving]
<FromGitter>
<jrei:matrix.org> I'll stop adding a cron build to my projects using GitHub Actions – I'm spammed by deacrivated CIs after 60days of inactivity
<FromGitter>
<jrei:matrix.org> Also I'm not alerted if the build fails, it is quite useless
<FromGitter>
<oprypin:matrix.org> j8r (https://matrix.to/#/@jrei:matrix.org) don't know why you're not alerted, must have messed up some notification config
<FromGitter>
<oprypin:matrix.org> regarding deactivated CIs - *that's* where *I* didn't get notified. did you?
<FromGitter>
<jrei:matrix.org> I chose to receive no mails
<FromGitter>
<oprypin:matrix.org> well don't choose that :D
<FromGitter>
<jrei:matrix.org> it is possible to get alerted in GH notifications?
<FromGitter>
<oprypin:matrix.org> seems not
<FromGitter>
<oprypin:matrix.org> regarding deactivating crons... you wouldn't believe what the solution is. make a cron that activates them.
<FromGitter>
<jrei:matrix.org> haha lol, which means have a "keep alive commit"
<FromGitter>
<oprypin:matrix.org> no no there's an explicit "activate" api
<FromGitter>
<oprypin:matrix.org> i'll tell you more later, don't have my code at hand now
<FromGitter>
<jrei:matrix.org> ok, why not then... I'll consider this for bigger projects
<FromGitter>
<jrei:matrix.org> I now checked "Web" and the "Send..."
<FromGitter>
<oprypin:matrix.org> i actually prefer mail only, then i set up an email filter in a way that the email app doesn't notify me
<FromGitter>
<oprypin:matrix.org> in my workflow in a way the Web notifications are the high priority ones
<FromGitter>
<jrei:matrix.org> I don't like mail, I use it at minimum. Very easy to get spammed.
<FromGitter>
<jrei:matrix.org> Yeah on my side I always have a pinned tab with GH notifications
<FromGitter>
<oprypin:matrix.org> i like. i tell GitHub to also send me my own comments. then i get full threads of my participation (and can actually search it, can u imagine??)
<FromGitter>
<jrei:matrix.org> you can do that with GitHub notifications
<FromGitter>
<djberg96> syntax error somewhere it looks like, but my eyeballs aren't seeing it
DTZUZU has quit [Read error: Connection reset by peer]
DTZUZU_ has joined #crystal-lang
<FromGitter>
<Blacksmoke16> whats the error?
<FromGitter>
<djberg96> wait...now it's working? maybe i forgot to save, not sure
<FromGitter>
<djberg96> wow, some members just straight up empty on Linux, not sure what I did wrong
<FromGitter>
<djberg96> oops, forgot the struct size is different and linux has an extra member
<FromGitter>
<RespiteSage> Is it expected and intended to be able to call `Class` class methods (like `Class.name`) from within the body of a class definition?
<FromGitter>
<HertzDevil> imo supporting this implies that there is indeed a `self` in this scope of type `Foo.class`
<FromGitter>
<RespiteSage> I guess that makes sense.
<FromGitter>
<HertzDevil> but `@x : Bool = self.nilable?` is an error
<FromGitter>
<RespiteSage> Huh.
<FromGitter>
<RespiteSage> So there's an implicit `self` of `Foo.class` but an explicit `self` of `Foo`?
<FromGitter>
<HertzDevil> i prefer that we don't have any `self` here at all
<FromGitter>
<RespiteSage> The error from `@x : Bool = self.nilable?` implies that your preference is intended: `Error: there's no self in this scope`.
<FromGitter>
<HertzDevil> ruby does have `self` even though the same code means a different thing (ruby classes can have class variables *and* instance variables)
<FromGitter>
<HertzDevil> and yes, `@x = self.ancestors` works on ruby too
<FromGitter>
<asterite> Probably a bug in Crystal
<FromGitter>
<RespiteSage> Yeah, this should be consistent either way (either allowing both implicit and explicit `self.<method>` in `Klass.class` scope or disallowing both).
<FromGitter>
<RespiteSage> I guess unless there's a good reason not to be.
<FromGitter>
<RespiteSage> @HertzDevil Do you want to make an issue or shall I?
DTZUZU has joined #crystal-lang
Xorg has joined #crystal-lang
<Xorg>
is there a cheat sheet for this lang ?
<FromGitter>
<Blacksmoke16> in what regard?
<FromGitter>
<Blacksmoke16> either way, not that im aware of
DTZUZU has quit [Read error: Connection reset by peer]
DTZUZU has joined #crystal-lang
Xorg has quit [Quit: WeeChat 3.0]
<FromGitter>
<HertzDevil> what's with the playground showing `playpen: application terminated with error code 1` for 0.35.1
<FromGitter>
<oprypin:matrix.org> (this is about http client) my pain point is that i *had* specified a literal URL but it is not possible to log it consistently, without wrapping every possible method of http::client
alexherbo2 has quit [Ping timeout: 264 seconds]
<straight-shoota>
you had it specified as `resource` string?
<straight-shoota>
oprypin, yeah that's a bit difficult with the current layout
<FromGitter>
<oprypin:matrix.org> but i get it now, it's because a client request is being fit into the mold of a server request
<straight-shoota>
that may be part of the problem
<FromGitter>
<oprypin:matrix.org> wasn't there some issue about this?
<straight-shoota>
Client.get deconstructs the URI: initializes an instance with the authority and then sends a request with the path as resource
<straight-shoota>
the request object itself doesn't care about authority and scheme
<straight-shoota>
it just represents a plain HTTP request which belongs in the context of an HTTP connection
<straight-shoota>
but the logger should be able to extract that information from the client instance
<FromGitter>
<oprypin:matrix.org> straight-shoota, there is no protocol
<straight-shoota>
?
<FromGitter>
<oprypin:matrix.org> oh in the client there is protocol
<FromGitter>
<oprypin:matrix.org> well then that's indeed possible, so can just add a `uri` method
<oprypin>
it's not good though
<FromGitter>
<oprypin:matrix.org> aa i switched client again
<FromGitter>
<oprypin:matrix.org> need to get protocol and host from the client, then request_target from the request (or painstakingly construct it from separate parts)
<straight-shoota>
yes
<straight-shoota>
and there's also Host header... :P
<straight-shoota>
maybe logging should rather happen in the class method because there we have a clear URI
<FromGitter>
<oprypin:matrix.org> i was trying to make that possible with a small change but that didn't pan out