Masthash

#Scheme

Andrew Tropin
18 hours ago

Me, trying to explain how guile-nrepl utilizes guile-fibers for asyncronous interruptible evaluation.

BTW, I've commited and pushed all the recent local changes. It's not ready for everyday usage, but If you are curious and want to try it out type `make server` and use an nrepl client of your choice (monroe or rail for example).

https://git.sr.ht/~abcdw/guile-nrepl
https://github.com/Sasanidas/Rail

#guile #scheme #lisp #guix #emacs #rde

A sequence diagram of Evaluation Supervisor and explain it to me meme on the right.
Andrew Tropin
20 hours ago

Post about rde on lobste.rs, got a link to it in personal messages, IDK how to use it, so I will just share it :)

https://lobste.rs/s/xswrjc/rde_tools_for_managing_reproducible

#rde #guix #guile #scheme #lisp #emacs

Andrew Tropin
2 days ago

Is it Modern Scheme REPL?
- Interruptible evaluation in remote Scheme process? ✔
- Immediately seeing stdout and stderr of remotely evaluated expression? ✔
- Readable exception messages? ✔

A couple things still bother me:
- How to intercept access to stdin (current-input-port)? Need to make custom ports?
- Evaluation happens in a fresh thread every time: 1. constantly creating new threads is not optimal 2. it doesn't allow to invoke previously saved continuation.

#guile #scheme #lisp #emacs

Screenshot of Emacs with Scheme code in the left buffer and result of evaluation of each expression in thi right.
Andrew Tropin
2 days ago

5 Concurrency Patterns for Guile Scheme I extracted during my recent work on asyncronous system for guile-nrepl.

https://youtu.be/gNpeA64Qno8
https://trop.in/stream

#guile #scheme #fibers #ml #ocaml

NDTV
2 days ago

Congress leader Rahul Gandhi on Monday travelled by a train from Chhattisgarh's Bilaspur district, where he addressed an event, to state capital Raipur and interacted with passengers on board.
#RahulGandhi #Scheme
https://www.ndtv.com/india-news/rahul-gandhi-travels-in-train-after-launching-scheme-in-chhattisgarh-4422890

Lisp & Scheme Weekly
3 days ago

Lisp & Scheme recap for week 38/2023

https://discu.eu/weekly/lisp/2023/38/

#clojure #lisp #programming #racket #scheme

Get RSS feeds and support this bot with the premium plan: https://discu.eu/premium

~robby
3 days ago
Does anyone know of any software written for Gambit Scheme? It seems surprising to me how nice of a system it seems to be (very mature compiler, C interop (seems like a relatively decent system too), very nice REPL...) for how little it seems to be used outside of academia.

#scheme #lisp

Keynote: Delimited Continuations, Demystified by Alexis King | Lambda Da...
#scheme has been very prompt on adopting research work
Apparently it just didnt care about those adoptions being adopted
I mean the first thing I stumbled at after learning about curry Howard correspondence upon googling long long ago , was haskell monads and a terrible book #lyah , also i wasnt very serious about #learntocode thing , before i could figure out the economic incubation of my own labor , didnt start lime that.
That aside , despite trying #emacs in a whim to get away from browser in 2014 ( long after that ) first thing i stumbled at was #pubshell
again no #functionalprogramming , while ema s started to replace nearly everything i used till then , for a long time i saw #elisp as an easy to use config lang with a huge relative value preposition some functions, some calls and a compile env (based on gcc? ( as it was a program?) and a bit of #git ( again no orgit till then .. i was using org-publish though , but without #cd , again not into devops and yes broken org-emacs was an issue then, besides reproducility issues 1 and i present eve now, which helped in seeing #nix primarily as a config language with types, functions and options . It took me a year till i focused on creating my own serious symlinks with home.file . which took me to focus on flakes , modules and nix the language, till then it was more a config language for #nixos (I was not alone and nor fully wrong 2 which fascinated me with its build options also at that time i started to dabble into #ohw and was trying to free myself of commercial stuff since 2014
, then it was time to care about my representation on #socialmedia and integrity of the ab\use of my identity thanks to #cambridgeanalytica and #netflix , as it neared the real life experiences , thanks to the local socio economics and i saw nix as to #selfhost my infra. Dabbling into #typetheory #prooftheory bits of #haskell and #agda is still on ..lets see , where it all goes ( if anywhere at all).
Summary = i ve been more a plt guy than a pl guy per se.

