mailing list of musl libc
 help / color / mirror / code / Atom feed
* Squirrel - no-bloat scripting language with sane syntax and semantics
@ 2013-08-23 21:11 Paul Sokolovsky
  2013-08-24  8:29 ` Luca Barbato
  2013-08-25  9:34 ` Rob Landley
  0 siblings, 2 replies; 14+ messages in thread
From: Paul Sokolovsky @ 2013-08-23 21:11 UTC (permalink / raw)
  To: musl

Hello,

I apologize if this message can be considered off-topic. However, my
reading thru mailing list archive showed that there's favorable
attitude to generic no-bloat stuff, so I hope this message may be of
interest to some readers.

I'd like to draw attention to small very high level (meaning that
there's native support for lists and maps) language "Squirrel",
http://squirrel-lang.org/ . It compiles below 300K (dynamic linking)
with -O2 and can be gotten under 200K with -Os -flto (sizes are for
i386). It uses C-like syntax, so should be a quick start for many folks.

The language was created in 2003, and now at 3.0.4, but it's mostly
one-man project, and the maintainer is not interested in its usage
beyond "embed in C/C++ application" pattern. After some poking around
for alternative small scripting languages and even considering writing
web apps in C++, I gave up and decided to take solution of the "last
mile" problem myself - to turn it into standalone general-purpose
language, so it was suitable for arbitrary applications and wide
audience (which means resolving few warts the original language does
have).

What I have done so far is at
https://github.com/pfalcon/squirrel-modules and
https://github.com/pfalcon/squirrel-lang/tree/squirrel3-pfalcon . So,
if you ever dreams of sane unbloated scripting language, please give it
a try. And of course, I couldn't lead it to general-purposed'ness
myself, so if you find the idea neat, please consider joining the
effort ;-).

Example no-nonsense script written in (general-purpose) Squirrel:

==========
fin = file(vargv[1], "r")
fout = file(vargv[2], "w")

prefix = "sq"
while (l = fin.readline()) {
    if (l.find("/*stdlib*/"))
        prefix = "sqstd"

    if (!l.find("(*"))
        continue

    toks = split(l, "()")
    sym = toks[1].slice(1)
    fout.write("#define " + prefix + "_" + sym + " (sqapi->" + sym + ")\n")
}
==========


-- 
Best regards,
 Paul                          mailto:pmiscml@gmail.com


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Squirrel - no-bloat scripting language with sane syntax and semantics
  2013-08-23 21:11 Squirrel - no-bloat scripting language with sane syntax and semantics Paul Sokolovsky
@ 2013-08-24  8:29 ` Luca Barbato
  2013-08-24 11:29   ` Paul Sokolovsky
  2013-08-25  9:34 ` Rob Landley
  1 sibling, 1 reply; 14+ messages in thread
From: Luca Barbato @ 2013-08-24  8:29 UTC (permalink / raw)
  To: musl

On 23/08/13 23:11, Paul Sokolovsky wrote:
> Hello,
> 
> I apologize if this message can be considered off-topic. However, my
> reading thru mailing list archive showed that there's favorable
> attitude to generic no-bloat stuff, so I hope this message may be of
> interest to some readers.
> 
> I'd like to draw attention to small very high level (meaning that
> there's native support for lists and maps) language "Squirrel",
> http://squirrel-lang.org/ . It compiles below 300K (dynamic linking)
> with -O2 and can be gotten under 200K with -Os -flto (sizes are for
> i386). It uses C-like syntax, so should be a quick start for many folks.

Looks impressively similar to Pawn[1], with the cons of being written in
C++ (thus limiting its usage to places where C++ is available), lua (and
moonscript) are getting more and more traction in this field and there
are lean enough implementations.

lu


[1] http://www.compuphase.com/pawn/pawn.htm





^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Squirrel - no-bloat scripting language with sane syntax and semantics
  2013-08-24  8:29 ` Luca Barbato
