<div dir="auto">Yes, Nile was amazing. It would be great to bridge the gap between Smalltalk and high performance computing with something on those lines. It also brings to mind BLIS <a href="https://github.com/flame/blis">https://github.com/flame/blis</a></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Apr 14, 2024 at 11:26 Andres Valloud <<a href="mailto:ten@smallinteger.com">ten@smallinteger.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">That Nile bit is a great example of code reduction. The demos were <br>
quite impressive and the whole thing was around IIRC 400 LOC or so. Ian <br>
Piumarta's talk re: to build a better mouse trap is also related because <br>
of the reference to Earley parsers.<br>
<br>
On 4/13/24 20:14, Luciano Notarfrancesco via Cuis-dev wrote:<br>
> Hi Michal,<br>
> That’s very interesting. I have a very concrete application for this. I <br>
> need to compute with tuples, matrices and polinomials over integers <br>
> modulo a small modulus (say, it fits in a register, or half register). <br>
> These tuples, polynomials and matrices are stored in arrays (for example <br>
> WordArrays, 32 bits per entry). The most critical operation is matrix <br>
> multiplication, since a lot of the rest can reduce to matrix <br>
> multiplication. I’ve been experimenting with a small external library <br>
> written in C that converts to floating point, does matrix multiplication <br>
> with a BLAS library, and converts back to modular integers, and i call <br>
> it via FFI. Of course I’d prefer to do all in Cuis… so i’m looking <br>
> forward for your project!<br>
> <br>
> Regards,<br>
> Luciano<br>
> <br>
> On Sat, Apr 13, 2024 at 21:13 Michał Olszewski via Cuis-dev <br>
> <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a> <mailto:<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>>> wrote:<br>
> <br>
> __<br>
> <br>
> Hi Phil,<br>
> <br>
> Thanks! I was alluding to a past suggestion to use OMeta and Dan<br>
> Amelang's Nile, when they were released back in 2008 as part of<br>
> VPRI, in Squeak Kernel classes to reduce overall complexity of<br>
> compilation and graphics rendering.<br>
> <br>
> And yes, the generated code would be free of any OMeta deps - in<br>
> this case it's simply used as compilation pipeline that transforms<br>
> input code through various compilation stages (AST->AST with<br>
> optimized special sends->bytecode).<br>
> <br>
> It would simplify overall architecture and would perhaps permit to<br>
> use compiler as service for e.g. syntax highlighting or some other<br>
> stuff that requires analysis of source code.<br>
> <br>
> Currently, it seems like, one has to separately implement parser for<br>
> syntax styling etc.<br>
> <br>
> I'm using OMeta for my bachelor thesis (in very very early stages,<br>
> defense is in Feb next year) which is about custom high level<br>
> dynamic streaming language. Pretty much bringing access to high<br>
> performance computations on CPU & GPU to Cuis, without leaving<br>
> comfort of it :).<br>
> <br>
> I'm going to use it for all stages of compilation (parsing,<br>
> optimizing, generating etc.).<br>
> <br>
> Too early to talk to about details but since I'm going to write the<br>
> thesis, the language is going to be released at least in some usable<br>
> state :) Hopefully more.<br>
> <br>
> Cheers,<br>
> Michał<br>
> <br>
> On 11.04.2024 08:05, Phil B wrote:<br>
>> Hi Michał,<br>
>><br>
>> I'm still around... just been busy with other things. Thanks for<br>
>> your interest and efforts! I'll take a look at your changes<br>
>> though it will probably be this weekend before I can get to it.<br>
>><br>
>> As far as making Cuis a first-class citizen: that's not likely to<br>
>> happen, nor would it be desirable. (I experimented with that and<br>
>> the result was not good... there's too much of an impedance mismatch)<br>
>><br>
>> Regarding the other areas you touched on:<br>
>> 1) Debugging: there should be a more robust OMeta parser (i.e. a<br>
>> subclass of OMeta2) to better catch more errors (esp. recursion)<br>
>> at parse/compile time, when possible. It's entirely possible that<br>
>> the syntax needs to be extended to support this.<br>
>> 2) Performance: assuming you're talking about runtime performance<br>
>> where you have a parser being called repeatedly you probably want<br>
>> to look at creating a parser that targets (i.e. emits) code for a<br>
>> more performant parser (there's no law that says OMeta has to<br>
>> always target OMeta!) as OMeta's PEG is going to have relatively<br>
>> poor runtime performance vs other parser approaches, especially if<br>
>> you have any recursion in your parser and/or the input to your<br>
>> parser is characters (i.e. parsing data files at runtime, for<br>
>> example.) I believe that's still an open problem with PEGs.<br>
>> (not sure as I haven't kept up with the state of the art on this)<br>
>> 3) Cuis compiling etc: use OMeta to emit Cuis/Smalltalk code that<br>
>> is used anywhere in the image, sure... as long as said emitted<br>
>> code is free of OMeta dependencies. Put another way: if your<br>
>> generated code is in a subclass of OMeta2 and calls the parsing<br>
>> engine it would probably not be safe enough to use as an<br>
>> image-level dependency, if your generated code is *not* in a<br>
>> subclass of OMeta2 you might be fine.<br>
>><br>
>> Thanks,<br>
>> Phil<br>
>><br>
>> On Wed, Apr 10, 2024 at 4:37 PM Michał Olszewski via Cuis-dev<br>
>> <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a> <mailto:<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>>> wrote:<br>
>><br>
>> Hi all,<br>
>><br>
>> I fixed OMeta package from pbella so now it works again for<br>
>> Cuis 6.3<br>
>> (>6291). Yay! I made a couple of tests with the grammar<br>
>> definitions and<br>
>> syntax highlighting and so far it's kind of back to the<br>
>> working state:<br>
>><br>
>> <a href="https://github.com/michalo1334/OMeta-Cuis" rel="noreferrer" target="_blank">https://github.com/michalo1334/OMeta-Cuis</a><br>
>> <<a href="https://github.com/michalo1334/OMeta-Cuis" rel="noreferrer" target="_blank">https://github.com/michalo1334/OMeta-Cuis</a>><br>
>><br>
>> Just requested pull to original repo:<br>
>> <a href="https://github.com/pbella/OMeta-Cuis" rel="noreferrer" target="_blank">https://github.com/pbella/OMeta-Cuis</a><br>
>> <<a href="https://github.com/pbella/OMeta-Cuis" rel="noreferrer" target="_blank">https://github.com/pbella/OMeta-Cuis</a>> but not sure if the<br>
>> author is still<br>
>> active in the community.<br>
>><br>
>> However, in OMeta-derived classes it incorrectly highlights<br>
>> instance<br>
>> variables in red and displays := instead of <-. If someone has<br>
>> time to<br>
>> take a quick look at the Shout styler code, would be great.<br>
>> Right now<br>
>> it's an ugly fix so that there is any highlighting at all -<br>
>> it's nice<br>
>> to see a colored text.<br>
>><br>
>> And then there is the problem to make OMeta first class citizen<br>
>> (debugging, improve performance, maybe even use it for Cuis<br>
>> compiling &<br>
>> code generation machinery?).<br>
>><br>
>> Cheers,<br>
>> Michał<br>
>><br>
>> -- <br>
>> Cuis-dev mailing list<br>
>> <a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a> <mailto:<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a>><br>
>> <a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
>> <<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a>><br>
>><br>
> -- <br>
> Cuis-dev mailing list<br>
> <a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a> <mailto:<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a>><br>
> <a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
> <<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a>><br>
> <br>
> <br>
</blockquote></div></div>