freenode/#lisp - IRC Chatlog
Search
0:00:11
krator44
i'm actually looking at the most reliable way thats why i'm thinking of embedding CL into C++ (as a scripting language)
0:01:03
axion
White_Flame: Haven't heard from him in a while, and I was mistaken to think that his Github activity has stalled...only Clasp
0:01:09
White_Flame
krator44: depends on if you ever want to deal with C++-isms across that boundary
0:04:58
krator44
i'm gonna provide a well-defined io for the lisp program which will deal with the hardware not at all
0:08:12
krator44
the other way is to build a cffi library for cl to link against (or use an existing one)
0:14:12
White_Flame
any FFI is going to have you writing some amount of boilerplate to write & maintain
0:14:37
White_Flame
so I don't see the various options as being all that different in terms of "reliable"
0:18:55
drmeister
krator44: Clasp is A CL written in C++ and designed to interoperate with C++ on every level.
0:22:49
drmeister
It's designed to work with exception handling, classes, virtual functions - all that.
2:26:49
phf
hello, is there a lisp interpreter similar to siod or tinyscheme but with semantics closer to common lisp? i.e. an naive interpreter in a couple of hundred lines of readable c, where whatever functionality is available, it behaves closer to common lisp standard
2:28:07
ben_vulpes
is there some obvious thing i'm missing as to why a handler-bind around a generic method implementation would fail to catch the signaled error or condition?
2:28:36
Bike
it probably does not handle the condition. if your handler doesn't transfer control, the error will just continue up.
2:32:16
ben_vulpes
Bike: thing is, same exact handler-bind /inside/ the generic function handles the condition
2:56:08
emaczen
How would I handle the equivalent of a ccl:no-applicable-method-exists when using a different compiler? Does there exist another condition type? nothing jumped out at me.
3:05:42
borei
just to make sure, when i add object to hashtable (or probably in any collection object) lisp will NOT create new object - is it true statement ?
3:16:41
pillton
borei: The only instances which can be implicitly copied are instances of numbers and characters.
3:17:29
didi
Bike: Hum. I need to write the message onto the paste too. I feel I don't understand the problem properly so I can be succinct.
5:34:08
jackdaniel
krator44: ecl works fine when embedded in cxx application, you have to compile it with -with-cxx flag
5:52:25
John[Lisbeth]
(if common-lisp-has-lexical-scoping nil (query-channel "How do I do lexical scoping with setf in common lisp"))
5:57:23
pjb
John[Lisbeth]: that's the point! You don't! This is why you're told not to use setf to create new variables! Use LET!
6:41:13
jackdaniel
I'm writing template manager as CLIM application (using cl-emb) and thinking about syntax for adding arbitrary templates. http://paste.lisp.org/display/346920 ← I'd appreciate comments on this syntax draft
6:45:51
jackdaniel
yes, content in #> END ... END is just example of template content, I mean define-template macro syntax, which signature is (defmacro define-template (name (&rest params) description &rest file-clauses ...)
6:47:07
jackdaniel
yes, it's just a draft, it will be a macro used to define templates for the abovementioned manager
7:13:42
splittist
jackdaniel: if you can special-case the Readme.org version, do you really need the heredoc stuff in the other cases?. If you treated the first line as the file name it wouldn't need to be quoted. (Although then you couldn't have filenames with #\newlines...)
7:16:10
jackdaniel
splittist: I don't want to have reader problems but I want syntax highlight. Consider file-clause body accessing package which isn't created
7:17:29
jackdaniel
also user may want to have in template something like #.(if …) , this has to be quoted as well, because otherwise it will be simply executed by a reader
7:18:15
jackdaniel
basically it is (file-name . forms-evaluating-to-strings), so you may simply put "(? @var name ?)" there, without heredoc
7:32:49
splittist
jackdaniel: fair enough. I guess my rate of starting new projects is such that I don't have a feel for the pain points... Climacs2 will, of course, solve all the syntax highlighting problems (:
7:42:35
beach
But there is a major design flaw in Second Climacs. Since people prefer to have their Common Lisp implementation unstable and unsafe (and if it isn't, they will work hard to make it that way), they also don't want their editor to crash when their Common Lisp implementation does.
7:42:36
beach
Therefore, they demand that the editor and the Common Lisp system execute in different processes. But I have no plans to implement such a thing.
9:34:40
jackdaniel
it won't be efficient with lists in CL. try: (setf *list* (nreverse *list*)) (pop *list*) (setf *list* (nreverse *list*))
9:35:18
edgar-rft
John[Lisbeth]: it's very costly in Lisp to access the last element in a list. It's better to use a tailor-made data structure for that (FIFO or doubly-linked lists etc.)
9:36:37
jackdaniel
(prog1 (car (last *list*)) (setf *list* (butlast *list*))) ; is another way to do this
9:43:29
jackdaniel
(fwiw I have somewhere util nbutlast* which returns two values, where the second is the reminder)
9:50:14
beach
jackdaniel: My version does though, but it only works if the list has at least three elements, of course.
10:15:53
jackdaniel
my first common lisp program (project at university) did excessively use lists what resulted in a terrible performance
10:18:28
_death
btw it can also be a last-like operator that can serve as a place, so you could (pop (list-end list))
10:20:00
jackdaniel
it's possible to add it given extensible sequences are supported on the implementation