HNHacker News
TopNewBestAskShowJobs

lgessler

1,767 karma · joined September 29, 2015

https://lgessler.com
submissionscomments
lgessler··on Using Clojure for Web Apps
Some of my favorite Clojure libraries in this space:

- instaparse: takes EBNF (and other formats) as a string and gives you a parser instantly (!!!) https://github.com/Engelberg/instaparse

- re-frame: React-Redux alternative that IMO is much easier to work with https://github.com/day8/re-frame

- reagent: React wrapper https://reagent-project.github.io/

- ring https://github.com/ring-clojure/ring

- fulcro https://github.com/fulcrologic/fulcro

More than any library, though, what keeps bringing me back to Clojure is its incredibly blissful set of persistent data structures. It's a pernicious accident of history that we are taught to accept references to mutable objects as normal, inevitable, and desirable in most CS curricula. It is much easier to develop, debug, and maintain immutable data structures instead, and I consider my good fortune every time I get to debug something in Clojure rather than in some reference-laden OOP soup.

lgessler··on Using Clojure for Web Apps
I'm thinking of writing a project with a similar stack, is there any chance your code is open source? Also, what's your experience with Fulcro been like? Do you have any thoughts about it in comparison with other Clojure SPA libraries like re-frame?
lgessler··on False Friends of the Slavist
By that method, every true friend would be predicted to be a false friend. Sounds aren't what's important here--divergent meaning shifts in cognates is.
lgessler··on Honu: Syntactic Extension for Algebraic Notation (2012) [pdf]
One is a function, one is a call to that function. I think this is just hard to grasp because in other languages there's often not occasion to use a function pointer. But compare these two code snippets in Python and Scheme:

    >>> def add_one(x):
    ...     return x + 1
    ... 
    >>> add_one
    <function add_one at 0x7f7504bf2050>
    >>> add_one(1)
    2
    >>> list(map(add_one, [1,2,3]))
    [2, 3, 4]
That's the same as:

    => (define (add-one x)
         (+ x 1))
    add-one

    => add-one
    #[compound-procedure add-one]
    
    => (add-one 1)
    2
    
    1 ]=> (map add-one (list 1 2 3))
    (2 3 4)
lgessler··on The most successful people are just the luckiest, a new computer model confirms
https://en.wikipedia.org/wiki/Haec_ornamenta_mea
lgessler··on The Infinite Silences of Japan
I'm not sure what the particulars are in this article, but if the suggestion is that Japanese is unusually expressive and English is unusually impoverished, that probably isn't true. In general, Language A and Language B, unless they're very closely related, will always lack some grammatical categories in common that will make translation from one to the other difficult.

Eastern Pomo, for instance, requires any well-formed verb to inflect based on how the speaker learned the information being reported, with four possible values: direct, reported, inferred, or non-visually sensed (smelled, felt, etc.) knowledge. Retaining this information would be awkward in English, and encoding it in an Eastern Pomo translation would often be impossible (in the context of translating a book).

Hindi lacks articles, while English has at least a and the, which encode (roughly) how identifiable the noun it is attached to is in the present situation. The rules governing when to use the, a, or neither are incredibly subtle and complex (I'm sure you've heard second language speakers getting it wrong but not in a way you could readily explain). Going from English to Hindi, the articles can mostly be safely disregarded, but going from Hindi to English, you need to think hard about how identifiable each noun is in discourse.

I'm probably taking all this a bit too seriously, but it's frustrating to see well-intentioned but wide-eyed writers like Iyer trying to evoke a sense of wonder propped up by pseudolinguistic claims.

lgessler··on The Infinite Silences of Japan
> A single verb in Yasunari Kawabata’s short novel Snow Country is translated in 29 different ways because what we would render as “I think” can in Japan mean “I remember,” “I long for” or 27 other things.

Ugh. That might be correct in the sense that a translator could defend their choice in using a certain English word or another, but that's also correct for most words in literally every language spoken on Earth.

lgessler··on Fossil fuel divestment has ‘zero’ climate impact, says Bill Gates
This analysis ignores the social significance of divestment (i.e., which might somehow contribute to other actions which are more impactful), though it might still be that even after accounting for this divestment isn't what environmentally-conscious people and organizations should prioritize.
lgessler··on Richard M. Stallman resigns
In its most literal form I don't know if I would say I disagreed with the core of what Stallman was saying in the email (that "sexual assault" should perhaps be revised in its usage), but Stallman was tone-deaf at best to have pontificated on such a comparatively minor (and highly arguable) matter when he did and where he did. Worse, with what he wrote, there is a reading of the email where the subtext is that Stallman was trying to mitigate Minsky's culpability. I won't comment on whether I think that was indeed what he was trying to do, but it's not a good look, regardless of whether that is indeed what he was trying to do.

