[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: 1752952725161317.jpg (250 KB, 1600x1150)
250 KB
250 KB JPG
>Lisp is a family of programming languages with a long history and a distinctive parenthesized prefix notation. There are many dialects of Lisp, including Common Lisp, Scheme, Clojure and Elisp.

>Emacs is an extensible, customizable, self-documenting free/libre text editor and computing environment, with a Lisp interpreter at its core.

>Emacs Resources
https://gnu.org/s/emacs
https://github.com/emacs-tw/awesome-emacs
https://github.com/systemcrafters/crafted-emacs

>Learning Emacs
C-h t (Interactive Tutorial)
https://emacs-config-generator.fly.dev
https://systemcrafters.net/emacs-from-scratch
http://xahlee.info/emacs
https://emacs.tv

>Browse imageboards in Emacs Org-Mode
https://github.com/eNotchy/4g

>Emacs Distros
https://github.com/caisah/emacs.dz

>Elisp
Docs: C-h f [function] C-h v [variable] C-h k [keybinding] C-h m [mode] M-x ielm [REPL]
https://gnu.org/s/emacs/manual/eintr.html
https://gnu.org/s/emacs/manual/elisp.html
https://github.com/emacs-tw/awesome-elisp

>Common Lisp
https://lispcookbook.github.io/cl-cookbook
https://cs.cmu.edu/~dst/LispBook
https://gigamonkeys.com/book
https://lisp-docs.github.io/
https://awesome-cl.com

>Scheme
https://scheme.org
https://standards.scheme.org
https://go.scheme.org/awesome
https://research.scheme.org/lambda-papers

>Clojure
https://clojure.org
https://tryclojure.org
https://clojure-doc.org
https://clojure.land
https://www.clojure-toolbox.com
https://mooc.fi/courses/2014/clojure
https://jafingerhut.github.io/cheatsheet/clojuredocs/cheatsheet-tiptip-cdocs-summary.html

>Other
https://github.com/dundalek/awesome-lisp-languages

>Guix
https://guix.gnu.org
https://nonguix.org
https://systemcrafters.net/craft-your-system-with-guix
https://futurile.net/resources/guix
https://github.com/franzos/awesome-guix

>SICP/HtDP
https://web.mit.edu/6.001/6.037/sicp.pdf
https://htdp.org

>More Lisp Resources
https://lisp.nexus
https://rentry.org/lispresources

(set! prev-bread (quote >>108159024))
>>
>>108297737
Why does sly autocompletion with corfu suck? :/
Makes it hard for me to learn CL
>>
>>108297737
>lisp alien
>cute green lisp girl
now this is an s-expression
>>
>>108298566
What's wrong with it??
>>
>>108298618
Is being pro-tentacle rape (with pregnancy) part of the Lisp standard?
>>
>>108298727
For some reason it defaulted to having orderless completion and was just showing junk, so I had to override it with
(add-to-list 'completion-category-overrides
'(sly-completion (styles basic)))

which fixed that. Now I just wish it would have icons in the completion and return packages, but that's minor. I assume packages aren't getting autocompleted because the convention is to use uninterned symbols for package names for whatever reason?
>>
>>108298851
If the package is loaded it should auto-complete regardless of how it was read in the defpackage. But I don't use sly, slime is fine.
>>
File: cap_sly-corfu.png.png (393 KB, 1524x1008)
393 KB
393 KB PNG
>>108298566
Here's how it looks for me. My completion-category-overrides looks like this, but it set that up itself. I didn't manually configure it.
'((sly-completion (styles sly--external-completion)))


My sly config:
(use-package sly
:ensure t
:defer t
:config
(let ((patterns '(("\\*sly-mrepl"
(display-buffer-in-side-window)
(side . bottom)
(slot . 0)
(window-height . 18))
("\\*sly-db"
(display-buffer-in-side-window)
(side . bottom)
(slot . 1))
("\\*sly-inspector"
(display-buffer-in-side-window)
(side . right)
(slot . 1)
(window-width . 80))
("\\*sly-description"
(display-buffer-in-side-window)
(side . right)
(slot . 0)
(window-width . 80)))))
(cl-loop for p in patterns
do (add-to-list 'display-buffer-alist p)))
(setopt inferior-lisp-program "/usr/bin/sbcl"))


For corfu icons, I have this:
(use-package nerd-icons-corfu
:ensure t
:after corfu
:config
(add-to-list 'corfu-margin-formatters #'nerd-icons-corfu-formatter))
>>
>>108297737
Anyone here on team square brackets? I love not pressing down shift.
>>
>>108299654
I only use them when writing Clojure for their intended purpose in that language. If I'm writing Racket or Scheme, I mostly stick to ( ) even though I know I'm allowed to slip in [ ] for readability if I felt like it.
>>
Bump
>>
qrd on why lisp is the only language with a consistent /g/ general?
>>
>>108300908
Shit's good, and really fun.
Besides, emacs and lisp autists are dedicated. There's a reason they've survived almost 50 years of 'progress'. The language is incredibly adaptable and can be molded into whatever the fucking you want to do.
>>
>>108300908
a few of us care enough to keep it alive
>>
File: ewm-showcase.png (1.24 MB, 3200x1800)
1.24 MB
1.24 MB PNG
Interesting
https://codeberg.org/ezemtsov/ewm
>>
>>108297737
who's the artist on this! why isn't there more lisp fan art? I reversed image search it but only get the avatar. we need more based dr Conrad Barski out there.
https://www.youtube.com/watch?v=HM1Zb3xmvMc
>>
File: 1752352147990900.gif (1.82 MB, 498x393)
1.82 MB
1.82 MB GIF
>>108277328
>>108284933
>Checking something related to autocompletion of let/let* scoped variables in emacs.
It's not as comprehensive as your solution but I imagined using backward-up-list and form-at-point to recursively match each enclosing let until a base case is reached
(defun collect-lets ()
(pcase (up-list-form)
('() '())
(`(let ,vars . ,body) (append vars (collect-lets)))
(_ (collect-lets))))

(defun up-list-form ()
(let ((last (point)))
(condition-case nil
(goto-char (scan-lists last -1 1))
(error nil))
(if (= (point) last)
'()
(form-at-point))))


For example with this sexp
(defun f (w)
(let ((x 1))
(let ((y 2)
(z 3))
(+ w x y z))))

collect-lets gives one of these lists for autocomplete
((y 2) (z 3) (x 1))
((x 1))
>>
>>108302102
>vibe coded
DOA
>>
>>108302882
werks on my machine
>>
>>108303135
will it work for another 40 years thoughbeit
>>
>>108302102
> wayland
> rust-analyzer
There’s no point
>>
How to make paredit work in evil.
No extra packages needed.
;; Many paredit navigation commands won't work without this!
(setq evil-move-beyond-eol t)

;; Integrate paredit navigation commands in a vi style.
(evil-define-key '(normal visual) paredit-mode-map
;; paredit function overriden evil function
;; ---------------- -----------------------
")" #'paredit-forward ; evil-forward-sentence-begin
"(" #'paredit-backward ; evil-backward-sentence-begin
"]" #'paredit-forward-down ; evil-forward-section-begin
"[" #'paredit-backward-down ; evil-backward-section-begin
"}" #'paredit-forward-up ; evil-forward-paragraph
"{" #'paredit-backward-up ; evil-backward-paragraph
)
>>
>>108298907
When I'm defining a package, the packages after :use don't auto-complete. Also, in the repl, my package name(and its members) doesn't auto-complete until the ::
>>108298913
Huh, that's exactly what I'm looking for. I changed my config to match yours but it still doesn't look right. I'm assuming Doom is fucking with something.
>>
>>108304956
I'm not super-familiar with doom, but I think it has its own take on use-package called use-package! with an exclamation point.
https://github.com/doomemacs/doomemacs/blob/master/docs/getting_started.org#configuring-packages

Maybe someone more familiar with doom can chime in or maybe you can ask in a place where doom users hang out.
>>
File: gnu_color.png (18 KB, 298x276)
18 KB
18 KB PNG
For those of you who have used evil mode in the past, or who currently use it, give me your honest opinion.
Are Vim motions really that good and worth it?
I ask as a vim user of years, although I've never used very complex Vim commands. Mostly just the basic motions (apart from the obvious hjkl), like [number]j or [number]k to go down or up to a specific line, dw, d$, di(, di[, di{, and all that basic stuff.
But I've been wondering on something, and this actually broadens the question outside of only a Vim motions question:
I've been thinking on starting from zero. Starting from vanilla Emacs, because I've used Doom only for like, a year, maybe, and recently got back to Neovim for like the last month or so. But I'm curious for vanilla Emacs. I feel the "itch" to try to use vanilla Emacs, as I feel like I'm not actually, seriously part of the club by using Doom Emacs.
But yeah, more seriously now, I've heard Doom Emacs is just great and cohesive, so I don't really know if it'd be worth it to leave it.
>>
>>108306332
I wrote this very poorly. I feel like I should rephrase. It's basically two questions that could have been two separate replies/posts:
1. Are Vim motions really worth it or are Emacs key bindings as good or even better?
2. Is it worth the time and effort to try to use vanilla, when I am somewhat used to Doom?
>>
>>108306332
Just because you're using evil doesn't mean the vanilla motions aren't there. I use evil and vi-style motions, but I also use some vanilla Emacs motions too. For example, I've taken a liking to C-<up> and C-<down>. It's not an either-or thing. You can often use both at the same time.

I can use vanilla bindings if I have to these days, but I'm a lot faster with vi-style bindings, because I used vim for so long before I used Emacs.
>>
>>108306354
>2. Is it worth the time and effort to try to use vanilla, when I am somewhat used to Doom?
I used Spacemacs for a long time before I eventually outgrew it and started my own config. With that said, I don't regret my time using Spacemacs, and my own config has a lot of Spacemacs-like behavior baked into it. I also learned a lot of Elisp while using Spacemacs, and I disagree with the sentiment that some people have that using a curated Emacs config is an impediment to learning Elisp. The way I see it, I go to look at how an expert Elisp programmer likes to do things and follow his example for a little bit, before I struck out on my own.
>>
>>108298913
This looks so good anon, what's the font? Are you using LSP-mode or Eglot? Because that completion looks aesthetic
>>
>>108306332
Long time Evil user. Haven't used default Emacs keybinds so I can't compare, but Evil is often a pain to use and doesn't quite work properly with other modes. That said, I don't think I could ever work without Vim keys, especially some of the cusom stuff I have like https://github.com/emacs-evil/evil-surround.

Though one thing I will say is your choice of keyboard might make a difference. I've recently switched to a 36-key board with home row modifiers, and it makes typing chorded keys (Ctrl, Alt, Shift, etc.) easier. If you have a keyboard like this, the default Emacs bindings might not be so bad.

If I'm being brutally honest, I think much of the featureset of Emacs has become quite outdated and I imagine I will eventually switch to another editor. When I look at the parts I actually use, they are all external tools (LSP, GDB, tree-sitter) so Emacs isn't really giving me that much. By contrast, the poor performance, lack of default Vim keys, and general agedness of the codebase causes me a fair few issues and makes it a generally bad platform for those other tools.
>>
>>108306657
I think it's Corfu mode with popupinfo enabled.
>>
>>108306804
>>108306423
>>108306404
Thanks for the input, anons.

>By contrast, the poor performance, lack of default Vim keys, and general agedness of the codebase
Yeah I've also thought about this. These are the same reasons I moved to neovim in the last two or three months. I've even thought about just trying vscode for some weeks and focus on other stuff. But you know, there's always something that makes me feel curious about Emacs. If it was just "modern" so to speak, there wouldn't be anything that comes close to it.
>>
>>108306657
>This looks so good anon, what's the font?
Maple Mono
https://github.com/subframe7536/maple-font

>>108306657
>Are you using LSP-mode or Eglot?
In this case, neither.
>>108306829
>I think it's Corfu mode with popupinfo enabled.
Correct.
>>
>>108306829
Here's my corfu setup.
(use-package corfu
:ensure t
:hook (after-init . global-corfu-mode)
:bind (:map corfu-map ("<tab>" . corfu-complete))
:config
(setq tab-always-indent 'complete)
(setq corfu-preview-current nil)
(setq corfu-min-width 20)

(setq corfu-popupinfo-delay '(1.25 . 0.5))
(corfu-popupinfo-mode 1) ; shows documentation after `corfu-popupinfo-delay'

;; Sort by input history (no need to modify `corfu-sort-function').
(with-eval-after-load 'savehist
(corfu-history-mode 1)
(add-to-list 'savehist-additional-variables 'corfu-history)))
>>
File: warhammer.jpg (1.26 MB, 1320x2868)
1.26 MB
1.26 MB JPG
>>108293511
>varhammer
I like the name.
>>
>>108306332
what packages do you use in Doom? just install them in vanilla Emacs, configure them to your liking and you're good to go
>>
>>108307772
holy based
>>
A little Emacs Lisp in CL
https://framagit.org/akater/cl-el/-/blob/master/el.org

What do you guys think about this project?

It is, as far as I know, a reader macro for Common Lisp that give ability to read and evaluate code from Emacs Lisp.

Another interesting thing about this project is that the developer of cl-el (akater) uses orgdev, his version of literate programming with org files.

I only use his app-emacs/portage program that controls gentoo's package manager from within emacs using transient interface a la magit. I asked him to post about cl-el on HN or lobste.rs, but he said his elisp reader isn't so good for wide audience yet. So, here I am with this post on the thread specifically dedicated to lisp.
>>
>>108307772
>>108309832
don't fall for it anons. clearly virus-infested slopware, just look at the guy's account
>>
>vibecoding
>malware
did jeets find out about lisp or something
>>
>>108310429
I tried to think of what functionality from Emacs I'd want in CL, and I thought maybe the rx macro, but I'd want it to emit Perl-compatible regexps instead of Elisp regexps.
>>
>>108310429
I've lamented for a while that there is no well-maintained library for working with org files in Common Lisp. (Libraries exist, but they're old and unmaintained.) However, if cl-el could become mature enough to run the various org related libraries from Elisp, that would be huge.
http://xahlee.info/emacs/emacs/elisp_parse_org_mode.html
CL could go from poor support to top-tier support for org.

This could be huge for CL editor projects.
>>
>>108307029
>neovim
Maybe it's just me, but I really hate TUI stuff. The fact Emacs can display images and have varying font sizes puts it miles ahead of the terminal stuff, for me at least. Writing Org files with the headings all the same size and no latex previews would just not work for me.
>>
So... How do you do testing in your projects? FiveAM?
"t" folder with asserts and shit?
>>
>>108310429
Finding out about emacs batch mode and ability to serve the lisp engine over pipe would kill this guy so don’t tell him
>>
>>108314014
This reminded me that I have not written a single test for the CL code I've written. Since vindarel recommended fiveam in the CL cookbook, that's probably what I'd go with to start. I trust his judgement.
>>
how to make LLM's life easier to edit lisp? they always miss parentesis and cannot get out of this parentesis fix loop

any cli tools for easier editing of lisp than sed (i suspect the LLM CLI tools like Mistral Vibe or OpenCode use sed to edit files)
>>
>>108316323
If you're using an agent I just always tell them to ensure the system loads, so when it completes the file is properly balanced
>>
this general seems a lot slower recently. is it because of the captchas?
>>
>>108317474
i haven't been able to post for a few weeks because my isp got rangebanned
>>
>>108316017
Having a proper REPL and being able to do mini live tests of your code immediately after writing it reduces the need for writing explicit tests considerably. TDD itself can be viewed as compensating for the lack of the tight interactive feedback loop that having a REPL gives.
That said writing some tests is still useful, especially as the project size grows. I'm happy enough with fiveam. I'd use parachute if I needed to specify test dependencies. check-it is there if you need property based testing.
>>
>>108317999
Totally agree. I find I don't write unit tests anymore for my own projects, only big integration tests to make sure the end result is still correct
>>
>>108316017
>>108318047
for libraries and projects with multiple people tests are a MUST. In whatever language.
>>
>>108318546
Eh if you're doing a lot of GUI work a lot of the time tests are just a massive waste of time and add a ton of churn. If you're making a library then yea sure.
>>
>>108318555
Sometimes you want to just hit the button that does the thing, sets up the environment, tries doing the thing and reports back.

Sometimes you want to do that automatically with every version.

The REPL is useful but its not a substitute for tests. Don't even get me started when you have something distributed.
>>
>>108318862
Yeh that's why I said I like having big integration tests. I just don't bother that much with autistic test coverage.
>>
Writing some tiny games in Common Lisp. Wrote my own CFFI bindings for Raylib - surprisingly simple.
It's super entertaining to have a window open, adjust some stuff, and see it update on-the-fly. Motivates me to modularise my code a lot more than I would in C.
>>
File: 1728297184272.jpg (117 KB, 970x824)
117 KB
117 KB JPG
>>108314014
>testing
usecase?
>>
>>108320565
based ebussy
>>
Been using emacs more than 7 years but I don't use corfu. just not my thing.
>>
>>108297737
how do i diagnose emacs using over a gig of memory after leaving it open for a few days? I tried using the memory profiler but i could find anything that looked like it was using that much memory
>>
(defun hitler-appears () 'impossible)
>>
>>108321251
What do you use?
>>
>>108322489
Which version are you using, if it's on Mac then I'm pretty sure it's leaking somewhere. You can also check it'll there are any processes running, sometimes the lsp servers and other shit going on I the background can hog resources. But in my experience it's always lsp processes
>>
>>108314014
>FiveAM
what
>>
>>108322489
Does `malloc-trim' do anything? After I open a lot of PDFs in Emacs the memory bloats up, but malloc-trim does free up a lot of it.
>>
>>108314014
clojure.test
>>
>>108311500
Proofs?
>>
>>108327945
Did you even look at the repo? it ships a binary compiled on the user's machine, ran with virustotal had trojan, user allegedly "fixed" it, but if you look at his account it's a new account with AI garbage pasted everywhere.
Honestly if someone falls for it they deserve it, so nevermind.
>>
File: G58wRGSa0AAIGG8.jpg (1.83 MB, 2048x1367)
1.83 MB
1.83 MB JPG
>>
>>108328039
>trojan
vibecoded trojan? lol
>>
File: look.jpg (47 KB, 439x557)
47 KB
47 KB JPG
>>108302102
Yep
https://codeberg.org/ezemtsov/ewm/src/branch/master/lisp/ewm.el
>>
I found that let's you offload work to CL from Elisp.
https://melpa.org/#/glue
https://git.sr.ht/~hajovonta/glue/tree/master/item/README.org
  (setf my-counter 0)
(glue-sbcl-thread "my-thread"
'(loop for i from 1 to 3 do
(sleep 1)
(eval-in-emacs
`(setf my-counter ,i))))
>>
will sicp get me employed?
>>
>>108333303
As a librarian, yes
>>
There was a flood a few years ago that damaged my favorite library, and it never re-opened.
>>
File: 1767545975417623.jpg (1.08 MB, 1600x1200)
1.08 MB
1.08 MB JPG
>>108333392
This kills the Patchouli.
>>
File: (sicp-rekt).gif (939 KB, 480x270)
939 KB
939 KB GIF
>>108334062
No SICP
No Life
>>
>>108320565
usecase for "usecase"?
>>
To that anon who asked me about fixing the bug in org-transclusion-blocks.el.
wasted 3 hours fixing a bug before I realized I had the ELPA version installed and not the latest from the repo lol, which was the reason for the bug in the first place.

Also the more I deal with org-mode text properties the more I hate them, I've come to realize they're not needed so I'm wiping them all from the package.

https://github.com/gggion/org-transclusion-blocks/commit/391e1a14

This should solve 80% of the problems in the package, but there's still some left-over problems, like transcluding org-id links, which for some reason doesn't support search strings in org-transclusion.el, seems to be a bug in the main package but I'm patching it locally in blocks.el in the meantime while I submit the fix to nobiot.
>>
Funny how agressive SBCL is in optmization by default. Things like
(loop for i in '(-1 0 1) do (/ 1 0)) don't even throw an error.
>>
>>108338233
>(loop for i in '(-1 0 1) do (/ 1 0))
(loop for i in '(-1 0 1) do (/ 1 i))
>>
>>108302102
>(((codeberg)))
>>
>>108338516
at least it's not jeethub.
>>
>>108339266
>>
>>108339407
nothingburger :^)
>>
>>108335667
https://sicp.hexlet.io
>>
File: 1683935026202793.jpg (86 KB, 620x696)
86 KB
86 KB JPG
>>108310429
i think this is really stupid
the point of emacs lisp is that it's tied to emacs the editor, the stuff he hand-waves as "core c functions" includes pretty much... all of emacs. buffers, data structures, stuff around encoding text, the regexp engine, everything
at this point you might as well just take the c core and rewrite all the emacs lisp in common lisp instead (which is also stupid)
>It is, as far as I know, a reader macro for Common Lisp that give ability to read and evaluate code from Emacs Lisp.
as far as i see he's just defining aliases in the "el" namespace, and some placeholder functions, which is pretty much nothing
also putting everything in separate org files also seems to combine all drawbacks of literate programming with none of its strengths, but i guess he's free to do that if he wants to
>>
Will working through SICP make me feel accomplished?
>>
>>108342396
It will probably make you feel stupid.
>>
TIL that you can make info display an entire info manual in one buffer by going to the special node *. Try it with a small manual like `C-h R cl`. Then:
g*

For evil users, it's:
gG*


https://www.gnu.org/software/emacs/manual/html_node/info/Go-to-node.html
>>
On codeberg it shows Guix being written mostly in Scheme. How is that even possible for an OS?
>>
>>108297737
>common lisp loop macro can't sort
:|
>>
>>108344293
Just use the sort function.
https://www.lispworks.com/documentation/HyperSpec/Body/f_sort_.htm
>>
File: 1621259784234.jpg (16 KB, 400x400)
16 KB
16 KB JPG
>>108344158
guix is a package manager, not an OS
more generously you could call it a linux distribution (no, hurd doesn't work as a daily driver and most likely never will)
how is it possible for guix to be written mostly in scheme? the same way how it's possible for emacs to be written mostly in emacs lisp
>>
Trying to contribute to an org mailing list discussion at since I found a solution to a specific bug they're discussing there and it hasn't been addressed for about a year now.

Mailing lists filter me hard, where do I get started on this shit?
>>
>>108346259
Just send your patch (the diff file) in the discussion. You need to be subscribed to the mailing list, otherwise you can't post in it. Be sure you're replying to the mailing list as a whole, and not just to the author of a specific article; in Gnus you need to use the command `gnus-summary-wide-reply' (S w).
>>
>>108297737
What is the auto-help plugin that puts stuff at the bottom of the Emacs window when editing an Elisp file and how can I turn it off?
>>
>>108346771
eldoc-mode
>how can I turn it off
(add-hook 'emacs-lisp-mode-hook
(lambda () (eldoc-mode -1)))

but why would you?
>>
>>108346873
Didn't help. This is what I'm talking about, btw.

>but why would you?
Because it's annoying seeing it flash and change all the time and it's not helpful when I do want help.
>>
File: screen.png (11 KB, 511x42)
11 KB
11 KB PNG
>>108346942
Oops, forgot to attach pic.
>>
>>108346942
>>108346951
Nevermind, I just had to restart Emacs. Thank you!
>>
>>108346974
restarting always works but you could just kill the buffer and open the file again, or disable and enable the mode the hook belongs to
>>
>>108346942
>>108346974
>>108347010
instead of >>108346873, this is the proper solution
(global-eldoc-mode -1)

this way the hook doesn't get polluted by an anonymous function
>>
>>108347010
Yeah, I thought evaluating would be enough, but I guess it didn't overwrite whatever other hooks were attached.
>>
>>108347032
Thanks, this is probably what I wanted.
>>
For all my chicken scheme friends put this in your config file and install polymode
(use-package polymode
:ensure t
:config
(define-hostmode poly-scheme-hostmode :mode 'scheme-mode)
(define-innermode poly-chicken-c-innermode
:mode 'c-mode
:head-matcher "#>"
:tail-matcher "<#"
:fallback-mode 'poly-scheme-hostmode)
(define-polymode poly-chicken-mode
:hostmode 'poly-scheme-hostmode
:innermodes '(poly-chicken-c-innermode)))

;; Apply it to .scm files
(add-to-list 'auto-mode-alist '("\\.scm\\'" . poly-chicken-mode))


Whenever you want to write C code in your chicken files with #> #< it will work nicely.
>>
Why doesnt Eglot show me suggestions for glfw and opengl?
>>
>>108344647
>https://www.lispworks.com/documentation/HyperSpec/Body/f_sort_.htm
Nice
>>
How the fuck do I mix &key and &body in macro definitions in CL??
>>
>>108350550
Add an extra set of parens around the arguments before the body.
>>
Reminder: Prot is giving a talk tomorrow (Thursday)
https://ox.ogeer.org/event/computing-in-freedom-with-gnu-emacs-protesilaos-stavrou
>>
>>108351047
https://time.is/compare/0600PM_12_March_2026_in_London
>>
Gonna try my hand at making a statically typed, no GC lisp. Wish me luck anons. I'm gonna write it in CL, compile down to C. Let's see how it goes. Will probably be unsafe a la C++. Might use square brackets cause no shift.
>>
>>108351709
> SIOD
Check back tomorrow
>>
>>108351709
>Gonna try my hand at making a statically typed, no GC lisp.
that shit ain't a lisp anymore. if you need static typing there are plenty of good languages like pascal or haskell. no gc? compiling to c? i ought to beat your ass like a nigger.
>>
>>108344158
> How is that even possible for an OS?
In the early days, lisp machines inc and symbolics ran OSs that were primarily lisp.
If history worked out in a more idealized way, you’d be asking “How is it even possible for an OS to be written in C?? — doesn’t make any sense!”
>>
>>108351786
But I don't want Pascal or Haskell. I want eval/live programming, homoiconicity, CLOS-like object system, first-class macros, etc. But I'm tired of dealing with GC already, I want small binaries, I want to put my shit on an Arduino. Look at i.e. Carp, that's a Lisp similar to what I have in mind. ECL is Common Lisp and it compiles to C.
>>
>>108351816
sounds like you want to have your cake and eat it too. or rather have the fat log of shit and eat it too. you like eating shit? you pay people to enter their septic tank and marinate in a household of 2-4's waste? that's using c.
>>
>>108351853
Not sure I get your analogy.
>>
>>108351868
you in there smacking your lips on feCes. slurping tapeworms ticking the back of your throat. every dumb nigga thinks they are going to make statically typed gc-less lisp, with m expressions mayhaps? shut the fuck up.
>>
>>108351900
Someone call a psychiatrist on this guy please
>>
>>108347456
Recently wrote a Chicken macro I'm happy with. I know there are eggs that extend the FFI but I wanted to try my hand at understanding things.
>>
>>108352361
Pic related is the second half of the macro. Here is an example use. It does what you expect

Here is example usage. It does what you expect

[include "util.scm"]
[import [chicken blob]]

#>
typedef struct C_Point {
int x;
int y;
} C_Point;
<#

[define-c-record C_Point [(int x) (int y)]]

[let [(p [make-C_Point 5 -9])]
[print [C_Point-x p]]
[print [C_Point-y p]]
[C_Point-x-set! p -22]
[C_Point-y-set! p 32]
[print [C_Point-x p]]
[print [C_Point-y p]]]



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.