ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.31.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> <alexherbo2> ``````
<FromGitter> <alexherbo2> ``````
<FromGitter> <alexherbo2> Erf
<FromGitter> <alexherbo2> How to multiline in the phone?
<FromGitter> <fridgerator> haha idk
<FromGitter> <fridgerator> kemal and amber have websocket suppport
<FromGitter> <alexherbo2> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d953ae79735874673e6c20c]
<FromGitter> <fridgerator> that might be easier than rolling your own
<FromGitter> <alexherbo2> It’s for the client that no?
<FromGitter> <fridgerator> server
<FromGitter> <alexherbo2> Not to initialize / listen
<FromGitter> <Blacksmoke16> or at least look how they do it
<FromGitter> <alexherbo2> Looks heavy
<FromGitter> <fridgerator> Kemal isn't very heavy
<FromGitter> <fridgerator> at least look at the source code
<FromGitter> <nsuchy> @fridgerator No it's on docker
<FromGitter> <nsuchy> Sorry had to go to dinner, with family earlier so couldn't keep responding
<FromGitter> <nsuchy> Unfortunately that's not an option as Admins are adding URLs thru the admin panel
<FromGitter> <nsuchy> It's weird because I can write a script that directly calls the API over HTTP Client
<FromGitter> <nsuchy> But even hard coding the URL doesn't fix it
<FromGitter> <nsuchy> when I pass the string over to the shard to handle things further it breaks
<FromGitter> <fridgerator> @nsuchy docker hosted on what? your local machine?
<FromGitter> <nsuchy> At ULayer we run our own Proxmox Hypervisor, the customer panel allows people to do stuff like restart their virtual machines and stuff, but with http/client broken, the entire panel is borked until we can figure out the DNS issue
<FromGitter> <nsuchy> and yes
<FromGitter> <nsuchy> it's Docker on Windows 10 Pro
<FromGitter> <nsuchy> I need to move a lot of internal logic into our shard so other people can benefit from it, currently the shard only generates an access ticket and csrf token
<FromGitter> <nsuchy> but initializing a new Proxmox Object Instance is broken as you can see :(
<FromGitter> <nsuchy> Nothing at ULayer (aside from maybe some css libs and crystal shards) uses AS
<FromGitter> <nsuchy> okay wow
<FromGitter> <nsuchy> really interesting
<FromGitter> <nsuchy> the same code works fine on production
<FromGitter> <nsuchy> so the issue connecting to proxmox seems to related to OpenVPN adding routes inside the docker container
<FromGitter> <plambert> Thanks @myfreeweb
<FromGitter> <nsuchy> So maybe DNS being pushed from OpenVPN is the issue
<FromGitter> <nsuchy> Production doesn't use OpenVPN since we have our internal network between our Proxmox Nodes
<FromGitter> <nsuchy> when developers are working on stuff and need to clone production, openvpn handles that
<FromGitter> <nsuchy> it's essentially staging at localhost
<FromGitter> <nsuchy> It's greta
<FromGitter> <nsuchy> okay yeah that's the issue
<FromGitter> <nsuchy> just started openvpn manually inside our docker container
<FromGitter> <nsuchy> it breaks dns
<FromGitter> <nsuchy> the culprit has been found
<FromGitter> <nsuchy> now to fix dns after openvpn starts
<FromGitter> <nsuchy> :|
pf_ has quit [Ping timeout: 268 seconds]
<FromGitter> <nsuchy> looks like openvpn sets 0.0.0.0/0 and blocks access to 127.0.0.11 which is where docker dns sits at, after openvpn starts overwriting dns to a public resolver fixes the issue
<FromGitter> <nsuchy> if anyone wants to discuss, this is an error message improvement that could be made
_whitelogger has joined #crystal-lang
f1refly has quit [Ping timeout: 250 seconds]
f1refly has joined #crystal-lang
<FromGitter> <nsuchy> http://json2csharp.com/
<FromGitter> <nsuchy> Does something like this exist for Crystal?
f1refly has quit [Quit: bye fags]
f1refly has joined #crystal-lang
<FromGitter> <nsuchy> also
<FromGitter> <nsuchy> measured the response time
<FromGitter> <nsuchy> it's taking 19 seconds for a response from proxmox to be returned
<FromGitter> <nsuchy> to crystal
rohitpaulk has joined #crystal-lang
chemist69 has quit [Ping timeout: 245 seconds]
chemist69 has joined #crystal-lang
rohitpaulk has quit [Remote host closed the connection]
<FromGitter> <vlazar> @nsuchy like https://quicktype.io ?
ht_ has joined #crystal-lang
ht_ has quit [Quit: ht_]
<FromGitter> <kingsleyh> Hi - if anyone wants to help me on my crypto / Blockchain project https://sushichain.io or my trading card game please message me - I can’t pay you sorry - but I could give you some tokens
<FromGitter> <kingsleyh> Sorry if this message offends anyone
<oprypin> πŸ˜‚
<FromGitter> <naqvis> @j8r Thanks for raising issue, I’m out of town and will look into it once i’m back.
alex`` has joined #crystal-lang
myfreeweb has left #crystal-lang [#crystal-lang]
alex`` has quit [Ping timeout: 240 seconds]
alex`` has joined #crystal-lang
<FromGitter> <stergiom> Does `JSON.mapping`allow abstract classes for types?
pf_ has joined #crystal-lang
<FromGitter> <stergiom> same question if `JSON::Serializable` is used instead
<FromGitter> <asterite> Only in the next crystal version, probably 0.32.0
devil_tux has quit [Quit: Lost terminal]
<FromGitter> <stergiom> ahh, that works :-)
HumanGeek has joined #crystal-lang
Human_G33k has quit [Ping timeout: 245 seconds]
<FromGitter> <kinxer> @asterite What does that mean? `JSON::Serializable` will be able to pick the correct subclass to instantiate if an abstract type is given?
<FromGitter> <nsuchy> @vlazar Yes exactly like that
<FromGitter> <nsuchy> But for Crystal
<FromGitter> <nsuchy> oh wait
<FromGitter> <nsuchy> it supports crystal
<FromGitter> <nsuchy> I feel dumb now
<FromGitter> <nsuchy> next question
<FromGitter> <nsuchy> I want to store a timestamp in MySQL and then check if an hour has passed
<FromGitter> <nsuchy> How do I check the difference of the current time and a timestamp in Crystal
<FromGitter> <nsuchy> I want to stop creating 5 access tokens per page load
<FromGitter> <nsuchy> For example check if `time.to_s # => 2016-02-15 10:20:30 UTC` is now `time.to_s # => 2016-02-15 11:20:30 UTC` or later
<FromGitter> <Blacksmoke16> `(time2 - time1) >= 1.hour`?
<sorcus> > 9453 root 20 0 23.3G 22.7G 5828 S 0.0 72.9 1:49.20 β”‚ └─ ./get_domains
<sorcus> This is what i got.
<FromGitter> <nsuchy> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d960df5b385bf2cc6686eff]
<FromGitter> <nsuchy> Time.now uses UTC, right?
<FromGitter> <Blacksmoke16> time.now is deprecated
<FromGitter> <Blacksmoke16> used time.local or time.utc
<FromGitter> <nsuchy> thanks
<alex``> re
<alex``> is `macro version` necessary here?
<alex``> instead of for example
<alex``> `` version = `<shell-cmd>` ``
ht_ has joined #crystal-lang
<sorcus> No ideas about memory usage? Even if i close DB connect and call GC.collect manual the program still using 20GB+ of memory.
<FromGitter> <bds> I would like a guard clause that covers when a Kemal request.body is empty. Is there an idiomatic way to check this without reading the whole stream with .gets?
<FromGitter> <Blacksmoke16> isnt there a header you can use?
<FromGitter> <bds> @Blacksmoke16 great idea, I probably can. ty!
<FromGitter> <Blacksmoke16> with no body or an empty body its 0, just tried it with kemal
<FromGitter> <Blacksmoke16> however could just be postman adding that for me
<FromGitter> <j8r> alex I would rather use `git rev-parse --short HEAD`
<FromGitter> <j8r> for the macro thing, it can be a method
<FromGitter> <j8r> Because here the macro will expand to `{{ git ...}}`, that will then be interpreted
<sorcus> j8r: can you help me with my question? Thanks.
<FromGitter> <j8r> sorcus if GC.collect doesn't collect anything, this means for the GC there is nothing to clear
<alex``> j8r: `git rev-parse --short HEAD` doesn’t show the version
<FromGitter> <j8r> alex: what do you want to show?
<FromGitter> <j8r> the latest tag?
<alex``> it's not me it's a pr
<FromGitter> <j8r> oh ok, sorry, so it is Ok
<FromGitter> <j8r> but if it was me I would put it in a class method of an object, not a macro in the top level namespace
<FromGitter> <j8r> sorcus: this probably means the code is architectured in a way there is no freeable memory for the GC (some king of recursiveness and/or loops?)
<FromGitter> <j8r> It is an open source project so I can take a a quick look?
<sorcus> j8r: https://gist.github.com/MrSorcus/21dd931aef58e2c607e42e2996023063 - this code just get strings from DB, count size and sleeps after all.
<sorcus> j8r: Maybe i don't understand something...
<sorcus> j8r: count_size method not used after line 17 and i think it should be released, no?
alex`` has quit [Ping timeout: 240 seconds]
alex`` has joined #crystal-lang
alex`` has quit [Ping timeout: 265 seconds]
alex`` has joined #crystal-lang
<sorcus> j8r: Crystal 0.31.1 [0e2e1d067] (2019-09-30), LLVM: 8.0.0, Default target: x86_64-unknown-linux-gnu
<FromGitter> <j8r> You could try using a different method than `query_all`
<FromGitter> <j8r> Does the data processed huge?
<sorcus> j8r: Database with ~200 millions domens.
<sorcus> j8r: Try `query` with block instead of `query_all`?
<sorcus> j8r: Yeap, that's better, only 8MB of memory used.
<sorcus> j8r: But why? Hmmm... Bug?
<sorcus> j8r: Hmmm, maybe result set, returned via `query_all` should be closed manually?
rohitpaulk has joined #crystal-lang
<FromGitter> <ImAHopelessDev_gitlab> 200m domains? good lord :O
<FromGitter> <ImAHopelessDev_gitlab> wait, you said domens? what are those
pf_ has quit [Ping timeout: 265 seconds]
<sorcus> ImAHopelessDev_gitlab: Lol, sorry. It's typo, i mean domains. :-D
<FromGitter> <ImAHopelessDev_gitlab> hahah, damn that's a lot lol
<FromGitter> <j8r> sorcus: I have looked at crystal-db's `query_all`. They are several overloads, but one is using an Array
<FromGitter> <j8r> If you have huge data to process, it could become a bottlemeck
pf_ has joined #crystal-lang
<sorcus> j8r: Ok, i will rewrite code. Thank you so much.
<FromGitter> <ilanpillemer> Hi. I must be doing something silly. But as far as I understand Arrays are passed by reference. But when I test in the playground and in code.. they dont seem to be?
<FromGitter> <tenebrousedge> @ilanpillemer this might be helpful https://robertheaton.com/2014/07/22/is-ruby-pass-by-reference-or-pass-by-value/
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
<FromGitter> <ilanpillemer> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d963be4874aeb2d23e1833e]
<FromGitter> <ilanpillemer> the `list` at the bottom remains `[β€œa”,”b”]`
<FromGitter> <tenebrousedge> yes
<FromGitter> <ilanpillemer> so what I am misunderstanding?
<FromGitter> <tenebrousedge> `items` on the left hand side in the method is a local variable
alex`` has quit [Ping timeout: 265 seconds]
<FromGitter> <ilanpillemer> aha!
<FromGitter> <ilanpillemer> so I shadowed it
<FromGitter> <tenebrousedge> yup
<FromGitter> <ilanpillemer> how do not shadow, but refer to it?
<FromGitter> <tenebrousedge> use a method that mutates the state
<FromGitter> <tenebrousedge> or, use the returned value from the method as the new state
<FromGitter> <ilanpillemer> I want to reduce allocations
alex`` has joined #crystal-lang
<FromGitter> <ilanpillemer> the `https://grox.io/about` course has this mistake in it.
<FromGitter> <ImAHopelessDev_gitlab> ```code paste, see link``` ⏎ ⏎ like this maybe? [https://gitter.im/crystal-lang/crystal?at=5d963ccd37073b36a065076f]
<FromGitter> <ilanpillemer> ahh <<
<FromGitter> <ilanpillemer> so because its not an assignement, it doesnt shadow?
<FromGitter> <tenebrousedge> `<<` mutates the state of the object it's called on
<FromGitter> <ilanpillemer> that makes sense.. thanks!
<FromGitter> <ilanpillemer> there doesnt seem to be a way to learn the grox team know they have mistake in their notes.
<FromGitter> <tenebrousedge> @ilanpillemer most methods that mutate state have a `!` at the end, but some do not
<FromGitter> <tenebrousedge> I've never heard of those guys before
<FromGitter> <tenebrousedge> I would plug [Exercism][https://exercism.io], personally
<FromGitter> <ilanpillemer> Its Bruce Tate’s company. They guy that writes lots of books on computer languages
<FromGitter> <ilanpillemer> Yes, he plus exercism too
<FromGitter> <tenebrousedge> huh
<FromGitter> <tenebrousedge> I might want to audit his course, then. I'm the main Crystal mentor there
<FromGitter> <ilanpillemer> Its part of a series. A new language every 2 months
<FromGitter> <ilanpillemer> and you vote on the next language
<FromGitter> <ilanpillemer> the first language in the course is Crystal
<FromGitter> <tenebrousedge> how interesting
<FromGitter> <ilanpillemer> its 4 weeks in.
<FromGitter> <ilanpillemer> the next one is either Pony, Ocaml or Rosie
<FromGitter> <ilanpillemer> I love learning languages..
<FromGitter> <tenebrousedge> It's fun for sure
<FromGitter> <ilanpillemer> I am also trying to figure out how to contribute to the main codebase as I want to send a pull request so that if the environment variable `TERM=dumb` there are no colors. But the trunk doesnt seem to be builing.
<FromGitter> <tenebrousedge> but what about the pretty colors?
<FromGitter> <ilanpillemer> I dont like pretty colours
<FromGitter> <tenebrousedge> :(
<FromGitter> <ilanpillemer> they distract me
<FromGitter> <ilanpillemer> and also I use the acme editor
<FromGitter> <ilanpillemer> which cant cope with them
<FromGitter> <tenebrousedge> huh
<FromGitter> <tenebrousedge> I prefer spacevim
<FromGitter> <ilanpillemer> http://acme.cat-v.org/
<FromGitter> <ilanpillemer> its a niche editor
<FromGitter> <ilanpillemer> you get basically 3 kinds of editors
<FromGitter> <ilanpillemer> the menu driven ones like vscode, eclipse, intellij
<FromGitter> <ilanpillemer> the character driven like vim, emacs
<FromGitter> <ilanpillemer> and then acme
<FromGitter> <ilanpillemer> anyway it wont work with colours
rohitpaulk has quit [Ping timeout: 240 seconds]
* FromGitter * tenebrousedge shrugs
<FromGitter> <ilanpillemer> anyway.. is the main trunk meant to be building currently or do I have some snafu I have to find.. do you know?
<FromGitter> <tenebrousedge> main trunk of...?
<FromGitter> <tenebrousedge> Crystal?
<FromGitter> <ilanpillemer> yes
<FromGitter> <tenebrousedge> that should definitely be building
<FromGitter> <tenebrousedge> what error are you seeing/
<FromGitter> <ilanpillemer> ok.. maybe its the llvm
<FromGitter> <tenebrousedge> distinctly possible
<FromGitter> <tenebrousedge> you followed the setup guide closely?
alex`` has quit [Ping timeout: 264 seconds]
alex`` has joined #crystal-lang
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/7osl is there not a way to combine splat and double splat args into a single method call?
<FromGitter> <ilanpillemer> as far as I could. Not sure about the llvm.
<FromGitter> <tenebrousedge> @Blacksmoke16 the book seems to imply that that's possible https://crystal-lang.org/reference/syntax_and_semantics/default_values_named_arguments_splats_tuples_and_overloading.html
<FromGitter> <Blacksmoke16> i got it to work by moving `**named_args` to the beginning
<FromGitter> <ilanpillemer> @Blacksmoke16 I think the order matters
<FromGitter> <Blacksmoke16> apparentl yso
<FromGitter> <ilanpillemer> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d96500a9735874673ee6d0f]
<FromGitter> <ilanpillemer> according to book I am reading
<FromGitter> <ilanpillemer> so the lexer/parser must require an ordering
<FromGitter> <ilanpillemer> ```def append(items,item) ⏎ items.concat item ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5d96526e3220922ffb22afc2]
<FromGitter> <ilanpillemer> That workewd
rohitpaulk has joined #crystal-lang
<FromGitter> <tenebrousedge> @ilanpillemer I'd prefer something like: ⏎ ⏎ ```items = [1,2]``` [https://gitter.im/crystal-lang/crystal?at=5d9653fd874aeb2d23e235c9]
<FromGitter> <tenebrousedge> a method seems kinda superfluous
<FromGitter> <Blacksmoke16> why not just do like `items << item` :S
<FromGitter> <Blacksmoke16> vs append(items, item)`
<FromGitter> <Daniel-Worrall> I have a strange issue. Crystal playground bound on my local ip won't finish code execution. The page loads, but it never gets past `Code Execution Started` ⏎ `crystal play -b 192.168.0.21 -v`
<FromGitter> <Daniel-Worrall> 1) 0.0.1 and 0.0.0.0 both work fine
<FromGitter> <Daniel-Worrall> It's on WSL if that is going to matter
ht_ has quit [Quit: ht_]
rohitpaulk has quit [Remote host closed the connection]
<oprypin> wait, is it just me or is Crystal completely broken on Travis https://travis-ci.org/oprypin/crsfml/jobs/593233892
<oprypin> yea it must be
<oprypin> cc @jwoertink
<oprypin> probably just me specifying dist: trusty
<oprypin> so nvm
<FromGitter> <ilanpillemer> @tenebrousedge yes. I wouldnt use it in real code. This is more about understanding the language.
<FromGitter> <ilanpillemer> @Blacksmoke16 that gave an error
<FromGitter> <Blacksmoke16> what was the error?
<FromGitter> <absolutejam_gitlab> evening
<FromGitter> <absolutejam_gitlab> Been over a month since I wrote some Crystal :)
<FromGitter> <Blacksmoke16> o/
<FromGitter> <kinxer> @ilanpillemer You're trying to concatenate the array `["c"]` to the array `["a", "b"]`; it seems like what you want is to try to append the string `"c"` to that array, instead.
<FromGitter> <Blacksmoke16> oh then yea if you want to join two arrays you need to use concat
<FromGitter> <Blacksmoke16> but i was more so meant why not just do that inline vs having a method that does it?
<FromGitter> <ilanpillemer> I would normally do it inline
<FromGitter> <ilanpillemer> this is just picking at the language to understand it better
<FromGitter> <Blacksmoke16> ah, πŸ‘
<FromGitter> <ilanpillemer> once I understand it enough I am going to try fo all the advent of code 2016 puzzles in Crystal
<FromGitter> <ilanpillemer> I just did all the 2015 ones in Go
Nekka has quit [Quit: zzz]
Nekka has joined #crystal-lang
Nekka has quit [Client Quit]
Nekka has joined #crystal-lang
alex`` has quit [Ping timeout: 240 seconds]
return0e has joined #crystal-lang
alex`` has joined #crystal-lang
return0e_ has quit [Ping timeout: 276 seconds]
<FromGitter> <ImAHopelessDev_gitlab> Hello
<FromGitter> <tenebrousedge> how's goes?
<FromGitter> <ImAHopelessDev_gitlab> fiddling around with nim and annoying everyone on their forum. doing my part.gif
<FromGitter> <tenebrousedge> ah
<FromGitter> <jwoertink> @oprypin getting crsfml working on latest crystal?
<FromGitter> <Daniel-Worrall> ```code paste, see link``` ⏎ ⏎ So with the #mapping's looking to be deprecated, is this the recommended way of handling Structs? [https://gitter.im/crystal-lang/crystal?at=5d966cd0464b432fc1b4edf6]
<FromGitter> <tenebrousedge> @Daniel-Worrall looks like it. The API (https://crystal-lang.org/api/0.31.1/JSON/Serializable.html) has an example that looks like that
<FromGitter> <Daniel-Worrall> Well, without record
<FromGitter> <tenebrousedge> right
<FromGitter> <tenebrousedge> but record/serializable does work like that
<FromGitter> <Daniel-Worrall> Okay cool
<FromGitter> <ImAHopelessDev_gitlab> RIP JSON.mapping, you will be missed
<FromGitter> <absolutejam_gitlab> wat
<FromGitter> <tenebrousedge> @absolutejam_gitlab https://github.com/crystal-lang/crystal/issues/8263
<FromGitter> <wontruefree> @ImAHopelessDev_gitlab did you comment on the Issue?
<FromGitter> <wontruefree> might be worth mentioning
<FromGitter> <ImAHopelessDev_gitlab> I tried, but then I realized the points asterite made, i can't really rebuke any so I figured I shouldn't embarrass myself πŸ˜†
<FromGitter> <absolutejam_gitlab> oh you can just define properties and `include` the serializable
<FromGitter> <absolutejam_gitlab> that's fucking awesome
<FromGitter> <ImAHopelessDev_gitlab> yeah the serializable way is nice
<FromGitter> <absolutejam_gitlab> One thing I never figured out - and by that, I mean spent more than a few seconds looking at - is how to serialize a class/struct from a data structure that might look ambiguous
<FromGitter> <ImAHopelessDev_gitlab> i like json.mapping too, but i think serializable is more powerful in the long run. plus, it would better to have a non-ambiguous way of statically parsing json at 1.0 i think
<FromGitter> <tenebrousedge> @absolutejam_gitlab generally Crystal isn't going to handle that kind of ambiguity well. It's going to expect that things are going to be one thing or another
alex`` has quit [Quit: WeeChat 2.6]
<FromGitter> <Blacksmoke16> @absolutejam_gitlab should check out my serialization shard πŸ˜‰
alex`` has joined #crystal-lang
<FromGitter> <Blacksmoke16> been working on the deserialization side of things lately
<FromGitter> <absolutejam_gitlab> @tenebrousedge well I assume there's a way to supply some logic myself but I just never looked into it
<FromGitter> <absolutejam_gitlab> There may well be a better way, but I never really tested it :shrug:
<FromGitter> <Blacksmoke16> got an example?
<FromGitter> <absolutejam_gitlab> was a swagger spec I was working off a while back
<FromGitter> <Blacksmoke16> ah that
<FromGitter> <absolutejam_gitlab> some of the fields could return different child object types
<FromGitter> <Blacksmoke16> depending on a key?
<FromGitter> <absolutejam_gitlab> Been all about go recently so not had a chance
<FromGitter> <absolutejam_gitlab> yeah usually
<FromGitter> <Blacksmoke16> i.e. like `{"type": "something", ...}`
<FromGitter> <absolutejam_gitlab> or if a certain field exists
<FromGitter> <Blacksmoke16> @asterite has a PR for https://github.com/crystal-lang/crystal/pull/8185, prob would be partially helpful
<FromGitter> <kinxer> One day I'm going to put the GeoJSON library I wrote on GitHub, and then I'll be able to reference it here... Ambiguous values is a problem I had to solve for that.
<FromGitter> <Blacksmoke16> tl;dr it just tries deserializing each child type until it finds one that works
<FromGitter> <Blacksmoke16> or errors if none do
<FromGitter> <absolutejam_gitlab> that's be awesome
<FromGitter> <kinxer> Hard agree.
<FromGitter> <Blacksmoke16> i mean thats what the PR does :p
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/7j9d was the example i through together for my shard
<FromGitter> <Blacksmoke16> i.e. parse the data first then deserialized off that, so you have access to discriminator fields and stuff
<FromGitter> <kinxer> Yeah, that's what I did, too. The ambiguous value I had to deal with was a nested array with an uncertain depth, so I just wrote up a simple tree for it and deserialized it into that, and then I made objects from the tree.
<FromGitter> <kinxer> I tend to be light on the macros, though, so my implementation isn't as fancy as yours. :P
<FromGitter> <Blacksmoke16> kinda comes with the territory with using annotations since thats the only way
pdkl has joined #crystal-lang
Nekka has quit [Ping timeout: 245 seconds]
pf_ has quit [Ping timeout: 265 seconds]
Nekka has joined #crystal-lang
alex`` has quit [Ping timeout: 265 seconds]