[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 / qa] [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


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1726545023176.jpg (21 KB, 696x464)
21 KB
21 KB JPG
(defparameter *other-names* '("(λ) - Lisp General"))

>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

>Learning Emacs
C-h t (Interactive Tutorial)
https://emacs.amodernist.com
https://systemcrafters.net/emacs-from-scratch
https://xahlee.info/emacs

>Emacs Distros
https://www.spacemacs.org
https://doomemacs.org

>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/p3r7/awesome-elisp

>Common Lisp
https://lispcookbook.github.io/cl-cookbook
https://cs.cmu.edu/~dst/LispBook
https://gigamonkeys.com/book
https://lem-project.github.io
https://stumpwm.github.io
https://nyxt-browser.com
https://awesome-cl.com

>Scheme
https://scheme.org
https://try.scheme.org
https://get.scheme.org
https://books.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://www.clojure-toolbox.com
https://mooc.fi/courses/2014/clojure
https://clojure.org/community/resources

>Guix
https://guix.gnu.org
https://gitlab.com/nonguix/nonguix
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://paste.textboard.org/52b08691

(set! prev-thread (quote >>102342930))
>>
Make gaem with CL
>>
me, in the top right
>>
Bros I can't do it. I can't use a lisp other than CL for extended periods. I tried Clojure but I can't do it, I'm going back.
On the surface CL is kinda ugly but the depth and design is so interesting and in a lot of ways beautiful. Its always these ELS talks on CLOS that bring me back to the language.
>>
>>102420855
Let's say I make a gaem with CL. How do I distribute it on Windows and Linux? What about web browsers? Android?
>>
>>102405031
>>102404362
I have a raspberry pi, could that be of use as a file server? I just set this up, would like to sync my ~/Documents folder so both computer uses the same folder, seems a bit confusing to do so.
>>
>>102421331
>windows/Linux
same as any other app? just bundle the dependencies e.g. raylib with the binary
>android
no clue
>web
could use jscl + something like threejs, alternatively ECL compiles to WASM but I got stuck trying to statically link a wasm lib with it (raylib). it's supposed to be possible but after spending like a day I gave up since I'm not even trying to target web, was just for fun and to enter game jams which I can still do anyways.
There's work underway to get SBCL working on web so hopefully that pans out.
>>
>>102420855
Using a Lisp for the scripting and a REPL as the in-game console would be cool AF.
>>
>>102421483
That's what I'm doing for my game. I just omit the parenthesis on the top level sexp (since it's only one line), so if I want to print e.g. an entity's health I just do in the console:
> print (health (get-entity <id>))
>>
>>102421535
Based.
What kind of game is it?
>>
>>102421552
It's like harvest moon, but first person, with directional combat (e.g. chivalry/mount and blade). Right now I'm working on the level editor and integrating a physics library. I had a lot of progress back when I was working on it with Rust but I want to make it in CL instead.
>>
>>102421599
Sounds neat. I should probably slap together an editor for my project too at some point.
>>
>>102421610
Yeah it really depends on your needs... If you're doing a 2d game you probably don't need one, just use something like LDtk and parse the json. For 3D it's a bit trickier... I wanted to use Trenchbroom but it's too autistically designed for Quake-engine compatibility and the maintainer doesn't want to generalize anything. After spending a few weeks working on a fork I decided to just scrap it and make my own since I don't wanna be stuck in C++ and keeping it up to date would be a huge pain anyways.
>>
>>102421535
What Lisp are you using? Guile?
>>
>>102422017
CL. My goal is to make the whole thing in CL, with a bit of FFI for a couple of libraries (raylib for drawing, ODE for physics). I looked at Chez for a bit since it's also pretty performant but CL appealed more to me. Guile would have been cool if I wanted to add a scripting language to an existing engine but that's not really what I'm doing.
>>
>>102420706
You forgot to fill in the subject line.
>>
I didn't realize until today that the same guy who maintains eglot also maintains yasnippet.
https://github.com/joaotavora/yasnippet
https://github.com/joaotavora/eglot
>>
Is there a sort of standard way for me to mark classes as abstract (non-instantiable) in CLOS?
I could just error in a method on MAKE-INSTANCE but that's not very nice. I would imagine the MOP would have something like an ABSTRACT-STANDARD-CLASS metaclass to handle something like this but I can't find an equivalent.
>>
>>102423280
probably the only decent portuguese in over 1000 years
>>
Probably cursed, but have any of you ever tried syncing up M$ Teams calendar with emacs?
>>
>>102425186
i won't let microshart touch my emac inappropriately
>>
>>102421352
when I saw the syncthing post on the previous thread I immediately had the same thought and yes, it works

I'm using an rpi4 as a central server to sync between two of my computers, my phone and a shared folder with my gf. it works really well
>>
>>102422038
>ODE
why ODE and not something like jolt or rapier?
>>
One disappointing thing Lem did was redefine the word "frame". I initially assumed that they used the words "frame" and "window" the same way Emacs did where "frame" means "window on your desktop" and "window" means "pane" using contemporary definitions. However, in Lem, a frame is more like a tab. Now I wonder if Lem can even do multiple desktop windows in the same instance.

Anyway, I came up with these keybindings to leverage muscle memory from web browser keybindings that have to do with tab management.
(define-keys *global-keymap*
("C-N" 'lem/frame-multiplexer:frame-multiplexer-create-with-new-buffer-list)
("C-PageDown" 'lem/frame-multiplexer:frame-multiplexer-next)
("C-PageUp" 'lem/frame-multiplexer:frame-multiplexer-prev))

Ctrl-Shift-T or Ctrl-T might have been more accurate, but I chose Ctrl-Shift-N to create a new frame/tab, because it's easier on my hands on a qwerty layout. Ctrl-PgUp and Ctrl-PgDn go to previous and next frame/tab just like most web browsers.

Lem also has more frame management keybindings off of C-z as the leader, but I haven't rebound those yet. Do `M-x describe-bindings` to see them and many more.
>>
Been working on a simple lil project that is basically a helper for using emacs as an application-maker.
So far am using emacs as a window manager bar, and as a dmenu replacement.
The program is eman -- emacs manager -- and works by managing any number of emacs daemons. It's nothing you couldn't do with a bunch of shell script, but having tried that before it was very awkward and not as comfy to use as a regular cli program with basic autocomplete.
Also have been working on a companion emacs init that is a sort of blank slate to build these simple emacs apps on top of. Turns off all keybindings, makes startup nice and fast, provides basic boilerplate for setting up a single-task-oriented emacs app.
Thought it was a good idea when I was using other note-taking applications and wished they had the instant startup that emacsclient allows me. Specifically it was while I was at a company using Typora as an internal markdown writer for documentation. There's no reason something like that couldn't be emacs, and there's no reason it couldn't be emacs molded to be usable by normies. Hell, they shouldn't even have to know they're using emacs.
The dmenu replacement works particularly well. It's just a stripped down emacs init with vertico configured to run in a full frame. When verico closes, the frame automatically closes as well. What was nice about that one is how quickly I was able to make it (maybe 20 minutes of cobbling things together on top of my blank slate init).

Does anyone else think this is a good idea, or maybe this is something that only suits my use-case? I haven't released the code anywhere, and honestly I think anyone could come up with something equivalent. But I gotta say it's been very comfy being able to use pure emacs to make small stand-alone apps.
>>
>>102427869
>Does anyone else think this is a good idea
I've had similar thoughts of using Emacs as an application platform. Emacs configurations I've thought of include a well-configured SQL client and an offline forum reader. These are just pie-in-the-sky ideas for me. I've taken no practical steps toward realizing any of these, but if I had more free time, ...maybe it would be a fun thing to make.
>>
>>102420706
anyone using lua-mode in emacs? indentation is totally broken and the project has been completely abandoned.
>>
>>102428372
This is a good opportunity to switch to fennel (unless you're working on someone else's lua codebase).
>>
>>102428849
i considered it briefly but i'm not sure. it looks like a meme. i don't actually know lua enough to know if the lua it generates actually does what i want.
>>
>>102421599
Oh I remember you from some generals ago.
>>
>>102424012
As a huehue, can confirm.
Based bacalhau.
>>
>>102429123
fennel is basically just an alternative syntax, it doesn't generate anything crazy.
>>
>>102425186
I hate that I have been thinking about it but don't dare to try it.
>>
How does one get line breaks in org mode's latex math fragments?
I've tried to do
 #+OPTIONS: line-break:t 
and
 #+OPTIONS: tex: \n:t 
but neither seems to work.
>>
>>102426323
>rapier
Sucks, I used it back when I was working in Rust and it's riddled with issues. Maybe it's gotten slightly better now but besides random crashes there are issues like trimesh faces not being flat and having bumps along the seams
>jolt
Jolt is really cool but it's C++. I want a C library cause C++ ffi was a pain in the ass last time I tried. The C "bindings" they have are just a wrapper library created by some Zig guys, no guarantee it'll stay up to date or if it's even feature complete.
>>
File: bashFishClojure.jpg (305 KB, 1080x1434)
305 KB
305 KB JPG
shells are slow
>>
About the modus themes. The guy who made them uses glasses, and after using them for a day I can tell why.
>>
File: Untitled.png (195 KB, 1366x670)
195 KB
195 KB PNG
who's this guy?
>>
Has anyone swapped square brackets with parentheses on their keyboard? Considering it since it'll save me pressing shift, sounds comfortable.
>>
>>102421483
Probably wouldn't even be that hard to retrofit into an existing game. I've heard that Guile can be easily embedded into C programs.
>>
>>102431282
I have to use modifier keys for either, so no point for me.
>>
>>102421535
Nice! Like these Lisp shells.
>>
>>102431282
I went full autism and use Programmer Dvorak. Not sure I'd recommend to other people though, it has its pros and cons.
>>
>>102431344
>>102431396
Yeah I just got the glove80, liking it so far but I'm using the default layout. I've always preferred sticking to defaults cause I'm the type of guy that will waste weeks configuring this shit.
>>
I just finished writing a Python script to watch and upload web project files to the server when they change. I used GPT4 to refactor and document the code. I needed this script so that I can keep my VS Code workflow mostly intact and use Emacs.
I feel like I'm doing so many things right.
>>
File: aweshell.gif (1.32 MB, 562x280)
1.32 MB
1.32 MB GIF
Do you use a Lisp shell like scsh or eshell, anons?
>>
File: file.png (11 KB, 1097x634)
11 KB
11 KB PNG
>>102431482
I use eshell when in emacs.
>>
>>102431413
I went the other way, regular non-ergonomic keyboards but with an ergonomic layout set in software. I figured that this would be more flexible, as I could have my preferred layout even on a laptop, or switch to it on someone else's computer if I'm going to be using it for a longer time. In retrospect, I'm still not sure whether that was the right decision. Programmer Dvorak, with Caps Lock remapped to Control, is genuinely better than QWERTY, but the benefit is about as large as the annoyance I feel when I have to use someone else's computer - either I type slowly, or I have to explain why I want to run a keyboard layout changer off an USB drive (if Windows). In Linux, things recently got worse. On X11, you can change the layout in every single DE/WM with the same setxkbmap command, so I just needed to have that memorized and find a way to bring up a terminal. Wayland doesn't have a standardized command for changing the keyboard layout.
>>
>>102431582
Yeah when I got this keyboard I almost switched to dvorak or colemak since I'd have to re-learn a lot of the layout anyways. Ended up not doing so because I didn't want to be stuck with it and become ass at qwerty when I'm not using this keyboard. Overall I think it was worth it, my finger placement did change but it's mostly the same when I go back to a random laptop keyboard.
>>
When I've closed my *scratch* buffer, how do I get it back? Making a new buffer called *scratch* isn't enough. The original *scratch* buffer doesn't leave a file behind when I close it.
>>
>>102427869
I can't be bothered to find it now, but there's that Reddit post describing how Germany's entire air traffic control system ran inside of Emacs back in the 90s
>>
Is there a good package for working with devcontainers yet? Tramp docker kinda sucks
>>
>>102432549
reopen emacs?

I have a small personal package that creates permanent buffers that auto-save and can't be killed. it's not hard to do, the whole thing is 46 lines. I can post the code if you're interested
>>
(bump-thread (current-thread))
>>
>>102432549
M-x scratch-buffer
>>
>>102432549
You could have just asked Emacs instead of us.
Hit `C-h f` and then type "scratch" and see what completions come up (assuming you have some kind of completion system setup (like https://github.com/minad/consult)).
>>
>>102423441
>Flavours had an option :ABSTRACT-FLAVOUR for DEFFLAVOUR that would do this but the designers of CLOS decided not to adopt it
>>
>>102432549
M-x ielm
(get-buffer-create "*scratch*")
C-x b *scratch*
>>
I've been using org for years and didn't know it had this little feature.
https://orgmode.org/manual/Comment-Lines.html
org-toggle-comment
>>
Is it worth learning emacs? Will it change my life?
Is it that much better of a workflow than 'write code in vim, execute via shell command?
>>
I need help with Org-Roam

I basically installed it and put the generic config in my init.el
>Could not read 'org-id-locations' from ~/.emacs.d/.org-id-locations, setting it to nil
When I "complete" a node
>freezes and I can't even close the application
When I "find" a node (It actually specifically crashes during autocomplete)

I have a super barebones emacs config because I just started using it so I don't think it's any other plugin or anything
>>
File: 1546628520888.gif (1.54 MB, 230x230)
1.54 MB
1.54 MB GIF
>"clj -M -m" consistently runs a bit faster than running the compiled class with Java
Is this normal?
>>
>>102437634
maybe clj starts the jvm with a bunch of flags for enhanced performance?

JVM is a huge black box full of mysterious behaviour for me
>>
>>102436889
to be honest, not really, i only use emacs because i like lisp, otherwise i'd probably be using neovim + cli tools
it does have the advantage of a universal interface for all your tools that you can also edit however you want, but most cli tools seem to have vim-like keybinds for example by default anyways
>>
>>102436889
If you want your editor to change your life you're expecting way too much.
That being said it unironically did for me. E.g. I like being able to compile with hotkeys instead of going to another terminal tab and typing commands/scripts.
It boils down to this: do you want your editor to be the editing environment, or the OS? If you want the editor, then use emacs. If you want to use separate tools that don't really know about each other, go with a shell editor.
>>
I remember hearing about some epub/book reader plugins a while ago, are there any where I can add in my own notes to a book on the page itself? Or maybe create a hyperlink to it or something. That would be cool I think :)
>>
>>102439771
org-noter integrates well with nov.el (the epub reader for emacs) and pdftools, but the notes will be on the side in an org document. I think it's better that way though. Nov.el sets up a frame with a 2 window side-by-side split so that the book is on left and your notes are on the right, and the two sides are synchronized. (The note synchronization works a little better on pdfs than epubs.)
https://melpa.org/#/pdf-tools
https://melpa.org/#/org-pdftools
https://melpa.org/#/org-noter-pdftools
https://melpa.org/#/org-noter
https://melpa.org/#/nov
>>
>>102436889
>Will it change my life?
...only if you take the time to learn Elisp and tailor the editor to your personal needs such that you have a workflow (or multiple workflows) in Emacs that couldn't possibly be replicated in any other environment.
>>
>>102437500
I've used org-roam for years and I've never seen that error about org-id-locations. I did have an .org-id-locations file in the same directory my config is in, and it had contents that looked like:
(("~/Dropbox/org/roam2/20240917020418-recovery_2024_09.org" "00a6c272-f088-42e1-a2c9-1344ac297ec4")
("~/Dropbox/org/roam2/20240908032329-4chan_xt.org" "cd16a47d-ebbb-4b44-ba09-93d859611c19")
("~/Dropbox/org/roam2/20240908030458-bootstrapping_a_new_user.org" "eaa911c5-b580-45b7-9c90-6f3a09053005")
("~/Dropbox/org/roam2/20240616220145-wanikani_api.org" "bddbc57b-7a9a-4924-8466-08f252e5d4b3")
("~/Dropbox/org/roam2/20240531185657-tor_backups.org" "f8d99b46-dd56-4f1d-a214-30a66cc0976d"))

...but longer and unindented. I just abbreviated it for this post. Post your emacs config in a pastebin or something (removing anything that might dox you), and maybe we could debug it.
>>
;; EVIL-MODE
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(inhibit-startup-screen t)
'(package-selected-packages '(org-roam clojure-mode key-chord evil)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
;; adds in ctrl+r functionality
(setq evil-undo-system 'undo-redo)
(require 'evil)
(evil-mode 1)

;; org-roam
(use-package org-roam
:ensure t
:custom
(org-roam-directory (file-truename "custom/dir"))
:bind (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find)
("C-c n g" . org-roam-graph)
("C-c n i" . org-roam-node-insert)
("C-c n c" . org-roam-capture)
;; Dailies
("C-c n j" . org-roam-dailies-capture-today))
:config
;; If you're using a vertical completion framework, you might want a more informative completion interface
(setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
(org-roam-db-autosync-mode)
;; If using org-roam-protocol
(require 'org-roam-protocol))


This is what I'm working with right now. I basically just yanked the generic evil mode and org-roam configs from their github readme. "custom/dir" is a directory I've set up (empty folder)
>>
>>102441684 meant for >>102441284
>>
File: window.20240918095851.png (605 KB, 1958x1380)
605 KB
605 KB PNG
>>102441684
I cleaned up your config a bit by using use-package to declaratively install everything. I also took the liberty of adding evil-collection and which-key, but I didn't change anything in the org-roam configuration, because it worked like it was intended to. The only thing I could think of was maybe you're running an old version of Emacs, but I have no idea why you're getting the errors you were getting. I wish I could have replicated the errors, but I could not.

Try this config, and see how it works for you. I attached a pic of me using it.
https://pastebin.com/pWmPAKd5
>>
>>102441697
Whether you get roam working or not, I feel like the next steps to take for your configuration are figuring out completions. I'd start with consult and then go down the list here in order:
https://github.com/minad/consult?tab=readme-ov-file#recommended-packages
>>
>>102443316
Although the config in the pastebin is not that different from yours, the advantage is that you can take that config to a new system, and it'll bootstrap all the packages it needs on the first run. You don't have to `M-x package-install` manually this way.
>>
>>102437500
Can you unfreeze it if you spam C-g?
>>
>https://sites.google.com/site/steveyegge2/effective-emacs
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1))

Talk me out of it anons. Please. I'm doing it tonight.
>>
>>102444436
>Let's say we want to put a row of 80 hyphens at the very beginning and very end of a long buffer, and you're currently in the middle of the buffer. It's slightly contrived, but I've done it when putting together a "cut here" excerpt containing the buffer contents. Using the keyboard, I'm done in under 3 seconds, ready to move on to the next task. The key sequence I had to type was "C-x t C-u 8 0 - RET C-x e C-u 8 0 -", or 13 key presses.
Anyone else unable to get this to work?
>>
>>102444711
>C-x t C-u 8 0 - RET C-x e C-u 8 0 -

The default bindings for beginning-of-buffer and end-of-buffer are different now.

In 2024, it's:
M-< C-u 80 - RET M-> RET C-u 80 -
>>
>>102445324
Good. I came to the same solution.
>>
>>102436889
Depends on your usage patterns, honestly. If you want something that's available everywhere, and you aren't the kind of person who customizes things, you're probably better off with Vim. If you spend most of your waking hours working on large projects in one language, you may want to use an IDE.
Emacs really shines when you're using it as an environment many tasks and you take the time to learn its Lisp. Then you can apply customizations and use them everywhere: to-do lists, git commit messages, when programming. It's like the Unix enthusiast thing of having a folder of personal scripts, except actually good, because you're not spending half your lines of code on parsing command line arguments, emitting custom text formats, parsing them back in again. You have optional arguments, keyword arguments, you can pass structured data around.
I started using Emacs heavily in back university, to take notes on my laptop. org-mode's features blew away anything available in Vim, so I just started using Emacs with Vim keybindings. Now I use it for many things: personal knowledge base, to-do lists, book notes, etc. It's nice to have one tool that can do everything. You can write a book in org-mode, you can even use it like a Jupyter notebook, for interactive code evaluation. I also love magit, which is one of my favorite interfaces of all time and I haven't seen any git interface that's as good outside of Emacs.
>>
>>102445324
The evil way:
:1 RET O ESC 80 i - ESC :$ RET o ESC 80 i - ESC
>>
>>102446784
>It's like the Unix enthusiast thing of having a folder of personal scripts
Even as an Emacs user, there's a time and place for scripts too. Emacs can interact with Unix-styled scripts that work with stdin/stdout using shell-command-on-region (typically bound to `M-|`). I like doing `C-u M-|` so that the region I highlighted gets piped into the shell command and the result replaces that region in the buffer. Otherwise, it just prints it briefly which isn't as useful.

I also like having shell snippets in org code blocks, so that I can execute them by hitting `C-c C-c`. That's handy sometimes.
>>
i love vim keys but fuck me with evil everything breaks randomly flailing like a retard not knowing if i should be pressing emacs or vim for each buffer. i haven’t tried evil collection. but regular emacs + custom motion bindings for small stuff is not too bad. honestly in actual vim i just use the fucking search to jump everywhere. it feels faster than emacs search for some reason though.
>>
>>102447071
take the meow pill
>>
>>102447071
I just use Vim keys for editing and I switch to the Emacs state for "full screen UI" packages like magit. Can't be bothered to rebind the keys of every big external package.
>>
>>102447134
>Can't be bothered to rebind the keys of every big external package.
It's been done for you already.
https://github.com/emacs-evil/evil-collection
>>
https://github.com/noctuid/evil-guide
>>
>>102447029
Yeah, I know about these bindings. I used to be big into shell scripting when I was younger, but honestly, the more years I program, the more I realize that the Unix way of doing things just sucks. The terrible error reporting that is unfixable without making bash an entirely different language, the lines of code wasted on command line parsing, the lack of proper data types, the inability to pass around structured data between script conveniently, the resulting proliferation of ad-hoc, informally-specified text formats and ad-hoc, bug-ridden parsers for them, all the edge cases around values that start with a dash or contain a newline, I could go on...
Things are so much nicer when you achieve modularity through Lisp functions or Python modules rather than by gluing together small shell scripts. No need to do argument parsing, the arguments are right there for you. No input parsing, because you can just receive arbitrarily complex objects in the arguments. When something bad happens, you get a nice backtrace.
So I've since rewritten my shell scripts into a mix of Elisp commands and Python modules, some of which can be used as scripts. I only use shell scripts for simple launchers/wrappers that are a couple lines long. When I want to reuse one Python script from another, I don't run it as a subprocess, I just import it and call its functions. That way, I only have to think about one boundary with parsing, the rest is done with proper data structures.
>>
File: xah.jpg (7 KB, 220x176)
7 KB
7 KB JPG
emac
>>
>>102443316
>>102443566
Thank you for this. I'm still getting that error (I've found out that it's specifically bricking when I tab complete an item with no other alternative completion) but the config works and I'll try to further format in that way using the use-package stuff
>>
>>102449482
You can usually bring Emacs back from an infinite loop by spamming C-g. If you enable debug-on-quit before triggering the bug, you can usually get a backtrace showing the problem too.
>>
File: Better Than Mine.jpg (45 KB, 923x370)
45 KB
45 KB JPG
I'm on a UK laptop keyboard. This has three significant consequences:
1) I have no second Alt key. My only Alt is to the left of Space Bar.
2) Ctrl on the left is one and a half times the width of any normal key. Ctrl on the right is the same size as a letter.
3) The only extra wide key to the left of the Space Bar is Caps Lock.

Given this, should I just give up and go to Vim? Emacs desperately need Ctrl and Alt.
>>
>>102449724
emacs+evil
>>
>>102449724
try palm press ctrl on the left, otherwise maybe rebind caps to one or the other
>>
>>102449754
How the fuck do you palm press on a laptop? The keys are flatter and thinner than the girls you dream of.
>>
>>102449779
Yeah now that I think about it, it's tough on a laptop. Just rebind caps then.
>>
so i swapped to Guix and learned Scheme alongside it. the one thing that activates autism the most is mixing the punctuation into the syntax. quotation marks are fine but the way backticks, commas, etc. are utilized are so fucking ugly, especially how they fuck with the visualization of indentation. i know they're shorthand but the words they convert to are also ugly as hell. "unquote-splicing", fuck is this shit?
>>
What's the "correct" way to put text into a buffer with a command in lem? only thing I can think of is a whole complicated thing of echoing content to a temp file and then inserting that file into the buffer. filter-buffer replaces the whole thing and pipe-comamnd doesn't put it into the buffer. for example, I want to add a command to slap the current date/time at the cursor from the date shell command.
>>
>>102451068
This worked for me in the REPL.
(in-package :lem-user)
(insert-string (current-point) "foo")

I'm fumbling around in the dark though. I barely know anything about Lem.
>>
>>102449724
I map
>Alt -> Ctrl
>Win -> Alt
>Ctrl -> Win
And I would just do the same on RHS on yours
>AltGr -> R Ctrl
>R Ctrl -> R Alt
Its a single option on X11/Wayland and I am willing to post my registry entry if you're on Windows.
>>
File: 20240919_00h56m48s_grim.png (580 KB, 1920x1044)
580 KB
580 KB PNG
i posted here a week or so ago about making a resume generator in clojure - just wanted to follow up and mention i managed to get the first testing iteration finished ! here's a sample resume generated from a simple toml file that clojure parses and converts into latex
>>
>>102452665
What does the TOML look like?
>>
>>102449724
Press Alt with your thumb. Make Caps Lock act as Control.
>>
>>102452665
>Experience with catching and releasing spiders instead of squishing them
Lmao nice
What's the use case btw? For people who want to use LaTeX so their resume looks nicer, but don't know LaTeX? Or for trying out many templates quickly?
>>
This is probably the dumbest question to ask here but search engines are beyond borked I guess (literally what the fuck) so whatevs
(global-set-key (kbd "C-c z") (compile)) ;; doesn't work
(global-set-key (kbd "C-c z") (lambda () (interactive) (compile))) ;; doesn't work

I literally just want to learn how to rebind a keyboard shortcut to an M-x command. My problem is that both of these don't work because they never accept input. "compile" asks for a command line ish argument to build, but either of these won't let me input anything, it just defaults to make every time
>>
>>102452665
sex
>>
>>102454450
In the first one, you're calling compile when the code to bind the key is executed rather than when the key is pressed; in the second, you're deliberately calling compile with no arguments. Try
(global-set-key (kbd "C-c z") #'compile)
>>
>>102454509
That worked, thanks
>>
>>102427869
So you want to make new ELectron?
>>
https://ergoemacs.github.io/
Based or keyed?
>>
>>102454417
version-controlling a resume was the original use-case, and easily spinning a file thats simple to maintain into a .tex file.

like i love latex but it suffers the same warts as html i think when it comes to needing to go back and edit the content, but not the structure. with this, an entire section cab be removed by just removing it from the toml file.

>>102453876
still struggling with the names for the keys, but currently this is what i have . the section names in the toml can be anything, and that'll be the section name on the resume. similarly the only keys with a restricted list of available values are the "style" and "template" keys, where style defines the structure of the block it appears in, and template defines the resume template being used.
>>
>try org-roam
>make a new node
>later go to access it with find
>new blank node made with the same name instead
Not only that, but I don't actually understand what org-roam does. Is it literally just org-mode and you can add a link to other org files? I think bog standard vim can do that so there must be something that I'm missing or my org-roam is broken, I mean how do you link stuff together if you have two files named the same thing?
>>
>>102455339
Sauce for background pic?
>>
I need to work on a Windows Qt (C++) application. How can I do it from Linux, with Emacs? I need to be able to edit the .ui forms (I'm going to make do without Qt Creator's visual editor, obviously).
>>
>>102447071
Only those who have never been productive in Vim to begin with think Evil is a good replacement at all. It's full of yank.
>>
File: qtbg.png (526 KB, 1920x1080)
526 KB
526 KB PNG
>>102456373
i made it in gimp using a few different lisp-chans
>>
>>102454450
>search engines are beyond borked I guess
Yandex is the only usable one left, if you can tolerate some results being often in Russian
>>
File: file.png (59 KB, 865x453)
59 KB
59 KB PNG
Based. What are we going to do when this man dies?
>>
File: file.png (63 KB, 880x499)
63 KB
63 KB PNG
The core issue here is that we live in a company-centric society, not a people-centric one. The natural conclusion being that capitalism was a huge mistake, and it should be kept in check with some sort of mixed system.
>>
ugh, are there really unironic unix commie FOSScultist faakheads here?
>>
>>102456480
Just use QtCreator, bro.
>>
>>102457525
If I can’t use Emacs I might as well use Windows, since I’m building a Windows application and I have no reason to use Linux if I’m not going to use Emacs.
And if I’m not going to use Emacs for everything, AND I’m using windoze I might as well use VS Code, which is superior for webshit.
>>
>>102455405
>new blank node made with the same name instead
That shouldn't have happened, but if the SQLite db that org-roam uses gets out of sync with what's on the filesystem, it sometimes does happen.
M-x org-roam-db-sync
...and then see if it's fixed.

>I mean how do you link stuff together if you have two files named the same thing?
org-roam links aren't based on name but org-id.
>>
>>102457420
You’re helping build the dildos that will be rammed up your children’s ass (or your future incarnation’s). I can’t fathom being this dumb. All because someone with ulterior motives said “socialism le bad” and you invested your pride and fragile ego in it.
An anti-human human. Stupidity so vile you’d be better off not existing at all. But you do, and you will, in the shithole you’re helping to build.
>>
>>102456574
Thanks!
>>
>>102456551
I was productive in Vim and think that Evil is a good replacement. I just have my modeline change color based on Evil state and I don't get confused. And it's spelled "jank".
>>
>>102456786
suffer
>>
>>102457690
why are you linux users so obsessed with using this exact dick-in-ass metaphor? its really gross.
>anti-human human
im asocial not antisocial, but if there was a button to painlessly turn the majority of humanity that doesn't reach my arbitrary standards to ash i would press it.
>>
>>102457420
hello?
>>
>>102450122
the backticks annoy the fuck out of me for no reason other than they're a pain in the ass on my ergo keyboard and no i'm not going to remap it because guile is the only time i ever need backticks
>>
Creating artificial scarcity for profit is bad in the long run.
>>
wait are there people in this thread who AREN'T commie FOSS cultists? stallman-sama is ashamed by your existence, go use another editor you infidels
>>
File: 1504567103365.jpg (150 KB, 640x852)
150 KB
150 KB JPG
today i am installing guix/emacs/exwm on my thinkpad
>>
>>102455339
>version-controlling a resume
Put it in Markdown and put that in Git. That's all you fucking need.
>>
>>102451406
duh. thanks
>>
In my ~/.config/lem/init.lisp, I have the following sexp:
(setf *print-circle* t)

However, after I start Lem and open up the REPL, the value of *print-circle* is nil. Any idea why that might be?
https://www.lispworks.com/documentation/HyperSpec/Body/v_pr_cir.htm#STprint-circleST
>>
>>102460283
yes but wheres the fun in that, anon ?
>>
In Spacemacs (and I think Doom also), hitting `SPC SPC` is the same as hitting `M-x`. Does anyone know how to replicate that using general.el or even just plain Elisp?
>>
I'm a Haskell guy and I wanted to learn a lisp, mostly to join the cool kids at the Emacs club.
I tried Clojure but I thought it was too brown, way too dissonant from the strong aura of Haskell. Is there another LISP dialect that is functional-oriented?
>>
>>102462484
Scheme, I guess.
Common Lisp if you want, it's multi-paradigm so you can go fully functional if you want. It does have a strong object system as well though.
>>
>>102462484
one of the billions of schemes
clojure is the only one that even comes close to haskell's level of autism
>>
>>102462521
>>102462554
That's the one from SICP, right?
Is it a good idea to read the book to get into Scheme?
>>
>>102462678
R5RS, guile manual, racket website, SICP, the scheme programming language 4th edition.
>>
>>102462678
Yeah, and not really. Like you'll learn Scheme but that's not the focus of the book, might just be making it hard on yourself for no reason. It's a great book though.
>>
>>102456480
Isn't .ui is Win32?
I think step 1 would be to learn Qt, there's nothing about it that relies on QtCreator
>>
>>102462484
>but I thought it was too brown
Did he just call me a nigger?
>>
>>102462484
Part of the appeal of lisps is their permissive nature. By lisp standards Clojure is highly opinionated and quite strongly pushes for a particular programming style. Hickey has done a few talks on the topic and its not a bad style but a big alternative, CL, goes out of its way to over specify the language but under specify how it is intended or expected to be used.
>>
>>102428372
have you tried lsp, possibly with apheleia?
>>
Are there lisp web frameworks? I just want to make a site to host my photos on my lan in a gallery.
>>
>>102467232
There are a ton. Are you looking for a framework-framework or just a web server?
>>
>>102467267
Well, not just a web server, since I want to be able to use a database of some sort to tag the images and have a search and stuff.
>>
>>102467305
Personally I'd go with a web server like woo or hunchentoot and do it myself (it's never really that bad). Otherwise if you want larger frameworks here are some (I haven't used them but I've heard good things, iirc both support databases):
https://github.com/fukamachi/caveman
https://github.com/Shirakumo/radiance



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