Git Product home page Git Product logo

Comments (6)

oubiwann avatar oubiwann commented on July 22, 2024

I'd like to help with the simpler parts of this :-) What about a phased implementation plan like this:

  1. add a bin/lfescript bash/shell script that conveniently wraps erl ... and compiles passed modules to ~/.lfe/script-ebin, then
  2. replace the bash script with an erlang script that provides the same functionality/command line options that escript does, and finally
  3. add functionality in lfe so that one can run lfe scripts with the need to compile files to a directory

The first one I can do now; the second one, I can work on as I get more familiar with scripting in Erlang and with escript itself. For the third, however, I can only cheer from the sidelines :-)

from lfe.

rvirding avatar rvirding commented on July 22, 2024

I was thinking something along the lines of 1 and 2: have a shell script which does some initial setup and then starts erlang running some erlang code which sets up an environment, parses the input file and then interprets it. It could also compile it directly if required. There is no need to save to a file.

But please start and I will continue with the .hrl file conversion.

The only problem with this method is that it won't run on Windows, would need a .bat file or a .exe file.

from lfe.

oubiwann avatar oubiwann commented on July 22, 2024
> I was thinking something along the lines of 1 and 2: have a shell script
> which does some initial setup and then starts erlang running some erlang
> code which sets up an environment, parses the input file and then
> interprets it.

Oh! That's just what I need right now :-) Could I talk you into adding it to ./bin in the develop branch? :-)

> It could also compile it directly if required. There is no need to save to
> a file.

Fantastic!

> The only problem with this method is that it won't run on Windows, would
> need a .bat file or a .exe file.

Well, not to be insensitive, or anything... we could accept a pull request from someone who works on Windows... (I haven't run a Windows machine since the mid-90s...).

Even better, we could open a ticket for Windows support for the script, for interested contributors (i.e., declaring that support is only partial right now).

from lfe.

rvirding avatar rvirding commented on July 22, 2024

It took a while but now I have a first version of lfescript which is heavily based on escript and will provide the same functionality but for LFE. It is not yet ready for public consumption. Soon you will be able to create script like:

#! /usr/bin/env lfescript
;; -*- mode: lfe -*-

(defun main (args)
  (: io prettyprint args))

Macro definitions will of course be allowed.

from lfe.

oubiwann avatar oubiwann commented on July 22, 2024

Oh, wow!

This is fantastic! Thanks for the update :-)

Also, there's about 1 week left before my team finishes its project... I'm
looking forward to being able to hack on LFE again :-)

d

On Mon, Aug 5, 2013 at 6:40 PM, Robert Virding [email protected]:

It took a while but now I have a first version of lfescript which is
heavily based on escript and will provide the same functionality but for
LFE. It is not yet ready for public consumption. Soon you will be able to
create script like:

#! /usr/bin/env lfescript
;; -- mode: lfe --

(defun main (args)
(: io prettyprint args))


Reply to this email directly or view it on GitHubhttps://github.com//issues/32#issuecomment-22153255
.

from lfe.

rvirding avatar rvirding commented on July 22, 2024

I have now pushed the first version of lfescript, it even has some documentation. Please test and comment.

from lfe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.