Comments (6)
I'd like to help with the simpler parts of this :-) What about a phased implementation plan like this:
- add a
bin/lfescript
bash/shell script that conveniently wrapserl ...
and compiles passed modules to~/.lfe/script-ebin
, then - replace the bash script with an erlang script that provides the same functionality/command line options that
escript
does, and finally - 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.
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.
> 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.
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.
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.
I have now pushed the first version of lfescript, it even has some documentation. Please test and comment.
from lfe.
Related Issues (20)
- Add make targets for testing HOT 1
- README: Run tests with Makefile HOT 3
- Improve workflow for publishing LFE to hex.pm
- Odd recursion bug with rebar3_lfe as a plugin dep HOT 1
- v2.1.1 tagged but not marked as latest HOT 5
- lc/2 not defined HOT 8
- ets-ms is attempting to match 'undefined' when using match-record with unspecified slots HOT 5
- Error expanding (seemingly valid) qlc macro HOT 12
- Extend documentation for patterns HOT 2
- CI/CD no longer runs on older builds HOT 4
- Type definitions and specifications do not accept empty list syntax HOT 1
- Issues with LFE and Erlang 26.0 (user:start) HOT 5
- Make banner functions public for re-use in rebar3_lfe
- Consider using Erlang's shell:start_interactive for 26+ HOT 1
- Explore the possibility of making the LFE REPL developer experience more configurable HOT 2
- module-alias is ignored for macros HOT 1
- Pattern matching on nested literals with underscore. HOT 3
- Test Failures with rebar3 3.23.0 HOT 3
- (Mix) Could not compile dependency :lfe - Elixir 1.15.7 OTP 26 HOT 2
- Compiler produces non-deterministic builds HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lfe.