[ANN] Fengari 0.1.0 Released

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] Fengari 0.1.0 Released

Daurnimator
Hi All,

After much work, I've finally tagged the first release of Fengari.
Fengari 0.1.0 is now available for download from github and npm.

What is Fengari?
It's the Lua VM ported to JavaScript, but reusing JavaScript's garbage
collector.

Why should you care?
  - With fengari-web you can start using Lua to write front-end code
for websites instead of Javascript
  - Calling between Lua and Javascript is easy! Mix Lua and Javascript code
  - You can take advantage of the whole JavaScript ecosystem, including:
      - Mobile app development toolkits
      - Electron applications
      - Game engines scriptable in JS
  - You can create new lua_States client side for running sandboxed user code
    Include working code samples in your Lua docs/tutorials!

More info can be found on the project website: https://fengari.io/
The website also has a REPL right there on the page, give it a go :)

Regards,
Daurn

Reply | Threaded
Open this post in threaded view
|

Fengari 0.1.0 Released (thanks)

Αγαθοκλής
Subject: [was] First class arrays (implementation & benchmarks) (thanks)

(toppost mode: (though (for my own good) it might be wiser to hide the
following far, far away), but its true, so, better now than later):

(we have a saying here: "from a young or a crazy you are learning the
trueth", but they don't say nothing about, when both conditions are
true (young as a novice here)).

