freenode/#lisp - IRC Chatlog
Search
22:57:27
jfrancis_
Technically a slime question, not a CL question, but still relevant. Slime is getting angry because I'm getting a returned string containing non-UTF-8 characters. Specifically, I'm getting the error "Invalid protocol message: Error during string-to-utf8: Unable to encode character 55357 as :UTF-8.". That's all true and accurate. But I don't care. Is there any way to tell slime to show me anyway, and just go ahead and munge 55357 on my screen i
23:00:15
jfrancis_
Mmm... You mean patch the slime source with an (ignore-errors ...) around the display code? I was hoping for something a bit less brute-force.
23:43:05
jasom
skidd0: you can do shadowing-import-from; uiop also defines its own version of defpackage where you can do imports of packages with no conflicts order matters)
23:46:34
skidd0
jasom: so shadowing-import-from explicitly defines which symbol to use, avoiding the name conflict, right?
2:24:25
stacksmith
G'morn... Has anyone experinced SBCL all of a sudden no longer saving lambda-lists - but only for some code? And recompiling does not help...
3:21:45
skidd0
so coming from Flask and Python, I've used SQLAlchemy as an ORM for a database. With CL, does an ORM provide as much of a benefit to the programmer?
3:22:32
skidd0
by that i mean, ORMs help make querying through database logic faster/easier to write (compared to SQL queries).
3:44:10
aeth
skidd0: The CL solution is often a linguistic solution instead of a directly OOP solution. e.g. for Postmodern (postgresql), http://marijnhaverbeke.nl/postmodern/s-sql.html
4:15:38
sabrac
skidd0: I cannot offer ORM recommendations pro or con as I use straight SQL (or s-sql) but you might look at mito and see if it works for you.
4:29:01
sabrac
skidd0: It really depends on what you want an ORM to do for you and the complexity of your data relationships and how well you understand them. I write functions with embedded s-sql calls that probably do the same thing you would do with an ORM.
4:49:38
skidd0
and my intuition was the, due to lisp's "power", ORMs are less of an improvement compared to other offerings
4:51:23
sabrac
skidd0: obligatory disclaimer - I am the maintainer for Postmodern (and thus s-sql). It is again under active development so if there is something you want, set up an issue on the github https://github.com/marijnh/Postmodern
5:01:04
panji
I finally satisfied with project i made for learning common lisp (https://github.com/epanji/decision-tree). if anyone here willing to give advice or criticize it, please do. but, please don't be so harsh to make me break down. :-)
5:09:05
sabrac
panji: I do not have time to review the code tonight, but I certainly want to congratulate you for documenting, testing and even a youtube video demo!
8:18:56
shka
is it possible to open mcclim application on remote machine, but display window on local machine?
8:19:48
theemacsshibe[m]
if you ssh in, do `ssh -Y` then your usual arguments to make ssh forward X over and set DISPLAY appropriately
9:18:22
phoe_
I am making instances of some class via MAKE-INSTANCE. These instances are named, in a way similar to class metaobjects - each instance has a name, and they are referred to by their names.
9:18:58
phoe_
At the moment, I have an INITIALIZE-INSTANCE :AFTER method that automatically registers each instance after it's created, but it doesn't seem right to me.
9:19:47
phoe_
For example, this doesn't allow me to make anonymous instances, and seems inconsistent with how I can do (MAKE-INSTANCE 'CLASS) that doesn't seem to have any side effects.
9:20:27
phoe_
Should I instead write it so MAKE-INSTANCE only returns the instance, and the task of "registering" that instance is delegated to some macro?
9:20:29
pjb
phoe_: it is perfectly right for a class to keep track of its instances. This can be done with this :after method.\
9:21:10
pjb
phoe_: the question for you, is whether you may need to have several trackings, if you need different sets of those instances.
9:21:41
pjb
If you just want all the instances of that class (and subclasses), then tracking them from initialize-instance :after is ok.
9:21:46
phoe_
pjb: I don't think so, the way I think of it is, a symbol is going to name one and only one instance ever.
9:22:11
pjb
or initialize-instance, rather, because I would reserve :after and :before to the client of a class or library, but it's just an API choice.
9:23:54
pjb
(let ((i (make-instance 'class))) (register i :name 'foo :namespace 'china) (register i :name 'jean-pierre :namespace 'france))
9:24:32
pjb
And define-named-class-instance can expand to (register (make-instance 'class) :name name :namespace 'global)
9:25:26
pjb
Do you want also to have bindings? I would use a define macro only if it created a (variable or symbol-macro) binding.
9:26:09
pjb
Once I parsed a mail.log, and bound all the data about a given message to variables named after the message-id (in a specific package).
9:26:36
_death
I think a macro is ok here.. it could expand to (setf (find-foo ...) ...) or ensure-foo that does it
9:28:50
jmercouris
so in reading Gentle introduction to symbolic computation I came across this: "FUNCTION returns the functional interpretation of its unevaluated argument"
9:30:54
pjb
it means that you cannot write (function (intern "FOO")) but you have to write (function foo).
9:31:37
pjb
but when QUOTE returns the argument as-is, FUNCTION returns the actual function object that is named by the argumnet.
9:32:11
shka
the only thing in common, really is that they are both special, and both won't evaluate it's argumetns
9:32:45
pjb
jmercouris: now, the difference is when you have local functions (ie. closures). (funcall (quote foo)) will always call the global function named foo, stored in (symbol-function 'foo). On the other hand, (funcall (function foo)) will call the local function foo, when there is one.