Update v-vvork-in-progress-2020-01-03.markdown

This commit is contained in:
Cadey Ratio 2020-01-03 16:09:22 -05:00 committed by GitHub
parent 3b6870f2db
commit 0cf7f6c401
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 8 deletions

View File

@ -8,11 +8,6 @@ tags:
# V is for Vvork in Progress # V is for Vvork in Progress
> Dont ever, ever try to lie to the Internet, because they will catch you. They
> will deconstruct your spin. They will remember everything you ever say for
> eternity.
\- Gabe Newell
So, December has come and passed. I'm excited to see [V][vlang] 1.0 get released So, December has come and passed. I'm excited to see [V][vlang] 1.0 get released
as a stable production-ready release so I can write production applications in as a stable production-ready release so I can write production applications in
it! it!
@ -148,7 +143,7 @@ The resulting object file is 280 MB (surprising given the output of the
generator script was only 67 MB). generator script was only 67 MB).
```console ```console
$ cd home/cadey/tmp/vmeme/moon/ $ cd ~/.vmodules/home/cadey/tmp/vmeme/moon/
$ ls $ ls
hellomodule.o hellomodule.o
@ -177,7 +172,7 @@ main.v:1:14: cannot import module "mymodule" (not found)
3| fn main() { 3| fn main() {
``` ```
...oh dear. Can we recover this with gcc? Let's get the symbol name with `nm`: ...oh dear. Can we recover this with gcc? Let's get the symbol name with `nm(1)`:
```console ```console
$ nm hellomodule.o | grep print_1_1'$' $ nm hellomodule.o | grep print_1_1'$'
@ -215,6 +210,7 @@ $ gcc -o hello.o -c hello.c
$ gcc -o main hellomodule.o main.o hello.o $ gcc -o main hellomodule.o main.o hello.o
$ ./main $ ./main
hello, 1 1! hello, 1 1!
$ du -hs main $ du -hs main
179M main 179M main
``` ```
@ -332,6 +328,7 @@ Let's see if you can use it.
``` ```
$ ~/code/v/v help | grep translate $ ~/code/v/v help | grep translate
translate Translates C to V. [wip, will be available in V 0.3] translate Translates C to V. [wip, will be available in V 0.3]
$ ~/code/v/v translate $ ~/code/v/v translate
Translating C to V will be available in V 0.3 (January) Translating C to V will be available in V 0.3 (January)
``` ```
@ -369,3 +366,8 @@ on, etc. This stuff really helps a lot when trying to verify them. Otherwise I
have to guess, and I might get it wrong. I don't know if my benchmark is an entirely have to guess, and I might get it wrong. I don't know if my benchmark is an entirely
fair one, but given the lack of information on how to replicate it it's probably fair one, but given the lack of information on how to replicate it it's probably
going to have to do. going to have to do.
> Dont ever, ever try to lie to the Internet, because they will catch you. They
> will deconstruct your spin. They will remember everything you ever say for
> eternity.
\- Gabe Newell