ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.30.1 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
alex``` has quit [Ping timeout: 240 seconds]
hypercore has quit [Ping timeout: 260 seconds]
f1reflyylmao has quit [Ping timeout: 245 seconds]
f1refly has joined #crystal-lang
chemist69 has quit [Ping timeout: 246 seconds]
chemist69 has joined #crystal-lang
fyber has joined #crystal-lang
ht_ has joined #crystal-lang
ht_ has quit [Quit: ht_]
chachasmooth has quit [Ping timeout: 265 seconds]
chachasmooth has joined #crystal-lang
gangstacat has joined #crystal-lang
sz0 has joined #crystal-lang
<FromGitter> <j8r> @Daniel-Worrall `latest` version is rolling
<FromGitter> <j8r> this is the latest version of crystal, it is 0.30.1 as now
<FromGitter> <j8r> I think you should use a tagged image and not latest
alex``` has joined #crystal-lang
<FromGitter> <bew> TIL using `perf` with crystal, can show you the most expensive asm instruction while viewing crystal code: https://i.imgur.com/mp2Aqq2.png
<FromGitter> <bew> pretty awesome
<FromGitter> <naqvis> i was asking about shard and/or app specs.
HumanG33k has quit [Remote host closed the connection]
<FromGitter> <naqvis> can this SPEC_SPLIT be used with shard or App?
<FromGitter> <bew> SPEC_SPLIT is only for specs, any kind of specs as long as it uses the stdlib "spec" lib
<FromGitter> <bew> but note that it's not really documented (yet?) so no idea how long it'll last
HumanG33k has joined #crystal-lang
<FromGitter> <didactic-drunk> Is there a way to get a sum of object allocations by callsite?
rohitpaulk has joined #crystal-lang
sz0 has quit [Quit: Connection closed for inactivity]
rohitpaulk has quit [Ping timeout: 265 seconds]
rohitpaulk has joined #crystal-lang
hypercore has joined #crystal-lang
<FromGitter> <stronny> I don't understand the question tbh
rohitpaulk has quit [Ping timeout: 245 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <yxhuvud> @didactic-drunk yes, I think @groogy made a library for that. You should be able to find it on his github.
t1|Mike has quit [Quit: ZNC 1.7.1 - https://znc.in]
t1|Mike has joined #crystal-lang
<FromGitter> <naqvis> Thank you @bew
rohitpaulk has quit [Ping timeout: 252 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <yxhuvud> @bew I really need to look into how to use perf.
rohitpaulk has quit [Ping timeout: 265 seconds]
rohitpaulk has joined #crystal-lang
davic__ has joined #crystal-lang
davic__ is now known as davic
rohitpaulk has quit [Ping timeout: 250 seconds]
hypercore has quit [Remote host closed the connection]
alex``` has quit [Ping timeout: 265 seconds]
alex``` has joined #crystal-lang
alex``` has quit [Ping timeout: 240 seconds]
alex``` has joined #crystal-lang
<FromGitter> <repromancer_gitlab> just found there is built-in support for partial application of Procs. so comfy...
<FromGitter> <Blacksmoke16> oh?
hypercore has joined #crystal-lang
<FromGitter> <tenebrousedge> @Blacksmoke16 https://crystal-lang.org/api/0.23.1/Proc.html#partial%28%2Aargs%3A%2AU%29forallU-instance-method
<FromGitter> <repromancer_gitlab> also love the fact that methods in classes/modules can be passed around by prefixing the `->` anonymous function arrow
<FromGitter> <tenebrousedge> it's not quite as powerful as Ruby's `method` method, but it works
<FromGitter> <Blacksmoke16> neat
<FromGitter> <repromancer_gitlab> oh, looks like Ruby has `Proc#curry` as well, which is nice to know
<FromGitter> <tenebrousedge> yes, and also the function composition operators
<FromGitter> <repromancer_gitlab> do you have a link for the `method` method you mentioned?
<FromGitter> <tenebrousedge> You'll find it under `Object#method`
<FromGitter> <repromancer_gitlab> thanks
<FromGitter> <tenebrousedge> Ruby lets you do: ⏎ ⏎ ```a = "ABCDE" ⏎ %w[q w e r t y].select(&a.downcase.method(:include?)) #=> ["e"]``` [https://gitter.im/crystal-lang/crystal?at=5d88c8d5ab4244767bef60f7]
<FromGitter> <tenebrousedge> in Crystal you'd have to `downcase` the string beforehand
<FromGitter> <tenebrousedge> because in Ruby `method` is a normal method, and `->` is a syntactical construct
<FromGitter> <repromancer_gitlab> I see.
<FromGitter> <repromancer_gitlab> Right now I'm just going through some basic exercises, but the only "functional programming" thing I've found to be lacking yet is a way to enforce exhaustive case statements. I thought that was the whole point of the `Enum` type.
<FromGitter> <naqvis> just published Crystal Snappy (https://github.com/naqvis/snappy) *Pure Crystal* implementation of Snappy compression format.
<FromGitter> <Blacksmoke16> @repromancer_gitlab https://github.com/crystal-lang/crystal/issues/8001
<FromGitter> <c-cube> yesssss
<FromGitter> <repromancer_gitlab> I just found that; I saw the original discussion from 2014 and felt sad, thought it had been shelved.
<FromGitter> <stronny> you can sorta do that with overloads though
<FromGitter> <j8r> @naqvis wow, good job!
<FromGitter> <j8r> you seems to be quite good at data compression formats
<FromGitter> <naqvis> Thank you @j8r
<FromGitter> <j8r> can I use unpack a tar.gz with crystar?
<FromGitter> <j8r> Ôh I see yes, sorry
<FromGitter> <naqvis> yeah you can @j8r
<FromGitter> <naqvis> Crystar works on IO, so you can wrap them
<FromGitter> <j8r> unfortunately there is no XZ decompressor in crystal :(
<FromGitter> <tenebrousedge> @repromancer_gitlab apparently Ruby is getting a shortcut `method` operator (https://dev.to/hanachin/ruby-27-new-feature-method-reference-operator-38l2)
<FromGitter> <naqvis> true, but haven't seen much usage of this compression format
<FromGitter> <repromancer_gitlab> @stronny I thought about that, but (unless there's something I haven't thought of) it would be up to the programmer to make sure an overload is defined for each case, so that a new case would cause a compiler error
<FromGitter> <stronny> so if you define a class and never use it, then the compiler will not complain
<FromGitter> <stronny> however if it encounters a type that is not covered in overload set that's an error
<FromGitter> <j8r> @naqvis it is much more used than snappy
<FromGitter> <stronny> maybe just use libxz? do you really need it reimplemented?
<FromGitter> <naqvis> the reason I went with snappy was for Parquet file format
<FromGitter> <naqvis> who knows in future, I might implement Pure Crystal Reader/Writer for Parquet file format
<FromGitter> <naqvis> Snappy is very common compression format used there
<FromGitter> <repromancer_gitlab> @tenebrousedge 2.7 is getting a lot of things I want in my life. I love the updates that blocks and case statements have gotten (multiple anonymous variables and pattern matching)
<FromGitter> <j8r> that's just on what XZ is very used
<FromGitter> <j8r> For instance Debian
<FromGitter> <j8r> same for RPM in Fedora
<FromGitter> <naqvis> Thanks @j8r . I'll look into this
<FromGitter> <j8r> but zstd may be the future
ua has quit [Ping timeout: 245 seconds]
<FromGitter> <didactic-drunk> https://github.com/didactic-drunk/zstd.cr
ua has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <j8r> Generally LZMA2/XZ is good if strict performance isn't needed
<FromGitter> <j8r> simple advice for those using github tokens
<FromGitter> <j8r> they are not really secure, they grant the rights to do everything possible
<FromGitter> <naqvis> you mean even when those checkbox are unchecked before generating token?
<FromGitter> <j8r> @didactic-drunk starred, gj
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 245 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
ht_ has joined #crystal-lang
duane has joined #crystal-lang
<FromGitter> <bararchy> So, @bcardiff this means we should be seeing 0.31
<FromGitter> <bararchy> In releases soon?
<FromGitter> <bcardiff> Yes @bararchy. I'm in the release dance mode today finally.
<FromGitter> <wontruefree> If anyone is interested in watching our Crystal Meetup RSVP to our event https://www.meetup.com/Crystal-Lang-Chicago/events/lxmhvqyznbfb/
<FromGitter> <wontruefree> We are trying to gauge interest
<FromGitter> <wontruefree> it helps us plan
<FromGitter> <kinxer> @wontruefree I didn't see if you replied last time I asked, but are you planning on recording the presentation and making it available after the meetup?
rohitpaulk has joined #crystal-lang
hypercore has quit [Ping timeout: 260 seconds]
<FromGitter> <kinxer> If not, I may still try to catch the stream, but that affects whether I RSVP.
rohitpaulk has quit [Ping timeout: 246 seconds]
rohitpaulk has joined #crystal-lang
DTZUZU has quit [Quit: WeeChat 2.2]
DTZUZU has joined #crystal-lang
rohitpaulk has quit [Quit: Ping timeout (120 seconds)]
<FromGitter> <bararchy> That's cool @bcardiff !
<FromGitter> <bararchy> BTW, would the distro package maintainers would need to make sure a local patched libgc is present? Or is one already shipped with the new release ?
<FromGitter> <asterite> I don't have a patched gc and it works fine. I think the changes are already present in libgc 8.0.4 ?
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
<FromGitter> <bcardiff> The official packages for linux and darwin have a patched gc that is statically linked to generated programs. ⏎ There is no official gc released with the MT patch. That should happen in November IIRC.
<FromGitter> <bcardiff> During 0.32 the patch for MT in crystal will probably be updated to match the end result in gc and be ready for the official release with that feature.
<FromGitter> <asterite> where is the patched code and how is it used in the compiler right now/
<FromGitter> <asterite> ?
gangstacat has quit [Ping timeout: 276 seconds]
<FromGitter> <wontruefree> @kinxer I am planning on recording and posting to youtube.
<FromGitter> <kinxer> @wontruefree Excellent. Then I likely won't watch it live.
hypercore has joined #crystal-lang
<FromGitter> <wontruefree> Ok that is fine
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Read error: Connection reset by peer]
rohitpaulk has joined #crystal-lang
gangstacat has joined #crystal-lang
gangstacat has quit [Ping timeout: 252 seconds]
rohitpaulk has quit [Ping timeout: 276 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <faustinoaq> Hi @/all I haven't used crystal for a while. I need to update my projects and learn latest features. Thank you for keeping crystal great! 👍
<FromGitter> <Blacksmoke16> o/
<FromGitter> <bcardiff> 👋 @faustinoaq I hope everything is good on your end :-) . Sorry for the nudge on the vscode plugin 🙈
rohitpaulk has quit [Ping timeout: 264 seconds]
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
<FromGitter> <GavinRay97> would be interested in meeting other devs interested in Crystal in the area
<FromGitter> <wontruefree> 👋 @faustinoaq
<FromGitter> <wontruefree> @GavinRay97 shameless plug we are having a meetup that is intended to be remote friendly https://www.meetup.com/Crystal-Lang-Chicago/events/lxmhvqyznbfb/
<FromGitter> <Daniel-Worrall> I hope you don't end up with nuts that believe in Crystal Healing attending
<FromGitter> <Daniel-Worrall> That's all I find in Meetup for Crystal
<FromGitter> <wontruefree> well I hope not
gangstacat has joined #crystal-lang
Human_G33k has joined #crystal-lang
Human_G33k has quit [Remote host closed the connection]
Human_G33k has joined #crystal-lang
<FromGitter> <repromancer_gitlab> lol, I think I've experienced my first breaking change. my CI pipeline failed running Minitest.cr: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d891fc0c7ec2e2208dc790a]
HumanG33k has quit [Ping timeout: 240 seconds]
<FromGitter> <repromancer_gitlab> I'm aware I shouldn't be pulling the latest Docker image every time, just thought it was funny
<FromGitter> <tenebrousedge> maybe should be `::Channel::Buffered`
<FromGitter> <Blacksmoke16> either that or that class got removed/changed because of the MT changes
<FromGitter> <repromancer_gitlab> would it be considered polite, or just annoying, to report this to the Minitest repo?
<FromGitter> <tenebrousedge> well
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
<FromGitter> <Blacksmoke16> that was 4 years ago
<FromGitter> <TheM3tabaron> how do I install Crystal on RPi4?
<FromGitter> <Daniel-Worrall> Cross-compile targetting pi4
<FromGitter> <tenebrousedge> so MT was merged, neat
<FromGitter> <bew> the error you got is already fixed in master version of minitest
<FromGitter> <Blacksmoke16> its behind a compiler flag for now
<FromGitter> <bew> (see line 114)
<FromGitter> <Daniel-Worrall> I've managed it. It was difficult and silly. Then I reformated my pi
<FromGitter> <repromancer_gitlab> @bew I wonder if my CI pipeline is caching shards?
<FromGitter> <Blacksmoke16> is it using the docker crystal image?
<FromGitter> <repromancer_gitlab> yes
<FromGitter> <Blacksmoke16> most likely minitest just has to do a new release with the changes
<FromGitter> <repromancer_gitlab> I left it as "latest"
gangstacat has quit [Ping timeout: 246 seconds]
<FromGitter> <Blacksmoke16> which would be `0.31.0` which was released like a few hours ago
<FromGitter> <repromancer_gitlab> right
<FromGitter> <Blacksmoke16> so minitest just needs to release a new version with the compatibility updates, and you would then have to update the version to use in your shard.yml
<FromGitter> <TheM3tabaron> @Daniel-Worrall okay. So rpi foundation did'nt bother. goal is here to display a few options for the rpi4. Will It be easy to cross compile Crystal for arm?
gangstacat has joined #crystal-lang
<FromGitter> <Daniel-Worrall> It's not a first class platform so there aren't any binaries on releases. For cross-compiling, ensure you have the same llvm versions and then make sure you have all the crystal requirements on the pi
<FromGitter> <Daniel-Worrall> I got it to cross-compile, and then I wanted to have automated docker builds, but I couldn't figure that one out :/
<FromGitter> <TheM3tabaron> so.. can I just run Crystal in docker?
<FromGitter> <Blacksmoke16> yes
<FromGitter> <Daniel-Worrall> On the pi, no, because there isn't a manifest for arm4
<FromGitter> <Daniel-Worrall> You'd have to build it yourself
<FromGitter> <Blacksmoke16> ^
gangstacat has quit [Ping timeout: 246 seconds]
ht_ has quit [Quit: ht_]
<FromGitter> <Blacksmoke16> would be ideal if there was dockerfiles for it
<FromGitter> <Daniel-Worrall> It would, which is what I tried to do
<FromGitter> <TheM3tabaron> okay. sorry for the stupid questions. Why cant I just run Crystal in a debian container?
<FromGitter> <Daniel-Worrall> You can, but it'll be running on the arm4 architecture on the pi
<FromGitter> <Daniel-Worrall> which we don't have binaries for yet
<FromGitter> <Daniel-Worrall> It's the same reason Crystal doesn't run on a washing machine
<FromGitter> <bew> 😂
<FromGitter> <TheM3tabaron> the pi is arm7. why arm4?
<FromGitter> <Daniel-Worrall> oh is it
<FromGitter> <Daniel-Worrall> arm7 then
<FromGitter> <TheM3tabaron> washing machines would mostly be running embedded C
<FromGitter> <TheM3tabaron> So the binary only has to be build ones, and then shared?
<FromGitter> <Daniel-Worrall> Theoretically, yes
<FromGitter> <Daniel-Worrall> `--target=arm-unknown-linux-gnueabihf`
<FromGitter> <Daniel-Worrall> found the target for the pi4
<FromGitter> <Daniel-Worrall> What you could do is cross-compile the applications, then run them on the pi without crystal
<FromGitter> <Daniel-Worrall> That's easy enough
<FromGitter> <Daniel-Worrall> Someone here has a dockerfile for it I believe
gangstacat has joined #crystal-lang
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
<FromGitter> <TheM3tabaron> found a russian article on that. but my setup is an rpi4 with 4 gigs of ram, and ssd extension board. The goal is to test a few languages besides Elixir. Crystal seems problematic, but I find It would be a shame to leave It out of the loop.
<FromGitter> <TheM3tabaron> hmm.. so I could run Crystal inside a container, and compile the projects down to Arm?
<FromGitter> <TheM3tabaron> If I can just run Crystal in a container on the Pi, It will be sufficient. Guess Crystal will support Arm later on, since Arm is on the rise.
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
<FromGitter> <Daniel-Worrall> You can run Crystal however you want to cross-compile apps. You still need the same llvms, and the runtime libs
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
gangstacat has quit [Ping timeout: 276 seconds]
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
<FromGitter> <TheM3tabaron> okay. I see what you mean. It sounds doable. Crystal should be left out, since there is no support. but I will ad It as a container then. Since Crystal is not production ready, It would be unfair to write It off.
bcardiff has joined #crystal-lang
ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.31.0 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
<FromGitter> <Blacksmoke16> @bcardiff `it can be explicitly placed within new docs using an :inherited: placeholder.` the placeholder should just be `:inherit:` (from the blog post)
bcardiff has quit [Client Quit]
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
<FromGitter> <bcardiff> @Blacksmoke16 I intent to describe the behavior from https://github.com/crystal-lang/crystal/pull/6989#issuecomment-522152861
<FromGitter> <TheM3tabaron> @Daniel-Worrall Thanks for your advice. Seems the best route to take Is Docker, and then wait for Arm support.
<FromGitter> <Blacksmoke16> but the placeholder value is `# :inherit:`
<FromGitter> <Blacksmoke16> vs `# : inherited:`
<FromGitter> <bcardiff> Ohhhh. I see.
<FromGitter> <Blacksmoke16> 👍
<FromGitter> <bcardiff> Fixed. Thanks!
<FromGitter> <Blacksmoke16> np
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
FromGitter has quit [Remote host closed the connection]
gangstacat has joined #crystal-lang
FromGitter has joined #crystal-lang
<dom96> oprypin_, FromGitter is dying a lot
<FromGitter> dom96, I'm a bot, *bleep, bloop*. I relay messages between here and https://gitter.im/crystal-lang/crystal
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
<FromGitter> <asterite> dom96: congrats on the 1.0 release of Nim!
<dom96> thanks asterite :)
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
<oprypin_> dom96, thx for info. well, at least it's restarting :| - Gitter is giving "HTTP error 504"
<chachasmooth> is `--no-debug` implied when building with `--static`?
<oprypin_> no
<oprypin_> not entirely sure actually, but doesn't matter much
<chachasmooth> sorry, is `--no-debug` implied when building with `--release`?
<chachasmooth> (--release instead of --static)
<oprypin_> haha that's what i actually replied to, and sure in this case
<chachasmooth> so it is implied?
<oprypin_> it is not implied
<chachasmooth> thanks oprypin_ :)
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
FromGitter has quit [Remote host closed the connection]
FromGitter has joined #crystal-lang
<oprypin_> dom96, ok, attempting mitigation
duane has quit [Ping timeout: 240 seconds]
alex``` has quit [Quit: WeeChat 2.6]
alex`` has joined #crystal-lang
go|dfish has quit [Ping timeout: 244 seconds]
oprypin_ is now known as oprypin
<FromGitter> <kingsleyh> hi - I just upgraded my db shard and got this: `SQLite3::Statement does not support Array(Int64) params`
<FromGitter> <kingsleyh> It seems it's due to a recent change in the crystal db support? but I can't figure out from reading the changelog if it's something I need to fix or if it's a problem in the Sqlite driver which is not out of date after the crystal db change
<FromGitter> <kingsleyh> anyone know anything about this?
duane has joined #crystal-lang
<oprypin> kingsleyh, is this compile time or runtime error
<FromGitter> <kingsleyh> runtime
<FromGitter> <j8r> @TheM3tabaron you can use docker-qemu
<oprypin> kingsleyh, any relevant code u could share?
<FromGitter> <Blacksmoke16> whats the query that causes it
<FromGitter> <Blacksmoke16> might just have to do like `db.query("query", args: [1,2])`
<FromGitter> <kingsleyh> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d893f095d24375b3e0ac8ca]
<FromGitter> <Blacksmoke16> no the code that causes that exception
<FromGitter> <stronny> and the table scheme probably
<FromGitter> <kingsleyh> `@db.exec "insert into blocks values (?, ?)", [index.to_i64, json]`
<FromGitter> <Blacksmoke16> try `@db.exec "insert into blocks values (?, ?)", args: [index.to_i64, json]`
<FromGitter> <stronny> yeah, that makes sense
<FromGitter> <Blacksmoke16> because of that
<FromGitter> <kingsleyh> now it says: SQLite3::Statement does not support Array(Int64) params
<FromGitter> <Blacksmoke16> you'll have to update them all
<FromGitter> <Blacksmoke16> imagine you have more than one use of `#exec`
<oprypin> but in can be used like this, right? `@db.exec "insert into blocks values (?, ?)", index.to_i64, json`
<FromGitter> <kingsleyh> even on this? `@db.exec "create table if not exists blocks (idx integer primary key, json text)"`
<oprypin> kingsleyh, no args there, so no
<FromGitter> <kingsleyh> oh yeah!
<FromGitter> <kingsleyh> hmm I updated all the execs to opypins example but not working - I'll try with the args:
<FromGitter> <kingsleyh> does it affect query too? or just exec?
<FromGitter> <kingsleyh> oh yeah query is also affected
<FromGitter> <kingsleyh> oh yay fixed
<FromGitter> <kingsleyh> it was just the query ones I missed
<oprypin> :> great find by Blacksmoke16
<FromGitter> <kingsleyh> thanks @Blacksmoke16 :)
<FromGitter> <Blacksmoke16> np
<FromGitter> <TheM3tabaron> @j8r that could come in handy :) Found an article on cross compiling crystal to Raspberry Pi, but It does require a pot of coffee.
<FromGitter> <TheM3tabaron> @j8r thanks for the gist :) bit of reading to do on that one. You ran this on what?
duane has quit [Ping timeout: 240 seconds]
alex`` has quit [Quit: WeeChat 2.6]
duane has joined #crystal-lang