Hacker GitHub

← All repos

titzer/virgil

View on GitHub ↗ ★ 1,431 Shell

A fast and lightweight native programming language

41 mentions on Hacker News by 16 people: 7 stories, 34 comments · first 2016-10-07 · latest 2026-01-24

Mentions per year 41 mentions · busiest year 2022 (12)
20082026
  1. I think you can do this with Virgil, but I'm having trouble finding the exact doc page at the moment: https://github.com/titzer/virgil
    comment by sestep · 2026-01-24 · in Memory layout in Zig with formulas
  2. …They can also be off-heap, which allows a Range<byte> to safely refer to memory-mapped buffers. https://github.com/titzer/virgil/blob/master/doc/tutorial/Ra...
    comment by titzer · 2025-09-30 · in Safe zero-copy operations in C#
  3. ▲ 6
    Ask HN: Languages Designed for WASM?
    story by 90s_dev · 2025-06-29 · 12 comments
  4. …values) isn't bad. This is trickier than it might seem, but Virgil has a good take on this ( https://github.com/titzer/virgil/blob/master/doc/tutorial/Nu... ). Essentially, it only implicitly promotes values in ways that don't lose numeric…
  5. These days I write nearly all my code in Virgil ( https://github.com/titzer/virgil ). It has features like classes, first-class functions, tuples, ADTs, unboxing, and a little data layout language, some unsafe features, like support for…
  6. ▲ 4
    Virgil: A Fast and Lightweight Systems Programming Language for the JVM and WASM
    story by azhenley · 2024-09-11 · 1 comment
  7. …Thus by construction, virtual methods invoked on "this" won't see uninitialized fields. https://github.com/titzer/virgil/blob/master/doc/tutorial/Cl...
  8. …etc. That is brazen UB in C/C++ and compilers will do horrible things to you. See for example: https://github.com/titzer/virgil/blob/master/doc/tutorial/Ra...
  9. ▲ 4
    Virgil: A fast and lightweight native programming language
    story by microflash · 2024-06-15 · 0 comments
  10. ▲ 3
    Virgil: A Fast and Lightweight Systems Programming Language
    story by ternaryoperator · 2024-05-29 · 0 comments
  11. …formats), unbox ADTs, and soon you can even control the exact encoding of ADTs. Virgil is GC'd. [1] https://github.com/titzer/virgil/blob/master/doc/tutorial/La...
  12. …combines the unwind info with stackmaps for GC. It takes very little space. The main driver is in ( https://github.com/titzer/virgil/blob/master/rt/native/Nativ... the rest of the code in the directory implements the decoding of metadata.…
    comment by titzer · 2024-03-17 · in The return of the frame pointers
  13. This paper is the first time I seen mention of the Virgil programming language, from the same author: https://github.com/titzer/virgil
    comment by chrisaycock · 2023-05-28 · in Whose baseline (compiler) is it anyway?
  14. …wormhole) takes the hash function and equality function as arguments to the constructor. [1] https://github.com/titzer/virgil/blob/master/lib/util/Map.v3 This is partly my style too; I try to avoid using maps for things unless they are…
    comment by titzer · 2023-05-04 · in JEP 450: Compact Object Headers
  15. …to allow a chain of calls such as object.foo().bar().baz(). I find it readable and easy to explain: https://github.com/titzer/virgil/blob/master/doc/tutorial/Re...
  16. …and you substitute a copy of the string, quoted into the hole. Just one substitution suffices. [1] https://github.com/titzer/virgil/blob/master/apps/Quine/Quin...
  17. …integer types with some hard-fought rules that I eventually got around to documenting here: https://github.com/titzer/virgil/blob/master/doc/tutorial/Fi... One of the key things is that values are never silently truncated (other than…
  18. …In Virgil I implemented this for both the JVM and Wasm. Here's the algorithm used for Wasm: https://github.com/titzer/virgil/blob/master/aeneas/src/mach...
  19. Terrific. Some really great ergonomic features. After a quick scan: -- Invoking methods with tuples. https://github.com/titzer/virgil/blob/master/doc/tutorial/Tu... Just terrific. Similarly, I've wondered about the symmetry of maps…
  20. …applications? It's hard to grasp what the language feels like from looking at purely academic code. https://github.com/titzer/virgil/tree/master/doc/tutorial/ex...
  21. …if n < 2: result = n else: result = fib(n - 1) + fib(n - 2) swear result >= 0 return result [1] https://github.com/titzer/virgil/blob/master/doc/tutorial/Me... [2] https://github.com/munificent/vigil
  22. The 'Coming From' page compares Virgil to a couple other languages: https://github.com/titzer/virgil/blob/master/doc/tutorial/Co...
  23. …itself is missing the reference. In case it's useful for future readers, here are some samples: https://github.com/titzer/virgil/tree/master/doc/tutorial/ex...
  24. ▲ 155
    Virgil: A fast and lightweight programming language that compiles to WASM
    story by syrusakbary · 2022-07-01 · 80 comments
  25. …a field" is just an access of a constant in an array. It's turned out to be incredibly useful. https://github.com/titzer/virgil/blob/master/doc/tutorial/En...
    comment by titzer · 2022-05-14 · in Safer Enums in Go
  26. ▲ 2
    Virgil: A Fast and Lightweight Programming Language
    story by ksec · 2022-03-17 · 0 comments
  27. …the simple calling convention. No libraries necessary. I've seen a project that does just that: https://github.com/titzer/virgil
  28. https://github.com/titzer/virgil I assume.
  29. ▲ 4
    Virgil: Fast and lightweight native programming language designed for fast, dep
    story by todsacerdoti · 2021-09-28 · 0 comments
  30. …and not have MAP_GROWSDOWN, so it could be made robust to stack overflow along the lines above. [1] https://github.com/titzer/virgil/blob/master/apps/Multi/Mult...
  31. …code that calls the kernel directly. Take a look, I've been working on this for more than 10 years: https://github.com/titzer/virgil/blob/master/rt/x86-64-linux... The "Linux.syscall" is a special operator know to the compiler and it will…
  32. …round it. But that's fine, because you always want to round floats to int, never cast them. [1] https://github.com/titzer/virgil
  33. …is such a bad smell to me, that I literally never use it. In fact, in Virgil, my language project ( http://github.com/titzer/virgil ), there is no super construct at all, nor static methods or interfaces for that matter. 15 years of…
  34. …turn out to be one of those broken-generics class mistakes. I spent 15 years working on Virgil [ http://github.com/titzer/virgil ]. Having tuples and real generics is really important to allow a language to be fully combinatorially…
  35. I thought very hard about this problem as I've developed Virgil [ https://github.com/titzer/virgil ] over the years. Bootstrapping any system, not the least of which a new programming language is a hard problem. Virgil has an (almost)…
  36. …involving anything written in C at build-time or run-time!!! Virgil has been doing this for years. https://github.com/titzer/virgil/
  37. …and long division on said large integers. Denormalized is a pain for sure. Did this recently. https://github.com/titzer/virgil/blob/master/aeneas/src/vst/...
  38. …64/64 division on 32-bit x86. I cribbed some code off the internet and came up with this: https://github.com/titzer/virgil/blob/2c674dbe3512da23c4a644... This is the code that my compiler generates for a 64/64 divide when it doesn't know…
    comment by titzer · 2020-07-19 · in Optimizing 128-bit Division
  39. https://github.com/titzer/virgil
    comment by titzer · 2019-05-17 · in Why is a Rust executable large? (2016)
  40. …http://dl.acm.org/citation.cfm?id=2491962 ), and there is some documentation in the wiki branch ( https://github.com/titzer/virgil/tree/wiki ).
    comment by titzer · 2016-10-07 · in Type-Safe Unions in C++ and Rust
  41. …a lot nicer in ML and Haskell, IMO. Of course I implemented them in Virgil, too. (shameless plug: https://github.com/titzer/virgil )
    comment by titzer · 2016-10-07 · in Type-Safe Unions in C++ and Rust