💾 Archived View for blog.schmidhuberj.de › 2022 › 05 › 30 › v-or-another-new-project captured on 2024-02-05 at 09:26:45. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-06-03)

-=-=-=-=-=-=-

Vlang (or another new project)

Posted on 2022-05-30

Oops, I did it again. Last weekend I had too much spare time, so I did what many programmers would do, learn another programming language.

Vlang

The language of my choice for this weekend was V/Vlang. I already took a look at V maybe one month before, but have never programmed anything using it. So I decided to just try it out.

After a few hours of using, I must say I really enjoy the programming language. It is very simple to program in, the code is very readable and with many features by default.

As a compiled language, it is also pretty fast, and, what surprised me even more, is the speed of compilation. A (not so simple but also not complex) application with tui-interface, some os-libraries compiles basically instantaneously (it does not even print anything to inform you it is compiling). This stands in contrast to the often bad compile times for my go-to-language Rust.

I previously stated that it has many features. I did not mean that the programming language has many different syntaxes available, I meant that many different use-cases are already covered by the basic pre-installed modules. This includes things like terminal UI, graphics library, web framework and ORM. Most will probably consider this bloated, but I find it interesting that such features are already actively worked on and standardized on such a early programming language. These features also include many development-related features like hot code reloading and profiling, that will probably be very useful for larger applications.

Another aspect of the programming language I am really interested in using is V shell. V shell is basically just normal V code with some pre-imported modules and a different file ending, but this leads the file to be executable like a normal script. And because of the fast compile times, this may be finally lead to readable shell-scripts.

Like mentioned, this project is not that old. I could not find exact numbers, but based on the git history it was published June 2019. This is not extremely recent like Hare, but still pretty new.

Even though I have already praised many parts of this programming language, I must also note the things that I do not like that much:

- 8 space indentation. I definitely prefer 4 space indentation, but luckily there exists a auto-formatter.

- Standard-documentation lacking in many areas. Many functions do not even have any documentation, most others I would consider insufficient

- General inconsistencies: The website mentions how to test, but when trying it out, actually another method of testing must be used (may be because I am using a git-version of the programming language).

You may check out there website here:

V

The Project

To learn V, I implemented a tui-based file browser (note: not file manager as this can only browse files) called vfb (V file browser, yes, a very creative name). I basically wanted to make browsing my files faster as my HDD is very (read: extremely) slow such that ranger often is slow displaying files. This file browser also has some extra features over already existing file managers like filtering the results by name, file type and ignoring hidden or git-ignored files.

It is basically just a collection of ideas I have for better tui file managers, like advanced filtering and being modal (and maybe in the future custom sorting and further ideas).

I think I advertised vfb enough, so I will just put a link here. Just check it out if you want.

vfb (GitLab)

Conclusion

I think I like V and will definitely look forward to using it again. Regarding vfb, I think I just started another project only I will ever use, but it was (and maybe will be in the future) a interesting side project.

Return to home