jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | offtopic --> #lispcafe
karlosz has quit [Quit: karlosz]
random-nick has quit [Ping timeout: 240 seconds]
ebrasca has quit [Remote host closed the connection]
sxmx has joined #lisp
ramHero has quit [Ping timeout: 252 seconds]
krjli has quit [Remote host closed the connection]
hendursaga has quit [Remote host closed the connection]
hendursaga has joined #lisp
contrapunctus has joined #lisp
contrapunctus has left #lisp [#lisp]
contrapunctus has joined #lisp
contrapunctus has left #lisp ["Disconnected: closed"]
contrapunctus has joined #lisp
<bmansurov> o/ Can anyone please explain why the following macro doesn't work?
<bmansurov> (defmacro positivep (x)
<bmansurov> (> x 0))
<bmansurov> (positivep pi)
<bmansurov>
contrapunctus has left #lisp ["Disconnected: closed"]
hjudt has quit [Ping timeout: 240 seconds]
<bmansurov> Or this:
<bmansurov> (defmacro positivep (x)
<bmansurov> `,(if (> x 0) 'Yes 'No))
<Alfr> You should use defun for that.
<no-defun-allowed> Indeed. Though I assume you would want to make sure the returned form tests X, as the macro currently tests if the symbol PI is greater than 0.
<no-defun-allowed> clhs plusp
<Alfr> And as for why it doesn't work, macro expansion doesn't evaluate its arguments. Thus you're passing the symbol PI, and then X is bound to it, thus you're trying to evaluate (> 'PI 0).
<Alfr> no-defun-allowed, I knew that I missed something, couldn't recall that name.
<bmansurov> Thanks both. Assuming I want to make that macro work, how do I pass the constant PI to the macro, rather than the symbol?
<no-defun-allowed> If you really wanted to, you may write (defmacro positivep (x) `(if (,x 0) 'yes 'no))
<bmansurov> I see. I guess I should share another example where the problem I'm trying to solve is more pronounced. Here it is:
<bmansurov> (defmacro seq (from to)
<bmansurov> `(loop for i from ,from
<bmansurov> ,(if (> from to) 'downto 'to) ,to
<bmansurov> collect i))
<White_Flame> the parameters passed into defmacro are source code
<White_Flame> so if you want to pass something, it has to be absolutely literal
<bmansurov> (seq 10 3) works in the above example, but (seq 10 pi) doesn't.
aeth has quit [Ping timeout: 268 seconds]
<White_Flame> however, in most cases, what you really want is to construct code that the compiler will collapse for you, instead of trying to fiddle stuff at this level
<White_Flame> right, because (> 10 'pi) doesn't compare
<White_Flame> the literal symbol PI is the 2nd parameter to the macro
<White_Flame> again, it's passing source code
aeth has joined #lisp
<White_Flame> the forms themselves, long before anything is evaluated
Spawns_Carpeting has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
<no-defun-allowed> You will have to decide if (> from to) at runtime, perhaps by replicating and generating (if (> from to) (loop ... to ...) (loop ... downto ...)). But this would again be better as a function.
<White_Flame> this is a runtime decision you have to make, based on the actual runtime value being passed into a call; this isn't something you can statically resolve
Spawns_Carpeting has joined #lisp
<bmansurov> OK, thanks. So there's no way to solve the above problem with macros other than creating two loops?
<White_Flame> if you make 2 loops, you'll have a (if (> from to) (loop ...) (loop ..)), and if FROM & TO are numeric literals, the CL compiler should constant collapse one of them away
<White_Flame> but, an inline function would be more suitable there than a macro
<White_Flame> to accomplish the same
<bmansurov> I went this rabbit hole because I didn't want to write a function with two loops. I appreciate everyone's responses.
<White_Flame> s/numeric literals/numeric constants/
<White_Flame> even if you special-cased in a test for pi, what would you think ot generate for (seq x y) ?
<White_Flame> *to
<bmansurov> I hadn't thought of variables, but you're right, it doesn't work.
c7s has quit [Ping timeout: 252 seconds]
<White_Flame> it's the biggest thing to mindwrap when dealing with macros
semz has quit [Ping timeout: 250 seconds]
<bmansurov> My biggest gripe with Common Lisp is that at some point I got this macro stuff, but because I didn't practice writing CL, I forgot it. Learning Common Lisp is not like learning to ride a bicycle, unfortunately. I have to relearn this stuff. ;(
<White_Flame> it's like that for all programming languages
srhm has quit [Quit: Konversation terminated!]
<bmansurov> I don't know. For me, unlike JavaScript, for example, Common Lisp was hard to learn (even though I already knew how to program). It's even harder to retain that knowledge.
<White_Flame> this has the brittleness of doing equality for the exit, though
<White_Flame> but with all fixnums, this should work, even if start = end
<White_Flame> s/fixnums/integers/
<White_Flame> ugh, s/incf/+/ :-P
<White_Flame> too many edits :)
<White_Flame> and of course the reason there's upto vs downto is that the exit comparison needs to be <= or >= depending on the direction
<bmansurov> Thanks, I appreciate your help. I was more interested in getting ~to~ and ~downto~ working. As others have suggested, and as you have showed, there are many ways to skin this cat. I was after that specific way.
<White_Flame> which is why there's = in this bidirectional version
<White_Flame> ah, k
semz has joined #lisp
semz has joined #lisp
semz has quit [Changing host]
ikrabbe|2 has joined #lisp
ikrabbe has quit [Ping timeout: 240 seconds]
aeth has quit [Ping timeout: 265 seconds]
aeth has joined #lisp
bitmapper has quit [Quit: Connection closed for inactivity]
ikrabbe has joined #lisp
ikrabbe|2 has quit [Ping timeout: 240 seconds]
contrapunctus has joined #lisp
contrapunctus has left #lisp ["Disconnected: closed"]
curtosis has joined #lisp
curtosis is now known as curtosis[away]
skapate has joined #lisp
karlosz has joined #lisp
skapata has quit [Ping timeout: 260 seconds]
contrapunctus has joined #lisp
gitgoood has joined #lisp
gitgood has quit [Ping timeout: 252 seconds]
mmmattyx has quit [Quit: Connection closed for inactivity]
curtosis[away] has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
tophullyte has joined #lisp
Oladon has quit [Quit: Leaving.]
gaqwas has quit [Ping timeout: 252 seconds]
gaqwas has joined #lisp
gaqwas has joined #lisp
gaqwas has quit [Changing host]
karlosz has quit [Read error: No route to host]
karlosz has joined #lisp
Alfr is now known as Guest74969
<beach> Good morning everyone!
Alfr has joined #lisp
Guest74969 has quit [Ping timeout: 250 seconds]
luis has quit [Quit: The Lounge - https://thelounge.chat]
slyrus has joined #lisp
luis has joined #lisp
slyrus has quit [Ping timeout: 260 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
vutral_ has quit [Quit: Connection closed for inactivity]
orivej has joined #lisp
karlosz has quit [Quit: karlosz]
klltkr has quit [Remote host closed the connection]
Codaraxis__ has joined #lisp
Codaraxis_ has quit [Ping timeout: 240 seconds]
rumbler31 has quit [Remote host closed the connection]
thinkpad has quit [Ping timeout: 252 seconds]
rumbler31 has joined #lisp
thinkpad has joined #lisp
froggey has quit [Ping timeout: 265 seconds]
froggey has joined #lisp
aartaka has quit [Read error: Connection reset by peer]
aartaka has joined #lisp
akoana has joined #lisp
Oladon has joined #lisp
contrapunctus has left #lisp ["Disconnected: closed"]
Bike has quit [Quit: Lost terminal]
curtosis has joined #lisp
contrapunctus has joined #lisp
curtosis is now known as curtosis[away]
curtosis[away] has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
slyrus has joined #lisp
slyrus has quit [Ping timeout: 268 seconds]
summerisle has quit [K-Lined]
summerisle has joined #lisp
chipolux has joined #lisp
Nilby has joined #lisp
chipolux has quit [Client Quit]
abhixec has joined #lisp
slyrus has joined #lisp
slyrus has quit [Ping timeout: 252 seconds]
epony has quit [Remote host closed the connection]
epony has joined #lisp
hypercube has quit [Ping timeout: 268 seconds]
sloanr has joined #lisp
mindCrime has quit [Excess Flood]
curtosis has joined #lisp
mindCrime has joined #lisp
ldfung has joined #lisp
slyrus has joined #lisp
sloanr has quit [Remote host closed the connection]
sloanr has joined #lisp
slyrus has quit [Ping timeout: 240 seconds]
curtosis has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
paulj has quit [Remote host closed the connection]
andrei-n has joined #lisp
sloanr has quit [Remote host closed the connection]
indathrone has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
slyrus has joined #lisp
slyrus has quit [Ping timeout: 260 seconds]
abhixec has quit [Ping timeout: 252 seconds]
aeth has quit [Ping timeout: 252 seconds]
aeth has joined #lisp
slyrus has joined #lisp
pve has joined #lisp
slyrus has quit [Ping timeout: 240 seconds]
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 260 seconds]
slyrus has joined #lisp
Inline has joined #lisp
srji has joined #lisp
ech has quit [Ping timeout: 240 seconds]
ech has joined #lisp
slyrus has quit [Ping timeout: 260 seconds]
marusich has quit [Quit: Leaving]
elflng has quit [Ping timeout: 268 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
elflng has joined #lisp
hhdave has quit [Ping timeout: 265 seconds]
hhdave has joined #lisp
hendursa1 has joined #lisp
slyrus has joined #lisp
hendursaga has quit [Ping timeout: 240 seconds]
heisig has joined #lisp
mrchampion has quit [Ping timeout: 265 seconds]
slyrus has quit [Ping timeout: 252 seconds]
akoana has quit [Quit: leaving]
mrchampion has joined #lisp
ech has quit [Ping timeout: 240 seconds]
gxt_ has quit [Quit: WeeChat 3.1]
cage_ has joined #lisp
thinkpad has quit [Ping timeout: 260 seconds]
luckless_ has quit [Remote host closed the connection]
luckless_ has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
thinkpad has joined #lisp
skapate has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
narimiran has joined #lisp
White_Flame has quit [Ping timeout: 265 seconds]
slyrus has joined #lisp
White_Flame has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
anticrisis has quit [Read error: Connection reset by peer]
Oladon has quit [Quit: Leaving.]
slyrus has quit [Ping timeout: 268 seconds]
makomo has joined #lisp
tophullyte has quit [Read error: Connection reset by peer]
armin has quit [Remote host closed the connection]
varjag has joined #lisp
hhdave has quit [Ping timeout: 268 seconds]
thinkpad has quit [Read error: No route to host]
hhdave has joined #lisp
thinkpad has joined #lisp
aartaka_d has joined #lisp
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #lisp
aartaka_d has quit [Ping timeout: 246 seconds]
narimiran has quit [Quit: leaving]
theothornhill has joined #lisp
surabax has joined #lisp
<theothornhill> Hello! How do you decide between separate defmethods, or use the (:method) syntax on generic functions? Are there any tradeoffs with one or the other?
<no-defun-allowed> Usually I put a class definition and any methods in the same file, so I would rarely be able to use :method syntax if I wanted.
<beach> The latter requires the method definition to be in the same file as the DEFGENERIC form, so that's already a limitation. If you modularity requires them to be in a separate file you have no choice.
<no-defun-allowed> But I use :method for "default" methods which the programmer should know about immediately sometimes, and whenever I use DEFGENERIC as a lazy person's pattern matcher.
<beach> Or, you can use :METHOD when you have only a few methods that specialize to built-in classes.
<beach> For example, if you specialize to NULL and CONS.
<theothornhill> Thanks! Makes sense.
<beach> Methods defined with :METHOD are removed when the DEFGENERIC form is re-evaluated. Not so with separate methods defined using DEFMETHOD.
bjth has joined #lisp
<beach> That is a consideration as well.
<theothornhill> You mean the "old" version is removed if you change a :METHOD method and re-evaluate?
<beach> But, yeah, I agree with no-defun-allowed. Often, the best place for a method specializing to some class C is in the same file as the DEFCLASS form for C, whereas DEFGENERIC forms are usually in a separate file.
<beach> theothornhill: yes.
<theothornhill> That seems nice though, if it cleans up the image a little
Kundry_Wag has joined #lisp
<beach> Or if you change some other aspect of the generic function, like the method combination.
<beach> ... or the method class.
<theothornhill> Is there any reason you'd want to keep the "old" version?
mindCrime has quit [Ping timeout: 268 seconds]
heisig has quit [Ping timeout: 252 seconds]
<beach> I can't think of any right now.
<theothornhill> Ok. It seems you can mix and match it though, so thats nice
Kundry_Wag has quit [Ping timeout: 265 seconds]
<vydd> Hey! I'm trying to do some CL programming after a relatively long time, and for my project I'd like to use https://github.com/plkrueger/CocoaInterface. However, it doesn't seem to play nice with asdf (or at least that's how it looks to me). There are docs on how to setup the environment using the ccl-ide-init.lisp file, in which *module-search-path* is updated to contain CocoaInterface, but when I quickload my project from sly, it
<vydd> cannot find the :IU package. Any pointers on how to solve that?
vegansbane6963 has quit [Quit: The Lounge - https://thelounge.chat]
msk has quit [Ping timeout: 240 seconds]
msk has joined #lisp
slyrus has joined #lisp
bjth has quit [Remote host closed the connection]
kreyren has quit [Changing host]
kreyren has joined #lisp
kreyren has quit [Changing host]
kreyren has joined #lisp
slyrus has quit [Ping timeout: 252 seconds]
rumbler31 has quit [Remote host closed the connection]
rumbler31 has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
<vydd> jmercouris: googling around, your named popped up in a discussion related to migrating CocoaInterface to use a system. https://github.com/nEXT-Browser/CocoaInterface doesn't seem to be available anymore. Did you ever manage to make it work, or did you hit a road block?
luckless_ has quit [Ping timeout: 240 seconds]
vegansbane6963 has joined #lisp
slyrus has joined #lisp
orivej has joined #lisp
random-nick has joined #lisp
slyrus has quit [Ping timeout: 265 seconds]
skapata has joined #lisp
johnjay has quit [Ping timeout: 240 seconds]
galex-713 has quit [Ping timeout: 260 seconds]
johnjay has joined #lisp
bjth has joined #lisp
<rumbler31> once long ago I played with something like that on windows, but the experience wasn't great, mainly because the cocoa interface on windows was likely incomplete
srandon111 has joined #lisp
galex-713 has joined #lisp
srandon111 has quit [Remote host closed the connection]
lotuseater has joined #lisp
slyrus has joined #lisp
slyrus has quit [Ping timeout: 240 seconds]
kevingal has joined #lisp
bjth has quit [Remote host closed the connection]
slyrus has joined #lisp
lotuseater has quit [Read error: Connection reset by peer]
theothornhill has quit [Ping timeout: 240 seconds]
slyrus has quit [Ping timeout: 268 seconds]
<jmercouris> vydd: I was successful
<jmercouris> vydd: you’ll have to look at this repository : https://github.com/atlas-engineer/nyxt
<jmercouris> vydd: if you go back in time you’ll see the cocoa interface working
Kundry_Wag has joined #lisp
<jmercouris> I actually more or less use the objective c bridge independently of the cocoa interface after some point in time
Kundry_Wag has quit [Ping timeout: 252 seconds]
johnjay has quit [Ping timeout: 268 seconds]
johnjay has joined #lisp
c7s has joined #lisp
slyrus has joined #lisp
theothornhill has joined #lisp
slyrus has quit [Ping timeout: 268 seconds]
theothornhill has quit [Ping timeout: 252 seconds]
madage has quit [Remote host closed the connection]
madage has joined #lisp
hjudt has joined #lisp
hjudt has quit [Ping timeout: 240 seconds]
hiroaki_ has quit [Ping timeout: 260 seconds]
hiroaki has quit [Ping timeout: 260 seconds]
theothornhill has joined #lisp
dickbarends has joined #lisp
theo[m]1 has joined #lisp
theothornhill has quit [Ping timeout: 265 seconds]
hiroaki_ has joined #lisp
hiroaki has joined #lisp
skapata has quit [Remote host closed the connection]
slyrus has joined #lisp
theothornhill has joined #lisp
slyrus has quit [Ping timeout: 268 seconds]
theothornhill has quit [Ping timeout: 252 seconds]
zooey has quit [Remote host closed the connection]
surabax has quit [Remote host closed the connection]
surabax has joined #lisp
aartaka_d has joined #lisp
aartaka has quit [Ping timeout: 246 seconds]
waleee-cl has joined #lisp
slyrus has joined #lisp
slyrus has quit [Ping timeout: 246 seconds]
Codaraxis__ has quit [Remote host closed the connection]
Bike has joined #lisp
Codaraxis__ has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 260 seconds]
Codaraxis__ has quit [Remote host closed the connection]
Codaraxis__ has joined #lisp
nij has joined #lisp
<nij> Hello! I can ql:quickload :sb-cltl2 from an sbcl repl. But when I put that in my stumpwm config, it doesn't know where to find.
<nij> Oddly enough, ql:quickload-ing other packages works fine in my stumpwm config.
<no-defun-allowed> I think that would call (require :sb-cltl2) and not ASDF, so it is up to how SBCL finds its own modules.
<nij> What is *that*?
dickbarends has quit [Remote host closed the connection]
slyrus has joined #lisp
<no-defun-allowed> (ql:quickload :sb-cltl2)
<nij> Hmm. I see. But it does work in my repl..
<no-defun-allowed> Quicklisp doesn't control how SBCL stores its contrib(?) modules, so it is understandable how any other module would load correctly.
<MichaelRaskin> nij: presumably, in REPL the system is already loaded for other reasons?
slyrus has quit [Ping timeout: 240 seconds]
<Bike> i think sbcl loads contribs by looking at $SBCL_HOME, which might be different between the repl and stumpwm
<nij> Where is $SBCL_HOME pointing to by default?
<rumbler31> I don't think its set unless you set it yourself
mmmattyx has joined #lisp
<Bike> ok, well, i was looking at module-provide-contrib, which says it "[stringifies] and [downcases] NAME, then [attempts] to load the file $SBCL_HOME/name/name". but it seems to do a little more than querying the shell variable
<nij> Maybe I should just check what has been loaded in my repl?
<nij> How to check all load paths?
<Bike> maybe you could look at (sb-int:sbcl-homedir-pathname) in the repl versus stumpwm
<Bike> if they're different, REQUIRE will be looking in different places
<nij> Great! I get the clue.
<nij> Thanks :-)
lotuseater has joined #lisp
<lotuseater> is it equivalent to say (defun sqr (x) (* x x)) and (compile 'sqr '(lambda (x) (* x x))) ? :)
<Bike> mostly. the first one might not be compiled.
<Bike> and the second one will probably lack (implementation-defined) compile time side effects like suppressing undefined function warnings for sqr, and such.
<lotuseater> hmmm
<nij> Problem solved ;)
<lotuseater> ^^
<nij> (require "drakma") on guix system returns the error -
<lotuseater> oh. but I'm not on GUIX atm :/
<nij> Unalbe to load any of the alternatives: ("libssl.so.1.1" "libssl.so.1.0.2m" ...) [Condition of type CFFI:LOAD-FOREIGN-LIBRARY-ERROR]
<Bike> sbcl uses dlopen to find libraries, and as far as i can tell from people being confused here, guix totally hoses it
<nij> Yeah GUIX has their own way to put their libraries.
<Bike> you need to use LD_LIBRARY_PATH or something
<lotuseater> oh wow, on nixos the lispPackages.drakma doesn't fail
<nij> nixos has a large community
<lotuseater> yes much larger
<nij> but it's not lisp
<lotuseater> no it isn't and the syntax confuses me
<lotuseater> just sometimes, even that it's functional
<nij> Bike: would you mind elaborating it more?
<lotuseater> but don't worry, loading drakma in SBCL also throws me into "libssl not found" :D
<nij> Should I set LD_LIBRARY_PATH to something else?
<nij> lotuseater: you're on nix?
<Bike> i haven't used these systems myself. i'm just going off of what people have said here in the past.
<lotuseater> yes nij, I'm using NixOS
<Bike> maybe i can find something more detailed in the logs.
<nij> Bike great it's totally fine. At least I have something to start with.
<nij> No no it's fine. If you don't happen to know, I'll do the work.
<Bike> ok.
<lotuseater> i worked around that with other packages by pushing some paths to cffi:*foreign-library-directories* in .sbclrc
slyrus has joined #lisp
aartaka has joined #lisp
<nij> great to know!
<nij> Now that variable is NIL in my repl. I gotta ask the guix community where those .so files are.
<lotuseater> i found them here using the tool fuzzy find, very practicable
aartaka_d has quit [Ping timeout: 265 seconds]
<lotuseater> but it won't be bad to know some special folder, it searches recursively ...
<lotuseater> and eg for loading to work with mcclim it needed the truetype font path
<nij> im getting fzf for that.. hold on
slyrus has quit [Ping timeout: 268 seconds]
<lotuseater> yes or for whatever else :)
ech has joined #lisp
VincentVega has joined #lisp
Noisytoot is now known as Noisytoot__
Noisytoot__ is now known as Noisytoot
makomo has quit [Quit: WeeChat 3.0.1]
<vydd> jmercouris: amazing, thanks!
torbo has joined #lisp
heisig has joined #lisp
slyrus has joined #lisp
nij has left #lisp ["ERC (IRC client for Emacs 27.2)"]
VincentVega has quit [Quit: Connection closed]
slyrus has quit [Ping timeout: 260 seconds]
slyrus has joined #lisp
Kundry_Wag has joined #lisp
slyrus has quit [Ping timeout: 240 seconds]
phadthai has quit [Remote host closed the connection]
Josh_2 has joined #lisp
<Josh_2> Good afternoon
<beach> Hello Josh_2.
ebrasca has joined #lisp
slyrus has joined #lisp
<alanz> I am liking that instead of writing comments about what I am doing, I can put :documentation and then it shows up in the info requests
long4mud has quit [Quit: WeeChat 3.0.1]
slyrus has quit [Ping timeout: 252 seconds]
<beach> alanz: Except that comments and documentation strings have different target audiences.
<alanz> I am still working that out. I am using the documentation more on fields, and for defun's
<beach> What are "fields"?
<alanz> slots, I guess I should call them
<beach> Oh.
* alanz still an immigrant here
<Nilby> I'm just glad when people write any docstrings.
<beach> Still, the documentation string and the comment would contain different things. First of all, a documentation string for a slot doesn't make much sense, since slots are implementation details. And for functions, the comment would mention why it is implemented the way it is, and the documentation string would mention how it is to be used.
<alanz> Right now I am using defclass to create a thing that I intend to be a summary of information I know from various sources, which can be used as the basis of a thing to render in CLIM. So I am documenting per slot what it is sumamrising
<alanz> Is that a completely un-lisp way of doing things?
<Nilby> I like docstrings on slots.
<beach> alanz: If I understand it right, that makes sense.
<alanz> thanks
notzmv has quit [Read error: Connection reset by peer]
theothornhill has joined #lisp
theothornhill has quit [Ping timeout: 240 seconds]
notzmv has joined #lisp
notzmv is now known as Guest35219
klltkr has joined #lisp
Guest35219 has quit [Remote host closed the connection]
notzmv- has joined #lisp
notzmv- is now known as notzmv
Inline has quit [Ping timeout: 260 seconds]
skapata has joined #lisp
slyrus has joined #lisp
slyrus has quit [Ping timeout: 268 seconds]
renzhi has joined #lisp
JCDentonreportin has quit [Quit: Idle for 30+ days]
slyrus has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
slyrus_ has joined #lisp
slyrus has quit [Ping timeout: 252 seconds]
slyrus_ has quit [Ping timeout: 260 seconds]
rogersm has joined #lisp
phadthai has joined #lisp
Kundry_Wag has joined #lisp
<jackdaniel> beach: but if you inspect the object, comment won't be (usually) accessible, while the docstring could provide some context
<jackdaniel> just a loose thought, I don't find slot documentation very helpful neither
theothornhill has joined #lisp
<beach> Yes, I see what you mean. I need to think about what target audience would be most likely to inspect an object.
phadthai has quit [Quit: EWAYSRCH: Cannot host route (no route to host)]
phadthai has joined #lisp
theothornhill has quit [Ping timeout: 246 seconds]
<Nilby> Unless you want to specialize #'documentation on target audience, I say just write copious reasonable docstrings for everybody.
<jackdaniel> (defclass foo () ((bar :documentation "provides bar for foo"))) ;-)
<jackdaniel> or (defclass cat () ((name :documentation "the name of a cat")))
theothornhill has joined #lisp
skapata has quit [Remote host closed the connection]
<Nilby> I know slots are like the divergent base case, but sometimes there could be quite useful inoformation about a slot.
<jackdaniel> sure
<Nilby> e.g (defclass container () (... (damage :documentation "A list of bounding boxes whose area may need to be redraw.")))
<jackdaniel> you are right, there may be a useful information. the question is whether it should be put in a comment, in a docstring or in a documentation
theothornhill has quit [Ping timeout: 252 seconds]
<jackdaniel> (where a documentation is an external document)
mrchampion has quit [Read error: Connection reset by peer]
<Nilby> I find it very useful as 1 keystroke away in the REPL.
<alanz> I am with Nilby on that
long4mud has joined #lisp
rogersm has quit []
<Nilby> I even have it so it can the the slot doc from an accessor name or class name.
<jackdaniel> I don't have a strong opinion on the topic. if the slot's accessor is exported, then it should be documented in the external document. as of whether a slot itself should be documented in a comment or via documentation - I suppose it heavily depends on the programming style
<jackdaniel> when someone mainly operates on a living image (i.e by relying heavily on introspection), then the documentation option sounds fine; when they work solely based on a source code for clean builds, then a comment is good
<jackdaniel> mind, that documentation strings in lisp are not very nice. for instance when you have more information to cover, they just clutter the code
<jackdaniel> there is no proper wrapping etc
<jackdaniel> you can't also associate with them any semantic information (it is a string after all)
slyrus has joined #lisp
<Nilby> My view is there is no external. The documentation is an object accessible from the repl.
* jackdaniel burns his books and printed manuals yelling "burn! thou is not accessible from the repl"
Oladon has joined #lisp
theothornhill has joined #lisp
<jackdaniel> that said, a live documentation writing and reading system in clim is a nice idea :)
<jackdaniel> if I had a source code of unfinished thing in my repositories directory, I'd call it "London" after a famous writer
<dieggsy> I've been in scheme world for a long time and am revisiting my old project euler problems in CL - what am I doing wrong in the CL defun here?: https://paste.dieggsy.com/2021-04-11T12:50:05
mrchampion has joined #lisp
<jackdaniel> first: your indentation is wrong
<loke[m]> dieggsy: I'm afraid you have to be a bit more precise than just asking "what's wrong".
<loke[m]> jackdaniel: Looks like the default Emacs Lisp indentation. Look at the if.
<jackdaniel> elisp indentation is wrong for common lisp, isn't it/
<dieggsy> This is lisp-mode in Emacs
<loke[m]> jackdaniel: oh for sure.
<dieggsy> I'm not explicitly using elisp-mode lol
<jackdaniel> dieggsy: install slime and use slime-mode for editing common lisp code
<jackdaniel> it will recognize special operators like LABELS and indent your code correctly
<jackdaniel> (well, correctly for most cases)
<dieggsy> jackdaniel: I have slime installed and slime-mode enabled, doesn't seem to make a difference
<jackdaniel> that's a shame, it works here
<dieggsy> lol
<dieggsy> are you sure you're not modifying the indentation in any other way
<jackdaniel> I'm pretty sure, yes :)
theothornhill has quit [Ping timeout: 260 seconds]
<jackdaniel> so, based on responses here: 1) fix the indentation, 2) provide more context of what is wrong
Inline has joined #lisp
<dieggsy> Ok, but indentation is /not/ a factor in the code results lol, thats' part of why i like lisp
<dieggsy> lisps in general
<jackdaniel> sure, but it is a factor in the peer code review
<jackdaniel> i.e people may refuse to be bothered with wrongly indented code
<Nilby> I like to imagine that a modern Concordia will eventually materialize.
<dieggsy> Hmm. Well, if slime-mode is supposed to fix my indentation and it simply isn't ... ?
<dieggsy> i'll look around
<loke[m]> dieggsy: Does SLIME work for you otherwise?
<_death> dieggsy: slime sets up a lisp-mode hook (slime-lisp-mode-hook) that sets the lisp-indent-function to common-lisp-indent-function
<dieggsy> yeah hold up, testing things
<dieggsy> the fact that it's a hook is helpful, thanks
<_death> so if you C-h v lisp-indent-function RET you should get that
<dieggsy> sweet, yeah, i had done some gobbledygook with indentation ages ago. I actually used to use CL a good amount heh, it's just been a long time since i've revisited
<dieggsy> thanks for the suggestions, indentation seems to be working now
<dieggsy> And i think I found out what's wrong with my code. Every loop, i should be taking the previous value of j, but i'm also modifying j every loop and i think it's taking that. dunno, will investigate further
<_death> for x ... for y ... is sequential.. for parallel, use for x ... and for y ...
<_death> *and y
<dieggsy> _death: that's probably part of the problem, but i think i'm still running into what i described above ? if i starts at 1 and j starts at 2, the next time i should be 2 (old j) and j should be 3 (old i + old j)
<dieggsy> something about the ...then j ... and ...then (+ i j) ... logic isn't working out
<sm2n> (ql:quickload :mcclim) is failing for me on the package 3bz, with the error "The function SB-VM::MAKE-EA is undefined."
<jackdaniel> sm2n: it seems to be a problem with sbcl changing its internals (i.e downgrade sbcl). the real problem is a library that depends on the implementation internals
<jackdaniel> as of why mcclim depends on 3bz - I'd need to check
<_death> dieggsy: (loop for i = 1 then j #.(read) j = 2 then (+ i j) repeat 10 collect (list i j)) ;; evaluate two times; first enter FOR, then enter AND
<dieggsy> huh. that seems to go on forever
<_death> does it? what does (lisp-implementation-version) evaluate to
<dieggsy> _death: 2.1.1
<_death> well, assuming it's sbcl, maybe you didn't follow the instructions..
<_death> it's waiting for input
<sm2n> oh, there's already an issue
<sm2n> guess I need to update my ql dist
<dieggsy> _death: the problem statement is basically just sum all even fibonacci numbers until some limit FWIW. I can do it using a recursive function but i'm trying to figure it out using loop. not sure why input should be involved.
<_death> dieggsy: input is involved because I want to show you how FOR and AND differs, so the form I gave asks you what to use
<_death> dieggsy: it's that "#.(read)" part..
<dieggsy> _death: oh, no. i got you. I missed the 'ENTER' bit, you're right. my bad again. thanks, this is great and a rather fascinating way to demonstrate the difference heh
<dieggsy> what does #. do i n this case?
<_death> #. is read-time evaluation.. so while the form is read, it asks you for the value to use
<dieggsy> interesting. cool. and does indeed solve my problem in this case actually, i think i was just modifying bits of the code carelessly. thanks!
<sm2n> jackdaniel, it works now, thanks
<dieggsy> How uncommon or looked down upon is it to use keywords in loop e.g. (loop :for ... :then )
<dieggsy> it works, and it kind of separates the keywords with highlighting from the rest of the code. but is this considered bad style?
<_death> some people like it.. I don't
<sm2n> I prefer keywords for loop
<sm2n> don't really think there is consensus for this
<sm2n> doesn't matter though
f4r has joined #lisp
<mfiano> I like it because a) it highlights it differently which is (imo) easier to read, and b) it doesn't intern symbols into my package, which might make completion of similar symbols more annoying.
abrantesasf has joined #lisp
tophullyte has joined #lisp
abrantesasf has quit [Quit: Leaving]
<Josh_2> same
hjudt has joined #lisp
abrantesasf has joined #lisp
surabax has quit [Ping timeout: 265 seconds]
<fiddlerwoaroof> I don't like keywords because all the extra colons are too much syntax for me :)
<_death> :it :kinda :misses :a :point :of cl:loop
surabax has joined #lisp
<jmercouris> I think either way is OK and will alternate between the two in personal code
abrantesasf has quit [Quit: Leaving]
abrantesasf has joined #lisp
abrantesasf has quit [Client Quit]
abrantesasf has joined #lisp
theothornhill has joined #lisp
<_death> this reminds me that I should look into bb1's language frameworks again
theothornhill has quit [Ping timeout: 240 seconds]
<jasom> Let me know if this is too off-topic, but woud you call the traditional lisp implementation of incremental compilation a jit or not? To me, requiring explicit compilation disqualifies something as a JIT, so the traditional implementation is not, but a case could be made for e.g. SBCL where it will sometimes (previously always) compile at EVAL time.
<jasom> The 3 sides were roughly "All runtime compilation qualifies as JIT" "Compilation must be implicit to qualify as JIT" and "Some form of dynamic recompilation is necessary to qualify as JIT"
ebrasca has quit [Ping timeout: 252 seconds]
abrantesasf is now known as abrantes
<_death> I think the JIT buzzword was mainly associated with bytecode that gets compiled to native code
<_death> well, translated
<_death> that happened just before the program was run, on the target platform
shka_ has quit [Quit: Konversation terminated!]
<_death> then there was AOT that had the bytecode translated and the final result delivered, and dotnet had that GAC..
abrantes has quit [Quit: Leaving]
casual_friday has quit [Remote host closed the connection]
choegusung has joined #lisp
shka_ has joined #lisp
choegusung has quit [Client Quit]
casual_friday has joined #lisp
abhixec has joined #lisp
abrantesasf has joined #lisp
asarch has joined #lisp
<asarch> How do you destroy objects? I mean, I have (defun foo () ...) and then I use (foo ...) and then I no longer need foo. How would I deleted it? (setf foo nil)?
<lotuseater> i think (fmakunbound 'foo)
<phadthai> I almost read louseeater :)
<lotuseater> and giving the same function another symbol name eg ^ for expt does (setf (symbol-function '^) #'expt)
<lotuseater> okay good :)
<asarch> Thank you!
<phadthai> yes removing references to the object should allow it to eventually be freed, the time when it'll actually be done is implementation dependent however, with some implementations allowing to force a GC run or to explicitly free/destroy specific objects
<asarch> Thank you very much! :-)
<asarch> BTW, does SBCL have ed?
<Josh_2> ed is part of the spec
<lotuseater> ah yes, but don't know how to use
<asarch> How do you invoke it?
<asarch> ...in SBCL?
<Josh_2> Nah doesn't seem to work you are right
Lycurgus has joined #lisp
surabax has quit [Quit: Leaving]
<_death> (documentation 'ed 'function)
slyrus has quit [Remote host closed the connection]
Oladon has quit [Quit: Leaving.]
slyrus has joined #lisp
<_death> you can add a function that tells swank to tell slime to visit a file, perhaps at some position if source info is available for a function name you might give
slyrus_ has joined #lisp
<semz> swank:ed-in-emacs does that
<_death> cool.. I forgot about that
Josh_2 has quit [Remote host closed the connection]
<_death> the only issue there is that it returns NIL
slyrus has quit [Ping timeout: 260 seconds]
slyrus_ has quit [Ping timeout: 252 seconds]
<asarch> How do you personalize Slime?
<_death> maintain a fork?
mindCrime has joined #lisp
cage_ has quit [Quit: Leaving]
cage_ has joined #lisp
cage_ has quit [Remote host closed the connection]
<Lycurgus> sly has some things built in, eg. choosing the implementation
<asarch> I mean, its configuration file to add/remove features
<_death> there's your .emacs, and then there's .swank.lisp for the cl side
Lycurgus has quit [Quit: Exeunt]
<alanz> I have sly-edit-definition bound to "g d" via evil-mode. And it works for me, takes me to the source
<alanz> no custom config
gioyik has joined #lisp
<asarch> Thank you guys, thank you very much! :-)
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
rumbler31 has quit [Remote host closed the connection]
rumbler31 has joined #lisp
rumbler31 has quit [Remote host closed the connection]
rumbler31 has joined #lisp
Krystof has joined #lisp
theothornhill has joined #lisp
<asarch> Here in México a fellows stole a truck (a Hilux pickup) and in the truck there was an industrial device for X rays which uses the Iridium-192 radioactive element. As the meme says: "Kare-ra wa mō shinde iru" X-P
<Shinmera> Thought I'd also throw it in here that I just released a big update to my game, Kandria, for free: https://reader.tymoon.eu/article/395
<Shinmera> It's on topic as the game is written entirely in Lisp :)
attila_lendvai has quit [Ping timeout: 268 seconds]
ramHero has joined #lisp
Lord_of_Life_ has joined #lisp
<phoe> Shinmera: I really enjoy reading those, thanks for posting!
Lord_of_Life has quit [Ping timeout: 252 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<Shinmera> Glad to hear!
andrei-n has quit [Quit: Leaving]
gitgoood has quit [Ping timeout: 265 seconds]
abrantesasf has quit [Quit: Leaving]
jprajzne has quit [Remote host closed the connection]
jprajzne has joined #lisp
gitgood has joined #lisp
aeth has quit [Ping timeout: 240 seconds]
borodust has quit [Remote host closed the connection]
aeth has joined #lisp
theothornhill has quit [Remote host closed the connection]
Oladon has joined #lisp
asarch has quit [Quit: Leaving]
<contrapunctus> Shinmera: fever -> fewer?
<Shinmera> Fixed, thanks!
shka_ has quit [Ping timeout: 240 seconds]
<Nilby> TIL CEO of Netflix was once a Lisper, worked on a CLIM app
<lotuseater> uii
gaqwas has quit [Ping timeout: 252 seconds]
<lotuseater> and now that is full of so-called microservices
<Xach> Nilby: was once a coffee-fetching intern at symbolics, even
<mfiano> Co-CEO
<lotuseater> any lisp connected internship would be awesome, but no chance at all :(
borodust has joined #lisp
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pve has quit [Quit: leaving]
seok has joined #lisp
nckx is now known as jorts
<contrapunctus> lotuseater: looked here? https://github.com/azzamsa/awesome-lisp-companies
abhixec has quit [Ping timeout: 265 seconds]
<lotuseater> yes i know that repo, but nothing is in my reach or I'm not good enough anyway
<lotuseater> ok, 6 in germany, but maybe they can only use people with phd
<contrapunctus> lotuseater: I also know that Bevuta GmbH is the home of most of the CHICKEN Scheme devs, but it's not listed there yet
<lotuseater> ah chicken, one of the outstanding scheme implementations, right?
<Shinmera> I wish I had the money to hire another coder
<lotuseater> but maybe better in #lispcafe
<lotuseater> why that Shinmera?
<Shinmera> Why what?
<contrapunctus> lotuseater: one of the 'practical' ones.
Inline has quit [Ping timeout: 260 seconds]
<lotuseater> what you meant, hiring another coder
<Shinmera> because there's a lot of work and only me to do it at the moment?
<lotuseater> okay seems meaningful ^^
<lotuseater> here are many very intelligent people :)
rumbler31 has quit [Remote host closed the connection]
rumbler31 has joined #lisp
tophullyte has quit [Quit: Leaving]
<lotuseater> do you have an example for the kind or topic of work Shinmera?
<Shinmera> I posted an article about what I do just before
<lotuseater> oh sry, yes, i opened
Josh_2 has joined #lisp
<Josh_2> I have a dumped lisp image that depends on slynk, however when I try to connect to it using port forwarding sly always fails
<Josh_2> dw
<Josh_2> I got it :P
<Josh_2> I hadn't restarted bash after modifying my .bashrc
orivej has quit [Ping timeout: 265 seconds]
ebrasca has joined #lisp
anticrisis has joined #lisp
tophullyte has joined #lisp
contrapunctus has left #lisp ["Disconnected: Replaced by new connection"]
curtosis has joined #lisp
curtosis is now known as curtosis[away]
contrapunctus has joined #lisp
<Josh_2> Okay well its working but I get this error when I connect https://plaster.tymoon.eu/view/2385#2385
Kundry_W_ has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
c7s has quit [Ping timeout: 246 seconds]
hendursa1 has quit [Remote host closed the connection]
<Josh_2> Well idk
hendursa1 has joined #lisp
<_death> somewhere, maybe a dot file, you have a reference to this cl-asdf thing.. likely you want to get rid of it
curtosis[away] has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
mmontone has joined #lisp
* alanz slightly surprised that (car nil) gives nil
<lotuseater> alanz: it's surprising that (last '(1 2 3)) gives '(3) and not 3
<alanz> agree.
<Shinmera> It's the last(cons), not last(element) :shrug:
<alanz> I'm used to haskell, where things blow up if you use them not as expected.
<lotuseater> yes i see
<_death> but it is expected, by lispers
<lotuseater> haha me too alanz
<Shinmera> alanz: ? It's specificed that car/cdr of nil is nil.
<alanz> it was only unexpected to me, I had the wrong expectation
<lotuseater> so we don't have to struggle with monadic stuff
mindCrime has quit [Ping timeout: 252 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
<alanz> you get used to the monadic stuff after a while. Same with rust and its borrow checker.
<lotuseater> yes
<alanz> I think every language has things that eventually you internalise and then don't even notice what you are doing. Landmines that you dodge without thinking.
entel has joined #lisp
<lotuseater> like (format nil "~a" nil) => nil and not ""
<alanz> yes.
<lotuseater> or EVENP, ODDP just work on integers, otherwise throws type error
<alanz> I have to say, I am pretty impressed with the feedback SBCL gives about code, when there are problems
<_death> eh? (format nil "~A" nil) => "NIL"
<lotuseater> but the most stuff is very consistent, eg support for 0-dimensional arrays
<lotuseater> oh damn _death, yes you're right :D
<_death> these things usually have reasons.. which sometimes (oftentimes) are good
wooden has quit [Read error: Connection reset by peer]
<_death> for example, getting the last cons is useful if you want to modify it
<_death> you can also give an additional argument, to get the nth cons from the end
<lotuseater> yes most stuff has it's reasons in the spec :)
skapata has joined #lisp
wooden has joined #lisp
wooden has quit [Changing host]
wooden has joined #lisp
<lotuseater> haha i changed PRINT-OBJECT with eql for NIL to "", funny
<_death> well, unfortunately the spec doesn't have a Rationale section with all the history :).. but we do have cl-su-ai and c.l.l for example
<lotuseater> oh what's that?
<_death> what's what
<lotuseater> cl-su-ai and c.l.l
<ebrasca> Why?
<_death> cl-su-ai is a mail archive containing some discussions from the CL standardization effort https://cl-su-ai.cddddr.org/
<moon-child> c.l.l is the comp.lang.lisp newsgroup
<moon-child> (not deceased, but probably on its last elbows)
<lotuseater> ah
<lotuseater> yes i found the cddddr site :)
<_death> I put it and some other archives here https://github.com/death/gnus-friendly-archives
heisig has quit [Quit: Leaving]
abhixec has joined #lisp
Nilby has quit [Ping timeout: 258 seconds]
gzj has joined #lisp
renzhi has quit [Ping timeout: 258 seconds]
hjudt has quit [Ping timeout: 252 seconds]
<ebrasca> wow
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
curtosis has joined #lisp
curtosis has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
mindCrime has joined #lisp
JohnnyMonoxide has joined #lisp
msk has quit [Remote host closed the connection]
msk has joined #lisp
JohnnyMonoxide has left #lisp [#lisp]
amerigo has joined #lisp
curtosis has joined #lisp
igemnace has joined #lisp
karstensrage has joined #lisp
galex-713 has quit [Ping timeout: 260 seconds]
kevingal has quit [Ping timeout: 260 seconds]
galex-713 has joined #lisp
curtosis has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
rumbler31 has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Kundry_W_ has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 265 seconds]
bjorkintosh has quit [Ping timeout: 258 seconds]
random-nick has quit [Ping timeout: 260 seconds]
gzj has quit [Remote host closed the connection]
gzj has joined #lisp
xsperry has quit []