hexalang / hexa Goto Github PK
View Code? Open in Web Editor NEW:bowtie: Compiler, standard library & backends
Home Page: https://hexalang.github.io
License: GNU Lesser General Public License v3.0
:bowtie: Compiler, standard library & backends
Home Page: https://hexalang.github.io
License: GNU Lesser General Public License v3.0
Hello youse! ๐
This is the beginning of my blog post series about Hexa so let us start from basics!
First of all, Hexa was greatly inspired by JavaScript. It consists of things people enjoy, want, find useful and choose to be implemented.
Also, JavaScript has a most flexible yet sane syntax.
Other guys involved are: TypeScript, Swift and, of course, Haxe.
TypeScript's popularity shows that dynamic typed scripting fades away. I love types. It solves a JavaScript+Types problem for me.
Swift's team achieved high level of familiarity while rolled some pretty interesting, somewhat new, sometimes innovative, concepts and features. And yes, there is Apple's tyranny in language space on their platforms, which makes Swift widely used "by default". This is my second lowest common denominator for language look and feel.
Haxe is more than 10 years old language. Ahead of its time, years before it already looked like the todays mainstream. Haxe's main powers are astonishing type system, multiplatfrom support, meta-programming and KISS principle. It also follows JavaScript similarity.
You may expect a mix of features from those languages. Like argument labels at a caller side, nullability control, tagged unions, object extractors, standard library, selective data immutability, etcetera.
As a mostly-systems programmer, I am surely under some influence of C++, Rust, Go, D, Nim, Red, Dafny, Haskell, Ada and maybe others too.
Stay tuned!
I'm getting an error when I execute hexa built with Nexe, it's telling me something about Unknown command, suggesting that something is being sent as an argument upon execution by default?
I cloned the repo executed the main build script for the bootstrapped compiler
$ .\build.bat
it went great.... now when I compiled to Nexe using:
$ .\nexe-build.bat
It successfully built the executable, but when I run it, it outputs this:
PS C:\Users\showheyhey\Documents\GitHub\hexa> hexa.exe
Unknown command: C:\Users\showheyhey\Documents\GitHub\hexa\hexa-node.js
Try `hexa help`
Hexa 2023.1.6 on node.js 14.15.3
Clean execution with no errors.
No response
No response
Hello, Im Try to Build hexa compiler for greentea os, i can not complate compile and see error:
/home/mobin/AUR/hexa/bootstrap.js:8331
throw new CompilerErrors(this.hints);
^
CompilerErrors {
errors: [
CompilerError {
exception: 0,
details: 'Expected case
before return
',
line: 191,
column: 9,
fileName: '/home/mobin/AUR/hexa/source/compiler/normalizer.hexa'
}
]
}
[mobin@Mobin-Mahdi-PC hexa]$
I think this problem is due to incorrect programming. Unfortunately I am not fluent in JavaScript. Thank you for helping me :)
My PC:
CPU= AMD Ryzen 5 3500X
GPU= NVIDIA Geforce GTX 1650
RAM= 2x8GB (16GB) CL16 - DDR4
OS= Artix Linux (Arch Linux + OpenRC init)
It was a long standing project and hard research! So it is the time to stop over-engineering and dive into implementation and dogfooding.
Current task is to go wild and make Hexa a self-contained, i.e. self compilable.
Unfortunately, the easiest way to achieve this is to make a compiler prototype in Haxe, convert it's source to Hexa, compile it with Haxe's to finally generate Hexa's compiler, to ..well ..finally compile Hexa compiler with Hexa compiler. Sounds non-trivial, huh?
Actually, Haxe allows to implement automatic source conversion with macro API. So most of the time I am writing Haxe code, which compiles Hexa code, generated from this code which parses this same code. Meh.
This shows to work really well, so lets fill a to-do. Also you may expect the macro to be published in the https://github.com/hexalang/toHexa repo. I don't believe it will directly re-compile something like OpenFL but who knows.
By the way this makes unit testing a lot simpler cause one may reuse Haxe' unit tests he-he.
The problem is that we still not have proper release
Must have an installer at least for Windows, and .deb/.dmg for others is possible
Currently we share artifacts
Well, huge, for newcomers
Must at least build Tofita kernel and have working language server
Language server is not auto-tested in any way currently
Add simulation tests similar to how TestParser does: run lint over a code sample and compare to the desired server output
Not doing anything, cause we normally use server a lot anyway while coding in Hexa
We could add this into CI, also helps to validate compatibility regressions
Those tests should not go into release builds, and maybe use json files to describe output (ohh, maybe use objects in code, cause they are typed)
Progress
node --trace-uncaught
msbuild
aka MSVC of win32/posix demos.
msbuild
failure[Building The Hexa Compiler]...
)build-all
build-all
for parallel)test-all
which takes artifacts from build-all
(if build-all
succeeded) and builds tests from 2.node.exe
invocations should use --trace-uncaught
as the first argument like this --trace-uncaught bootstrap.js hexa.json
. Node is very conservative on error origins without that feature.test/lts/hello/hexa.json
examples/html-raytracer/hexa.json
test/normalizer/hexa.json
examples/node-platform/hexa.json
examples/native-win32/hexa.json
examples/native-posix/hexa.json + build the output (macos clang, windows msvc, linux gcc) (NO artifact needed)
examples/native-win32/win32.c
(build only) with MSVC (like libgen
). It is produced from examples/native-win32/hexa.json
. Same for POSIX demo.Current templates are useless
I am often asked: what is Hexa and how it differs than language-xyz?
Some examples:
how hexa will be better than haxe? What to purpose of this Lang?
https://twitter.com/JMichaelShlomo/status/828918031686520833
It IS a creazy idea.
https://groups.google.com/d/msg/haxelang/zGLnwJRaThU/tEckOyt6iy8J
curious - what problem(s) are you trying to solve?
Some links from deep multi-year history of the project:
Results? Well...
What exactly have you done? i cant see anything.
https://groups.google.com/d/msg/haxelang/zGLnwJRaThU/hOO4Ohmj7acJ
So I want to announce a short blog posts series about design decisions, experiments and so on.
They are always available via https://hexalang.github.io/blog. Follow https://twitter.com/hexalang for updates.
And feel free to comment!
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.