freenode/#lisp - IRC Chatlog
Search
15:18:50
attila_lendvai
Xach, FYI, i'm using the tagged-git stuff with a 'stable' tag. i hope it'll work! i've seen many repos using it now.
15:19:56
attila_lendvai
Xach, well, they won't move much because we are not active in CL nowadays...
15:20:16
Xach
someone else uses a moving tag and it is a hassle - it is better usually to use a branch
15:20:46
attila_lendvai
Xach, but i've seen list 10-20 projects in ql using it... i thought its fine
15:24:45
h4ck3r9696
Does anyone know where I can find resources about sending and receiving binary data with usocket, in a TCP stream? I currently use read-sequence on a usocket-stream, but it doesn't work very well: I have to wait for the received message to be long enough for it do be read, and I can't read more than the specified size of the buffer.
15:40:40
_death
unfortunately CL has no read-byte-no-hang.. you can try using nonblocking sockets, or you can use, say, iolib
15:42:43
jmercouris
the only thing that comes to mind is a singleton during intialize-instance that gives a unique ID
15:44:35
nij
Is there a better practice to invoke shell commands that involve pipings? The example below, while work, very large and nested.. https://lispcookbook.github.io/cl-cookbook/os.html#piping
15:45:08
jmercouris
nij: he has a FOSDEM presentation, if you want early access to it, you can email him, pierre@atlas.engineer
15:52:52
ldb
to be honest, they're no better that zsh/fish/etc. name a few fancy ANSI colored shell programs
15:53:48
nij
`~/.scripts/dictionary "ordinary" | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[mGK]//g"`
15:56:38
ldb
the traditional simple effective way to do a notification is ring the bell of your terminal
15:57:00
jackdaniel
nij: for amusement, however it is a poor thing for doing things: https://plaster.tymoon.eu/view/2257#2257
15:57:42
jackdaniel
sub could accept one argument and it would make it cleaner, but what did you expect from write-only hack? :)
15:57:48
_death
nij: may also be interested in https://github.com/death/dbus/blob/master/examples/notify.lisp
15:58:49
jackdaniel
I mean, there is nothing inherently bad with this macro performance-wise, it just generalizes concept mentioned in the linked lispbook article
16:03:10
jackdaniel
rest parameter is allowed to share structure with the last argument to apply. otoh, hm, it is a macro
16:04:42
jackdaniel
either way using nreverse is just bad style, so I should have used reverse anyway (and even better - not reverse at all and collect subforms instead)
16:05:29
Bike
since it's a macro, if it modifies any part of the form there are undefined consequences, per the general restriction in 3.1.2.1.2.2
16:08:10
Bike
pretty much. what copying means can vary depending on the kind of object and what you're doing with it, which is why C++ has all that crazy stuff about custom copy constructors
16:08:47
Bike
since unlike C++ the language runtime doesn't need to make new copies of objects, there's no need for some kind of specializable copy
16:09:27
Bike
(there are copying collectors, but then the old version is invalid, and they're only concerned about the bytes, so it's fine i guess)
16:10:49
Bike
oh, and if it wasn't clear, if you copy the form passed to a macro you can do whatever you want with the copy
16:11:05
Bike
assuming you're only manipulating the actually copied bits and not any uncopied deeper structure, obvs
16:11:40
_death
Bike: also, usually the "solution" is a clone member function.. that can handles subclasses etc.. but then, you may need multiple such functions.. clone_shallow, clone_deep, clone_everything_but_this and clone_everything_replacing_that
16:12:18
Bike
all i was getting at is that the reason C++ has copy constructors is because the language semantics means "assignments" might actually be copies, and stuff like that
16:12:20
beach
Someone should teach minion about that article by Kent Pitman, so that we can say "minion: please tell jmercouris about copying" and "minion: please tell so-and-so about equality".
16:14:44
Bike
there are built in coperators for cloning proper lists and trees, provided they aren't circular
16:15:57
jmercouris
I guess the copy could mantain the first element it processes and if it hits an EQ with the same element, it halts
16:23:13
beach
_death: Yes, it does, all thanks to scymtym_. I haven't touched it for quite some time.
16:26:43
beach
It's the only reader of SICL. And if I were to implement a Common Lisp system the "traditional" way, i.e., write a base system in C or C++, I would write a very primitive reader, capable only of reading the Eclector code, in the implementation language.
16:27:45
jmercouris
beach: since SICL is built with SBCL, does that mean the performance of SICL is bottlenecked by SBCL until a time that SICL can build itself?
16:28:18
beach
No. SBCL is just used for executing the bootstrapping procedure and the compiler during bootstrapping .
16:30:22
jmercouris
will SICL ever be a complete implmentation used by individuals? or is it destined to be a research instrument?
16:31:50
jackdaniel
since sicl is modular some of its modules are already used by individuals (via clasp)
16:32:13
beach
jmercouris: We have invented so many techniques that have the potential to make SICL faster than any other implementation, and it is certainly much easier to maintain. But there is a lot of work left.
16:33:42
jmercouris
beach: yeah, but it is not accessible for a casual user, installing Clasp is difficult for a typical person
16:33:48
beach
No ability to even create an executable that can be started by typing `sicl' to the shell.
16:34:28
Bike
we're working on that. slowly. the build experience is probably the worst part of clasp right now.
16:35:05
jmercouris
Bike: it certainly is, I would have seriously considered writing Qt bindings for Clasp if it had been easier to get started, but I figured nobody would help
16:35:30
jmercouris
Bike: the question is, was this a cooperative effort, or did Clasp just integrate Cleavir because it existed
16:35:47
Bike
yeah, sorry. we don't have a lot of people. I'm not good with build system stuff, and the people who are are busy trying to fix it for other people.
16:36:07
beach
jmercouris: Several people hang out in #sicl and they are both helping out and taking some inventions elsewhere (like scymtym_ implementing "fast generic dispatch" for SBCL).
16:36:24
Bike
it's a cooperative effort in that other clasp developers and i have done plenty of work on cleavir
16:36:35
Bike
if you mean, like, did beach go out and try to sell drmeister on it, i actually don't know
16:38:16
jackdaniel
to be precise: there is some groundwork done and there is a person who wants to carry it (if their supervisor agrees)
16:40:11
jackdaniel
n.b, recently ecl was successfully used on sailfishos to write an application with eql5
16:42:39
jackdaniel
I know, the crucial point is a time window and a potentially costly context switch (from the attention perspective)
16:49:24
nij
Why does (ql:quickload :dbus) take so much time to start up (3~5 seconds?)? Can I disable its checking?
16:51:16
_death
nij: you can save a core with third party projects loaded.. though then you need to maintain that core as you update them
16:53:55
nij
OH! So I can quickload all packages I want, and save a core. Next time when I call sbcl, those packages will be loaded very fast?
16:55:00
_death
nij: here's my make-core script https://gist.github.com/death/0b32fd6a114222fc23a57cbb750fb39b
16:56:13
_death
I don't actually save a core if quicklisp updates are available.. I update them and restart the script
16:57:32
beach
jmercouris: I could not have gotten this far by myself, and I won't finish it by myself either. Luckily, there is no need.
17:03:00
jmercouris
beach: that does happen occassionally to me, I'm not sure from whence they originate, I have disabled them...
17:12:54
_death
nij: in .emacs I set slime-lisp-implementations to a list that contains an entry like (sbcl ("sbcl" "--dynamic-space-size" "8GB" "--core" "/home/death/lisp/core/my-core")) (and set slime-default-lisp to sbcl)
17:14:59
_death
nij: I also have a mysbcl shell script, basically sbcl --dynamic-space-size 2GB --core ~/lisp/core/my-core "$@"
17:17:37
_death
mfiano: yeah.. I just multiplied it every time, though I think I did use 16GB several times
17:17:57
mfiano
I typically keep it at half of my available memory, so 32 on most machines. It helps the GC a bit, and I typically work with decoding gigabyte or larger (on disk, so even more memory) image data
17:22:58
_death
nij: oh, and I also have a rebuild-core script.. that deletes the sbcl fasls from .cache and .slime and builds the core
17:26:08
phoe
#clschool also exists for when you have questions about the basics and/or #lisp is busy with other chat
17:32:35
heisig
Speaking of helping others - are the tricks that have been posted here over the last few days (git hooks for touching ASD files, core files, elisp tricks, ...) written down somewhere?
17:38:14
attila_lendvai
Xach, you really want me to list all the changes in a github issue, as opposed to opening a PR?!
17:41:45
attila_lendvai
ACTION remembers that he has already opened a PR to fix tagged-git, and had practically this discussion some 5 years ago
17:42:02
attila_lendvai
phoe, yes, i have converted 10+ repos from darcs to git, and put them on github
17:44:00
nij
In this example: (local-time:now) @2019-11-13T20:02:13.529541+01:00, the timezone is shown. But no time zone shows for me on my machine. Am I doing something wrong? https://lispcookbook.github.io/cl-cookbook/dates_and_times.html#the-local-time-library
17:46:49
attila_lendvai
nij, local-time was rather confused about the concept of timezones. it may have been cleaned up... (timestamps don't have a timezon. a timezone is only relevant when reading and printing/presenting timestamps for the external world)
17:51:12
attila_lendvai
nij, note that it's impolite to ask questions from humans that can be trivially googled
17:56:08
attila_lendvai
nij, no worries! just learn the lesson, and help participating in a more efficient society for the rest of your life... :)
17:57:31
attila_lendvai
i don't remember what's in the Naggum article anymore, but the timestamp representation of local-time contained a timezone, which is rather confused
17:58:12
_death
attila_lendvai: it needs to include a timezone, because it represents a _local_ time
17:59:08
_death
but I think it's confused because it should include an actual reference to a timezone, rather than the timezone shift that happens to be mandated at that instant
18:00:45
attila_lendvai
_death, the timezone is the property of the presentation context, not that of a timestamp. it's only relevant when the timestamp is actaully presented to a human somewhere.
18:01:51
_death
attila_lendvai: sure, for some uses that's reasonable.. for others, you may want to include it as provenance information
18:04:51
attila_lendvai
either way, l-t used to have several operatons defined on those values that didn't make much sense.
18:05:32
attila_lendvai
i cleaned up much of l-t at one point, added some tests, but still left a largeish TODO
18:35:17
dbotton
If I have a project in quicklisp and also have same project checked out in say my ~/common-lisp directory - which one is used when I do (ql:quicklisp :xxx)
18:38:03
dbotton
Ok and is there a way to easily get the directory (in lisp) of the location a project was installed from quicklisp
18:38:33
phoe
(asdf:system-source-directory :alexandria) ;=> #P"/home/phoe/.roswell/lisp/quicklisp/dists/quicklisp/software/alexandria-20200925-git/"
18:39:19
pranavats
Quicklisp has `where-is-system` but I doubt if it's much different from asdf's system-source-directory.
19:07:32
dbotton
That fixed up all, so now can have clog find itself and set directories for tutorials correctly etc for next quicklisp release
19:48:40
attila_lendvai
Xach, good, then i've opened one. note that i'll probably convert more in a couple of days, so if it's not urgent for you, then i'll probably update that PR
21:03:29
Bike
it uses it as the size to the uh... some kind of special hash table implementation the package uses.