The Ink programming language
dotink.co
dotink.co
If you're curious about the personal history of the project, Ink was the subject of a recent talk I gave at GopherCon EU[1]
[0] https://github.com/thesephist/monocle
[1] https://youtu.be/nNQHw_RdXvg
EDIT: If any mod is reading, the language is called "Ink" not "dot ink", though the domain is confusing. If the title could be modified that would be... swell.
I think in general simple JavaScript applications can be remarkably fast these days if you're careful not to introduce unnecessary work and aware of the data structures you're using and profile + optimize judiciously :)
- I want real lists/arrays rather than Lua table-style data structures
- I need either pipelines (->>, |>) or class-style methods for ergonomics
- Testing and module system stories need a lot of work.
- Syntax quirks makes some kinds of nice constructs syntactically impossible or verbose (e.g. calling a fn defined on an object requires parenthesis to override the default order of operations)
I recently started hacking on a sort of "Ink 2.0" that preserves a lot of what I like about Ink (minimalism, lispy-ness, value rather than reference types, match expressions) without many of the design flaws. I might share and push that more publicly once I feel it's getting ready.
What I find most fascinating about your side projects is how you bring together a number of different skills in a way that looks almost effortless. Knocking out a search engine or a twitter reader as a throwaway learning project is one thing, but doing it over the course of little more than a week with a well designed UI in a way that ends up being useful in your own workflows? That not only takes some serious work but also the ability to correctly judge which directions not to go in, which can be one of the hardest aspects of developing software.
Although the author seems to be a well-studied PL lover, you don't have to be like this to create a small language. It's fun experience and there are books for non-experts like [3].
- [1] https://github.com/thesephist/ink/tree/master/pkg/ink
If your in the mood to learn Haskell:
http://dev.stephendiehl.com/fun/ https://jktkops.github.io/Write-You-a-Haskell-2/
There is also the outstanding "Crafting Interpreters" by Robert Nystrom, this book and its author hold a very special place in my heart. Before I read this book I was stuck at the "+-*/ calculator" level in compilers and interpreters, intimidated by the depth and breadth of further material. This book teaches you how to make a full blown scripting language with first class closures and classes, first as an interpreter running on java (high level enough to get the intimidated beginner started and focused on the task, yet still a challenging learning experience) then as a {bytecode compiler, VM} pair in C be because this is how all the cool kids write their interpreters and compilers. Accessible if there was ever such a thing in the world, I mean it : if you understand how linked lists, hash maps and trees work, you're good to go. The icing on the cake is that the whole thing is free on a website by the same name the author made, the same thing he did with his other book about Game Programming Design Patterns, it's an astonishing act of charity, I really wish to meet this guy. An awesome personality and a great teacher. You will remember his voice and manner of speech for a lot of time.
There is also the book "elements of computing systems" aka "From Nand To Tetris", where the authors walk you through creating a full computing stack from the NAND logic gate to the OS. Starting from chapter 6 through 11, you write an assembler for the hardware, then implement a VM running on the assembler, then implement a java-like language on top of the VM.
These things are just off the top of my head, there is a massive trove of material in YouTube and the rest of the Internet.
Chapter 7 of Crafting Interpreters lays out how an evaluator works in a pretty clean way [1]. I've also blogged about evaluating ASTs in JavaScript [2]
Lastly, Gary Bernhardt took it a step further and instead of "evaluating" code, "compiled" it to JavaScript (this tutorial uses Ruby) [3]. Very much a mind-blown moment for me.
Have fun!! Writing interpreters remains one of my favorite things to do when learning a new programming language.
[0] https://www.youtube.com/watch?v=aAlR3cezPJg
[1] https://craftinginterpreters.com/evaluating-expressions.html
[2] https://thatjdanisso.cool/programming-languages
[3] https://www.destroyallsoftware.com/screencasts/catalog/a-com...
The language is called “Ink”; “dotink” is just the domain name.
As also mentioned in the author’s comment: https://news.ycombinator.com/item?id=27798704 .