<louis771>
hi there, before I file a bug report could someone confirm a bug for me? The HTTP::Client#post instance method should accept a String or URI as the first argument, corrent?
<louis771>
-n+c ... when I pass a URI it breaks
Liothen has joined #crystal-lang
<louis771>
In /usr/share/crystal/src/http/client.cr:754:19
<Andriamanitra>
probably would be a good idea to accept uri too but i guess it's a missing feature rather than a bug
<jhass>
The problem with accepting URI for #post (opposed to .post) is, what do you do with the host component of it? Remember a HTTP::Client instance is created for a specific host already
<FromGitter>
<kingsleyh> I want to merge 2 hash together but keep the values
<FromGitter>
<kingsleyh> in ruby I would do: `h1.merge(h2){|key, old, new| Array(old).push(new) }` but doesn't work in Crystal as merge doesn't support it
<FromGitter>
<kingsleyh> nevermind got it - it's old+new
<o5r>
Hello, I’ve installed Alpine Linux on my Raspberry Pi 4, and upgraded my repositories to Edge, so I can install Crystal on there. That “works”, in the sense that I get the crystal command spits out the usage info, but if I do `crystal eval ‘puts “yay”’` I have a bunch of fun errors about missing things: Scrt1.o, crti.o, -lm, -lpthread, -lrt, and -lssp_nonshared
<FromGitter>
<Blacksmoke16> afaik arm isn't natively supported, so might run into some problems ^
<FromGitter>
<Blacksmoke16> however im not super familiar with that, so ill defer to someone else :p
zorp_ has quit [Ping timeout: 272 seconds]
<o5r>
:P I tried a lot of things, and to be frank I’m a bit outside of my area of expertise myself. I couldn’t cross-compile the compiler correctly, and when I saw that there was a community package in Alpine I got my hopes up and installed that on top
<FromGitter>
<Blacksmoke16> can you share the exact error?
<FromGitter>
<Blacksmoke16> that lib contains the c libs crystal needs to link id imagine so yea
<o5r>
Well, it works. I’m not even going to blame monday for it, I’ll just fully accept that I failed miserably lol
<o5r>
Thanks a million
<FromGitter>
<Blacksmoke16> np
<o5r>
I’ll hit up the maintainer and see if I can somehow get him to shove musl-dev in his dependencies for Crystal. That way my failure can actually help someone else someday!
<FromGitter>
<Blacksmoke16> I think that would be @mps
<FromGitter>
<Blacksmoke16> er at least thats his name on irc
<o5r>
I can see an mps on #alpine-linux
<FromGitter>
<Blacksmoke16> 👍
<o5r>
He apparently does not maintain it anymore, but I reached out via email to the current maintainer. I’ll read contribution guildelines for Alpine Linux later this week and provide my own patch if I can get there before they do