proc f = (real x) proc (real) real: (real y) real: x + y;
proc (real) real g := f (3);
As by the time g is created, x of f has disappeared from the stack.647 karma · joined July 29, 2013
proc f = (real x) proc (real) real: (real y) real: x + y;
proc (real) real g := f (3);
As by the time g is created, x of f has disappeared from the stack."So while van Wijngaarden said that goto's were unnecessary ... , Dijkstra stretched the point to say that goto's were inconvenient. The latter lesson stuck."
Essentially Van Wijngaarden was talking about a continuation passing style, where the remainder of a program is represented as a function, so at the end of a function you always call another function and no function ever returns! Read the paper: https://homepages.inf.ed.ac.uk/wadler/papers/papers-we-love/...
I wonder if the EEG signals can tell if your attention wanders. That may help improve meditation.
Have you looked at/played with the Muse or Muse2 EEG headband?
{:[~x!15;"fizzbuzz";~x!3;"fizz";~x!5;"buzz";$x]}'1+!100
{:[0<#w::[x!3;"";"fizz"],:[x!5;"";"buzz"];w;$x]}'1+!100C compiler optimizations seems like micro-optimizations when people should be looking at the bloat elsewhere. Missing the forest for the trees.
C is basically a low level language. A portable assembly language. A predictable compiler shouldn’t second guess the programmer’s intent. To put things in perspective, if all the man-years spent on gcc were spent on GNU Hurd... :-)
Meant to write "Go allows safe concurrent access but doesn't stop unsafe concurrent access to shared data structures"
Thanks & sorry for the confusion.
Atul Gawande’s “The Checklist Manifesto” comes to mind, where he argues that even experts need checklists to walk them through the key steps in any complex procedure. These complexities are such that it is easy to forget a key step or two. Following such checklists or written procedures minimize errors. He then shows how using checklists improves successful outcomes significantly.
A todo list is more effective if you do regular reviews (daily/weekly/month/yearly). Similarly mindfulness at the time of deleting a someday task may provide useful feedback.
todo() {vi '+$' ~/todo/$(date +Y/%m)}
+() {echo + $* >> ~/todo/$(date +Y/%m)}
-() {echo - - $* >> ~/todo/$(date +Y/%m)}
Each month's entries are in a separate ~/todo/YYYY/MM file. The + command is to record something done. The - command is to enter a new task. The todo command is for editing this month's file -- add month-days, update entries, cleanup etc.Separately I have current and last 2 month files open in the leftmost column of acme (about half as wide as other columns). This is for moving entries between months etc. I have to remember to do a Get before editing and Put when done editing to sync with any updates done from command line.
In the same column I have a per year "projects" file (multiple indented lines per project) and a per year "future" file (things I may want to do someday).
This is far from perfect but has endured. A simple grep can tell me what was done or what needs to be done in a given month or year.
For taking notes in a meeting I have now switched over to using an ipad + apple pencil as I can scribble notes, draw pictures, doodle etc. without having a laptop screen between me and others or clicking keys annoying people.
$ size /usr/local/plan9/bin/acme
text data bss dec hex filename
356886 14680 52332 423898 0x677da /usr/local/plan9/bin/acme x := reduce(func(a, b int)int{return a*b}, []int[1,2,3])
y := reduce(func(a, b string)string{return a+b}, []string{"a", "b", "c"})
Rob Pike implemented "ivy", an array programming language, in Go but producing something like an array programming package that can be used from Go (sort of like NumPy for Pyhton) can be very messy to use or implement (even with the use of reflect package). package stack[t]
type Type []t
func New() Type { return Type{} }
...
Then it can be used so: import s “stack”[int]
var s1 = s.New() alias .=cd
alias ,=pushd
alias ,,=popd
alias ,.='dirs -v'
No need to alias .. as in zsh you can use a dir name as a command to cd to it. Setting cdpath can further cut down on typing. For example cdpath=(. .. ~/go/src ~/src ~)