@ 2013-08-24 11:29   ` Paul Sokolovsky
  0 siblings, 0 replies; 14+ messages in thread
From: Paul Sokolovsky @ 2013-08-24 11:29 UTC (permalink / raw)
  To: musl

Hello,

On Sat, 24 Aug 2013 10:29:22 +0200
Luca Barbato <lu_zero@gentoo.org> wrote:

> > I'd like to draw attention to small very high level (meaning that
> > there's native support for lists and maps) language "Squirrel",
> > http://squirrel-lang.org/ . It compiles below 300K (dynamic linking)
> > with -O2 and can be gotten under 200K with -Os -flto (sizes are for
> > i386). It uses C-like syntax, so should be a quick start for many
> > folks.
> 
> Looks impressively similar to Pawn[1],

Well, depending on how you define "similar". In today's world, one can
say that it's similar to JavaScript, except that it doesn't have all
that "bad parts" which are defining to JS. Overall, there're gazillions
small scripting languages, dead, mature, and unfinished (and over last
half year I looked thru dozens of them). The difference comes to native,
well-integrated support of high-level data types: lists and maps. Very
few support that, and then binary size come into play.

Speaking of Pawn, I see that I looked into it, but I couldn't get its
trunk to compile. And it's advertised as "a compiled language." And
looking thru description, I couldn't find confirmation that it supports
mapping type (appears to be only C-like "structure" with symbolic
identifiers for fixed fields), neither look at source samples confirmed
that, but showed some pretty weird syntax patterns for a "C-like"
language.

All in all, despite difference in syntax, for me Squirrel is similar
to Python (which happens to be my scripting language of choice), and I
treat it exactly like that - unbloated alternative to Python for small
systems.

> with the cons of being written
> in C++ (thus limiting its usage to places where C++ is available),

Squirrel's external API is pure C. It itself implemented in a typical
subset of C++ (-fno-rtti, -fno-exceptions, it does use virtual
destructors though - it's dynamic language implementation after all).

> lua (and moonscript) are getting more and more traction in this field
> and there are lean enough implementations.

Yeah, Lua is definitely (weird) king of the hill here, with networked
package manager avalable, etc. - all like "real" language
(Python/Perl/Ruby). But drawbacks of Lua are well-known - its rather
hacked-up semantics which will make any programmer cringe (conscious
one from dissatisfaction, careless from actual debugging and code
maintenance). I tried to make me not sick of it for about a year and I
failed, hence look for alternative, then understanding that search is
vain and the effort can be rather put into Squirrel (btw, it was
started from dissatisfaction with Lua either).

Here's some comparison of Lua and Squirrel:

http://computerscomputing.wordpress.com/2013/02/18/lua-and-squirrel-the-case-for-squirrel/

> 
> lu
> 
> 
> [1] http://www.compuphase.com/pawn/pawn.htm

-- 
Best regards,
 Paul                          mailto:pmiscml@gmail.com


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Squirrel - no-bloat scripting language with sane syntax and semantics
  2013-08-23 21:11 Squirrel - no-bloat scripting language with sane syntax and semantics Paul Sokolovsky
  2013-08-24  8:29 ` Luca Barbato
@ 2013-08-25  9:34 ` Rob Landley
  2013-08-25 15:03   ` Justin Cormack
                     ` (3 more replies)
  1 sibling, 4 replies; 14+ messages in thread
From: Rob Landley @ 2013-08-25  9:34 UTC (permalink / raw)
  To: musl; +Cc: Paul Sokolovsky

On 08/23/2013 04:11:18 PM, Paul Sokolovsky wrote:
> Hello,
> 
> I apologize if this message can be considered off-topic. However, my
> reading thru mailing list archive showed that there's favorable
> attitude to generic no-bloat stuff, so I hope this message may be of
> interest to some readers.

We have a list of random packages in the musl wiki, but I stopped  
paying attention to it when people started adding GNU projects to it. I  
don't understand what it's for at that point.

> I'd like to draw attention to small very high level (meaning that
> there's native support for lists and maps) language "Squirrel",
> http://squirrel-lang.org/ . It compiles below 300K (dynamic linking)
> with -O2 and can be gotten under 200K with -Os -flto (sizes are for
> i386). It uses C-like syntax, so should be a quick start for many  
> folks.

Normally people use lua for this, which has around 100k of interpreter.

The downside of lua is it doesn't have a full standard posix C binding  
library. (It has a nonstandard one you can add on, but when I looked at  
writing a busybox clone in it, I needed to install something like 7  
packages to get all the libraries I needed. Then again, most people  
aren't implementing their own "ifconfig", "mount", and "taskset"...)

I note that lua is heavily used in the gaming industry, half of World  
of Warcraft is written in it, for example.

> The language was created in 2003, and now at 3.0.4, but it's mostly
> one-man project, and the maintainer is not interested in its usage
> beyond "embed in C/C++ application" pattern.

So he's been doing it for 10 years and nobody's heard about it.

> After some poking around
> for alternative small scripting languages and even considering writing
> web apps in C++, I gave up and decided to take solution of the "last
> mile" problem myself - to turn it into standalone general-purpose
> language, so it was suitable for arbitrary applications and wide
> audience (which means resolving few warts the original language does
> have).

Back in the Fidonet days I downloaded a list of 2500 programming  
languages. The vast majority of them were one person projects, often  
some graduate student who did it as a class project.

(Heck, I wrote one myself back in 1991 when I was first getting into C.  
I did a bytecode interpreter with an assembler for the bytecode; didn't  
have a libc because the interpreter had bytecodes for things like "open  
file".)

> What I have done so far is at
> https://github.com/pfalcon/squirrel-modules and
> https://github.com/pfalcon/squirrel-lang/tree/squirrel3-pfalcon . So,
> if you ever dreams of sane unbloated scripting language,

It's called lua. (Ken Thompson has similar dreams for go, but I'm not  
convinced.)

> please give it
> a try. And of course, I couldn't lead it to general-purposed'ness
> myself, so if you find the idea neat, please consider joining the
> effort ;-).

Python is now at least two incompatible languages. I've seen  
applications implemented in standalone PHP, games written in Ruby, more  
than one attempt to come up with an embedded subset of perl, at least  
three special purpose lithp engines, javascript used outside the  
browser _or_ server, more languages repurposing Java's Virtual Machine  
than I can track, people still doing new stuff in tcl for some reason,  
my ubuntu install has Haskell presumably because of some dependency,  
OpenFirmware is implemented in fourth so that's still around...

I note that this is off the top of my head. (I'm off in a corner of the  
university out of the range of wireless signal, replying into my outbox  
queue.)

> Example no-nonsense script written in (general-purpose) Squirrel:

There was a fun gallery of decss implementations written in various  
languages a decade and change ago. I vaguely recall he had a couple  
hundred, although a lot of those were things like cobol and pascal and  
fortran and visual basic that we can only _hope_ are dead now...

Rob

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Squirrel - no-bloat scripting language with sane syntax and semantics
  2013-08-25  9:34 ` Rob Landley
