Live data from Hacker News

Show HN: Buzz, strongly typed scripting language written in Zig

github.com

21–30 of 70 posts

Re: Show HN: Buzz, strongly typed scripting language written in Zig

#21
post #10

Earlier quoted context omitted.

I disagree, they usually have green or black. I don't recollect them using stars either.

> I disagree, they usually have green or black. The logo is black, which seems to qualify as "green or black"? Red and white are also very common (ottoman flag, turkey, tunisia). > I don't recollect them using stars either. "Star and crescent" has been common muslim iconography since the 14th century, and the ottoman empire (which introduced them).

The logo shows purple to me and it isn't a crescent, cuts off ar the bottom.

Re: Show HN: Buzz, strongly typed scripting language written in Zig

#22
post #7

Maybe I'm just old, but first thing I would look for in a strongly typed language is int vs float, but all I see here is num. Is a single numeric type expected for modern languages?

I'm not excluding the idea to allow the user to choose between the two. But the language must remain simple and relatively high level so I'm wary of going down that road.

The big problem I see with combining the two types is that it means that a user must always consider that the values they're using may have passed through imprecise floating point arithmetic, so the == operator is always potentially problematic. If you divide the two out into separate types, then the user can use == on ints without any concern, and it better reminds people to be careful with floats.

I definitely wouldn't break it out into int, long, float, double, and unsigned variants. That would be too low level for this kind of language.

Re: Show HN: Buzz, strongly typed scripting language written in Zig

#23
post #8

Earlier quoted context omitted.

Makes sense, and I guess it’s semantics, but if the language/interpreter is handling which numeric types to use for me, should it really be sold as “strongly typed” in the main tagline for the language? Internally, float and int are completely different types, 2’s compliment vs ieee754. Conglomerating them to a “number” feels like weak typing. (Disclaimer: I’m a grumpy C++ engineer.) Edit: it does look like a neat/us…

Typing is technically a distinct concept from binary representation, it just happens to be a very useful concept for interpreting bits. If the set of valid operations is known at compile time with no exceptions, I'd call that strong typing regardless of whether the internal representation changes during execution. The problem I do see with combining int and float is that it means that you always have to be careful wi…

I will be interesting to see how this combined number data type plays with the Zig/CPP/C interop feature: https://github.com/buzz-language/buzz#call-czig-code

Re: Show HN: Buzz, strongly typed scripting language written in Zig

#24
post #21

Earlier quoted context omitted.

> I disagree, they usually have green or black. The logo is black, which seems to qualify as "green or black"? Red and white are also very common (ottoman flag, turkey, tunisia). > I don't recollect them using stars either. "Star and crescent" has been common muslim iconography since the 14th century, and the ottoman empire (which introduced them).

The logo shows purple to me and it isn't a crescent, cuts off ar the bottom.

> The logo shows purple to me

It seems to be an extremely dark purple, on a white background it's genuinely indistinguishable from black.

> it isn't a crescent, cuts off at the bottom.

Which is close enough to a crescent for

> resembles islamic flags

to be a perfectly valid take.

Re: Show HN: Buzz, strongly typed scripting language written in Zig

#25

Love it! The only thing that was a “meh” for me was using pipe for comments. It’s the only thing that I found to be unintuitive, which I very much like to see whenever I’m looking at a new language.

I kind of like it. It looks like a blockquote

Re: Show HN: Buzz, strongly typed scripting language written in Zig

#26
post #7

Maybe I'm just old, but first thing I would look for in a strongly typed language is int vs float, but all I see here is num. Is a single numeric type expected for modern languages?

I'm not excluding the idea to allow the user to choose between the two. But the language must remain simple and relatively high level so I'm wary of going down that road.

If you want to make a strongly typed language and not repeat the mistakes of Javascript, you should make them distinct. In striving for simplicity it is much easier to accidentally arrive at simplistic.

Re: Show HN: Buzz, strongly typed scripting language written in Zig

#27
post #21

Earlier quoted context omitted.

The logo shows purple to me and it isn't a crescent, cuts off ar the bottom.

> The logo shows purple to me It seems to be an extremely dark purple, on a white background it's genuinely indistinguishable from black. > it isn't a crescent, cuts off at the bottom. Which is close enough to a crescent for > resembles islamic flags to be a perfectly valid take.

It is a subjective opinion and I strongly and subjectively disagree.

Re: Show HN: Buzz, strongly typed scripting language written in Zig

#28

Maybe I'm just old, but first thing I would look for in a strongly typed language is int vs float, but all I see here is num. Is a single numeric type expected for modern languages?

Not sure what 'num' means in buzz exactly, but it could be something like a Haskell class, choosing the specific instance/implementation automatically, while also allowing explicit specialization if needed.

https://hackage.haskell.org/package/base-4.17.0.0/docs/GHC-N...

Post reply on HN