Live data from Hacker News

Hazel: A live functional programming environment featuring typed holes

hazel.org

31–40 of 88 posts

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

#31

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?

My first thought when viewing your link was the name "Hazel" which has been around since the late 19th century or so. Couldn't the devs have chosen a different name or added another word?

Jokes aside, name collisions are bound to happen. These two apps seem entirely unrelated so I doubt anyone will accidentally install "Hazel, the Mac app for organizing folders and files" when they meant to use "Hazel, the live functional programming environment organized around type holes."

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

#32
post #12
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?

I only used that feature inadvertently a long, long time ago. As I remember, the program would throw a Throwable exception when it would enter code that wasn't translatable. There was some sort of hot reloading, too. So you could try to fix the code and continue. The really neat thing was that the Ecliose Java compiler is built specifically to support the IDE, so all the the warning and error annotations in the edito…

That sounds like an incredibly useful feature. Do you recall what version you were using?

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

#35

Earlier quoted context omitted.

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…

I’m struggling to understand the use, do you have a concrete example?

Brady has a presentation about Idris where he shows Type-Driven development (where you write code that could typecheck with some holes and you get the compiler to help you figure out the missing types for your "whatever/something" untyped variables)

https://youtu.be/X36ye-1x_HQ?t=5m15s

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

#36
post #12

Earlier quoted context omitted.

I only used that feature inadvertently a long, long time ago. As I remember, the program would throw a Throwable exception when it would enter code that wasn't translatable. There was some sort of hot reloading, too. So you could try to fix the code and continue. The really neat thing was that the Ecliose Java compiler is built specifically to support the IDE, so all the the warning and error annotations in the edito…

That sounds like an incredibly useful feature. Do you recall what version you were using?

I believe that Eclipse 2.x already had most of these features, but it certainly was in almost all 3.x versions as far as I remember. That IDE was amazingly far ahead of its time. Even 20 years later, tools like VS Code feel like a shocking regression in capabilities to me.

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

#37
post #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...

    func TestWhatever(t *testing.T) {
        // ...lots of code

        _, _, _, _, _, _, _ = resp3, resp4, fooBefore, subFoo, bar2, barNew, zap2
    }
Like, I get it, it's a good feature, it caught quite a lot of typos in my code but can I please get an option to turn this checking off e.g. in unit tests? I just want to yank some APIs, look at their behaviour, and tinker a bit with the data.

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

#38
post #36

Earlier quoted context omitted.

That sounds like an incredibly useful feature. Do you recall what version you were using?

I believe that Eclipse 2.x already had most of these features, but it certainly was in almost all 3.x versions as far as I remember. That IDE was amazingly far ahead of its time. Even 20 years later, tools like VS Code feel like a shocking regression in capabilities to me.

Well, regression in that feature set, but it’s better in other features, many of which drove people off of Eclipse.

When it worked, it was really, really good, agree. My experience was that it usually didn’t though, swap branches a few times and the caches would be broken, time for “invalidate caches and restart”. Multiple times per week, each time it’d take an hour to re-index.. that was a lot of time we got back again when we switched to IntelliJ

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

#39

happy to answer hazel questions; ive been working on hazel as cyrus' phd student for the last four years, and am currently working on moldable projectional interfaces for live programming in hazel. here are some of the things ive added to hazel: https://github.com/hazelgrove/hazel/pulls?q=is%3Apr+author%3... and here's me speaking last week about using typed holes and the hazel language server to help provide code co…

This is probably naive but: How does this differ from something like “declare a type, implement it with methods that all throw NotImplementedException”?

As in, is this “just” a less boilerplate-heavy version of that, or is it more capable?

Post reply on HN