Andriamanitra has quit [Ping timeout: 260 seconds]
Andriamanitra has joined #crystal-lang
renich has quit [Ping timeout: 246 seconds]
renich has joined #crystal-lang
Human_G33k has quit [Ping timeout: 264 seconds]
HumanG33k has joined #crystal-lang
renich has quit [Ping timeout: 240 seconds]
renich has joined #crystal-lang
deavmi_ has quit [Read error: No route to host]
deavmi has joined #crystal-lang
renich has quit [Ping timeout: 246 seconds]
renich has joined #crystal-lang
renich has quit [Ping timeout: 240 seconds]
Human_G33k has joined #crystal-lang
HumanG33k has quit [Ping timeout: 240 seconds]
renich has joined #crystal-lang
<FromGitter>
<acoolstraw> hey, I'm trying to generate docs for crystal-gobject, but when I do `./gi-doc`, it says `Please give one or more GIR namespaces!`
<FromGitter>
<acoolstraw> nevermind, `Gtk` worked, but it's just an empty page
xyhuvud has joined #crystal-lang
yxhuvud has quit [*.net *.split]
FromGitter has quit [*.net *.split]
FromGitter has joined #crystal-lang
return0e[m] has quit [Read error: Connection reset by peer]
psydroid has quit [Write error: Connection reset by peer]
ryanprior has quit [Remote host closed the connection]
hamoko[m] has quit [Remote host closed the connection]
return0e[m] has joined #crystal-lang
<postmodern>
can you override getter/setter fields in a struct?
<postmodern>
have a weird edge-case where a field should be an enum, except the field is UInt32, but the enum is UInt8, so i need to map the raw value to the enum
<FromGitter>
<Blacksmoke16> cant just do that in the initializer?
<postmodern>
Blacksmoke16, that would handle the setting, but not the getting
<FromGitter>
<Blacksmoke16> but once you convert it to the enum, isnt it fine now?
<postmodern>
Blacksmoke16, also this is a C lib struct, so can't define custom initializer methods on it
<FromGitter>
<Blacksmoke16> ah
<FromGitter>
<Blacksmoke16> in that case im not sure
<postmodern>
guess i'll have to wrap the struct in a class and do the translation there
hamoko[m] has joined #crystal-lang
psydroid has joined #crystal-lang
ryanprior has joined #crystal-lang
<deimos_>
after learning crystal last week, i've migrated some ruby programs to crystal, which was far easier than i expected. this week is chasing down "Index Out of Bounds" errors that i didn't know i had with ruby ;)
<deimos_>
i do need to figure out fibers or some other way to go horizontal since i have 100 cpus to use, rather than 1
<FromGitter>
<acoolstraw> I'm trying to generate docs for crystal-gobject, but it doesn't work. I've downgraded to 0.34.0, compiled crystal and shards myself, and built `gi-doc`, but it just gives me an empty page
<FromGitter>
<Blacksmoke16> its called `Exception::CallStack` now
<FromGitter>
<acoolstraw> `$ bin/gi-doc Gtk ⏎ Docs written to docs/gobject`
<postmodern>
is there a better way to define a bunch of arguments that are optional, other than doing `x : Int32? = nil`?
<FromGitter>
<Blacksmoke16> make another constructor?
<FromGitter>
<acoolstraw> I think I fixed it
<FromGitter>
<acoolstraw> nope
<FromGitter>
<acoolstraw> still empty
<FromGitter>
<grkek> @acoolstraw nice nu pogody pfp
<FromGitter>
<grkek> I was requiring the wrong file
<FromGitter>
<grkek> sorry
<FromGitter>
<grkek> thank you guys
<postmodern>
weird just noticed that crystal C structs technically support mutli-dimensional arrays, but the order is backwards. Int32[2][24] creates 24 arrays of 2 Int32s.
<FromGitter>
<grkek> It is not backwards
<FromGitter>
<grkek> it is in a correct way
<FromGitter>
<grkek> the C has it backwards
<postmodern>
wow cool `delegate baz, to: @foo.bar` totally works
renich has quit [Read error: Connection reset by peer]
<postmodern>
is there a macro method that can convert FOO_BAR ids to camel case?
<FromGitter>
<Blacksmoke16> `.camelcase`?
Human_G33k has quit [Remote host closed the connection]
<postmodern>
hmm .camelcase exists, but i can't find it in the docs. it doesn't seem to CamelCase SHOUT_CASE constants though. Just maps them to SHOUTCASE instead.