freenode/#lisp - IRC Chatlog
Search
23:12:56
lambdice
so in my main.lisp i will have to load first package.lisp, then foo and bar right?
23:15:09
lambdice
and in foo.lisp first form should be (in-package :foo) and in bar.lisp first form should be (in-package :bar)
23:19:04
lambdice
i will use quickproject anyway, but before i want to understand a bit how it works
23:19:43
_death
another style that works well for many cases is the one described in http://davazp.net/2014/11/26/modern-library-with-asdf-and-package-inferred-system.html
23:24:05
_death
it has its own gotchas.. for example the association of file path and package name could make it difficult to rename later on, if you're not careful.. but it also has some good qualities
23:29:07
_death
one cool thing is that you can load just the one module you need (w/ all its dependencies).. so if you have large-project and a module large-project/standalone-utility, and want to load just that, you simply (ql:quickload "large-project/standalone-utility") and it works
23:32:23
lambdice
apprently if i want to import symbol from :foo and :bar i dont need to add them in the :use form instead defpackage
23:33:19
lambdice
when i wrote i package i used (:use :cl :foo :bar) but apprently it works too with just (:use :cl)
23:34:50
_death
:use is different from :import.. my general rule is to :use :cl and possibly other packages I control.. the rest I just :import-from
23:37:46
_death
lambdice: :use affects symbol lookup, but does not import symbols.. the set of names it "brings over" is not fixed, and this may create difficult trouble now or in the future
23:45:38
_death
for example, imagine your package uses :quux, a third party package.. you (defun my-function () ...) .. a day later, a new :quux version is out, and it now exports a my-function symbol of its own.. now, your defun will redefine quux:my-function!
23:46:49
_death
this has happened to me personally multiple times in the past, and the effect is often very puzzling until you figure it out
23:48:48
_death
less puzzling effects include conflict errors when two packages at some point decide to export same-named symbols.. this has a good chance to happen if you :use utility libraries
23:50:37
_death
by the way, the redefinition was even more puzzling because it wasn't me who defined my-function, but another library that used :use
23:58:20
_death
generally the package-inferred-system style helps w/ accidental reuse of symbols, since it encourages small packages (one per file) that export a small portion of their symbols
23:59:16
_death
with one-big-project-package you may forget that you used this symbol in another file
6:35:37
mfiano
Hello. Can someone help me out with a function to generate the following? http://paste.lisp.org/display/359377
6:38:07
mfiano
A couple of us have been trying for 2 hours in another channel. Using shared structure is not working
6:41:09
quazimodo
is there a _very_ cheap hash function that can take a deeply nested object and return a hash with a reasonable uniqueness, but not something like md5
6:41:39
quazimodo
basically, a very fast way to say "I'm pretty sure this hash's obejct is different to that has
6:45:18
quazimodo
stream based view rendering off a single atomic state object is using functional lensing. Because of this, subcomponents on the page can't isolate vdom updates to their own 'setStates' and have to update each time _anyone_ does a setstate, because we can't be sure if they're lensed on other component's data
6:45:46
quazimodo
essentially child 1 changes title to 'Hi' and child 3 _must_ update because it's using a lens that _may_ be using child 1's title
6:48:18
quazimodo
because the lens literally takes the entire atomic state object as an argument, then picks and chooses what the child component sees as it's own private state
6:48:36
quazimodo
the child _thinks_ it has a wholey private state, but in fact that representation may bo comprised of many other components states
6:49:04
quazimodo
we either register what it listens to and do checks if those changed, or compare child's previous state to current and if no changes, don't bother emitting a view update event
6:49:16
Shinmera
Then give the lens a capability to tell you whether it cares about another object that you just updated or not.
6:56:16
shka_
mfiano: acumulate variable, not really needed in how this code works, would be more sensible with reduce instead of append/mapcar combo
7:29:10
dtornabene
in sbcl, and i'm getting an "undefined function" via the command line, in sbcl, after having loaded it via quicklisp
7:33:37
loke
secondary benefit is that it's easy to see which package a certain function belongs to.
7:34:32
loke
Most people don't, until they write their first large program and want to change the name of a package (for example), or want to identify all places where a certain package is used, etc...
7:46:13
phoe_
dtornabene: bordeaux-threads and binary-types both use BT nickname, which has last been a problem... one, or two days ago?
7:47:24
dtornabene
interestingly enough i got a problem with an auth failure so I ducked over and tried to connect to a sqlite3 db via datafly....which rec'd use-package
7:49:57
dtornabene
this is the error if anyone has any thoughts on *that* error http://paste.lisp.org/display/359385
7:55:10
dtornabene
so, I'm assuming I should put the ip addr in there then? as in, via the error 127.0.0.1:something?
7:56:12
loke
ACTION uses Kerberos autoentication so I don' thave to deal with passwords, but that takes a bit more effort (the Kerberos support was what I contributed)
7:57:06
dtornabene
i've got the user created via postgres, but I must have bungled the password somehow
7:57:49
loke
dtornabene: plain psql uses local connection, not over the network. There is a config file soemwhere you have to edit to enable network logins.
8:05:49
dtornabene
"host local not found: 3(NXDOMAIN)" after printing "local has address 198.105.254.24" "local has address 198.105.244.24"
8:06:41
loke
you should be using localhost, but you need to make sure the user exists and has a password assigned
8:23:31
dtornabene
loke: fwiw you were dead right, and I really appreciate it, somehow the pswd had gotten messed up. thanks again
8:25:35
phoe_
(loop with x = ... if (foo x) then (if (bar x) (return 1) (return 2)) else (if (baz x) (return 3) (return 4)))
9:08:46
Shinmera
Is it a new ASDF "feature" to complain with an unrecoverable error when a system tries to modify the standard readtable?
9:09:04
Shinmera
This only seems to happen if the readtable modification happens as part of a system loaded through defsystem-depends-on
9:30:21
scymtym
Shinmera: i think the error is signaled by SBCL. try (with-standard-io-syntax (set-dispatch-macro-character #\# #\z (lambda (&rest args) nil))) in the repl. maybe ASDF now restores *READTABLE* to the standard readtable before loading a system or something like that?
9:32:38
scymtym
afaik, there is this "syntax control" branch in the ASDF repository which controls the readtable more strictly. i didn't think that made it into master, though
9:32:42
jackdaniel
https://gitlab.common-lisp.net/asdf/asdf/blob/syntax-control/doc/syntax-control.md
9:36:25
Shinmera
scymtym: It seems it is signalled by SBCL, but I don't understand why it only happens with ASDF 3.3
9:37:15
Shinmera
Furthermore it only happens for defsystem-depends-on. If I first load the dependency manually it works fine.
9:38:06
scymtym
Shinmera: no idea, sorry. maybe ask fare directly or ask on asdf-devel as jackdaniel suggested
9:38:54
scymtym
beach: are funcallable instances involved? it may be the "slyrus bug" unless you already upgraded after that
9:44:52
beach
I guess it doesn't matter. I'll just download the newest version and see whether I still get those errors. If I do, it's my computer. But it occurred to me that, since no other software on my computer seems to have any problems, it might be SBCL.
9:45:13
scymtym
probably 9a20c2c0b04a4b73fd34ac81358082c796a66f68 on Sep 20 which was first included in 1.4.0
9:47:53
beach
Thank you so much! You just saved me the trouble of buying a new computer, installing all the software, etc, et.
9:51:43
scymtym
beach: your welcome. please note though, that i made sure to always say "may" or "probably" :P
9:52:32
beach
Sure. Nothing bad is going to happen to me anyway. I just installed the newest version of SBCL. I'll let you know if the problem happens again.