summaryrefslogtreecommitdiff
path: root/daily/18-May-2025.md
diff options
context:
space:
mode:
Diffstat (limited to 'daily/18-May-2025.md')
-rw-r--r--daily/18-May-2025.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/daily/18-May-2025.md b/daily/18-May-2025.md
new file mode 100644
index 0000000..2ef64b9
--- /dev/null
+++ b/daily/18-May-2025.md
@@ -0,0 +1,12 @@
+Some programming problems or programs to make for practicing:
+- Echo stdin
+- Find duplicate lines on stdin or files passed as arguments. Operating on a stream, or slurp all input and do it at once.
+
+# Further notes on Go
+Order of map iteration is unspecified but random in practice to prevent reliance on ordering.
+The Scanner type from the bufio package provides an easy way to read input in lines or words.
+Map created with `make` is passed by reference.
+Package `io/ioutil` exposes `ReadFile` and other io utility functions and types.
+Casting works by `type(var)`, e.g `i := 0; string(i)`
+Referencing a multi-component package is done through the last component. E.g `ioutil` for the `io/ioutil` package.
+Composite literals are the form of `type{...}` they instantiate composite types, so `[]string{"a"}` is also a composite literal. \ No newline at end of file