social.coop is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Fediverse instance for people interested in cooperative and collective projects. If you are interested in joining our community, please apply at https://join.social.coop/registration-form.html.

Administered by:

Server stats:

506
active users

#scheme

20 posts16 participants5 posts today

Today I learned that Racket and Guile represent syntax objects for lists differently.

I don't know yet which one I prefer, because in Guile `syntax` not always returns a syntax-object as one could expect, sometimes it returns a list.

(use-modules (system syntax))
(syntax? (syntax (+ 3 4))) ;; => #f
(syntax? (syntax hi)) ;; => #t

On the other hand TSPL4 book says that #'(+ 3 4) returns a valid list.

Who read RnRS? What does it say for this case?

GNU Guix: Revolutionizing Software Deployment with Functional Package Management

GNU Guix is an innovative package manager and operating system that rethinks software deployment by adopting a purely functional approach. Unlike traditional package managers, Guix manages software in a way that guarantees reproducibility, transactional upgrades, and precise dependency tracking.

Read More: machaddr.substack.com/p/gnu-gu

Continued thread

ALSØ also, you may note that I'm violating my "tabs not spaces" preference here, but that's for C, Java, Python, etc. I'd like to use tabs in Scheme but indentation runs out of control if you do that. I go back and forth and currently I'm on "spaces in Scheme".

The LISP religious fanatics (Erik Naggum rot in Hell (doesn't exist)) who threaten your life if you don't indent like they do are wrong, but something like that style is useful.
#lisp #scheme

Four days ago was the 10th anniversary of my first video uploaded to youtube: a video tutorial for the humanoid robot pose editor that I developed in #Guile #Scheme

It's a shame that this project didn't end up going anywhere, but it was fun

(also, I don't know what's with the account, but it's not where my youtube channel currently is)

youtu.be/G4QVE6JjmO0

youtu.be- YouTubeEnjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
Replied in thread

Are you a Lisper? If yes, What made #lisp special in your view?

@lxsameer a few things:

  • absolute minimum amount of syntax, makes it very easy to understand how the computer sees each part of the program, makes it easy to implement your own parser if you want to.
  • the ability to define your own evaluator for Lisp syntax, also made considerably easier than other languages due to the minimal syntax. This also makes it easy to develop your own tooling, or to modify existing tooling for the language, which brings me to the next point…
  • macro programming: the ability to hack the Lisp compiler itself so that it can run your own evaluator. This allows you to introduce language features when and where you need them, like linting, type checking, literate programming, alternative evaluation strategies (e.g. lazy evaluation, or concurrent evaluation), etc.
  • functional programming: it is based on the mathematics of lambda calculus, which is a very elegant way of defining algorithms and computation. It is also a computer for the “untyped lambda calculus“ which can implement any other typed lambda calculus as a system of macros.
  • homoiconicity, again a feature of the minimal syntax, allows you to express programs as data, and data as programs. This is very useful for serialization and transport across multiple computers.
  • REPL-based development, which is a feature many languages have nowadays (although Lisp invented this feature), allows for rapid prototyping and easier debugging.
  • stability: Lisp languages like Common Lisp and Scheme have changed very little throughout the decades as there is no need to change them. Macro programming makes it so that you don’t need too add new language features all the time, language features become extensions you can import into your project.

🔴 On today's Crafter Hours stream, we'll be preparing our Guile website project for deployment via Guix!

The goal will be to produce a working server configuration running in a local container that packages the site and hosts it as a Shepherd service behind an nginx reverse proxy.

We're getting close to having a staging deployment online!

Join us here:

- youtube.com/live/G4mnWTcQFWY
- twitch.tv/SystemCrafters

youtube.comBefore you continue to YouTube
Replied in thread

@ksaj
% ls -l
-rw-r--r-- 1 mdh staff 1729 Feb 18 18:56 hello.class
-rw-r--r-- 1 mdh staff 272 Feb 18 18:56 hello.scm
% ls -l /usr/local/share/kawa/lib/kawa.jar
-rw-r--r-- 1 mdh admin 3332103 Feb 18 17:14 /usr/local/share/kawa/lib/kawa.jar

Plus whatever the JVM is these days. It should be possible to unzip kawa.jar, put my stuff in, and ship a single jar file. On Mac, you can just double-click jars and they run.

I'm gonna add it to my #Scheme module examples.
mdhughes.tech/scheme/

scheme-brained-hare-simply-scheme
Mark writes · Scheme - Mark writes
More from mdhughes
Continued thread

Compiling!

% cat hello.scm
;; hello.scm
;; -*- coding: utf-8 -*-

(module-name <hello>)
(module-compile-options main: #t)

(let* ( (args (command-line))
(name (cond
((<= (length args) 1) "World" )
(else (cadr args) )
))
)
(format #t "Hello, ~A!~%" name)
)

% kawa -C hello.scm
(compiling hello.scm to hello)
# the classpath is ugly:
% java -cp /usr/local/share/kawa/lib/kawa.jar:. hello
Mark
Hello, Mark!

Uuuuuuugh. I thought I'd get a current (2020) version of Kawa Scheme running.
gnu.org/software/kawa/Source-d

There's two compile errors in current Java. Fixed one by adding
import kawa.lang.Record;
The other by deleting Sequence<Char> from a file, because I know that generic types are stupid and do nothing.

make check mostly works, but then errors on some XML shit I can't care about.

Launcher script `kawa` errors, readlink doesn't take -f arg in MacOS.

% kawa
#|kawa:1|# (display (+ 2 3))
5
#scheme

www.gnu.orgKawa: Installing and using the source distribution