<FromGitter>
<confact> I am trying to parse as JSON, where all ints, floats, and so on are strings. from_json is complaining that they are string. Could I somehow overwrite and based which column it is cast it to int/float?
<jhass>
confact: you can specify custom converters
<FromGitter>
<icyleaf> Hey all guys, i have a problem to fix, here is the code which it does something like reflect a class and i don't know how to return a type of value to accept Any class or struct: https://play.crystal-lang.org/#/r/9cyk
raz has joined #crystal-lang
f1refly has joined #crystal-lang
<FromGitter>
<j8r> Oops, the stdlib WebSocket does not close the connection properly
<FromGitter>
<icyleaf> @jhass Hah, i image this solve in my mind though :D
<FromGitter>
<bburrows_gitlab> Hi All, Hoping someone here knows how to handle a http POST request where Content-Type: application/x-www-form-urlencoded. I want access to the form fields. The following works great for Content-Type: multipart/form-data but for Content-Type: application/x-www-form-urlencoded it just throws an error.``` HTTP::FormData.parse(context.request) do |field| ⏎ ⏎ ``` puts name ⏎ puts
<FromGitter>
... value ⏎ end`````` ⏎ ⏎ As an asside I tried just dumping the whole context object (expecting some string representation) to see if I could figure what was the problem but I just get thing like "#<HTTP::Request:0x106edf900>". This is for a tiny tiny application (it just receives two http forms and writes the received data to d ... [https://gitter.im/crystal-lang/crystal?at=5efc5b51b8152d348474d4e6]
<jhass>
did you try HTTP::Params.parse(context.request.body) ?
<FromGitter>
<bburrows_gitlab> Yes, but context.request.body is of type IO so I added to_s but it still did not work
<jhass>
huh
<jhass>
.body should be a string, body_io would be the IO
<jhass>
oh, nvm, apparently that's only for response, not request
<jhass>
where the hell is that libcrypto.a and libcrypto.dylib in there coming from :/
<jhass>
I don't have it
<FromGitter>
<lodenos> Have MacOS ?
<jhass>
yeah
<FromGitter>
<lodenos> hum
<FromGitter>
<lodenos> Never have u a problem with that, what's your `usr/local/lib`
<jhass>
a lot of stuff but all managed by homebrew
<jhass>
given you got a libcrypto in there but no libssl, I suspect a version mismatch between the two
Welog has quit [Remote host closed the connection]
<FromGitter>
<evvo> Hello!
<FromGitter>
<evvo> I'm not sure if this is related, but I'm having a problem with the password comparison with Crypto::Bcrypt::Password: ⏎ https://play.crystal-lang.org/#/r/9d0i
<FromGitter>
<evvo> Ah, I've been looking at the wrong version of the documentation
<FromGitter>
<evvo> Thanks, @Blacksmoke16 :)
<FromGitter>
<Blacksmoke16> np
alexherbo27 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 260 seconds]
alexherbo27 is now known as alexherbo2
<FromGitter>
<wontruefree> I am sure most people here have seen my promote the Chicago Crystal podcast. But if you have not I released a really good episode with Lorenzo Barasti this week and wanted to share it here. I am hoping people who do not read the backlog might see it here. http://podcast.chicagocrystal.org/1030945/4364261-lorenzo-barasti-building-crystal-community
<FromGitter>
<evvo> Very nice!
<FromGitter>
<s0kil> Glad it's available on Spotify.
<FromGitter>
<wontruefree> thanks !!
<FromGitter>
<wontruefree> yeah we did setup support for Spotify
<FromGitter>
<wontruefree> they made it surprisingly easy
<FromGitter>
<wontruefree> I would love to setup a youtube integration but I have not found the time yet
<FromGitter>
<s0kil> The interview with Ary really did not sound good, but it's probably acceptable for first one.
<FromGitter>
<wontruefree> We have come a long way since then
<FromGitter>
<wontruefree> It has been a journey on how to do this well
<FromGitter>
<wontruefree> but maybe sometime in the future I can have him on again
<FromGitter>
<RespiteSage> I expected that `hash[key] ||= value` would expand to `hash[key] = hash[key] || value`, which should raise a `KeyError` if `hash[key]` hasn't been set yet (and the hash has no default).
<raz>
well, at least that one user who's still on 0.24.1 will never have trouble getting back to his docs :p
sgt_chuckles has joined #crystal-lang
<sgt_chuckles>
hi
<FromGitter>
<Blacksmoke16> o/
<sgt_chuckles>
how long will it take crystal to be the new standard for game development
<oprypin>
sgt_chuckles, infinity
<sgt_chuckles>
congrajoolashins
<oprypin>
🎉
<sgt_chuckles>
seriously though
<sgt_chuckles>
would love to see more support in game dev for this language
<sgt_chuckles>
cause i've done games in c++
<sgt_chuckles>
and in python
<sgt_chuckles>
and often wish i had the ease of python with power of c++
<sgt_chuckles>
crystal looks like that
<FromGitter>
<wontruefree> haha
HumanGeek has joined #crystal-lang
Human_G33k has quit [Ping timeout: 256 seconds]
<FromGitter>
<UnsolvedCypher_gitlab> Has anyone ever tried to implement a Crystal interpreter rather than compiler? I could see that being useful for type checking code or for really fast live reloading during development
<FromGitter>
<s0kil> @UnsolvedCypher_gitlab There is this thing called Ruby, lol
<FromGitter>
<UnsolvedCypher_gitlab> I realize that
<FromGitter>
<wyhaines> To type/error check code without building it.... `crystal build --no-codegen --error-trace foo.cr` It returns very quickly.
<FromGitter>
<UnsolvedCypher_gitlab> Ooh that's really good to know, thank you @wyhaines
<FromGitter>
<watzon> Really what Crystal needs is incremental compilation. Once you add that it becomes trivial to have code hot swapping.
<FromGitter>
<watzon> And then compile times during development are much less of an issue
<FromGitter>
<UnsolvedCypher_gitlab> Does Crystal have an easy way to check the type of something? I think something like that would really assist in having decent autocomplete