pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
ome has joined #crystal-lang
matp_ has quit [Read error: Connection reset by peer]
matp has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Read error: Connection reset by peer]
bjz has joined #crystal-lang
ome has quit [Quit: Connection closed for inactivity]
pawnbox has quit [Remote host closed the connection]
bjz has quit [Ping timeout: 265 seconds]
bjz_ has joined #crystal-lang
bjz_ has quit [Client Quit]
pawnbox has joined #crystal-lang
metacollin has joined #crystal-lang
metacollin has quit [Client Quit]
gloscombe has joined #crystal-lang
bjz has joined #crystal-lang
mark_66 has joined #crystal-lang
bjz has quit [Ping timeout: 252 seconds]
bjz_ has joined #crystal-lang
<crystal-gh>
[crystal] asterite pushed 1 new commit to master: https://git.io/vXBKq
<crystal-gh>
crystal/master b8a18c1 Ary Borenszweig: String: fixed index and rindex for ascii chars (optimization only applies when string is ascii only). Fixes #3513
<travis-ci>
crystal-lang/crystal#b8a18c1 (master - String: fixed index and rindex for ascii chars (optimization only applies when string is ascii only). Fixes #3513): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/173841987
<crystal-gh>
[crystal] c910335 opened pull request #3514: Add intro sort to Array (master...master) https://git.io/vXBDe
bjz has joined #crystal-lang
bjz_ has quit [Ping timeout: 268 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
gloscombe has quit [Ping timeout: 250 seconds]
gloscombe has joined #crystal-lang
bjz has quit [Ping timeout: 252 seconds]
bjz has joined #crystal-lang
dostoyevsky has quit [Quit: leaving]
dostoyevsky has joined #crystal-lang
soveran has joined #crystal-lang
poikon has quit [Ping timeout: 260 seconds]
poikon has joined #crystal-lang
soveran has quit [Remote host closed the connection]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<crystal-gh>
[crystal] ysbaddaden closed pull request #3170: [WIP] Add file:line information to backtraces (master...core-callstack-refactor) https://git.io/v6oca
soveran has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
shawn42 has quit [Quit: Connection closed for inactivity]
pawnbox has joined #crystal-lang
Philpax has joined #crystal-lang
soveran has quit [Remote host closed the connection]
Philpax has quit [Ping timeout: 250 seconds]
mark_66 has quit [Remote host closed the connection]
mark_66 has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
shawn42 has joined #crystal-lang
mark_66 has joined #crystal-lang
<crystal-gh>
[crystal] tbrand opened pull request #3515: A method to escape a string into uri safe structure (master...escape-a-string-in-uri-safe-way) https://git.io/vXRYk
pduncan has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
mark_66 has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
mark_66 has joined #crystal-lang
kulelu88 has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
<FromGitter>
<paulcsmith> Right now that throws an error because it's trying to make a new module (probably trying to make a module at `Router::RouteHelpers`. Is there a way to make it try to use the existing module? Or maybe some other way to do this that doesn't involve reopening modules?
pawnbox has joined #crystal-lang
<FromGitter>
<paulcsmith> The exact error is : `can't declare module dynamically`
<FromGitter>
<paulcsmith> @BlaXpirit Thank you! I *think* that will work with the rest of my router code. I'll give that a try
<BlaXpirit>
paulcsmith, i'm not sure what's going on here but i think the problem is that macros which are inside a class are not just namespaced macros, they're meant to be called in the code of the class itself (and subclasses)
<FromGitter>
<paulcsmith> Yeah that sounds about right. I might have to change the router to make it work. Hopefully I can get it! Compile time checks to make sure paths exist wold be awesome!
[spoiler] has joined #crystal-lang
Renich has joined #crystal-lang
jeromegn_ has quit [Ping timeout: 260 seconds]
shawn42 has quit [Ping timeout: 260 seconds]
pawnbox has joined #crystal-lang
jeromegn_ has joined #crystal-lang
shawn42 has joined #crystal-lang
lacour has joined #crystal-lang
mark_66 has quit [Remote host closed the connection]
shawn42 has quit [Ping timeout: 260 seconds]
soveran has joined #crystal-lang
shawn42 has joined #crystal-lang
soveran has quit [Ping timeout: 256 seconds]
<FromGitter>
<zatherz> Papierkorb: is it an alias?
<FromGitter>
<zatherz> Is there any way to use JSON.mapping but at the same time have extra fields not covered by it and not nilable? ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ now, what if I want to add a class variable of type Bool there and have it work properly? something like additional arguments to `from_json` would be great [https://gitter.im/crystal-lang/crystal?at=5820ac13e462097a301c940b]
<Papierkorb>
And the next compiler crash, this time only when building with --debug - Can someone reproduce? 1) Build crystal from master 2) clone https://github.com/Papierkorb/torrent 3) crystal deps 4) crystal build --debug bin/download.cr
gloscombe has quit [Remote host closed the connection]
<FromGitter>
<jwoertink> What type would I use if I want a method that takes an argument of any object that `to_json` can be called on? For example: https://play.crystal-lang.org/#/r/1dgl
<FromGitter>
<zatherz> I'm saying that you should be able to
<FromGitter>
<zatherz> but you can't
<FromGitter>
<zatherz> @jwoertink okay so
<FromGitter>
<zatherz> I talked to one of the contributors
<FromGitter>
<zatherz> this is a limitation of Crystal
<FromGitter>
<zatherz> I'll copy some of his words
<FromGitter>
<jwoertink> oh?
<FromGitter>
<zatherz> "the binary representation of a tuple and a class is not the same ⏎ so to cast from one to the other you need to change binary representations ⏎ which is doable when it's a local var ⏎ when it's a generic argument? ⏎ good luck fam" [https://gitter.im/crystal-lang/crystal?at=5820e243df5ae96645296346]
<FromGitter>
<zatherz> Array(T) and Hash(K, V) are generic classes
<FromGitter>
<jwoertink> lol
<FromGitter>
<zatherz> basically
<FromGitter>
<zatherz> you can cast something like `1_i64` to JSON::Type
<FromGitter>
<zatherz> you can cast something like `[1_i64.as(JSON::Type)]` to a JSON::Type
<FromGitter>
<zatherz> but you can't cast something like `[1_i64].as(JSON::Type)`
<FromGitter>
<zatherz> what you need to do is first convert every single value in every single array (including nested arrays) and every single value in every single hash (including nested hashes)
<FromGitter>
<zatherz> to a JSON::Type
<FromGitter>
<zatherz> only then you can cast the whole array or hash to JSON::Type
<FromGitter>
<jwoertink> ah
<FromGitter>
<jwoertink> wow
<FromGitter>
<jwoertink> that's pretty wild
<FromGitter>
<zatherz> @jwoertink thankfully for you, I wrote a method that does exactly that