Search
Tuesday, 22nd of August 2017, 2:09:23 UTC
2:52:43
eeyyy
Hey i just started learning this a week ago and i put in the code (defmacro unless (condition &rest body) '(if (not ,condition) (progn ,@body))) and got an error. Anyboody know what i did wrong?
2:53:18
axion
You didn't use a quasiquote for starters
2:58:31
Bike
you'll probably get a complaint for trying to redefine the CL macro "unless", so give it a different name.
3:21:56
emaczen
If I run (sb-thread:make-thread ...) in a loop, will the threads be running concurrently?
3:23:50
Bike
if they dont end too soon, sure
3:24:16
emaczen
Bike: Yep, they are taking some time...
3:35:16
loke
emaczen: Just don't start too many, or you might cause the system to grind to a halt.
3:37:00
emaczen
loke: is 20 some too many?
3:43:19
loke
emaczen: It also depends on what they do. If each thread is using 100% CPU, then obviously there is little benefit of starting more than the number of threads in the CPU (where by "cpu thread" i refer to "virtual" cpu's, = cores*hyperthread)
3:43:54
loke
Once you start nmore than, say, 20×the number of cores in the machine, you'll start to feel it.
3:44:16
loke
If, on the other hand, the threads are mostly idle, you can easily start thousands without any problems.
3:44:59
emaczen
loke: I think it is stalling pretty bad...
3:45:19
emaczen
loke: is there a lisp way to check the number of cores?
3:45:21
loke
emaczen: "htop" is a useful command to monitor
3:45:33
loke
emaczen: No. but use htop in a terminal.
3:46:24
emaczen
is that the same thing is top?
3:46:32
loke
It's a better version of top
3:46:33
emaczen
eshell won't let me run htop
3:46:56
malice
nproc tells you how many cores you have
3:47:07
loke
emaczen: Um... no. I doubt you'll be able to run any program in eshell that uses terminal controls.
3:47:18
loke
Just open a normal terminal. You don't have to do _everything_ in emacs ;-)
3:47:23
malice
and should be bundled with your OS. your OS might not provide htop out of the box
3:47:32
malice
but you might want to install it, it's a better top.
3:48:21
loke
malice: OK, OK... M-x terminal then :-)
3:48:49
loke
I seem to recall there is an emacs package that does something similar to top, in a buffer?
3:49:24
loke
https://www.emacswiki.org/emacs/TopMode
3:49:38
malice
I often press that by accident
3:49:39
emaczen
ok I am installing htop
3:49:50
loke
htop is pretty awesome
3:50:01
malice
emaczen: if you just want to check how many cores you have though, nproc is more than enough
3:50:32
loke
cat /proc/cpuinfo | grep processor | wc -l
3:51:14
loke
That saiid, I figured that emaczen also wanted to monitor CPU load during his threading examples.
3:52:55
malice
that might be useful
3:53:08
malice
also, if you have some simple task that you just want to parallelize, GNU parallel is also a good choice
4:15:11
beach
Good morning everyone!
5:10:35
PuercoPop
has someone used https://common-lisp.net/project/clonsigna/ ?
5:31:02
shka_
there are download stats
5:31:03
shka_
http://blog.quicklisp.org/2017/08/july-2017-quicklisp-download-stats.html
5:31:16
shka_
i'm surprised to not see regexps here!
5:32:29
shka_
also, numbers seems to be growing
5:33:52
malice
shka_: surprised to not see regexps in download stats?
5:34:20
shka_
it is not top downloaded library as it seems
5:35:05
malice
I'm curious whether the stats include deps or not.
5:35:13
aeth
shka_: alexandria is always going to be the top downloaded library because of holes in the standard.
5:35:55
aeth
Most of the top downloaded projects are things that are core in many modern languages.
5:36:28
shka_
aeth: i don't care :P
5:36:50
aeth
Not everyone works with text, almost everyone works with something that alexandria covers because it's more general.
6:42:16
fiddlerwoaroof
PuercoPop: I have
6:42:35
fiddlerwoaroof
It works pretty well, IIRC, but the docs aren't always accurate
6:44:13
pillton
aeth: Stop confusing language and library.
8:07:37
shka
malice: i don't use any markup other than lisp itself
11:36:05
schweers
I have a question regarding the debugger. Suppose I have code of the structure like here http://paste.lisp.org/display/354072 Further suppose I’m already single-stepping in the debugger. Can I step over the complete loop to (some-other-code)? I’m using SLIME and SBCL.
11:41:03
shka
schweers: i don't think that SBCL has stepper implemented
11:41:18
schweers
I can single-step with SBCL
11:42:07
schweers
I don’t know of any other free implementation which has single-stepping :/
11:49:18
shka
all this time, i thought that stepper does not work
11:49:25
schweers
that’s one of the reasons I don’t use CCL for development :/
11:49:45
shka
i have been programming in sbcl for over two years
11:49:50
schweers
I also thought so for a long time
11:49:57
schweers
without a single-stepper?
11:50:12
shka
i was using slime fancy-trace
11:50:14
schweers
well, your pain has ended!
11:50:35
shka
fancy-trace is pretty usefull, and it kinda effect on how i program
11:50:51
schweers
never used it, maybe I should take a look
11:58:02
schweers
still, it seems as if breakpoints have to be known at compile time
13:08:32
dlowe
Xach: do you have a list of milestones required to get Quicklisp out of "beta"?
13:14:04
pjb
schweers: have a look at cl-stepper, so you may use ccl (or any other implementation) in development.
13:14:59
schweers
does cl-stepper require breakpoints to be known in advance?
13:15:47
dlowe
I would expect, not having used it, that it simply uses the condition raised by the (break) form.
13:19:42
schweers
which means I have to put the break form into the code in advance
13:19:46
schweers
i.e. before compiling it
13:21:09
dlowe
Some lisp implementations allow the TRACE form to set a breakpoint
13:21:33
pjb
schweers: no. But you need to compile with CL-STEPPER instead of CL.
13:21:40
dlowe
but compilation in the normal lisp environment is so trivial that I'm not sure anyone considers it an inconvenience
13:21:57
pjb
what dlowe says is true too.
13:22:11
pjb
(both trace and recompilation).
13:22:13
schweers
dlowe: I don’t think I understand
13:23:05
pjb
schweers: in ccl, trace has :break-before :break :break-after options.
13:23:34
schweers
I didn’t know that, thanks
13:23:52
dlowe
schweers: in sbcl, if you (TRACE FOO :break T) it will break on every invocation of FOO
13:24:02
dlowe
http://www.sbcl.org/manual/ 5.9
13:24:53
dlowe
Hm. It sure would be handly if the manual had anchors for the different sections
13:25:05
dlowe
ah, it does. just not easily accessible
13:25:15
dlowe
http://www.sbcl.org/manual/#Function-Tracing
13:25:23
schweers
it does, but they are not numbered
13:25:48
dlowe
I mean, if you're *at* the position you want a link for, there's no convenient button
13:35:47
butterthebuddha
I'm reading practical common lisp rn
13:35:55
butterthebuddha
and am on the first practical chapter
13:36:08
butterthebuddha
is it OK if I don't understand everything at the end of the chapter?
13:36:18
butterthebuddha
Does he go through everything in more detail later?
13:36:46
schweers
if I recall correctly, he does
13:37:20
schweers
this is the chapter in question? http://www.gigamonkeys.com/book/practical-a-simple-database.html
13:37:32
dlowe
the standard academic model is to say what you're going to say, then say it, then say what you just said
13:38:07
butterthebuddha
Okay cool, ty. It's a little overwhelming because lisp is very different from everything else and he goes a little quickly
13:38:37
schweers
yes, that’s just a quick show-off tour of what you can do with the language
13:38:56
Shinmera
The first chapter is a bit hectic, but he tries to show off something "cool" to get you interested and slows down afterwards.
13:39:17
Shinmera
Which in my opinion is fine. It could've maybe used a disclaimer of some sort though.
13:39:25
schweers
butterthebuddha: I also learned CL mostly by that book
13:39:50
schweers
well, I started with that book :)
13:39:50
butterthebuddha
Also, how comprehensive is his coverage of CL?
13:40:06
Shinmera
It covers most of the fundamentals that are in the standard.
13:40:09
schweers
he shows you enough to be able to get further on your own
13:40:16
Shinmera
So, well enough to get you going.
13:40:17
butterthebuddha
Okay cool, thanks guyz
14:07:08
shka
butterthebuddha: if you don't like PCL we may recomend few other books
14:07:31
butterthebuddha
shka: nah I was just a little overwhelmed in the second chapter
14:07:50
shka
in that case, keep reading it
14:08:01
shka
if you want, you may try land of lisp
14:08:20
shka
it is very accessible and fun, but I think that PCL is actually better
Tuesday, 22nd of August 2017, 14:09:23 UTC