freenode/#lisp - IRC Chatlog
Search
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.
23:07:02
fouric
I was under the impressive that only the compute-heavy bits were wrapped and there was a lot of less intensive logic stuff being done in Python
23:08:19
jmercouris
so, it is tolerated in the python community, and even encouraged by some zealots
23:09:27
jmercouris
just to be specific, I mean pandas is not-idiomatic, I can't speak as to how much of it is not written in python
23:15:28
Cthulhux
hmm.. how would i tell ningle to join the "/*" route only once instead of just recursively going there every time?
23:22:47
Cthulhux
there are some written in common lisp, but only one relevant one (i even forgot the name of the other..)
23:38:24
whoman
Cthulhux: but i am not sure as exwm never blocks for me, just emacs itself on some operations
23:43:26
_death
ebrasca: I think it has a lot to do with practice, and with how much you already know about the domain.. or, with how little you care about maintenance I guess ;)
23:46:30
ebrasca
_death: I like to maintenance , but I only think in 1 step at a time. It make with problems problesms to solve later.
23:49:01
_death
ebrasca: right, so first figure things out and don't care about aesthetics.. this tends to happen when you're exploring new territory
23:50:14
_death
ebrasca: but with programming experience and knowledge of the domain, you already have heuristics that guide you to a clearer description of the solution
23:51:15
_death
and many times in lisp, the description of the problem may serve as the description of the solution, with a bit of help :)
23:53:08
ebrasca
How to deal with clusters of data in my fat32 implementation is my problem. (disk to ram and ram to disk)
23:55:56
_death
maybe start by listing some use cases.. how and why one might use your implementation
23:56:49
pjb
for description of the problem = description of the solution see: https://groups.google.com/forum/#!msg/comp.lang.lisp/oGmha6PbAD4/kmpG51wjJ6gJ
23:57:58
ebrasca
mmm maybe I can read and write clusters and sectors by demand instead of in 1 piece write/read.
0:27:59
_death
pjb: good post.. I'm also reminded of https://groups.google.com/forum/message/raw?msg=comp.lang.lisp/-uoDKZeKBr4/qGgFy-M3mvoJ as well as libraries like screamer or cl-glpk
4:49:34
Fare
beach: if you're interested in compiling CL to Scheme, you could make SICL a Gerbil language.
4:57:41
beach
And by "make SICL a Gerbil language", do you mean using Gerbil to compile SICL, and thereby not using the Cleavir compiler framework?
5:00:53
beach
The essence of Cleavir is a flow graph similar to what is called MIR in the literature, except the first step is what I call HIR, which is like MIR except that it does not expose address calculations so that all data are Common Lisp objects.
5:01:35
beach
I do translate HIR to Common Lisp so that I can run SICL code in a host Common Lisp system though. But it is not very fast of course.
5:02:49
Fare
if you have 3-5 million dollars lying around, I'm trying to raise money for my cryptocurrency project.
5:04:10
Fare
beach: would Cleavir be a good target to add special support for user-defined safe-points?
5:05:24
beach
It could certainly be done. But right now, only Common Lisp code can be processed. It would take some effort to make it process something else.
5:06:05
beach
Though perhaps the entire AST-to-HIR could be roughly the same, so only source to AST would have to be rewritten for some other language.
5:07:29
beach
Fare: Basically, every step of processing in Cleavir uses generic functions with a CLIENT parameter that can be specialized upon. And client code is free to introduce new AST types and new HIR types as long as methods are provided to process those new types when needed.
5:10:31
beach
Some existing processing steps can even be used even if new HIR instructions are introduced. For example, liveness analysis only looks at inputs and outputs of instructions, so it can handle client-specific instructions out of the box.
5:27:48
JuanDaugherty
Fare, I like your thesis, will absorb further. One extremely petty thing, you betray yourself as a native speaker of a lang that doesn't have agreement in number, as the English plural usage is regularly ungrammatical including in the first sentence.
5:28:52
JuanDaugherty
extremely petty but distracting, in the first occurrence "topic" instead of "topics" i wondered if you meant topoi
5:30:22
beach
JuanDaugherty: Fare is a native speaker of French, which does have agreement in number.
5:33:27
JuanDaugherty
it is, as I say, petty, if the thesis is cogent, a worthwhile contribution, or at least more perspective on semantics
5:36:26
JuanDaugherty
and no vietnamese does not have agreement in the form of morphological effect on the target, usage is similar to chinese
5:41:32
JuanDaugherty
in any case stuff addressing semantics in a computing context is good, it tends be siloed/isolated in AI/nlp or just pure research on it as such
5:44:07
JuanDaugherty
i.e. true/deep semantics, not the thing called that which is direction for how to implement something syntactically specified
6:00:29
beach
JuanDaugherty: I am definitely not fluent in Vietnamese, and according to Fare, his Vietnamese is (or was) the level of child.
6:01:13
beach
JuanDaugherty: It is more of a game between the two of us. Every time we meet, we try to exchange a few words, but it hasn't been very successful.
6:03:11
beach
JuanDaugherty: Fare claims that he can not understand what I say because my "pronunciation is strange". However, the (southern) Vietnamese clerk at the Eurasia store understands my (southern) Vietnamese quite well.
6:08:48
JuanDaugherty
ACTION doesn't know of anything like a common semantic thing for lisp as such other than the usual inclusion of a prolog implementation
6:09:58
fouric
Is there an easy way of getting CFFI to print a list of search paths after it explodes because it could not find a shared library?
6:15:37
fouric
Fare: of course - I was just hoping for something easy, because otherwise I'll just start putting symlinks in /usr/lib or something
6:24:13
beach
Fare: I mean ~ is pronounced in the south just like ? is pronounced both in the north and in the south.
6:26:23
fouric
(you could explain it here if you wanted, but if you have a good resource, no need to consume your time...)
6:27:07
beach
fouric: Cleavir has a large collection of protocols. Such a collection is sometimes referred to as a "framework".
6:56:05
patrixl
beach: sorry. my fingers have been having trouble typing properly today, and this time missed the whole /join part of that line..
7:02:23
beach
The other day, you had a very long conversation completely unrelated to Common Lisp. Just reminding you about the topic.
7:05:19
st_iron
do i understand well that cons cells are just like single linked lists, and the car contains the value, the cdr the pointer to the next item?
7:11:40
beach
siraben: Sure you can transform to CPS, but you still don't have call/cc. Also, CPS pretty much requires tail-call optimization which the standard doesn't require.
7:26:06
Fare
passing your code thru a CPT is fine, but then all library code has to go thru the same CPT, or else