freenode/lisp - IRC Chatlog
Search
0:21:39
aeth
Does anyone have any idea why something that would perform around 3% CPU in SBCL and around 6% CPU in CCL would struggle at 100% CPU in ECL? I'm guessing something creates a lot of garbage in an inner loop in ECL but not SBCL and CCL, or at least not as much garbage.
0:26:42
jason_m
aeth: Could you get an idea using (time ...) and comparing the number of bytes consed, time spent in gc? i know ccl and sbcl have those things in their time output. Not sure about ecl.
1:05:55
aeth
jason_m: I used to use time, but in SBCL one can just disassemble a function and look for a commented allocation there.
1:09:21
jason_m
aeth: sounds like a more reliable approach. I haven't played with disassembling yet.
1:10:49
aeth
If the function is creating something, there should be one (?) thread.alloc-region and it shouldn't be there if the function is merely modifying something
1:12:45
pillton
The statistical profile in SBCL allows you to profile allocations. (sb-sprof:with-profiling (:mode :alloc) ...)
1:13:39
aeth
Yes, that is one of the things I used to use. Statistical means it misses some tiny allocations, though.
1:14:09
aeth
Disassembling will miss nothing, unless there's some allocation in SBCL that isn't commented in the disassembly
1:27:25
krwq
how do you create a metapackage? what I mean is to create a package - when someone does use-package on that he should automatically also use few other packages
1:29:19
Bike
...and of course you can define a package that's just there to reexport symbols from a bunch of packages.
1:30:33
pillton
The case you specify would be easier if you did (defpackage "FOO.A" (:import-from "FOO" ...)).
1:31:07
Bike
you can have a "metapackage" that imports symbols from other package and then exports them. so like uh...
1:33:07
krwq
Bike: is there some easy way to import all? some function or something? I'm not sure if it would be ok to just put some random code under the defpackage
1:47:10
warweasle
XachX: There were some changes to rtg-math which broke some of clinch's examples. The fix is in master, if you want to include them.
3:00:08
krwq
can you do i.e.: (use-package-symbol 'cl-ppcre:regex-replace) and then just do (regex-replace ...) but without using all symbols from the package?
3:04:09
krwq
Bike: so if this is only making it visible in this package then is there a way to also make it visible in the packages using your package?
5:08:47
pillton
If I read 8.7.2 in the sbcl manual correctly, the C prototype "double fun(double x)" maps to (define-alien-routine fun double-float ((x double-float)))
5:12:34
borei
aha, seems like i forgot to specify type of return, now there is another error, smoking docs :-)
5:14:44
loke
I'd generally recommend using CFFI instead of sb-alien directly. That way your code will work on all CL's.
5:36:30
beach
I'd generally recommend that people program in Common Lisp instead of some other language.
5:57:34
beach
I could use some help. I am thinking that it would be possible to structure the reader as follows: If the character read is not in cases 1, 2, 3, or 4, would it then be feasible to unread the character and call a separate function for all other cases?
6:03:13
beach
I am attempting to break up the reader algorithms into smaller chunks so that I can replace the main algorithm while calling the smaller chunks.
6:09:07
astronavt[m]
im thinking about picking up Guile for my first Lisp. does anyone have any reason i shouldnt do this before i dive in?
6:17:58
astronavt[m]
and lisp just seems appealing. i have a math background, i like the uniformity and generality
6:21:11
aeth
Different things will be easier in different languages and implementations. e.g. For CLI stuff, you shouldn't use a JVM language because of the startup time iirc.
6:21:31
astronavt[m]
yeah so im told. i love the idea of clojure but its basically out because of the JVM
6:21:41
astronavt[m]
im gonna get my functional rocks off with Haskell eventually so it doesnt bother me
6:23:23
flip214
astronavt[m]: scheme is minimal, yes. CL has far more batteries included ;), and a LOT of libraries.
6:23:57
aeth
Lisp is a very different kind of functional than Haskell, when you do functional programming in it.
6:24:24
flip214
astronavt[m]: yeah. dumping an (uncompressed) binary via SBCL and doing the equivalent of --help (so only quick
6:24:31
aeth
Schemes can be large, but they're not portably large. The extensions that make them comparable in size and features to CL are all different in each one.
6:24:46
flip214
command line parsing) gets you a runtime of ~0.03, o similar to C, perl, Python, etc.
6:25:46
astronavt[m]
i guess i never gave it a thought. trying to use CPAN to install miscellaneous CLI tools was a pain and i hated it every step of the way
6:28:28
aeth
astronavt[m]: In Common Lisp, you can work with types if you want to. Like (defun foo (x) (declare (single-float x)) (+ 1.5f0 x)) or even (deftype vec3 () '(simple-array single-float (3))) (defun bar (v) (declare (vec3 v)) (map 'vec #'+ v v))
6:29:54
beach
astronavt[m]: You need to know that this channel is dedicated to Common Lisp, so there will be a significant bias in favor of Common Lisp, as opposed to other languages like Scheme, Guile, Clojure, etc.
6:30:16
flip214
astronavt[m]: well, perl is the other end of the syntax dimension... while lisp has nearly no syntax, perl has _mostly_ syntax ;)
6:31:08
astronavt[m]
i liked it in college when i was learning what a function was, and how to structure a program
6:31:20
flip214
astronavt[m]: scripting still means editing/debugging. if you use emacs, be sure to use slime; for vim there's an equivalent, slimv.
6:33:40
flip214
astronavt[m]: slime resp. slimv provide you with an interactive debugger and data inspector.
6:34:03
flip214
that is, if there's an error, you can see a stacktrace, the local variables, inspect data structures, etc.
6:35:45
minion
astronavt[m]: please see PCL: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
6:36:08
minion
Ansi common lisp: I can't be expected to work when CLiki doesn't respond to me, can I?
6:36:27
minion
on lisp: No definition was found in the first 5 lines of http://www.cliki.net/on%20lisp
6:36:52
astronavt[m]
thats one pain point about python, i end up having to write a script to handle one file and just run it using the GNU Parallel tool
6:37:11
beach
astronavt[m]: There is a compatibility library called Bordeaux Threads that makes it possible to use threads across Common Lisp implementations.
6:37:16
astronavt[m]
which is fine but sometimes doesnt make sense, e.g. if i need to persist data across processes or i wanna use a kind of map-reduce thing
6:37:52
astronavt[m]
is it one of those "it exists but nobody uses it" deals, or is it actually useful
6:40:22
beach
astronavt[m]: Seriously, you are making a big mistake if you attempt to use Common Lisp without an editor that is capable of computing correct indentation, and help you with other debugging tasks.
6:43:52
beach
astronavt[m]: Correct indentation alone is an argument. Common Lisp programmers rely on indentation to understand the structure of the code. If you show some of your code and the person reading your code sees that is incorrectly indented, you basically force that person to count parentheses, and that is not polite.
6:45:26
axion
If you are coming from Vim, you really should get to know Emacs. While it is possible to code CL in Vim, it is not as pleasant, and actually painful at times.
6:53:43
flip214
all my previous attempts at using emacs failed at the first step - installing the evil mode ;)