freenode/#lisp - IRC Chatlog
Search
11:53:38
LdBeth
After all a ] is a elegant design but paredit only gets the editor buggy and complex
12:24:35
pjb
No, don't hack the reader. But indeed, you can bind ] to slime-close-all-parens-in-sexp and be happy forever after.
12:30:23
phoe
if you have already five recursive READs on the stack, how are you going to resolve those with a single reader macro atop the stack?
12:53:18
_death
yay redefinition.. I wrote some function to compute a result recursively and called it with a large problem, and it failed to return instantly with the result.. I noticed I could memoize based on some of the parameters, so while it was running, I added some hash table cache.. as I redefined the function, the call I made instantly returned with the correct result..
12:58:16
phoe
I remember someone over there working on plots recently - they could be able to help you better than me
13:48:06
Kabriel_
shangul: some on this channel use gnuplot; I think sjl has a lisp utility function to interface with an external gnuplot process.
13:52:04
karayan
Hello all, Lisp beginner here, please let me know some good Lisp projects to read source code. Thanks.
13:53:17
Kabriel_
I went through a lot of the projects on cliki a few months ago, but most seem abandoned. I tried using vgplot and http://quickdocs.org/eazy-gnuplot/ with limited success.
13:53:37
phoe
I'll do a shameless plug here and offer you https://github.com/sharplispers/split-sequence - the library was mostly rewritten by me some time ago and then heavily reviewed by other people
13:55:08
Kabriel_
shangul: I have currently resigned myself to using an external plotter for data, with the hope that someday I can write something in McCLIM (https://common-lisp.net/project/mcclim/excite.html)
13:55:26
phoe
karayan: read some books and other code, write some code, post it to #clschool and/or #lisp for review, modify it accordingly, loop in some way
13:56:23
phoe
try to solve some problem using what you already know, post a solution to get it reviewed, get comments about code style/efficiency/algorithmics/idioms/everything, implement them in your code, move on to the next problem when the reviewers are satisfied
13:56:46
phoe
repeat as you learn new parts of the language and/or libraries and/or frameworks and/or ...
14:09:38
pjb
https://github.com/robert-strandh/Gsharp and I have a fork at https://gitlab.com/abnotation/gsharp
19:50:22
randyjohnson86
could one of you kind folk look over this little snippet? https://pastebin.com/yBSKFAAs
19:54:53
randyjohnson86
my apologies, the intended output would be the calculated result but as of right now, it simply converts traditional mathematic notation into lisp s expressions
19:56:14
randyjohnson86
I thought it would be lazy to actually include the eval function within my function, but eventually just got stuck; I thought perhaps a funcall or apply would be the right way to go, but as of right now, the final result isn't conducive to either of those functions
19:57:51
Xach
randyjohnson86: i think it might help understanding if the names were something like left-operand operator right-operand instead of x y z.
20:00:25
randyjohnson86
yes, you are right; that is definitely more clear than x,y,z. bike: could you provide a picture/pastebin of how the if should be indented?
20:00:56
Bike
generally the branches start where the condition does. so the (list x y z) would line up with the (and (not (listp x)) (not (listp z)))
20:04:29
randyjohnson86
oh, how interesting; so you mean the actual test condition would line up vertically with the 'then' and 'else'?
20:06:48
pjb
randyjohnson86: I cannot: This page is no longer available. It has either expired, been removed by its creator, or removed by one of the Pastebin staff.
20:07:56
pjb
In: (arith-eval '((3 + 7) * 6)) => (* (+ 3 7) 6) ; the name of the fonction is wrong. It doesn't eval, t converts from infix to prefix.
20:09:04
aeth
randyjohnson86: based on your description, it's very similar to what I wrote before in a style similar to my answer yesterday
20:10:36
aeth
randyjohnson86: I solved it basically the same way as my simple-mapcar except I iterated two at a time and special cased the first item. It's only infix that way, though. No - 4 supported.
20:14:09
randyjohnson86
I apologize for the short pastebin time; here is the revised one with your suggestions: https://pastebin.com/5HbMifzg
20:17:27
aeth
I supported 3 or 5 or 7 or ... as long as they used the same operator, e.g. (1 + 3 + 5 + 7)
20:18:02
Bike
i don't want to harp on the indentation, but i don't get why you'd ask me specifically what i meant, and then ignore it
20:19:29
randyjohnson86
perhaps I misunderstood, but I thought the revised snippet is the way you suggested. to me, it looks more complicated than my initial attempt as you cannot reasonably discern where the test concludes and the rest of the if begins
20:31:21
Bike
the then branch is "(list operator lh-operand rh-operand)" and it starts on column four
20:35:56
Bike
randyjohnson86: the problem with starting the then/else on the same line as the if is that you might have more expressions before or after the if, see.
20:38:31
Bike
Right. Now, you see how "x" was the body of the original let and now it's the body of a lambda, and 7 was a value and now it's an argument to a lambda.
21:28:46
mercourisj
is there a way to specify a directory for uiop:run-program? I want to execute 'git show master:file.txt' from a particular dir
21:35:22
mercourisj
well, here's a problem, git show will always prefer to show the directory that it is instead of accepting a path, maybe I'm doing something incorrect syntactically
21:58:56
moldybits
how can several quicklisp projects share the same directory? most files are shared between them.
22:00:55
moldybits
i have a game that supports several frameworks for drawing. they cannot be loaded at the same time, so i'd want (ql:quickload game/sdl) and (ql:quickload game/gamekit) but i don't want two separate directories for the projects since almost all files/resources are the same.
22:03:23
aeth
I'm not sure. When I want multiple ASDF systems, I use package-inferred-system. https://davazp.net/2014/11/26/modern-library-with-asdf-and-package-inferred-system.html
22:04:22
aeth
So I guess they can be defined in the same .asd file, since that's just an abstraction over asdf:defsystem
22:07:52
White_Flame
moldybits: before loading, you could set something on *features*, then #+ that selection in your dependency list
22:08:36
White_Flame
or your first loaded file could perform a runtime selection and do a ql:quickload itself
22:09:12
White_Flame
or you could just load your chosen drawing framework first, then your main project, which has no direct dependency on them but requires one of them be loaded first :-P
22:09:15
aeth
Well, the way I'd do it is require game/backend1 or game/backend2 where game is just game/backend1 (which will be the default).
22:11:34
White_Flame
if you change from the defsystem macro to the register-system-definition function, then your dependencies will be evaluated and you can do more normal inline tests there, too
22:14:49
aeth
moldybits: what makes this hard is that there's complex dependencies... and it's just the nature of the problem
22:14:50
moldybits
i tried defining another system in the same .asd file, and now if i quickload the game first i'm then able to load the other system, which depends on it
22:15:45
aeth
Actually, now that I think about it, it's quite common to have two system definitions in a file, one for "regular" and one for tests.
22:18:38
moldybits
game.asd: (asdf:defsystem #:game ...) (asdf:defsystem #:game/sdl :depends-on (#:lispbuilder-sdl ...) :components (...)) (asdf:defsystem #:game/gamekit ...)
22:25:38
White_Flame
I tend to put scripts in my .sbclrc for loading stuff that isn't a simple quickload