GithubHelp home page GithubHelp logo

compiler-hacking's People

Contributors

yallop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

compiler-hacking's Issues

Local module forms in class declarations

class my_class =
  let open My_module in
  let x = my_fun my_val in
object
  method x = x
end

is a syntax error.

class my_class =
  let module M = My_module in
  let x = M.my_fun M.my_val in
object
  method x = x
end

is also a syntax error.

Hacking session wiki structure

There was an ongoing discussion on the use of the ocamllabs compiler hacking sessions wiki in two related threads:

Today I went ahead and reorganized the wiki, with the goals of:

  1. improving the overall structure
  2. making it not specific to events organized in Cambridge UK (the more consistent and well-established place for such events so far)
  3. de-emphasizing contributions to the compiler codebase only (we want a list of tasks that scales to arbitrary OCaml projects that are useful to the community) -- also, de-emphasizing code patches as the only form of contribution (tests, documentation, communication are also important and valued).

New structure

Home page

The home page explains what OCaml hacking sessions¹ are, list future and past sessions, and points to a list of contribution ideas (on a separate page for readability). This page should remain short if possible.

¹: I'm not attached to the name, hackaton or "contribution parties" or whatever is fine

Contribution ideas

The things to work on page points to project ideas across the OCaml ecosystem; the previous content of the page (ambitious language changes or compiler hacking ideas) moved to Compiler or Language projects to work on.

This page should remain short if possible. In particular, we should push projects to move the content currently on this page into their space, in a CONTRIBUTING.md document or a wiki page of their own. Ideally, all OCaml projects interesting in participating to these events would tag/label issues on their issue tracker, and we would just point to that (and their landing page for contributors). Currently this is not the case (Lwt and mSat have one single issue that is being pointed out, ocaml.org does this weird thing of having a meta-issue about contributions), but I think we should pressure projects into adopting this more standardized structure (I'll start complaining very soon), and push back against attempts to add more project-specific cruft to this page. Otherwise it will be an unmaintainable mess soon.

The rest

The rest is still in flux.

Stuff we could remove

These are pages that I believe could be removed, because they don't provide much non-redundant information and/or would be best moved to project-specific locations.

Stuff that actually makes sense on a "compiler-hacking" wiki, but not so much on a "contribution/hackaton organization" wiki

It's not clear to me what is best. In fact I would be tempted to say that a "compiler-hacking" repo should remain with the content below, and that the stuff above (contribution/hackaton organization) should maybe move to a different wiki. Opinions welcome.

Log pages

For the recent hackaton at MIT I created one log page, and I did the same for an old 2014 event that I transferred from its own page. There is also a Summaries page that contains the logs of two separate events, and a series of blog post that are essentially (restructured) logs.

I'm not sure what to do with log pages. I think that preserving them is valuable (important), and that making a distinction between "raw log of activity for each person" and "restructured/rewritten communication in a blog post" makes sense. Having a separate page for each log is natural, but Github wikis have a single panel on the right with all pages that is important for navigation (I've seen at MIT that people rely on it a lot), so not cluttering it is good.

I would be tempted to propose that ongoing events have their own log pages, but that after they are finished the logs are moved to a single "Summaries" page and the event-specific log page be deleted. What do people think?

Type variable names should be retained

In error messages regarding polymorphic values, it would be nice to have the names of type variables retained.

For instance:

class ['repo, 'pkg] universe :
object ('self)
  constraint 'repo =
  < filter        : ('repo -> 'pkg -> bool) -> 'repo;
    map           : ('repo -> 'pkg -> 'pkg) -> 'repo;
    name          : string;
    opam          : OpamTypes.repository;
    packages      : 'pkg OpamPackage.Map.t;
    priority      : int;
    with_priority : int -> 'repo;
    ..
  >

but then when a type error is printed:

A type parameter has type
         < filter : ('b -> < package : OpamPackage.Set.elt; .. > -> bool) ->
                    'a;
           map : 'c -> 'a; name : OpamRepositoryName.Map.key;
           opam : OpamTypes.repository;
           packages : < conflicts : OpamTypes.formula;
                        depends : OpamTypes.formula;
                        depopts : OpamTypes.formula; .. >
                      OpamPackage.Map.t;
           priority : int; with_priority : int -> 'a; .. >
         as 'a
       but is expected to have type
         < filter : ('d ->
                     (< conflicts : OpamTypes.formula;
                        depends : OpamTypes.formula;
                        depopts : OpamTypes.formula;
                        package : OpamTypes.package; .. >
                      as 'e) ->
                     bool) ->
                    'd;
           map : ('d -> 'e -> 'e) -> 'd; name : string;
           opam : OpamTypes.repository; packages : 'e OpamPackage.Map.t;
           priority : int; with_priority : int -> 'd; .. >
         as 'd
       This instance of 'd is ambiguous:
       it would escape the scope of its equation

This probably requires annotation and a disambiguation pass before error printing.

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.