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




File: symbolics.jpg (222 KB, 308x608)
222 KB
222 KB JPG
>GNU Emacs is an extensible, customizable, self-documenting free/libre text editor and computing environment, with a Lisp interpreter at its core.

>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 Emacs Lisp.

>Emacs Resources
https://www.gnu.org/software/emacs/ (Official Site)
https://github.com/emacs-tw/awesome-emacs/ (Community-driven list of Emacs packages)

>Learning Emacs
C-h t (Interactive Tutorial)
https://www.youtube.com/playlist?list=PLX2044Ew-UVVv31a0-Qn3dA6Sd_-NyA1n (Beginner-friendly Video Series)
https://www.youtube.com/playlist?list=PLEoMzSkcN8oNmd98m_6FoaJseUsa6QGm2 (Emacs from Scratch)

>Premade Emacs Configs
https://github.com/syl20bnr/spacemacs/ (Spacemacs)
https://github.com/doomemacs/doomemacs/ (Doom Emacs)
https://github.com/snackon/Witchmacs/ (Witchmacs)
https://github.com/pprobst/yukimacs/ (Yukimacs)

>Common Lisp
https://stevelosh.com/blog/2018/08/a-road-to-common-lisp/ (A Road to Common Lisp)
https://gigamonkeys.com/book/ (Practical Common Lisp)
https://www.cs.cmu.edu/~dst/LispBook/ (Common Lisp: A Gentle Introduction)

>Scheme
https://sicp.mitpress.mit.edu/sicp/ (SICP)
https://www.gnu.org/software/guile/manual/ (GNU Guile Manual)
https://archive.org/details/Schemer/ (Various Books)

>Clojure
https://clojure.org/ (Official Site)
https://clojuredocs.org/ (Community-powered Docs and Examples)
https://www.braveclojure.com/clojure-for-the-brave-and-true/ (A Clojure Book)

>Elisp
Emacs docs: C-h f [function], C-h v [variable], C-h k [keybinding]
https://www.gnu.org/software/emacs/manual/eintr.html (Aimed at absolute beginners in programming)
https://www.gnu.org/software/emacs/manual/elisp.html (Elisp Reference Manual)

>More Lisp Resources
https://pastebin.com/nyTQp7qi

>Changing Emacs Default Keybindings
https://pastebin.com/2hg4g3C6

(defvar *alt-names* '(/emg/ /let/ /flet/))
(setf prev-thread >>88686379)
>>
scheme!!!
>>
>>88756078
printf("%ji\n", 2L + 4294967295L)

Keep digging.
>>
>>88756278
2 =/= 2L
>>
>>88756286
if(2==2L){printf("Anon is being retarded\n");}

Yes it does.
>captcha: GAYYY
>>
>>88756278
this prints 1 on most 32-bit computers :)
>>
>>88756356
Nope.
>>
File: 1662777039216.jpg (162 KB, 500x357)
162 KB
162 KB JPG
>knows everything about lisp
>>
>>88756336
so much about talking about concepts and how the syntax doesn't matter and yet you think that when I say equal I mean the C equal operator
typical dunning-kruger behavior. 2L is obviously a different thing from a 2, since they have different types and result in different behavior
>>
>>88756604
What are you talking about now? How can someone be THIS MAD they're wrong? Give it up and go home.
>>
>>88756680
>nonsensical comment with no argument
I accept your concession
>>
>>88756783
I know you are but what am I?
>>
>>88756834
>middle school tier retort that isn't even applicable to what I said
kind of sad, I mean you just look like a retard
>>
>frenly emac
>>
>>88756942
Who are your quoting?
>>
File: chobibibi.png (133 KB, 640x495)
133 KB
133 KB PNG
Guile.
>>
>>88757140
That's Chibi. Says so in the image.
>>
File: nigger.png (96 KB, 640x495)
96 KB
96 KB PNG
>>88757287
>chobibibi
>>
I can't find "An introduction to Emacs Lisp" with C-h i m. Is it missing for some reason? Arch Linux.
>>
how do i backspace with C-h in evil mode i really regret getting used to the shell shortcuts
>>
>>88757720
try C-h i m Emacs Lisp Intro
>>
>>88757904
I... don't know why I didn't check that. Thanks.
>>
How do I get sly completion in normal lisp-mode buffers?
>>
Is there any way to write C++20 with all the nice IDE features older C++ standards get?
In particular, I'm looking for co_await support.
>>
File: 1663850627316446m.jpg (70 KB, 925x1024)
70 KB
70 KB JPG
>>88756187
spacemacs or doom? do anything work on windows well or do I have to use Linux?
>>
>>88758697
Doom has very fast startup and is a bit nicer to config. Spacemacs may have better documentation and I think it has better keybinds out of the box. I use Doom.
From what I hear they both work on windows but Emacs can in general be slow in some areas.
>>
>>88755046
>After learning C and python, I learned java in half an hour, CL took a day, smalltalk took 10 minutes, elisp only required occasional searches for emacs documentation, JS took 5 minutes, and I'm absolutely certain I could take any language you name and within a single minute present working code.
you sound like you're a retarded 13 year old who thinks he "learned" a language because he googled enough to do fizzbuzz.
i don't even know what you're arguing about but i can safely assume the other anon is right and you're a faggot.
>>
>>88758679
>nice IDE features
Im guessing you mean lsp-mode, add company-mode, flycheck and yasnippet
>>
>>88758697
from what I heard, emacs works better on wsl(2)
>>
>>88758877
these work fine for pre-c++20, not the new coroutine syntax
>>
>>88758783
>I'm absolutely certain I could take any language you name and within a single minute present working code.
Anon should try APL and report back after one minute.
>>
>>88759462
i mean, i guess anyone can indeed "within a single minute present working code".
you just need to google "APL hello world" and you're done. doesn't mean you know shit though.
>>
>>88759244
well lsp-mode just forwards you stuff that the server does, so clangd or ccls needs to support it
>>
general should be called /emg/. flet sounds like someone throwing up. higher quality threads as well.
>>
>>88759800
we need to keep it frenly though
i vote for /femg/ desu
>>
File: 1663082527579793.png (22 KB, 674x884)
22 KB
22 KB PNG
Vim and Emacs are completely anti-mouse, therefore anti-modern and luddite. And if Vim has an excuse of usage on headless machines, Emacs is a GUI editor and completely disastrous for modern users. I don't believe young hipsters that they really like using Emacs as their default one, the only real target audience for that ancient application are dinosaurs who haven't overcome their outdated habits.
>>
I have two windows, one with an org file and one with eww
When I press RET on any https link inside the org file, eww opens in the same window and the window below
Then I have the exact same eww buffer twice.
Is there a way so when I click on a link eww renders the page only on the *eww* window already open?
It's annoying to have to press q just to return to my org file
>>
>>88759930
>completely anti-mouse
>t. hasn't used emacs
Emacs has better mouse support than other IDEs; a lot of people just don't bother with it.
IDK why that is, but personally I program on a laptop a lot so I don't want to be trying to select shit with a trackpad.
>>
>>88751337
To whoever suggested that I study emacs lisp, thanks. It's my (kinda) first foray into programming, and it made a lot of the extensions and what I've been doing with my vanilla emacs much more easy to understand. The book's really fucking comfy to read through. Did chapter 1 and 2 exercises and it's pretty fun.
>>
File: 1662884501652794.jpg (40 KB, 358x381)
40 KB
40 KB JPG
>>88759998
I've been using Emacs since June (when Atom sunsetting was announced), I have a huge init.el file and this is my conclusion.
>>
>>88759930
>completely anti-mouse
>emacs
kek
>>
>>88759800
>emg
weird (EMacs General??), conflicts with another general, meaningless
>flet
accurate acronym (Friendly Lisp and Emacs Thread), useful Lisp function
>>88759930
I use my mouse all the time.
>>
>>88760079
>right click on text
>nothing happens
>in better case of language support you get useless dropdown with no copy, no delete, no useful text operations
kek
>>
>>88760158
>no dropdown
>OH NOOOO EMACS IS ANTI MOUSEE!!!
learn how to use a program before you make assumptions about it retard-kun. you can copy cut and paste with the mouse just fine.
>>
>>88759800
Im sad /geg/ (gnu emacs general) never stuck
>>
>>88760158
did you seriously get filtered by the fucking global menu
>>88759982
I think you would have to customize something with eww-browse-url.
>>
>>88760307
don't mind the two cursors my X is schizophrenic
>>
in past thread, anon talked about the idea of a persistent scratch buffer. I had never thought about this, but now I want to implement one

