ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.23.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
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Client Quit]
<crystal-gh> [crystal] bcardiff pushed 1 new commit to master: https://git.io/vbYHH
<crystal-gh> crystal/master b747f5f Paul Smith: Don't print query params if they are empty (#5340)
astronavt has joined #crystal-lang
baweaver is now known as baweaver_away
<literal> does Crystal have a convenient way to construct a tuple/named tuple that is based on another one? E.g. if I have {id: Int32, count: Int32} and I want a copy of it but with the count incremented
<FromGitter> <bew> just assign it to another variable and increment the count on the copy?
<literal> that's the boilerplace I wanted to avoid
<literal> boilerplate
<literal> something like old_tuple.with(count: 6) would have been nice
<FromGitter> <bew> no doesn't exist, and probably never will
<travis-ci> crystal-lang/crystal#b747f5f (master - Don't print query params if they are empty (#5340)): The build was broken. https://travis-ci.org/crystal-lang/crystal/builds/310676346
<DeBot_> https://github.com/crystal-lang/crystal/pull/5340 (Don't print query params if they are empty)
<FromGitter> <bew> can you confirm that using `Bytes[0, 1]` in a class doesn't work on master?
<FromGitter> <bew> sth like: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5a234e2c232e79134dff8260]
<FromGitter> <bew> I always get `undefined constant T` when it's trying to expand macro [] on Bytes
<FromGitter> <bew> wasn't even working in 0.23.1 https://carc.in/#/r/36q7
faustinoaq has joined #crystal-lang
<Papierkorb> literal: There's NamedTuple#merge in >= 0.24 - But do make sure that NamedTuple is actually a good choice for a structure of your data.
<Papierkorb> For most people who ask about tuples it's *not*.
<FromGitter> <bew> oh right, forgot that merge can update fields too 👍
<Papierkorb> No it can't update, a new tuple will be created
<FromGitter> <bew> yes sure, bad word choice
<Papierkorb> Just that this should not under any circumstances be used as lazy/el-cheapo solution to "I don't feel like copying @ivars myself"
<FromGitter> <codenoid> morning all
<RX14> Hmm what time zone are you in?
<FromGitter> <codenoid> Indonesia
<FromGitter> <codenoid> GMT +7
<RX14> Cool
<RX14> I always underestimate how global the crystal community is
<faustinoaq> Hi 🙂 GTM -5 here
<RX14> I'm still a little confused as to why ysbaddaden has time to review my windows pr but not the pr it depends on which is much smaller lol
astronavt has quit [Remote host closed the connection]
astronavt has joined #crystal-lang
<FromGitter> <bew> yay I got my little X Crystal Binding lib (in pure crystal) to connect and authenticate successfully with my running X server \o/
baweaver_away is now known as baweaver
snsei has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 248 seconds]
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Client Quit]
faustinoaq has joined #crystal-lang
snsei has quit [Remote host closed the connection]
astronavt has quit [Remote host closed the connection]
faustinoaq has quit [Read error: Connection reset by peer]
baweaver is now known as baweaver_away
baweaver_away is now known as baweaver
faustinoaq has joined #crystal-lang
<FromGitter> <bararchy> Using the new windows PR, what should I pass over to the compiler so it knows to target windows ?
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Client Quit]
faustinoaq has joined #crystal-lang
notdaniel has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
notdaniel is now known as notnotdaniel
faustinoaq has quit [Read error: Connection reset by peer]
faustinoaq has joined #crystal-lang
notnotdaniel has quit [Quit: Leaving]
blop has joined #crystal-lang
faustinoaq has quit [Quit: IRC client terminated!]
ashirase has joined #crystal-lang
faustinoaq has joined #crystal-lang
blop has quit [Client Quit]
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Client Quit]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Client Quit]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Read error: Connection reset by peer]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Client Quit]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Read error: Connection reset by peer]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Client Quit]
faustinoaq has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
<dragonkh> hi
saadq has quit [Ping timeout: 248 seconds]
saadq has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 248 seconds]
<FromGitter> <MrSorcus> Hi. How right to convert string `true` to boolean `true`? Thanks.
<FromGitter> <bararchy> @MrSorcus right in what sense ?
<FromGitter> <MrSorcus> > @MrSorcus right in what sense ? ⏎ ⏎ If i have `typeof("true") # => String` how to convert it to Boolean type? With regex? Or something else?
<oprypin> ever heard of an `if` statement?
<FromGitter> <MrSorcus> ```code paste, see link``` ⏎ ⏎ This? It's a good solution? [https://gitter.im/crystal-lang/crystal?at=5a23be49232e79134d010417]
<oprypin> not really
<oprypin> could do something like `{"true" => true, "false" => false}[s.downcase]`
<FromGitter> <bararchy> or just ⏎ ⏎ ``` bool.downcase == "true"``` [https://gitter.im/crystal-lang/crystal?at=5a23c4ba540c78242d7a1d18]
<FromGitter> <imonmyown> Hey all, trying to run CrSFML example on macOS, getting linker error (LD_LIBRARY_PATH not set due to SIP (https://github.com/oracle/node-oracledb/issues/231)) any ideas how to fix that?
<oprypin> no ideas
<FromGitter> <imonmyown> Just in case here's the error https://gist.github.com/imonmyown/a35e1b7c2495e6079e8e665dc771a668
<oprypin> ok what you said before has nothing to do with this
<FromGitter> <imonmyown> so, where did I fuck up?
<oprypin> imonmyown, did you try to run crsfml earlier? like a few months back?
<oprypin> did you ever globally install voidcsfml?
<FromGitter> <imonmyown> @oprypin I did and things seemed to work as expected
<oprypin> well now that's biting you
<oprypin> globally installed voidcsfml is old, probably
<FromGitter> <imonmyown> any way to fix that?
<oprypin> remove it
ashirase has quit [Ping timeout: 248 seconds]
<FromGitter> <imonmyown> I see libvoidcsfml files in /usr/local/lib, is that what you mean?
<oprypin> yeah
claudiuinberlin has joined #crystal-lang
<FromGitter> <imonmyown> Seems like I have two versions installed %(
ashirase has joined #crystal-lang
<FromGitter> <imonmyown> same goes to libsfml, I guess?
<FromGitter> <imonmyown> Whew, it works now! Thank you very much @oprypin!
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<dragonkh> hey - in Kemal if I do : context.response.status_code = 404 I get a 404 webpage instead of my json payload - I get my payload if I use 400 - but how can I stop the default 404 page in Kemal so I can return my json payload instead?
<dragonkh> ah I see it's a general issue: https://github.com/kemalcr/kemal/issues/249
csk157 has joined #crystal-lang
Ven`` has joined #crystal-lang
<FromGitter> <Branksy> Hi all. New to crystal. How difficult would it be to port a rails gem like public activity to a crystal shard?
<FromGitter> <Branksy> Are there any instructions on how to create shards..?
csk157_2 has quit [Ping timeout: 255 seconds]
<FromGitter> <bararchy> @Branksy Shards are basicly just a github repo with crystal code that has a specific structure (crystal init lib myshard - this command will create the needed structure) ⏎ ⏎ After that just see the REAMDE.md file and fix github link, appart from that just write your code with an "api" mindset, so that it can be "required" by other projects
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
csk157 has quit [Ping timeout: 255 seconds]
<FromGitter> <Branksy> thx
<FromGitter> <Rinkana> Wasn't there a `property` macro for class properties? I can't seem to find it.
<Papierkorb> class_property.
<FromGitter> <Rinkana> :/
<FromGitter> <bararchy> lol :)
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Client Quit]
faustinoaq has joined #crystal-lang
<FromGitter> <Branksy> @faustinoaq crystal vs-code extension is incompatible with v. 1.11.2
<FromGitter> <Branksy> Is it compatible with 1.18 latest?
faustinoaq has quit [Ping timeout: 268 seconds]
<FromGitter> <bararchy> Maybe someone will find this useful https://github.com/NeuraLegion/hardware
<FromGitter> <bararchy> it lets you get the % of used CPU and Mem on the current running OS
<FromGitter> <bararchy> it's working great on Arch Linux, less so on Ubuntu
<crystal-gh> [crystal] RX14 pushed 1 new commit to master: https://git.io/vbOYQ
<crystal-gh> crystal/master 32319e3 Benoit de Chezelles: Refactor missing unsafe_as (#5341)
<FromGitter> <bew> @bararchy I suggest you to give a number as output, not a string, because it is the user who knows what to do with the data, maybe he wants to do graphs!
faustinoaq has joined #crystal-lang
<FromGitter> <bararchy> @bew good idea, I'll output Float32
csk157 has joined #crystal-lang
<FromGitter> <bararchy> Oh, nvm, lol it's already Float32 XD my README is wrong
<FromGitter> <bew> good job x)
csk157 has quit [Ping timeout: 248 seconds]
<FromGitter> <bararchy> Oh, cool
<FromGitter> <bararchy> maybe I better bind around it
<FromGitter> <bew> 'would be great!
<travis-ci> crystal-lang/crystal#32319e3 (master - Refactor missing unsafe_as (#5341)): The build was fixed. https://travis-ci.org/crystal-lang/crystal/builds/310847697
<DeBot_> https://github.com/crystal-lang/crystal/pull/5341 (Refactor missing unsafe_as)
csk157 has joined #crystal-lang
csk157 has quit [Ping timeout: 255 seconds]
alex`` has joined #crystal-lang
faustinoaq has quit [Quit: IRC client terminated!]
faustinoaq has joined #crystal-lang
alex`` has quit [Quit: WeeChat 1.9.1]
ShalokShalom has quit [Ping timeout: 248 seconds]
faustinoaq has quit [Read error: Connection reset by peer]
csk157 has joined #crystal-lang
csk157 has quit [Ping timeout: 248 seconds]
csk157 has joined #crystal-lang
csk157 has quit [Ping timeout: 248 seconds]
csk157 has joined #crystal-lang
csk157 has quit [Ping timeout: 248 seconds]
rohitpaulk has quit [Ping timeout: 260 seconds]
alex`` has joined #crystal-lang
csk157 has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Remote host closed the connection]
csk157 has quit [Ping timeout: 248 seconds]
DTZUZO has joined #crystal-lang
ShalokShalom has joined #crystal-lang
qard has joined #crystal-lang
csk157 has joined #crystal-lang
csk157 has quit [Ping timeout: 255 seconds]
vivus has joined #crystal-lang
phase_ has joined #crystal-lang
phase_ has quit [Client Quit]
phase[m] has joined #crystal-lang
alex`` has quit [Ping timeout: 260 seconds]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
<FromGitter> <unreadable> how's crystal development going? Congratz RX14 for the windows PR 👏
<RX14> not a problem
<RX14> it wasn't that hard really
<RX14> only took me 2 evenings
<RX14> got my IRC client to reformat FromGitter messages like real IRC messages though, which is great
<Vexatos> RX14, good job
<Vexatos> I wonder how you did that
<RX14> yeah Vexatos sent me the script
snsei has joined #crystal-lang
<FromGitter> <unreadable> I'll need to look deeper in that PR, sound interesting for only 2 evenings
csk157 has joined #crystal-lang
csk157 has quit [Ping timeout: 248 seconds]
p0p0pr37 has quit [Ping timeout: 260 seconds]
illyohs has joined #crystal-lang
p0p0pr37 has joined #crystal-lang
p0p0pr37 has joined #crystal-lang
ShalokShalom has quit [Remote host closed the connection]
ShalokShalom has joined #crystal-lang
ShalokShalom has quit [Remote host closed the connection]
ShalokShalom has joined #crystal-lang