Upside As, I write this I am working to get my emacs config to load some of my nix paths. :meta #introduction post, this also changes , how is see #nixpkgs sets
what next[experimental ] also try to to do it with dotfiles instead of dotconfig dir 3 , although i prefer home.file and I guess , I ll for my own reasons notes - * src = builtins.filterSource(path: type: type != "directory" || baseNameOf path != ".svn")./source-dir;Thus, the first argument e1 must be a predicate function that is called for each regular file, directory or symlink in the source tree e2. If the function returns true, the file is copied to the Nix store, otherwise it is omitted. The function is called with two arguments. The first is the full path of the file. The second is a string that identifies the type of the file, which is either "regular", "directory", "symlink" or "unknown" (for other kinds of files such as device nodes or fifos — but note that those cannot be copied to the Nix store, so if the predicate returns true for them, the copy will fail). If you exclude a directory, the entire corresponding subtree of e2 will be excluded.4When an interpolated string evaluates to a path, the path is first copied into the Nix store and the resulting string is the store path of the newly created store object.

For instance, evaluating "${./foo.txt}" will cause foo.txt in the current directory to be copied into the Nix store and result in the string "/nix/store/-foo.txt".

Note that the Nix language assumes that all input files will remain unchanged while evaluating a Nix expression. For example, assume you used a file path in an interpolated string during a nix repl session. Later in the same session, after having changed the file contents, evaluating the interpolated string with the file path again might not return a new store path, since Nix might not re-read the file contents. 5
criticism , feedback, hat tips welcome

https://youtube.com/watch?v=TE48LsgVlIU&si=nGO2i1NPPLLeXbMZ

Simon Forman
4 days ago

I've been in the computer programming game for about thirty-five years, FWIW, and my considered opinion is that we should have all just used #Lisp.

Programming languages are video games for smarties. There is no good reason to use anything other than Lisp.

(I'm not even a Lisp programmer. I wrote a #Scheme program last month and that's about it.)

dave
4 days ago

The Autumn Lisp Game Jam starts on October 20th. Get ready! #lisp #scheme #gamedev https://itch.io/jam/autumn-lisp-game-jam-2023

blake shaw
4 days ago
Andrew Tropin
6 days ago

Some really interesting way for sharing values between home services with monads:
https://git.sr.ht/~krevedkokun/dotfiles/tree/master/item/config/modules/home/wm.scm#L65

#guix #guile #scheme

Andrew Tropin
6 days ago

Did you know that you can follow sourcehut repos via RSS?

This is how 30 hours of my work on guile-nrepl this week looks like:
https://git.sr.ht/~abcdw/guile-nrepl/log/master/rss.xml

https://git.sr.ht/~abcdw/guile-nrepl/

#rss #lisp #guile #scheme #clojure

Konrad Hinsen
6 days ago

@ramin_hal9001 There's a #Scheme implemented in #CommonLisp: https://gitlab.com/mbabich/airship-scheme/. I haven't tried it, but maybe that's for you.

