[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: (eval-apply).jpg (478 KB, 1280x720)
478 KB
478 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

>Learning Emacs
C-h t (Interactive Tutorial)
https://emacs.amodernist.com
https://systemcrafters.net/emacs-from-scratch
http://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 >>102250853))
>>
File: (((CIA))).jpg (42 KB, 500x500)
42 KB
42 KB JPG
M-x spook
>>
Does Lem still suck on Windows? I remember having a ton of issues like not being able to access network mounts.
>>
>Larp General
>>
What do you think of Haskell?
>>
>>102342982
Yeah. I've heard it works fine on WSL though. I tried getting automatic native builds working but gave up after a few hours, I gotta talk with someone to figure that out. The biggest issue is that qlot doesn't support Windows in the first place. I think it's a mistake to use it for a general editor like this that's meant to be cross platform. Hopefully someone pushes up a PR adding win support to qlot soon.
>>
File: 1569016242284.gif (84 KB, 640x640)
84 KB
84 KB GIF
Scheme!
>>
just got started with Clojure on Emacs, shit is pretty cash
>>
>ability to minimize distracting ui elements
>can change theme based on time of day to maintain circadian rhythm
>calming fireplace with crackling for white noise
>org-timer can be used a meditation bell
>nov and olivetti for reading philosophy
is emacs the most zen piece of software?
>>
File: 20240911_18h06m57s_grim.png (493 KB, 1904x1041)
493 KB
493 KB PNG
been working on a toml-to-latex resume converter written in clojure

what it does it takes toml file, parses it and outputs a .tex file that is then made into a pdf

the idea here is a nice way to version-control resumes. there's also a themes field in the config too, which will allow users to change the entire resume's look by selecting a different theme.
>>
>>102343635
Yep. I've been using lem recently but I code in fullscreen on both. Something about having the entire monitor filled up with the editor is super /comfy/.
>>
>>102343671
Nice project and wallpaper anon
>>
File: super-mario-bros.gif (134 KB, 512x512)
134 KB
134 KB GIF
>>102251457
>https://github.com/gongo/emacs-nes
Impressive, very nice! (〜 ̄▽ ̄)〜
>>
>>102343635
I love GNU Emacs. It's very nice software, and it runs other nice software that edits all the text and displays all the RSS feeds I could want
>>
>>102343671
need like... 100 more cute lisp tans
>>
I don't love emacs but it still manages to blow its competition out of the water. It's really frustrating how shit strictly gets worse because no one actually looks at old shit (especially lisp shit) and goes "hm how can we make this better," they just make up shit that barely replicates half of it.
>>
>>102346236
I agree. There are a lot of valuable lessons to be learned from Emacs, and so many people are oblivious to them. People who want to add scripting to their application should spend at least a year with Emacs AND Elisp until they understand how useful an interactive and self-documenting environment can be.

Not to pick on mpv, but there have been many times when I wish it had the equivalent of Emacs' `C-h b` so that I could see what keybindings were available. I don't like that I have to refer back to its man page or find a cheatsheet online, because I forget rarely used keybindings often. I like mpv, but if I could interact with it similar to how I interact with Emacs, it would be so much more wonderful.
>>
Also, magit is by far the best interface to git and I genuinely can't remember how I ever used git before.
>>
>>102343635
Olivetti is very nice, thanks anon.

Also org-timer is great. What do you think about prots timer package
https://github.com/protesilaos/tmr
>>
>>102342930
Is this also Orgmode general? Writing a report that has to be in apa7. The apa7 docs show that captions for figures ought to be above the figure with a new line following the figure numbering (with the actual content/explanation of the figure in italics).

E.g., it would appear like this:
Figure 1:
/A cute girl writing Lisp on a whiteboard/


Does anyone know how to actually do this? AI... Knows nothing
>>
File: images (4).jpg (17 KB, 318x159)
17 KB
17 KB JPG
Why are there so many loops? I thought common loop was supposed to bind them all.
>>
File: 1726051875312066.jpg (297 KB, 1024x768)
297 KB
297 KB JPG
The Brazilian fastman (our hero) is hard at work with fastlisp. Rest assured, you shall get the fastlisp compiler you deserve
>>
>>102346998
I feel like we're in an AI summer now. I feel overwhelmed by it, and a little turned off.
>>
I wonder if I should take the lispworks pill if I want to ship games on CL. Having a real process for creating standalone executables with a treeshaker, and supposedly better debugging and tooling in general is tempting.
>>
god a brand new macbook air and I'm liking it a lot but damn is the fn key in a terrible position for an emac user. it's exactly where ctrl should be
>>
>>102347091
>paying a thousand dollars for slightly better tools
just use chez scheme
>>
>>102347208
I looked at a ton of Schemes a while back and didn't like them, but I can't actually remember which ones and what was wrong with them... Is the tooling actually good? Performance? You're gonna have to sell me why not sticking with SBCL isn't the play if you're gonna say that.
>>
>>102346751
>What do you think about prots timer package
i haven’t used it but all his stuff is good. too complex looking for my usecase though, i just needed a single timer with a bell sound.
>>
>M-!
>C-u M-!
>M-|
>C-u M-|
Very nice.
>>
>>102347208
>>102347283
Well, I'm looking into it: The interactive development and debugging features seem to be lacking, and those are what's most important for game development. It definitely seems like an extremely solid implementation, though. I almost wish I had an excuse to use it for something.
>>
>>102347091
Why would you want a treeshaker, to reduce binary size? The runtime will be the smallest part of your game. If it's not it's still gonna be under 500mb which is tiny by modern standards.
Also the debugging/tooling really isn't much better than something like Sly/Emacs, it's better in some places, worse in others. Maybe worth for CAPI but definitely not strictly better than SBCL. Anyways you're free to try it out.
>t. making game in CL, tried out lw for a bit
are you using plain sdl for your game or leveraging something else?
>>
>>102348409
Having a real stepper is a huge improvement over Sly. STEP, like, kinda works, but it's also jank on SBCL and doesn't behave sensibly even with optimizations off sometimes.
SDL, Vulkan renderer, will probably end up putting the heavy lifting stuff in C libraries that the lisp side calls depending on how things go.
>>
File: New Project (3).png (1.61 MB, 1664x1074)
1.61 MB
1.61 MB PNG
I gave lem a shot. Not too bad. Tried the ncurses one and it worked pretty much the same as default emacs with slime and paredit preinstalled. Definitely a bit janky, but it seems like it'll be fun to program. Has anyone done anything fun with it? I definitely want to try hacking on it. But I don't have any ideas.
>>
>>102349089
It's extremely fun to iterate on. I was submitting PRs like a week or two after I started using it. I pushed up the dashboard recently, you might've seen it if you built from source. There's something so nice about the entire code base being in CL, way more accessible than the couple of times I tried sifting through the Emacs source.
I'm working on a game using it now, really no complaints besides an annoying bug in which SBCL error popup messages don't get cleared and get stuck on the screen. I'll probably get around to fixing that at some point.
>ncurses
any reason you went with the ncurses backend vs the sdl2 one? I use both personally (since it starts up so fast I use it like nano for quick config files) but the sdl2 feels a bit nicer, with theme support and all that.
>>
>>102342930
They should have either called it lithp
or called it : "Lisp-(pronounced lithp)"
>>
>>102343018


3y ago

I think Haskell is a pretty cool guy. Eh kills creativity and doesnt afraid of anything
>>
>>102343479
I think there is at least 3 of use starting with Clojure recently.
>>
>>102347013
>I feel like we're in an AI summer now.
Just because people are dumping this trash everywhere.
>>
I should not have tried the LW personal edition. I have tasted the forbidden fruit.
>>
>>102349415
Use it for a couple weeks then make up your mind. There were little things that kept adding up that I found grating. Ultimately if I end up using LW it'd still be with Emacs.
>>
>>102349474
Well there's no way I can afford it right now, but it's definitely a goal. And yeah, part of the appeal is still being able to use emacs/sly if I need to. It's also very extensible and that could be fun to mess with.
>>
>>102349504
>Well there's no way I can afford it right now, but it's definitely a goal
They're pretty generous with the evaluation licenses if you really want to try it. That being said yeah there's no point if you can't afford it right now in the first place.
Honestly though, if there's a killer feature you want you're probably better off adding it to emacs/lem. Given the cost is per-platform and you'd easily end up spending 12k, I'd personally rather do 1-2 months of labor than pay that and get stuck in vendor lock-in.
>>
Oh that could be a bit problematic.
>>
>>102343018
nice language, horrible community
>>
>>102349883
That could describe all languages.
>>
>>102349892
no, when it comes to niche languages, there are clear differences in what kind of people they attract.
>>
File: 1700819668428.png (323 KB, 764x788)
323 KB
323 KB PNG
>>102342943
for me it's
M-x new-order

https://www.youtube.com/watch?v=mfI1S0PKJR8
>>
In CL, how can I take a reference to a slot? Do I just store a reference to the object itself and call the slot accessor or is there a way to keep a mutable reference to the slot?
>>
>>102349089
I've mostly been playing with key binding. A big chunk of what I've done so far can be found here:
https://rentry.org/lemspace
What would require general.el on Emacs can be done with just stock Lem which I appreciate. I also don't know much Common Lisp, but Lem has given me a good excuse to learn, and it's definitely a more capable language than Elisp. What took me a while to get used to is having namespaces. In the beginning, it felt like it made discovery harder, but I've started using the apropos function in the REPL which helped a lot. The interactive version would be `M-x lisp-apropos-all` (not the plain lisp-apropos which doesn't return enough info).
>>
>>102349883
Is it as bad as Rust?
>>
I want to build a simple android app and thought it might be fun to learn lisp while I'm doing it

