ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
xybre has joined #crystal-lang
Nekka has quit [Ping timeout: 240 seconds]
Nekka has joined #crystal-lang
justinmcp has quit [Quit: No Ping reply in 180 seconds.]
justinmcp has joined #crystal-lang
hendursa1 has quit [Quit: hendursa1]
hendursaga has joined #crystal-lang
f1reflyylmao has joined #crystal-lang
postmodern has quit [Quit: Leaving]
f1refly has quit [Ping timeout: 276 seconds]
f1reflyylmao is now known as f1refly
early has quit [Quit: Leaving]
chachasmooth has quit [Ping timeout: 252 seconds]
early has joined #crystal-lang
chachasmooth has joined #crystal-lang
chachasmooth has quit [Ping timeout: 245 seconds]
chachasmooth has joined #crystal-lang
andremedeiros has quit [Read error: Connection reset by peer]
andremedeiros has joined #crystal-lang
Andriamanitra has joined #crystal-lang
<FromGitter> <glyh> Hello everyone! How do we think our language compare to nim lang?
<FromGitter> <naqvis> @glyh There is no standard way of comparing programming languages. Each has its use-case , strengths, weakness
<FromGitter> <naqvis> so instead of asking such questions, you should be providing your use-case and then see which language suits that best
_ht has joined #crystal-lang
ua has quit [Ping timeout: 248 seconds]
ua has joined #crystal-lang
hendursa1 has joined #crystal-lang
hendursaga has quit [Ping timeout: 240 seconds]
<FromGitter> <erdnaxeli:cervoi.se> Hi, is there a way to do that: https://carc.in/#/r/amps ?
HumanG33k has quit [Remote host closed the connection]
<FromGitter> <naqvis> @erdnaxeli:cervoi.se https://carc.in/#/r/ampz
<FromGitter> <naqvis> its because of the scope
<FromGitter> <naqvis> so you can use above approach
<FromGitter> <erdnaxeli:cervoi.se> nice, thanks
<FromGitter> <naqvis> 👍
HumanG33k has joined #crystal-lang
Flipez has joined #crystal-lang
Xeago has joined #crystal-lang
avane has quit [Ping timeout: 248 seconds]
avane has joined #crystal-lang
repo1 is now known as repo
alexherbo2 has joined #crystal-lang
<mps> straight-shoota: crystal 1.0.0 is on alpine mirrors from last night. do we need static version for building next release?
<straight-shoota> not necessarily
<mps> how we can build next release (for example 1.1.0)
<straight-shoota> I fear I don't understand the question
<mps> with 0.35.1?
<straight-shoota> 1.1.0 should be built with 1.0
<mps> we need crystal to build crystal
<straight-shoota> Ah you mean because 0.36.1 was skipped?
<mps> ah, let me explain
<mps> on alpine build system we cannot use 'crystal' in makedepends
<mps> so we always create static version of current build and use it for next release build
<straight-shoota> what does static mean in this context?
<mps> crystal compiler built statically
<straight-shoota> okay
<straight-shoota> so the normal package built is not statically linked?
<mps> right
<mps> these are all statically built versions used for building next releases
<straight-shoota> I see
<straight-shoota> so this is what the snapshot recipe in APKBUILD does
<mps> right
<straight-shoota> the latest is 0.35.0 because aports was not updated to 0.35.1, 0.36.0 and 0.36.1
<mps> previous autumn I prepared and tested changes to use previously built 'normal' version for next release build, but didn't made it ready to push in aports, yet
<mps> last autumn*
<mps> yes, also this your observation is right
<straight-shoota> but 1.0.0 compiles with 0.35.1 and we should get 1.0.0 in the static builds, too?
<mps> ok, will do that this evening
<straight-shoota> the static snapshots might not be necessary any more
<straight-shoota> the comment in APKBUILD says it's because of https://github.com/crystal-lang/crystal/issues/5689
<straight-shoota> so maybe you could just grab the offical built from the github release?
<mps> no, it is needed because abuild makedepends problem
<straight-shoota> it can pull in the source from github, but not the boot compiler?
<mps> these built on github aren't built with musl
<straight-shoota> they are
<mps> really, which one
<straight-shoota> all the linux packages are statically linked on musl
<mps> ah, yes, just checked on debian
<mps> didn't know this
<straight-shoota> This dockerfile is used for the linux build: https://github.com/crystal-lang/distribution-scripts/blob/master/linux/Dockerfile
<mps> but anyway, there is no aarch64 version
<straight-shoota> true
<mps> ok, it is not big job to make static ones and upload to dev.alpinelinux.org
<straight-shoota> kk
<FromGitter> <grkek> 1) 0.0 Released https://github.com/grip-framework/grip
<FromGitter> <erdnaxeli:cervoi.se> nice! is there a changelog, blog post or something?
<FromGitter> <grkek> no
<FromGitter> <grkek> go ahead and figure it out yourself :D
<FromGitter> <erdnaxeli:cervoi.se> ok ^^'
<FromGitter> <grkek> ill update the docs now
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
woodruffw has quit [Ping timeout: 248 seconds]
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
hightower2 has quit [Ping timeout: 240 seconds]
HumanG33k has quit [Quit: Leaving]
alexherbo2 has quit [Quit: Ping timeout (120 seconds)]
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Client Quit]
<FromGitter> <Blacksmoke16> whats the code?
<FromGitter> <MrSorcus> @Blacksmoke16 : ⏎ ⏎ ```require "json" ⏎ json = JSON.parse(%({"baz":"555"})).as_h ⏎ exit ⏎ require "pg"``` ⏎ ⏎ 😆 [https://gitter.im/crystal-lang/crystal?at=605e2c0288edaa1eb8e1fa3c]
<FromGitter> <Blacksmoke16> are you sure?
<FromGitter> <Blacksmoke16> because that runs fine
<FromGitter> <MrSorcus> @Blacksmoke16 hmm...
<FromGitter> <Blacksmoke16> what if you replace `require "pg"` with like `require "big"` or something
<FromGitter> <MrSorcus> @Blacksmoke16 maybe `.cache` cause that exception...
<FromGitter> <Blacksmoke16> :shrug:
<FromGitter> <MrSorcus> @Blacksmoke16 with `big` it's fine.
<FromGitter> <Blacksmoke16> oh interesting, so its only with pg it happens?
<FromGitter> <Blacksmoke16> let me actually try with it
<FromGitter> <MrSorcus> @Blacksmoke16 my pg version is `0.22.1`.
<FromGitter> <MrSorcus> @Blacksmoke16
<FromGitter> <Blacksmoke16> interesting
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/an4m
<FromGitter> <MrSorcus> @Blacksmoke16 😆
<FromGitter> <Blacksmoke16> id prob report it. Seems to be something about typing a constant after an `exit` which is like `NoReturn`
<FromGitter> <Blacksmoke16> er wait
<FromGitter> <MrSorcus> @Blacksmoke16 https://gist.github.com/MrSorcus/b7e462d95d0a6a17673834a0949e3c06 - on debian i get more verbose output.
<FromGitter> <Blacksmoke16> oh well there you go :P
<FromGitter> <asterite> I don't like that Crystal has bugs, but I'm glad they are almost always the same :-)
<FromGitter> <MrSorcus> > https://github.com/crystal-lang/crystal/issues/5636 ⏎ ⏎ Oh, it's already known bug...
<FromGitter> <Blacksmoke16> guess so
<FromGitter> <MrSorcus> Enough coding for today 😆 Good night everyone 😉
woodruffw has joined #crystal-lang
<FromGitter> <alex-kampa> Hi everyone, now that require "openssl" does not work anymore, what's the easiest way to use openssl with crystal?
<FromGitter> <Blacksmoke16> does not work how?
<FromGitter> <Blacksmoke16> but whats the problem?
<FromGitter> <Blacksmoke16> like are you wanting to get a sha256 hash of something or?
<FromGitter> <alex-kampa> yes sha256 hash
<FromGitter> <Blacksmoke16> prob something like
<FromGitter> <Blacksmoke16> ```require "digest/sha256" ⏎ ⏎ Digest::SHA256.digest "foo"``` [https://gitter.im/crystal-lang/crystal?at=605e3b17a7dfe1372efd3ad5]
<FromGitter> <alex-kampa> Thanks George, will try this out. Should have looked at the docs more carefully!
<_ht> The page https://crystal-lang.org/reference/ has a link "Language Reference", which points to https://crystal-lang.org/reference/syntax-and-semantics/, but that link does not work. It should be https://crystal-lang.org/reference/syntax_and_semantics instead
<_ht> Thus replace "-" by "_"
<_ht> I do not know where to report this, though
<FromGitter> <Blacksmoke16> @straight-shoota @bcardiff
<FromGitter> <Blacksmoke16> oh wait, i think this is just a https://github.com/crystal-lang/crystal-book thing
<FromGitter> <Blacksmoke16> thought it was on the website for a sec
<_ht> I can see if I can create an issue or pull request for this
<_ht> Done!
_ht has quit [Remote host closed the connection]
ProjectEpsilon has joined #crystal-lang
<FromGitter> <erdnaxeli:cervoi.se> I… am having weird behavior with macros: https://carc.in/#/r/an7f
<FromGitter> <erdnaxeli:cervoi.se> I am not sure what I can do or not so I try things, but the result let me septical
<FromGitter> <Blacksmoke16> `nil` get stringified as `""`
<FromGitter> <erdnaxeli:cervoi.se> ok, so my reject does not work
<FromGitter> <erdnaxeli:cervoi.se> ah, nil is NilLiteral and NilLiteral.nil? is false
<straight-shoota> yeah, use `x == nil`. Or just `select { |x| x }`
<FromGitter> <erdnaxeli:cervoi.se> what's really weird is that the code inside `{% %}` is macro-ified?
<straight-shoota> or just `.compact`
<FromGitter> <erdnaxeli:cervoi.se> `x == NilLiteral` does not work because it does not know `NilLiteral`
<straight-shoota> yeah, it's basically an entire second language interpreted by the compiler
<FromGitter> <erdnaxeli:cervoi.se> compact does not exist, there is only compact_map
<straight-shoota> but with similar features
<straight-shoota> oh, okay
<FromGitter> <erdnaxeli:cervoi.se> so with `x == nil` I got the same result
<FromGitter> <erdnaxeli:cervoi.se> and with `x` only I got `[, , ]` :D
<jhass> select {|x| x } xD
<straight-shoota> select + x
<FromGitter> <erdnaxeli:cervoi.se> that works! ^^
<FromGitter> <erdnaxeli:cervoi.se> btw `Array(String).new` does not work in a macro because `undefined macro method 'TypeNode#new`, but `[] of String` does
<FromGitter> <erdnaxeli:cervoi.se> this macro langage need a dedicated doc
<jhass> I could argue that it's hard to use is not a bad thing :D
<FromGitter> <erdnaxeli:cervoi.se> btw the type of the array does not enforce anything: https://carc.in/#/r/an8a
<FromGitter> <erdnaxeli:cervoi.se> but you need it, `[]` alone is still invalid :')
<FromGitter> <Blacksmoke16> `[] of Nil` is what i usually do :P
<straight-shoota> [] of _
<FromGitter> <erdnaxeli:cervoi.se> if crystal is 1.0, I am not sure crystal-macro (or whatever we should call this langage) is 1.0 yet :D
<FromGitter> <erdnaxeli:cervoi.se> @straight-shoota: omg it works
<FromGitter> <erdnaxeli:cervoi.se> what is the order of `@type.instance_vars`?
<FromGitter> <Blacksmoke16> prob as they were defiend
<FromGitter> <erdnaxeli:cervoi.se> hmm
<jhass> "implementation detail, don't depend on" <- Gonna keep that answer around for your next 10 questions :P
<FromGitter> <erdnaxeli:cervoi.se> the question behind is: can I retrieve the order in which the ivar have been defined?
<straight-shoota> why is it important? =)
<FromGitter> <erdnaxeli:cervoi.se> https://carc.in/#/r/an92 so the order depends on the ivar having a type annotation or not
<FromGitter> <erdnaxeli:cervoi.se> for my specific usecase I want to parse things in order, the ivar definition order was an idea
<jhass> I'd probably go back to a JSON.mapping style of API if that were an requirement
<straight-shoota> expressions are evaluated in order
<FromGitter> <Blacksmoke16> parse what kind of things? Like JSON or?
<straight-shoota> so you could use calling macros
<FromGitter> <Blacksmoke16> you can use annotations to order things arbitrarily, like `@[Order(idx: 0)]` etc
<FromGitter> <Blacksmoke16> 1, 2, 3, ...
<FromGitter> <erdnaxeli:cervoi.se> yeah I will probably end with that
alexherbo2 has joined #crystal-lang
andremedeiros has quit [Read error: Connection reset by peer]
andremedeiros has joined #crystal-lang
Xeago has quit [Ping timeout: 265 seconds]
Xeago has joined #crystal-lang