[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

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

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


New anti-spam measures have been applied to all boards.

Please see the Frequently Asked Questions page for details.

[Advertise on 4chan]


File: 1729179448213490.jpg (554 KB, 1063x1601)
554 KB
554 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! thread-list (cons (quote >>102831826) thread-list))
>>
Hey, welcome back.
>>
File: image-30.png (146 KB, 1020x1014)
146 KB
146 KB PNG
working on reviving/rewriting cl-wayland

plan is to implement a library thats a pure lisp alternative to wlroots, similar to how smithay is w/ rust

maybe write my own wm with it, but thatd be a long while down the line
>>
I'm working on calendar integration for my note taking app, it's scary. The user's events are uploaded to public gcp bucket which can be ready by anyone, since their calendar apps need to be able to read it. I can't very well just publish their notes like that. I could show just generic data, like "You have a reminder in Disorganized, click this link to read it!". But that's not a very good user experience... Any ideas on how to solve this?
>>
>>102875898
I'm just gonna have to go the google calendar/apple calendar route aren't I...
>>
>>102875898
store a hash/id in the gcp bucket, which then is interpreted as a note by your app
>>
>>102876695
I think I've settled on having the current solution, but defaulting any text to generic info and users have to click a link to open it in the app. I'll provide an alternative for them to write a title with a big warning sign next to it, saying that this data is public.
>>
>>102876695
>>102876721
Which to be clear includes what you wrote, the link will open the app and navigate to the correct note.
>>
File: 1569016242284.gif (84 KB, 640x640)
84 KB
84 KB GIF
Scheme!
>>
I am returning to the Church of Emacs after a period of doubt.

Could someone with time and willingness on their hand give me a QRD on what is the state of packages that I should install to make the vanilla experience better.

Asking specifically because I remember that when I left there was a painful amount of things like "avy" and "vertico" and "vertical keys" or something like that that had to be installed to have nicer command buffer experience. I have no idea how much of that went into the base over the last 2 years, so I'd appreciate help. Perhaps a lot of stuff is already built-in..?
>>
does anyone know how to binary unpack a string in clojure? For instance I want the binary of this string "tilde" as a string like this "0111010001101001011011000110010001100101"
>>
I want to have some fun with ClojureDart. Which Emacs LSPs work with it?
>>
File: complementary-packages.png (154 KB, 1024x755)
154 KB
154 KB PNG
>>102877546
>Could someone with time and willingness on their hand give me a QRD on what is the state of packages that I should install to make the vanilla experience better.
I suggest following these steps found in the README for vertico.
https://github.com/minad/vertico#complementary-packages
>>
>>102877546
which-key will be included in Emacs 30, but that's not here yet, so you better get that too.
https://github.com/justbur/emacs-which-key
>>
>>102879378
It'd be nice if someone published some Elisp that does steps 1-8 as described here.
>>
>>102878363
Probably just use some Java library
>>
File: binarystring.jpg (231 KB, 1018x689)
231 KB
231 KB JPG
>>102878363
>>
>>102877546
Check this site out https://emacs.amodernist.com/
And don't just go crazy installing packages, you can get far with a small number of them.
>>
>>102881696
Not that anon, but I'm impressed by your Clojure code. I'm not that good at Clojure, but I gave it a try, and I wasn't sure how to do zero padding.
>>
File: racketcon.png (87 KB, 1029x600)
87 KB
87 KB PNG
I had no idea RacketCon happened recently.
https://con.racket-lang.org/
>>
treemacs just doesn't work for me for some reason... opensuse installed via zypper.
>>
>>102884202
I just wanna hear people get upset about Rhombus
>>
>>102884227
What happens when you try to use it?
>>
This looks amazing.
https://github.com/armindarvish/consult-omni
https://www.youtube.com/watch?v=wNH2E7iT__c
>>
>>102873389
What is the "standard" way of splitting a string in Common Lisp? There is no function to split a string in CL standard library, so its either implement your own and copy and paste it around your projects, or use a library which provides such a function, in this case, what library is the accepted standard for such functionality. I would think Alexandria, but it doesn't have such a seemingly essential function in it.
>>
>>102886080
And by "splitting", I of course mean not the taking of the substring, but the splitting at the specified characters, something like (splitstr "/wow/amazing/haha" "/") => ("wow" "amazing" "haha")
>>
>>102886080
CL novice here, but I did `(apropos "split")` from inside Lem, and a lot of functions came back. The two that looked relevant were:
cl-ppcre:split
str:split
CL-USER> (cl-ppcre:split ":" "foo:bar:baz")
("foo" "bar" "baz")
CL-USER> (str:split ":" "foo:bar:baz")
("foo" "bar" "baz")
>>
>>102886080
ppcre sir
>roman numerals in the fucking standard
>no basic string manipulation
CL sometimes is frustrating.
>>
>>102887226
>>102886206
>CL-PPCRE
Total overkill unless they want regex.

>>102886080
SPLIT-STRING is part of UIOP
>>
File: file.png (190 KB, 1707x833)
190 KB
190 KB PNG
>>102873389
its so comfy bros
pdf-tools
also, how do i prevent the lengthy file names from pushing things away like this?
>>
>>102873389
are there any packages for modern ide-like suggestions? something that will work across the board preferably
>>
>>102888289
eglot and corfu sir. or company mode. good morning
>>
>>102888395
thank you
>>
>>102888395
C-s company-search-candidates
but C-s triggers isearch
what is the next move?
i am a noob
i am sorry
>>
>>102888823
https://www.masteringemacs.org/article/mastering-key-bindings-emacs
https://www.gnu.org/software/emacs/manual/html_node/elisp/Controlling-Active-Maps.html
the answers lie within
>>
>>102888881
or M-x and write out the function manually
>>
>>102888176
care to share your pdf tools config?
>>
>>102889251
it's the defaults! If you wonder how i made the page look like that: right click -> render options -> midnight mode
like a mega amateur
would love to know how to toggle context menu options with keyboard. I will look into that
>>
>>102889399
M x pdf-view-midnight-minor-mode
i didnt realize it was just a minor mode
>>
>>102886206
How's Lem? I really wanted to like Emacs, but the cursor behaviour was too tiring to get to work the way it does in vscode. Is Lem better in that regard, or in any other particularly prominent way?
>>
>>102889477
Lem has its own weirdness. It's way rougher around the edges than Emacs. However, I found it relatively easy to customize even though I don't know Common Lisp very well. It also starts up very quickly. I haven't done much with Lem in a few weeks, but I collected my keybinding experiments here:
https://rentry.org/lemspace
and here:
https://github.com/lem-project/lem/discussions/1515
.

