fosstodon.org is one of the many independent Mastodon servers you can use to participate in the fediverse.
Fosstodon is an invite only Mastodon instance that is open to those who are interested in technology; particularly free & open source software. If you wish to join, contact us for an invite.

Administered by:

Server stats:

10K
active users

#macros

2 posts2 participants0 posts today

"Nutrition Optimizer" (AKA "macros.cheap") is a timely math macronutrient cost optimizer, based on the cost of food at the Aldi chain. Macronutrients are different categories of food such as protein, carbs, and fat. This app will be especially handy after everybody is poor from all the tariffs. The generated diet is pretty basic and I'm not sure that many people would want to do it on a long term basis.

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

In older versions of GNU Emacs you could create a keyboard macro C-x ( type-type-type C-x ), execute it C-x e, and generate the elisp for it, by M-x insert-kbd-macro.

For example in Emacs 27.1 creating a simple macro typing "ABBA" and inserting it gives me:

(setq last-kbd-macro
   "ABBA")

Evaluating the form gives me that macro back on C-x e.

This seems to have changed in never versions, when I try the same in Emacs 31.0.50 compiled from source today (27c41d026f7) the code generated is:

(setq last-kbd-macro
   (kmacro "A B B A"))

but when I evaluate that I get the value shown in *Messages* as:

#[256 "\301\242\302^[^\\305\300^B\306#\210\301^L\240*\207" [[65 66 66 65] (0) "%d" kmacro-counter-format-start kmacro-counter execute-kbd-macro kmacro-loop-setup-function] 5 kmacro]

and when try to execute the macro, I get this error:

Keyboard macros must be strings or vectors

The value of last-kbd-macro is:

#f(kmacro "A B B A")

Shouldn't this workflow still work??

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.

🦀 **What Are Macros in Rust?**

Macros in Rust—your shortcut to clean, powerful, and reusable code!

Whether you're tackling procedural or declarative macros, Rust gives you the tools to extend the language itself. But what makes them so useful? 💡

In this second #DevBytes post, I break down what macros are, how they work, and why they're such a big deal in Rust. Perfect for Rustaceans and curious devs alike.

🔗 Check it out here: smsk.dev/2025/03/01/what-is-ma

⬇️ What’s your go-to use for macros?
📌 #RustLang #Macros #Programming #DevBytes

devsimsek's Blog · What is Macros in Rust? - devsimsek's Blog
More from devsimsek

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))) ;; =>
(syntax? (syntax hi)) ;; =>

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

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