<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.
<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>
<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>
<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>
<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>
<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>
<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> 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.
<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 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> 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?