Re: A natural opportunity for Raku?

2022-02-12 Thread ToddAndMargo via perl6-users

On 2/12/22 13:12, Parrot Raiser wrote:

unfortunate tendency for "simple" languages
to accrete features and morph into misshapen monsters



Hi Parrot,

This is probably not going to add the the knowledge
of humanist, but WHEN DOES THAT STOP ME 


My tendency is to find what I need and ignore the
rest.  My use of a language is a mean to an end.
I do not care how well I master things, just that
I get the job done.

A good example is that I forced myself to learn regex.
Now I am quite handy with it.  But never learned subst,
which confuses me beyond the dickens when I see it,
But since I do not need it, I do not use it.

So when an OS become a bloated monster, I hardly ever notice.

It would be nice though if Raku cleaned up the bizarre
compile times and added a support interface for graphic
windows.  Some day I will learn Glade for that, unless
Raku beats me to it.

-T

p.s.  I am now surprised every time I have to use
the serial editor from hell (sed) and I actually
understand it.

p.s.s.  When you guys taught me how to use
$( Q[] ) inside a regex, a whole new world
opened up.  No more \\/\/\///\/\/\ hell.

p.s.s.s. speaking Q[] it is invaluable when dealing
with Windows file paths and back slashes.


Re: A natural opportunity for Raku?

2022-02-12 Thread Daniel Sockwell
February 12, 2022 4:12 PM, "Parrot Raiser" <1parr...@gmail.com> wrote:
> In this article, "Every Simple Language Will Eventually End Up Turing 
> Complete"
> https://solutionspace.blog/2021/12/04/every-simple-language-will-eventually-end-up-turing-complete
> the author points out an unfortunate tendency for "simple" languages
> to accrete features and morph into misshapen monsters.

Interesting article; thanks for the pointer.

> Could Raku's grammars provide a way to express the unique features
> of a DSL while using the extra features from a carefully considered 
> framework?

My two ¢: I agree with Matthew that we'll be there soon, but that we that
we're not there yet – and won't be until we have full support for Slangs.

If you're interested in this sort of thing, you might enjoy reading about
Language Oriented Programming, 
https://en.wikipedia.org/wiki/Language-oriented_programming
if you haven't previously.  In particular, I think the book Beautiful Racket
https://beautifulracket.com/ is pretty fascinating.

(And I'll add that, once Slangs are stable, we'll have some catching up to
do to be as good at DSLs and similar projects as Racket is.  But I think
we have the potential to be even better (maybe by a lot!))

-codesections


Re: A natural opportunity for Raku?

2022-02-12 Thread Matthew Stuckwisch
Yes, absolutely.  

There were some early examples with Tony O'Dell's inline SQL module. It doesn't 
actually check the syntax, and just passes off everything between 'sql' and 
';'.  You can see it at .  I'm sure it 
could be updated today to check off some of its current limitations, but it was 
more of a "hey, this can be done" module.

Recently, I made a test module wherein BASIC was provided as a language for 
methods that could be used just like traditional Raku methods.  
.  Both Fernando Correa de Oliveira 
and I have been working on (separate) regex-like slangs for specific purposes, 
and you can definitely expect to see some more stuff coming from us in the near 
future.

The main thing holding this back is the difficulty switching between languages. 
 You'll notice that it's possible to easily slip between all three of Raku's 
languages (main, regex, and Q).  For instance / regex { main: say 'q lang' } /. 
 At the moment, there's no easy way to enable that in slangs at the moment, but 
—and this is key— it's coming.  As soon as Rakudo can be run fully on RakuAST, 
I will be able to quickly enable the following syntax in BASIC (no, seriously, 
it'll be a 3-5 line modification, it will be that easy):

method-basic foo {
10 LET A = { $*RAKU.version ~~ /\d+ {say "I'm in the Q lang in Raku v$/ 
in Regex in Raku in BASIC in Raku" }/; +~$/ }
20 LET B = A * 10;
30 PRINT B
}

With the printed output being
 
I'm in the Q lang in Raku v6 in Regex in Raku in BASIC in Raku
60

All of the same syntax checking niceties that Raku has could be made available 
in any DSL created for Raku (for instance, in that BASIC example, compilation 
will fail —with an a message— if the line numbers don't go in order), it'd just 
be on the developer to provide them.

I'm fairly certain that DSLs were the main draw of both slangs and the 
grammars, it's just taken a while for us to get there.  But the light is at the 
end of the tunnel finally.

Matéu

> On Feb 12, 2022, at 4:12 PM, Parrot Raiser <1parr...@gmail.com> wrote:
> 
> In this article, "Every Simple Language Will Eventually End Up Turing 
> Complete"
> https://solutionspace.blog/2021/12/04/every-simple-language-will-eventually-end-up-turing-complete
> the author points out an unfortunate tendency for "simple" languages
> to accrete features and morph into misshapen monsters. Could Raku's
> grammars provide a way to express the unique features of a DSL while
> using the extra features from a carefully considered framework?



A natural opportunity for Raku?

2022-02-12 Thread Parrot Raiser
In this article, "Every Simple Language Will Eventually End Up Turing Complete"
https://solutionspace.blog/2021/12/04/every-simple-language-will-eventually-end-up-turing-complete
the author points out an unfortunate tendency for "simple" languages
to accrete features and morph into misshapen monsters. Could Raku's
grammars provide a way to express the unique features of a DSL while
using the extra features from a carefully considered framework?