photog.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A place for your photos and banter. Photog first is our motto Please refer to the site rules before posting.

Administered by:

Server stats:

253
active users

#functionalprogramming

0 posts0 participants0 posts today

#ReleaseWednesday — Extracted & extended the LISP-like DSL from an existing #ThingUmbrella example[1] as new small package for better/direct re-use in other projects:

thi.ng/lispy

The core language is kept intentionally minimal, aimed at simple sandboxed data transformations/derivations, small code snippets/expressions in GUIs or config settings. However, the language is very easy to extend/customize with new functions or control flow constructs etc. Currently, the language is interpreted and has the following builtins (see screenshots). There's no macro support so far (and not sure if that's even desired here)...

[1] The original #HowToThing example browser REPL this was extracted from (and which has now been updated to use the new package):

demo.thi.ng/umbrella/lispy-rep

#ThingUmbrella #Lisp #DSL #FunctionalProgramming #REPL

#programming #gamedev #devlog #commonLisp #series #lazyEvaluation #functionalprogramming screwlisp.small-web.org/lispga #lispgamejam
Since cl-series generates native common lisp code by working at macro expansion time, I consider it suitable for my software individuals (who want only clos-less common lisp and their own logic (which they have an introspective theory of).

In particular, I use series to cut out rectangular subsequence of sequences -s

SERIES DOC UPDATE FROM RTOY gitlab.common-lisp.net/rtoy/cl

Progress on my clone of the Emacs Lisp interpreter

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

Codeberg.orgDefine new monadic lexer library (gypsum lexer)closes #8 There are two reason to rewrite the reader: 1. The current reader does not track source locations, so error messages do not point you to where they occur 2. The current reader relies on the Guile-specific regular expression library, and this is not portable. This patch defines a ne...
#tech#software#FOSS

F* (fstar) Interactive Tutorial:

fstar-lang.org/tutorial/

I'm only like 10% into the tutorial, but this language is CRAZY (fun)! :awesome: 😄

I try to learn the fundamentals of it, so I can use the backend of it in #Aeneas... so I can ultimately formally verify my #Rust crate (former attempts with #Creusot and #Kani failed for me).

Aeneas:
github.com/AeneasVerif/aeneas

See part two of toot for a toy example of proving function equivalence

1/2

fstar-lang.orgF* Tutorial

Just published a longform article on parallel collectors in Java Streams.

✅ Covers correctness, performance, pitfalls
🛠 Custom collectors with CONCURRENT semantics
🔬 JMH benchmark

TL;DR: .parallelStream() is not a magic wand.

svenruppert.com/2025/04/08/syn

Sven Ruppert · Synchronous in Chaos: How Parallel Collectors Bring Order to Java Streams
More from Sven Ruppert

Category theory using Haskell (An introduction with Moggi and Yoneda). ~ Shuichi Yukita. books.google.com/books?id=4Xc2 #CategoryTheory #Math #Haskell #FunctionalProgramming

Google BooksCategory Theory Using HaskellThis unique book offers an introductory course on category theory, which became a working language in algebraic geometry and number theory in the 1950s and began to spread to logic and computer science soon after it was created. Offering excellent use of helpful examples in Haskell, the work covers (among other things) concepts of functors, natural transformations, monads, adjoints, universality, category equivalence, and many others. The main goal is to understand the Yoneda lemma, which can be used to reverse-engineer the implementation of a function. Later chapters offer more insights into computer science, including computation with output, nondeterministic computation, and continuation passing. Topics and features: Contains rigorous mathematical arguments to support the theory Provides numerous Haskell code-implementing examples Engages with plentiful diagram chasing, with special emphasis on the design patterns for constructing a large diagram out of basic small pieces Offers insights into category theory to quantum computing and the foundation of computing discipline Serves as a preparatory course for monoidal categories and higher categories The work will be useful to undergraduate students in computer science who have enough background in college mathematics such as linear algebra and basics in Haskell polymorphic functions. Further, it will appeal to graduate students and researchers in computing disciplines who want to newly acquire serious knowledge of category theory.