RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.26.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
sevensidedmarble has quit [Ping timeout: 260 seconds]
moei has quit [Read error: Connection reset by peer]
moei has joined #crystal-lang
<FromGitter> <Blacksmoke16> wouldnt know without the code
<FromGitter> <Blacksmoke16> actually, what crystal version are you using @jwoertink
<FromGitter> <elorest> @bararchy ⏎ ⏎ > btw it seems that BlueZ is Linux only ⏎ ⏎ Technically you can install it on OSX but it doesn't have all the options. [https://gitter.im/crystal-lang/crystal?at=5bbbfa7bc08b8b3067f02ac3]
<FromGitter> <elorest> Dbus seems quite a bit slower when searching for available devices. Definitely an option though. Also DBUS is still just an interface for bluez. So it's not really a question between bluez or dbus. Either way it's bluez.
Heaven31415 has quit [Quit: Leaving]
sevensidedmarble has joined #crystal-lang
<woodruffw> is there anything like `scanf`/`fscanf` for crystal's `IO`?
<woodruffw> (i'd like to read an ASCII-formatted length-prefixed string)
non-aristotelian has quit [Quit: non-aristotelian]
Vexatos has quit [Ping timeout: 246 seconds]
vikaton has quit [Quit: Connection closed for inactivity]
<FromGitter> <bajro17> I have question
<FromGitter> <bajro17> I want just try make my own router
<FromGitter> <bajro17> how to do something like /something/:thisisimportant
<FromGitter> <bajro17> to take this like parameter
DTZUZO has quit [Remote host closed the connection]
DTZUZO has joined #crystal-lang
akaiiro has quit [Ping timeout: 272 seconds]
akaiiro has joined #crystal-lang
akaiiro has quit [Ping timeout: 252 seconds]
akaiiro has joined #crystal-lang
rohitpaulk has joined #crystal-lang
akaiiro has quit [Remote host closed the connection]
rohitpaulk has quit [Ping timeout: 272 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <jgaskins> Does anyone know of a good general-purpose connection pool library? I found https://github.com/ysbaddaden/pool but this line (https://github.com/ysbaddaden/pool/blob/c4ecfad1b87fbd8c6484d1fd536ccfd14c40cc94/src/connection.cr#L10) makes me think I shouldn't recommend it in production. :-)
<FromGitter> <Blacksmoke16> crystal doesnt have threads atm anyway so yolo? :p
<FromGitter> <jgaskins> Well, it does, but they're undocumented. :-)
<FromGitter> <Blacksmoke16> touche :p
<FromGitter> <jgaskins> If coroutines can't preempt other fibers, I'm happy to recommend we use that library because it's quite small and simple, but I'm just curious if (a) it'll cause problems in production or (b) if there's another connection-pool library that handles preemptive concurrency.
<FromGitter> <proyb6> @jgaskins Im curious what is the production app you wanted to develop?
_whitelogger has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <proyb6> @bajro17 Regex on urls is possible but it’s safer to create a unique key value to avoid URL parameters duplication bomb
Groogy1 has joined #crystal-lang
DTZUZO has quit [Ping timeout: 268 seconds]
<FromGitter> <bew> @dscottboggs_gitlab your first `to_json` is wrong, `abc` is not a valid json, `"abc"` is.. *just don't make the json yourself*
<FromGitter> <bew> @woodruffw how is the string's length serialized? is it ascii numbers?
ashirase has quit [Ping timeout: 246 seconds]
<FromGitter> <girng> omg i'm such a newb. i was doing sleep_time = 1/25 for my game loop
<FromGitter> <girng> and was wondering why my damn cpu usage was 800% in top.. LOL
ashirase has joined #crystal-lang
<FromGitter> <j8r> why having a sleep for a game loop?
<FromGitter> <girng> iuno, makes creating a loop counter in intervals really easy
<FromGitter> <girng> like, setInterval in js, can just do loop do sleep 0.04 for 25 ticks per second
<FromGitter> <girng> i am going to need it because i needto calculate server-side collisions for example, when a player shoots a fireball. my physics loop will detect a collision and notify players
<FromGitter> <girng> i was reading valve's article, i might use 60hz physics simulation
<FromGitter> <chussenot> Hi guys
<FromGitter> <chussenot> `puts "Event::#{event_name.camelcase}".to_class`
<FromGitter> <chussenot> Is it possible to convert a string to a class in crystal lang ?
<Yxhuvud> You may be able to do it compiletime or using a lookup table.
<Yxhuvud> definitely not in a dynamic way like that
<FromGitter> <chussenot> :)... Yet my old rubyist reflexes....
<FromGitter> <chussenot> Oky
<jokke> hey yall web devs! If you like to run a bare bone approach like using router.cr or something even more minimal, check out https://github.com/jreinert/paramnoia for type safe param parsing! Feedback and contributions very welcome!
<jokke> i'd be even happier if this got embedded in one of the big players of crystal web frameworks i'm really missing type safe param parsing in most of them
<jokke> s/frameworks/frameworks./
<FromGitter> <bew> Nice name!
<jokke> heh yeah i got my friend to thank for that :)
<FromGitter> <proyb6> Nice, it does seem less to type? I haven’t seen if we could capture multi-language and add that in Readme is useful
_whitelogger has joined #crystal-lang
<FromGitter> <proyb6> Jokke, I wonder if it handle rogue crafted a DDoS URL with hundreds of the same parameter foo=abc&foo=xyz will overload the server?
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <straight-shoota> Looks great, Jokke!
<FromGitter> <straight-shoota> It's probably not just something for web devs, I figure it could be useful for other purposes as well...
<FromGitter> <vladfaust> Yeah, the community has struggled for type-safe params parsing for a long time, and finally we've got this shard
<FromGitter> <straight-shoota> And I really think we should start thinking about a more generalized serialization interface that can handle different data formats. Something like Rust's serde.
<jokke> straight-shoota: that'd be awesome
<jokke> straight-shoota: i already wrote a very similar shard in functionality but only differing in the input format: https://github.com/jreinert/env_config.cr
<jokke> would be great if those could use the same interface
<jokke> i'd also love to see optional `only` and `methods` params for to_json
<jokke> and a `#to_named_tuple` method.
<jokke> (also with `only` and `methods`)
<jokke> proyb6 not sure why it would...
<jokke> and i'd love the ability to define macro methods (methods you can call from macro context). It's super hard to write readable macros when things get a bit more complex.
<woodruffw> @bew: yep, i'm writing a netstring parser: https://en.wikipedia.org/wiki/Netstring
<woodruffw> i ended up parsing the length-prefix byte-by-byte (which is probably more correct than scanning anyways)
<jokke> how so?
<jokke> you could just use io.read_bytes(UInt64) or something
<woodruffw> it's an ascii length prefix
<jokke> ah
<jokke> ic
<woodruffw> yep, otherwise i agree ;)
<jokke> what about gets(':') ?
<woodruffw> yeah, that looks like it would work too
<jokke> byte by byte parsing is usually pretty inefficient.
<jokke> on the other hand the length prefix isn't going to be huge
<woodruffw> well, in this case the "parser" is just checking whether each byte is in the '0' to '9' range
<woodruffw> but yeah
<jokke> still i think gets(':') is easier to read
<woodruffw> mhm, i agree
<woodruffw> i'll probably switch them (and do some performance tests, since i'm curious)
<woodruffw> thanks!
<jokke> then you can use UInt64.new(io.gets(':')) as this will raise if it can't parse a number. (not sure if to_ui64 would)
<woodruffw> hmm, `UInt64` accepts numbers with leading zeros, so i still have to exclude those manually
<woodruffw> e.g., `02:xx,` isn't a valid netstring
<jokke> oh i see
<jokke> well that should be easy to check though
<jokke> after you have it in memory there's no problem going through byte by byte
<woodruffw> mhm
<FromGitter> <bew> indeed, if you have a buffered IO, byte per byte parsing is good, you can't do any other way! Btw, if you want blazingly fast parsing, don't create `String` objects, and only rely on `Bytes` and `Slice` methods
<FromGitter> <bew> don't create *intermediate String objects
<jokke> straight-shoota: i'm hitting a bit of a wall regarding PR #6912 :/ For me to detect that someone is reading from the body i'd have to modify the Content module to somehow allow injecting code before the read method. I have no idea how to elegantly do this...
<jokke> maybe you have an idea
<FromGitter> <bararchy> would that help?
<woodruffw> thanks @bew!
<FromGitter> <straight-shoota> Jep, you need to inject that code into the IO. That's how I'd do that, too.
<FromGitter> <straight-shoota> You could take a look at https://golang.org/src/net/http/server.go?#L874 for inspiration
<FromGitter> <straight-shoota> You could either wrap the IO in a specific IO class that only provides that check on `read`. Or provide a method in `HTTP::Content` and use it in custom overrides of `read` in the implementing classes. I think I'd prefer the latter since these content IO's are tightly coupled to reading HTTP responses anyway.
<FromGitter> <straight-shoota> So it's fine to put more HTTP-specific logic in them.
<jokke> how i think i got it
<jokke> -how
<jokke> yeah
<jokke> can i somehow make a kind of split memory io which will have a separate memory io for reading and writing?
<jokke> (for specs)
<FromGitter> <straight-shoota> `IO::Stapled`
<jokke> nice
<jokke> thanks
rohitpaulk has quit [Ping timeout: 272 seconds]
<jokke> hmm if i have a class which inherits from another class and includes a module which provides another constructor, how can i differenciate which constructor should be used when using super?
return0e has quit [Read error: Connection reset by peer]
moei has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
moei has joined #crystal-lang
<FromGitter> <dscottboggs_gitlab> @bew then how do you recommend solving the problem I had?
<FromGitter> <bararchy> Godda love OpenSSL errors: `SSL_accept: Success (Errno)`
<FromGitter> <bew> @dscottboggs_gitlab the second was good (the one with `def to_json(builder : JSON::Builder) ....`)
<FromGitter> <yxhuvud> Yes, they are in a special class of aweful.
<FromGitter> <dscottboggs_gitlab> @bew oh ok thanks
akaiiro has joined #crystal-lang
DTZUZO has joined #crystal-lang
<raz> gosh, i love crystal <3
<raz> that feel when you condense >2k lines of messy Golang into 300 lines of super readable crystal... and it even runs faster than before
<FromGitter> <bararchy> totally, just reviewd code from 3 devs at once, it is indeeed a pleasure to read as well as to write
DTZUZO has quit [Ping timeout: 260 seconds]
<FromGitter> <bararchy> Yeha @drujensen I wish we can get higher accuracy with SHAInet but right now we got two things stopping us, 1. No GPU support 2. No multi-threading support, that means we are "caged" in small network and simple tests that runs for trivial times else it takes too much time to debug anything
<FromGitter> <bararchy> Though I see the work on Fibers have been merged and this points nicely on multi-threading work coming our way, or so I hope haha
<jokke> straight-shoota: uff.. super frustrating. my changes cause errors in the specs for chunked contend and i can't understand why... :( Here's how what i changed about http/content.cr: https://p.jokke.space/oHE8h/ and these are the errors/failures: https://p.jokke.space/sprFe/
<jokke> i even commented out the part that calls `#expect_continue` just in case but the error keeps persistent
<FromGitter> <straight-shoota> Oh, you changed a lot.
<FromGitter> <straight-shoota> That looks way to complicated to me
<jokke> as in: it should be easier?
<jokke> *less-complicated
<jokke> it's not that trivial
<jokke> i could also just call send_continue from the read/read_byte/peek/skip method
<jokke> s
<jokke> but then i'd have to implement them everywhere
<FromGitter> <straight-shoota> yeah, but that's much simpler than what you now have
<FromGitter> <straight-shoota> `FixedLengthContent` just needs a few of these: ⏎ ⏎ ``` def read(slice : Bytes) ⏎ ensure_send_continue ⏎ super ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5bbcced4e65a634336abbc63]
<FromGitter> <straight-shoota> All other relevant methods are already implemented, they just need to call the check method
<FromGitter> <straight-shoota> *in the other types
<jokke> hm yeah i'll give it a go
<FromGitter> <straight-shoota> `internal_io` can just be a property
<FromGitter> <straight-shoota> set by the processor whith `expect_continue`
Groogy1 has quit [Ping timeout: 246 seconds]
<FromGitter> <straight-shoota> btw. `private getter` doesn't work
<FromGitter> <straight-shoota> just use ivars
<FromGitter> <straight-shoota> you don't need accessors for these internal state fields
<jokke> oh
<jokke> ok
DTZUZO has joined #crystal-lang
<FromGitter> <jwoertink> So yesterday I was getting this `BUG: already had enclosing call` error using crystal 0.26.1. I figured out what was causing it, but it's sort of a strange error
<FromGitter> <jwoertink> Is this an error I should submit an issue to crystal for?
<FromGitter> <jwoertink> I'm not really sure what the error actually means, and to reproduce it for me requires a lot of moving parts
<FromGitter> <ljuti> Can I split lib declarations to multiple files for a single C library?
<jokke> ljuti: sure. The stdlib does this alot with libc
<FromGitter> <ljuti> Thanks, jokke
DTZUZO has quit [Ping timeout: 244 seconds]
DTZUZO_ has joined #crystal-lang
<FromGitter> <bew> @jwoertink yes, when it's written `BUG: ...` like this, it's definitely a bug
<FromGitter> <jwoertink> ok. I'll try working out a smaller reproducible example. Thanks
<FromGitter> <bew> there is #5299 with same error
<FromGitter> <bew> see if it's same kind of code that triggeres it
<FromGitter> <jwoertink> oh interesting. I think that might be the same thing
<FromGitter> <jwoertink> basically I have this object that returns this Collection object. I was trying to create a Null version and just substituted the method with an empty array, and that causes the bug
<FromGitter> <jwoertink> I figured since both respond to `#each` it would be ok, but nope
<jokke> any idea why body is resolved to compile time type IO+ instead of Content here? https://p.jokke.space/q1H6L/
<jokke> (Nil | IO+)
<jokke> all of those include Content
Heaven31415 has joined #crystal-lang
<FromGitter> <straight-shoota> jokke, see #6351
<jokke> hm ok
non-aristotelian has joined #crystal-lang
<jokke> straight-shoota: https://p.jokke.space/Q4k4F/ this will block forever. If i add a second empty line after the first one in the request it works. But shouldn't it work with a single empty line which would indicate that the headers are sent and what follows will be the body?
<jokke> sorry. https://p.jokke.space/Q4k4F/crystal for syntax hl
<FromGitter> <straight-shoota> If you didn't change anything in the client response, I wouldn't expect the client response to understand the continue header
rohitpaulk has joined #crystal-lang
<FromGitter> <straight-shoota> I'm not entirely sure what should follow that header, a single CRLF or two. I couldn't find anything in the specs...
<FromGitter> <straight-shoota> I guess most implementations don't care
<jokke> hmm
<jokke> but basically: https://github.com/jreinert/crystal/blob/100-continue/src/http/common.cr#L20-20 this method would suggest that is _should_ work with a single newline
<jokke> *empty line
<jokke> oh
<jokke> sorry
<FromGitter> <straight-shoota> look at line 28: It expects an empty line
<jokke> ahh
<jokke> i think i know what it is
<jokke> requestize doesn't add a "\r\n" at the end (which is correct of course for methods with bodies)
<FromGitter> <straight-shoota> oh, there! I misunderstood your problem and figured it had something to do with sending/receiving the response. :D
<FromGitter> <straight-shoota> btw. regarding your previous problem, you could probably use `body : Content? = nil` to declare the type to `Content`.
<jokke> i just used if body.is_a?(Content)
<jokke> straight-shoota: i updated the PR
<FromGitter> <straight-shoota> nice
<FromGitter> <straight-shoota> is there a particular reason you didn't just use `HTTP::Request` to construct the spec request?
<jokke> hmmm
<jokke> not really no
<FromGitter> <kingsleyh> hey - what happened to JSON::Type from https://crystal-lang.org/api/0.24.2/JSON/Type.html
<FromGitter> <kingsleyh> did it get replaces with something else in 26?
<jokke> kingsley JSON::Any::Type
<FromGitter> <kingsleyh> ah ok thanks
<FromGitter> <kingsleyh> just trying to upgrade one of my old apps
<jokke> straight-shoota: i don't think it will work
<jokke> because there's no client-side support for continue
<jokke> (yet)
<FromGitter> <fusillicode_twitter> Guys I'm kind of getting crazy...
<FromGitter> <fusillicode_twitter> ```@client.post(path, body: body).tap { |reponse| @log.info "Response #{reponse.inspect}" }```
<FromGitter> <fusillicode_twitter> where `@client = HTTP::Client.new(@endpoint)`
rohitpaulk has quit [Ping timeout: 246 seconds]
<FromGitter> <fusillicode_twitter> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bbceb4f435c2a518e7a0656]
<FromGitter> <fusillicode_twitter> :'(
<FromGitter> <kingsleyh> hey - what is the recommended approach for YAML in this situation?
<FromGitter> <kingsleyh> ```undefined method 'map' for YAML::Any (compile-time type is (Array(YAML::Any) | YAML::Any))```
<FromGitter> <HarrisonB> @fusillicode_twitter , is "trying this one" a note from you? If so, I don't see a `form` param required for that overload
<FromGitter> <straight-shoota> @HarrisonB No, that's included in the compiler error message
<FromGitter> <straight-shoota> that looks really weird @fusillicode_twitter
<FromGitter> <straight-shoota> do you have a reproducible sample?
<FromGitter> <straight-shoota> @kingsleyh Depends on what you want to do... Why is it even `Array(YAML::Any) | YAML::Any`. That doesn't make much sense to me.
<FromGitter> <HarrisonB> @straight-shoota gotcha. ⏎ @fusillicode_twitter what version of Crystal are you on?
<FromGitter> <kingsleyh> I guess it’s either a string or an array
Jenz has joined #crystal-lang
<FromGitter> <straight-shoota> yeah, but where does it come from?
<Jenz> @HarrisonB as an arch user I find it very foreign to not have the latest version of whatever :P
<FromGitter> <straight-shoota> `Array(Any)` is usually wrapped by Any
<FromGitter> <fusillicode_twitter> Here I am sorry for the delay gusy :( ⏎ @HarrisonB nope is the compiler that is telling me "trying this one" :)
<FromGitter> <fusillicode_twitter> btw I'm on 0.26.1 :(
<FromGitter> <fusillicode_twitter> @straight-shoota ⏎ here's the complete code: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bbcf68f38449236610eadd0]
<FromGitter> <kingsleyh> @fusillicode_twitter just as a side note - I have been using the Crest library for http and I find it very nice
<FromGitter> <fusillicode_twitter> @kingsleyh yep I know the shard (by name) but I would really like to stick with the default if possible :(
<FromGitter> <straight-shoota> @fusillicode_twitter I can't reproduce the error
<FromGitter> <straight-shoota> Your code has an`},` too much in line 26
<FromGitter> <straight-shoota> And then some calls to actually use this class are missing as well as a definition of `decision_request_body`
<FromGitter> <mwean> Hey, how do you specify a certain compiler path? I'm on a mac, so I installed llvm with homebrew, but I'm not sure what env variables/flags to set
<FromGitter> <mwean> It's also possible that I'm setting it correctly, but that's not fixing my error
<FromGitter> <mwean> It only happens when I use the `--release` flag
<FromGitter> <mwean> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bbcf8d1c7bf7c3662e179fc]
<FromGitter> <fusillicode_twitter> @straight-shoota my bad I tried to change the original source to make it more "anonymous" 😅
<FromGitter> <mwean> I haven't been able to get the `-v` flag through to the compiler
<FromGitter> <fusillicode_twitter> I found it gusy!
<FromGitter> <fusillicode_twitter> I'm a douche...
<FromGitter> <fusillicode_twitter> the `body` variable is `JSON` one in my code
<FromGitter> <fusillicode_twitter> it should be `String`!
<FromGitter> <fusillicode_twitter> XD
<FromGitter> <fusillicode_twitter> Sorry I just need to listen to what the compiler was telling me 😅
<FromGitter> <fusillicode_twitter> Btw it feels strange to do this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bbcf9e5271506518de2dd07]
<FromGitter> <fusillicode_twitter> to get the body JSON String 😅
<FromGitter> <fusillicode_twitter> and indeed...once again...I get the answer...: ⏎ ⏎ ```{ ⏎ "my-hash" => { ⏎ ... ⏎ }, ⏎ }.to_json``` [https://gitter.im/crystal-lang/crystal?at=5bbcfaa8f659e6777288fe87]
<FromGitter> <fusillicode_twitter> the `#to_json` was enough XD
<FromGitter> <fusillicode_twitter> thanks for the support @straight-shoota @kingsleyh @HarrisonB 🙇
<FromGitter> <fusillicode_twitter> 🍻
<FromGitter> <kingsleyh> how should I handle this?
<FromGitter> <kingsleyh> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bbcfbc7f659e677728904fb]
<FromGitter> <kingsleyh> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bbcfbdce65a634336ad3f6b]
<FromGitter> <kingsleyh> ```code paste, see link```
<FromGitter> <kingsleyh> it seems to think it's a nested array
<FromGitter> <straight-shoota> you shouldn't use `JSON::Any::Type`
<FromGitter> <kingsleyh> what should I use?
<FromGitter> <dscottboggs_gitlab> the type you expect it to be
<FromGitter> <straight-shoota> no, just `JSON::Any`
<FromGitter> <straight-shoota> it's sole purpose is so that you don't have to worry about recursion in the types as `JSON::Type` was before
<FromGitter> <kingsleyh> hmm - this is not my code - just trying to update it to work with 26 - and the original code used Json::Any everywhere
<FromGitter> <kingsleyh> I guess it's some json being passed in - but it could be anything
<FromGitter> <kingsleyh> the whole code is here: https://github.com/cubos/rethinkdb.cr/blob/master/src/rethinkdb/term.cr
<FromGitter> <straight-shoota> The entire method body should just be something like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bbcfe4d1c100a4f29596887]
<FromGitter> <straight-shoota> and type of @reql should be JSON::Any not JSON::Any::Type.
<FromGitter> <kingsleyh> hmm
<FromGitter> <kingsleyh> the whole json aspect of the library looks like it needs re-writing
<FromGitter> <kingsleyh> I guess it's not going to be a quick patch up job
<FromGitter> <kingsleyh> I don't think I have time to do it - I might go to postgres or something instead
<FromGitter> <dscottboggs_gitlab> @kingsleyh I'm not sure I get what's going on here? why isn't this code just using JSON::Serializable or JSON::Builder or JSON.mapping?
<FromGitter> <kingsleyh> I have no idea - I have been using the library when my app was on crystal 24 - but just come back to it - and found it didn't work - so was just seeing if I could fix it up quickly - but I think the summary is - I can't - and it will need a lot more work for crystal 26
<FromGitter> <kingsleyh> I only have a small grasp on how it works at the moment - but I don't really want to start supporting another project - I've got loads of stuff going on already
<FromGitter> <dscottboggs_gitlab> Oh. I see... (https://github.com/cubos/rethinkdb.cr/issues/15#issuecomment-423356693).
<FromGitter> <kingsleyh> yeah it's pretty much dead at this point
<FromGitter> <dscottboggs_gitlab> I'm sure someone will come along and pick up either that or another nosql driver at some point. I know some projects use postgres which is a bit of a different game but relational always seemed to make more sense in strictly typed code anyway.
<FromGitter> <kingsleyh> I think postgres can also work like a nosql db
<FromGitter> <dscottboggs_gitlab> oh wow that's really cool I didn't know that
<FromGitter> <straight-shoota> yes, postgres is really awesome in almost any regard. I sometimes wonder why there are even *different* databases out there :D
<FromGitter> <kingsleyh> I don't know if crystal driver supports the nosql features of postgres tho
greengriminal has joined #crystal-lang
<FromGitter> <straight-shoota> yes it does
<FromGitter> <straight-shoota> at least it says so on the project page https://github.com/will/crystal-pg
<FromGitter> <straight-shoota> it supports both json and jsonb data type
<Jenz> Again, @straight-shoota I've just gotta thank you for being such a nice and helpfull fellow :D
<FromGitter> <kingsleyh> hmm or maybe I should give Amber a try with Granite
<FromGitter> <kingsleyh> or maybe just Granite
<FromGitter> <straight-shoota> thanks, Jenz. I try to help when I can =)
baweaver is now known as lemur
lemur is now known as baweaver
lunarkitty has quit [Quit: WeeChat 1.9.1]
Jenz has quit [Ping timeout: 245 seconds]
<FromGitter> <HarrisonB> @fusillicode_twitter no problem. It happens to me *all the time* lol. It's even more common in Elm if you've given that lang a shot
greengriminal has quit [Quit: This computer has gone to sleep]
<FromGitter> <HarrisonB> @kingsleyh Lucky's ORM should have JSONB support soon as well https://github.com/luckyframework/lucky https://github.com/luckyframework/lucky_record/pull/275
<FromGitter> <r00ster91> Does any know why this: ⏎ ⏎ ```Signal::INT.trap do ⏎ exit ⏎ end ⏎ loop {}``` ⏎ ⏎ doesn't exits when pressing Ctrl+C? ... [https://gitter.im/crystal-lang/crystal?at=5bbd163bef4afc4f2846df6d]
<FromGitter> <Timbus> I believe custom signal handlers need to be yielded to, in order to work (so adding a sleep to the loop would fix it). And the reason it works without the trap is because the default handler doesn't work the same way
scott_tams has joined #crystal-lang
<FromGitter> <straight-shoota> yup, `loop { }` is a tight loop and never yields control so that the signal loop can't process the handler.
<FromGitter> <straight-shoota> When you don't trap the signal the OS will terminate it immediately.
moei has quit [Quit: Leaving...]
DTZUZO_ has quit [Ping timeout: 252 seconds]
Heaven31415 has quit [Quit: Leaving]
DTZUZO_ has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
Raimondii has joined #crystal-lang
Raimondii is now known as Raimondi