HNHacker News
TopNewBestAskShowJobs

tadeuzagallo

59 karma · joined January 11, 2015

submissionscomments
tadeuzagallo··on A New Bytecode Format for JavaScriptCore
There are a few bugs related to caching, but the main ones are: The initial implementation of the underlying infrastructure: https://bugs.webkit.org/show_bug.cgi?id=192782 Initial C++ and Obj-C APIs: https://bugs.webkit.org/show_bug.cgi?id=193401 WIP bug to integrate the cache with WebKit: https://bugs.webkit.org/show_bug.cgi?id=194047
tadeuzagallo··on Prepack helps make JavaScript code more efficient
That's not all, there's the cost of (down)loading the dead code, and startup cost for loading the unoptimised cost. Even more critical when you consider environments where you can't JIT, like React Native on iOS for instance, which was one of the many motivations for Prepack AFAIK.
tadeuzagallo··on Introducing Verve: minimalistic, static, functional language
As usual, for fun and learning, but also to use the language and identify what is more critical to improve.
tadeuzagallo··on Introducing Verve: minimalistic, static, functional language
It was a lot of fun indeed!

> 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.

tadeuzagallo··on Introducing Verve: minimalistic, static, functional language
Have you read the blog post? It explains why I won't use LLVM and says that the interpreter is written in GAS x86_64.

And I'm not "pitching my software", I'm sharing my side project, with a massive disclaimer that I'm doing it for fun.

tadeuzagallo··on Introducing Verve: minimalistic, static, functional language
I started with colons indicating the return type, but IMO it gets too confusing when you have functions as parameters. e.g. `foo(bar: (int, string): float): float` but that might be just personal preference.
tadeuzagallo··on Introducing Verve: minimalistic, static, functional language
It makes it easier to reason about a functions result, both when reading the code and when type checking.
tadeuzagallo··on Introducing Verve: minimalistic, static, functional language
`extern` means it's implemented in native, but it has to conform to the interface that the VM provides, and register that function with the VM. At runtime, the parser knows when a function is local (i.e. in the bytecode) or extern (i.e. C++). If it's local, it'll jump to the function's offset in the bytecode, if it's extern, the interpreter will use a native call.

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...

tadeuzagallo··on Introducing Verve: minimalistic, static, functional language
Right now it runs on its own VM. What I meant by "the VM is no longer necessary" was that the language went from being dynamic (when I was just prototyping with lisp) to static (in the current state), so it should be easy to generate machine code ahead of time, instead of having an interpreter (or adding a JIT).

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).

tadeuzagallo··on Introducing Verve: minimalistic, static, functional language
Fixed it, thanks!
tadeuzagallo··on Introducing Verve: minimalistic, static, functional language
That's not a dependency, that's a limitation: the interpreter is only implemented for one platform right now, but there's no reason why it shouldn't be possible to add support for a new platform without changing the existing code.

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).

tadeuzagallo··on Introducing Verve: minimalistic, static, functional language
I meant minimal as in the number of concepts it exposes, basically all you get are functions, (G)ADT + pattern matching and type classes.
tadeuzagallo··on Introducing Verve: minimalistic, static, functional language
Thanks for posting the errors, I'll get ubuntu running and look into it. It seems to be just the __unused annotations and the non-portable pthread call, so should be easy to get it working. :)
tadeuzagallo··on Writing an x86 emulator in JavaScript
Thanks, indeed I didn't make any efforts to make it faster, but this seems fair... I honestly didn't know DataView was that slow, it got fibonacci(40) down to 1m53s. Faster than PERL according to http://fengmk2.com/blog/2011/fibonacci/nodejs-python-php-rub...