ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.31.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
ur5us has quit [Ping timeout: 250 seconds]
ur5us has joined #crystal-lang
Creatornator has joined #crystal-lang
<FromGitter> <watzon> Well I broke crystal play with this ⏎ ⏎ ```(1..10).step(-1).each { |i| puts i }``` [https://gitter.im/crystal-lang/crystal?at=5def0248f65fec1c8ef3067f]
<FromGitter> <watzon> Actually just broke crystal in general haha
<FromGitter> <watzon> Has to be a bug
return0e has quit [Read error: Connection reset by peer]
<FromGitter> <watzon> #8572
<DeBot> https://github.com/crystal-lang/crystal/issues/8572 (Negative step size causes infinite loop)
Creatornator has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/869y
<FromGitter> <Blacksmoke16> did i find my own bug? :p
return0e has joined #crystal-lang
<FromGitter> <watzon> I'd think that should work
<FromGitter> <Blacksmoke16> indeed
<FromGitter> <tenebrousedge> since when does `step` take negative integers?
<FromGitter> <watzon> That's the point, it doesn't seem like it does
<FromGitter> <watzon> But it doesn't throw an error
<FromGitter> <watzon> Also I don't think it would be too hard to add support for negative integers if we wanted
<FromGitter> <tenebrousedge> hmm, maybe. What should `0` do?
<FromGitter> <tenebrousedge> infinite loop?
<FromGitter> <tenebrousedge> error?
<FromGitter> <watzon> I'd think that should always error, regardless of what negatives do
<FromGitter> <watzon> You can't step by zero
<FromGitter> <tenebrousedge> hmm, `(1.0..1.3).step(0.1)` doesn't work
<FromGitter> <watzon> Weird, with a float range it should
<FromGitter> <tenebrousedge> apparently it uses `times`
<FromGitter> <tenebrousedge> and you can't do `0.1.times do`
<FromGitter> <watzon> I have to say, the way Python handles slices is kinda nice
<FromGitter> <tenebrousedge> no o___o it's not allowed to say nice things about Python
<FromGitter> <watzon> `arr[1:10:2]` from 1 to 10 step by 2
<FromGitter> <watzon> I know I'm gonna burn in developer hell now
<FromGitter> <tenebrousedge> flaaaaames! 🔥
<FromGitter> <watzon> I'll be forced to work with Java for the rest of my life, whilst running windows xp on an Intel Atom processor and my clients will never pay me
<FromGitter> <tenebrousedge> and your web target will be IE 6 on Windows 10
Creatornator has joined #crystal-lang
sagax has quit [Ping timeout: 268 seconds]
<FromGitter> <tenebrousedge> what about `arr[1..10, 2]` ?
<FromGitter> <watzon> It would be nice to have that imo
<FromGitter> <tenebrousedge> no, it's already taken
<FromGitter> <tenebrousedge> wait, that's for assignment
<FromGitter> <watzon> Yeah it's not taken yet
<FromGitter> <watzon> It would be nice if it could do what python does with negative indexes too
<FromGitter> <tenebrousedge> so does that grab every second element, or should it do `each_slice(2)` with the given range of elements?
<FromGitter> <watzon> Well if it's doing what `step` does it should grab every second element
<FromGitter> <tenebrousedge> is that the least surprising behavior?
<FromGitter> <watzon> It would be for me, but idk
<FromGitter> <watzon> I don't think it's likely to get implemented anyway
f1refly has joined #crystal-lang
f1reflyylmao has quit [Ping timeout: 245 seconds]
return0e_ has joined #crystal-lang
return0e has quit [Ping timeout: 268 seconds]
return0e_ has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
Creatornator has quit [Ping timeout: 250 seconds]
<FromGitter> <wontruefree> This might seem like a crazy question be is there a list of small tasks that can be done in the compiler?
sagax has joined #crystal-lang
ur5us has quit [Ping timeout: 250 seconds]
return0e_ has joined #crystal-lang
return0e has quit [Ping timeout: 268 seconds]
return0e has joined #crystal-lang
return0e_ has quit [Ping timeout: 240 seconds]
return0e has quit [Read error: Connection reset by peer]
return0e has joined #crystal-lang
ht_ has joined #crystal-lang
dannyAAM has quit [Quit: znc.saru.moe : ZNC 1.6.2 - http://znc.in]
dannyAAM has joined #crystal-lang
ht_ has quit [Remote host closed the connection]
ur5us has joined #crystal-lang
<FromGitter> <bew> What kind of tasks?
yukai has quit [Ping timeout: 265 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #crystal-lang
ur5us has quit [Remote host closed the connection]
ur5us has joined #crystal-lang
<FromGitter> <yxhuvud> I'd guess he want bite sized tasks that he can learn the ropes on. I'd just browse the open tickets of tickets tagged as compiler and see if something might seem simple.
ur5us has quit [Ping timeout: 250 seconds]
gangstacat has quit [Quit: Ĝis!]
gangstacat has joined #crystal-lang
DTZUZO_ has quit [Ping timeout: 250 seconds]
duane has quit [Ping timeout: 250 seconds]
return0e has quit [Ping timeout: 240 seconds]
return0e has joined #crystal-lang
duane has joined #crystal-lang
<FromGitter> <christopherzimmerman> @watzon I'm running into the same thing with slices right now... There is no good syntax for strided ranges. Right now, for strides != 1, I use `{..., -1}` or `{1...-1, 2}`, but it's so messy.
<FromGitter> <christopherzimmerman> I want Python syntax :(
HumanG33k has quit [Remote host closed the connection]
DTZUZO_ has joined #crystal-lang
ht__ has joined #crystal-lang
ht__ is now known as ht_
duane has quit [Ping timeout: 268 seconds]
duane has joined #crystal-lang
ur5us has joined #crystal-lang
HumanG33k has joined #crystal-lang
alexherbo2 has joined #crystal-lang
alexherbo2 has quit [Ping timeout: 246 seconds]
ht_ has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 250 seconds]
ur5us has joined #crystal-lang
yukai has joined #crystal-lang
DTZUZO_ has quit [Quit: WeeChat 2.6]
DTZUZO has joined #crystal-lang