Panicz Maciej Godek writes: > 2017-02-13 12:06 GMT+01:00 Arne Babenhauserheide : > There's also this problem with Scheme that it is a very diverse > community with plethora of implementations. And while I use Guile, I > don't mind using Chicken or Chez or Gambit for various purposes. Or > even Stalin sometimes. Maybe, instead of getting a better compiler, we > should focus on integrating existing compilers? You’ll have to ask Andy Wingo about all the hidden complexity in just wiring in a compilier. I assume it’s pretty big. I think the r7rs folks are working in that regard, to make it possible to write code which you can simply run through another Scheme implementation if you need those strengths. I started to use (import (...)) to get closer to that: Getting used to the portable stuff (also it’s shorter than (use-modules (...)). But not everything is portable, and performance critical stuff most definitely isn’t. And for the stuff I do, most things get performance critical at some point. Even looking for null-bytes in a file becomes a bottleneck if you have a few hundred TiB to check. Though I mainly need to write Python at work (Scheme isn’t widespread enough for the folks there — Python is everywhere in science nowadays). It’s still efficient to do that and I enjoy it, but not as much as writing Scheme. >> And it's easy to packages. >> > >> > => Another pain topic. In reality it's very easy to package >> > all sort of guile programs for guix. But guix itself needs >> > to be more stable. >> >> I wish I had guildhall ready. Got hit by >> time-eaten-by-other-project-because-guildhall-was-priority-three. >> >> It needs to be easy to not just package some code, but also to share >> that package without hitting a bottleneck. >> > What happened to initiatives like Scheme NOW, that tried to integrate > various groups of developers. I did not hear from that. > Or why can't we just "steal" eggs from Chicken? (I mean it. They already > have that problem solved) Do you mean, integrating eggs into Guile so we could just use them? Conceptually what would be needed for that is a metadata field: "Works with Guile". And practically someone to write the integration. We could also have guildhall working, and add a tool for converting chicken eggs into guildhall packages (and ideally vice versa). Then people could do the required Guile integration steps once and provide the packages to all who might want them. >> > Python is successful because it has a massive number >> > of libraries. >> > >> This is a social problem. For a deeper discussion why it is a problem, >> see http://winestockwebdesign.com/Essays/Lisp_Curse.html >> "Lisp is so powerful that problems which are technical issues in other >> programming languages are social issues in Lisp." >> >> We can counter this with easy tutorials and with writing something like >> canonical Scheme. But for this, we need to define a canonical Scheme >> which is hits the performance and readability sweet-spot for >> Guile. Canonical code must be close to the fastest code. >> > Practically put: We need Andy Wingo to nitpick the tutorial about things >> which will cause overheads the compiler cannot fix easily — including >> expensive use of macros. > I definitely oppose. If Chez has something solved better, why not use > Chez? It’s not "why not use Chez", but rather "what should I teach new people?" They are already learning a new language. When I now go and point them towards many different implementations which differ in details of stuff I teach them, I’m throwing more complexity at them. More things to understand before even starting to write working code. Maybe it would already help to mark the code which will work the same in all (r7rs) Schemes. Is there stuff which is well optimized in all Schemes? Who knows that? The r7rs benchmarks look like this is very much not the case: http://ecraven.github.io/r7rs-benchmarks/benchmark.html (Or rather, the benchmarks would ask: "why should I *not* use Chez or stalin for everything I do?" Because those are the fastest for most tasks.) But that might mean to write less elegant or efficient code to keep it cross-implementation. Should I rather teach new people to solve a problem as well as possible, or teach them to solve a problem in a portable way? In my case, I decided to use Guile by checking Scheme implementations. There were three with roughly equal activity and features. I chose Guile, because it’s a GNU project and it has a long history of surviving changing maintainers, so my skills are most likely to stay useful. > The ultimate goal is not to optimize programs, but programmers. I’m not sure that I want to optimize them, I want to teach them tools to be more efficient and enjoy their work more (and teach myself the same). > But I agree on the point of the canonical code. I think that the "zen > of python" is one of important factors of making it popular. I think > it could be the same with Scheme, but here the problem is that people > have various ideas with regard to how the "ideal" program should look > like. I think one important point for Scheme would be to gather some consensus points. The Zen of Python is part of what made that one community strong. There is no reason why there should not be a Zen of Scheme, along with implementation-specific Koans which extend it. Do you have ideas for principles which could be shared by most Schemers? > For example, I have a very strong opinion with regard to the use of > pattern matching and restructuring -- I try to use destructuring > almost everywhere (from what I've seen, Clojure programmers are alike > with this regard). However, I am aware that there are people who don't > like it that much, like Taylan or Barry Margolin. > > Also, I think that the astounding success of R provides hints with > regard what is needed for a programming language to gain popularity. R > has a large repository of packages that fills a certain niche. When I > advertised my Pamphlet on Hacker News, someone responded critically: > "are there out of the box libraries to estimate a zero inflated > negative binomial regression model in guile". Of course, if I knew > what a zero-inflated negative binomial regression model, I could > deliver an implementation by just explaining the notions used in that > phrase. I think there’s a quote which applies here: "Most people only use 20% of the capabilities of any program, but they do not use the same 20%." — Joel Spolksy, if I remember correctly. And to make people really dig into it, a programming language must work well for all tasks they might encounter. That’s why a comprehensive standard library is important: It gives the assurance that the skills you learn will stay useful wherever you go. There’s a nice quote from Rust folks: "people started to feel safe when we told them about unsafe" — someone on GNU social. This essentially says: they then saw that Rust could work in the uncomfortable way some of their tasks might require. That they could take it into harsher territory, if needed. > (But then again, I try to write functional programs whenever > possible, often consciously sacrificing time complexity of my > solutions, and I'm aware that not everybody will like it.) I look for ease of understanding, with functional programming techniques being a useful tool to reduce complexity and to simplify refactoring. But then, this is a point where we actually move into a similar direction out of different motives. I think the only problem here is the danger of assuming contradiction where there does not need to be any. Just different nuances of Zen :) Best wishes, Arne -- Unpolitisch sein heißt politisch sein ohne es zu merken