News for hackers. Stuff that matters.
Re:Weird Languages by mr_luc on Saturday August 28, 2021 @09:50AM (#28338030)
This is a line that resonates with me, and the one which some negative comments might overlook (3 hours in, at least):

  "What can you say in this language that would 
  be impossibly inconvenient to say in others? 
  In the process of learning how to say things 
  you couldn't previously say, you'll probably 
  be learning how to think things you couldn't 
  previously think."
This is one of the value propositions of language. It's one of the ways we learn new things, and thus become more capable of doing valuable work as people.

Criticisms of this essay in comments so far have seemed to fall into these buckets:

  1. Lisp? Macros? Boo. (Not novel/too weird/etc)

  2. Languages are solved, not important; I build systems.

  3. I don't like the tone of this essay.
(1) and (3) are side points, unrelated to thesis. (2) is the interesting one, and at the heart of what the essay talks about.

I've always been in the pg camp on this one. Sure, systems are the thing, we can't be purists, etc -- but saying that languages don't matter, for us, would be like rocket engineers saying that materials don't matter.

If you're building a table, you can make it out of almost anything; a table is a solved problem. Wood, carbon fiber, steel.

But at the limits of what's possible, like a rocket, the material's properties, limitations, and weaknesses in extreme circumstances matter.

You can definitely imagine that important things are happening, in the maker's mind, when they start working with a new material, seeing what others are able to do with it, seeing how the making process is easier, or what steps are unimportant/unnecessary now vs. in their usual materials. And that informs their thinking, going forward, about what's possible in systems they might build.

Re:Weird Languages by bob1029 on Saturday August 28, 2021 @02:28PM (#28340312)
> What can you say in this language that would be impossibly inconvenient to say in others?

This ideology is why I believe so strongly in the power of SQL (and similarly-expressive functional/DSLs). They are effectively limitless in their ability to describe problem spaces. In SQL, joining 30 different dimensions of data is a matter of the same # of lines of SQL. Doing such a thing in any imperative language would be a medium nightmare at best. Even with LINQ at your disposal, this is not fun.

I actually did not realize it was possible to construct a useful piece of business software that exclusively uses SQL for its domain logic until ~18 months ago. Turns out the trick is to go all-in and just make sure 100% of the relevant domain state is represented in the schema. You also have to understand why database normalization is important if you go down this road. The only reason you would fail to model something properly is lack of imagination, experience and/or discipline. These tools are limitless.

There is also the benefit to the business. You can print off all of the tables as excel spreadsheets and review them with non-technical stakeholders. I find this much preferable to explaining how procedural code works to non-wizards.

So, I would say - Weird languages - Absolutely yes.

But, also go check out some of these new tricks you can teach to old mainstream things. If you want to play around with these ideas, getting SQL into your application is absolutely trivial with SQLite these days. We are using it in production for this purpose right now. My project managers are more familiar with the product's schema than I am at this point, because they are authoring BL in SQL today. This is where you really want to be, IMO.

Re:Weird Languages by punnerud on Saturday August 28, 2021 @02:46PM (#28340433)
“You can print off all of the tables as excel spreadsheets and review them with non-technical stakeholders.” Try something like Metabase. Just place the SQL in there and you get a URL that gives you dynamically updated “Excel”.

I like this way of business development: Prototype some SQL, place it in Metabase, get feedback, update the SQL, when they are happy, make it to an Update that solve their need automatically.

And it gets way more powerful when you learn Macros in PL/SQL or PostgreSQL so that you can dynamically change the SQL based on results. One example is to build the Metabase functionality into the business application do that you can easily add/change SQL, and the resulting values automatically is clickable if the data comes from the right tables/views.

Re:Weird Languages by eropple on Saturday August 28, 2021 @03:30PM (#28340775)
The thing I've always had trouble with from there is extending and versioning domain logic, both for new features as well as for rollback. What's worked for you here?
Re:Weird Languages by punnerud on Saturday August 28, 2021 @04:06PM (#28341068)
I use a lot of views for abstraction and backward compatibility.

Rollback is always difficult on live systems, especially when the data propagate to integrations. I try to always have 'first created' and 'last changed' time stamp, and first created and last changed user. If the job is automatic the “user” should be traceable back to the individual job, not some generic system user.

Re:Weird Languages by larve on Saturday August 28, 2021 @06:12PM (#28341970)
I had great success maintaining views (and tests on top of them) for the business people by using dbt. Everything is in git and gets deployed along side our fivetran sync.
Re:Weird Languages by default-kramer on Saturday August 28, 2021 @06:58PM (#28342285)
Funny you should bring up SQL. The "learning how to think things you couldn't previously think" resonated with me also, specifically when I realized that SQL would be so much better if joins were values instead of language constructs. I can't imagine I would have come up with this thought if I hadn't been working in Racket with the substitution model (as taught by SICP) fresh in mind.

Sections 5.1.1 and 5.1.2 in my side project demonstrate what I mean by "joins are values": https://docs.racket-lang.org/plisqin/Refactoring_Recipes.htm...

Re:Weird Languages by jayd16 on Saturday August 28, 2021 @05:01PM (#28341453)
I feel like LINQ is pretty close to the equivalent SQL if you're already using DataTables or some other easily composeable type. But I agree SQL is great.
Re:Weird Languages by novok on Saturday August 28, 2021 @02:49PM (#28340454)
I feel like with SQL although, you could reproduce the vast majority of usage of it with about 5 very large functions / objects, which is what it essentially is in most usage.
Re:Weird Languages by skytreader on Saturday August 28, 2021 @10:34AM (#28338398)
> What can you say in this language that would be impossibly inconvenient to say in others?

Maybe it's just me and my possibly-unreasonable infatuation with the Sapir-Whorf hypothesis (SWH) but I've come to think it also applies to many things in life, PLs especially so. "Weird languages" aren't valuable because you can deploy it in production, rather because it will help you recontextualize a problem (in SWH-parlance, it helps you see the world differently).

You can also say, SWH is an academic formulation of the beloved programmer motto "When all you have is a hammer, everything looks like a nail". If all you know is an imperative syntax, all problems look solvable by breaking them down into a series of steps/procedures.

In my almost ten years in the industry, there's exactly one time I was able to apply an "unusual" paradigm to solve a problem. GvR might curse me because I sort of made a Lisp-like DSL in Python but I stand by my design decision. The end-result was a small (~200LoC linted with black) DSL parser with some DB access and a lot of rules which actually tried to solve the problem. When I found something wrong I just had to reformulate a rule, not actually wrangle with loops, conditionals, and control flow in order to rewrite logic.

Honest negatives: I had to turn over the project to someone whose background is in EEE, not CS, and I had to explain Higher-Order Functions to them. Not ideal! Actually, in fairness, I bet most in that team would have a hard time figuring it out because, hey, I made a Lisp in Python! But I still stand by my decision; it was the best for the problem given the resources and time I had.

Re:Weird Languages by dkarl on Saturday August 28, 2021 @12:37PM (#28339365)
Immutable record types as the default, most-used way of modeling data is a great idea that some languages cater to and other languages force you to do in weird, hacky ways.

Countless systems have been designed around mutable data simply because they were written in languages where mutable data was the default. I personally worked on several Java systems where mutability was used but was trivial to refactor out, because every place an instance was modified, it was simple to construct a new instance instead. On a couple of them I had ownership of the codebase and was able to complete this refactoring with a reasonable amount of effort.

I also created a small codebase in Java with an immutable data model, only to pass it off to someone who immediately added setters for every field because they were "missing." And then of course he started to find uses for them.

I don't have a desire to work in Java again, but I think Java recognizing immutable record classes as a concept worthwhile of first class language support is a significant step forward for the industry.

Re:Weird Languages by jl6 on Saturday August 28, 2021 @04:20PM (#28341181)
> Actually, in fairness, I bet most in that team would have a hard time figuring it out because, hey, I made a Lisp in Python! But I still stand by my decision; it was the best for the problem given the resources and time I had.

Are you completely sure you didn’t just create a massive headache for the team that followed you? Now they have to understand something that looks like magic, or pay more money to hire a wizard.

I’ve seen a lot of “clever and elegant” solutions that become instant legacy when the original genius leaves, and a lot of “boring and repetitive” solutions that stand the rest of time.

Re:Weird Languages by skytreader on Saturday August 28, 2021 @04:58PM (#28341420)
I feel like the bit you quoted already captures what I think came of it after I turned it over. It is even from a paragraph labeled "Honest negatives".

Complete certainty of how it turned out is a bit too much to ask. For every story like mine, there's an equivalent story of a legacy system in boring Java/C that no one wants to touch, works like magic, etc.

FWIW, I wrote a pretty extensive documentation of the project before I left, including recommendations for improvement[1]. Again, it's foolish to claim complete certainty but the nature of the project was such that they are unlikely to need to rewrite anything on top of the engine. Any modifications and additions moving forward would be in the declared rules, not in any of the logic. And for that, they have hundreds of examples from me to copy from.

And if they do need to touch the "parser", at ~200LoC the complexity is certainly far below, say, a Spring J2EE code base. It's all in one file too, that shouldn't be too bad.

[1] If I may use HN as a small soapbox, actually, months later, I figured out a further small addition to that project that would've made working with it far easier. If any of my previous team recognizes this and this project is still in use, feel free to reach out to me for one last brilliant idea. :)

Re:Weird Languages by xpe on Saturday August 28, 2021 @05:58PM (#28341863)
Sounds like a useful project.

> It's all in one file too, that shouldn't be too bad.

Fewer files is not necessarily better.

The guiding principle in my mind is reduction of entropy. If splitting one file into multiple files makes sense in the brains of the beholders it is a good thing.

Re:Weird Languages by robertlagrant on Sunday August 29, 2021 @04:06AM (#28345019)
200 lines in one file sounds fine on the face of it. I like it when I don't have to trace through to other files to see what's going on.
Re:Weird Languages by erik_seaberg on Saturday August 28, 2021 @07:37PM (#28342556)
I haven't yet seen a DSL that wasn't a big improvement over compiling the DSL to a bunch of boilerplate in my head and making everyone try to reread the boilerplate forever.
Re:Weird Languages by lifeisstillgood on Saturday August 28, 2021 @12:00PM (#28339066)
Please tel us more - a DSL in python is ... fun ... and having a real world use is cherry on top
Re:Weird Languages by skytreader on Saturday August 28, 2021 @06:20PM (#28342028)
Flattered by your interest but now I'm afraid the words "DSL" and "Lisp-like" might've given the impression of far more complexity than the project actually was. Keep in mind the core engine is ~200LoC. Maybe twice that at most. But really, there were far more rules than engine logic in the end.

The project was started for legal compliance so I don't want to go into specifics in case I make a slip one way or another. It did not run in the production cluster per se but was important nonetheless. (Actually, gods forbid it run in production!)

Very vaguely, it simplified structured data. A rule is recursively defined, base cases being simple rules that just returned primitive data. The original data could be an object with deep properties but most rules just simplified it to one with less fields.

I call it "Lisp-like" because after writing a handful of recursive rules, I had flashbacks of when I studied (actually) Scheme in uni. The tree-structure and meta-rules certainly gave that impression. I did not parse parens though, rather the rule syntax is JSON dictionaries. I hope this aided in readability---it should be self-explanatory what each rule did---and so my team did not find it too esoteric.

I don't remember the exact volume of data we processed but it was in the tens of GB, if not low hundreds. We parallelized it and had maybe 20 runners working concurrently. You can claim mapreduce (ha!) at this approach but honestly I think we could've parallelized it as easily if I did not go with this DSL-approach. :)

Re:Weird Languages by sanderjd on Saturday August 28, 2021 @11:19AM (#28338726)
Declarativeness targeting a specific problem is definitely good, but it is implementable in any language.
Re:Weird Languages by a4isms on Saturday August 28, 2021 @12:16PM (#28339208)
You have touched on what is both the best and the worst thing about programming languages in 2021.

On the one hand, most modern languages are powerful enough that you can build whatever you want on them. DSLs, constraint solving, pure FP, CPS, logic programming, whatever you like.

On the other hand, languages are subject to network effects. If you build an FP system on top of Python and I build one on top of Ruby, the resulting “FP frameworks” will be almost entirely incompatible. That makes it hard for people coming to either of our projects to “pick it up."

It’s great fun to implement your own library or framework that in turn implements something interesting, but everyone doing that leads to applications that are built on top of in-house home-grown greenspunned code bases.

In most production situations, it’s better to find the language and framework that already cater to the idiom you like, and come with a community of like-minded programmers who are familiar with how things work.

Network effects matter at scale, even if they’re irrelevant for a passion project.

The notion that any language can be coerced into supporting any programming idiom is true in theory, “But the difference between theory and practice is narrower in theory, than it is in practice.”

So I suggest there is still a lot of value in selecting the language/framework/library that was built to do the thing we want, right off the bat, and comes trailing a community and ecosystem around it.

Re:Weird Languages by novok on Saturday August 28, 2021 @03:35PM (#28340815)
Lisp Macros making DSLs have similar issues, your DSL doesn't work with the other guy's DSL trying to solve a similar issue.
Re:Weird Languages by a4isms on Saturday August 28, 2021 @06:13PM (#28341979)
When we use a system built around programming model X to implement programming model Y, and then write our program Z using model Y on top of model X, we are deliberately implementing the “Inner Platform Effect.”

https://en.wikipedia.org/wiki/Inner-platform_effect

Re:Weird Languages by jimbokun on Saturday August 28, 2021 @01:04PM (#28339585)
Sure, you can always implement a Lisp compiler in Java.
Re:Weird Languages by emodendroket on Saturday August 28, 2021 @11:03AM (#28338599)
On the other side of the ledger, the Sapir-Whorf hypothesis is widely considered discredited by linguists.
Re:Weird Languages by skytreader on Saturday August 28, 2021 @11:28AM (#28338803)
Has it? I'm genuinely curious to know. "Widely considered discredited" sounds like it's met the same fate as ether or alchemy.

I commented on SWH a few months ago in HN too when another user, claiming background in linguistics, replied that it factors in your world view but not as huge a factor as other cultural considerations. That sounded reasonable.

So as of the last time I looked up SWH (a few months ago), my knowledge of its consensus is that:

- the weak form ("relativism") is true to a certain extent, and definitely not to the extent Whorf originally proposed.

- the strong form ("determinism") is largely debated and, personally, I think it's indefensible as a thesis.

Re:Weird Languages by emodendroket on Saturday August 28, 2021 @11:37AM (#28338872)
When I took linguistics classes in school it was summarily brushed off, but here's how Wikipedia summarizes:

> The strong version, or linguistic determinism, says that language determines thought and that linguistic categories limit and determine cognitive categories. This version is generally agreed to be false by modern linguists.

> The weak version says that linguistic categories and usage only influence thought and decisions. Research on weaker forms has produced positive empirical evidence for a relationship.

Re:Weird Languages by coldtea on Saturday August 28, 2021 @01:08PM (#28339619)
Well, DUH! Did anybody put forward the first version which sounds like a strawman?

"language determines thought and that linguistic categories limit and determine cognitive categories. This version is generally agreed to be false by modern linguists"

The use of words like "determine" appears to make it look bogus. Whereas "influences" basically means the same thing (in practical terms, strongly influences is just as good as determines).

Re:Weird Languages by Karrot_Kream on Saturday August 28, 2021 @03:32PM (#28340793)
> Well, DUH! Did anybody put forward the first version which sounds like a strawman?

A lot of proto-linguistic (I say proto because linguistics want a real discipline yet) thought in the '50s-'60s did actually believe this. It was the informal basis for teaching lots of colonized peoples Western languages. It was the basis for the book 1984's Newspeak. It was also the hypothesis that motivated the creation of the Loglan (predecessor to the more well known, but still obscure, language Lojban) language. That you find this to be a strawman argument is a good testament to how widespread the knowledge of its disproval has become.

N.B. I also think in the pop programming language world (e.g. Twitter rants) that a lot of folks genuinely believe something similar to Strong Sapir-Whorf, at least as applied to programming languages.

Re:Weird Languages by ScottBurson on Sunday August 29, 2021 @04:04PM (#28349994)
Having actually worked with James Cooke Brown on Loglan (I wrote the first Yacc grammar for it), I have to say my recollection is that Jim's view was more tentative and nuanced than you've made it sound. While we certainly enjoyed finding things that seemed easier to say in Loglan than English, I don't recall him ever suggesting that there might be a thought that a non-Loglan speaker couldn't think.

I think it would be fairer to say that he was convinced that Whorfian effects were strong enough that there would be value in engineering a language to take advantage of them. But while value is somewhat in the eye of the beholder, I would say this hypothesis has not held up well either.

Re:Weird Languages by Karrot_Kream on Sunday August 29, 2021 @04:09PM (#28350026)
Thanks. My understanding was that Loglan was simply a mechanism to play around with the Sapir-Whorf theory among humans, but thanks for the additional context/correction.
Re:Weird Languages by TeMPOraL on Saturday August 28, 2021 @02:54PM (#28340499)
Well, based on my own introspection, the strong version looks obviously true to me - so I'm glad someone took time to disprove it.

When I read the description, I understand "determines" as in, your thoughts internally work in terms of language processing, so their complexity is limited to the complexity of the language(s) you know. It sounds plausible, but also testable by checking if humans who never learned a language with complex grammar are capable of processing complex concepts.

Re:Weird Languages by formerly_proven on Saturday August 28, 2021 @05:36PM (#28341734)
For a long time in human history people did not accept the existence of negative numbers; a Greek mathematician couldn't solve x+1=0 for example (this one also has "zero" in it, which also did not exist for some mathematicians). This seems like a decent example for linguistic categories limiting the thinkable categories. Other Greek examples: Zeno's paradoxes, irrational numbers, ...
Re:Weird Languages by coldtea on Saturday August 28, 2021 @06:04PM (#28341915)
>This seems like a decent example for linguistic categories limiting the thinkable categories.

As in absolutely limiting them, though? Like the Ancient Greeks, those who invented zero, didn't have it previously in their language, and couldn't do zero-based equations before either.

Re:Weird Languages by emodendroket on Saturday August 28, 2021 @07:50PM (#28342635)
Seems like a bad one. New concepts are given new names, or borrowed names, when they’re introduced. The first guy to come up with zero didn’t speak a language with a word for zero at the time.
Re:Weird Languages by coldtea on Saturday August 28, 2021 @06:09PM (#28341952)
>I'm glad someone took time to disprove it

What do you think "disprove" means in this context though?

E.g. do you think they really settled anything, the way we can prove a math theorem or verify some physical theory to hold (as a predictive model) to the nth degree of precision?

>When I read the description, I understand "determines" as in, your thoughts internally work in terms of language processing, so their complexity is limited to the complexity of the language(s) you know.

That would mean that developing further language is impossible or even that developing the first languages would be impossible - as those nearly language-less peoples have no means to develop those more complex later concepts.

It's not like e.g. Europeans (let's take them as a model of "advanced" language) emerged in nature in fully formed ancient Greek, Latin, English, French, etc.

They started with the same or even more "constrained" languages (verbally and conceptually) as any primitive people, and - going back to our forefathers - even language-less.

Re:Weird Languages by TeMPOraL on Saturday August 28, 2021 @08:08PM (#28342728)
> What do you think "disprove" means in this context though?

What it means for every scientific hypothesis: it takes infinite amount of evidence to positively prove it, but it takes one counterexample to kill it. +/- the usual uncertainty caveats.

> That would mean that developing further language is impossible or even that developing the first languages would be impossible

Not necessarily. It would mean that you can't think about some concepts without first extending the language to support them. Languages still could be extended piece by piece.

Re:Weird Languages by coldtea on Sunday August 29, 2021 @10:29AM (#28346984)
>What it means for every scientific hypothesis: it takes infinite amount of evidence to positively prove it, but it takes one counterexample to kill it. +/- the usual uncertainty caveats.

Only in such soft sciences you can "prove" any number of competing hypothesis, and have fractions arguing about them for decades or centuries. And whether a "counter example" is valid and "kills" a theory, will be a matter of interpretation and endlessly debated as well.

>It would mean that you can't think about some concepts without first extending the language to support them. Languages still could be extended piece by piece.

If you can always extend a language to new concepts, the language is not limiting in the strong SWH sense. If it was it would be impossible to reach those concepts from a reduced set of concepts.

Re:Weird Languages by emodendroket on Sunday August 29, 2021 @12:24PM (#28348057)
> Only in such soft sciences you can "prove" any number of competing hypothesis, and have fractions arguing about them for decades or centuries.

It took millennia for spontaneous generation to be definitively disproven.

Re:Weird Languages by coldtea on Monday August 30, 2021 @03:29AM (#28353459)
That's exactly my point, as that was before we settled on the scientific method.

So this might have been relatedto biology (or in other domains physics, chemistry, and so on), but the matter was debated in the soft sciences way, not in the way we do biology in the 20th century.

Re:Weird Languages by emodendroket on Monday August 30, 2021 @11:12AM (#28356386)
It was actually a few hundred years after the modern scientific method because scientists attempting to apply the method failed to spot confounding factors and interpreted their results incorrectly, something I think is hardly impossible even today in even the hardest of supposed hard sciences.
Re:Weird Languages by _emacsomancer_ on Saturday August 28, 2021 @02:05PM (#28340108)
Alchemy is a bit more reasonable.

Even the weak version falls apart under scrutiny. Here's a nice example of this: https://cpb-us-w2.wpmucdn.com/web.sas.upenn.edu/dist/4/81/fi...

This is a good example of a case where there was a phenomenon (a language prominently using non-speaker-oriented direction terms, and correlations with real-world behaviour of speakers of that language) which seemed to support a weak version of SW, but it turns that seemingly supporting evidence was really just a by-product of the testing environment.

Re:Weird Languages by skytreader on Saturday August 28, 2021 @03:36PM (#28340830)
I'm not sure how the study you linked is an indictment of the weak version. It seems to fall well under my understanding of the consensus that the weak version is only true to a certain extent and definitely not to the extent Sapir and Whorf originally claimed.

So this does present an interesting result, and one that (AFAICT---I am not a linguist by training) does run counter to the claims of SWH but, more importantly, the study is limited only to spatial reasoning. Surely there are more areas of thought than that?

Re:Weird Languages by _emacsomancer_ on Saturday August 28, 2021 @03:57PM (#28340998)
The study shows that differences in systems of direction words doesn't really affect spatial reasoning.

Yes, this one study doesn't disprove every aspect of SWH, but it's a good example of how SWH claims, even in the weaker versions, tend to fare when subject to more rigorous investigation & analysis.

What area of thought do you think provides good evidence for (some version of) the SWH?

Re:Weird Languages by lanstin on Sunday August 29, 2021 @03:45PM (#28349825)
Given that language is also created or modified by people in order to get their ideas across, wouldn’t it make sense if one can have thoughts arise that don’t fit into language but then they cannot be shared without the creation of appropriate language. I often have the experience of having ideas that I have in a sort of mathematical reasoning space (this here makes that there impossible) that I have to translate into English. (Eg If the the call is routed at the IP layer then they can’t reach this no matter what DNS they have access to)
Re:Weird Languages by _emacsomancer_ on Sunday August 29, 2021 @06:18PM (#28351002)
People do, of course, create new vocabulary, but that's not modifying language on a deep level. And, in part that's a convenience: even when you don't have a "word" for something, you can generally describe it. But if it's something you're going to refer to frequently having a nice lexical entry for it is more convenient. We have memory limitations, so sometimes having convenient handles can free up resources.

And your example, I think, also speaks to the point: you're able to reason in mathematical ways; being a speaker of English doesn't block this, even though English perhaps doesn't offer convenient vocabulary for this in all cases.

Re:Weird Languages by coldtea on Saturday August 28, 2021 @01:07PM (#28339612)
On the other hand, it's not like linguists are doing exactly a hard science, and their discrediting something means much, especially when it touches totally unrelated domains like psychology and neuroscience.
Re:Weird Languages by _emacsomancer_ on Saturday August 28, 2021 @02:07PM (#28340122)
Sometimes, when it's a field well outside of your area of expertise, not making pronouncements can save embarrassment later on.
Re:Weird Languages by coldtea on Saturday August 28, 2021 @02:47PM (#28340437)
My sentiments exactly (only on the other side).

You seem to respect everything labeled academic, but not all "areas of expertise" and not all "fields" are equally valid -- and surely not just because they are taught in universities, written about in "peer reviewed" journals, and so on.

Linguistics is closer to soft sciences than the opposite.

Re:Weird Languages by _emacsomancer_ on Saturday August 28, 2021 @02:58PM (#28340531)
> You seem to respect everything labeled academic,

I assure you, I really don't.

> but not all "areas of expertise" and not all "fields" are equally valid -- and surely not just because they are taught in universities, written about in "peer reviewed" journals, and so on.

Fully agreed.

> Linguistics is closer to soft sciences than the opposite.

"Linguistics" spans a range of things from the humanities to the 'soft' sciences (in the sense that psychology and cognitive studies 'soft' sciences) to logic/maths.

Re:Weird Languages by emodendroket on Saturday August 28, 2021 @01:26PM (#28339778)
If we want to take this into a more concrete and measurable realm, every programming language is going to get converted into the same machine code before it is run, so it is quite untrue that there is any idea that "cannot be expressed" in one programming language but can be expressed in another. It may be more or less convenient to do but nothing like the strong Sapir-Whorf hypothesis for human languages.
Re:Weird Languages by coldtea on Saturday August 28, 2021 @01:33PM (#28339838)
Well, in programming yes.

Though even in programming, there are e.g. non turing complete languages (e.g. simple regex languages), languages without certain high level facilities (making it much harder to organize your code in terms of certain concepts - analogous to organizing your thinking of the world around certain concepts -, which is a SWH-like effect), languages that can't express e.g. infinite loops and are certain to terminate (used e.g. for business logic, templating, etc), and so on.

Even if it all goes down to assembly, a language like Cobol might it much harder to write e.g. a 3D game. And that can be enough for games not be written in that language - it doesn't have to be impossible, just hard, which is enough to discourage most, aside from a few weirdos writing games in Cobol and compilers in bash.

Re:Weird Languages by arp242 on Saturday August 28, 2021 @10:30AM (#28338366)
I think the feeling a lot of people have – or at least the one I have – is just tiredness of al the churn. This year all tables need to be in wood, but in two years wooden tables are soooo old, what kind of old coot are you for using wooden tables?! Is there something wrong with you?! All Real Programmers™ exclusively use steel tables now!

Two years down the line people start to realize that steel actually isn't perfect either. But wait, now someone made a carbon fibre table and we need to break down all our steel tables and burn the few wooden tables left and rebuild it all in carbon fibre! It's the future, after all!

Of course, eventually people figure out that wooden tables are actually quite good for a fair number of use cases and we've come full circle.

I'm just tired of the churn-and-hype cycle and suspect a lot of people have roughly similar feelings, which is expressed in the "languages are unimportant; I build systems"-sentiment. Less and less of modern software development seems to be about actually building interesting things to solve real problems.

Re:Weird Languages by TeMPOraL on Saturday August 28, 2021 @10:55AM (#28338545)
In my experience, the churn is on the systems side, not languages side. The churn happens because someone makes a marginal improvement on some API and makes a nicer marketing copy, and boom, the new most popular JavaScript framework/bundler for this year is born.

Programming languages don't churn nearly as fast (and some degree of existing churn can be attributed to the business model of a PL funded by a company - they have every incentive to push it, no matter how little improvements or different concepts the language brings.)

Re:Weird Languages by tharne on Saturday August 28, 2021 @11:51AM (#28339013)
I think this is also why a lot of older programmers (or even older workers in general) get mistakenly labelled as "resistant to change". It's not that we're unwilling to learn new things, quite the contrary. It's that we've been to enough rodeos to see that many "new" solutions are either pure hype or repackaged versions of stuff that was already tried and found lacking.
Re:Weird Languages by playing_colours on Saturday August 28, 2021 @12:11PM (#28339160)
I believe this label is less likely to apply to an older programmer if instead of grumbling they were willing or able to clearly communicate problems and consequences of “new” solutions. They would be labeled “old wizards” instead :)
Re:Weird Languages by tharne on Saturday August 28, 2021 @12:32PM (#28339331)
There's some truth to that, but I don't think better communication would really change anything, beyond a few minor victories here and there.

So much of the fetishization of everything "new" comes from a combination of wishful thinking and mental laziness. Especially in larger organizations where decisions are made far from where the work is actually done, there is a tendency to think we can solve problems simply by embracing the newest management fad, enterprise software, etc. It's kind of like the way people think they can get organized "if only they had the right trendy organizer or todo app".

I get the impulse, we desperately want to believe that our hard problems can easily be solved by just changing one thing or buying something. This is the crux of most modern marketing, in fact. Unhappy happy with something hard, just by product or service X.

Older workers tend to know better than others that hard things are hard and that layering some shiny new tool or framework on top of crappy process or a broken business model will not change anything. But saying that out loud, even tactfully, is a very inconvenient truth that will make most managers resent you, and probably label you "resistant to change".

Re:Weird Languages by coldtea on Saturday August 28, 2021 @01:12PM (#28339655)
They do. It's the nature of new programmers to be prone to hype and marketing and not understand those "clearly communicated problems and consequences" as anything but grumbling.
Re:Weird Languages by marcosdumay on Saturday August 28, 2021 @12:51PM (#28339474)
In my experience more often than not, the people the people that accuse others of unclear communication are making an effort into not understanding the message.

But then, I'm not known for fighting against new solutions either, so that experience is probably in a disjoint population. Anyway, I imagine you say that from the position of an "old wizard", but that position is as dependent on a receptive audience as it is on a communicative "wizard".

Re:Weird Languages by shrimpx on Saturday August 28, 2021 @03:14PM (#28340637)
They’re grumbling because they’ve been there done that, too — tried to communicate the ills of frivolous changes — and nobody was interested in paying attention.
Re:Weird Languages by playing_colours on Monday August 30, 2021 @03:40AM (#28353503)
I think we are on the same page that communications are a two-way street. There must be mutual desire to listen carefully and to speak clearly.

My comment above focuses on what the stoics advised to focus on - the things one is in control of changing. In our case, old wizards could control their attitude.

Re:Weird Languages by bryanrasmussen on Saturday August 28, 2021 @01:02PM (#28339561)
IF there is a lot of churn you will need to do a lot of communicating, but obviously some times the new will succeed, as time goes by with all the churn and all the poor decisions you would get glum at the prospect at communicating yet again why you think a new solution is not preferable.

I don't actually care though, just I can see this possibility.

Re:Weird Languages by travisgriggs on Saturday August 28, 2021 @11:36AM (#28338869)
I resonate with this. The churn I find most demoralizing is in the library/module/component space.

I’ve been pushing myself to learn elixir these last few months. This is, by the comments of many, more of a niche language. I like the language’s novelty and it has caused me to think in new ways. So Paul is righ in this pint.

But when I want to send an http request, there must be at least 10 choices on hex to choose from. The one that is a hit this year will be passe’ next year. When I watch the traffic in the Phoenix slack channel, the “stack” of libraries combined seems overwhelming. The same goes for people talking about front end apps.

Re:Weird Languages by coding123 on Saturday August 28, 2021 @12:32PM (#28339336)
You hit a nerve there - our company has gone through 4 "choice" http client libraries in the past 4 years. (We're a JS/TS environment). axios, request, superagent, fetch.
Re:Weird Languages by travisgriggs on Saturday August 28, 2021 @07:23PM (#28342463)
It’s not just how many variations of a given component there are, it’s all the many components I have to become aware of to use, each written by a different author with possibly diffeeent idioms, with varying degrees of interoperability. One has to have an http package, an auth package, a json package, a structure modeling package, the list just goes on and on and on. And so many are often derivative dependencies. It’s not just elixir.

When I look for help in the Kotlin slack, the responses are just a firehouse of “you need Zanzibar, no Algolly, try Firetruck, do Conduct, you might want xWyze…”

Re:Weird Languages by yawaramin on Saturday August 28, 2021 @01:55PM (#28340022)
Just curious, why not use OTP's built-in httpc? https://erlang.org/doc/man/httpc.html
Re:Weird Languages by ramchip on Saturday August 28, 2021 @11:49PM (#28343925)
Not OP, but httpc isn't secure by default. It works fine if you hold it correctly but I wouldn't recommend it to someone really new to the language.

https://erlef.github.io/security-wg/secure_coding_and_deploy...

Re:Weird Languages by olikas on Sunday August 29, 2021 @04:26AM (#28345111)
httpc is good for a one off request, but it is not very up-to-date with the latest features of the web. So building application logic on top of it is not ideal.
Re:Weird Languages by ramchip on Saturday August 28, 2021 @11:45PM (#28343902)
All the passé options still work fine :)

But yes. It's true http clients have churned quite a bit. Other things are settling better, for instance Ecto, Phoenix, Jason are very popular and stable.

Re:Weird Languages by nickjj on Saturday August 28, 2021 @02:44PM (#28340424)
Churn and choice are what keeps me on the fence with Elixir too. Over the last few years I went from very excited and built a few things with it to "maybe try again later".

It's just not fun to be in a constant state of package fatigue, especially when a lot of semi-popular libraries are maintained by 1 person. If that 1 person leaves that entire bit of functionality becomes a liability to your application because it's unrealistically demanding to be a solo developer or small team and be responsible to maintain a bunch of libraries that become unmaintained but then also build your application.

This is IMO especially true with a language as powerful as Elixir with macros. Picking up and reading someone else's code can either feel natural or be really hard, to the point where looking at it doesn't feel like the language you know. This makes it doubly hard to read 3rd party library code because you're learning the other person's code and have to mentally deconstruct a lot of advanced patterns if they use them. I don't consider myself that good of a programmer but there's a lot of times where in Elixir, phrases like "this is impossible for me to understand" come up when I've written hundreds of thousands of lines of code in Python but never thought this. I sometimes had the "what am I looking at?" feeling with Ruby too btw.

As for library availability, this is a problem that doesn't come up as often with more main stream web frameworks, at least not in the Python and Ruby eco-system. Sure things go in and out of fashion but both languages have frameworks that include more batteries included or the community has gotten so big that there's a bunch of independently developed libraries that most of the community got behind and supports it so well that it becomes a no-brainer to use it.

So that's what keeps me on the fence and I think some of these problems can be solved with time, but time is a scary thing because waiting a few years feels like an eternity and the outcome after waiting a few years might be waiting a few more years. At some point you need to build whatever you're building and run with it without looking back.

But I think this really comes down to personal preference. I used to think I wanted unlimited choice and an endless world of possibilities. I don't. I want to build web applications quickly using the most straight forward code I can think of and get as many batteries as included as possible while leaning on / contributing back to a massive eco-system. I don't want to be on the front lines of building a new eco-system. I still do think in the very long term (5+ years maybe) Elixir could be a good match for me once there's a lot of libraries that have hit critical mass.

There's plenty of people using it successfully now, and I'm happy there are people who like being closer to early adopters and setting up the initial ground work for an eco-system.

Re:Weird Languages by akudha on Saturday August 28, 2021 @08:14PM (#28342763)
As someone who just started learning Elixir, this comment makes me anxious. I don't think I am going to write some exotic web application or some unique functionality, but at the same time I also don't want to be constantly fighting with the limitations of the stack I choose.

Is it a mistake to spend time learning Elixir?

Re:Weird Languages by marciol on Saturday August 28, 2021 @11:52PM (#28343937)
Elixir is an involving platform and community. Think about the Ruby community from years ago, a lot of things are missing, but there is a lot of potentials as well. From my side, I started to see Elixir seriously 5 years ago when I need to maintain a big SaaS rails codebase, and in order to support the increasing quantity of users, I need to throw more powerful and expensive machines, and it was hurting us at that time, and after some POCs, we perceived that it would be really interesting to rewrite some parts of our application in Elixir with Phoenix. I think that it's an important tool to have at hand, something that you can reach if needed.
Re:Weird Languages by nickjj on Sunday August 29, 2021 @08:03AM (#28346035)
I wouldn't say it's limiting in the sense you can't create certain things with it. You just need to be very prepared to maybe make more choices and also write a lot more libraries that you could potentially find in Python or Ruby.

It also depends on the app you're building. For me I was building a very large app (a video course platform with multiple payment gateways). One limitation I came across with Elixir is there's no official SDKs for Stripe, PayPal, Braintree or Paddle but there are SDKs for most other popular languages. So if you plan to interface with a number of APIs, chances are you're not going to find an official client for Elixir unless the company happens to be using Elixir or are happy to support it (such as Mux).

It could be challenging and time consuming to have to write both your app level features and the underlying libraries. If your goal is to get a web app launched quickly to test it out and you already have experience with Python, Ruby, Node or PHP it's kind of a hard sell to use Elixir. It's mainly because other languages have way more community libraries and frameworks available that cover common web feature use cases. Plus there's a lot more community resources around blog posts, videos, books, courses, etc..

There's also an interesting divide right now in Phoenix around using Live View or not and if you go down the LV route there's very few resources beyond the docs, especially now with LV 0.16 coming out which completely changed the templating system and how components work. It still feels like it's in a pre-1.0 (because it is :D) semi-experimental state. As far as I know there's also no really big success stories with LV. I don't know of any big sites who are using it all-in to drive the entire navigation of their site and all routes.

The above continues to fall in line with my overall feeling of having choice fatigue with Elixir.

With that said if you're interested in it, maybe try to put together a proof concept that focuses on the hardest part of your app and if it works, make a judgment call based on your personal experience. It's possible you'll have better luck than I did. Programming language selection is a very personal choice, especially when you get past libraries choices and start writing code. If Elixir clicks enough for you at a fundamental level maybe it'll be a better choice even if it means having to write more libraries.

Re:Weird Languages by bobnamob on Saturday August 28, 2021 @10:37PM (#28343596)
No. I'd say even if you don't end up using it in your day to day, learning elixir/Erlang and reading Armstrong's thesis are some of the best things you can do for yourself in terms of "system design/programming enlightenment".
Re:Weird Languages by jrm4 on Saturday August 28, 2021 @01:07PM (#28339607)
Yup. The ugly truth is that there are too many programmers writing too much code. It's like the idea of too many lawyers (possibly true?) but way worse. Because, of course, we can produce infinite wood and steel and carbon fibre tables at will at the press of a button.
Re:Weird Languages by xpe on Saturday August 28, 2021 @06:11PM (#28341969)
Re: 2nd sentence : How do you come to this conclusion?
Re:Weird Languages by jrm4 on Saturday August 28, 2021 @11:04PM (#28343730)
Oh, I am a lawyer. I was more recognizing the cliche here, and maybe that was sort of flip. I would say it's probably more like, "a lot of good lawyer brains are wasted on generally pointless this-big-ass-company v. that-big-ass-company disputes."
Re:Weird Languages by mr_luc on Saturday August 28, 2021 @10:41AM (#28338450)
I'd agree that it's a totally valid sentiment in our industry. In the specific context of an essay on pg's site though -- look at those graphics! :D This seems to me like a dude who is okay with wooden tables.
Re:Weird Languages by pjmlp on Saturday August 28, 2021 @12:15PM (#28339197)
It is a fashion industry, and so it follows that when everyone has wooden tables you need to sell them a reason to stay in business, repairing wooden tables isn't enough.
Re:Weird Languages by shrimpx on Saturday August 28, 2021 @07:21PM (#28342451)
In my experience, as you learn more about lambda calculus and type theory (LC, STLC, System-F, System-Fw, CiC) the peculiarities of language designs start to fade. This is because when you see a weird-looking language feature, instead of internalizing it as a unique design with its own unique character, you tend to see it as "syntactic sugar" on elemental theories.

That said, some languages are more ergonomic than others, especially when you compare them against particular domains. But IMO that's a problem that transcends language design. All tools, not just a language, should be fit to the domain. And in general you can build APIs and libraries that can reasonably fit any language to a domain.

Edit: slight simplification.

Re:Weird Languages by mr_luc on Saturday August 28, 2021 @09:14PM (#28343140)
I'd definitely agree with the specific point of both paragraphs, especially because you said 'language designs' in the first. But I think the essay uses 'language' to mean what you do in your second paragraph, 'features'/stdlib/ecosystem -- the whole experience of working with that material in practice.

And in that sense, I think the value of 'weird' languages is that they can package so many different mutually-reenforcing design decisions together that they literally can have the 'think different' effect described in the essay.

Taking one example that's kinda-weird, kinda-mainstream -- a 'language' like Erlang includes way more than a Prolog-inspired syntax for a simple functional language, and when you look closely at it, it's not simple to just recreate by pulling in features ad-hoc; the language, its stdlib, and its VM complement each other and have informed each others' design.

Probably the feature that most comes to mind when we think of Erlang is that it 'goes all-in' on message passing in a functional language. 'All in' meaning that they've made decisions like: being willing to copy a lot if needed, little details like keeping a count of reductions, big things like pulling in concerns that are often left to the OS when working in other languages like process scheduling, preemption, and supervision, and providing a toolkit out of the box that supports building full systems via Nodes with Applications with trees of Supervisors of Processes (all of which are effectively language concepts now), etc. Well, every one of those decisions is eyebrow-raising to somebody or a lot of somebodies. But if you do go all-in on that combo of capabilities, what's it like?

A good engineering team with a lot of money can fit another language and another VM to the same kinds of domains that Erlang is a fit for. (Not that you can get people to agree what those domains are, even within Ericcson apparently). But their solution will necessarily look very different, and the difference between what's easy/hard in their approach vs. an erlang-ish approach is what the weird language can teach us.

Re:Weird Languages by huachimingo on Saturday August 28, 2021 @11:16AM (#28338703)
The other problem is the "productive-only" trap. You begin to hate art, essays and everything related with free time because you are not doing anything productive doing those.

This can expand to your tastes or everyday life by not wanting to learn X "just for the fun".

Re:Weird Languages by mattgreenrocks on Saturday August 28, 2021 @01:55PM (#28340024)
The amount of intellectual curiosity on a site called Hacker News always feels lower than it should be.
Re:Weird Languages by jhgb on Saturday August 28, 2021 @10:22AM (#28338311)
> Languages are solved, not important; I build systems.

This argument always gets funny when sufficiently complicated systems start themselves looking like languages (and their implementations).

Re:Weird Languages by jstimpfle on Saturday August 28, 2021 @12:27PM (#28339283)
I'm not sure it's getting funny. I find it's getting interesting. If the best mechanisms the developers could find to solve a certain problem could be implemented in a language + compiler, does this mean the project should be implemented in this language is? What does this even mean? Maybe it already is implemented in this language? Or is it not, because of the missing syntactic abstraction?

The thought I have related to this is that languages are much like GUIs in this regard. They enable a certain process using some built-in features, but it's next to impossible to abstract over those feature to optimize further.

And I think that is why I stay with a simple language that gives arrays, structs, and function calls - basically tools to manipulate data / memory, I'm not sure that more features are all that useful to write "well-compressed" programs (but I can imagine that it's often hard to see why certain useful seeming features will be detrimental down the road).

Re:Weird Languages by k__ on Saturday August 28, 2021 @12:37PM (#28339363)
If someone used Lisp, Elm, Rust, Elixir, Go, or even just JavaScript, they should know that these are SO vastly different in their mental models that "languages are solved" doesn't strike me as a reasonable argument at all.
Re:Weird Languages by travisjungroth on Saturday August 28, 2021 @01:43PM (#28339927)
This is still a pretty narrow group. Throw in APL, Prolog and Z3.
Re:Weird Languages by goatlover on Saturday August 28, 2021 @08:24PM (#28342837)
I just started playing with Dyalog APL after listening to the Array Cast. It’s mind bending stuff even after being familiar with Numpy and R. Makes most languages look clunky and cluttered for array manipulation.

And the idea that a language can be designed around one data structure is elegant. Of course you get that in Lisp and Smalltalk as well. But having all those primitives that work over array structures is incredibly expressive.

I believe the array podcasters when they claim array languages can be several times more productive than other languages, at least for domains that fit well with arrays.

Re:Weird Languages by kaba0 on Saturday August 28, 2021 @01:43PM (#28339922)
Are they so vastly different? Other than perhaps Lisp and Elm, they are largely equivalent, with different levels of immutability on top of a largely imperative core.

At least mention prolog, forth, SQL or the like that are truly different.

Re:Weird Languages by chrismorgan on Saturday August 28, 2021 @03:20PM (#28340686)
Rust’s ownership model (which is more than just the borrow checker, it’s the whole concept of one location actually owning data, and aliasing XOR mutability, and the pervading effects of this design on the language and its libraries) is a really big deal, even if it doesn’t look like it would be at a casual glance. It changes how you approach programming and reason about systems, and truly is (or should be used as) a fundamentally different approach to data flow and what’s possible, a smidgeon like Prolog in that way of being different, though not as much. I miss it very frequently when working in other languages (which is mostly JavaScript these days), because there are plenty of things that just become impossible to express reliably without it. Working in another language you can adopt conventions of writing in this style, but you can’t verify it without representing it in the type system, so the result will be riddled with holes in other languages.

(It is, however, difficult to disentangle some features that Rust’s ownership model requires but which aren’t necessarily a part of that ownership model: for example, algebraic data types are essential and expression orientation extremely desirable, but there are other languages which have those features without the rest of the ownership model.)

People often think memory safety without garbage collection is Rust’s shtick, but it’s actually the ownership model that’s Rust’s defining feature, underpinning everything and making that possible.

Re:Weird Languages by kaba0 on Saturday August 28, 2021 @04:33PM (#28341260)
Correct me if I’m wrong, but Pony lang brings Rust’s ownership model to the max - so as a niche language, do check it out!
Re:Weird Languages by k__ on Saturday August 28, 2021 @01:49PM (#28339984)
They all have distiguishing features that can be emulated in other languages (to a degree) but will throw off even senior developers.

Lisp has its macros.

Elm has its type system.

Go, Elixir, and JS have rather idiosyncratic concurrency models.

Rust has its borrow checker.

Perl seems to be SO special that even proficient Perl devs aren't able to write performant code in it. /s

Sure, Prolog and SQL are much more different than the rest. But I didn't want to strawman here.

Re:Weird Languages by ashtonkem on Saturday August 28, 2021 @02:15PM (#28340198)
My problem with these arguments from PG is that they require that you pretend (or ignore) all the real world evidence we have about what languages are actually useful to make things with. It’s all fine and well to talk about how great X and Y is, but meanwhile most people are actually making things in Java and Go.
Re:Weird Languages by franga2000 on Saturday August 28, 2021 @03:31PM (#28340782)
You don't have to use a language to benefit from its existence. Haskell is a weird language that nobody* uses in production, but it's where a lot of functional programming concepts were refined and ultimately made their way into mainstream languages. I use functional programming tools in Java and JS very often and they only exist because many people tried Haskell, saw the potential of this new* paradigm and implemented parts of it into their environments.

Similarly, having been forced to learn Prolog in university, I now have a completely different view of solving problems. And while I'll surely never touch Prolog again, this new perspective allows me to write much better code in some cases, despite working in a completely different language.

Re:Weird Languages by ashtonkem on Saturday August 28, 2021 @06:26PM (#28342061)
I used to argue this. Then I watched multiple engineers under me and next to me ignore this argument in favor of focusing on distributed system design and clear communication. The results have persuaded me that I was wrong, and they were right.

In the end the most effective people around me are capable of designing a system and breaking it down effectively for other engineers to build. Most of them have no idea what things like Monads and Functors are, and they’re no less effective for it.

Re:Weird Languages by hiepph on Saturday August 28, 2021 @04:52PM (#28341374)
I second this. It's always about learning the mindset even if you don't use it for real life. Same for learning mathematics, music, philosophy, etc. It becomes your mental model to apply to other aspects of life.
Re:Weird Languages by TeMPOraL on Saturday August 28, 2021 @02:58PM (#28340529)
But what real world evidence do we have? Mostly that languages "most people are actually making things in" are picked by the business on the basis of popularity, which is determined mostly by what people learn in university - which is determined mostly by what is currently most popular on the job market. It's a self-sustaining feedback loop that has little to do with relative utility of languages for real-world problems (at least discounting languages' library ecosystems).
Re:Weird Languages by ashtonkem on Saturday August 28, 2021 @06:22PM (#28342038)
This argument is self refuting. If inferior programming languages are being picked continuously by “the business”, we’d expect that businesses that pick “superior” programming languages to out compete the other businesses. We don’t see this, so one of the following is true:

1) Programming language quality is a non-factor in business success.

2) People like PG are wrong about what makes one language superior to another.

By the by, I have never seen a non-programmer executive demand a “bad” language be used for a startup. What I tend to see is grizzled ex-programmers ignoring the trends and picking the reliable and “boring” choice over the complaints of some IC’s. This is less a “clueless business” issue and more an acknowledgment of an unpopular truth: picking the boring language that lets the business focus on its core domain is better than picking something that excites the most vocal engineers.

Re:Weird Languages by mst on Saturday August 28, 2021 @06:49PM (#28342231)
The claim that learning weird languages will help you learn new ways of thinking about problems that may be helpful in other langauges, and the claim that using 'boring' languages is the correct default for building production systems, in no way contradict.
Re:Weird Languages by ashtonkem on Saturday August 28, 2021 @06:58PM (#28342286)
Do what you will with your own time, I’m no longer convinced that learning “weird” languages is an effective way to become a better programmer. From my experience as an IC and as a manager, learning how to write better is probably a better investment for professional growth, second to that would be better distributed system design.

If it pleases you, feel free to learn whatever. It’s why I know Rust and Haskell personally. But as career advice I am much more dubious, even though I once agreed with you.

Re:Weird Languages by mst on Saturday August 28, 2021 @07:21PM (#28342448)
I find that for a lot of problems reasoning about the core problem using a mental model akin to lisp makes it easier for me to come to a sufficiently clear understanding to be able to better express the solution in both code and prose.

So while I agree about writing prose, it's also true that learning lisp made me a better documenter.

Re:Weird Languages by ashtonkem on Saturday August 28, 2021 @07:54PM (#28342654)
Having worked professionally in lisp, I have no idea why people say this.
Re:Weird Languages by mst on Saturday August 28, 2021 @07:59PM (#28342684)
Programming is full of things where what works for one person isn't at all what works for another.
Re:Weird Languages by ashtonkem on Saturday August 28, 2021 @10:30PM (#28343557)
Which is why I said “I have no idea” rather than “it doesn’t work that way”.
Re:Weird Languages by TeMPOraL on Saturday August 28, 2021 @07:48PM (#28342620)
> If inferior programming languages are being picked continuously by “the business”, we’d expect that businesses that pick “superior” programming languages to out compete the other businesses.

That assumes that the software business is efficient in the market sense, which my experience suggests is very much not true. On the contrary, I've found that success hinges primarily on the ability to find and execute good business deals (which is the work of executive team and/or sales&marketing). Software side has so much slack in it that it can (and often does) do extremely bad job at making the actual thing and still succeed.

> I have never seen a non-programmer executive demand a “bad” language be used for a startup.

I've worked for one many years ago. I was actually promised the free reign over technology stack for a project, until the CEO decided to override me and order me to use a very particular and shitty combination of technologies. He was very up-front with me about his reasoning: he said, "yeah, I could let you write this in something more reasonable, say Ruby or Python, but programmers for those languages are expensive, PHP programmers are much cheaper, and I'm going to be hiring more people to help you".

(I run the project solo for the next year, because he eventually decided not to hire anyone.)

> picking the boring language that lets the business focus on its core domain is better than picking something that excites the most vocal engineers.

Be careful not to mix up topics here. What usually "excites the most vocal engineers" these days is the things they can use to pad their CVs. This usually goes against what the management wants, which is whatever stack they've read about on HBR or whatever one is cheapest to hire people for. Neither of those tend to have anything to do with powerful and advanced tooling.

Re:Weird Languages by kortilla on Sunday August 29, 2021 @03:35AM (#28344924)
> yeah, I could let you write this in something more reasonable, say Ruby or Python, but programmers for those languages are expensive, PHP programmers are much cheaper, and I'm going to be hiring more people to help you

It sounds like the exec made the right choice. PHP is a wildly successful language that powers an obscene portion of the Internet web apps.

That’s not a “bad” language, it’s just an annoying one for engineers to work with. A bad language would be one with so little adoption and such a steep learning curve that hiring new software engineers is a year-long path to expanded productivity.

Re:Weird Languages by ashtonkem on Sunday August 29, 2021 @10:37AM (#28347043)
The further you dig into the matter, the more you realize that most people’s definitions of “good” and “bad” languages map onto their own personal preferences, not anything concrete about the language or how it’s used.
Re:Weird Languages by ashtonkem on Saturday August 28, 2021 @10:38PM (#28343598)
> That assumes that the software business is efficient in the market sense, which my experience suggests is very much not true. On the contrary, I've found that success hinges primarily on the ability to find and execute good business deals (which is the work of executive team and/or sales&marketing). Software side has so much slack in it that it can (and often does) do extremely bad job at making the actual thing and still succeed.

I actually covered this in literally the next line.

Re:Weird Languages by xpe on Sunday September 05, 2021 @02:10PM (#28426370)
ashtonkem: To quote what you wrote two sentences afterwards:

> 1) Programming language quality is a non-factor in business success.

What TeMPOral wrote (below) is is not quite the same in my view. First, they elaborate more. Second, there is a different argument:

> Software side has so much slack in it that it can (and often does) do extremely bad job at making the actual thing and still succeed.

Namely: it is NOT the case that software does not have a business effect. Rather, other aspects of the business have to work extra hard to compensate.

To take a systems point of view: two systems can have the same output over some time period but very different internal efficiencies.

Re:Weird Languages by kortilla on Sunday August 29, 2021 @03:29AM (#28344904)
This is bullshit because popular languages have changed and emerged from outside of university (see Go, Python, etc that had no university presence and exploded in popularity in industry).
Re:Weird Languages by xpe on Saturday August 28, 2021 @06:14PM (#28341983)
PG's arguments are not forcing you to pretend (or ignore) anything.

I think it's possible you are falling prey to the either/or fallacy.

Re:Weird Languages by klyrs on Saturday August 28, 2021 @12:35PM (#28339347)
I'd say that (2) isn't a side point...

> 99.5% of programming consists of gluing together calls to library functions. All popular languages are equally good at this.

In my experience, there are tons of programmers who balk at anything more complicated than a for loop, to the point where they won't even read the surrounding documentation of a short block of code to try and understand what it does. That's the 99.5% of programming that pg is talking about. I'd guess that some 80% of programmers spend their entire lives in this regime. When algorithm/language researchers talk to software engineers about what programming is, sparks fly. Like the parable of the blind people examining an elephant, we're talking about the same thing, but our experiences with it are too different to reconcile.

Re:Weird Languages by sanderjd on Saturday August 28, 2021 @11:16AM (#28338702)
I honestly haven't seen any evidence of this whole "think things you couldn't previously think" idea. The only interesting thing I've seen people be able to do by switching languages, is significantly improving static analysis, in order to save debugging cycles and improve production reliability. But everything else that is "interesting" is just different ways to generate code in order to reduce lines of code written manually, which is convenient, and is certainly fun for nerds like most of us here, but I really don't see it as this superpower that folks like pg seem to believe it to be.

A better analogy for new materials is new techniques, like machine learning and higher order abstractions over it, or new algorithms. But those are independent of languages.

Re:Weird Languages by ahefner on Saturday August 28, 2021 @01:41PM (#28339908)
It's a real thing, but I think (extrapolating from my own experience) it's much more profound and tangible if you're starting from something like C or pre-modern C++ and then moving to something more modern and FP-flavored. Modern popular language are on a much more even playing field versus 20 years ago. Even so, I still had one of these mind blowing "things I couldn't previously think" experiences when I finally ventured into Prolog and logic programming a few years ago. It's such an order of magnitude beyond my day to day C++ and Python nonsense, at least up until the evaluation model blows up exponentially.

I'd still like, as a learning exercise, to build some semi-practical small applications in Prolog, but I feel like I'd need an expert mentor to guide me.

Re:Weird Languages by mr_luc on Saturday August 28, 2021 @09:18PM (#28343169)
I agree that there aren't a ton of convincing examples mentioned that aren't relevant to people who already agree w/the value of lisp-style macros -- but if you're interested I used the example of erlang when responding to a comment above: https://news.ycombinator.com/item?id=28343140

FWIW I do actually agree w/pg about macros; I use them day-to-day for more mundane things than his impressive fully-bottom-up approach to programming. But each time I do use them, I feel like "thank heavens I don't have to reach for some weird external codegen tool to do this".

Re:Weird Languages by sanderjd on Saturday August 28, 2021 @11:50PM (#28343932)
See I don't really feel that way about macros. To me, codegen is codegen, useful for a bunch of stuff but not really anything special, and whether or not it is homoiconic doesn't seem like the fundamental question to me.

Don't get me wrong, I think homoiconicity and macros are really neat, I can get behind the aesthetic appreciation of different programming languages and syntaxes for doing different things. But people seem to want to convince me that there is some mystical mind expanding power to it, rather than just aesthetic nicety, and that's what I find unconvincing.

Re:Weird Languages by SynthAnalytics on Monday August 30, 2021 @11:48AM (#28356864)
I think it's really about an interplay of mental models and domains. Hers's my one personal datapoint. I did my undergrad in math and discovered functional programming back then. Got real excited about it, read the Learn You a Haskell book and then sort of nothing happened. But I waited on that "mind expanding" stuff to pay off.

Then I got my first job, where they really only cared that I was good in python. Cranked out a bunch of python services, and got good at cloud stuff along the way. Decided FP and that kind of thing was "school stuff."

A few years later I found myself working at another shop doing backend Go/Kotlin. We were increasingly writing a lot of streaming stuff on Kafka, and could tell we weren't really "doing it right." Just gut feel that something was not as good as it could be. So we brought in a senior eng with a bunch of Kafka experience, who just sort of coincidentally had been working in Scala during that experience. We onboarded him onto Kotlin, but the code pretty quickly picked up a Scala style and flavor.

After about a year I couldn't shake the feeling of how perfectly this kind of functional thinking mapped to stream processing services. Especially when you're working on a framework like KStreams or Flink, being able to describe your transformations with these pure non-nullable functions was just perfect for the domain. When you squint a lot of the Option/Either monad stuff really helps you think about your programs as a linear flow of data, which is exactly what stream processing is.

When you look at a lot of the Java api's in the space of big data, they look functional. AFAIK thats not because a bunch of Java devs decided to use all the cutting edge Java functional features. Its because the stuff people were building in Scala just fit the domain so much better. So the Java ecosystem took those ideas and everyone is for the better.

At no point did I develop a superpower. Now I'm back to writing Python stuff in a new domain, and those insights aren't so valuable day to day. I try to make my code a bit more linear and functional, but can increasingly tell its not the practical choice. But if somebody needed me to write a high throughput reliable stream processing thing, I would immediately jump back to those patterns.

Re:Weird Languages by sanderjd on Monday August 30, 2021 @05:56PM (#28361365)
I agree with all of this and have seen many of the same dynamics in my career, but it just doesn't seem like this mystical mind altering eureka thing that a lot of people seem to make it out to be. To me it's more like, oh good, here are some more useful techniques that help get stuff done sometimes.
Re:Weird Languages by bastawhiz on Saturday August 28, 2021 @01:34PM (#28339844)
> but saying that languages don't matter, for us, would be like rocket engineers saying that materials don't matter.

This is a bad analogy. Programming languages all get compiled to the same machine codes. The human-readable version of that code doesn't actually matter very much, if at all, after compilation. Programming languages are tools for humans: they're either expressive enough or they're not.

A better analogy would be rocket engineers saying the CAD tool you choose to design your rocket in doesn't matter—and that has some merit.

Re:Weird Languages by AceJohnny2 on Saturday August 28, 2021 @03:16PM (#28340659)
There was this analogy about programming language proponents.

Language A has features 1, 2, and 3. Language B has features 1, 2, and 4.

Language A user thinks they're superior because they have feature 3, which B lacks. B's feature 4 they don't understand, but they've never needed it so it's useless.

Language B user thinks the opposite, of course.

(this was much better explained in an article that graced HN a while back, and I can't find anymore)

Re:Weird Languages by Akronymus on Saturday August 28, 2021 @04:03PM (#28341044)
Re:Weird Languages by AceJohnny2 on Saturday August 28, 2021 @09:39PM (#28343297)
That's exactly it!
Re:Weird Languages by JBiserkov on Saturday August 28, 2021 @03:30PM (#28340777)
>Languages are solved, not important; I build systems.

The language of the System - Rich Hickey https://www.youtube.com/watch?v=ROor6_NGIWU

Re:Weird Languages by ankurdhama on Sunday August 29, 2021 @02:46AM (#28344740)
The whole explanation of your point is just filled with analogies. IMO if you have to use analogies to explain your point then you really don't understand your own point.

When programming, I am thinking in terms of data, what processing the data needs, how will you structure the data in memory/disk, what IO/integration is required etc. This thinking has nothing to do with what the programming language allows/makes you to think. If your programming language is supposed to dominate your thinking about programs then you are just constraining yourself to a specific way of solving the problem.

Re:Weird Languages by MaxBarraclough on Saturday August 28, 2021 @07:14PM (#28342397)
> saying that languages don't matter, for us, would be like rocket engineers saying that materials don't matter.

It also seems plainly mistaken. We still see a steady stream of security vulnerabilities relating to imperfect use of unsafe languages. Safer languages make those sorts of errors categorically impossible. Even if your position is sure but these languages aren't always practical, that's still a concession that further work is needed on safe languages.

Re:Weird Languages by kortilla on Sunday August 29, 2021 @03:25AM (#28344894)
This rocket analogy falls flat because the languages that have been used to build the most scalable and/or complex systems of today are usually the boring ones (c/c++/Java/python/ruby/JavaScript).

Linux, llvm, Android, iOS, git, cPython, numpy, etc, etc. From operating systems, to compilers, to scientific computing, to literal rocket control systems, it’s mostly boring C/C++/obj-C/Java.

Re:Weird Languages by robertlagrant on Sunday August 29, 2021 @09:34AM (#28346556)
Is that true? WhatsApp, Discord, and Facebook Messenger are Erlang. Some pretty extreme scale systems, I'd say.
Re:Weird Languages by kaba0 on Sunday August 29, 2021 @12:45PM (#28348251)
Some of these companies are so insanely huge that they have dozens of technology stacks, so I would not attribute elixir specifically, to the latter two at least (wasn’t discord rewritten in rust not too long ago?)

And facebook itself is historically PHP (where they had to fork the runtime even), but they use plenty of other boring tech (eg. Java), as well as some exotic ones, notably haskell for some query pre-optimization (afaik)

Re:Weird Languages by steveklabnik on Sunday August 29, 2021 @01:06PM (#28348466)
They rewrote some services from Go to Rust, but have always been a huge elixir shop. They wrote some NIFs in Rust too.
Re:Weird Languages by 5faulker on Saturday August 28, 2021 @01:15PM (#28339686)
Not to mention that languages are not just a tool for communicating meaning: it's also a tool for communicating emotions and mannerism as well.
Re:Weird Languages by emodendroket on Saturday August 28, 2021 @11:02AM (#28338593)
Rocket materials don't ultimately compile down to the same material though. This makes the analogy somewhat flawed. Also, if a novel language feature is useful enough, it's often stolen by the competition.
Re:Weird Languages by ovis on Saturday August 28, 2021 @11:32AM (#28338831)
From the article,

> [Lisp macros] by their nature would be hard to implement properly in a language without turning it into a dialect of Lisp

Other candidates that come to mind (because I recently learned about them) are effect systems, like in Koka.

Re:Weird Languages by Shorel on Saturday August 28, 2021 @02:06PM (#28340112)
Mixin macros in D are just about as powerful, and D is not a dialect of lisp.

The main difference is: mixins are compile-time only, you can't add them to a running system like in Lisp.

In practice, it is a much smaller difference than it looks like.

Re:Weird Languages by emodendroket on Saturday August 28, 2021 @11:36AM (#28338866)
Yes, I read that, but I don't know Lisp well enough to evaluate the claim.
Re:Weird Languages by klyrs on Saturday August 28, 2021 @12:46PM (#28339432)
I'd highly recommend learning lisp and writing some higher-order functions with macros. You start with an instance of a lower-order function, insert a few backticks and commas where appropriate, wrap that in a defmacro, and boom, you're a metaprogrammer. You can certainly do similar stuff in other languages, but it's almost always a cludge.

The rest of lisp is pretty easy if you've done any sort of functional programming, and view the code through a lens that translates (foo ...) to foo(...)

Re:Weird Languages by jollybean on Saturday August 28, 2021 @06:03PM (#28341905)
Looking at functional languages helped me understand the point of all a little better, to the point where I write completely different imperative code now. I'm much better at reducing state, leveraging static calls / libs etc..

But I'll probably never use a functional language in production.

The Rust borrowchecker is an awesome idea, I don't quite like Rust and don't want to use it, but I'm excited for the concept to be introduced into established or newer languages - and it helped me reason about my own programs a little bit.

Even beyond personal curiosity, that was time well spent.