Live data from Hacker News

The Flix Programming Language

flix.dev

111–120 of 126 posts

Re: The Flix Programming Language

#111
post #58

The website is infrequently updated, so let me provide some information about what we are currently working on: - We are trying to make the entire compiler resilient (error-tolerant), incremental, and parallel. We have managed to make every single compiler phase (of which there are 28) parallel. This has already led to significant speed-ups. We are now trying to increase the degree of parallelism within each phase. W…

looks very cool! has there been any talk of native codegen/backends and integration with newfangled cool kid ecosystems (rust, go, etc)?

We may consider WASM as support for GC, tail calls, and multi-threading arrive.

Re: The Flix Programming Language

#112

> The following design choices may be considered controversial by some: > Dividing by zero yields zero. https://www.hillelwayne.com/post/divide-by-zero/ That's one interesting point I would love to read any opinions on. Edit: Here's a HN discussion about the `divide by zero` article - https://news.ycombinator.com/item?id=17736046

FWIW, I tend to write a lot of error checking code that checks for division by zero ahead of time and just returns zero instead. Found an example:

        public double magnitude
        {
            get
            {
                double c = max_magnitude;
                return c > 0 ? Math.Max(c, c * (this / c)._internal_magnitude) : 0;
            }
        }
I could delete quite a few if statements in pretty hot codepaths if division by zero just returned zero.

Re: The Flix Programming Language

#113

do functional languages mainly appeal to computer language enthusiasts/researchers? im just not seeing the benefit personally.

Unpopular opinion, functional programming style got a big push because the inability of languages and compilers to deal with state especially mutable state, so they bring out the purity big gun and ban all mutable states. However, state and mutable state are natural and useful for programmers to work with, thus functional programming never gains mainstream.

With the advance of lifetime analysis, mutable value semantics, and local mutability, there’s no need to ban mutable state outright. The push for functional programming will be waning in regarding to purity.

Re: The Flix Programming Language

#114

It boggles my mind that any developer of a new language wouldn’t use Python’s significant use of white space. You’re able to fit more code on a screen, and it’s less visual noise. It’s like Pareto better. I really don’t get why others don’t copy it.

Playing around with ML and being forced to use python, I find having no block termination character and selecting which context a line of code is in by how much you un-indent it, is the worst.

Give me braces and rip a formatter across the whole codebase and be done with it.

Furthermore, I think that the trend of compilers/interpreters caring about whitespace formatting rules should really end. You can't ever force everyone in the world to write aesthetically pleasing code in your language and someone out there will always be able to write a complete trainwreck, and everyone disagrees on what is or is not aesthetically pleasing. Leave the problem up to configurable code linters where it belongs. Let people make "mistakes" (in your eyes) if they want to.

Re: The Flix Programming Language

#115

> The following design choices may be considered controversial by some: > Dividing by zero yields zero. https://www.hillelwayne.com/post/divide-by-zero/ That's one interesting point I would love to read any opinions on. Edit: Here's a HN discussion about the `divide by zero` article - https://news.ycombinator.com/item?id=17736046

FWIW, I tend to write a lot of error checking code that checks for division by zero ahead of time and just returns zero instead. Found an example: public double magnitude { get { double c = max_magnitude; return c > 0 ? Math.Max(c, c * (this / c)._internal_magnitude) : 0; } } I could delete quite a few if statements in pretty hot codepaths if division by zero just returned zero.

This feels like an area where extended/vector instructions could be added to make this fast too. Probably not news to you, but for example, NEON (and likely AVX, I’m just a lot less familiar with it) has saturating addition and subtraction.

Re: The Flix Programming Language

#116

From the website "Flix is inspired by OCaml and Haskell with ideas from Rust and Scala". Inspirations and ideas from four of the arguably most complex languages of the modern world, all the best with that.

What a sad take…

These languages put forth ideas that are extremely powerful. They might be unconventional from an imperative programming lens, but to call them all “complex” as a justification for discarding them entirely is pretty shallow.

Re: The Flix Programming Language

#118

Earlier quoted context omitted.

> recently added support for package management Are there any [plans for] supply chain attack mitigations? Naively searching, I find https://github.com/flix/flix/issues/4380#issuecomment-123641... (Proposed Principle: A package can be declared as "safe") and https://github.com/flix/flix/issues/2837 (Add capability-safety to polymorphic effects?) the latter closed with working on something related to this https://gith…

In short yes. We plan to leverage the effect system for this. Stay tuned.

That's great, staying tuned!

Plea to all language/languge ecosystem designers in 2023+ to design ahead for supply chain attack mitigations. Austral is one new language that appears to be doing so https://borretti.me/article/how-capabilities-work-austral ... Kudos to those retrofitting to existing ecosystems. I guess Flix is somewhere in the middle, not new (2015?) but still being designed/not huge legacy constraints. Anyway, thanks!

Re: The Flix Programming Language

#119

From the website "Flix is inspired by OCaml and Haskell with ideas from Rust and Scala". Inspirations and ideas from four of the arguably most complex languages of the modern world, all the best with that.

What a sad take… These languages put forth ideas that are extremely powerful. They might be unconventional from an imperative programming lens, but to call them all “complex” as a justification for discarding them entirely is pretty shallow.

Sorry to be pessimistic, as they always said the fruit does not fall far from the tree, but I'm hoping that Flix can prove me wrong.

Re: The Flix Programming Language

#120

Earlier quoted context omitted.

I also don't like "Unused definitions, type declarations, etc. are compile-time errors" as I often want to test the validity of a statement, like a type declaration, by compiling before using it. Much prefer warnings. I don't mind the disallowing name shadowing, but I really, really hate (I mean that) websites that are just good ol' text and the odd picture that require Javascript. The excuse of "we used React, it's…

> We use JavaScript for the online code editor.

Doesn't mean the whole site needs it though, just one page.
Post reply on HN