>automatically open this buffer at startup
>periodically check if it's been modified, if yes, save it somewere under .emacs.d/
>save again on close
that's it I guess
>>
>>88760307
>did you seriously get filtered by the fucking global menu
I learned Emacs hotkeys and I use them, but they are anti-human, damaging, anti-intuitive and don't worth the effort. Modern IDEs have balance between hotkeys and mouse usage. that's a good thing.

I don't criticize things I never use, however, I use Emacs for 3 months and that's my opinion on it.
>>
>>88760453
>but they are anti-human, damaging, anti-intuitive and don't worth the effort.
NTA but i agree. that's why i use evil mode and spacemacs style bindings (SPC as leader key)
very comfy
>>
>>88760453
anon
you can delete, copy and insert with the mouse in emacs. you can also cycle through buffers, click buttons and do all sorts of things
i even use the global menu buffer list often because it's actually nicely organized by major mode, while C-x b isn't
If anything emacs is more mouse friendly than most editors because it provides programmable mouse bindings and the menus have almost everything in them that you can do with keybinds
pic related, it's the longest recursive menu i've found
>>
>>88759930
>I don't believe young hipsters that they really like using Emacs as their default one
If you don't even consider my opinion valid, why should I care what you think?
>>
>>88759800
>>>/g/flet
>>>/g/emg
/flet/ seems more discoverable to me.
>>
>>88760307
Tried changing the only variable that came up "Eww Browse Url New Window Is Tab" but nothing changed.
When I press RET it still changes from org to eww and renders twice
+--------+
|file.org|
+--------+
| *eww*|
+--------+

* click link / press RET over link in file.org *

+--------+
| *eww*|
+--------+
| *eww*|
+--------+

