alexapostolu / night Goto Github PK
View Code? Open in Web Editor NEWA bytecode interpreted language
Home Page: https://alexapostolu.github.io/night-web
License: Apache License 2.0
A bytecode interpreted language
Home Page: https://alexapostolu.github.io/night-web
License: Apache License 2.0
It's just some things remain a mystery, especially for those that just stumble upon this. For example, I, still don't know whether I could make void function in Night.
You say in the docs that there is some support for loops, arrays and assignment operators (is that what they're called?) which the readme says there isn't. Also, the readme has an error. In the if-else if-else bit I think there is meant to be "\n" at the end of the print statements.
I mean, like 65-80% of language have those, so... why not?
But no pressure
Hello, I've been visiting the Night documentation page and I've noticed that there's no favicon icon and meta tags for the website. I strongly suggest putting a favicon icon and meta tags for the documentation site to increase the SEO of the page. I would like to be assigned for this issue :)
Hiya!
I found this Repl that allowed Replit Users to use (pretty much any lang that had a release) custom langs. However, the current release seems (very) outdated, and I would like to ask if any of the devs could make a new release that includes all the current code? That way, we can access the current version on Replit (I'm testing with it to test my own lang as well :P). Thanks!
So just to clarify, the question was if you could release a release that holds all the current code :)
Lexer::
replace_escape_chars` implementation should be changed from hash map to switch as it is faster
if the language is called night, and opposites attract, and chrome(the material) is the opposite color of night(black), why is this not supported for chromebooks?
In the website there is a tab Source build
and yet the HTML is empty.
You also appear to have a PE bin in the root, indicating a Windows build.
Do you plan to use Autoconf and Make?
Hi guys. @firefish111 @CodeLongAndProsper90
Should we set up some CI? Never done it before so it should be interesting, and it should help with futures PRs
Could there be Linux binary releases?
Found this on line 46 of the lexer.cpp:
if (i < code_line.length() - 1 && code_line[i] == '\\' && code_line[i] == '"')
but then, shouldn't it always evaluate as false? Since '\\' != '"'
I followed the tutorial on the GH Pages and installed with Replit. It still doesn't recognize the command night
, and I cannot run any files. Any advice?
Note: this probably has to do with debian based distros using gcc 9.3.0 instead of the newer gcc 11.1.0
I was thinking on calling it twilight or dusk, which do you think?
Also for the package manager should I go for a normal C program piggybacking on libcurl or a node.js script for getting data from the cdn?
Is there anyway I could invoke syscalls within Night?
I think this would best suited for a library since syscalls are a Unix/Linux only feature.
It might be possible with a foreign function interface.
I was trying to make a 99 bottles of beer program for Rosetta Code. I used a recursive function but it gave me a segmentation fault.
This was my code:
null bottles(int x) {
if(x == 1) {
print("1 bottle of beer on the wall,\n");
print("1 bottle of beer,\n");
print("Take it down, pass it around,\n");
print("No more bottles of beer.\n");
}
else {
print(x);
print(" bottles of beer on the wall,\n");
print(x);
print(" bottles of beer,\n");
print("Take one down, pass it around,\n");
print(x - 1);
print(" bottles of beer on the wall,");
bottles(x-1);
}
}
bottles(99);
When I get rid of the recursive call, there is no segmentation fault, but nothing is printed (Neither the if statement or the else statement are working). I know you are working on arrays now so you can leave this until v3.0 or later if you want. In the mean time I will just replace it with a loop.
some users cannot compile the language due to a package that is not supported or is hard to get... CMake or things like it.
And otherusers just don't know how - because you did not have instructions on how to compile or they don't have permissions (like me :( ) or they could just be getting started programming (it is like downloading discord and they tell you that you have to set it up on your own by playing around with electron for hours with no instructions). What i am suggesting is we have the full compiled version in the releases for every major OS (windows (.exe), macos (.app) and linux (elf)) but the source code as well for advanced users.
Continuing with making users set it up on their own might deter them from getting it in the first place.
you do not have to accept this idea.
Should I rename this to "night" with a lowercase "n"? @firefish111
Rosetta Code is a website with many different problems that are trying to be solved in as many different programming languages as possible. Anybody can add a solution to one of the problems in a new programming language. Perhaps you (or I can try if you want) could add Night to popularise it?
JDOG and I are wondering if your website is on github, if so, can we make some PRs?
Thanks,
HahaYes
The CI using Travis isn't working. I'm trying to use cmake
to generate a .elf
file for Linux.
Except if that's what was meant by "unstable build"
Then i suggest to close this issue and says so in readme.
pls
Hi, I wanted to know how does this language differ to other low level languages such as Rust?
I'm trying to compile night, but I get errors using g++, clang++, and make.
g++ error:
In file included from src/../include/night.hpp:3:0,
from src/night.cpp:1:
src/../include/token.hpp:203:7: error: ‘variant’ in namespace std’ does not name a template type
std::variant<
^~~~~~~
exit status 1
clang++ error:
In file included from src/night.cpp:1:
In file included from src/../include/night.hpp:3:
src/../include/token.hpp:203:7: error: no template named 'variant' in namespace
'std'
std::variant<
~~~~~^
1 error generated.
exit status 1
make error:
Makefile:4: recipe for target 'build' failed
make: *** [build] Error 1
exit status 2
example:
print("AAAA\n")
once runned, it doesn't do anything, no error message, no result
You could just write a grammar for yacc...
EXAMPLE:
read the title stupid
I would like to ask a question. Why doesn't the code run?
if(1 < 2) {
}
And why the definitions of greater than sign, less than sign, greater than or equal sign, less than or equal sign are different, as follows:
{ '>', { { '=', TokenType::ASSIGN }, { '\0', TokenType::BINARY_OP } } },
{ '<', { { '=', TokenType::ASSIGN }, { '\0', TokenType::BINARY_OP } } },
I'm trying to learn to read projects, so there are some places lol
This language looks quite similar to C++, but I'm curious if you have any goals for it, that would help someone decide why to write in Night instead of C++?
Seriously please... can i do like an IDE for it or something?
For the PKGBUILD, a new release is needed so that the tarball can be fetched, and the repo contains a bugfix allowing code to run, so, perhaps create a v3.0.1 bugfix release. Thanks!
When in a function and I try to print something including \n
it prints \n
instead of a newline. Also, a character whose value is ' '
, '\n'
or '\0'
(perhaps others as well) it disappears. Code: print("Hello world" + '\n');
Result:
Error - expression is invalid
"Hello world" +
~
expected value after operator '+'
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.