I am a bit surprised to hear that ECL works well with C++, as C++ interop was the main motivation for Clasp (https://github.com/clasp-developers/clasp), which is a #CommonLisp implementation on top of #LLVM.

Papers We Love
6 days ago

Learning some insights about Typed Racket at Amal Ahmed’s talk at #strangeloop

https://pwlconf.org/2023/amal-ahmed/

#racket #scheme

~robby
1 week ago

Here is another example, this time demonstrating single and multiple inheritance. student and worker both extend person. student-worker extends both student and worker.

(define make-person
  (lambda (name age)
    (let-values (((name new-name) (call/cc (lambda (k) (values name k))))
                 ((age new-age) (call/cc (lambda (k) (values age k)))))
      (let ((get-name (lambda () name))
            (get-age (lambda () age))
            (age-year (lambda () (new-age (+ age 1) new-age))))
        (values get-name
                get-age
                age-year)))))

; extend person
(define make-student
  (lambda (name age school)
    (let-values (((get-name get-age age-year) (make-person name age)) ; super constructor
                 ((school new-school) (call/cc (lambda (k) (values school k)))))
      (let ((get-school (lambda () school))
            (transfer-schools (lambda (school) (new-school school new-school))))
        (values get-name
                get-age
                age-year
                get-school
                transfer-schools)))))

; extend person
(define make-worker
  (lambda (name age occupation employer)
    (let-values (((get-name get-age age-year) (make-person name age)) ; super constructor
                 ((occupation new-occupation) (call/cc (lambda (k) (values occupation k))))
                 ((employer new-employer) (call/cc (lambda (k) (values employer k)))))
      (let ((get-occupation (lambda () occupation))
            (change-occupation (lambda (occupation) (new-occupation occupation new-occupation)))
            (get-employer (lambda () employer))
            (change-employer (lambda (employer) (new-employer employer new-employer))))
        (values get-name
                get-age
                age-year
                get-occupation
                change-occupation
                change-employer)))))

; extend both student and worker
(define make-student-worker
  (lambda (name age school occupation employer)
    (let-values (((get-name get-age age-year get-school transfer-school)
                  (make-student name age school)) ; super constructor
                 ((_get-name _get-age _age-year get-occupation change-occupation change-employer)
                  (make-worker name age occupation employer))) ; super constructor; ignore overloaded procedures
      (values get-name
              get-age
              age-year
              get-school
              transfer-school
              get-occupation
              change-occupation
              change-employer))))

One flaw here with the multiple inheritance is that the state that is extended from the root common parent is not reflected in both immediate parents (student and worker). This would be an issue if, for example, the return value of get-occupation was depended on the value of get-age. When age-year is applied to a student-worker here, it only increments the age of the student object, but not the worker. This can be solved by writing a procedure for student-worker that will keep both synchronized.

(define make-student-worker
  (lambda (name age school occupation employer)
    (let-values (((s:get-name s:get-age s:age-year get-school transfer-school)
                  (make-student name age school)) ; super constructor
                 ((w:get-name w:get-age w:age-year get-occupation change-occupation change-employer)
                  (make-worker name age occupation employer))) ; super constructor
      (let ((get-name s:get-name) ; or w:get-name
	    (get-age s:get-age) ;or w:get-age
	    (age-year (lambda () (s:age-year) (w:age-year))))
        (values get-name
                get-age
                age-year
                get-school
                transfer-school
                get-occupation
                change-occupation
                change-employer)))))

An interesting thing about this is that it’s not possible to apply a method to an object that does not support it, because the object is entirely hidden by the “method” by being inside the closure.

Another interesting thing about this is that an object that extends another object can actually have fewer public methods than the parent object, because every procedure must be explicitly returned. If, for example, I did not want the student-worker to be able to transfer schools, I could just not return the transfer-school procedure. Otherwise it would retain the behavior of a student object, like get-school.

#Scheme #Lisp #Programming #OOP

~robby
1 week ago

So I feel like I just discovered something pretty fundamental about Scheme and continuations ???

I’m not sure exactly what I uncovered but this is neat. It’s basically OOP but instead of mutating the state of the object, I just return a bunch of procedures to interface with the “new” object. The old procedures exist if you would like to back track your “mutations” and reference a previous state of the object.

(define make-person
  (lambda (name age occupation)
    (let-values (((name new-name) (call/cc (lambda (k) (values name k))))
		 ((age new-age) (call/cc (lambda (k) (values age k))))
		 ((occupation new-occupation) (call/cc (lambda (k) (values occupation k)))))
      (let ((get-name (lambda () name))
	    (get-age (lambda () age))
	    (age-year (lambda () (new-age (+ age 1) new-age)))
	    (get-occupation (lambda () occupation))
	    (change-occupation (lambda (new) (new-occupation new new-occupation))))
	(values get-name get-age age-year get-occupation change-occupation)))))

Example usage

scheme@(guile-user)> make-person
$47 = #<procedure make-person (name age occupation)>
scheme@(guile-user)> (make-person "Robby" 24 "Software Engineer")
$48 = #<procedure get-name ()>
$49 = #<procedure get-age ()>
$50 = #<procedure age-year ()>
$51 = #<procedure get-occupation ()>
$52 = #<procedure change-occupation (new)>
scheme@(guile-user)> ($48) ; Show the initial state of the object
$53 = "Robby"
scheme@(guile-user)> ($49)
$54 = 24
scheme@(guile-user)> ($51)
$55 = "Software Engineer"
scheme@(guile-user)> ($50) ; "Mutate" the object by aging a year
$56 = #<procedure get-name ()>
$57 = #<procedure get-age ()>
$58 = #<procedure age-year ()>
$59 = #<procedure get-occupation ()>
$60 = #<procedure change-occupation (new)>
scheme@(guile-user)> ($56)
$61 = "Robby"
scheme@(guile-user)> ($57) ; New state is accessible with new procedure
$62 = 25
scheme@(guile-user)> ($59)
$63 = "Software Engineer"
scheme@(guile-user)> ($60 "Potato Farmer") ; Mutate the state with arguments
$64 = #<procedure get-name ()>
$65 = #<procedure get-age ()>
$66 = #<procedure age-year ()>
$67 = #<procedure get-occupation ()>
$68 = #<procedure change-occupation (new)>
scheme@(guile-user)> ($65) ; 
$69 = 25
scheme@(guile-user)> ($67) ; New state is accessible on top of the previous state change (aging)
$70 = "Potato Farmer"
scheme@(guile-user)> ($49) ; Old state is still accessible by using the previous procedures.
$71 = 24

#Scheme #Lisp #Programming

blake shaw
1 week ago

@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.

blake shaw
1 week ago

#GCC size: 343Mb*
#Rust size: 1Gb
#GHC size: 1.4Gb
#Clang size: 1.7Gb

#Chez #Scheme size: 5mb

[ * ] all based on the results of using #guix size, removing common and documentation-based dependencies such as ncurses, bash, and zlib

blake shaw
1 week ago

Lawvere's Conceptual #Mathematics. Friedman's The Little Schemer. These two books provide playful approach to their subject matter, toying with camp while stealthily introducing the reader to advanced concepts that they will only later in their journey recognize (#topos theory for CM, #compilers for TLS).

I consider them to be truly masterful & singular pedagogic demonstrations. What other works fit into this category?

#scheme #categorytheory

blake shaw
1 week ago

#bitsyntax: a binary pattern matcher inspired by #Erlang's (which is an incredible feature that every language should consider implementing) for #racket

https://docs.racket-lang.org/bitsyntax/index.html#(part._.Pattern-matching_bit_strings)

#scheme #lisp #poke

blake shaw
1 week ago

wreckto-verso: experiments with the #verse calculus in #minikanren from Will Byrd

(here using #chez #scheme)
https://github.com/webyrd/wreckto-verseo

Lisp & Scheme Weekly
1 week ago

Lisp & Scheme recap for week 37/2023

https://discu.eu/weekly/lisp/2023/37/

#clojure #lisp #programming #racket #scheme

Get RSS feeds and support this bot with the premium plan: https://discu.eu/premium

Andrew Tropin
1 week ago

One more reason why it's hard to use alists as associative data structure: There is no built-in destructuring capabilities for it. It seems (ice-9 match) is no help here. Situation becomes even worse if we have a nested data structure.

Going to stack a bunch of let+assoc-ref's I guess.

#scheme #lisp #guile #clojure

The code on the screenshot:
(match `((state . ("hello"))
         (message . "here"))
  ((('message . message)
    ('state . state))
   message))

and it yelds match-error.
Andrew Tropin
2 weeks ago

Launching containers using shepherd, it's like docker-compose for your project, but on steroids!

https://github.com/BIMSBbioinfo/swineherd

Kudos for this cool work to rekado.

#guix #shepherd #guile #scheme #lips #docker

blake shaw
2 weeks ago

I really hope Daphne Preston-Kendal comes to replace John Cowan on the #scheme steering committee. She's really nice to listen to, seems cool and comes from a similarly transdisciplinary background as John's, and it's time to break up the boy's club.
https://www.youtube.com/watch?v=y8qaitWSDW0

Fabio Natali
2 weeks ago

> Sometimes you would like to evaluate code that comes from an untrusted party. The safest way to do this is to buy a new computer, evaluate the code on that computer, then throw the machine away. [0]

I love it! <3 :) #lol #guile #scheme

- [0] https://www.gnu.org/software/guile/manual/html_node/Sandboxed-Evaluation.html

Andrew Tropin
2 weeks ago

Guix and RDE on unixporn:

https://www.reddit.com/r/unixporn/comments/16ea0kh/dwlguile_elegant_weapons_for_a_morecivilized_age/

:guix: :emacs: :wayland: :lisp:

Kudos to screenshot author and rde co-maintainer: @migalmoreno

dwl-guile and dtoa-guile authors: @engstrand and Fredrik Engstrand

and thousands of people bringing all that beatiful software to us.

#guix #rde #guile #scheme #lisp #emacs

A screenshot of dwl-guile environment. Emacs window, terminal with ufetch, nyxt browser and bmenu.
blake shaw
2 weeks ago

I think #Agda is by far the nicest purely at the language level (I'd probably consider Agda the prettiest language after Scheme), but 2gb is a lot of space, especially for someone like me that has lots of large 3D scene files, with massive textures, and am constantly making space on my laptop. #Coq is smaller then Lean, but a lot of OCaml also bleeds through, which is a great language, but not the most elegant, and I'm just trying to grill.

#Idris is really great and the one I've spent the most time with; I was even split between diving deep into either Idris or #Scheme a few years ago and chose the latter, as Edwin Brady's book is one of the best general introductions to FP I have read. But what I'm ultimately interested in exploring is Lean's hygienic macro system, and I'm overall really digging the lispyness hiding within Lean's mixfix notation

Lisp & Scheme Weekly
2 weeks ago

Lisp & Scheme recap for week 36/2023

https://discu.eu/weekly/lisp/2023/36/

#clojure #lisp #programming #racket #scheme

Get RSS feeds and support this bot with the premium plan: https://discu.eu/premium

Andrew Tropin
2 weeks ago

I've sent "Bringing Joy to Scheme Programming" talk proposal to EmacsConf 2023.

The Call for Participation deadline is on Friday, don't miss it if you want to give a talk:
https://emacsconf.org/2023/cfp/

#emacs #lisp #scheme #clojure #nrepl

Andrew Tropin
2 weeks ago

We develop rde on sourcehut, but there is a mirror on github and recently I realized that it has 185 stars already:
https://github.com/abcdw/rde

How many it is?

Do you know other small to medium sized projects, which only mirrors on github?

#guix #rde #lisp #scheme #guile

Fabio Natali
3 weeks ago

Announcement 🥁🥁🥁​

New #London #Guix #meetup scheduled for Monday 25th September, from 6pm. More info and registrations here:

https://mobilizon.fr/events/552977a1-3398-47bf-a7c1-ee5afee211d9

See you there! 🎉​

#FreeSoftware #Guile #Scheme

(((o))) Acoustic Mirror
3 weeks ago

Those of you who remember the #Fluxus #livecoding environment might be interested to know that part of its DNA lives on in @thentrythis's (flx) WebGL 3D Game Engine:

"A fully featured browser based game engine used for FoAM Kernow projects such as our Butterfly hunting citizen science games, Viruscraft, Penelope tablet weaving livecoding system and the Royal Society Summer exhibition Malaria games."

https://gitlab.com/then-try-this/flx

#LiveCoding #Scheme #OpenGL

blake shaw
3 weeks ago

@mcc this-is-something-i-appreciate-about #scheme

Andrew Tropin
3 weeks ago

A talk on guix and rde for @SeaGL conference is approved!

#guix #rde #lisp #scheme

Screenshot of email with acceptance of the talk.
C.
3 weeks ago

And people say open-source software is unapproachable and difficult for the average user!

(Yes, expecting them to write Lisp-like code is "simple" according to the Gnu IMP documentation...)

#OpenSource #FreeSoftware #GIMP #documentation #UI #easy #simple #lisp #scheme #BatchMode

A screenshot from documentation for the Gnu IMP software.  In a section headed "A simple example", a block of Lisp-like code is shown, and the text below starts with "This simple script...".

Needless to say, virtually no regular user will have a clue about this code.  Heck, most programmers won't.
pancake :verified:
3 weeks ago

Bintracker: "A #Chiptune Audio Workstation for the 21st Century" . And it's obviusly written in #Scheme! <3 https://bintracker.org/

David Wilson
4 weeks ago

🔴 Today on #SystemCrafters Live, we'll learn how to use Guile Hall, Guix and Emacs to develop new Guile Scheme libraries! With these tools you can scaffold new projects with everything you need to start hacking.

As an experiment, we'll use them to prototype a simple URL route handling library!

Join us on YouTube or Twitch:

- https://youtube.com/live/o-keXs2Uh7w
- https://twitch.tv/SystemCrafters
- https://systemcrafters.net/live-streams/september-1-2023/

🕐 in your time zone: https://time.is/compare/1800_in_Athens

#gnu #guile #guix #emacs #scheme #freesoftware

David Jones
1 month ago

7 is too many revisions for a Scheme report. Isn't it ironic that Scheme is at 7 and CLTL is at 2?
#Scheme #Lisp

Andrew Tropin
1 month ago

Found a nice talk on concurrency. It has a very brief comparison of different concurrency models, like Erlang's Actors, Hoare's CSP, Go's goroutines, Clojure's core.async, Concurrent ML (aka Fibers in Guile).

Primary focus on Concurrent ML (but examples are in Scheme with type annotations ><).

https://youtu.be/pf4VbP5q3P0

#go #golang #clojure #lisp #guile #scheme #ocaml #concurrency #erlang

Tim McNamara
1 month ago

A neat book on designing a compiler for Racket scheme starting from raw x86 https://www.students.cs.ubc.ca/~cs-411/2022w2/chp1_book_top.html #compilers #racket #scheme

Kailee ♾️
2 months ago

3. Section 241 of Title 18 of US Code (deprivation of rights).
The Justice Department and court precedents under Section 241.

As we write:

"Conspiracies to prevent the proper counting of ballots in federal elections ... are within the heartland of Section 241 prosecutions."

United States v. Mosley, the U.S. Supreme Court upheld the indictment of officers of a county election board who conspired to omit certain ballots from the vote count.

(Those facts sound familiar?)

Justice Oliver Wendell Holmes, wrote this about Section 241.👇

Those facts should sound familiar.

Because criminal defendant trump's premeditated plan to try to "stop the count" of ballots fits like a hand in glove with that and other Section 241 prosecutions.

Outline the factual chronology in depth in our article.

https://www.justsecurity.org/87435/an-overlooked-january-6-charge-the-stop-the-count-scheme/

#TheBigLie #scheme #felonies

🧵

Kailee ♾️
2 months ago

Experts, have focused on false electors, DOJ pressure, Pence pressure, and Capitol attack.
But there was a #scheme that preceded all these, and #DoJ can charge it. The scheme was the effort to "stop the count" on election night.

2. Donald Trump was told he would lose by his campaign before the election, he knew early counts would show him leading, he knew he would falsely claim victory before the votes were counted to spread his lies & incite his followers.

3. In a recording of Steve Bannon speaking to a group from China makes it clear that Trump had every intention of installing himself as dictator & subvert the will of the voters.

Listen to the plan, the #conspiracy to defraud the United States and it's citizens. #TheBigLie

Listen to the plan, the #conspiracy to defraud the United States and it's citizens. #TheBigLie
nmeum
2 months ago

I am currently experimenting with #Guix for building a reproducible evaluation environment for an upcoming paper, and must say that I am really happy with Guix for this purpose. It's a huge improvement over my previous setups, which were mostly based on awful Docker images. Also, if you know a thing or two about #Scheme, it's a lot of fun to use!

Andrew Tropin
2 months ago

A bunch of links to cool Scheme projects:
https://github.com/schemedoc/awesome-scheme

#scheme #lisp

#Guix succeeds because #Scheme is, in my opinion, a better DSL and language than this weird, not very well documented, #Haskell-like derivative #nix
https://news.ycombinator.com/item?id=27369960

David Wilson
2 months ago

Damn, this is pretty cool, and kinda similar to what I want to do with Mesche:

https://github.com/racket/zuo

#scheme #racket

cel7t
3 months ago

What makes the #Guix System so cool is that almost all of it is just #Scheme code. This opens up a LOT of possibilities, like for example quickly writing a web interface for package-management.
You can see this idea in action in guix.el, which lets you manage all your Guix packages through a powerful #Emacs interface.

screwtape
3 months ago

In ~1hr, 000UTC
#lisp y #oldComputerChallenge #gopher show.
Gopher news:
@logout is updating the bongusta phlog aggregator !
Old computers:
Phlogs ( @gemlog s, wlogs) on https:/occ.deadnet.se
I have been excited to read gopher://booji.mutated.net 's Sun Sparc Ultra 10 so far!
In #fediverse / #lisp news, @jackdaniel the #EmbeddableCommonLisp current developer on (optimize size)ing #ecl
What I want to see now is
#ecl packages exposed to @cwebber #SpritelyGoblins #Guile #scheme as #c & #wasm

Part of @prahou@Merveilles.town 's Welcome To The Fediverse

I have quite a lot more followers than I did when I first wrote my introduction, so it’s only fair that I’m writing a new one, bump up the major version.

#introduction #intro #introductions

Hi! o/

I am Ștefan (ș as sh, I also accept Stephan or the equivalent in your language). I’m 21 years old, ♑, he/him, proud #leftist and soon to graduate CS @ UVABc. Sort of proudly living in #romania. My native language is Romanian, fairly proficient at English, slowly learning #finnish (and #italian).

Tried a lot of programming languages in my childhood up until now, a non-chronological list of ones that stuck with me for one reason or another being: VB6 (that’s what I started on at 8 years old), #pascal (+ #freepascal and #delphi), #perl (+ #raku), #tcl #tcltk, #lisp (usually #scheme, on a good day #elisp #emacslisp and #commonlisp), #elixir, #php, #forth, #lua, #oberon, #modula-2, #cpp #c++, #ocaml, #fsharp, #smalltalk (+ #squeak #pharo #self), #ada, #powershell, #dart, #matlab, #rlang, #zig, #nim, #cobol and #julia. I don’t claim full proficiency in all of these, but I’m familiar enough with these (+ some others not mentioned here) that I could get along just fine with 2 weeks at most of studying and looking through cookbooks and examples). I’m flexible in learning new languages and technologies if needed.

I also do #sudoku and #math for fun (especially functional equations and number theory problems, sometimes calculus and geometric algebra). I am interested in #linguists, #conlangs (#lojban and #esperanto) and #nlp, contemporary (post-‘45, usually post-‘89 for me) history, #balkan history, lower-level stuff (I like to learn about how tools around me work, I’m most interested in #compilers, #emulators and #microcontrollers), #typography and #latex, #linux + #bsd, #msdos, #amiga, #oberon, #plan9, #philosophy, #astronomy (especially in a worldbuilding context) and #philosophy, along with other less notable interests.

I engage in #politics relatively often irl, although I’m not inserting it in absolutely every scenario in my life. As I mentioned, I’m a #leftist and #progressive (or… um… #woke) (Nazis and fascists can have a merry fuck off, DNI with me). I am also a spiritual person, a #deist (if you really want to put it that way, an agnostic, although it’s not quite true) and I find #astrology and #tarot interesting (I’ll let you guess my moon and ascendant, let’s see how close you are).

With that being said, I hope I’m welcome here, you can pick your subset of things that interest you from this list, you have plenty of options. :P Quite a bit longer than last time, but oh well…

Number three: #lisp. This is spicy enough, so:

  1. Lisp syntax is painful (and the classical Lots of Irritating Small Parentheses stab). For those who don’t know (and why I put this at #0), what other languages might write as 5*a+3 is (+ (* 5 a) 3). However, in spite of the fact that it may look initially a little funny to the unaccustomed, there are some sound technical reasons why Lisp syntax exists:
    • Easy to teach: grouping of operators and associativity is obvious. 5 * a + 3 is (+ (* 5 a) 3), while 5 * (a + 3) is (* 5 (+ a 3));
    • Easy to parse: you don’t have to bend the language to understand your new function, everything works the same;
    • Maps nicely to an underlying data structure: Lisp is a living and breathing AST. Having this syntax makes macros possible. When you teach someone about macros, it’s obvious what the internal representation of a Lisp expression is because it looks just like Lisp program data. You can thus fit Lisp to anything you want. Lisp programmers focus on the content, Lisp haters focus on the parentheses.
  2. Lisp is old. No? There are modern dialects of Lisp such as #Clojure, #Racket and the myriad of R{5,6,7}RS #scheme implementations. We’re still going strong, thank you. If anything else, #AutoCAD is still a thing and that has AutoLISP, so it definitely lives on.

  3. Lisp is slow. I have actually heard this from a teacher live (along with the Lots of Irritating Small Parentheses stab). I asked them when was the last time they’ve tried Lisp. He tried it 30 years ago. Before doing his PhD in #Haskell 98 (which was fresh in #Romania, nobody has heard of it, I still have great respect for him). When all datatypes are appropriately declared, a typical commercial (and even some non-commercial) Lisp compilers produce native machine code on par with C++. It was true back when Lisp ran on the IBM 704 because they could barely handle the GC, but over times the compilers improved a lot. To equate 1960s (or even 1980s) Lisps to modern Lisp compilers is like claiming C is slow because the only time you’ve tried it is with a C compiler on the PDP-11.

  4. Lisp is big. First of all, I find this really funny because Scheme (a branch of the Lisp family) is minimalist yet powerful in its nature. This myth started around the 1980s when Lisp was indeed big (because it packed a lot of useful functionality and there was a limit to how small that functionality could be made). Lisp vendors noticed that and nowadays Lisp is one of the few programming languages in recent years that has not been allowed to grow in size by leaps and bounds with every release. At this point, this point is (excuse my Chinese) fucking bullshit, people are happily running Electron-apps and they don’t care at all about resource usages because they’re all running the latest and greatest hardware anyway. Languages are getting more and more bloated (ahemc++ahem) and so Lisp actually ends up looking like a compact alternative.

  5. Lisp has no arrays. This is also BS, we’ve had an array datatype for at least 30 years. Even though the Lis of Lisp is from, shocking, List, it doesn’t mean that it’s the only data type. Lisp offers powerful support for single and multi-dimensional arrays, arrays of varying element type, and array access that provides transparent access to fixed size arrays, arrays displaced to other arrays, and arrays whose size is expected to dynamically grow and shrink.

  6. Lisp has no compiler. It… does? Since its earliest days Lisp implementations have been variously interpreted or compiled, and often both. Much important work in the theory of program compilation has been done using Lisp and so Lisp benefited from that. All modern Lisps have a compiler (and also a REPL which allows for interactive debugging, thank us for that and much more at the end of this post).

  7. Lisp is not standard. Let me present ANSI X3.226/1994 (first ANSI standard for any OO language btw) and RnRS (5 <= n <= 7 nowadays). The Common Lisp HyperSpec (CLHS) is a webbed adaptation of the ANSI Common Lisp standard made by LispWorks, heavily cross-indexed with a lot of indices.

  8. Lisp doesn’t talk to other programs… Um, most serious Lisp dialects and implementations definitely have FFI, most even have easy access to TCP, CORBA, COM, databases etc. This is a really weird point that I’ve actually heard, people think Lisp is isolated from everything.

  9. Lisp GC is slow. It may have been true in the past when computers could barely handle GC, but a lot of progress has been made since then and it’s now on par with other popular GC languages.

Lisp haters should give Lisp more credit. It pioneered a lot of features that people take for granted such as REPLs (which are trivial in Lisp, literally (loop (print (eval (read)))) (in Lisp-ish pseudocode), GC with mark-and-sweep, AST as a tree structure, if (yes, not even FORTRAN had conditionals), a function type, recursion, programs composed of expressions, a symbol type, a notation for code using trees of symbols and constants, and the concept of having the whole language there all the time. What I mean by the last point is that there’s no real distinction between read-time, compile-time, and runtime. You can compile or run code while reading, read or run code while compiling, and read or compile code at runtime). This lets you reprogram Lisp’s syntax; running code at compile-time is the basis of macros; compiling at runtime is the basis of Lisp’s use as an extension language in programs like Emacs; and reading at runtime enables programs to communicate using s-expressions, an idea reinvented as XML.

Lisp is pretty nifty after all, huh?

Jeko
3 months ago

Writing some Guile code yesterday. Got stuck on an exception…

foo is a list of strings, like '("183" "43,5" "3,1E-06")

(map locale-string->inexact foo) threw the following :

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Invalid read access of chars of wide string: "183"

🤷‍♂️

#guile #scheme #help

Andrew Tropin
3 months ago

Recordings for Bobkonf 2023 are finally published:
https://bobkonf.de/2023/en/program.html

There are at least a few talks I want to watch (in no particular order):
- WebAssembly for the rest of us by @wingo.
- Re-thinking Modules for the Web by @codehag.
- Writing Powerful Macros in #Scheme by Marc Nieper-Wißkirchen.
- Cloud, done the #nix way (+ #unison) by Julian Arni.
- Structuring effectful programs by @kosmikus.
- VCS in the age of distributed computing by @nuempe.

#nixos #haskell #lisp

bitzero
3 months ago

@daviwil Alas, no lisp family member gets the admiration it deserves
#lisp #scheme

cel7t
3 months ago

Guile Scheme really needs something like https://clojuredocs.org, or at least something like the Common Lisp HyperSpec.
As of now grepping through the Guile source is the most efficient way to understand functions/macros you don't know, which is definitely NOT beginner-friendly.
#guile #scheme #lisp #gnu

David Wilson
3 months ago

🔴 Today on #SystemCrafters Live, we'll experiment with writing a true graphical installation UI for GNU Guix using Guile Scheme and GTK!

We probably won't make it very far, but I want to try to prove that it can be done!

Join us on YouTube or Twitch:

- https://youtube.com/live/TuBy-0DmS4E
- https://twitch.tv/SystemCrafters
- https://systemcrafters.net/live-streams/june-30-2023/

🕐 in your time zone: https://time.is/compare/1800_in_Athens

#gnu #guix #guile #scheme #gtk #freesoftware

blake shaw
3 months ago

#Haskell: Safety First
#Scheme: Safety Third

@daviwil @eli_oat @xgqt "And they always taught me you can only have this with Common Lisp"... 😃

Very hard not to desert to planet #Scheme after I realized that.

does anyone know of some small and nice guile (or other schemes, but preferrably guile) codebases powering little webapps (in the spirit of todo lists, blogging, stores selling stickers)?

would be much appreciated for research and learning :)

#gnu #guile #scheme

Andrew Tropin
3 months ago

@mianmoreno made a thread on real-world rde configurations examples. Don't hesitate to press reply to thread button and share your.

There is a config by authors of dwl-guile and a few more quite interesting ones.

https://lists.sr.ht/~abcdw/rde-devel/patches/42034

#rde #guix #guile #scheme #lisp

Paolo Amoroso
3 months ago

@mdhughes

👆 Bo-tato shared their experience with using Lisp for the Protohackers network programming challenge. As a new Lisp user their post is interesting because it's a fair analysys of the language and the dialects they tried: Common Lisp, Clojure, Emacs Lisp, and Racket.

#lisp #scheme

blake shaw
4 months ago

A Realtek RTL8139 wifi driver written in #r6rs #scheme for the #loko kernel & operating system

Loko's concurrency is based on #Guile's Fibers implementation of ConcurrentML.

https://gitlab.com/weinholt/loko/-/raw/master/drivers/net/rtl8139.sls