@ 2013-08-25 15:03   ` Justin Cormack
  2013-08-26 22:18     ` Rob Landley
  2013-08-25 15:18   ` Ivan Kanakarakis
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 14+ messages in thread
From: Justin Cormack @ 2013-08-25 15:03 UTC (permalink / raw)
  To: musl

On Sun, Aug 25, 2013 at 10:34 AM, Rob Landley <rob@landley.net> wrote:
> Normally people use lua for this, which has around 100k of interpreter.
>
> The downside of lua is it doesn't have a full standard posix C binding
> library. (It has a nonstandard one you can add on, but when I looked at
> writing a busybox clone in it, I needed to install something like 7 packages
> to get all the libraries I needed. Then again, most people aren't
> implementing their own "ifconfig", "mount", and "taskset"...)

I have implemented ifconfig, mount etc in Lua (the APIs, not the
commands), see https://github.com/justincormack/ljsyscall - its pretty
comprehensive now.

Justin


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Squirrel - no-bloat scripting language with sane syntax and semantics
  2013-08-25  9:34 ` Rob Landley
  2013-08-25 15:03   ` Justin Cormack
@ 2013-08-25 15:18   ` Ivan Kanakarakis
  2013-08-25 19:40   ` Paul Sokolovsky
  2013-08-25 20:00   ` Matias A. Fonzo
  3 siblings, 0 replies; 14+ messages in thread
From: Ivan Kanakarakis @ 2013-08-25 15:18 UTC (permalink / raw)
  To: musl; +Cc: Paul Sokolovsky

