Live data from Hacker News

Streem – a new programming language from Matz

github.com

31–40 of 199 posts

Re: Streem – a new programming language from Matz

#33
post #8

Reminds 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.

Could be cool, but Elxiir has the EVM under it, and that is some quality engineering. Ruby is good but kind of clownshoes.

Re: Streem – a new programming language from Matz

#36
It's definitely a good idea. Pipes are both very powerful and very simple to use and debug, yet they are not very common in general purpose programming languages (examples?). I'm not surprised that someone is trying to build a language around them. I'll follow that, but for now it's a bit too early to judge.

Re: Streem – a new programming language from Matz

#37
post #24
post #3

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

noice, here's my version

    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

#38
post #7

At 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.

Let's all hope he's comes out with a spec 1st.

Re: Streem – a new programming language from Matz

#39
post #26

Earlier 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.

Whether you print the number, Fizz, Buzz or FizzBuzz you are going output a line break, so I'm not sure what you would be checking for. Output \n unconditionally.
Post reply on HN