HNHacker News
TopNewBestAskShowJobs

peterhil

128 karma · joined October 2, 2012

https://github.com/peterhil
submissionscomments
peterhil··on Lazygit: A simple terminal UI for Git commands
Impressive, although quite large program!

One suggestion: Use PgUp and Pgdown to scroll a screenful, and use arrow keys to scroll one or two lines. Use shift with some keys to scroll half screens.

Is there a keyboard shortcut to go into remotes or tags panes?

peterhil··on The fish shell is amazing
Have you tried Oil Shell? http://www.oilshell.org/
peterhil··on Ask HN: “HN” for Sysadmins?
FreeBSDNews and some Slashdot topics have news for sysadmins:

https://www.freebsdnews.com/

Security Story Archive for Slashdot https://slashdot.org/archive.pl?op=topics&keyword=security

Unix Story Archive for Slashdot https://slashdot.org/archive.pl?op=topics&keyword=unix

peterhil··on Designing better file organization around tags, not hierarchies (2017)
And then we should talk about categories (and subcategories, relations or associations) instead of tags, which to many people seem to represent a flat namespace of tags.
peterhil··on Designing better file organization around tags, not hierarchies (2017)
I got the idea for Spellbook, because I was learning programming, but also having some projects that involved quite a bit of research on subjects like audio physics, statistics, data visualisation etc., and I wished I could keep my bookmarks in a generic hierarchy, but also attach some categories (bookmark folders) to categories for my different projects at the same time.

So, I also see the value in having subcategories in addition to freely formed networks or associations.

peterhil··on Designing better file organization around tags, not hierarchies (2017)
I also had the idea to apply these kind on ideas about nonhierarchical file organisation to music or photo library organisation, and really wish there was a file system level support.
peterhil··on Designing better file organization around tags, not hierarchies (2017)
The article fails to mention existence of graph databases or graph theory, except for tuple spaces which leads to that direction. Property graph model is the keywords to search for if you are interested in graph databases' suitability for data organisation: http://graphdatamodeling.com/Graph%20Data%20Modeling/GraphDa...

With graph databases you can easily and efficiently model any kind of network, including ones that are hierarchical or almost hierarchical by allowing a node to refer to multiple parent nodes instead of one.

My original idea with my bookmark extension Spellbook was this latter kind of graph, and I implemented a prototype called Grimoire using Ruby on Rails and Neo4j graph database that worked very well.

The Spellbook currently only allows adding new bookmarks into the hierarchical structure imposed by browser APIs, but features an easy to use search feature to find the right category. Spellbook is available for Chrome and Firefox, but the Firefox version seems broken again by their API changes: https://github.com/peterhil/spellbook

peterhil··on Pyjion – A Python JIT Compiler
Does it have GIL? IronPython and Jython does not. https://wiki.python.org/moin/GlobalInterpreterLock

How about Numpy performance?

peterhil··on Ask HN: Best Alternative to Homebrew in 2021?
I could not get Postgres installed through NixDarwin, so I installed with Postgres.app for MacOS. With it you can easily manage Postgres versions.
peterhil··on Ask HN: Best Alternative to Homebrew in 2021?
I have moved to Nix on two of my three machines – the two laptops have Archlinux32 and MacOS Mojave. I should replace Homebrew installed packages with Nix packages on my desktop iMac too, but in the mean time I have used Macports and some Nix packages for installing new packages.
peterhil··on Ask HN: Best Alternative to Homebrew in 2021?
Nox is much easier interface to nix. I often use that instead of nix-env.
peterhil··on Ask HN: Best Alternative to Homebrew in 2021?
Nix with nix-direnv is awesome!
peterhil··on A variable signal at heart of the Milky Way
The original article about the find, that was published in The Astrophysics Journal (linked at the bottom of the article): https://iopscience.iop.org/article/10.3847/1538-4357/ac2360

And open access version at ArxiV.org: https://arxiv.org/pdf/2109.00652.pdf

peterhil··on A variable signal at heart of the Milky Way
I was also interested about the data (and cryptanalysis on it) – the best I could find with a quick inquiry was the original article published in The Astrophysics Journal: https://iopscience.iop.org/article/10.3847/1538-4357/ac2360

There is an open access version at ArxiV.org: https://arxiv.org/pdf/2109.00652.pdf

peterhil··on Procedurally generating a rounded box mesh
An intuitive understanding or the mathematical formulas is that they describe an oscillating radius, which results in the various shapes as you move along the angle in polar coordinates.
peterhil··on Procedurally generating a rounded box mesh
I have used superellipses as oscillators.

They look much better than rounded rectangles, and probably work with less and more equally spaced polygons in 3d. You can probably calculate the points as slices in azimuth, or as a continuous helical spiral.

They give larger curvature smoothness than rounded rectangles, and superformula gives a wide variety of shapes and smooth transition between a circle and a square with changing parameters.

Superformula is a generalisation of superellipse, and works in 2D and 3D. Superellipsoid is the 3D counterpart:

* [Superformula - Wikipedia] (https://en.wikipedia.org/wiki/Superformula)

* [Superellipse - Wikipedia](https://en.wikipedia.org/wiki/Superellipse)

* [Superellipsoid - Wikipedia](https://en.wikipedia.org/wiki/Superellipsoid)

Squircle is a special case of superellipse with parameters a and b equal and n set to 4:

* [Squircle - Wikipedia](https://en.wikipedia.org/wiki/Squircle)

Danish Piet Hein invented the Superegg:

* [Superegg - Wikipedia](https://en.wikipedia.org/wiki/Superegg)

peterhil··on Photographic Reference Scale (2019)
With a PDF file you can also make the image crop box be exactly the reference image area, add crop marks and put the CC note and other info possibly inside or outside the crop area.
peterhil··on Photographic Reference Scale (2019)
For anybody wondering – the correct DPI is about 508 for some reason.
peterhil··on Photographic Reference Scale (2019)
This seems very handy – however the reference image would be infinitely easier to print on the correct size if it was a PDF file. PNG image format does not retain the resolution IIRC.
peterhil··on macOS Nix setup: an alternative to Homebrew (2020)
This requires nix-direnv installed with Nix.
peterhil··on Python for Excel: A Modern Environment for Automation and Data Analysis
I wrote a handy wrapper for xlrd in 2014 while making my project Ninhursag. I just checked and it still works with Python 2 – here is an example usage:

  pip2 install excelsior
  curl -O https://prd-wret.s3.us-west-2.amazonaws.com/assets/palladium/production/atoms/files/ds140-2017-bauxi.xlsx
  excelsior -f tsv ds140-2017-bauxi.xlsx
Source code: https://github.com/peterhil/excelsior

The Ninhursag project is visualisation and modeling of USGS data series 140, which include world production of almost all minerals starting from the year 1900:

https://ninhursag.herokuapp.com/mineral/statistics (Heroku free tier – might take a few seconds to load)

peterhil··on macOS Nix setup: an alternative to Homebrew (2020)
I have been using this setup for a few months now, and generally it works really nicely, except for clang_12 on Mojave and Python packages.

When you combine direnv with shell.nix or default.nix by adding "use nix" in a `.envrc` file, it autoloads the Nix shell environment when cd’ing to a directory and it is amazing for development!

peterhil··on Lospec Jam 1 – a game jam with fantasy console specs
The specs for this game jam are quite loosely defined, but basically the point is to make a game or app in two weeks with fantasy console specs at 240 x 135 px resolution, 10 colour palette, 7 control buttons and TIA like audio capabitilies.

The palette: https://lospec.com/palette-list/ltro-1

The site has a lot of much nicer palettes (https://lospec.com/palette-list/), but the previous one seems to be required for the jam.

peterhil··on WD My Book users wake up to find their data deleted
No surprise. WD My Book was the worst purchase of my life.

The dual RAID hard drive just started clicking one day, and no data could be read after that. Apparently using only one drive was not possible on hard drive failure or the controller failed. (I did not physically try to remove the other drive as the drives were somehow coupled, maybe mirrored RAID mode was not even possible)

This was about ten years ago. I would not touch another Western Digital product after that.

peterhil··on Mindat.org, the largest open database of minerals, rocks, and meteorites
Thank you for the kind feedback!

I made an issue, and will fix that and other accessibility concerns in the next release: https://github.com/peterhil/ninhursag/issues/10

peterhil··on Kats: One stop shop for time series analysis in Python
Kats = Kits to Analyze Time Series: https://github.com/facebookresearch/Kats/blob/master/tutoria...
peterhil··on Mindat.org, the largest open database of minerals, rocks, and meteorites
There is a thread on discussions about Mindsat API: https://www.mindat.org/mesg-450899.html#557085

They may have some funding on September to make a public API.

peterhil··on Mindat.org, the largest open database of minerals, rocks, and meteorites
I made a post about this on Mindat discussions: https://www.mindat.org/message.php?m=562336
peterhil··on Mindat.org, the largest open database of minerals, rocks, and meteorites
If you like information about minerals, you might find my visualisation of world production of different minerals also interesting:

https://ninhursag.herokuapp.com/

The green line shows world production form year 1900 to about 2020, depending on data availability. Yellowish green line shows available reserves – that is ‘easily’ available or economically feasible resources.

Most of USGS data series 140 minerals are included, and you can try to fit various Scipy distribution functions with the data to see some estimates.

PS. It’s on a free tier so it takes a few seconds to boot, if no one have visited recently.

peterhil··on ASCIIFlow Diagram Tool
However, this is an amazing ascii drawing tool!
← PreviousPage 2 of 4Next →