GithubHelp home page GithubHelp logo

Comments (7)

JacquesCarette avatar JacquesCarette commented on May 24, 2024 1

Two counter-examples regarding TTH:

I did not at all understand that you were talking about "metaprogramming in Agda". I was 100% under the impression that you were talking about metaprogramming in general!

Do you have an introduction to metaprogramming in Agda in your introduction to Agda? Given your use of it, I think it would make sense to do so. Then here you could 'recall' certain items from there.

from next-700-module-systems.

JacquesCarette avatar JacquesCarette commented on May 24, 2024 1

I agree with everything from "Agda's macro..." to "... would be sufficient."

Correct, there is no such paper. And, in fact, the only published paper isn't about the reflection mechanism, but about a use of it! And yet it is what people cite. In other words, you actually have an opportunity here: if you have a very good description of the current state, then your PhD thesis might become the item that is cited as a reference. [You don't need to take up this opportunity, I'm just making it clear that it's there. You do need to document things well enough for the purposes of your thesis. I'm thinking that that might end up being kind of close to all of reflection...]

from next-700-module-systems.

alhassy avatar alhassy commented on May 24, 2024

In Agda, as far as I understand it, one essentially does work at the low level of Expr ---it is however not opqaue; my mistake for suggesting otherwise.

As far as I have looked, Typed Template Haskell is essentially not used at all and more of a proof-of-concept. I think it was in some slides by SPJ that remarked TTH as such, but I don't quite recall. The addtion of types in TTH, as far I could recall, only made things much more difficult and did not really provide the expected benefits of a type system. I may be super wrong though. (This is similar to chasing after hygenic macros only to have to jump over so many hoops to get at anaphoric macros within the Racket community.)

I'll add references and rephrase; thanks for catching such silliniess!

from next-700-module-systems.

alhassy avatar alhassy commented on May 24, 2024

Thanks for the counter-examples!!

I should have been clearer about metaprogramming wrt Agda.

I do not have an intro to metaprogramming in Agda, in the thesis. I thought about adding one (essentially abridging https://github.com/alhassy/gentle-intro-to-reflection), but I decided against it:

  • Dependent Types are sufficiently generic and so that was an extra incentive to have them in the background.
  • Basic Agda concepts were needed to read, pase, the examples of chapter 3.
  • Agda's macro mechanism, before the most recent update, is sufficiently uninteresting and weak
    that it seemed unhelpful and distracting to discuss it. Moreover, Agda's reflection library had a number
    of missing, yet expected, helpful combinators ---e.g., for fiddling with de bruijn indicies!
  • As such, chapter 5 takes the route of showing the Agda macros (for the interested, but also to show that the ideas can be implemented in not-too-much code) as well as the main insights (informally, in dashed boxes).

Adding an intro to Agda reflection wouldn't be a big deal, (I already have the content),
but I think adding it would be of essentially no real use. Personally I view such an addition to be tantamount to expanding on how Lisp's (more powerful) macro system works: It's neat, but is essentially low-level plumbing.

from next-700-module-systems.

JacquesCarette avatar JacquesCarette commented on May 24, 2024

My feel is: if you're going to talk about meta-programming in Agda, then you need to introduce it. If you don't want to introduce it, then don't say anything about it beyond what you can source in other people's papers.

Also my opinion: You do need to talk about your low-level implementation of your combinators. They are an essential part of your contribution. Your combinators have limits; these limits are not your doing, but due to system limits. Thus you are force to talk about that. To talk about that, you need to introduce the functionality you need (i.e. the reflection library?)

But I may be misunderstanding something. You need to keep asking yourself:

  1. what is the purpose of this paragraph?
  2. what does the reader need to know to understand what I've written?
  3. has that been explained to them? [Or assumed to be previously understood by them as being standard material?]

I get the feeling that there is an unresolved issue here.

from next-700-module-systems.

alhassy avatar alhassy commented on May 24, 2024

Agda's macro mechanism is better referred to as a reflection rather than meta-programming since it lacks the ability to actually produce new programs or manipulate existing programs mechanically in as an expressive way as can be done manually.

I see your points about discussing foundational matter before showcasing application, and even more importantly when it is at the heart of the work. However, wrt to the 3 questions, for instance:

  1. the purpose of this paragraph is to discuss combinator X since it is used to achieve goal Y;
  2. the reader needs to know how this combinator works, but not necessairly at the Agda level; however, it may be prudent to actually discuss the limitations or design decisions at this location;
  3. the idea of moving symbols around has been mentioned and the ability to pattern match on text and rewrite it, informally, is expected; however, we have not discussed how to do so formally in Agda.

Perhaps discussing limitations of the reflection mechanism in-general and design decisions would be sufficient.

Also, afaik there is no up-to-date paper on reflection in Agda; there are outdated extensive accounts, but that's the reason I wrote my own tutorial on reflection in Agda.

from next-700-module-systems.

alhassy avatar alhassy commented on May 24, 2024

Stale ;; good ideas for another life ---closing.

from next-700-module-systems.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.