freenode/#lisp - IRC Chatlog
Search
13:06:31
random-nick
huh, I thought the hyperspec didn't list any documentation option, but I looked again and it
13:20:52
phoe
jackdaniel is such a mighty lisper that he retroactively edits the common lisp standard
13:31:42
flip214
phoe: I guess you might want to have been like him one day, retroactively speaking ;)
13:40:35
flip214
jdz: looking at your (?) rfc2388 library I notice that it looks for the TNBL package (file uploads); hunchentoot still has that as a nickname, but perhaps it should be changed nowadays?
13:41:26
flip214
and another question - how do you feel about supporting file-uploads but not storing the file but just piping buffers into some function (in my usecase to hash it)?
13:41:59
jdz
flip214: I was thinking about improving the library, but have not gotten around to do it...
13:42:49
flip214
jdz: btw: hunchentoot has a hook that should get called by rfc2388 after creating a file, but it seems it doesn't get called anywhere
13:45:41
flip214
alternatively, DRAKMA allows PATHNAMEs as parameter values, and then does an upload
15:11:40
Selwyn
i would like to configure SLIME so that M-. jumps to a source code file on a remote machine using plink/ssh, as opposed to searching for the source code on the local machine
15:15:14
jackdaniel
when you investigate how it is implemented you will notice, that that are easy to write elisp lambda which do the translation
15:15:40
jackdaniel
so you'll have to hack it to use your functions which perform translation with ssh:// path (this is not supported out of the box, but api is ready for that)
15:16:45
jackdaniel
so instead of (add-to-list 'slime-filename-translations (slime-create-filename-translator …)) you need to write your own selwym-create-filename-translator which initializes structure with your own translation functions
16:36:17
luis
phoe: hey, did you want to submit https://bugs.launchpad.net/cffi/+bug/1810785 to SBCL rather than CFFI?
18:12:23
atgreen
Does the quicklisp client provide a simple way to redirect to a mirror of the ql repos?
18:23:39
aeth
Usually things go the other way around and you embed an s-expression format of the desired language (which trivially maps to generated strings) in your Lisp/Scheme file rather than directly working in the syntax of the language with some embedded Lisp or mini-scripting-language or whatever
18:28:32
dlowe
aeth: yeah, it's essentially just a couple of reader macros plus some supporting functions.
18:30:15
dlowe
I've thought about making a more complete templating solution, which would track dynamic evaluation contexts that would basically be filters on the output of embedded code.
18:39:41
pjb
There's also a iolib.termios around. eg. http://git.informatimago.com/viewgit/?a=tree&p=public/iolib.termios&h=e7e44744c51c64bdfcb69e84a2c25649c7baf1a1&hb=aeb3c5634d15d6d35155a8ea7c07203b9219ca14
19:46:20
hjudt
(ql-dist:install-dist "https://dist.tymoon.eu/shirakumo.txt") dies because of unknown scheme. So
19:54:16
d4ryus
Hi, is this: https://pastebin.com/AxrMF3mV expected behaviour? (sbcl 1.4.13) If so, why? can anyone point me to some documentation explaining what iam missing?
19:57:23
Bike
That's because sbcl's LOOP just alters a single i over the course of the loop, rather than establishing a new binding each time.
19:57:53
Bike
If you replace the lambda with (let ((x i)) (lambda () (format t "~a~%" x))) you should see what you presumably expect.
20:04:27
minion
makomo, memo from jackdaniel: please leave me your email address on query, I want to contact you (and you seem to be disconnected)
20:07:38
anamorphic
Am I basically SOL if I'm Windows and want to use a library that does "grovelling"?
20:08:09
dlowe
anamorphic: grovelling just automates a tedious process. You could write your own ffi definitions.
20:08:46
relligions
if I were to write my own cryptocurrency will lisp sbcl be faster than optimized C ?
20:11:56
jackdaniel
of course highly optimized code may get even x1000 faster than the same code which is not optimized by the compiler, but wrong structure/algorithms give you systematic performance drop (i.e polynomial)
20:15:20
jackdaniel
if you pick good algorithm / data structure and implement it in python, you are good. also nobody forbids you to use python
20:15:47
jackdaniel
that said python is offtopical on this channel, so you'd need to look for other people to help you (guide, advise etc)
20:18:04
relligions
but if I use the best algorithm for both C and lisp how slow is lisp when compared, provided both are optimized.
20:23:21
relligions
https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/sbcl-gpp.html
20:23:30
jackdaniel
if you want "unscientific" comparison see https://analogreader.wordpress.com/2015/03/24/unscientific-and-unreliable-toy-benchmark-game-common-lisp-racket-python-c-and-fibonacci-numbers/
20:28:39
makomo
i wonder why this one uses EVAL explicitly https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/fannkuchredux-sbcl-4.html
20:31:45
makomo
hm, i guess to achieve partial evaluation from the compiler or something, because N will be known at the time EVAL is called
20:51:46
aeth
Expect 1.5x to 3x slower than C if both are equally-optimized. Perhaps more if the C uses SIMD.
20:52:58
aeth
our visitor seems to have had the impression that Lisp is the thing you switch to for the sake of performance
20:53:25
aeth
(of course, rewriting in CL *might* give you better performance, if the architecture of the C program was rubbish)
20:54:43
jackdaniel
my (maybe unjustified) impression is that he wanted to troll us but didn't find enough rage so left with disappointment
20:54:47
aeth
pjb: you can't do factorial in C without some library like GMP, so your comparison isn't really fair.
20:55:05
aeth
jackdaniel: on the other hand, everyone who doesn't use Lisp seems to have a strange view about Lisp
20:58:27
aeth
I think the correct answer to which language is faster is: Common Lisp is as fast of a language as C, we just don't have the massive amount of resources like GCC and LLVM have to actually complete the optimizations.
20:59:15
jackdaniel
even correctER answer is that that languages are notation which doesn't have inner speed
21:08:06
aeth
On the one hand, implementations have speed, not languages. On the other, some languages (and language features, like fexprs) are harder to make fast than others.
21:10:02
pjb
jackdaniel: well, LLVM is not C. Targetting C has some advantages. I guess LLVM retain them (portability) in a different way.
21:10:49
aeth
With CL, you should be able to reach C-level speed (or faster) with a fast subset of CL with the only necessary overhead being the GC. The 1.5x to 3x slower at best in practice comes from the implementations not being as fast as they could be.
21:13:22
dlowe
"as fast as they could be" is either empirically determined or an unknown quantity, depending on how you interpret it
21:15:34
aeth
dlowe: Empirically, write the same thing in C or C++ and optimized CL, time them (make sure C is at max optimizations), do a ratio of CL over C. That shows you roughly how much the CL implementation could be improved in that microbenchmark for that particular thing. You do have to choose something that's semantically identical and could in theory generate the same ASM, though.
21:16:28
aeth
Of course, the C/C++ probably could also be improved a bit, but I'm assuming diminishing returns in optimizations, too, so it probably won't be off by much.
21:17:59
dlowe
Assuming I didn't do something dumb like unintentionally prevent the compiler from generating vector operations.
21:19:19
aeth
Yes. You would need expert-level optimized C (or C++, if that's what you choose as the "about as fast as current compilers get" representative) and optimized CL, which could mean writing things in non-obvious ways. Not easy.
21:19:42
aeth
And I suspect the former is what's usually missing with various published "$foo is faster than C" microbenchmarks.
21:20:06
pjb
THe problem is to write the same thing. As this lisp-vs-c example demonstrate, writing the same thing implies greenspunning, or using libecl.
21:20:52
pjb
There are tons of examples. C is not a language to write applications in. It's a high level assembler to write unix kernels.
21:21:04
aeth
There's lots of e.g. numerical code that could afaik run pretty much identically, especially e.g. single-float/double-float code with float traps disabled, assuming the optimizers don't ruin the semantics of the calculations
21:21:42
aeth
I mean, you probably won't get much beyond numerical stuff, but, hey, at least you get CL as a better FORTRAN...
21:21:49
pjb
aeth: just activate the new -fsanitize options and have fun with your numerical C code (just integer already!)
21:22:52
aeth
pjb: no, crypto probably would do better with manual bignums, stuff like (make-array 4 :element-type '(unsigned-byte 64) :initial-element 0)
21:23:23
aeth
bignums are good for the general case, but if the specific case is well specified, you can make a better specific representation
21:24:18
dlowe
I think "language implementations provide a lower bound on performance that can only be roughly estimated" as about as specific as one can say
21:56:31
White_Flame
aeth: or a compiler could be taught that fixed-size integers larger than fixnum could be optimized
23:19:50
hjudt
Xach: have you considered for quicklisp using ql-http only for initial setup and once setup load some other system like drakma or dexador and use that for doing https?
23:25:10
jmercouris
hjudt: having http anywhere is an issue, it has to be https from the very beginning or nothing, ql could come WITH drakma
23:25:34
jmercouris
instead of loading drakma, bundle it into the QL codebase, however heavy and clunky that would be
23:28:19
hjudt
jmercouris: one could use some stripped down version perhaps, but that's probably still missing the cl-ssl stuff or whatever is needed.
23:35:38
zigpaw
I think lack of embedded https (so using http), at least for bootstrapping is not an issue if ql would come with checksums for those libraries needed for ssl that it would pull in while installing. On the other hand, embedding everything might be just easier.
23:42:03
zigpaw
I think I don't follow, what checksums the attacker? if he can alter the hardcoded checksum inside ql bootstrapping code he can already change anything.
23:43:06
Xach
I have a setup that is nearly ready to be deployed that works like this: download bootstrap via https, bootstrap code verifies fetched client code via openpgp, client code verifies indexes via openpgp, indexes include digests to verify further downloads.
23:48:20
zigpaw
As long as someone can curl/wget the bootstrap code via https, openpgp is even an overkill in my opinion. So congratulations :-)
23:57:29
zigpaw
they always should relay on pulling bootstrap code via https (or indirectly via https from linux/bsd distro package manager), or users should verify checksums manually - which they never do.
0:00:28
zigpaw
a separate problem of sorts, esp. with the history of computer vendors adding their own to the chain, etc. (not applicable to linux/bsd but still)