freenode/#lisp - IRC Chatlog
Search
15:56:27
puchacz
I understand there are 2 levels of quoting, either preserving whitespace (rare) or not preserving whitespace (common)
15:57:08
puchacz
not sure if text into attributes needs to be quoted in the same way as text sitting in text nodes
16:06:19
mfiano
Now that Lisp Game Jam 2018 is over, everyone can show a little support and vote for their favorites for the next 3 days before the results are public: https://itch.io/jam/lisp-game-jam-2018/entries
17:09:25
Xach
And it recognizes some of the common ways to slurp documentation in, but not format nil.
18:02:52
ym
Are there attempts to crossbreed SBCL with Linux so that first process started by kernel would be SBCL?
18:05:36
aeth
I'm not aware of any top-down approach because to be practical, as dlowe said, you'd have to start further up in the "top" part
18:13:18
White_Flame
ym: but that would just get you a raw framebuffer. McCLIM would be what draws on top of that
18:14:50
jackdaniel
ym: but to provide example of some adventages, you may watch this video (first 12m: https://youtu.be/RBOrllTA-yc)
18:15:09
ym
White_Flame, all I want is a raw framebuffer (well, with SIMD-optimized rendering, but SBCL has SIMD support, so that's no problem).
18:20:18
ym
IIRC there is X server implementation in CL, but I don't think about it yet. All I want is, ghm, SBCL minimalistic environment with DRM graphics output linux /dev/input as input etc. For my personal nearly-embedded needs.
18:55:52
TMA
is there a SOAP web service client in quicklisp besides hu.dwim.utils/soap? (or more documentation than http://quickdocs.org/hu.dwim.util/api, which is sparse and does not cover the soap/XML part at all)
19:14:01
yoel
Petit_Dejeuner: If u r still looking for Python's struct alternative, take a look at userial
20:05:15
thorondor[m]
hello. I've noticed that ECL is quite slower than SBCL/CCL. Why is it? Is it just that the C compilation in ECL cannot compete with the assembler of SBCL/CCL. Or there are also other factors?
20:06:20
Xach
thorondor[m]: i think there have been many many more person-years of effort put into making sbcl compile to efficient code than ecl.
20:06:45
Xach
I would be somewhat surprised if there was an inherent problem with the compile-to-c approach that effort could not overcome
20:10:33
thorondor[m]
ECL approach is very attractive as it make it very easily portable, but I noticed some slowness
20:39:02
jackdaniel
according to the comparison I've read from '90 KCL (which is ancestor of ECL) was comparable in speed with back-in-a-day CMU CL
20:40:22
pierpa
for the sake of comparison, you may check other lisp-like languages which compile through C. One such language which produces fast code is Biglo, for example.
20:40:29
jackdaniel
but KCL family was most of its lineage a few men effort, so I think that what Xach said makes sense: most of it boils down to man-hours
20:41:27
jackdaniel
compiling to C has some drawbacks, but also has some adventages. one of the adventages is that gcc also performs certain optimizations (not much though - abstraction prevents some of possibilities)
20:41:48
jackdaniel
clasp achives a similar thing by compiling with LLVM (which also optimizes things)
20:42:22
jackdaniel
of course both (ECL and Clasp) have their own compilers with optimizations of their own
20:50:09
jackdaniel
sorry, paper with comparison was written for EcoLisp, direct ancestor of ECL – http://pages.di.unipi.it/attardi/Paper/LUV94.pdf
20:50:51
jackdaniel
I thought I saw it in the original KCL paper (http://www.softwarepreservation.com/projects/LISP/kcl/paper/kcl-paper.ps)
20:51:41
jackdaniel
of course this is archeology, but very intresting and useful if you plan to dig in ECL's innards
20:59:19
thorondor[m]
btw, after updating ECL from gitlab, I cannot see debugging locals in stack frames from SLIME. although I'm not 100% it was because of the ECL upgrade
21:00:34
jackdaniel
that's not enough details for me. if you decide to report an issue, please include comparison between two builds (last release and develop build) and description what has changed/ how to reproduce that easily
21:38:56
jmercouris
fe[nl]ix: sorry for not clarifying, I didn't mean a hosting provider (I too use Gandi, great company), I mean for software to serve DNS
21:43:13
fe[nl]ix
jmercouris: DNS is so complicated nowadays that you definitely don't want your own server
21:44:49
drmeister
What do folks recommend in the following situation - I've got a grammar that I'm putting together that looks like the following:
21:45:33
drmeister
A bunch of lists of symbols. I've got this special symbol 'CYCLE and I should prefix it with the package that it's defined within.
21:46:50
drmeister
But I forget to do that sometimes and then it's not recognized properly. I was thinking of recognizing any symbol with (string-equal (string sym) "CYCLE")) - is that a bad idea?
21:47:48
drmeister
I could use the :cycle keyword symbol instead - but everything else is keyword symbols.
21:51:14
drmeister
A molecule-part can be a symbol or a list with the form (name :label label) or ((name1 name2 name3 ...) :label label)
21:53:05
jmercouris
fe[nl]ix: it's complex, but it is the easiest way for me to do adblocking, I might just append to the hosts file for now, pointing to 0.0.0.0
22:04:41
thorondor[m]
drmeister: I think using (string-equal (string sym) "CYCLE")) could be OK. I think that same technique is used in LOOP macro for example
22:05:59
drmeister
thorondor[m]: Thank you. Is that how the LOOP macro handles all of its loop keywords?
22:07:20
aeth
jackdaniel, ym: What I'm personally going to be doing for GUI "soon" is writing on top of cl-sdl2 and cl-opengl (although I'll probably replace cl-sdl2 with my own SDL bindings)
22:08:20
aeth
I've been looking into GPU-based font rendering like http://wdobbie.com/post/gpu-text-rendering-with-vector-textures/ and I'll either try to convert into a GPU-friendly format from zpb-ttf or write my own ttf parser if that doesn't work well.
22:21:31
aeth
Petit_Dejeuner: With cl-opengl, they're just the bindings, and you can just use %gl if you want to directly use the low-level bindings.
22:22:06
aeth
Plus, the author left the Lisp community so now afaik no one understands how the whole thing works.
22:22:28
aeth
Yeah, afaik it's basically in maintenance mode now, even though the bindings are apparently incomplete.
22:24:12
aeth
I've piece-by-piece rewritten almost all of my usage of cl-sdl2 outside of the init part to use as low level as the library permits (even if I have to use :: private stuff), so it shouldn't be *that* hard for me to switch to fresh bindings, especially if I replace the init stuff first.
22:25:55
Petit_Dejeuner
At least cl-sdl2 has doc strings. I know some people like to set them away from the definition of the function, but that just makes it a pain tor ead imho.
22:26:30
aeth
The problem is that cl-sdl2 uses a lot of large, incredibly fancy, undocumented macros, both directly in the package and indirectly through stuff like autowrap
22:26:45
aeth
It has taken probably a total of 2 months of my time over the years to know as much about it as I do know
22:29:06
aeth
Petit_Dejeuner: e.g. with-sdl-event https://github.com/lispgames/cl-sdl2/blob/e61c10ac96f439729f1b9e128b024b02d8c3b4a8/src/events.lisp#L38-L43
22:29:10
aeth
which then uses c-let: https://github.com/rpav/cl-autowrap/blob/7a9edd3de2e48f66bbc599be247c7025c4e0f87e/plus-c/plus-c.lisp#L227-L268
22:29:49
aeth
When it works, it works. When you want to do something not directly supported by that macro... well... that takes some time.
22:30:47
aeth
I have never seen a macro like c-let before. It essentially creates a pseudo-macro, pseudo-function call. So let's say you have "event" in with-sdl-event. That doesn't actually exist. It's rewritten in the code-rewriting in c-let.
22:32:26
drmeister
Bike: I got grammar like this to work: (:= *olig3* (design:make-oligomer *parts* '((:lego3 :label :first) :default :lego3 :default :lego3 :default (cycle :first))))
22:32:31
aeth
Well it's a macrolet and a symbol-macrolet in two mutually-recursive Lisp functions. I'm not sure I've seen anything more advanced than that.
22:32:52
drmeister
Where: (design:define-part *parts* :lego3 '(((:legodkp :legohyd)) (:fg1>fg (:mbenzoic :pbenzoic :acetyl)) (:fg2>fg (:mbenzoic :pbenzoic :acetyl)) (:fg3>fg (:mbenzoic :pbenzoic :acetyl))))
22:34:02
aeth
If I were to write something like c-let I'd probably use at least 6 helper functions/macros
22:34:28
drmeister
ACTION gets his jollies by doing last minute in-the-trenches programming the day before DOD site visits.
22:36:56
drmeister
Exactly that. We have some folks from the DOD visiting tomorrow and I'm writing code that I plan to demo to them.
22:44:01
aeth
What's cool about #'random is that #'random on fixnums in SBCL is apparently non-consing and quite efficient.
22:46:04
mercourisj
theoretically lisp is one of the few programming languaes that could generate truly random applications
22:46:17
mercourisj
you could use random to random select symbols and combine them until you have a full program
22:46:44
aeth
If you wanted random #'random, afaik, you'd have to use an implementation-specific way to provide a seed to the random state.
22:47:02
mercourisj
I just mean in the sense that one can use macros to generate random code on the fly
22:47:08
Petit_Dejeuner
I always thought it would be fun to make a library add advertisement blurbs and links to all the public identifiers at compile time.
22:50:25
scymtym
aeth: no, SBCL initializes the random state to a fixed constant. without the call Bike mentioned, subsequent (non-threaded) runs will produce identical sequences of "random" values
22:51:42
aeth
scymtym: Yes, but there are two ways to actually set up a random state, including on SBCL, afaik. The portable way and the provide-a-seed way
22:54:02
aeth
scymtym: Yes, I was just wondering how SBCL gets a random state in make-random-state because obviously if it used #'random it would cycle through the same random states!
22:57:31
scymtym
aeth: sure. on linux, it reads from /dev/urandom and uses a weaker fallback based on time and PID if that fails
23:01:53
mercourisj
I believe the accepted way of getting a random seed is by downloading random++ from npm
23:02:25
mercourisj
the reason why it will always be something new is because you'll be fulfilling the dependency via NPM, and who knows what it will be
23:02:36
scymtym
ACTION loves how the urandom(4) man page claims that getrandom(2) is the safer alternative and then 50% of that man page is a super-complicated section called "Interruption by a signal handler"
23:02:42
rme
the /dev/urandom way is nice because it works on a lot of systems (at least linux/freebsd/osx/solaris-ish)
23:03:41
aeth
Well I can understand why switching to getrandom() right way was probably not a good idea because it was introduced fairly recently. The manpage says kernel 3.17
23:03:59
aeth
kernel.org even shows 2 longterm kernels still supported that have a lower version number!
23:16:06
ealfonso
why is hunchentoot insisnting on using html error templates when I set hunchentoot:acceptor-error-template-directory to nil?
23:21:21
ealfonso
"If an ERROR-TEMPLATE-DIRECTORY is set in the current acceptor and the directory contains a file corresponding to HTTP-STATUS-CODE named <code>.html, that file is sent to the client after variable substitution"
1:30:49
ealfonso
the hunchentoot problem I was having earlier was not a hunchentoot problem. I forgot to use (return ...) in a loop finally clause
2:49:55
aeth
first cl-foo, then cl-foo42 because cl-foo is stuck on version 35 and then if you need a different foo 42.x binding you're in trouble