freenode/#lisp - IRC Chatlog
Search
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.
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