bslatkin
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Tuesday March 07, 2023 @09:49AM (#35055930)
Contact form here: https://quil.la/FVZ3PMZC Thanks!
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Monday March 06, 2023 @09:12AM (#35041205)
Great! Please send it my way so I don't miss it. Thank you
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @11:48PM (#35037617)
Scala has a lot of interesting concepts in it for sure! The problem is that the JVM is a deal-breaker, either because of its complexity or because of the associated licensing risk. Clojure has the same problem, for what it's worth.
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @11:37PM (#35037559)
For a very simple, single-expression lambda function I agree you don't need an explicit return. Even Python skips the "return" for lambdas. But for anything more complex, I find explicit returns, especially early returns, makes the code much more readable for people who are used to imperative languages.
For example, which of these is more clear to people who don't know Lisp? I'd argue the second one because of the early return if guard.
---- THIS ----
(defun sum-helper (items total)
(cond
(items
(sum-helper
(cdr items)
(+ total (car items))))
(t total)))
(defun sum (&rest items)
(sum-helper items 0))
(print (sum 1 2 3 4))
----- OR -----
(defun sum-helper2 (items total)
(if (not items)
(return-from nil total))
(sum-helper
(cdr items)
(+ total (car items))))
(defun sum2 (&rest items)
(sum-helper2 items 0))
(print (sum2 5 6 7 8))
(sum-helper items 0))
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @09:01PM (#35036647)
Let me know if you'd like to give it a shot to see how gunky it is!
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @08:41PM (#35036506)
Thank you. I think you've basically summarized the approach! If you have any specific guidance to that end please send me an email or DM with details :)
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @07:03PM (#35035687)
Let's keep going with the building analogy. You're running a cabinet making company. You've got all kinds of hand tools and power tools. You build jigs to make certain repetitive tasks faster. Then a ridiculously difficult design comes in for you to build. You and your crew are flummoxed by its complexity. Suddenly, someone offers you a CNC machine that you've never used before. What seemed hard is now easy. The nature of solving problems with a CNC is different. Using a CNC presents other challenges. But you have entered a new realm of what's possible. Analogies are a lot of BS but hopefully that gets across the flavor of what I'm talking about.
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @03:46PM (#35033768)
I understand what you mean. But I expect most potential users want explicit returns because they're familiar and more approachable for beginners.
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @12:57PM (#35032109)
I think Spark is a good example of where the functional paradigm has done well in a niche.
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @12:54PM (#35032075)
It's SSA. If you use (define) in Racket is it no longer functional?
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @12:10PM (#35031540)
I'm not an Elixir expert at all, but one important feature I believe is missing: explicit returns.
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @12:03PM (#35031469)
How should an early return if statement work instead?
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @11:58AM (#35031414)
Agreed that seeing structure is important. I mean operating on it at a higher level like https://calva.io/paredit/
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @11:56AM (#35031382)
I love to swing a hammer as much as the next programmer. But if you offer me a nail gun, even with slightly lower precision, I will happily use it the majority of the time and revert to my hand tools when it's most appropriate. This is about developing force multipliers and producing leverage, not avoiding the craft.
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @11:46AM (#35031263)
I've got a working interpreter and compiler for the initial language. I've had a few people take it for a spin and they were able to rapidly learn it and start contributing, despite having expressed frustration in trying FP languages in the past. All anecdotes for now!
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @11:43AM (#35031211)
Some parentheses languages are much easier to use if you're familiar with a structural editor, for example.
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @11:32AM (#35031090)
The conversation happened in ~2008.
Julia has a lot of great ideas in it for sure. Why hasn't it gotten more popular?
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @11:31AM (#35031083)
It's true and that is one of the largest challenges. Producing something that feels familiar (but not error prone) has been the way I've solved such conflicts so far.
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @11:30AM (#35031066)
I'm sorry to make you wait.
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @11:29AM (#35031061)
Great examples. Another question that leads to frustration is "can I use my existing code editor for this"? People are turned off when the answer is "no"
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @11:15AM (#35030923)
Exactly.
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @11:14AM (#35030905)
It's an unpaid personal open source project.
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @11:10AM (#35030863)
Thanks! Right now the language's codebase is about 50KLOC. There's an interpreter for fast iteration and a compiler built on LLVM for producing native binaries. I'd like to make more progress on the parallel computing functionality before sharing it more widely.
Re:Brett Slatkin: Why am I building a new functional programming langu...
on Sunday March 05, 2023 @11:04AM (#35030783)
Thank you! Imagine everything we like about Python, remove some warts, make it functional. It should feel familiar and appealing to a Python programmer.
Re:The case for dynamic, functional programming
on Thursday November 24, 2022 @04:23AM (#33729298)
Thanks for reporting that — I have no idea how that could be happening. Site is hosted on Blogger so it's a pretty vanilla setup.
Re:The case for dynamic, functional programming
on Wednesday November 23, 2022 @05:37PM (#33725410)
Why do you think so many Lisp fans (e.g., Norvig) went on to use Python instead of those ML alternatives?
Re:The case for dynamic, functional programming
on Wednesday November 23, 2022 @04:20PM (#33724684)
I've had a similar experience in a large Python codebase!
Re:The case for dynamic, functional programming
on Wednesday November 23, 2022 @03:43PM (#33724282)
100% agree with both of these comments. I'd love to see a resurgence of interest in this area.
Re:The case for dynamic, functional programming
on Wednesday November 23, 2022 @03:39PM (#33724231)
I agree that another language that's better for functional programming would make this more compelling. Python has a lot of limitations in this area. I think all of those alternatives you listed (Julia, Clojure, etc) include turn-offs for Python programmers that are deal breakers. So I'm seeking another language that appeals to Python programmers but has more of the attributes that are amenable to functional programming.