freenode/#lisp - IRC Chatlog
Search
13:39:10
beach
asarch: In Common Lisp, they are called "conditions", and we "signal" conditions, whereas other languages "raise" "exceptions".
13:43:50
Shinmera
There are THROW and CATCH special forms in Lisp as well, but those provide a non local return mechanism, rather than anything to do with "exceptional situations"
14:09:26
beach
dxtr: The class, the class of the class, the subclasses of those classes, the generic functions that specialize on those classes, etc. etc.
19:20:47
Bike
so when returning the value from (setf mref) it has to box the value, which is a small performance hit. probably pretty small since the input value is probably boxed anyway
19:22:08
Bike
it's possible that if you have the method body end with just 'value' after the setf, the note will go away
20:28:18
troydm
I was wondering if there is anything more prettier than HyperSpec? because everytime I try to read it my inner sense of modern web is shuttered into small pieces
20:29:04
asarch
How do you compile a file from SBCL REPL? (compile-file "arithmetics.lisp") and (compile-file "/home/asarch/arithmetics.lisp") don't work
20:31:00
troydm
fouric: ohh nice, nice I wanted to create something like this 5 years ago, but lack of time didn't allowed me to
20:31:20
fouric
It's still being worked on, but I've begun to use it instead of CLHS for function/macro/special form documentation lookups, and it's very servicable.
20:32:34
asarch
Even with: Failed to find the TRUENAME of /home/asarch/arithmetics.lisp: No such file or directory
20:33:12
troydm
fouric: unfortunately not currently, but I hope I'll have some in near future, as soon as I'll finish some of my stalled projects
20:34:46
Bike
if it can't find it with the absolute path either it's not there or something is really messed up
20:35:12
fouric
(watch as the filename contains unicode characters that *look* like arithmetics.lisp but aren't)
21:32:16
asarch
One stupid question: can you use a compiled file with SBCL in other Common Lisp implementation, for example, CLisp?
21:34:17
Shinmera
Implementations are very different. CL doesn't even specify anything about memory or instruction set.
21:35:29
Shinmera
Giving implementations freedom means they can do things in a way that works best for their particular goals.
21:36:22
pjb
asarch: notice that you can write a conforming compiler with a conforming loader so that you could distribute compiled code to all the CL implementations.
21:36:53
asarch
And I was about to asking the way to use this binary file in other programming languages like C
21:38:43
asarch
I was thinking last night when I was re-reading my notes (a sea of notes) about a situation when a programmer in Lisp forgot to check a value to prevent a division by zero
21:39:45
asarch
And I was wondering if there is a way to override a function written in a binary file
21:40:26
Bike
though there's some conformity issues doing so with compilation units babble babble jargon
21:41:35
asarch
And I was wondering if there was a way to modify that binary file so new programmers could even get a warning message in the future:
21:45:25
asarch
One last question: if I (load "the-original-binary-file-from-the-programmer.fasl") and the I (load "my-source-code-with-the-corrections.lisp"), can I dump this modified environment into a file?
21:48:10
Bike
implementation dependent (or rather it's not in the standard at all, just a common extension). images are a different concept from fasls; it's more like save/load mechanism.
21:54:46
aeth
Would it be hard to write a decompiler for popular CL implementations? I guess it wouldn't have the macros, so it would look very low-level (e.g. iteration would just be go in a tagbody), but guessing the macros could be an extra step (and if you knew the implementation, you'd at least know exactly what a built-in macro would generate)
21:55:47
asarch
If I (load "the-original-binary-file-from-the-programmer.fasl"), is there any way to list the recent-loaded functions?
21:55:51
aeth
I think CL makes some parts easier, though. I don't think it strips the symbols? At least for things in the global environment (it might do whatever it wants for lexical environments)
21:56:24
Bike
asarch: you should think of fasls as the name implies: "fast load". it's conceptually just an accelerated version of loading the source file.
22:00:19
sindan
Is there any way to know whether getf has found the indicator it was looking for? In a place where I know what *cannot* be there, it's easy to choose a default for getf, but used as a mechanism to retrieve arbitrary objects from many places with varied data, there is no way to choose a safe default, or am I missing something?
22:01:33
Shinmera
(let ((not-found (make-symbol "not found"))) (unless (eq not-found (getf place key not-found)) ..))
22:14:02
kamyar
pjb: The problem is not so complicated! We may just wanna predict a price for some e-hailing service
22:14:29
pjb
kamyar: CL is a general programming language, so you can use it to implement any algorithm.
22:15:21
pjb
kamyar: I would certainly use it for that. However, people sometimes expect things to go faster, even if with more bugs, so they often prefer C, or hardware solutions.
22:16:35
kamyar
pjb: No! I dont use C for such problems! We have a working code in Python, which runs a bit slow and may tease customers.
22:17:57
fouric
I'm tired of people letting me that Common Lisp isn't as useful as Python because of the lack of libraries, and want to do something about it - that preferably doesn't involve re-writing all of said libraries.
22:18:14
pjb
asarch: if you intend to redefine a function, you should declare it notinline (which doesn't mean it cannot be inlined but that if it is redefined, its redefinition will be taken into account).
22:19:28
fouric
kamyar: yeah, but there are several million people on the internet who aren't wise and have already written Python code
22:22:12
kamyar
I am a Haskell and Python programmer, and the code in Haskell runs many times faster than Python! Sometimes 10 times faster!
22:25:51
fouric
kamyar: I agree with that generalization - in this case, though, the problem I'm trying to solve has to do with the availability of code in Python vs. CL, less so than application performance. Thanks anyway though :)
22:27:26
pjb
kamyar: and often you have to do it despite the slowdown, because you have to use a library written in the other language.