<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]