#r7rs — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #r7rs, aggregated by home.social.
-
There once was this nice page presenting debian packages:
https://debaday.debian.net/about-this-site/index.htmlMaybe we could do something similar in the fediverse? Let's try:
Today I want to present the programming language Scheme using a (less well known? but) very nice implementation: Gauche. For me Scheme was only love at second sight. On first contact I thought it is a toy. But it is not.
Quick start using Gauche in R⁷RS mode:
$ sudo apt install gauche gauche-doc
$ gosh -r7
gosh[r7rs.user]$ (+ 2 2)
4
gosh[r7rs.user]$ (import (scheme list))
gosh[r7rs.user]$ (let ((x 10000000)) (= (apply + (iota x 1)) (/ (* (+ 1 x) x) 2)))
#tSome links:
- Gauche https://practical-scheme.net/gauche/
- Revised⁷ Report on the Algorithmic Language Scheme https://r7rs.org/
#debian #debaday #programming #scheme #r7rs #gauche -
An idea to defeat #GenerativeAI in #FreeSoftware:Just use a #ProgrammingLanguage that isn’t popular (e.g. #Haskell or some #Lisp dialect) to write your code, but publish human-readable intermediate form of that code in the public code repositories (e.g. the C programming language). Share the actual source code privately with trusted contributors in non-public branches, and require GPG signatures on actual contributions.
You could argue that not sharing source code is against the GPL, but the GPL does allow you to share the code as a hard copy printed on paper and sent over snail mail. Or you can just wait until the person asking is an actual human that you can trust not to use the source code for LLM training.
LLMs are unable to learn unpopular programming languages because they don’t have a sufficient corpus of training data to learn how to code it, so if your receive a contribution in C, thank the contributor but inform them that they will have to rewrite the contribution in your Lisp dialect before you can accept it.
#Scheme dialects like #Gambit , #Chicken , and #Bigloo would work well for this. So would a #CommonLisp implementation that translates to C such as #ECL . Although keep in mind that the idea is to use a less popular language, so you may have to further obscure these languages a little bit, but not in a way that would be difficult for humans. For example, using a macro system, you could use
dfinstead ofdefine, rename types of things likestring?toutf8str?, use generic functions with mulitple dispatch soappendwill work on strings, lists, vectors, and bytevectors. Small tweaks like this might throw-off an LLM asked to write source code in Lisp.#tech #software #LLMs #LLM #FOSS #FLOSS #OpenSource #SchemeLang #R7RS
-
New book: “The Genius of Lisp” by Cees de GrootLooks like a fascinating read! They have provided chapter 8 as a PDF file downloadable gratis as a sneak-peek into the rest of the book, guess what it’s about:
Chapter 8: Sussman and Steel make Scheme
Awesome! I can’t wait to read that chapter, and then the rest of the book!
Details on the book homepage: https://berksoft.ca/gol/
#tech #software #Lisp #Scheme #SchemeLang #R7RS
RE: https://mstdn.ca/@cdegroot/116086771614712320 -
#Schemacs updateI decided to merge my #Scheme react-like declarative GUI framework
(schemacs ui), even though the back-end isn’t completely bug-free yet. (It is still an experimental software project, so themainbranch is the development branch).Though it is written in pure #R7RS “small” Scheme, the only GUI back-end currently available is for Guile users who go to the trouble to install Guile-GI all on their own.
If Guile-GI is installed, put on your safety goggles and run this command in the Guile REPL:
(load "./main-gui.scm")I haven’t tried getting it to work in a Guix shell for almost a year now, but my last attempt did not go well (it crashed while initializing Gtk). To anyone who wants to try the GUI, I am sorry to inconvenience you, but I’m afraid I just have to ask you to please install Guile-GI yourself using the old-fashioned
./configure && make && make installmethod. If anyone happens to be able to get it to work in a Guix shell, please let me know, or open a PR on the Codeberg Git repository.The only examples for how to use
(schemacs ui)are in the test suite and the Schemacs Debugger. The only documentation so far are the comments in the source code, though I did try to be very thorough with comments.The “Debugui” debugger works, but only has one single feature: the
eval-expressioncommand, which is bound toM-:(Alt-Colon). This command works the same as in #Emacs but you enter a Scheme language command instead. The #EmacsLisp interpreter is not yet connected to the GUI.Now that this is merged, I am going to work on a few tasks in the Emacs Lisp interpreter that have been pending for more than a few weeks now. Then, back to creating new features in the GUI toward the goal of making it a useful program editor. And also, of course, writing some more documentation.
-
#Schemacs updateI have been banging my head against #Gtk3 for the past 3 weeks and all progress has pretty much come to a stand-still. No matter how simple and straight-forward my GUI is, Gtk makes it simply impossible to get the layout correct. I am now convinced that programming my own layout algorithm from scratch and using the
GtkLayoutcontainer (which lets you place widgets at arbitrary X,Y coordinates) is the only way to proceed at this point. It is soooo frustrating.The #Gtk documentation is good, but not at all good enough. The people on the Gnome Discourse have been very kind and helpful, and I truly appreciate the engagement I have had there, but ultimately I am still not able to solve my problems.
I have decided I need find some way to keep making progress without postponing the release of the work I have done so far for an indeterminate length of time. So rather than work out all the bugs in this version before merging it to the main Git branch, what I will do instead is have the
mainprogram launch a debugger window. The debugger window will have all layout calculated in advance, and all widgets will be declared once and only once throughout the lifetime of the application to avoid the reference counting issues. Obviously the debugger GUI will be very rigid, but you will at least be able to edit files and run commands in a REPL within this debugger.Then maybe I can merge the code I have written to the
mainGit branch, and people will at least be able to use it through the debugger. Maybe also I could use this debugger to help with writing my layout algorithm. Also, I need to get back to the Emacs Lisp interpreter, I haven’t worked on it in almost two months now.#tech #software #Lisp #Emacs #EmacsLisp #Scheme #SchemeLang #R7RS
-
@momo cool!
Well then, please have a listen to the episodes of the #LispyGopherClimate podcast that me, @kentpitman and @screwlisp did these past few weeks:
- Kent Pitman presents his lisp condition system implemented for python
- Kent Pitman, Scott Zimmermann, Ramin Honary, Screwlisp: Lisp Conditions in Python
- Common Lisp condition handling lore
- Common Lisp condition system, code review of my programming example
- Common Lisp condition handling w/ Kent Pitman, Ramin Honary
#tech #software #Lisp #CommonLisp #Scheme #SchemeLang #R7RS #MITScheme #Guile #GuileScheme
-
@screwlisp @kentpitman I’m just reading up on the MIT-Scheme condition system. Recent efforts to standardize this are defined in SRFI-255: “Restarting conditions”.
An older standards condition systems in Scheme was defined in SRFI-35: “Conditions”. And #Guile users can use the Guile implementation of SRFI-35 to make use of it.
I wish I had known about this two weeks ago when we first started talking about it on the #LispyGopherClimate show, but better late than never, I guess.
#tech #software #Lisp #CommonLisp #Scheme #SchemeLang #R7RS #MITScheme #Guile #GuileScheme
-
Ouch, #Guile #Scheme has betrayed meI am using Guile-GI the GObject Introspection framework for Guile, and discovered that the
eq?predicate sometimes returns#tfor two different symbols. Does #GOOPS allow overloadingeq?on symbols such that it can return#ton different symbols? If so this seems like a huge problem to me, it completely violates the Scheme language specification. (Or should I ask, is this a “GOOPS oopsie?”)Anyway, what happens is this: you can capture a Gtk keyboard event in an event handler, and extract the list of modifier keys pressed on that key event. It looks something like this:
(lambda (event) (let*-values (((state-ok modifiers) (event:get-state event)) ((mod-bits) (modifier-type->number modifiers)) ((first-mod) (car mod-bits))) (display "first modifier: ") (write first-mod) (newline) (display "is symbol? ") (write (symbol? first-mod)) (newline) (display "eq? to 'mod1-mask: ") (write (eq? 'mod1-mask first-mod)) (newline) #t ))And the output of the above event handler, when I press a key with a CJK input method enabled (on latest Linux Mint) is this:
first modifier: modifier-reserved-25-mask is symbol? #t eq? to 'mod1-mask: #tThe fact that
(eq? 'mod1-mask 'modifier-reserved-25-mask)when the'modifier-reserved-25-maskhas been obtained from a C-language FFI callback is a pretty bad thing to happen in a Scheme implementation, in my humble opinion. -
#Schemacs UpdateI have partially resolved the issue I mentioned in my #EmacsConf2025 presentation, regarding the closure of a lambda not correctly capturing it’s environment.
I say “partially” resolved because although my current solution results in correct program behavior, it does not consider
let-bound variables inside of the closure. So variables declared locally to the closure using theletkeyword will mask variables of the same name in the closure environment. A correct implementation will simply not include those masked variables in the closure environment at all. This can sometimes impact garbage collection, since a closure may be holding a variable which retains a large amount of memory, but that variable not accessible anywhere since it is masked by thelet-bound variables in the closure.However, I am eager to keep things moving, so I am merging this PR and opening a new issue to resolve the
let-bindings problem later. To find out more, see issue #62 on Codeberg. -
I decided it was time to add a Code of Conduct to #Schemacshttps://codeberg.org/ramin_hal9001/schemacs/src/branch/main/CONTRIBUTING.md
I have been getting a lot of inquiries about Schemacs lately, and so I think it is best to settle on a Code of Conduct (CoC) right now before I find myself in the awkward position of accepting a lot of patches from various people who later on turn out to hate each other. Hopefully we wont ever find ourselves in such a situation, but it is best to be prepared.
I decided to go with the Contributor Covenant 3.0, which provides a template for a CoC that adapts well to various projects. If I recall correctly, I believe I learned about it from Christine Lemmer-Webber @cwebber on one of her podcasts.
I am open to recommendations for changes to be made to the CoC as well, I understand that my knowledge of such things is imperfect and I am willing to learn about various opinions regarding codes-of-conduct if anyone is willing to teach me more.
And of course, #Schemacs is free software, so anyone is welcome to fork it and develop it separately if you disagree with the CoC. But as long as I am the project manager for #Schemacs I will make the executive decision about the CoC.
#tech #software #CodeOfConduct #Scheme #SchemeLang #R7RS #Lisp #Emacs #FLOSS #FOSS
-
My EmacsConf presentation on Schemacs— will be live in about 5 minutes.
https://emacsconf.org/2025/watch/dev
Questions can be posted to this live chat: https://pad.emacsconf.org/2025-schemacs
EDIT: Thanks for all the great questions everyone. It is so encouraging for me to see that there is so much interest in this project, it really keeps me motivated to keep working on it.
#tech #software #Emacs #SoftwareDevelopment #EmacsConf #EmacsConf2025 #SchemeLang #R7RS #Scheme
-
@dpk (chair of the R7RS Scheme programming language standard working group) had designed a new, extensible #R7RS #Scheme pattern matcher library which generates optimal decision trees, and she has written a fantastic blog post about how it works: https://crumbles.blog/posts/2025-11-28-extensible-match-decision-tree.html
-
The official steering committee of the Scheme programming language is calling a vote to replace themselvesQuoting the memo:
The outgoing Steering Committee was elected in 2009 and successfully oversaw the production and ratification of the R7RS small language report until 2013. Unfortunately, during the protracted initial development of the R7RS large language after that, it fell dormant.
The current Scheme Working Group resolved in September 2025 to ask the Steering Commitee for a new election because it felt that after such long dormancy the outgoing Steering Committee was no longer able, as a group, to make and implement decisions effectively.
The Scheme standardization process charter says, ‘The Steering Committee itself shall establish procedures for replacing its members.’ The outgoing Steering Committee unanimously decided to delegate this task to the current Working Group. The Working Group has very closely modelled the procedure to be used this time on the procedure used last time.
The Working Group has written a statement to candidates and voters explaining what it hopes for in a new steering committee.
#tech #software #Scheme #SchemeLang #ProgrammingLanguage #R7RS #R7RSLarge #Lisp #FunctionalProgramming #Guile #GuileScheme #ChezScheme #ChickenScheme #GambitScheme #RacketLang #Racket
-
@jnkrtech you can read the original “Lambda Papers,” particularly AI Memo 349 “ Scheme: An Interpreter for Extended Lambda Calculus“ by Sussman and Steele where (I believe for the first time) continuation passing style was described in Section 3.4 “Continuation Passing Recursion”.
The rest of the “Lambda Papers” are all available on Wikisource.
#tech #software #FunctionalProgramming #Scheme #SchemeLang #R7RS #GerrySussman #GuySteele #AIMemo #MIT #LambdaPapers
-
Today I cleaned up some previous #Scheme code I wrote towards the end of last year. But gave an attempt at using #R7RS style libraries in #Guile.
One big helps for me was finding in the emailing list that you'd need to use the
.sldfile ending rather than.scm. (todo with library resolution).So I have something that works now. Though I'm not sure it's portable. Tomorrow I'll checkout Chicken Scheme and see if it works.
-
@plantarum hey, I’m the author of Schemacs.
Yes, there are Emacs-like editors written in a whole other language which make no attempt to clone Emacs Lisp.
Lem is a text editor written in Common Lisp, but it relies on SBCL-specific features so you can only build it on SBCL. The nice thing about Lem is that you have access to the entire SBCL ecosystem, which is pretty close to Python in the number of useful packages you can use with it. It uses SDL2 to display. It at one point had an Electron front-end but I think they abandoned that.
Edwin is a text editor written in Scheme, and comes bundled with the MIT Scheme implementation, which is compliant with the R7RS-Small Scheme standard. I believe it includes some of the original code used to teach the Scheme course at MIT back in the late 80s, and it is still minimally maintained even today. When I say “minimal,” I mean there have really been almost no new features added to it in like 30 years. It clones Emacs version 18 which was released back in 1992. All the maintainers do is make sure it runs on modern computers, and they otherwise leave it alone.
Lite is a text editor implemented and scriptable in Lua on top of a minimal C-language kernel. This makes it more like Emacs, which is Lisp running on top of a small C-language kernel. I think you can even use
libluagit5to JIT-compile your Lua packages, which probably makes it extremely fast.
That said, I don’t find any of these especially useful because they lack the huge package ecosystem that exists for Emacs. Emacs “apps” that I use all the time include Magit (Git porcelain), Hyperbole (a cross-referencing app), TRAMP (remote access), Org-Mode, Mastodon-Mode, ERC chat, Elfeed (RSS), as well as the built-in Dired, Proced, and Shell modes, plus all the integrations Emacs has for shell utilities like Find, Grep, GPG, SSH, Tar, Zip, and so on. Without these, I would not have nearly as easy a time getting my work done.
That is why I have put so much effort into cloning Emacs Lisp. I want Emacs users to be able to use the Emacs code they have already written for themselves, and rely on, while being able to transition over to an editor with a better scripting language.
#tech #software #Emacs #ProgrammingEditor #CommonLisp #SchemeLang #R7RS #EmacsLisp #Lisp #ComputerProgramming
-
“Why rewriting Emacs is hard,” by @kanaYes it is, I can tell you from experience. Of course, I was never under any illusion that it would be easy.
@kana , a.k.a. “Gudzpoz,” wrote a blog post which was shared on Lobste.rs, and they kindly mention my own Emacs clone Schemacs, though they refer to the old name of it “Gypsum” because they are citing my EmacsConf 2024 presentation done before the name changed.
It is a pretty good post going over some of the odd details about how Emacs edits text, e.g. the character range is from
0x0 to 0x3FFFFFFrather than the Unicode standard range from0x0 to 0x10FFFF, issues with using a gap buffer as opposed to a “rope” data structure, attaching metadata (text properties) to strings to render different colors and faces, and issues with Emacs’s own unique flavor of regular expressions in which the\=symbol indicates matching on the point in the buffer. (I did not know about that last one!)Apparently, they know these things because they are also working on their own clone of Emacs in Java for the JVM called Juicemacs (the name “Juice” upholding the theme of Java-based applications being named after drinks), and I deduce that their approach is to read through the Emacs C source code to ensure better compatibility. This is now the fourth modern Emacs+EmacsLisp clone that is still under active development that I know of, fascinating work!
My approach is to clone Emacs well enough to get it to pass regression tests, and I don’t read the C source code, I do black-box testing (because those tests become regression tests for my own source code).
Also, the goal with the Schemacs project is more to provide a Scheme-based Emacs that is backward-compatible with GNU Emacs. You use Schemacs because you want to program it in Scheme, not Emacs Lisp, but Emacs Lisp is there for you so you can still use your Emacs config. As a result, I will ignore a lot of these fussy details of the GNU Emacs implementation unless it is going to prevent regression tests from passing.
#tech #software #Emacs #GNUEmacs #Schemacs #EmacsLisp #Lisp #Java #Scheme #R7RS #SchemeLang #LispLang #JavaLang
-
#Schemacs minor milestone reachedWith pull request #50 the Schemacs Elisp interpreter is now able to load all of two very important Emacs Lisp source files:
…which are two files that define most of what you could call the the Emacs Lisp “core” language (by which I mean macros like
defunandlambda).With these files now loaded, I can proceed to the next task, which is implementing enough of the C-level built-in functions in Scheme to be able to run
./lisp/emacs-lisp/cl-lib.el, which is in-turn one of the dependencies for running the Emacs Regression Tests (ERT) suite.Once ERT is up and running, it will be much easier for anyone to contribute code to this project as you will just be able to pick a failing regression test and write whatever code is necessary to make it pass.
#tech #software #Emacs #EmacsLisp #Lisp #Scheme #SchemeLang #R7RS #FOSS #FreeSoftware
-
My submission to ICFP/SPLASH 2025 was rejected ☹️ . Although if I am honest, the reviewer’s reasons for rejecting it makes perfect sense, I can’t disagree with their decision.
The work I am doing on Schemacs really isn’t novel in any way at all, it is just a run-of-the-mill engineering project, everything I do has been done before. I mean, there is no need to invent some new technique to solve an already-solved problem. Not really the kind of thing that makes for a good conference paper. The biggest problem, of course, is that the application isn’t complete yet, so there is not much to share.
Well, my readers here on Mastodon can expect a series of blog posts pretty soon as I re-format my paper for publishing on my blog.
#tech #software #scheme #r7rs #SchemeLang #ICFP #icfpsplash2025 #splash2025
-
Why am I reading #R7RS-small instead of doing anything useful? And why does it have this terribly cursed paragraph in it?
“The Unicode Standard prescribes special treatment of the Greek letter Σ, whose normal lower-case form is σ but which becomes ς at the end of a word. See UAX #29 [11] (part of the Unicode Standard) for details. However, implementations of string-downcase are not required to provide this behavior, and may choose to change Σ to σ in all cases.”
-
Thinking of publishing a paper about #Schemacs at ICFP/SPLASH 2025…except there is not much in the way of original research. But I have received a lot of positive feedback about my project from the Scheme and Emacs community. So let me ask the Scheme/Emacs fediverse: if you would be interested in using or contributing to a Scheme-based Emacs that is mostly backward-compatible with #GNUEmacs , what is it about this prospect that is most interesting to you?
Personally, I live inside of Emacs and program most of my personal workflows in Emacs Lisp, though I feel that Scheme is a more interesting and fun language to use when compared to other #Lisp-family languages. So I would just like to be able to use Scheme as the language in which I program all of my personal workflows. Also I am curious if it is possible to write a large application in #R7RS Scheme such that it runs on many different Scheme implementations.
So does anyone else agree, or are there other things about a prospective Scheme-based Emacs that interest you that might be worth mentioning to a the audience of the Scheme-related chapters of the ICFP?
I was talking with William Byrd, who is one of the conference organizers of ICFP/SPLASH this year, and he says the committee could possibly accept anything of interest to the Scheme community, for example experience reports and “position papers” (helping others understand an opinion or philosophy on the topic). And they would judge these papers on different criteria than a paper about novel scientific research.
Anyone feel free to comment, but I am going to ping a few people in particular who seem to have opinions on this, like @dougmerritt @jameshowell @david_megginson @tusharhero @arialdo @lispwitch @cwebber @dpk and also @PaniczGodek who published on GRASP at this conference last year, if I recall correctly.
- https://conf.researchr.org/home/icfp-splash-2025/scheme-2025#Call-for-Papers
- https://codeberg.org/ramin_hal9001/schemacs
#tech #software #FOSS #FLOSS #SchemeLang #ProgrammingLanguage
-
[SOLVED] Question about how to use Akku packages with Chez SchemeI can setup the project to build using
Akku-R7RS:akku add akku-r7rs; akku install; ./.akku/env;But then how should I build each of the
.sldfiles to binary using the Chez compiler?@mdhughes @civodul @wasamasa do any of you know how to do this?
#tech #software #Scheme #SchemeLang #R7RS #ChezScheme #Akku #AkkuScm #AkkuScheme #AkkuR7RS #Lisp #ComputerProgramming #LispQuestions #LispAskFedi
-
Progress on my clone of the Emacs Lisp interpreterThis took me three months (a month longer than I had hoped), but I finally have merged it into the main branch!
This patch rewrites the Emacs Lisp lexer and parser in Scheme using Scheme code that is 100% compliant with the #R7RS standard, so it should now work across all compliant Scheme implementations. Previously the old parser relied on #Guile -specific regular expressions.
This patch also implements a new feature where a stack trace is printed when an error occurs. This of course makes debugging much, much easier. Previously the old parser did not keep track of where code evaluation was happening, it simply produced lists without source location information. The new parser constructs an abstract syntax tree (AST) and source locations are attached to the branches of the tree which can be used in error reporting and stack traces.
Next I will make whatever minor tweaks might be necessary to get my Emacs Lisp interpreter run on other Scheme implementations, in particular MIT Scheme, Gambit, Stklos, and Gauche. I would also like to try to get it running on Chicken and Chez, although these are going to be a bit more tricky.
Then I will continue with the task of implementing a new declarative GUI library.
#tech #software #FOSS #FunctionalProgramming #Lisp #Scheme #SchemeLang #EmacsLisp #Emacs #Schemacs #GuileScheme
-
The #LispyGopherClimate #weekly #tech #podcast for 2025-04-02Listen at: https://archives.anonradio.net/202504020000_screwtape.mp3
This week we will talk about the Unix Philosophy and how it compares and contrasts with whatever one might call the “Emacs Philosophy.”
The impetus for the discussion is a series of blog posts by @ramin_hal9001 called “Emacs fulfills the UNIX Philosophy”:
…as well as a fascinating discussion that took place over this past week on ActivityPub on the topic of the Unix philosophy and history of Lisp on Unix in which some very knowledgeable people have contributed anecdotes and facts.
#technology #programming #SoftwareEngineering #RetroComputing #lisp #r7rs #SchemeLang #UnixPhilosophy
This weeks #ClimateCrisis #haiku by @kentpitmanwithin each of us our loved ones, in tiny form, caring's innate yield company at a distance legacy in case of loss -
What I don’t like:
- some stuff breaks “everything is a list” model
- Common Lisp is not minimal, includes overlapping and legacy stuff
does #scheme address this?
@rzeta0 I would say yes, Scheme sort of addresses those issues.
Scheme’s biggest advantage is that it is minimal enough that you can understand the whole language specification top-to-bottom, inside and out. But that is also it’s greatest drawback: is that it is too minimal to be practical. So for a long time, every single Scheme implementation has a it’s own large and unique set of libraries for solving practical programming problems that were incompatible with other Scheme implementations, making the Scheme ecosystem very fragmented. The Scheme Request for Implementation (SRFI) process is meant to address this fragmentation issue. Fragmentation is still (in my opinion) a pretty big problem, though things are much better than they were 20 years ago.
The R6RS standard, as I understand it, tried to make Scheme more practical, but it started to become too Common Lisp-like in complexity so it was mostly rejected by the Scheme community — with a few notable exceptions, like the Chez Scheme compiler.
The next standard, R7RS, split the language into two parts: “R7RS small,” ratified in 2014, which is more like the original minimal core of the Scheme language, but just a few new features, in particular the
define-librarymacro, for modularizing parts of Scheme programs into immutable environment objects. Then they took a collection of “SRFIs” and declared them to be part of the “R7RS large” language standard. The full “large” language specification is not yet fully ratified, even 11 years after the completion of R7RS “small,” but I think the SRFIs they have ratified so far already make the latest Scheme standard a very practical language. The final R7RS standard may end up being larger than Common Lisp, but that is fine with me since it can be almost completely implemented in the R7RS “small” Scheme standard.R7RS “small” Scheme, in my opinion, is a powerful but minimal language that exists to implement other languages, but is still useful in it’s own right as a progeny of Lisp. The “R7RS large” language then adds the useful features of larger languages like Python or Common Lisp as a layer on top of the “R7RS small” language.
The current chair of the R7RS working group is Daphne Preston Kendal, and is often on Mastodon as @dpk . She can tell you if I got anything in this post wrong.
-
@xameer the “R7RS small” Scheme standard has a full numerical tower built-in, including unbounded integers.
(- (+ (expt 10 100) 1) (expt 10 100))gives you precisely the correct answer without any floating-point operations. Although macros for symbolic computation with optimization that would avoid computation of
(expr 10 100)is “an exercise left to the reader.” Haskell might do the optimal computation though thanks to it’s lazy evaluation.#tech #computers #software #FunctionalProgramming #Lisp #SchemeLang #Scheme #R7RS
-
@wingo is asking if anyone knows of a good course on the Nanopass framework (perhaps to recommend to others), but as usual he forgot to add hashtags to his post. So please reply to this post here: https://mastodon.social/@wingo/113956474737820425
#tech #software #Lisp #Scheme #SchemeLang #R7RS #R6RS #GuileScheme #Guile #Compilers #ProgrammingLanguages #PLT
-
me, scoffing: dude there’s like a million of those. what, does yours compile on a pregnancy test?
@garbados I can’t find it now, but someone apparently wrote a #SchemeLang that compiles to Ethereum smart contracts. Being that it runs on the cryptocurrency blockchain, they called it “Pyramid Scheme.” It may have been a joke, but I think someone actually did that.
I have challenged myself to try to get my large Scheme code base to compile on any #Scheme I can find that claims to conform to the #R7RS standard. So far I can get a significant portion of it to compile on #Guile (reference), Gambit, MIT Scheme, #Gauche, and Chibi. I hope I can get it to build on Chez with the #R7RS compatability layer built-in to the Snow Fort package manager.
-
“Question for lispers with experience: If you should start to learn a LISP style language today, which one do you pick up? Why?”
@syntaxerror The R7RS “Small” Scheme standard is roughly 80 pages, so you can learn about all of the language features very quickly. I love it because of it’s minimalism, it is my preferred language.
My take on it is that the “Small” Scheme standard is perfectly designed to construct larger programming languages with more features. One such language is R7RS “Large” Scheme, but you could theoretically use it to implement Common Lisp, Python, JavaScript, or any other language.
The R7RS “Large” standard is still being discussed (10 years after “small” was ratified), but it relies heavily on the “Scheme Request For Implementation“ (SRFI) process to fill out features. The larger portion of the R7RS “Large” standard is already ratified and published, so it is still useful even though it is not complete.
There are many Scheme implementations, but I recommend Guile, as it is almost completely R7RS-Small compliant, and has a ton of other useful features that come with it out of the box. So if you need, for example, a quick web server, or a way to search your filesystem, Guile has modules for that.
Another good batteries-included Lisp is Racket, which is a larger language built on top of Chez Scheme (an R6RS Standard Scheme implementation). You can easily install the R7RS Scheme language pack on Racket and write your code in Scheme as you read through the R7RS standard document.
Both Guile and Racket/CS (Chez Scheme) not only have many useful features, but compile to binary code that runs extremely fast for a high-level language.
Also, if you haven’t already, try to learn to use Emacs.
#tech #software #Lisp #CommonLisp #Scheme #SchemeLang #R7RS #Emacs #GuileScheme #RacketLang
-
@donkeyblam chez is the smallest of all the major implementations I believe. Chibi, the simplest to embed in application, while also fully featured with the largest SRFI set of any other except maybe gauche is about 25mb. Gauche is a fully featured implementation that is probably the closest to a full implementation of #r7rs-large (red) aimed at extending other applications and is ~85mb. gambit, the second fastest, is ~140mb. Guile is very fast (performance has never been a hangup in my extensive experience) and probably boasts the most extensive tooling beyond racket, and is ~80mb. Guile also ships with libguile, a simple interpreter written in C that is just a few mb and dead simple to embed in applications, but its features are quite limited.
And then #loko, the new kid on the block that is climbing the #scheme benchmarks at breakneck speed and I believe currently tailing racket after gambit and chez, which is also a microkernel operating system with #ConcurrentML style multicore based on Guile's fibers, as well as its own #wayland-style WIP compositor ("valand"), is a mere 9mb, with no dependencies whatsoever. It bootstraps from sprinkles of hand written assembly, which makes up a mere %0.2 of the code in the repository. Extremely impressive project. The author also makes the #akku scheme package manager, which is starting to make cross-implementation compatibility possible among r6/r7rs implementations.
-
@ramin_hal9001 the thing is, I would say this is starting to change with r6 and #r7rs implementations, and #akku does a pretty job of working out the compatibility between different implementations (but the guix package needs some fixing... on my TODOs).
but I agree about the pressure to pick the right one, it drove me mad, but I also think that the idea that getting used to multiple schemes is impossible, and it should even be encouraged to work with a few of them, because once you've navigated a couple, they're all kind of the same at root. but I think people should stick to one for their first year.
it's primarily just the #r5rs implementations that differ wildly. I think theres this mythology that r5rs was this legendary, impeccable standard, and that the process went astray after that, but the truth is that #r6rs really was a massive improvement, and r7rs-large will be something like r6rs (creating an r7rs compatability later for r6rs schemes is a matter of defining a module and a few identifier-syntax macros). problems with post-r5rs are primarily social, rather than technical imo.
-
#scheme tip of the day: need to get a quick overview of all the modules, imports and exports in a scheme repository? the #akku package manager can handle this for any #r6rs or #r7rs compatible scheme (which includes #guile): just cd into the repository, and run "akku scan", and it will list all this and more for you.
-
Just had a (certainly unoriginal) idea for "named match", which extends the Shinn patter matcher to behave like named let. Quick and dirty prototype came together quickly with syntax-case.
-
@jeko Quite a few, for #r7rs #scheme. Almost obligatory are:
* #srfi 27 for random numbers
* srfi 152 for string functions
* srfi 64 for tests
* srfi 117 for the list-queue structure
* srfi 1 for lists, of course
* srfi 125 for hash-table (nearly forgot this one!)
* with srfi 128 for comparators.
And I'm trying to learn how to use:
* srfi 115 for regular expressions
* srfi 159 for show/formatting -
You know #TDD ?! What? I mean #tootDrivenDevelopment ? 🤔🤔
♥️ I need help to figure out what it looks like! ♥️
I start with a simple #scheme #code #snippet and you modify it. The resulting code has to fit in one toot!
If you can't execute the code. It's broken. The last committer should fix it.
So make it portable ! 🚀(display "hello schemers")
#scheme #schemer #schemers #lisp #lisper
#r5rs #r6rs #r7rs #coding #programming #fun #friday #guile #chezscheme #gauche #racket #chickenscheme #gambit