summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Protocol Buffers - protobuf.dev.md20
-rw-r--r--The Go Programming Language - A Donovan, B Kernighan - 2015.md27
-rw-r--r--daily/17-May-2025.md27
-rw-r--r--daily/23-Jun-2025.md0
4 files changed, 47 insertions, 27 deletions
diff --git a/Protocol Buffers - protobuf.dev.md b/Protocol Buffers - protobuf.dev.md
new file mode 100644
index 0000000..9bd83c6
--- /dev/null
+++ b/Protocol Buffers - protobuf.dev.md
@@ -0,0 +1,20 @@
+Protocol buffer messages are often loaded in to memory completely. So large data is not a good fit. Usually not more than a few MBs.
+
+The same data can have many different forms of binary serialization when it is serialized, therefore serialized data (messages) cannot be compared.
+
+Messages are not compressed. They can be compresses with zip/gzip but to obtain maximum compression use specialized compression algorithms such as ones used by JPEG/PNG.
+
+Protocol buffers are not maximally efficient for large multi-dimensional arrays or floating point numbers.
+
+Not well supported in non-object oriented languages.
+
+Protocol buffer messages require their schema to be interpreted correctly.
+
+
+---
+
+# Workflow
+1. Write .proto schema
+2. Generate code using `protoc` compiler
+3. Compile generated protobuf code together with project
+4. Use Protobuff classes to serialize, share and deserialize data \ No newline at end of file
diff --git a/The Go Programming Language - A Donovan, B Kernighan - 2015.md b/The Go Programming Language - A Donovan, B Kernighan - 2015.md
new file mode 100644
index 0000000..f0c7389
--- /dev/null
+++ b/The Go Programming Language - A Donovan, B Kernighan - 2015.md
@@ -0,0 +1,27 @@
+Go compiles into native machine code.
+Go handles Unicode natively thus any character can be used in a string.
+Divided into packages, where a package is sort of a library, except for main which defines an executable.
+Import declarations **must** follow the package declaration.
+Function declarations: `func <name> (<param list>) (<result list>)`. No semicolons, unless multiple statements on 1 line.
+`gofmt` mandatory. `goimports` (`golang.org/x/tools/cmd/goimports`) manages imports.
+Slices are dynamically sized arrays that can be accessed `s[i]` or a subset can be taken `s[i:j]`. Indexing: half-open (starts at 0). `s[i:j]` yields i through j-1. Either can be omitted.
+
+Convention: comment describing package preceding package declaration.
+
+Variables initialised to "zero value".7689
+String concatenation via `+` char.
+Supports assignment operators, e.g `+=`, `*=` etc
+Short-hand variable declaration requires no type, it is inferred of the value `:=` **only allowed in a function**
+
+For-loop structure:
+```
+for initialization; condition; post {
+ // code
+}
+```
+Either part can be left away with different semantics.
+All parts gone: loop forever.
+Only condition is like a while x == true;
+`range` keyword to loop over a slice or array with `for index, arg := range slice`
+
+`_` is the blank identifier, thus above if we don' need the index we can put `_`.
diff --git a/daily/17-May-2025.md b/daily/17-May-2025.md
index 7872d2a..0ff674d 100644
--- a/daily/17-May-2025.md
+++ b/daily/17-May-2025.md
@@ -1,30 +1,3 @@
# Notes on go
-Go compiles into native machine code.
-Go handles Unicode natively thus any character can be used in a string.
-Divided into packages, where a package is sort of a library, except for main which defines an executable.
-Import declarations **must** follow the package declaration.
-Function declarations: `func <name> (<param list>) (<result list>)`. No semicolons, unless multiple statements on 1 line.
-`gofmt` mandatory. `goimports` (`golang.org/x/tools/cmd/goimports`) manages imports.
-Slices are dynamically sized arrays that can be accessed `s[i]` or a subset can be taken `s[i:j]`. Indexing: half-open (starts at 0). `s[i:j]` yields i through j-1. Either can be omitted.
-
-Convention: comment describing package preceding package declaration.
-
-Variables initialised to "zero value".7689
-String concatenation via `+` char.
-Supports assignment operators, e.g `+=`, `*=` etc
-Short-hand variable declaration requires no type, it is inferred of the value `:=` **only allowed in a function**
-
-For-loop structure:
-```
-for initialization; condition; post {
- // code
-}
-```
-Either part can be left away with different semantics.
-All parts gone: loop forever.
-Only condition is like a while x == true;
-`range` keyword to loop over a slice or array with `for index, arg := range slice`
-
-`_` is the blank identifier, thus above if we don' need the index we can put `_`.
**Type assertion**
diff --git a/daily/23-Jun-2025.md b/daily/23-Jun-2025.md
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/daily/23-Jun-2025.md