cristianoliveira has quit [Ping timeout: 260 seconds]
Kurisu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Kurisu has joined #crystal-lang
ponga has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
pawnbox_ has quit [Remote host closed the connection]
soveran has joined #crystal-lang
pawnbox has joined #crystal-lang
Kurisu has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 276 seconds]
mark_661 has joined #crystal-lang
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 252 seconds]
Philpax has quit [Ping timeout: 240 seconds]
soveran has quit []
pawnbox has quit [Remote host closed the connection]
cristianoliveira has joined #crystal-lang
cristianoliveira has quit [Ping timeout: 264 seconds]
Kurisu has joined #crystal-lang
zodiak_ has quit [Ping timeout: 252 seconds]
trapped has joined #crystal-lang
pawnbox has joined #crystal-lang
<BlaXpirit>
Kurisu, about the sample you sent - the fact that the result `bar()` .is_a Int32 doesn't mean the same function will return a Int32 the next time it's called
<BlaXpirit>
I don't see any neat solution for this seemingly synthetic exampel
<Kurisu>
BlaXpirit, I add `if foo.bar.is_a? Int32` cause I want compiler could infer the type automatically.
<Kurisu>
In this `if` branch, the `foo.bar`'s type is Int32 rather than (Int32 | Nil), that's I want to do so I add it.
<BlaXpirit>
Kurisu, well yes, the first time you call foo.bar() it is indeed Int32, cool, but inside that branch you call it a second time, and who knows what that function might return now
<BlaXpirit>
Kurisu, these "stupid" situations don't happen often. maybe there's a better way to do what you're trying to do. please show a more "real" example.
<Kurisu>
BlaXpirit, well, I think it's a usual case, an object instantiate and it's attribute would be assigned later.
Kurisu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<BlaXpirit>
Kurisu, sure, but an integer is not a usual thing for such an attribute. typically it would start as zero
<BlaXpirit>
c++ doesn't even have a way to express this
<BlaXpirit>
Kurisu, not sure if you saw my messages "Kurisu, sure, but an integer is not a usual thing for such an attribute. typically it would start as zero" "c++ doesn't even have a way to express this"
<Yxhuvud>
zero, or even worse, uninitialized.
<Kurisu>
BlaXpirit, I saw it, thank you. and I think the keyword `as` must be abused, it could cause a ton of type errors https://play.crystal-lang.org/#/r/14ex.
<BlaXpirit>
Kurisu, yes, it's for when you're absolutely sure. well, a runtime error isn't so horrible either, it can be caught
Kurisu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<trapped>
right this moment i really need help from someone living in amsterdam or utrecht
Kurisu has joined #crystal-lang
datanoise has joined #crystal-lang
ome has joined #crystal-lang
<Kurisu>
BlaXpirit, but always use `.is_a?` is not bad, I don't see any cases `.is_a?` can't do but `as`.
Kurisu has quit [Client Quit]
datanoise has quit [Ping timeout: 272 seconds]
pawnbox has quit [Remote host closed the connection]
Kurisu has joined #crystal-lang
pawnbox has joined #crystal-lang
matp has joined #crystal-lang
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 244 seconds]
cristianoliveira has joined #crystal-lang
cristianoliveira has quit [Read error: Connection reset by peer]
ponga has quit []
Kurisu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
efi has joined #crystal-lang
<efi>
Hi, again!
<efi>
In Ruby Dir["/"] returns ["/"] - in crystal I get "Empty glob pattern (ArgumentError)" - Which is strange, given that even Dir[""] works...
<efi>
Is that a bug or a feature?
paulcsmith_ has joined #crystal-lang
greengriminal has joined #crystal-lang
srabuini has quit []
<jhass>
probably a bug
<jhass>
pull request welcome ;)
paulcsmith_ has quit [Ping timeout: 258 seconds]
<efi>
k, thx. I'll see what I can do.
sebasr has joined #crystal-lang
A124 has quit [Ping timeout: 250 seconds]
<crystal-gh>
[crystal] timcraft opened pull request #3018: Fix pkg-config: command not found errors (master...silence-pkg-config-errors) https://git.io/vK6ml
<efi>
Hmmm. This Dir.glob thing is quite strange.
pawnbox_ has quit [Remote host closed the connection]
<efi>
Wouldn't it be cool, if the compiler issued a warning, when it encountered something like "/"=='/' which is degradable to a primitive truth value?
<efi>
Line ruby's warning when I use a = in a conditional...
<jhass>
it's not so easy, `==` is just a method call with possibly arbitrary behavior. And can be redefined
<efi>
Ah, OK. There is no js-like "==="?
A124 has joined #crystal-lang
<efi>
hmmm. there even seems to be a === but its signature is Object#===(other) - without any type defined...
<efi>
Ok, looked it up. === means "Case equality" - so it's even weaker than ==
<jhass>
yes, in Crystal (and Ruby) === is weaker, == is already strong
Kurisu has joined #crystal-lang
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
<efi>
Hmmm. I think I can't untangle that complex by myself. I will open an issue over at github.
<jhass>
ok :)
Kurisu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
datanoise has joined #crystal-lang
datanoise has quit [Ping timeout: 258 seconds]
efi has quit [Ping timeout: 250 seconds]
Kurisu has joined #crystal-lang
greengriminal has quit [Ping timeout: 264 seconds]
greengriminal has joined #crystal-lang
Raimondi has quit [Quit: All hail WeeChat 1.5-dev!]
greengriminal has quit [Quit: This computer has gone to sleep]
Raimondi has joined #crystal-lang
Kurisu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Kurisu has joined #crystal-lang
Philpax has quit [Ping timeout: 252 seconds]
greengriminal has joined #crystal-lang
datanoise has joined #crystal-lang
Kurisu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ome has quit [Quit: Connection closed for inactivity]
Oliphaunte has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
Kurisu has joined #crystal-lang
Raimondii is now known as Raimondi
pawnbox has quit [Remote host closed the connection]
<crystal-gh>
[crystal] asterite pushed 1 new commit to master: https://git.io/vK6Pa
<crystal-gh>
crystal/master cf24ccf Ary Borenszweig: Added macro methods to access a node's location. Related to #3017
<jhass>
can one even properly merge, transfer history and shit?
<RX14>
if you got a post on crystal_programming and tried really hard to get everyone to upvote it it would get on the frontpage of anyone subscribed
<RX14>
because the frontpage algorithm requires less votes for smaller subreddits
<BlaXpirit>
can't merge, can't redirect, can make custom CSS and add a big message to move to the other one
<jhass>
meh, sucks
<FromGitter>
<sdogruyol> well i do think that these community stuff are necessary to get traction
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
zacts has joined #crystal-lang
datanoise has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
pawnbox has quit [Read error: Connection reset by peer]
Raimondi has joined #crystal-lang
Ven has joined #crystal-lang
pawnbox has joined #crystal-lang
datanoise has quit [Quit: WeeChat 1.5]
Ven has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter>
<jwoertink> My company is thinking about porting a super small rails app we have over to crystal just to try it out. I've seen a few different "rails inspired" frameworks. Anyone have any opinions on any of them?
<crystal-gh>
[crystal] asterite pushed 1 new commit to master: https://git.io/vKi2r
<crystal-gh>
crystal/master 4f55e90 Ary Borenszweig: Compiler: clean up and document Program and some related types.
Dreamer3 has quit [Quit: Computer has gone to sleep.]