[-- Attachment #1: Type: text/plain, Size: 4777 bytes --]

> Squirrel is used in the Code::Blocks IDE, Final Fantasy Crystal
Chronicles: My Life as a King, Left 4 Dead 2, and Portal 2.

so, it's not that unheard of ..
not getting the exposure lua got on hacker news doesn't mean it is
automatically not interesting.
On the other hand I like Forth, and I'm keen to spend some time with J ..

On the "classes" section, there is a typo on the constructor. It says 'name
= aType', reassigning name, when I guess it should be 'type = aType'

PS: sorry for top-posting; blame android :P
 On Aug 25, 2013 4:08 PM, "Rob Landley" <rob@landley.net> wrote:

> On 08/23/2013 04:11:18 PM, Paul Sokolovsky wrote:
>
>> Hello,
>>
>> I apologize if this message can be considered off-topic. However, my
>> reading thru mailing list archive showed that there's favorable
>> attitude to generic no-bloat stuff, so I hope this message may be of
>> interest to some readers.
>>
>
> We have a list of random packages in the musl wiki, but I stopped paying
> attention to it when people started adding GNU projects to it. I don't
> understand what it's for at that point.
>
>  I'd like to draw attention to small very high level (meaning that
>> there's native support for lists and maps) language "Squirrel",
>> http://squirrel-lang.org/ . It compiles below 300K (dynamic linking)
>> with -O2 and can be gotten under 200K with -Os -flto (sizes are for
>> i386). It uses C-like syntax, so should be a quick start for many folks.
>>
>
> Normally people use lua for this, which has around 100k of interpreter.
>
> The downside of lua is it doesn't have a full standard posix C binding
> library. (It has a nonstandard one you can add on, but when I looked at
> writing a busybox clone in it, I needed to install something like 7
> packages to get all the libraries I needed. Then again, most people aren't
> implementing their own "ifconfig", "mount", and "taskset"...)
>
> I note that lua is heavily used in the gaming industry, half of World of
> Warcraft is written in it, for example.
>
>  The language was created in 2003, and now at 3.0.4, but it's mostly
>> one-man project, and the maintainer is not interested in its usage
>> beyond "embed in C/C++ application" pattern.
>>
>
> So he's been doing it for 10 years and nobody's heard about it.
>
>  After some poking around
>> for alternative small scripting languages and even considering writing
>> web apps in C++, I gave up and decided to take solution of the "last
>> mile" problem myself - to turn it into standalone general-purpose
>> language, so it was suitable for arbitrary applications and wide
>> audience (which means resolving few warts the original language does
>> have).
>>
>
> Back in the Fidonet days I downloaded a list of 2500 programming
> languages. The vast majority of them were one person projects, often some
> graduate student who did it as a class project.
>
> (Heck, I wrote one myself back in 1991 when I was first getting into C. I
> did a bytecode interpreter with an assembler for the bytecode; didn't have
> a libc because the interpreter had bytecodes for things like "open file".)
>
>  What I have done so far is at
>> https://github.com/pfalcon/**squirrel-modules<https://github.com/pfalcon/squirrel-modules>and
>> https://github.com/pfalcon/**squirrel-lang/tree/squirrel3-**pfalcon<https://github.com/pfalcon/squirrel-lang/tree/squirrel3-pfalcon>. So,
>> if you ever dreams of sane unbloated scripting language,
>>
>
> It's called lua. (Ken Thompson has similar dreams for go, but I'm not
> convinced.)
>
>  please give it
>> a try. And of course, I couldn't lead it to general-purposed'ness
>> myself, so if you find the idea neat, please consider joining the
>> effort ;-).
>>
>
> Python is now at least two incompatible languages. I've seen applications
> implemented in standalone PHP, games written in Ruby, more than one attempt
> to come up with an embedded subset of perl, at least three special purpose
> lithp engines, javascript used outside the browser _or_ server, more
> languages repurposing Java's Virtual Machine than I can track, people still
> doing new stuff in tcl for some reason, my ubuntu install has Haskell
> presumably because of some dependency, OpenFirmware is implemented in
> fourth so that's still around...
>
> I note that this is off the top of my head. (I'm off in a corner of the
> university out of the range of wireless signal, replying into my outbox
> queue.)
>
>  Example no-nonsense script written in (general-purpose) Squirrel:
>>
>
> There was a fun gallery of decss implementations written in various
> languages a decade and change ago. I vaguely recall he had a couple
> hundred, although a lot of those were things like cobol and pascal and
> fortran and visual basic that we can only _hope_ are dead now...
>
> Rob

