Introducing Verve: minimalistic, static, functional language
tadeuzagallo.com
tadeuzagallo.com
I'm throwing out a challenge for you:
What will Verve do well, that no (major) language does well?
I hope you continue developing it, and that you keep having fun creating it.
> What will Verve do well, that no (major) language does well?
I'm always thinking about that, and I honestly wouldn't write a "proper" language (as in working on it full time, and expecting people to really adopt it) without having an answer for that. Nonetheless, I still see the value in writing things that are not ground-breaking, for the sake of learning. Just reading about compilers and PLT without any practice was really hard for me, and working on this language has been super helpful from a learning perspective.
Responding to internal errors differently based on the caller's desire is possible with Lisp; there's a good overview here[3]. It looks like algebraic effects can do something similar, as described in this paper[4] (search for lisp and the relevant portion should show up).
[1]: http://math.andrej.com/eff/
[2]: http://www.idris-lang.org/
[3]: http://www.gigamonkeys.com/book/beyond-exception-handling-co...
[4]: https://hal.archives-ouvertes.fr/hal-01079206/file/effects-p...
It would be an interesting twist if fractions were the default.
Reading through it, I'm unsure whether the VM is necessary or included. To me, 'unnecessary' and 'runs on it by default' seem slightly contradictory, or at least surprising. I don't have time to read through your source code right now, but if you're not running on your VM, what output do you produce? elf executables against the x86-64 Linux ABI?
I was also surprised that so many terms in your post have links to the definition in Wikipedia. After finishing the article and scrolling all the way down, I got to your paragraph that explained your rationale for doing so, so that's fair. However, I admit I expected these terms to link to some Verve documentation about that particular component or concept to explain details about your implementation. I realize that you may have a different audience in mind than, say, the Haskell or Python docs, but I wouldn't expect those sites to link to dictionary definitions at all.
Thanks for posting!
The reason the definitions link to Wikipedia is that this is the first piece of documentation on Verve ever. Hopefully I'll be able to cover most of it in proper docs later, but I thought for now I'd add the link to the definitions in case someone reading through was not familiar with them (I personally hate to stop reading to start googling for acronyms).
I cloned the repo locally to try to build it (ubuntu 15.10) and hit 9 of compile errors. My stdout and sterr are here: http://sprunge.us/TdXb
...
Residents of the San Francisco Bay area should also check out Verve, a coffee roaster based out of Santa Cruz. There's two locations (the Opal Cliffs one on 41st Ave is nicer, IMHO, and easier to find parking for - plus there's the cliffs/beach nearby). It's one of the better roasters, the cafes have good atmosphere, and it's just one of those things you miss when you move away from California.
http://vervecoffee.com/pages/locations
We now return you to your regularly scheduled programming language.
> One of the first things I usually hear is “Why don’t you target LLVM?” (or some other runtime), and the answer is: because that wouldn’t be as much fun. Sure, it’d be much easier to get “production ready” that way, but as I said, the goal here is really to learn and have fun.
This is awesome. So glad to see people writing languages just for fun.
For anyone else into that kind of thing, check out #proglangdesign on freenode. Several really smart people who also just want to write languages for fun often chat there, about language design and implementation.
I'm doing a interpreter (F#) and I have find that surfacing functions from the host is not that easy as I have imagined before.
You can take a look at some native functions here: https://github.com/tadeuzagallo/verve-lang/blob/master/runti... And the implementation for the `op_call` opcode here (notice it has 2 branches: op_call_builtin and op_call_closure, the former is for `extern`ed functions): https://github.com/tadeuzagallo/verve-lang/blob/master/runti...
Hate having to type "->" which seems to popping up all over the place. :P
> Right now Verve runs on it’s own Virtual Machine (VM)
What I meant by no dependencies is that I don't aim to use any libraries/toolchains to facilitate the job of executing/compiling the language (or providing runtime support).
[1] Fluidics - Wikipedia, the free encyclopedia [2] Water gates: http://www.blikstein.com/paulo/projects/project_water.html
And I'm not "pitching my software", I'm sharing my side project, with a massive disclaimer that I'm doing it for fun.
I mean, GAS/x86-64 is cool, I enjoy toy languages as much as the next person—I just wouldn't describe it any other way than architecture-specific (and therefore useless to most people) so I don't have to click through if I can't play with it.
that's real fun!