chens has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
dorketch has joined #lisp
Kundry_Wag has quit [Ping timeout: 244 seconds]
Mr-Potter has quit [Ping timeout: 272 seconds]
Kundry_Wag has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
Kundry_Wag has quit [Ping timeout: 245 seconds]
fikka has quit [Ping timeout: 250 seconds]
chens has joined #lisp
pjb has joined #lisp
anewuser has joined #lisp
pjb has quit [Ping timeout: 252 seconds]
lmy9900_ has joined #lisp
lmy9900__ has joined #lisp
lmy9900_ has quit [Ping timeout: 268 seconds]
lmy9900 has joined #lisp
khisanth_ has quit [Ping timeout: 250 seconds]
igemnace has joined #lisp
lmy9900_ has joined #lisp
khisanth_ has joined #lisp
lmy990___ has joined #lisp
lmy9900__ has quit [Ping timeout: 252 seconds]
lmy9900 has quit [Ping timeout: 240 seconds]
sjl has quit [Quit: WeeChat 2.2-dev]
lmy9900 has joined #lisp
Kundry_Wag has joined #lisp
lmy9900_ has quit [Ping timeout: 252 seconds]
lmy99____ has joined #lisp
fikka has joined #lisp
lmy990___ has quit [Ping timeout: 268 seconds]
lmy9900_ has joined #lisp
lmy9900 has quit [Ping timeout: 240 seconds]
Kundry_Wag has quit [Ping timeout: 272 seconds]
lmy9900 has joined #lisp
lmy99____ has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
lmy9900__ has joined #lisp
lmy990___ has joined #lisp
lmy9900_ has quit [Ping timeout: 272 seconds]
lmy9900 has quit [Ping timeout: 240 seconds]
Kundry_Wag has quit [Ping timeout: 268 seconds]
lmy9900__ has quit [Ping timeout: 250 seconds]
esrse has joined #lisp
lmy9900 has joined #lisp
lmy990___ has quit [Ping timeout: 268 seconds]
lmy9900__ has joined #lisp
lmy9900 has quit [Ping timeout: 245 seconds]
lmy9900__ has quit [Ping timeout: 268 seconds]
lmy9900 has joined #lisp
lmy9900_ has joined #lisp
Kundry_Wag has joined #lisp
lmy9900 has quit [Ping timeout: 250 seconds]
fikka has quit [Ping timeout: 240 seconds]
Kundry_Wag has quit [Ping timeout: 268 seconds]
robotoad has quit [Quit: robotoad]
lmy9900 has joined #lisp
lmy9900_ has quit [Ping timeout: 244 seconds]
lmy9900__ has joined #lisp
lmy9900 has quit [Ping timeout: 272 seconds]
lmy9900 has joined #lisp
arescorpio has joined #lisp
lmy9900__ has quit [Ping timeout: 245 seconds]
lmy9900 has quit [Ping timeout: 250 seconds]
lmy9900 has joined #lisp
<jcowan>
Is the pattern of multiple values that SUBTYPEP uses (first value is the value, second value is a boolean indicating its validity) a common one in CL code?
dorketch has quit [Quit: WeeChat 2.1]
<Bike>
i don't recall seeing it otherwise.
<Bike>
i think alexandria:type= uses the same return values, but that's for basically the same thing.
<Bike>
i guess i don't deal with that particular informational situation very often, though.
fikka has joined #lisp
Kundry_Wag has joined #lisp
robotoad has joined #lisp
lmy9900_ has joined #lisp
lmy9900__ has joined #lisp
Kundry_Wag has quit [Ping timeout: 268 seconds]
lmy9900 has quit [Ping timeout: 268 seconds]
lmy9900_ has quit [Ping timeout: 250 seconds]
Kundry_Wag has joined #lisp
lmy9900 has joined #lisp
rumbler31 has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
wlemuel has joined #lisp
dddddd has quit [Remote host closed the connection]
stevelemuel has joined #lisp
lmy9900__ has quit [Ping timeout: 268 seconds]
stevelemuel has quit [Client Quit]
SaganMan has joined #lisp
lmy9900_ has joined #lisp
lmy9900 has quit [Ping timeout: 245 seconds]
lmy9900 has joined #lisp
gabot has joined #lisp
lnostdal has quit [Remote host closed the connection]
lmy9900_ has quit [Ping timeout: 252 seconds]
lmy99____ has joined #lisp
lnostdal has joined #lisp
lmy9900 has quit [Ping timeout: 268 seconds]
lmy9900 has joined #lisp
lmy99____ has quit [Ping timeout: 246 seconds]
wlemuel has quit [Ping timeout: 240 seconds]
wlemuel has joined #lisp
<fouric>
does anyone know of a lisp reader that preserves the locations of the forms that were read in in the file?
nirved has quit [Ping timeout: 252 seconds]
<fouric>
that is, when i invoke said hypothetical READ, it returns not only the results of normal READ but also line numbers and character indices/columns of where each atom/list was found
<no-defun-allowed>
it'd be awfully spammy if most of the room went "i don't know much about sly"
<no-defun-allowed>
cause erm i don't know anything about sly and thus can't help
gravicappa has quit [Remote host closed the connection]
scymtym has joined #lisp
<sink>
Better question then: How do I start understanding a large and underdocumented CL project? I feel lost just reading the code. How do I start interactively fiddling with it?
lmy9900 has joined #lisp
<no-defun-allowed>
probably would be on the Elisp side if it's syntax highlighting
<sink>
I'm looking at a CL project in this case. I've actually had a much nicer time debugging Elisp issues (mostly because it's not doing anything fancy, just routine functions for scripting and text editing).
<sink>
Do I call functions in the REPL with random inputs and see what happens?
lmy9900_ has quit [Ping timeout: 272 seconds]
<no-defun-allowed>
you could do that
<fiddlerwoaroof>
sink: if it has tests of some sort, that might be where to start?
<no-defun-allowed>
M-. also helps to find what does what too
jcowan has quit [Quit: Connection closed for inactivity]
lmy9900_ has joined #lisp
rumbler31 has quit [Remote host closed the connection]
<fiddlerwoaroof>
Or, if you have a code sample that uses the project, maybe look at the source of the functions that your code sample uses and play around with the inputs in the repl
<sink>
no-defun-allowed: That's how I found myself lost in source code. I jump to one function that throws an error, then try to figure out what defun+ is, and before I know it I'm swamped in macros.
<fiddlerwoaroof>
Also, the macrostep expander in emacs is really useful
<no-defun-allowed>
take notes as you go, i suppose
<sink>
fiddlerwoaroof: I see everyone talking about this Test Driven Development and testing thing. Where do I start?
<no-defun-allowed>
even if you get nowhere you have more documentation :)
<no-defun-allowed>
1. do not start that
<fiddlerwoaroof>
If you find a macro you don't recognize C-c M-e on it
<sink>
fiddlerwoaroof: I've seen that mentioned. I should learn that.
SaganMan has quit [Ping timeout: 268 seconds]
<no-defun-allowed>
anything that touches agile or extreme programming only deserves pointing and laughing
lmy9900 has quit [Ping timeout: 246 seconds]
<jackdaniel>
pfdietz: do you have by chance some code snippet to show how you implement slot-unbound condition to lazily compute values? you've mentioned it the other day and it sounds clever, but I'm curious how did you implement that
<fiddlerwoaroof>
no-defun-allowed: I work at a TDD-heavy shop, it actually puts some useful design pressure on your code
<jackdaniel>
s/but/and/
<no-defun-allowed>
cause your test cases have to be pretty damn good or you lose where you didn't test
<rk[ghost]>
hmm, i found SLY on github: as for tests see test/ directory. another good place to start is to read the illustrated guide linked there.
<rk[ghost]>
github.com itself has syntax highlighting.
<sink>
rk[ghost]: The guide comes installed as an info package when you install Sly. It's really nice. Unfortunately, it says nothing about highlighting in the REPL.
lmy9900 has joined #lisp
<sink>
How do I learn to read other people's code in general?
<no-defun-allowed>
jackdaniel: slot-unbound is a gf which gets called with the class, instance and slot name, you could write a specialiser over the class and slot name which computes it i assume
<fiddlerwoaroof>
Mostly by just reading it
<no-defun-allowed>
although: i don't see how it returns the fixed slot
<jackdaniel>
ah, and default method signals the condition
<fiddlerwoaroof>
It looks to me like slot-unbound just returns the new value
<jackdaniel>
thanks
lmy9900_ has quit [Ping timeout: 244 seconds]
<no-defun-allowed>
yeah, it did with my test
<rk[ghost]>
err, this may be a silly question but, is there a function that returns a string the way (princ) prints it?
<fiddlerwoaroof>
So (setf (slot-value ...))) as the last form would bind the slot and return the computed value
<jackdaniel>
I already have the gist of it, but thanks
sink has left #lisp ["ERC (IRC client for Emacs 25.1.1)"]
Zaab1t has joined #lisp
<jackdaniel>
he sinked
<jackdaniel>
or sank
wlemuel has joined #lisp
<no-defun-allowed>
haha, fair enough
<rk[ghost]>
my string has " in it.. princ shows as " but the string returns with \" .. this mangles things for me.
Lycurgus has quit [Quit: Exeunt]
lmy9900_ has joined #lisp
<fiddlerwoaroof>
The string will always have the \" in the printed representation of the string
<jackdaniel>
rk[ghost]: it is just notation, how otherwise would you print a string which is delimited with " ?
<loke`>
rk[ghost]: No. It just _displays_ the return value with a \
<rk[ghost]>
hmm, i see.
<fiddlerwoaroof>
(princ (princ-to-string "\"foo\"")) will demonstrate this
<fiddlerwoaroof>
What are you trying to do?
<rk[ghost]>
in the end, i was using hunchentoot in the past to create webpages.. i found that when i was trying to make hyperlinks, i was getting the \" appearing and it wasn't redirecting correctly
lmy9900__ has joined #lisp
Kundry_Wag has joined #lisp
<rk[ghost]>
however, now i was just writing a new function, but i am currently seperated from the hunchentoot code.
<rk[ghost]>
so i was doing it outside there and recalled the issue..
<jackdaniel>
you may embed strings in a template with format (format nil "http://~A/bar" "my-url")
<rk[ghost]>
so let's forget the problem until i am at the point i am testing and breaking things.
<jackdaniel>
there is also cl-interpol library
<fiddlerwoaroof>
Or use a uri library to handle these things automagically
* rk[ghost]
likes magic
lmy9900 has quit [Ping timeout: 244 seconds]
* no-defun-allowed
zaps rk[ghost]
<jackdaniel>
fwiw magic often proves to be inefficient though I'm sure there are exceptions
<rk[ghost]>
lemme post my current lame code that i would have passed to the page generator in hunchentoot..
* no-defun-allowed
zaps rk[ghost] thinking the other zap got broken cause riotdotim is a pile of garbage
<fiddlerwoaroof>
jackdaniel: I just mean that something like quri or puri solves a lot of the corner cases in uri generation for you
* rk[ghost]
turns in to a fish
lmy9900_ has quit [Ping timeout: 240 seconds]
<jackdaniel>
yes, that was a general remark
<fiddlerwoaroof>
It's no fun having to think about urlencoding/etc. every time you want a uri
<jackdaniel>
I don't consider these libraries doing "magic"
<fiddlerwoaroof>
The "magic" is the automatic urlencoding
lmy9900 has joined #lisp
<jackdaniel>
this looks like a primary library functionality. by "magic" I understand some unobvious (but useful by some means) processing steps
<no-defun-allowed>
i consider putting on a wizard hat and using good abstraction magic
<jackdaniel>
like a fancy reader macros
Kundry_Wag has quit [Ping timeout: 268 seconds]
<fiddlerwoaroof>
jackdaniel: yeah, I generally use it to mean hiding annoying details of the problem domain from the user.
<jackdaniel>
that's called an abstraction, not magic ;-)
<fiddlerwoaroof>
Abstraction is magic :)
lmy9900__ has quit [Ping timeout: 240 seconds]
<no-defun-allowed>
^^
<jackdaniel>
I won't argue because it is a subject of opinion, I reserve word magic for other things
<fiddlerwoaroof>
Yeah
<no-defun-allowed>
hal ableson in a wizard hat is certainly capable of magic
<no-defun-allowed>
anyway i remember a kind of string lookup tree which used some clever stuff about strings to speed up comparisons, anyone know much about that?
<no-defun-allowed>
i remember it'd dispatch on each char so you only have to char< or char> instead of string< or string>
<no-defun-allowed>
*also char= since two strings can have the same char in one spot
<aeth>
My favorite thing about that keyboard is that it has two sets of () and the {}s are way out of the way to punish you for even thinking about using them.
<rk[ghost]>
2nd key down from the left is the ( and second key down from the right is )
lmy9900 has quit [Ping timeout: 268 seconds]
lmy9900_ has quit [Ping timeout: 244 seconds]
lmy9900__ has quit [Ping timeout: 268 seconds]
trittweiler has quit [Ping timeout: 250 seconds]
lmy9900 has joined #lisp
lmy990___ has quit [Ping timeout: 246 seconds]
Kundry_Wag has joined #lisp
<ogamita>
rk[ghost]: you now xmodmap?
<rk[ghost]>
ogamita: that suppose to be "know" or are you asking if i am "currently" xmodmapping?
lmy9900_ has joined #lisp
<rk[ghost]>
that keyboard has a built in microcontoller such that it sends the appropriate keycodes.. so you can plug it in to any computer and it keeps its mapping with it
<rk[ghost]>
no xmodmap required.
<rk[ghost]>
so i have fancy things like a key that does ctrl+a and ctrl+b (i use both screen tmux together >:D)
<ogamita>
rk[ghost]: for when you are not at your computer; you can prepare a .xmodmap file to map any standard keyboard close to your custom layout.
<ogamita>
It's important: if you don't make the computer adapt to your ways, the computer-human system will be prone to cockpit errors.
<rk[ghost]>
ah, fair enough.. although the placement of the keys are slightly different.. and i am currently (/me hides) on a winbox and sshing to a jumpbox which has gentoo on it, but isn't my dev box..
<ogamita>
it is after such fatal errors, that the first thing I install on a new system (even before the kernel), is emacs!
lmy9900 has joined #lisp
<rk[ghost]>
xmodmap requires x.. i am on ssh
<rk[ghost]>
never figured out "loadkeys" jazz...
<rk[ghost]>
err- hrm.. might be samethings..
<rk[ghost]>
my brain is failing.. it is late. i cannot respond adequately anymore..
lmy9900__ has joined #lisp
<ogamita>
rk[ghost]: I also use ssh, from a local X ;-) But on Windows and macOS it's also possible to define keyboard mappings.
<rk[ghost]>
surely.. i could just walk downstairs and get my keyboard...
<rk[ghost]>
visiting family for thanksgiving.. on their winbox
lmy9900_ has quit [Ping timeout: 250 seconds]
<rk[ghost]>
thought i was mostly browsing the net, but i got an urge to lisp for a "minute"
<rk[ghost]>
... 4 hrs later...
lmy9900_ has joined #lisp
lmy9900 has quit [Ping timeout: 244 seconds]
lmy9900 has joined #lisp
<ogamita>
rk[ghost]: :-) if it's downstairs, yes, just do that. I thought you had to take a plane to fetch it!
lmy990___ has joined #lisp
<rk[ghost]>
ogamita: it is 4:40AM localtime .. at this point i should sleep, but i had coffee late.. so in zombiemode..
lmy9900__ has quit [Ping timeout: 268 seconds]
lmy9900__ has joined #lisp
<rk[ghost]>
OK-
<rk[ghost]>
thanks very much everyone.
* rk[ghost]
waves
lmy9900_ has quit [Ping timeout: 245 seconds]
lmy9900 has quit [Ping timeout: 268 seconds]
lmy990___ has quit [Ping timeout: 244 seconds]
lmy990___ has joined #lisp
lmy9900__ has quit [Ping timeout: 245 seconds]
lmy9900 has joined #lisp
Zaab1t has quit [Quit: bye bye friends]
lmy990___ has quit [Ping timeout: 268 seconds]
<LdBeth>
gg
lmy9900 has quit [Ping timeout: 272 seconds]
Mr-Potter has joined #lisp
chens has quit [Remote host closed the connection]
fikka has joined #lisp
Kundry_Wag has joined #lisp
lmy9900 has joined #lisp
Kundry_Wag has quit [Ping timeout: 268 seconds]
lmy9900_ has joined #lisp
lmy9900__ has joined #lisp
elderK has joined #lisp
lmy9900 has quit [Ping timeout: 252 seconds]
lmy9900 has joined #lisp
lmy9900_ has quit [Ping timeout: 245 seconds]
Kaisyu has quit [Quit: Connection closed for inactivity]
frodef has quit [Ping timeout: 250 seconds]
lmy9900__ has quit [Ping timeout: 250 seconds]
rumbler31 has joined #lisp
fikka has quit [Ping timeout: 245 seconds]
rumbler31 has quit [Ping timeout: 276 seconds]
lmy9900_ has joined #lisp
lmy9900__ has joined #lisp
Kundry_Wag has joined #lisp
lmy9900 has quit [Ping timeout: 252 seconds]
lmy9900_ has quit [Ping timeout: 268 seconds]
lmy9900_ has joined #lisp
Kundry_Wag has quit [Ping timeout: 276 seconds]
lmy9900__ has quit [Ping timeout: 244 seconds]
lmy9900 has joined #lisp
lmy9900_ has quit [Ping timeout: 250 seconds]
<elderK>
Moin all.
<elderK>
Man, I'm having a bit of trouble. I think it's mostly a conventional-thing but, like, I'm not sure how to best organize my stuff.
<elderK>
Like say I have a class, and a bunch of generic methods that are to act on instances of that class (or subclasses.)
<elderK>
Is it conventional to define those GFs in the same file as the class?
<elderK>
Or should you split it out?
<beach>
Hello elderK.
<beach>
There is no such thing as a generic method. There are generic function and there are methods ON those generic functions.
<elderK>
What about say, independent types you define with deftype? Where do they go? Or parameters?
<elderK>
hey beach
<elderK>
Yup - I understand that. Terminology slip :)
<elderK>
I meant to type generic function :)
<elderK>
Still, I'm not sure like, how to lay things out or group them.
<beach>
OK, so the answer has to do with what you consider part of the protocol, i.e. the part of the module that is visible to client code.
lmy9900_ has joined #lisp
<beach>
I put the definitions of my generic function that are part of the protocol in a separate file
<elderK>
Right. And what about like, say, complex macros and things? Do you have them in the protocol file? Or do you define them elsewhere but make sure they appear in the proper package?
<elderK>
Like, macros that are part of the client-visible interface.
<no-defun-allowed>
aeth: I swap [] and () in Emacs, it's just 4 lines of elisp to set up the mappings and doesn't cost me anything in hardware.
<beach>
elderK: You can put them where you like, but you export the symbol that names the macro.
<elderK>
Yup
<beach>
elderK: I have no single protocol file.
lmy990___ has joined #lisp
<pfdietz>
Generic functions can dispatch on more than one class, so there generally isn't a single class they're associated with. This is unlike methods in typical OO languages that dispatch on a single argument.
<beach>
elderK: I don't expect the client programmer to look at my code.
wilfredh has joined #lisp
<elderK>
beach: Just, having a hard time. Like, I have a class and a bunch of generics. I have a bunch of helper functions and things too. Now, the generics are for public use. The helpers, are not.
<elderK>
In C, I'd have those public functions in the header, and the internal things in the .c file.
lmy9900 has quit [Ping timeout: 268 seconds]
<elderK>
So I was wondering if there was a similar convention for Lisp, some way of separating the public from the private, as it were.
<elderK>
I know defpackage and stuff handles that, in a sense.
<pfdietz>
Packages are how that is indicated in CL, yes.
<beach>
elderK: Yes, just don't export the private stuff.
<elderK>
Another issue, and this is silly but... important to me: Ordering.
<elderK>
Like, there is a certain way I lay out my C files, say. Certain things are always before other things.
lmy9900_ has quit [Ping timeout: 246 seconds]
<elderK>
Is there a convention like that for CL?
razzy has quit [Ping timeout: 272 seconds]
<elderK>
Like say, the defclass bfore the generics that are expected to work on instances of that class?
<elderK>
Maybe parameters after the class, but before the GFs, etc
<beach>
DEFGENERIC first.
<pfdietz>
Well, certain things HAVE to come first. Definitions of macros must occur before their uses, for example.
<elderK>
Where does deftype first in with that ordering?
<beach>
elderK: Otherwise, when the class is loaded, a default generic function will be created.
<pfdietz>
deftype should come before uses.
<pfdietz>
Because the compiler needs to know about it.
<elderK>
So, GF -> deftype -> defclass etc.
<elderK>
:D I'm not used to like, things being able to be pretty much in any order.
<elderK>
It's doing my head in a little :P
lmy9900 has joined #lisp
<LdBeth>
elderK: Have you tried Donald Knuth's CWEB
<elderK>
No. Although I did investigate it many, many years ago.
<elderK>
I'm in this weird position where I know what I want to build, and how I'll roughyl go about it - but I'm paralyzed because I'm not sure how to ... for the lack fo a better term, lay it out.
<pfdietz>
Some lisps give a style warning if you do defmethod on a symbol that hasn't been given a defgeneric. It's good style to do the defgeneric first, before defining any methods.
<ogamita>
elderK: you've got a catalog of tools in clhs ;-)
<LdBeth>
SBCL, specificly.
<elderK>
ogamita: I'm not sure how that helps. It's one thing to see the definition and stuff for things, it's quite another to learn how to apply them best.
lmy990___ has quit [Ping timeout: 250 seconds]
frodef has joined #lisp
<pfdietz>
SBCL used to give that style warning, but stopped in 1.3.21
<pfdietz>
warning, rather
<elderK>
It's like, another thing I'm unsure of, is like, it's say I have a "core" library. It has the barebones stuff on which to build.
<elderK>
Then I have a few others, that build on taht, and provide stuff of actual value.
moei has joined #lisp
lmy9900_ has joined #lisp
<elderK>
As far as I understand, you'd have a system for them all.
<elderK>
Or would you just have a package for each and ship a single system?
<pfdietz>
Either one.
<LdBeth>
make multiple packages and export API to one final package
<elderK>
I also find myself fighting... like, I want to give things nice, good names. But then, I also don't want them to be overly long since that's a PITA.
<pfdietz>
There is also something called package-inferred-system that infers system definitions from packages (with one defpackage per file). Some people like it, but it does lead to lots of packages being defined.
<elderK>
pfdietz: I've heard about that - but I know very little about it.
lmy9900 has quit [Ping timeout: 246 seconds]
<pfdietz>
No need to look at it now, then.
lmy9900 has joined #lisp
<pfdietz>
elderK: why don't you go look at some quicklisp systems, to see examples? There's a number of different styles in there.
<elderK>
God, it's crazy how languages can mess with your mind. You never realize just how much :) Like with C, I'm so... trained, I guess, to the idea of visually having a separation between public and private stuff, rather than just say, relying on being able to export certain things.
<elderK>
pfdietz: Aye. I've been studying a /lot/ of Lisp code lately, from all kinds of places.
lmy9900_ has quit [Ping timeout: 245 seconds]
fikka has joined #lisp
<elderK>
Thanks for answering my questions guys. And for putting up with such a torrent of them every day :)
<LdBeth>
Seem all of them can be at least partially solved by wat i'm currently working on: Auto refactor, auto code listing, auto symbol exporting, all occurs in a monolithic project file
<jackdaniel>
you answer intelligent questions and actually read answers, it is not always a case with people who ask for advice
<elderK>
Thank you. That's kind of you to say :)
* beach
totally agrees with jackdaniel.
pierpal has joined #lisp
lmy9900_ has joined #lisp
<elderK>
Another question: I've seen systems like, foo and foo/bar
<elderK>
I was wondering how you go about encoding those names on the FS.
<elderK>
Would the on-disk name just be foo-bar.asd?
lmy9900 has quit [Ping timeout: 260 seconds]
<elderK>
I undertand the x/y convention is used to mean that y is like, a sub-system or secondary system to x
lmy9900 has joined #lisp
<pfdietz>
The asd file name doesn't have to be the same as the system name. And you can put more than one defsystem form in a single asd file.
<jackdaniel>
it is a deliberate decision of ASDF maintainers to make subsystems (in the same file as main system) be separated by /
<jackdaniel>
because it *can't* be encoded as a file
<jackdaniel>
so they know, that they look for the base system file only
<elderK>
Ah, I see. So such subsystems should be specified in the same .asd as the primary?
<jackdaniel>
yes, that's how ASDF sees things. it *may* work from other file if you load it
<jackdaniel>
but locate-system may not work
<elderK>
If I have a completely different .asd and "project" for a system, I shouldn't use say, / to "group it" with other related projects.
<jackdaniel>
pfdietz: locate-system works under the assumption that file has the same name as the base system
<jackdaniel>
elderK: I don't understand
<elderK>
jackdaniel: NP. Say I have a system, foo. And it is considered a project in and of itself, so it has its own directory, .asd and all that stuff.
lmy9900_ has quit [Ping timeout: 268 seconds]
<jackdaniel>
still doesn't click, sorry
<elderK>
Then I create another project, that builds on foo or augments it in some way. I have it separated say, because it's optional or whatever. It has its own "project", own .asd and own source tree.
<jackdaniel>
ah, OK
<jackdaniel>
then you would name it foo-ext and have file foo-ext.asd (or something in this spirit)
<elderK>
Okay, cool.
<jackdaniel>
or put it in foo.asd as foo/ext
<jackdaniel>
(if it is part of this project source code wise)
<elderK>
I've also seen like, different ways of naming systems and packages. Some people use something akin to Java: foo.bar.baz, others foo-bar-baz
<elderK>
I assume the hyphenated version is more idiomatic?
<jackdaniel>
that was quite arbitrary decision which broke some code at some point of time (this "/" "best practice")
fikka has quit [Ping timeout: 245 seconds]
robotoad has quit [Quit: robotoad]
<jackdaniel>
I don't know what is more idiomatic. otoh I find reverse system separate by dots more intuitive, like com.malwareverse.project-foo.package-bleh
<jackdaniel>
separated*
<dim>
as dash is used in variable names as a normal word separator, for package “hierarchy” I tend to use dot myself
<jackdaniel>
(package may have a nickname, some implementations allow package-local nicknames)
<elderK>
:) Okay, neat. Thank you
<dim>
pgloader has a lot of pgloader.foo packages… sometimes I'm not sure if I want to continue separating things away in so many packages
<elderK>
I think I'll use . simply because it's easier for me to type :P
<dim>
that's maybe pushing it a little
lmy9900 has quit [Ping timeout: 252 seconds]
<jackdaniel>
I find a practice of having implementation package and main package (reexporting only the protocol symbols) very clean
<jackdaniel>
I personally dislike package spaghetti which you may see on some projects
<elderK>
jackdaniel: I like the sound of that.
<elderK>
jackdaniel: :) Any projects in particular that highlight this approach?
<dim>
jackdaniel: would you qualify pgloader's approach as package spaghetti?
<jackdaniel>
I'd say McCLIM with CLIMI and CLIM packages, but sadly right now it has some auxilliary packages too (I want to work on cleaning this up, leaving only CLIME package in the mix)
<jackdaniel>
dim: well, looking it it – yes. but please don't take it personally :)
<dim>
it's an experiment at organizing things
<dim>
I've been doing single package, then this, but never tried something else, never took the time to think about it properly, so no offence taken really
<dim>
it's not something I'm proud of, it's just something I did ;-)
<jackdaniel>
I find thinkink about too many packages distracting and unnecessary (also it puts burden of thinking about what should be imported etc on the programmer, distracting him)
<jackdaniel>
thinking*
<jackdaniel>
or her ;p
<dim>
yeah it happens that I need to spend time thinking about package dependencies and I even had occasions wher eI needed to refactor the package declaration ordering to make things work again
<jackdaniel>
exactly
<dim>
him/her -> them
<dim>
also I used to have the same protocol implemented in several packages, rather than doing generic functions
<dim>
nowadays most of the protocols I have in pgloader are done at the generic function and classes level, so I could maybe have a single pgloader.source package, say
<shka__>
dim: sounds good
<dim>
it's lots of code though, so everything in one single package, I don't know, I like to have the esrap parsers separate
<elderK>
I imagine you could have a bunch of packages, for organizational purposes.
<dim>
jackdaniel: do you happen to have a recommended style for packages? documented somewhere?
<elderK>
And then have a unifying package, which imports things from the others.
<jackdaniel>
dim: no, I just have opinions. maybe I'll make a blog post if there is some interest, though I don't consider myself an authority on the subject
<elderK>
jackdaniel: I'd be very interested in reading such a post.
<jackdaniel>
elderK: I'll add it to my low-priority todo then, maybe I'll get to it eventually ;-)
fikka has joined #lisp
<elderK>
:)
<elderK>
Out of curiosity, if I define packages A, B and C. And A imports things from B and C, does the definition of the B and C Packages need to come before A?
<jackdaniel>
yes
<dim>
jackdaniel: I'd like to read your opinion in a blog post for sure
<elderK>
Thanks jackdaniel
<dim>
yes that's why I have a package.lisp file in pgloader that does all the symbols importing/exporting at once, before I load any other file
<_death>
it is typical to have a single file defining the packages for a project
<dim>
having each file create its own package and exports its own symbols was too complex to handle
<elderK>
dim: Yeah, I found that too. I tried having the defpackage in the .lisps that you know, did that stuff.
<elderK>
But I wound up preferring the single packages.lisp file
<elderK>
Easier to go to, to consult.
<_death>
if each file should define package, then it's a good idea to just use package-inferred-systems
robotoad has joined #lisp
kajo has joined #lisp
frgo has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
<elderK>
I need to come up with a good name two "read" cases: One where you create an object of whatever type, and fill it. Basically, you're creating whatever from some storage.
<elderK>
And the case where you've alread got an instance, and are populating it.
<elderK>
I figured read and populate are decent enough
<dim>
hydrating
<dim>
ORMs usually call that part of the job the hydrating of the objects
<dim>
ORMs also are usually very wrong about the R in ORM, resulting in a very poor matching actually, so that's not a good model to follow
<_death>
maybe read and read-into
Kundry_Wag has quit [Ping timeout: 250 seconds]
<jackdaniel>
I was recently thinking a little that better editor support (i.e editor which doesn't work on text) would enable file-per-system (with the whole project in one file), but I didn't think it through so far
<elderK>
Is it possible to import somethign from a package, but rename or prefix it in some way?
<elderK>
Thank you dim
<jackdaniel>
one benefit would be easy building compile-file and voila. fwiw that's what asdf does for a monolithic compile-op on image-based implementations
jochens has quit [Ping timeout: 272 seconds]
<jackdaniel>
elderK: you could define a symbol-macro which expands to this symbol, though I'm not sure if it is a good idea
<dim>
but then there's system dependencies, too, usually you're bundling more than a single system in an image file, I'm using ql-bundle for that
jochens has joined #lisp
<dim>
ql:bundle-systems, actually
<jackdaniel>
yes, I use it too
<jackdaniel>
very useful and allows building software without ql in the image
<dim>
allows building a software.tgz archive that people can build without having to download anything at build time, too
<jackdaniel>
ECL can also build libraries without putting ASDF on the final image
<jackdaniel>
(using ASDF for build)
dddddd has joined #lisp
<jackdaniel>
s/final image/final binary/
<dim>
what I want to solve (for real this time) is having --self-upgrade or --hot-patch on the image
<jackdaniel>
how would that work (conceptually)?
<elderK>
jackdaniel: hm. It's like, I don't want to import the symbols as they are. But I do want to refer to them in a way that's less typing than package-name:symbol
<elderK>
package-local nicknames sounds useful.
<elderK>
Like, being able to create a local, short nickname for some package.
fikka has quit [Ping timeout: 272 seconds]
<dim>
that is, point to the main system source repository, that you updated recently (git pull or whatever), and then run /usr/bin/image --self-upgrade /usr/src/software and it loads the new definitions, realizing that it doesn't need to reload the dependencies definitions because they are already in the image
<jackdaniel>
yes, that's what I've mentioned
<pfdietz>
I want to see PLN in all implementations.
<jackdaniel>
elderK: right now sbcl and abcl has it, ecl has it in develop branch (not in the lastest release) and ccl needs implementation, but from what I've talked with rme (months ago) he would be willing to accept such contribution if someone makes it
<dim>
if you're at the top of the system dependencies rename-package is all you need for local nicknames
<jackdaniel>
dim: OK, now its clearer, thanks for elaborating
m00natic has joined #lisp
<jackdaniel>
upgrade would involve saving result in /usr/bin/image or only for the session? former would require permissions to write to this file
<pfdietz>
The commercial lisps would still need upgrading. I don't know where they stand on this.
<dim>
so it would be in-memory upgrade only in the prototype I did build
<pfdietz>
(on PLN)
fikka has quit [Ping timeout: 250 seconds]
<dim>
which only works if the ASDF in the image has access to the sources of all the systems :/
<dim>
so only for the session, jackdaniel
frgo has joined #lisp
<jackdaniel>
pfdietz: PLN? my duckduckgo fu failed me (PLN is polish currency :-)
<shka__>
dim: would that loop rename packages for everyone?
<dim>
Package Local Nicknames, PLN, jackdaniel
<jackdaniel>
ah! silly me
<dim>
shka__: yeah, that's the problem, but nobody currently uses pgloader as a lib anyway
fikka has joined #lisp
<shka__>
ah, ok
<shka__>
makes sense, thanks for answer?
<shka__>
*!
<jackdaniel>
shka__: it will influence software which looks specifically for a package (as in find-package or find-symbol with package designator) and things which are not read yet
<makomo>
elderK: systems of the form "<foo>/<bar>" are called secondary systems
<makomo>
jackdaniel: i was wondering the same thing (about PLN) :-)
<jackdaniel>
makomo: this guide is very opinionated, like "You MAY use any of the symbols documented and exported by ASDF or UIOP. Actually, it is warmly recommended to use them everywhere that it matters, instead of less documented or less portable alternatives."
<elderK>
makomo: Hey! I've gone over that a couple times :)
<jackdaniel>
I find UIOP terribly documented for an instance
<elderK>
jackdaniel: Me too.
<jackdaniel>
but I'm biased, just saying that not all "best practices" should be taken at face value
<dim>
is there any documentation for UIOP? all I use is its source code, which isn't easy to grasp at times, and in places describe things and then implement something else
<makomo>
jackdaniel: yeah, true, good point
<jackdaniel>
dim: it has docstrings, that would be it
<dim>
the with-upgradability thing is very much in the way though, and I don't know what purpose it serves
<makomo>
yeah, when i had to use DUMP-/SAVE-IMAGE, i just read the source and the docstrings
<dim>
I tried to use that, to no avail.
<makomo>
dim: i thought the same thing, but i guess it has to do with providing a way to upgrade to newer UIOP versions or something?
<dim>
I just don't know
Kundry_Wag has joined #lisp
<jackdaniel>
dim: it is mainly meant to allow loading newer asdf even if the older one is present in the image already
<jackdaniel>
makomo: defpackage implementations looks fairly similar
<jmercouris>
is there a way to compile my lisp image so that it results in the creation off a REPL instead of immediately closing after evaluating my :entry-point in my ASD?
<jackdaniel>
I'm not suprised by this
<makomo>
jackdaniel: yeah i guess
razzy has joined #lisp
<_death>
makomo: but usually loop is not used, a simple dolist and cond (or destructuring-case or whatever)
<jackdaniel>
actually it is, because you need to verify repeating options
<jackdaniel>
some are allowed to repeat (then you collect) and some are not (then you error)
Kundry_Wag has quit [Ping timeout: 252 seconds]
<jackdaniel>
also option order is not defined
Bike has joined #lisp
<_death>
jackdaniel: that you do inside the cond.. either push or set or error..
<jackdaniel>
yes, dolist+case is a way to do this, but it is not that much different than this loop conceptually
<_death>
the loop, as loop does, flattens the structure so you need to read more carefully to understand it
igemnace has quit [Quit: WeeChat 2.3]
robotoad has quit [Quit: robotoad]
<_death>
and then there's this weird indentation to suggest hints about the structure..
<jackdaniel>
jmercouris: just make swank::simple-repl your entry function
<_death>
and the silly keywords.. bleh
<jackdaniel>
or (lambda () (my-fun) (swank::simple-repl))
<jmercouris>
jackdaniel: thanks, will do
<jackdaniel>
_death: I don't like loop too :)
<_death>
jackdaniel: I like loop for simple things.. for example instead of mapcan or mapcon/maplist
<jackdaniel>
usually when I see loop or format I'm slightly concerned whenever I'll be able to understand them ;-)
<jackdaniel>
regarding collect "idiom", I have a macro taken from cmuutil which is called collect, so I may use it in any context I want
<jackdaniel>
it is very convenient
SaganMan has joined #lisp
<_death>
if it's what I'm thinking of (a.k.a. with-collect or collecting) then sure, it's easy to read and write, but often there's a nicer way
<jackdaniel>
(toolbox:collect (a b) (a 3 4) (a 5) (b 3) (cons (a) (b))) ; -> ((3 4 5) 3)
<jackdaniel>
it allows also possibility to provide your own (non-list) collectors
<dim>
_death: I've seen this style named “intentional programming”
<dim>
wherein the programmer declares their intention
<_death>
dim: to me it's just "lispy programming" :)
<dim>
I've seen the term introduced in the context of Erlang, so…
<_death>
dim: well, that post is from 1993
<jackdaniel>
we could throw "Why Erlang is an acceptable Lisp." in the air and watch world burning ;-)
<makomo>
jackdaniel: (a b) is in general a list of arbitrarily many symbols?
<jackdaniel>
makomo: you define as many collectors as you want, it is like let
<makomo>
yes, exactly. neat
<dim>
_death: my first C teacher did forbid us to use blocks {}, we had to write function calls instead, it was a very good way to teach and train I though
<jackdaniel>
list collector maintains list tail to append destructively on the back
<makomo>
yup, pretty much the same idea, except generalized to multiple collectors (and with the addition of the initial value and the collector function)
<makomo>
neat
<Bike>
it's been around since like, the 80s, probably earlier
<jackdaniel>
it is public domain (cribbled from cmu cl utilities)
<Bike>
sbcl uses it internally
<jackdaniel>
ecl too
<makomo>
Bike: yeah, i figured. i saw WITH-COLLECTION or something like that in the Chine Nual the other day
Grue` has joined #lisp
<jmercouris>
how do I use uiop:run-program to just start a program without waiting for its output?
<jmercouris>
kind of like nohup?
<jackdaniel>
(bt:make-thread (lambda () …))
<jackdaniel>
alternatively uiop:launch-program which is asynchronous
<jmercouris>
I guess that always works
<jmercouris>
I'm not sure which one to use now honestly
<jmercouris>
should I make a new thread?
<jackdaniel>
but I'm skeptical about uiop implementation of this abstraction (it does some unnecessary piping, better use what your implementation provides, or external-program portability library)
<jmercouris>
okay, so here's a question for you, if I make a new thread and run the program, then kill my lisp process, the running program will also die, right?
<jackdaniel>
I'd say that depends on the platform
<jmercouris>
interesting
<jackdaniel>
these are separate processes
<jmercouris>
ah, so it's not like a fork necessarily
<jackdaniel>
whenever OS kills children processes or not is an arbitrary decision
<jmercouris>
I see what you are getting at
<jmercouris>
ignore my fork comment
<jackdaniel>
i.e on posix orphans are linked to init, but they may have delivered sighup signal
<jackdaniel>
on which they may decide to suicide ;)
<jackdaniel>
I find this parent/child kill/terminate terminology quite disturbing on posix
<jackdaniel>
but whatever
<makomo>
lol
<elderK>
:P Wow, not :useing #:cl breaks a lot of stuff :P
<elderK>
Even if you like, import things :P
<dim>
the fact that kill is used to send a signal, unless when the signal is 9, is something that I find disturbing too, yes
<makomo>
this ^
<jmercouris>
disturbing? it is all about context
<jmercouris>
I don't get disturbed when people say "kill the lights"
<jmercouris>
I don't imagine them murdering light fixtures, but that's just me
<jackdaniel>
right now you deny me possibility of being disturbed when I read: terminate a child, because it all depends on a context? hm
<jackdaniel>
some people find it not disturbing, others find it funny etc, very personal-perception dependent
<jmercouris>
I'm not denying you any rights, I only speak of my own experience here
<jmercouris>
I only question, it is hard for me to imagine your viewpoint, that is all
<jackdaniel>
mind theory is an important skill to achieve ;-)
<dim>
native language and culture will have lots of impact in here
<dim>
e.g. it took me years before I realized that “garbage collecting” could mean something in a non-programming context
xkapastel has joined #lisp
<jmercouris>
so, uiop:run-program only looks for things in the path, right?
<jmercouris>
what I'm trying to do, is run a program not in my path, but in the same directory as my compiled lisp executable
<p_l>
jmercouris: on pretty much all unix systems you will have to 1) find the full path to your executable 2) replace last component with the name of the executable you want to run
<p_l>
just `./executable` won't work
Kundry_Wag has joined #lisp
<jmercouris>
p_l: okay, so to find the path to my executable, is there a way within my lisp program to know its own path?
<p_l>
you use argv[0] to find out location of your executable, iirc
<jmercouris>
e.g. let's say I compile something using ASDF:MAKE, then I run it, does that running Lisp program know its path on disk?
<jmercouris>
so what you are saying is that my lisp program will have to accept command line arguments, parse them, and grab the first one to know its path?
robdog has quit [Ping timeout: 276 seconds]
<p_l>
you don't have to parse them
<p_l>
on SBCL, you can use (first *POSIX-ARGV*), iirc
<jmercouris>
ok, then I would be using SBCL specific code
<p_l>
UIOP has UIOP/IMAGE:ARGV0 function
<jmercouris>
I wonder if there is something in UIOP
<jackdaniel>
maybe *runtime-pathname* ?
<jmercouris>
I'll try both out and update if anyone is interested, thanks
<p_l>
*runtime-pathname* is sbcl specific, I think
<jmercouris>
dim: that will work on the machine it is compiled on, but will not be portable
<dim>
but that's when you have the sources around
<jmercouris>
right, your message didn't show up beffore I typed that, sorry
<dim>
yeah no that's on me I went to fast, like, I though I had a good answer before actually understandting the question ;-)
<dim>
so either argv0 or in /proc/<pid>/ you have a file with the information you need, on linux
fikka has quit [Ping timeout: 252 seconds]
<p_l>
argv0 is the portable option
<ogamita>
elderK: actually the mapping of systems to asd files, and of components (source files) to the file system (subdirectories) is entirely arbitrary: you can do as you see fit for your project. For example, you can easily have multiple systems using the same code base. Say you have some code implementing a protocol, with client and server parts. Then you can make a system to load just the protocol, and other systems to load a client and
<ogamita>
to load a server. Or perhaps several of them. Each asd will define which set of source file (may be some in common) and which dependent systems it will load.
<ogamita>
Then you can split the files per directories based on another criteria. Eg. it could be one directory per functionality ("user story"), or per mechanism, or per layer, or per logical (high level) component, etc. Whatever works for you and your project.
<ogamita>
It all also depends on the size of the project, and the size of the team(s) working on it.
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
<ogamita>
elderK: there's no way to "rename" symbols. The name of a symbol is an immutable essential property of the symbol. import/export (and intern and unintern) of symbols only changes the visibility of the symbol from the given package (ie. the result of (find-symbol "name" target-package)).
<ogamita>
elderK: now, what you can do, as mentionned, symbol-macros work for variables (or variable-like references, ie. places, or at least readers), (but not anything else, not type names, class names, and not for function names).
<ogamita>
elderK: for function you can define "aliases" or "forwarder": an alias will essentially be: (setf (symbol-function 'alias) (symbol-function 'original)) so you can do (alias 'arg) instead of (original 'arg); but there is more than the symbol-function binding, you would like to assign the docstring, the declaration of alias as a function, and perhaps some other implementation specific stuff).
<ogamita>
elderK: a forwarder would be like (defun forwarder (&rest arg) (apply (function original) arg)), or if you're smarter, you can (defun forwarder (a b c) (original a b c)); but it's harder to implement since you need to deal with optional key and rest arguments in a reasonable way, with the default values duplicated, etc.
<jackdaniel>
jmercouris: you may be also interested in excercising https://www.common-lisp.net/project/osicat/manual/osicat.html, which is meant as a direct usage of the operating system primitives (i.e current-directory) via FFI, instead of relying on implementation extension functionality
<ogamita>
Of course, you can find nice macros in libraries, such as defalias.
<jmercouris>
jackdaniel: yeah, I've used osicat before for some basic stuff, I'll explore around a little bit, thanks for the suggestion
<jackdaniel>
(I can imagine, that osicat implementation for Lisp-based OS wouldn't require FFI though)
<ogamita>
elderK: remains types and classes (and perhaps other things). for types, you can do (deftype alias () 'original) but some types take arguments, so you have the same problem as with forwarders. (and there's no introspection of type specifiers, so you need to know it).
<jmercouris>
unfortunately there is already some FFI in next,using libsqlite
<jmercouris>
I would like to get rid of that dependency eventually, but for this alpha release I will keep it
<jackdaniel>
reusing code (even if it is foreign) is not necessarily an unfortunate things to do
<jmercouris>
I think you and beach would probably disagree on the matter, though I am not sure
<ogamita>
elderK: for classes, perhaps it's possible to do: (setf (find-class 'alias) (find-class 'original)) ;I'm not sure if it will work all nice.
<jackdaniel>
competing opinions fuel chaos-driven progress (having many similarities to evolution) ;-)
<jmercouris>
I guess that is why you work on ECL, reuse all that C code :D
<jackdaniel>
no, I work on ECL because I find it challenging and fun
<jmercouris>
right, but if you didn't like foreign code, I think you would work on something else that is also challenging and fun
<jackdaniel>
jmercouris: that's not technically correct, but I won't get into that beyond saying, that ECL does not depend on FFI
<ogamita>
elderK: for structures there's nothing equivalent. You could do: (defstruct (alias (:include original))) which is similar to defining a subclass, but (typep (make-original) 'alias) #| --> nil |#
fikka has joined #lisp
<ogamita>
elderK: ie. it's a real sub-structure-class, different from original, not an alias.
<elderK>
Guys, would you call "two's complement" and "sign magnitude" integer /formats/ or integer /encodings/?
rippa has joined #lisp
<White_Flame>
is there a difference?
<White_Flame>
to format something is to encode it
<White_Flame>
and vice versa
jcowan has joined #lisp
lmy9900 has joined #lisp
<jcowan>
pfdietz: I know about that one; I'm wondering if Common Lispers often use this "value, present?" convention in their own code.
Essadon has joined #lisp
<jcowan>
(Damn Google anyway for shutting down Google Code.)
Essadon has quit [Max SendQ exceeded]
Essadon has joined #lisp
<Bike>
yeah, i have. usually because it falls out of gethash, but not always
<Bike>
assoc-value in alexandria is like assoc but uses that convention instead
<fe[nl]ix>
jcowan: only when NIL is a valid value, pretty rare
<White_Flame>
one alternate would be returning (<result>) vs ()
<White_Flame>
especially if the result is already naturally in a cons somewhere
<ogamita>
It can be useful to do that, for example, my function that splits docstrings, declarations and body expressions puts the docstrings in a list, so that it can be ,@docstrings without a test.
<ogamita>
Ie. move to the list-of-results monad instead of the maybe monad ;-)
random-nick has joined #lisp
dddddd has quit [Ping timeout: 252 seconds]
nowhere_man has quit [Ping timeout: 246 seconds]
<jcowan>
Right
razzy has quit [Ping timeout: 250 seconds]
kajo has quit [Ping timeout: 246 seconds]
<elderK>
Guys, can you specialize a method on a keyword argument?
<elderK>
I figure probably not :)
<elderK>
Since they are like, optional and all
<ogamita>
Nope.
<ogamita>
They are &rest args.
<ogamita>
But you can define a new method taking them as mandatory argument, and you can call this new method from the old one with &key.
<jcowan>
Thanks, all. I'm surprised that assoc-value exists, since assoc already returns nil on failure and a pair on success. I suppose it is meant to make alists more culturally compatible with hash tables.
jochens has quit [Remote host closed the connection]
<Bike>
yeah, but i think mainlyu it just has a nice setf
jochens has joined #lisp
* jcowan
nods
jochens has quit [Remote host closed the connection]
jochens has joined #lisp
<jmercouris>
so, I'm having an interesting deployment issue with my application
<jcowan>
elderK: You can use a similar trick to make generic functions that take an arbitrary number of arguments: write an ordinary function with a &rest list, and then call a binary generic function to handle them two at a time. Of course this only works if the underlying operation is associative: you could provide generic addition in this way, for example (though you can't reuse the nice name + or even ++).
<jmercouris>
if I run the executable directly, with terminal output, it works, if I double click on the app bundle it works
<jmercouris>
however, when I double click on the app bundle, and ANY xml-rpc is invoked, it instantly crashes
<jmercouris>
I mean that the Lisp side, doesn't respond properly and crashes
<jmercouris>
I don't have a bug in my program, I just realized it is returning immediately after execution
<jmercouris>
despite setting up a repl
<jmercouris>
because programs called from the GUI in macOS get std/out/err piped to a log
<jmercouris>
however when I run it from a terminal, it can actually start the REPL and keep running
<jmercouris>
that is the issue
<jcowan>
what is stdin redirected to in that case?
<jmercouris>
I have no idea what happens with stdin
<jmercouris>
however, I need a way to keep my program running after executing start instead of returning immediately
<jmercouris>
because I launch a server using S-XML-RPC which is event driven
<jmercouris>
and I don't want to put a while true loop or something consuming a ton of CPU cycles
<jmercouris>
so, what to do?
<ogamita>
jmercouris: with Clozure CL, you can set it up to use an auxiliary terminal application.
<jmercouris>
yes, I have noticed that with CCL, but I want it to work on SBCL as well, and any other implementation
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
<ogamita>
jmercouris: with sbcl, you will have to do it yourself. Have a look at the sources of ccl?
SaganMan has quit [Ping timeout: 240 seconds]
<jmercouris>
I'll check on CCL and see if RME is around, I'm not so familiar with the CCL source
<jmercouris>
maybe I'll ask on SBCL too, maybe they have had this issue before
<Xof>
(sleep 100000000)
kajo has joined #lisp
<jmercouris>
Xof: consumes cyles no?
<Xof>
no
<ogamita>
takes 3+ years
<jmercouris>
well, it is worth a shot
<ogamita>
sleeping beauty slept 100 years…
<Xof>
I mean, yes, it consumes cycles, but not very many of them
<jmercouris>
well, interesting enough, my program still crashes
<Xof>
and it doesn't consume CPU time
<beach>
Xof: I take it you made it back home.
<beach>
Xof: Was my explanation of the SICL bootstrapping procedure at all understandable? I am having a hard time describing it, and I don't think I manage to get it across to Didier.
<ggole>
Like #1=(let ((program #1#)) #1#) in Lisp
<ggole>
Wait, wrong channel
<jackdaniel>
as of applications, which are meant to work longer than 3+ years, you may try (loop (sleep 100000000))
<notzmv>
true
frodef has quit [Ping timeout: 268 seconds]
omtrent has quit [Quit: WeeChat 2.3]
<Xof>
beach: I think I get it, but I have long experience of that specific problem
<beach>
Yes. And that was exactly my impression. I.e. that you got it, but only for that reason.
<Xof>
when I wrote the Sanely-Bootstrappable paper, I think I found some diagrammatic notation that I didn't use to explain what was going on
<beach>
There are some diagrams in that paper, but I do not yet understand them fully.
<dim>
is the classic T shape diagram useful in that case?
<jmercouris>
I've read the documentation, it is sparse
<jmercouris>
on SBCL it makes some sort of socket and assigns it a handler
<jmercouris>
I'm running SBCL
<ogamita>
so it might be interesting to read the documentation of sbcl, notably about sb-sys:add-fd-handler
<ogamita>
You might want to know on what thread, and under what condition handler-fn will be called.
<jmercouris>
okay, so I asked a bit on SBCL
<jmercouris>
and here is what they told me: (loop (sb-sys:serve-all-events)) because of the way s-xml-rpc does things
<ogamita>
Seems reasonable.
<jmercouris>
it will always be on the main thread
<ogamita>
Yes.
fikka has joined #lisp
<jmercouris>
I wonder if I should fork the library and make it run on a new thread
<ogamita>
(defvar *must-quit* nil) (loop until *must-quit* do (sb-sys:serve-all-events)) ; and you may have a command to send a rpc call to set *must-quit* to t, to eventually quit.
<jmercouris>
I don't want to tie my system to JUST working on SBCL though
<ogamita>
If you want to run swank, its server runs on a separte thread, so you can just start it before that loop.
<jmercouris>
I would like to support SBCL and CCL at least
<ogamita>
can s-xml-rpc run on ccl?
<jmercouris>
yes it can
cage_ has joined #lisp
<ogamita>
So it should be ok. Perhaps there's in s-xml-rpc a function that calls (sb-sys:serve-all-events) or the equivalent on ccl?
FreeBirdLjj has quit [Remote host closed the connection]
<jmercouris>
hmm, I should check
<jmercouris>
or do you think I should fork s-xml-rpc?
<jmercouris>
I mean for now, this will do, but do you think I should fork it and improve it?
<jmercouris>
I have a few complaints with it
<jmercouris>
also I can't really test CCL on latest MacOS, as it is broken, otherwise I would
<ebrasca>
Hi
<ogamita>
I don't know. If there are bugs you can correct them and make a PR.
<beach>
Hello ebrasca.
<jmercouris>
to whom exactly? last update was 2007 I think
<ogamita>
jmercouris: you can compile ccl on mojave.
<jmercouris>
ogamita: I'll have to compile it from source then huh :\
FreeBirdLjj has joined #lisp
<ogamita>
See r-data-scientists-d1d1dff3a2fa>
<ogamita>
#hn
<ogamita>
-0UU:**-- erc at hubble.informatimago.com #hn@freenode Bot L2073 [#s] (ERC FlyC- Abbrev) Fri Nov 23 16:17 0.44 ------------------------------------------------------------------------
<ogamita>
beach: most precisely, the problem is the middle click which is the X paste, with a mouse that has a scrollwheel middle button.
<beach>
I see.
<jmercouris>
I just noticed the long copy paste, interesting
FreeBirdLjj has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 244 seconds]
FreeBirdLjj has joined #lisp
<ebrasca>
I have 1 problem making ext2 suport for mezzano.
frodef has quit [Ping timeout: 250 seconds]
<ogamita>
What is it?
<ebrasca>
I have 1 array of 14 pointers first 11 pointers are direct pointers
<ebrasca>
place 12 is indirec pointer
<ebrasca>
place 13 is doble indirect pointer
<ogamita>
oh, the inodes.
<ebrasca>
and place 14 is triple indirect pointer
<ogamita>
Yes.
<ebrasca>
How to travel this structure?
<ogamita>
By index.
<ebrasca>
ogamita: What do you mean?
fikka has joined #lisp
<ogamita>
In the indirect pointer, you will find a block with N pointers. In the double indirect, a block with N pointers to blocks with N pointers (or N') so total N*N.
lmy9900 has quit [Ping timeout: 268 seconds]
<ogamita>
and N*N*N for the triple. So block indices from 0 to 10 are directly found in the inode, then for blocks b-11 to b-11-n, you will find them indirectly in the block pointed by the 12th.
<ogamita>
then from blocks b-11-n-n*n to b-11-n-n*n*n you will find them double indirectly in the blocks pointed by the 13th, and for the blocks above in the 14th.
<ogamita>
Well, I mean, b in [0..11[, in [11.. 11+n[, in [11+n, 11+n+n*n[, in [11+n+n*n, 11+n+n*n+n*n*n[ and in [11+n+n*n+n*n*n, infinite[
<ebrasca>
To find some file , Do I need to search it 1 by 1?
<ogamita>
Nope, by subtracting, and then by dividing.
jmercouris has quit [Remote host closed the connection]
<ebrasca>
If like to find file /file , What I need to do to find it? ( I know how to find root or some file with know inode )
jinkies has joined #lisp
<ogamita>
Well, the root of the file system is a fixed small inode number. You might want to have a look at the C sources of ext2 to be precise.
<ogamita>
The superblock contains the parameters to this structure, like the block size, (therefore the number of pointers per block), and the inode number of the first file, ie. the root.
<ogamita>
It may be different from 2 or 4…
heisig has quit [Quit: Leaving]
* ebrasca
is eating.
frodef has joined #lisp
notzmv has quit [Ping timeout: 250 seconds]
<jcowan>
ebrasca: At the command line, type "find / -name 'file'" without the outer quotes.
FreeBirdLjj has quit [Remote host closed the connection]
<jcowan>
Anyway, ogamita, how do you know he even has extn? He might be on some other fs.
<ogamita>
He said ext2.
* ogamita
bbl as pjb
frodef has quit [Ping timeout: 252 seconds]
jinkies has left #lisp ["ERC (IRC client for Emacs 25.1.1)"]
chumphries has quit [Remote host closed the connection]
Inline has joined #lisp
hugh_marera has joined #lisp
<dim>
beach: I would have guess that the ⊤ ⊥ ⊤ notation is generic enough to cover your use case, even with CLOS, where you write your own implementation using the host one (first ⊤) and then compile it with the result (second part, ⊥), etc, but I'm not sure I understand enough what you're doing to know for sure
FreeBirdLjj has joined #lisp
<beach>
dim: Yes, you are right, it works. But it does not allow me to explain how I can create the hierarchy of MOP classes inside the host, and it doesn't allow me to explain how I need multiple first-class global environments so that I can have several versions of "the same" class and "the same" generic function working on different kinds of objects.
<beach>
dim: But you are pointing out an interesting thing here. I have not seen an explanation as to the requirements for these T diagrams to work, and what is different about Common Lisp compared to other languages.
* ebrasca
is back.
<ebrasca>
jcowan: I am implementing ext2 for mezzano. ( Mezzano don't have find or ext )
<dim>
beach: oh yeah it's not a very detailed representation, it skips over all the details
<dim>
(The ⊤ ⊥ ⊤, I mean)
<beach>
Yeah.
<dim>
the T diagrams are nodes of 3 edges, and what's interesting to them is how you can compose them
<dim>
left edge is the source language, bottom edge the implementation language, and rgith edge the target language
<beach>
Sure. And I think the T diagrams I need are fairly standard for cross compilation, but that's not what I am trying to explain. I am trying to explain the details of how to go about it.
<dim>
⊤ ⊥ ⊤ is the minimum composition of compilers you can do to both compile a compiler and then test it
<dim>
I've been introduced to ⊤ ⊥ ⊤ in the context of writing a compiler in the target language (writing a C compiler in C), not in the context of cross compilation…
<beach>
dim: One difference is that the Common Lisp compiler does not just take a file and produce another file without any other effects. The file it compiles may modify the global environment, and the next file to be compiled may need a modified environment to compile. Then, if you try to compile a Common Lisp system, the modifications to the environment may be such that the host system is destroyed.
<dim>
anyway, you need more precision in your drawings to explain bootstrapping the CLOS, I can see that
<beach>
I definitely do.
<dim>
beach: oh. I didn't think of the side-effects of being able to compile and execute your own code at compile time :/
<dim>
it's like the trusting trust paper on steroids, in a way
<beach>
Yeah, I think those diagrams work for file-to-file translation without any information being stored in between.
shka_ has joined #lisp
<dim>
you go from a compiler to another one, you never change the compiler itself, it's all a read-only binary
<dim>
the only side-effect is that you have a new binary file, I think, in the ⊤ ⊥ ⊤ representation
<beach>
Exactly, and Common Lisp works very differently.
<beach>
One day, I would like to be able to write down and explain the difference.
<dim>
anyway I've been reading rme “This Old Lisp” transcript the other day and I left with a question for you: he mentionned wanting to make the CCL compiler smarter… (specific current project around register bindings)… is that something that Cleavir would help with, typically?
SaganMan has joined #lisp
<beach>
dim: Do you mean register allocation?
<beach>
dim: I would have to know what CCL does at the moment. But I do plan to implement several algorithms for register allocation.
<dim>
apparently they do nothing about it really
<beach>
I sure hope Cleavir can be a general vehicle for such stuff. That's the idea anyway.
<dim>
I remember having developed a naive and buggy register allocation thingy back when in engineering school, for a compiler assignment, with a notion of a “prison” where I would send bindings when I didn't have registers available anymore… never got the thing to work like I wanted ;-)
<beach>
I see. :)
<beach>
Yes, I had one such idea. Do you know the algorithm called OPT for paging?
<beach>
It can't be implemented, but it is used to measure other algorithms with.
<beach>
I was thinking of using it for register allocation. You can peek ahead in the instruction stream and know which variable is needed furthest in the future, and spill that one when you need another register.
<beach>
It doesn't work very well of course, because it will depend on branches and stuff.
<dim>
the assignment was meant for us students to make a choice in between AST or direct code generation, the register optimisation was way out of scope, and also a very fun project, I though
<beach>
I can imagine.
<dim>
i don't know OPT or much about compiler technologies really, sorry
<beach>
I see. Not important.
<dim>
I've been using OTP (Erlang's Open Telecom Platform lib) though ;-)
<beach>
Heh.
<beach>
The point here is that the Cleavir compiler framework uses a pretty standard intermediate representation, modulo Common Lisp specific stuff like nested functions, etc. So many of the published algorithms can be implemented, sometimes requiring modification. Then the client Common Lisp system can choose which ones fit their needs.
<dim>
did you follow Andy Wingo's work on the Guile VM and compiler some years ago? he went full into CPS techniques and his blog post is full of details
<beach>
[about the difference between most languages and Common Lisp] I wonder whether one could say that the header files of C and C++ correspond to the environment transformation in Common Lisp. In Common Lisp, you compile and load a file. It provides a modified environment in which the next file is compiled, etc. With C or C++, this new environment must be provided explicitly for every new file compiled.
<beach>
dim: I did not follow it, and I decided early on not to use CPS.
<dim>
I'm not sure if the approaches implemented in Guile are going to be good inspiration for you if you're not doing CPS, but well, that's your call ;-)
<beach>
Thanks. Yes, I have made my decision. I studies CPS in depth in my youth, when I was working with Scheme, partial evaluation, etc.
<beach>
It is claimed that CPS and SSA are equivalent.
<beach>
Strangely, SSA conversion may result in a quadratic blow-up of the program size.
<beach>
Not so with CPS conversion.
jibanes has quit [Ping timeout: 272 seconds]
<beach>
dim: Anyway, it is off topic, and if you don't know much about compiler technology, I won't elaborate.
<dim>
yeah
<dim>
I'm curious and all, but well, it's off-topic
<beach>
I could explain it to you in #sicl, but not today. It is Friday evening and I have had a long day and a long week.
jmercouris has joined #lisp
jmercouris has left #lisp [#lisp]
<dim>
it's when we have long days that the years fly ;-)
<beach>
They certainly do.
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 252 seconds]
<jcowan>
I don't find it so, at least not since age ten or thereabouts. A year is still a very, very long time, taken a day at a time as I do.
ryan_vw has joined #lisp
<shka_>
and then you realize that you wasted your time till time wasted you :P
varjag has joined #lisp
<shka_>
good evening!
<beach>
Hello shka_.
<beach>
Bah, think about the poor people wasting their time on using programming languages that are way less productive than Common Lisp. We are relatively lucky.
FreeBirdLjj has joined #lisp
jmercouris has joined #lisp
<jackdaniel>
extrapolating, given there is a programming language way more productive than common lisp we don't appreciate enough, we are the poor people ourself?
<beach>
Absolutely.
<shka_>
is there?
<jackdaniel>
being poor is a state of mind, I don't consider myself being poor even if there are more productive languages
jack_rabbit has joined #lisp
jochens has quit [Remote host closed the connection]
<jackdaniel>
(likewise I don't find people finding joy in writing in python being poorer than me, maybe having a little worse taste)
<shka_>
even if there are more productive languages, are there any fun?
dorketch has joined #lisp
<shka_>
*are they
jochens has joined #lisp
frgo has quit [Remote host closed the connection]
* jcowan
likes almost all languages, even Focal, but not Pilot
fikka has joined #lisp
<jcowan>
"Oh, I just root for all the teams. I guess you could call me an athletic supporter."
<Bike>
i guess that could be a like, sports doctor.
<Bike>
which is kind of what you do, analogously speaking, so that works
<shka_>
jcowan: though competition has more value then just letting your favorite team win ;-)
jochens has quit [Ping timeout: 272 seconds]
frodef has joined #lisp
hhdave has quit [Ping timeout: 268 seconds]
* jcowan
is not sure the joke came through properly
holycow has joined #lisp
dorketch has quit [Quit: WeeChat 2.1]
<shka_>
jcowan: it missed me completely ;-)
varjag has quit [Ping timeout: 240 seconds]
pjb has joined #lisp
<jcowan>
"athletic supporter" is the formal term for a jockstrap
kajo has quit [Ping timeout: 252 seconds]
iskander has quit [Ping timeout: 252 seconds]
Essadon has quit [Ping timeout: 252 seconds]
fikka has quit [Ping timeout: 252 seconds]
kajo has joined #lisp
iskander has joined #lisp
rumbler31 has joined #lisp
<Bike>
oh! oh.
<Bike>
whoops.
jmercouris has quit [Remote host closed the connection]
payphone has joined #lisp
<shka_>
jcowan: i had to google it
fikka has joined #lisp
varjag has joined #lisp
frgo has joined #lisp
fikka has quit [Ping timeout: 250 seconds]
varjag has quit [Ping timeout: 268 seconds]
frgo has quit [Ping timeout: 250 seconds]
anniepoo_ has quit [Ping timeout: 276 seconds]
lumm has joined #lisp
jack_rabbit has quit [Read error: Connection reset by peer]
varjag has joined #lisp
m00natic has quit [Remote host closed the connection]
payphone has quit [Ping timeout: 268 seconds]
kajo has quit [Ping timeout: 250 seconds]
frgo has joined #lisp
rumbler31 has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 252 seconds]
Kundry_Wag has joined #lisp
nowhere_man has joined #lisp
Kundry_Wag has quit [Ping timeout: 272 seconds]
confusedwanderer has quit [Quit: confusedwanderer]
holycow has quit [Quit: Lost terminal]
orivej has joined #lisp
shka_ has quit [Ping timeout: 244 seconds]
shka_ has joined #lisp
grumblefumb has joined #lisp
kajo has joined #lisp
Kundry_Wag has joined #lisp
wusticality has joined #lisp
robotoad has joined #lisp
confusedwanderer has joined #lisp
robdog has joined #lisp
orivej has quit [Ping timeout: 252 seconds]
danielxvu has quit [Remote host closed the connection]
danielxvu has joined #lisp
ryan_vw has quit [Ping timeout: 250 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
dale has joined #lisp
cage_ has quit [Remote host closed the connection]
random-nick has quit [Read error: Connection reset by peer]
jochens has joined #lisp
hugh_marera has quit [Quit: hugh_marera]
hugh_marera has joined #lisp
ggole has quit [Quit: ggole]
jochens has quit [Ping timeout: 252 seconds]
jmercouris has joined #lisp
<jmercouris>
is there a way to have an asd file load a specific system based on OS?
<jmercouris>
or to load specific components based on OS?
robdog has quit [Remote host closed the connection]
<pfdietz>
reader conditionalization?
<jmercouris>
pfdietz: I'm not familiar
<pfdietz>
#+ #-
<jmercouris>
ah, those
<jmercouris>
yes, I am familiar
<jmercouris>
so how do I know what kind of strings exists? is there like #+drawin-p? or something?
<elderK>
Guys, is there a way to set the same default value for an optional parameter to a generic function, like, for all methods?
<elderK>
or do I have to simply state the same default myself?
<jmercouris>
elderK: no, I believe not
<pfdietz>
Around method?
<elderK>
pfdietz: I was thinking of using an around method for assertions, like, checking that the parameters are of the right types.
<jackdaniel>
jmercouris: there is trivial-features library
<elderK>
I was wondering if that's like, worth doing.
<jackdaniel>
check out its documentation
wusticality has quit [Remote host closed the connection]
<jmercouris>
jackdaniel: ah, that's where those strings come from, good to know!
<jmercouris>
I had always just seen them in code and did not know their origin
<jackdaniel>
I think you are confused
<jackdaniel>
trivial-features provides uniform symbols in cl:*features* for certain features across implementations
<jmercouris>
jackdaniel: isn't it used by UIOP?
<jackdaniel>
#+foo is a reader syntax, but foo here is not a string, but a symbol
robdog has joined #lisp
<jmercouris>
okay, sorry, yes when I said strings, I meant the strings the symbols evaluate to
rumbler31 has joined #lisp
<jmercouris>
sorry that was agaain wrong
<jmercouris>
I think its called symbol-string or something, to go from a string to a symbol
<jackdaniel>
I don't know what strings has to do with this reader syntax
<jmercouris>
I am trying to say #+darwin, or #+unix, those macros, the sequence of characters, who defined them, that was my question
<Bike>
that doesn't really have anything to do with #+
<jmercouris>
nevermind, I can't express myself, but I understand
<Bike>
look at *features*
<Bike>
it'll have :darwin or :unix or something in it, probably
<Bike>
probably your implementation put that there
<jmercouris>
Right, but that is implementation specific
<jackdaniel>
if foo (by default in keyword package unless you provide package accessor) is in cl:*features*, then #+foo form will read form, and #-foo form won't read it. if foo is not there, then #+ foo form will not read it (etc)
<jmercouris>
and trivial-features generalizes that, and I believe, UIOP uses trivial features based on reader-macros I've seen people writing with it
<jmercouris>
I could be wrong
<Bike>
yes, trivial-features tries to smooth that over.
<Bike>
it doesn't generalize anything. it just puts certain things in *features*.
<jackdaniel>
uiop is in "depend on me, I'll reimplement everything" camp, so I doubt it depends on trivial-features
<jmercouris>
aliases?
<Bike>
*features* is literally just a list of symbols.
<Bike>
there are no "aliases". this is a really, really, really simple mechanism.
<jmercouris>
ok
<jmercouris>
sorry, I'm tired, I'm trying my best
<Bike>
trivial-features just makes sure that on an implementation that puts :macosx or something in *features*, instead of :darwin, :darwin is also there.
<Bike>
so that you can then do #+darwin confidently and portably.
<jmercouris>
I see, ok
<jackdaniel>
it is a very useful project
wusticality has joined #lisp
<jmercouris>
but how could I use that in asdf file? wouldn't I first have to load trivial-features?
<jackdaniel>
there is system-depends-on
random-nick has joined #lisp
<jackdaniel>
if you have trivial-features in this list, then asdf will load trivial-features and then reload your asd file
<jmercouris>
I didn't even know such a feature existed
<jmercouris>
good to know!
<jmercouris>
I assume it is just :system-depends-on (:trivial-features) within the defsystem form?
<jmercouris>
it doesn't seem to specify what form the system should take
lnostdal has joined #lisp
<jackdaniel>
you may experiment with things on your own
<jackdaniel>
i.e you had some hypothesis how to use it
<jmercouris>
I did try a few
<jmercouris>
it doesn't see to like my hypothesis :D
<jackdaniel>
try looking through the document you have linked for system-depends-on
<jmercouris>
or however you pluralize that
<jackdaniel>
and you'll find defsystem-depends-on snippet
<jackdaniel>
If you need non-standard character encodings for your source code, use the extension system asdf-encodings, by specifying :defsystem-depends-on ("asdf-encodings") in your defsystem. This extension system will register support for more encodings using the *encoding-external-format-hook* facility, so .. etc
<jmercouris>
maybe I can't write :trivial-features, but should write "trivial-features"
<jmercouris>
tahts the only diff
<jackdaniel>
also you want to use if-feature, not #+feature
frodef has quit [Ping timeout: 245 seconds]
<jackdaniel>
(also asdf thing), because it is too late after you read the defsystem
<jackdaniel>
either way I'm off to sleep
<jackdaniel>
good night
<jmercouris>
goodnight!
<jmercouris>
if-features not #+feature? can anyone explain why?
<jmercouris>
I can't find any documentation or even where to begin reading
<jackdaniel>
in firefox it is Ctrl-f for free text search, that may prove useful in this manual
<jmercouris>
:D
vlatkoB has quit [Remote host closed the connection]
razzy has joined #lisp
razzy has quit [Remote host closed the connection]
razzy has joined #lisp
ryan_vw has joined #lisp
frodef has joined #lisp
<jmercouris>
does there exist a list of of keywords :if-feature supports?
hugh_marera has joined #lisp
jmercouris has quit [Remote host closed the connection]
rpg has joined #lisp
wusticality has quit [Ping timeout: 246 seconds]
mutenewt has joined #lisp
<dim>
ahah, I had forgotten that it's easy to start a swank server in an already running lisp, such as Clozure-CL, so that I can still hack using CCL in SLIME ;-)
<dim>
(because ccl is currently broken in macos and I have a test version that works but only in packaged/gui mode, for reasons)
<aeth>
Does anyone use SLIME-over-Swank-over-SSH on a remote CL?
<pjb>
dim: really, if you recompile it following the procedure, it currently works on mojave.
<dim>
aeth: I did at times, but it's frustrating, because some operations need to files to exist in the remote server and be in sync
<dim>
pjb: nice, I did git pull, do you have a link to how to compile it then?
<dim>
I guess I should use the GUI version to compile to the full distribution then, too. Or maybe brew install --head works?
<dim>
Heap image (version 1039) is too old for this kernel (minimum 1042).
<dim>
no luck this time
jibanes has joined #lisp
robdog has quit [Remote host closed the connection]
<dim>
pjb: if you're using homebrew, you might be interested
warweasle has joined #lisp
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fikka has joined #lisp
nowhere_man has quit [Ping timeout: 252 seconds]
confusedwanderer has quit [Quit: confusedwanderer]
robdog has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
gxt has quit [Ping timeout: 244 seconds]
scymtym has quit [Ping timeout: 276 seconds]
robdog has joined #lisp
ryan_vw has quit [Ping timeout: 268 seconds]
robdog has quit [Ping timeout: 264 seconds]
permagreen has joined #lisp
robdog has joined #lisp
hugh_marera has quit [Quit: hugh_marera]
scymtym has joined #lisp
kushal has quit [Remote host closed the connection]
kushal has joined #lisp
hugh_marera has joined #lisp
wusticality has joined #lisp
fikka has quit [Ping timeout: 272 seconds]
wusticality has quit [Remote host closed the connection]
wusticality has joined #lisp
Cymew has joined #lisp
pierpal has quit [Ping timeout: 244 seconds]
robdog has quit [Remote host closed the connection]
Cymew has quit [Ping timeout: 246 seconds]
<no-defun-allowed>
can i customise how typep checks type membership in MOP?
slyrus1 has joined #lisp
slyrus has quit [Ping timeout: 264 seconds]
slyrus1 is now known as slyrus
<no-defun-allowed>
i'd like a "lazy" class which only does some computation when values are requested from it, but this lazy class could become one of several classes and to preserve the illusion it is an instance of that class making it typep to the class would be nice
<no-defun-allowed>
the alternative is to write a lazy class for each target, but it'd be quite verbose
hugh_marera has quit [Quit: hugh_marera]
<Bike>
you cannot customize typep. an object is always a direct instance of one class.
<Bike>
i have no idea about becoming classes or whatever.
<no-defun-allowed>
fair enough, thanks
fikka has joined #lisp
<no-defun-allowed>
then again dispatch would be screwy if you could, so yeah the verbose solution would be better