[-- Attachment #2: Type: text/html, Size: 6303 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Squirrel - no-bloat scripting language with sane syntax and semantics
  2013-08-25  9:34 ` Rob Landley
  2013-08-25 15:03   ` Justin Cormack
  2013-08-25 15:18   ` Ivan Kanakarakis
@ 2013-08-25 19:40   ` Paul Sokolovsky
  2013-08-25 20:00   ` Matias A. Fonzo
  3 siblings, 0 replies; 14+ messages in thread
From: Paul Sokolovsky @ 2013-08-25 19:40 UTC (permalink / raw)
  To: Rob Landley; +Cc: musl

Hello,

On Sun, 25 Aug 2013 04:34:33 -0500
Rob Landley <rob@landley.net> wrote:

> On 08/23/2013 04:11:18 PM, Paul Sokolovsky wrote:
> > Hello,
> > 
> > I apologize if this message can be considered off-topic. However, my
> > reading thru mailing list archive showed that there's favorable
> > attitude to generic no-bloat stuff, so I hope this message may be of
> > interest to some readers.
> 
> We have a list of random packages in the musl wiki, but I stopped  
> paying attention to it when people started adding GNU projects to it.
> I don't understand what it's for at that point.

Yeah, like you shared sentiment that there should be site for embedded
beginners, apparently lot of people feel that there should be
community-driven (vs personal orthodoxy) site for unbloated software,
and took that musl page as a lure ;-).

> > I'd like to draw attention to small very high level (meaning that
> > there's native support for lists and maps) language "Squirrel",
> > http://squirrel-lang.org/ . It compiles below 300K (dynamic linking)
> > with -O2 and can be gotten under 200K with -Os -flto (sizes are for
> > i386). It uses C-like syntax, so should be a quick start for many  
> > folks.
> 
> Normally people use lua for this, which has around 100k of
> interpreter.

Surely they use lua out of desperation and lack of alternatives? (Like,
maybe if they knew about Brainfuck, they'd use it instead?) As for the
code size, Squirrel can be slimmed down. For example, default config
includes garbage collector - it's not used by VM, which uses strictly
reference counting for more predictable timing, but user can call GC at
suitable times either to debug cycles, or just clean cruft if they
don't feel like using weakrefs. For well-behaving app, VM can be built
without GC and without bytecode compiler.

> 
> The downside of lua is it doesn't have a full standard posix C
> binding library. 

Lua, just as Squirrel, are embedable languages and by definition don't
need any "standard library bindings", it itself is bound to an app. Out
of desperation for unbloated solution, people wrote lot of modules for
Lua to make it a standalone general-purpose language, which exposed lot
of issues in Lua semantics, which weren't critical for original embedded
usage in games, but are pretty critical for a gen-purp language.

> (It has a nonstandard one you can add on, but when I
> looked at writing a busybox clone in it, I needed to install
> something like 7 packages to get all the libraries I needed. Then
> again, most people aren't implementing their own "ifconfig", "mount",
> and "taskset"...)

Installing 7 (small) packages is the way to go for unbloated language,
otherwise it all will end up like Python - its vast, user-friendly,
all-encompassing library is also its curse when it comes to embedded
usage.

> I note that lua is heavily used in the gaming industry, half of
> World of Warcraft is written in it, for example.

Poor fellas, I agree.

> 
> > The language was created in 2003, and now at 3.0.4, but it's mostly
> > one-man project, and the maintainer is not interested in its usage
> > beyond "embed in C/C++ application" pattern.
> 
> So he's been doing it for 10 years and nobody's heard about it.

Everybody heard about busybox, nobody heard about toybox, go
fight that, Rob ;-). Besides, as was pointed out, the gaming industry
is well aware of it and even risked using it in few high-profile (as
they say, I don't play ;-( ) projects - that's in the industry which is
just condemned to use Lua.

But what you say is exactly the problem - the author, Alberto
Demichelis appear to be pretty satisfied with this niche role. Which is
all understood, because there're so many general-purpose language that
fighting against them is futile. Just the same as there's already
uclibc, busybox, gcc and even llvm, and buildroot has been building
your embedded distro for ages - well, you got the idea...

> 
> > After some poking around
> > for alternative small scripting languages and even considering
> > writing web apps in C++, I gave up and decided to take solution of
> > the "last mile" problem myself - to turn it into standalone
> > general-purpose language, so it was suitable for arbitrary
> > applications and wide audience (which means resolving few warts the
> > original language does have).
> 
> Back in the Fidonet days I downloaded a list of 2500 programming  
> languages. The vast majority of them were one person projects, often  
> some graduate student who did it as a class project.
> 
> (Heck, I wrote one myself back in 1991 when I was first getting into
> C. I did a bytecode interpreter with an assembler for the bytecode;
> didn't have a libc because the interpreter had bytecodes for things
> like "open file".)

Every schoolboy writes his own language. Very few write *high-level*
language, and almost none debug all the memory issues with it. That's
why I figured it's nice idea not to write my own language, and take
core from the guy who debugged it fro 10 years...

> > What I have done so far is at
> > https://github.com/pfalcon/squirrel-modules and
> > https://github.com/pfalcon/squirrel-lang/tree/squirrel3-pfalcon .
> > So, if you ever dreams of sane unbloated scripting language,
> 
> It's called lua. (Ken Thompson has similar dreams for go, but I'm
> not convinced.)

Rob, you may be missing with Lua just like Ken ;-).

> 
> > please give it
> > a try. And of course, I couldn't lead it to general-purposed'ness
> > myself, so if you find the idea neat, please consider joining the
> > effort ;-).
> 
> Python is now at least two incompatible languages. I've seen  
> applications implemented in standalone PHP, games written in Ruby,
> more than one attempt to come up with an embedded subset of perl, at
> least three special purpose lithp engines, javascript used outside
> the browser _or_ server, more languages repurposing Java's Virtual
> Machine than I can track, people still doing new stuff in tcl for
> some reason, my ubuntu install has Haskell presumably because of some
> dependency, OpenFirmware is implemented in fourth so that's still
> around...

My criteria for selecting Squirrel was simple and clear: sanity and
syntax familiarity as invariants, enough maturity, then minimal size.
Know better alternatives? But otherwise, you're right - in the world
where JavaScript curse broke out of browsers and threatens to drown
entire IT in itself, one can't be shy to do things which he thinks are
right ;-).

> 
> I note that this is off the top of my head. (I'm off in a corner of
> the university out of the range of wireless signal, replying into my
> outbox queue.)
> 
> > Example no-nonsense script written in (general-purpose) Squirrel:
> 
> There was a fun gallery of decss implementations written in various  
> languages a decade and change ago. I vaguely recall he had a couple  
> hundred, although a lot of those were things like cobol and pascal
> and fortran and visual basic that we can only _hope_ are dead now...

I share the sentiment - we barely finished funeral for Perl (hurrah),
like other roobie-javascreeptie-looa plague spreads around...

Kinda more modern variant of such shootout is
http://rigaux.org/language-study/scripting-language/ . Still pretty
subjective IMHO, who said that *scripting* language should munge files
like sh? Somebody should do better...

> 
> Rob


P.S. Yeah, this gets pretty offtopic...

-- 
Best regards,
 Paul                          mailto:pmiscml@gmail.com


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Squirrel - no-bloat scripting language with sane syntax and semantics
  2013-08-25  9:34 ` Rob Landley
                     ` (2 preceding siblings ...)
  2013-08-25 19:40   ` Paul Sokolovsky
@ 2013-08-25 20:00   ` Matias A. Fonzo
  2013-08-25 20:10     ` Rich Felker
  2013-08-31 18:39     ` Daniel Cegiełka
  3 siblings, 2 replies; 14+ messages in thread
From: Matias A. Fonzo @ 2013-08-25 20:00 UTC (permalink / raw)
  To: musl

El Sun, 25 Aug 2013 04:34:33 -0500
Rob Landley <rob@landley.net> escribió:
> On 08/23/2013 04:11:18 PM, Paul Sokolovsky wrote:
> > Hello,
> > 
> > I apologize if this message can be considered off-topic. However, my
> > reading thru mailing list archive showed that there's favorable
> > attitude to generic no-bloat stuff, so I hope this message may be of
> > interest to some readers.
> 
> We have a list of random packages in the musl wiki, but I stopped  
> paying attention to it when people started adding GNU projects to it.
> I don't understand what it's for at that point.
> 

I see only one GNU project which I've added, GNU moe - an alternative
text editor for GNU nano, Joe, and perhaps others. Is this a problem?.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Squirrel - no-bloat scripting language with sane syntax and semantics
  2013-08-25 20:00   ` Matias A. Fonzo
@ 2013-08-25 20:10     ` Rich Felker
  2013-08-31 18:39     ` Daniel Cegiełka
  1 sibling, 0 replies; 14+ messages in thread
From: Rich Felker @ 2013-08-25 20:10 UTC (permalink / raw)
  To: musl

On Sun, Aug 25, 2013 at 05:00:06PM -0300, Matias A. Fonzo wrote:
> El Sun, 25 Aug 2013 04:34:33 -0500
> Rob Landley <rob@landley.net> escribió:
> > On 08/23/2013 04:11:18 PM, Paul Sokolovsky wrote:
> > > Hello,
> > > 
> > > I apologize if this message can be considered off-topic. However, my
> > > reading thru mailing list archive showed that there's favorable
> > > attitude to generic no-bloat stuff, so I hope this message may be of
> > > interest to some readers.
> > 
> > We have a list of random packages in the musl wiki, but I stopped  
> > paying attention to it when people started adding GNU projects to it.
> > I don't understand what it's for at that point.
> 
> I see only one GNU project which I've added, GNU moe - an alternative
> text editor for GNU nano, Joe, and perhaps others. Is this a problem?.

I don't want any software to be considered "a problem" to be on this
list for purely politicial reasons. If there's anything on the list
that's just technically awful (gaping security holes, UB all over the
place, otherwise a source of major bugs...) then I think it should be
removed outright. Otherwise, if anyone thinks something is a bad fit
for the list, please raise the issue in a civil manner, without
attacking the person who added it, for the community to discuss.

I also think the wiki should just be fixed up to clarify that these
are not "recommendations", just things individual community members
found useful.

Rich


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Squirrel - no-bloat scripting language with sane syntax and semantics
  2013-08-25 15:03   ` Justin Cormack
@ 2013-08-26 22:18     ` Rob Landley
  2013-08-26 23:59       ` Rich Felker
  0 siblings, 1 reply; 14+ messages in thread
From: Rob Landley @ 2013-08-26 22:18 UTC (permalink / raw)
  To: musl; +Cc: Justin Cormack

On 08/25/2013 10:03:33 AM, Justin Cormack wrote:
> On Sun, Aug 25, 2013 at 10:34 AM, Rob Landley <rob@landley.net> wrote:
> > Normally people use lua for this, which has around 100k of  
> interpreter.
> >
> > The downside of lua is it doesn't have a full standard posix C  
> binding
> > library. (It has a nonstandard one you can add on, but when I  
> looked at
> > writing a busybox clone in it, I needed to install something like 7  
> packages
> > to get all the libraries I needed. Then again, most people aren't
> > implementing their own "ifconfig", "mount", and "taskset"...)
> 
> I have implemented ifconfig, mount etc in Lua (the APIs, not the
> commands), see https://github.com/justincormack/ljsyscall - its pretty
> comprehensive now.

While nice, this is another library that's not included in the base lua  
package. A library to implement raw system call bindings, which  
implements support independently for each architecture. A glance at the  
code implies that installing it builds C code somewhere, but after  
finding out that "buildrump.sh" is the name of a subdirectory I stopped  
trying to find where.

The appeal of lua to me was that I _didn't_ have to cross compile C  
stuff, but could instead use a scripting langauge that should just work  
on strange architectures it had never seen before, without cross  
compiling additional packages or installing a native toolchain. (A  
scripting language doesn't even need a build step.)

This library is autogenerating a MK file and probing for CFLAGS. Plus  
raw system calls sans libc wrapping vary slightly between architectures  
anyway, so what this is _trying_ to do wouldn't give me the portability  
I wanted.

Back when I was poking at lua I came to the conclusion I could extend  
lua with C myself, or I could just write my program in C, which is what  
I did.

Rob

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Squirrel - no-bloat scripting language with sane syntax and semantics
  2013-08-26 22:18     ` Rob Landley
