The-Spiral-Language
gaiman
The-Spiral-Language | gaiman | |
---|---|---|
33 | 16 | |
908 | 131 | |
- | - | |
9.7 | 5.0 | |
about 11 hours ago | about 1 month ago | |
Python | JavaScript | |
Mozilla Public License 2.0 | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
The-Spiral-Language
-
Does This Language Exist?
Try Spiral for a functional response to the system level programming demands. It has an F#, C, and a Python backend.
-
How do I get around the lack of MailboxProcessor in Fable?
I did the language server for Spiral using Hopac. It involved turning the entirety of what would have been the sequential compilation pipeline into a promise stream.
-
Are there any good resources on reflection in Fable?
Sigh, despite using F# for so long, I've always avoided tackling .NET reflection, but I know from experience (of programming in Spiral) that this is a perfect place to introduce these techniques. Type systems like F#'s really hit their limits when it comes to serializing data across platform and language boundaries, so this is The place to demonstrate the use such methods.
-
why isn't functional more popular?
But a language that support programming in a staged functional programming style, like my own Spiral would actually be very suitable for gamedev, I think more than C# itself. It has compiler guarantees for a lot of things that F# doesn't, and what in other languages would require metaprogramming is just regular programming in it.
-
Ask HN: How do I get the most benefit out of my programming language?
I originally started work on [Spiral](https://github.com/mrakgr/The-Spiral-Language) back in late 2016 because I wanted a functional language in which I could program novel AI hardware that hadn't existed at the time, and still doesn't, but it won't be long before it arrives. It took 3 years of full time work to get it to its current standard of quality, and I'd really feel comfortable programming new hardware devices in my favored functional style. I've designed Spiral so it is both extremely powerful, easy to use while being efficient enough to program devices like GPUs that can't even use heap allocation for their objects.
I am not really concerned about what I'll do when I get access to Tenstorrent chips in six months; my personal needs for the language are met. But I would like it if I could spread the language more broadly, make it useful for people other than myself and get people to sponsor my work on it.
Here is the value proposition of Spiral.
It is a high-level functional PL that has some features that other languages don't, but that isn't really the point. On mainstream devices like the x86 ones there are a lot of programming languages that are good, and it would be tedious to use Spiral to compile to such platforms compared to using such languages directly. It is a bit how ReasonML compiles to JS. Back when I tried it I found using Typescript easier to deal with. So that is not where I'd like to go into, though using Spiral would have benefits in certain areas.
Rather, while reading the [CNX blog](https://www.cnx-software.com/) I realized that while consumer facing AI chips are not here yet, there is a lot of hardware development in the embedded space. They are heterogenous architecture. They have GPU and TPUs in addition to CPUs. And these cross platform interactions within the same system is something that existing languages are really poor at tackling.
If you look at Python or C#, for example, you can't really program the GPU on them directly. They are CPU focused, and don't have the right semantics and would be too inefficient to program devices like GPUs directly. The way I've designed Spiral is that you can program the CPU and the GPU and whatever else from within the same language.
It is not suitable for just GPUs, check this [demo out](https://github.com/mrakgr/PIM-Programming-In-Spiral-UPMEM-Demo). I recently did a backend for UPMEM devices, which are the first commercialized Process-In-Memory chips. I've posted the link to this on HN yesterday and on the Reddit embedded sub, but I got zero interest. And this is really a pity because that map kernel I've demoed is actually a big deal. Back when I first started working on Spiral, it took me 1.5 years of full time work to get to the point where I could write a program like that in the language. And without backend nesting of the kind that Spiral offers, it is impossible to write those kinds of programs no matter how skilled one is as a programmer.
The kind of backend nesting I've demonstrated is not something you can do in F#, Python or any of the languages that I know of. I could easily create such backends for many kinds of hardware. And people would benefit from that because unlike the mainstream computing devices, the hardware coming down the pipeline will have poor language support, nothing on the level of what Spiral offers. For the kinds of heterogeneous architectures I am envisioning, the language designs that are good in the CPU-dominant era, will simply not be suited in the heterogeneous era.
I need chances to demonstrate how good Spiral is, but I am not sure how to get them. If I do not get them, the future of computing will be a lot worse off. I wasn't there when Cuda was incumbent so I missed the boat on that, but I'd like it if Spiral became dominant on future computing devices. Not because I was the one who made the language, but simply because no other design is as suited for them.
-
PIM (Processing-In-Memory) Course
I am not shameless enough to plug Spiral in the main post, but if you are a PIM company or an user of them and want better PL support and tooling, get in touch with me. I'd love to get a chance to play with them.
-
September 2022 monthly "What are you working on?" thread
Two months ago I did a ref counted C backend for Spiral so I might as well plug it now. Since then I've gotten tired of 3d art, and decided to just start writing Heaven's Key.
-
Callbacks without closures?
I just happened to notice that Spiral has a C code generator now. Maybe you can just use that since it's designed with staging in mind and avoiding heap allocation.
-
Multistage Programming / First Class runtime compiler support
Spiral
-
Are there examples of programming language compilers that evaluate the side-effect free parts of the program at compile-time?
Another term to search for is partial evaluation. An interesting language that by default evaluates everything at compile time is Spiral, developed by someone frequenting this subreddit.
gaiman
- Gaiman: Programming language for text-based games in browser
-
How to create interactive terminal like website with JavaScript?
When I was working on one paid git I’ve come up with a kind of engine that was driven by a JSON file. It was a kind of interactive game or very poor text adventure game. I’ve asked the person for whom I created this project if I can publish the game so others can use it. It was very cool. Later I came up with something even better. My own programming language that compiles into JavaScript. The project is in Beta version and I still need to work on the playground and documentation. You can check it out. Here is Gaiman’s GitHub repo. If you want to create a complex project with user interaction, it may be easier to do this with Gaiman, since it simplifies things. The same code in JavaScript will be much more complex.
- Gaiman: Programming language which compiles into JavaScript for text-based games in browser
-
Show HN: Gaiman language for Web-based Terminal applications
I've created programming language based on Ruby that simplifies creating Terminal text-based games and applications in the browser. I've released first 1.0 beta version, but I'm still adding features and fixing bugs. I yet need to add more documentation and improve Gaiman playground.
The repo for the language can be found on GitHub: https://github.com/jcubic/gaiman the only documentation so far is the Wiki with Reference manual https://github.com/jcubic/gaiman/wiki/Reference-Manual
-
June 2022 monthly "What are you working on?" thread
I've released the first 1.0 beta version of Gaiman. I'm doing small tweaks but it seems that all language features are there. But I need to improve code coverage so I know that everything is tested. And I need to stress test a bit my parser so I know that odd syntax combinations works.
-
First 1.0.0 beta version of Gaiman programming language
I've just published the first beta version of Gaiman 1.0 to NPM.
-
How would you handle parallel execution of two branches of code?
in Gaiman language that compiles to JavaScript, I have syntax like this:
-
How to make your own programming language in JavaScript
I've wanted to have my own programming language, that will make it easier to create text-based adventure games for my Open Source project jQuery Terminal. The idea for the language came after I've created a paid gig for one person, let's call him Ken, that needed this type of game, where the user interacted with the terminal and was asked a bunch of questions and it was like an adventure game, related to Crypo. The code I've written, that Ken needed, was data-driven by a JSON file. It was working nicely, Ken could easily change the JSON and have the game changed however he wanted. I've asked if I could share the code since it was a very cool project and Ken agreed that I can do that two months after he publish the game. But after a while, I've realized that I can have something much better. My own DSL language, that will make it simpler to create text-based adventure games. A person with a bit of programming knowledge like Ken, could easily edit the game, because the language will be much simpler than complex JavaScript code that is needed for something like this. And even if I would be asked to create a game like the one for Ken, it would be much easier and faster for me. This is how Gaiman programming language has started.
What are some alternatives?
lust - A fast, auto-optimizing image server designed for high throughput and caching; Now that is hot.
star - An experimental programming language that's made to be powerful, productive, and predictable
kuroko - Dialect of Python with explicit variable declaration and block scoping, with a lightweight and easy-to-embed bytecode compiler and interpreter.
calypso - Calypso is a mostly imperative language with some functional influences that is focused on flexibility and simplicity.
exp-flow - experimental rule-based programming formalism under construction [Moved to: https://github.com/contrast-zone/canon]
yasl - Bytecode Interpreter for Yet Another Scripting Language (YASL).
cish - Go + Generics + Sum Types
CSLY - a C# embeddable lexer and parser generator (.Net core)
RustScript2 - RustScript is a functional scripting language with as much relation to Rust as Javascript has to Java.
processing - Source code for the Processing Core and Development Environment (PDE)
Vale - Compiler for the Vale programming language - http://vale.dev/
delta - C* is a hybrid low-level/high-level systems programming language focused on performance and productivity.