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
<renich> Blacksmoke16: thanks a ton, man. You rock.
<FromGitter> <Blacksmoke16> np
<renich> I have another question: https://play.crystal-lang.org/#/r/6yex. In that case, I get my NICs as arrays. How can I get the name of them and put it in Nic?
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/6yey
<FromGitter> <Blacksmoke16> if you're stuck with your previous format then might be a bit trickier
<FromGitter> <Blacksmoke16> because currently you eth0:` etc are just keys in type `Nic` that are empty strings
<renich> Blacksmoke16: Thanks again, mate!
<FromGitter> <Blacksmoke16> if you control the format of the yaml, just do like `name: eth0`, that would be the best option
<renich> Blacksomke16: I do control both ends. I'm generating the yaml and they asked for a csv parser so no worries
<FromGitter> <Blacksmoke16> πŸ‘
<renich> Thanks a lot, man. You're really helping me get through it. :D
<FromGitter> <Blacksmoke16> np
<FromGitter> <Daniel-Worrall> Is anyone else getting Invalid memory access' from `crystal spec -d`
<alexherbo23> what is the idiomatic way to handle optional values? I have a JSON message { id, command, arguments, shell, input }, and from that message I call Process.run(command, arguments, ...), how I can handle JSON arguments, input, or shell can not be given when calling Process.run
<FromGitter> <Blacksmoke16> @Daniel-Worrall yes
<alexherbo23> 'class Message; JSON.mapping({ id: String | Nil, shell: Bool | Nil, command: String, arguments: Array(String), input: String | Nil }); end
<alexherbo23> '
<FromGitter> <Daniel-Worrall> I couldn't find an Issue for it, so I'll report it
<FromGitter> <Blacksmoke16> making the nilable or give a default value
<alexherbo23> how?
<FromGitter> <Blacksmoke16> you already did in your mapping
<FromGitter> <Blacksmoke16> could shorten those to like `String?` instead of `String | Nil`
<alexherbo23> Process.run will accept giving shell nil?
<FromGitter> <Blacksmoke16> do you have a more complete example?
<alexherbo23> 'status = Process.run(command: request.command, args: request.arguments, shell: request.shell, input: stdin, output: stdout, error: stderr)'
<alexherbo23> with 'request = Message.from_json(json)'
<FromGitter> <Blacksmoke16> https://crystal-lang.org/api/0.28.0/Process.html#run%28command%3AString%2Cargs%3Dnil%2Cenv%3AEnv%3Dnil%2Cclear_env%3ABool%3Dfalse%2Cshell%3ABool%3Dfalse%2Cinput%3AStdio%3DRedirect%3A%3AClose%2Coutput%3AStdio%3DRedirect%3A%3AClose%2Cerror%3AStdio%3DRedirect%3A%3AClose%2Cchdir%3AString%3F%3Dnil%29%3AProcess%3A%3AStatus-class-method
<FromGitter> <Blacksmoke16> shell takes a bool, so could set your shell property to have a default of `false` in your mapping
<FromGitter> <Blacksmoke16> and remove the Nil from the type
<FromGitter> <Daniel-Worrall> https://github.com/crystal-lang/crystal/issues/7558 @Blacksmoke16 do you think this is the same issue? Should I make a new Issue or comment that it affects spec too
<alexherbo23> for example, if request.shell == nil
<alexherbo23> I cannot pass
<alexherbo23> 'status = Process.run(command: request.command, args: request.arguments, shell: request.shell, input: stdin, output: stdout, error: stderr)'
<alexherbo23> how can i give a default value to request.shell?
<FromGitter> <Blacksmoke16> prob like `JSON.mapping(shell: {type: Bool, default: false}, ...)`
<alexherbo23> I think it is the same when I pass stdin with Process.run(
<FromGitter> <Blacksmoke16> @Daniel-Worrall sure seems pretty similar
<alexherbo23> if request.stdin is nil, I do not want to pass an input to Process.run
<alexherbo23> but I find ugly to do
<alexherbo23> if request.stdin
<alexherbo23> Process_with_stdin
<alexherbo23> else
<FromGitter> <Blacksmoke16> it seems you going to have some validation of your json obj
<alexherbo23> ..
<FromGitter> <Blacksmoke16> whats wrong with like `return if request.shell.nil?`
<FromGitter> <Blacksmoke16> then after that run your process
<FromGitter> <Blacksmoke16> or if you default it to false (and false is not a valid shell) could do like
<FromGitter> <Blacksmoke16> `return unless request.shell`
<alexherbo23> is stdin = IO::Memory.new; stdin << "some-data"; Process.run(...., input: stdin) the idiomatic way to pass data to input?
<alexherbo23> apparently it need 'stdin.rewind' before
<alexherbo23> What do you think of this code? https://gist.github.com/alexherbo2/d378aebbba2c492bc8c61638e6e9e9bf
<alexherbo23> is it horrible?
<alexherbo23> i'm not used to the idiom way to do things but I managed to make things working
<alexherbo23> I removed the Chrome::Shell generated by crystal init, not knowing if module have their use here
<FromGitter> <Blacksmoke16> not familiar enough with whats going on to have any input
alexherbo23 has quit [Quit: The Lounge - https://thelounge.chat]
laaron has quit [Remote host closed the connection]
alexherbo2 has joined #crystal-lang
laaron has joined #crystal-lang
<alexherbo2> re
<FromGitter> <pynixwang> whats the faas usage sense?
<FromGitter> <pynixwang> background job?
<FromGitter> <pynixwang> image processing?
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
renich has quit [Remote host closed the connection]
<FromGitter> <watzon> So I republished my Doing Crystal articles on dev.to since Medium has set up that stupid ass paywall. Anyone who wants to take a look can check out my profile https://dev.to/watzon
<FromGitter> <pynixwang> https://github.com/crystal-lang/crystal/issues/7808 gmp not prevent dos
<FromGitter> <pynixwang> ruby 's bigdecimal is not affected.
ShalokShalom has joined #crystal-lang
issyl0 has quit [Ping timeout: 252 seconds]
Liothen has quit [Ping timeout: 252 seconds]
issyl0 has joined #crystal-lang
Liothen has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
DTZUZO_ has quit [Ping timeout: 268 seconds]
return0e_ has joined #crystal-lang
return0e has quit [Ping timeout: 258 seconds]
sz0 has quit []
sz0 has joined #crystal-lang
ashirase has quit [Ping timeout: 250 seconds]
jokke1 has quit [Ping timeout: 258 seconds]
jokke1 has joined #crystal-lang
DTZUZO_ has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron- has joined #crystal-lang
_whitelogger has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 245 seconds]
alexherbo20 has joined #crystal-lang
<FromGitter> <bararchy> Will this : ⏎ ⏎ ```@[JSON::Field(key: "CVE")] ⏎ property :cve``` ⏎ ⏎ Allow me to catch a json like `{"CVE": "sdfsdfsdf"}` ? [https://gitter.im/crystal-lang/crystal?at=5ce52aa033920c09b87d6691]
<FromGitter> <pynixwang> yes
ashirase has joined #crystal-lang
<alexherbo20> if I don’t use input, I need to close it when passing Process.run(..., input: input)?
<alexherbo20> if request.input; stdin << request.input; stdin.rewind; else; input.close; end
<alexherbo20> or I can leave input open
<FromGitter> <bew> @Blacksmoke16 about dark themes, use Stylus (an extension fro chrome & firefox iirc) then install https://github.com/StylishThemes/GitHub-Dark :D I can't do without it
<FromGitter> <Blacksmoke16> whoa
<FromGitter> <Blacksmoke16> life changing
<FromGitter> <bew> there is a very good one for stackoverflow too ;)
<FromGitter> <Blacksmoke16> noice
<FromGitter> <Blacksmoke16> good call
<FromGitter> <mwlang> I'm stuck on transforming JSON to array of different objects. https://play.crystal-lang.org/#/r/6ygn is a minimum play with all the components I'm working with. I know why it's doing what it's doing, but not having any luck changing it to do what I'd like, which is to instantiate different "filter" classes depending on value of "filterType" key.
<FromGitter> <mwlang> @Blacksmoke16 you helped me along by providing a play using #from_array and by itself, I was able to spec that out, but once I'm already in a JSON::PullParser flow, not sure how to "jump out" to having just the "filters" as a string representation of the Array to feed into the ExchangeFilter's #from_array method.
<FromGitter> <mwlang> or more to the point, that actually seem inefficient, so my real attempt was to "pull.read_array" and pass on an already parsed array, but couldn't pull that off, either.
<FromGitter> <Blacksmoke16> i was thinking about this more, sec
alexherbo207 has joined #crystal-lang
<FromGitter> <Blacksmoke16> the main issue is once you are in pull parser land you, AFAIK no longer have access to the full obj as a string
<FromGitter> <Blacksmoke16> as pull parser goes token by token
alexherbo20 has quit [Ping timeout: 258 seconds]
<FromGitter> <Blacksmoke16> so you need to like abstract your logic to *KNOW* what they key is *BEFORE* doing from_json
<FromGitter> <Blacksmoke16> hence why i was using the `from_array` outside of the normal deserialization flow
<FromGitter> <Blacksmoke16> prob Int32?
<alexherbo207> If I need to convert to JSON, should I use { status.exit_status } instead?
<FromGitter> <mwlang> yeah, that's definitely where I'm hung up...I was feeling like I needed a lookahead or peek capability.
<alexherbo207> Blacksmoke16 if it exits with error
<alexherbo207> ?
<FromGitter> <Blacksmoke16> that would still be exit code 1 no?
<FromGitter> <Blacksmoke16> easiest way would be to wrap it in a `typeof()` and see what you get
<alexherbo207> def exit_code doesn’t have ": Int32" part
<FromGitter> <Blacksmoke16> the docs are generated from the code, so that method is just missing a return type restriction
<FromGitter> <Blacksmoke16> which isn't required persay
<FromGitter> <mwlang> one thing that does work...it'll read it all in as an array of ExchangeFilter, so I thought maybe just assign that to a "private" getter (if there's such a thing) and then another method that, on first access, transforms each filter to a specific classs.
<alexherbo207> what would be the difference / more appropriate JSON return between .exit_code and .exit_status?
<FromGitter> <Blacksmoke16> :shrug:
<FromGitter> <Blacksmoke16> is the structure of the json what you're going to be dealing with for reals/
<FromGitter> <vladfaust> I get `Invalid memory access (signal 11) at address 0x0` upon de-serializing from a YAML string after my code is statically build on Alpine. Is this a known issue?
<FromGitter> <mwlang> So, how do you pass an instantiated JSON::PullParser to another class's #from_json method?
<FromGitter> <mwlang> for example, ```when "PRICE_FILTER" then PriceFilter.from_json pull```
<FromGitter> <Blacksmoke16> could prob pass it to `.new pull`
<FromGitter> <Blacksmoke16> that would prob work
<FromGitter> <mwlang> that wasn't having the desired affect of letting PriceFilter utilize the PullParser to extract it's own properties.
<FromGitter> <mwlang> oh!
<FromGitter> <mwlang> I'll give that a shot.
<FromGitter> <mwlang> woah, wait...I just fixed it! https://play.crystal-lang.org/#/r/6yh5 -- the play times out, but it works locally.
<FromGitter> <mwlang> I realized I forgot to hook up ToFilter as a converter.
<FromGitter> <vladfaust> @bararchy have you managed to make https://github.com/crystal-lang/crystal/issues/4276 work? Alpine doesn't have libstdc++-dev in any repository
<FromGitter> <vladfaust> Also @j8r
<FromGitter> <Blacksmoke16> nice one!
hightower2 has joined #crystal-lang
<FromGitter> <mwlang> so it works, but definitely a bit of inefficiency since it's going from json to string then back to json, so I'm going to see if I can improve with ```.new(pull)```
<FromGitter> <Blacksmoke16> πŸ‘
<FromGitter> <Blacksmoke16> id be curious to see if you find a solution
<FromGitter> <j8r> @vladfaust no, still empty stack traces
<FromGitter> <j8r> I plan to move out from raising exceptions, because of not very friendly and performance penalty: https://github.com/j8r/error.cr/
<FromGitter> <vladfaust> > I get `Invalid memory access (signal 11) at address 0x0` upon de-serializing from a YAML string after my code is statically build on Alpine. Is this a known issue? ⏎ ⏎ Is that the same thing? Given that absolutely the same YAML file is working normally w/o static build
<FromGitter> <vladfaust> If so, error.cr can't help, as the thing is happening in stdlin
<FromGitter> <mwlang> doesn't look like it's going to be easy...once you open the array and begin reading enough to get the "filterType" out of the hash, passing the pull in that state to #from_json of the selected class leads to parsing error: "Expected begin_object but was string at 7:19 parsing PriceFilter at 7:9"
<FromGitter> <Blacksmoke16> yea, since you're now parsing it token by token
<FromGitter> <Blacksmoke16> hence the need to parse json, then pass the json string back to it :/
<FromGitter> <mwlang> need a #read_hash to go along with #read_array. :-p
ua_ has quit [Quit: Leaving]
<FromGitter> <mwlang> I'll keep the test_spec file around and toy with this again another day...for now, I can move on with wrapping binance API with current working solution.
<FromGitter> <Blacksmoke16> πŸ‘
<FromGitter> <vladfaust> So any error raised leads to Invalid Access
<FromGitter> <vladfaust> Even if it's rescued
<FromGitter> <vladfaust> That's shit.
ua has joined #crystal-lang
<FromGitter> <j8r> @vladfaust partially, we can replace `raise` by `throw`, then having a trace
<FromGitter> <j8r> because it doesn't involves stack unwinding, which is broken
<FromGitter> <vladfaust> I understand what you say, @j8r, but it doesn't help
<FromGitter> <j8r> If on the stdlib, we have to rescue it :/
<FromGitter> <vladfaust> > Even if it's rescued
<FromGitter> <j8r> have you done `require "llvm/lib_llvm"; require "llvm/enums"`?
<FromGitter> <vladfaust> Yes, it requires libstdc++-dev, which is absent on Alpine
alexherbo207 has quit [Read error: Connection reset by peer]
<FromGitter> <vladfaust> BTW, static build works with Ubuntu https://carc.in/#/r/6yhi
<FromGitter> <vladfaust> Gonna try this
<FromGitter> <j8r> follow the steps at https://github.com/j8r/dockerfiles/blob/master/crystal-alpine/README.md and you should be good :)
alexherbo207 has joined #crystal-lang
<FromGitter> <vladfaust> @j8r it does work! How's that?!
<FromGitter> <vladfaust> Unhandled ex have empty traces, though, but it's least it's not Invalid Memory Access
<FromGitter> <vladfaust> That's interesting that static building works for Ubuntu :thinking:
<FromGitter> <mwlang> Does the JSON::Field annotations need to immediately precede the getter/property declaration?
<FromGitter> <mwlang> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ce5624b63dea422b4c7e318]
<FromGitter> <mwlang> or can it appear somewhere else in the class/struct's definition?
<FromGitter> <Blacksmoke16> has to appear there
<FromGitter> <Blacksmoke16> as its being applied to the ivar that gets created via the getter macro
<FromGitter> <mwlang> ok. So one thing I did notice, when writing documentation, I have to insert the comment in between the annotation and the property: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ce56296ecdf942b4c2808c9]
<FromGitter> <Blacksmoke16> makes sense yes
<FromGitter> <mwlang> would definitely prefer that above the whole thing.
<FromGitter> <Blacksmoke16> :shrug:
<FromGitter> <j8r> @vladfaust are you sure the binary is properly linked statically on ubuntu? `ldd ./the_binary`
<FromGitter> <vladfaust> @j8r idk it works
<FromGitter> <vladfaust> I built with --no-cache also
<FromGitter> <j8r> lld or ld.gold could also be used
<FromGitter> <j8r> I have to try
<FromGitter> <vladfaust> What does it do?
<FromGitter> <asterite> I think docs before annotation and method should work, and if not we should fix it
<FromGitter> <j8r> > LLD is very fast. When you link a large program on a multicore machine, you can expect that LLD runs more than twice as fast as the GNU gold linker. Your milage may vary, though. ⏎ :O
<FromGitter> <vladfaust> That'so strange. Binaries built on Ubuntu statically work within an alpine image
prettyrobots has quit [Quit: ZNC - http://znc.in]
<mps> vladfaust: that is how static works, but full static
<FromGitter> <vladfaust> Awesome!
<mps> some build 'static' binaries where most libs are statically linked and base libs are dinamically linked (libc, for example) and still call this static build
<FromGitter> <vladfaust> And what do we have in Crystal?
<FromGitter> <j8r> the static binary built on Alpine is smaller than the Ubuntu one
<FromGitter> <vladfaust> Why? And what's the actual size difference?
<mps> yes, musl is smaller (and usually faster) than glibc
<mps> I didn't tested differences with crystal, but when I played with go-lang I built some binaries on debian with musl and they were smaller although I didn't test speed
<mps> and, that was one of reasons to switch to alpine
alexherbo2078 has joined #crystal-lang
<mps> pracabor: yes, well known url :)
alexherbo207 has quit [Ping timeout: 272 seconds]
<mps> when you run on small arm boxes with little RAM and microSD card you don't need benchmarks or comparison url's, you feel difference
<FromGitter> <vladfaust> Thanks
<mps> vladfaust: you are welcome
<FromGitter> <rishavs> ~~Bannerlord~~ WIndows when?
<FromGitter> <rishavs> ~~strikethrough~~ xxx
<FromGitter> <vladfaust> Windows until!
laaron- has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
laaron- has joined #crystal-lang
laaron has quit [Remote host closed the connection]
prettyrobots has joined #crystal-lang
prettyrobots has quit [Quit: ZNC - http://znc.in]
prettyrobots has joined #crystal-lang
prettyrobots is now known as simpatico
simpatico is now known as sympatico
<FromGitter> <Daniel-Worrall> yield Windows
sympatico has quit [Quit: ZNC - http://znc.in]
prettyrobots has joined #crystal-lang
prettyrobots has quit [Client Quit]
laaron- has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
sympatico has joined #crystal-lang
sympatico has quit [Client Quit]
sympatico has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
gangstacat has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
gangstacat has quit [Client Quit]
alexherbo2078 has quit [Ping timeout: 258 seconds]
alexherbo2078 has joined #crystal-lang
<FromGitter> <mwlang> > I think docs before annotation and method should work, and if not we should fix it ⏎ ⏎ I'll double-check that it doesn't work and if not, open an issue on it.
<FromGitter> <asterite> Thanks!
<FromGitter> <renich> Good $tod, Crystalians!
<FromGitter> <renich> I have a question. I have a YAML map. How can I get it's keys?
ShalokShalom43 has joined #crystal-lang
<FromGitter> <Blacksmoke16> got some example code? ideally a https://play.crystal-lang.org/
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter> <renich> Yes, I will post it @Blacksmoke16
<FromGitter> <Blacksmoke16> πŸ‘
<FromGitter> <renich> @Blacksmoke16 https://play.crystal-lang.org/#/r/6yit
<FromGitter> <Blacksmoke16> and you want to get the keys of the nics?
<FromGitter> <Blacksmoke16> or?
<FromGitter> <renich> of everything, if possible. So I can define a CSV header
<FromGitter> <Blacksmoke16> i.e. the names of all your ivars, like bios, hostname, kernel_in_use etc?
<FromGitter> <renich> I'd like something like: `hostname, bios_version, bios_this, bios_that, nic1_this, nic1_that, nic2_this, nic2_that...` and so on
<FromGitter> <Blacksmoke16> oo
<FromGitter> <renich> The thing is that the number of nodes in Nics is variable.
<FromGitter> <renich> Also in package versions
<FromGitter> <renich> I tried yaml.each; yaml.each_with_keys, etc. Nothing seems to work...
<FromGitter> <Blacksmoke16> well you're not dealing with yaml anymore
<FromGitter> <Blacksmoke16> you have an object
<FromGitter> <renich> OK. So I need to define the method?
<FromGitter> <Blacksmoke16> sec
<FromGitter> <renich> Or make it iterable in some way?
<FromGitter> <renich> sure
<FromGitter> <Blacksmoke16> you care about the order?
ShalokShalom43 has quit [Remote host closed the connection]
ShalokShalom has quit [Remote host closed the connection]
<FromGitter> <renich> @Blacksmoke16 yes; I would like to be able to arrange them.
ShalokShalom has joined #crystal-lang
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/6yjr
<FromGitter> <Blacksmoke16> close to what you want? idk
<FromGitter> <Blacksmoke16> should be able to reorder by changing the order in your yaml mappings
DTZUZO_ is now known as DTZUZU
<FromGitter> <Blacksmoke16> i feel like csv isnt the best format for something like this tho...
<FromGitter> <renich> awesome! Dude, I owe you a beer!
<FromGitter> <renich> @Blacksmoke16 the man wants it in a spreadsheet... I know...
<FromGitter> <Blacksmoke16> welp
<FromGitter> <renich> @Blacksmoke16 many thanks for this. I hope I can learn the crystal way of things
<FromGitter> <Blacksmoke16> np
<FromGitter> <renich> @Blacksmoke16 your example is really exciting. Now, let's see if I can do the same for values and the work is done! ;D I'll see if I can implement it myself based on your example.
<FromGitter> <Blacksmoke16> https://crystal-lang.org/api/master/CSV/Builder.html might be helpful
<FromGitter> <Blacksmoke16> maybe alter the `keys` method to just return an array of keys, vs joining them by `,`, then pass that to `row`
<FromGitter> <Blacksmoke16> then do something similar for values
<FromGitter> <renich> @Blacksmoke16 OK. Just learned about `@instance_vars` so it's interesting.
dom96_ is now known as dom96
dom96 has joined #crystal-lang
dom96 has quit [Changing host]
<FromGitter> <jwoertink> I'm trying to work out a bug, but I'm having trouble understanding something here
<FromGitter> <jwoertink> I saw that JSON::PullParser takes a string, but I'm not sure of what that string would look like
<z64> your code expects a json array to be read. you're passing an object
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/6ykn ^
<FromGitter> <jwoertink> ohhh. Ok. I see what it's doing. That makes sense.
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/6ykp can also do this
<z64> or `Hash(String, Array(String)).new(parser)` :v
<FromGitter> <Blacksmoke16> :S
<FromGitter> <jwoertink> Right.
<FromGitter> <jwoertink> I have this bug in Lucky dealing with these, but I think it might be a bug in crystal
<FromGitter> <Blacksmoke16> o?
<FromGitter> <jwoertink> I'm just having trouble narrowing it down
<FromGitter> <jwoertink> ``` 33. ⏎ 34. ⏎ > 35. ::Union(Array(String)).new(pull) ⏎ 36. ⏎ 37.``` [https://gitter.im/crystal-lang/crystal?at=5ce5ae5013e9854e334c35ab]
<FromGitter> <jwoertink> > wrong number of arguments for 'Array(String)#initialize' (given 1, expected 2, 0)
<z64> i saw the issue you were working on. https://carc.in/#/r/6yk5 works as-is (Union(Array(String)).new(pull)); generally what i would be looking for is some kind of conflicting array constructor
<FromGitter> <jwoertink> hmm That's a good idea.
<z64> i mean, what you could maybe do quickly, is set up an environment where you can require all the relevant deps and run exactly what i had in my carc.in above, outside of json::serializable and whatnot, to reduce the scope if possible
<FromGitter> <jwoertink> Yeah, I did that and it works fine
<FromGitter> <jwoertink> seems to only fail when it's inside of lucky
<FromGitter> <Blacksmoke16> do the blacksmoke way of debugging
<FromGitter> <jwoertink> but maybe I can break that down even more since it's technically only lucky_cli
<FromGitter> <Blacksmoke16> just start deleting shit till it goes away
<FromGitter> <Blacksmoke16> then ctrl+z and you have a clue :P
<FromGitter> <jwoertink> lol! Yup, that's my favorite way
<FromGitter> <Blacksmoke16> works quite well haha
<FromGitter> <Blacksmoke16> id also suggest maybe trying it against master
<FromGitter> <Blacksmoke16> rule out any bugs that have been fixed since last release
<z64> @jwoertink just based on the samples (i cant pull code and test right now..) the first place i would look is whatever is driving database code. maybe it defines an Array(T) ctor to construct an array from a db set, and it accepts extra arguments for some kind of database context. wild guess tho:)
<FromGitter> <Blacksmoke16> oh
<FromGitter> <Blacksmoke16> oh, nvm
<FromGitter> <jwoertink> I didn't consider that, but that could be a good spot to look too
<FromGitter> <jwoertink> thanks for the suggestion
alexherbo20783 has joined #crystal-lang
alexherbo2078 has quit [Ping timeout: 248 seconds]
alexherbo207831 has joined #crystal-lang
alexherbo20783 has quit [Ping timeout: 268 seconds]
<FromGitter> <jwoertink> found it! πŸ˜‚
<FromGitter> <jwoertink> Would this be considered a crystal bug?
<FromGitter> <jwoertink> I'm not really sure how the inheritance is supposed to work. It seems like in this case, since it's never calling `Collection.new`, that initialize override should never be touched
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <jwoertink> Maybe I'll file the bug just in case
<FromGitter> <kinxer> It looks like a bug to me. I'd never really want a `Klass < Array(String)` to affect my use of `Array(String)` itself, entirely apart from the question of whether the `initialize` should even be relevant from a compilation standpoint.
<FromGitter> <jwoertink> Yeah. My thought was that the subclass should act on it's own. Calling the parent shouldn't be affected by it's children
<FromGitter> <jwoertink> now if my kids would just understand that, things would be great
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
<FromGitter> <renich> man, the macro documentation is extensive!
<FromGitter> <Blacksmoke16> im glad you think so :p
sagax has quit [Remote host closed the connection]