jhass changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.28.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
demond has joined #crystal-lang
demond has left #crystal-lang ["++++++++++++++"]
<FromGitter> <mwlang> @asterite Good find!
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <watzon> Gotta have fun when testing
laaron has quit [Remote host closed the connection]
laaron- has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
<FromGitter> <bew> 😂
_whitelogger has joined #crystal-lang
laaron- has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
ashirase has quit [Ping timeout: 245 seconds]
ashirase has joined #crystal-lang
early has joined #crystal-lang
early` has quit [Ping timeout: 248 seconds]
<FromGitter> <drum445> Is there anyway to turn an array of unknown size into a tuple via a macro please?
<FromGitter> <dscottboggs_gitlab> Only if it's a literal array
<FromGitter> <dscottboggs_gitlab> If the size is not known at compile time, a macro can't do that
<FromGitter> <bew> The compiler can't guess the types and the tuple size if you don't specify them
<FromGitter> <drum445> Yeah I don't think I can do it :(
<FromGitter> <drum445> It's more like this: https://play.crystal-lang.org/#/r/6z5l
<FromGitter> <drum445> But the size will differ depending on the loop in the array
<FromGitter> <bew> Then no, and that would be pretty hard to use if it was possible... Do you have a more complete example?
<FromGitter> <drum445> something like this: https://play.crystal-lang.org/#/r/6z5q
<FromGitter> <drum445> I need to build a tuple of strings at runtime
<FromGitter> <bew> Then you have to do it differently, like https://play.crystal-lang.org/#/r/6z5w for example
<FromGitter> <drum445> ah smart
<FromGitter> <drum445> thanks!
<FromGitter> <bew> You're welcome ;)
laaron- has joined #crystal-lang
laaron has quit [Ping timeout: 256 seconds]
laaron- has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
DTZUZU2 has quit [Ping timeout: 248 seconds]
ua has quit [Ping timeout: 248 seconds]
ua has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
DTZUZU2 has joined #crystal-lang
<FromGitter> <nsuchy> Helping a friend with something. ⏎ ⏎ ```{ ⏎ "CVE_data_type": "Some string of data", ⏎ }``` [https://gitter.im/crystal-lang/crystal?at=5ce96af483ae782aeecc43a2]
<FromGitter> <nsuchy> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ce96b04b313d7231428c6cc]
<FromGitter> <Blacksmoke16> def cant start with capital
<FromGitter> <nsuchy> @Blacksmoke16 So for a JSON Mapping
<FromGitter> <nsuchy> The key cannot start with a capital
<FromGitter> <Blacksmoke16> ``` JSON.mapping( ⏎ "cve_data_type": {key: "CVE_data_type", type: String}, ⏎ )``` [https://gitter.im/crystal-lang/crystal?at=5ce96b2e83ae782aeecc45c1]
<FromGitter> <j8r> please don't post such long code blocks @nsuchy
jokke2 has joined #crystal-lang
jokke1 has quit [Ping timeout: 272 seconds]
<FromGitter> <nsuchy> @j8r sorry wasn't thinking about length, next time I'll link to a snippet, would you like me to remove the current ones?
<FromGitter> <Blacksmoke16> doesnt really matter
<FromGitter> <j8r> too late for this one
<FromGitter> <j8r> gists can fit this purpose
josh5tone has quit [Remote host closed the connection]
Yxhuvud has joined #crystal-lang
<FromGitter> <Blacksmoke16> is there a way to pull the line number where a runtime exception occured?
<FromGitter> <Blacksmoke16> if your exception handling is happening at a higher level
<FromGitter> <Blacksmoke16> currently trying to just parse it out from the backtrace
rohitpaulk has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
rohitpaulk has quit [Remote host closed the connection]
moei has quit [Quit: Leaving...]
<FromGitter> <j8r> on the stdlib's JSON pull parser?
<FromGitter> <Blacksmoke16> No just in general
<FromGitter> <j8r> depends of the object and exception then
<FromGitter> <Blacksmoke16> just a general exception, going to assume no since i dont see anything on the api docs
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
<FromGitter> <nsuchy> When using JSON mappings does using double quotes for a key name have any impact on performance?
<FromGitter> <Blacksmoke16> hm?
<FromGitter> <nsuchy> As opposed to not quoting the key name
<FromGitter> <watzon> I don't believe so
<FromGitter> <Blacksmoke16> one is a string other is a symbol
<FromGitter> <Blacksmoke16> prob doesnt make much of a diff
<FromGitter> <nsuchy> Takes 24 seconds to parse my 30MB file
<FromGitter> <watzon> You could always benchmark it if you're worried
<FromGitter> <Blacksmoke16> in release mode?
<FromGitter> <nsuchy> Crystal run file.cr
<FromGitter> <watzon> 30MB is pretty damn big
<FromGitter> <Blacksmoke16> build in release mode and try again
laaron has joined #crystal-lang