ocamllabs / compiler-hacking Goto Github PK
View Code? Open in Web Editor NEWWiki for compiler hacking sessions
Wiki for compiler hacking sessions
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.
Printexc.get_raw_backtrace
in particular is new but is not marked as such in the ocamldoc at http://caml.inria.fr/pub/docs/manual-ocaml/libref/Printexc.html.
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:
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
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 is still in flux.
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.
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.
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?
I am working on Add Bigarray.[kind_]byte_size functions
. I don't quite understand the difference between CAMLExport
and CAMLprim
.
Would someone like to explain it to me?
On this page there is a broken link to http://caml.inria.fr/pub/docs/manual-ocaml/manual021.html#toc70. This should probably point to here now.
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.
It'll be easier to manage the blog if the source and generated HTML live in a single branch:
https://github.com/blog/2228-simpler-github-pages-publishing
{< packages = packages >}
is accepted but
{< packages >}
is not.
Currently, the wiki mentions parmap.
While parmap is certainly nice, it does not cover all use cases.
In some situations (like parallel stream processing), parany is better suited:
https://github.com/UnixJunkie/parany
If parany could go faster thanks to multicore ocaml, please do drop me an e-mail.
Regards,
F.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.