<FromGitter>
<oprypin:matrix.org> @mixflame: we could try going somewhere with this but it's just not possible to operate if β `request = { :verb.to_s => req["verb"], :path.to_s => req["path"], :headers.to_s => headers, :body.to_s => req["body"], }` β -- that is the root of your problems
<FromGitter>
<oprypin:matrix.org> each value in this hashtable causes the hashtable to have more and more possible types
<FromGitter>
<oprypin:matrix.org> you have no ability to call `req["verb"]` and definitely get a string and you also have no ability to call `req["headers"]` and definitely get a Hash(String)
<FromGitter>
<oprypin:matrix.org> these are runtime-specific matters
<FromGitter>
<oprypin:matrix.org> so you end up "fine, all values can be either a String or a Hash(String)"
<FromGitter>
<oprypin:matrix.org> so your http verb can be a Hash(String), as far as the compiler is concerned. does that sound acceptable?
<FromGitter>
<mixflame> oh
<FromGitter>
<mixflame> yeah i think
<FromGitter>
<oprypin:matrix.org> well it shouldn't be acceptable xD
<FromGitter>
<mixflame> i'm trying to port this ruby library that I use for processing transactions
<FromGitter>
<mixflame> the code isn't mine
<FromGitter>
<mixflame> it's just ruby_codemod'd crystal
<FromGitter>
<oprypin:matrix.org> why dont you try `record Request, verb : String, path : String, headers : Hash(String, String), body : String)`
<FromGitter>
<oprypin:matrix.org> you generally won't be able to get anything usable out of such a transpiler. `Hash` will be the most typical problem. just change it to a typed structure, then some problems will sort themselves out
<FromGitter>
<oprypin:matrix.org> then i believe it will just be `@injectors : Proc(Request, String)`
<FromGitter>
<mixflame> i gave up on the translation, thanks for the help tho @oprypin:matrix.org
Andriamanitra has quit [Ping timeout: 250 seconds]
Andriamanitra has joined #crystal-lang
deavmi_ has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
chachasmooth has quit [Ping timeout: 250 seconds]
chachasmooth has joined #crystal-lang
DTZUZU_ has joined #crystal-lang
DTZUZU has quit [Ping timeout: 268 seconds]
DTZUZU has joined #crystal-lang
DTZUZU_ has quit [Ping timeout: 252 seconds]
DTZUZU_ has joined #crystal-lang
DTZUZU has quit [Ping timeout: 240 seconds]
f1refly has quit [Read error: Connection reset by peer]
f1refly has joined #crystal-lang
Flipez has joined #crystal-lang
hendursaga has quit [Ping timeout: 240 seconds]
hendursaga has joined #crystal-lang
deavmi has quit [Read error: Connection reset by peer]
deavmi has joined #crystal-lang
<FromGitter>
<mixflame> i got it working
<FromGitter>
<mixflame> Paypal Checkout v2 API with Crystal
<willamin>
kingsleyh: crystal tool format has an --exclude flag
<willamin>
oh :facepalm: I guess that's for excluding files, but you probably wanted excluding format rules
avane has left #crystal-lang ["Leaving"]
<FromGitter>
<speg> Is there a way to get the number of rows in a DB::ResultSet? I only see `#column_count` but nothing for rows.
<FromGitter>
<kingsleyh> yeah I just wanted to exclude some methods from the formattter
<FromGitter>
<Blacksmoke16> @speg a result set represents a single row, so it has no way of knowing about how many total rows there are/may be
sagax has joined #crystal-lang
DTZUZU_ has quit [Ping timeout: 260 seconds]
DTZUZU_ has joined #crystal-lang
DTZUZU_ has quit [Ping timeout: 260 seconds]
DTZUZU_ has joined #crystal-lang
<FromGitter>
<speg> @Blacksmoke16 oh? but it has an `#each` method? π
<FromGitter>
<Blacksmoke16> oh wait you're right. It represents a the result of a query, not a specific result
<FromGitter>
<Blacksmoke16> assuming the iteration is not lazy prob would be doable to expose that, guess it would depend on the specific db driver implementation
<raz>
not as nice as irc, but probably the second least bad
<FromGitter>
<oprypin:matrix.org> *anyway*... matrix can do everything irc can, whats the big deal
<raz>
the clients were bad last i checked
<FromGitter>
<oprypin:matrix.org> still better experience than irc
<raz>
well, maybe matrix then. i'm mostly lurking lately anyway. i'll wait and see where destiny leads us
DTZUZU_ has joined #crystal-lang
DTZUZU has quit [Ping timeout: 260 seconds]
<f1refly>
oprypin: despite your agressive and disrespectful behaviour, please consider that people have different tastes and needs. for me, and likely multiple others, weechat is the alltime favorite chat program, current matrix clients cant keep up with ti
<FromGitter>
<oprypin:matrix.org> f1refly, i think you misunderstood my tone. and now i see how it can easily be misunderstood. sorry about that.
<sorcus>
f1refly: where you see agressive behaviour?
<FromGitter>
<oprypin:matrix.org> you also have to keep in mind that i was always supporting IRC, while it was still reasonable. and running the bridge bot, of course
<f1refly>
well, his messages basically boils down to "irc sucks your opinion is wrong"
<FromGitter>
<tenebrousedge> that's not what I got from that
<f1refly>
yeah, sure. freenode is not the whole irc though. irc is still very reasonable, i'm currently connected to five networks using different nicks
<f1refly>
it's not all bad, theres good people and interesting discussion
<FromGitter>
<tenebrousedge> Cool, glad you enjoy IRC
<FromGitter>
<MrSorcus> πΈ
<FromGitter>
<oprypin:matrix.org> f1refly, to be fully clear. my message "ok just shut this place down geez" is supposed to have the exact opposite meaning. it is me being disheartened that there's another person who may choose a separate community in Discord over this chat
<f1refly>
yeah, i didn't intend to offend you, just wanted to point out that it's not all horrible and people still enjoy themselfes
<FromGitter>
<MrSorcus> Go live in peace π€
f1refly has quit [Quit: see ya in hell]
repo is now known as himselforama
himselforama has quit [Killed (beckett.freenode.net (Nickname regained by services))]
PixeLInc has quit [Ping timeout: 260 seconds]
PixeLInc has joined #crystal-lang
jrayhawk has quit [Ping timeout: 260 seconds]
early has quit [Ping timeout: 260 seconds]
baweaver has quit [Ping timeout: 260 seconds]
justinmcp_ has quit [Ping timeout: 260 seconds]
^ has quit [Ping timeout: 260 seconds]
johnny101 has quit [Ping timeout: 260 seconds]
snapcase has quit [Ping timeout: 260 seconds]
^ has joined #crystal-lang
justinmcp has joined #crystal-lang
snapcase has joined #crystal-lang
early has joined #crystal-lang
baweaver has joined #crystal-lang
HumanG33k has quit [Read error: Connection reset by peer]
HumanG33k has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
fifth has joined #crystal-lang
fifth has quit [Quit: WeeChat 3.1]
HumanG33k has quit [Read error: Connection reset by peer]
HumanG33k has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
fifth has joined #crystal-lang
hendursaga has quit [Quit: hendursaga]
hendursaga has joined #crystal-lang
hsh has joined #crystal-lang
hsh has quit [Client Quit]
HumanG33k has quit [Max SendQ exceeded]
sorcus has quit [Ping timeout: 260 seconds]
<FromGitter>
<Daniel-Worrall> Late to the party, but the crystal discord server is not official, but it's a nice community