home.social

#r7rs — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #r7rs, aggregated by home.social.

  1. The challenge of writing portable Scheme code is that every implementation has myriad little idiosyncrasies. Today I discovered the #MITScheme tries to read #Emacs -style file header comments (for example ;; -*- encoding: utf-8 -*-) and this can cause the reader to crash for some reason. I am not sure if it is a bug or a feature, but it did throw me off for a whole day while I tried to figure out why MIT Scheme wouldn’t compile a library file.

    I also happen to be hung-up on a bug in #Guile 3.0.11. It seems to me like the optimizer is emitting bad code, because I get a SEGFAULT on an expression that #Gauche has no trouble executing. I am still working on a bug report, and trying to figure out a work-around.

    #tech #software #Scheme #Schemacs #SchemeLang #R7RS #Lisp #GuileScheme #GaucheScheme

  2. The challenge of writing portable Scheme code is that every implementation has myriad little idiosyncrasies. Today I discovered the #MITScheme tries to read #Emacs -style file header comments (for example ;; -*- encoding: utf-8 -*-) and this can cause the reader to crash for some reason. I am not sure if it is a bug or a feature, but it did throw me off for a whole day while I tried to figure out why MIT Scheme wouldn’t compile a library file.

    I also happen to be hung-up on a bug in #Guile 3.0.11. It seems to me like the optimizer is emitting bad code, because I get a SEGFAULT on an expression that #Gauche has no trouble executing. I am still working on a bug report, and trying to figure out a work-around.

    #tech #software #Scheme #Schemacs #SchemeLang #R7RS #Lisp #GuileScheme #GaucheScheme

  3. The challenge of writing portable Scheme code is that every implementation has myriad little idiosyncrasies. Today I discovered the #MITScheme tries to read #Emacs -style file header comments (for example ;; -*- encoding: utf-8 -*-) and this can cause the reader to crash for some reason. I am not sure if it is a bug or a feature, but it did throw me off for a whole day while I tried to figure out why MIT Scheme wouldn’t compile a library file.

    I also happen to be hung-up on a bug in #Guile 3.0.11. It seems to me like the optimizer is emitting bad code, because I get a SEGFAULT on an expression that #Gauche has no trouble executing. I am still working on a bug report, and trying to figure out a work-around.

    #tech #software #Scheme #Schemacs #SchemeLang #R7RS #Lisp #GuileScheme #GaucheScheme

  4. The challenge of writing portable Scheme code is that every implementation has myriad little idiosyncrasies. Today I discovered the #MITScheme tries to read #Emacs -style file header comments (for example ;; -*- encoding: utf-8 -*-) and this can cause the reader to crash for some reason. I am not sure if it is a bug or a feature, but it did throw me off for a whole day while I tried to figure out why MIT Scheme wouldn’t compile a library file.

    I also happen to be hung-up on a bug in #Guile 3.0.11. It seems to me like the optimizer is emitting bad code, because I get a SEGFAULT on an expression that #Gauche has no trouble executing. I am still working on a bug report, and trying to figure out a work-around.

    #tech #software #Scheme #Schemacs #SchemeLang #R7RS #Lisp #GuileScheme #GaucheScheme

  5. #Schemacs update

    I 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 GtkLayout container (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 main program 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 main Git 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

  6. Why rewriting Emacs is hard,” by @kana

    Yes 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 0x3FFFFFF rather than the Unicode standard range from 0x0 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

  7. Why rewriting Emacs is hard,” by @kana

    Yes 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 0x3FFFFFF rather than the Unicode standard range from 0x0 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

  8. Why rewriting Emacs is hard,” by @kana

    Yes 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 0x3FFFFFF rather than the Unicode standard range from 0x0 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

  9. Why rewriting Emacs is hard,” by @kana

    Yes 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 0x3FFFFFF rather than the Unicode standard range from 0x0 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