HNHacker News
TopNewBestAskShowJobs

daveliepmann

138 karma · joined September 4, 2014

Twitter @daveliepmann Github daveliepmann
submissionscomments
daveliepmann··on When you get to be smart writing a macro
Isn't this the exact same number of keystrokes? 'Shift-3 p' versus 'Shift-9 p' on my keyboard.
daveliepmann··on Pontevedra, Spain declares its entire urban area a "reduced traffic zone"
It has to do with the fact that air pollution has massively decreased, but cars still kill a lot of people. That's a considered and substantive point, I reckon.

I wrote it because in my experience a "balance" between modes can mean something like Amsterdam, or it can mean the status quo in the USA-outside-NYC, which is to say extreme and punishing car dependence. Sorry if I had you wrongly pegged. My belief is that a good balance is radically fewer cars in city centers. What's your idea of a good balance?

daveliepmann··on Pontevedra, Spain declares its entire urban area a "reduced traffic zone"
Because rail infra scales really well, bus infra scales well, and bike infra scales well -- while car infra scales disastrously.
daveliepmann··on LSP client in Clojure in 200 lines of code
This looks like the other completely normal, idiomatic Clojure programs I've seen which manipulate a StringBuilder. And as Clojurians go I'm far to the succinctness/concision-preferring end of the spectrum.

I'm curious to see your core.async-based version :)

daveliepmann··on The Turkish İ Problem and Why You Should Care (2012)
No: a Turkish keyboard has separate i/İ and ı/I keys, and Türkish-writing users with an American/international keyboard use a keyboard layout with modifier keys so that the i/I key can be altered to ı/İ. (I do the latter for idiosyncratic reasons.)

The person you're replying to is pointing out that differentiating English-i from Türkish-i requires some other unwieldy workaround. Would you expect manufacturers to add a third key for English i, or for people with Turkish keyboards to use a modifier key (or locale switching) to distinguish i from i? All workarounds seem extraordinarily unlikely.

daveliepmann··on Why I ever wrote Clojure
He didn't mean he'd quit out of boredom, he meant he'd quit out of frustration with proglangs that bite you in the ass when writing e.g. concurrent programs
daveliepmann··on Why I ever wrote Clojure
He wasn't writing corporate CRUD apps, he was working on systems like radio broadcasting, voting machines, and Datomic, which involve significant concurrency challenges.
daveliepmann··on Why I ever wrote Clojure
>I suspect this is the real reason Clojure was created, I bet Rich was just really bored.

I notice too that a noticeable number of people pick up Clojure because it's new and shiny. As a longtime Clojurian I find that attitude can be disappointing to run into, like when you realize a growing friendship will die because they're not serious about living in your city.

I don't claim to know the man but the reasons Rich wanted Clojure are quite concrete, well documented, and rational. Java programs of the time were a particularly heinous form of OOP; we should not be surprised that a clever programmer would grow a preference for a dynamic, functional-first style. He found lisp superior (in interactivity, expressiveness, yadda yadda) and wanted to use it professionally.

To work in lisp required delivering something indistinguishable from a JAR (or other mainstream proglang executable). He had the realization that without immutable data structures baked into the language he'd always be subject to Other People's State.

If you think about these points logically they lead pretty straightforwardly to creating a (pragmatically) functional, dynamic, hosted lisp.

daveliepmann··on The cost of Go's panic and recover
In what context is this terminology standardized?
daveliepmann··on The cost of Go's panic and recover
>Exceptional circumstances, or exceptions for short, mean "things aren't working as expected due to programmer error".

Interesting. In Javaland this describes assertions, and the term exception is for operating errors, i.e. problems not necessarily attributable to programmer error, including your example of a network failure.

daveliepmann··on Array Languages for Clojurians (2020)
Datomic doesn't scale? Quick, tell the largest bank in South America, they must already be collapsing under the weight of all those transactions!
daveliepmann··on Array Languages for Clojurians (2020)
Interop to APL from Clojure is completely wild and masochistic indeed. Hadn't seen this, thanks
daveliepmann··on Idiomatic Errors in Clojure
>should functions return (value, error), or (error, value)?

a benefit of using maps with error keys :D semantic rather than positional destructuring. also avoids that needlessly obfuscatory Left and Right terminology for Either monads

daveliepmann··on Idiomatic Errors in Clojure
The "error maps" approach from the article doesn't have Go's compiler enforcement, but shares many attributes including the "being explicit about how to handle an error" aspect you mention.
daveliepmann··on Idiomatic Errors in Clojure
Throwing ex-info is conspicuously missing from your list of examples.

>If everything is idiomatic, is anything idiomatic?

Welcome to lisp! We like it here.

daveliepmann··on Idiomatic Errors in Clojure
I considered "Idiomatic error handling in Clojure" and decided to err on the side of concision.

