freenode/#lisp - IRC Chatlog
Search
9:59:26
jackdaniel
well, it wasn't put as CDR, see my question in here: https://github.com/nikodemus/SBCL/commit/3c11847d1e12db89b24a7887b18a137c45ed4661
10:01:44
jackdaniel
ah, right, one of the differences between ECL and SBCL implementation is that package locks aren't protecting package local nicknames I think (don't remember for sure)
10:06:11
beach
Anyway, what is needed in the compatibility system is the functionality of adding/removing/retrieving package local nicknames.
10:08:29
jackdaniel
my point is that trivial-… would be actually (defpackage trivial- (:import-from #+ecl #:ext #+sbcl #:sb-ext ,@our-symbols) (:export ,@our-symbols))
10:09:52
Shinmera
A trivial package would still be useful in case another implementation comes along that changes things slightly, or we discover incompatibilities of some kind.
10:10:46
Shinmera
Speaking of package things, how many implementations have package locks? I don't think we have a trivial system for that yet
10:12:41
Shinmera
Seems it only supports allegro, clisp, cmucl, and sbcl. I thought there were more nowadays?
11:56:32
KZiemian
phoe_: but quiet a sarrow come to me from thinking that is a lot work to do and I can't do anything with that
12:00:42
Shinmera
::= is part of the BNF notation, which is sometimes used to more closely describe macros.
12:00:42
Colleen
Unknown command. Possible matches: 8, clhs, say, mop, time, tell, roll, help, deny, have a,
12:06:03
KZiemian
I also guesse that ::= is part of BNF but I don't know what to do with problem that apper in diffs
12:06:06
phoe_
CLUS has a ::= notation from what I see, at least in DEFSTRUCT http://phoe.tymoon.eu/clus/doku.php?id=cl:macros:defstruct
12:07:29
Colleen
Unknown command. Possible matches: 8, clhs, say, mop, time, tell, roll, help, deny, logout,
12:10:12
phoe_
KZiemian: please ask this on Discord, so mazoe can respond - maybe he'll be able to help here.
12:23:09
SaganMan
first, how does when work? If the test followed by when is true, the forms are evaluated from left to right, am I correct?
12:26:42
SaganMan
I want the code to evaluate the three forms when I gave after when. It's saying Dave is unbound variable
12:29:50
basket
SaganMan: You need to write 'dave, or Lisp tries to look up the variable binding. But that isn't a string, it's a symbol
12:29:57
jackdaniel
if you want pass symbol, then you do (test-when 1 2 (quote Dave)), or for simplicity (test-when 1 2 'dave)
12:30:49
jackdaniel
alternatively, symbols from keyword package evaluate to themself, so there is no need for quotation, you can write (test-when 1 2 :dave)
12:32:29
basket
SaganMan: If dave is a bound variable, then it will look up whatever value it has. (let ((dave "bob")) (print dave)) prints "bob"
12:40:21
SaganMan
http://paste.lisp.org/display/359329 <<< here I pass (get-grades '((Dave 30)(Harry 40)) 100) I'm doing it without double quotes, I guess that's because it's a list?
12:42:15
jackdaniel
SaganMan: strings are enclosed in " like "this", and string is a simple expression which evaluates to itself (like numbers)
12:42:52
jackdaniel
some expressions are complex and when evaluator encounters them they got evaluated
12:43:54
jackdaniel
so writing '((dave 30) (harry 40)) is the same as (quote (dave 30) (harry 40)) what means: don't evaluate list ((dave 30) (harry 40))
12:45:35
beach
SaganMan: See the section from the Common Lisp HyperSpec that I showed you a link to.
12:45:59
jackdaniel
if you don't have "" around your text, it is a symbol, which gets evaluated to the value bound to it
12:46:15
jackdaniel
unless you (quote symbol), then you have literal symbol (abberviated as 'symbol)
12:46:53
SaganMan
I'm saying string for dave as it's kind of string of characters..sorry. I will use proper words
13:11:42
phoe_
shka: someone - likely scymtym - was experimenting with adding this dispatch to SBCL, you could possibly ask him for the results.
13:11:56
beach
shka: There are benchmarks in the paper, in Clasp, and scymtym has a benchmark for his implementation in SBCL.
13:16:51
scymtym
shka: it could probably work efficiently in SBCL, but integrating it would be a huge tasks
13:17:33
scymtym
shka: a somewhat fair benchmark against PCL: https://techfak.de/~jmoringe/benchmark-1.png
13:18:01
Bike
in clasp it dropped our build time by a couple minutes, but i don't have good numbers.
13:19:57
scymtym
i suspect that PCL is doing more work in the effective method function in the second benchmark while my prototypical implementation is basically doing nothing. also the method specializers are chosen in way that somewhat favors the decision tree-based approach
13:20:45
scymtym
oh, and the approach relies on SBCL's "layouts in immobile space" feature that isn't available on all platforms
13:28:53
k-os
is there a way to only load a module of a system, specifically loading only ironclad/kdf without the ciphers
13:46:17
Shinmera
Maybe (asdf/plan:perform-plan (asdf/plan:make-plan 'asdf/plan:sequential-plan 'asdf:load-op (asdf/find-component:find-component (asdf/find-component:find-component (asdf:find-system "ironclad") "src") "kdf-common")))
13:50:25
Shinmera
I mean you could compute the dependencies by hand and compile-file load, if you prefer.
13:56:03
k-os
Shinmera: asdf system dependency description on submodules, but ironclad/kdf also depends on ironclad/ciphers so it's a dead end for me
15:02:17
antoszka
Guys, is there a reader macro for cl-ppcre a la Perl's /regex/ to allow non-escaped direct regex syntax?
16:14:54
mfiano
I'm receiving lots of bug reports in private and other channels regarding the latest unofficial (un-announced, broken) Quicklisp dist. The problem is pngload (which opticl uses) introduced a pretty major bug in a third-party library, fast-io. While Xach is working on an official dist, the proper fix is to place the current commits of all of the following libraries in your local-projects directory: fast-io,
16:22:51
beach
mfiano: Can you explain why Quicklisp is responsible for this, and how pngload can introduce a bug in a different library?
16:23:42
mfiano
Quicklisp is not responsible. and pngload did not. a third party library which pngload uses (bitio), introduced a bug in a third party library of pngload (fast-io).
16:25:15
mfiano
Quicklisp is on hold for announcement because of this and the more major UIOP bug Xach has been working on solving, so it has not been officially released. I can't blame Quicklisp if people have upgraded without an official release of it.
16:26:54
mfiano
fiddlerwoaroof: No, bitio lets the user of it choose a sequence reading function to use with it, whether cl:read-sequence, fast-io:read-sequence, or other. pngload uses it with fast-io. However, bitio uses fast-io with a backed stream, and all current fast-io dependencies use a vector backed fast-io buffer for reading a sequence of bytes, so out of 24 reverse dependencies of fast-io, pngload is the first to
16:30:57
fiddlerwoaroof
I suppose you could introduce a bug in a library by specializing a generic function in a way that breaks things...
16:34:07
beach
fiddlerwoaroof: The general rule is that client code can only specialize on subclasses that it itself defines, so it would not be the fault of the library then.
16:39:16
mfiano
the graph looks like: opticl (lots of users) -> pngload -> parsley -> bitio AND fast-io. the problem occured from a recent commit of bitio that affected fast-io, even though neither depends on the other. this same change, was api in-compatible, so parsley and pngload had to also change (in addition to patching fast-io). It was a bit of a tangled mess. :/
16:42:23
mfiano
and i was only in control of the 2 middle nodes, so lots of coordination between bitio author, fast-io author, and quicklisp maintainer took place. I am sad this happened.
18:08:09
asarch
One stupid question: just like JavaScript does, can you redefine a built-in function in Lisp?
18:10:06
Xach
You can pretty easily set up an environment where symbols that look like built-in functions actually refer to something else.
18:11:41
Xach
in other words, you can arrange things such that (defun plus (a b) (+ a b)) isn't using CL:DEFUN or CL:+, but something else.
18:12:17
Xach
overriding would mean that someone else's code would see the overridden things instead of the standard thing.
18:13:58
Bike
you can have functions that dispatch based on the classes of their arguments, but most of the standard fnctions don't.
18:23:02
aeth
Libraries, types, interfacing with the OS, and (way rarer than C++ and Rust proponents claim) garbage collection.
18:24:34
aeth
Except people are using C++, not C, these days for quite a few key libraries and apparently C++ is a lot harder to FFI with.
18:24:54
fiddlerwoaroof
The library issues I have are usually because I work in a shop that primarily uses JVM languages
18:25:05
Shinmera
The actual FFI to C++ is the same. Finding the functions and methods is the issue.
18:26:10
fiddlerwoaroof
abcl is great, but I generally just use clojure when necessary, since it is already an accepted language where I work
18:29:52
fiddlerwoaroof
On the topic of libraries, has anyone tried to import a caffe neural net into common lisp and run it?
18:30:17
fiddlerwoaroof
(I don't necessarily need to train it, just to run values through it and get results)
19:30:21
borodust
Fare: where can i read up about extending defsystem syntax (like adding a property)? or "define defsystem extensions" as mentioned in the guide
19:32:27
Fare
most compatible way is "just" to create a subclass of system, with additional slots, and use :class ...
19:33:31
Fare
if you want to add the slot to *all* systems, then patch the defclass system in asdf/system.lisp
19:35:39
borodust
Fare: i want users to be able to set relative path to their assets through asdf facility
19:36:19
borodust
Fare: so, instead covering up or asking them to do (asdf:system-relative-pathname :user-system "assets/") do smth like :resource-path "assets/" in their defsystem
19:38:17
borodust
Fare: i still need to know their asdf system name, which blurries the purpose of hiding it from them :)
19:39:55
borodust
Fare: every user would need to use it like a magic and also will break if they will decide to rename their system
19:41:45
jackdaniel
borodust: what about simple (register-asset "my-pathname") available for your library users?
19:42:46
jackdaniel
if you want to shoehorn it as asdf file type, you can do that of course, and keep asset files in your own hashtable or something similar of course
19:43:09
borodust
jackdaniel: how do i know full path then? (or *compile-file-truename* *load-truename*) is not very robust either
19:49:26
jackdaniel
that sounds like a case for logical pathnames. otherwise: (defun find-asset (&rest args) (asdf:component-pathname (reduce #'asdf:find-component args)))
19:50:16
borodust
that's what i do, basically, but system name shouldn't be hardwired into lisp code :(
19:51:16
borodust
i was looking into smth similar to https://github.com/Shinmera/qtools/blob/a3c514a88e78376d9031c01249678a4dff1ee6b8/examples/helloworld/qtools-helloworld.asd#L19
19:52:53
Shinmera
Can't have non-standard options if you don't also specify a different system class
19:54:11
Shinmera
Now, modularize, one of my other libraries, does define a custom system class that extends the options: https://github.com/Shinmera/modularize/blob/master/asdf.lisp#L24
19:58:17
Fare
for instance, the ddo target must be in a different file with no ddo dependency cycles
20:06:31
borodust
too bad if user will have several libraries that requires this options though :sigh
20:14:51
dlowe
I wonder if it would be practical to form a lisp project specifically to take python's standard library (which is held in high esteem) and duplicate its functionality.
20:15:38
Fare
I don't hold said standard library in high esteem -- but I take in high esteem that there is one at all.
20:16:26
Fare
that said, these days, I'd rather invest in Gerbil than in CL, but I understand the value offered is very different.
20:17:55
borodust
hmm, actually, following asdf-flv example, i just can propagate system name binding it dynamically, then use this name for finding out absolute path..
20:20:11
borodust
system's resources, but rather than module-defined (would be a hassle to list all) it is root-path-defined
20:21:24
dlowe
one of the problems of such a mega-library, though, is that you get into the hu.dwim problem where you just splinter off from the main CL community entirely.
20:34:00
Shinmera
Given the number of libraries I've written I have felt that I might be diverging into my own ecosystem too much. I usually try to combat that by splitting things up fine enough that they each manage to stand on their own more or less.
20:38:47
Shinmera
Whether that's working or not, I don't have much of an idea. I don't know how much of my stuff gets used at all, let alone how often or extensively.
20:59:53
Fare
lack of a *reference*, *curated* repository for shared libraries is a downer in CL indeed.
21:00:29
Fare
ideally, you'd like the really good libraries, whatever they are, to become blessed, ubiquitous, and continually improved.
21:01:55
Shinmera
How does one determine whether a library is really good? What happens if someone comes up with a better overall design later? Wouldn't a "this is the best there is" kind of designation discourage rediscovery?
21:06:29
Fare
Shinmera, there are many solutions possible. But thinking in terms of ecosystems rather than just libraries is a big plus.
21:06:54
scymtym
maybe people would only roll their own if they had a specific plan for doing better than the blessed library instead of rolling their own more or less by default
21:07:01
Fare
i.e. there can be several "reference" ecosystems (compare the OCaml situation, where Jane St offers a complete replacement for the standard library)
21:07:50
Shinmera
scymtym: Well yes, my point is more that people might be lead to the idea that this is the best thing possible, and thus, even if there was a better way out there, the likelihood of it being discovered was much smaller.
21:08:44
Fare
Shinmera, depends on how rigid an ecosystem is in embracing alternatives and deprecating older designs.
21:09:33
Fare
"yes, your library is promising, keep making it better and we'll embrace it and deprecate the current library for the same thing (unless it steps up its game in the meantime)"
21:11:55
xantoz
python has several libraries that do the same thing, in the standard library, iirc (i.e. one old version, and one new version that is the recommended for new code)
21:12:05
Shinmera
Just to note, I'm not against a curated source of libraries, these are just questions that immediately spring to mind that one would have to consider when attempting such a thing for real.
21:12:45
scymtym
Shinmera: in my experience, people are likely to write replacements/competitor libraries, no matter how the ecosystem works
21:35:25
Fare
also, CL is so much on the "too many half-assed libraries" side of the equation that even if there could be an abuse of curated ecosystems, that's not a present problem for CL at this time.
21:36:25
Fare
Actually, I should try to build a layer of gerbil libraries above gerbil and see how easy that is...