@ 2013-08-26 23:59       ` Rich Felker
  2013-08-27  0:35         ` Rob Landley
  0 siblings, 1 reply; 14+ messages in thread
From: Rich Felker @ 2013-08-26 23:59 UTC (permalink / raw)
  To: musl; +Cc: Justin Cormack

On Mon, Aug 26, 2013 at 05:18:43PM -0500, Rob Landley wrote:
> On 08/25/2013 10:03:33 AM, Justin Cormack wrote:
> >On Sun, Aug 25, 2013 at 10:34 AM, Rob Landley <rob@landley.net> wrote:
> >> Normally people use lua for this, which has around 100k of
> >interpreter.
> >>
> >> The downside of lua is it doesn't have a full standard posix C
> >binding
> >> library. (It has a nonstandard one you can add on, but when I
> >looked at
> >> writing a busybox clone in it, I needed to install something
> >like 7 packages
> >> to get all the libraries I needed. Then again, most people aren't
> >> implementing their own "ifconfig", "mount", and "taskset"...)
> >
> >I have implemented ifconfig, mount etc in Lua (the APIs, not the
> >commands), see https://github.com/justincormack/ljsyscall - its pretty
> >comprehensive now.
> 
> While nice, this is another library that's not included in the base
> lua package. A library to implement raw system call bindings, which

The whole point of lua is to be an embeddable language, the key
prerequisite for which is that it does not give the embedded script
access to the host application or system. From a security standpoint,
the way lua does it (nothing available by default; application must
provide anything it wants to provide) is the only way that's even
tolerable. I agree this makes lua less convenient for many purposes,
but it makes it basically the only choice for its original advertised
purpose.

Rich


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Squirrel - no-bloat scripting language with sane syntax and semantics
  2013-08-26 23:59       ` Rich Felker
@ 2013-08-27  0:35         ` Rob Landley
  0 siblings, 0 replies; 14+ messages in thread
From: Rob Landley @ 2013-08-27  0:35 UTC (permalink / raw)
  To: musl; +Cc: musl, Justin Cormack

On 08/26/2013 06:59:12 PM, Rich Felker wrote:
> On Mon, Aug 26, 2013 at 05:18:43PM -0500, Rob Landley wrote:
> > On 08/25/2013 10:03:33 AM, Justin Cormack wrote:
> > >On Sun, Aug 25, 2013 at 10:34 AM, Rob Landley <rob@landley.net>  
> wrote:
> > >> Normally people use lua for this, which has around 100k of
> > >interpreter.
> > >>
> > >> The downside of lua is it doesn't have a full standard posix C
> > >binding
> > >> library. (It has a nonstandard one you can add on, but when I
> > >looked at
> > >> writing a busybox clone in it, I needed to install something
> > >like 7 packages
> > >> to get all the libraries I needed. Then again, most people aren't
> > >> implementing their own "ifconfig", "mount", and "taskset"...)
> > >
> > >I have implemented ifconfig, mount etc in Lua (the APIs, not the
> > >commands), see https://github.com/justincormack/ljsyscall - its  
> pretty
> > >comprehensive now.
> >
> > While nice, this is another library that's not included in the base
> > lua package. A library to implement raw system call bindings, which
> 
> The whole point of lua is to be an embeddable language, the key
> prerequisite for which is that it does not give the embedded script
> access to the host application or system. From a security standpoint,
> the way lua does it (nothing available by default; application must
> provide anything it wants to provide) is the only way that's even
> tolerable. I agree this makes lua less convenient for many purposes,
> but it makes it basically the only choice for its original advertised
> purpose.

