Streem – a new programming language from Matz
31–40 of 199 posts
Re: Streem – a new programming language from Matz
#32Re: Streem – a new programming language from Matz
#33Reminds me a lot of Elixir's |> operator, which does the exact same thing. Nice! Curious how it'll turn out to compare with Elixir on other areas.
Re: Streem – a new programming language from Matz
#34Re: Streem – a new programming language from Matz
#35Re: Streem – a new programming language from Matz
#36Re: Streem – a new programming language from Matz
#37Why do most implementations of FizzBuzz special case % 15? I haven't ever really understood this. Maybe it's just my math-y background, but it always seemed to me you should just check mod 3 and mod 5 without an else between them, concatenating Fizz and Buzz. Can anyone else comment on this? Most canonical FizzBuzz programs special case 15, and I don't get it.
[deleted]
print("\n".join([("FIZZ"*(i%3==0)+"BUZZ"*(i%5==0)) or str(i) for i in range(1,101)]))Re: Streem – a new programming language from Matz
#38At the very least, it's going to be amazing to watch a master language designer build a new language from the ground up. That said, I'm incredibly optimistic about a new Matz language. If I was going to guess, the syntax will be much lighter and the semantics will make VM optimization much easier than in Ruby.
Re: Streem – a new programming language from Matz
#39Earlier quoted context omitted.
I suppose it's a style issue as to whether an extra mod is better than checking if one of the triggers has passed. I would propose it's more DRY to do it the short way though.
It's not any shorter. The extra check as to whether or not to print the line break cancels out the mod 15 check. In my opinion, it's cleaner to have three conditionals of the same type than two checking mods and a third checking the OR of the first two. Of course, it can be actually shorter with a goto.
Re: Streem – a new programming language from Matz
#40Whatever, https://github.com/ekmett/machines https://github.com/scalaz/scalaz-stream