cipherself

Joined 3 years ago

Karma
181
Submissions
51
Member since
Jun 3
https://mohamed.computer/ https://synmach.com/
View on Hacker News

Recent submissions

Comment · 4 months ago
The article’s distinction about memory is a bit too simplified. Virtual memory is address space mapped or reserved by the process. RSS is resident physical pages, not necessarily “actively used.”. RSS also overcounts shared memory, which is why PSS/USS matter.
Comment · 5 months ago
For anyone else who's suffering, paste this in the console in devtools:

  document.getElementsByTagName('main')[0].style.margin = '0 auto';
Comment · 9 months ago
Comment · 9 months ago
Comment · 9 months ago
Comment · 9 months ago
Comment · 10 months ago
I don't think this is bad, if you know Python then most of the code will be fine for you. I think you're probably referring to pm_reduce_collapse, but while it looks daunting at first, it really isn't when you consider the alternatives, I'd be curious on how you'd improve it short of creating a DSL.
Comment · 10 months ago
I have written parsers using parser combinators in Haskell and Clojure. I find that ML-like (Haskell, OCaml, StandardML) languages generally are great at writing parsers, even hand-written ones in it is a superior experience.

In this case, this was a project at $EMPLOYER in an existing codebase with colleagues who have never seen Haskell code, using Haskell would've been a major error in judgement.

Comment · 10 months ago
Comment · 10 months ago
Comment · 11 months ago
That was a great book, I wonder what the 2025 equivalent of it is...
Comment · 11 months ago
12 (13?) years ago I had also written a Naïve Bayes classifier in Perl https://github.com/cipherself/NaiveBayes_perl

IIRC, next thing on my TODO list was to add vectorization. Also (like OP) it uses log probabilities to avoid floating-point underflow.

Comment · 11 months ago
Comment · 1 year ago
> I recommend using the `dir` function in a REPL

A while back I wrote this https://mohamed.computer/posts/python-internals-cpython-byte..., perhaps it's interesting for people who use `dir` and wonder what some of the weird things that show up are.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton