soveran

Joined 17 years ago

Karma
115
Submissions
45
Member since
Jun 4
Programmer from Argentina, currently living in France. I co-founded openredis (https://openredis.com), where I provide Redis hosting.

https://twitter.com/soveran

https://github.com/soveran

View on Hacker News

Recent submissions

Comment · 2 years ago
I use it daily. I run a slightly modified version: I added line editing capabilities with linenoise and I use EREs. The most common use case for me is editing with :g/re, which allows me to see only the matching lines. If I want to keep only those lines, I type :v/re/d, and so on. I also invoke it regularly from my main editor when I find it more efficient for modifying some file or some region.
Comment · 3 years ago
For an alternative solution, describe the directed graph by listing the nodes and using whitespace to represent the arcs:

  $ cat riddle
  Vixen Rudolph
  Vixen Prancer
  Vixen Dasher
  Dancer Vixen
  Comet Vixen
  ...
  Vixen Dasher
Then use tsort:

  $ tsort riddle
  Dancer
  Donder
  Comet
  Vixen
  Blitzen
  Dasher
  Rudolph
  Cupid
  Prancer
Comment · 4 years ago
Comment · 8 years ago
I don't think the paper assumes a many worlds interpretation.
Comment · 8 years ago
Did you read the paper I linked to?
Comment · 8 years ago
Comment · 9 years ago
Comment · 9 years ago
For scripting, I recommend the rc shell from plan9, which is the one I use for my shell scripts. It is only when I want to share a script with other people that I consider using /bin/sh, and even then more often than not I've gone for rc.

I invite you to read about it: http://doc.cat-v.org/plan_9/4th_edition/papers/rc.

I find the control structures simpler and more elegant, and overall its design feels more consistent. For example, consider an if statement in bash:

  if [ condition ]; then
    ...
  else
    ...
  fi
And now in rc:

  if (condition) {
    ...
  } else {
    ...
  }
Or a case statement in bash:

  case $1 in
    "bar")
      ... ;;
    "baz")
      ... ;;
  esac
And expressed in rc:

  switch ($1) {
    case "bar"
      ...
    case "baz"
      ...
  }
In the past, I've used it as my shell too, but now I use it only for scripting. I think you can install it in most platforms.
Comment · 9 years ago
Comment · 9 years ago
Comment · 9 years ago
Comment · 9 years ago
I love the idea, thanks for the tip!
Comment · 9 years ago
I just updated the README with a gif of that video. Thanks for the idea!
Comment · 9 years ago
That's interesting: commands that consume everything in the stack. About saving/loading words: I have plans to work on that, it could be a very useful feature.
Comment · 9 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton