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. I am starting to become very annoyed with #Guile Scheme because they are so far behind in providing some very important modern SRFIs.

    Of course I could implement these myself and submit a patch, but in the mean time I would have to wait for my patch to be accepted and distributed in the next Guile version. And while I waited I would have to just implement these SRFIs in my own source code for myself. I don’t have time, so I always end up just implementing the APIs that I need for my own project, usually as a wrapper around some other Guile API that does provide that functionality but in a non-standard way.

    For the past two years or so I have kept on running into issues caused by the fact that Guile does not provide SRFI-125 (hash tables) and SRFI-128 (comparators). Guile provides SRFI-69 (the old hash tables) but it doesn’t use comparators, and so the semantics for things like make-hash-table and alist->hash-table in Guile are not compatible with most other R7RS-compliant Scheme implementations. I keep having to go back and update various cond-expand statements to get around this. Some data structures are so fundamental to modern software that you just can’t do without them. Providing these SRFIs should really be a priority.

    Also the following would be really nice to have in Guile, like really soon:

    • SRFI-160: homogeneous numerical vectors, Guile only provides the older version of it, SRFI-4.
    • SRFI-170: POSIX API: Guile provides all of these APIs but not always in a way that follows SRFI-170.
    • SRFI-180: JSON, Guile provides all of these APIs but not fully compatible with SRFI-180.
    • SRFI-181: Custom ports, Guile provides similar features built-in but not in a way that follows SRFI-181.

    #tech #software #Lisp #SchemeLang #Scheme #R7RS #GuileScheme #FunctionalProgramming

  6. #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