freenode/#lisp - IRC Chatlog
Search
16:33:11
kpoeck
I was tempted to try to use SICL Loop in clasp, but there are so many loop uses style symbolics out there
18:36:35
tourjin
this is not about lisp. but somebbody help me. how can I change color of xterm or rxvt?
19:14:16
momozor
Hi. What do you guys think on using some of the Scheme naming style. In particular, a-function for immutable one, a-destructive-function! for a mutable one, and what-is-this? for a predicate.
19:15:30
momozor
will there be any significant semantic issues if one want to follow such convention in CL
19:16:59
momozor
Like naming your variables or a function with the camelCase style can be harmful or useless in CL..
19:21:42
momozor
Also, I wonder if there is a general practice to distinguish between mutable and immutable functions in CL?
19:24:21
Oladon_work
I tend to like using ! and ? in function names for those purposes in CL, if only to show off to everyone else who can't have non-alphanumeric symbols in in their languages.
19:24:24
aeth
momozor: I use ! and ? all of the time, although I'm kind of 50/50 on "?" vs. "-p" and it depends on the nature of the code (I'll never use "foop", because that's just confusing for humans and computers to parse). The other conventions from Scheme would be pretty unrecognizable.
19:25:32
aeth
As for ! I'm 50/50 on including it or not. It's more like... "is there an expectation for this to be pure?" It's a good way to name a variant, e.g. if you have matrix-* and matrix-*!
19:26:45
aeth
Well, unless it was in an otherwise mostly/entirely pure file/package/project/whatever.
19:27:14
aeth
Bike: n stands for "non-consing" and a foo! can be consing, such as if it logged or memoized.
19:27:29
aeth
It's not a direct equivalent, and it's much uglier and more inconsistently/rarely used than "-p" anyway
19:28:52
aeth
You also want a suffix rather than a prefix so that it sorts alphabetically next to its pure equivalent if it exists, like foo and foo!
19:30:58
aeth
It's just that I personally think that ? and ! are separate naming issues because CL has a 100% direct ? equivalent in -p, while it has several, not-frequently-used, fairly-problematic (imo) equivalents to !
19:31:39
aeth
nfoo is just the most common, but I've seen others iirc. It would take me some time to look them up since it's not particularly searchable
19:32:11
aeth
perhaps foof is the next most common, but that has a specific meaning, and is for things like incf that you'd define with something like define-modify-macro
20:33:43
fengshaun
the errors seem cryptic and (trace) doesn't seem to do anything (it just prints the invocation of the function)
20:34:43
jackdaniel
in Common Lisp you may recompile a function in question to have explicit break in it
20:36:24
jackdaniel
(specifying actions in trace is implementation-dependent, so you'd need to refer to sbcl manual)
20:37:31
jackdaniel
if you have a function you want to check, you may modify it and call interactively to see what's going on
20:38:31
jackdaniel
another thing is that you probably want to set speed 1 / debug 3 optimization options before compiling the code so sldb backtraces are not crippled
20:39:21
jackdaniel
spreading couple of print statements to spit to *debug-io* is always an option (pretty effective one)