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
<FromGitter> <fridgerator> I see the crystal release is on the front page of HN
<FromGitter> <dscottboggs_gitlab> ...why? there's like, very little interesting in this release
<oprypin> it is hinting towards concurrency and Windows
<FromGitter> <fridgerator> @dscottboggs_gitlab who cares, its free pub
<FromGitter> <dscottboggs_gitlab> just seemed strange to me.
<FromGitter> <pitosalas> Hi... quick question...
<FromGitter> <pitosalas> which cli library do you recommend for a simple cli?
<FromGitter> <dscottboggs_gitlab> I usually use OptionParser since it's in the Stdlib
<FromGitter> <dscottboggs_gitlab> I know there are some that offer nicer features though
<oprypin> mosop/cli
<oprypin> ehh nevermind
<FromGitter> <pitosalas> do you have an example of option parser doing a two level command, e.g. like git?
<FromGitter> <dscottboggs_gitlab> yeah, it wouldn't do that. If you wanted to use optionparser with a CLI with that feature you'd have to manually check `ARGV`
<FromGitter> <dscottboggs_gitlab> https://github.com/veelenga/awesome-crystal#cli-builders ⏎ ⏎ I'm pretty sure I've seen commander used to create a CLI like that
<FromGitter> <pitosalas> I did read that crystal itself uses option_parser... but m reading of the doc made me think that it didn't easily do two level commands
<FromGitter> <dscottboggs_gitlab> that's a good point
<FromGitter> <pitosalas> anyone have a good codesample with commander that would be willing to share?
<FromGitter> <dscottboggs_gitlab> that's the crystal command line interface
<FromGitter> <pitosalas> I was looking for that but didn't know which of the many files!! thanks that's great!!
<FromGitter> <dscottboggs_gitlab> they have a bunch of different OptionParser files for the different subcommands and they manually check ARGV for the commands with a `case...when`
<FromGitter> <dscottboggs_gitlab> np, it took me a minute to find it too
<FromGitter> <j8r> @pitosalas if you wish something declarative: https://github.com/j8r/clicr
<FromGitter> <j8r> L
<FromGitter> <j8r> OptionParser is bad, better to directly parse ARGV
_ore has quit [Quit: leaving]
_ore has joined #crystal-lang
rohitpaulk has joined #crystal-lang
<FromGitter> <dscottboggs_gitlab> yeah, honestly I'm liking ⏎ ⏎ ```while arg = ARGV[i += 1] ⏎ case arg == "something" ⏎ ....``` [https://gitter.im/crystal-lang/crystal?at=5bde476c995818347b9c56ad]
<FromGitter> <dscottboggs_gitlab> more than option parser
rohitpaulk has quit [Ping timeout: 272 seconds]
<FromGitter> <j8r> What? No, just `while !ARGV.empty?` and `ARGV.first`
<FromGitter> <dscottboggs_gitlab> huh? does `#first` do a pop off the front? I thought that was just an accessor
<FromGitter> <j8r> Then `ARGV.shift`
<FromGitter> <dscottboggs_gitlab> also I ripped that code sample straight off of you so....
<FromGitter> <dscottboggs_gitlab> lol
<FromGitter> <dscottboggs_gitlab> shit I made a mistake actually
<FromGitter> <dscottboggs_gitlab> ahhh it's too late to edit! I meant to say `#[]?` on argv
<FromGitter> <j8r> Basically, without the macros, https://github.com/j8r/clicr/blob/master/src/clicr.cr#L65
<FromGitter> <j8r> Don't also forget the `--help` ;)
rohitpaulk has joined #crystal-lang
<FromGitter> <dscottboggs_gitlab> > https://github.com/j8r/clicr/blob/master/src/clicr.cr#L65 ⏎ ⏎ that's a nifty bit of code there though
<FromGitter> <j8r> That's wooorse :|
<FromGitter> <dscottboggs_gitlab> you wrote it! :p hahahaha
<FromGitter> <j8r> Nope that's not me. Or do a `.each`
<FromGitter> <dscottboggs_gitlab> I don't get what's wrong with it?
<FromGitter> <j8r> I've extracted it from @ysbaddaden repo
<FromGitter> <dscottboggs_gitlab> ah
<FromGitter> <j8r> Because you can avoid having this `i` counter
<FromGitter> <dscottboggs_gitlab> true
<FromGitter> <dscottboggs_gitlab> but it's convenient
<FromGitter> <dscottboggs_gitlab> for referencing the next and previous
<FromGitter> <dscottboggs_gitlab> although if you do .shift then you can use absolute indexes and I agree that's more readable
<FromGitter> <j8r> No need to previous :)
<FromGitter> <dscottboggs_gitlab> what if I WANT to!? haha
rohitpaulk has quit [Ping timeout: 252 seconds]
<FromGitter> <j8r> Store it
<FromGitter> <j8r> But yeah, the problem with shift it it consumes the array
<FromGitter> <j8r> But doing += 1 is not really optimized nor cute
<FromGitter> <j8r> The autobind cli needs to be overhauled
_whitelogger has joined #crystal-lang
thews has quit [Ping timeout: 250 seconds]
thews has joined #crystal-lang
_ore has quit [Remote host closed the connection]
<FromGitter> <bew> @bcardiff btw what is the `unstable` branch of crystal-website repo?
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
akaiiro has quit [Remote host closed the connection]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 244 seconds]
rohitpaulk has joined #crystal-lang
I_Right_I has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 245 seconds]
<I_Right_I> Hi, I am new to crystal coming from languages like C,C# and a little Rust. I was wondering if anyone know any example code or tutorials using XML::Reader?
<I_Right_I> Or would ruby tutorials be equivalent?
<FromGitter> <swinSpo> hi all
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 252 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
<FromGitter> <swinSpo> crystal is so interesting..
<FromGitter> <swinSpo> but the lack of stable v1 is sort of a deal breaker.. will we see a v1 release this year?
I_Right_I has quit [Remote host closed the connection]
<FromGitter> <dscottboggs_gitlab> @swinSpo not likely. Concurrency works, but Windows and multiprocessing needs work, plus some polish. It's really not bad to use as is, depending on the workload. Would I try to develop a Windows desktop app in crystal righ now? hell no. It's definitely my first choice of language for back-end server-side stuff though.
_whitelogger has joined #crystal-lang
<FromGitter> <Val> @bew thanks, I'll review your PRs today and fix 0.27 related issues
rohitpaulk has joined #crystal-lang
<FromGitter> <dscottboggs_gitlab> @bew I finished that shard we were talking about the other day, with the bindings https://github.com/dscottboggs/magic.cr
<FromGitter> <bew> Ty @Val
<FromGitter> <bew> Cool @dscottboggs_gitlab
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <bew> Is it possible to use the same instance of `TypeChecker` for all operations? @dscottboggs_gitlab
<FromGitter> <dscottboggs_gitlab> It is but I was thinking that would be slower.
<FromGitter> <dscottboggs_gitlab> because that would require calling to libmagic to set the options then again to get the information.
<FromGitter> <bew> I don't see why it would be slower
<FromGitter> <dscottboggs_gitlab> I'm probably just overthinking it
Raimondii has joined #crystal-lang
ashirase has quit [Ping timeout: 272 seconds]
Raimondi has quit [Ping timeout: 240 seconds]
Raimondii is now known as Raimondi
ashirase has joined #crystal-lang
<FromGitter> <dscottboggs_gitlab> it's a tie lol ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bdecc695905a9195550665c]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 252 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 245 seconds]
ua has quit [Ping timeout: 268 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
ua has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 245 seconds]
ua has quit [Ping timeout: 250 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
ua has joined #crystal-lang
<FromGitter> <bararchy> Should I now use `(Time.utc_now - Time::UNIX_EPOCH).to_i` instead of `Time.now.epoch` ?
<FromGitter> <bararchy> Thanks oprypin
<FromGitter> <pitosalas> @j8r Is Clicr yours? Do you have an example with simple subcommands? (Although I am just doing it easy argv/argc way like suggested above :)
rohitpaulk has joined #crystal-lang
bmcginty has quit [Ping timeout: 244 seconds]
bmcginty has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 250 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <Val> Crystal 0.27.0 still not available for OsX on Travis ? ( https://travis-ci.org/Val/crun/jobs/450480834 )
<FromGitter> <Val> Or else Homebrew not updating :-/
<FromGitter> <kingsleyh> I'm also waiting for 0.27.0 for homebrew for Mac
<FromGitter> <fusillicode_twitter> I know that is not a solution mates but in the meantime try to see if you can work in a dockerized environment :)
<FromGitter> <fusillicode_twitter> I mean, try to see if you can test & run your applications in a docker container. There is already a 0.27.0 Crystal version ;)
<FromGitter> <Val> I prefer to keep my `.travis.yml` as simple as possible
<FromGitter> <Val> And wait, we are legion =)
<FromGitter> <Val> tomorrow at work I will change my mind if needed
<FromGitter> <kingsleyh> It would be nice if the release of binaries to platforms could happen at the same time and in an automated way - rather than some platforms getting it and others having to wait. I don't want to u/g my lib if it will cause Mac users a big pain to use my latest version - since they will have to do workarounds.
<FromGitter> <j8r> @pitosalas https://github.com/j8r/clicr#simple-example - is it simple enough? You can only keep the `commands` if you want
<FromGitter> <j8r> the lib is quite minimal, it saves you the `while ARGV` and `case when` boilerplates :)
<FromGitter> <j8r> maybe the README has to be improved?
rohitpaulk has quit [Ping timeout: 252 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <pitosalas> @j8r yes and no :) It's simple but I have to mentally reverse engineer, e.g. what is possible in that big hash and what each of the options mean. Also Don't see how to do a two level command from the examples.
<FromGitter> <pitosalas> but... for now I decided to go with advice above: https://github.com/pitosalas/hacr/blob/master/src/hacr.cr
<FromGitter> <pitosalas> So easy.
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 272 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 245 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 250 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 252 seconds]
<FromGitter> <deansher> I want to create a heterogeneous map type. The idea (somewhat common in languages like Haskell or OCaml) is that the type of the key determines the type of the value: `set(k : HKey(T), v : T) : HMap forall T`. But to do this, I need a single `HMap` instance to be able to internally store any type, or at least any `Reference`. ⏎ ⏎ Unfortunately, the compiler complains when I try to use `Object` or
<FromGitter> ... `Reference`as a type parameter: `can't use Object as a generic type argument yet, use a more specific type`. Trying to wrap with `Pointer` or `Box` doesn't help because I just get the same compiler error at that level. Is there a way to do this in Crystal today?
<FromGitter> <Blacksmoke16> are all your values custom classes?
<FromGitter> <deansher> I want `HMap` to be entirely generic -- able to hold any type. Or at least any reference type.
<FromGitter> <deansher> Hmm -- actually I guess I've also been expecting to be able to have value types as values. E.g. Int32.
<FromGitter> <deansher> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bdf231db9c91919549eaa3f]
<FromGitter> <deansher> `:joy_spec` there is a namespace for the key.
I_Right_I has joined #crystal-lang
<FromGitter> <deansher> Hah, I may have found it:
<FromGitter> <deansher> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bdf24d5076992347ab60de1]
<FromGitter> <j8r> @pitosalas all should b explained in the `README`, there is a simple and complex example. There is also a reference explaining each key in the NamedTuple
<FromGitter> <j8r> @pitosalas your `case` is reversed: do `case command; when .starts_with? "help"` for example
<FromGitter> <j8r> Tell me what to do if something miss in the doc, happy to fix that 😄
<FromGitter> <deansher> Ok, looks like my internal data structure needs to store `Void*`s, which I can create from `Object`s using `Box`. Is this right?
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 268 seconds]
I_Right_I has quit [Remote host closed the connection]
rohitpaulk has joined #crystal-lang
<FromGitter> <deansher> Have I hung myself here? Or any other suggestions? This is my first nontrivial Crystal class. :-) ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5bdf2f9d6ab3f85bdd039083]
rohitpaulk has quit [Ping timeout: 260 seconds]
hightower2 has joined #crystal-lang
<hightower2> Hey, is there a sort of a guide for porting ruby apps to crystal? (Primarily focused on more advanced topics, of course, like recipes for working around Object#send and so on.)
<hightower2> (Seems like topic needs updating to 0.27)
<FromGitter> <j8r> @dscottboggs we can't avoid `!` in advanced conditions, but we can always avoid `unless`. Same for `while` vs. `until` and `loop`. So the beginner has to learn this classic syntax, and one more for `unless` since (s)he will see it. nvm, hat's not a big point,this is opinionated. Do as you wish.
<FromGitter> <j8r> I prefer `!` than `not`, shorter, more expressive
<FromGitter> <LtStaffel_gitlab> Hello, my Crystal program won't stop waiting for more input when I use this line of code: num = gets.not_nil!.chomp.to_s
<FromGitter> <LtStaffel_gitlab> What am I doing wrong?
<FromGitter> <j8r> what do you want @LtStaffel_gitlab ?
<FromGitter> <j8r> what is "more input", you want to write something, press enter, write something again, press enter etc?
<FromGitter> <LtStaffel_gitlab> @j8r I want to get user input as a string, stop at the first \n, and to discard the \n at the end
<FromGitter> <LtStaffel_gitlab> so write something, press enter once and be done
<oprypin> something is wrong with your terminal, that code is supposed to work
<FromGitter> <LtStaffel_gitlab> right now with that line it will wait for input, I'll type something and press enter, and it will just put me on a newline in my terminal and not stop waiting for more
<FromGitter> <j8r> not related, but you can `num = gets(chomp: true).not_nil!`
<FromGitter> <LtStaffel_gitlab> Okay
<oprypin> just use read_line and not gets.not_nil!
<FromGitter> <LtStaffel_gitlab> Anything I can check with my terminal settings to try and fix it? I'm on Linux Mint 19
<oprypin> how do you launch the program?
<oprypin> and have you tried having only that piece of code alone?
<FromGitter> <LtStaffel_gitlab> from the terminal, like this: "crystal <programename.cr>"
<FromGitter> <LtStaffel_gitlab> also read_line works
<oprypin> what do you mean by works?
<FromGitter> <LtStaffel_gitlab> well now gets.not_nil! works as well, and my definition of works is that I have a line with: num = gets.not_nil! and then I puts num and it prints properly
<FromGitter> <LtStaffel_gitlab> after I type something and press enter once
<FromGitter> <LtStaffel_gitlab> what was wrong with that line I had previously?
<oprypin> nothing. and i bet even that line will work now
<FromGitter> <LtStaffel_gitlab> okay. Well thanks for being the cardboard programmer! lol
<FromGitter> <j8r> @dscottboggs_gitlab released! https://github.com/j8r/con . I'm working on specs
<FromGitter> <dscottboggs_gitlab> nice
<FromGitter> <dscottboggs_gitlab> did I see that you're using class's JSON::PullParser initializers to initialize CON?
<oprypin> jokke, you know what? znc does suck. I'm on Quassel now
<jokke> :)
<FromGitter> <j8r> @dscottboggs_gitlab no? Nut i'm force pushing to clean some other things
<FromGitter> <dscottboggs_gitlab> oh it looked like the docs said that in the readme.
<FromGitter> <j8r> type :|
<FromGitter> <j8r> @dscottboggs_gitlab corrected thanks
<FromGitter> <dscottboggs_gitlab> ah
<FromGitter> <dscottboggs_gitlab> I see
<FromGitter> <j8r> any other remark :)? Still a draft
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 245 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
riceandbeans has joined #crystal-lang
<riceandbeans> Random question, what would it take to get interest in porting this to other OSes?
<oprypin> riceandbeans, "this"?
<riceandbeans> crystal
<riceandbeans> oprypin: Namely, DragonFly BSD
<riceandbeans> There's a FreeBSD port, I don't personally have the time at the moment ( nor probably the required skill ), to successfully patch it
<oprypin> riceandbeans, there is no process. people do it out of personal interest
<oprypin> i suppose if you could pay full time wage that might also work
<riceandbeans> :P That I can't quite afford, I'm but a lowly devops guy myself
<riceandbeans> Truth be told I'd forgotten about the project for a while and someone reminded me
<riceandbeans> I wouldn't mind donating small amount regularly but I can't afford to pay full time wage
<riceandbeans> I'll tell you what though
<riceandbeans> I'll try to figure out, if I can, how to unbreak FreeBSD port to get it on DragonFly
<riceandbeans> Our ports are based on FreeBSD ports with patches to make it build on DragonFly
<riceandbeans> If it gets too hairy though I'm probably not going to be able to do it
<FromGitter> <dscottboggs_gitlab> afaik all you need is the right versions of a few libraries (libssl, libgc, etc) and a crystal binary, then it's just a matter of running `make`
<FromGitter> <j8r> if it's a new arch you need to create LibC bindings
<FromGitter> <j8r> then cross compile, then link in the new arch with the exact same library versions
<FromGitter> <dscottboggs_gitlab> wait, why do you need to create LibC bindings, aren't they in the stdlib?
<FromGitter> <j8r> i don't know, some may miss. I'm talking in general
<riceandbeans> It's a new OS so it's more than just get a crystal binary, you can't just boostrap it, you have to be able to port the build
<riceandbeans> I assume the FreeBSD port is actually able to do something beyond building crystal with crystal, because if it requires the bootstrap too then I have no way to build for my OS
<FromGitter> <dscottboggs_gitlab> the only way to build crystal is from crystal. The only other way to do it is to build the original crystal version from ruby, then build each successive version until you're at the latest.
<FromGitter> <dscottboggs_gitlab> I agree it's not ideal, but it's a nifty way of creating a compiled language without having to write a bunch of C.
return0e_ has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
<riceandbeans> I mean, it's cool, but it's a miserable experience for porting to new OSes :P
<oprypin> @dscottboggs_gitlab, the part that really sucks is you also have to travel in time through LLVM versions
<FromGitter> <dscottboggs_gitlab> oh man
<FromGitter> <dscottboggs_gitlab> I can't even imagine trying to do that. You'd need a couple dozen separate VMs with separate configurations from different time periods
<oprypin> mm VMs, havent thought of that
<oprypin> could be a fun project with a distro like ubuntu
<oprypin> but most others would make it hell
<oprypin> doesnt apply to non-linux anyway... there was no BSD support in initial versions
_ore has joined #crystal-lang
return0e has quit []
<riceandbeans> Yeah, this is to target a fork of FreeBSD from like.....15 years ago?
<riceandbeans> I mean, it's still actively developed but it forked I guess more like 11 years ago, not quite 15
<riceandbeans> 2007
<oprypin> why is 2007 11 years ago
<riceandbeans> 2018-2007?
<riceandbeans> Unless this flu has fried my brain more than I think it has.
<oprypin> the math works out perfectly but i still cannot comprehend it
<riceandbeans> Funny how age creeps up on you
<riceandbeans> I realized I was old, but my kids showed me just how old I was
<riceandbeans> They get hurt and bounce back, I get hurt and have a recovery period
moei has quit [Quit: Leaving...]
dostoyevsky has quit [Quit: leaving]
dostoyevsky has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 252 seconds]
<FromGitter> <dscottboggs_gitlab> so you would *need* to do the bootstrap method then?
<riceandbeans> You can't bootstrap with something that doesn't exist
<FromGitter> <dscottboggs_gitlab> why not a binary built for the same arch for linux, with the same versions?
<FromGitter> <j8r> then cross-compile the compiler for the target triple you aim, then link on it
<FromGitter> <j8r> but not easy :(
<FromGitter> <dscottboggs_gitlab> it would be nice if the crystal binary were able to be self-contained, including the libraries.
return0e has joined #crystal-lang
<FromGitter> <dscottboggs_gitlab> maybe someday
<FromGitter> <j8r> It is already, statically linked
<FromGitter> <dscottboggs_gitlab> so you could just drop a crystal binary into any X86 system which has the POSIX libc and it should be able to run, correct?
<FromGitter> <dscottboggs_gitlab> (and hence compile itself)
<FromGitter> <j8r> you need the `.a`, but yes https://github.com/crystal-lang/crystal/releases
<FromGitter> <j8r> the archives already embeds `libgc.a` IIRC
<FromGitter> <dscottboggs_gitlab> then what makes it so difficult?
<FromGitter> <j8r> And you need the same Kernel
<FromGitter> <j8r> same kernel and arch
<FromGitter> <dscottboggs_gitlab> oh
<FromGitter> <dscottboggs_gitlab> oh
<FromGitter> <j8r> you may still run it with degraded performance, through `qemu`
<FromGitter> <dscottboggs_gitlab> I mean, if your kernel has qemu
<FromGitter> <dscottboggs_gitlab> the point is trying to run it on a BSD
<FromGitter> <dscottboggs_gitlab> which isn't a linux kernel, but is still a posix system
<FromGitter> <j8r> but qemu is emulation, this defeat the purpose of native execution
<FromGitter> <j8r> cross-compilation is a process done with the Windows port
<FromGitter> <dscottboggs_gitlab> i see now
<FromGitter> <dscottboggs_gitlab> So I have a weird thing that's happening to me
<FromGitter> <dscottboggs_gitlab> I get ⏎ ⏎ ```wrong number of arguments for 'Hash(String, String)#initialize' (given 1, expected 2)``` ⏎ ⏎ when I try to compile a JSON::Serializable class. The error is at a line for a property of type `Hash(String, String)`. [https://gitter.im/crystal-lang/crystal?at=5bdf7fea076992347ab84bf1]
<FromGitter> <dscottboggs_gitlab> I created a minimal example and the same thing didn't happen
rohitpaulk has joined #crystal-lang
<FromGitter> <Blacksmoke16> got a same code pen?
rohitpaulk has quit [Ping timeout: 244 seconds]
<FromGitter> <dscottboggs_gitlab> yeah I'll pastebin it the error alone is a couple thousand lines due to macro expansion
<FromGitter> <Blacksmoke16> or just put the code in
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org
<FromGitter> <Blacksmoke16> if its not a bunch of lines...
<FromGitter> <dscottboggs_gitlab> well I was going to do that, but the minimal example I worked up didn't do it at all
<FromGitter> <Blacksmoke16> you on 0.27?
<FromGitter> <dscottboggs_gitlab> I'm working on the Docker API client and it has a LOT of separate JSON response types
<FromGitter> <dscottboggs_gitlab> yes
<FromGitter> <dscottboggs_gitlab> https://pastebin.com/F9ut2ikb
<FromGitter> <dscottboggs_gitlab> that's the error message
<FromGitter> <dscottboggs_gitlab> Here's the code for the class in question
<FromGitter> <dscottboggs_gitlab> https://play.crystal-lang.org/#/r/5flx
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 252 seconds]
<FromGitter> <dscottboggs_gitlab> I think I'm going to go back to using JSON::Mappings. LIke I know you guys like the Serializable feature and want people to use it but the Mapping is just more flexible and useful. If I want to change the way things are handled, I can just replace JSON::Mapping with my own macro and not have to rewrite the whole class.
<FromGitter> <Blacksmoke16> am semi afk eating atm, but the features should be the same
<FromGitter> <dscottboggs_gitlab> although, JSON::Serializable would be useful inside a custom macro so it's nice to have both
<FromGitter> <Blacksmoke16> i.e. afaik everything you can do with the mapping is doable with the Serializable stuff
<riceandbeans> This isn't linux, this is a BSD, with a kernel that is not ABI compatible with Linux nor with other BSDs like FreeBSD, it's more of a pain than you're hoping for
<FromGitter> <dscottboggs_gitlab> ouch
<FromGitter> <Blacksmoke16> bk, also get some other features you dont get with mapping stuff
<FromGitter> <Blacksmoke16> afaik