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)]
<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>
<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>
<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
<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> 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.
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.