Products > Programming

v-lang (programming language)

(1/3) > >>

Yesterday Ania reached me out on Whatsapp with big news - here it is vlang: can you really miss it and not add it to your personal language collection? -


so she wrote with so much enthusiasm that .... can you really miss it? ... well I forgot to remind her that at 2:05 am local time ... my synapses are with nothing but algorithms to count as many imaginary sheeps as you can herd inside the circle in the plane of complex numbers.
(is it an algorithm that terminates?)

so, sorry guys, but I haven't yet given a detailed look at the manual, looks *very* interesting btw  :-//

Ah, so almost all new prog languages, you find pointless, but not this one? I'd be curious to know the rationale - apart from the fact Ania seems to be dear to your heart? ;D


--- Quote from: SiliconWizard on May 02, 2023, 10:46:03 pm ---Ah, so almost all new prog languages, you find pointless, but not this one?

--- End quote ---

I wouldn't put it that way ...  when she reached me on WhatsUp she was all excited saying "See we're not the only ones thinking about certain features? So much for those who tell us we're going in the wrong direction"  :o :o :o

I had asked her, as I have asked here on this forum, to find a language to replace Bash for writing UNIX deployment scripts, building scripts, etc. for our GNU/linux&C projects. Because with Bash ... I really can't take it anymore, which is how she probably found v-lang.

* shell scripts in v-lang as V can be used as an alternative to Bash to write deployment scripts, build scripts, etc. The advantage of using V for this is the simplicity and predictability of the language
* bonus, there are already CoreUtils in V, Programs equivalent to GNU coreutils, written 100% in V.
Ania is one of the sustainers, as well as a contributor, of my-c --level3, and it happens that for the first time, we see implemented in an external project some of the features for which "others" are perplexed about my-c.

Things in common, scratching at the surface

* built-in code-style formatter
* Variables always have an initial value and are immutable by default
* Functions are private and not exported by default
* Immutable function args by default
* initialization and assignment operators
* "is" operator to type check
* "in" operator to check whether an array contains an element
* for in loop is similar to when 'range (when in range)
* Similar safe/unsafe classification of code sections
* Compile time code IF-condition, to replace C #ifdef
Some of the spiciest differences, strictly prohibited in my-c

* labels
* label with goto
* break
* continue
The two mechanisms that made Ania jump out of her chair
So, v-lang allows unconditionally jumping to a label with goto, even if the label name must be contained within the same function as the goto statement, and break and continue control the innermost for loop by default, with labels ...

( :palm: )

but ...

* defer statement
* methods on types, functions with a special receiver argument... but, then you also have a "defer statement" that actually "defers" the execution of a block of statements until the surrounding function returns, and this is very similar to what my-c offers, as a side effect, with the use of monads.

And although it doesn't have classes, you can define methods on types. A method is a function with a special receiver argument. Again this is very similar to what my-c offers, as a side effect, with the use of monads.

WOW, now we are talking  ;D

(v-lang is much more than this,
too much for us,
so it will be likely used in a very close subset)


--- Code: ---v # make
cd ./vc && git clean -xf && git pull --quiet
remote: Enumerating objects: 2, done.
remote: Counting objects: 100% (2/2), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 2 (delta 1), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (2/2), 901.81 KiB | 1.40 MiB/s, done.
Resolving deltas: 100% (1/1), done.
Updating files: 100% (2/2), done.
cd ./thirdparty/tcc && git clean -xf && git pull --quiet
The executable './thirdparty/tcc/tcc.exe' does not work.
cc  -std=gnu99 -w -o v1.exe ./vc/v.c -lm -lpthread
./v1.exe -no-parallel -o v2.exe  cmd/v
./v2.exe -nocache -o ./v  cmd/v
rm -rf v1.exe v2.exe
cc: error: thirdparty/tcc/lib/libgc.a: No such file or directory
(Use `v -cg` to print the entire error message)

builder error:
C error. This should never happen.

This is a compiler bug, please report it using `v bug file.v`.

You can also use #help on Discord:

make: *** [GNUmakefile:117: all] Error 1

--- End code ---
so, here we have the same problem we have with GNAT: no bootstrapper

--- Code: ---cat thirdparty/tcc/
# thirdparty-unknown-unknown
This branch is reserved for platforms for which we currently
have not yet precompiled a binary tcc executable.

--- End code ---
no one for GNU/Linux-x86/32bit  :o :o :o


[0] Message Index

[#] Next page

There was an error while thanking
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod