HNHacker News
TopNewBestAskShowJobs

wwfn

136 karma · joined January 6, 2015

submissionscomments
wwfn··on Show HN: Python with do..end in place of strict indentation
I thought tools like jupyter and rmarkdown are better described as narratives[0] (lab notebooks and report generators) separate from and almost antagonistic to literate programming[1]. At least as I've been exposed to them, notebooks don't easily facilitate code reuse -- libraries aren't written in notebooks but could be written with literate programming tools.

[0]: https://khinsen.wordpress.com/2015/09/03/beyond-jupyter-what... [1]: http://www.literateprogramming.com/

wwfn··on Show HN: Python with do..end in place of strict indentation
Literate programming tools that weave/tangle code and documentation don't play well with significant whitespace. Not a problem for me, but I think it's on a valid line of complaints.
wwfn··on Why I Chose Common Lisp
Not standard, but hopefully worth mentioning: the thing that's clicked best for me is the docs on https://ciel-lang.org/ ("batteries included" Common Lisp image). The examples for how to use it's curated libraries matches how I try to integrate a new language into my toolbox.

It hit the front page a while ago too: https://news.ycombinator.com/item?id=41401415

wwfn··on Gamedev in Lisp. Part 2: Dungeons and Interfaces
This doesn't exactly get at it, but https://ciel-lang.org/ is at least attacking part of too-many-steps problem while focusing more on the too-many-choices and long in the tooth defaults (as I understand it).
wwfn··on Shell Has a Forth-Like Quality (2017)
from the linked art of programming[0]

> Bernstein chaining is a specialized security-wrapper technique invented by Daniel J. Bernstein, who has used it in a number of his packages. Conceptually, a Bernstein chain is like a pipeline, but each successive stage replaces the previous one rather than running concurrently with it.

