Better HN
topnewbestaskshowjobs
Log inSign up

nathell

6,186 karma · joined Apr 18, 2010 (16y ago) · 920 submissions

Just another Clojure hacker.

https://danieljanus.pl

meet.hn/city/52.2319581,21.0067249/Warsaw

Submissions

comment 5y ago · link · parent

What was wrong with only allowing ASCII in identifiers?

392.

Open letter of CERT Polska employees regarding Przemysław Jaroszewski(cert.pl ↗)

4 points · by nathell · 5y ago · discuss

393.

Flounder, a Site Builder for Gemini(flounder.online ↗)

4 points · by nathell · 5y ago · 2 comments

394.

Opinionated Queer License(oql.avris.it ↗)

3 points · by nathell · 5y ago · discuss

comment 5y ago · link · parent

Go? Isn’t Rust all the rage these days?

396.

Amazon warehouse employee in Poland dies at work(gloswielkopolski.pl ↗)

274 points · by nathell · 5y ago · 206 comments

comment 5y ago · link · parent

I prompted it to „Generate three paragraphs of nonsense text.” It responded dutifully: „Three paragraphs of nonsense text.”

comment 5y ago · link · parent

Here’s mine, in Clojure, very incomplete (16-bit x86 only for now) and using a s-expression based syntax, in 253 LOC:

https://github.com/nathell/lithium/blob/master/src/lithium/a...

comment 5y ago · link · parent

I built mine too, for similar reasons: it felt easier to write from scratch, so that my site looked the way I wanted it, than customize some of the existing solutions (Jekyll, Hugo, etc).

Sure it’s not customizable at all: it can only generate my site. And that’s fine. I like it that way.

For example: I sometimes translate poetry, and I have a bunch of code that renders individual poems from plaintext (not Markdown, because newlines and whitespace _are_ significant): https://github.com/nathell/nhp/blob/master/src/nhp/poems.clj

comment 5y ago · link · parent

Interesting approach with the polynomials! I wonder whether the performance of that one can be improved – while the coefficients aren’t integer, they become integer when multiplied by 3. So I wonder whether evaluating a whole-coefficient polynomial (using Horner’s scheme) and dividing by 3 at the end (which the compiler might optimize to a multiplication) might provide a speed boost:

    unsigned char poly_encode_2(const unsigned char dibit) {
        return (27 + x * (14 + x * (-18 + x * 7))) / 3;
    }
Haven’t measured.

comment 5y ago · link · parent

Clojure alleviates this to a great extent by automatically namespace-qualifying symbols within quasiquoted forms, which prevents clashes between let-bound symbols (which are never qualified) and ones from the global scope.

