lemon-lang / lemon Goto Github PK
View Code? Open in Web Editor NEWLemon is open source, embeddable, lightweight programming language http://www.lemon-lang.org
License: MIT License
Lemon is open source, embeddable, lightweight programming language http://www.lemon-lang.org
License: MIT License
What kind of memory management it uses?
Termux don't have gcc.The only available c/cpp compiler is clang.
Current Makefile will generate an error that "couldn't find gcc-ar".
Thanks!
Could this be possible? I've noticed that lemon depends on Linux specific libraries like select.h
. Please keep in mind that all of us aren't running on the same OS as you.
The size arguments of the following snprintf calls are derived from their return values, which may exceed the size of the buffer and overflow.
The return value of a call to snprintf is the number of characters that would have been written to the buffer assuming there was sufficient space. In the event that the operation reaches the end of the buffer and more than one character is discarded, the return value will be greater than the buffer size. This can cause incorrect behavior.
In line 312
of larray.c
:
length = snprintf(buffer + offset,
maxlen - offset,
fmt,
lstring_to_cstr(lemon, string));
and
In line 357
of ltable.c
:
length = snprintf(buffer + offset,
maxlen - offset,
fmt,
lstring_to_cstr(lemon, key),
lstring_to_cstr(lemon, value));
the var here adds nothing:
def hello(var name) {
All I can find is two files with less than 10 lines each.
var a = [1,2,3];
a.push(4);
Uncaught Exception: <AttributeError('[1, 2, 3]' has no attribute 'push')>
at <module 'main'>
Does the language support file io ?
network library support ?
Possible to compile and run on linux?
Hello! I would like to say i discovered this language few days ago and instantly became a fan of it because it's easy to embed and not hard to learn.
I wanted to shout out here that i'm making a .NET binding for it because C# is my main language and i'd like to use this from time to time in some projects there.
https://github.com/cartman300/lemonade
The main repository is added as a submodule and compiles in visual studio just fine with some external supporting headers and without modifying the source code. ๐
Also a side question, would it be possible to add a function similar to lemon_machine_execute
and lemon_machine_execute_loop
which only steps trough N machine instructions and returns back to the caller? I see this being useful when embedding the language into a video game update loop, it would prevent stuff like while (true) { }
from hanging the game.
In line 2310
of compiler.c
:
strcpy(init_name, module_name);
This 'call to strcpy' with input from call to getenv may overflow the destination.
Looks like Lemon is close to JS so why not to make it as a subset of JS?
I want to translate lemon code to c code.
How can i generate c code from lemon code?
Hey @zhicheng!
When will the documents be ready?
In /lib/os.c:
Line 2310 in b1bb8a6
The source size exceeds the destination size by one byte, which can possibly result in a bug.
hey
please delete or rename
i literally built my whole personality around a language called lemon-lang and you are breaking my heart
https://github.com/imagine-hussain/lemonlang
It is based off my best friend luke-fisk-lennon who's brother died of cancer so we want to write a language in his honour :(
pls bro i beg u bro pls i am litarlly crying rn pls change name
In line 2300
of compiler.c
:
handle = dlopen(module_path, RTLD_NOW);
Using externally controlled strings in a process operation can allow an attacker to execute malicious commands.
First of all, great job; I love your coding style, it's super clean.
If I may, I would like to ask a couple of questions:
That's it for now.
Keep up the good work ๐
@zhicheng Take a look at src/lexer.c line 97.
What's that supposed to do? If it's checking for an octal, that code block should have been in line 94, correct?
In https://github.com/lemon-lang/lemon/blob/master/src/ltype.c#L34, you forgot to use cast(self)
that you have defined 4 lines above and typecast-ed self
the traditional way.
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.