Many people will acknowledge the value of Stallman's stubborn, iconoclastic opinions. I'd count myself among them, and it's a little sad to see Stallman go from his pulpits. But on the other hand, I'm relieved: it might be in Stallman's constitution to be at all times a rational reasoning machine, impervious to emotion and sentiment, but this is not how most people are, and on many occasions Stallman has shown that he either doesn't understand or doesn't care about this. There are times when one should refrain from saying something that is merely correct because of the symbolic meaning it would have, or the emotional responses it would elicit.

lgessler··on Rust is the future, C is the new Assembly: Josh Triplett (Intel)
I think GP is using 'semantics' to refer to the emitted code, which is "simple" in the sense that it e.g. doesn't have a runtime or a garbage collector. What isn't simple is all the features of rust that are unheard of in other languages, like the borrow checker, but that is a feature of Rust's syntax, and (I am not a Rust expert, but my understanding is that) many of them "vanish" when the Rust code is compiled.
lgessler··on Saharan Village Is Home to Thousands of Ancient Texts
Reminds me of a talk I went to by a Benedictine monk who has spent time traveling the world digitizing texts that are at risk, especially when they're threatened by religious persecution or war. Really fascinating talk, perhaps the closest thing I've seen to a real-life Indiana Jones[1].

If you're curious about what kind of a digital life these texts could have, I'll shamelessly plug a project I've worked on for Coptic texts[2]. OCRing a document (or more commonly for Coptic, at least for now, hand-transcribing it) is often just the beginning of the ideal digital edition: there are all kinds of things humanists want, including Uniform Resource Names (URNs), linguistic annotations (POS tags, syntactic trees), orthographic normalization (i.e., bringing spelling conventions in line with modern editorial standards), and so on.

[1] I think this is him: https://www.wbur.org/hereandnow/2017/03/13/columba-stewart-m...

[2] Example document, a kind of parable about early church fathers from a body of works, the Apophthegmata Patrum: http://data.copticscriptorium.org/texts/ap/ap096n281bread/an...

lgessler··on Programming Algorithms in Lisp: Data Structures
At least in general usage, outside of any domain-specific conventions, "continuous" doesn't have to have the temporal sense. The first entry in the OED for "continuous":

> a. Characterized by continuity; extending in space without interruption of substance; having no interstices or breaks; having its parts in immediate connection; connected, unbroken.

> 1673 N. Grew Idea Phytol. Hist. ii. iii. 65 It is compounded of two Bodies. The one parenchymous; continuous throughout; yet somewhat pliable without a solution of its continuity.

> 1704 I. Newton Opticks ii. ii. 41 The dark intervals must be diminished, until the neighbouring Rings become continuous, and are blended.

> 1796 R. Southey Joan of Arc vii. 6 Round the city stretch'd Their line continuous, massy as the wall Erst by the fearful Roman..raised.

> 1859 C. Darwin Origin of Species xi. 352 In most cases the area inhabited by a species is continuous.

> 1879 J. N. Lockyer Elem. Lessons Astron. vi. 228 If we light a match and observe its spectrum, we find that it is continuous—that is, from red through the whole gamut of colour to the visible limit of the violet.

> 1881 J. C. Maxwell Treat. Electr. & Magnetism (ed. 2) I. 6 Without describing a continuous line in space.

lgessler··on Tutorial on Good Lisp Programming Style (1993) [pdf]
I agree with you, though I think a few things maybe don't hold anymore:

> Sign and date your comments!

> (Should be an editor command to do this)

Now that everyone uses a VCS (well, almost everyone), this is no longer necessary.

lgessler··on End-User Probabilistic Programming [pdf]
Dead link for some reason: https://web.archive.org/web/20190619190008/https://www.cs.uo...
lgessler··on To Evade Pre-Prohibition Drinking Laws, New Yorkers Created an Inedible Sandwich
This reminds me of how weed is currently sold in DC. You pay $60 or so for a sticker or a dozen cookies, and a courier meets you somewhere and also happens to offer you a "gift". IANAL but my guess is that since possession of weed is decriminalized up to a certain amount (but dealing is not), this is a safer way of going about it.
lgessler··on Languages of India
> This is true for Hindi and Urdu, esp when you're exposed to both. When you study both the languages theologically and linguistically, the differences become ever more apparent. It is only the mash of Hindi-Urdu called Hindustani [1] (popularized in modern day by Bollywood) that's mutually intelligible to both Hindi and Urdu speakers alike, and only in its spoken form.

