2020 Status
I do agree that pure functions are super useful if the analysis is accurate enough. The main reason that we deferred this feature was that without a lot of work, our analysis would be way too conservative. Almost everything would be flagged as potentially impure because Stanza is too flexible in what it allows users to do. I'll add the Stanza thesis to the website. Thanks for the suggestion! |
|
Eric Toombs
Ah yeah, here it is, Philip: https://github.com/StanzaOrg/lbstanza/issues/43
toggle quoted message
Show quoted text
*Somebody* closed the feature request :D As for a full use case, huh, that will take longer. I have struggled before trying to convince people that hey pure functions are actually super useful, always thinking the usefulness was self evident. The biggest resistance I always get is "BUT MUH PRINTF!!!1!" basically. (see https://github.com/vlang/v/issues/3090) That and, "I just wanna change my variables!" I get that one a lot from game devs. The worst effects are typically only truly unmanageable at scale, so I will need some time to think, but I will try to cook up some really good, plausible, but still small-scale bugs that could have been easy to fix, or perhaps avoid altogether with pure functions. Also, lol, cooking up bugs. Tasty. Actually, though. Fried mealworms are delicious. But I digest. On 2020-01-07 18:37, p.z.trotter@... wrote:
*hi Eric , * *re: pure function annotations* |
|
p.z.trotter@...
hi Eric , re: pure function annotations D-lang also has a pure function attribute thats proved very helpful for debugging and thinking about code side effects - so agree its very valuable feature for stated reasons, but also agree with Patrick on priority. Once the LLVM backend is in place - I think this should be relatively straightforward to add via existing LLVM infrastructure for function attributes. Not sure at this point, how to port to existing backends - but thats just a matter of getting used to codebase - so I'll have a think on this - since its something I would like as well Eric - can you create an issue on github , so it doesnt get forgotten and add your use case info then we can see if its doable as a community contrib?
Patrick - re; Dylan and Jonathan : Yup - I knew of Jonathan's work at Harlequin, and your thesis nicely covers supporting influences and related works. BTW - Would it be possible to add your thesis to the Stanza website documentation ?- its a good read and might be very helpful for folks discovering Stanza.
- Phillip
|
|
Eric Toombs
The optimisation thing, yeah, that's not too important compared to LLVM.
toggle quoted message
Show quoted text
But knowing a function is guaranteed not to have side effects would be nice for code reasoning and debugging purposes. On 2020-01-07 02:10, Patrick S. Li wrote:
Hi Eric, |
|
Hi Eric, The purity annotations has been deferred until later. One of the primary reasons for adding it is to give the optimizer more information to make more aggressive transformations. However, there's a number of other optimizations that will have more impact that we decided to prioritize first. (Such as the LLVM backend). Patrick |
|
Eric Toombs
I asked a few years ago about guarantees for pure functions. Any work
toggle quoted message
Show quoted text
happening there? On 2020-01-05 13:21, Patrick S. Li wrote:
Cool, a Dylan fan! Jonathan Bachrach, my advisor, was one of the early |
|
Cool, a Dylan fan! Jonathan Bachrach, my advisor, was one of the early people to work on that system. It influenced Stanza's design greatly. Sounds good. Just post here if you have any questions. Patrick |
|
p.z.trotter@...
Hi Patrick, Thanks for the quick response - very helpful and very encouraging. I use LLVM iwith OpenDylan and its proved very useful for C/C++ libray and platform integration Stanza is a already a lovely language to work with and I can see LLVM backend and LSP support will help drive a lot of adoption. I'll dig into the experimental branch and post to the forums if i have any questions.
|
|
Hello! Stanza development is active however the website has definitely fallen behind just because I have been so busy. The short of it is that I founded a company called JITX when I graduated, where we are writing a programming language for designing electronics, and Stanza is our main development language. So development on Stanza is proceeding along because of that. The experimental branch has a REPL now (quite a fancy one too, that I need to write about) and a very convenient built-in build system and test framework. The main features slated for development are an LLVM backend for Stanza, and Language Server Protocol support. We're very excited for both of them. The LLVM port should allow Stanza to run on just about every platform under the sun, and the LSP support will allow Stanza to be nicely integrated into most of the major IDEs. This forum is still the best place for discussions/questions. Cheers, Patrick |
|
p.z.trotter@...
Hi, all. I am thoroughly enjoying going through L.B.Stanza's codebase and interested in contributing. There appears to be semi-regualr activity in the git repo but fewer regular announcements here and the website news section is now a few years old. What is the best place to learn what is happening/status/roadmap? orr just to ask questions? (e.g. REPL status for example) thanks much.
|
|