It’s still possible to shoot yourself in the foot (see https://blog.danieljanus.pl/2020/01/21/middleware/ for my personal story), but for that you need `binding`, `with-redefs` or `alter-var-root`, which are all relatively rarely seen.

comment 5y ago · link · parent

Can you clarify what number you mean by “a lot” and/or cite some research to corroborate this claim?

You quote one article [0], which has been received by the Clojure community with almost unanimous disagreement, as the author himself acknowledges (in less than friendly words).

That article in turn contains little factual information and lots of expressive verbiage. In my experience, this opinion is very much in the minority, albeit a vocal one.

[0]: http://www.loper-os.org/?p=42

comment 5y ago · link · parent

I’ll chime in with mine: Skyscraper (Clojure) [0] builds on Enlive/Reaver (which in turn build on JSoup), but tries to address cross-cutting concerns like caching, fetching HTML (preferably in parallel), throttling, retries, navigation, emitting the output as a dataset, etc.

comment 5y ago · link · parent

Another computer implemented in Life (that isn’t covered by the article) is the OTCA-metapixel-based one in which Tetris was implemented:

https://codegolf.stackexchange.com/questions/11880/build-a-w...

405.

What the GNU?(ariadnavigo.xyz ↗)

100 points · by nathell · 5y ago · 146 comments

406.

Testing a compiler that can’t even print(blog.danieljanus.pl ↗)

14 points · by nathell · 5y ago · 2 comments

comment 5y ago · link · parent

Since 1956.

https://en.wikipedia.org/wiki/Klub_Inteligencji_Katolickiej

comment 5y ago · link · parent

> 99.5% of programming

Pulling numbers out of thin air like this to support an argument is counterproductive. This should read “Most of programming”, unless there’s research that can corroborate the number.

comment 5y ago · link · parent

Wikipedia asks people not to crawl it. There are database dumps that you can instead import into your local MySQL and work from there.

https://en.wikipedia.org/wiki/Wikipedia:Database_download#Pl...

comment 5y ago · link · parent

At Fy!, we’ve been using Pop for impromptu remote pair programming sessions for a few months now. The killer feature, for us, is how easy it is to take or surrender control over the sharer’s screen. Much lower friction compared to Zoom or GMeet.

It works well, too. There’ve been random hiccups, but nothing too disturbing. Most of the time it just gets out of the way.

Thanks for the great tool!

comment 5y ago · link · parent

"Managing Gigabytes" by Witten et al is _the_ book that got me into the field of compression back in the day. Granted, it’s a bit dated now as there’s been a lot of progress in the field, but I’d still heartily recommend it to newcomers.

comment 5y ago · link · parent

Thanks for the interest!

My most extensive use of Skyscraper to date has been to produce a structured dataset of proceedings, including individual voting results, of Central European parliaments (~500K total pages scraped, ~100M entries). I’ll do a full writeup at some point.

comment 5y ago · link · parent

I’ve done a fair share of scraping, and I learned that on a large scale, there are a lot of cross-cutting repetitive concerns. Things like caching, fetching HTML (preferably in parallel), throttling, retries, navigation, emitting the output as a dataset…

My library, Skyscraper [0], attempts to help with these. It’s written in Clojure (based on Enlive or Reaver, both counterparts to Beautiful Soup), but the principles should be readily transferable everywhere.

[0]: https://github.com/nathell/skyscraper

comment 5y ago · link · parent

There was once a programmer who was attached to the court of the warlord of Wu. The warlord asked the programmer: "Which is easier to design: an accounting package or an operating system?"

"An operating system," replied the programmer.

The warlord uttered an exclamation of disbelief. "Surely an accounting package is trivial next to the complexity of an operating system," he said.

"Not so," said the programmer, "When designing an accounting package, the programmer operates as a mediator between people having different ideas: how it must operate, how its reports must appear, and how it must conform to the tax laws. By contrast, an operating system is not limited by outside appearances. When designing an operating system, the programmer seeks the simplest harmony between machine and ideas. This is why an operating system is easier to design."

The warlord of Wu nodded and smiled. "That is all good and well, but which is easier to debug?"

The programmer made no reply.

– The Tao of Programming, 3.3

comment 5y ago · link · parent

GCC also has dynamic gotos as a C extension, called „computed gotos”. See:

https://eli.thegreenplace.net/2012/07/12/computed-goto-for-e...

https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html

416.

Things I wish Git had: Commit groups(blog.danieljanus.pl ↗)

289 points · by nathell · 5y ago · 193 comments

comment 5y ago · link · parent

I’ve been a very happy user of maps.me since when it was still called MapsWithMe, until they’ve started to push it in the downhill direction.

I’m so happy that this fork exists! Switching in an instant – will support the authors if I like it. :)

comment 5y ago · link · parent

Wow. That was unexpectedly, profoundly beautiful. Not so much a game as a work of art, definitely worth some time to experience. Makes me want to donate to the authors.

From the colophon [0]:

> Each experience of Wayfinder is as unique and ephemeral as the natural world itself. The visual assets are assembled procedurally and delivered in real-time. The lines of poetry are created with a mix of artificial intelligence, machine learning and generative processes, providing thousands of possible combinations. As such, Wayfinder is an ever-changing, emergent artwork with infinite possibilities.

The generated haikus seem natural. I guess this might be one of the easiest genre of poetry for a computer to generate, with a well-trained model that can juxtapose matching lines.

[0]: https://www.nfb.ca/interactive/wayfinder

comment 5y ago · link · parent

Skyscraper, my scraping and restructuring framework: https://github.com/nathell/skyscraper

I’ve used it to build datasets for various research purposes, and also an archive tool for the now-extinct soup.io: https://github.com/nathell/soupscraper

comment 5y ago · link · parent

At least it’s not COVID-19
1
131415
31