RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.24.1 | 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
qard has joined #crystal-lang
qard has quit [Client Quit]
qard has joined #crystal-lang
<crystal-gh> [crystal] straight-shoota opened pull request #5819: Extend documentation of Time and Time::Location APIs (master...jm/docs/time) https://git.io/vxJZX
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Creatornator has joined #crystal-lang
Creatornator has quit [Client Quit]
Creatornator has joined #crystal-lang
<FromGitter> <codenoid> nice
duane has quit [Ping timeout: 252 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
alex`` has quit [Ping timeout: 255 seconds]
<FromGitter> <bew> @straight-shoota ?
<FromGitter> <bew> In https://github.com/crystal-lang/crystal/blob/master/src/time/location.cr#L140-L143 shouldn't the condition be `.include('.')` to check for a single dot instead of only checks for dot dot ?
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
<FromGitter> <straight-shoota> Could be, but IMO doesn't need to
<FromGitter> <straight-shoota> These are essentially just sanity checks to avoid accessing arbitrary files outside the tz database
<FromGitter> <straight-shoota> In the IANA database, there are no zone IDs including a dot, but a custom database could at least theoretically use dots. I don't see real a reason to limit this.
<FromGitter> <bew> oh ok
<FromGitter> <bew> makes sense
<FromGitter> <bew> it was soooo long to review your Time doc PR ^^
<FromGitter> <straight-shoota> The behaviour is the same as in the Go impl
<FromGitter> <straight-shoota> https://golang.org/src/time/zoneinfo.go
<FromGitter> <bew> beautifully written btw 👏
<FromGitter> <straight-shoota> Yeah I've been working on that for quite some time :D
<FromGitter> <straight-shoota> Thanks
<FromGitter> <bew> you mean.. quite some `Time` :P
<FromGitter> <straight-shoota> true xD
<FromGitter> <straight-shoota> I'm going off
<FromGitter> <bew> you'll see that the format check failed in the builds, because the formatter also formats codeblock in doc
<FromGitter> <straight-shoota> good night
<FromGitter> <bew> 'k, gn!
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 260 seconds]
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Yxhuvud has joined #crystal-lang
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <watzon> Ok just added inflector support to Cadmium. I feel like it is officially useful now.
Creatornator has joined #crystal-lang
Creatornator has quit [Quit: Textual IRC Client: www.textualapp.com]
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
<FromGitter> <watzon> And documentation https://github.com/watzon/cadmium
<FromGitter> <bew> 👍
<crystal-gh> [crystal] ysbaddaden closed pull request #5817: CHANGELOG: Change release dates to use ISO format (master...patch-3) https://git.io/vxJkP
alex`` has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
<travis-ci> crystal-lang/crystal#dd0ed8c (master - CHANGELOG: Change release dates to use ISO format): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/352709531
flaviodesousa has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 245 seconds]
<FromGitter> <plainas> Hey everyone... so the documentation is a bit sparse on compound types... What's the recomended way for extracting a type from (MyType | Nil) ?
<FromGitter> <plainas> ... and fail in case of Nil
<FromGitter> <laginha87> Look at the case statements it can be used to match the class
<FromGitter> <plainas> thank you
<FromGitter> <straight-shoota> https://crystal-lang.org/docs/syntax_and_semantics/if_varis_a.html explains this
<FromGitter> <straight-shoota> You don't need `case` if there is only one branch
<FromGitter> <plainas> yeah, I had is_a? and is_nil? before. I was just wondering if there was a more idiomatic way. But they are quite similar anyway
<FromGitter> <straight-shoota> There is also `.not_nil!`
<FromGitter> <plainas> the api docs on that method are very brief, could you explain what it does?
<FromGitter> <plainas> I figured it out. Extracts the non nil type or fails otherwise. This is exactly what I wanted. thank you
<FromGitter> <straight-shoota> Exactly
rohitpaulk has joined #crystal-lang
<FromGitter> <plainas> ok, nwebie question alert: how do I check if an element is present in an array?
rohitpaulk has quit [Ping timeout: 252 seconds]
<FromGitter> <j8r> @plainas please, do a search first. You will find that's `.include "str"` for Ruby. If you do so, Crystal will tell you to use `.includes "str"`
<FromGitter> <yxhuvud> Except the methods, both in ruby and crystal ends with `?`
<FromGitter> <j8r> yes i miss this
rohitpaulk has joined #crystal-lang
<crystal-gh> [crystal] straight-shoota opened pull request #5822: Remove Time#date (master...jm/feature/remove-Time.date) https://git.io/vxUJQ
shalmezad has joined #crystal-lang
<FromGitter> <plainas> @j8r I did a quick google search before. Unfortunately without success.
baweaver has quit [Ping timeout: 240 seconds]
baweaver has joined #crystal-lang
baweaver is now known as Guest93774
<crystal-gh> [crystal] mamantoha opened pull request #5824: add HTTP OPTIONS method to HTTP::Client (master...http-client-options-method) https://git.io/vxULI
<FromGitter> <j8r> you can try with Ruby, often the results are close.
<FromGitter> <j8r> The best is to look at the API for this simple methods https://crystal-lang.org/api/master/
woodruffw has quit [Ping timeout: 268 seconds]
woodruffw has joined #crystal-lang
woodruffw has quit [Changing host]
woodruffw has joined #crystal-lang
shalmezad has quit [Quit: This computer has gone to sleep]
duane has joined #crystal-lang
shalmezad has joined #crystal-lang
duane has quit [Ping timeout: 246 seconds]
shalmezad has quit [Quit: Workin']
qard has joined #crystal-lang
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
qard has joined #crystal-lang
duane has joined #crystal-lang
<FromGitter> <bew> @plainas there is also https://crystal-lang.org/docs/syntax_and_semantics/if_var.html to help you get ride of the Nil type cleanly
flaviodesousa has quit [Ping timeout: 256 seconds]
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
rohitpaulk has joined #crystal-lang
wuehlmaus has quit [Quit: Lost terminal]
wuehlmaus has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 264 seconds]
notdaniel has joined #crystal-lang
Creatornator has joined #crystal-lang
Creatornator has quit [Client Quit]
Creatornator has joined #crystal-lang
duane has quit [Ping timeout: 260 seconds]
rohitpaulk has joined #crystal-lang
Creatornator has quit [Quit: Textual IRC Client: www.textualapp.com]
rohitpaulk has quit [Ping timeout: 252 seconds]
Creatornator has joined #crystal-lang
qard has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<crystal-gh> [crystal] RX14 closed pull request #5786: Fix boundary check in Time#add_span and move it to constructor (master...jm/fix/time-add-span-boundary) https://git.io/vAbjV
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ua has joined #crystal-lang
andrewzah has quit [Quit: ""]
qard has joined #crystal-lang
ua__ has quit [Ping timeout: 240 seconds]
qard has quit [Ping timeout: 246 seconds]
<FromGitter> <aisrael> Any idea why I keep getting a `403 Forbidden` trying to submit an announcement to crystal-ann.com?
Ven`` has joined #crystal-lang
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven`` has joined #crystal-lang
rohitpaulk has joined #crystal-lang
Ven`` has quit [Client Quit]
Creatornator has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
catalystkt has joined #crystal-lang
catalystkt has quit [Remote host closed the connection]
<FromGitter> <faustinoaq> @veelenga ^
<travis-ci> crystal-lang/crystal#077e0da (master - Add boundary check for seconds in Time#initialize (#5786)): The build passed. https://travis-ci.org/crystal-lang/crystal/builds/353001657
<DeBot> https://github.com/crystal-lang/crystal/pull/5786 ( Fix boundary check in Time#add_span and move it to constructor)
<FromGitter> <aisrael> I wish the `if var` semantics would work for suffix if. ⏎ E.g., maybe the compiler could silently interpret ⏎ ⏎ ```if _attr = @attr ⏎ h[:attr] = _attr ⏎ end``` ⏎ ... [https://gitter.im/crystal-lang/crystal?at=5aa829df6f8b4b9946229979]
<FromGitter> <bew> It does
<FromGitter> <bew> Here the problem is that the concept is if var, not if @ivar
<FromGitter> <bew> It doesn't work with non local variables
<FromGitter> <aisrael> Ahh. I guess that's what I meant. Thing is, ⏎ ⏎ ```h[:attr] = attr if attr = @attr``` ⏎ ⏎ Doesn't work either [https://gitter.im/crystal-lang/crystal?at=5aa82ad80a1614b7121788a5]
<FromGitter> <aisrael> So that's why I thought maybe the compiler could rewrite that for me :)
<FromGitter> <bew> Yeah I dob't know why this doesn't work
<FromGitter> <straight-shoota> because it is confusing with the assignment in trailing if
<FromGitter> <bew> How so?
rohitpaulk has joined #crystal-lang
<FromGitter> <straight-shoota> it encourages to assign a variable after it is used (in lexical order)
<FromGitter> <straight-shoota> trailing if should IMHO only be used for very simple conditions
<FromGitter> <bew> Hmm yes maje sense
<FromGitter> <bew> Make*
<FromGitter> <straight-shoota> ofc it would be okay to use with a local variable `puts attr if attr`
<FromGitter> <straight-shoota> or rather `attr.foo if attr`
duane has joined #crystal-lang
duane has quit [Ping timeout: 246 seconds]
duane has joined #crystal-lang
Creatornator has quit [Quit: Textual IRC Client: www.textualapp.com]
<crystal-gh> [crystal] straight-shoota closed pull request #5772: Add release date of 0.24.1 to CHANGELOG (master...patch-1) https://git.io/vAQbL
hightower has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
notdaniel has quit [Quit: Leaving]
alex`` has quit [Quit: WeeChat 2.0.1]
<FromGitter> <veelenga> @aisrael ⏎ ⏎ > Any idea why I keep getting a `403 Forbidden` trying to submit an announcement to crystal-ann.com? ⏎ ⏎ That was a bug. I've just deployed the latest (fixed) version. Looking forward for your announcements. [https://gitter.im/crystal-lang/crystal?at=5aa84d48e4d1c63604f808ca]
wojnar has joined #crystal-lang
wojnar has quit [Ping timeout: 246 seconds]
wojnar has joined #crystal-lang
wojnar_ has joined #crystal-lang
wojnar has quit [Ping timeout: 246 seconds]
wojnar_ has quit [Remote host closed the connection]
molus_mh has joined #crystal-lang
molus_mh has left #crystal-lang [#crystal-lang]
duane has quit [Ping timeout: 240 seconds]
qard has joined #crystal-lang