ur5us_ has quit [Read error: Connection reset by peer]
ur5us has joined #crystal-lang
ur5us has quit [Ping timeout: 245 seconds]
frojnd has quit [Quit: WeeChat 2.3]
Guest28 has joined #crystal-lang
Guest28 has quit [Client Quit]
SamantazFox has quit [Ping timeout: 252 seconds]
SamantazFox has joined #crystal-lang
dostoyevsky2 has quit [Quit: leaving]
dostoyevsky2 has joined #crystal-lang
<FromGitter>
<Dan-Do> What is the equavilent type of uintptr_t in crystal? Is it UInt32?
<FromGitter>
<Dan-Do> Found it, `LibC::ULong`
repo has joined #crystal-lang
<repo>
hey!
<riza>
hey repo
<repo>
i wanted to set up crystal with coc.nvim and thought i'd ask around if someone has a setup that works well
<xyhuvud>
dan-do: I'd look into Pointer.
<riza>
repo: I don't use coc, but the vim crystal plugin works well enough. I don't think the crystal binary quite has the full LSP pattern sorted out yet
<repo>
yeah, ok
<FromGitter>
<Dan-Do> @xyhuvud I used crystal_lib to generate the binding, it says `alias UintptrT = LibC::ULong`
<xyhuvud>
weird. I'd have expected any pointers to be of Pointer type.
<FromGitter>
<Dan-Do> The C fuction is `uintptr_t reindexer_init();`
<FromGitter>
<Blacksmoke16> isnt that just an alias to little endian?
<FromGitter>
<Blacksmoke16> i dont think theres a way to just be like "automatically figure out and use which one these bytes are using"
<postmodern>
appears so
<FromGitter>
<djberg96> In Ruby it's `[1].pack(“I”) == [1].pack(“N”)`
<postmodern>
guess I could use IO::ByteFormat to do the same trick
<repo>
Blacksmoke16: isn't that technically platform dependent? i.e. if a system came along that crystal can compile to, where the endianness isn't little endian, that would be set at compile time (of crystal)
<FromGitter>
<Blacksmoke16> my understanding is that it's not a system specific thing, but whomever's bytes you're consuming
<FromGitter>
<Blacksmoke16> e.g. some image formats use little and other use big
<repo>
afair there are some niche systems that use big endian
<riza>
I wonder whats the use of a unary identity operator ... I have to assume it's for some sort of recursive expression
postmodern has quit [Read error: Connection reset by peer]
<FromGitter>
<jwaldrip:matrix.org> well the gitter app doesnt work anymore :-)
<FromGitter>
<jwaldrip:matrix.org> Question: seeing a weird behavior. When I start a process inside a thread and then subsequently try to wait on that process from other threads, it hangs... any idea on why that would be the case
<riza>
gitter has existed in a state somewhere between working and non-working for years now
ur5us has joined #crystal-lang
<FromGitter>
<oprypin:matrix.org> jwaldrip (https://matrix.to/#/@jwaldrip:matrix.org): you say *thread*, not fiber? could easily be that it's not thread-safe
<FromGitter>
<jwaldrip:matrix.org> sorry fiber
postmodern has joined #crystal-lang
<postmodern>
lazy macro question, how do I enumerate all constants defined in a module?
<FromGitter>
<Blacksmoke16> `MyModule.constants`
<FromGitter>
<jwaldrip:matrix.org> or `@type.constants` within the module
<postmodern>
yep, i recommended admiral while i was building command_kit. command_kit is implemented entirely as modules, so you can strip it down to bare basics if need be. and plus i implemented all of the bells and whistles you'd want for CLI apps (well still haven't rolled my own simple progress bar yet...)
<postmodern>
`{% if !@type.superclass.nil? && @type.superclass < ClassMethods %}` am i doing this correctly? that should check if the superclass also extends Class
<postmodern>
*ClassMethods
<FromGitter>
<Blacksmoke16> what are you wanting to do?
<postmodern>
have a class method that will check a class-variable, but if it's nil, try calling the superclass's class-method and repeat the process down the ancestors list until we hit a superclass which does not extend ClassMethods
deavmi_ has quit [Remote host closed the connection]
<FromGitter>
<Blacksmoke16> you cant access class vars in a macro
<FromGitter>
<Blacksmoke16> so not sure how you're planning to do that