freenode/#lisp - IRC Chatlog
Search
0:42:40
mfiano
The benefit of Sly is builtin mrepl, stickers, everything being a button to inspect, amoung many improvements and bug fixes.
0:44:11
mfiano
as of a few days ago, even builtin company completion with zero configuration that is much snappier than the old sly-company, or slime-company
0:45:01
mfiano
I switched from SLIME to Sly about 3 years ago and I'm still happy with that choice whenever I am reminded by using SLIME
2:00:13
kuwze
Xach: does this still work for you? http://lispblog.xach.com/post/112939066338/using-paredit-within-screen
5:38:16
asarch
I did: (ql:quickload "clim-examples") in "This is SBCL 1.3.14.debian, an implementation of ANSI Common Lisp." and everything is fine, however when I do: (clim-demo:demodemo) I get: https://pastebin.com/0adz1s7D
6:39:14
jackdaniel
since quicklisp distribution seems to be the same, you probably have another mcclim copy somewhere in local-projects or common-lisp directory
6:39:42
jackdaniel
notice difference in instructions: ";; try (CLIM-DEMO:DEMODEMO)" vs ";; try (CLIM-DEMO::DEMODEMO)"
6:41:57
asarch
I didn't see this: ./.cache/common-lisp/sbcl-1.3.14.debian-linux-x64/usr/share/common-lisp/source/mcclim
8:29:54
makomo
does cl-who only recognize the "htm", "str", etc. symbols if they're interned in its own package?
8:31:25
makomo
hmm i guess that makes sense, since how would you otherwise call your own functions with those names
10:03:08
shangul
I've ran into a problem. I decided to spend 1-2 year on Lisp and do my stuff in this language. but now I see I may not have my projects done in Lisp because I'll program them in my previous language's way. on the other hand I can't wait 1-2 year or even months to have enough experience.
10:03:59
phoe
the thing I've employed is write snippets or pages of code and then post it here and on #clnoobs to get reviews
10:04:13
phoe
that way I got a lot of information about how to write the same thing in more idiomatic Lisp.
10:04:38
phoe
there's a lot of lispers around here who are willing to freely share that information and do small reviews. you can leverage that fact.
10:05:26
phoe
make sure that you get these right, then use that information to construct larger stuff.
10:05:35
shangul
I know I'll be able to learn and program my project in Lisp even through I'm a beginner. but I'll do them not in Lisp's way
10:06:30
shangul
So I shouldn't program my projects till I get enough experience. but I can't wait till then.
10:09:14
phoe
you are free to customize the language to your own liking, but don't expect other people to abide to that liking
10:10:33
pjb
Coding conventions aren't universal. If your problem calls for other conventions, then your project can apply entirely different coding conventions.
10:11:33
phoe
it's hard to learn how to properly use macros to customize Lisp if you don't learn the basics of them first. which is where the basic conventions come in.
10:11:34
shangul
for example someone who comes to Python from C, writes something like "for i in range(len(L))"
10:12:23
phoe
where in Lisp that would be (loop for i below (length list) ...) if I understand that snippet correctly
10:13:11
pjb
shangul: this example is low-level in the global program architecture. It doesn't matter. The higher levels matter more.
10:16:33
shangul
Problem: Write a program which asks user's name, greets him. Then asks 2 numbers(3 digits max), connects those 2 together(23,54 => 2354), multiplies this number at reversed version of itself(e.g. 543 and 345). Solution: https://apaste.info/7HeB
10:17:55
pjb
shangul: see, you wrote low level expressions. They may be correct and nice and all. But your program architecture is bull shit. Literally. A huge pile of nothing.
10:19:21
pjb
You should have written: (defun program () (great-user (ask-user-name)) (let ((n (connect (ask-number) (ask-number)))) (* n (reverse-number n))))
10:19:45
pjb
Then you could see and prove that this program does exactly what the problem statement says.
10:21:03
pjb
Then, you can learn about nice lisp types and operators, to benefit from what CL provides. But this is less important than having a good program structure.
10:21:35
phoe
if you try to compile this, Lisp will complain about undefined functions GREET-USER, ASK-USER-NAME, ASK-NUMBER, REVERSE-NUMBER.
10:23:00
phoe
The thing is, these smaller functions have much smaller responsibilities. One of them is for greeting the user, the other is for asking a number, the other is for connecting them, and so on, and so on.
10:23:24
phoe
Smaller, well-defined functions make it much easier to find erroneous program behavior.
10:25:42
shangul
yes but in this program, these functions are not going to be used, I'm not greeting the user anymore
10:25:44
pjb
shangul: using functions, small or big (actually they should not be big), is raising the abstraction level of your code. This is good, because it makes it easier to understand.
10:26:11
pjb
It makes it closer to the domain of your problem. So you can see more directly the link between your problem statement and your solution program.
10:26:23
phoe
and you separate the control flow of your program from what the program is actually doing
10:28:05
phoe
I need to run and do a thing now - I will refactor your code to more idiomatic Lisp in about an hour if no one does it before me.
10:30:49
phoe
you'll likely need some examples to mimic in the beginning so you can bootstrap your Lisp knowledge.
10:31:14
phoe
doing a single assignment ourselves to give you an example isn't going to do all of your Lisp job. (: