Live data from Hacker News

Hazel: A live functional programming environment featuring typed holes

hazel.org

21–30 of 88 posts

Re: Hazel: A live functional programming environment featuring typed holes

#21
post #11

Earlier quoted context omitted.

I have never heard about this before. What exactly would happen to broken code? For example, would it skip the equivalent of the broken source line, or would it stub out a function altogether or what?

Literally that, it would throw exceptions with the compiler error. And as a sibling comment mentioned and I had forgotten -- it would allow for hotpatching code at runtime as you fixed compiler errors. You could literally start the skeleton of a webserver and gradually add functionality to it without recompiling and it would mostly "just work". Certain changes would require the app to be restarted.

CRTL-SHIFT-F9 (IntelliJ) works for me on most Java and Kotlin code in IntelliJ, as long as no method/class signatures are changed.

Re: Hazel: A live functional programming environment featuring typed holes

#22
post #14

Elm/ML is an interesting choice of mis-mash & a subtle slap in the face of Haskell? (Which on the surface is far more like Elm than ML is).

I would take that to mean "strict evaluation" and "simple type system"

yes. also keen on first class modules (coming soon to Hazel). syntax could have easily been more haskell-like, current team is pretty ecumenical wrt surface syntax, excepting that i have as yet been unable to convert anyone to the gospel of s-expressions.

biggest reason more haskelley syntax didnt/hasnt happen/ed is the current syntax engine does not support significant indentation. hazel concrete syntax isn't stable yet though we're also thinking seriously about semi-colons

Re: Hazel: A live functional programming environment featuring typed holes

#23

Haskell has type holes. There are plugins that give you code actions to complete them, split case, etc. I love type holes. Agda has them too and they're more powerful there: https://agda.readthedocs.io/en/latest/language/lexical-struc...

For me Idris has best type holes.

Re: Hazel: A live functional programming environment featuring typed holes

#24

Haskell has type holes. There are plugins that give you code actions to complete them, split case, etc. I love type holes. Agda has them too and they're more powerful there: https://agda.readthedocs.io/en/latest/language/lexical-struc...

Typescript has a hole type too implemented in fp-ts and effect-ts. Super useful for when you don't know what are you missing and get a type signature for it. It's mostly useful for when you declare some `const foo: (bar: Bar) => Whatever` and in the midst of your implementation you don't know what you're missing. Requires an advanced level in TS to be used to the max. https://gcanti.github.io/fp-ts/modules/function.t…

there's this hacky quick way of partially emulating typed holes sans library too: https://dev.to/gcanti/type-holes-in-typescript-2lck

we (team hazel) recently used that device in our typescript version of a hazel setup for typed-hole-contextualized code completion as described in https://dl.acm.org/doi/10.1145/3689728

Re: Hazel: A live functional programming environment featuring typed holes

#25
post #20

Earlier quoted context omitted.

I use IntelliJ now and I definitely miss this feature of Eclipse.

Why? What did you miss about it? I'm asking as I prefer strict compilers that force me to handle all cases.

Generally, it's a very pragmatic thing like being able to quickly run something to make sure it's working but some other part of the code is temporarily broken because I'm currently changing things and don't care that that part is currently broken. In IntelliJ I have to stop doing what I'm currently thinking about and go over to that other part of the code and comment out some things or otherwise fix it up (usually in a way that won't be permanent because it's broken for a reason) before I can run the code I'm working on.

In an ideal world, the codebase would be modular and testable and all those good things but I work in a large enterprise dev team and some of the codebase is many (many) years old and it's no longer feasible to refactor it into anything like what would be needed to allow the code to be modularized in such a way that would obviate the necessity to do the above.

Re: Hazel: A live functional programming environment featuring typed holes

#26
post #20

Earlier quoted context omitted.

I use IntelliJ now and I definitely miss this feature of Eclipse.

Why? What did you miss about it? I'm asking as I prefer strict compilers that force me to handle all cases.

I don't think they want to have thing broken in the steady state, but anything that relies on things building for analysis etc.,. Could benefit from this.

Re: Hazel: A live functional programming environment featuring typed holes

#27

This is semi-related to one of the killer features of Eclipse that never really made it into any large-scale systems: the ability to run incomplete or broken code. The Eclipse Compiler for Java had a special feature that it could generate bytecode for nearly any file, including those that were utterly broken. It would mostly work, and you could incrementally work on unit tests alongside the code being developed. It w…

Isn’t this possible with any untyped language?

It does sound like a good feature though - very few languages have opt-out type checking. This is much better than opt-in IMO.

Re: Hazel: A live functional programming environment featuring typed holes

#28

This is semi-related to one of the killer features of Eclipse that never really made it into any large-scale systems: the ability to run incomplete or broken code. The Eclipse Compiler for Java had a special feature that it could generate bytecode for nearly any file, including those that were utterly broken. It would mostly work, and you could incrementally work on unit tests alongside the code being developed. It w…

And then you have Go, which won't even let you compile code with an unused variable...

Re: Hazel: A live functional programming environment featuring typed holes

#30
My first thought was the Mac app that's been around for about 18 years now:

https://www.noodlesoft.com

And it had a release today.

https://www.noodlesoft.com/release_notes

Seems rough to jump on a name that's been in continuous use for that long. Would it be hard to add another word to make it easier to disambiguate?

Post reply on HN