ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.33.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
HumanG33k has joined #crystal-lang
HumanG33k has quit [Remote host closed the connection]
HumanG33k has joined #crystal-lang
ur5us has quit [Ping timeout: 256 seconds]
DTZUZU2 has joined #crystal-lang
DTZUZU has quit [Ping timeout: 268 seconds]
Human_G33k has joined #crystal-lang
HumanG33k has quit [Ping timeout: 260 seconds]
<FromGitter> <smalls12> I'm sure this has been asked before, is there an equivalent to vector from c++ within crystal? ⏎ I've made my own linked list in crystal, just wondering if there was something standard
DTZUZU2 has quit [Ping timeout: 258 seconds]
ur5us has joined #crystal-lang
DTZUZU2 has joined #crystal-lang
renich has quit [Read error: Connection reset by peer]
chachasmooth_ has quit [Ping timeout: 256 seconds]
chachasmooth has joined #crystal-lang
ur5us has quit [Ping timeout: 256 seconds]
_ht has joined #crystal-lang
ur5us has joined #crystal-lang
_ht has quit [Quit: _ht]
ur5us has quit [Ping timeout: 256 seconds]
ur5us has joined #crystal-lang
alexherbo2 has joined #crystal-lang
alexherbo28 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 255 seconds]
alexherbo28 is now known as alexherbo2
sz0 has joined #crystal-lang
<FromGitter> <j8r> There is `Array` and `Deque`
_whitelogger has joined #crystal-lang
<FromGitter> <yxhuvud> And Slice, not to forget.
watzon has quit [Quit: Ping timeout (120 seconds)]
watzon has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
<livcd> So is there going to be a campaign for this ?
<livcd> I would contribute :P
<FromGitter> <j8r> @Blacksmoke16 I cleaned up the database, relaunch tests - and finally results are near the same as other crystal frameworks :)
<FromGitter> <j8r> the DB may do an average on the results
<FromGitter> <j8r> Haha, as fast as router.cr :)
<FromGitter> <j8r> It was really puzzling me yesterday, I was digging around
return0__ has joined #crystal-lang
return0e_ has quit [Ping timeout: 256 seconds]
postmodern has quit [Quit: Leaving]
alexherbo27 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 268 seconds]
alexherbo27 is now known as alexherbo2
<FromGitter> <Blacksmoke16> nice one!
<FromGitter> <Blacksmoke16> now what?
<FromGitter> <dscottboggs_gitlab> livcd personally I don't use Windows at all and don't really care that much about windows suport, what use-cases would you use it for?
<FromGitter> <stronny> I fear windows support would become a cancer killing all that's good about crystal
<FromGitter> <j8r> @Blacksmoke16 I will create a new little app, put it in production
<FromGitter> <Blacksmoke16> sounds like a plan
<FromGitter> <j8r> lol, you like this sentence 😉
alexherbo25 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 265 seconds]
alexherbo25 is now known as alexherbo2
<FromGitter> <Blacksmoke16> maybe :p
darkstardevx has quit [Read error: Connection reset by peer]
sz0 has quit [Quit: Connection closed for inactivity]
<FromGitter> <wout> What's the best approach to port the following piece of Ruby code to Crystal?
<FromGitter> <wout> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e69127ca2897318a9a10547]
<FromGitter> <wout> Usage would be:
<FromGitter> <wout> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e69128a8011bb652a090a40]
<FromGitter> <Blacksmoke16> what is `instance` in this context?
<FromGitter> <wout> Just a sec...
<FromGitter> <wout> An instance of `Object` in the example, which is a client to make API calls.
<FromGitter> <Blacksmoke16> id prob come up with another solution, seems kinda hacky
<FromGitter> <wout> I know `Thread` is private in Crystal, so I am a bit stuck here.
<FromGitter> <wout> True.
<FromGitter> <Blacksmoke16> like why do you need to store the client on the current thread in the first place?
DTZUZU2 has quit [Ping timeout: 256 seconds]
<FromGitter> <wout> Yeah, I don't know. In case of this gem, you can make requests using a global api key. An additional feature using the `Client.with_api_key` method and a block, adds the option to create calls with anoter api key within that block.
DTZUZU has joined #crystal-lang
<FromGitter> <wout> But maybe I need to deviate from this approach and let them explicitly pass a client with which they like to make the call. That would be clearer anyway.
<FromGitter> <wout> Something along the lines of:
<FromGitter> <wout> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e6914bef046a30bbe5959b9]
<FromGitter> <Blacksmoke16> what is `Object`?
<FromGitter> <Blacksmoke16> like the top level type or?
<FromGitter> <wout> No, it's like `Payment`, `Refund`, `Subscription`, ...
<FromGitter> <Blacksmoke16> ah ok
<yxhuvud> So if it behaves the same as the Salesforce integration I interact with at work it probably sets up one connection per thread and reuse that between calls. You might want to see if you can build a threadpool where connections are checked in or out to emulate the non-shared-ness of that
alexherbo2 has quit [Quit: The Lounge - https://thelounge.chat]
alexherbo2 has joined #crystal-lang
<FromGitter> <nipinium> how can you set character encoding in HTTP::Client request?
<FromGitter> <nipinium> my returned html body is malformed
<FromGitter> <naqvis> look for `Response` *content-type* and *charset* returned. Server might be returning characters encoded using different *charset*
<FromGitter> <naqvis> or if you want to communicate to server, your client is willing to accept specific charset, then set `HEADER` on client by setting `Accept-Charset: <charset>`
<FromGitter> <naqvis> but that is on the server to respect or ignore such headers, so safe bet is check for server returned *content-type* and *charset* and act appropriately.
<FromGitter> <nipinium> thanks, I did it:
<FromGitter> <nipinium> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5e691e8a85f81e18a8fd43bd]
<FromGitter> <nipinium> the server return `charset=utf-8` but it actually is gbk
alexherbo24 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 255 seconds]
alexherbo24 is now known as alexherbo2
<FromGitter> <naqvis> I don't think its server returned contents issue, but problem is happening when you are writing to file. You can set the `encoding` option accordingly.
<FromGitter> <naqvis> I just did a quick test on invoking client on `http://news.baidu.com/` and displayed result in playground and its displaying contents properly.
_whitelogger has joined #crystal-lang
Human_G33k has quit [Remote host closed the connection]
<FromGitter> <nipinium> yes, site like baidu would set the charset properly, but the sites I'm working on is mostly not, because they were rather poorly written.
Human_G33k has joined #crystal-lang
Human_G33k has quit [Max SendQ exceeded]
Human_G33k has joined #crystal-lang
postmodern has joined #crystal-lang
<FromGitter> <drum445> Hello, how do I avoid this error: `undefined method 'handle' for Nil (compile-time type is (FishingSession | Nil))` even though I have this block: ⏎ ⏎ `````` [https://gitter.im/crystal-lang/crystal?at=5e694356f046a30bbe59e8cd]
<FromGitter> <Blacksmoke16> ```if s = session ⏎ s.handle m ⏎ else ⏎ puts "ffs" ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5e69438d8e42396957817db5]
<FromGitter> <drum445> interesting, thanks sir
<FromGitter> <Blacksmoke16> 👍
ur5us has joined #crystal-lang
tdc has joined #crystal-lang
alexherbo24 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 265 seconds]
alexherbo2 has joined #crystal-lang
alexherbo24 has quit [Ping timeout: 265 seconds]
alexherbo2 has quit [Ping timeout: 255 seconds]
tdc has quit [Ping timeout: 240 seconds]
<FromGitter> <wout> @Blacksmoke16 About the `Thread` question I asked before, I found a fairly elegant way to solve it differently:
<FromGitter> <wout> Thanks for pushing me to look further. :)
<FromGitter> <washu> any way for me to signal my crystal app to see what fiber is hung?
<FromGitter> <washu> hrmm seems my signal handler is running inside of a db call, did signal semantics change form 0.30 to 0.33
watzon has quit [Quit: The Lounge - https://thelounge.chat]
watzon has joined #crystal-lang
watzon has quit [Client Quit]
watzon has joined #crystal-lang
watzon has quit [Client Quit]
watzon has joined #crystal-lang
DTZUZU has quit [Quit: WeeChat 2.7]
issyl0 has quit [Remote host closed the connection]
Liothen has quit [Remote host closed the connection]
DTZUZU has joined #crystal-lang
Liothen has joined #crystal-lang
issyl0 has joined #crystal-lang
<watzon> @washu never used mollie before, but I appreciate the effort that was put into the readme
hsh has quit [Read error: Connection reset by peer]
jetpack_joe has quit [Remote host closed the connection]
confact has quit [Read error: Connection reset by peer]
confact has joined #crystal-lang
hsh has joined #crystal-lang
jetpack_joe has joined #crystal-lang
<FromGitter> <Blacksmoke16> @bcardiff do you have a minute to check out https://github.com/crystal-lang/crystal/pull/8836? I would love if some progress on that could be made
OvermindDL1 has quit [Remote host closed the connection]
OvermindDL1 has joined #crystal-lang
<FromGitter> <bcardiff> Sorry @Blacksmoke16 , little to none attention to language features for now on my part. After we finish iterating on tooling and std-lib I will try to make a pass there. It is something I am interested in, definitely. It's hard for me to keep the focus to move steady forward.
<FromGitter> <Blacksmoke16> 👍 ❤️
watzon has quit [Quit: The Lounge - https://thelounge.chat]
watzon has joined #crystal-lang
ur5us has quit [Ping timeout: 240 seconds]
ur5us has joined #crystal-lang