You make it sound like everyday Hindi and everyday Urdu are far apart, but I'm not sure if that's true: if you took a Pakistani Urdu speaker and an Indian Hindi speaker, both from the middle class with only a modest amount of education (and therefore limited access to specialized technical vocabulary), both would have no trouble at all talking to each other. Occasionally one might use a word where the other might have preferred a different one (like زبان for the Urdu speaker and भाषा for the Hindi speaker for 'language'), but it's only possible to imagine them struggling if both were attempting to speak in the registers that are only used in exceedingly formal, technical, or literary contexts.

And when you ignore vocabulary, it becomes even more clear: the grammar of even highly Sanskritized Hindi is more or less identical to that of everyday Hindi, and while I'm less sure about what high Urdu is like, I don't think it differs grammatically from everyday Urdu either, with the possible exception of ezafe[1] (which both Hindi and Urdu speakers are perfectly able to comprehend, even if they do not produce it).

edit: this is Colin Masica's take in his book The Indo-Aryan Languages (p.27):

> The ultimate anomaly in the what-is-a-language dilemma in Indo-Aryan is presented by the Hindi-Urdu situation. Counted as different languages in sociocultural Sense B (and officially), Urdu and Modern Standard Hindi are not even different dialects or subdialects in linguistic Sense A. They are different literary styles based on the same linguistically defined subdialect.

> At the colloquial level, and in terms of grammar and core vocabulary, they are virtually identical; there are minor differences in usage and terminology (and customary pronunciation of certain foreign sounds), but these do not necessarily obtrude to the point where anyone can immediately tell whether it is "Hindi" or "Urdu" that is being spoken. At formal and literary levels, however, vocabulary differences begin to loom much larger (Hindi drawing its higher lexicon from Sanskrit, Urdu from Arabic and Persian), to the point where the two styles/languages become mutually unintelligible. To the ordinary non-linguist who thinks, not unreasonably, that languages consist of words, their status as different languages is then commonsensically obvious, as it is from the fact that they are written in quite different scripts (Hindi in Devanagari and Urdu in a modified Perso-Arabic).

[1]: https://en.wikipedia.org/wiki/Ez%C4%81fe

lgessler··on Lisp in Web-Based Applications (2001)
Is this really true? Genuine question, I'm not being snarky. When I think about common complaints about web dev, they all seem to be caused by something else. JS's non-existent standard library and mournfully inconsistent semantics were caused by Brendan Eich writing it in a weekend and never getting a chance to fix it because it got standardized too quickly. Framework churn is caused by the fact that the web browser and all its primitives were unlike any platform that came before it and we didn't (and still don't) know what the right abstractions are even for any given kind of web app. UI design to a good extent is just inherently hard and requires accounting for many details that HTML and CSS must therefore expose to you, etc.
lgessler··on Numpy Clone in Common Lisp
The claim that learning how to read and write s-expressions is hard might well be a "made up thing". (I agree with you, I think anyone, if they sat down for a day and really applied themselves to it, would get it.) On the other hand, I think you'd agree, the fact that people have strong, negative, emotional reactions to s-expressions when they first encounter them is absolutely not made up.

We could sit here and grumble about how silly it is that people cannot overcome such an irrational response (indeed I often do), but that won't change the fact that people have these responses. If we did that, we'd be doing the same thing that GUI designers did in the 90's. "Why, the widget for $x is right here. Any reasonable user will RTFM, know that $x can be checked there, and behave perfectly rationally." (And it happened just so, as decreed from developer's rolling chair, right?) Of course, we know now how misguided this is as a method for UX design: all users are in a sense irrational, and systems need redundant strategies for saving the user from themselves.

The similarity here is that we cannot will away intellectual blemishes in users, we can only accommodate them. That is Lisp's challenge if it is ever to get big. For GUI's, the solution was to take seriously users' need for visually attractive interfaces, redundant display of information, and guardrails/handholding for actions commensurate with their risk, to name a few strategies. For Lisp, it's hard to know what might be the right approach. As klibertp writes in a sibling comment, maybe the solution needs to come from outside the language itself.

