HNHacker News
TopNewBestAskShowJobs

jdnier

2,539 karma · joined January 8, 2009

[ my public key: https://keybase.io/dniergarth; my proof: https://keybase.io/dniergarth/sigs/oRsRM5sXVul2CqX_mAu0Yk641sbmqV4lEiW3IfgVivg ]
submissionscomments
jdnier··on Star Formation near the Sun is driven by expansion of the Local Bubble
And related, use of the glue library for Python in their research[1].

"glue[2] is a Python library to explore relationships within and between related datasets. glue is publicly available for download at glueviz.org."

"The discovery of the origin of nearby star formation would not have been possible without glue. It allowed the researchers to seamlessly integrate our models for the 3D structure of nearby molecular clouds with the 3D locations and motions of young star forming regions and the latest model of the Local Bubble."

[1] https://sites.google.com/cfa.harvard.edu/local-bubble-star-f...

[2] http://glueviz.org/

jdnier··on ADHD Accommodations Guide
Dr. Russell Barkley's book, Taking Charge of Adult ADHD, is also good.
jdnier··on Lead exposure from routine consumption of coffee and tea from ceramic mugs
Really interesting.

From the article: "Total Lead content in the glaze or coating of modern mugs (as detectable with an XRF) is not regulated. As long as mugs are not leaching Lead at the time of manufacture (when they are brand-new), they are considered to be safe to use — even if the Lead content of the glaze is very high. However, for context, the amount of Lead considered unsafe (and illegal) in the paint, glaze or coating of a newly-manufactured item manufactured and sold as “intended for use by children” is 90 ppm or higher. The good news is that, since children’s items are regulated for total Lead content (as of 2008), newly-purchased children’s mugs legally must have coatings below 90 ppm Lead [and my findings have confirmed that manufacturers are generally complying with this law — although I recommend sticking with children’s items manufactured in 2011 or later, as it took a while for the companies (and their supply chains) to get up to speed in their compliance with the new regulations]."

jdnier··on Scientists have found a way to harden wood to make a knife that rivals steel
I'd like to see how this material behaves when formed into kitchen utensils like wooden spatulas and spoons rather than a knife. Would the density be more like metal (heavy)? Maybe it would scratch a nonstick surface like a metal utensil. But if I could have my wooden utensils in a form that wouldn't wear down or fall apart eventually from water and heat exposure, that would be great.
jdnier··on Modern Communication: Sockets (2014)
Details on NATS:

https://nats.io/

https://github.com/nats-io

jdnier··on KBC Void
Mentioned his one of several fascinating comments in a recent HN post (source: https://news.ycombinator.com/item?id=28574406).

> It's been known since the 1990s (https://arxiv.org/abs/astro-ph/9503044 ) that cosmic voids & supervoids aren't strictly speaking empty at the largest scales. More recently sky surveys have found evidence that we are probably in a supervoid: https://en.wikipedia.org/wiki/KBC_Void

jdnier··on Comparing SARS-CoV-2 natural immunity to vaccine-induced immunity [pdf]
> I'm not an anti-vaxxer but was holding out.

No judgement, just genuinely curious, but what was your reason for holding out?

jdnier··on Show HN: Work with CSV files using SQL. For data scientists and engineers
If your work is more OLAP focused, DuckDb has good tools for loading csv files. https://duckdb.org/docs/data/csv

DuckDB is like a columnar SQLite. It also has great support for Pandas DataFrames.

jdnier··on The Idempotency-Key HTTP header field
> Do you mean to thwart copy-as-curl script kiddies?

Yes, that's what I had in mind.

jdnier··on The Idempotency-Key HTTP header field
Yes, but captcha is on the form. I'm thinking more about a single-page app that submits form data via an API. That API call can generally be replayed.
jdnier··on The Idempotency-Key HTTP header field
I see an interesting application for the Validity, Expiry, Enforcement, Fingerprint sections.

Many web apps generate HTML forms but submit form values via an API endpoint. With browser web tools and standard options like "copy-as-curl", it's very easy to run a "replay attack", where an adversary submits the form manually once, does a copy-as-curl (or similar) on that POST, then replays the POST repeatedly, updating particular values in the generated curl output for each subsequent POST.

This gets around form protections like captcha and allows for rapid abuse via the API that backs the form. Enforcing that an idempotency key/token be generated on the server side or that it match the submitted content or be valid for a short timespan could make replay attacks less convenient.

jdnier··on JupyterLab LaTeX – live-editing of LaTeX documents in JupyterLab
Same here. It's the most painful limitation of Jupyter, in my experience.
jdnier··on Principled Procedural Parsing (2019) [pdf]
> Autumn is a parser combinator framework written in Java that can be seen as an extensible superset of PEG. Autumn’s set of built-in parsers can be extended by the user2 using arbitrary Java code.

The user manual is here: https://github.com/norswap/autumn/blob/master/doc/README.md

jdnier··on Show HN: Euporie, a Tui for Jupyter Notebooks
See the source code. It's a good real-world example of how to use prompt_toolkit to create a non-trivial TUI application.

https://python-prompt-toolkit.readthedocs.io/en/master/

jdnier··on Building Rich Terminal Dashboards
Also, maybe of interest...

> prompt_toolkit 3.0 is completely type annotated and uses asyncio natively.

The rich source is also type annotated and very clean and readable.

jdnier··on Building Rich Terminal Dashboards
The Console and Layout api looks really simple for creating dashboards.

Another option for full-screen apps is Python Prompt Toolkit[1], which also handles keyboard and mouse input and can be used to implement editors[2].

[1] https://github.com/prompt-toolkit/python-prompt-toolkit

[2] https://github.com/prompt-toolkit/pyvim

jdnier··on The future of microwave cooking is solid-state (2016)
https://thespoon.tech/miele-shipping-the-dialog-their-oven-w...

Wow, 7,990 EUR!

Description from 2017: https://thespoon.tech/miele-introduces-the-dialog-a-high-end...

jdnier··on Concert Roulette
This is great! Already found a great wind ensemble I haven't run into before: https://roulette.alternativeclassical.co.uk/#BSyLauxdwtw.
jdnier··on Show HN: Perfect Pitch Ear Training
This is such a good explanation, and similar to my experience. You've hit all the points that I've tried to explain to musician friends. Some people have a very different experience.
jdnier··on Type Systems Explained with Examples
That video is titled

  CppCon 2015: Sean Parent "Better Code: Data Structures"
Did you mean instead this video? https://www.youtube.com/watch?v=mYrbivnruYw

  Goals for Better Code - Implement Complete Types
jdnier··on Mastering PostgreSQL Administration [pdf]
Here's the description for this PDF from the author's website: https://momjian.us/main/presentations/administration.html

  Mastering PostgreSQL Administration

  This talk is designed for PostgreSQL administrators.  It covers all aspects of PostgreSQL administration, including installation, security, file structure, configuration, reporting, backup, daily maintenance, monitoring activity, disk space computations, and disaster recovery.  It shows how to control host connectivity, configure the server, find the query being run by each session, and find the disk space used by each database.
jdnier··on Lost Languages Discovered in One of the World’s Oldest Libraries (2017)
There is a link at the bottom of the article to some of the text images here: http://emel-library.org/gallery/sinai-palimpsests-processed-...
jdnier··on Simple SQL in Python
Perfect, thank you! I wasn't aware of importlib.resources.
jdnier··on Simple SQL in Python
My initial thought is I'd rather just have a module that would find project-related .sql files and parse into named blocks based on the comments, treating them as named strings. No db entanglement required, just a simple way to organize queries in sql files. You would use it more like this:

    import sqlite3
    import project_queries as queries  # a module that loads queries from local .sql files as strings in module namespace

    conn = sqlite3.connect('myapp.db')
    
    cursor = conn.cursor(queries.get_all_users)
    #                    ^^^^^^^^^^^^^^^^^^^^^
    
    users = cursor.fetchall()
    # >>> [(1, "nackjicholson", "William", "Vaughn"), (2, "johndoe", "John", "Doe"), ...]
aiosql may add some features to help with passing values to the query. I see `^` used with `:users` in an example but don't quite get it.

    -- name: get-user-by-username^
I often need to generate DDL details like table and column names in the query, which you don't want escaped, along with data like values and ids where you would want escaping (:users or %(users)s).

It works nicely to use string formatting (`CREATE TABLE {table_name} ...`) for DDL along with interpolation (`WHERE user_id IN %(user_ids)s`) in the same query.

jdnier··on 1:60 scale Boeing 777 made from manila folders
And one of the wires is even coiled!
jdnier··on Scaling Pandas: Comparing Dask, Ray, Modin, Vaex, and Rapids
Any sense of where Apache Arrow will fit in these libraries?
jdnier··on “It’s hard to find women engineers.”
It's an interesting idea. But no contact info, no privacy policy, almost nothing comes up under a google search.
jdnier··on You might as well be a great copy editor
A favorite of mine is the book BUGS in Writing, by Lyn Dupré (1998, Addison Wesley). It's a teach-by-example book with lots of examples she rates as ugly, bad, good, and even splendid.
jdnier··on Learn to read Middle English
Since it's "tribute", it seems like a synonym for return. A function's output is its tribute, or maybe just the thing it returns.

    def speke_parott():
        # many machinations...
        trybut = "squwak"
        return trybute
jdnier··on Editors (Vim)
It's hard to sense how much of vi is in vim, having only ever used vim. But I've never been very happy with vim, even though I've used it for 15 years. Maybe I need to find a "vim, the good parts (aka vi)" book.
← PreviousPage 3 of 13Next →