Better HN
topnewbestaskshowjobs
Log inSign up

panic

29,749 karma · joined Sep 16, 2009 (17y ago) · 3,593 submissions

Submissions

comment 9y ago · link · parent

Yes, the program is written in terms of callbacks, just like monadic programs are written in terms of "return" and "bind" callbacks. This style isn't any more imperative than monadic programming. You could port this code to Haskell (using typeclasses instead of modules) and it'd work just as well.

comment 9y ago · link · parent

If you like this article, the rest of Oleg's stuff on this style of embedded DSLs is also worth reading: http://okmij.org/ftp/tagless-final/index.html

One particularly cool (and surprising, to me at least) trick is defining interpreters that carry out composable optimization passes on a DSL without needing an intermediate representation: http://okmij.org/ftp/tagless-final/course/optimizations.html

1713.

Non-determinism: a sublanguage rather than a monad(okmij.org ↗)

97 points · by panic · 9y ago · 73 comments

1714.

A Logic File System (2003)(usenix.org ↗)

2 points · by panic · 9y ago · discuss

comment 9y ago · link · parent

This is really cool! I wonder what the other boundaries on the map (road, neighborhood, city, etc.) would look like when projected onto the time view.

comment 9y ago · link · parent

Or, wonder why the heck do I have to read 8k lines to understand how memory allocation works, …

glibc isn't exactly known for having readable code. There are other libc implementations with more of a focus on simplicity. The malloc in musl libc, for example, is only 533 lines long: https://git.musl-libc.org/cgit/musl/tree/src/malloc/malloc.c

comment 9y ago · link · parent

I'm not sure this argument works -- many democratic states (including the US) were also created by violent revolutionaries.

comment 9y ago · link · parent

One of greatest things about the Web is how easy it is to write HTTP clients and servers. I see why HTTPS everywhere would be helpful, but I also think it would be a shame to lose this simplicity. Has there been any thought put toward simpler alternatives to HTTP+TLS?

comment 9y ago · link · parent

The fundamental question is: what is the filesystem for? If it's for users to store documents, you want something like BeFS, with slower performance but more features. If it's for programs to persist data, you want something minimal which you can build database libraries on top of. Trying to do both at the time pulls you toward a mediocre middle ground.

Operating systems should really have two separate systems, one for user documents and one for low-level persistence (the former probably being built on top of the latter). Programs needing plain persistent storage shouldn't have to pay for nice features at the document level, and we shouldn't have to compromise the user experience of document browsing to get high-performance persistence.

1720.

Good Forecasting Takes Strong Nerves(mailchi.mp ↗)

1 points · by panic · 9y ago · discuss

1721.

Harvest: wind energy used to mine cryptocurrency to fund climate research(julianoliver.com ↗)

3 points · by panic · 9y ago · discuss

comment 9y ago · link · parent

FreeBSD satisfies all your criteria (all the BSDs do, really). It's pretty similar to Linux, though.

1723.

Scholarship is conservative, tinkering is progressive(lemire.me ↗)

3 points · by panic · 9y ago · discuss

1724.

The design side of programming language design(tomasp.net ↗)

188 points · by panic · 9y ago · 74 comments

comment 9y ago · link · parent

Sure, but centralized services have the same user acquisition problem. Is there something that makes decentralized services uniquely bad at getting users to switch?

comment 9y ago · link · parent

Where would you find these metrics? Looking at the federated timeline, I see posts appearing at a pretty fast rate (more than one per second), though most of them are in Japanese.

comment 9y ago · link · parent

None of the reasons they give -- difficulty of user acquisition, conflict between security and convenience, curation, or economies of scale -- are fundamental obstacles to making a decentralized social network. Mastodon has found some success despite facing the same problems.

comment 9y ago · link · parent

If your text is always valid UTF-8, there are various illegal UTF-8 octets available for this purpose: 0xff, 0xfe, and so on. Unlike null terminators or record separator characters, these characters are guaranteed not to exist in your string by the UTF-8 validation code you're already running.

comment 9y ago · link · parent

jEdit appears to have had multiple cursors since at least 2005, though I don't know how useful they were.

comment 9y ago · link · parent

Depth buffers only work well for opaque objects, which cover each other completely. With partial coverage or blending, multiple objects could end up contributing to a pixel in an order-dependent way (e.g., if you're viewing an anti-aliased leaf edge under the surface of water through a window). The depth buffer, which only stores a single depth, doesn't solve this problem directly -- you can use it to render each transparent layer one-by-one ("depth peeling"), but this can be slow.

comment 9y ago · link · parent

I think a crowdfunding site specifically designed for software projects would go a long way toward solving this problem. Something like this: http://www.daemonology.net/blog/2017-05-11-plan-for-foss-mai...

comment 9y ago · link · parent

On the subject of machine code as data, there was an interesting text file released at this year's SIGBOVIK: https://www.cs.cmu.edu/~tom7/abc/paper.txt (you'll need to resize your browser window to read it properly -- for an easier reading experience you can also check out the PDF and video at https://www.cs.cmu.edu/~tom7/abc/).

comment 9y ago · link · parent

Why is California such an outlier? Is it solely due to Prop. 13, or are there other factors?

comment 9y ago · link · parent

Presumably people could still rent out their own property, as long as the owner is an individual who either lives on the premises, rents (but doesn't own) another place in the city, or lives outside the city entirely.

comment 9y ago · link · parent

What do you mean by "run more efficiently"?

Just focusing on space efficiency: very dense cities could build an underground transportation system connecting people's homes directly to space-efficient, centralized facilities. Instead of having a kitchen, you would order food or freshly-prepared ingredients to combine yourself. Instead of doing laundry by hand, you would send it to a centralized laundry facility, which would clean it for you and send it back. Trash would be disposed of using the same system. You could also use this system to store and retrieve things you use infrequently, so they don't have to take up space in your home.

A system like this would enable higher density by reducing the number of facilities you need in and adjacent to your home. It would free up road space by focusing commercial traffic on these centralized facilities instead of distributing it throughout the city. And it would free up road-side space by lowering the demand for laundromats, supermarkets, and so on.

1736.

I downloaded an app and was part of the Cajun Navy(houstonchronicle.com ↗)

5 points · by panic · 9y ago · discuss

1
575859
120