If you're a vi-mode user, Lem needs some work there, because many modes don't quite work right while you're in vi-mode. I tried to do a little work there, but the next steps are technically difficult, and I stalled out. I don't have the time or energy to deep dive into that rabbit hole at the moment.
>>
>>102884187
thank you, the cl format string was stolen/adapted from https://gigamonkeys.com/book/a-few-format-recipes.html
>>
https://guix.gnu.org/manual/devel/en/html_node/Sway-window-manager.html
>>
>>102873389
Loved the OP pic and the artist has some great comfy tech art.
Good one, OP.
https://x.com/goldcan6955
>>
>>102877546
What false idol were you workshopping before?
>>
>>102890040
Oh Guix, how I want to love you, you slow piece of shit.
>>
File: 1681005614343244.png (156 KB, 410x410)
156 KB
156 KB PNG
>>102873389
Word on the street is that SBCL is as fast as Rust and C. Can anyone substantiate this rumor?
>>
>>102890445
you're reconfiguring too much
>>
>>102891425
it's not

but you have to write a lot less code to achieve the same thing
>>
Lisp is dying...
>>
File: carbon(11).png (355 KB, 1666x1618)
355 KB
355 KB PNG
>>102881696
ah thank you. It is nice having knowledgeable clojure programmings giving pointers.
I had figured out another way to do this, but I am not sure if this is very clojure like.
(defn char->bin [c]
(let [bin-str (Integer/toBinaryString (int c))]
(format "%8s" bin-str)))