Tbh the latter interpretation was not one that occurred to me. Curious what you would put in such an article.

daveliepmann··on Idiomatic Errors in Clojure
People's use of spec varies widely. My take is that error maps are for internal work. Contracts are for what passes over some sort of system boundary, so it seems feasible to just...not spec the monadic aspect?

Personally I haven't worked on a project where the two overlapped, so perhaps someone with direct experience can chime in on how they navigated it.

daveliepmann··on Idiomatic Errors in Clojure
I appreciate the kind words and am glad it helped :)
daveliepmann··on Idiomatic Errors in Clojure
Much appreciated. You might appreciate this follow-up on assertions: https://gist.github.com/daveliepmann/8289f0ee5b00a5f05b50379...
daveliepmann··on Idiomatic Errors in Clojure
:tried is new to me, thanks for the tip! In the context where I've used this the most the entire map was the payload/parameter so it didn't make sense there, but I see where that could be useful.

I like having a :type key - for me usually :error/kind

daveliepmann··on Try Clojure
https://github.com/Tensegritics/ClojureDart/
daveliepmann··on Why is Jepsen written in Clojure?
It has several. None of them dominate; most people assemble their own from individual libs.
daveliepmann··on Why I always hit the crosswalk button (2015)
>It rudely makes cars stop

Why don't you consider it rude to make the people walking stop?

daveliepmann··on Why I always hit the crosswalk button (2015)
Beg buttons are the worst. Traffic engineers who design them into any but the most remote intersections should be ashamed of themselves. One more piece of obscene car culture and dependence.
daveliepmann··on Berlin's indoor pools
There are areas where you must wear clothes (zB the central saltwater pool), areas where you are forbidden from wearing clothes (saunas), and areas where it's up to you (hot tubs, cold tubs, usw.).
daveliepmann··on Germany's terrible trains are no joke for a nation built on efficiency
>They are not building more autobahn!!!

Doch, Alter. The German federal government and at least 3 top parties are completely captured by the auto industry, so we're tearing down neighborhoods to extend urban freeways in Berlin: https://en.m.wikipedia.org/wiki/Bundesautobahn_100

And the FDP scored the transport ministry in the traffic-light coalition, so of course there announced a plan to extend a bunch of highways: https://www.cleanenergywire.org/news/plans-fast-track-expans...

daveliepmann··on Java 21 VirtualThreads vs. Clojure Lazy Seqs
"All of the Clojure collections...are efficient and inherently thread-safe."

https://clojure.org/reference/data_structures#Collections

"Seqs differ from iterators in that they are persistent and immutable, not stateful cursors into a collection. As such, they are useful for much more than foreach - functions can consume and produce seqs, they are thread safe, they can share structure etc."

https://clojure.org/reference/sequences

I think it's a fundamental enough property of clojure data structures that it would be redundant to mention it in every docstring.

daveliepmann··on The force that shapes everything around us: Parking
Researchers like Giulio Mattioli have shown pretty well what should be clear from watching politics: getting people out of their cars requires sticks as well as carrots.

>Improvement to public transport is the only win-win policy measure in the diagram. As a matter of fact, all policies that reduce the need for an automobile to access jobs and services by improving the effectiveness of other modes are generally seen as contributing to alleviating social exclusion, insofar as they improve the situation of households without a car (Shaw and Farrington, 2003, p.109). They should have a positive impact on environmental sustainability as well, insofar as they encourage a modal shift from the private car to less polluting means of transport. However, transport researchers generally agree that “pull” measures that encourage voluntary reductions of car use – or “carrots” – are unlikely to effectively bring about change at an adequate scale and speed (Huby and Burkitt, 2000, p.390); therefore it is generally pointed out that there is a need for complementary “push” measures, which aim to reduce car use in a more direct and coercive manner (“sticks”).

https://www.researchgate.net/profile/Giulio-Mattioli-2/publi...

Or see this thread: See https://twitter.com/giulio_mattioli/status/16250810050893660...

Making driving worse is good, actually.

daveliepmann··on The force that shapes everything around us: Parking
How are they for a grandparents pushing a stroller?

Would you say they encourage a vibrant street culture of cafes and shops?

The ones I've seen, especially in Berlin and İzmir, are loud and a hassle to cross. That's because walkways and bikeways over multi-lane roads are car infrastructure. They are there to prioritize high-speed automobile traffic with few interruptions. I'm happy for the one going up at my gym, but I know it's there to ensure bike/ped political forces can't endanger the trunk road underneath. True pedestrian infrastructure there would involve a major speed and size downgrade to the road, which is unacceptable, thus the political defensive move to pay out the nose for something car advocates would never normally fund.

daveliepmann··on The force that shapes everything around us: Parking
Elevated pedestrian walkways are miserable for people walking. You seem pretty deeply carbrained.
Page 1 of 2Next →