diff --git a/presentations/2023-10-09--generating-audio--schollz/2023-10-09--generating-audio--schollz.pdf b/presentations/2023-10-09--generating-audio--schollz/2023-10-09--generating-audio--schollz.pdf index 4b81d26..06d81d7 100644 Binary files a/presentations/2023-10-09--generating-audio--schollz/2023-10-09--generating-audio--schollz.pdf and b/presentations/2023-10-09--generating-audio--schollz/2023-10-09--generating-audio--schollz.pdf differ diff --git a/presentations/2024-03-23--seoul-go-to-gno--leon/Go_to_Gno_slides.pdf b/presentations/2024-03-23--seoul-go-to-gno--leon/Go_to_Gno_slides.pdf index 78f6d63..05360f4 100644 Binary files a/presentations/2024-03-23--seoul-go-to-gno--leon/Go_to_Gno_slides.pdf and b/presentations/2024-03-23--seoul-go-to-gno--leon/Go_to_Gno_slides.pdf differ diff --git a/presentations/2024-04-11--tokyo-intro-to-gno--leon/Intro to Gno Tokyo.pdf b/presentations/2024-04-11--tokyo-intro-to-gno--leon/Intro to Gno Tokyo.pdf index bcab287..a88a98f 100644 Binary files a/presentations/2024-04-11--tokyo-intro-to-gno--leon/Intro to Gno Tokyo.pdf and b/presentations/2024-04-11--tokyo-intro-to-gno--leon/Intro to Gno Tokyo.pdf differ diff --git a/presentations/2024-06-17--gophercon-berlin--manfred/Makefile b/presentations/2024-06-17--gophercon-berlin--manfred/Makefile new file mode 100644 index 0000000..23ef1d0 --- /dev/null +++ b/presentations/2024-06-17--gophercon-berlin--manfred/Makefile @@ -0,0 +1,2 @@ +run: + cd ..; go run golang.org/x/tools/cmd/present -http 0.0.0.0:3999 # -base ../.. diff --git a/presentations/2024-06-17--gophercon-berlin--manfred/README.md b/presentations/2024-06-17--gophercon-berlin--manfred/README.md new file mode 100644 index 0000000..d9b4e9b --- /dev/null +++ b/presentations/2024-06-17--gophercon-berlin--manfred/README.md @@ -0,0 +1,2 @@ +Slides: https://gnolang.github.io/workshops/presentations/2024-06-17--gophercon-berlin--manfred/presentations.slide.html#1 +Tweet: XXX diff --git a/presentations/2024-06-17--gophercon-berlin--manfred/code/no-compile-after.go b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-compile-after.go new file mode 100644 index 0000000..00560ef --- /dev/null +++ b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-compile-after.go @@ -0,0 +1,3 @@ +// Unified approach +import "my/package" +mypackage.MyFunc() diff --git a/presentations/2024-06-17--gophercon-berlin--manfred/code/no-compile-before.go b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-compile-before.go new file mode 100644 index 0000000..2228eca --- /dev/null +++ b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-compile-before.go @@ -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() +} diff --git a/presentations/2024-06-17--gophercon-berlin--manfred/code/no-flag-additional.go b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-flag-additional.go new file mode 100644 index 0000000..0f32c58 --- /dev/null +++ b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-flag-additional.go @@ -0,0 +1,5 @@ +type Node struct { + Value int + Next *Node +} +mypackage.ProcessNode(&Node{Value: 1, Next: &Node{Value: 2}}) diff --git a/presentations/2024-06-17--gophercon-berlin--manfred/code/no-flag-after.go b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-flag-after.go new file mode 100644 index 0000000..ac2fd13 --- /dev/null +++ b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-flag-after.go @@ -0,0 +1 @@ +$> mypackage.MyFunc("stringValue", 42) diff --git a/presentations/2024-06-17--gophercon-berlin--manfred/code/no-flag-before.go b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-flag-before.go new file mode 100644 index 0000000..b9dc287 --- /dev/null +++ b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-flag-before.go @@ -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 diff --git a/presentations/2024-06-17--gophercon-berlin--manfred/code/no-fs-after.go b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-fs-after.go new file mode 100644 index 0000000..c3e96be --- /dev/null +++ b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-fs-after.go @@ -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 */ +} diff --git a/presentations/2024-06-17--gophercon-berlin--manfred/code/no-fs-before.go b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-fs-before.go new file mode 100644 index 0000000..4570327 --- /dev/null +++ b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-fs-before.go @@ -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() diff --git a/presentations/2024-06-17--gophercon-berlin--manfred/code/no-main-after.go b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-main-after.go new file mode 100644 index 0000000..3289808 --- /dev/null +++ b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-main-after.go @@ -0,0 +1,5 @@ +func Foo() { + // logic +} + +$> myprogram.Foo() // resumes, executes, pauses diff --git a/presentations/2024-06-17--gophercon-berlin--manfred/code/no-main-before.go b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-main-before.go new file mode 100644 index 0000000..caae1c1 --- /dev/null +++ b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-main-before.go @@ -0,0 +1,6 @@ +func main() { + // logic +} +func init() { + // logic +} diff --git a/presentations/2024-06-17--gophercon-berlin--manfred/code/no-marshaling-after.go b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-marshaling-after.go new file mode 100644 index 0000000..f3652e6 --- /dev/null +++ b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-marshaling-after.go @@ -0,0 +1,4 @@ +func SomeHandler() MyStruct { + data := MyStruct{Field: "value"} + return data +} diff --git a/presentations/2024-06-17--gophercon-berlin--manfred/code/no-marshaling-before.go b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-marshaling-before.go new file mode 100644 index 0000000..e1c37d2 --- /dev/null +++ b/presentations/2024-06-17--gophercon-berlin--manfred/code/no-marshaling-before.go @@ -0,0 +1,4 @@ +func SomeHandler(w http.ResponseWriter, r *http.Request) { + data := MyStruct{Field: "value"} // go logic + _, err := json.NewEncoder(w).Encode(data) +} diff --git a/presentations/2024-06-17--gophercon-berlin--manfred/presentation.slide b/presentations/2024-06-17--gophercon-berlin--manfred/presentation.slide new file mode 100644 index 0000000..7e4e971 --- /dev/null +++ b/presentations/2024-06-17--gophercon-berlin--manfred/presentation.slide @@ -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.