Hacker Newsnew | past | comments | ask | show | jobs | submit | helix278's commentslogin

Although I'm more of a functional programmer and ADT addict, I still find this language appealing. Reading the manual, it feels like a lot of correct design decision have been made, contrary to languages like C++. Most notably for me: 1) Memory allocation and reference is restricted, leading to less problems with memory management. 2) Syntax is more flexible, allowing for higher levels of abstraction.


But entirely definable in user code, so an effect is essentially a set of possibly impure operations you can perform (like I/O or exception throwing), and a function that exhibits that effect has access to those operations. Of course the call sites then also exhibit that effect, unless they provide implementations of the effect operations.


TCO (tail call optimization) is often confused with TCE (tail call elimination), the latter is a runtime guarantee whereas the former is a compiler's best effort attempt to statically optimize tail calls.


Thanks! So you are implying that `TCO :: Maybe TCE`?

I am trying to think of a situation where a functional language compiler does not have enough information at compile time, especially when effects are witnessed by types.


I'm not a compiler dev, but I know that many functional programming languages struggle with this in the same manner if the target platform does not support TCE itself, and therefore require trampolining.


So cutting edge you wouldn't even need a kitchen knife


I like that there is plenty of room for comments, and the multiline extension is also cool. The backslash almost looks like what I would write on paper if I wanted to sneak something into the previous line :)


Thanks :)


Quite nice. Though I like texts with exercises better


You're right, but history has shown that increasing the productivity also leads to increased demand, which is good news as long as humans remain involved for some percentage of the work


Increased productivity in one area doesn't necessarily increase demand in that same area. As jobs in a particular area are increasingly automated, workers in that field will often see a weaker labor market.

When you add the cost of education to the mix, automation often leads to progressively unemployable people that need to spend money they don't have in order to access a different job market.

It is not a trivial problem to solve.


What is the main difference with just?


I wrote a detailed comment yesterday about this: https://news.ycombinator.com/item?id=42353634

tl;dr: mise has more functionality like parallel tasks, watching for changes, and comprehensive argument parsing support (including custom autocomplete)

the biggest difference is the syntax. just is more concise and you really need to learn the syntax in order to use it. In mise things are more verbose but I feel easier to read for someone unfamiliar with it.


Would it be feasible to build a larger application using a language like Factor? I have no experience with concatenative programming, and it seems interesting, but I also get the feeling that larger systems would become rather complex and hard to read.


I think questions like this cannot have an objective answer. I dealt with code written in lisps, and Forth. There are plenty of people who claim they are hard to read, but in my experience once your brain starts to recognize patterns, and idioms it becomes crystal clear and logical. At the same time I find myself taking more mental effort parsing code in languages which like to overexplain by repetitiveness, like Java with its "Foo foo = new Foo". I have a colleague however who believes that everything which is not Java is barely readable. Probably, it's related to the fact that he writes Java exclusively for a very long time.


Here’s a somewhat related, albeit casual, read - if you’re curious: https://groups.google.com/g/comp.lang.forth/c/ThWiGXwKqv4


This is called "A Forth Story"

I want to like and use Forth for something, but this from the post sums it up pretty well.

"I told my partner that the final device could not be programmed in Forth. Why would I say such a thing? Simply because technology had passed Forth by, in my opinion. It was no longer possible for one person to develop all the software required in a graphical environment. I needed to buy the tools I needed to leverage my time for a professional job. I could no longer play the role of the maverick programmer, nor did I want to. I need to be part of a collaborative community in which I can give and receive work. I do not see Forth as a viable solution as of today."

That was 1995. His "story" also ended in 1995 with him being unemployed. The author is Allen Cekorich, which made it easy for me to look him up on LinkedIn and see what happened after. Yes, LinkedIn is good for something. Sounds like he landed on his feet.

https://www.linkedin.com/in/allen-cekorich-a86aa731/details/...


Yes, it's feasible.

Wielded well (read "Starting Forth" and "Thinking Forth") the concatinative languages are very good for eliminating incidental complexity, so code approaches the Kolmogorov complexity of the problem or task it's for.


Feasible, but takes a lot of skills and hard work to break the problem down into small enough pieces.

It's a different way of writing software.


> takes a lot of skills and hard work to break the problem down

Same for every programming language.

The advantage that concatinative languages have over others is the closeness of their syntax to the semantics of the domain which makes them much easier to learn and use than other PLs (unless one has previously learned the other PLs first. Otherwise PLs like C and Java seem hopelessly baroque.)


I don't agree.

All languages fall on a spectrum, different priorities, strengths and weaknesses.

Forth is all about simplicity of implementation, it's the number one idea driving every decision. Which means a lot of other priorities, like higher level abstractions, are more difficult to achieve.

It does make a nice DSL sometimes, so does Lisp, to an even greater extent, while providing plenty of higher level abstractions.


> A simple solution has elegance. It is the result of exacting effort to understand the real problem and is recognized by its compelling sense of rightness. I stress this point because it contradicts the conventional view that power increases with complexity. Simplicity provides confidence, reliability, compactness, and speed.

~ Chuck Moore, from "Starting Forth" foreword.

https://www.forth.com/starting-forth/0-starting-forth/

> It can scarcely be denied that the supreme goal of all theory is to make the irreducible basic elements as simple and as few as possible without having to surrender the adequate representation of a single datum of experience.

~ Einstein

https://quoteinvestigator.com/2011/05/13/einstein-simple/

> a lot of other priorities, like higher level abstractions, are more difficult to achieve [in Forth]

I'm not a Forth person myself but if I were I would challenge you to name a higher level abstraction or other priority that was difficult to achieve in Forth, or perhaps, more topically, in Factor.


CLOS or Conditions from Common Lisp then, or LINQ from C#, or sum types.

And I don't mean something that looks sort of similar; I mean the same functionality, flexibility and level of convenience.


Like I said, I'm not a Forth person, but if there were any around to settle it I would bet you all those things have several implementations (I do know that many people have written OOP and OOP-like things in Forth.)

> I mean the same functionality, flexibility and level of convenience.

I feel like you're missing the point (although there's such a thing as ANSI Forth so you are in good company). In Forth re-implementing an exact model of some other system (like CLOS, which is, of course, very nice, I don't need to tell you) is a non-goal (you could do it but it would be kind of a stunt.)

The fundamental advantage of concatinative languages over pretty much all the other PLs and paradigms (except maybe Smalltalk and APL) is that they permit parsimony of code, what some have called "semantic compression", by refactoring better than other languages. One of the reasons Lisp is so powerful is that it's also pretty good for refactoring.

I could prove this using Category theory (and God willing someday I will), concatinative languages are closer to the metal (the "metal" in this case being, not the hardware, but the conceptual essence of programming and logic.)

Anyway, well met, and have a good week. :)


There is a .NET library that also wraps DOT and provides programmability: https://github.com/Rubjerg/Graphviz.NetWrapper


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: