HNHacker News
TopNewBestAskShowJobs

c_moscardi

72 karma · joined January 20, 2012

http://www.christianmoscardi.com/home.html

Currently working on making the US government work better and document digitization.

You can email me at christianmoscardi@gmail.com - always happy to talk!

submissionscomments
c_moscardi··on Linear algebra done right
LADW saved me in undergrad, but I was pretty much exactly the target audience in an honors-level freshman math course:

"[per Treil, LADW is for] a student who, while not yet very familiar with abstract reasoning, is willing to study more rigorous mathematics than what is presented in a “cookbook style” calculus type course."

But yeah it's really attempting to introduce you to higher mathematics rather than get you comfortable doing linear algebra per se.

c_moscardi··on How I use LLMs to learn complex topics
Yeah, I am currently trying to work with Opus 5 to refresh myself on deep learning fundamentals, and... it's a mixed bag. I'm glad I already am familiar with the subject matter, as I can prompt for refinement and improvement. It is kinda following the Karpathy videos so far (a couple lessons in) but adding more math/derivations, which was what I asked for. It has trouble staying on topic, presenting information in a coherent/meaningful order, and providing all the context necessary to move through steps in its "course notes".

Like I said, I'm essentially continually prompting to refine the material. LLMs certainly continue to append, and never cut back. It just keeps spitting out additional content at me. So that's a bit annoying too. But I can basically get figure out what's going on with a few extra promps.

If youre curious what i've got so far... just be warned it is quite literally AI slop plus me continually prompting for clarification/cleanup etc. : https://github.com/cmoscardi/ai-for-ai

c_moscardi··on Privately-Owned Rail Cars
Riding in the family rail car like it’s 1895 (and you’re a robber baron)
c_moscardi··on Launch HN: Reducto Studio (YC W24) – Build accurate document pipelines, fast
We chatted a few months back -- congrats on launch! Looks like a great UX.
c_moscardi··on Show HN: OpenTimes – Free travel times between U.S. Census geographies
Amazing! GitHub actions to compute a giant skim matrix is an incredible hack.

I pretty regularly work with social science researchers who have a need for something like this... will keep it in mind. For a bit we thought of setting something like this up within the Census Bureau, in fact. I have some stories about routing engines from my time there...

c_moscardi··on Mark Cuban offers to fund former 18f employees
Worth noting that there already exists an ecosystem of these sorts of contracting firms (nava, skylight, truss I believe, forgetting even more) that, basically, pitch themselves as the antidote to beltway banditry

People from the federal civic tech nexus started them up over the past decade as they termed out of 18F, USDS, and PIF

c_moscardi··on AI makes tech debt more expensive
Came to post this — it’s the same underlying technology, just a lot more compute now.
c_moscardi··on Fine-tuning OCR works really well: Statistical Abstracts of the United States
Hi HN! I've spent a couple of months fiddling with OCR and wanted to share some of my findings.

The approach I share here (fine-tuning recent deep learning models) is the first one that's gotten me anything resembling high-quality OCR on these particular noisy historical documents. OCRing these has been something of a white whale for me for several years (except, a white whale that I have spent comparatively little time on).

At this point I think I am reasonably competent in OCR, but no expert... Curious for your thoughts.

c_moscardi··on The waiting time paradox: why is my bus always late? (2018)
Related reading; explains the same concept quite well IMO with NYC subway data. This is where I learned about this concept.

[1] https://erikbern.com/2016/04/04/nyc-subway-math

[2] https://erikbern.com/2016/07/09/waiting-time-math.html

c_moscardi··on AI for Data Journalism: demonstrating what we can do with this stuff
Yeah, I think MS' is the best out there, but agree that the usability leaves something to be desired. 2 thoughts:

1. I believe the IR jargon for getting a JSON of this form is Key Information Extraction (KIE). MS has an out-of-the-box model for this. I just tried the screenshot and it did a pretty good (but not perfect) job. It didn't get every form field, but most. MS sort-of has a flow for fine-tuning, but it really leaves a lot to be desired IMO. Curious if this would be "good enough" to satisfy the use case.

2. In terms of just OCR (i.e. getting the text/numeric strings correct), MS is known to be the best on typed text at the moment [1]. Handwriting is a different beast... but it looks like MS is doing a very good job there (and SOTA on handwriting is very good). In particular, it got all the numbers in that screenshot correct.

