freenode/#lisp - IRC Chatlog
Search
9:45:56
beach
Interesting. Once we get Second Climacs working, things like FORWARD-EXPRESSION and BACKWARD-EXPRESSION will rely on the result of a call to READ, so they can have unbalanced parentheses, brackets, whatever, in them.
9:51:46
jackdaniel
beach: I think that this error was paredit-specific - its sole purpose is to keep parentheses balanced and to make navigating between them easier
10:14:12
oni-on-ion
the error above was undeserved; paredit inserted '[]' just fine. but it was toplevel, and if it were using results of calls to READ, it would work fine if that were a macro, rather than the confusing error; beach 's solution i think is perfect
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.