The V Programming Language

@vlang
Simple, fast, safe, compiled language for developing maintainable software.
364 Posts · View blog posts
<Prev 1 2 3 4 5 ... 8 Next>
Lots of people using V or coming back to V are saying how much more stable it has become.

V is now officially out of alpha and into beta!

V's fast native backend now supports linking!

Creating a compiler in V:

- basic dead code elimination
- static type checking
- compile time stack sim/verification

and more

blog.l-m.dev/posts/compiler-part-4/

Simple grid pathfinding using A* in V:

www.youtube.com/watch?v=ZDLLecWZyeM

https://www.youtube.com/watch?v=f63WGUufQQQ

V reached 30k GitHub stars in 3 years.

V has reached 30k stars on GitHub today!

V has 3461 fixed bugs and 478 open bugs.

That's a great ratio: only 12% of all bugs are open.

We're planning to decrease this number to 5% by the time of the 0.4 release.

V now has anonymous structs!

You can sponsor the development of V via GitHub Sponsors:

github.com/sponsors/medvednikov

And as of today, sponsors get free Veasel merch: mugs, pillows, backpacks, hoodies!

V can now find code in the `src/` directory.

This allows making V modules and repos much cleaner.

For example, V UI used to have dozens of V files in the top level directory. Now it has a very simple structure:

After the 0.3 release, V is trending on GitHub again! #2

V 0.3 is out!

The changelog is so huge, it won't fit on a screenshot.

Read the full version here: github.com/vlang/v/discussions/14895

C2V is finally out! And it can translate DOOM!

github.com/vlang/c2v

YouTube demo video: Translating DOOM from C to V, building and running it!

https://www.youtube.com/watch?v=6oXrz3oRoEg

vsql 0.19, a single-file SQL database written in pure V with no dependencies, now supports GROUP BY:

github.com/elliotchance/vsql

V has appeared on RedMonk Q122 Programming Language Rankings!

As of today, programs built with the V compiler no longer leak memory by default.

Previously the developers had to use command line flags like -gc or -autofree or handle memory management manually.

V's translators and codegen are very clean.

Here's a comparison of the same DOOM fn. The 2nd version is generated by V after compiling the translated C file via C2V (which we are releasing together with DOOM.v atm).

It's fascinating that they are so similar after 2 translations

8000 merged pull requests!

It's easy to debug V code using VS Code, gdb, and the C/C++ extension for VS Code:

V's closures can be used as function pointers. It allows writing very clean code for handling events, for example.

This also works in Go, but not in Rust or C++.

Here's how on_click events are handled in V UI. All necessary state (app App) is passed to the method automatically.

There's an article about discovering the V language in
Linux Format, the best-selling Linux magazine in the UK.

You can buy the May 2022 Issue 288 here:

linuxformat.com/linux-format-288.html

People often ask: "what build system should I use with V?"

The answer is you don't need one! Just run `v .`, it'll build all V files/modules in current dir.

In case you need a more complex project structure, simply add a small build.vsh file and run it with `v run build.vsh`.

V UI now has all 7GUI implementation examples, including a simple spreadsheet implementation:

github.com/vlang/ui/tree/master/examples

V and its graphics libraries support Android.

V 2048 running on Android:

github.com/vlang/v/tree/master/examples/2048

A Hello World compiled using V's WIP x64 backend is only 182 bytes.

A statically linked 182 byte program.

Even NASM won't result in such a small file.

V's closures used to only work on non-Windows operating systems.

Now they work on Windows as well!

V had a combined Option/Result type.

While this approach had its advantages, it was decided that having separate Option and Result types is clearer.

A new Result type has been added to the language.

Old code will keep working for a year, it will result in a warning.

Conway's Game of Life using V's term.ui:

github.com/l1mey112/conway-v

V has lots of simplifications and optimizations.

e.g. instead of

if response.status.code == .ok || response.status.code == .not_found {

you can simply do

if response.status.code in [.ok, .not_found] {

and V will be smart enough to not allocate an actual array for this.

More and more software is being developed in V.

Vieter: a simple, lightweight self-hostable Arch repository server, paired with a system that periodically builds & publishes select Arch packages.

git.rustybever.be/Chewing_Bever/vieter

The naming of V's integer types is now more consistent: `byte` has been renamed to `u8`.

Previously we had
byte
u16
u32
u64

Now we have
u8
u16
u32
u64

The byte alias will remain for backwards compatibility for about a year, vfmt will automatically replace `byte` with `u8`.

Sal Rahman wrote two ray tracing implementations in Go and V:

github.com/shovon/raytracing-golang
https://github.com/shovon/raytracing-vlang

The V version is 3 times faster:

.@LewisMenelaws just published a great short video about V:

www.youtube.com/shorts/GDOWfzIPgbc

V's useful typo detector now highlights the suggested name so that it's more visible:

V is #1 on GitHub's trending list right now!

github.com/trending

New blog post:

Setting Up GitHub Actions for V

blog.vlang.io/setting-up-github-actions-for-v

Blog post:

Setting Up GitHub Actions for V

The Article Series

  1. The Complete Beginner’s Guide to CLI Apps in V
  2. Elevate Your V Project With Unit Tests
  3. Setting Up GitHub Actions for V (You are here)

What is CI/CD, DevOps,

...

Hamnn, a V machine learning library based on Hamming distances:

github.com/holder66/hamnn

Can be used for speech/emotion recognition, data mining, prediction of weather, robotics, risk identification and management etc.

RT @nanovms: recent @v_language benchmarks on nanos reporting 727k reqs/sec - would be interesting to see what a multi-thread impl looks li…

V's standard library now has a new `datatypes` module with Heap, Queue, Stack, BSTree, LinkedList:

github.com/vlang/v/tree/master/vlib/datatypes

Python style list comprehensions are achievable in V:

github.com/vlang/v/blob/master/doc/docs.md#array-method-chaining

V now has an official wrapper for Wasmer, The Universal WebAssembly Runtime:

github.com/vlang/wasmer

New blog post.

Unit testing in V:

blog.vlang.io/elevate-your-v-project-with-unit-tests

Go2V, a Go to V source code translator project, has just been started by the community, and can already translate simple programs:

github.com/vlang/go2v

This has been made possible by V's v.ast and v.parser modules, which are part of the stdlib.

Blog post:

Elevate Your V Project With Unit Tests

The Article Series

  1. The Complete Beginner’s Guide to CLI Apps in V
  2. Elevate Your V Project With Unit Tests (You are here)
  3. Setting Up GitHub Actions for V

Previous Article

This article p

...

RT @hungrybluedev: I'm very proud of this article I wrote on the Official @v_language Blog. If you're interested in learning in V and makin…

RT @gadikian: I cannot get the idea of rewriting @Tendermint_Core @cosmosibc in @v_language out of my mind.

I shall make a couple of video…

Vinix, a new OS written in V, can now run Doom!

www.youtube.com/watch?v=PDzw3M6Qj9Y

The fist printed book on V is out!

www.amazon.com/gp/product/1839213434

V is a compiled language, but after a recent 3k line PR, it's now an interpreter as well.

This makes V a better fit for fields like data science.

<Prev 1 2 3 4 5 ... 8 Next>