freenode/#lisp - IRC Chatlog
Search
8:54:34
ralt
did anyone write some ECL funsies to write emacs modules in CL? http://diobla.info/blog-archive/modules-tut.html
9:45:25
boeg
if I have a hash table `hash-t` and two variables `key-a` and `key-b` bound to `(cons 1 0)` and I do `setf (gethash key-a hash-t) 1)` why can't I do `(gethash key-b hash-t)` to access the value stored at `key-a`? My guess is that the key where I stored the `1` is a reference to the `key-a` variable, and so even though `key-b` contains a similar looking cons, it's not the same, so it doesn't work, but how do I make it work?
9:49:19
boeg
right, maybe I should check again, because I blindly tried telling gethash to use equal with `:test #'equal` but it didn't work and I just ... yeah, take a look at the documentation again :)
10:30:14
boeg
It throws you around in corners you wouldn't have thought of yourself. I have been reading practical common lisp and land of lisp a bit, but there's nothing like real experience, even though advent of code is taking me soo much longer compared to if I was doing it in a language I know better
10:56:35
heisig
Speaking of advent of code - anyone interested in sharing solutions? Here are mine: https://github.com/marcoheisig/adventofcode
11:01:03
no-defun-allowed
Should I start doing those kind of problem sets? Usually I find approaching whatever comes to mind more enjoyable, but I've heard several times that usually those tend to not be unfamiliar or difficult.
12:19:22
boeg
So whats a good source for how to set up a common lisp project? Right now I just create .lisp files and manually use quickload to load dependencies - well, dependency, I have only used a single library yet, split-sequence :P - but I was thinking if theres a good source to create a project for my advent of code project where I can have it handle bringing in split-sequence and so on
12:23:14
_death
http://stevelosh.com/blog/2018/08/a-road-to-common-lisp/ see section titled "Systems"
12:23:37
earl-ducaine
boeg: You'll find all the sources of the projects that used at: quicklisp/dists/quicklisp/software/
12:24:18
earl-ducaine
boeg: each one will have at least one *.asdf so you'll have a bunch of examples of how to write them.
12:26:46
earl-ducaine
boeg: ASDF has a comprehensive manual, so you should get that. But a warning, it's quite terse.
12:27:20
boeg
earl-ducaine: I'm checking out the stevelosh article right now, and then I'll see afterwards if i'm still missing things :)
12:27:24
earl-ducaine
boeg: It has few examples and for stupid people like myself it can be frusterating to use on its own.
12:29:35
earl-ducaine
boeg: one thing that you'll find quite convenient once you have your ASDF project set up is creating a symbolic filesystem link to it at: quicklisp/local-projects/
12:30:05
earl-ducaine
boeg: Then you'll be able to load it using quicklisp! e.g. (ql:quickload :my-new-project)
14:38:05
didi
Each tabulated data file use a different convention to separate records, fields, to escape characters...
14:44:39
dlowe
web folks love JSON, business folks still love XML AFAIK, but yeah, no one respected XML enough to use the encoders.
14:53:12
White_Flame
because they're compelled and don't actually love it, they don't care about implementing it properly
14:55:28
dlowe
I disagree with your causation. I think caring about proper implementation is only weakly correlated.
14:59:38
dlowe
the other source is that C++ libraries for emitting XML were (and perhaps still are) crazy terrible
15:12:25
didi
Those who say "don't use regular expressions to parse html" are only partially correct. HTML in the wild is a total mess.
15:14:00
phoe
if lispers closed parens as consistently as html writers closed tags then Lisp would fail to compile in 99 cases out of 98
15:17:26
dlowe
didi: I think the advice is actually to use a library (i.e. someone else's regular expressions) to parse html
16:10:02
Shinmera
The call for papers for ELS20 is now online! https://european-lisp-symposium.org/2020/index.html
16:12:08
vms14
Guys I want to rotate a list, but rotatef does not really "rotate" it just switches positions. I'm using (cons (car (last the-list))) + (remove (car (last the-list)))
16:13:40
vms14
I'm trying to make the snake game and the snake is just a list of points, to move the snake, I want to rotate the last item so the last part of the tail will be the head
16:15:43
Bike
well you compute LAST twice, and you use REMOVE even though you only want one element removed
16:27:40
vms14
thanks dlowe, I guess I'll use that and just update the list every time I push a new item
16:29:33
vms14
should I save the list before making it circular? so to push stuff I can update the saved list
16:34:36
beach
Here is another piece of advice for you: "advice" does not take a plural form. It is like a substance in English. In singular, it would be "a piece of advice". :)
16:35:44
vms14
people just let me kick the English dictionary and they say nothing, but this way I'll never learn
16:38:18
beach
clothespin: Nothing substantial. I have been giving some thought to how to compute indentation, which is why I suspended development on it. But I am mostly working on SICL now.
17:13:09
pjb
minion: memo for vms14: you can rotate a list in a user friendly way with two rotatef: https://pastebin.com/32mSuwkr
19:00:23
minion
vms14, memo from pjb: you can rotate a list in a user friendly way with two rotatef: https://pastebin.com/32mSuwkr
19:03:02
reepca
is there an equivalent to make-string-output-stream but for writing bytes instead of characters?
19:06:03
vms14
To read the raw bytes, you need to pass OPEN an :element-type argument of '(unsigned-byte 8).