Live data from Hacker News

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

github.com

51–60 of 70 posts

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

#51

Are there any practical advantages to using Zig vs anything else? Presumably, the cross compilation means this should run everywhere for free, but would love to know if there was anything especially easy/hard with respect to the host language.

It's really good for interfacing with C or writing C ffi's. If you're the sort of person who normally programs in a high-level language, then drops down to C for performance, zig is pretty good for that.

(If you want to compare zig and C, there are frankly a lot of reasons to prefer it, at least in the abstract).

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

#52
post #40
post #39

Curious what the author is thinking of when calling this a "scripting language"? I personally don't have much trouble imagining a strongly-typed scripting language, but that definitely goes against the flow of the past couple of decades. Is it that it is garbage collected? That's about all I can see that would make this immediately obviously a "scripting language". It doesn't seem like it ought to be intrinsically as…

Author here. A few points make buzz a “scripting language” in my view: - runs in a VM - garbage collected - high level - “simple” meaning there’s only a handful of concepts to understand to use it It’s true that we’re not used to scripting languages having a type system. But its a trend that is catching on: python has types, php too and typescript is at its peak in popularity to name a few.

Actually what made me not consider this a "real" scripting language is not any of those things but rather the existence of a non-optional entry point function. Scripting languages typically read code from top of file to bottom to decide what to execute

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

#53
post #39

Curious what the author is thinking of when calling this a "scripting language"? I personally don't have much trouble imagining a strongly-typed scripting language, but that definitely goes against the flow of the past couple of decades. Is it that it is garbage collected? That's about all I can see that would make this immediately obviously a "scripting language". It doesn't seem like it ought to be intrinsically as…

Reading this comment, I realized I always thought:

Scripting == interpreted

Is that not the case?

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

#54
post #46

> No nonsense coercion Given that the focus is on being unambiguous I found this line a bit amusing. Maybe it’s me but I can’t tell for sure whether this describes a quality of the language’s coercion mechanism or a promise that the language will include no such “nonsense” like e.g. javascript :)

This means the language will never coerce things for you implicitly. Booleans are true and false not 1 and 0 or “true” and “false” etc.

You could argue that hiding ints and floats behind “num” is implicit conversion

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

#55
post #40

Earlier quoted context omitted.

Author here. A few points make buzz a “scripting language” in my view: - runs in a VM - garbage collected - high level - “simple” meaning there’s only a handful of concepts to understand to use it It’s true that we’re not used to scripting languages having a type system. But its a trend that is catching on: python has types, php too and typescript is at its peak in popularity to name a few.

Actually what made me not consider this a "real" scripting language is not any of those things but rather the existence of a non-optional entry point function. Scripting languages typically read code from top of file to bottom to decide what to execute

It’s really hard (impossible?) to have a type system with user defined types and do without a declarative top level.

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

#56
post #54
post #46

Earlier quoted context omitted.

This means the language will never coerce things for you implicitly. Booleans are true and false not 1 and 0 or “true” and “false” etc.

You could argue that hiding ints and floats behind “num” is implicit conversion

Fair point

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

#57
post #53
post #39

Curious what the author is thinking of when calling this a "scripting language"? I personally don't have much trouble imagining a strongly-typed scripting language, but that definitely goes against the flow of the past couple of decades. Is it that it is garbage collected? That's about all I can see that would make this immediately obviously a "scripting language". It doesn't seem like it ought to be intrinsically as…

Reading this comment, I realized I always thought: Scripting == interpreted Is that not the case?

In my mind scripting means what it is: You read a file like a script from top to bottom and run it. Declarations are actually instructions for a "declarer routine". There's usually no predefined entry point function, and if there is one it's optional.

Compiled/interpreted is kind of besides the point.

Julia (compiled, btw), ruby, python, php, perl, bash, JavaScript thus are all scripting languages.

Java, c, c#, go, f# rust, zig, Erlang, some flavors of lisp, node-style javascript, are not.

There are some corner cases. I consider elixir, for example to be a scripting language for it's own compiler which produces a very much non-scripted result.

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

#58
post #55

Earlier quoted context omitted.

Actually what made me not consider this a "real" scripting language is not any of those things but rather the existence of a non-optional entry point function. Scripting languages typically read code from top of file to bottom to decide what to execute

It’s really hard (impossible?) to have a type system with user defined types and do without a declarative top level.

I think by the non-soft bits (I don't know what simple means) of your definition, Erlang, java, c#, go would be considered "scripting languages", which I think would be a hard sell.

Anyways I don't mean to take away from your work;. It looks very cool.

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

#59
post #32
post #9

just for your information: the logo resembles islamic flags

It’s pretty obviously an astronaut looking out at space. Buzz (Aldrin/Lightyear), get it? Would it be an issue if it did resemble an Islamic symbol?

> It’s pretty obviously an astronaut looking out at space.

Props to you for seeing it, but I don’t think it’s obvious at all until pointed out.

Post reply on HN