From e26aba79cb9f37e0eb813758e15dad27f7a7989a Mon Sep 17 00:00:00 2001 From: RangerDevv Date: Tue, 9 May 2023 17:39:59 -0400 Subject: [PATCH 01/35] Revamped the Header --- app.css | 52 +++++++++++++++++++++++++++++++++++++++++++--------- preview.html | 48 +++++++++++++++++++++++------------------------- 2 files changed, 66 insertions(+), 34 deletions(-) diff --git a/app.css b/app.css index 9cdd8f812..328f0a981 100644 --- a/app.css +++ b/app.css @@ -1,3 +1,8 @@ +:root { + color: #000; + font-weight: 500; +} + .select { position: relative; display: inline-block; @@ -97,8 +102,7 @@ body { } a { - color: #4078c0; - text-decoration: none + color: #000; } .flex { @@ -148,7 +152,7 @@ textarea:focus { max-width: calc(100vw - 56px); border-radius: 6px; margin: 0; - color: #c9c5c4; + color: #ffffff; font-size: 15px; position: relative; font-family: "Roboto Mono", "Courier New", Menlo, "DejaVu Sans Mono", Monaco, Courier, monospace @@ -165,7 +169,8 @@ textarea:focus { overflow-y: hidden; line-height: 1.2; font-family: "Roboto Mono", "Courier New", Menlo, "DejaVu Sans Mono", Monaco, Courier, monospace; - white-space: pre-wrap + white-space: pre-wrap; + font-weight: 400; } .codeblock textarea { @@ -353,15 +358,17 @@ textarea:focus { height: 100%; width: 100%; position: sticky; - background: #fff; + -webkit-backdrop-filter: blur(8px); + backdrop-filter: blur(8px); z-index: 100; top: 0; display: flex; - align-items: center + align-items: center; + color: #000; } .header .logo { - width: 32px; + width: 40px; margin-bottom: -3px; margin-right: 16px } @@ -385,7 +392,7 @@ textarea:focus { } .header .nav a:hover { - color:#333; + color:#000; } .header .nav .item { @@ -942,4 +949,31 @@ position:absolute; right:0px; top:50px; text-align:center; display:block; width: .text-center { text-align: center; -} \ No newline at end of file +} + +.dropdown-content { + display: none; + position: absolute; + background-color: #f9f9f9; + min-width: 160px; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + z-index: 1; + } + + .navDropdown:hover .dropdown-content { + display: block; + } + + .navDropdown { + position: relative; + display: inline-block; + } + + .dropdown-content a { + color: black; + padding: 12px 16px; + text-decoration: none; + display: block; + } + + .dropdown-content a:hover {background-color: #f1f1f1} \ No newline at end of file diff --git a/preview.html b/preview.html index 1984fe076..7649c2c34 100644 --- a/preview.html +++ b/preview.html @@ -20,12 +20,19 @@ - + -
+
- +
-
+
@@ -280,7 +278,7 @@

The V Programming Language 0.3

- From 920ac0631c53671bbedabbb9137097fabee86901 Mon Sep 17 00:00:00 2001 From: RangerDevv Date: Tue, 9 May 2023 17:47:54 -0400 Subject: [PATCH 02/35] Added styling for blocks --- app.css | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app.css b/app.css index 328f0a981..b90a0bbed 100644 --- a/app.css +++ b/app.css @@ -707,10 +707,8 @@ textarea:focus { width: calc(100vw - 32px); justify-content: space-around; margin-top: 32px; - background: #fff; - color: #222; + color: #000; border-radius: 6px; - border: 1px solid #efefef } .landing .section h1, @@ -724,6 +722,9 @@ textarea:focus { padding: 18px 16px; margin: 12px; border-radius: 6px; + width: 225px; + border: 1px solid #DCDCDC; + background-color: #F8F8F8; } .landing .section .block td { From 86622c16a4f11b14304668b42c7d92d9b706ac0e Mon Sep 17 00:00:00 2001 From: RangerDevv Date: Tue, 9 May 2023 18:48:29 -0400 Subject: [PATCH 03/35] made some changes to heading and width stuff --- app.css | 9 +++++---- preview.html | 12 +++--------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/app.css b/app.css index b90a0bbed..9632e680f 100644 --- a/app.css +++ b/app.css @@ -713,8 +713,9 @@ textarea:focus { .landing .section h1, .landing .section h2 { - font-weight: 300; - margin: 0 + font-weight: 900; + margin: 0; + font-size: 2rem; } .landing .section .block { @@ -723,8 +724,8 @@ textarea:focus { margin: 12px; border-radius: 6px; width: 225px; - border: 1px solid #DCDCDC; - background-color: #F8F8F8; + border: 1px solid #9b9b9b; + background-color: #dfdede; } .landing .section .block td { diff --git a/preview.html b/preview.html index 7649c2c34..73baad2c8 100644 --- a/preview.html +++ b/preview.html @@ -70,7 +70,7 @@
-

Introducing V: The Programming Language of the Future

+

The V Programming Language 0.3

“simple, fast, safe, compiled language for developing maintainable software”

@@ -502,12 +502,6 @@

Fast compilation

- - - - - -

Small and easy to build compiler

@@ -550,7 +544,7 @@

Small and easy to build compiler

-
+

Innovative and flexible memory management

V avoids doing unnecessary allocations in the first place @@ -585,7 +579,7 @@

Innovative and flexible memory management

-
+

V's autofree demo. All objects are freed during compilation. Running the Ved editor on an 8 MB file with 0 leaks:

From d7256a14dbe30d4f175f200ef562732021436ecb Mon Sep 17 00:00:00 2001 From: RangerDevv Date: Tue, 9 May 2023 19:04:15 -0400 Subject: [PATCH 04/35] implementing the changes and added pre tag highlighting --- app.css | 11 ++++++++++- preview.html | 24 ++++++++++++------------ 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/app.css b/app.css index 9632e680f..ad5d10cba 100644 --- a/app.css +++ b/app.css @@ -741,7 +741,16 @@ textarea:focus { .landing .section .block pre { white-space: pre-wrap; - word-break: break-word + word-break: break-word; + /* a github styled highlight */ + background-color: #f6f8fa; + border-radius: 3px; + font-size: 14px; + line-height: 20px; + overflow: auto; + padding: 16px; + margin-bottom: 5px; + border: 1px solid #d1d5da; } .landing ul { diff --git a/preview.html b/preview.html index 73baad2c8..7ebb4390c 100644 --- a/preview.html +++ b/preview.html @@ -503,7 +503,7 @@

Fast compilation

-
+

Small and easy to build compiler

V can be bootstrapped in under a second by compiling its code translated to C with a simple

cc v.c
No libraries or dependencies needed. @@ -526,7 +526,7 @@

Small and easy to build compiler

<1s
-
+

Building V in 0.3 seconds and then using the resulting binary to build itself again:

@@ -544,7 +544,7 @@

Small and easy to build compiler

-
+

Innovative and flexible memory management

V avoids doing unnecessary allocations in the first place @@ -645,7 +645,7 @@

Hot code reloading

-
+ -
+
-
+

Native cross-platform GUI library

Build native apps with native controls. You no longer need to embed a browser to develop cross-platform apps quickly.

@@ -678,23 +678,23 @@

Native cross-platform GUI library

github.com/vlang/ui

-
+

Volt, a 300 KB Slack client built with V and V ui:

- +
-
+

Easy cross compilation

To cross compile your software simply run v -os windows. or v -os linux. No extra steps required, even for GUI and graphical apps!

(Compiling macOS software only works on macOS for now.)

-
+ -
['/post/:id'] +
['/post/:id'] fn (b Blog) show_post(id int) vweb.Result { post := b.posts_repo.retrieve(id) or { return vweb.not_found() @@ -896,7 +896,7 @@

Built-in ORM

Run
-
import sqlite +
import sqlite struct Customer { id int From 6f1e2ec9e22a564fba3cb01dc7cbba48224e9f24 Mon Sep 17 00:00:00 2001 From: RangerDevv Date: Tue, 9 May 2023 19:46:47 -0400 Subject: [PATCH 05/35] More changes to the layouts where you dont need the blocks --- preview.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/preview.html b/preview.html index 7ebb4390c..5a8932d56 100644 --- a/preview.html +++ b/preview.html @@ -595,7 +595,7 @@

Innovative and flexible memory management

-
+

C translation

V can translate your entire C project and offer you the safety, simplicity, and compilation speed-up (via modules).

@@ -616,7 +616,7 @@

C translation

C++ to V translation is at an early stage.

-
+

Translating DOOM from C to V and building it in under a second:

@@ -678,11 +678,11 @@

Native cross-platform GUI library

github.com/vlang/ui

-
+

Volt, a 300 KB Slack client built with V and V ui:

- +
@@ -1005,7 +1005,7 @@

Built-in ORM

-
+

Built in V

From f2ccb9ee1e9114c9cd9e99a8985d39f26a06050a Mon Sep 17 00:00:00 2001 From: RangerDevv Date: Tue, 9 May 2023 20:37:51 -0400 Subject: [PATCH 06/35] Changed hyperlink decoration and added overflow scroll to the news section --- app.css | 23 +++++- preview.html | 206 +++++++++++++++++++++++++-------------------------- 2 files changed, 123 insertions(+), 106 deletions(-) diff --git a/app.css b/app.css index ad5d10cba..e4aa76fe3 100644 --- a/app.css +++ b/app.css @@ -102,7 +102,13 @@ body { } a { - color: #000; + color: #483bfa; + text-decoration: none +} + +a:hover { + text-decoration: underline; + transition: all .2s ease-in-out; } .flex { @@ -945,8 +951,17 @@ position:absolute; right:0px; top:50px; text-align:center; display:block; width: .news { font-size: 80%; margin-top: 0 !important; - flex-direction: column; + display: grid; + grid-template-columns: auto auto auto; + overflow-x: scroll; + overflow-y: hidden; + +@media (min-width: 800px) { + .news { + grid-template-columns: auto auto; + } } + .news .container { display: flex } @@ -987,4 +1002,6 @@ position:absolute; right:0px; top:50px; text-align:center; display:block; width: display: block; } - .dropdown-content a:hover {background-color: #f1f1f1} \ No newline at end of file + .dropdown-content a:hover { + background-color: #f1f1f1; + } \ No newline at end of file diff --git a/preview.html b/preview.html index 5a8932d56..b0edfcf15 100644 --- a/preview.html +++ b/preview.html @@ -358,66 +358,66 @@

Latest news
+ +
+
+
+ June 30, 2022 +
+
+ V 0.3 is out! -
-
- Latest news
-
+
+
-
-
- June 30, 2022 -
- -
- -
-
- June 22, 2022 -
-
- C2V is out! Demo video: + -
-
- June 10, 2022 -
- -
+
+
+
+
+ June 10, 2022 +
+ +
-
-
- June 9, 2022 -
-
- As of today, programs built with the V compiler no longer leak memory by default. -
-
+
+
+ June 9, 2022 +
+
+ As of today, programs built with the V compiler no longer leak memory by default. +
+
-
-
- May 29, 2022 -
-
- 7000 pull requests have been merged! -
-
+
+
+ May 29, 2022 +
+
+7000 pull requests have been merged! +
+
-
+
+ +

Why V?

+
@@ -454,6 +454,57 @@

Safety

+
+
+

Painless deployments and dependency management

+

+ To build your project, no matter how big, all you need to do is run +

+v .
+

+ No build environments, makefiles, headers, virtual environments, etc.
+ You get a single statically linked binary that is guaranteed to work on all operating systems (provided you cross compile) without any dependencies.

+ Installing new libraries via vpm, a centralized package manager written in V, is as simple as +
+v install ui
+		
+

+
+
+

Run everywhere

+

+ V can emit (human readable) C, so you get the great platform support and optimization of GCC and Clang. (Use v -prod . to make optimized builds.)

+ Emitting C will always be an option, even after direct machine code generation matures.

+ V can call C code, and calling V code is possible in any language that has C interop. +

+
+
+ +
+
+

REPL

+
v
+>>> import net.http
+>>> data := http.get('https://vlang.io/utc_now')?
+>>> data.text
+1565977541
+
+
+

Cross-platform shell scripts in V

+

+ 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, and cross-platform support. "V scripts" run on Unix-like systems as well as on Windows. +

+
for file in ls('build/') {
+  rm(file)
+}
+mv('v.exe', 'build/')
+
+v run deploy.vsh
+

Read more about V script

+
+
@@ -630,7 +681,7 @@

C translation

-
+

Hot code reloading

Get your changes instantly without recompiling. @@ -639,7 +690,7 @@

Hot code reloading

github.com/.../examples/hot_reload
-
+
@@ -702,57 +753,6 @@

Easy cross compilation

-
-
-

Painless deployments and dependency management

-

- To build your project, no matter how big, all you need to do is run -

-v .
-

- No build environments, makefiles, headers, virtual environments, etc.
- You get a single statically linked binary that is guaranteed to work on all operating systems (provided you cross compile) without any dependencies.

- Installing new libraries via vpm, a centralized package manager written in V, is as simple as -
-v install ui
-		
-

-
-
-

Run everywhere

-

- V can emit (human readable) C, so you get the great platform support and optimization of GCC and Clang. (Use v -prod . to make optimized builds.)

- Emitting C will always be an option, even after direct machine code generation matures.

- V can call C code, and calling V code is possible in any language that has C interop. -

-
-
- -
-
-

REPL

-
v
->>> import net.http
->>> data := http.get('https://vlang.io/utc_now')?
->>> data.text
-1565977541
-
-
-

Cross-platform shell scripts in V

-

- 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, and cross-platform support. "V scripts" run on Unix-like systems as well as on Windows. -

-
for file in ls('build/') {
-  rm(file)
-}
-mv('v.exe', 'build/')
-
-v run deploy.vsh
-

Read more about V script

-
-
From c45c53d1fac61a9335f9efce348efe18a9e28d50 Mon Sep 17 00:00:00 2001 From: RangerDevv Date: Tue, 9 May 2023 21:53:48 -0400 Subject: [PATCH 07/35] Added my name in website and added text highlights --- app.css | 29 +++++++++++---------- preview.html | 73 ++++++++++++++++++++++++++-------------------------- 2 files changed, 51 insertions(+), 51 deletions(-) diff --git a/app.css b/app.css index e4aa76fe3..e3cc7f06b 100644 --- a/app.css +++ b/app.css @@ -414,18 +414,18 @@ textarea:focus { color: #222b38 } - .header .donate-button .paypal { - width: 80px; - height: 33px; - background: #3b7bbf; - margin-bottom: 3px; - border-radius: 3px; - color: #fff; - text-align: center; - line-height: 32px; - font-size: 15px; - margin-left: 10px; - } +.header .donate-button .paypal { + width: 80px; + height: 33px; + background: #3b7bbf; + margin-bottom: 3px; + border-radius: 3px; + color: #fff; + text-align: center; + line-height: 32px; + font-size: 15px; + margin-left: 10px; +} @media (max-width:1100px) { .header { position: static; @@ -731,7 +731,7 @@ textarea:focus { border-radius: 6px; width: 225px; border: 1px solid #9b9b9b; - background-color: #dfdede; + background-color: #d2d2d26d; } .landing .section .block td { @@ -955,6 +955,7 @@ position:absolute; right:0px; top:50px; text-align:center; display:block; width: grid-template-columns: auto auto auto; overflow-x: scroll; overflow-y: hidden; +} @media (min-width: 800px) { .news { @@ -1004,4 +1005,4 @@ position:absolute; right:0px; top:50px; text-align:center; display:block; width: .dropdown-content a:hover { background-color: #f1f1f1; - } \ No newline at end of file + } diff --git a/preview.html b/preview.html index b0edfcf15..46e676e59 100644 --- a/preview.html +++ b/preview.html @@ -28,17 +28,17 @@
- Tutorials Stdlib Docs vpm Blog - Playground - Built in V - --> + + + Latest news
@@ -393,7 +394,6 @@

RedMonk Q122 Programming Language Rankings.

-
June 9, 2022 @@ -402,8 +402,6 @@

May 29, 2022 @@ -412,10 +410,9 @@

Why V?

From e8fcd240908ed8e48ab55c7577e3c6aa9e0bed5c Mon Sep 17 00:00:00 2001 From: RangerDevv Date: Wed, 10 May 2023 10:49:07 -0400 Subject: [PATCH 09/35] Pre tag highlight --- app.css | 47 ++++++++++++++++++++++++++++++++++++----------- preview.html | 4 ++-- 2 files changed, 38 insertions(+), 13 deletions(-) diff --git a/app.css b/app.css index d3c667f9b..797d4c1be 100644 --- a/app.css +++ b/app.css @@ -751,15 +751,12 @@ textarea:focus { .landing .section .block pre { white-space: pre-wrap; word-break: break-word; - /* a github styled highlight */ - background-color: #f6f8fa; - border-radius: 3px; - font-size: 14px; - line-height: 20px; - overflow: auto; - padding: 16px; - margin-bottom: 5px; - border: 1px solid #d1d5da; + background: #334; + padding: 12px; + max-width: calc(100vw - 56px); + border-radius: 6px; + margin: 0; + color: #ffffff; } .landing ul { @@ -954,8 +951,10 @@ position:absolute; right:0px; top:50px; text-align:center; display:block; width: .news { font-size: 80%; margin-top: 0 !important; - display: grid; - grid-template-columns: auto auto auto; + display: flex; + max-width: 1100px; + width: calc(100vw - 32px); + justify-content: space-around; overflow-x: scroll; overflow-y: hidden; } @@ -969,6 +968,18 @@ position:absolute; right:0px; top:50px; text-align:center; display:block; width: .news .container { display: flex } + + +.news .block { + flex: 1; + padding: 18px 16px; + margin: 12px; + border-radius: 6px; + width: 225px; + border: 1px solid #9b9b9b; + background-color: #d2d2d26d; +} + .news_header{ text-align:center; padding-top: 1rem; @@ -1009,3 +1020,17 @@ position:absolute; right:0px; top:50px; text-align:center; display:block; width: .dropdown-content a:hover { background-color: #f1f1f1; } + + .link { + display: flex; + justify-content: space-between; + } + + .link .block { + background-color: #d2d2d26d; + border: 1px solid #9b9b9b; + border-radius: 6px; + padding: 18px 16px; + margin: 12px; + width: auto; + } \ No newline at end of file diff --git a/preview.html b/preview.html index fb197f47c..ac2ffe000 100644 --- a/preview.html +++ b/preview.html @@ -351,7 +351,7 @@

Is V still fast? FAQ Changelog @@ -361,7 +361,7 @@

Latest news
-
+
June 30, 2022 From 744ec1c0cec9121fae017cf6e42f4e617187782b Mon Sep 17 00:00:00 2001 From: RangerDevv Date: Wed, 10 May 2023 12:53:04 -0400 Subject: [PATCH 10/35] added background pattern and fixed CLS --- app.css | 26 +++++----- preview.html | 133 +++++++++++++++++++++++++-------------------------- 2 files changed, 81 insertions(+), 78 deletions(-) diff --git a/app.css b/app.css index 797d4c1be..418105aef 100644 --- a/app.css +++ b/app.css @@ -90,7 +90,7 @@ body { .content { grid-area: content; height: 100%; - width: 100% + width: 100%; } #app { @@ -523,7 +523,7 @@ textarea:focus { display: flex; padding: 8px 8px 8px 6px; align-items: center; - color: #333 + color: #000000 } .landing .hero .button .options-container .options .dl-option .name { @@ -532,7 +532,7 @@ textarea:focus { } .landing .hero .button .options-container .options .dl-option .size { - color: #818e9c; + color: #000000; font-size: 15px } @@ -703,8 +703,9 @@ textarea:focus { flex-direction: column; justify-content: flex-start; align-items: center; - background: linear-gradient(168deg, #fff 800px, #f6f9fc 800px); - padding-bottom: 32px + padding-bottom: 32px; +background-image: radial-gradient(#444cf7 0.5px, transparent 0.5px), radial-gradient(#444cf7 0.5px, transparent 0.5px); +background-size: 20px 20px; } .landing .section { @@ -728,13 +729,15 @@ textarea:focus { flex: 1; padding: 18px 16px; margin: 12px; - border-radius: 6px; + border-radius: 15px; width: 225px; /* border: 1px solid #9b9b9b; */ /* background-color: #d2d2d26d; */ background-color: transparent; /* A somewhat big shadow */ box-shadow: 0 0 15px 0 rgba(0, 0, 0, .2); + /* background-image: radial-gradient(#444cf7 0.5px, transparent 0.5px); + background-size: 10px 10px; */ } .landing .section .block td { @@ -771,7 +774,8 @@ textarea:focus { @media (max-width:1500px) { .landing .hero .examples .codeblock { - min-width: auto + min-width: auto; + max-width: 100% } } @@ -829,7 +833,7 @@ textarea:focus { .playground .editor .codeblock, .playground .editor .output { flex: 1; - margin: 6px + margin: 6px; } .playground .select { @@ -1027,9 +1031,9 @@ position:absolute; right:0px; top:50px; text-align:center; display:block; width: } .link .block { - background-color: #d2d2d26d; - border: 1px solid #9b9b9b; - border-radius: 6px; + background-color: #5D87BF; + color: white; + border-radius: 10px; padding: 18px 16px; margin: 12px; width: auto; diff --git a/preview.html b/preview.html index ac2ffe000..609303f51 100644 --- a/preview.html +++ b/preview.html @@ -180,21 +180,20 @@

- -

-
-
-
-
-
fn main() {
-    areas := ['game', 'web', 'tools', 'science', 'systems',
-              'embedded', 'drivers', 'GUI', 'mobile']
-    for area in areas {
-        println('Hello, $area developers!')
-    }
+  
+ +
+
+
+
+
+
fn main() {
+   areas := ['game', 'web', 'tools', 'science', 'systems',
+             'embedded', 'drivers', 'GUI', 'mobile']
+   for area in areas {
+       println('Hello, $area developers!')
+   }
 }
-

-
-
+

+

Sponsors

From b7f4cb4cb3d4405159c053d64e2042bf1426eb97 Mon Sep 17 00:00:00 2001 From: RangerDevv Date: Thu, 11 May 2023 19:02:21 -0400 Subject: [PATCH 27/35] Update preview.html --- preview.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/preview.html b/preview.html index 6786d1a16..fac7d8869 100644 --- a/preview.html +++ b/preview.html @@ -891,7 +891,8 @@

Friendly error messages

Powerful built-in web framework

-

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

+

A simple yet powerful web server with built-in routing, parameter handling, templating, and other features.

+

Lean More Here

From 0f80f4cf00cb6d798c2e0e246411128453df4c7d Mon Sep 17 00:00:00 2001 From: RangerDevv Date: Thu, 11 May 2023 19:05:20 -0400 Subject: [PATCH 28/35] Div bug fix --- preview.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/preview.html b/preview.html index fac7d8869..ef93a6841 100644 --- a/preview.html +++ b/preview.html @@ -718,7 +718,7 @@

C translation

C++ to V translation is at an early stage.

-
+

Translating DOOM from C to V and building it in under a second:

@@ -938,6 +938,7 @@

Powerful built-in web framework

+

Built-in ORM

From 6a8609249e42b32073605b8ecd379ee3716e7e90 Mon Sep 17 00:00:00 2001 From: RangerDevv Date: Fri, 12 May 2023 12:34:34 -0400 Subject: [PATCH 29/35] Update preview.html --- preview.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preview.html b/preview.html index ef93a6841..b66ee8de6 100644 --- a/preview.html +++ b/preview.html @@ -936,7 +936,7 @@

Powerful built-in web framework

Gitly, a light and fast alternative to GitHub/GitLab is built in V and vweb.

- +
From 95f7191d4431b8c336cdbb7e287ee94face46458 Mon Sep 17 00:00:00 2001 From: RangerDevv Date: Fri, 12 May 2023 12:41:43 -0400 Subject: [PATCH 30/35] Moved to index.html and the actual website is ready. --- _layout.html | 154 ++++++++--- index.html | 738 ++++++++++++++++++++++++--------------------------- preview.html | 2 +- 3 files changed, 464 insertions(+), 430 deletions(-) diff --git a/_layout.html b/_layout.html index ec69106b4..849d53c36 100644 --- a/_layout.html +++ b/_layout.html @@ -16,45 +16,123 @@
-
-
- - - - @end @define "footer" diff --git a/index.html b/index.html index 9835b7025..dd3f8627c 100644 --- a/index.html +++ b/index.html @@ -8,18 +8,18 @@
-

The V Programming Language 0.3 beta

-

Simple, fast, safe, compiled. For developing maintainable software.

- +

Programming Language

+

“simple, fast, safe, compiled language for developing maintainable software”

+
github.com/vlang/v - 33k + 30k
-
+
-
-
-
-

Latest news

-
-
- -
-
- January 30, 2023 -
- -
- -
-
- October 31, 2022 -
- -
- -
-
- August 31, 2022 -
- -
- -
-
- June 30, 2022 -
- -
- -
-
- June 22, 2022 -
-
- C2V is out! Demo video: +

Latest news


+ + -
-
-
- June 10, 2022 -
- -
-
-
- June 9, 2022 -
-
- As of today, programs built with the V compiler no longer leak memory by default. -
-
+
+
+ June 22, 2022 +
+
+ C2V is out! Demo video: - +
+
+
+
+ June 10, 2022 +
+ +
+
+
+ June 9, 2022 +
+
+ As of today, programs built with the V compiler no longer leak memory by default. +
+
+
+
+ May 29, 2022 +
+
+7000 pull requests have been merged! +
+
+
-
+ -
+

Why V?

+
@@ -423,6 +375,7 @@

Safety

+
+
+

Painless deployments and dependency management

+

+ To build your project, no matter how big, all you need to do is run +

+v .
+

+ No build environments, makefiles, headers, virtual environments, etc.
+ You get a single statically linked binary that is guaranteed to work on all operating systems (provided you cross compile) without any dependencies.

+ Installing new libraries via vpm, a centralized package manager written in V, is as simple as +
+v install ui
+		
+

+
+
+

Run everywhere

+

+ V can emit (human readable) C, so you get the great platform support and optimization of GCC and Clang. (Use v -prod . to make optimized builds.)

+ Emitting C will always be an option, even after direct machine code generation matures.

+ V can call C code, and calling V code is possible in any language that has C interop. +

+
+
+ +
+
+

REPL

+
v
+>>> import net.http
+>>> data := http.get('https://vlang.io/utc_now')?
+>>> data.text
+1565977541
+
+
+

Cross-platform shell scripts in V

+

+ V can be used as an alternative to Bash to write deployment scripts, build scripts, etc. -

-
-

Partners & Sponsors

-
- - - - - - - - - - - - - - - +The advantage of using V for this is the simplicity and predictability of the language, and cross-platform support. "V scripts" run on Unix-like systems as well as on Windows. +

+
for file in ls('build/') {
+  rm(file)
+}
+mv('v.exe', 'build/')
+
+v run deploy.vsh
+

Read more about V script

- - Become a sponsor via GitHub Sponsors - -

Performance

    +
  • As fast as C (V's main backend compiles to human readable C)
  • C interop without any costs
  • Minimal amount of allocations
  • Built-in serialization without runtime reflection
  • -
  • Compiles to native binaries without any dependencies: a simple web server is only about 250 KB
  • -
  • As fast as C (V's main backend compiles to human readable C), - with equivalent code. -
    V does introduce some overhead for safety (such as array bounds checking, GC free), but these features can be disabled/bypassed when performance is more important. -
  • +
  • Compiles to native binaries without any dependencies: a simple web server is only 65 KB
@@ -491,37 +465,37 @@

Fast compilation

- - - - - -
-
-

Small and easy to build compiler

+
+

Small and easy to build compiler

V can be bootstrapped in under a second by compiling its code translated to C with a simple

cc v.c
No libraries or dependencies needed.

- For comparison, space and time required to build each compiler: + For comparison, space and time required to build each compiler. The lines show the amount of time that it takes to build:

+ + + + + + +
Space  Build time
Go525 MB1m 33s
Rust30 GB45m
GCC8 GB50m
Clang90 GB [0] 60m
Swift70 GB [1] 90m
V< 10 MB [2] - <1s
1s
-
-
-

Flexible memory management

+
+

Innovative and flexible memory management

V avoids doing unnecessary allocations in the first place by using value types, string buffers, promoting a simple abstraction-free code style.

- There are 4 ways to manage memory in V. -

-

- The default is a minimal and a well performing tracing GC. - + Right now allocations are handled by a minimal and well performing GC until V's autofree engine is production ready.

- The second way is autofree, it can be enabled with -autofree. It takes care of most objects (~90-100%): + Autofree can be enabled with -autofree. It takes care of most objects (~90-100%): the compiler inserts necessary free calls automatically during compilation. Remaining small percentage of objects is freed via GC. The developer doesn't need to change anything in their code. "It just works", @@ -588,7 +548,7 @@

Flexible memory management

-
+

V's autofree demo. All objects are freed during compilation. Running the Ved editor on an 8 MB file with 0 leaks:

@@ -604,7 +564,7 @@

Flexible memory management

-
+

C translation

V can translate your entire C project and offer you the safety, simplicity, and compilation speed-up (via modules).

@@ -625,7 +585,7 @@

C translation

C++ to V translation is at an early stage.

-
+

Translating DOOM from C to V and building it in under a second:

@@ -639,7 +599,7 @@

C translation

-
+

Hot code reloading

Get your changes instantly without recompiling. @@ -648,126 +608,69 @@

Hot code reloading

github.com/.../examples/hot_reload
-
+
-
-

A powerful graphics library

+
-
- +
+
-
-

Light and fast cross-platform GUI library

+
+

Native cross-platform GUI library

- Build native UI apps with V UI. You no longer need to embed a browser to develop cross-platform apps quickly.

- V has a UI module that uses custom drawing, similar to Qt and Flutter, but with as much similarity to the native GUI toolkit as possible. -

-

- It has a declarative API similar to SwiftUI and React Native and runs on Windows, Linux, macOS, and Android. -

-

+ Build native apps with native controls. You no longer need to embed a browser to develop cross-platform apps quickly.

+ V has a ui module that uses native GUI toolkits: WinAPI/GDI+ on Windows, Cocoa on macOS. On Linux custom drawing is used.

Coming soon:

  • a Delphi-like visual editor for building native GUI apps
  • -
  • iOS support
  • +
  • iOS/Android support with native controls
  • +
  • a declarative API similar to SwiftUI and React Native

github.com/vlang/ui

-
+

- Volt, a 300 KB Slack client built with V and V UI: + Volt, a 300 KB Slack client built with V and V ui:

- +
-
+

Easy cross compilation

- To cross compile your software simply run v -os windows or v -os linux. No extra steps required, even for GUI and graphical apps!

+ To cross compile your software simply run v -os windows. or v -os linux. No extra steps required, even for GUI and graphical apps!

(Compiling macOS software only works on macOS for now.)

-
+

Building V for Windows using V for macOS, and then testing resulting v.exe on a Windows VM:

-
-
- -
-
-

Painless deployments and dependency management

-

- To build your project, no matter how big, all you need to do is run -

-v .
-

- No build environments, makefiles, headers, virtual environments, etc.
- You get a single statically linked binary that is guaranteed to work on all operating systems (provided you cross compile) without any dependencies.

- Installing new libraries via vpm, a centralized package manager written in V, is as simple as -
-v install ui
-		
-

-
-
-

Run everywhere

-

- V can emit (human readable) C, so you get the great platform support and optimization of GCC and Clang. (Use v -prod . to make optimized builds.)

- Emitting C will always be an option, even after direct machine code generation matures.

- V can call C code, and calling V code is possible in any language that has C interop. -

+
-
-
-

REPL

-
v
->>> import net.http
->>> data := http.get('https://vlang.io/utc_now')?
->>> data.text
-1565977541
-
-
-

Cross-platform shell scripts in V

-

- 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, and cross-platform support. "V scripts" run on Unix-like systems as well as on Windows. -

-
for file in ls('build/') {
-  rm(file)
-}
-mv('v.exe', 'build/')
-
-v run deploy.vsh
-

Read more about V script

-
-
@@ -853,18 +756,18 @@

Friendly error messages

-
-

Powerful built-in web framework Vweb

-

Vweb is very fast, it compiles into a single binary (html templates are also compiled), supports hot code reloading - (the website is automatically updated in the browser once you change any .v/.html file). -

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

+
+

Powerful built-in web framework

+

A simple yet powerful web server with built-in routing, parameter handling, templating, and other features.

+

Lean More Here

+ Run
-
['/post/:id'] +
['/post/:id'] fn (b Blog) show_post(id int) vweb.Result { post := b.posts_repo.retrieve(id) or { return vweb.not_found() @@ -877,7 +780,6 @@

Powerful built-in web framework Vweb

} return vweb.view(post) }
-
-

Gitly, a light and fast alternative to GitHub/GitLab is built in V and vweb.

+

Gitly, a light and fast alternative to GitHub/GitLab is built in V and vweb.

+
+ +
+
-
-

Built-in ORM

-

+

+

Built-in ORM

+

-

+
-
-
-
+
+
+ Run +
-
import db.sqlite +
import sqlite struct Customer { - id int - name string - nr_orders int - country string +id int +name string +nr_orders int +country string } fn main() { - db := sqlite.connect('example.sqlite') or { - panic('could not create/find example.sqlite') - } +db := sqlite.connect('example.sqlite') or { +panic('could not create/find example.sqlite') +} - nr_customers := sql db { - select count from Customer - }! - println('number of all customers: ${nr_customers}') +nr_customers := sql db { +select count from Customer +} +println('number of all customers: $nr_customers') - // V syntax can be used to build queries - uk_customers := sql db { - select from Customer where country == 'uk' && nr_orders > 0 - }! +// V syntax can be used to build queries +uk_customers := sql db { +select from Customer where country == 'uk' && nr_orders > 0 +} - for customer in uk_customers { - println('${customer.id} - ${customer.name}') - } +for customer in uk_customers { +println('$customer.id - $customer.name') +} - // by adding `limit 1` we tell V that there will be - // only one object - customer := sql db { - select from Customer where id == 1 limit 1 - }! - println(customer.name) - - // insert a new customer - new_customer := Customer{name: 'Bob', nr_orders: 10} - sql db { - insert new_customer into Customer - }! +// by adding `limit 1` we tell V that there will be +// only one object +customer := sql db { +select from Customer where id == 1 limit 1 } -
-
+println(customer.name) + +// insert a new customer +new_customer := Customer{name: 'Bob', nr_orders: 10} +sql db { +insert new_customer into Customer +} +} +
-

+

+
+ +
+
+

Sponsors

+
+ + Become a sponsor via GitHub Sponsors +
-
-

Built in V

+
+

Built in V

V

@@ -1021,7 +989,7 @@

Filey

V UI

-

Cross-platform widget toolkit.

+

Cross-platform widget toolkit using native APIs.

@@ -1042,18 +1010,6 @@

Filey

A curated list of awesome V frameworks, libraries and software

-
-

The V Tensor Library

-

An n-dimensional Tensor data structure, sophisticated reduction, elementwise, and accumulation operations, data Structures that can easily be passed to C libraries, powerful linear algebra routines backed by VSL. -

-
-
-

The V Scientific Library -

-

A Scientific Library with a great variety of different modules.

-
- -

Are you using V to build your product or library? Have it added to this list.

@@ -1061,7 +1017,7 @@

Filey

- Web design by Leah. + Web design by Leah RangerDevv. logo by Sonovice and Don. diff --git a/preview.html b/preview.html index b66ee8de6..2bbc9be0f 100644 --- a/preview.html +++ b/preview.html @@ -489,7 +489,7 @@

-

%simple language for maintainable programs

+

%simple_language_for_maintainable_programs

You can learn the entire language by going through the documentation over a weekend, and in most cases there's only one way to do something. From fb65848825376e005265df07290ebe7ffa9a15f1 Mon Sep 17 00:00:00 2001 From: RangerDevv Date: Fri, 12 May 2023 12:58:25 -0400 Subject: [PATCH 31/35] Update app.css --- app.css | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app.css b/app.css index a1696383e..d1c4756b3 100644 --- a/app.css +++ b/app.css @@ -203,9 +203,7 @@ textarea:focus { .codeblock .titlebar { display: flex; align-items: center; - margin-bottom: 6px; position: relative; - top: -2px } .codeblock .play-btn { @@ -777,12 +775,22 @@ textarea:focus { font-size: 14px } -@media (max-width:1500px) { +@media (max-width:800px) { .landing .hero .examples .codeblock { - width: 100% + width: 100%; + height: 10rem; + overflow-y: scroll; + white-space: pre-wrap; } } +.landing .hero .examples .codeblock { + width: 35rem; + height: 10rem; + overflow-y: scroll; + white-space: pre-wrap; +} + @media (max-width:1200px) { .landing .hero { margin: 32px 0; From 37096eac58e4132c2fe8b6e3acb54c12b94158b1 Mon Sep 17 00:00:00 2001 From: RangerDevv Date: Fri, 12 May 2023 15:15:10 -0400 Subject: [PATCH 32/35] styling fix for extra padding --- app.css | 4 ++-- index.html | 3 --- preview.html | 3 --- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/app.css b/app.css index d1c4756b3..cae326be0 100644 --- a/app.css +++ b/app.css @@ -154,7 +154,7 @@ textarea:focus { .codeblock { background: #334; - padding: 12px 12px 4px 12px; + padding: 12px; max-width: calc(100vw - 56px); border-radius: 6px; margin: 0; @@ -786,7 +786,7 @@ textarea:focus { .landing .hero .examples .codeblock { width: 35rem; - height: 10rem; + height: 15rem; overflow-y: scroll; white-space: pre-wrap; } diff --git a/index.html b/index.html index dd3f8627c..b3d205ad1 100644 --- a/index.html +++ b/index.html @@ -123,9 +123,6 @@

-
-
-
fn main() {
    areas := ['game', 'web', 'tools', 'science', 'systems',
              'embedded', 'drivers', 'GUI', 'mobile']
diff --git a/preview.html b/preview.html
index 2bbc9be0f..58995f890 100644
--- a/preview.html
+++ b/preview.html
@@ -256,9 +256,6 @@ 

-
-
-
fn main() {
    areas := ['game', 'web', 'tools', 'science', 'systems',
              'embedded', 'drivers', 'GUI', 'mobile']

From b38535ad2934199f9dafeab8ea0823384abf51c7 Mon Sep 17 00:00:00 2001
From: RangerDevv 
Date: Fri, 12 May 2023 21:35:40 -0400
Subject: [PATCH 33/35] Implementing feedback that people gave

---
 app.css      | 10 +++++-----
 index.html   | 12 ++++++------
 preview.html | 26 +++++++++++++-------------
 3 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/app.css b/app.css
index cae326be0..af62ce3db 100644
--- a/app.css
+++ b/app.css
@@ -1,6 +1,6 @@
 :root {
 	color: #000;
-	font-weight: 500;
+	/* font-weight: 500; */
 }
 
 .select {
@@ -721,9 +721,8 @@ textarea:focus {
 
 .landing .section h1,
 .landing .section h2 {
-	font-weight: 900;
-	margin: 0;
-	font-size: 2rem;
+	font-weight: 300;
+	margin: 0
 }
 
 .landing .section .block {
@@ -733,7 +732,8 @@ textarea:focus {
 	border-radius: 15px;
 	width: 225px;
 	background-color: transparent;
-	border: 2.5px solid #5e5e5e5d;
+	border: 0.2px solid #5e5e5e25;
+	
 }
 
 @media (max-width: 600px) {
diff --git a/index.html b/index.html
index b3d205ad1..c4771a264 100644
--- a/index.html
+++ b/index.html
@@ -473,23 +473,23 @@ 

Small and easy to build compil - + - + - + - + - + - +
Space  Build time
Go525 MB1m 33s
Rust30 GB45m
GCC8 GB50m
Clang90 GB [0] 60m
Swift70 GB [1] 90m
V< 10 MB [2] 1s

diff --git a/preview.html b/preview.html index 58995f890..614dd8c00 100644 --- a/preview.html +++ b/preview.html @@ -521,7 +521,7 @@

Safety

-

Painless deployments and dependency management

+

Painless deployments and dependency management

To build your project, no matter how big, all you need to do is run

@@ -536,7 +536,7 @@ 

Painless deployments and depen

-

Run everywhere

+

Run everywhere

V can emit (human readable) C, so you get the great platform support and optimization of GCC and Clang. (Use v -prod . to make optimized builds.)

Emitting C will always be an option, even after direct machine code generation matures.

@@ -555,7 +555,7 @@

REPL

1565977541

-

Cross-platform shell scripts in V

+

Cross-platform shell scripts in V

V can be used as an alternative to Bash to write deployment scripts, build scripts, etc. @@ -597,7 +597,7 @@

Fast compilation

-

Small and easy to build compiler

+

Small and easy to build compiler

V can be bootstrapped in under a second by compiling its code translated to C with a simple

cc v.c
No libraries or dependencies needed.

@@ -606,23 +606,23 @@

Small and easy to build compil - + - + - + - + - + - +
Space  Build time
Go525 MB1m 33s
Rust30 GB45m
GCC8 GB50m
Clang90 GB [0] 60m
Swift70 GB [1] 90m
V< 10 MB [2] 1s

@@ -644,7 +644,7 @@

Small and easy to build compil
-

Innovative and flexible memory management

+

Innovative and flexible memory management

V avoids doing unnecessary allocations in the first place by using value types, string buffers, promoting a simple abstraction-free code style. @@ -745,7 +745,7 @@

Hot code reloading

-

Powerful graphics libraries

+

Powerful graphics libraries

Cross-platform drawing library built on top of GDI+/Cocoa Drawing, and an OpenGL based graphics library for more complex 2D/3D applications, that will also have the following features:

@@ -764,7 +764,7 @@

Powerful graphics libraries
-

Native cross-platform GUI library

+

Native cross-platform GUI library

Build native apps with native controls. You no longer need to embed a browser to develop cross-platform apps quickly.

V has a ui module that uses native GUI toolkits: WinAPI/GDI+ on Windows, Cocoa on macOS. On Linux custom drawing is used.

From 0ba8cc907edf1a50648d0481249cf9c1b2ab4bb0 Mon Sep 17 00:00:00 2001 From: RangerDevv Date: Fri, 12 May 2023 21:36:32 -0400 Subject: [PATCH 34/35] Updating the feedback that people gave --- index.html | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index c4771a264..62a88e8f2 100644 --- a/index.html +++ b/index.html @@ -388,7 +388,7 @@

Safety

-

Painless deployments and dependency management

+

Painless deployments and dependency management

To build your project, no matter how big, all you need to do is run

@@ -403,7 +403,7 @@ 

Painless deployments and depen

-

Run everywhere

+

Run everywhere

V can emit (human readable) C, so you get the great platform support and optimization of GCC and Clang. (Use v -prod . to make optimized builds.)

Emitting C will always be an option, even after direct machine code generation matures.

@@ -422,7 +422,7 @@

REPL

1565977541

-

Cross-platform shell scripts in V

+

Cross-platform shell scripts in V

V can be used as an alternative to Bash to write deployment scripts, build scripts, etc. @@ -464,7 +464,7 @@

Fast compilation

-

Small and easy to build compiler

+

Small and easy to build compiler

V can be bootstrapped in under a second by compiling its code translated to C with a simple

cc v.c
No libraries or dependencies needed.

@@ -473,23 +473,23 @@

Small and easy to build compil - + - + - + - + - + - +
Space  Build time
Go525 MB1m 33s
Rust30 GB45m
GCC8 GB50m
Clang90 GB [0] 60m
Swift70 GB [1] 90m
V< 10 MB [2] 1s

@@ -511,7 +511,7 @@

Small and easy to build compil
-

Innovative and flexible memory management

+

Innovative and flexible memory management

V avoids doing unnecessary allocations in the first place by using value types, string buffers, promoting a simple abstraction-free code style. @@ -612,7 +612,7 @@

Hot code reloading

-

Powerful graphics libraries

+

Powerful graphics libraries

Cross-platform drawing library built on top of GDI+/Cocoa Drawing, and an OpenGL based graphics library for more complex 2D/3D applications, that will also have the following features:

@@ -631,7 +631,7 @@

Powerful graphics libraries
-

Native cross-platform GUI library

+

Native cross-platform GUI library

Build native apps with native controls. You no longer need to embed a browser to develop cross-platform apps quickly.

V has a ui module that uses native GUI toolkits: WinAPI/GDI+ on Windows, Cocoa on macOS. On Linux custom drawing is used.

From bb569714f6f3332a436cb7bdc39d0cbf61f5be72 Mon Sep 17 00:00:00 2001 From: RangerDevv Date: Sat, 13 May 2023 14:18:59 -0400 Subject: [PATCH 35/35] added version number and updated footer --- _layout.html | 3 +++ index.html | 6 ++++-- preview.html | 7 ++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/_layout.html b/_layout.html index 849d53c36..74bf8465e 100644 --- a/_layout.html +++ b/_layout.html @@ -87,6 +87,8 @@ for (let i = 0; i < navItems.length; i++) { navItems[i].style.color = "#ffffff"; } + // get the version and change its color + document.getElementsByClassName("version")[0].style.color = "#ffffff"; // document.getElementsByClassName("header")[0].style.backgroundColor = "#000000"; document.getElementsByClassName("subTitle")[0].style.color = "#ffffff"; localStorage.setItem("theme", "dark"); @@ -111,6 +113,7 @@ for (let i = 0; i < navItems.length; i++) { navItems[i].style.color = "#000000"; } + document.getElementsByClassName("version")[0].style.color = "#000000"; // document.getElementsByClassName("header")[0].style.backgroundColor = "#ffffff"; document.getElementsByClassName("subTitle")[0].style.color = "#000000"; localStorage.setItem("theme", "light"); diff --git a/index.html b/index.html index 62a88e8f2..5dc25ee01 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@

-

Programming Language

+

Programming Language

“simple, fast, safe, compiled language for developing maintainable software”

@@ -52,6 +52,8 @@

V version: 0.3x beta

+