condorlang / condor Goto Github PK
View Code? Open in Web Editor NEWA fast, simple, and intelligent new programming language
License: BSD 3-Clause "New" or "Revised" License
A fast, simple, and intelligent new programming language
License: BSD 3-Clause "New" or "Revised" License
When running the following code:
import "println" from "console"
int ten1 = 10;
float tenf = 10.1;
double tend = 10.1;
long tenl = 10.1;
println(ten1 + 10);
println(tenf + 10);
println(tend + 10);
println(tenl + 10);
The following output occurs:
20
20.100000000000001
10
20.100000000000001
A 1
exists at the end. I've isolated where it exactly occurs, but I haven't been able to find out why.
No errors and some eventual log outputed onto the terminal
g++ -I ./ test/shell.cc -Iinclude build/libcondor.a -o build/linux/condor
test/shell.cc: In function ‘int main(int, const char**)’:
test/shell.cc:24:35: error: ‘to_string’ is not a member of ‘std’
std::cout << "CondorLang (C) " + std::to_string(year) + "\n";
^
test/shell.cc:32:16: error: no matching function for call to ‘Condor::Script::Free()’
script->Free();
^
In file included from test/shell.cc:6:0:
include/Condor.h:60:8: note: candidate: void Condor::Script::Free(Condor::Isolate*)
void Free(Isolate* isolate);
^
include/Condor.h:60:8: note: candidate expects 1 argument, 0 provided
Makefile:108: recipe for target 'shell' failed
make: *** [shell] Error 1
git clone https://github.com/CondorLang/Condor/
cd Condor
make all
make || make mt
make shell
I was trying to set up the CondorLang dev environment (to use/test/improve it) on Linux Ubuntu 16.04 LTS (64-bit) and I run into this problem.
Create a debugger for CondorLang. Possibly similar to gdb.
import "println" from "console"
import "string"
println("asd");
println(strlen("asd"));
Just prints the second one.
The following code does not increase memory:
for (int i = 0; i < 100; i++) var a = 10;
The memory is under control, meaning, the garbage collector is cleaning this properly. However, when I run the following code:
for (int i = 0; i < 100; i++) var a = 10 + 10;
The memory nearly doubles. The garbage collection is not occurring here.
Here is a starting place
To replicate the issue:
The GC is not working properly when there is recursion. See the Code
import "println" from "console"
func fib(int n){
println("-> " + n);
if (n == 0) return 0;
else if (n == 1) return 1;
else return fib(n - 1) + fib(n - 2);
}
int val = fib(2);
println(val);
When running the following code:
object Fruit{
private string name;
func Fruit(string name){
this.name = name;
}
func getName() return this.name;
}
Fruit apple = new Fruit("Apple");
The program crashes. Potential error may occur with the constructor parameters.
Known location: https://github.com/CondorLang/Condor/blob/master/src/condor/execute/execute.cc#L122
Hi,
I saw your post on Quora: https://www.quora.com/How-can-I-find-people-to-contribute-to-my-open-source-Github-project/draft
I'm the one who said: "
Post in Open Source (and eventually on CompSci/Soft Eng) groups/communities to get people to eventually contribute.
There's a quite a lot of those on social networks like G+ and FB so don't be afraid to join them.
"
I went through the repo and I'm wondering if it's an extension to C# or it's an actual language where we could add stuff from JS for instance ?
I'm asking this because I'm quite noobish in VB/C#/C++ but I noticed a lot of JS-like snippets which I think could be improved.
Maybe we can generate java bytecode with your language.
I got this after running make mem
valgrind --tool=memcheck --leak-check=full --track-origins=yes --dsymutil=yes ./build/Cobra > log.txt 2>&1
Makefile:57: recipe for target 'mem' failed
make: *** [mem] Error 127
Not having this:
2154
*** Error in `./build/Cobra': double free or corruption (!prev): 0x0000000000e56970 ***
Makefile:49: recipe for target 'test' failed
make[1]: *** [test] Aborted (core dumped)
make[1]: Leaving directory '/home/maxie/Desktop/Languages/CobraLang'
Makefile:10: recipe for target 'mt' failed
make: *** [mt] Error 2
Whenever I run: make || make mt
or even both apart I get this twice (so once for make and once for make mt):
make all
make[1]: Entering directory '/home/maxie/Desktop/Languages/CobraLang'
make buildAll
make[2]: Entering directory '/home/maxie/Desktop/Languages/CobraLang'
make[2]: Nothing to be done for 'buildAll'.
make[2]: Leaving directory '/home/maxie/Desktop/Languages/CobraLang'
make lib
make[2]: Entering directory '/home/maxie/Desktop/Languages/CobraLang'
make[2]: Leaving directory '/home/maxie/Desktop/Languages/CobraLang'
make[1]: Leaving directory '/home/maxie/Desktop/Languages/CobraLang'
make test
make[1]: Entering directory '/home/maxie/Desktop/Languages/CobraLang'
g++ -I ./ test/main.cc -Iinclude build/libcobra.a -o build/Cobra
./build/Cobra
2154
*** Error in `./build/Cobra': double free or corruption (!prev): 0x0000000000e56970 ***
Makefile:49: recipe for target 'test' failed
make[1]: *** [test] Aborted (core dumped)
make[1]: Leaving directory '/home/maxie/Desktop/Languages/CobraLang'
Makefile:10: recipe for target 'mt' failed
make: *** [mt] Error 2
2154
*** Error in `./build/Cobra': double free or corruption (!prev): 0x0000000000e56970 ***
Makefile:49: recipe for target 'test' failed
make[1]: *** [test] Aborted (core dumped)
make[1]: Leaving directory '/home/maxie/Desktop/Languages/CobraLang'
Makefile:10: recipe for target 'mt' failed
make: *** [mt] Error 2
make all
make[1]: Entering directory '/home/maxie/Desktop/Languages/CobraLang'
make buildAll
make[2]: Entering directory '/home/maxie/Desktop/Languages/CobraLang'
make[2]: Nothing to be done for 'buildAll'.
make[2]: Leaving directory '/home/maxie/Desktop/Languages/CobraLang'
make lib
make[2]: Entering directory '/home/maxie/Desktop/Languages/CobraLang'
make[2]: Leaving directory '/home/maxie/Desktop/Languages/CobraLang'
make[1]: Leaving directory '/home/maxie/Desktop/Languages/CobraLang'
make test
make[1]: Entering directory '/home/maxie/Desktop/Languages/CobraLang'
g++ -I ./ test/main.cc -Iinclude build/libcobra.a -o build/Cobra
./build/Cobra
2154
*** Error in `./build/Cobra': double free or corruption (!prev): 0x0000000001638970 ***
Makefile:49: recipe for target 'test' failed
make[1]: *** [test] Aborted (core dumped)
make[1]: Leaving directory '/home/maxie/Desktop/Languages/CobraLang'
Makefile:10: recipe for target 'mt' failed
make: *** [mt] Error 2
make
then make || make mt
When running ./build/condor
, running in shell mode, the usage of the left, up, down, and right arrow does not work. The symbol [^A
or something like that appear.
When we are calling an import or an include inside of a file, the requested file is parsed and compiled each time it's called.
See https://github.com/CondorLang/Condor/blob/master/src/condor/types/script/script.cc#L243
if (isolate->GetContext()->IsIncluded(name)) continue;
Memory test results.
valgrind --tool=memcheck --leak-check=full --track-origins=yes --dsymutil=yes ./build/linux/condor > log.txt 2>&1
Makefile:112: recipe for target 'mem' failed
make: *** [mem] Error 127
git clone https://github.com/CondorLang/Condor/
cd Condor
make all
make || make mt
make shell
sudo apt-get install valgrind
make mem #note: runing sudo apt-get update before gives the same result when running this line
I was trying to set up the CondorLang dev environment (to use/test/improve it) on Linux Ubuntu 16.04 LTS (64-bit) and I run into this problem.
First, congratulations are creating a new language!
Second, the following language has been out for several years and has been called Cobra the entire time: http://cobra-language.com/
It has a wikipedia entry and is referenced on the Python wikipedia page:
https://en.wikipedia.org/wiki/Python_(programming_language)#Languages_influenced_by_Python
It's also been covered by InfoWorld and other places.
I think choosing the same name is inappropriate and potentially confusing. I recommend picking a name that doesn't duplicate existing languages. Here is a list:
http://regulargeek.com/2012/12/08/the-big-list-of-256-programming-languages/
Or you can search google for "foo programming language" for any candidate name "foo"
Best regards,
Charles Esterbrook
Creator of Cobra
The following code does not compile:
1.2 % 1;
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.