If you want to see the results from MS on the screenshot in this blog post, here's the entire JSON blob. A bit of a behemoth but the key/value stuff is in there: https://gist.github.com/cmoscardi/8c376094181451a49f0c62406e...

[1] https://mindee.github.io/doctr/latest/using_doctr/using_mode...

c_moscardi··on Show HN: Beyond text splitting – improved file parsing for LLMs
Figures, too! Yeah you could write some logic essentially on top of a library like this, and tune based on optimizing for some notion of recall (grab more surrounding context) and precision (direct context around the word, e.g. only the paragraph or 5 surrounding table rows) for your specific application needs.

Using the models underlying a library like this, there's maybe room for fine-tuning as well if you have a set of documents with specific semantic boundaries that current approaches don't capture. (And you spend an hour drawing bounding boxes to make that happen).

c_moscardi··on How to get every email returned
Funnily enough, this is another great tactic for getting emails returned (looping in someone with more leverage than you or asking them to follow up for you)!
c_moscardi··on Ask HN: How to incorporate machine learning into day job?
We should talk! I do work on automatically coding products for a shipping survey at the Census Bureau. One of the earliest production uses of ML here at Census :)

5 minute deck: https://github.com/codingitforward/cdfdemoday2018/blob/maste...

Feel free to shoot me a message.

c_moscardi··on The hacker's guide to uncertainty estimates
Yep, my read too. The code he provides is definitely the Clopper-Pearson formula. [1]

This confused me as well, since I've always used the normal central-limit-based confidence interval for binary outcomes.

[1] https://en.wikipedia.org/wiki/Binomial_proportion_confidence...

(I am no expert in the analytic underpinnings of the beta distribution or precisely how it is the conjugate prior to the binomial -- or, rigorously speaking, what conjugate prior means -- but the formula here lines up with his formula :P )

c_moscardi··on Mithril Capital Management Is Leaving the Bay Area
I feel like they're learning from the mistakes of their forbears and getting out before the getting's truly bad...
c_moscardi··on The Second Avenue Subway and Property Values
Author here! I'll keep an eye on this thread and would love to discuss anything in the post that's of interest to you.
c_moscardi··on Ask HN: Ubuntu Desktop Default Apps
Awesome idea! Let me make a shameless plug for my web app that does something like this for ubuntu LTS distros:

https://www.lilite.co/

I'd love for it to be made obsolete though :)

c_moscardi··on Show HN: Lilite, a Linux package autoinstaller
Thanks for the feedback! I wasn't particularly dedicating this to new users. This solves a problem for me, an experienced *nix user. I'm not even sure it /would/ solve a problem for new users (arguably ninite doesn't either) - you need to know what packages you care about in order to have an interest in downloading them.

This site gives me an interface to say, "oh yeah, I /do/ need VLC on this laptop, come to think of it", rather than having to lazy-evaluate that when I have a video downloaded and realize I don't currently have a means of playing it.

I spend a fair bit of time doing DevOps work, and this isn't meant to be some sort of configuration management or provisioning tool. This is for desktop / dev users, which is, I think, quite a different use case (but an increasingly relevant one). I have a dotfiles repo, which is to say I'm familiar with the "document things in scripts and repos" game - but it's not clear to me that something like a script-as-documentation is even a useful process to go through when any given computer I set up is going to be used differently. That laptop playing VLC is very different than the web dev box I spin up to mess around with a new project.

c_moscardi··on Show HN: Lilite, a Linux package autoinstaller
Hi all, I created this site!

The motivation was basically a version of ninite[1] for Linux. So very desktop-focused. I actually got in touch with the ninite folks, who used to run a Linux installer [2]. They said there wasn't enough interest and package managers are "good enough." I respectfully disagree on that point - I think that having the ability to point-and-click for the core, most important packages you want to install is really useful when you're spinning up a new desktop from scratch.

I was running into this problem after basically doing ad-hoc setup for every new machine I turned on. Sure - I could write a shell script / list of packages and save it to my dotfiles repo, but where would the fun be in that? :)

(Plus, package lists on every machine are different)

[1] https://ninite.com/ [2] https://ninite.com/linux

c_moscardi··on Request For Research: Basic Income
A few good ones here - another really interesting, current initiative is Bolsa Família, a Brazilian assistance program that functions similarly to a basic income subsidy - the main difference is that it requires families to demonstrate up-to-date immunizations and good school attendance rates for children.

https://en.wikipedia.org/wiki/Bolsa_Fam%C3%ADlia