I agree it's good at what it does. But I was looking for a clean  
lightweight general purpose scripting language, which it could have  
been but chose not to be.

Rob

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Squirrel - no-bloat scripting language with sane syntax and semantics
  2013-08-25 20:00   ` Matias A. Fonzo
  2013-08-25 20:10     ` Rich Felker
@ 2013-08-31 18:39     ` Daniel Cegiełka
  2013-09-01 22:43       ` Matias A. Fonzo
  1 sibling, 1 reply; 14+ messages in thread
From: Daniel Cegiełka @ 2013-08-31 18:39 UTC (permalink / raw)
  To: musl

2013/8/25 Matias A. Fonzo <selk@dragora.org>:

>
> I see only one GNU project which I've added, GNU moe - an alternative
> text editor for GNU nano, Joe, and perhaps others. Is this a problem?.
>

Matias,
Why you recommend moe editor on wiki? moe is written in c++ and
statically linked likely will be bigger than nano. Window splitting ok
but nano has support for syntax highlighting.

Daniel


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Squirrel - no-bloat scripting language with sane syntax and semantics
  2013-08-31 18:39     ` Daniel Cegiełka
@ 2013-09-01 22:43       ` Matias A. Fonzo
  0 siblings, 0 replies; 14+ messages in thread
From: Matias A. Fonzo @ 2013-09-01 22:43 UTC (permalink / raw)
  To: daniel.cegielka; +Cc: musl

Dear Daniel,

El Sat, 31 Aug 2013 20:39:15 +0200
Daniel Cegiełka <daniel.cegielka@gmail.com> escribió:
> 2013/8/25 Matias A. Fonzo <selk@dragora.org>:
> 
> >
> > I see only one GNU project which I've added, GNU moe - an
> > alternative text editor for GNU nano, Joe, and perhaps others. Is
> > this a problem?.
> >
> 
> Matias,
> Why you recommend moe editor on wiki? moe is written in c++ and
> statically linked likely will be bigger than nano. Window splitting ok
> but nano has support for syntax highlighting.
> 

I was an user of pico and much later of nano (now GNU nano). One of the
main reasons why I decided to use and recommend "moe" instead of "nano"
is that something basic like the redo and the undo results in
experimental code[1][2].

From the nano ChangeLog:

"2009-07-11 Chris Allegretta <chrisa@asty.org>
	* nano-regress: Small tweaks
	* Change undo code to off unless unabled via a command line
option (-u/--undo).  Until this code
	  stabilizes this is the only responsible way to treat it."

[1]http://svn.savannah.gnu.org/viewvc/trunk/nano/ChangeLog?revision=4580&root=nano&view=markup


"2009.07.28 - GNU nano 2.1.10 "Ellie" is released.  This version
includes various fixes for portability including some older HP-UX
		compiler combos, various compiler warnings, and some
crash fixes in the undo code.  On the topic of the latter item,
		the undo code is now marked as experimental since it can
		cause severe stability and memory issues, and thus now
		requires a flag (-u, --undo) in order to enable it.
		Please feel free to continue to test the undo code and
		thanks again for using nano for your text editing needs.
		Go team Nano!"

[2]http://svn.savannah.gnu.org/viewvc/trunk/nano/NEWS?revision=4398&root=nano&view=markup

It is true that "moe" does not have many features. And I see this lack
of features as an advantage, for example I like the fact that moe does
not have SIGWINCH (which imply more code) ...


Take care,
Matias



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-09-01 22:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-23 21:11 Squirrel - no-bloat scripting language with sane syntax and semantics Paul Sokolovsky
2013-08-24  8:29 ` Luca Barbato
2013-08-24 11:29   ` Paul Sokolovsky
2013-08-25  9:34 ` Rob Landley
2013-08-25 15:03   ` Justin Cormack
2013-08-26 22:18     ` Rob Landley
2013-08-26 23:59       ` Rich Felker
2013-08-27  0:35         ` Rob Landley
2013-08-25 15:18   ` Ivan Kanakarakis
2013-08-25 19:40   ` Paul Sokolovsky
2013-08-25 20:00   ` Matias A. Fonzo
2013-08-25 20:10     ` Rich Felker
2013-08-31 18:39     ` Daniel Cegiełka
2013-09-01 22:43       ` Matias A. Fonzo

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).