Live data from Hacker News

The Phix Programming Language

phix.x10.mx

11–20 of 46 posts

Re: The Phix Programming Language

#11
post #10
post #7

Earlier quoted context omitted.

I know C and implementing a new scripting language for sure doesn't sound easier than using an existing one

Did you ever write an arithmetic evaluator? A calculator essentially? Or any other kind of evaluator? A text template engine perhaps? They all have plenty in common and exist along a continuum of complexity that includes scripting languages and goes all the way to general purpose.

I've written all of these and I agree with the GP that it's easier to use an existing one. Why recreate someone else's work when you can just use it.

Re: The Phix Programming Language

#12
What I need to know about a language: Does it do static types? Does it depend on GC? Can I pass functions to functions? Can I build an aggregate by listing the members, and pass it around? Can I vary the implementation of a function according to the types passed, as determined at compile time?

If your description just lists (howsoever appealing) platitudes, I don't get the answers I need.

Re: The Phix Programming Language

#13
post #12

What I need to know about a language: Does it do static types? Does it depend on GC? Can I pass functions to functions? Can I build an aggregate by listing the members, and pass it around? Can I vary the implementation of a function according to the types passed, as determined at compile time? If your description just lists (howsoever appealing) platitudes, I don't get the answers I need.

Exactly. What sets it apart. The current landing page screams the answer: nothing.

Okay, the design whispers to me that "lack of community/ecosystem" sets it apart.

Re: The Phix Programming Language

#14
Looking at "Core Language" I was dismayed not to find any builtin floating point data type.

In "Phix vs Conventional Languages" I'm told that "1/2 is always 0.5". And "Library Routines" / "Math" includes sin, cos and tan. What's going on here?

Re: The Phix Programming Language

#15
I don't understand why anyone would create a one-indexed language these days. I feel like Dijkstra laid out pretty well why zero-indexing is objectively better [1]. If that wasn't enough, it's also most common by far.

[1] https://www.cs.utexas.edu/users/EWD/transcriptions/EWD08xx/E...

Re: The Phix Programming Language

#16
Out of curiosity, what is the purpose of this language? A learning exercise or an attempt to create just another language in the pool of over 1000 already there?

Writing an entire language as a way to hone someone's skills is great, even if it is very time consuming vs. the output (skills learned). But I wonder what better options exist.

Re: The Phix Programming Language

#17
post #14

Looking at "Core Language" I was dismayed not to find any builtin floating point data type. In "Phix vs Conventional Languages" I'm told that "1/2 is always 0.5". And "Library Routines" / "Math" includes sin, cos and tan. What's going on here?

The type "atom"[1], is described in "Core Language" as follows:

> An atom can hold a single floating point numeric value, or an integer

I don't know why it isn't called "number", but it exists.

The page on atom also mentions:

> It can also hold a raw pointer, such as allocated memory or a call_back address, but that is typically only used when interfacing to external code in a .dll or .so file.

[1]: http://phix.x10.mx/docs/html/atom.htm

Re: The Phix Programming Language

#18
post #14

Looking at "Core Language" I was dismayed not to find any builtin floating point data type. In "Phix vs Conventional Languages" I'm told that "1/2 is always 0.5". And "Library Routines" / "Math" includes sin, cos and tan. What's going on here?

[deleted]

Re: The Phix Programming Language

#20
post #17
post #14

Looking at "Core Language" I was dismayed not to find any builtin floating point data type. In "Phix vs Conventional Languages" I'm told that "1/2 is always 0.5". And "Library Routines" / "Math" includes sin, cos and tan. What's going on here?

The type "atom"[1], is described in "Core Language" as follows: > An atom can hold a single floating point numeric value, or an integer I don't know why it isn't called "number", but it exists. The page on atom also mentions: > It can also hold a raw pointer, such as allocated memory or a call_back address, but that is typically only used when interfacing to external code in a .dll or .so file. [1]: http://phix.x10.m…

You're right, I missed that.

But that still leaves the ASCII tree diagram agreeing with the sentence "Phix has just five builtin data types:" while showing (and describing, in the following bullet point list) five data types that don't include "number" or a floating-point type.

So what's left is a minor but consistently repeated error in the doc, on the "Core Language" page.

Post reply on HN