mastodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance, open to everyone, but mainly English and French speaking.

Administered by:

Server stats:

815
active users

#macros

2 posts2 participants0 posts today
Continued thread

Deuxième post de Sensai25 :
"En suite #bureautique, on a rien et énormément de développements rapides reposent sur les #macros #Excel ou du #VB et si on quitte se monde là on sort des rails et du support à grande échelle.

Et les #StarOffice et #LibreOffice ne sont pas au niveau."

Ma réponse :
Je n'ai pas eu l'occasion de tester, mais il y a à présent #Python sur LibreOffice pour faire des macros :
help.libreoffice.org/latest/en

Et comme on peut aussi en faire sur Excel, c'est une fenêtre intéressante à étudier pour se former et migrer en douceur !

J'ai découvert ça il y a peu, et il y a là, je pense, une belle opportunité à saisir pour changer les choses.

4/4

help.libreoffice.orgPython : Programming with Python

My small overview of "JRM’s Syntax-rules Primer for the Merely Eccentric" paper about Scheme macros and useful tricks for writing them. Difficulty: medium-easy.

mpv youtu.be/A2vi3vQ15kM

Paper:
- phyast.pitt.edu/~micheles/synt
- hipster.home.xs4all.nl/lib/sch

Spoiler: at the end of the paper a minimal scheme evaluator implemented purely with macros.

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

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?

We use scalasql at work (yes, I'd recommend) and we had a bug where we mistakenly created nested transactions (which scalasql doesn't support -- but it does support savepoints).

Anyway, we found a clever way to statically prevent nesting transactions using macros, which I thought I'd share as an illustration of the helpfulness of macros
gist.github.com/aboisvert/c716

GistIllustration of using Scala macro to statically prevent nested transactions using the scalasql libraryIllustration of using Scala macro to statically prevent nested transactions using the scalasql library - preventNestedTransaction.scala