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
20082026
-
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 -
…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# -
▲ 6
Ask HN: Languages Designed for WASM?story by 90s_dev · 2025-06-29 · 12 comments
-
…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…
comment by titzer · 2025-05-06 · in Matt Godbolt sold me on Rust by showing me C++ -
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…
comment by titzer · 2025-03-04 · in Ask HN: What less-popular systems programming language are you using? -
▲ 4
Virgil: A Fast and Lightweight Systems Programming Language for the JVM and WASMstory by azhenley · 2024-09-11 · 1 comment
-
…Thus by construction, virtual methods invoked on "this" won't see uninitialized fields. https://github.com/titzer/virgil/blob/master/doc/tutorial/Cl...
comment by titzer · 2024-07-05 · in I have no constructor, and I must initialize -
…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...
comment by titzer · 2024-06-25 · in How GCC and Clang handle statically known undefined behaviour -
▲ 4
Virgil: A fast and lightweight native programming languagestory by microflash · 2024-06-15 · 0 comments
-
▲ 3
Virgil: A Fast and Lightweight Systems Programming Languagestory by ternaryoperator · 2024-05-29 · 0 comments
-
…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...
comment by titzer · 2024-03-30 · in Garbage collection for systems programmers (2023) -
…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 -
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? -
…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 -
…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...
comment by titzer · 2022-11-22 · in Retrofitting null-safety onto Java at Meta -
…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...
comment by titzer · 2022-10-06 · in A Ruby program that generates itself through a 128-language quine loop -
…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…
comment by titzer · 2022-09-13 · in Integer Conversions and Safe Comparisons in C++20 -
…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...
comment by titzer · 2022-07-13 · in Tell HN: We are trying to get tail calls into the WebAssembly standard -
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…
comment by specialist · 2022-07-02 · in Virgil: A fast and lightweight programming language that compiles to WASM -
…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...
comment by ricardobeat · 2022-07-02 · in Virgil: A fast and lightweight programming language that compiles to WASM -
…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
comment by conaclos · 2022-07-02 · in Virgil: A fast and lightweight programming language that compiles to WASM -
The 'Coming From' page compares Virgil to a couple other languages: https://github.com/titzer/virgil/blob/master/doc/tutorial/Co...
comment by martinflack · 2022-07-02 · in Virgil: A fast and lightweight programming language that compiles to WASM -
…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...
comment by syrusakbary · 2022-07-02 · in Virgil: A fast and lightweight programming language that compiles to WASM -
▲ 155
Virgil: A fast and lightweight programming language that compiles to WASMstory by syrusakbary · 2022-07-01 · 80 comments
-
…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 -
▲ 2
Virgil: A Fast and Lightweight Programming Languagestory by ksec · 2022-03-17 · 0 comments
-
…the simple calling convention. No libraries necessary. I've seen a project that does just that: https://github.com/titzer/virgil
comment by matheusmoreira · 2021-11-09 · in liblinux: Architecture-independent access to Linux system calls -
https://github.com/titzer/virgil I assume.
comment by muthdra · 2021-09-29 · in Stack size invisibility in C and the effects on "portability" -
▲ 4
Virgil: Fast and lightweight native programming language designed for fast, depstory by todsacerdoti · 2021-09-28 · 0 comments
-
…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...
comment by titzer · 2021-09-28 · in Stack size invisibility in C and the effects on "portability" -
…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…
comment by titzer · 2021-08-24 · in My mouse driver is asking for a firewall exemption (2019) -
…round it. But that's fine, because you always want to round floats to int, never cast them. [1] https://github.com/titzer/virgil
comment by titzer · 2021-07-20 · in size_t-to-int vulnerability in Linux’s filesystem layer -
…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…
comment by titzer · 2021-04-30 · in Inheritance was invented as a performance hack -
…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…
comment by titzer · 2021-04-02 · in A categorized list of all Java and JVM features since JDK 8 to 16 -
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)…
comment by titzer · 2021-02-28 · in Weird architectures weren't supported to begin with -
…involving anything written in C at build-time or run-time!!! Virgil has been doing this for years. https://github.com/titzer/virgil/
comment by titzer · 2020-11-18 · in 30% Faster Rust Build Times using Cranelift instead of the LLVM -
…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/...
comment by titzer · 2020-09-11 · in Parsing floats in C++: benchmarking strtod vs. from_chars -
…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 -
https://github.com/titzer/virgil
comment by titzer · 2019-05-17 · in Why is a Rust executable large? (2016) -
…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 -
…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