ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.23.0 | Fund Crystal's development: http://is.gd/X7PRtI | Paste > 3 lines of text to https://gist.github.com | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Logs: http://irclog.whitequark.org/crystal-lang
greengriminal has joined #crystal-lang
<FromGitter> <bigtunacan> @krypton97 there isn't one yet.
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter> <bigtunacan> I'm working on one called Sheriff, but I don't know how soon it will be ready so you are welcome to roll your own 😀
_whitelogger has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
onionhammer1 has joined #crystal-lang
hightower2 has quit [Ping timeout: 260 seconds]
greengriminal has quit [Quit: Leaving]
bjz has joined #crystal-lang
greengriminal has joined #crystal-lang
Philpax_ has joined #crystal-lang
<FromGitter> <krypton97> I think the best bet would be porting Devise
onionhammer has joined #crystal-lang
onionhammer1 has quit [Ping timeout: 260 seconds]
<FromGitter> <drujensen> @sdogruyol nice work! I like the customizable handlers.
<FromGitter> <codenoid> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=595860bfc101bc4e3a408d93]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<FromGitter> <codenoid> sup
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #crystal-lang
greengriminal has quit [Quit: This computer has gone to sleep]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
onionhammer1 has joined #crystal-lang
onionhammer has quit [Ping timeout: 268 seconds]
<FromGitter> <doughsay> Hi everyone. Anyone have experience with using this library? https://github.com/lirith-engine/lib_gl Trying to port a little project to crystal and I'm stuck on something (I'm pretty new to crystal): https://gist.github.com/doughsay/962eac49d11574a0f792b7d83138a5b0
<FromGitter> <doughsay> opengl reference is here: https://www.khronos.org/registry/OpenGL-Refpages/gl4/, the generated binding function is here: https://github.com/lirith-engine/lib_gl/blob/master/src/lib_gl.cr#L6443. I'm a little lost on what's going wrong; not sure if there's something wrong with the bindings or if this is a crystal bug, or what.
<FromGitter> <doughsay> Sorry guys! ^ RE the above: apparently you're not allowed to do that without an initialized gl context, so... mystery solved. It works just fine with a properly initialized window.
Dreamer3 has joined #crystal-lang
hightower4 has joined #crystal-lang
hightower3 has quit [Ping timeout: 260 seconds]
unshadow has joined #crystal-lang
unshadow has quit [Client Quit]
unshadow has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Client Quit]
nobilik has quit [Ping timeout: 260 seconds]
Ven has joined #crystal-lang
Ven is now known as Guest71914
Guest71914 has quit [Ping timeout: 260 seconds]
_whitelogger has joined #crystal-lang
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
hightower2 has joined #crystal-lang
unshadow has quit [Quit: leaving]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Raimondi has quit [Ping timeout: 268 seconds]
Raimondi has joined #crystal-lang
Dreamer3 has quit [Quit: Computer has gone to sleep.]
Dreamer3 has joined #crystal-lang
bjz has joined #crystal-lang
_whitelogger has joined #crystal-lang
<FromGitter> <schoening> Quite a lot of inconsistency with array method names... "!" at the end of a method indicates changes to self instead of returning a new instance, correct? But in practice it's only applied occasionally..
<Yxhuvud> no, it is more like it implies danger ahead, but it not applied when the name itself implies that. (such as #delete)
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
<Yxhuvud> or at least htat is how it works in ruby. I don't know if crystal have choosen a diffent thinking there.
<FromGitter> <schoening> Ok. I just misunderstood then
<FromGitter> <schoening> Altho "danger" is hard to define. Any mutation is seen as dangerous by some: o
<FromGitter> <schoening> :smile: *
<oprypin> danger when it's not obvious
<oprypin> in practice i see ! applied when a non-! counterpart makes sense
<hightower2> Hey could you help me with this one: I have array like [ 1, 2, [:a, :b], [:c, :d]], and I would like the final outcome to be an "expanded" array with contents [ [1,2,:a,:c], [1,2,:b,:c], [1,2,a:,:d], [1,2,:b,:d] ]. But I have a hard time envisioning how to do this properly/efficiently
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
<FromGitter> <Thau> Hello, there, people! I have a quick question about JSON.mapping. How does one initialize an object to serialize it? It seems the only ways to initialize are giving some previous json either as a String or as a PullParser, but I'd like to initialize an object with my own values and then serialize it as JSON. Is mapping not the right way here?
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<hightower2> Hey, I noticed a peculiarity in behavior of def something= (one, two) . It is displayed in https://play.crystal-lang.org/#/r/2aby . Is this a known/expected behavior or parser bug?
<oprypin> hightower2, https://carc.in/#/r/2ac0
<oprypin> Thau, mapping is the right way. you make ThatType.new(aasgafgshgdh).to_json
<hightower2> oprypin, ooh, wonderful. Thank you kindly
<oprypin> Thau, unfortunately you do need to define the constructor yourself. https://carc.in/#/r/2ac4
<oprypin> hightower2, assignment is not made to work with multiple arguments.
<hightower2> oprypin, for "expand", I added support for Enumerable and the final version is https://carc.in/#/r/2ac8
<FromGitter> <Thau> Hey, @oprypin, it's working! Thank you
<oprypin> hightower2, here's what i think would be the most idiomatic
<hightower2> oprypin, yeah, in my context the issue is I don't always want to be saying x.mymethod= {1,false} . I would like the second arg to have a default value
<oprypin> hightower2, i sent you the link, it addresses this problem differently
Nouv has joined #crystal-lang
Nouv has quit [Read error: Connection reset by peer]
Nouv has joined #crystal-lang
miketheman has quit [Quit: ZNC - http://znc.in]
miketheman has joined #crystal-lang
Nouv has quit [Ping timeout: 248 seconds]
bjz has joined #crystal-lang
Nouv has joined #crystal-lang
nobilik has joined #crystal-lang
nobilik has quit [Client Quit]
Nouv has quit [Ping timeout: 255 seconds]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<hightower2> Let' say in general I have array of one type of values, and need to convert it to another type. (E.g. if I have [:a,:b,:c] and I want to convert it to [1,2,3]). Is there a better way than creating a new array and calling #push on it for every converted/transformed value?
Nouv has joined #crystal-lang
<oprypin> hightower2, well that's literally what `map` does
<hightower2> oprypin, oh lol, right, but I was thinking about avoiding a separate array. Like, changing the type in runtime
Nouv has quit [Read error: Connection reset by peer]
<oprypin> hightower2, cannot do that
<oprypin> well you can hack it in an unsafe way, take a memory region and say, actually tthese are numbers
<hightower2> Good point about map though, I used each/push in one instance as if I forgot about map :)
<oprypin> >> a = [:a, :b, :c]; pointerof(a).as(Array(Int32)*).value
<DeBot> oprypin: # => [1, 2, 3] - https://carc.in/#/r/2acn
<oprypin> hightower2, ayy i literally did what you asked
<oprypin> >> a = [:a, :b, :c, :b]; pointerof(a).as(Array(Int32)*).value
<DeBot> oprypin: # => [1, 2, 3, 2] - https://carc.in/#/r/2aco
<hightower2> Pretty rad :)
<oprypin> dont do that though
<hightower2> Sure, of course
<crystal-gh> [crystal] Val opened pull request #4658: [vagrant box] add Debian distribs (master...add_debian_distribs_to_vagrantfile) https://git.io/vQ09E
greengriminal has joined #crystal-lang
thews has quit [Ping timeout: 255 seconds]
bmcginty has quit [Ping timeout: 248 seconds]
<hightower2> What's an approved way to get terminal width?
Philpax_ has quit [Ping timeout: 260 seconds]
Nouv has joined #crystal-lang
<Papierkorb> None
bjz has joined #crystal-lang
<hightower2> Has some good pointers.
<Papierkorb> $WIDTH is unreliable, the only reliable way would be using ioctl(), or using ANSI escape sequences
<hightower2> Right, sure
hightower3 has joined #crystal-lang
<Papierkorb> hightower3: When you register your nick (`hightower`), you can always use it, including after connection drops, and don't have to resort nicks counting-up
<Nouv> Papierkorb: Hey I'm back with the dumb questions!
<Nouv> Papierkorb: Does Crystal emit LLVM IR (the human readable kind) or does it use the LLVM c api?
<hightower3> Papierkorb, sure, hightower2 is my default one :) But I don't care, I've just set my IRC client to automatically try 2, 3, 4 etc. if taken :)
<Papierkorb> hightower3: well responding to the right nick is much harder
<hightower3> True, will fix, thanks
<Papierkorb> Nouv: it wraps the C API, in the crystal project it's in `src/llvm`. Meaning, that by doing `require "llvm"` in your own project, you can use it too
<Nouv> Papierkorb: Ah
hightower2 has quit [Ping timeout: 260 seconds]
<Nouv> Papierkorb: Do compilers always use the api, or do some emit the human readable IR code?
<Papierkorb> Nouv: No idea if all use the API, but they should. The IR is meant to be read, but not written
<Nouv> Fair
greengriminal has quit [Quit: This computer has gone to sleep]
<Nouv> Papierkorb: So the compiler uses the LLVM API to create the LLVM IR, which is then assembled, and linked with libc and libllvm?
<Papierkorb> The compiler uses the LLVM API, which represents it somehow internally ("you don't care how"), but you can also ask it to represent it as IR for you to display. The rest is correct though, as long the built program requires libllvm. If you don't, it won't be there.
<Nouv> Papierkorb: Okay, thank you!
<Nouv> Papierkorb: Does Crystal use llvm-gcc for linking?
<Papierkorb> Nouv: Any data can be represented differently, but equal in value. Consider the number 10 in decimal, but you can also represent it as A in hex. Their representation is different, but the value is the same. LLVM most likely has an internal representation consisting of tons of C++ structs and classes, not LLVM bitcode or IR. But you can represent ("transform") those back and forth easily, as all are equal in value, there's no loss of
<Papierkorb> precision.
<Papierkorb> Nouv: No, Crystal really calls out to `gcc` iirc
<Nouv> Ah that's a good explanation, thanks
Nouv has quit [Quit: Nouv]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
A124 has quit [Ping timeout: 248 seconds]
<hightower3> What's a good way to trim string to fewer characters? E.g. if it's #size==80 and I would trim it to 60?
bjz has joined #crystal-lang
<crystal-gh> [crystal] MakeNowJust opened pull request #4659: Parser: correct to lex the part of keyword in macro (master...fix/crystal/lex-part-of-keyword-in-macro) https://git.io/vQ05i
A124 has joined #crystal-lang
onionhammer has joined #crystal-lang
thews has joined #crystal-lang
onionhammer1 has quit [Ping timeout: 248 seconds]
greengriminal has joined #crystal-lang
greengriminal has quit [Quit: This computer has gone to sleep]
rohitpaulk has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Groogy has joined #crystal-lang
<crystal-gh> [crystal] MakeNowJust opened pull request #4660: Fix a typo of the context name of asm options (master...fix/crystal/parse-asm-options-string) https://git.io/vQ0bi
<Groogy> Hey so I'm starting to play around with Crystal and while sublime works well and all I want to try out VS Code which I've never used before and was wondering which plugin people recommend of the three?
<Groogy> Only one of the three has a readme page on github that actually tries to sell it and not much to speak of for feature brakdowns :/
<Groogy> breakdowns*
early has quit [Quit: Leaving]
<FromGitter> <sdogruyol> @groogy there you go https://twitter.com/totakaro/status/879022445998505986
early has joined #crystal-lang
<Groogy> haha think that was the one I mentioned as "the only one trying to sell itself"
<FromGitter> <sdogruyol> lol
<FromGitter> <sdogruyol> a good readme is a must
<Groogy> eaxactly, howelse will I know if it is good or not ;D
<Groogy> anyway thanks
<FromGitter> <sdogruyol> may i ask where did you discover Crystal @groogy?
<Groogy> personal development time at work, kind of ish. I enjoy languages like Ruby and I love figuring out how languages and somehow stumbled upon this
<Groogy> what peeked my interest is what looked like black magic but the type unions
<FromGitter> <sdogruyol> oh yeah, union types are the best
<Groogy> Was easier to think about when I just thought off every single functiob/class as a template in c++
<FromGitter> <sdogruyol> it actually made me love types
<Groogy> It's a cool approach on merging duck typing and static typing
<FromGitter> <sdogruyol> yeah
<FromGitter> <sdogruyol> 2 years of Crystal and i still think that union types are really cool
<FromGitter> <sdogruyol> always impresses me
<Groogy> Oh it's that old already?, or well I guess for as languages goes that's pretty young
<FromGitter> <sdogruyol> it's still not yet 5 years old
<FromGitter> <sdogruyol> so it's pretty young
<FromGitter> <sdogruyol> with a great potential :)
<Groogy> hmm weird, it seems like it is further ahead in development than D in some areas
<Groogy> and think D is way older
<Groogy> though then again I am just starting out so what do I know
<Groogy> impression wise that is
<FromGitter> <sdogruyol> yeah, you are right
greengriminal has joined #crystal-lang
<FromGitter> <sdogruyol> actually it feels really stable and actually not many breaking change
<FromGitter> <sdogruyol> i remember Rust back in the day :P
<Groogy> uh I remember long time ago someone tried to get me to try rust
<Groogy> I mean some concepts were interesting but overall it really didn't sit well with me
<FromGitter> <sdogruyol> it's hard
<FromGitter> <sdogruyol> it has some novel ideas but for me it's overkill
<FromGitter> <sdogruyol> on the other hand Crystal is the opposite. It's really simple and easy to get productive from day 1 (day 0 if you've used Ruby before)
<Groogy> yeah though for me I'll have to wait until I finish my reinstall of archlinux at home. Until then I'll just use my archlinux at work
<Groogy> so looking forward for when windows works ^^ (for now I am trying it in the ubuntu bash)
<FromGitter> <sdogruyol> cool
<FromGitter> <sdogruyol> we got some efforts going on Windows support
<Groogy> yeah I read
<Groogy> also weirdly enough, being able to just having ability to do "remove this specific piece of code in release build" was somewthing I missed in Ruby
<FromGitter> <sdogruyol> --release for the win :)
<Groogy> Yeah but like, let's say in Ruby you have tons of logging that you donẗ want enabled in release/production. There was no way as far as I remember any way to physically take that code out
<Groogy> like you can with crystal and macros
greengriminal has quit [Quit: Leaving]
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <straight-shoota> Papierkorb, Nouv: Crystal does not use `gcc` directly but whatever `cc` or `CC` points to
<Groogy> Hmm I get my test app to link with a shared library but trying to run the application it can't find the so file :/
<Groogy> weird
<Groogy> might just be an "ubuntu on windows" thing though I guess
<Groogy> ah lol okay nvm, it just installs with the paths setup wrong I guess, fixing that fixed it
Nouv has joined #crystal-lang
Renich has joined #crystal-lang
Renich has quit [Ping timeout: 255 seconds]
<FromGitter> <sdogruyol> @groogy yup, paths are important
Renich has joined #crystal-lang
<Renich> I just learned that HTTP::params.from_hash was renamed to HTTP::params.encode. It caught me off guard
<FromGitter> <sdogruyol> ugh, that's a bummer
<Renich> well, good thing it was just a rename
<FromGitter> <sdogruyol> no changelog for that?
<Renich> sdogruyol: yes, the changelog mentions it
<FromGitter> <sdogruyol> ah okay then
<FromGitter> <sdogruyol> i've never used that method before
qard has joined #crystal-lang
<qard> What's the best way to turn an IO into an array of UInt32?
<Papierkorb> qard: That doesn't make much sense. do you want to read from the IO?
<qard> I have a file that is a serialized sequence of UInt32 values, so I need to turn that into an array.
red_menace has left #crystal-lang ["bye bye..."]
<Papierkorb> qard: You want to read the file..?
<qard> Well, more accurately, it's the content of an XML element in an XML file.
<qard> It's base64-encoded and possibly gzip or zlib compressed. I can deal with that, then I have an IO that I need to turn into an array of UInt32 somehow.
<Papierkorb> qard: You can not "turn an IO into an array". You can read from an IO.
<Papierkorb> qard: You can use IO#read_bytes(UInt32) to read a single integer, which you can then throw into an array or whatever you need
<qard> I know I need to read it somehow. I'm just trying to figure out what would be the process of reading from it and converting it to a UInt32 somehow.
hightower2 has joined #crystal-lang
<qard> Oh, read_bytes is what I was looking for. Missed that somehow. Just saw read_byte, which returns a UInt8? result.
hightower3 has quit [Ping timeout: 248 seconds]
<FromGitter> <sdogruyol> @papierkorb how's your lineage server going
<Papierkorb> sdogruyol, you meant my WoW PoC? Dropped it after getting out of the project what I wanted. You may be referring to someone else who was talking about a MMORPG server clone too months ago .. May have been Lineage even
<Renich> guys, let's say I want to stop execution at a certain point. Can I use exit? Or should I use self.exit?
<FromGitter> <akzhan> https://crystal-lang.org/api/0.20.3/Process.html#exit%28status%3D0%29-class-method
Nouv has quit [Quit: Nouv]
<Renich> akzhan: thanks
<Renich> akzhan: that helped
<FromGitter> <elorest> Has any progress been made on getting travis to work again since the new release?
<qard> How does one go about detecting EOF when using read_bytes(...) to read an IO?
splitty_ has joined #crystal-lang
<Renich> How can I turn a json response to a hash?
<Renich> using mapping? or is there a .as_hash method?
<FromGitter> <straight-shoota> `json.to_h`
<oprypin> qard, when it returns 0
<qard> But 0 is a valid UInt32.
<qard> It could return that somewhere in the middle.
<oprypin> qard, no
<oprypin> qard, hold on, i thought this was a different method, sorry
<oprypin> qard, EOFError it is then https://carc.in/#/r/2aeh
<qard> Hmm...it'd be nice if there was a way to do that without a rescue, but I guess EOFError works.
<oprypin> qard, IO#read is the thing i was thinking about, and it's the way to do that (not quite that) without a rescue https://crystal-lang.org/api/master/IO.html#read%28slice%3ABytes%29-instance-method
<oprypin> i mean if you're reading binary data structures, you are supposed to know the sizes of everything in advance
<oprypin> in that case eof is indeed something you dont expect and should be an error
<qard> I *do* know the size of the input. The problem though is that I need UInt32, not UInt8.
<qard> So I'm using read_bytes(Uint32) rather than read_byte.
<qard> Kind of weird that read_byte returns a nilable, but read_bytes doesn't.
<Papierkorb> qard: Then calculate the expected amount of integers beforehand. Also make sure that the size of data is actually divisable by sizeof(UInt32).
<Renich> straight-shoota: thanks!
<hightower2> How do I create a shard and publish on crystalshards.xyz ?
<hightower2> I've read http://veelenga.com/make-your-own-shard-in-crystal-language/ but I don't see anything related to actually creating a shard and publishing it
<FromGitter> <fridgerator> crystalshards just pulls automatically from github
<hightower2> Oh wait, through some magic the shard appeared there
<hightower2> Jezus
<FromGitter> <fridgerator> just gets repos that have crystal language
<Renich> I am getting a compile time error: https://gist.github.com/renich/61df8f923d52868df61b3d34c2d15c24
<Renich> if I run create order, it works, if I run remove order, it works fine as well... If I try it in sequence, it doesn't even run and it fails to right before running; at compile time
<Renich> I'd appreciate any help, if possible
l1meon has joined #crystal-lang
<hightower2> Folks, here's a better output formatter for spec tests for Crystal: https://github.com/docelic/specreporter-spec
bjz has joined #crystal-lang
l1meon has quit [Quit: Page closed]
fenicks has left #crystal-lang [#crystal-lang]
<Groogy> Hey so after I have downloaded a shard, what is the correct way to include it in a file, let's say my main file?
<Groogy> will shards just automatically add include path to it?
<FromGitter> <bararchy> You need to configure it in your shards.yml file and call `crystal deps`
<FromGitter> <mverzilli> @elorest we're aiming at fixing the package issues early in the week (Mon/Tue/Wed)
<crystal-gh> [crystal] mverzilli pushed 1 new commit to master: https://git.io/vQEtK
<crystal-gh> crystal/master dcf8a03 TSUYUSATO Kitsune: WebSocket: should compare 'Upgrade' header value with case insensitive (#4617)...
<hightower2> Groogy, yes, you need to add it to shards.yml, which I assume you did, since you said "I have downloaded a shard". After adding to that file, you would run "shards install". This would install the shard inside .shards/ in project directory. And in your code, you would say "require "...shard name..."", without prefixing it with ./ or some path, just the shard name.
<Groogy> nice! last part was what I was looking for
<Groogy> thanks!
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<TheGillies> any eta for parallelism?
<travis-ci> crystal-lang/crystal#dcf8a03 (master - WebSocket: should compare 'Upgrade' header value with case insensitive (#4617)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/249434398
<DeBot> https://github.com/crystal-lang/crystal/pull/4617 (WebSocket: should compare 'Upgrade' header value with case insensitive)
<crystal-gh> [crystal] oprypin opened pull request #4661: Docs: explain how to detect end of file in IO (master...patch-4) https://git.io/vQEmB
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
onionhammer1 has joined #crystal-lang
<crystal-gh> [crystal] mverzilli pushed 1 new commit to master: https://git.io/vQEY0
<crystal-gh> crystal/master d24f79c Oleh Prypin: Docs: explain how to detect end of file in IO (#4661)
onionhammer has quit [Ping timeout: 260 seconds]
greengriminal has joined #crystal-lang
hightower3 has joined #crystal-lang
<travis-ci> crystal-lang/crystal#d24f79c (master - Docs: explain how to detect end of file in IO (#4661)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/249443915
<DeBot> https://github.com/crystal-lang/crystal/pull/4661 (Docs: explain how to detect end of file in IO)
<travis-ci> crystal-lang/crystal#d24f79c (master - Docs: explain how to detect end of file in IO (#4661)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/249443915
<DeBot> https://github.com/crystal-lang/crystal/pull/4661 (Docs: explain how to detect end of file in IO)
hightower2 has quit [Ping timeout: 255 seconds]
<travis-ci> crystal-lang/crystal#d24f79c (master - Docs: explain how to detect end of file in IO (#4661)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/249443915
<DeBot> https://github.com/crystal-lang/crystal/pull/4661 (Docs: explain how to detect end of file in IO)
<FromGitter> <drosehn> The goal is for the end of this year. Personally, I suspect that is a little ambitious. Note that I do zero work on crystal, so I'm just giving you my own personal guess which is based on approximately zero knowledge.
<FromGitter> <johnjansen> there are people dedicated to threading at manas … but zero transparency on this topic unless you are an insider
<FromGitter> <renich> I am trying to dereference order_response["order"] but I just can't... ⏎ ⏎ This is a typeof() and pp of orders_response: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=595981cc703e565c33690b99]
<FromGitter> <renich> Any help is appreciated. I dunno why orders_response["order"] is not working... :S
Renich has quit [Quit: Renich]
Groogy has quit [Ping timeout: 240 seconds]
<FromGitter> <johnjansen> can you put this in https://carc.in/#/cr so we can see what “not working” means
<FromGitter> <johnjansen> please
<FromGitter> <renich> OK, but I think it's a lot of code. I am using one library I am trying to build and ... oh well, I'll try to paste it
<FromGitter> <renich> And I am using 0.23.0 btw
<FromGitter> <johnjansen> put it this way … access to that hash works, so there is something else going on https://carc.in/#/r/2afa (0.22.0)
<FromGitter> <renich> https://carc.in/#/r/2afb
<FromGitter> <johnjansen> ahh yeah, cant do the requires
<FromGitter> <renich> I tried to paste all the libs I am using
<FromGitter> <renich> https://carc.in/#/r/2afd
<FromGitter> <johnjansen> can you isolate the error
<FromGitter> <renich> Try reading only miners.cr and test_order_delete.cr...
<FromGitter> <johnjansen> whats the exact error you get
<FromGitter> <renich> or, I'll see if I can isolate the error... taking the relevant methods ... sorry, I know it's a mess. I don't know if I can get it to compile, work since the API I am consuming requires auth and stuff
<FromGitter> <johnjansen> what is the error and we will try to skip all the rest
<FromGitter> <renich> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5959853676a757f808cc56ae]
<FromGitter> <renich> And, in the isolated test script: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59598587ad9c781843c38929]
<FromGitter> <johnjansen> you need to dump the response from ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ and check it has `location` [https://gitter.im/crystal-lang/crystal?at=595986436ae41d5d33aae28c]
<FromGitter> <renich> Maybe it's easier to check these files out: https://gist.github.com/renich/097be7b20b7fc3e2f4ef145f308a8d19. Those are the relevant ones.
<FromGitter> <renich> as I thought it, you are supposed to be able to pass order_response to remove_order and that would do. But I have this really mysterious compile-time error... No idea of what's happening.
<FromGitter> <johnjansen> so `order_response` in `nil`
<FromGitter> <johnjansen> right?
<FromGitter> <johnjansen> what get dumped from `pp order_response`
<FromGitter> <johnjansen> on 59 of test
<FromGitter> <renich> well, I don't think it is. Check this typeof pp of it: ⏎ ⏎ ` `` ⏎ typeof(order_with_id) # => Hash(String, Float64 | Int32 | String) ⏎ order_response # => {"location" => 0, ... [https://gitter.im/crystal-lang/crystal?at=595987bbbf7e6af22c98cbd0]
<FromGitter> <renich> whoops, sorry
<FromGitter> <johnjansen> you need to dump the return from `nh[:rw].create_order(order)`
<FromGitter> <renich> OK
<FromGitter> <renich> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=59598851bf7e6af22c98cd92]
<FromGitter> <johnjansen> where is `typeof(order_with_id)` coming from
<FromGitter> <johnjansen> dont worry, found it
<FromGitter> <renich> man, I appreciate it a lot... thanks...