Do any lisps have non-painful android development tooling/libraries or is it all torture?
>>
>>102350454
You can only hold a "mutable reference" locally using something like WITH-SLOTS or WITH-ACCESSORS.
>>
>>102350913
No, the troons in Rust were the troons of Haskell.
>>
>>102350935
CLOG (cl) works on android, same with ECL
ClojureDart probably works the best
>>
>>102346853
>apa7
A web search yielded this old post from reddit.
https://www.reddit.com/r/emacs/comments/uuvf03/how_can_i_export_references_with_apa_style_using/
>>
>>102350935
LispWorks (proprietary CL implementation) has an Android and IOS runtime. This would probably be the only non-painful option because IIRC their GUI framework CAPI has full support on these platforms too. Problem is that it is quite expensive.
Otherwise you might be able to get Clozure CL (has an android example in source) or Clojure (apparently 1.2.0 would compile and run on android 8 but no news since) to work. There is also lambdanative which is open source but last I checked their docs were atrocious.
>>
>>102346751
tmr looks really nice. I will definitely check it out.
https://protesilaos.com/emacs/tmr
>>
Hello, I want to use emacs as an IDE / text editor and maybe more if I get comfortable using the program. I also want to primarily use vim keybinds as I already know them.

Emacs is so big and Doom Emacs is even bigger, so I can't tell at a glance what differences they really have. Should I just use evil mode in plain emacs and try to get other stuff (syntax highlighting, etc) or should I just go with doom emacs?
>>
>>102350969
Though in that case, that works by making those into local symbol macros. They are not references that you could pass around for example.
>>
File: tmr.png (204 KB, 1317x1248)
204 KB
204 KB PNG
>>102351058
My only criticism of tmr is that it's not evil friendly, but it otherwise works really well, and I like its tabular interface. For evil users, just hit C-z to toggle evil-emacs-state and use his bindings.
>>
>>102351410
I wish he had a column for duration also. I'd probably put it before the `Remaining` column. Since it's not there, I feel like I have to fill out the description field so I can distinguish which timer is for what. (I can live with that.)
>>
>>102351283
They are not replaced as if by symbol-macrolet.

(defmacro print-arg (arg)
(print arg))

(defclass a-class () (a-slot))

