renich has quit [Remote host closed the connection]
hightower2 has joined #crystal-lang
ur5us has joined #crystal-lang
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 260 seconds]
ur5us_ has joined #crystal-lang
ur5us has quit [Read error: Connection reset by peer]
taupiqueur has joined #crystal-lang
ur5us_ has quit [Remote host closed the connection]
ur5us_ has joined #crystal-lang
taupiqueur has quit [Ping timeout: 246 seconds]
<hightower2>
Could someone clarify why Rust seems to be the preferred language nowadays for low-level stuff? Is it just because of the possibility to compile without GC? Or those memory protections which (if I understand correctly) aren't much different than a library someone could write for Crystal or Go for the same thing? Or?
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 256 seconds]
taupiqueur has joined #crystal-lang
alexherbo2 has joined #crystal-lang
ur5us_ has quit [Ping timeout: 246 seconds]
<FromGitter>
<moe:busyloop.net> preferred by who? go-lang seems to be much more used in my circles.
<FromGitter>
<moe:busyloop.net> but yes, the ones that do prefer it probably do so for the safety and control.
<FromGitter>
<moe:busyloop.net> you could build an OS kernel in rust, wouldn't do that with crystal
<FromGitter>
<moe:busyloop.net> otoh something like a webapp i'd much rather build in crystal than in rust
<hightower2>
right, right, sure, that's what I meant by saying 'low-level stuff'
Sankalp has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
Sankalp has joined #crystal-lang
jmdaemon has quit [Ping timeout: 256 seconds]
hightower2 has quit [Ping timeout: 268 seconds]
notzmv has joined #crystal-lang
FromGitter has quit [Remote host closed the connection]
oprypin_ has quit [Quit: Bye]
oprypin has joined #crystal-lang
FromGitter has joined #crystal-lang
notzmv has quit [Ping timeout: 265 seconds]
alexherbo2 has quit [Remote host closed the connection]
yxhuvud has quit [Read error: Connection reset by peer]
Chillfox has quit [Ping timeout: 264 seconds]
yxhuvud has joined #crystal-lang
Chillfox has joined #crystal-lang
alexherbo2 has joined #crystal-lang
hightower2 has joined #crystal-lang
kevinsjoberg_ has joined #crystal-lang
xybre1 has joined #crystal-lang
kevinsjoberg has quit [Ping timeout: 252 seconds]
kevinsjoberg_ is now known as kevinsjoberg
hightower2 has quit [Remote host closed the connection]
hightower2 has joined #crystal-lang
dostoyev1ky2 has joined #crystal-lang
dannyAAM_ has joined #crystal-lang
xybre has quit [Ping timeout: 252 seconds]
oprypin_ has joined #crystal-lang
FromGitter has quit [Ping timeout: 252 seconds]
dostoyevsky2 has quit [Ping timeout: 252 seconds]
Starfoxxes has quit [Ping timeout: 252 seconds]
dannyAAM has quit [Ping timeout: 252 seconds]
oprypin has quit [Ping timeout: 252 seconds]
dannyAAM_ is now known as dannyAAM
FromGitter has joined #crystal-lang
Starfoxxes has joined #crystal-lang
notzmv has joined #crystal-lang
<FromGitter>
<azurelmao> Ok so I figured out OpenGL but I'm not sure whether I'm compiling the shaders correctly. This code doesn't generate any errors even when I purposefully add syntax errors to the shader source. ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=6398bfa2a151003b5a6902f2]
<FromGitter>
<azurelmao> when I change the unless to if
<FromGitter>
<azurelmao> the puts log.value prints out 144 with no syntax errors, and 48 with
<FromGitter>
<azurelmao> idk if im printing out the first character?
<FromGitter>
<azurelmao> btw these bindings are not mine, using arctic-fox/opengl
<FromGitter>
<Blacksmoke16> gotcha
dostoyevsky2 has quit [Client Quit]
dostoyevsky2 has joined #crystal-lang
<FromGitter>
<azurelmao> so then puts log.value printing 144 is because it's printing the first character as a UInt8?
<FromGitter>
<azurelmao> if that's the case how can I convert it to a crystal string
<FromGitter>
<Blacksmoke16> my first guess what it corresponds to some enum
<FromGitter>
<azurelmao> the log is just a C string
alexherbo2 has quit [Remote host closed the connection]
<FromGitter>
<azurelmao> in C it just prints a message with what's wrong
<FromGitter>
<Blacksmoke16> try like `String.new`
<FromGitter>
<Blacksmoke16> and pass it the pointer
<FromGitter>
<azurelmao> `puts String.new(log)` prints out `��lՆ`
<FromGitter>
<azurelmao> now it printed a different thing
<FromGitter>
<azurelmao> hm
<FromGitter>
<azurelmao> so it's prolly reading garbage memory
<FromGitter>
<Blacksmoke16> maybe the binding is wrong
<FromGitter>
<Blacksmoke16> `::Pointer(Char)` should prob be `::Pointer(LibC::Char)`, unless the `Char` alias is defined as `UInt8` somewhere else in the lib. otherwise it would use `::Char` which isnt right
<FromGitter>
<azurelmao> I tried to use it but it has some errors so it won't even run cause of the shard
taupiqueur has joined #crystal-lang
<FromGitter>
<Blacksmoke16> :shrug: not sure. never used it
<FromGitter>
<azurelmao> kind of related but after looking for Crystal it seems abandoned somewhat
<FromGitter>
<azurelmao> like everyone talked about it 1 year ago
<FromGitter>
<azurelmao> and then forgot
<FromGitter>
<azurelmao> most shards are outdated
<FromGitter>
<azurelmao> from like 5 years ago
<FromGitter>
<oprypin:matrix.org> @azurelmao: yep that's what happens to languages that don't get the magical push to a top-15 position
<FromGitter>
<azurelmao> I think too little people are talking about it
<FromGitter>
<azurelmao> like I only found out about Crystal thanks to some random blog post on C performance vs Lua which I was interested in at the time + other languages
<FromGitter>
<azurelmao> it had Crystal surprisingly close to C
<FromGitter>
<azurelmao> so I took a look at it
<FromGitter>
<azurelmao> but it's genuinely the best languages I've ever seen
<FromGitter>
<Blacksmoke16> other languages are prob no different. not a Crystal only issue that people create libs and dont maintain them
<FromGitter>
<Blacksmoke16> just if the lang is more popular, you're more likely to get someone to pick it back up, or continue where they left off versus leaving a gap in the ecosystem
<FromGitter>
<azurelmao> maybe in the future when crystal is mostly feature complete the dev team will focus on marketing
desnudopenguino has joined #crystal-lang
<FromGitter>
<Blacksmoke16> have to wait and see
hightower3 has joined #crystal-lang
hightower2 has quit [Ping timeout: 272 seconds]
ur5us_ has joined #crystal-lang
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Write error: Broken pipe]
jmdaemon has joined #crystal-lang
taupiqueur has quit [Ping timeout: 255 seconds]
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 260 seconds]
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 252 seconds]
<FromGitter>
<skinnyjames> Working through the second iteration of an async task runner. ⏎ Project is just a draft so far and will move, but would love to hear thoughts on the example project provided: https://gitlab.com/skinnyjames/barista ⏎ I baked in the athena-console cli, but was also inspired by the patterns it uses.
<FromGitter>
<Blacksmoke16> have some tips for you :)
<FromGitter>
<skinnyjames> also that line is embarrassing because I think i called it twice
<FromGitter>
<skinnyjames> whoops
<FromGitter>
<Blacksmoke16> let me confirm that rq
<FromGitter>
<Blacksmoke16> yea, returns `nil` if the option isnt provided, otherwise returns it as an `Int32`
<FromGitter>
<skinnyjames> very cool, thanks for the tip
<FromGitter>
<Blacksmoke16> similarly if you define your `filter` option as `ACON::Input::Option::Value.flags(REQUIRED, IS_ARRAY)` could do `input.option "filter", Array(Int32)`
<FromGitter>
<Blacksmoke16> then would be like `--filter=foo --filter=bar`, if you just want to do like `build foo bar` could make it an array argument instead of an option
<FromGitter>
<skinnyjames> For sure, the build command is specific just to that example, but I might employ that in an actual project.
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 252 seconds]
<FromGitter>
<Blacksmoke16> 👍 sounds good
<FromGitter>
<Blacksmoke16> ill also suggest extending the application itself is a valid pattern if that makes things easier
<FromGitter>
<Blacksmoke16> are some methods you can then redefine to add common commands and such
<FromGitter>
<skinnyjames> It might, I'm trying to figure out whether to bake it in, or let the consumer decide if they want to pull it in. It is very easy to work with though.
<FromGitter>
<Blacksmoke16> same thing could be done for global options/arguments
<FromGitter>
<Blacksmoke16> hm yea, not sure thats possible in crystal
<FromGitter>
<skinnyjames> That would be nice. the way I'm currently using `previous_def` to extend commands is a bit wonky.
<FromGitter>
<Blacksmoke16> if you're just extending an abstract class, just use `super`
<FromGitter>
<skinnyjames> > hm yea, not sure thats possible in crystal ⏎ ⏎ Ah yeah, sometimes it's hard to remember
<FromGitter>
<skinnyjames> extending, but using an `inherited` macro
<FromGitter>
<Blacksmoke16> `previous_def` is for when you redefine the method in the same type
<FromGitter>
<Blacksmoke16> ah
<FromGitter>
<skinnyjames> so technically patching
<FromGitter>
<Blacksmoke16> gotcha
<FromGitter>
<skinnyjames> The first iteration was/is more based on chef/omnibus but I think this is more composable.
human_g33k has quit [Quit: WeeChat 3.0]
<FromGitter>
<skinnyjames> instead of a object based DSL, (which I found doesn't scale super well in crystal)
<FromGitter>
<Blacksmoke16> also as a heads up, will be a minor breaking change coming up in `0.3.0` of it. basically instead of `@@default_name = "build"` you'd add `@[ACONA::AsCommand("build")]` to the class
<FromGitter>
<skinnyjames> Oh that's good to know
<FromGitter>
<Blacksmoke16> can upgrade to latest commit if you want to avoid it for now
<FromGitter>
<Blacksmoke16> er not avoid, but prepare early
<FromGitter>
<skinnyjames> I think I'm currently locked in a version, which I'd prefer
<FromGitter>
<skinnyjames> I guess a commit is also a version
<FromGitter>
<Blacksmoke16> pretty much yea, just a named commit
<FromGitter>
<Blacksmoke16> locking to a commit would have same benefit, `branch: master` is when things can get dangerous
<FromGitter>
<skinnyjames> hah yes. I haven't pulled shards down by commit yet.
<FromGitter>
<Blacksmoke16> iirc instead of `version: ~> 0.2.0` it would be like `commit: abc123`
<FromGitter>
<skinnyjames> Speaking of shards, is there a known issue with `shards install` intermittently failing inside docker?
<FromGitter>
<Blacksmoke16> another thought i had in regards to `workers` option, is you could give it a default of something, then wouldnt really need the conditional logic and could just pass it directly to `.build` given it would use whatever user provides, or the default
<FromGitter>
<Blacksmoke16> not that im aware what? whats the error?
<FromGitter>
<skinnyjames> Yeah, the real deal will default to the number of cpus on the machine - 1
<FromGitter>
<Blacksmoke16> 👍
<FromGitter>
<skinnyjames> > not that im aware what? whats the error? ⏎ ⏎ Just a failure to install certain shards. I'm trying to repro, but it has occurred to me that there could be something wrong with my dockerfile.