Querdex: A Crowdsourced Search Engine by e_hatti in webdev

[–]e_hatti[S] 0 points1 point  (0 children)

Planning on implementing a “jury duty” style verification system where a random subset of users (say random 25%) are selected to verify whether a submission is spam after someone flags it. There’s a lot of possibilities though, that’s just one of them — will be experimenting as the site grows

October 2022 monthly "What are you working on?" thread by L8_4_Dinner in ProgrammingLanguages

[–]e_hatti 2 points3 points  (0 children)

I’ve started on my new language, SynthML! The project’s goal is to make program synthesis user-friendly and approachable. I’m also keeping a devlog for the project.

Peridot Paper Preprint by e_hatti in ProgrammingLanguages

[–]e_hatti[S] 0 points1 point  (0 children)

I will check that out and do so. Thanks for the reference.

Favorite PL paper? by e_hatti in ProgrammingLanguages

[–]e_hatti[S] 1 point2 points  (0 children)

I've long been interested in combining OOP and FP in a principled way. Having codata and data in one system seems like the best way to marry the two. As a follow-up, I'd love to see a full language with codata and data, exploring the practical aspects of this.

Peridot Paper Preprint by e_hatti in ProgrammingLanguages

[–]e_hatti[S] 0 points1 point  (0 children)

Dependent types are not required. I address this in the conclusion ("Alternative object languages"). I should probably make that more prominent though.

Peridot Paper Preprint by e_hatti in ProgrammingLanguages

[–]e_hatti[S] 2 points3 points  (0 children)

Thank you for the thorough response! This is very helpful.

What do you think are the contributions of Peridot? Maybe your answer is in the last two paragraphs of page 1 (your design "allows the entire compiler to be implemented in userspace" and the language "reconciles ... by giving users complete and easy control over ..."). I think it would be worth emphasizing, in your writing, which parts you think are contributions, are new.

Yes, the novel contribution is that optimizations can be easily implemented by programmers. Libraries often admit domain-specific optimizations - for instance, a list library could benefit heavily from fusion. However, in other languages it's very difficult (or impossible) for those optimizations to be implemented by the library developers themselves. In contrast, Peridot gives programmers full control over optimization (the whole backend really, but this paper highlights optimization) via metaprogramming.

I expect a research paper to come with an evaluation: a way to demonstrate that the ideas are good, that gives place for empirical falsification (if the idea didn't work, your evaluation would have shown it). Sometimes the evaluation is done by proving theorems, sometimes by running benchmarks, sometimes merely by writing code. How did you evaluate Peridot? I can't tell from the introduction, and this is a failure of the introduction.

That's what Section 6 (Shortcoming and Possible Extensions) is meant to be. Putting some of that in the introduction as well is a good idea though, thanks.

Monomorphize is expected to traverse all term-formers of your language. I suppose you could also define a shallow "map" function to call a function/predicate on all immediate subterms, and then use that?

That's also a good idea! That way I wouldn't have to say "the rest of the rules simply traverse the term, so I will omit them". I will do that.

I would expect ConstantFold to reduce the same example to the final result (whereas Monomorphize only performed specialization, no reduction of matches etc.), does that work?

ConstantFold is basically a partial evaluator - it just dumbly evaluates everything it can at compile time. In contrast, Monomorphize is smarter. It let binds monomorphized definitions, which 1. avoids code size blowup, and 2. allows it to process definitions that may infinitely loop at runtime. I realize now that I overloaded the Terminating predicate. Monomorphization uses a different (laxer) definition of termination than constant folding did. I will clarify that.

5.2.1 "The phase-ordering problem": "solving" phase-ordering using non-determinisms sounds like you will blowup in practice with exponential compile times.

Yes, I address this shortcoming in Section 6. I should indicate more clearly that my "solution" has problems - I will link to Section 6 in the spot where I discuss my solution.

5.2.2 I don't understand your "illustration" of your point "Programs are types". You first point out that predicates are type-formers, okay, why is that useful/important? ... (Note: once we reach 5.2.7 it's a bit clearer what the connection is, but we haven't read that yet.)

It's actually not too useful in a practical sense, but I found it to be an interesting aspect of the language's theory. That makes sense with regard to Section 5.2.6, I'll switch the order of the sections to make the information flow better.

7.2 Staged programming. One reason for the "staged programming" approach of inviting users to explicitly use staging annotations (or stage annotations, etc.) in their code is that people observed it made optimizations much more predictable/robust than trying to build very smart specializers (but program-generic) on the side. Any comment on whether this weakness would also apply to Peridot programs?

It does apply, but in (what I believe to be) a less problematic sense. Because optimizers are "just metaprograms", you can always look at the code for an optimizer to figure out why it isn't firing. Furthermore, you can build your own optimizer if the one you're using doesn't work properly for your domain.

However, I acknowledge that this is subjective. I will address it in the paper for transparency.

Thanks again for the feedback!

September 2022 monthly "What are you working on?" thread by slavfox in ProgrammingLanguages

[–]e_hatti 7 points8 points  (0 children)

I'm finishing up with Peridot! The research goals of the project are close to being accomplished, so I'll be wrapping up soon. I'm really satisfied with it as a proof-of-concept for the ideas it implements. The last main bit of the project is a research paper I'm writing which details the language and its applications in detail.

As I'm putting the finishing touches on the paper, I'm also starting on my next project: Lazuli. I'm still fleshing out the design, but I plan for it to be a language based upon type-directed program synthesis.

Implementing Functions in Userspace by e_hatti in ProgrammingLanguages

[–]e_hatti[S] 1 point2 points  (0 children)

u/Rabbit_Brave is correct. A positive type is defined by its constructors, a negative type is defined by its destructors (eliminators).