Okey, that was it (it wasn't that hard, wasit?).

Now (warning mode) this is (about the length|lengthy).

On Tue, Mar 27, at 09:46 Agathoklis D.E Chatzimanikas wrote:
>
> On Tue, Mar 27, at 07:38 Petri Häkkinen wrote:
>
> > Is no-one else interested in O(1) implementation for the # operator,
> > native (faster than tables) array implementation and how it can be used
> > to solve the hole issue and issues with pack/unpack?
> >
> > I think an array type is the right way to go for Lua, considering it solves
> > many issues and also gives a nice perf boost.

> It will be implemented of course. The time has come.
  ~~It will be implemented of course.~~ (scratch this)

I too much trust Dibyendu on this.

On Tue, Mar 27, at 10:02 Dibyendu Majumdar wrote:

> I think hoping for an array subtype in Lua is probably going to
> result in disappointment. The table as the sole data structure is a
> defining feature of Lua; not only that, the semantics associated with
> table iteration and nils, makes it impossible to introduce such a
> subtype without break compatibility with existing programs. Combining
> an array type with a singleton 'undefined' value may be an option, but
> didn't Roberto say in one of his posts:
>
> > Once 'empty' and 'undef' are values, you break all those properties.
>
> > I think we cannot use a value to represent the absence of a value, no
> > matter how many no-value values we add. It is a contradiction. Several
> > languages followed this path, always with bad results.
>
> So it seems that the idea of a singleton 'undefined' value is also not
> acceptable.
>
> Of course we could see a new Lua language definition in 6.0 that makes
> a clean break from 5.x as Hisham suggested. But if I were asked to bet
> on it I would probably say that an array subtype will not happen.

Disappointment is a terrible terrible feeling, noone should get this.

But this comes mostly when we are cultivate expectations; if we stop
doing that, at both ends, then we are probably set.

(quite a lot of this (i say this by feeling and not with any kind of
logic), is happening because first: noone till now provided the golden
solution and quite probably Roberto feels a lot of preasure to fix this,
but how?)

> But if I were asked to bet on it I would probably say that an array
> subtype will not happen.

Loosing a bet is again a terrible terrible thing. However:

On Wed, Mar 14, at 03:24 Roberto Ierusalimschy wrote:
> Once 'empty' and 'undef' are values, you break all those properties.
>
> I think we cannot use a value to represent the absence of a value, no
> matter how many no-value values we add. It is a contradiction. Several
> languages followed this path, always with bad results.

(kindergarden here!!! ((slightly evil grin) (about the "always with
bad results") (i do not like this always, is not fair (its an absolutism))))

(ok here is my understanding (please correct))

array[0] guarantee the object location in memory, Okey? so,

0 -> sizeof (obj) 1 element
  -> sizeof (obj) 2 elements
  ...

and iterates over the sequense until it get a signal that it will mean
END (like):

str[idx] = '\0';

doesn't guarantee the end of a C string (or array of char objects) and
therefore its length, counting from zero -> idx - 1 ?

I can not still understand why for Lua is so difficult to define that end
as everybody else do (slightly evil grin)?

Or why is so difficult to express the following:

one of my elements doesn't __yet__ has a usefull value, but I do want to
be part of the length (do not throw it out (yet) of the table)
(unless this is possible today, as i said i don't write in Lua)
If it's possibly, forgive me.



[...]
(ok, this was used to be quuuuite real lengthy (but the last second before
i send, i regreted it).

(a long story short) The time has come.

After (10 days) that i got involved, with this rude way, its time to
leave Lua and Sun, moon and ravi and to goto back to the earth and to
the cave:).

earth:

https://github.com/agathoklisx/

(here is my code (shameless plug))

cave: some goats, some plants, some kids (4), some friends (many many),
some enemies (oh no enemies, everyone is dead :) (kidding (extreme jokes
like those ones from that guy (col field or something) (from the catcher
in the rye)))

But before to go back to my cave.

I have to ask sorry from Roberto, but i had to do my duty as a human
being, that is that we can not turn our ash away from the unjustification
(as that's what i believe was happened when he treated you (as a matter
of speech) like 12 years old kids; when shouting at you and without asking
a single sorry)
(Kudos to Sean about his expression to go against the waves).

so i became rude.

(one last thing) because i have to get it out of me (because its painfull)

I know that Paige Depol lives somewhere in France, and I think
that also Pierre and Etiene might live there, so it might be possibly wise, that
it might be able to make a try, to find her, and to say to her, that some of
the lua community thought (for a second) that you are the right guy to lead
the programming section in a project which could be described with the following
sentence (though practical impossible)

A Unified Lua that will Unite the Poor Programming Languages Universe
and delibarate humans from the fear of Programming and that will provide
               FREEDOM TO SELF EXPRESSIONISM
with a Decent  And       **__PROUD__**    Way full of Logic and shameless emotions.

But this is not i wanted to say.

To Dirk:

Dirk, you are the only one that will understand, (remember about a question in
Greek Diacritics (right?)))

three days ago (before that letter) and when i was going down to the spring to
get water... happened something reeeeeaaaaal strange. Suddenly and without an
apparent reason I started to cry, and i felt like talking to each other (i know
that might be from the drugs, but it was so scary real):

we said something like:
 - i know (at least twise) and
 - i had to and|or i can not do
 - i wish to be|was [t]here

(it was my fantasy? (quite possible))

(they weren't sorrow tears, but exact the opossite)

Thanks.
  Αγαθοκλής

p.s., (please cc me (for anything consern the above) as i intent to leave
this forum (as punishment for being obvious rude) in 10 days or something.

  goto end ();

> Regards
> Dibyendu

end:

Best and Happy Eastern Time to Everybory.

To the Thessaly tribe to who i devote my fucking life.

p.s.,
you know Daurni you are my favorite Lua coder (what a situation!)

Reply | Threaded
Open this post in threaded view
|

Re: Fengari 0.1.0 Released (thanks)

Αγαθοκλής
>
> To Dirk:
>
> we said something like:
with the we (i meant pigi) (sorry i need some sleep)

Have a good night.
Bye.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Fengari 0.1.0 Released

dyngeccetor8
In reply to this post by Daurnimator
On 03/31/2018 07:53 PM, Daurnimator wrote:
> After much work, I've finally tagged the first release of Fengari.
> Fengari 0.1.0 is now available for download from github and npm.
>
> What is Fengari?
> It's the Lua VM ported to JavaScript, but reusing JavaScript's garbage
> collector.

By the way, I wish to say it's awesome project!

Author(s) reimplemented Lua in JS. I was able to execute my "Lua code
formatter" in browser without ANY changes. (~10 KLOC in ~400 files.)

There was some hassle to compile Fengari to one JS file, so I was need
to install "npm" and run all that stuff. Hope in current release there
is just one JavaScript file, no need to build it.

-- Martin


0x48ECD18F.asc (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Fengari 0.1.0 Released

Russell Haley
In reply to this post by Daurnimator


On Sat, Mar 31, 2018 at 9:53 AM, Daurnimator <[hidden email]> wrote:
Hi All,

After much work, I've finally tagged the first release of Fengari.
Fengari 0.1.0 is now available for download from github and npm.

What is Fengari?
It's the Lua VM ported to JavaScript, but reusing JavaScript's garbage
collector.

Why should you care?
  - With fengari-web you can start using Lua to write front-end code
for websites instead of Javascript
  - Calling between Lua and Javascript is easy! Mix Lua and Javascript code
  - You can take advantage of the whole JavaScript ecosystem, including:
      - Mobile app development toolkits
      - Electron applications
      - Game engines scriptable in JS
  - You can create new lua_States client side for running sandboxed user code
    Include working code samples in your Lua docs/tutorials!

More info can be found on the project website: https://fengari.io/
The website also has a REPL right there on the page, give it a go :)

So I just put fengari-web.js in my javascript folder and start coding webpages in lua? I've got a hosted site from some  no-name domain registar and I have no idea what the webserver is.

Russ

Regards,
Daurn


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Fengari 0.1.0 Released

Daurnimator
In reply to this post by dyngeccetor8
On 1 April 2018 at 05:41, dyngeccetor8 <[hidden email]> wrote:

> On 03/31/2018 07:53 PM, Daurnimator wrote:
>> After much work, I've finally tagged the first release of Fengari.
>> Fengari 0.1.0 is now available for download from github and npm.
>>
>> What is Fengari?
>> It's the Lua VM ported to JavaScript, but reusing JavaScript's garbage
>> collector.
>
> By the way, I wish to say it's awesome project!
>
> Author(s) reimplemented Lua in JS. I was able to execute my "Lua code
> formatter" in browser without ANY changes. (~10 KLOC in ~400 files.)

That's great! :)

> There was some hassle to compile Fengari to one JS file, so I was need
> to install "npm" and run all that stuff. Hope in current release there
> is just one JavaScript file, no need to build it.

The fengari-web release includes a pre-bundled compiled output
(dist/fengari-web.bundled.js) which should be automatically picked up
by most JavaScript tooling.

For use with webpack see fengari-loader
https://github.com/fengari-lua/fengari-loader/ which lets you simple
require lua files from JS!
I haven't tagged a release of it yet, but should be coming soon.

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Fengari 0.1.0 Released

Daurnimator
In reply to this post by Russell Haley
On 1 April 2018 at 16:05, Russell Haley <[hidden email]> wrote:
> So I just put fengari-web.js in my javascript folder and start coding
> webpages in lua? I've got a hosted site from some  no-name domain registar
> and I have no idea what the webserver is.

Yes you can.
Just include fengari-web.js in a script tag and start writing lua code
in your html files!