ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.30.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
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
ukd1 has quit [Quit: Lost terminal]
laaron has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
<FromGitter> <Blacksmoke16> @greenbigfrog could be related to https://github.com/crystal-lang/crystal/issues/7875 ?
_whitelogger has joined #crystal-lang
return0e has quit [Read error: Connection reset by peer]
Ring0` has joined #crystal-lang
<Ring0`> Hi! Google doesn't want to help me on that one. Is there an equivalent for Array#drop? (drops n elements from the beginning of a array)
<FromGitter> <tenebrousedge> you can always use `slice`
<Ring0`> yup, that's what I did, but just wanted to spare few bytes, you know ;) ruby style
<FromGitter> <tenebrousedge> there's also skip (https://crystal-lang.org/api/0.30.0/Enumerable.html#skip(count:Int)-instance-method)
<Ring0`> that's the one!
<Ring0`> Thanks
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
alex`` has quit [Ping timeout: 272 seconds]
ht_ has joined #crystal-lang
laaron has joined #crystal-lang
ht_ has quit [Remote host closed the connection]
alex`` has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 244 seconds]
DTZUZU has joined #crystal-lang
sagax has quit [Write error: Connection reset by peer]
sagax has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 258 seconds]
ua has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
alex`` has quit [Ping timeout: 268 seconds]
laaron has quit [Remote host closed the connection]
laaron- has joined #crystal-lang
<mps_> https://github.com/crystal-lang/crystal/issues/7293 doesn't fix tests (make spec) 0.30.0 on alpine edge with llvm 8.0.1
<mps_> aarc64, I mean
sorcus has joined #crystal-lang
devil_tux has joined #crystal-lang
devil_tux has quit [Ping timeout: 258 seconds]
<FromGitter> <andrius> I have input string from IO with hex codes, like this: `request%3A%20async`. Is there any method that convert them to the "normal" string?
<FromGitter> <straight-shoota> `URL.decode`
<FromGitter> <straight-shoota> (or `URL.unescape` in Crystal < 0.30.0)
devil_tux has joined #crystal-lang
return0e has joined #crystal-lang
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
devil_tux has quit [Ping timeout: 258 seconds]
devil_tux has joined #crystal-lang
teardown has quit [Ping timeout: 248 seconds]
devil_tux has quit [Ping timeout: 245 seconds]
teardown has joined #crystal-lang
devil_tux has joined #crystal-lang
<FromGitter> <greenbigfrog> @Blacksmoke16 thanks for answering. `STDOUT.sync = true` makes output work. ⏎ I'm not sure how I'm able to get the same effect with the `CustomLogHandler` I posted later. ⏎ Will need to investigate once I get off work
<FromGitter> <greenbigfrog> Still weird why this only happens in once of 4 docker containers I have in this project
<FromGitter> <greenbigfrog> (s/container/image)
devil_tux has quit [Ping timeout: 248 seconds]
lucasb has joined #crystal-lang
devil_tux has joined #crystal-lang
<FromGitter> <j8r> I figured a workaround for being unable to do `Int?`, do `Int::Signed | Int::Unsigned | Nil`
<FromGitter> <j8r> or no, better `Int::Primitive? `
<FromGitter> <j8r> I think it could be suggested
dingenskirchen has quit [Read error: Connection reset by peer]
dingenskirchen1 has joined #crystal-lang
dingenskirchen1 is now known as dingenskirchen
<FromGitter> <j8r> https://github.com/j8r/crystal-object-send is now using `Crystal::Parser` to parse strings like `"abcd".send("[2]") #=> c`. If it continues it will become a Crystal interpreter :)
<FromGitter> <tenebrousedge> wow
<FromGitter> <tenebrousedge> I didn't think that was possible
<FromGitter> <j8r> me too, until I discovered it was possible by looking at https://github.com/crystal-lang/crystal/blob/master/samples/compiler/visitor_example.cr
alex`` has joined #crystal-lang
<FromGitter> <Blacksmoke16> > I think it could be suggested ⏎ ⏎ but that works already?
<FromGitter> <j8r> @Blacksmoke16 `Error: can't use Int as generic type argument yet, use a more specific type`
<FromGitter> <j8r> I suggest something like `Error: can't use Int as generic type argument yet, use a Int::Primitive instead`
<FromGitter> <Blacksmoke16> ah for generic
<FromGitter> <Blacksmoke16> was going to say using it for method arg type restriction works
laaron- has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
<FromGitter> <j8r> Not that easy to do, not sure it worth it
laaron has joined #crystal-lang
<FromGitter> <j8r> If we are able to interpret a string line to Crystal, we may be able to replace macro methods
devil_tux has quit [Ping timeout: 268 seconds]
devil_tux has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
devil_tux has quit [Ping timeout: 272 seconds]
sz0 has joined #crystal-lang
<sorcus> psql "postgres://test@[::]:5432/test_db" - this works.
<FromGitter> <j8r> `[::]`?!
<FromGitter> <j8r> Do you mean `[::1]`
<sorcus> No.
<sorcus> But with any IPv6 crystal failed.
<FromGitter> <j8r> how can you connect to `0.0.0.0`, or `[::]`?
<FromGitter> <j8r> perhaps it may work, but it's confusing IMO
<FromGitter> <j8r> infact 0.0.0.0 or :: redirect to localhost... didn't know
<sorcus> j8r: but i can't connect to remote database too... Remote db available on only IPv6. No IPv4...
<FromGitter> <j8r> On what Crystal version are you, what give you when `URI.parse` the string?
<sorcus> j8r: Crystal 0.30.0 (2019-08-05), LLVM: 8.0.1, Default target: x86_64-pc-linux-gnu
<FromGitter> <j8r> if you do `[::1]` instead?
<FromGitter> <j8r> hum I've maybe caught where the issue is
<sorcus> j8r: Caused by: No address found for [::1]:5432 over TCP (Socket::Addrinfo::Error)
<sorcus> j8r: HTTP::Client works good with `http://[::]:8080/`.
<FromGitter> <j8r> got it
<FromGitter> <j8r> should be `hostname`, not `host` https://github.com/will/crystal-pg/blob/master/src/pq/conninfo.cr#L67
<FromGitter> <j8r> try to monkey patch it and try again (or modify it in `lib/pg/src/pq/conninfo.cr`)
<sorcus> j8r: Yeap, you right.
<sorcus> Works now.
<FromGitter> <j8r> I submit a patch mainstream
<sorcus> j8r: You really cool. Thank you so much.
<FromGitter> <j8r> no problem sorcus :)
<mps_> j8r: I'm preparing 0.30.0 for Alpine, will push it in a few hours but will disable aarch64 for now, only x86_64. sorry
<mps_> when it appears on edge repo, someone with knowledge and aarch64 machine could try to fix it and post patches, ofc
<FromGitter> <j8r> that's too bad there is no aarch64 CI
<rkeene> Should be pretty easy to add, no ?
<FromGitter> <j8r> mps_ thank you very much for your work!
<mps_> maybe it could be done with drone.io
<mps_> j8r: yw
<rkeene> QEMU ARM64 seems to be relatively well supported from what I can tell
<FromGitter> <j8r> I had an idea to fork crystal, and pull everyday to trigger a Drone CI with Alpine x86_64 and aarch64
<rkeene> Why fork it ?
<mps_> rkeene: yes, qemu aarch64 works quite fine on Alpine
<FromGitter> <j8r> rkeene: to run the CI
<FromGitter> <j8r> I already fork it to contribute, that's how GitHub works :/
<mps_> I wrote small guide and script which create and install alpine qemu aarc64
<FromGitter> <j8r> I use ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d4d8df62612bb718c3a3aed]
<sorcus> j8r: Cool. Thank you.
ht_ has joined #crystal-lang
duane has quit [Remote host closed the connection]
sz0 has quit [Quit: Connection closed for inactivity]
olbat[m] has quit [Remote host closed the connection]
_whitelogger has joined #crystal-lang
olbat[m] has joined #crystal-lang
<FromGitter> <kalinon> Whats the status on threads? I was looking at https://github.com/crystal-lang/crystal/wiki/Threads-support but that was made 2 years ago and the instructions are out of date. Just curious.
<FromGitter> <kalinon> nvm this thread sums up my questions https://forum.crystal-lang.org/t/fiber-is-danger-or-not-on-crystal/1027/11
<FromGitter> <Blacksmoke16> just know those are not the same thing
<FromGitter> <Blacksmoke16> the wiki page is talking about multi threading, while the forum thread is about fiber (concurrency)
<FromGitter> <Blacksmoke16> @kalinon ^
<FromGitter> <straight-shoota> @kalinon Multithreading is actively worked on
<FromGitter> <kalinon> Yeah thats where i get all confused, but the thread made note that Multithreading was not ready yet
<FromGitter> <kalinon> which is what i assumed, but i dont think i have the knowledge to help with that stuff
<FromGitter> <kalinon> lol
<FromGitter> <andrius> Who do use linuxbrew? Crystal upgrade to 0.30 takes ages
<FromGitter> <andrius> Just curious, is it my case or not..
<FromGitter> <Blacksmoke16> prob is installing from source
<FromGitter> <Blacksmoke16> i.e. downloading llvm and building it
<FromGitter> <andrius> yes, with all the patches
<FromGitter> <Blacksmoke16> that would do it
<FromGitter> <absolutejam_gitlab> Is the backtick essentially `Process.run` with `sh -c`?
<FromGitter> <tenebrousedge> probably
<FromGitter> <tenebrousedge> no, uses LibC
<FromGitter> <Blacksmoke16> anyone familar with creating homebrew bottles?
<FromGitter> <Blacksmoke16> my assumption is if i have it bottled it doesnt have to install the dependencies and stuff?
<FromGitter> <Blacksmoke16> oo i see what i missed
<oprypin> oh dang it wrong channel
<oprypin> you didn't see anything 😗
* FromGitter * tenebrousedge waves to the man behind the curtain
<FromGitter> <Blacksmoke16> i fixed it, needed to make crystal a build only dep
<FromGitter> <Blacksmoke16> anyone want to test it for me? :S
<FromGitter> <Blacksmoke16> can install `oq` via brew now
<FromGitter> <Blacksmoke16> 💯
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
<FromGitter> <greenbigfrog> why are dependencies so hard to manage...
<FromGitter> <greenbigfrog> why do I get `Error shard name (crystal-redis) doesn't match dependency name (redis)` for https://github.com/greenbigfrog/kemal-session-redis/blob/master/shard.yml#L9-L10 but not for https://github.com/robacarp/mosquito/blob/master/shard.yml#L12-L14
<Nekka> have you tried specifying a different shard version
<FromGitter> <greenbigfrog> Not yet
<FromGitter> <greenbigfrog> Also, why does it pull/use `0.2.0` if I do ```yml ⏎ kemal-csrf: ⏎ ⏎ ```github: kemalcr/kemal-csrf`````` [https://gitter.im/crystal-lang/crystal?at=5d4dd2c09507182477ad7f17]
<sorcus> j8r: Are you here?
<sorcus> Or someone else.
<FromGitter> <greenbigfrog> somebody is here. If you have a quesiton just go ahead and ask it. Else you might never get an answer
<sorcus> https://github.com/will/crystal-pg/pull/184 - similar issue with websocket client.
<sorcus> HTTP::WebSocket.new(URI.parse("ws://[::]:8085/")) failed with `Unhandled exception: No address found for [::]:8085 over TCP (Socket::Addrinfo::Error)`
<FromGitter> <j8r> Nice!
<FromGitter> <j8r> sorcus: good job!
<sorcus> j8r: Yeap. :-[
<FromGitter> <j8r> I guess you will send a PR?
<FromGitter> <absolutejam_gitlab> I never did like the term PR
<FromGitter> <absolutejam_gitlab> MR makes so much more sense to me
<sorcus> j8r: just replace `host` with `hostname`?
<FromGitter> <j8r> @absolutejam_gitlab subimit a patch would be the best for git vocabulary
<mps_> j8r: +1 for terminology
<FromGitter> <j8r> sorcus: I don't understand, is it a question? That what you have done, no?
<sorcus> j8r: I mean nothing gonna break?
<FromGitter> <greenbigfrog> WTF. I got all shards "installed", but now I'm suddenly getting a `can't find file` for a previously working shard
<FromGitter> <Blacksmoke16> rip
<FromGitter> <j8r> sorcus: if you look at the implementations of `URI#host` and `URI#hostname`, you will see that most probably - no
<FromGitter> <Blacksmoke16> is possible mosquito needs its redis dep updated?
<FromGitter> <j8r> also you can run the websocket specs, and submit the PR anyway. If there is something wrong, probably other people will tell you
<sorcus> j8r: Probably... I like it :-D Ok, i will send PR.
<FromGitter> <greenbigfrog> ```code paste, see link``` ⏎ ⏎ I can see it's right there... [https://gitter.im/crystal-lang/crystal?at=5d4dd9d5c87a0963e7416d8e]
<FromGitter> <j8r> if it break some things not caught, it will be reverted or fixed
<FromGitter> <Blacksmoke16> dunno, it can get hard when dealing with not as maintained libs
<FromGitter> <greenbigfrog> ```code paste, see link``` ⏎ ⏎ wtf. why that link not gotten removed yet after running a shards update... [https://gitter.im/crystal-lang/crystal?at=5d4ddae11dadc42a1140e9b4]
<FromGitter> <greenbigfrog> It had even told me it was fetching the github repo... `Fetching https://github.com/greenbigfrog/kemal-session-redis.git`
<FromGitter> <Blacksmoke16> could try clearing cache?
<FromGitter> <Blacksmoke16> `rm -rf ~/.cache/shards ./lib`
sorcus has quit [Ping timeout: 252 seconds]
<FromGitter> <greenbigfrog> I simply removed `./lib/kemal-session-redis`
<FromGitter> <j8r> looks like @greenbigfrog was showing us it was a symlink
sorcus has joined #crystal-lang
<FromGitter> <greenbigfrog> now back to fucking version conflicts I can't explain
<FromGitter> <greenbigfrog> this might actually be a bug. ⏎ I'm getting almost 500k lines of output from `shards update`
rohitpaulk has joined #crystal-lang
<sorcus> j8r: Spec failed without patch and work with.
<FromGitter> <straight-shoota> sorcus, you don't need to duplicate the entire spec. Making sure the provided address works should be enough.
<FromGitter> <straight-shoota> But that probably already requires quite a bit code, so a more elegant solution would be to use `each_ip_family`from the socket spec_helper
<FromGitter> <straight-shoota> Essentially, you wrap the entire `negotiates over HTTP correctly` sample and call `server.bind_tcp`with the IP address provided as second block argument
ht_ has quit [Remote host closed the connection]
rohitpaulk has quit [Ping timeout: 245 seconds]
<FromGitter> <straight-shoota> yes 👍
<FromGitter> <j8r> Good sorcus!
lucasb has quit [Quit: Connection closed for inactivity]
<FromGitter> <absolutejam_gitlab> @Blacksmoke16 what's the brew command?
MasterdonX has quit [Ping timeout: 245 seconds]
MasterdonX has joined #crystal-lang
<sorcus> Good night everyone.
<FromGitter> <watzon> Hmm, there's no way to take a NamedTuple and create a new one without certain values right? NamedTuple doesn't have a `#delete` method.