I'm impressed shell does this! and have my own function to add to the list of "Commands that Compose." dryrun[1]: when prefixed on a shell command, it echos the command if DRYRUN is set otherwise runs it normally. I pipe that to drytee[2] if the command's modifying files. I like it as a more deliberate (and safer) alternative to 'set -x' for debugging shell scripts.

   for f in in/*; do
     args=($(complicated_code $f))
     dryrun long_procces $f "${args[@]}" | drytee out/${f//*\//}
   end
[0]<http://www.catb.org/%7Eesr/writings/taoup/html/ch06s06.html>

[1] https://github.com/lncd/lncdtools/blob/master/dryrun

[2] https://github.com/lncd/lncdtools/blob/master/drytee

wwfn··on Don't DRY Your Code Prematurely
I was just mulling this over today. DRY = easier-to-decode is probably true if you're working on groking the system at large. If you just want to peak in at something specific quickly, DRY code can be painful.

I wanted to see what compile flags were used by guix when compiling emacs. `guix edit emacs-next` brings up a file with nested definitions on top of the base package. I had to trust my working memory to unnest the definitions and track which compile flags are being added or removed. https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages...

It'd be more error prone to have each package using redundant base information, but I would have decoded what I was after a lot faster.

Separately, there was a bug in some software aggregating cifti file values into tab separated values. But because any cifti->tsv conversion was generalized, it was too opaque for me to identify and patch myself as a drive-by contributor. https://github.com/PennLINC/xcp_d/issues/1170 to https://github.com/PennLINC/xcp_d/pull/1175/files#diff-76920...

wwfn··on TSMC unveils 1.6nm process technology with backside power delivery
I'm also clueless. First search brings up https://www.tomshardware.com/news/intel-details-powervia-bac... with a nice diagram

It looks like the topology for backside moves the transistors to the middle so "singal wires and power wires are decoupled and optimized separately" instead of "compete[ing] for the same resources at every metal layer"

wwfn··on Ask HN: What are some unpopular technologies you wish people knew more about?
Yeah! On the actual notetaking side: I think I stumbled into a less deliberate "interstitial journaling" paradigm (a la roam research?). I setup the journal plugin to create a file per week from there keep a list of links to project specific files (hierarchies like :tools:autossh, :studies:R01grant:datashare). I also backlink from the project file to the journal file. So each page looks like a log. I try to aggressively interlink related topics/files.

I have an ugly and now likely outdated plugin for Zim to help with this. There's a small chance the demo screenshots for it help tie together what I'm trying to say. https://github.com/WillForan/zim-plugin-datelinker

On the tech side: My work notes (and email) has shifted into emacs but I'm still editing zimwiki formatted files w/ the many years of notes accumulated in it Though I've lost it moving to emacs, the Zim GUI has a nice backlink sidebar that's amazing for rediscovery. Zim also facilitates hierarchy (file and folder) renames which helps take the pressure off creating new files. I didn't make good use of the map plugin, but it's occasionally useful to see the graph of connected pages.

I'm (possibly unreasonably) frustrated with using the browser for editing text. Page loads and latency are noticeably, editor customization is limited, and shortcuts aren't what I've muscle memory for -- accidental ctrl-w (vim:swap focus, emacs/readline delete word) is devastating.

Zim and/or emacs is super speedy. Especially with local files. I using syncthing to get keep computers and phone synced. But, if starting fresh, I might look at things that using markdown or org-mode formatting instead. logseq (https://logseq.com/) looks pretty interesting there.

Sorry! Long answer.

wwfn··on Ask HN: What are some unpopular technologies you wish people knew more about?
I'm thinking unpopular could mean the tech is polarizing or frequently dismissed/overlooked.

  * APL -- I haven't dedicated the time to learning in part because there's little support where I normally work. I'd love for APL to have be adapted like a domain specific language a la perl compatible regular expressions for various languages (april in common lisp, APL.jl in julia).
  * regular expressions. https://xkcd.com/1171/
  * bugs/issue tracking embedded in git https://github.com/MichaelMure/git-bug/
But I'm more excited for things that fall into the niche/lesser-known side of of unpopular. I love finding the little gems that change how I organize or work with the system.

  * "type efficiently by saying syllables and literal words" https://sr.ht/~geb/numen/
  * I use fasd[0] 'z' alias for jumping to previous directories in shell every day.
  * Alt+. in shell (readline, bash) to get the previous commands last argument is another ergonomic time saver that I think is relatively obscure. I have a bash wrapper to combine that with fzf for quick any-previous-command-argument  fuzzy search and insert [1]
  * zimwiki [2] (and/or a less capable emacs mode[3]) for note taking has served me well for a decade+
  * DokuWiki's XML RPC [4] enables local editor edits to a web wiki. I wish it was picked up by more editor plugin developers. (cf. emacs-dokiwki [5]) 
 * xterm isn't unpopular per say, but I don't see sixel support and title setting escape codes talked about often. I depend on a bash debug trap to update the prompt with escape codes that set the terminal title [6]
* are clipboard managers popular? I get a lot out of using https://github.com/erebe/greenclip

[0] https://github.com/clvv/fasd [1] https://github.com/WillForan/fuzzy_arg [2] https://zim-wiki.org/ [3] https://github.com/WillForan/zim-wiki-mode [4] https://www.dokuwiki.org/xmlrpc [5] https://github.com/flexibeast/emacs-dokuwiki [6] https://github.com/WillForan/dotconf/blob/master/bash/PS1.ba... -- bash debug trap to update prompt with escape codes that set the title to previous run command -- to eg. search windows for the terminal playing music from 'mpv'

wwfn··on Thunderbird 115.4.0
http://davmail.sourceforge.net/ works well as a O365->IMAP bridge. davmail can be configure so it's clientId matches outlook's
wwfn··on Emacs is my new window manager
M-x shell but i'm in comint-mode more often for ESS/R where I'm likely to accidentally print out a dataframe with too many rows.
wwfn··on Emacs is my new window manager
emacs as a terminal has surprisingly good latency [0] but I'm pretty careless with my pipes and frequently overwhelm the buffer with verbose output. Waiting seconds for a ctrl-c to take so I can fix my mistake is painful. Any magical incantations (long line tweaks?) that help with this?

apropos of emacs as WM: with the config kludge I've made and frequent REPL spamming, I've found `killall -SIGUSR2 emacs` essential to get back the editor.

[0] https://danluu.com/term-latency/

wwfn··on Rupert Murdoch Lies at the Heart of Democracy's Destruction Worldwide
I can imagine media products "lie" (by omission, by implicit bias, or even blatantly) but will need some references to reorient to the idea the scale is the same.

My prior is still heavily tilted by the lead up to the Iraq war -- and think the time since has only seen a further embrace of "tell the audience what they want to hear over evidence" (see "top talent" texts re. dominion suit)

[0] https://www.politico.com/story/2015/01/poll-republicans-wmds... > 52 percent [fox viewers] say that they believe it to be “definitely true” or “probably true” that American forces found an active weapons of mass destruction program in Iraq. > Overall, 42 percent still believe that troops discovered WMDs, a misleading factor in the decision to invade Iraq in 2003.

FWIW the iraq war is on my mind after reading https://www.theatlantic.com/ideas/archive/2023/03/iraq-war-u.... Bad war, bad reasoning, terrible consequences, but maybe Iraq could be worse today.

wwfn··on A Quick Guide to Mutt
Have you tried setting clientID match outlook in ~/.davmail.properties

    davmail.mode=O365Manual
    davmail.oauth.clientId=d3590ed6-52b3-4102-aeff-aad2292ab01c
    davmail.oauth.redirectUri=urn:ietf:wg:oauth:2.0:oob

https://sourceforge.net/p/davmail/discussion/644057/thread/a...

FWIW, user for login looks like: user@domain.tld

wwfn··on 9k-year-old Stonehenge-like structure found under Lake Michigan
https://www.discovermagazine.com/planet-earth/archaeologists...

> Back to the media-hyped “Stonehenge” Holley found in Lake Michigan: It might be a small version of a prehistoric hunting structure, similar to the one found in Lake Huron. As for why it was falsely labeled in headlines, VanSumeren says that a hunting blind underwater “doesn’t have the same ring to it” as an internationally recognized prehistoric structure like Stonehenge.

maybe this paper? https://www.jstor.org/stable/10.3998/mpub.11395945

wwfn··on GNU Octave
Open science depends on open tools! Octave is such a good resource for otherwise walled off code (that doesn't use newer matlab features). But I'm curious where octave is popular. Does anyone pick it over julia or python when starting a new project/research?

I also wish the state of science/engineering software shook out differently. There's plenty of money to pay Mathworks. Is there some kind of license like pay us if you're doing commercial work or publishing research on grants worth over $XXX, otherwise consider it open source?

wwfn··on Learn Lisp the Hard Way
I'm also very curious for hear from expert lispers. I've tried to find the sweat spot where lisp would fit better than what I already know: shell for glue and file ops, R for data munging and vis, python to not reinvent things, perl/core-utils for one liners. But before I can find the niche, I get turned off by the amount of ceremony -- or maybe just how different the state and edit/evaluate loop is.

I'm holding onto some things that make common lisp look exciting and useful (static typing[0], APL DSL[1], speed [2,3,4]) and really want to get familiar with structural editing [5]

[0] https://github.com/phantomics/april [1] https://github.com/coalton-lang/coalton/ [2] https://renato.athaydes.com/posts/revisiting-prechelt-paper-... [3] https://github.com/fukamachi/woo/blob/master/benchmark.md [4] https://tapoueh.org/blog/2014/05/why-is-pgloader-so-much-fas... [5] https://github.com/drym-org/symex.el

wwfn··on The counterintuitive rise of Python in scientific computing (2020)
Perl was my horse in the race. I attribute it's, lisp's, ruby's, etc loss to 1. "There should be one-- and preferably only one --obvious way to do it" being part of python's ethos. 2. ipython repl

1. pairs with jaimebuelta's artistic vs engineering dichotomy, but also plays into the scientist wearing many more hats than just programmer. Code can be two or more degrees removed from the published paper -- code isn't the passion. There isn't reason, time, or motivation to think deeply about syntax.

2. For a lot of academic work, the programming language is primarily an interface to an advanced plotting calculator. Or at least that's how I think about the popularity of SPSS and Stata. Ipython and then jupyter made this easy for python.

For what it's worth, the lab I work for is mostly using shell, R, matlab, and tiny bit of python. For numerical analysis, I like R the best. It has a leg up on the interactive interface and feels more flexible than the other two. R also has better stats libraries. But when we need to interact with external services or file formats, python is the place to look (why PyPI beat out CPAN is similar question).

Total aside: Perl's built in regexp syntax is amazing and a thing I reach for often, but regular expressions as a DSL are supported almost everywhere (like using languages other than shell to launch programs and pipes -- totally fine but misses all the ergonomics of using the right tool for the job). It'd love to explore APL as an analogous numerical DSL across scripting languages. APL.jl [0] and, less practically april[1], are exciting.

[0] https://github.com/shashi/APL.jl [1] https://github.com/phantomics/april

wwfn··on You Try Constricting Your Prey and Breathing at the Same Time
a bit off topic, but my rss feed had this story from 3 different sources side-by-side -- all published within an hour of one another. All had early access to the paper[0] and were timed for when the embargo lifted? ... or everyone's just into snakes now

The Atlantic write up was the best of the three, including a lot more background (snakes have a vestigial lung!?). NPR had a disappointingly click-bait trope style headline.

  > This trick keeps snakes from suffocating as they squeeze and swallow their prey
  > NPR - 1 minute read 
  >
  > How Boa Constrictors Breathe While Squeezing the Life Out of Their Prey
  > NYT > Science - 1 minute read 
  >
  > You Try Constricting Your Prey and Breathing at the Same Time news
  > The Atlantic - 5 minutes read
[0] https://journals.biologists.com/jeb/article-abstract/225/6/j...
← PreviousPage 2 of 2