yosbelms / ramdascript Goto Github PK
View Code? Open in Web Editor NEW:ram: Lisp that compiles to JavaScript in the Ramda way
Home Page: https://yosbelms.github.io/ramdascript/
License: MIT License
:ram: Lisp that compiles to JavaScript in the Ramda way
Home Page: https://yosbelms.github.io/ramdascript/
License: MIT License
Hi, ramdascript looks awesome.
I was curious what the correct export
form?
Input:
(def x (fn []
(console.log 'hi')))
(export x)
Expected:
var x = function () {
return console.log('hi');
}
export default x;
Actual:
var x = function () {
return console.log('hi');
It would be nice if there is a keyword for
(def hello fn [] "Hello")
like in clojure
(defn hello [] "hello")
I apologize in advance that this is not an actual issue, but more of a conversation if you are willing to entertain/have the bandwidth. I am curious about your thoughts on how one might approach adding Future (https://github.com/fluture-js/Fluture), Promise, and/or async/await support to the core language. To the novice lisper/ramdascripter, it seems like a few items might be addressed/thought through first:
If going the Future route and you added Fluture functions to the core ramdascript language, like fork
(https://github.com/fluture-js/Fluture#fork), you could then do it fairly easily in ramdascript right? Something akin to:
pipe(
map(futureProducingFunction),
parallel(1),
fork(console.error, console.log)
)([
'https://example.com/api0',
'https://example.com/api1',
'https://example.com/api2'
]);
When I tried to compile Ramdascript to javascript with the following command:
ram compile -src server/server.ram -format none
It compiled without error however when trying to run the file it throws an error that R is not defined. This is due to the fact that the compiled file never imports the ramda library. A workaround for now is to manually add the line 'R = require('ramda') at the top of each compiled file but it's not ideal.
I think it would be useful for anyone that wants to look at this code and play with it for you to add a license file. Ramda.js itself is under the MIT License https://github.com/ramda/ramda/blob/master/LICENSE.txt so that's an option to consider - but it's your choice, of course.
Perhaps there is a way to accomplish this already that I am not seeing?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.