RX14 changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.26.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
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
rohitpaulk has joined #crystal-lang
moei has quit [Ping timeout: 240 seconds]
_whitelogger has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
<FromGitter> <sam0x17> how can I do something like this but have `block` be able to take a `Slice` variable? ⏎ ⏎ ``` def on_data(&block) ⏎ @data_callback = block ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5ba1e8f37dca306503212693]
<FromGitter> <Qwerp-Derp> Is there an online website that visualises how a macro expands?
<FromGitter> <Qwerp-Derp> I *might* do it if no one else has done it and if I can be bothered, how hard would it be to make?
<FromGitter> <codenoid> good noon all
<FromGitter> <lunarfyre7> I'm trying to install a shard from it's main repo, but no matter what I do shards gets a particular fork og the shard that's 3 years old...
<FromGitter> <sam0x17> got it, what I needed was something like this: ⏎ ⏎ ``` @data_callback = block ⏎ end``` [https://gitter.im/crystal-lang/crystal?at=5ba1ed517dca306503213f59]
<FromGitter> <lunarfyre7> What I want `jreinert/ncurses-crystal`, what it gives me, even after manually changing the lockfile `maxpowa/ncurses-crystal`
<FromGitter> <codenoid> what `Slice(UInt8) ->` mean
<FromGitter> <sam0x17> a block that takes a Slice of Uint8's as an argument
<FromGitter> <sam0x17> and returns nothing in particular
<FromGitter> <codenoid> ->
<FromGitter> <sam0x17> based on the standard #map syntax: https://crystal-lang.org/api/0.26.1/Enumerable.html#map%28%26block%3AT-%3EU%29forallU-instance-method
<FromGitter> <codenoid> it's just life def `funct(arr : Array(String))` right ??
return0e has joined #crystal-lang
<FromGitter> <sam0x17> apparently you can omit the return type of the block but you still need the `->` so it knows you are talking about the first argument and not the return type
<FromGitter> <sam0x17> e.g. `def on_data(&block : Slice(UInt8))` won't compile
<FromGitter> <sam0x17> but `def on_data(&block : Slice(UInt8) ->)` will as will `def on_data(&block : Slice(UInt8) -> String)` `def on_data(&block : Slice(UInt8) -> Bool)` etc
<FromGitter> <codenoid> *like ⏎ ⏎ > it's just life def `funct(arr : Array(String))` right ?
<FromGitter> <codenoid> okay ✨
<FromGitter> <sam0x17> @codenoid I'm not sure
<FromGitter> <sdogruyol> Yo
<FromGitter> <lunarfyre7> Ah, my problem was from another shard requiring the wrong version
<FromGitter> <Qwerp-Derp> How hard would it be to make a visual macro expander for Crystal macros?
<FromGitter> <Qwerp-Derp> It's really useful for the fairly large macro that I'm making
<FromGitter> <Qwerp-Derp> It would be* not It's
Groogy1 has joined #crystal-lang
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 252 seconds]
<FromGitter> <bararchy> Hi @sdogruyol :)
ashirase has quit [Ping timeout: 252 seconds]
ashirase has joined #crystal-lang
jsn- has quit [Ping timeout: 245 seconds]
jsn- has joined #crystal-lang
rohitpaulk has joined #crystal-lang
Heaven31415 has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 272 seconds]
<Heaven31415> Hi
rohitpaulk has joined #crystal-lang
<FromGitter> <codenoid> why https://play.crystal-lang.org/#/r/51jd
<FromGitter> <codenoid> did i miss something ?
Liothen has quit [Quit: The Dogmatic Law of Shadowsong]
Liothen has joined #crystal-lang
<FromGitter> <drum445> Something like that for example, you need to explicitly declare a type there before assignment
<FromGitter> <drum445> Strange that it is only an issue for time though
<FromGitter> <codenoid> thank you
<FromGitter> <drum445> if you set the property for the attr, you don't need to manually define a getter - i.e. your regular method
<FromGitter> <drum445> you can just call it using ⏎ foo.date
<FromGitter> <vladfaust> How would you call three developer statuses regarding to job search? Like, `available`, `open` and `not available`? I'm confused with `open` term
thews has quit [Ping timeout: 245 seconds]
flaviodesousa has joined #crystal-lang
thews has joined #crystal-lang
<FromGitter> <Schniz> @bararchy @omerxx hehe I just saw the message! 🇮🇱
thews has quit [Ping timeout: 250 seconds]
rohitpaulk has quit [Ping timeout: 245 seconds]
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 240 seconds]
<lvmbdv> vladfaust: actively looking, casually available, not available
notdaniel has quit [Quit: Ping timeout (120 seconds)]
notdaniel has joined #crystal-lang
<FromGitter> <j8r> @vlazar thanks for the link 😃
<FromGitter> <codenoid> where to buy pdf version
<FromGitter> <vlazar> The link I've posted above. When you buy a book you'll get access to epub/mobi/PDF version of book.
Heaven31415 has quit [Ping timeout: 245 seconds]
<FromGitter> <fridgerator> Whoohoo! 🎉
Groogy1 has quit [Ping timeout: 272 seconds]
DTZUZU has quit [Quit: WeeChat 1.9]
DTZUZU has joined #crystal-lang
DTZUZO_ has quit [Ping timeout: 240 seconds]
<FromGitter> <vladfaust> @LVMBDV any reference or just by experience?
<lvmbdv> linkedin's choices are that iirc
<FromGitter> <vladfaust> Oh nice, thank you
rohitpaulk has joined #crystal-lang
rohitpaulk has quit [Ping timeout: 246 seconds]
ua has quit [Ping timeout: 252 seconds]
<FromGitter> <bararchy> @vlazar nice!
druonysus has joined #crystal-lang
<FromGitter> <bew> @vlazar awesome! I'm wondering, what'll happen after the next Crystal release? (or more precisely when a language change happen) will you update it?
ua has joined #crystal-lang
lunarkittychan has joined #crystal-lang
lunarkittychan is now known as lunarfyre7
DTZUZO_ has joined #crystal-lang
moei has joined #crystal-lang
<FromGitter> <girng> weird question just cuz i'm bored. https://play.crystal-lang.org/#/r/51pz but which way would be the "correct" and most performant?
<FromGitter> <girng> the each_value imo, looks the best syntactically speaking and does exactly what i want. so i'll prob use that one
<FromGitter> <bew> Hes
<FromGitter> <bew> Yes*
moei has quit [Quit: Leaving...]
<FromGitter> <girng> hi bew
<FromGitter> <girng> Thx
<FromGitter> <vladfaust> What a shame: ⏎ ⏎ ```Unhandled exception: No address found for https://github.com:80 over TCP (Socket::Error)``` ⏎ ⏎ I'm enraged! What's the issue # about that? [https://gitter.im/crystal-lang/crystal?at=5ba2c603b4990c30eedd87bd]
<FromGitter> <vladfaust> `HTTP::Client.new(URI.parse("https://github.com"))` works though
<FromGitter> <jgrant27> https doesn't usually run on port 80
<FromGitter> <girng> but shouldn'
<FromGitter> <girng> the http/client module use 443 if it's a https url internally?
<FromGitter> <bew> It doesn't detect https (or anything else), unless you use URI.parse
<FromGitter> <girng> That seems odd O_o
<FromGitter> <bew> Well that's how http client work in Crystal, it's just a host and a port
<lvmbdv> I can see the logic of keeping SSL out of the HTTP module
<FromGitter> <girng> Shouldn't .new(url) do URI.parse internally?
<FromGitter> <bew> @girng better be explicit
DTZUZO_ has quit [Ping timeout: 272 seconds]
<FromGitter> <bew> @lvmbdv you can pass a `tls` param to true or a ssl context flr ssl related calls i guess
<FromGitter> <bew> RTFC (Read The Fu**ing Code ^^)
<FromGitter> <jgrant27> From the docs on HTTP ... ⏎ ⏎ ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5ba2c9af5df5194734e4580f]
<lvmbdv> 🤔
<FromGitter> <jgrant27> https://crystal-lang.org/api/0.26.1/HTTP/Client.html#new%28uri%3AURI%2Ctls%3Dnil%29-class-method
<FromGitter> <girng> Explicitness in crystal, when JSON:Any / union types exist 😆
<FromGitter> <bew> *hidding*
<FromGitter> <bajro17> @vladfaust you see no reason to be enraged :)
DTZUZO_ has joined #crystal-lang
<FromGitter> <jwoertink> ProTip: If you're using crystal installed from homebrew, `brew switch crystal 0.26.1` -> `brew switch crystal 0.25.1` is pretty helpful
sevensidedmarble has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<FromGitter> <fridgerator> I use that ^
<FromGitter> <fridgerator> It requires that you had the last version installed already I believe
<FromGitter> <bajro17> what interesting stuff come to 0.27?
<FromGitter> <bajro17> also is there will be some big changes?
sevensidedmarble has joined #crystal-lang
sevensidedmarble has quit [Client Quit]
return0e has quit [Remote host closed the connection]