Better HN
topnewbestaskshowjobs
Log inSign up

absdiff

3 karma · joined Dec 19, 2023 (2y ago) · 2 submissions

Submissions

comment 2y ago · link · parent

Python and Haxe have a function-like cast like that, but the argument order differs between the languages. I prefer D's approach because it doesn't have this opportunity for confusion. The prefix operator only has one place for the type to go.

https://docs.python.org/3/library/typing.html#typing.cast

    typing.cast(typ, val)
https://haxe.org/manual/expression-cast.html

    cast expr; // unsafe cast
    cast (expr, Type); // safe cast

comment 2y ago · link · parent

I'm using a local gitweb instance for this purpose. I have a directory of favorite repos cloned using "git clone --mirror" and a cron job to sync them every 3 hours. gitweb provides a web interface for browsing them.

I like that it lets me open files without JavaScript enabled and search the code without logging in. I still use GitHub.com to read the issues on a couple repos though.

Example of what gitweb looks like: https://sourceware.org/git/ - There's also cgit which is similar: https://git.kernel.org/