News for hackers. Stuff that matters.
Re:The lost cause of the Lisp machines by raverbashing on Thursday November 20, 2025 @03:44AM (#45990418)
True but some still wants me to understand what a monofunctor is or something that sounds like a disease to do things like print to screen or get a random number

I feel that is the biggest barrier to their adoption nowadays (and also silly things like requiring ;; at the end of the line)

Pure functions are a good theoretical exercise but they can't exist in practice.

Re:The lost cause of the Lisp machines by jacquesm on Thursday November 20, 2025 @04:11AM (#45990623)
> Pure functions are a good theoretical exercise but they can't exist in practice.

Well, they can. But not all the way up to the top level of your program. But the longer you can hold off from your functions having side effects the more predictable and stable your codebase will be, with as an added benefit fewer bugs and less chance of runtime issues.

Re:The lost cause of the Lisp machines by DonHopkins on Thursday November 20, 2025 @05:01AM (#45990990)
Yes, but they're "Hello world!" hostile, so traditional programming language pedagogy doesn't work well.

Q: How many Prolog programmers does it take to change a lightbulb?

A: Yes.

Re:The lost cause of the Lisp machines by mchaver on Thursday November 20, 2025 @05:52AM (#45991325)
I imagine LLMs have already thrown traditional programming language pedagogy out the window.
Re:The lost cause of the Lisp machines by raverbashing on Thursday November 20, 2025 @06:18AM (#45991469)
Yes I agree, pure functions are good building blocks (for the most part), but I don't think the current abstractions and ways of bridging the FP and Procedural world are good enough

Also have you managed to eliminate the side effect of your IP register changing when your program is running? ;)

Re:The lost cause of the Lisp machines by dreamcompiler on Thursday November 20, 2025 @09:10AM (#45992727)
I love FP but at the end of the day registers are global variables. Half of modern compiler theory consists of workarounds for this sad truth.
Re:The lost cause of the Lisp machines by lucas_membrane on Thursday November 20, 2025 @03:09PM (#45997038)
A functional program is an a self-contained expression -- an isolated system following its own rules. The foremost example we have of such a thing is the universe itself, but the universe is not a good example in this discussion, because we have plenty of reasons to think that the universe contains pure (not pseudo-) randomness. Beyond that, isolation , when it matters, is not an easily proven proposition, and is a deplorable fantasy when assumed in many of the other science and engineering disciplines.
Re:The lost cause of the Lisp machines by mr_toad on Thursday November 20, 2025 @09:12AM (#45992751)
> but I don't think the current abstractions and ways of bridging the FP and Procedural world are good enough

I find that both Python and Javascript allow you to use functional code when appropriate, without forcing you to use it when it isn’t.

Re:The lost cause of the Lisp machines by roryc89 on Thursday November 20, 2025 @04:22AM (#45990716)
In most FP languages it is simple to print to screen and get a random number.

Pure functions often exist in practice and are useful for preventing many bugs. Sure, they may not be suitable for some situations but they can prevent a lot of foot guns.

Here's a Haskell example with all of the above:

  import System.Random (randomRIO)

  main :: IO ()
  main = do
    num <- randomRIO (1, 100)
    print $ pureFunction num

  pureFunction :: Int -> Int
  pureFunction x = x * x + 2 * x + 1