c_moscardi··on Airports Create Hotel Complexes, Aiming to Become Destinations
WRT the TWA flight center at Kennedy, this coming weekend is the last chance for the general public to see it before redevelopment, via Open House NY!

http://www.ohny.org/

c_moscardi··on The Muen Separation Kernel
The issue here is the spec - no runtime errors at the source code level is, as I understand, a completely different specification than end-to-end implementation correctness.

In particular, the Muen Kernel report itself [1] explains:

By implementing the kernel in SPARK and proving the absence of runtime errors, we have shown that the kernel is free from exceptions. While these proofs provide some evidence to the correctness claim of the implementation, the application of these particular formal methods do not provide any assurances beyond the error free execution of the kernel. Proving functional properties such as the correspondence of the scheduler to a given formal specification is necessary to further raise the confidence in systems based on the Muen kernel.

In other-words, we don't yet have formal confirmation that this thing actually does what we might expect it to - just that its execution is bug-free.

[1] http://muen.codelabs.ch/muen-report.pdf

c_moscardi··on Ethics for Freelance Programmers
To me, the interesting bit here is that you have to be honest with yourself about your limits as well - and in particular, be very good about understanding those limits.

I think in this instance, ethics and economic incentives align - your expertise is part of your value-prop to clients, and having a good grasp of your limits makes you substantially more valuable. You get things done on-time, with clear expectations set, and do a prompt and thorough job providing what you're being paid for.

Personally, as a natural optimist, one thing I need to be especially careful about is not saying "yeah that's doable!" and setting expectations too high - it can potentially lead to a messy situation. That said, one of my favorite parts of freelancing is that I get confronted with new, unique challenges that I've never dealt with before - there's a balance to be struck here.

c_moscardi··on Embedding D3 in an IPython Notebook
RASMI!!!

Yeah, most of our curriculum uses regular old matplotlib. We only use this technique specifically in our D3 curriculum. In general I can't think of many use cases where this is actually better than just having a couple of files, aside from instructional ones.

c_moscardi··on Embedding D3 in an IPython Notebook
IPython itself is a REPL with many, many convenience and magic functions, auto-completion, etc... If you write any amount of python, it's hugely useful!

Then, there are IPython Notebooks, which give you the HTML, cell-based frontend for executing code.

Jupyter is the v2/generalization for both of these things - there is the Jupyter shell, which is a plugin-friendly REPL, and Jupyter notebooks, which allow you to run code across a variety of langauges. AFAIK so far, you can only run one language per Jupyter notebook (though having dug around the source code, the possibility for multiple languages on a per-cell basis is very much there).

I still find myself using IPython and Jupyter interchangably, which probably doesn't help the confusion.

In terms of who uses this stuff: IPython notebooks are very popular across academia and for lectures/talks. Check out all the cool learning material here: https://github.com/ipython/ipython/wiki/A-gallery-of-interes...

c_moscardi··on Embedding D3 in an IPython Notebook
Very cool. I think this is, ultimately, what Jupyter hopes to move towards.

Literally their first example is embedding D3...

http://sharing.beakernotebook.com/gist/anonymous/e21582541d7...

c_moscardi··on Embedding D3 in an IPython Notebook
Thanks! I'm still working out mobile-friendliness, but yeah, I'm really happy with how the site turned out generally.
c_moscardi··on You Don't Know JavaScript Book Series
i'd be curious to hear others' opinions, but it seems to me JS isn't the sort of language that one wants to master in itself. it's very much a language defined by its use cases.

then again, i'm just trying to become an all-around better fullstack developer for my current employment situation - so i'm mostly using (and pull-requesting) frameworks rather than writing my own

given this perspective, i'm much more interested in the entire [and rapidly expanding] toolchain for modern js development - and learning the language's esoterica [and i am the sort of person who takes pleasure that stuff] as i become an all-around better js dev

c_moscardi··on Hacking the Used Car Purchase
This is so true. I was really surprised not to find more posts like these, because working on your own car is very fun, gets you away from the computer for a bit, and definitely embodies the DIY mentality most of us on this site have.

That said, if you're in the market and inexperienced [or maybe even experienced], take a prospective car to a professional mechanic. Don't buy a junk car and expect to be able to fix everything yourself, unless you want a fun side project which will require a ton of man-hours [and more money than you'd expect] to complete. But on the overall, doing your own maintenance and fixing smaller problems you encounter [timing belt issues? no biggie!] is very very enjoyable.