Now I have to press q to exit the top eww buffer
[/code
>>
>>88760813
I wonder if you could do something like
(defun hack/browse-url-eww (url)
(if (get-buffer-window "*eww*")
(with-selected-window (get-buffer-window "*eww*")
(eww-browse-url url))
(eww-browse-url url)))

and then set it as your browse-url function
>>
>>88760399
just use org-capture like a normal person
>>
>>88760399
so just a file in .emacs.d which opens on emacs-startup-hook, and then gets saved on kill-emacs-hook
>>
let-values
>>
>>88758783
>>88759462
>>88759560
explain the vast and secret knowledge of programming you have that can't be gained from googling a reference website.
Programming is shit easy, it's just a matter of patience.
>>
>>88756187
>mfw
This is the strongest argument I have ever seen for making or using a LISP machine.
>>
>>88763851
post more トール plz -w-
>>
you don't realize how psychotically bad most extension APIs are until you try to make one for emacs
whoever thought of webextension should be shot
>>
>>88763923
it's because it is really the central feature of emacs. it's not 'an extension API', it's the very essence of the program, everything else revolves around the fact that it's hackable
>>
emacs is really rms's magnum opus, it's the free-est of all free software, it's free in a way that other programs can barely conceive. the man's philosophy is perfectly embodied by his greatest work, god bless
>>
>>88763791
learn to program and you'll see anon
>>
What's a "project" , "project root" etc?
>>
File: DvrG3tKUcAAPPJp.jpg (36 KB, 763x674)
36 KB
36 KB JPG
Scheme!
>>
hey guys, if i build a binary with buildapp (common lisp) and send it to people, can they just run it right away or do they need to still install sbcl?
>>
>>88763791
Writing some code is easy; figuring out how to implement a concrete system from an idea to said code is harder. Doing the latter going around the limitations of machines which execute your code is even harder - harder enough that cross-platform frameworks exist and are constantly of need to be updooted. Using other people's code makes it a bit easier - unless you need to go beyond the limitations of the foreign code, which raises the difficulty further. And while in the process communicating with other developers, reading their code, taking into account what other people want, trying to fit into their canvas of desires not at all correlating with how it's all done (aka the job)? Hardcore.
Worse yet, the bigger the codebase, yours and third party both, the more difficulty and tediousness are added to each step. Your patience will burn out along with your soul if you dont take breaks, especially if you're doing this for mooney only, ESPECIALLY if you're in a corporate environment. Are you up to this?
t. neet
>>
>>88765908
If you're using projectile then you can read the documentation there. In the simplest case, a .git directory defines a project root and the project consists of all files in that directory.
There are other "markers" than git than signify a project but that's the basic.
>>
>>88767280
And absolutely no part of that difficulty is "learning a language".
>>
>>88767371
I'm neither of the 3 anons you're arguing with and answered in the context of your one post.
>>
>>88767532
To put it into context, I'm saying that the physical act of programming is piss easy. The only real difficulty is the thoughts that leads to programming. Languages themselves have minor style merits that may make implementation easier, and way more importantly libraries that can offload a lot of effort, but taking a system and implementing it isn't the issue. Given a model, pseudocode, or a working implementation in another language, it's usually effortless to translate. Creating said model can be either easy or literally impossible, depending on both difficulty of the abstract problem and, more often, difficulty pinning down exactly what the problem IS and what the program is even supposed to do.
>>
>>88767850
You have no idea what you're talking about. Stop embarrassing yourself.
>>
>>88767247
same anon, just setup a mint VM and tried it out
and it JUST WERKS
even stuff loaded with quicklisp, asdf system, packages, everything just works. didn't have to install sbcl or quicklisp or anything in the vm.
i'm so happy bros
now, i wonder if it'll work in windows too. i doubt it but ill test it out
>>
>>88767886
>says the guy who thinks he learned a language in a few minutes
kek
>>
>>88767886
Retard.
>>88768062
SBCL should be able to cross compile to different OSes as long as they're on the same architecture.
>>
>>88767247
Kind of. SBCL is dynamically linked to a few libraries; if they're laid out in the same way as on your system then there shouldn't be an issue but it may not work across Linux distributions.
Other than that if any library uses CFFI to link to some library, that also needs to be taken into account. But pure Lisp programs don't have to worry about that.
>>
What is /emg/'s favourite GNU package (aside from Emacs)?
https://www.gnu.org/manual/blurbs.html
>>
>>88768365
Texinfo, probably.
Honorable mentions:
+ guix
+ gforth
+ gtypist
>>
>>88768365
Stow is the only other one I use.
>>
>>88768417
Ah yeah, texinfo is a good choice. Reading info manuals is so much better than manpages once you learn how to use it :D. Although tbf reading man pages in man-mode is quite nice too.

I prefer nix to guix though :/
>>
>>88768365
I dont count implementations of exisiting standards, so I guess gdb
>>
>>88768419
I hate symlinks so I wrote my own dotfiles manager that copies files instead
>>
>>88768758
Why do you hate symlinks? I keep hearing this and I literally have no idea what the problem is. The only time they haven't been completely transparent for me is when I tried to symlink config files for systemd services.
If you fear indirection you probably shouldn't be using a computer at all.
>>
>>88768823
its the same as spaces in filesnames, theyre inconsistent, some programs work with it, some dont, some tools need extra flags or configuration. with synlinks you can treat them as the link, follow the link, etc. I hate inconsistency
>>
>>88760158
(global-set-key (kbd "<mouse-3>") #'menu-bar-open)
>>
>>88767280
Go shit up /dpt/ instead, nobody cares.
>>
Does anybody know how to crack LispWorks?
>>
>>88769205
download the free version
or just use SBCL
I don't think anyone has ever bothered cracking it
>>
>>88769218
free version is too limited. I want the capabilities of the paid version
>use sbcl
Gui libraries are shit and buggy on Mac
>>
>>88769257
gtk should work fine
ccl has cocoa integration
just pay for the license otherwise jamal
>>
>>88769269
>ccl has cocoa integration
ccl doesn’t work on apple silicon afaik
>>
File: 1633524141460.jpg (252 KB, 650x959)
252 KB
252 KB JPG
LaTeX with AUCTex is far superior for any document longer than a single page. org-mode is a meme for that.
>>
>>88769463
>LaTeX with AUCTex is far superior for any document longer than a single page
Have used both latex and org for long documents. Can deny this claim.
>>
>>88769463
this, except:
sed "s/LaTeX with AUCTex/MS Word/"
>>
>>88769463
org-mode isn't for writing documents in the first place
>>
>>88758697
Space, I've never met someone to started with doom and had a good experience
>>
>>88769669
You'd be amazed at how many people believe otherwise.
>>
>>88769653
>document longer than a single page
>MS Word
absolutely disgusting
>>
>>88769923
wrote my entire thesis in google docs when i was a windows cuck and had no microsoft license lmfao
>>
>>88770001
my condolences on your mental state
>>
>>88768365
EMMS
GnuPG
Kawa
>>
>>88770001
You could have used Notepad++
>>
>>88768365
guile
chess (never beat the fucking thing on normal)
gimp
>>
File: 1663925441153303.jpg (102 KB, 1024x882)
102 KB
102 KB JPG
pure Lambda calculus
>>
asynchronous lisp environment
>>
>>88770683
slime already exists
>>
trying out ef-themes
I am a bit disappointed
thought ef-autumn would be somewhat lighter, it's still really dark
i'd try to modify it but I'm really horrible with colors

on the offhand, I had no idea you can use org-mode to write texinfo manuals like that. maybe I should try it out instead of writing texinfo by hand, seems pretty pleasant
>>
whats the best gui library for guile?
>>
>>88771560
>he does not know
>>
>>88771616
yeah i do not
>>
>>88771621
there are no gui libraries available for guile
>>
>>88771626
god i hate lisp so much
fuck this thread and all of you and your retarded language
>>
>>88771642
common lisp doesn't have this problem https://github.com/bohonghuang/cl-gtk4
next time just don't pick a memelang
>>
>>88771626
There are a couple of tk bindings for various schemes. There's a pstk on akku but I don't know the state it's in or its compatibility with guile.
You can definitely do tk bindings with chicken scheme, or you could last I checked. They had an egg with pstk.
Racket has GUI programming built into the language, and chez had the scheme widget library.. I think that one is dead though. Obviously you can use the FFI for any of these schemes to call into any C lib you want.
>>
Considering disabling which-key. It's useful for non-familiar keychords but 90% of the time it's just stuff jiggling at the bottom of the screen that I don't even look at
>>
>>88772595
(setq which-key-show-early-on-C-h t
which-key-idle-delay 1000
which-key-idle-secondary-delay 0.5)

Thanks me later.
>>
>>88770091
made it through, 90 pages and all. formatting and bibliography was hell lmfao
>>88770352
that sounds extremely based
>>
>https://bugs.launchpad.net/sbcl/+bug/1823442/comments/6
>asdf maintainer makes a minor change and introduces a warning to notify people to fix their .asd systems
>sbcl maintainer spergs out about monopolies
>sbcl maintainer says that asdf will never be updated in sbcl
>the retard REFUSES to change a single letter even though there's literally no downside https://github.com/edicl/cl-ppcre/pull/30
Why are autists so combatative? The change isn't even backwards incompatible.
This is the problem with the Lisp community. It's full of highly functioning autists. We need to get some normalfags into Lisp.
>>
>>88768104
>SBCL should be able to cross compile to different OSes as long as they're on the same architecture.
oh nice. i'll look into that. if not i can just setup a windows vm and do it in there
>>88768254
oh i see. is there any way to make sure it'll run 100%? i'm doing this for a uni assignment. TA said we could use any language but i want him to be able to run it as easily as possible. I guess if he uses windows that would be the best case right? since any libraries are guaranteed to be in the same places
I'm not using CFFI, so that helps
>>
>>88773655
If you're not using CFFI then the only real point of failure is libzstd:
patchelf --print-interpreter --print-needed $(which sbcl)
/gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-2.33/lib/ld-linux-x86-64.so.2
libdl.so.2
libpthread.so.0
libzstd.so.1
libm.so.6
libgcc_s.so.1
libc.so.6

I don't know how Windows would deal with this. You'd have to test it, I guess. Not using core compression would make it probably mostly portable on Windows.
Just asking him to wget the sbcl windows binary might be a viable option.
>>
>>88772595
I found it much better in terms of feedback to set echo-keystrokes to an extremely low value (so that key sequences are echoed immediately) and just pressing C-h in the middle of a sequence whenever I don't know what to do. It's better to have hints only when you actually want them, otherwise they are just obtrusive.
>>
>>88773459
The great thing about Common Lisp is that it's a standardized language, not tied to any implementation. You can just use CCL like a normal adult and leave the SBCL children screeching about nothing.
>>
>>88773459
>3 years ago
>>
>>88774472
And ASDF in the sbcl repo is STILL at version 3.3.1 from (!) Nov 14 2017 (this is 5 years ago). The latest version, 3.3.6, was released a month ago.
And of course, the autist is still at it. Notice how the issue I linked was opened 5 years ago and the last reply is from January this year.
>>
>>88774534
The current generation of the CL community is especially retarded. You will get made fun of if you go on IRC and come anywhere close to suggesting that CL just might support functional programming. No, nowadays you're supposed to be affected by some sort of Smalltalk envy and use the CLOS for literally everything, even where a simple CASE form would have sufficed.

SICL is like this and it's an unreadable mess, to the point that even old CMUCL code is cleaner.
>>
>>88774588
You posted this verbatim before many times and you're STILL wrong. CLOS is simply useful and a good way of defining abstractions. Case statements can be useful, but they are limiting. For example, to add a case statement you need to reevaluate the entire form, while adding a method doesn't require that.
"Functional programming" is a meme. There are cases where the use of recursive functions and avoidance of state is a natural way of writing code, and that is good. But a principle of avoiding state is retarded.
>>
>>88774754
>You posted this verbatim
What the fuck are you talking about? Are you some of the aforementioned "community" members who is now buttmad?
>>
>>88774766
https://desuarchive.org/g/thread/88202047/#88207143
Nice try.
>>
>>88774754
>"Functional programming" is a meme. There are cases where the use of recursive functions and avoidance of state is a natural way of writing code, and that is good. But a principle of avoiding state is retarded.
BAD CL USER, GO TO YOUR ROOM
>>
>>88774785
That wasn't even me, but I mostly agree with that post. the "Lisp is not functional" meme is one of the worst cancers to come upon Lisp, and the reason recent CL codebases are an unreadable mess. Sure, side effects are often the best way to express your problem, but it turns out, a functional solution is often the right choice. Remember that the very original paper on Lisp literally starts with the word "recursive".

The cases where dynamic dispatch as a whole (which is the whole point of CLOS) are even rarer. More often than not, it ends up committing the same mistakes as other OOP systems, which is substituting data for code. Yes, we know that code is data, especially in Lisp, but it's often not the right kind of data. A simple hash table is usually better than a million DEFMETHODs.
>>
>>88774811
Listen, I don't have anything against the functional style of programming, in fact I just wrote a recursive function a few hours ago. But writing everything in functional style is wrong. You just end up tracking state implicitly instead of explicitly. Applying CLOS to keep track of state explicitly makes logic often much simpler and less convoluted.
>>
>>88774785
>remembering one (1) anon's opinion from a fucking month ago
my sides, i was just about to reply to >>88774588 about how IRC spergs don't represent a whole language. i'm glad i refreshed first.
you are why CL is a warm corpse you fucking delusional spergoid
>>
>>88774895
>You just end up tracking state implicitly instead of explicitly
How do you mean?
In my mind the reverse is true. When you write functional programming you pass the state as an argument and return it as a value, it's very explicit. When you use side effects you give a function some argument(s) or not and it does something in the background that you can't infer from input/output.

I've had this issue just this week. I've been doing devops and I have functions that just run some cloud commands. It's very confusing and I constantly have to inspect the methods over and over again to remember what they're doing. And that's not even mentioning what a mess it has become to compose things.
>>
>>88774895
>But writing everything in functional style is wrong.
Nobody seriously advocates for this, not even Haskell fanboys. The "Lisp is not functional" meme is built upon this strawman.

With that said, it's true that early Lisp variants were imperative as fuck, and this tradition still persists in Common Lisp. I like LOOP despite what some people say (infamously, Graham argues against LOOP in ANSI Common Lisp by providing blatantly incorrect information: excluding cases such as INITIALLY and FINALLY, LOOP clauses are evaluated in the order they are written, sequentially, and the loop stops as soon as one clause reaches a termination condition).
>>
CL users really ruin everything. When Scheme or Clojure users are discussing everyone is happy... Except for the CL users who have to come in and start fights.
>>
>>88774872
>recent
Most Lisp code ever was written in imperative style. See for example most of Elisp. Especially past Lisps because they didn't have lexical binding.
Whether methods are useful or not depends on what you're doing. At it's core, CLOS allows for advanced structured programming which is generally speaking useful.
>>88774945
What you end up doing in functional style is just using the call stack to implicitly keep state.
>confusing side effects
That's a documentation issue.
>>88774913
I recalled it from my memory because anon copied it verbatim. Specifically the comment about "smalltalk envy". The same anon also posted almost the same comment two more times https://desuarchive.org/g/search/text/smalltalk%20envy/
>>
File: common-lisp.png (211 KB, 757x1000)
211 KB
211 KB PNG
>>88775006
>>
>>88775147
>discussion is about CL
>no one even mentioned the other memelangs
>anon still gets mad
kek
get over it retard
>>
>>88774978
Haskell people definitely advocate for this. It's the point of a purely functional language.
Lisp is NOT a functional language. It's a multiparadigm language that you can do some functional programming in. At no point was Lisp designed for functional programming, and it does not have features languages designed for purely functional programming have, like monads. No one denies that you can do functional programming in Lisp, but it's often not the most pleasant way of doing things.
>>
>>88775255
>At no point was Lisp designed for functional programming
I think the opposite is true though. functional programming was born from Lisp.
>>
I often hear scheme is more elegant than CL, but what’s different except that’s a lisp-1 vs lisp-2?
>>
>>88775083
>What you end up doing in functional style is just using the call stack to implicitly keep state.
How is putting things on the call stack implicit?
I don't understand at all. Please explain, one of us is very confused.
>>
>>88775858
The convention of putting a question mark on predicates and using ! instead of f
Some names are different.
It's pretty much a meme.
>>
>>88775858
when people say that, it's usually a very surface-level analysis. scheme uses real words for its syntax, there's no rplacd or terpri, so people see the pretty names and say 'oh it's more elegant'

I think both languages can be elegant and ugly. scheme for example has no built-in generics, and I find its monomorphism very ugly. but you can write beautiful code in it, same as CL
>>
File: 1633475941076.jpg (191 KB, 700x555)
191 KB
191 KB JPG
>another lisp thread ruined
>>
>>88776073
get nconc'd fag
>>
File: 1662489121553423.png (764 KB, 919x517)
764 KB
764 KB PNG
How to avoid automatic Emacs dumps into my init.el? I just want my code there.
>>
>>88776885
(setq custom-file "my-custom-file.el")
>>
>>88775255
>Haskell people definitely advocate for this. It's the point of a purely functional language.
That doesn't mean they think everything should be written in Haskell.
>At no point was Lisp designed for functional programming, and it does not have features languages designed for purely functional programming have, like monads.
You're moving goalposts. The original anon was talking about people who think you should not even write Lisp in a functional style and that OO should be used for everything.
I have no idea what IRC he's talking about but I doubt he's lying or exaggerating. For any language that supports OO, there are always a few of these idiots.
>>88776885
You have to add it to your init.
(setq custom-file "~/.emacs.d/custom")
(load custom-file 'noerror)
>>
>>88776992
To cite RMS:
>While I love the power of Lisp, I am not a devotee of functional programming. I see nothing bad about side effects and I do not make efforts to avoid them unless there is a practical reason. There is code that is natural to write in a functional way, and code that is more natural with side effects, and I do not campaign about the question.
>>
>>88775858
i hate having to use ((((labels)))) just to define an inner helper function. in scheme i can just define a function right there inside the outer function without all the extra indentation and parentheses.
that being said i'd still rather use CL
>>
>>88777898
Defining an inner helper function is frankly an abused practice. It only makes sense if it closes over variables present in the outer function, so that you don't have those arguments explicitly. In that case, an inner function makes sense since the function makes no sense on its own and cannot.

However if the function only works on its parameters and isn't affected by anything else, it should be a toplevel function, even if it's only used as a helper function. Makes it easier to test interactively, and, if you are concerned about "polluting the global namespace", you can just not export it from the package it was defined in.

LABELS is admittedly not the most elegant construct, but it's a necessity in CL since the function namespace is dynamically scoped. If the function isn't recursive, however, you can also define an inner function by merely binding a lambda expression to a variable in a LET form.
>>
>>88777898
The extra indentation and parentheses are useful, they indicate the scope of the binding. Though it is true that it may be ugly if you're nesting too many lets.
>>88778178
>However if the function only works on its parameters and isn't affected by anything else, it should be a toplevel function
Technically using flet/labels may allow for more optimizations if that matters.
>>
>>88777380
OOfags think avoiding side effects is ALWAYS pointless, though. Usually the reason is some trite cope like "dats not how hardware werks".
>>
>>88773768
just tested it, i setup a windows vm with sbcl and quicklisp and everything and compiled it, then tested on a clean windows vm and everything seems to have worked just fine. hopefully it works on the TA's computer too.
I was thinking of trying core compression to make the binary smaller, but i'll avoid it to keep it as portable as possible. thanks anon
>>
>>88776907
>>88776992
Thank you.
>>
Those of you who read mail in emacs, what do you use?
>>
>>88778669
"statelessness isn't real because some things need state" is the /emg/ version of /dpt/s "rust's memory safety is useless because one line in your codebase is an unsafe block"
>>
>>88779617
Gnus. But I don't use nnimap, I use mbsync and download it locally then use nnmail with a maildir as a source (the setup is a bit convoluted but it works really well: I get all the nice things like nnmail-split)
>>
>>88778669
Avoiding side effects IS always pointless. You're implying that side effects are a priori bad, when in reality there is code that is natural to write with side effects and code that is natural to write without side effects.
The problem with FPtards and OOPtards is exactly the same, they both think that a particular style is always applicable which is wrong.
>>
File: ded.jpg (33 KB, 680x453)
33 KB
33 KB JPG
>>88760477
I'm trying evil-mode and it's awful. It literally connects anti-human Vim keybindings with anti-human Emacs ones and makes things much worse by complicating text editing with excessive mode, keystrokes and all that shit Vim enforces on users.

I haven't yet tried spacemacs mode and probably wouldn't, because I don't think it would somehow fix awful Vim functionality. Caps Lock as Ctrl is fine as for me, Emacs keybindings are retarded in other ways than just pinky finger (like common key combinations on the opposite sides of a keyboard, e.g. C-y).
>>
>>88780256
why would you try evil if you hate vim?
>>
>>88780309
That anon told me it would save my life, so I gave it a try. So much promotion, not only ITT, deserves some attention, doesn't it.

Meanwhile, I switched on CUA mode and that's probably my best decision with Emacs after altering Caps Lock with Ctrl.
>>
>>88780256
What's your idea of "human" keybinds?
>>
>>88780465
I mentioned it: >>88780442

Ctrl+c, Ctrl+v, Ctrl+x, all easily with one hand.

Also, no monstrous long combinations for regular stuff, even C-x 1 is too long, should be just C-1.

And so on.
>>
>>88780256
Consider swapping at least one Ctrl with the corresponding Alt. That way, you can easily press it with your thumbs, which is far more comfortable.

You can also just press Ctrl in the usual positions with the side of your hand instead of the pinkie, but you need a keyboard with full sized keys for that (a laptop keyboard won't cut it).

I agree that evil-mode sucks, though. Vi-style keybindings are overrated IMHO, and I say this as a former Vim user. The point of evil-mode is allowing (former) Vim users to retain their muscle memory when using Emacs, but there is no reason to install it if you dislike those keybindings anyway. In fact, I now think that modal editing as a whole is not really that great. A proper set of modeless keybindings is better and requires less overall mental overhead.
>>
>>88777898
You can set a function cell of the symbol manually you know. The only problem let/flet/labels solve is that of scoping.
>inb4 optimizations
>>
>>88779970
>Avoiding side effects IS always pointless.
Retard.
>>
>>88780613
>The only problem let/flet/labels solve is that of scoping.
Well, what's wrong with that, though?
>>
>>88780559
>Ctrl c is easier than y
>Ctrl v is easier than p
>Ctrl x is easier than d
just accept you prefer it because you're used to it.
also try xah fly keys
>>
>>88780655
Nothing, it's just there are other way to deal with it I think, like employing function + helper .lisp files division. Which's curious, I'm going to research this.
>>
>>88780559
The problem with CUA mode is that the vast majority of key sequences start with either C-x or C-c. In particular, packages have the convention that sequences starting with C-c <letter> are reserved for users. If you are content with CUA mode, by all means keep using it, but there is a legitimate reason why it's not enabled by default.

>even C-x 1 is too long, should be just C-1.
The reason why this isn't the default is because C-1 is an unsupported character sequence on terminals/terminal emulators. Emacs was originally used on text terminals only and only later introduced an actual GUI with support with key sequences outside of the limitations of terminals. Even today, the ncurses frontend is a useful fallback for situations where you have no graphical environment, hence avoiding GUI-exclusive key sequences is an understandable default.

You can bind C-1 just fine in GUI Emacs, if you want.
>>
>>88780689
y is y, p is p, d is d, genious
why are vimfags so retarded
>>
>>88780771
y for yank
p for paste
d for delete
vs
ctrl c for copy
ctrl v for vaste
ctrl x for xut
>hahaha muh vimfags so retarded, it's definitely not that i'm just used to CUA
>>
>>88780736
>employing function + helper .lisp files division
what are you talking about
>>
>>88780736
My only issue with FLET and LABELS is that they are ugly and cause additional indentation, but apart from that, they are fine. They serve their intended purpose, which is defining local functions, lexically scoped within a specific portion of code.
>>
>>88780791
but i dont use shitty cua anon... i define c-c letter ... only bindings too
i just dont like vi-mode like editing. wtf should i remember in what state i am? modifiers do the job better
>>
>>88780798
Make a file. Write a function and its helpers there. Export only the function itself and not its helpers.
Take advantage of the filesystem.
>>
>>88780559
>Ctrl+c, Ctrl+v, Ctrl+x, all easily with one hand.
You do you I guess. I feel like CUA is overrated.
>Also, no monstrous long combinations for regular stuff, even C-x 1 is too long, should be just C-1.
Why? Also, C-u 1 already takes up this spot.
>>
>>88780838
>wtf should i remember in what state i am?
no, people that use evil have an indicator in the modeline. but its fine to dislike modal editing, just use something like god-mode instead of cua-mode if you also dislike the regular bindings
>>
>>88780605
>I say this as a former Vim user
I also fell for that meme for some time, but now I use Vim only where it belongs: headless environment or CLI quickie with a file.

I like Emacs for many things such as tons of useful packages and minimalist look, but keybindings are awful. Maybe, rebinding could work for me.

>>88780689
>mouse in one hand and Ctrl+c Ctrl+v with other hand is easier than
>muh go to visual mode muh keystroke(s) to do text selection muh y muh keystroke(s) to go to where to paste muh p or Shift+p, oh and don't forget that this buffer won't work out of Vim
I used and still use Vim (in professional environment), don't try to fool me. I prefer Ctrl+Shift+V, when I use Vim in Terminal, because it's more efficient: less keystrokes on the opposite sides of a keyboard and overall faster.
>>
>>88780892
you can just use packages
file-based scoping is a generally speaking a horrible idea. it's only justified if the compilation unit is a single file like in C
>>
>>88780946
>less keystrokes on the opposite sides of a keyboard
you a mouse sinner?
>>
>>88780946
>visual mode
>manual selection
>can't even set up clipboard support in neovim, not to mention it works on emacs by default
you are either being purposefully disingenuous or have no idea what you're talking about
>>
>>88780761
>Even today, the ncurses frontend is a useful fallback for situations where you have no graphical environment
my emacs setup is so GUI-centric that it's basically unusable in terminals
i'd rather just fire up mg if i don't have a GUI
>>
>>88781018
You can always wrap the GUI-specific parts in
(when (display-graphic-p) ...)
if you want to make your init file more portable in case you ever need to use Emacs in a terminal.
>>
>>88780809
This is real quick elisp example
(let (a b f)
(setf a 2
b 8
f (lambda (x y) (* x y)))
(funcall f a b)

If irc you can adopt this to CL as well, just define a setf macro which setf-s function cell specifically if the value's a lambda - then there's no need for funcall.
>>
>emulating a VT100 terminal in the year of our lord 2022
Why are unix faakheads so idiotic that they need to emulate hardware that was obsolete before they were born?
>>
>>88780979
Yes, indeed, I'm not an "efficiency" hipster.

>>88780998
>can't even set up clipboard support in neovim
Oh, yeah, I will set it up at every random server I'm sshing in, when I have to get some shit done.
>>
>>88781074
>flet and labels
Ah nevermind then.
>>
>>88781111
>Oh, yeah, I will set it up at every random server I'm sshing in, when I have to get some shit done.
yeah because using evil mode in emacs on your personal computer is the same as using vim on a random server
we're talking about the keybindings here sir
>>
>>88781154
I was talking about Vim is a cumbersome choice for GUI (including evil-mode), but it's good for servers to some extent.

If you use evil and you are fine, enjoy yourself. But I ate enough of Vim "efficiency".
>>
here's a concept for a shell: use a regular CL repl. instead of printing stuff just return values
for example a (list-files) function may return a list of files in the current directory, but rather than returning just a list of pathnames you can return a list of file objects, which have various attributes like mtime, size, permissions etc as their slots. then you can just click inspect on the list and inspect the files however you want
what do you think gee
>>
>>88781642
Too troublesome. I don't want to click it to see its values.
>>
cdddaadadaadaadadaadaar
>>
File: 1663948995163091.png (315 KB, 882x503)
315 KB
315 KB PNG
>>88756187
Earlier in /sci/ there was a guy was doing something with random numbers and a "Maid Book"? Does anyone know if he has a github repo or something? What is a "Maid Book" and what does it have to do with lisp? Picrel is a one of the screenshots he posted.
>>
>>88781642
>>88783251
I'd add DW/CLIM-style presentation types in the mix as well, so you could have nicely-displayed object representations that are actually linked to the underlying object, rather than just a dump of text/graphics on the screen. Try out Genera's Dynamic Listener (McCLIM has a clone, but it isn't as nice from what I remember) for a taste of what I mean.
>>
>>88784666
This looks like a shitty Forth
>>
What’s the best lisp implementation to embed in my rust program?
>>
>>88785369
common lisp
>>
emac
>>
On the notion of functional programming;
If you read Out Of The Tar Pit, they discuss programming paradigms as ways of handling complexity in software. I think it also correlates to Conway's law, but I digress.
OwOP does it by encapsulating state. FP does it by not having state, but it's a lie in both cases. You can write pure code in OOP (that's Clojure's standard library) and pass state along as an argument in FP. You can close over state and carry it around. A pathological end point for FP mentioned in the paper is a global state map passed to everything. Pure and purely useless.
It's important to look at the good parts of every idea. The dynamic and open dispatch in CLOS is a great aspect and you can use it functionally, too. Managed and responsible access to state, immutability being a default behavior, are also good.
There's stuff which neither language has, like the idea if functional relational programming in the end of the paper. There's still where to go. Instead of fighting over why X is better than Y, take the good parts from everything. Programming isn't over
>>
hey guys, in common lisp, is there a way to send something other than strings through a tcp socket (with the usocket library in this case)? i want to send bit-vectors back and forth but idk how desu. i tried converting them to strings but if the binary happens to turn into a newline somewhere, it'll cut off everything after
>>
>>88787777
You can send bytes by setting the element-type of the stream to (unsigned-byte 8)
>>
>>88787900
hmm would that work with vectors like #*101010 ?
what i was doing before was actually converting every 8 bits to a char and making the actual string from the binary, which ended up in weird symbols.
what i just came up with is (map 'string #'digit-char #*101010) which turns into literally "101010"
this would be the simplest solution since i don't have to change the any of actual socket spaghetti i have at this point. idk if it's retarded though
i'm gonna go to sleep kek it's 3 am and i think i'm done for the day
>>
>>88775083
>Most Lisp code ever was written in imperative style. See for example most of Elisp. Especially past Lisps because they didn't have lexical binding.
Yes, imperative. Not object-oriented. As it was often said multiple times, side effects are in fact often the simplest way to express a problem. Even fucking Haskell supports imperative programming using do. I use Haskell as an example because it's the most popular example of a language that sells itself as "purely functional"

However, the notion that Lisp somehow cannot possibly be used for functional programming and you should kill yourself if you ever do it is absolutely ridiculous and flies in the face of the very origins and history of Lisp.

I read LoL from cover to cover, including that one chapter where the author claims that "Lisp is not functional" and I reject the argument since it's based on retarded assumptions. What does it mean for a programming language to be "made of functions"? Yes, he really uses these exact words. Programming languages are "made" by syntax, semantics and the corresponding implementations; functions are just one possible thing they can express. Any argument based on such weak premises can be dismissed without further argumentation.

CL in particular is a multiparadigm language and there is no disputing that. It avoids getting in the way and lets the programmer choose the best approach for solving the problem. Among these paradigms, no matter how much the current CL "community" may be offended by it, we have functional programming.

What qualifies as "functional language" is ultimately not well defined in the first place, hence sperging out whenever someone claims that Lisp is or isn't "functional" is retarded. To me, a functional language is a language that allows you to write in a functional style (avoiding explicit side effects, functions only return values, etc.). And CL, like most early Lisps, certainly qualifies as a functional language according to this definition.
>>
>>88787977
>what i was doing before was actually converting every 8 bits to a char and making the actual string from the binary, which ended up in weird symbols.
If you don't really care about bandwidth, you can just print it and then read it. I.e. (print bit-vector socket-stream). Reading it is somewhat problematic though,
Otherwise you can just convert it to an integer like:
(defun bit-vector-to-integer (bits)
(reduce #'(lambda (a b) (+ (ash a 1) b)) bits))
>>
>>88787696
CLOS (and its predecessor, LOOPS) proved that bloting object-oriented programming on top of a functional language works better than bolting functional programming on top of an object-oriented language (see: Scala).
>>
Writing a 100-lines long LOOP just to make the fptards seethe tonight.
>>
>>88788417
The language it's bolted onto isn't a functional language
And it wasn't the point of the post.
Sure, there are better ways to some goals than others, the point is, what's your goal?
It's like the point in Rust is writing things in Rust? Seems like it sometimes. The point of CLOS isn't CLOS or reaching the pinnacle of OOP. The goal is generic programming, dynamic dispatch, and those as TOOLS for writing better programs. Better being more maintainable, expressive, or other quality metrics you can think of.
It's important to remember that the pissing contest is fun, but you only get wet in the end.
>>
File: 1637300148777.jpg (96 KB, 1024x862)
96 KB
96 KB JPG
>>88788581
>le lisp is not functional meme again
>>
>>88788650
You can certainly use Lisp for functional programming just fine, but it's not the default or enforced in any way.
Missing the point again. Please stay on topic
>>
I use Helm and when I try to install doom-modeline, Helm stops showing and then Emacs even can't start up properly (blank window).

How can I fix this?
>>
emacs --debug-init
>>
>>88788952
for >>88788862
>>
WTF, I installed doom-modeline again and it werks just fine. Literally the same two lines.
>>
>>88789090
that's the power of FOSS
>>
>>88788694
Define "the default".

>please stay on topic
Discussing about Lisp in a Lisp thread is on topic.
>>
what DE does /emg/ use? wmniggas need not reply
>>
>>88789924
GNOME.
>>
>>88789924
xfce
>>
>>88789924
Quartz
>>
>>88789924
bspwm + xfce tools
>>
>>88789943
>>88789958
I'll probably go for either XFCE or GNOME on my new build, but not quite sure yet. Ig GNOME is more modern and lively so I think ill go for that hmmmm. ill miss desktop icons coming from macOS though ;_;
>>
also never really been a fan of KDE, but might want to try it out again idk.
>>
>>88790236
>he likes macOS
you'll love gnome(cocks)
>>
>>88790275
I do like macOS and I do like cocks :DDD
>>
porting emacs to macjeet os was a mistake
>>
>>88784801
Is forth related to lisp? What is a "Maid Book"?
>t. codelet from /sci/
>>
>>88790418
He's a mentally ill faggot spamming random nonsense to seek attention. Summer ended so he'll be back during the christmas break. Now fuck off retard
>>
>last commit 5 years ago
>maintainer disappeared into oblivion
should I try submitting my patch anyways /emg/
>>
>>88790683
Does this board always have so much childish, directionless rage on it?
>>
>>88789924
awesomewm. but bspwm was extremely comfy.
>>
>>88791340
Just fork it.
>>
>>88791464
go back
>>
>>88790683
Sir. This is a friendly thread sir. Kindly do the needful and be friendly.
>>
Favorite games on Emacs? For me, Tetris
>>
If I'm a retarded no-coder is land of lisp an ok place to start? I've got it and a copy of SICP lying around
>>
>>88792459
https://moocfi.github.io/courses/2014/clojure/
>>
>>88792459
Land of Lisp isn't that good. Read Practical Common Lisp instead, it's free to read online.
>>
>>88792499
Practical common lisp lacks exercises, which I yesterday pointed out makes it belong in the dumpster.
>>
>>88792503
Doing your own project is better than doing exercises.
>>
>>88792585
Not strictly. The point of exercises in a book is to let you reinforce and practice things you don't know how to do, in a vacuum.
Book:
1. Description of technique x
2. Exercise to practice x only, or in the context of previous exercises

If you make your own project you
a) Might not even recognize that you can apply x,
b) Have to apply x while worrying about the larger state of your system

Of course the end goal is to write your own projects, but exercises are good at letting you focus on a very specific thing, and that is often very good.
>>
>>88792459
Well, Scheme was taught in universities back in the days before nigger Python stepped in. No problem with that.
>>
>>88792503
>Practical common lisp lacks exercises, which I yesterday pointed out makes it belong in the dumpster.
did you begin programming in the last 6 months? reading about a language is more than enough to exercise it on your own, especially lisp with all the interactivity.

at the same time I despise and envy your absolute dependence on the 'classroom' format. I had to drop out of college because I only learn stuff by experimentation and couldn't keep up with the exercise/exam/assignment bullshit
>>
>>88789924
gnome but I kinda regret it

KDE is also shit but at least it's customizable

I wish there was a real DE with emacs-like configuration (I know some wms do this, but I want something at least as comfy as xfce, graphical settings for everything and shit)
>>
>>88793158
>did you begin programming in the last 6 months?
No

>reading about a language is more than enough to exercise it on your own, especially lisp with all the interactivity.
If you already know other programming languages, yes. But this guy specifically said he was a no-coder.
>at the same time I despise and envy your absolute dependence on the 'classroom' format.
I'm not dependent on a classroom format for programming languages as I am not new to programming. The anon who was asking for advice is though, and for him exercises are important. Just as they were for me when I started out.
>>
>>88793071
>Well, Scheme was taught in universities back in the days before nigger Python stepped in. No problem with that.
Not that I disagree with you, but does not the fact that Python stepped in imply that there was a problem with that?
>>
>>88793617
No?
It's just the newest fad.
>>
>>88793617
>but does not the fact that Python stepped in imply that there was a problem with that?
Python is definitely easier, it's a school tier language, so probably that's the case. But if you are a CS student what's the problem to learn a bit harder Scheme.
>>
>>88793657
>It's just the newest fad.
You misunderstand me. I agree that Python is a fad. My point was that the argument you put forward that Scheme is fine for starter refutes your conclusion.
"Scheme used to be taught in universities but no longer" could just as well mean that Scheme turned out to be bad for teaching.

>>88793697
>Python is definitely easier, it's a school tier language, so probably that's the case. But if you are a CS student what's the problem to learn a bit harder Scheme
Agree
>>
>>88793158
Exercises aren't mandatory in a programming book but there's nothing "classroom" about them. Class learning sucks for a myriad of reasons unrelated to the fact that it's regimented.
>>
>>88793720
I'm not that anon.
It doesn't refute anything. The industry changed.
It's still used in CS courses anyways. I have a friend that does a CS degree and he had racket on the first year.
>>
>>88793617
Python is popular thanks to data """science""", thats all. Schools just go with the flow.
>>
why is upper case Lisp code so sovlful
>>
>>88794218
All upper case code is awful.
>>
>>88794041
I like how universities once dictated the directions of industry, now it's the exact opposite.
>>
File: tnMX9I.png (15 KB, 749x315)
15 KB
15 KB PNG
https://sr.ht/~vidak/uwu.el/
uwu
>>
>>88784666
As far as I know he does not have a github, and has only posted screenshots of his work. The "Maid book" is a book he is writing about a programming language he is working on, called "maid lisp". The gimmick of the book is that every page has 3 or 4 pictures of AI generated anime maids alongside documentation of the language. The language itself is not a lisp, and is not about maids but it's targeted at non-deterministic programming, whatever the hell that is.
If you're curious to see the "published" pages of the book, you should search for maid lisp in the archive, find his trip, and then look for all the pictures he's posted.
Currently though he's been working on another language, a forth clone.
>>88790418
Forth is unrelated to lisp, though they share some of their strong points (interactivity, ability to define new syntax)
so they attract some common audience sometimes
>>88790683
I find his ventures somewhat amusing. I'd like to see more autistic projects like his instead of the usual crap bait
>>
>>88794253
University dictated industry because industry wasn't big enough yet. It was an inevitable change. Though honestly Python is still a much lesser evil than most of the inane garbage that corpos were trying to force onto people decades ago.
I just wish Hy wasn't an unusable toy with broken tooling.
>>88794921
>so they attract some common audience sometimes
Do they? Concatenative languages are pretty much dead. The guy working on the only noteworthy one (Factor) got hired by Apple to develop Swift (lol, lmao).
>>
>>88795193
>Do they?
I don't know. I was trying to find a reason for why that maid anon might've switched to forth as opposed to c
Anyway I think you can still find forth code somewhere, so it's not completely dead I think. I mean, by most people's standards common lisp is dead too
>>
>>88792503
>>88792709
i actually agree with this desu
i remember reading PCL and wanting exercises. When i do a book exercise, I know i should be able to solve it with the knowledge taught so far. I don't have that if i make my own practice problems or try to do a project.
Even the "practical" sections of PCL are basically just him showing you code he already wrote instead of letting you write anything yourself.
As a beginner i much preferred reading the Gentle Introduction book since that one has a bunch of exercises after every chapter. my favorite was the program that plays tic tac toe. I'd also recommend that one over PCL for people that don't know how to code at all, since that book is made with beginners in mind and explains basic concepts like functions, and has a very good explanation of recursion. PCL just basically shows you syntax
>>
How to make doom-modeline respect the right fringe?
>>
on one thing, the unixfags are right: csp-style concurrency with channels is the best
>>
Guile is a memelang but their multithreading interface is quite nice. I wish that lparallel was just as painless as it is. Unfortunate that the maintainer went missing in 2017.
Someone should really fork it.
>inb4 just do it
I am not a good programmer.
>>
>>88796440
>the unixfags are right
What do unixfags have to do with CSP? Some unixfags think it's a good idea but CSP doesn't come from UNIX and is not constrained to unix.
>>
>>88796673
it doesn't come from unix but the original unix creators support the idea, go is based around it, even uriel listed it as the non-harmful alternative to pthreads
>>
>>88797901
>it doesn't come from unix but the original unix creators support the idea
Way to summarise everything that's UNIX.
They took a bunch of ideas from other people and stuck out big with a worse version of all of them put together, now whenever anyone designs something simple you get a bunch of fags saying it the UNIX Philosophy(TM).
>>
do you often use ftype declarations?
I feel like it's kind of awkward that you have to use a declaim rather than just being able to do a bounded declare at the start of the function, so I just do it for documentation.
>>
>>88798875
I thought you were talking about chez scheme but it's CL right? I don't know CL
>>
>do most emacs key commands with left hand
>start to get pain
>in right hand
what
>>
>>88799494
>fapping all day to drawings
>hand starts to hirt
>how could emacs do this to me?
>>
>>88799467
Yes, I'm talking about CL. Don't know what chez scheme is.
>>
emacsen
>>
File: hapiness.jpg (99 KB, 1284x1020)
99 KB
99 KB JPG
>mfw i fixed a LOOP and now my computer isn't overheating and shutting off due to zombie threads anymore
>>
iter
>>
defmacro
>>
>https://yhetil.org/emacs-devel/87pmflysdt.fsf@gnus.org/T/
>Emacs 29 coming out in spring next year
Fucking sweet.
>>
>>88806453
Multi threading when?
>>
>>88806517
As soon as Andrea Corallo fixes it.
>>
>>88806453
sweet
I can't wait for the long line fixes
unrelated but I really like the keybind boxes that were introduced in 28
>>
>>88806866
>unrelated but I really like the keybind boxes that were introduced in 28
What are these? I have missed tihs.
>>
>>88806879
if you do say C-h m the key sequences are highlighted in a box since 28
>>
>>88806935
Neat!
>>
>>88806453
>native sqlite
fucking finally
wonder what kind of org shenanigans can be done with this
>>
Anyone uses vc-mode? It seems convenient if you have to interact with multiple VC systems but I ever only use git so I just use magit
>>
>>88807454
I've been trying it out on nixie1 this weekend, it's pretty lame compared to Magit, especially if you're a Git power user. I'll give it a week or so and then probably move back to Magit. I only really care for one non-git repo (GMP), and that I exported to git and interact with via Magit anyways.

Either way it's kinda fun to use a barebones emacs with no external packages. vc instead of magit, fido-vertical-mode and occur instead of ivy, modus-vivendi instead of ef-summer, project.el instead of projectile, etc.
>>
ok I thought about it for a bit and almost no projects which matter use something other than git. Fuck it am going back to magit rn. >>88808696
>>
Is there an efficient way of copying bytes from a (simple-array (unsigned-byte 8)) to a memory region pointed to by a CFFI pointer?
>>
I'm trying to embed ECL inside C program but I have problem with strings
    char* w = "\"こんにちは\"";
cl_object x = cl_eval(c_string_to_object(w));
ecl_print(x, ECL_T);

it returns "ããã«ã¡ã¯"
any ideas how to fix it?
it works fine when I do it directly from ecl instead from c
>>
>>88809266
You must be quite new.
>char* w
Japanese characters are multibyte, char (which is a byte guyz) can't hold them. Look up widechar and unicode support for C.
I also recommend using uintXX lib to avoid the confusion.
>>
>>88809403
>the confusion
For integers of course. It's an irrevalent advice.
>>
>>88809021
I found this https://github.com/cffi/cffi/blob/master/doc/mem-vector.txt
but despite this file being last modified in the year of 2005 there are no such symbols in the cffi package or in the code in general
>>
>>88809403
then why does printf("%s", w) work fine?
>>
>>88809990
Not that anon but there's the UTF8 encoding, which is a variable encoding used by C that is easily represented as an arbitrary byte string, and there's the UTF32 encoding, which basically encodes each Unicode codepoint as a single uin32. In Lisp, since array access is always constant time, Unicode strings are generally represented using UTF32 (accessing a codepoint at a specific index is O(n) in UTF8).
So GCC puts the UTF8 encoding in the char pointer, which is then properly interpreted by things like your shell, but it doesn't work for Lisp strings.
>>
>>88798875
If you are absolutely sure about type information, you should declare it. People often forget that Common Lisp has one of the richest and most expressive type systems out there, so, for example, you can still allow values of a certain type, for example string, plus NIL by declaring VAR as
(declare ('(or null string) var))
. Apart from optimization, it also allows, more compile-time and runtime checks on types depending on the implementation, which is always welcome. Even if it's just a runtime error, it's preferable to get it as soon as you call the function rather than deep inside it: the error message itself is also usually more informative.

However, many functions can gracefully work on values of many types, so type declarations should be used with care. If it turns out that those type declarations are wrong, you end up with the same problem that statically typed languages have and need to refactor everything. I suggest avoiding declarations of any kind at first, and only introduce them later, once a certain portion of code is well tested and set in stone.
>>
>>88810640
>(declare ('(or null string) var))
you mean
(declare (type (or null string) var))
quoting the type specifier in a declaration is incorrect
>>
>>88810640
>People often forget that Common Lisp has one of the richest and most expressive type systems out there
Because it doesn't.
You can't even do parameterised types without resorting to predicates, let alone generics.
>>
>>88810710
The word "type" is superfluous if the first element of the declaration list is a type specifier.

>>88810838
You absolutely can express parameterized types. I don't understand why you think that using predicates makes it somehow bad. A type is a set of values, and, like all sets, it is defined by a predicate. Defining the type "list of fixnums" is left as an exercise for the reader.

Generics are a workaround for the limitations of static typing. In a dynamically typed language, there is no need for such a thing.
>>
>>88811060
>The word "type" is superfluous if the first element of the declaration list is a type specifier.
Actually did not know that
Quoted type specifiers in declare are still incorrect, though. This is actually my one of the most minor annoyances with CL - in all functions that take a type specifier as an argument, you have to quote it, but in most macros you CAN'T quote it
>>
>>88756187
Hey bros how can I make dired automatically update its buffer once I've created a new file in the dir?
>>
>>88811182
auto-revert-mode
>>
>>88811060
>there is no need for such a thing.
No, but there's no need for a type system at all.
You would, however, need generics if you wanted to call your types system "one of the richest and most expressive out there".
Almost every typed language out there has a way to express `reverse :: [a] -> [a]` but you can not do this in CL.
Not being able to express something that everyone else can would make it one of the least expressive, not the most.
>>
>>88811164
>Quoted type specifiers in declare are still incorrect, though.
Yes, that's true, I made a mistake.

>>88811225
>No, but there's no need for a type system at all.
That's true, but that's besides the point.

>Almost every typed language out there has a way to express `reverse :: [a] -> [a]` but you can not do this in CL.
Sure you can. DEFTYPE accepts arguments, defining the type "list of A, where A is a type" is left as an exercise to the reader.
>>
>>88811225
Generics have nothing to do with being expressive. They're a hack around static typing where because a function needs to have a declared type, you have to declare a variant of the function that returns a specific type in order to not have a different elt for each type of array.
In Lisp, a function can return any value so generics are useless.
>Almost every typed language out there has a way to express `reverse :: [a] -> [a]` but you can not do this in CL
CL has an unrelated facility called defgeneric and defmethod that does this. Though it has nothing to do with the type system, really.
>>
>>88811289
>Generics are a hack
Why would you embarrass yourself like this publicly?
>>
>>88811427
Why are static type cultists so braindead?
A simple question: what type of car return?
the c++ moronic faakhead will tell you that it should return ... whatever type you specify car to be. you want a list that can hold two different types? oops sorry not possible within our genius generic retardation
the sane cl-user will simply say: it is car, it returns a value that can be of any type. now not only you can hold two different types in one list but you can also call car instead of std::list::car<Braindamage>
>>
File: 1664113416963.png (47 KB, 212x170)
47 KB
47 KB PNG
>>88811578
>what type of car return?
A vehicle?
>>
>>88811262
>Sure you can. DEFTYPE accepts arguments, defining the type "list of A, where A is a type" is left as an exercise to the reader.
I don't think you understand how a generic works.
Let me write it out in full:
identity :: forall a . a -> a

Now here's what you can do in CL:
identity :: (forall a . a) -> (forall a . a)

Notice that the outer qualification is not preserved.
The only expressible generic type is Any.
(deftype id-type (a) `(function (,a) ,a))

;; error: wrong type
(declaim (ftype (id-type number) num-identity))
(defun num-identity (a) 'li)

;; no error, but should be since it doesn't give you what you put in
(declaim ((ftype (identity-type *) id)))
(defun id (a) 3)

This is because:
* :: (forall a . a)
(λ a . (a -> a))(forall a . a) = (forall a . a) -> (forall a . a)

There's no way to preserve an outer qualification, such as:
forall a . (a -> a)

Which specifies that a function returns the same type it takes as input.

>>88811289
>CL has an unrelated facility called defgeneric and defmethod that does this.
>unrelated
It is unrelated, but it also doesn't do what you think it does.
I'm thoroughly confused by what you meant here.

>In Lisp, a function can return any value so generics are useless.
So are type declarations by that logic. I'm not debating if CL types are useful, I'm debating if they are expressive.

>>88811225
>>88811289
I've always given dynamic type people the benefit of the doubt and assumed that they understood static typing, but had a good reason to prefer dynamic (e.g. decoupling the type system from the code like they do in Clojure).
You two are so obviously clueless about what a generic even is that I don't think you have the qualification to hold an opinion on the subject.
Just as a great many programmers do themselves a disservice by not learning about lisp and dynamic types, you do yourself a disservice by not learning about static types.
>>
>>88811705 (Me)
Last part was meant for >>88811262, but I misclicked my own inlined reply.
>>
>>88811578
I prefer dynamic types, but I UNDERSTAND static types.
The return type of car is the type if the left element of the pair you call it on, or bottom if it's no a pair.
E.g.
car cons [A, B] -> A
Go watch propositions as types
>>
File: symbolics.jpg (46 KB, 533x670)
46 KB
46 KB JPG
>>88811705
Kill yourself, haskelltard.
I'm not going to even try to decypher your meaningless spew in that shitty language, whatever the fuck -> or :: does.
>It is unrelated
It's a CLOS thing, it doesn't deal with types.
>you do yourself a disservice by not learning about static types
There is nothing to learn, because dynamic types encompass static types, you moronic retard. You know nothing about types.
>>
>>88811790
In static typing, functions must have a declared return value. Ergo you cannot make a function called car that returns a value, it has to return some type of value which is defined at compile time. This is what generics solve. Go watch your mother being plowed every night.
>>
>>88811845
There is no "in static typing"
Types are a logic program on top of your code. It can be correct, wring, incomplete or indeterminate. It doesn't fucking matter. It can be used to help compilers or optimizers, but that's besides the point of the underlying logic of the problem. Which you are blind to.
The only thing you'll ever be is a fucking retard.
>>
>>88811948
>Types are a logic program on top of your code
This is how haskelltards think programming is. They think because their language is a toy that makes you tinker with garbage concepts named after unrelated terms in mathematics they are somehow super programmers or whatever. I have never met a smart haskell user.
Types are code. They are in the code. They have logic, which is in the program.
>>
>>88811810
>You know nothing about types.
>t. can't read basic type signatures
It isn't a Haskell thing, it's just how you write types.
There are several competing styles of type description, I chose one that looks like Haskell because it is widely understood.
I'll try to demonstrate what I mean in lisp.
[1] (forall (a) a)
[2] (forall (a) (function (a) a))
[3] (function (string) string)
[4] (funcall (lambda (a) `(function (,a) ,a)) *)
[5] (function (*) *)
[6] (function (number) string)
[7] (function ((forall (a) a)) (forall (b) b)) or (forall (a b) (function (a) b))

[1] introduces the concept of qualification. FORALL takes a set of parameters and a body.
It indicates that the parameter type can be substituted with any type and remain valid.
For instance, substituting `a = string` in [1] would just give you the type `string`.
[1] is the same as CL's * type, because any type can be substituted.
[2] is the type of the identity function. Substituting `a = string` gives [3].
You'll notice that identity's output must be of the same type as it's input, since only one value

Now [4] is what you can do in common lisp, it evaluates to [5].
It would be valid to substitute the first * in [5] with `string` and the second with `number` resulting in [6]. [7] shows two re-writings of it using forall that may make it clearer why the two are unrelated.
[6] is not a valid type for the identity function since it can not return a string if given a number.
By the same token, information is lost in this definition. With the correct type in place (identity 3) can be guaranteed to be a number, but with the current type its output could be anything.
You can not express a valid type for the identity function in ordinary CL, you need a generic to do it.

>>88811998
>>Types are a logic program on top of your code
>This is how haskelltards think programming is.
It's also the thought process behind Clojure and CL and the best reason to use a dynamic language.
>>
>>88812205
>is not a valid type for the identity function since it can not return a string if given a number.
No shit.
An identity function returns any type. Giving a type to it is meaningless.
The entire purpose of the generics hack is that in static typing you have to give a type to a function. In Lisp, you don't, therefore a generic function is useless.
You are so retarded that it hurts. Here's a tip for you: just because you type many words doesn't make it any less retarded. In fact, you look even more retarded since your writing is completely illogical and incoherent.
>>
File: apu_hug.jpg (112 KB, 880x523)
112 KB
112 KB JPG
>haskellbro can't get over his type tetris brain damage
>it must be lisp's fault
every damn time.
it's ok fren, you'll be ok.
>>
>>88812361
>The entire purpose of the generics hack is that in static typing you have to give a type to a function.
You keep treating it as though the only reason to give a function a type is because you are forced to, but then what is the point of DECLAIM in lisp where you don't need a type?
The answer is because type are useful and verifiable information about code, and so having better types allows you to better describe your code.

>Giving a type to it is meaningless.
No. When you give something a type you explain a feature of it. You add meaning that wasn't there before.
The types act as a secondary layer that adds information, and a static language enforces that the information is correct.
The static verification of types is what causes the real issue with static code: the types interact with the code.
You are forced to write a function a given way because the type system needs you to. For more examples of type/code interaction see Rich Hickey's talk Maybe Not.
This is why a gradually typed system is theoretically better. You can write code that is unaffected by types, then add them as necessary for the purpose of safety and documentation.
I have to defer to Clojure's spec as the best example of this, they can release a new version of the type system and you can update to it without actually having to change any code and potentially introduce bugs.
The type system is purely a tool for correctness with no bearing on the code that you write.

>>88812444
I hope you aren't talking about me because I think that Clojure's spec is the best concept for a type system I've seen so far and it can works best in a dynamic language.
My real perspective is that a dynamic language should obviously have a type system as expressive as a static one, and this requires generics.
>>
>>88811998
Types are code, yes. They are an overlay program, like metadata, on top of your program, that runs at compile time



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.