(defn str->bin [s]
(apply str (map #(-> % char->bin (clojure.string/replace " " "0")) s)))

Is this good?

I also have pic related as clojure code. Is that clojure code good, or can I do something better?
>>
>>102890276
>https://x.com/goldcan6955
I like this artist.
Nice find.
>>
>>102891425
I've always heard it can be in certain cases, but it wouldn't be a good idea to assume so in general.

C was basically designed such that its features map directly to commonly used patterns in binary code, so it suits the architecture well.
Lisp concepts, on the other hand, weren't designed that way. That's why back in the day there were "Lisp Machines" which had hardware architectures specifically designed for Lisp.
So I think the fact that SBCL can occasionally be made to match C performance is fairly impressive.
>>
>>102893307
How did you render your source code with this nice drop shadow?
>>
>>102894258
i think gnome adds that to window screenshots
>>
>>102894258
>>102894771
I looked at the filename and searched around for "carbon" + a variety of words, and searching for "carbon screenshot" yielded this:
https://carbon.now.sh/
>>
http://maclisp.org/
>>
>>102896624
https://sdf.org/index.cgi?sites/maclisp.org
>>
File: 1729411827828.jpg (66 KB, 750x1049)
66 KB
66 KB JPG
I like both C and Lisp.
>>
Why is modern CL style so CLOS-heavy? I tried reading up on some of Shinmera's code, but I coundln't understand any of it because control flow is all over the place since everything is a method.
>>
>tfw elisp has apply-partially
I stand by my rather unorthodox claim that Emacs Lisp, despite being often shit on, is the best Lisp. It is pragmatic and suffers from neither the oversimplification of Scheme nor the bureaucracy of Common Lisp.

All Lisps are nice at the end of the day, we still love them despite their flaws.
>>
>>102894895
I'm OP, and yes, that is what I used.
>>
>>102897191
Because it improves code extensibility and separation. Though without documentation it is easily a nightmare.
>Shinmera's
Never read or used any but there's a chance its over engineered trash.
>>
>>102897191
desu even emacs uses CL-like generic methods in a lot of libraries. CLOS is really good for some stuff, but it takes some using too.
>not functional
yep. As a schemer sometimes it feels alien.
>>
I'm trying to understand the transducer for clojure cat. Would the the equivalent implementation for "cat" be something like
(reduce concat [])

What would be the simplest example of cat being used (without using "into")?
>>
>>102896727
that's just vin diesel
>>
In CL, how can I test a system defined by asd? Most packages have test facilities but ASD is still black magic to me.
>>
>>102897191
I guess it's because the people who prefer a more functional style just use Scheme or Clojure instead
>>
>>102886080
UIOP if you only need to split on chars, if you need to split on substrings you can write your own using LOOP and SEARCH or overkill with regex.
>>
>>102897264
Every Common Lisp project under the sun includes alexandria, which has CURRY and RCURRY.
>>
File: binstrings.jpg (180 KB, 1080x601)
180 KB
180 KB JPG
>>102893307
Looks good to me, the question is if and how you want to handle non-ascii characters.

My custom padding function pads everything up to the next byte boundary, whereas (format "%8s") will only pad single-byte characters.

There are also speed differences. Criterium tells me binary-string needs 2μs on my machine to convert a small string, while str->bin needs 4μs and the version that uses cl-format needs 180μs.
>>
>>102891448
I wanted to use it for some ephemeral VMs templates but the installation and upgrade process is too slow. Last time I tried, I was able to install Gentoo much quicker than I could Guix.
It's bizarre how slow the mirrors are considering it is a GNU project.
>>
>>102893208
Lisp has been dying for longer than some languages have started and died down, like VB, Pascal, Delphi, Ruby and etc.
>>
>>102891425
Let me guess, you saw this ?
>>102888930
>>
>>102898314
Fuck off with your overly spicy cuisine, Rajesh.
>>
>>102898379
>clojure slower than python
>babashka slower than everything by a large margin
sars..
>>
>>102898434
You can use Clojure with GraalVM though, although babashka should leverage that, but dunno. I am an amateur.
That's an one year old benchmark now and probably not optimized, we also have updated versions of all of these languages, including Clojure.
To me the the greatest surprise was seeing pure Clojure competing with CPython.
https://github.com/niklas-heer/speed-comparison/blob/master/src/leibniz.clj
>>
>>102898565
So, yeah, I don't think it was using GraalVM at all.
Also they are using Java 19.
https://github.com/niklas-heer/speed-comparison/pull/113
>>
Usually emacs repls allow for C-up/down to go back/forward in history. SLY seems to lack that, is there a config I am missing?
>>
File: speedcomp.jpg (404 KB, 853x1039)
404 KB
404 KB JPG
>>102898612
>I don't think it was using GraalVM at all.
not only that, they don't compile the Clojure code at all before the benchmark, so a good chunk of the time is spent compiling the program:
https://github.com/niklas-heer/speed-comparison/blob/master/Earthfile#L132
>>
>>102899489
also they use clj instead of clojure as the shell command, so they're starting rlwrap for no reason
>>
>>102898565
>babashka should leverage that
It does. Clojure on graalvm is not expected to be faster, just like java on graalvm is not expected to be faster. It's about memory usage and startup time. For long-term performance the JIT makes u huge impact and that doesn't exist when you use graalvm.
>>
>>102899489
>>102899543
If you check the issues most of the code is unoptimized, so it tracks. In the end the idea was OK but the execution was faulty at best.
>>
>>102899704
Yeah but the program is running in a matter of seconds so a faster startup should make all the difference.
>>
>>102898233
But that doesn't explain the outright abuse of OOP.

It's true that CL is less opinionated and idiomatic code tends to use explicit assignment more often (althrough you still have your MAPCARs and all if you want), but that doesn't explain the recent ridiculous spike in CLOS use.

Even Java codebases are easier to follow than this.
>>
>>102897481
>Because it improves code extensibility and separation.
More often than not, in practice it ends up just being a single function written in separate pieces instead of one single block. Even RMS pointed out something similar on the Emacs mailing list a while ago.
>>
>>102899930
show examples instead of crying around nigger
>>
File: 1000rounds.jpg (355 KB, 879x910)
355 KB
355 KB JPG
>>102899861
that's true, doing only 1000 rounds instead of 100000000 shows that Clojure incurs a huge penalty because of the startup time.

Running the function from a repl and benchmarking it with criterium still gives me a speed about 4 times slower than Java, though.
>>
>>102899930
>press M-.
>see all methods
Oh no! So difficult!
>>
>>102899954
Not a problem limited to CLOS code though.
>>
>>102900087
The fact that Python is giving a different number compared to the others from the 3rd decimal place(or whatever it's called in English) is triggering me.
>>
>>102899954
The single function is impossible to extend from the outside.
+ is polymorphic in CL, yet you cannot define it on your own types.
>>
>>102900087
>Running the function from a repl and benchmarking it with criterium still gives me a speed about 4 times slower than Java, though.
imo this is Clojure's biggest weakness. I love it to death but its lackluster performance does prevent some applications. Surprisingly, Roc, a functional language, is shaping up to be the fastest language with a GC ever created, but Roc also has its own runtime and static types.
>>
I'm confused how apply works with &rest arguments:

* (apply (lambda (x y &rest z) (list x y z)) 1 2 '(3))
(1 2 (3))
* (apply (lambda (x y &rest z) (list x y z)) '(1 2 3))
(1 2 (3))


Does apply examine the argument lists (1 2 (3)) and ((1 2 3)) such that z is bound to (3) in both cases?
>>
>>102901749
Two things happening here:
&rest collects the rest of the arguments into a list.
In the case of apply, if the last argument is a list, it will be spread as the arguments for the function. So '(1 2 (3)) gets spread to '(1 2 3) and &rest collects 3 into a list again.
>>
>>102901749
Apply unwraps the last argument it gets as a list. So the first function gets called with args 1, 2, 3. And the second function gets called with args 1, 2, 3.
They're the same. Which is why the output is the same. The 3 is wrapped in a list in the output because it's given as the rest arg.
>>
If I include
(use-package python-mode
:ensure nil
:hook (python-mode . electric-pair-mode))

then electric-pair-mode is also enabled for non-python modes. Why dis?
>>
File: 1711668374435133.png (133 KB, 400x400)
133 KB
133 KB PNG
>>102901895
>>102902609
Thanks anons, that explains it
>>
>>102899277

good morning sars, help here pls?
>>
Guys, it's happened. After six months of daily Emacs use, every other text editor is unbearable.

What happens after 12 months? I'm thinking of learning Vim motions at 12 months.
>>
>>102904661
save yourself the RSI and learn motions now
>>
>>102904692
NTA, but what would be the best package to learn Vim motions? I've seen Evil is quite popular.
>>
>>102904750
Surely the best is the actual fucking Vimtutor?
>>
>>102904750
evil-tutor
>>
>>102904692
would something like meow also work?
>>
>>102905359
meow looks pretty solid from what i've seen yeah, been thinking about trying it out myself
it requires slightly more keypresses than vim because of the way it does things but it's not a big deal
>>
Regex, string shit and processing data is so annoying in CL. A billion maps and loops. I must be spoiled by Perl... Everything else is cool
>>
>>102898379
I'm happy to see Julia near the top.
>>
>>102905391
>it requires slightly more keypresses than vim because of the way it does things but it's not a big deal
The defaults kind of suck because I think they went a bit overboard trying to make everything use selections. For example the way you move to the end of the line is to select the line, then move to the end of the selection.

But you're not stuck doing it their way. It's super easy to just bind a key to move straight to the end of the line like in vim.
Right now I kind of have something in-between. I have a lot of the keys working like vim, but the movement keys still do highlighting (kakoune style). I think it's kind of neat.
Meow is super easy to customize. The only thing I can't figure out how to do is emulate the "repeat" functionality of vim so that it can actually repeat inserts.
>>
>>102899277
It might be on M-n and M-p. Do `C-h f sly-mrepl-previous-input-or-button) while you're in sly and see what it's bound to.

PS: Lem defaults to M-n and M-p in its CL repl too. That threw me off, and I ended up rebinding them.
>>
>>102905692
>>
>>102905867
that worked. Thanks man it was driving me insane.
>>
>>102905787
Yeah if you discount the 1h of compilation, it's pretty fast..
>>
>>102905940
A lot of times when I can't find the keybinding I'm expecting, I'll hit `C-h b` and scan through the list to see if something pops up. Also, doing `C-h f` and trying to guess a likely function with assistance from the completion system can help you find the answer.
>>
>>102905997
I've tried various combinations of 'repl' 'forward' 'back' 'previous' ... in C-h a, but failed. Sly has some weird names too. Learning something everyday I guess.
>>
>>102898379
>CL code
(defun leibniz (rounds)
(declare (optimize (speed 3) (safety 0) (debug 0))
(fixnum rounds))
(let ((ans 1.0d0)
(sig 1.0d0)
(end (ash (1+ rounds) 1)))
(declare (double-float ans sig)
(fixnum end))
(loop for i of-type fixnum from 3 below end by 2
do (setf sig (- sig))
(incf ans (/ sig i)))
(* ans 4)))

>le safety 0
>>
>>102905959
Julia is definitely not for slow computers. They've made significant improvements on compilation times over the years though. Also, if you want to take advantage of multi-threading, clusters, or GPUs, Julia has a lot of support for you there whereas this kind of performance-related code is non-existent in a lot of languages.

One recent example for me is when I looked at Julia's take on Clojure's transducers, and they have an example where you can take the same transducer and run it on a single thread, multiple threads, or a cluster. I was impressed.
https://juliafolds.github.io/Transducers.jl/dev/tutorials/tutorial_parallel/
>>
>>102906016
Sometimes it's tricky.
Weird names don't help when you're trying to guess.
>>
File: 91k+z19EIzL.jpg (652 KB, 2133x2560)
652 KB
652 KB JPG
Finished this book. Where to learn more about functional programming in Clojure? I want to use map, reduce, transduce, etc., higher order function stuff?
>>
>>102882977
>https://emacs.amodernist.com
very nice
thanks
>>
>>102905593
>Regex
Can you give an example of what is easier in Perl? Is it just the verbosity of CL-PPCRE that you're finding annoying?
>string shit
Yes. CL comes from a time not long after lisps first got proper string types so it is lacking.
>processing data
>A billion maps and loops
Does Perl have a nicer construct for applying some form of a function over data?
>>
>>102906027
>nooo but muh microbenchmarks
Once again a good example of why ubenchmarks suck. You'll never win without
(safety 0)
because otherwise you're just doing extra work for no point because it only has to run on a single input but if you do run it as unsafe then you're misrepresenting the safety features everyone should expect out of a language.
C is truly the ubenchmark master in 2024 and humanity is suffering as a result. I honestly believe computers would be faster if writing software was limited to safe languages because then we wouldn't be loosing so much performance and collective engineering time to hardware and software security mitigations.
>>
>>102906558
https://moocfi.github.io/courses/2014/clojure/
>>
So anons. Should I do my masters? Anyone here who enjoyed their honours but regretted following through to masters?
>>
>>102908680
Perl is very ergonomic in this context because of "default" variables like $1,$2,$3, $_.

For example:
if ($date_string =~ /(\d{4})-(\d{2})-(\d{2})/) {
my $year = $1; # First capture group
my $month = $2; # Second capture group
my $day = $3; # Third capture group
...

In pprce it would be something like:
(register-groups-bind (year month day) ("(\d{4})-(\d{2})-(\d{2})/)" date-string)
(list year month day))

Right? Just feels weird. But my brain is used to Perl.

Perl is ugly as shit but for strings and regex it is king.
>>
File: bomberman.png (451 KB, 553x600)
451 KB
451 KB PNG
>>102906558
you can probably find something here:
https://gist.github.com/yogthos/be323be0361c589570a6da4ccc85f58f

This helped me understand what transducers are:
https://ianrumford.github.io/clojure/transducers/reducers/2014/08/08/Some-trivial-examples-of-using-Clojure-Transducers.html

I practiced using higher-order functions (and everything else in clojure's core library) by doing programming puzzles like Advent of Code, see:
https://odysee.com/@Litraly:0/aoc2022:4
>>
>>102909976
I was going to enroll in a "biodiversity and conservation" masters, coming from an engineering background, but I was called by the govt to work in IT in my third world shithole.
I regret not doing it, I really liked what I was going to study, but the money unfortunately is worth it right now.
>>
>>102911527
That sounds like quite a change.
>the money unfortunately is worth it right now.
The only reason I'm trying to convince myself to just get a job.
>>
>>102910393
I think I see what you mean, though for your example the CL version is more concise. Am I right that the Perl version gives you an alternate block if it doesn't match "for free"?
>>
>>102911995
>Am I right that the Perl version gives you an alternate block if it doesn't match "for free"?
I do not think so, but the variables $[1-n] are automagically fitted to the capture group of the regex in the correct lexical scope. There are lots of things like this that makes perl really good for text. I think I could call it
if( =~ /regex/)
{
stuff
}


and it would still work because most functions operate on $_ or @_ when given no argument.
>>
does anyone know a way using org-agenda or something to have set tasks for different 'types' of days? i.e. have specific groups of todos i can add together for instance on a day i'm not working like read 2 hours and go for bike ride. and on days i am working like read 30 mins?
>>
Sell me on terminal Emacs. I already disable virtually all of the Emacs GUI.
>>
>>102915076
starts slightly faster

no need to configure fonts

can use on your phone via termux

themes look less busy

emacs doesn't mess with your x11 clipboard
>>
File: regex.jpg (218 KB, 2019x491)
218 KB
218 KB JPG
>>102912187
seems to me like something that shouldn't be too hard to implement via regex
>>
>>102915567
>via regex
I mean via macros
>>
Are there any good lisps for making basic GUIs with?
I was trying to make something with cljfx earlier, but at this point it's just too frustrating to work with and the stacktrace's pretty unhelpful since I can't tell what it's actually bitching about.
I'm assuming this's just a Clojure problem because there's not much info about this kind of thing online but I haven't heard much about making GUis in any lisp dialect either, so I'm wondering if there's anything out there that can do me some basic buttons and/or text/image representations?

I'm thinking of just doing the backend in Clojure since it's got lots of libs for stuff I want to do, but doing anything graphical in it's like getting a circumcision.

I've been giving a look at Common Lisp and Janet since they seem to be the most 'practical' lisps after Clojure and have bunch of gui libs, but I'm not actually sure if it's any greener on that side, either. e
>>
>>102915076
Why not both?
I use terminal emacs for quick on the fly file editing when I'm already browsing in a terminal. I have "e" as an alias to start "emacsclient -nw".
For anything else I use gui emacs.
>>
Why are there no real "barebones" distros anymore? Doom and Spacemacs are great, but they are very huge. I made my config by going through witchmacs, but it's now 5 years out of date and things have changed a lot since then. I think yukimacs was a good successor to it for a bit but as far as I know the author has moved to doom. Are there really no other cute and funny barebones distros to hack your own config from?
>>
>>102916606
clojuredart
JanetUI
gtk bindings for cl & scheme
>>
>>102916822
there are, they are just called emacs.
In my ubuntu I get it with
>sudo apt install emacs
good morning sar
>>
>>102916822
I'm gonna be honest, I've never really bothered learning how emacs works. I just install doom and uncomment what I want from doom.el or whatever it's called, and I'm good in that regard.

What're the actual benefits toe be reaped from going barebones other than faster startups? Maybe it's because I've never actually bothered reading the damn manual, but I really don't see what the point in customizing beyond getting SLIME, CIDER, or w/e is. Like, sure, you can do some funny shit on emacs like use it as a music player, a web browser, or whatever, but to me it's basically just a fancy text editor for lisp.

If you want a skinny emacs, I'd probably just go with vanilla like that other fellow said. Personally I find emacs without evil mode to be nigh-unusable but to each their own.
>>
>>102918615
>What're the actual benefits toe be reaped from going barebones other than faster startups?
unless you put significant effort into optimizing for startup performance you're actually not that likely to end up faster than doom
i copy pasta'd a ton of things like defer-incrementally from doom and only ended up with a .1ms faster launch than my doom setup that had a couple hundred more packages
>>
>>102918648
Well, shit. What the hell's the point then?
Doom seems to make the endgoal of "edit text files" pretty dead simple.

To the point I don't know how to do simple shit like use org-mode or put links to other files within files, but it all works well enough for me.
>>
>>102918770
>What the hell's the point then?
I guess if you don't like evil then rolling your own config makes sense.

personally I used a custom config for like 2 weeks, then I went back to doom.
>>
>>102915076
>I already disable virtually all of the Emacs GUI.
Menu bar is actually nice. I made a dropdown with a bunch of common commands like opening certain files so I can do more before reaching for the keyboard to type.
>>
>>102919202
>before reaching for the keyboard to type
I hardly ever use the mouse
>>
>>102918615
>What're the actual benefits toe be reaped from going barebones other than faster startups?
Doom is such a bloatfest. The core loads literally hundreds of packages to do.. not much. It would be much better if it just changed some settings and offered preconfigured packages instead of the layers upon layers it currently is.
Back when I used Doom I would have problems semi-regularly so switching to my own config it was both more stable and easier to debug.
>>
>>102919412
>doom
just werks on my machine
>>
>>102884202
>Clojure
>Gregor Kiczales
I learned Racket in his class.

I'm building some small internal tools and currently creating a proof of concept in Clojure (Babashka more specifically). I haven't touched any Lisps in over a year, but was surprised how quick it was to get productive.
>>
File: cjcc.png (214 KB, 2216x1184)
214 KB
214 KB PNG
CL sirs?
https://github.com/jabbalaci/SpeedTests
>>
File: 20230812_215402.jpg (463 KB, 1058x1453)
463 KB
463 KB JPG
>>102918615
>>102918985
I use evil with my custom config.
As >>102919412 mentioned, Doom is a bit of a bloatfest, and has "Doom" ways of doing things. If you are happy with the defaults, it's great, but if you are using a lot of your own packages, especially the kind that require you to write some elisp for them, they can cause conflicts with the Doom core. When that happens, it isn't an issue with your config but a Doom community issue, which is harder to resolve.
As for speed, I have handwritten every bit of mine and it's faster than Doom.
What I'd like to see is a set of sane, community-approved defaults in a barebones "distro" for others to use. No arcane elispery, no opinionated defaults, just a number of use-package statements that would at most enable the packages in the `:config` clauses.
>>
File: 1729596220363.jpg (334 KB, 1280x1726)
334 KB
334 KB JPG
Lisp was originally "worse is better" as well before history was rewritten to rationalize the downfall of Symbolics.
>>
>>102924310
a) What does it make C then?
b) What was the first "the right thing" language then?
>>
>>102916822
>Doom and Spacemacs
Are there any distros that people take seriously other than these?
>>
>>102924964
>>102916822
Distros are dying out as the built-in packages are becoming better and better. I wouldn't recommend them anymore.
>>
>>102919202
The menu bar is a clutch. If you really need it, C-Right-click.
>>
>>102922147
Is this bait? The majority of the line count different is due to the bracket style.
>>
>>102922147
sbcl --script

Including the compile time in the run time, very smart!
>>
bump.
>>
File: munchhausen.jpg (70 KB, 804x332)
70 KB
70 KB JPG
>>102922147
that test seems even worse than the leibniz one, but hey at least Clojure isn't doing hilariously poor

>>102925125
the test is about speed, not lines of code
>>
>>102922147
>guile
>148 secs
it's over
>>
>>102922147
>The term "Munchausen number" was coined by Dutch mathematician and software engineer Daan van Berkel in 2009,[2] as this evokes the story of Baron Munchausen raising himself up by his own ponytail because each digit is raised to the power of itself.

Aww too bad, here I thought that there's an interesting Munchhausen about him claiming to be a famous mathematician
>>
>>102922147
>Benchmark date: 2022
>>
How the fuck do I use CLSQL?
>try to make a real application in CL
>get fucked
>>
>>102924713
I would say C is the second worse is better language.
Fortran > C > C++ > Java > Javascript is the timeline of worse is better languages.
You notice them because it's the languages "everyone" uses to push shit as fast as possible.
The first right thing language was Algol.
>>102924310
Lisp could have been a worse is better language if it was made to run everywhere from the beginning rather than Lisp Machines. A simple garbage collected language with the ability to extend it with whatever you wish without having to buy one of those very expensive compilers for language extensions.

Source: https://yosefk.com/cgi-bin/comments.cgi?post=blog/what-worse-is-better-vs-the-right-thing-is-really-about
>>
>>102888176
>pdf-tools
Based (on .pdf)
>>
>>102916822
crafted emacs is a nice “starter kit”. it’s intent is to help you jumpstart a configuration and eventually become unnecessary. as opposed to doom or spacemacs which lock you in and are much heavier.
should be in the sticky desu.
>>
>>102908735
>>102910507
Thank you bros
>>
>>102915076
>terminal Emacs
why tho
>>
How do I start using asdf while developing?
Currently I just have a bunch of quickload imports at the top of my files.
Is it possible to remain in "iterative" development while using asdf?

by that I mean
>write code
>test in repl
>modify
>test
>modify
>>
>>102933306
I also find that the SQL libraries for Emacs are terrible, particularly Microsoft SQL Server.
>>
They say that clisp doesn't have runtime compilation, but what about eval? Isn't that literally the same fucking thing?
>>
>>102940346
I don't know about how clisp works, but I think what people mean by runtime compilation is actually compiling the function to bytecode and then running it.
SBCL does this.
>>
File: 20241023.png (133 KB, 1610x764)
133 KB
133 KB PNG
>>102873389
Gonna drop `as' and `ld' from my compiler backend and just emit machine code (for armv7 and i386 initially), basically the program just prepends elf headers to a lisp vector of instructions. The aim is only needing a lisp interpreter to run the compiler
>>
>>102933433
>Fortran > C > C++ > Java > Javascript is the timeline of worse is better languages.
Does Python fit in here too?
>>
>>102943693
No. The premise of "worse is better" is that it's easy to implement everywhere.
>>
wish I had found out about cljr-move-to-let sooner
>>
why would you want to use
guix home
? what advantage does that have over using
guix package
with a manifest?
>>
>>102938200
good morning sirs?
>>
i just spent 1 hour working on a leetcode easy problem in cl and i'm not done yet
learning new languages is fun
>>
>>102946566
which one are you working on?
>>
>>102943693
Python had all the conditions for a worse is better language.
Maximizing dev productivity to rush shit that barely works.
Implementation that just worked that could be fixed later.
Then Guido decided to do the Right Thing and did Python 2 to 3, to do things the right way as he saw fit, and deprecated a whole lot of shit, and now Python is just a frontend for ML backends. Whatever programmers they could steal from Javascript, they lost them to Go and Javascript.
If ML wasn't a fad then Python would go down.
So no, Python is not worse is better and it's not the right thing either because it flipflots between them.
>>
>>102940346
>clisp
why
>>
>>102940275
>Microsoft SQL Server
It's ogre
>>
>>102940275
>I also find that the SQL libraries for Emacs are terrible
Agreed, at the same time I find that SQL clients are terrible so I don't know where I land. I've been using datagrip for about a year now and I just can not stand this shit, but it's just hanging on as "I just want to run this SQL command and datagrip is already set up".
>>
Parentheses are annoying to type when you have an IBM keyboard instead of a Symbolics keyboard.

If Common Lisp had had the sense to switch to square brackets as the main delimiter, it would've become more popular.
>>
>>102951152
>>102940275
for just querying and non-gigantic tables I just use org-mode babel.
>set connection parameters as headers
>execute sql
>result is already a nice org table
>>
>>102952270
>parenthesis in same position
>shift in same position
So... what is easier about it?
>>
whats the best scheme?
>>
>>102952270
programmer dvorak is one of best meme I fell for. I didn't even know about Lips back then.
>>
File: pasokom.jpg (244 KB, 652x861)
244 KB
244 KB JPG
>>102953167
>So... what is easier about it?
the pair of parentheses above the Return key, which can be typed without having to press shift.
>>
Ok CL-chuds, installed quicklisp.
ASDF does not find my systems.
Manual says that I should put:
>(:tree "~/projects/LISP/")
In ~/.conf/common-lisp/source-registry.conf.
Now sbcl won't but with:
(UIOP/CONFIGURATION:REPORT-INVALID-FORM ASDF/SOURCE-REGISTRY:INVALID-SOURCE-REGISTRY :FORM (:TREE "~/projects/LISP/hello/") :LOCATION #P"/home/myuser/.config/common-lisp/source-registry.conf")
error finding frame source: Bogus form-number: the source file has probably
changed too much to cope with.
source: NIL


I will kms
>>
>>102954177
won't boot*
>>
>>102946588
why, the very first, two sum. given a list of integers and a target number, get the index of the two elements that sum up to the target
took a while because i took several unnecessary detours but i got there. that's fine though, it was enjoyable

(defmacro dolist-with-index (input-list index item &body body)
`(do ((,index 0 (1+ ,index))
(,item (first ,input-list) (nth (1+ ,index) ,input-list)))
((> ,index (length ,input-list)))
,@body))

(defun two-sum (input target)
(let ((newtgts (mapcar (lambda (x) (- target x)) input)))
(dolist-with-index newtgts i item
(let* ((elem-removed-input (removed-nth input i))
(nextitm (position item elem-removed-input)))
(if nextitm (return (cons i nextitm)))))))

(defun removed-nth (input idx)
(let ((bunga (copy-list input)))
(setf (elt bunga idx) nil)
bunga))
>>
>>102953872
>programmer dvorak
Just use regular dvorak, it's what I do.
It would make more sense to keep the numebrs in order and just change the shifts if you really need to have open square/curly/parens on the left
>>
>>102954766
>defmacro
It's fun to write that in exercise but you rarely rarely rarely want to make your own macros in real code.
>>
File: lcars.jpg (510 KB, 981x2147)
510 KB
510 KB JPG
>>102954766
not sure I understand what your macro does, I'll have to look at it when I have a bit more time.
Anyway here's my version in Clojure:
(defn twosum [target nums]
(reduce (fn [m x] (if-let [i (m (- target x))]
(reduced [i (count m)])
(assoc m x (count m))))
{} nums))
>>
>>102933306
Are you the same guy I told last thread to just use postmodern?
>>
>>102955119
>screenshot
That's literally the worst thing I've ever seen in my life
>>
>>102940410
SBCL compiles to native code. It does have an interpreter but it's not enabled on default builds AFAIK.
>>
>>102954766
>dolist-with-index
Learn about the power of LOOP
>>
>>102954177
Try
(:tree (:home "bla/bla/bla"))
>>
>>102956206
I like it, but I'm also a 40 year-old boomer who grew up with star trek
>>
File: 2024-10-24_13-43.png (263 KB, 1677x1020)
263 KB
263 KB PNG
i've implimented most of the functionality as laid out in the "wayland-util.h" header file for the wayland primitives that will be used by the scanner, wrapping up the way pointers (mostly) in utility classes and macros.

working on the wayland-scanner now, with the plan being to rely on cffi as little as possible in the generated code.

sort of at a standstill in terms of implimentation until the scanner is complete as the impl of the server and client will depend on the generated code rather than anything specified in libwayland.so files.

here's some of what i've gotten with defining scanner classes so far, and some testing of the `with-wayland-object` type macros im using for safe allocation and deallocation of foreign memory.

once the scanner is done the rest should flow relatively smoothly as i'll be out of ffi hell

a lot of the defuns would probably work better as methods, but i am not that well-versed in CLOS so i'm not really sure how to define methods properly. might take a break on this somewhere down the line to get a bit better at CLOS, then come back and refactor the base code while it's still manageable
>>
File: IMG_3761.gif (1.21 MB, 498x372)
1.21 MB
1.21 MB GIF
>>102958207
i need a way to write lisp on a tos era computer.
>>
>>102958487
http://www.opost.com/dlm/#teco
>>
>>102946063
modularity. you can use the same guix home config across multiple machines, or multiple guix home configs per user on a multiuser machine.
i don’t think there’s any drawback to just using the system profile though if you don’t think it’s necessary for you.
>>
>>102956189
this is my first time bitching about this.
>>
>>102940275
I thought the SQLite functions that came with Emacs 29+ were reasonable.
>>
>>102959040
not the system profile, a manifest file with all the user profile-specific packages you need. this can also be used across multiple machines since you just do
guix package -m manifest.scm
or whatever.
i just find it very confusing, both commands install to different locations in your home directory, so you need to source 2 different environment variables.
>>
File: layout2.png (39 KB, 950x550)
39 KB
39 KB PNG
>>102953872
Yes, I also make use of AltGr, like altgr+e for (
>>
>>102953872
>7531902468
?
>>
>>102959623
ohh i think you just can’t do services through a manifest file?
>>
File: file.png (133 KB, 742x742)
133 KB
133 KB PNG
alright anons iv done it, iv installed emacs for a few reasons none of which were for elisp, i can use elisp for basic configuration, but im noting interacting with it as a programing language. iv never used a lisp, im a proud Ctard, should i bother learning? sell me on it, why do you use lisp? whats its strengths?
>>
>>102961713
learning elisp just to configure emacs is a valid reason desu.
>>
>>102961713
Part of learning how to use Emacs well is learning how to ask it questions. For example, suppose you wanted to know what the keybinding `C-x 3` did. To find the answer, you'd hit `C-h k C-x 3` and it would tell you that you'd find that it's bound to the function split-window-right. Notice that the function also has some documentation attached to it.

Now try hitting `M-x ielm`. That gives you an Elisp REPL you can type expressions into. Try typing:
(split-window-right)

and hitting enter (or RET in Emacs parlance). I think it's kinda cool you can interact with Emacs this way.
>>
>>102962395
>>102963277
im aware of its use in configuration (and self documentation) but im more so interested in what its like as a language generally, not just calling fuctions, but actually writing them, and not just elisp but the whole extended family of lisp-like languages emacs is just giving me a reason to wonder.
>>
>>102961713
Just go use Emacs with your current knowledge. It's fine to just copy paste and learn the basics. If you one day want to write something you can learn elisp then.
>>
>>102961713
https://nyxt-browser.com/article/why-lisp.org
>>
>>102961713
The minimal, almost mathematic syntax
The program structure that's very close to your parse tree
I think lisp is a gentler introduction to functional programming than, for example, haskell.
>>
>>102966180
thank you this look like what i was after will have a look.
>>
I want to make a game in lisp that targets the web for the lisp game jam (can also be WASM or WebGL). Ideally I want it to be run by anyone through static hosting. There is a game engine called CLOG in Common Lisp that seems too advanced for me. Besides that and Clojure (which seems to be for the JVM), are there any other options?
I'm new to Lisp so I'm not trying to win a prize, just do something fun with the language.
>>
>>102968637
(+ LÖVE2D                               ; https://love2d.org/
LÖVE-Web-Builder ; https://schellingb.github.io/LoveWebBuilder/
Fennel) ; https://fennel-lang.org/
>>
>>102968637
https://buttondown.com/tensegritics-curiosities/archive/game-tutorial-in-clojuredart/
>>
>>102968685
Thanks this looks interesting.
>>102969299
I've used Flutter for web and mobile in the past. I think it's decent for mobile but kind of ass for web.
>>
>>102968637
There's this for Guile Scheme, if you're not allergic to certified trannyware:
https://www.spritely.institute/hoot/
https://spritely.institute/news/hoot-wireworld-live-in-browser.html
>>
>>102969593
It's mainly code'd by 2 guys
Looks based 2 me desu
https://gitlab.com/spritely/guile-hoot/-/graphs/main
>>
File: aya.jpg (79 KB, 640x480)
79 KB
79 KB JPG
>>102969820
>David Thompson
now that's a /g/entooman I haven't seen in a while
https://desuarchive.org/g/search/username/davexunit/
>>
>>102967331
>I think lisp is a gentler introduction to functional programming than, for example, haskell.
Absolutely, except for the fact that most lisps are not functional at all by any useful standard.
>>
>>102971063
And to clarify, Clojure is one of the lisp FP champions.
>>
In CL how can I just use the symbols of a package? Like
>execute
instead of
>postmodern:execute
?
I am using quicklisp btw
>>
>>102971399
>Trying to get rid of namespaces
Don't do it.
>>
File: aliases.jpg (139 KB, 431x651)
139 KB
139 KB JPG
>>102971399
surely there's some way to makes aliases so you don't have to type as much...?
>>
>>102971399
>>102972337
(defpackage #:blabla
(:use #:cl)
(:local-nicknames (#:pg #:postmodern)))


Or if you love conflicts:
(defpackage #:blabla
(:use #:cl #:postmodern))
>>
>>102972394
You can also :IMPORT-FROM
>>
>>102972394
>>102972337
>>102971415
thank you sirs
>>
Guise help me! I'm going insane. I just installed doom emacs where C-I and C-O should work like in vim but only the later works.

>C-h k C-O
>better-jumper-jump-backward is an interactive and natively compiled function defined in better-jumper.el.
>Key Bindings
>eglot-mode-map <normal-state> C-t
>esc-map ,
>evil-motion-state-map C-o
>global-map M-,
good!
>C-h k C-I
>indent-for-tab-command is an interactive and natively compiled function defined in indent.el.gz.
>Key Bindings
>global-map TAB
not good...

>evil-motion-state-map is a variable defined in evil-states.el.
><C-i> evil-jump-forward <- doesn't work
>C-o evil-jump-backward <- works

Where do I go from here?
>>
>>102971399
You can also use the import function.
https://lispcookbook.github.io/cl-cookbook/packages.html#importing-symbols-from-another-package
CL-USER> (import 'ppcre:regex-replace)
CL-USER> (regex-replace …)
>>
>>102961713
Emacs is nice, but elisp is very limited.
Try Lem, if you want to learn CL.
>>
impatiently awaiting mahogany or for emacs to become a wayland compositor…
>>
>>102977000
What are you using in the meantime?
>>
can someone please explain to me in simple terms how clojure transducers are different from functors?
>>
Why most CL projects use a "packages.lisp" file to list exports?
>>
>>102978325
hyprland
>>
>>102978903
It's how the old timers prefer things. I personally like the one package per file structure.
I do use booth though, depending on the project.
>>
>>102979338
do you have some example repos of your way of doing things? asdf has terrible docs for something so much used.
>>
File: 1729703084532077.jpg (18 KB, 141x140)
18 KB
18 KB JPG
another day another learning exercise. this is conversion from roman numerals to integer
(defun roman-to-integer (roman)
(let* ((numerals '(#\I 1 #\V 5 #\X 10 #\L 50 #\C 100 #\D 500 #\M 1000))
(roman-list (coerce roman 'list))
;; get plist (index value) of roman numerals represented by 2 chars, like IX
(bad-indices (apply #'nconc (loop for x in roman-list
for i from 0
for y = (nth (1+ i) roman-list)
until (= i (1- (length roman-list)))
when (< (getf numerals x) (getf numerals y))
collect (list i (- (getf numerals y) (getf numerals x)))))))
(reduce #'+ (loop for x in roman-list
for i from 0
collect (cond ((getf bad-indices i))
((getf bad-indices (1- i)) 0)
(t (getf numerals x)))))))

;; 1994
(roman-to-integer "MCMXCIV")


pretty bad but I don't feel like fucking with it more
get the feeling i should be using more maps and functional stuff to be properly lispy but i'm not used to it yet
>>
>>102978325
exwm. it’s hard to give up
>>
File: image.png (113 KB, 914x890)
113 KB
113 KB PNG
>>102977000
i've been working on lisp bindings for wayland

i think ive gotten a pretty decent chunk done but still implementing the scanner which is one of the more involved parts so its taking time
>>
>>102980792
What is a "scanner" in this context?
>>
File: 2024-10-24_22-50.png (185 KB, 1830x854)
185 KB
185 KB PNG
>>102980921
so, with the exception of the core pirimitive objects, the wayland protocol is defined in a massive fucking xml document. this xml document then gets converted into C code via the "wayland-scanner", and its that code that makes up like 70% of wayland's functionality

since it's xml, you can write scanners that convert it into other languages, with rust and python for example have their own scanners that convert xml for smithay and pywayland respectively.

there was a lisp one made under "cl-wayland" but it seems like it hasn't been touched in 8 years, so i've been rewriting the scanner myself and using it mostly for reference

basically though i'd say 95% of all wayland code that is used by clients and servers alike will be protocols defined in .xml rather than the "wayland core", so ostensibly once this is complete the vast majority of lispy wayland work will be finished.

i've got a type system down that can take xml and parse it into types, so the "reader" is completed. the step im on now is creating a "writer" that takes those types and writes lisp code for wayland based on their values.
>>
Context: I am a very successful professional DBA.

>>102950459
You idiot. Give it 20 years and Microsoft SQL Server people will be as well paid as COBOL programmers. I have tripped my salary over the last four years.

>>102951152
I hear good things about DBeaver, but the syntax highlighting is shit.

>>102952774
>non-gigantic tables
The real world sadly has plenty of those. Emacs is also shit for wide tables, no matter how you do it. Without any libraries, it's as bad as running the query in a terminal. Org Mode is slightly better, but only slightly. Both are shit.

>>102959181
Can you plug them in to anything else?
>>
>>102981167
>Can you plug them in to anything else?
The part that I like is a basic but reasonable API to SQLite.
ELISP> (setq x/file "/my/db")
"/my/db"
ELISP> (setq x/db (sqlite-open x/file))
#<sqlite db=0x55b423800028 name=/my/db>
ELISP> (sqlite-select x/db "SELECT * FROM forum")
((0 nil "Forum")
(1 0 "States & Cities")
(39 1 "California")
(477 39 "Los Angeles")
(483 39 "Orange County")
(491 39 "San Diego")
(496 39 "Santa Barbara"))

https://emacs.stackexchange.com/a/74936/37580
My impression is that it exists to enable people who write applications in Elisp do more with larger amounts of local data.

There's also an sqlite-mode that's entry point is `M-x sqlite-mode-open-file` which lets you inspect an SQLite database from Emacs interactively, but I don't care for it too much. I do wish there were a decent table viewer for Elisp/Emacs that could be used to display large amounts of data, but I have yet to find such a thing.
>>
>>102980374
isn't that one of the retarded things that went into the standard? I'm pretty sure format can do it.
>>
>>102980374
here's my version

>>102981399
cl's format can do the reverse, going from a regular integer to roman numerals
>>
>>102981167
>Can you plug them in to anything else?
not that guy but
>scratch buffer or any other buffer
>M-x sql-mode
>M-x sql-[mysql|postgres|oracle|your-db-type]
>enter params
>query sql as you please
>>
>>102896727
Shouldn't he be more muddy and made of dirt than that
>>
>>102979715
Packages have nothing to do with ASDF. If you are using the one package per file structure, you can use ASDF's package-inferred-system extention. However I find it to be quite finicky and you need to update your local ASDF, as SBCL ships a super old version.
>>
>>102981080
wayflan implements a scanner too. I've used it before, it's pretty cool. It's just a macro.
>>
>>102873389
Is that Makise Kurisu?
>>
Is it just me or does saving recentf when you close Emacs take a super long time?
>>
>>102982545
Here's the code for recentf-save-list.
(defun recentf-save-list ()
"Save the recent list.
Write data into the file specified by `recentf-save-file'."
(interactive)
(condition-case error
(with-temp-buffer
(erase-buffer)
(set-buffer-file-coding-system recentf-save-file-coding-system)
(insert (format-message recentf-save-file-header
(current-time-string)))
(recentf-dump-variable 'recentf-list recentf-max-saved-items)
(recentf-dump-variable 'recentf-filter-changer-current)
(insert "\n \n;; Local Variables:\n"
(format ";; coding: %s\n" recentf-save-file-coding-system)
";; End:\n")
(write-region (point-min) (point-max)
(expand-file-name recentf-save-file))
(when recentf-save-file-modes
(set-file-modes recentf-save-file recentf-save-file-modes))
nil)
(error
(warn "recentf mode: %s" (error-message-string error)))))

What happens when you manually do `M-x recentf-save-list`? Also, do the values for:
- recentf-list
- recentf-max-saved-items
look like?
>>
>>102982617
>Also, do
Also, what do
>>
>>102981875
i had some original plans to build against wayflan, but i saw it currently only has client-side support + must scanners for wayland seem to rely on ffi for the "wayland core", so i figured following that pattern would make things a bit more portable when it comes implementing this for a compositor
>>
>>102897679
>>102981764
thats the joke you dum dums
>>
>>102981288
>I do wish there were a decent table viewer for Elisp/Emacs that could be used to display large amounts of data, but I have yet to find such a thing.
Is such a thing even possible? Emacs notoriously has fuck all for graphics.
>>
>>102981696
It's super ugly for wide or long tables. You can fuck with the config and make it tolerable, but it requires shit like passing parameters to sqlcmd through Emacs.
>>
>>102982617
It's instant when I run it manually.
>>
>>102982647
Yeah, wayflan is pretty solid, but I think it's not possible to easily create OpenGL windows for example. The entire Wayland stack relies on the wayland core libraries and the wayflan approach of implementing everything in Lisp might be a bit unrealistic.
>>
File: 1557482084436.jpg (24 KB, 300x300)
24 KB
24 KB JPG
>>102981893
(((lambda (a b) (lambda (c) (c a b))) 'yes 'nyo) (lambda (a b) b))
>>
>>102983094
Maybe it's something other than recentf that's slow during Emacs' shutdown.
>>
>>102981681
tried to translate this into emacs lisp.
It's not nearly as comfy as Clojure.
>>
>>102935036
Second this , mostly because System Crafters have some great material on anything Emacs and List and they deserve some boot.
>>
>>102933306
>>102940275
I will preface this question with the facts that I am both a noob and drunk, but, how hard is to leverage other languages with emacs? Because with ODBC I would imagine it would be easier to create a good mode for the many SQL dialects.
>>
>>102984789
How do I actually read their stuff? I expected one big .emacs file but that's not what their GitHub looks like.
>>
>>102954131
Everything about this image is nostalgic.
>>
>>102958380
Why are you making this?
>>
File: donna.jpg (176 KB, 800x1000)
176 KB
176 KB JPG
>>102984858
I wish hardware had simply stopped advancing at some point in the 80s or early 90s.
>>
>>102984868
why make make anything ?
1. its fun
2. it will allow me to write a compositor purely in lisp rather than going the mahogany route of having underlying c code that the compositor has to make ffi calls to
>>
>>102984820
Making your own mode is never easy.
>>
>>102984898
The problem is software.
The older I get the more I miss the Debian 6 and RH Core years. Using the BSDs for a while made me remember the good sysvinit times.
>>
>>102984905
>1. its fun
I wasn't saying it was, it looks very clean. But I didn't understand what you were doing at firld.
>>102984905
>2. it will allow me to write a compositor purely in lisp rather than going the mahogany route of having underlying c code that the compositor has to make ffi calls to
I see. Need to read more about this mahogany.
>>
>>102984926
Considering how much Azure Data Studio sucked the last time I used it, I imagine writing anything DB is just a ungrateful endeavour.
>>
>>102984962
I could do it, but I really don't want to. The fundamental issue with SQL tooling is that SQL people live at the backest part of the back end. They don't know how to make front end stuff.
>>
>>102971415
why not



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