RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.25.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
<FromGitter> <faustinoaq> @girng Yeah, busy with college and fixing computers 😅
<FromGitter> <faustinoaq> @hugoabonizio @tenderlove RX14 what about this: https://stackoverflow.com/a/45279884/7450793
<FromGitter> <RX14> looks like too many brackets for me to parse at 1:30am
<FromGitter> <faustinoaq> Just to say: Nice game between Panama and England 😄 Was our first goal in a fifa world cup ✨
zachk has quit [Quit: Leaving]
<FromGitter> <S-YOU> Congrats, @faustinoaq
<FromGitter> <girng> wow, Constants are global, didn't know that, cool!
<FromGitter> <aisrael> They don't have to be. I mean, you can have a `module` or `class` scoped constant, right?
<FromGitter> <girng> i love globals
<FromGitter> <aisrael> Yeah... I used to avoid then unless necessary in Ruby since they weren't really constant (and you risk collision thus overriding/redefining constants) but at least in Crystal the compiler will complain so it's safer
<FromGitter> <codenoid> i'm abusing computer for fun and profit
<FromGitter> <girng> @codenoid thx
spencer has joined #crystal-lang
<spencer> So when writing a shard if I'm extending a standard library class do I not put my code in a module?
<FromGitter> <girng> https://play.crystal-lang.org/#/r/4ec1/edit is there a method i can call on .split("x") that converts it to an int32?
<FromGitter> <reiswindy> You can call `.map(&.to_i)`
spencer has quit [Quit: Textual IRC Client: www.textualapp.com]
faustinoaq has joined #crystal-lang
faustinoaq has quit [Client Quit]
<FromGitter> <snadon> ```puts Time.parse("08/04/2017 19:05:31", "%m/%d/%Y %H:%m:%s") ⏎ # => 1970-01-01 00:00:31 UTC``` [https://gitter.im/crystal-lang/crystal?at=5b31b7a6ce3b0f268d435819]
<rocx> where does `crystal docs` get the information about contributors from?
<rocx> 'scuse me, where does `crystal init` get author/contributor information from?
jcs has left #crystal-lang [#crystal-lang]
<FromGitter> <icyleaf> @snadon `Time.parse("08/04/2017 19:05:31", "%m/%d/%Y %H:%M:%S", Time::Location.local)` in crystal 0.25
<FromGitter> <icyleaf> @godmode97 i missing `#new`
<FromGitter> <snadon> @icyleaf Thanks it's working well. In the documentation it says `Time.parse("2015-10-12 10:30:00 +00:00", "%Y-%m-%d %H:%m:%s %Z")`, I suppose `%m:%s` should be `%M:%S`?
<FromGitter> <icyleaf> Yes, the `Time::Formatter` document was setted hide in crystal 0.25.0, but you can check here: https://github.com/crystal-lang/crystal/blob/master/src/time/format.cr#L37,
<FromGitter> <snadon> okay thank you
<txdv> DOLLAR IS WHAT I NEED!
<FromGitter> <codenoid> for what ?
<txdv> for services and goods
<FromGitter> <girng> lol
benharri has quit [Quit: not here right now...]
benharri has joined #crystal-lang
pbodev1 has joined #crystal-lang
rohitpaulk has joined #crystal-lang
snsei has joined #crystal-lang
snsei has quit [Ping timeout: 255 seconds]
<FromGitter> <ok2094> I keep getting this error ``` ⏎ ERROR: cast from Int64 to Hash(K, V) failed, at /usr/local/Cellar/crystal-lang/0.25.0_1/src/json/any.cr:211:5:211 (TypeCastError) ⏎ from /usr/local/Cellar/crystal-lang/0.25.0_1/src/json/any.cr:0:5 in 'as_h' ⏎ from lib/jwt/src/jwt.cr:36:15 in 'decode' ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5b31dcc00168e70c08eef696]
<FromGitter> <codenoid> are you using mac ?
<FromGitter> <ok2094> yes
<FromGitter> <codenoid> ok
rocx has quit [Ping timeout: 260 seconds]
<FromGitter> <codenoid> how to encrypt somestring/base64 with crystal
<FromGitter> <ok2094> decode: https://crystal-lang.org/api/0.25.0/Base64.html#decode%28data%29%3ABytes-instance-method
<FromGitter> <codenoid> with a key
<FromGitter> <godmode97> ```code paste, see link``` ⏎ ⏎ i'm trying to iterate 20 times using `Cossack::Client` but wasn't able to get some response from it. [https://gitter.im/crystal-lang/crystal?at=5b31e7c9a288503b3ddfe263]
<FromGitter> <codenoid> `HTTP::Client.get` is better
rohitpaulk has quit [Ping timeout: 276 seconds]
DTZUZU has quit [Ping timeout: 240 seconds]
DTZUZO has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
<FromGitter> <godmode97> still the same.
<FromGitter> <S-YOU> Surprised rust type inference on this one. ⏎ ⏎ ````parse()` looking up `type` on other side of assignment. Compliers are complicated.``` [https://gitter.im/crystal-lang/crystal?at=5b31f1d0ad21887018dee9a0]
<FromGitter> <codenoid> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b31f4165862c35f47c8b260]
pwned has joined #crystal-lang
lvmbdv has joined #crystal-lang
DTZUZU has joined #crystal-lang
DTZUZO has joined #crystal-lang
DTZUZU has quit [Ping timeout: 240 seconds]
DTZUZO has quit [Ping timeout: 260 seconds]
jfo_test has joined #crystal-lang
<FromGitter> <codenoid> should i create `issue` for that ?
DTZUZU has joined #crystal-lang
DTZUZO has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 244 seconds]
Raimondii is now known as Raimondi
<FromGitter> <bcardiff> @S-YOU rahter than inference I think that is method lookup algortihm. Some language use the result type as input for the overload to use. It's nice there, but if you only see the rhs you might no longer be sure the code to execute (and that sometimes make it harder IMO)
<FromGitter> <bcardiff> @codenoid 0x20 is a space I think. Is the input right? Would you double check the input and check with some other base64 decoder to clarify if the problem is in crystal stdlib or somewhere else.
<FromGitter> <S-YOU> I believe it is harder, `parse` has no idea what its gonna do alone, I guess.
<FromGitter> <bcardiff> UFCS seems to be alternative method call syntax to avoid some amiguous cases due to the nature of those languages.
<FromGitter> <Val> oops
<FromGitter> <Val> When I try to compile this code with debug info : https://carc.in/#/r/4efo ⏎ I get : ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5b32055bce3b0f268d43fb1f]
<crystal-gh> [crystal] asterite opened pull request #6269: IO#write: return early if slice is empty (master...feature/6268-openssl-socket-write-empty-slice) https://git.io/f4Qat
<RX14> gitter bot is still broken :(
<FromGitter> <Val> Is this a compiler bug ?
<FromGitter> <codenoid> the input is strict_encode
DTZUZU has quit [Ping timeout: 276 seconds]
DTZUZO has quit [Ping timeout: 256 seconds]
<FromGitter> <icyleaf> @godmode97 @codenoid try halite for http request: https://github.com/icyleaf/halite :)
DTZUZU has joined #crystal-lang
DTZUZO has joined #crystal-lang
jfo_test has quit [Quit: The Lounge - https://thelounge.chat]
jfo_test has joined #crystal-lang
<crystal-gh> [crystal] asterite opened pull request #6272: Add Time::Span#microseconds, Int#microseconds and Float#microseconds (master...feature/6270-time-span-microseconds) https://git.io/f4QiQ
<crystal-gh> [crystal] asterite opened pull request #6273: Remove singular names like Int#day, Int#month, etc. (master...refactor/remove-time-span-nodoc-methods) https://git.io/f4QPe
jfo_test has quit [Quit: The Lounge - https://thelounge.chat]
faustinoaq has joined #crystal-lang
<crystal-gh> [crystal] asterite opened pull request #6274: Formatter: fix for begin ... rescue ... end (master...bug/6256-formatter-begin-rescue-end) https://git.io/f4QDk
confact has joined #crystal-lang
<FromGitter> <fgimian> Hey @faustinoaq, hope it's OK, I went through all the issues I could on the Sublime Text extension and tried to help.
<crystal-gh> [crystal] bcardiff closed pull request #6266: Add dup and clone for JSON::Any and YAML::Any (master...feature/6220-json-any-dup) https://git.io/f4Qe0
<FromGitter> <bendietze_twitter> I am a newbie to GitHub, don't know best practice: if i issued something and it got's refrenced from a pr - is it more accurate to comment thanks or is it more convinience to ignore still because every comment should be viewed by someone? What's more team friendly about issues and comments? About nettiquette or gittiquette :) i don't know 😟
<FromGitter> <fgimian> @bendietze_twitter Really the biggest no no is the constant +1 comments you get when someone requests a feature. Saying thank you is always nice, but if you want to be safe, you can simply use an emoji (e.g. smiley or hooray) on the actual comment that you would like to appreciate.
<FromGitter> <bendietze_twitter> @fgimian oh, yes, you are right, that feels good to me and should be helpful 😄
<FromGitter> <bendietze_twitter> Btw, this smiley here 😄 is called smile :) but is is always laughing, right? Gitter is really happy place 😄
<FromGitter> <bendietze_twitter> So, @fgimian , i 👍 up the pullrequest comment, because if i would smile this smiley is called laughin on GitHub comments, so for me doing 👍 was more correct as laughing about? Smileyworld is irritating sometimes :)
<FromGitter> <faustinoaq> I always try to say "Thank you!", "No problem" or something like that, because my English is not very good, so I don't know if my comment is insulting or not 😅
<crystal-gh> [crystal] asterite opened pull request #6275: Don't define `to_json` and `self.from_json` on Object (master...feature/5695-remove-object-to_json) https://git.io/f4QQD
<FromGitter> <bendietze_twitter> @faustinoaq you are no native english speaker? Wow - never mentioned that
<travis-ci> crystal-lang/crystal#0004179 (master - Add dup and clone for JSON::Any and YAML::Any (#6266)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/396853517
<DeBot> https://github.com/crystal-lang/crystal/pull/6266 (Add dup and clone for JSON::Any and YAML::Any)
<FromGitter> <fgimian> OK I better get to sleep. Have a great day/evening guys.
<faustinoaq> @bendietze_twitter hehe, I'm from Panama :)
<faustinoaq> Hey, @asterite BTW, I didn't know this was possible on crystal: `def Object.some_method;end`
<faustinoaq> @fgimian Thank you for your sublime-crystal contributions, very appreciated! :)
<FromGitter> <fgimian> @faustinoaq You're welcome mate, hope they're helpful.
<faustinoaq> Oh, I can even use `def MyObject.some_method; end`: https://carc.in/#/r/4eha
<faustinoaq> Is this behavior documented somewhere?
rohitpaulk has quit [Remote host closed the connection]
<FromGitter> <giuseongit> Hi, is this channel only for the language development or can I ask some help?
<FromGitter> <hugoabonizio> @giuseongit you can ask for help too
<FromGitter> <bendietze_twitter> Yes, Channels will block, as long is unbuffered, buffered can get more info till blocking. While blocking the scheduler is able to switch between fibers ;)
<FromGitter> <hugoabonizio> see: https://carc.in/#/r/4ei9 and https://carc.in/#/r/4eia
<FromGitter> <hugoabonizio> but mabe there are a standard timeout that I'm not aware of
<FromGitter> <bendietze_twitter> But have not enough time to follow at this moment
<FromGitter> <hugoabonizio> @EmilieGliech_twitter I didn't know about TAP, but take a look at this: https://github.com/MakeNowJust/tap
<FromGitter> <asterite> Shouldn't it be just a different spec formatter?
snsei has joined #crystal-lang
<FromGitter> <hugoabonizio> @EmilieGliech_twitter try with my fork https://github.com/hugoabonizio/tap
<FromGitter> <asterite> what is tap used for?
<FromGitter> <EmilieGliech_twitter> @hugoabonizio It's working, thank you very much.
<FromGitter> <EmilieGliech_twitter> But it would be interesting to create a formatter for tap in spec, I'll try anyway
duane has quit [Ping timeout: 264 seconds]
<FromGitter> <fridgerator> encrypt for what purpose?
rohitpaulk has joined #crystal-lang
<crystal-gh> [crystal] asterite closed pull request #6275: Don't define `to_json` and `self.from_json` on Object (master...feature/5695-remove-object-to_json) https://git.io/f4QQD
duane has joined #crystal-lang
return0e has quit [Remote host closed the connection]
return0e has joined #crystal-lang
<FromGitter> <codenoid> secure my data
rohitpaulk has quit [Ping timeout: 276 seconds]
snsei has quit [Remote host closed the connection]
rocx has joined #crystal-lang
<crystal-gh> [crystal] ysbaddaden closed pull request #6274: Formatter: fix for begin ... rescue ... end (master...bug/6256-formatter-begin-rescue-end) https://git.io/f4QDk
<FromGitter> <bendietze_twitter> Curious.. Didn't find a way to get memory usage (in bytes) of a Hash? How to archieve this? Run-trough, join,... not the cheapest in my opinion 😟 must be more easy, but i am out of words :)
rohitpaulk has joined #crystal-lang
<FromGitter> <RX14> why must it be easy?
<FromGitter> <bendietze_twitter> It's a cache, i need the ram usage to limit this or check how much is usage
<FromGitter> <RX14> and hash itself's size is O(entries)
<FromGitter> <RX14> as I said, limit on hash.size and hash.sum { |k,v| k.byesize + v.bytesize }
<FromGitter> <sam0x17> I think something upstream might have messed it up
<FromGitter> <RX14> the openssl package is broken
<FromGitter> <sam0x17> well whoever maintains it would LOVE it if there were tags so we could use previous crystal versions as they come out -- as there is no way to do that otherwise with the APK packages, and would make debugging this a bit easier
<FromGitter> <j8r> you can add older repos like 3.7
<FromGitter> <RX14> no
<FromGitter> <j8r> But we always depend on other people, like now with Alpine people breaking the zlib package @ edge :-}
<travis-ci> crystal-lang/crystal#e74e9ea (master - Formatter: fix for begin ... rescue ... end): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/396935407
wontruefree has joined #crystal-lang
<FromGitter> <wontruefree> @faustinoaq thanks for the recursive proc update
<FromGitter> <j8r> @sam0x17 Thus you can close https://github.com/crystal-lang/crystal/issues/6276
<crystal-gh> [crystal] kostya closed pull request #6252: Add global annotation Property (master...annotation_property) https://git.io/f4SK1
<FromGitter> <asterite> But other than that, he's a cool guy :-)
wuehlmaus has quit [Read error: Connection reset by peer]
rohitpaulk has quit [Ping timeout: 256 seconds]
<FromGitter> <sam0x17> and for whatever reason, the one I set up just now works fine: https://hub.docker.com/r/durosoft/crystal-alpine/
<FromGitter> <RX14> @Val you shouldn't detect whether you're in spec
<FromGitter> <RX14> well, the other one that wasn't broken
moei has quit [Quit: Leaving...]
<FromGitter> <eliasjpr> Where I can find more documentation about `method_missing`?
<crystal-gh> [crystal] RX14 closed pull request #6269: IO#write: return early if slice is empty (master...feature/6268-openssl-socket-write-empty-slice) https://git.io/f4Qat
<FromGitter> <asterite> It's not documented because it's half baked. Please don't use it
moei has joined #crystal-lang
<travis-ci> crystal-lang/crystal#df5f46a (master - IO#write: return early if slice is empty (#6269)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/397000325
<DeBot> https://github.com/crystal-lang/crystal/pull/6269 (IO#write: return early if slice is empty)
rohitpaulk has joined #crystal-lang
faustinoaq has quit [Ping timeout: 260 seconds]
wontruefree has quit [Quit: bye]
<FromGitter> <eliasjpr> Ahh thanks guys.
faustinoaq has joined #crystal-lang
<FromGitter> <sam0x17> @j8r so that's what fixed it then?
<FromGitter> <Val> @RX : thx
zachk has joined #crystal-lang
zachk has quit [Changing host]
zachk has joined #crystal-lang
wontruefree has joined #crystal-lang
<wontruefree> sam0x17 I know docker hub has had some malicious containers on it. do you know if there is their anyway for you to sign it or verify it? Or anything to make it more secure?
daemonwrangler has quit [Ping timeout: 245 seconds]
<FromGitter> <adamgotterer_twitter> Is it possible to see a call stack?
daemonwrangler has joined #crystal-lang
<FromGitter> <jwoertink> I keep getting this error when I run `shards install`
<FromGitter> <asterite> Yes
<FromGitter> <jwoertink> Should I report that? or is it the stance of shards that the tag needs to be in that format?
<FromGitter> <asterite> I don't think you'll win thast battle (I tried before)
duane has quit [Ping timeout: 265 seconds]
duane has joined #crystal-lang
faustinoaq has quit [Ping timeout: 240 seconds]
faustinoaq has joined #crystal-lang
duane has quit [Ping timeout: 276 seconds]
<FromGitter> <adamgotterer_twitter> @jwoertink thanks
<FromGitter> <jwoertink> Actually, it looks like in the code that it should have worked without the "v" https://github.com/crystal-lang/shards/blob/master/src/resolvers/git.cr#L135
<FromGitter> <girng> Good Afternoon!
<FromGitter> <MrSorcus> https://crystal-lang.org/api/0.24.2/Hash.html#merge%21%28other%3AHash%2C%26block%29-instance-method ⏎ How `merge!` with block works? In block only similar key is available for some actions?
<FromGitter> <girng> btw, that is done inside a fiber, `handle_connection`
rohitpaulk has quit [Ping timeout: 265 seconds]
pwned has quit [Ping timeout: 276 seconds]
pbodev1 has quit [Quit: ChatZilla 0.9.93 [Firefox 56.0/20170903140023]]
olbat has joined #crystal-lang
olbat has quit [Quit: Bye ...]
faustinoaq has quit [Quit: IRC client terminated!]
olbat has joined #crystal-lang
olbat has quit [Quit: Bye ...]
olbat has joined #crystal-lang
sz0 has joined #crystal-lang
<FromGitter> <bew> yes it looks like synchronous inside the fiber, but if you do your `puts` in another fiber, it'll be executed while `db.query_all` is running
wontruefree has quit [Quit: bye]