(let ((a-instance (make-instance 'a-class)))
(with-slots (a-slot) a-instance
(setf a-slot 'a-value)
(print-arg a-slot)))

Prints A-SLOT and returns
A-VALUE
>>
>>102351283
Missed the other statement.
>They are not references that you could pass around for example.
Because they are lexically bound, not because of something to do with how WITH-SLOTS or WITH-ACCESSORS works.
>>
>>102345819
gonna try making a new one today champ. what's the prompt?
>>
>>102343671
Damn anon, I havebeen workig on something similar in scheme but for invoices. Never thought about using an input file so I will be stealing your idea thanks.

Hope your project goes well!
>>
>>102352192
yoooo this sounds cool as hell too

care to shore any code examples ???

writing so many functions for latex commands that i'm wondering if there's already a decent latex parser for clojure. i tried clj-latex but it didn't seem to fit my usecase
>>
What CL do people use on Windows?
>>
>>102352294
SBCL is essentially the de-facto free implementation for all platforms. Clozure is also pretty good, can't go wrong with either.
>>
>>102352285
So I'm not at the latex part yet but I will be using skribilo for scheme which is essentially a markup language for scheme. It can be exprted to LaTeX.

So far I have been wasting my time creating an interactive loop to input items and prices. Progress is slow since Im using this project as a way to learn
>>
File: aoc2019day4ClojureAndDart.jpg (407 KB, 1080x1354)
407 KB
407 KB JPG
>>102350935
>Do any lisps have non-painful android development tooling/libraries or is it all torture?
Compiling and packaging a ClojureDart app is easy enough, but due to poor documentation and IDE support you have to already know a good deal of Clojure and at least basic Dart and Flutter to make effective use of ClojureDart.

btw writing Dart when you're coming from Clojure feels like replacing your legs with dildos.
>>
>>102347283
>>102348117
I suggested chez because it's kind of the lispworks of scheme. it's a 'professional' implementation, it used to be proprietary but now it's FOSS. the performance is the best in the scheme world, it's a scheme to native code compiler.

scheme definitely doesn't have the bells and whistles of CL interactivity, but hey it's a thousand dollars cheaper
>>
File: SORCERER.jpg (26 KB, 300x300)
26 KB
26 KB JPG
>>
File: 1722933615094196.png (590 KB, 721x2179)
590 KB
590 KB PNG
Mom, I did it.
See you next time, where I definitely don't give up and drop this in a weeks time.
>>
File: SUSsman.webm (237 KB, 320x240)
237 KB
237 KB WEBM
>>102354995
>>102355033
nice ( ᵔ▽ᵔ)b
>>
>>102355033
good morning sir the needful was done I see good
>>
sirs how do I make the bar between windows actually visible? I hate pixel hunting them to resize shit
>>
File: New Project (4).png (799 KB, 768x768)
799 KB
799 KB PNG
>>102357852
>uses mouse
ngmi
C-x - (shrink-window-if-larger-than-buffer)
C-x + (balance-windows)
C-u 6 C-x{ (shrink-window-horizontally)
C-u 9 C-x} (enlarge-window-horizontally)

why would you need more?


ps. holy fuck C-x ^ is hard to press fast. sussman has the finger span of a god
>>
>>102355033
I'm trying to work through SICP as well. What variant of scheme are you using? I've been using racket with the dr racket ide but I'm wondering if there's a better way.
>>
>>102352023
her tinkering on a workbench
>>
>>102357852
The modeline gives you a nice ~1 char sized resize point for both vertical and horizontal splits.
>>
>>102357852
(set-face-foreground 'vertical-border "#1488DD")
>>
File: lisp.png (619 KB, 1492x796)
619 KB
619 KB PNG
>>102359507
it's on! couldn't finish it today because of waging so I'll try to post the finished drawing in the following week
>>
File: 20240912_22h55m22s_grim.png (241 KB, 1915x1056)
241 KB
241 KB PNG
>>102343671
>>102352285

have a second template complete ! im not sure what all i might be missing in terms of sections (awards ? certs ? personal projects ?) so any feedback on that would be appreciated.

also, any other resume templates because otherwise im gonna keep poaching from this repo:
https://github.com/subidit/rover-resume
>>
I gotta be honest, I kinda really like scheme's syntax overall compared to CL...
>>
>>102357852
try window-divider-mode and window-divider-default-{right,bottom}-width
>>
In CL, is there a way to store a vector of objects and not pointers to the objects? Or do I have to use structs for that? I just want a contiguous array of objects for fast traversal.
>>
>>102342930
I want to sniff Homu pantyhose
>>
good morning sirs, do you recognize this theme:
>https://github.com/bmag/imenu-list/raw/master/images/imenu-list-dark.png
?
>>
>>102351046
I have the bibliography working, APA7 just also prescribes how captions for images ought to be laid out
>>
>>102362561
>syntax
Can you be more specific?
>lack of extensible reader
>an empty list is a syntax error
>in R6Rs braces and parens are equivalent
Did I miss any differences?
>>
>>102365168
https://github.com/juba/color-theme-tangotango
>>
File: tangotango.png (362 KB, 1300x975)
362 KB
362 KB PNG
>>102365168
>>
>>102365690
>>102365662
thank you sirs for the needful good day
>>
>>102351085
Ever since Emacs 29 when --init-directory was introduced, it became a lot easier to switch between configurations. A Doom configuration and any number of from-scratch configurations can easily coexist on the same system. I'd go ahead and install doom which typically installs itself in ~/.config/doom. I'd also setup a from-scratch config in ~/.config/evil and put an init.el in there that starts with a bare minimum evil-config like this.
(require 'package)
(add-to-list 'package-archives '("nongnu" . "https://elpa.nongnu.org/nongnu/"))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(unless package-archive-contents (package-refresh-contents t))
(use-package evil
:ensure t
:init
(setq evil-want-integration t) ;; This is optional since it's already set to t by default.
(setq evil-want-keybinding nil)
:config
(evil-mode 1))

(use-package evil-collection
:after evil
:ensure t
:config
(evil-collection-init))


To run doom, say `doom run`.
To run your own config, say `emacs --init-directory=~/.config/evil`.
Wrap that in a shell script or alias to make it easier to type.

Your own evil configuration will be very bare bones, and you'll need to spend a lot of time on melpa.org to get it even close to the doom configuration, but having doom around can be educational. I think it's hard to even know what's available in the Emacs Elisp ecosystem, and having Doom around can kind of act as a guide.
>>
Which one of you is ths?
>Porting SBCL to the Nintendo Switch
https://reader.tymoon.eu/article/437
>>
https://github.com/joaotavora/breadcrumb
>>
>>102368077
It couldn't possibly be anyone from here.
https://reader.tymoon.eu/article/436
>>
>>102365251
NTA but I like the list syntax for definitions, I prefer the singular define to all of CL's def* macros, and I like ?/! more than p/f. But, for the reasons you mentioned and more I can't stand actually using scheme and massively prefer CL.
Also it's not scheme but the Clojure structure comprehensions/accessor macros are fucking amazing and I hate not having them. I even like the explicit reference mechanism, it's sometimes kindof annoying controlling copying vs moving datastructures in CL and I like how explicit it is in Clojure.
A lot of this comes from CL being easily able to do all this shit, but I don't want to pull in a bunch of libraries or write a bunch of macros for purely stylistic purposes so I have to just suck it up and deal with the grass being greener in an alternate universe.

What I really WANT I guess is CommonClojure, AKA Clojure with it's entire standard library and syntax running ontop of CL instead of java.
>>
>>102368077
That's shinmera, the troon behind trial/kandria. 0 chance he browses here.
>>
File: dEVIL.png (219 KB, 512x512)
219 KB
219 KB PNG
>>102368077
>ꜱoyniggertendo
probably a plebbitor
>>
>>102355033
Basado and SICPpilled.
Is it your first time with SICP?
>>
>>102342930
>sans font
>overuse of emphasis, both implicitly and explicitly
CS really is midwit tier.
>>
File: NIL.gif (2.42 MB, 320x240)
2.42 MB
2.42 MB GIF
>>102369872
>CS
>>
1/2
Objective: small, simple version of Scheme for pedagogical
purposes, so that variable name resolution can be expedited,
source files can be compiled to C and leverage C namespace
and scope rules, and so that students can learn the content
of chapter 4 of SICP, especially the meta-circular evaluator
Terms: a definition statement has syntax (define varname value)
and a procedure definition statement has syntax (define
(funcname param ...) stmt ...)
Language: a 'flattened' version of Scheme called "λ" that
doesn't have nested lexical environments, just one code
namespace / directory per translation unit / module
Object model: all object-state encapsulation is handled with
a new class definition statement with the following syntax:
(class (classname instance-var ...)
stmt
stmt
...
(lambda (param ...)
stmt
stmt
...))
this is the only context (last statement in the body of a
class statement) where a lambda expression may occur in
flat scheme or λ, and the top level scope / global
environment is the only place where a class definition
statement may occur
>>
>>102370698
2/2
the meaning of the class definition statement above is
just as if 'class' had been replaced with 'define'
a restriction is placed on lambda and define: a define
statement that occurs in the body of a lambda expression,
class definition statement, or another define statement must
be a definition statement and not a procedure definition
statement so as to refrain from nesting the lexical scopes
there are five scopes:
- built-in: functions such as mathematical operations
- final: immutable symbols bound to their values, used for
evaluating names of procedures at compile time
- global
- instance: these are the initialization and instance
variables that are visible from the body of a class
statement and the body of the lambda expression
- local: arguments passed as formal parameters to lambda
and define expressions, variables defined in the body
of a lambda or define expression
So we have the following rules:
- if a define expression occurs at top level, then it is
a global varaible if it is a definition statement and
final if it is a procedure definition statement
- if a define expression occurs in the body of a class
statement, body of a lambda expression, or the body of a
procedure definition statement then it must be a
definition statement and not a procedure definition
statement, and it is an instance variable if it occurs
in the body of a class definition statement and a local
variable if it occurs in the body of a lambda expression
or procedure definition statement
>>
>>102370698
(class (classname instance-var ...)
stmt
stmt
...
(lambda (param ...)
stmt
stmt
...))
>>
File: pic.jpg (13 KB, 342x83)
13 KB
13 KB JPG
>>102370698
the music notation symbol for flat was suppressed
>>
>>102368200
>>102368428
>>102368172
>Swede
>change sex to a be a woman
>wants to have sex with women.
Every time
>>
>>102370698
The inspiration for this is partly from Code Complete by Steve McConnell, partly from UC Berkeley and MIT giving up Scheme for Python, partly from the idea that such a system could potentially replicate and amplify the successes of Python and Pygame, and partly from the idea that it would be nice to have a language that is a simple wrapper around C that doesn't segfault, able to leverage optimizations and dovetail generated code to C language features such as function pointers and static analysis offered by the C compiler.
>>
>>102370877
Swiss
>>
>>102370996
Same shit, different cheese.
>>
>>102370982
And, there is something else: Pygame is neat, and I'm sure it's key for learning. However, it is no replacement for Flash, and the reason for that is the non-performance of the Python core eval loop.
So, the hole where Flash used to be is also an inspiration.
>>
>>102370996
the distinction is adademic
>>
>>102342930
What are my options if I want to do something with graphics?
>>
>>102371075
https://docs.racket-lang.org/turtles/Traditional_Turtles.html#%28part._.Examples%29
>>
>>102371441
>https://docs.racket-lang.org/turtles/Traditional_Turtles.html#%28part._.Examples%29

Wow that's garbage. What the fuck am I supposed to make with such a sparse library? For that I might as well do it in C++ or something.

I also looked up LISP graphics and the next thing I got was Tcl/Tk. So do LISPers all work on the backend or what?

I mean, Crash Bandicoot was programmed in its own LISP dialect. LISP is very powerful but it seems like no one outside of Naughty Dog ever used it for graphics.

Fucking Turtle graphics and Tcl/Tk. Lol. I needed a good chuckle.
>>
File: jump.gif (319 KB, 498x600)
319 KB
319 KB GIF
>>102371075
https://awesome-cl.com/#graphics
https://www.clojure-toolbox.com/#graphics
>>
>>102371597
Thanks, that's what I was looking for.
>>
>>102371075
What do you mean by graphics? GUI or proper low-level drawing like SDL or OpenGL?
>>
File: images.jpg (6 KB, 268x188)
6 KB
6 KB JPG
>>102370006
>computer scientist
>does no science
>software engineer
>does no engineering
>>
File: WOAH.png (17 KB, 344x308)
17 KB
17 KB PNG
>>102371596
>Naughty Dog
OpenGOAL is open sauce faakhead
https://github.com/open-goal/jak-project
>>
File: file.png (330 KB, 800x600)
330 KB
330 KB PNG
>>102371832
We live in a society
>>
File: 1714264324913576.png (120 KB, 496x336)
120 KB
120 KB PNG
>>102371832
>computer basedence
>look inside
>node packages
>>
anyone have experience with CLOG? ive only written little cli things and want to do something with a gui, clog seems like a nice first step
>>
>>102371891
do you think sussman was in this club?
>>
File: IMG_0372.jpg (97 KB, 1334x750)
97 KB
97 KB JPG
which emacs irc client should i use?
>>
>>102371596
So, there are basically two ways to go with this. First of all, I mean...come on, dude. This is an image board. You're totally defensive about the fact that you could be doing the work and showing your progress...but that would require vulnerability, and that isn't your strong suit...come on, dude, wax on, wax off...you want to roll with the pros, show us what you're capable of, take a freaking screenshot of your turtle dance of life, man,
https://www.youtube.com/watch?v=GC_mV1IpjWA "The Little Mermaid - Under the Sea (from The Little Mermaid) (Official Video)"
my my, you have to go back regardless...that spacing
Now, the other simple fact of the matter is that we should be talking about cloning the SDL library, testing out the examples, and hacking up your own Scheme interpreter REPL in C...you've read all of SICP and done all of the exercises, haven't you?? HAVEN'T YOU??? HMMM??? so it should be a cinch to simple add Scheme to any particular existing graphics programming environment, as long as there is some programming facility
there are four things that keep a man sane: recalling linear algebra material, recalling measure theory material, implementing Scheme, and implementing the LR parsing algorithm; it's a basic intellectual toolkit for math and computing
>>
>>102349883
> Horrible community

Wdym? The community is made primarily of academics, I don’t think they like getting involved into much drama
>>
artist-mode is pretty cool
wonder if any warez group use it to make the ascii art for their info files
>>
>>102373046
>The community is made primarily of academics
exactly
>>
>>102371832
>electrical engineer
>writes code for a living
I hate capitalism. I want to zap zap stuff and make thingamabobs and gizmos
>you vill work on the b2b saas django app and you vill like it
>>
File: Panzerkampfwagen.png (620 KB, 800x800)
620 KB
620 KB PNG
>>102372892
M-x erc

https://www.gnu.org/software/emacs/erc.html
>>
So is lisp actually worth learning for advancing a career? Do any companies actually use it?
>>
>despite the push from the community to make CL a Lisp-1, Symbollics would not allow the change because they had too much code written that depended on it.
>>
File: ₲10000.jpg (88 KB, 1000x750)
88 KB
88 KB JPG
>>102376492
here's wa/g/ie
https://clojurejobboard.com
https://github.com/azzamsa/awesome-lisp-companies
>>
If CL was a Lisp-1 would it be perfect?
Also perhaps integrate CLOS into the rest of the language.
>>
File: 1696978146455002.jpg (106 KB, 800x670)
106 KB
106 KB JPG
do not be ashamed of liking dynamic scoping, anon. Lisp-1 SUCKS!
>>
a cool package i found:
https://github.com/roman/golden-ratio.el
>>
>>102378657
Anon, dynamic scoping and two namespaces are mutually independent...
>>
trying to write an elisp function with a yes or no prompt. i want to be able to press return instead of having to reach over to the Y key, but it doesn't work.
saw this in the documentation:
(y-or-n-p PROMPT)

...

To be precise, this function translates user input into responses
by consulting the bindings in ‘query-replace-map’; see the
documentation of that variable for more information.

but it seems like the return key is already used by it.
is there a way around this or do i really have to use read-key or something similar?
>>
File: act-and-exit.png (57 KB, 617x706)
57 KB
57 KB PNG
>>102379222
I looked at the contents of query-replace-map, and like you, I saw that it contained:
(return . exit)

I tried using keymap-set to change it, but saying:
(keymap-set query-replace-map "RET" 'act-and-exit)

would set up an entry for 13 instead of return. To get around this, I used setf.
(setf (cdr (rassoc 'exit (cdr query-replace-map))) 'act-and-exit)

Now hitting return in a y-or-no-p situation is the same as hitting y. I hope this surgical edit of query-replace-map doesn't break emacs, but who knows.
>>
>>102380892
There was only one thing in query-replace-map that mapped to exit and that was return, so that's why that rassoc found the right entry to do surgery on.
>>
>>102378657
Lisp-2 feels dumb. It makes hacky shit like funcall necessary whereas in Lisp-1, you can use the function like a function, because they're not in some weird alternate namespace.
>>
>>102380892
<return> bindings override RET bindings in the GUI.
>>
>>102381652
I didn't know you had to say "<return>". That setf insanity could be replaced with:
(keymap-set query-replace-map "<return>" 'act-and-exit)
>>
>>102381605
Idk I personally like Lisp-2 after using it. At first I was theoretically in the Lisp-1 camp but I like being able to name variables anything without worrying about shadowing functions.
>>
https://news.ycombinator.com/item?id=41535354

thoughts on 10th rule?
>>
>>102382386
100% real, also in java and other langauges
see
>c++ template turing complete language
good mornign sar
>>
what would cause guix to start coompiling shit even though it was just downloading substitutes right before? i didn't pass --fallback so it should've just stopped there if those substitutes weren't available yet right?
>>
File: 1725221427530525.png (237 KB, 457x1656)
237 KB
237 KB PNG
>>102355033
This subsection had a lot of exercises of the form "run these tests and compare the time to the previous tests". Which I decided to skip oopsie.

>>102359404
I'm using the racket interpreter. It has a specific #lang sicp option. But I run the REPL "inside" of neovim using conjure and passing all of the expressions through "racket -I sicp". It's also how I get the results to expressions as comments.

>>102368619
Yes, but I'm not completely oblivious to programming.
>>
> (setq isearch-lazy-count t)
Thank me later. Having it off is a bad default.
>>
File: file.png (150 KB, 800x600)
150 KB
150 KB PNG
>>102372873
I don't think so, but he surely was a member of the Knights of Lambda Calculus.
>>
TOML testing """framework""" made with spit and glue sirs
(define symbolic-deriv-1
(make-simple-test-set 'symbolic-derivation
(('(derive 'x '(* x x)) '(+ (* x 1) (* x 1)))
('(derive 'y '(+ y y)) '(+ 1 1))
('(derive 'w '(cos w )) '(* -1 (sin w) 1))
('(derive 'w '(sin w )) '(* (cos w) 1))
('(derive 'x '(exp x)) '(* (exp x) 1))
('(derive 'x '(log x)) '(/ 1 x)))
eval))
>>
https://packages.ubuntu.com/noble/chezscheme-doc
How can I access this docs? I see it downloads Chez user's guide, but that's it?
>>
>>102384250
your cos is infinite loop
u need recursion base case
>>
>>102382813
i think some packages just don’t have substitutes, or the one there is out of date and the substitute server hasn’t built it yet.
is it just small-ish things it’s compiling? in my experience that’s normal for guix.
>>
>>102384943
nah it was gtk4, ffmpeg and a bunch of other shit
not sure if doing another pull was what fixed it but it ended up working at that point
>>
>>102384238
requesting font id for the English language lettering
>>
\flat\lambda

[math]\flat\lambda[/math]
λ
[math]λ[/math]
>>
File: Sturmgeschütz.jpg (351 KB, 1200x834)
351 KB
351 KB JPG
>>102382813
>>102384987
(use-modules (guix ci))

(list (channel-with-substitutes-available
%default-guix-channel
"https://ci.guix.gnu.org"))

https://guix.gnu.org/manual/devel/en/html_node/Channels-with-Substitutes.html
>>
File: lem.png (423 KB, 2880x1418)
423 KB
423 KB PNG
CL/Lem Noob Question: I want to add font-size-reset to the SDL version, but when I try to `make sdl2` it crashes the build. Why can't it see the font package?

  (:use :cl :lem-core :lem-sdl2/font)
(:import-from :lem-sdl2/font
:default-font-size)
>>
should i be using the elpa-* packages on debian/ubuntu-based systems when i can or just ignoring them?
same question for the emacs-* packages in guix because i'm interested in switching to that too.
i don't really know what their usecase is or whether they'll conflict with packages installed just through emacs.
>>
>>102386805
make sdl2 on a vanilla clone of the repo yields that error for you?
>>
>>102386896
i don't see any advantage using them personally, you already have declarative package management built into emacs
>>
File: 1719437485441704.png (9 KB, 234x201)
9 KB
9 KB PNG
https://www.gnu.org/software/emacs/manual/html_node/emacs/HTML-Mode.html#index-C_002dc-C_002dt-_0028SGML-mode_0029
How do I confirm and end this command? It keeps prompting me for more attributes after I added the ones I want, C-g just cancels everything, how do I "accept" and end it?
>>
>>102384870
that is just the test case sar, the function works alright as you can see by the image.
>>
>>102385019
I don't think it's the one, but it reminds me of the code font on the Kadena website

https://docs.kadena.io/build/pact/hello-world
>>
>>102387314

vertico - M-RET
ivy - C-M-j
>>
>>102387724
credit:
https://emacs.stackexchange.com/questions/35378/html-mode-insert-tag-without-attributes
https://www.reddit.com/r/emacs/comments/16b4cr4/comment/jzbaflg/
>>
>>102386805
I don't know why, but I had better luck with `make sdl2-ncurses` than `make sdl2`. It wouldn't hurt to try.
>>
>>102387767
Nevermind. I can't build the current head. The last time I compiled lem was maybe 2 weeks ago.
>>
>>102388166
I ended up downloading a binary distribution of the latest sbcl (2.4.8) and using that instead of the Ubuntu packaged sbcl which was 2.1.11. The newer sbcl can build lem just fine.
https://stackoverflow.com/a/78952660
>>
This is a nice REPL for SBCL for those times you're not inside Emacs or Lem.
https://github.com/hellerve/sbcli
>>
>>102384648
There will be a HTML and PDF on your computer. Check the packages files list. Also
https://cisco.github.io/ChezScheme/csug10.0/
>>
>>102384648
dpkg -L chezscheme-doc

It's in:
/usr/share/doc/chezscheme-doc/html
.


mimeopen /usr/share/doc/chezscheme-doc/html/index.html
>>
>>102389368
>>102389261
damn not even an info file
>>
>>102381686
what i really wanted to know is if doing this exact thing would break anything, but i didn't sleep at all last night so simply reading the query-replace documentation didn't occur to me.
sounds like a function no normal person would actually use, so this is fine by me. thanks.
>>
File: 1701268843128917.png (106 KB, 1920x1055)
106 KB
106 KB PNG
>>102387599
that's actually a pretty good font for Clojure because the different types of delimiters all look very different from one another.
>>
>>102390370
I like it. I tried it but at the font sizes I use (9-11) it looks too blurry :(
>>
>>102384648
>>102389261
>>102389368
you have to be a little patient with chez. it's not a hacker's implementation. it's not concerned with the kinds of things guile does well, such as integration with emacs and other GNU stuff

chez is designed to be kinda self-sufficient. it used to be a proprietary commercial product, so customers expected to buy it and not need anything else to make it work. if you look at CSUG, you'll see that even the things that are basic shell commands in open source implementations like chicken, such as calling the compiler, are done internally in chez, by the scheme system. the suggested command to compile a scheme file is something like
echo '(compile-file "myfile.scm")' | scheme -q


this is also the reason why it doesn't have SRFIs out of the box, and does not include many features that are ubiquitous in other implementations, like cond-expand. if you accept the deal, you get the fastest and possibly most reliable scheme out there. and also the only one with first class support for windows, which is a concern if you plan to distribute programs made with it
>>
>>102390370
>pArAmeter
Yeah n-no thanks
>>
>>102390422
>it used to be a proprietary commercial product
It was originally a research tool at (IIRC) Indiana university. But yeah they sold it commercially through an independent company which contributed to it's development for a long time.

The thing that always gets me when I try to use Scheme is the lack of quicklisp. No akku doesn't count.
>>
>>102390532
iirc it was developed independently by kent dybvig and another guy, but it was always intended to be sold. then cisco hired dybvig and bought the whole project, but I think he is still involved in development and maintenance
>>
>>102390631
Perhaps it was. At the time it was first written until the Cisco buyout Dybvig worked at the university and even taught the compiler course which would explain why the company couldn't be entirely independent and was owned by the uni.
>>
>>102390422
It's worth noting that Chez has one of the highest-quality compilers and runtimes of any language, not just of Schemes or even Lisps. It compiles highly performant code very quickly. There are almost no parameters to tweak, because it works so reliably and efficiently out of the box. It also compiles about 100,000 lines of code per second in my own tests. If those traits are appealing to you, then you should check out Chez.
I have been using it since 2021 and have only ever seen one compiler bug on it, and that bug was from enabling an obscure, non-standard parameter (commonization). Compare with even famous compilers like SBCL, GCC, Clang, etc. where compiler bugs are frequent and often considered working as intended by the developers, especially for those last two.
>>
>>102391139
I like chez, just wish it had an ecosystem/package management. Performance was pretty close to SBCL so I was pretty surprised.
>>
>>102382386
>One thing to remember is that Lisp is essentially the flagship "The Right Thing" language, while C is the "Worse is Better" language. Rust is neither, it is something entirely different which I think is overdue for a name, perhaps something that reflects the losing characteristics of both philosophies.
>>
>>102391139
I'm not much of a compiler guy, but I always thought the nanopass architeture looks like an extremely smart idea
>>
>>102384163
Emacs bad default #2426.
>>
>>102391139
>There are almost no parameters to tweak, because it works so reliably and efficiently out of the box.
This is also due to it's scheme nature. The biggest example of which is that much more can be statically guaranteed, for example: non-exported bindings can only be used inside a module so you are free to inline and make type assumptions according to the call sites.
>>
>>102384163
That's handy. I never knew it existed.
>>
File: Yui disappointed.gif (716 KB, 500x299)
716 KB
716 KB GIF
>>102379037
you can't imagine the absolute disappointment i felt learning this can't resize exwm buffers properly.
>>
File: product-xpill.png (45 KB, 395x408)
45 KB
45 KB PNG
Lisp grandpa don't want you to know about XSLT 1.0!!!

>homo-iconic
>first class macros
>truly pure functional
>running in your browser right now
>>
emac lisp
>>
>>102393574
Uncle, client side XSLT processing has been disabled for years.
>>
>>102395263
Nevermind. It's still there. Cross origin rules are just strict now.
>>
File: osaijdfoaisdjfoisadjf.jpg (98 KB, 680x582)
98 KB
98 KB JPG
fastlisp compiler seems to be working in python although it is implemented in the shittiest possible way with horrible gpt code

https://github.com/memesmith1/fastlisp
>>
>>102395898
eh I forgot to add strings to fastlisp turns out its 6 more months of fastlisp winter
>>
File: 1726404015240.jpg (69 KB, 384x384)
69 KB
69 KB JPG
>>102395898
>so basically eval with the current design of fastlisp is unable to be contextually aware of the variable names that we are defining because these veriable names only exist before com pile time so if we are going to eval we have to do it with a new fastlisp program unless we use macros
>>
why don't you take your schizo [retarded]lisp implementation to /dpt/ or your trannycord. every since we changed from emacs to lisp general we get all sorts of creeps here.
>>
>>102397101
fastlisp is not fast
maids do not know how to program
eli is a pajeet
john morris is reinventing the wheel
the second AI winter is imminent and lisp died during the first one
>>
>>102342930
bros I was talking to the computer and it told me that lisp could be implemented in C. What is the point of lisp then?
>>
>>102397595
any turing-complete language can be implemented in any turing-complete language
>>
>>102397595
C can be implemented in Lisp, so what's the point of C?
>>
machine code -> assembly -> Forth -> Lisp

Total ALGOLnigger Death
>>
I've been using emacs for 2 years. I'm about to start org-mode where should I start? The main reason holding me back was syncing between two computers. Is there anyway to achieve this? Ideally not using github
>>
>>102397390
>fastlisp is not fast
never has been
>maids dont know how to program
I have never been involved in the maid shit. fastlisp was made quickly as a fuck you to the maid people to point out how they cant even fucking code a lisp after 3 years
>eli is a pajeet
literally who?
>john morris is reinventing the wheel
yes.jpg
>second ai winter is imminent
yes but this time its python on the chopping block
>>
>>102398417
>The main reason holding me back was syncing between two computers
https://syncthing.net/
>>
>>102385019
Psychonaut
>>
>>102398932
NTA but that's exactly what I needed thanks anon
>>
>>102372892
>>102376454
why does emacs have two built-in irc clients? is rcirc meant to eventually replace erc or something?
>>
File: lisptan_closeup_(WIP).png (441 KB, 1621x806)
441 KB
441 KB PNG
>>102361751
status update
>>
>>102401102
hot end too hot
>>
>>102398932
I need to get off Dropbox and switch to something like this.
>>
File: file.png (62 KB, 619x482)
62 KB
62 KB PNG
>can't even bother to fix this image
>>
>>102401414
>windows
yeah no shit
>>
>>102391350
I would like to see a package manager for Scheme that lets you load portable and semi-portable code into multiple implementations reliably. For some reason, I've found that, while on the surface it seems to solve this problem, Akku isn't all that great even for portable code. Probably because you had to use its custom runtime, and maybe also because its package library feels a bit shovelware-y.
>>
>>102401461
What? Are you implying emacs should not be used on Windows or that emacs should not try to be a good piece of software?
>>
>>102401603
Someone tried a few years ago, but it looks like it's been abandoned.
https://github.com/guenchi/Raven
>>
>>102401640
i am implying that windows is a bad piece of software and should not be used
but also
>Are you implying emacs should not be used on Windows
yes, just use it in wsl2
>>
>>102391536
It seemed to surprise everyone that the nanopass technique could be used on more than toy compilers. The paper outlining the nanopass rewrite of Chez described how the rewrite alone with no extra optimizations increased emitted code performance by a substantial margin. The reason they gave iirc was because each pass could be more thorough in its analysis due to its more limited scope.
>>
>>102401661
>i am implying that windows is a bad piece of software and should not be used
But why shouldn't the installer not be cared for and polished by the emacs developers? It shows sloppiness to any newcomers that don't possess your massive intellect and infinite wisdom.

Your whole "reasoning" is a non-sequitur.
>>
>>102401653
I've seen that user before. They have many interesting ideas, but don't seem to complete their projects unfortunately...
>>
>>102401708
the emacs developers are unpaid volunteers almost all of which are on linux or macos (or using wsl2) and so that's what they develop for
if you want it to work well on windows you're free to contribute
>>
>>102391593
That, the simplicity of the runtime model, and the general preference of Scheme users towards immutable techniques are what I attribute to Scheme's good performance. Type inference of most Scheme code is so easy, and there is little indirection and polymorphism by default. Indirection is the death by a thousand cuts of performance. Do it once or even a few times and you likely won't notice, but when the majority of operations require a table lookup, that's when you start to feel it. SBCL does a lot to try and make indirection less painful, and even eliminate it where it can, while also taking good advantage of type hints, but it's got a much bigger challenge there than any Scheme implementation does, for sure.
>>
>>102401708
have you ever tried packing things for windows? not even microshitters know how to do that.
>60 different installer types
>all of them bad
Linux
>8000 distros
>release debian or src packages
>7999 autists immediately port your software to their distro (create a .deb with another name and argue about if it is open source or not)

Companies shifted to webapps to avoid microshit's stupidity
>>
>>102401708
https://gist.github.com/richhickey/1563cddea1002958f96e7ba9519972d9#file-opensourceisnotaboutyou-md
>>
What's the least shitty terminal emulator for Emacs? EAT can't handle lines being redrawn so parallel updates in Arch look broken.
>>
On WSL. I had to add my local dir bin path to exec-path (and PATH) so that eglot could find tsserver, but the spawned processes (like tsserver) don't inherit that, and they can't find any commands in that path. How do I work around this?
>>
>>102401902
If you don't care about my input, why should I give a fuck about your opinion mate? Go fuck yourself and die.
>>
>>102401739
>>102401902
>>102402388
And this kind of toxicity is what drives me back to VS Code every time I try to make emacs work. Not a good look. Also not even in WSL I can get it to behave on Windows, and I'm forced to use Windows, unfortunately.
>>
File: 1718807380112661.jpg (34 KB, 640x640)
34 KB
34 KB JPG
>>102402423
>I'm forced to use windows
I'm sorry to hear that.
>>
>>102402388
>>102402423
You have shown much concern with how things appear on the surface. Emacs has a poor initial appearance, so it may indeed not be right for you.
>>
>>102402460
>>102402478
Can you help me with >>102402365 please?
>>
>>102402487
No.
>>
I don't know why I even bother. Enjoy your hobby of being an asshole on the internet to strangers I guess.
>>
>>102402547
Bye
>>
>>102402274
vterm is the only decent term for Emacs.
https://github.com/akermu/emacs-libvterm

I had problems with eat too. When it encountered large JSON objects with a lot of moon runes in it, it choked to the point that I had to hit C-g a lot to try to make the terminal responsive again. vterm handles the same workload without a problem.
>>
File: bl.png (4 KB, 96x96)
4 KB
4 KB PNG
>>102370698
>>102370715
>>102370731
>>102370784
>>102370982
>>102371056
Disclaimer: when I say "Python" I mean any subset of Python that I think is particularly well suited for the problem domain. In other words, not all of Python, in particular omitting nonlocal scope. However, it must include the core curriculum of the intro CS courses for MIT and UC Berkeley, 6.001 and cs61a.
What is the motivation behind this? This project provides students with an "exploded view" of Python from the point of view of Scheme. The Python programming language semantics can be retrofitted onto a Scheme core, and the Python container types can be implemented and added to the built-in library. The Python namespace facility and module loading can be added to scheme. Furthermore, an LR / GLR parser for a Python-like syntax front-end (significant whitespace, grammatical separation of statements and expressions, infix notation, literal container object formats) proves that attractive Python syntax can be translated automatically to run on a purpose-built version of Scheme.
The primary or most important reason for motivating this project is the goal of teaching a meta-circular interpreter for a version of Scheme with Python semantics to first-year students.
The secondary or second most important reason is teaching the LR / GLR parsing and table generation algorithm so a student can write a system that bridges the gap between Python code and Scheme code.
The third most important reason is building up to a programming languages course where regular (SICP) scheme can be taught.
So, this plan means students will be taught how Python works "under the hood" and the existing Scheme-based teaching material is available to the student as well.
Under the current system, students must make a special effort to learn Scheme, and that means advanced programming languages material using Scheme isn't available to them starting out.
>>
Is there something in scheme like common lisp DECLARE and DISASSEMBLE?
>>
>>102401414
It looks fine to me. I haven't used windows in a while but I always remember windows installers having that banner on the left side, and it was always the same size.
This may just be a standard windows widget and you can't really (or easily) change the size of that banner. You're assuming it's a mistake but choosing to just stretch the logo might be deliberate.
>>
>>102403070
I use chez and I don't think so.
>>102402902
annoying schizo no coder larp.
>>
>>102403070
Not in the standard, but many Scheme implementations have equivalents. Something like DECLARE for performance isn't as needed in Scheme though :explain would be nice to have. Chez has a secret parameter called #%$assembly-output which when set to #t will print out assembly code of whatever you compile. Gambit and Guile have their own bytecode thing, not a direct disassembly. Gambit has a limited form of DECALRE. Not sure about the others.
>>
>>102403121
>https://github.com/cisco/ChezScheme/issues/144
Chez Scheme does not employ a byte-code representation. The compiler generates machine code directly, either in memory or to disk (via compile-file and related procedures). Nor does Chez Scheme have a VM in the sense of a program that interprets byte code. It does have a run-time architecture that dictates the structure of objects, the heap, stacks, thread contexts, etc. The generated machine code directly manipulates elements of the run-time architecture in cooperation with the storage manager and other parts of the run-time system, just as one would expect the code generated by a JIT compiler for JVM code to do.
>>
>>102403130
>(#%$assembly-output #t)
based, thanks man.
>>
>>102402423
>forced to use
Freedom comes from within.
Refuse to use Windows.
>>
>>102403162
No problem. Here's a convenience macro I use often:
[code lang=scheme]
(define-syntax expand/asm
(syntax-rules ()
((expand/asm body ...)
(parameterize ((#%$assembly-output #t))
(compile '(let () body ...))))))
[/code]
>>
>>102403313
Oops. I always forget how to use code blocks.
>>
>>102403313
>code lang=scheme
It'd be nice if you could do that here. Alas, ...
>>
What's a better way to attribute quote blocks in Org mode than this? It doesn't show up in exports.

#+begin_quote Medieval Technology and Social Change
Feudal tenures quickly became hereditary, but they could be inherited only by one able to fulfil the duty of knight's service. Elaborate rules for the wardship of minors, and regulations requiring widows and heiresses to marry, guarded this essential requirement for enfiefment.
#+end_quote
>>
>>102361751
>>102401102
I love it already.
gives "2am why am I still working on this, I should sleep" vibes
>>
>>102403121
stay on topic
>>
>>102403130
>Something like DECLARE for performance isn't as needed in Scheme though

Why?
>>
>>102403561
Scheme's semantics are such that they're already very efficient. CL's semantics are more flexible but less efficient by default. Here is more detailed information:
>>102401786
>>
>>102401603
What about akku isn't good for portable code? I haven't used it but curious
>>
>>102401165
>>102398932
>>102398417
why not just rsync with --update or scp?

https://explainshell.com/explain?cmd=rsync+-avz+--update+user%40server%3A%2Fremote%2Fdirectory%2F+%2Flocal%2Fdirectory%2F
>>
>>102404362
rsync is unidirectional. If you edit docs from multiple devices, it's nice to have bidirectional sync.
>>
>>102404411
ah makes sense. I mean you could do two commands everytime. but ya its not ideal.
# download newer files
rsync -avz --update user@server:/remote/directory/ /local/directory/
# upload newer files
rsync -avz --update /local/directory/ user@server:/remote/directory/
>>
>>102404362
Another decent alternative to rsync is unison. It's basically a bi-directional rsync, in that it doesn't run continuously but only when called. It syncs the directories and then quits.
Syncthing is more like a dropbox where it continuously runs and syncs and can do many machines at the same time.
>>
>>102398932
pro tip if you have a server that's internet accessible somehow you can use it as a middle man between the two computers. handy if you're syncing files between a laptop and desktop. laptop can send files home wherever it is, and can sync from the desktop from wherever too so if you do work on the desktop you don't have to remember to sync it before you leave and such.
>>
>>102405031
>>102404733
ahh thats pretty cool.
>>
>>102404280
It's built in the style of NPM or Rust's Cargo, but Scheme and its existing libraries are not very amenable to this design. That style of package management is good for rapidly-changing, small libraries with hundreds of dependencies, but Scheme's libraries tend to change slowly, are fairly large, and have very few dependencies. It creates an impedance mismatch which is workable but uncomfortable.
>>
>>102405768
How does it handle multiple scheme dialects? I see it has support for a lot but I'm sure many packages aren't compatible with every scheme implementation.
>>
>>102404733
I like unison. I use it from time to time. It has a continuous mode too. You just have to pass it `-repeat watch` to have it monitor the filesystem for change.
>>
File: GXiGM16aEAArFal.jpg (109 KB, 828x978)
109 KB
109 KB JPG
I'm trying to use Marksman as an LSP server for Markdown documents in Lem, but my attempts to make it work have failed so far.
(lem-lsp-mode/lsp-mode::define-language-spec
(markdown-spec lem-markdown-mode:markdown-mode)
:language-id "markdown"
:root-uri-patterns '()
:command '("marksman" "server")
:install-command "true"
:readme-url "https://github.com/artempyanykh/marksman"
:connection-mode :stdio)


- It's modeled after the example at https://lem-project.github.io/usage/LSP/ .
- I gave it a fake :install-command because installation varies too much between platforms.
- Marksman works on my system when using Helix and Emacs+eglot.

When I open a Markdown file, Lem gets stuck in the LSP initialization phase. The editor is responsive, but LSP init never finishes. What could I be doing wrong?

https://github.com/artempyanykh/marksman
>>
File: remailia.jpg (2.96 MB, 2896x4096)
2.96 MB
2.96 MB JPG
is notmuch what i should be using to do email in emacs?
>>
>>102406644
I haven't used custom LSP servers with Lem yet so I can't offer much help. I remember making my own back when I used Helix with stuff like image preview, good times...
Aanyways what problems do you have with the built-in markdown mode? I think you'd be better off adding features to it than bringing over marksman (which doesn't really do that much).
>>
>>102406754
I don't have any problems with the built-in markdown-mode. It works as expected. I just wanted to see if I could set up an LSP server that I know works in other editors.
>>
>>102406819
Ahhh gotcha.
>>
>>102366471
Oh nice. Not sure if you're still around but thank you
>>
it's refreshing how quickly scheme repls start after coming from clojure
jvm is such a snail
>>
>>102401414
>complains a out it on 4chan instead of submitting a fix to the devs
>>
File: 1716817638783.jpg (122 KB, 800x1037)
122 KB
122 KB JPG
>>102409486
it's all about that high speed life
>>
>>102403310
I hop between the two, but I really can't use Linux without a bunch of workarounds for certain things.
And emacs on Windows sucks. Not only I have this environment issue (which I suppose I could solve by installing the nodejs package instead of using nvm), it's also fucking slow, and most packages assume you're running a proper linux under the hood and break in funny ways. It doesn't help that the community is so hostile to noobs sometimes.
>>
File: Untitled.png (45 KB, 800x648)
45 KB
45 KB PNG
>>102401708
i just use the portable version on wangblows, everything emac needs is in one subdirectory then. for native-compile to work msys2 needs the old microslop c runtime rather than clang or ucrt64 though
>>
>>102402617
Hello again!
>Bye
WOW! You're such a badass. Stone cold. You're soo cool!!
>>
>>102412026
This is a good idea. I don't know how I had not thought about it before. Even if I end up duplicating some of my tools for emacs. Thanks you.
>>
>search "emacs glasses"
>the second suggested result in "Images for emacs glasses" is a clearly MLP fanart-influenced purple unicorn in glasses
>it's on r/emacs
>"Emma the Emacs Unicorn"
Kek.
The redditors weren't having it, but it's really cute.
https://www.deviantart.com/lilyadantum/art/Emma-the-Emacs-Unicorn-989910026
>>
File: 1715817534418.jpg (86 KB, 474x474)
86 KB
86 KB JPG
>>102412647
>search "emacs glasses"
Did you have something particular in mind?
>>
File: file.png (1.33 MB, 1390x1262)
1.33 MB
1.33 MB PNG
>>102412647
>I designed her for my husband's youtube channel. https://youtube.com/@librephoenix
>>
>>102412791
I randomly remembered seeing "Glasses ( o^o )" among minor modes and wanted to check what it is (I didn't have Emacs at hand).
>>
Say I want to tell eglot to use a specific language server for a particular major mode. Do I customize eglot-server-programs? Which is the right way to do this?
>>
>>102413055
(with-eval-after-load 'eglot
(add-to-list 'eglot-server-programs
'(php-mode . ("intelephense" "--stdio"))))

Seemed to work. But I don't know if it's the way.
>>
>>102413198
>>102413055
https://www.gnu.org/software/emacs/manual/html_node/eglot/Setting-Up-LSP-Servers.html
good morning sir, this is the way of the needful
>>
>>102413434
Thank you saar
>>
File: 1651755171236.jpg (1.18 MB, 3599x4096)
1.18 MB
1.18 MB JPG
5 weeks later...
;;; init.el --- Personal configuration
;;; Commentary:
;; How do I Emacs?

;;; Code:
;; -*- lexical-binding: t -*-
(setq create-lockfiles nil)
(setq backup-directory-alist '((".*" . "~/.emacs.d/backups/")))
(setq custom-file (locate-user-emacs-file "custom.el"))
(when (file-exists-p custom-file)
(load custom-file))

(setq inhibit-startup-screen t)
(setq ring-bell-function 'ignore)
(tool-bar-mode -1)

(setq isearch-lazy-count t)

(add-hook 'prog-mode-hook #'display-line-numbers-mode)
(setq column-number-mode t)

(set-face-attribute 'default nil
:font "Fira Code"
:weight 'medium
:height 130)

(add-hook 'after-init-hook
(lambda ()
(set-face-attribute 'bold nil :weight 'medium)
(set-face-attribute 'italic nil :slant 'normal)))

(set-language-environment "UTF-8")

(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
(setq indent-line-function 'insert-tab)
(electric-pair-mode t)

(setq-default major-mode
(lambda () ; guess major mode from file name
(unless buffer-file-name
(let ((buffer-file-name (buffer-name)))
(set-auto-mode)))))

(add-hook 'prog-mode-hook #'eglot-ensure)

(add-hook 'prog-mode-hook #'flymake-mode)
(setq help-at-pt-display-when-idle t)

(unless (package-installed-p 'ef-themes)
(package-install 'ef-themes))
(ef-themes-select 'ef-day t)

(unless (package-installed-p 'which-key)
(package-install 'which-key))
(which-key-mode)

(unless (package-installed-p 'corfu)
(package-install 'corfu))
(add-hook 'prog-mode-hook #'corfu-mode)
(setq corfu-auto t)

(unless (package-installed-p 'corfu-terminal)
(package-vc-install
'(corfu-terminal :url "https://codeberg.org/akib/emacs-corfu-terminal.git")))
(corfu-terminal-mode +1)

(unless (package-installed-p 'cider)
(package-install 'cider))

(provide 'init)
;;; init.el ends here

Still fits into one post, j-
>>
>>102413673
-ust barely. But I've been using Emacs mostly just for writing JS and notes so far.
>>
There's this really handy thing that vscode does out of the box, and that is autocompleting file paths when writing CSS, so that you can type url("../img/ and it will give you a list of files in that directory for autocompletion.
How do I enable this with corfu/eglot?
>>
>>102413744
Found it: comint-dynamic-complete-filename
>>
>>102413673
I'd do package installation with use-package instead.
(use-package which-key
:ensure t)
>>
man which key is actually such a great package. thanks to whoever suggested that.

https://elpa.gnu.org/packages/which-key.html
>>
C-x 8 e i
>>
>trying to figure out which package is forcing my ffmpreg to stay at 6.1.1
>have guix generate a graph
>mfw
any better solutions to figure this out?
>>
>>102414955
>current mood: s u e
>>
>>102414955
I used to think key combos like this were crazy, but with which-key, it's not so bad.
>>
File: LibrePhoenix.png (338 KB, 1331x661)
338 KB
338 KB PNG
>>102412812
His Emacs Playlist
https://www.youtube.com/playlist?list=PL_WcXIXdDWWq5j2VNCeseaVvuRzUFKY3a
>>
>>102414658
NTA but why tho? I usually just define a function that unless package-installed-p install-package and requires it and use that. All the convenience little things ensure-package provides are fine and all, but really, I don't see any reason to bother when the alternative isn't that less verbose.
>>
>>102417274
He tries.
>>
>>102417394
The main reason for me is that it's shorter (and looks neater).
>>
I've seen several people complain about Guix being very slow. Is that because Schemr/Guile is slow or because of something else?
>>
>>102417588
it's as slow as any other linux system, i.e. not slow at all
>>
>>102417588
sometimes it coompiles stuff
>>
>>102417588
Substitute servers are hosted on molasses, and also little/no parallel downloading so you have to wait for the insane latency for every single package in order.
>>
>>102343671
looks cool! keep us posted!
>>
This has helped me take some baby steps with macros in Elisp.
https://gist.github.com/caiorss/db85095ca8c3bfd46865

My first real macro:
(defmacro mlv (var value)
"Shorthand for setting the result of make-local-variable."
`(set (make-local-variable ,var) ,value))


I had a function that was doing variations of this a lot:
(set (make-local-variable 'browse-url-browser-function) 'browse-url-chrome)


Now those lines look like this:
(mlv 'browse-url-browser-function 'browse-url-chrome)


I've been afraid of macros for a while, but I felt like this was a reasonable time to use a macro.
>>
File: emac.webm (2.67 MB, 1920x1080)
2.67 MB
2.67 MB WEBM
>>102357852
>>102358402
my emac automatically resizes the focused window
>>
>>102418566
I feel like that would be too jarring for me. A common layout that I use is an equally sized, side-by-side split, and I want them to stay put most of the time.
>>
>>102419249
when I press C-c w b it switches to fixed size (at 10 seconds in the video)
>>
>>102418566
>>102419390
How do you get the focused line to flash when you change windows?
>>
>>102419460
(defun samedi/pulse-line (&rest _)
"Pulse the current line."
(pulse-momentary-highlight-one-line (point)))

(dolist (command '(scroll-up-command
scroll-down-command
recenter-top-bottom
other-window
other-frame
ace-window))
(advice-add command :after #'samedi/pulse-line))


a lot of people use a package called beacon for the same functionality, but the built-in pulse is good enough
>>
>>102419478
Thanks.
I had no idea that function existed.
>>
>>102419537
nice
>>
>>102419671
Centolain
>>
>>102418566
are you using >>102379037 or something else?
>>
>>102419695
no, it's all my own elisp
>>
>>102419478
That's very cool. I'm going to adapt that into my own config. I also agree that the built-in pulse is good enough.
>>
I'm starting to get some minimal modal stuff in Lem. I like the kakoune keys and I don't really like how vi-mode slaps modal on top of everything, I really just want to jump around easier. I've heard meow is what I'm after but I never bothered with emacs. anyone else done something similar with lem?
>>
>>102419746
neat.
>>
>>102419843
No, but Lem seem to be architected to cleanly allow many different input styles to exist. There's emacs-mode and vi-mode for now, and they're both what Lem calls a global-mode. If someone wanted to do a kakoune-styled input scheme, they could implement a another global mode, and plug it in to the right places.

https://github.com/lem-project/lem/blob/main/src/mode.lisp
>>
(-> "test")
>>
Folks, is there a mode or something that allows me to center align? I got a new monitor and constantly having to look at the left side of my screen is rather painful
>>
>>102420301
olivetti-mode
https://github.com/rnkn/olivetti
>>
>>102419478
To the list of commands, I added select-window. This is good for people who setup Emacs to have window focus follow the mouse via mouse-autoselect-window. It really helps me find the cursor quickly.
>>
>>102419478
I wish this would leave the minibuffer alone. Nothing there needs to be pulsed. Otherwise, I'm pretty happy with this.
>>
>>102420416
(It was the select-window that I added that caused the minibuffer to flash. Ugh.)
>>
>>102420500
minibuffer-window-active-p to the rescue
>>
New thread >>102420706
>tfw forgot name
>>
>>102420715
faaking idiotic zoomer frogniggers



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