Recent submissions

Comment · 2 years ago
some linux distributions, such as GoboLinux (which, i think, was mentioned elsewhere in the comments, too), do this.

from gobolinux.org:

> GoboLinux is a modular Linux distribution: it organizes the programs in your system in a new, logical way. Instead of having parts of a program thrown at /usr/bin, other parts at /etc and yet more parts thrown at /usr/share/something/or/another, each program gets its own directory tree, keeping them all neatly separated and allowing you to see everything that's installed in the system and which files belong to which programs in a simple and obvious way.

Comment · 2 years ago
is lack of privacy your issue with the "your stars" page? consider a bookmarks manager.
Comment · 2 years ago
what specifically do you find interesting in these technologies?
Comment · 2 years ago
Comment · 2 years ago
by namespace do you roughly mean package?
Comment · 2 years ago
complementary openbsd resource:

https://man.openbsd.org/hier

some differences:

* openbsd does not use a /boot/ partition. instead it uses the bsd.* files in root.

* no /proc/ in its entirety in openbsd. use sysctl(3) instead.

* current openbsd does not have a separate /var/tmp/; it is a symbolic link to /tmp/.

Comment · 3 years ago
(in go, "raise an exception" means "return an error.")

error values are meant to represent expected, unsuccessful conditions—internal properties of the program—during the program's execution. for example, looking up the address for a domain name is an operation that can be expected to fail at times, and an error is appropriate here.

errors in go are not meant to represent properties external to the program, such as mistakes by the package author or documented incorrect usage of the package by the package user. in go these are panics.

perhaps other languages use exceptions for both but that conflates.

Comment · 3 years ago
There are two "kinds" of panics: those initiated by the Go runtime, and those initiated by the program author, though technically there isn't a distinction. When you access an array out of bounds, the Go runtime initiates the panic. On the other hand, for a condition that the program should hold but doesn't, the program author should initiate the panic. For example, in the exhaustive switch below, reaching the default case means that either you have somehow incorrectly allowed the construction of an invalid token value earlier in your program, or you have missed to account for a valid token value in this function.

  func (t token) symbol() byte {
          switch t {
                  case add: return '+'
                  case sub: return '-'
                  case mul: return '*'
                  case quo: return '/'
                  default:  panic("unknown token")
          }
  }
Errors are different. For example, url.Parse returns an error if its input string is an invalidly formatted URL.

  package url
  func Parse(rawURL string) (*URL, error)
Comment · 3 years ago
(2017)

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton