HNHacker News
TopNewBestAskShowJobs

oinksoft

3,796 karma · joined April 21, 2011

https://oinksoft.com/
submissionscomments
oinksoft··on U.S. takes unprecedented steps to replenish Colorado River's Lake Powell
As far as I know, Furnace Creek is an oasis, and its golf course is irrigated by non-potable groundwater from local springs.

Water Conservation at The Oasis: https://www.oasisatdeathvalley.com/who-we-are/sustainability...

Hydrogeology of Lower Amargosa Valley (see Fig. 1 in report): https://pubs.er.usgs.gov/publication/sir20185151

oinksoft··on Government to urge us all to walk and cycle more
https://www.latimes.com/environment/story/2020-04-28/coronav...

> “It is possible that this was partially due to reduced emissions, but meteorology likely played a much larger role.”

Here in OC over the past couple weeks the haze has returned, while traffic is only slightly up.

oinksoft··on Git git git git git
Somewhat related, from my .bashrc

  for a in $(git var -l | sed -nE 's/^alias\.([^=]*)=.*/\1/p') ; do
      if ! command -v g$a >/dev/null 2>&1 ; then
          alias g$a="git $a"
      fi
  done
Which creates a shell alias prefixed with `g` for each of my configured git aliases if there is no conflict. So I get not only the `gst` command you mentioned and ones like `gco` (because I have Subversion-equivalent aliases for common commands), but more complex ones like `gstpup` (stash, pull upstream, stash pop). Combined with `alias g=git`, I seldom type "git" and the setup is pretty convenient. I've thought of making the above alias unconditionally, or report conflicts, as it can be jarring when an alias is missing. I've also considered expanding it to all git commands because sometimes my custom ones live as `git-$command` scripts and not aliases.
oinksoft··on ML for the Working Programmer, 2nd Edition (1996)
ML for the Working Programmer is my favorite programming book! It's fantastic because it is serious and goes into great detail about practical matters in working with SML. Its treatment of SML's module system is without match. It contains generally useful chapters on the implementation of streams, persistent functional data structures, parsers, and proof systems. My favorite thing about the book is its emphasis on designing correct programs. And the cover's pretty cool.
oinksoft··on A deep dive into APL
I don't know if this is helpful for you, but I map <c-p> to run the open buffer in Vim in the buffer's filetype's interpreter (or compile and run, etc.). For GNU APL, this is:

  nnoremap <buffer> <C-P> :write !cat - <(echo ")OFF") \| apl --script<CR>
It took some time to figure that out, but combined with https://github.com/ngn/vim-apl, it is not too bad of an editing experience.
oinksoft··on Escape key alternatives in Vim
Highly recommend https://github.com/othree/yajs.vim
oinksoft··on Vim Anti-Patterns
Either way, mapping the arrow keys to <nop> seems wasteful. In normal mode I map up/down to :cprevious/:cnext and left/right to :colder/:cnewer, which makes error list navigation effortless. Some other good targets are the buffer, tag and location lists (with a little work you could make them context-aware too). I don't remap the arrow keys in insert mode though, it'd be annoying to have to exit insert mode only to move the cursor a few characters.
oinksoft··on Linux.Rex.1 – A multifunctional self-replicating Trojan for Linux written in Go
Obligatory warning about running `strings` on untrusted files: https://lcamtuf.blogspot.com/2014/10/psa-dont-run-strings-on...
oinksoft··on A Sea Worth Its Salt
The Salton Sea is fascinating. Its bed is as low as Badwater Basin in Death Valley, and were it not inundated, it might be the hottest place in the US. A little while ago I submitted a fellow's account of hiking its perimeter during summer: http://dineshdesai.info/saltonwalk/
oinksoft··on Humans once opposed coffee and refrigeration: why we often hate new stuff
Unfortunately, this is the only source I could find referring to plants marked as "cursed" by the church for the reason that they didn't "bow before [God]." Most primary sources are in Amharic, of which I know little.
oinksoft··on Humans once opposed coffee and refrigeration: why we often hate new stuff
Apparently as recently as the 19th century, coffee was forbidden in Ethiopia (the birthplace of coffee, where its cultural importance is tremendous) by the Orthodox Church. Coffee, along with tobacco, cannabis and khat were considered "cursed plants" because they were reputed to have not dried when Christ was crucified.

The best source I could find is http://www.ijhssnet.com/journals/Vol_3_No_21_[Special_Issue_... which describes the condemnation of khat:

> Khat was cursed by God forever to be chewed by humans because of causing a divine displeasure when God came to Earth and all the plants bowed before him showing ultimate respect with the exception of Khat.

oinksoft··on MLton with Realtime GC and Threading Features
This is a real problem with ML. There's competing tooling from SML/NJ and MLton, not to mention interesting, useful projects like MoscowML or PolyML. So finding reusable libraries and such is a real battle, and you can't escape knowing both MLBasis and CM, as well as SML/NJ extensions and differences in the respective Basis libraries. The underlying "problem" is that MLton is too good to ignore, but takes so long for even small programs that it's impractical for day-to-day, let alone interactive development.

That's what's so exciting about new work on MLton like this: A JIT-ing MLton, for instance, could be an amazing thing. It seems like the community has been coalescing around MLton against all odds, and any improvements to it are a big deal.

SML is nicer syntactically than OCaml, but OCaml brings so much to the table that it's hard to ignore (a simpler compilation model, niceties like named arguments, single development target, good community). Also Paulson's ML For the Working Programmer explains SML's warts well, in a historical context. It goes into great detail of some of the limitations of SML's module type safety and some of the nasty things you need to do to make functors generic and reusable, which really turned me off of the language and explained why Caml and OCaml exist. I still love SML but must concede that it's mostly a teaching language. The Little MLer is wonderful.

oinksoft··on A Remote Pacific Nation, Threatened by Rising Seas
Not a pun, just what this immediately reminded me of :) I've always found it astonishing that people would live on an island with such a low maximum elevation.
oinksoft··on A Remote Pacific Nation, Threatened by Rising Seas
Tuvalu is in similar straits.
oinksoft··on New Cities
Also here: https://en.wikipedia.org/wiki/Reston,_Virginia
oinksoft··on California's skyrocketing housing costs, taxes prompt exodus of residents
Echoing what you said, I've never met nicer people or made friends more easily than when I lived in Sacramento.
oinksoft··on Discovery of 1,000-year-old Viking site in Canada could rewrite history
Mali is on the west coast of Africa, so such an ocean crossing would not require rounding the Cape. They're also well-situated to take advantage of trade winds, and are at the point of the narrowest middle Atlantic crossing. So it's not so far-fetched that they could have made these trips.
oinksoft··on Discovery of 1,000-year-old Viking site in Canada could rewrite history
According to their oral history, they went clear across the ocean. My source is "A History of Madagascar" by Mervyn Brown (2001) and it could be incorrect, I didn't seek out the primary sources.
oinksoft··on Discovery of 1,000-year-old Viking site in Canada could rewrite history
Of course it's realistic. The Malagasy people are descendants of Polynesians who crossed the Indian Ocean to Madagascar, in canoes. With calm seas, there's no reason you couldn't make such a trip. Canoes can have sails too, and you can row your way out of the doldrums.
oinksoft··on Onyx Straps in For a Jepsening
EC2 is a proprietary service for creating virtual machines on demand in Amazon's infrastructure, it is not a computation system. Much as a relational database system provides a framework for storing and retrieving relational data, a computation system provides a framework for performing (usually large-scale) computations, like transforming text files. It is open-ended, just as an RDBMS imposes no schema. A simple example would the processing pipeline of some web crawler.

Hadoop is one of the better known computation systems, though it does other things too (e.g. persistence with HDFS). Apache Storm is another popular computation system, particularly in the Clojure world. Onyx was created a few years ago, is implemented in Clojure, and competes with Storm (it's the first such system mentioned in the "What is it?" section of https://github.com/onyx-platform/onyx).

Onyx is distributed (meaning there are multiple nodes cooperating, typically over a network), and Jepsen is a rigorous tool for testing fault-tolerance in such systems. Being masterless (no node has central authority) is valuable for fault-tolerance. It means that in the event of a network partition, either side of the partition can continue processing as normal and recover when the partition is resolved. Jepsen simulates these and other fault conditions.

oinksoft··on More code review tools
The line count of a diff has nothing to do with how focused the patch is. Some PRs are simply larger than others due to the language in use or the nature of the code being changed.

Presumably a codebase in an array-oriented language would have miniscule PRs, which is irrelevant (discussion of PL merits aside).

oinksoft··on Why We Moved to React
Actually you don't need to use React.createClass to use mixins, there is https://www.npmjs.com/package/react-mixin which implements them via decorators. Either I wouldn't consider inheritance and mixins interchangeable.
oinksoft··on Why We Moved to React
This is not limited to ES6+, class/inherits/super are syntactic sugar for existing prototypical OOP idioms.
oinksoft··on Thanks for Trumpet Winsock
It surprises me how clearly I remember the first time I used the internet in 1995 (I was barely 7). My father worked on a predecessor to modern email in the 80s and by then was no longer programming, working in telecom instead. He had a keen interest in the internet, but it was a long time relatively speaking before we could justify the expense of a computer, modem, and home connection (service provided by Erols).

He loaded up AltaVista and explained what a search engine was, in terms that I could understand, by relating it to a library catalog. I'd only used those DOS catalogs to that point, and they were picky. I carefully typed on the Power Mac's keyboard, "Davis, Jim".

As the results crawled down the screen, I knew immediately that this was a world apart from reading old Garfield books at the library, that it was something totally new (and daunting). I really didn't know what to make of it.

A few days later I snuck into the office and printed out the career statistics of "Moon, Warren".

oinksoft··on Nim 0.13.0 has been released
This is also true of Standard ML, where unary minus is ~, and APL, where unary minus is ¯
oinksoft··on Project Alexandria – A graph based book exploration and recommendation engine
It took a few tries to find a non-classic book I've read and own. I was surprised by the neighbors/recommendations for Henri Troyat's Tolstoy:

- George Orwell's 1984, a "Bloom's Guides" edition (Cliff's Notes-looking thing)

- Benjamin Franklin, a graphic-novel format biography of the statesman and scientist

- Gran Pionero de Beísbol, a graphic-novel format biography of Jackie Robison

- Wilma Rudolph, a graphic-novel format biography of the Olympian runner

- Martin and John, "with a frankness about sexuality rarely seen in contemporary fiction ... a haunting, daring, and heartrending debut novel that speaks of gay life"

Those results don't seem to reflect the stated methodology in the "About" section... the only commonality is that three of the five are biographies. I expected more things to do with Russian literature, or literary biographies contemporary with Troyat's.

I'm interested in the project's implementation, it's too bad it isn't open source.

oinksoft··on The Elements of Python Style
Do those editors use the project's builtin namespace? gettext.install sets __builtins__._ to the translation function so that individual modules don't have to import it.
oinksoft··on Elixir 1.2.0 Released
Oops, that's right.
oinksoft··on Elixir 1.2.0 Released
Are list comprehensions still part of ES7? It's strange that Babel removed the list comprehension transformer recently, but I haven't been following closely.

The Elixir pipe syntax is reminiscent of Clojure's ->/->>:

  (->> (range 1 10)
       (map #(* % %))
       (filter (partial > 40)))
It's nice that in languages like Haskell or ML this is trivial:

  infix |> 
  fun (a |> b) = a b
You could modify this to let NONE fall through, etc.
oinksoft··on The “Chad” bug
Practically, those W3C/WHATWG regexes probably are fine, but they aren't correct. For instance they fail to match the valid address c."@".t@gmail.com because they don't handle quoted strings correctly. I'd expect they also match some invalid addresses. My understanding was that only a Perl regex can test an address against the standard: http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html
Page 1 of 27Next →