lgessler··on Numpy Clone in Common Lisp
Let me tell you my perspective as a Lisp enthusiast and ex-software engineer who now works in academia. I think the problem is that most people who write software in the world (even many professional software engineers) just want to solve their problem and will resist if at all possible having to learn anything difficult (such as S-expression syntax), even if it is promised that their hard work will pay off.

The academics I work with, for instance, prefer Python, tolerate Java, do OK with JavaScript, but run for the hills when they see Lisp. When I tell them that ClojureScript not only has semantics with consistency that will elicit sobs of joy, but is also historically the most stable and concise way of targeting JS in the browser, maybe a few of them will be interested, but as soon as I show them a code snippet it's all over. They turn their heads sideways, they frown so that their lips are like the parentheses that splay before them, they mutter something about parentheses, and they go back to tripping over themselves in JavaScript trying to remember which Array functions are mutating or pure.

Learning a new syntax makes you feel dumb, even if you know how to program. And if you're feeling dumb while you're working on something that isn't even strictly related to the problem you're supposed to be solving before your deadline, it starts to get really hard to justify it. Most people only know something with a Python-like syntax, so most people will only ever work with languages which look like Python or Java since it's what they learned in their programming curriculum. It's ALGOL's world, and Lisp's just living in it.

Who does learn Lisp, then? I'd say, from what I've learned about the people in the Lisp world: mathematicians and computer scientists with intrinsic interest in PL's or the mathematical underpinnings of Lisp, old school symbolic AI researchers, and grizzled software engineering veterans who believe Lisp-family languages are engineering weapons of choice. All of these people have motivations (interest in mathematics and PL's per se, an academic interest with an historical connection to Lisp, and an insatiable itch for an ever more comfortable hammock even if it means getting out of the one you're in right now) that do not apply to the larger class of programmers that I just described.

I wish it weren't so. I wish more people would take the time to learn Lisp or an editor like Vim or EMACS: we, ahem, enlightened ones, know what a pittance the upfront investment will come to seem when the benefits of a superior tool are reaped over a lifetime, but people do not listen or do not believe when we tell them so. (Maybe they're right.) Perhaps we should ask ourselves what could make the promise of our salvation more credible.

lgessler··on Numpy Clone in Common Lisp
What exactly do you mean by function composition? If you mean you can't have long chunks of purely imperative code in CL, I'm pretty sure that's not true: CL is multi-paradigm and supports imperative style. I think you might be referring to its S-expression syntax, which is prefix?
lgessler··on IT Runs on Java 8
I'm not sure I disagree with you, but I think the counterpoint is worth stating: that a compiler is the beginning, not the end, of a productive software engineering toolkit, and that there is no software stack that has achieved perfect tooling—quite on the contrary, I think it might be fair to say that most languages lack a great deal of tooling.

There's every reason to think that software engineers and system administrators do their job much more quickly and correctly when they have the support of rich editor support, understandable compiler errors, usable interactive debuggers, profilers, dependency management that won't set your hair on fire, etc. For whatever reason, it seems like businesses often aren't interested or successful in creating these products, so frustrated developers step in to create the tools they dream of in their own work after too many days spent refactoring with regex.

It's possible that people might be drawn to tooling projects because of some kind of internalized revulsion in response to the social impact of their employer, but I think you'd expect to see developers working on tooling regardless of whether or not this is the case because of how a lot of development tooling just wouldn't exist if it weren't for individual FOSS contributors' efforts.

lgessler··on Why the U.S. Chills Its Eggs and Most of the World Doesn't (2014)
To say nothing of factors other than the type of food consumed, there are many other foods beyond eggs that could give someone salmonella...
lgessler··on We can't judge another programmer's abilities in a 60 minute interview
> These two statements are at odds. If you can tell one you can tell the inverse.

Only if you treat candidate aptitude as binary. Really, aptitude is probably better thought of as a spectrum, and if that's the case then it is not a contradiction to say that you know that (1) someone wouldn't be an obviously bad employee and (2) that same candidate might only be a meh employee.

lgessler··on Comparing JVM alternatives to JavaScript
Adding to your point, spec goes beyond the power of a (garden variety) type system, since it does its work at runtime. This of course incurs a performance hit, but you can easily exclude these checks in a prod build just by setting a compiler flag.
lgessler··on The deadly truth about a world built for men – from stab vests to car crashes
> Interesting article, but don't men invent and build a lot of things, so they do so with a certain male frame of reference?

You say this as if it is inevitable and innocuous. Would you also be so cavalier about it if the axis were not gender but physical or mental disability?

This is exactly the problem. If you're an engineer, you need to consider how your users might differ from you, or else your creation will be unusable, if not something worse. Nobody's asking engineers to make their creations universally equitable: that is obviously an infeasible goal most of the time. But they are asking us to try, or even consider it. Even in our comparatively enlightened times there have been many instances of the inexcusable ignorance engineers have shown in the design of their products. Here are just a few examples:

- https://gizmodo.com/why-cant-this-soap-dispenser-identify-da...

- https://www.nytimes.com/2018/02/09/technology/facial-recogni...

- https://www.wired.com/story/machines-taught-by-photos-learn-...

To be clear, when you were making your work bench at home, you were doing it in your personal life and not as an engineer, so I don't know if the same arguments might apply to that particular instance. But I do think you could have had a more thoughtful response to your wife.

lgessler··on Going hungry affects children for their whole lives
Whatever the cause might be, the fact remains that for some reason many impoverished people don't prepare the meals economists imagine they would. Calling this "raw ignorance" is a non-explanation. To say nothing of education and knowledge, impoverished people are also often dealing with an incredible number of problems spanning mental health and social issues, and it's not hard to imagine how these problems might individually or collectively keep a person from doing something so apparently simple.
lgessler··on Patreon ups its revenue cut, but grandfathers in old creators
If you were a content creator with no technical know-how, how else would you set up a system that would let your supporters donate $x periodically, also assuming no technical know-how on your supporters' part?
lgessler··on An Interactive Quine in Clojure
If you're using Clojure, you do end up using a lot of Java libraries, but that has more to do with how gigantic the Java library ecosystem is (indeed, this is one of the reasons behind the decision to host Clojure on the JVM) than how small the Clojure library ecosystem is (subjectively to me, it seems at least as big as the average for what you'd expect of a programming language of its size, and definitely higher in average quality).
lgessler··on How Did Our Medical Notes Become So Useless?
I used to work at Epic as a software developer. My take on it is that the key explanation for why medical software is so bad is that it is so hard to even attempt to compete with established EMR's.

I could go on at length about this but I'll try to keep it short. Basically, imagine that you're a startup and you want to compete with Epic in providing a comprehensive IT solution to health systems. You will _at least_ need to:

1. Write software for every major medical specialty that is comprehensive enough to satisfy the specialists' expectations of domain-specific tailoring

2. Also ensure that these modules are flexible to accommodate intra-specialty variation (for example, oncologists vary a lot in how they divide stages of cancer)

3. Ensure that your software will comply with and help your customers perform well financially with federal, state, local, and program-specific (Medicaid, Medicare...) regulations

4. Go into a room full of health executives who are deeply weary and suspicious of health IT people (for better and worse reasons) and convince them they're better off risking a multi-year, extremely expensive transition project on your startup, which might not be around in a few years, instead of going to an EMR vendor that's almost-not-even-mediocre but stable like Cerner or Epic. (The "nobody gets fired for buying IBM" effect here is real.)

Clearly all of this requires a lot of work, and would require millions of dollars in funding and the poaching of some top talent in healthcare IT who know the lay of the regulatory land. As a result, most HIT startups (that I know of, at least) target something less ambitious than an enterprise EMR. Some target only a specific specialty (like home health or care management), others target small family practices (which are becoming increasingly rare as they are bought out by major health systems).

This is in a way bad for everyone except the software vendors, though, because without a competitive threat, there is little incentive for companies like Epic to undertake the risky, major rewrites which are vital for the company's long-term technical health. Epic still uses a typeless, (almost) data structure-less language called MUMPS for its server and DB code, and on the client side, all of it is still either in VB6 (yes, 6, not .NET) or a quite spartan home-grown JavaScript framework. The result is that bad code never gets totally thrown out, and Epic's developers are not able to benefit from the productivity-multiply amenities of modern languages, which include type systems and abstractions more powerful than subroutines and goto statements. Development then takes an order of magnitude longer than it might have, and the feedback cycle continues.

lgessler··on UCLA asked faculty to consider declining to review for Elsevier journals
Aren't hiring decisions usually handled by the department? This seems like it would be hard to implement because the pool of people who are going to make hiring decisions over a span of several years would basically be every professor in the school. I mean the admin could send an email saying "don't penalize OA pubs over Elsevier pubs" but (1) that's a hard rule to follow even if you're trying in earnest, (2) you have to expect a great chunk of hiring committee members aren't going to follow this directive, and it'd be impossible to tell whether they did.
← PreviousPage 8 of 13Next →