12:26:03beachsamlamamma: I created Cleavir version 2 because I had some fairly radical changes that I wanted to make to Cleavir version 1, and I did not want to break the code of my only client (which is Clasp). People say I could have used GIT branches, but I always mess up when I try to do that.

12:29:57heisigbeach: Ok, I'm off for vacation. It seems I don't have permission to push to Trucler, so I submitted everything here: https://github.com/robert-strandh/Trucler/pulls

12:36:59beach1. Safety. As it is, any application code can modify the guts of the compiler and create unsafe code. I needed a way to control that in SICL, and (especially) in CLOSOS later on.

12:37:33beach2. Sandboxing. They allow for a subset of functionality to be available.

12:39:07beach3. Bootstrapping. I needed to be able to load and compile SICL Common Lisp code into a host Common Lisp implementation, even though that code defines standard Common Lisp operators, so that it would overwrite the host version of the operator if loaded into the host global environment.

12:40:02beach4. Multi-user capability. I need for CLOSOS to be a multi-user system, and I needed a mechanism to isolate users from one another.

12:42:14beachBut first-class global environments also solve the versioning problem. Different versions of a system or a package can be loaded into different first-class global environments.

12:43:20samlamammaWithout having read the paper, I assume there would be a way to communicate between different first-class global environments? I'm imagining some sort of remote-call protocol

12:44:18beachI think it would be done by having features from one environment selectively imported (perhaps with different names) into another environment.

12:46:54beachEnvironments are resolved at load time, so once code is compiled, it makes no sense to execute it in a different environment, other than if it has explicit references to that environment. I did that so that I could have the same performance of code with first-class global environments as without. Other suggestions for similar functionality pay a heavy price by having to use a hash-table lookup for each function call.

12:48:35samlamammaYeah, that's a much better solution :-). SICL is an exciting project, even though I can't contribute myself I sometimes `make' the papers section and read stuff that seems interesting!

13:22:03alandiperti'm working on a new implementation targeting JS and curious about cleavir, do i need most of the language working before i can use it? or is there a subset i can target

13:22:57beachYou need full CLOS in order to run Cleavir, if that is what you are asking.

13:28:11beachSo either you do what Clasp does, i.e. have an interpreter for the language written in some other language, and then, at some point, replace it with a Cleavir-based compiler. Or you can do what SICL does, which is to execute Cleavir in a host Common Lisp implementation in order to generate the code that you want.

13:29:04beachIf you are targeting JS, I imagine you can generate JS files to load into an existing JS implementation.

13:32:39beachIt is probably more difficult for Clasp and SICL, because the execution environment must be created somehow. Clasp uses C++ to create a subset of it, whereas SICL generates (or it will) the full code for the execution environment also by executing Cleavir code in a host Common Lisp implementation.

15:09:12beachI have no idea how to test the result of translating HIR to MIR. I mean, I can look at the result of some small examples in the visualizer, but I don't see a way I can execute the result, short of writing an emulator for a processor with a memory.

18:32:36karloszyeah, high level structs are nicer that declaring the memory layouts yourself... it could be quick and easy to simulate a VM by translating MIR to C and defining the memory layouts quickly a la Lisp in Small Pieces