Post AaOIlgt9tg4rVBfMWW by mzan@qoto.org
 (DIR) More posts by mzan@qoto.org
 (DIR) Post #AaNzP0Umw0RwWRjlOi by rml@functional.cafe
       2023-10-03T05:13:21Z
       
       0 likes, 0 repeats
       
       The worst advice I was ever given by a professor is that Gang of Four is the only programming book worth reading. After that, its just a matter of practice ๐Ÿ™ƒ
       
 (DIR) Post #AaNzP1QDUUO3OYbcuW by rml@functional.cafe
       2023-10-03T05:18:51Z
       
       0 likes, 0 repeats
       
       he is one of the founders of bandcamp, actually. they were just starting it at the time, and then it blew up, so ofc I took his advice seriously.same guy who was adamant that C and C++ are the only serious programming languages, which I took as a simple fact until ~7 years ago, unfortunately.once he threw a house party, and there was a half-finished bowl of Fruity Loops in his bathroom on the toilet mantel.
       
 (DIR) Post #AaNzP2FcPNVHxyeg1w by mzan@qoto.org
       2023-10-03T07:16:19Z
       
       0 likes, 0 repeats
       
       @rml > same guy who was adamant that C and C++ are the only serious programming languages, The error is thinking that there can be only one programming language. Obviously, it is better reducing the number of PL and paradigms, but one is not the optimal ๐Ÿ™‚ There are successful commercial software analysis tools written in Prolog. Many theorem provers are written in FP languages. Many workflow jobs that run on the cloud are written in Go. Rust is used for multithreading code with manual memory. Ada and Spark are used in operational software where there must be some proofs. Erlang is used for distributed services. Etc... These are serious systems, used in production. If you try to rewrite them in C++, probably you will fail, because the task is enormous without using the proper PL for the specific domain.@ramin_hal9001
       
 (DIR) Post #AaNzP38v5ljujUWqEC by hayley@social.applied-langua.ge
       2023-10-03T07:24:45.769136Z
       
       0 likes, 0 repeats
       
       @mzan @rml @ramin_hal9001 > The error is thinking that there can be only one programming language.There can, but it's definitely not C++; despite attempts of the committee to ape from every language in existence.
       
 (DIR) Post #AaNzP5Hr7W4lNmj0Qy by rml@functional.cafe
       2023-10-03T06:18:45Z
       
       0 likes, 0 repeats
       
       actually come to think of it, "use C++" is even worse
       
 (DIR) Post #AaNzP74oSypavudcNk by rml@functional.cafe
       2023-10-03T06:22:57Z
       
       0 likes, 0 repeats
       
       I am glad that I "learned" c++ tho, just because it is so diffuse. a major downside of #fp C++-hating is that lots of people exposed to FP early-on will avoid C++ like the plague. which you should, when it comes to building anything new. but knowing your way around is hugely beneficial.
       
 (DIR) Post #AaO3dcRZ2cLm5RS5se by petealexharris@mastodon.scot
       2023-10-03T08:05:05Z
       
       0 likes, 1 repeats
       
       @rml A metaphor for the C-based languages' memory hygiene.
       
 (DIR) Post #AaOIlgt9tg4rVBfMWW by mzan@qoto.org
       2023-10-03T07:32:50Z
       
       0 likes, 0 repeats
       
       @hayley you can use one PL, but not one paradigm and not one run-time. At a certain point you had to introduce Actor semantic if you want to manage complex distributed systems, or logical programming if you want to specify complex business rules, and so on. In the end you have many PL paradigms, using more or less the same syntax. It is the Common Lisp approach.@ramin_hal9001 @rml
       
 (DIR) Post #AaOIlhfiz6vRvoO9Ds by screwtape@mastodon.sdf.org
       2023-10-03T07:52:14Z
       
       0 likes, 0 repeats
       
       @mzan are you saying that Basically The Good Algorithm Here mostly has one, or a few quite analogous approaches to implementation? But I'm supportive of DSLs and the MOP in common lisp. Or [I forgot the punny name of Kiczalez' implementation of MOP for schemes] for rml and ramin@hayley @ramin_hal9001 @rml
       
 (DIR) Post #AaOIliaRaEIOlivRdA by ramin_hal9001@emacs.ch
       2023-10-03T09:24:40Z
       
       1 likes, 0 repeats
       
       @screwtape @mzan @hayley @rml for what it's worth, I don't like the idea of using lots of runtimes, it increases complexity, attack surface, opportunities for bugs.But I do agree that you can't just use one. There are times when you really do need an interpreter, and times when you really do need good single-threaded performance without garbage collection, and times when you really do need massive networks of objects with asynchronous object passing, and times when you need good performance measurements and instrumentation, and so on.That said, I see no reason why all of these different runtimes couldn't be implemented in a version of Lisp that used Rust-like memory management, with the higher level parsing and intermediate language representation implemented in an ordinary garbage collected Lisp.
       
 (DIR) Post #AaOIoEVtqrLyMo01Cq by screwtape@mastodon.sdf.org
       2023-10-03T09:31:55Z
       
       0 likes, 0 repeats
       
       @ramin_hal9001 I can't see that rust-like memory management could be important. You mean you want a compile time garauntee from the compiler that no consing is happening in this block? I don't think it's that hard to write sbcl code that doesn't cons: But garbage collection is fundamentally good.@mzan @hayley @rml
       
 (DIR) Post #AaOIoGp7GNufWz0OR6 by ramin_hal9001@emacs.ch
       2023-10-03T09:36:56Z
       
       1 likes, 0 repeats
       
       @screwtape @mzan @hayley @rml garbage collection is good, except when you want to write operating system kernels, especially for real time applications. For OS applications, I think it is better for the compiler be able to provide some guarantees that memory isn't just being allocated on the heap without being able to prove some programmatic path exists to the end of life of that allocation.I haven't tried playing with it yet, but I understand that PreScheme which was a subset of Scheme used to compile the Scheme48 compiler, is a non-garbage-collected Scheme that you might be able to use to program an OS microkernel.
       
 (DIR) Post #AaOIoHTArRxJXDkNsG by screwtape@mastodon.sdf.org
       2023-10-03T09:34:28Z
       
       0 likes, 0 repeats
       
       @ramin_hal9001 @mzan @hayley @rml @awkravchuk are you happy with your fine-grained control of memory in sbcl, in terms of being able to write some particularly tight codes without consing? Do you have commentary on that?
       
 (DIR) Post #AaOItyUoJk0kQWEAvw by hayley@social.applied-langua.ge
       2023-10-03T11:03:17.344574Z
       
       0 likes, 0 repeats
       
       @ramin_hal9001 @screwtape @mzan @rml > except when you want to write operating system kernelsThe Biscuit kernel written in Go suffered a maximum pause of 110ยตs.> especially for real time applications1978 called, wants its real time GC back: https://plover.com/~mjd/misc/hbaker-archive/RealTimeGC.html> For OS applications, I think it is better for the compiler be able to provide some guarantees that memory isn't just being allocated on the heap without being able to prove some programmatic path exists to the end of life of that allocation.I don't care.> PreScheme...it is in name only, for it is neither Pre- nor Scheme.> That said, I see no reason why all of these different runtimes couldn't be implemented in a version of Lisp that used Rust-like memory managementAnd Lisp that would be in name only.
       
 (DIR) Post #AaOXss4YDHAFWksPmC by ramin_hal9001@emacs.ch
       2023-10-03T13:37:42Z
       
       0 likes, 0 repeats
       
       @rml @screwtape @mzan @hayley  > "1978 called, wants its real time GC back: "Wow, that is really cool! I had never heard of the Real-Time Garbage Collector before. Is this like an optional feature of SBCL, or do you happen to know if it is in use anywhere in modern languages? Was it used in the Biscuit OS kernel? I will be sure to read that paper. But I am curious why I don't see real-time garbage collectors more widely used, or maybe it is and I am just haven't heard of it before, I am certainly no garbage collection guru.> "I don't care."Well, some people (not me) do write operating systems, and they do care that their operating system not leak memory and are not stopping the world to collect garbage. I don't have time to look it up now, but I remember an interview with Linux Torvalds a long time ago about why he insists on using C and not any other high-level language for Linux, and garbage collection and space leaks was one of the things I recall him talking about as a reason why he wouldn't trust other languages. But nowadays, obviously, they are starting to allow Rust into the kernel, and I am sure it is for the very reason that I mentioned, which is that the type checker can provide some guarantees that the kernel will not leak space or stop the world.> "it is in name only, for it is neither Pre- nor Scheme."That is debatable. So yes, there are no closures, and it implements type checking and inference, but the rest of the language is similar enough to Scheme that people who read the code can understand it as a Scheme program, and you can reuse part of the pre-Scheme compiler and runtime in the Scheme compiler and runtime as well. But I am really not interested in debates over semantics so I will leave it at that.
       
 (DIR) Post #AaOXssx8wIpiG4Q0rw by hayley@social.applied-langua.ge
       2023-10-03T13:51:08.441875Z
       
       0 likes, 0 repeats
       
       @ramin_hal9001 @rml @screwtape @mzan > Is this like an optional feature of SBCL, or do you happen to know if it is in use anywhere in modern languages? ZGC and Shenandoah in OpenJDK are similar; SBCL lacks any concurrent collectors. Biscuit uses the Go GC which is another concurrent but non-moving scheme.> are not stopping the world to collect garbage.As above.> But I am really not interested in debates over semantics so I will leave it at that.Don't start one then, smartass.