<fiddlerwoaroof>
luis: there's cl-nlp that Grammarly uses, I think
<fiddlerwoaroof>
nevermind, I'm misunderstanding your question :)
Lord_of_Life_ has joined #lisp
robdog has joined #lisp
Lord_of_Life has quit [Ping timeout: 250 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<fiddlerwoaroof>
luis: sb-unicode has "graphemes"
<fiddlerwoaroof>
It might be easy to write a trivial-unicode library
libertyprime has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
<luis>
fiddlerwoaroof: sb-unicode:graphemes is exactly what I'm looking for, thanks!
SlashLife has quit [Ping timeout: 268 seconds]
Josh_2 has quit [Ping timeout: 264 seconds]
SlashLife has joined #lisp
robdog_ has joined #lisp
<luis>
fiddlerwoaroof: 99% of sb-unicode seems to be portable CL, so it'd be nice to extract this into a library. Not sure if that's what you meant by "trivial-Unicode". Probably not, because sb-unicode is definitely not trivial.
robdog has quit [Ping timeout: 264 seconds]
robdog_ has quit [Ping timeout: 264 seconds]
aindilis has joined #lisp
<luis>
There's plenty of overlap with cl-unicode, so maybe both porting bits of sb-unicode into cl-unicode would be the way to go.
libertyprime has quit [Ping timeout: 264 seconds]
robdog has joined #lisp
<fiddlerwoaroof>
trivial-* is the convention for compativility libraries, right?
<housel>
compatibility with a simplified, unified API
milanj has quit [Read error: Connection reset by peer]
robdog has quit [Ping timeout: 264 seconds]
SlashLife has quit [Ping timeout: 259 seconds]
adlai has quit [Read error: Connection reset by peer]
milanj has joined #lisp
adlai has joined #lisp
SlashLife has joined #lisp
robdog has joined #lisp
widefathom has joined #lisp
q3d has quit [Ping timeout: 256 seconds]
robdog has quit [Ping timeout: 264 seconds]
robdog has joined #lisp
Inline has quit [Ping timeout: 264 seconds]
robdog has quit [Ping timeout: 268 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
Inline has joined #lisp
jb__ has quit [Ping timeout: 255 seconds]
jb has joined #lisp
keep_learning_M has joined #lisp
robdog has joined #lisp
Inline has quit [Ping timeout: 246 seconds]
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
igemnace has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
megalography has joined #lisp
megalography has left #lisp [#lisp]
robdog has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
CrazyEddy has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
robdog_ has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
robdog_ has quit [Ping timeout: 264 seconds]
anewuser has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog_ has joined #lisp
khrbt has joined #lisp
amerlyq has quit [Quit: amerlyq]
robdog has joined #lisp
robdog_ has quit [Ping timeout: 268 seconds]
robdog_ has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
akoana has joined #lisp
robdog has joined #lisp
robdog_ has quit [Ping timeout: 268 seconds]
robdog has quit [Ping timeout: 264 seconds]
robdog has joined #lisp
robdog_ has joined #lisp
Oladon has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
robdog_ has quit [Ping timeout: 264 seconds]
robdog has joined #lisp
pjb has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
robdog has joined #lisp
<pjb>
akater: it's silly to wrap defconstant in a handler-bind (or any other form that doesn't preserve top-levelness). Constants variables are useful only to the compiler, to be inlined in the generated code. If you put a defconstant in a handler-bind, then it's not a toplevel form anymore, so the compiler won't know it. It will generate unknown variable warning if you use them in the code, and the constant will be available only a
<pjb>
run-time, when they will be useless as constant variables.
robdog has quit [Ping timeout: 259 seconds]
<pjb>
moldybits: if your constant variables are not constant, then you shouldn't use defconstant. The only thing that can be really constant, are numbers, characters and symbols, because they're "interned": reading them always return the same object. Other 'literal' objects are instanciated anew when read again, so they're not constant.
<pjb>
moldybits: there are macros to deal with that, but it's implier to just use defparameter.
robdog has joined #lisp
<aeth>
alexandria has define-constant
robdog has quit [Ping timeout: 268 seconds]
Achylles has quit [Remote host closed the connection]
<aeth>
Alternatively, if you have to have a constant and don't need it to be global, you can generate the resulting form (e.g. the resulting defun) via a macro to essentially be the same thing as what a constant is.
rumbler31 has quit [Remote host closed the connection]
<pjb>
a symbol macro.
<aeth>
yes, you would essentially be writing a macro that uses symbol-macrolet internally to produce a "constant"
<pjb>
Variable won't, constants aren't. So don't use constant anyways…
robdog has joined #lisp
Nilby has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
<aeth>
pjb: I disagree with what you said about literals, though. A literal (well, a literal sequence like "foo" or #(1 2 3) or '(1 2 3)) is a de facto constant, and can be detected as such within function scope with some compilers, such as SBCL. So you can use a literal created within a macro or created by '#. (preferably the macro route, it's cleaner) and it's de facto constant as long as it doesn't leave the function.
karlosz has joined #lisp
<aeth>
pjb: And it might have all of the optimizations that a constant has, but you have to make sure that it doesn't leave the function, since out of the function the information that it's a literal is lost.
<aeth>
(The macro or '#. to portably create one is only necessary when it's more complicated than what ", '(, and #( can give, of course)
<aeth>
e.g. (defun foo () (let ((s "foo")) (setf (aref s 0) #\a) s)) ; SBCL complains, and if your CL compiler doesn't, complain to your compiler's authors.
<aeth>
pjb: "SBCL complains, and if your CL compiler doesn't, complain to your compiler's authors."
<pjb>
There's no notion of constant in CL. defconstant defines constant VARIABLES.
<aeth>
pjb: but yes you couldn't have these constants in a defconstant
<pjb>
sbcl diverges from CL.
<pjb>
So you admit what I said about literals was correct.
<pjb>
To be precise, (let ((foo #(1 2 3))) (setf (aref foo 0) 0) foo) is implementation dependent. But the point is that #(1 2 3) may be not immutable.
<aeth>
pjb: That's funny that you said that SBCL diverges from CL because it cites the spec in its warning, so I'm sure they've heard that criticism before.
rumbler31 has joined #lisp
<loke>
pjb: In what way are you saying the SBCL diverges from spec?
<loke>
I'm pretty sure it doesn't when it comes to its treatment of constants.
<pjb>
loke: its treatment of types, it's warnings that are often abusive IMO.
marusich has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
<loke>
pjb: You mean its style-warnings?
<aeth>
pjb: Anyway, my point is that #(1 2 3) can be treated as a constant as long as it's in limited scope (usually function scope, but your LET at a top level is also detected by SBCL). Once it's passed around to some random functions doing whatever, the information is lost because it's not tagged as such. Of course, mutating can still cause issues, you're just going to get unexpected bugs on some implementations.
<loke>
You are right in that it gives style-warnings for correct (according to spec) code.
<pjb>
and style warnings shouldn't be generated by the compiler IMO, but by a separate tool.
<pjb>
(lint).
<aeth>
loke: It's a warning, not a style warning.
<loke>
pjb: you can disable style wanirng if you want. Most people like them though.
<loke>
aeth: which warning are you referring to?
<moldybits>
pjb: i'll use (defparameter +foo+ 42). thanks.
<pjb>
moldybits: don't use + with defparameter, use *
<aeth>
Mutating literals in SBCL, which you can do once you pass it around enough to make the compiler lose track, is a bad thing and that's how e.g. you get objects with some point-vector #(0 0 0) starting at a different spot every run instead of starting at the point (0, 0, 0)
<pjb>
aeth: use (vector 0 0 0) in that case, instead of #(0 0 0)
<aeth>
loke: the that pjb's example let will give in SBCL, when mutating #(1 2 3)
<aeth>
pjb: right
<moldybits>
pjb: well, i want to communicate that it won't be changed, which is why i used defconstant originally.
<aeth>
pjb: it's just the first thing I could think of where this causes bugs
<loke>
aeth: But mutating #(1 2 3) is undefined beahviour according to spec. SBCL could very well throw an _error_ instead of just a warning.
<pjb>
moldybits: alternatively you may use a symbol-macro.
<pjb>
(define-symbol-macro foo 42)
<pjb>
Now, for 42 you can use defconstant. Let's say (define-symbol-macro foo "bar")
<moldybits>
what does +foo+ signify that's incompatible with (defparameter +foo+ 42) (or symbol-macro)?
<loke>
pjb: wouldn't that give you all sorts of problems if you try to do, say: (flet ((foo () ...)) ...)
widefathom has quit [Quit: Leaving]
robdog has joined #lisp
gravicappa has joined #lisp
<loke>
pjb: never mind. I was wrong.
<loke>
I didn't know how define-symbol-macro worked
<aeth>
(alexandria:define-constant +foo+ "foo") (setf (aref +foo+ 0) #\a) ; well, SBCL warns here, too, but it still goes ahead and turns it into "aoo", just like the function
<aeth>
probably the best way to do a (mostly) constant string, though
<aeth>
oh, oops, you probably want to add a :test #'string=
<aeth>
Guaranteed, rather than conventional, immutability is kind of a weak point of CL
robdog has quit [Ping timeout: 264 seconds]
<aeth>
That and more-specific-than-T-containing data structures.
<aeth>
define-constant is probably the best way to do it. Someone setting an element of +foo+ is doing something visually quite wrong to any informed reader, just by the +s in the name of the constant.
DGASAU has quit [Ping timeout: 255 seconds]
<moldybits>
(defparameter +magic+ "FOO") ; i'm using ++ to say +magic+ won't be bound to anything else. "FOO" won't be modified either but i don't care to communicate that.
robdog has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
<aeth>
moldybits: I think it's safe to use (alexandria:define-constant +magic+ "FOO" :test 'string=) for that because any non-trivial project is going to have alexandria and uiop loaded into the image already, so they're effectively free dependencies.
<pjb>
moldybits: +foo+ means that you cannot rebind it. (setf +foo+ …) and (let ((+foo+ …)) …) will fail.
<pjb>
moldybits: but with symbol macros, you cannot (setf foo …) but you can (let ((foo …)) …).
<pjb>
Well actually, you may be able to (setf foo …), it depends on the expansion.
karlosz has quit [Quit: karlosz]
quazimodo has quit [Ping timeout: 258 seconds]
robdog has joined #lisp
abhixec has joined #lisp
quazimodo has joined #lisp
<loke>
pjb: You can SETF foo for symbol macros... Can't you?
robdog has quit [Ping timeout: 268 seconds]
<loke>
You have to make sure the symbol macro expansion is setfable
DGASAU has joined #lisp
nanoz has joined #lisp
dddddd has quit [Remote host closed the connection]
<aeth>
loke: Afaik it isn't if the symbol macro is "foo"... but it's still not ideal because you can still set elements of it with aref
rumbler31 has quit [Remote host closed the connection]
<loke>
aeth: well, you wouldn't be if you defined it with DEFCONST anyway. Wasn't the point that you'd be replacing DEFCONST with D-S-M?
xkapastel has joined #lisp
<beach>
Good morning everyone!
marusich has quit [Remote host closed the connection]
wanz has joined #lisp
eschatologist has quit [Ping timeout: 264 seconds]
eschatologist has joined #lisp
Nilby has quit [Remote host closed the connection]
Nilby has joined #lisp
<drmeister>
Does anyone use asdf:monolithic-compile-bundle-op ?
akoana has left #lisp ["Leaving"]
<drmeister>
I can get a monolithic fasl to build but it has problems loading - I'm looking for insight.
dale has quit [Quit: dale]
marvin2 has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
moldybits has quit [Ping timeout: 272 seconds]
meepdeew has joined #lisp
rumbler31 has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
Bike has quit [Quit: Lost terminal]
iovec has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
ebrasca has quit [Remote host closed the connection]
robdog has joined #lisp
lavaflow_ has joined #lisp
lavaflow has quit [Ping timeout: 245 seconds]
rumbler31 has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
<akater>
pjb: constantp returns t for my constant. Does it still mean defconstant is useless? I also don't see any warnings even though it seems to be used in code.
<pjb>
constantp is useless.
<loke>
pjb: not useless. It can be used when doing optimisations in macros
<pjb>
It determines only if th expression passed will always return the same object.
robdog has joined #lisp
<loke>
pjb: exactly.
<loke>
for that, it's very useful
<pjb>
Note that it doesn't say whether the expression is side-effect-free or not.
<pjb>
So you should think a lot before considering using them in macros…
<loke>
under what cicumstances can a side-effectful expression return T for constantp?
<loke>
I can't think of a single case that will fail on any known CL implementation.
<pjb>
loke: sorry, you're right, the definition of constant form excludes side effects.
<loke>
It would be highly useless if it didn't :-)
robdog has quit [Ping timeout: 264 seconds]
robdog has joined #lisp
karlosz has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
robdog has joined #lisp
nanoz has quit [Ping timeout: 255 seconds]
robdog has quit [Ping timeout: 264 seconds]
akater has quit [Quit: WeeChat 2.3]
Lycurgus has joined #lisp
anewuser has quit [Quit: anewuser]
milivoj has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
meepdeew has quit [Remote host closed the connection]
robdog has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
robdog_ has joined #lisp
quazimodo has quit [Ping timeout: 245 seconds]
robdog has joined #lisp
robdog_ has quit [Ping timeout: 250 seconds]
quazimodo has joined #lisp
iAmDecim has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
Oladon has quit [Quit: Leaving.]
amerlyq has quit [Quit: amerlyq]
_whitelogger has joined #lisp
robdog has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
robdog has quit [Ping timeout: 264 seconds]
hiroaki has quit [Ping timeout: 255 seconds]
emaczen has joined #lisp
_whitelogger has joined #lisp
robdog has joined #lisp
sauvin has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
robdog has joined #lisp
dale has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
robdog_ has quit [Ping timeout: 264 seconds]
karlosz has quit [Quit: karlosz]
jprajzne has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
emaczen has quit [Ping timeout: 264 seconds]
robdog has joined #lisp
karlosz has joined #lisp
pritambaral has joined #lisp
prite has quit [Ping timeout: 245 seconds]
robdog_ has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
robdog_ has quit [Ping timeout: 250 seconds]
dale has quit [Quit: dale]
pritambaral has quit [Ping timeout: 246 seconds]
nowhere_man has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
Lycurgus has quit [Quit: Exeunt]
DGASAU has quit [Ping timeout: 250 seconds]
shrdlu68 has joined #lisp
xkapastel has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
pritambaral has joined #lisp
rumbler31 has quit [Remote host closed the connection]
nefercheprure has joined #lisp
robdog_ has quit [Ping timeout: 250 seconds]
chens has joined #lisp
TMA has quit [*.net *.split]
robdog has joined #lisp
ggole has joined #lisp
DGASAU has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
<makomo>
morning
<splittist>
what makomo said
<makomo>
:)
robdog has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
<shka__>
good morning
ravenousmoose has joined #lisp
schweers has joined #lisp
juristi has joined #lisp
gxt has quit [Ping timeout: 255 seconds]
zymurgy has quit [Quit: WeeChat 1.4]
robdog has joined #lisp
ravenousmoose has quit [Ping timeout: 250 seconds]
robdog has quit [Ping timeout: 264 seconds]
dddddd has joined #lisp
nowhere_man has quit [Ping timeout: 258 seconds]
scymtym has joined #lisp
robdog has joined #lisp
kdas_ has joined #lisp
kushal has quit [Remote host closed the connection]
varjag has joined #lisp
Inline has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
<flip214>
drmeister: I heard that (at least SBCL) allows to just "cat" FASLs together -- that would give one monolithic file, too.
robdog has joined #lisp
rumbler31 has joined #lisp
kayront has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
<pjb>
flip214: clisp too.
wanz has quit [Quit: wanz]
rumbler31 has quit [Ping timeout: 244 seconds]
chens has quit [Remote host closed the connection]
<shka__>
wow, this sounds like a useful trick
<shka__>
is it possible to learn this power? ^^
robdog has joined #lisp
mulk has quit [Ping timeout: 268 seconds]
random-nick has joined #lisp
lavaflow_ has quit [Read error: No route to host]
robdog has quit [Ping timeout: 250 seconds]
lavaflow_ has joined #lisp
robdog has joined #lisp
<splittist>
shka__: see also the *-bundle-op ASDF operations (and relatives) e.g. monolithic-compile-bundle-op
<shka__>
oh, a lot of reading
<shka__>
splittist: thanks i wll note todo to dig into manuals of both sbcl and asdf
heisig has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
mulk has joined #lisp
robdog has joined #lisp
kushal has joined #lisp
wanz has joined #lisp
kdas_ has quit [Ping timeout: 256 seconds]
robdog has quit [Ping timeout: 264 seconds]
rozenglass has quit [Ping timeout: 264 seconds]
robdog has joined #lisp
m00natic has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
marvin2 has joined #lisp
keep_learning_M has quit [Quit: This computer has gone to sleep]
<schweers>
(swank:create-server) returns immediately, does anyone have an idea why? This is regardless of whether I specify :dont-close or not. I have a shellscript which calls sbcl like this, which works:
<pjb>
schweers: swank server may run in the background, depending on swank:*communication-style*
<shka__>
schweers: isn't it supposed to do that?
<shka__>
right, what pjb said
<shka__>
i didn't even knew that i can work in sync
<shka__>
*it can work
<schweers>
Huh. Thanks, I’ll have a look at that
<pjb>
You can make it run synchronously, eg. when you don't have threads.
<schweers>
Cool, that was it. Thank you very much!
robdog has joined #lisp
nefercheprure is now known as TMA
<schweers>
How that I’ve loaded swank via asdf, the dumped executable seems to no longer work on another machine. I’m probably missing something really obvious, can anyone point me in the right direction?
<no-defun-allowed>
what happens instead of it working?
robdog has quit [Read error: Connection reset by peer]
<schweers>
I get an error message on the terminal claiming that the process exited with exit code one. This happens when I call create-server (as far as I can tell).
<schweers>
another call to (swank-loader:init) does not seem to help
<schweers>
I’ll insert a few debug messages
robdog has joined #lisp
matijja has joined #lisp
<jdz>
schweers: I have this in my build script before dumping an image: (swank-loader:init :load-contribs t :setup nil :reload t)
<schweers>
How do you load swank?
<jdz>
(asdf:load-system :swank)
<schweers>
It seems that the ASDF system already does the init call, if I understood the manual correctly.
xkapastel has quit [Quit: Connection closed for inactivity]
<schweers>
I inserted format forms before init and create-server, and neither are executed (as far as I can tell).
robdog has quit [Ping timeout: 264 seconds]
<schweers>
On the machine where I build the executable said format forms are executed and I can see the result
<jdz>
Right, it does. I have that call to load contribs. This might not be your issue, then.
<schweers>
This is really weird. I have a mapping from strings to functions (all with zero arguments). Every argument passed from the shell is used to call such a function. They all work fine, apart from the new one for swank, which only works on my local machine.
robdog has joined #lisp
jb has quit [Ping timeout: 246 seconds]
robdog has quit [Ping timeout: 250 seconds]
<schweers>
Okay, there seems to be some other problem. I commented all the swank code out, and I still have this problem.
robdog has joined #lisp
rozenglass has joined #lisp
hhdave has joined #lisp
Nilby has quit [Ping timeout: 245 seconds]
robdog_ has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
atgreen_ has joined #lisp
wanz has quit [Quit: wanz]
robdog_ has quit [Ping timeout: 268 seconds]
atgreen has quit [Ping timeout: 246 seconds]
robdog has joined #lisp
iAmDecim has quit [Remote host closed the connection]
robdog_ has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
karlosz has quit [Quit: karlosz]
robdog has joined #lisp
wanz has joined #lisp
robdog_ has quit [Ping timeout: 264 seconds]
rumbler31 has joined #lisp
akater has joined #lisp
rumbler31 has quit [Ping timeout: 246 seconds]
robdog has quit [Ping timeout: 264 seconds]
robdog has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
rumbler31 has joined #lisp
robdog has joined #lisp
robdog_ has quit [Ping timeout: 264 seconds]
rumbler31 has quit [Ping timeout: 250 seconds]
robdog_ has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
robdog_ has quit [Ping timeout: 250 seconds]
jmercouris has joined #lisp
robdog has joined #lisp
moldybits has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
kushal has quit [Remote host closed the connection]
kushal has joined #lisp
robdog has joined #lisp
ludston has joined #lisp
robdog_ has quit [Ping timeout: 264 seconds]
robdog_ has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
CrazyEddy has quit [Remote host closed the connection]
juristi has quit [Quit: Konversation terminated!]
robdog_ has quit [Ping timeout: 250 seconds]
Lord_of_Life_ has joined #lisp
Necktwi has quit [Quit: leaving]
Lord_of_Life has quit [Ping timeout: 246 seconds]
Lord_of_Life_ is now known as Lord_of_Life
Necktwi has joined #lisp
orivej has quit [Ping timeout: 245 seconds]
<jmercouris>
Hi everyone, I'm having trouble adding :perform test-op with FiveAM to my ASD file and having my system load properly
<schweers>
jmercouris: you need a :in-order-to ((test-op (test-op "app/test"))) in your "app" defsystem
<scymtym>
jmercouris: also, you typically use (uiop:symbol-call '#:app-test '#:test-all) in the asd file and (in-package #:app-test) (defun test-all () (fiveam:run! 'SUITE-NAME)) in tests/app.lisp
<schweers>
Oh, I didn’t see you added your error at the end. I guess you have a different problem.
<jmercouris>
Yeah :(
robdog has joined #lisp
<scymtym>
but what schweers says is also good since otherwise (asdf:test-system "app/test") will work, but not (asdf:test-system "app")
<schweers>
What did you do at the repl?
<jmercouris>
I just tried to load my system
<jmercouris>
the one named "app"
Necktwi has quit [Quit: leaving]
<jmercouris>
(ql:quickload "app")
Necktwi has joined #lisp
<schweers>
aaahhh
<scymtym>
(uiop:symbol-call :fiveam :run! #'app.test:test-all) tries to intern app.test:test-all when READing the asd file
<schweers>
yes
<jmercouris>
so what do I need to do?
<schweers>
this is how I do it: :perform (test-op (o s)
<jmercouris>
scymtym: Ok, I'm trying to understand it, one moment please
<schweers>
uiop has some weird tricks to circumvent the problem. This is why my code is also quite ugly. But it works
<schweers>
so using uninterned symbols should fix your problem
<schweers>
(I think)
<jmercouris>
that's interesting why the '# ?
<jmercouris>
quote a function?
<jackdaniel>
I think that the right solution (in a parallel universe) would be that system definitions are read by a reader which is not the Common Lisp reader
Necktwi has quit [Client Quit]
Necktwi has joined #lisp
<jackdaniel>
(which doesn't error when we refere a symbol from yet-to-be-loaded package)
<schweers>
jmercouris: it is a quoted uninterned symbol
<jackdaniel>
as of the guide on my website, yes, ASDF integration section is wrong (for this very reason)
<schweers>
so it is basically used only for the symbol-name
<jmercouris>
schweers: aha, so you can avoid interning it
<jmercouris>
interesting
Ukari has quit [Remote host closed the connection]
<jmercouris>
scymtym: does the defpackage remain within my test file?
<jmercouris>
surely it must
schjetne has quit [Ping timeout: 250 seconds]
<scymtym>
jmercouris: typically yes. you could also have a separate file like test-package.lisp or something. but the package is defined when your test files are loaded, not when the system definition is loaded
<scymtym>
actually, '#:app.test since that's the name of your package
robdog_ has joined #lisp
<jmercouris>
Yes, indeed
<jmercouris>
yay! my asd load finally :)
<jmercouris>
thank you
<jmercouris>
now to add the in-order-to
<jmercouris>
and try running the tests!
<scymtym>
add :in-order-to ((test-op (test-op "add/test"))) to the main system, then try (asdf:test-system "app")
<jmercouris>
yes, just restarting my inferior lisp and giving it a spin!
robdog has quit [Ping timeout: 268 seconds]
<jmercouris>
I don't feel like it should be called inferior lisp, cl is way better than elisp
<jmercouris>
but whatever
<jmercouris>
:P
<jmercouris>
I'm aware of the reasoning behind the name inferior lisp, to be clear I am making a joke
<schweers>
Lol, I never looked at it that way.
<jmercouris>
asdf:test-system worked! yay!
<jmercouris>
however it did not automatically load fiveam even though the system app/test depends on it
<jmercouris>
I had to manually quickload it, why is that?
robdog has joined #lisp
<jmercouris>
do I have to first do (ql:quickload "app/test")? and then (asdf:test-system "app")?
robdog_ has quit [Ping timeout: 268 seconds]
<schweers>
Huh, that’s weird
<scymtym>
it should work once fiveam is installed. i think ASDF:TEST-SYSTEM is not hooked up to install systems via quicklisp
<schweers>
So restarting your inferior lisp once again should fix the issue
robdog_ has joined #lisp
<phoe>
How does SWANK know if a given symbol is defined to be a type specifier?
<ecraven>
maybe check the source? I'm no expert, but I've found some information I sought in the sources, they seem approachable
<jmercouris>
schweers: yep, all good now, thanks
<phoe>
I don't really know where to start in the source. All I know that slime-company shows "function" as being bound as a type, and I don't know where it gets that information from.
robdog has quit [Ping timeout: 250 seconds]
Lycurgus has joined #lisp
<jackdaniel>
phoe: grep for "defimplementation find-definitions" and "defimplementation find-source-location"
<jackdaniel>
in swank directory
<phoe>
jackdaniel: thanks, gonna do that
ebrasca has joined #lisp
robdog has joined #lisp
<phoe>
jackdaniel: this still doesn't answer my question. For instance, (swank::find-definitions 'member) only lists a DEFUN, a DEFTRANSFORM for sequences, and SBCL's DEFKNOWN.
<schweers>
are TEST and DEF-TEST the same in fiveam?
<phoe>
Nothing about MEMBER also being defined as a type.
robdog_ has quit [Ping timeout: 250 seconds]
<phoe>
And swank obviously knows which symbol is defined as a type and which are not. That knowledge doesn't seem to come from SWANK::FIND-DEFINITIONS though.
<ecraven>
maybe look in *slime-events* to see which swank message is sent?
<shka_>
pjb: readme clearly states that your example is too complex
robdog_ has quit [Ping timeout: 264 seconds]
<pjb>
But I can do this myself in my head: (simplify-type '(or (eql 0) (member 1 3 5) (member 2 4 6))) #| --> (integer 0 6) |#
<shka_>
jkordani: anyway, do you understand this library now?
<shka_>
pjb: well, i am sure that heiseg accepts pull requests ;-)
<pjb>
:-)
<shka_>
*heisig
bendersteed has joined #lisp
<shka_>
pjb: i suspect that this is exact minimal library he needed for the petalisp
<shka_>
and despite the limitations, it is useful for vectors and stuff
<jkordani>
I get that... it uh... can take type specifications and a heirachy and reduce a given one to a simpler form but I don't understand why this is useful, and not from a learned perspective.
<jkordani>
like this helps the user of the lib do what
lumm has quit [Quit: lumm]
lumm has joined #lisp
<shka_>
jkordani: well, for picking the type optimized implementation, for checking compatibility of types in the generated code and so one
<shka_>
nerdy stuff ;-)
<shka_>
i think i know the exact use case author had in mind, but the above are also valid
<pjb>
jkordani: it's not useful if you are the one specifying the types, but sometimes you get types from other places, and it may be useful to simplify their conjonction or their disjonction.
<shka_>
exactly what pjb said
<shka_>
which is what restricted-functions does
<shka_>
anyway, still stuff to do, i hope i helped you a little
robdog has quit [Ping timeout: 264 seconds]
<jkordani>
oh
<jkordani>
holy moley
<pjb>
Yeah, rather useless: (simplify-type '(or short-float single-float double-float long-float)) #| --> t |#
<sjl_>
That's because there's no `float` in the simplified hierarchy in the readme, I'd imagine
<shka_>
pjb: well, not sophisticated
<shka_>
sjl_: yup
<sjl_>
Which is presumably because doing something like (make-array ... :element-type 'float) isn't particularly helpful
robdog has joined #lisp
<Bike>
it mentions having a simpler lattice structure as an advantage
<sjl_>
And including `float` in the hierarchy would break the disjointness guarantee mentioned in the readme.
<emaczen>
If I try the same with a NSTextView, Immediately after calling #/initWithFrame: I get signal 11
<emaczen>
in CCL that puts you into the kernel debugger
<emaczen>
in SBCL I get a CORRUPTION WARNING, Memory Fault
ravenous_ has joined #lisp
giova has quit [Read error: Connection reset by peer]
robdog has quit [Ping timeout: 264 seconds]
robdog has joined #lisp
gxt has joined #lisp
<emaczen>
minion: memo for fiddlerwoaroof: I briefly looked at NSException.h which has the macro definitions for exception handling, and it looked to me that all you have to do is just translate the macro definition into lisp
<minion>
Remembered. I'll tell fiddlerwoaroof when he/she/it next speaks.
robdog has quit [Ping timeout: 264 seconds]
<emaczen>
minion: memo for fiddlerwoaroof: the translation entails defining the C struct for an execption and some function calls
<minion>
Remembered. I'll tell fiddlerwoaroof when he/she/it next speaks.
nanoz has quit [Ping timeout: 272 seconds]
gareppa has joined #lisp
cage_ has quit [Remote host closed the connection]
Inline has quit [Read error: Connection reset by peer]
Inline has joined #lisp
robdog has joined #lisp
<emaczen>
nevermind my NSTextView question...
<slyrus_>
emaczen: it works now?
robdog_ has joined #lisp
robdog has quit [Ping timeout: 244 seconds]
rozenglass has quit [Ping timeout: 246 seconds]
jb__ has joined #lisp
<emaczen>
slyrus_: Yes, but I need to learn more about when and how to get control of the main thread
robdog has joined #lisp
<eschatologist>
minion: memo for emaczen: Don't try to bridge NSException to Lisp, it'll only end in tears, Objective-C exceptions *are not meant* to be handled
<minion>
Remembered. I'll tell emaczen when he/she/it next speaks.
<emaczen>
It appears that the CCL bridge is more tolerant of not executing GUI code on the main thread too
<minion>
emaczen, memo from eschatologist: Don't try to bridge NSException to Lisp, it'll only end in tears, Objective-C exceptions *are not meant* to be handled
<eschatologist>
Oh I see, that's recent. :)
<eschatologist>
(Your message.)
<emaczen>
eschatologist: What is recent?
<eschatologist>
Your memo to fiddlerwoaroof about looking at NSException.h
<eschatologist>
It really sounds like you're trying to bridge NSException and Lisp conditions or something though.
<eschatologist>
Which, really, you can't. As soon as an NSException is raised/thrown, you need to treat process state as corrupt.
<emaczen>
eschatologist: Why do we have to treat the process state as corrupt?
<eschatologist>
Because that's the rule for NSException.
<eschatologist>
Virtually none of the code inside the frameworks is exception-safe.
<shka_>
how to portable check during macroexpand if safety is 3?
<emaczen>
Okay, I'm glad I didnt waste my time then! haha
<eschatologist>
So when an exception is thrown none of the intervening stack frames etc. between the throw and the eventual catch are likely to do whatever housekeeping is needed to keep the process going.
<eschatologist>
(Trust me on this, 22 years of NeXT/Cocoa experience, and I've work on tools and frameworks at Apple.)
<emaczen>
eschatologist: I'm using GNUstep -- same difference?
<eschatologist>
GNUstep is an entirely independent implementation but it almost certainly has all the same constraints.
<emaczen>
eschatologist: cool, I won't waste my time trying to do the impossible...
<eschatologist>
Since none of the OpenStep APIs GNUstep implemented had any definition about exception safety, there's probably no consideration for it in the implementation.
<emaczen>
slyrus_: It also has to do with the Cocoa main event loop
<eschatologist>
That trivial-main-thread thing on Github also propagates a common myth, "only thread 0 is allowed to issue drawing calls." The reality is WAY more subtle and stating things in that fashion is likely to lead to people writing bad code. (E.g. people assuming things like "calls that don't draw are safe from multiple threads.")
<slyrus_>
ah, OK.
robdog_ has joined #lisp
<emaczen>
eschatologist: Yeah, which is why I couldn't just (#/initWithFrame: (#/alloc 'ns-text-view) (make-ns-rect 0 0 600 800))
<emaczen>
As soon, as I put it in the main thread it was fine
<emaczen>
BUT, it never got handled by the event loop
jmercouris has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
<jmercouris>
is anyone here interested in me setting up a mastodon server for lisp?
<eschatologist>
If the view is in a window that's onscreen, it should get events routed.
<emaczen>
I'm using sb-thread:interrupt-thread (sb-thread:main-thread) (lambda () ...) and the equivalent ccl:process-run-function for CCL
<eschatologist>
I don't think it matters how you actually get to the main thread.
<eschatologist>
The critical part is actually having a view in a window and having that window onscreen.
<eschatologist>
You don't manage the event loop yourself in Cocoa, the framework manages it for you.
<jmercouris>
eschatologist: not always, not when you have an opengl loop within a cocoa window
sunset_NOVA has quit [Quit: Leaving]
<emaczen>
eschatologist: I only briefly looked at the CCL bridge and to me it looked like they subclassed NSApplication and defined a selector called #/lispInterrupt
robdog_ has quit [Ping timeout: 250 seconds]
<jmercouris>
they do subclass NSApplication
<jmercouris>
I don't know about #/lispInterrupt
<jmercouris>
have you tried the objective-c bridge by fiddlerwoaroof?
<emaczen>
jmercouris: fiddlerwoaroof has given me some pointers
<emaczen>
eschatologist: Well, what are other possible reasons that nothing happens to my window when I create an NSTextView and then send #/addSubview or #/setContentView appropriately?
<emaczen>
eschatologist: I'll make a paste, give me a few moments
<no-defun-allowed>
well yeah 1.4.6 (or 1.4.5?) removed the COMPILE lock
<no-defun-allowed>
my bad, 1.4.15
random-nick has joined #lisp
<emaczen>
eschatologist: The result of evaluating that in the REPL is nothing on the window, and no logs in *inferior-lisp* either
<eschatologist>
Yeah, can't tell you why that wouldn't work. I assume you know that an NSTextView isn't a complete text stack with a scroll view, clip view, etc. like you'd get in a xib file, right?
shka_ has quit [Ping timeout: 244 seconds]
p9fn has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
<emaczen>
eschatologist: I've never used IB or the GNUstep equivalent
ravenous_ has joined #lisp
<emaczen>
But I think I know what you mean since I have manually added a NSScrollView etc to a NSTextView before
<eschatologist>
(Also the Lisp bridges really need to update to using libclang to parse the modern headers or something so they can do things like `(setf (window contentView) textView)` instead of having use #/ to explicitly call setters.
orivej has joined #lisp
robdog has joined #lisp
<eschatologist>
emaczen: I would suggest in the strongest possible terms that you work through a couple Cocoa-with-Xcode-on-macOS tutorials using Interface Builder and so on. NeXT's frameworks were always very opinionated about how you should work with them and Apple has continued that tradition, and trying to work in a different way will be fighting them.
<eschatologist>
That doesn't mean you need to use Interface Builder for your own stuff, but it does mean you need to know everything that IB is doing for you, intimately, so you can do it yourself.
<emaczen>
eschatologist: I'll try out GNUstep GORM eventually...
<eschatologist>
I wouldn't bother with GNUstep if you want to learn Apple's frameworks.
<eschatologist>
It was a nice idea in 1994, just like Sun OpenStep for Solaris.
<emaczen>
I'm in the process of porting a minimal GUI app from OSX to linux
robdog has quit [Ping timeout: 250 seconds]
<emaczen>
eschatologist: from the repl (#/contentView win) returns a NSView
Harag has quit [Ping timeout: 240 seconds]
<emaczen>
which means that my setContentView message never got processed
rotty has joined #lisp
<eschatologist>
One thing I'd notice as an IB user is that I *never set the contentView of a window*.
<eschatologist>
Instead I add views as subviews.
Josh_2 has quit [Ping timeout: 240 seconds]
<emaczen>
eschatologist: I usually use #/addSubview too
<emaczen>
I think this is a thread problem because if I just put a (format t ....) form as the first form in the body of the (with-main-thread ...) I never see anything printed...
robdog has joined #lisp
<fouric>
no-defun-allowed: cool! now, does that mean that i can actually COMPILE two files in two threads simultaneously, or is still a ways off?
kenu has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
macbug has joined #lisp
comborico1611 has joined #lisp
robdog has joined #lisp
<moldybits>
i want to make a new list of N elements, each provided by a procedure, like: (make-list 3 :initial-element-producer (lambda () (random 10))) => (4 7 2) ; what's the canonical lisp way?
jmercouris has quit [Remote host closed the connection]
robdog has quit [Ping timeout: 255 seconds]
<Bike>
i would do (loop repeat n collect (random 10))
cmatei has joined #lisp
<moldybits>
Bike: oh, looks good. thank you!
McParen has left #lisp [#lisp]
comborico1611 has quit [Ping timeout: 268 seconds]
robdog has joined #lisp
<verisimilitude>
Try this on for size: (map-into (make-list 3) 'random '#1=(10 . #1#))
<verisimilitude>
I don't recommend it, but this is a more fun way to do it.
robdog has quit [Ping timeout: 250 seconds]
eschulte has joined #lisp
scymtym has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
amerlyq has quit [Quit: amerlyq]
iovec has quit [Quit: Connection closed for inactivity]
robdog has quit [Ping timeout: 268 seconds]
rozenglass has joined #lisp
pritambaral has quit [Ping timeout: 272 seconds]
dddddd has quit [Remote host closed the connection]
ravenous_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<aeth>
verisimilitude: At that point you might as well just (lambda () (random 10)) as the function
orivej has quit [Ping timeout: 272 seconds]
edgar-rft has joined #lisp
<aeth>
It appears to work with (map-into (make-list 3) (lambda () (random 10)))
Achylles has quit [Ping timeout: 258 seconds]
<verisimilitude>
Well, yes, I didn't recommend it, aeth.
<verisimilitude>
Besides, maybe (EQUALP MORE-FUN IDIOMATIC) is T.
lumm has joined #lisp
<makomo>
what's the usual idiom when you want to "merge" multiple "multiple values"? e.g. i would like for (values mvs1 mvs2) to merge all of the multiple values returned by mvs1 and mvs2 and return them all as multiple values
phoe has quit [Ping timeout: 250 seconds]
<makomo>
is it just mv-list + append + values-list or is there something else?