-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add gophercon EU 2024 lightning slides (#53)
Signed-off-by: moul <[email protected]>
- Loading branch information
Showing
17 changed files
with
179 additions
and
0 deletions.
There are no files selected for viewing
Binary file modified
BIN
-444 KB
(0.029%)
...entations/2023-10-09--generating-audio--schollz/2023-10-09--generating-audio--schollz.pdf
Binary file not shown.
Binary file modified
BIN
-943 KB
(0.014%)
presentations/2024-03-23--seoul-go-to-gno--leon/Go_to_Gno_slides.pdf
Binary file not shown.
Binary file modified
BIN
-1.4 MB
(0.0090%)
presentations/2024-04-11--tokyo-intro-to-gno--leon/Intro to Gno Tokyo.pdf
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
run: | ||
cd ..; go run golang.org/x/tools/cmd/present -http 0.0.0.0:3999 # -base ../.. |
2 changes: 2 additions & 0 deletions
2
presentations/2024-06-17--gophercon-berlin--manfred/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Slides: https://gnolang.github.io/workshops/presentations/2024-06-17--gophercon-berlin--manfred/presentations.slide.html#1 | ||
Tweet: XXX |
3 changes: 3 additions & 0 deletions
3
presentations/2024-06-17--gophercon-berlin--manfred/code/no-compile-after.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Unified approach | ||
import "my/package" | ||
mypackage.MyFunc() |
10 changes: 10 additions & 0 deletions
10
presentations/2024-06-17--gophercon-berlin--manfred/code/no-compile-before.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Current approach | ||
// Compile and run the binary from the CLI | ||
// $ go build -o myapp | ||
// $ ./myapp | ||
|
||
package main | ||
|
||
func main() { | ||
mypackage.MyFunc() | ||
} |
5 changes: 5 additions & 0 deletions
5
presentations/2024-06-17--gophercon-berlin--manfred/code/no-flag-additional.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type Node struct { | ||
Value int | ||
Next *Node | ||
} | ||
mypackage.ProcessNode(&Node{Value: 1, Next: &Node{Value: 2}}) |
1 change: 1 addition & 0 deletions
1
presentations/2024-06-17--gophercon-berlin--manfred/code/no-flag-after.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
$> mypackage.MyFunc("stringValue", 42) |
8 changes: 8 additions & 0 deletions
8
presentations/2024-06-17--gophercon-berlin--manfred/code/no-flag-before.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
func main() { | ||
flag.StringVar(&myStringFlag, "stringFlag", "default", "usage") | ||
flag.IntVar(&myIntFlag, "intFlag", 0, "usage") | ||
flag.Parse() | ||
MyFunc(*myStringFlag, *myIntFlag) | ||
} | ||
|
||
$> myprogram --stringFlag foo --intFlag 42 |
9 changes: 9 additions & 0 deletions
9
presentations/2024-06-17--gophercon-berlin--manfred/code/no-fs-after.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
type User struct { | ||
Name string | ||
Age int | ||
} | ||
var users []User | ||
users = append(users, User{"John Doe", 30}) | ||
for _, user := range users { | ||
/* logic */ | ||
} |
8 changes: 8 additions & 0 deletions
8
presentations/2024-06-17--gophercon-berlin--manfred/code/no-fs-before.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import "database/sql" | ||
db, err := sql.Open("driver", "source") | ||
_, err := db.Exec("CREATE TABLE IF NOT EXISTS users ...") | ||
_, err := db.Exec("INSERT INTO users ...") | ||
rows, err := db.Query("SELECT fields FROM users ...") | ||
defer rows.Close() | ||
for rows.Next() { /* logic */} | ||
err := rows.Err() |
5 changes: 5 additions & 0 deletions
5
presentations/2024-06-17--gophercon-berlin--manfred/code/no-main-after.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
func Foo() { | ||
// logic | ||
} | ||
|
||
$> myprogram.Foo() // resumes, executes, pauses |
6 changes: 6 additions & 0 deletions
6
presentations/2024-06-17--gophercon-berlin--manfred/code/no-main-before.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
func main() { | ||
// logic | ||
} | ||
func init() { | ||
// logic | ||
} |
4 changes: 4 additions & 0 deletions
4
presentations/2024-06-17--gophercon-berlin--manfred/code/no-marshaling-after.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
func SomeHandler() MyStruct { | ||
data := MyStruct{Field: "value"} | ||
return data | ||
} |
4 changes: 4 additions & 0 deletions
4
presentations/2024-06-17--gophercon-berlin--manfred/code/no-marshaling-before.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
func SomeHandler(w http.ResponseWriter, r *http.Request) { | ||
data := MyStruct{Field: "value"} // go logic | ||
_, err := json.NewEncoder(w).Encode(data) | ||
} |
112 changes: 112 additions & 0 deletions
112
presentations/2024-06-17--gophercon-berlin--manfred/presentation.slide
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# Envisioning a Go-Powered Ecosystem: The Ultimate Go Computer | ||
20 Jun 2024 | ||
Tags: golang, gnolang | ||
Summary: TODO | ||
|
||
Manfred Touron | ||
VP Eng., Gno.land | ||
https://gno.land/ | ||
https://github.com/gnolang | ||
@moul | ||
|
||
## Bonjour, GopherCon EU! | ||
|
||
```go | ||
// hello-its-manfred.txt | ||
package main | ||
|
||
import "fmt" | ||
|
||
func main() { | ||
fmt.Println("Hello, GopherCon EU! It's Manfred.") | ||
} | ||
``` | ||
|
||
## Intro | ||
|
||
- **Goal**: Introduce the concept of an **all-in Go machine**. | ||
- **Current State**: Go development splits focus between **Go logic** and | ||
**non-Go glueing/bridging** (UI/CLI, TCP, HTTP, gRPC, API, db/SQL, FS/Storage, | ||
...). | ||
- **Vision**: Remove **everything** that isn't Go. | ||
|
||
## What Would a Go Computer Be Like? | ||
|
||
Imagine a machine where Go is the only paradigm for all levels of computing: | ||
- **Interface**: The CLI syntax is Go. | ||
- **Components**: Programs, libraries, and tools are Go packages. | ||
- **Deployment**: Go packages have unique identifiers, their import paths. | ||
- **Orchestration**: The kernel is a Go runtime. | ||
- **Storage**: Go memory is the storage. | ||
- ... | ||
|
||
*Disclaimer: These slides present a mental exercise of what such a computer | ||
could look like. This is not a critique of current practices, but an exploration | ||
of using Go everywhere.* | ||
|
||
## Key Concepts | ||
|
||
- **No Marshaling** | ||
- **No Flag Parsing** | ||
- **No Compilation** | ||
- **No FileSystem/Databases** | ||
- **No main(), no exit** | ||
|
||
## No Marshaling | ||
|
||
- **Current State**: Marshaling data between Go and other formats (JSON, | ||
Protobuf, etc.). | ||
- **New Approach**: Work with Go types directly. | ||
|
||
.code code/no-marshaling-before.go | ||
.code code/no-marshaling-after.go | ||
|
||
## No Flag Parsing | ||
|
||
- **Current State**: Parsing flags for command-line arguments (a.k.a., shell). | ||
- **New Approach**: Use Go imports and interact with dependencies in pure Go. | ||
|
||
.code code/no-flag-before.go | ||
.code code/no-flag-after.go | ||
|
||
## No Compilation | ||
|
||
- **Current State**: Separate compilation (source) and execution phases | ||
(binaries), relying on the OS to run your apps. | ||
- **New Approach**: Directly call exported methods from other apps or via your | ||
CLI. A single shared VM runtime. | ||
|
||
.code code/no-compile-before.go | ||
.code code/no-compile-after.go | ||
|
||
## No FileSystem/Databases | ||
|
||
- **Current State**: Using file systems and databases with marshaling, and | ||
potential failures. | ||
- **New Approach**: Memory is the storage, and it is automatically persisted. | ||
|
||
.code code/no-fs-before.go | ||
.code code/no-fs-after.go | ||
|
||
## No main(), no exit | ||
|
||
- **Current State**: Programs have a main() function and can exit. **Start/Stop**. | ||
- **New Approach**: Programs are paused and resumed. An imperative language to write reactive apps. **Resume/Pause**. | ||
|
||
.code code/no-main-before.go | ||
.code code/no-main-after.go | ||
|
||
## Conclusion | ||
|
||
- **100% Go**: Eliminate intermediary layers. Focus purely on structs and functions. | ||
- **High Composability**: Seamlessly write, import, and execute Go code. | ||
- **Inspiration**: Apply Go to all computing levels, like Chuck Moore with Forth and the Plan 9 team with their OS. | ||
|
||
> Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away. -- _Antoine de Saint-Exupéry_ | ||
|
||
## What We're Doing at Gno.land | ||
|
||
- **GnoVM**: A new VM to run interpreted Go code, with automatic memory persistence allowing the composition of apps by importing them in Go. | ||
- **Gno.land**: Using GnoVM and a decentralized transaction system to provide a permissionless multiuser virtual Go computer. | ||
- Explore more: [github.com/gnolang/gno](https://github.com/gnolang/gno) | ||
- **Join Us at GopherCon US**: Attend our talk and workshop in July. |