phoe changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.16, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
smasta has joined #lisp
karlosz has quit [Quit: karlosz]
xkapastel has joined #lisp
ltriant has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
Jesin has quit [Quit: Leaving]
Jesin has joined #lisp
impulse has quit [Ping timeout: 250 seconds]
t58_ has joined #lisp
slyrus_ has joined #lisp
X-Scale` has joined #lisp
mrcom has quit [Read error: Connection reset by peer]
t58 has quit [Read error: Connection reset by peer]
myrkraverk has quit [Read error: Connection reset by peer]
slyrus__ has quit [Remote host closed the connection]
Josh_2 has quit [Remote host closed the connection]
patrixl has quit [Remote host closed the connection]
aindilis has quit [Write error: Broken pipe]
patrixl has joined #lisp
X-Scale has quit [Ping timeout: 245 seconds]
X-Scale` is now known as X-Scale
keep_learning_M has quit [Ping timeout: 255 seconds]
t58_ has quit [Quit: Leaving]
t58 has joined #lisp
mrcom has joined #lisp
keep_learning_M has joined #lisp
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 245 seconds]
Lord_of_Life_ is now known as Lord_of_Life
k-hos has quit [Quit: blap]
atgreen has quit [Remote host closed the connection]
atgreen has joined #lisp
DGASAU has quit [Ping timeout: 264 seconds]
impulse has joined #lisp
t58 has quit [Quit: mind gone.]
karlosz has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
jameser has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
dale has quit [Quit: dale]
mindCrime has joined #lisp
shifty has joined #lisp
igemnace has quit [Read error: Connection reset by peer]
igemnace_ has joined #lisp
karlosz has quit [Quit: karlosz]
montezad has joined #lisp
montezad has quit [Quit: montezad]
mindCrime has quit [Ping timeout: 245 seconds]
<moldybits> is it possible for a method to specialize on two different types for the same argument? ie, that it has to be a subtype of both types specified, to be considered a match.
mindCrime has joined #lisp
atgreen has quit [Remote host closed the connection]
atgreen has joined #lisp
atgreen has quit [Ping timeout: 250 seconds]
<White_Flame> methods specialize on classes, not types. types have (or <type1> <type2>)
<White_Flame> (iirc)
<Bike> ofc you can just define a new class that has both as superclasses, and have your actual class be a subclass of that one
<White_Flame> note to self: do not recompile with unfinished code (defparameter *tags* (loop ))
mindCrime has quit [Ping timeout: 246 seconds]
ebrasca has quit [Remote host closed the connection]
<aeth> moldybits: If you must dispatch on types instead of classes, you can use a library like specialization-store, but this dispatch will be slower than even method dispatch is unless it can be inlined. https://github.com/markcox80/specialization-store/
<aeth> There might be a few other ways to do it, other than the obvious manual way of having a function with a TYPECASE in it.
<White_Flame> or the obvious manual way of having 2 defmethods which call the same shared function
<White_Flame> passing the parameters through
<White_Flame> or the obvious Lisp way of rolling your own CLOS dispatch replacement ;)
<aeth> White_Flame: That's an interesting idea for how to implement this behavior in a define-method extension to defmethod. Perhaps inlining that function.
<aeth> White_Flame: Of course, perhaps the proper way to do define-method is to heavily MOP it.
dale has joined #lisp
<moldybits> ah, classes. Bike's suggestion sounds like the right one.
<moldybits> the method is object-open and the argument is an instance of door inhereting from object, openable-mixin, and lockable-mixin
xkapastel has quit [Quit: Connection closed for inactivity]
<moldybits> the problem is when something is lockable but not openable. the object-open method specializing on lockable-mixin will still match
wrycode has left #lisp [#lisp]
libertyprime has joined #lisp
<moldybits> hm. a cond actually seems more appropriate than CLOS in this case.
techquila has joined #lisp
techquila has quit [Remote host closed the connection]
techquila has joined #lisp
<aeth> moldybits: cond or typecase?
Autolycus has joined #lisp
jameser has quit [Quit: Textual IRC Client: www.textualapp.com]
<moldybits> i probably shouldn't have lockable and openable be mixins. they could go into a list as properties.
<moldybits> either i could have a lock in a list of properties, or i could have a locked-p slot, and check for the existence of that slot. hm.
<aeth> moldybits: wouldn't (subtypep (type-of o) 'lockable-mixin) also work like this? (typep o 'lockable-mixin)
<aeth> e.g. (typep 42 'number)
<moldybits> oh.
<aeth> If that works (not sure) then you can just use typecase, and even though that will nest in more conditions, it could potentially be more efficient.
<moldybits> seems to work. thanks :)
<aeth> you're welcome
<aeth> I write lots of code like that, where I later find a simplification
<moldybits> i'm slowly reading through Keene's OOP in CL book, and i wanted to try applying CLOS to a text game.
<aeth> moldybits: I wouldn't use slot-value... accessors are a better in just about every way afaik, including performance, surprisingly.
<aeth> I would also use with-accessors to make the logic easier to read
Autolycus has quit []
caltelt_ has joined #lisp
<moldybits> hm. there are so many ways of implementing this, and i'm having trouble weighing them against each other.
<aeth> moldybits: If you're always going to call SAY, I would have one SAY at the bottom and build it at the top. You can do this with multiple-value-binds and values. So (multiple-value-bind (status text) ...) and e.g. inside the conditional (values :success "opened ~A")
<aeth> Unless, of course, SAY is a macro instead of a function
<aeth> Then you'd just have one (say status text o) at the bottom and the flow is a lot cleaner
<aeth> Combine that with with-accessors instead of slot-value and the function should be a lot more readable imo
karlosz has joined #lisp
<aeth> Using lots of internal bindings also has the advantage that you can easily spin off helper functions if the function grows too big
<moldybits> hm. that's an interesting pattern.
Bike has quit [Quit: Lost terminal]
warweasle has quit [Quit: tired]
patlv has quit [Quit: patlv]
smasta has quit [Ping timeout: 246 seconds]
smasta has joined #lisp
gravicappa has joined #lisp
smasta has quit [Ping timeout: 250 seconds]
<moldybits> with-accessors will come in handy. :)
aeth has quit [Ping timeout: 255 seconds]
aeth has joined #lisp
igemnace_ is now known as igemnace
pankajgodbole has joined #lisp
smasta has joined #lisp
rozenglass has joined #lisp
igemnace_ has joined #lisp
igemnace has quit [Ping timeout: 246 seconds]
khisanth_ has quit [Ping timeout: 246 seconds]
moldybits has quit [Quit: WeeChat 2.4]
moldybits has joined #lisp
vlatkoB has joined #lisp
impulse has quit [Ping timeout: 246 seconds]
impulse has joined #lisp
dale has quit [Quit: dale]
khisanth_ has joined #lisp
rumbler31 has quit [Remote host closed the connection]
smasta has quit [Ping timeout: 246 seconds]
<beach> Good morning everyone!
smasta has joined #lisp
<beach> jackdaniel: Maybe databases don't have to imply copying. But it seems to me that current technology requres it.
<beach> p_l: I have not seen GemStone/S. Looking now.
DGASAU has joined #lisp
smasta has quit [Ping timeout: 255 seconds]
<beach> p_l: I don't understand half of the words on their web page.
froggey has quit [Ping timeout: 250 seconds]
froggey has joined #lisp
Arcaelyx has quit [Quit: Textual IRC Client: www.textualapp.com]
Inline has quit [Quit: Leaving]
jprajzne has joined #lisp
parjanya has quit [Ping timeout: 258 seconds]
dddddd has quit [Remote host closed the connection]
<no-defun-allowed> I found a very nice "dictionary" entry on the topic of business objects. It seems to be some kind of way to generate reports without having to know the internal structure of a database?
<no-defun-allowed> Or, rather, it's a system of representing orders and reports as objects somehow. Never mind, I don't understand that either.
<beach> Heh.
<no-defun-allowed> Scrolling back, I don't think it would be legal to use the source code if it was reachable from inside the environment, especially for developing competing products.
pankajgodbole has quit [Ping timeout: 246 seconds]
asarch has joined #lisp
libertyprime has quit [Ping timeout: 250 seconds]
libertyprime has joined #lisp
sauvin has joined #lisp
bitch has quit [Ping timeout: 250 seconds]
liangchao has joined #lisp
bitch has joined #lisp
libertyprime has quit [Ping timeout: 245 seconds]
sr5h has joined #lisp
<liangchao> test
orivej has joined #lisp
<liangchao> is any one work with lisp or its dialects?
libertyprime has joined #lisp
<beach> Sure.
asarch has quit [Quit: Leaving]
<beach> liangchao: This channel is dedicated to Common Lisp, so that's the only dialect discussed here.
libertyprime has quit [Ping timeout: 246 seconds]
ltriant has quit [Quit: leaving]
<splittist> Good morning.
<beach> Hello splittist.
<loke> I have no drive nor inspiration right now
<loke> It's incredibly annoying
<beach> It happens.
<beach> Start a new project.
<loke> I'm tempted to do the GTK+ backend for clim
<beach> Sure. Anything that will give you your inspiration back.
<loke> There have been requests for Climaxima on Windows.
<beach> That's good I guess.
<loke> The only reasonable way forward if _I_ want to help that happen, is to implement a GTK+ backend (since GTK+ works on Windows). I am not going to do any Windows development.
<loke> Ideally, someone would make a native Windows backend of course.
<beach> What about the SDL idea?
<splittist> How about an Electron backend? (:
<loke> beach: Well, that's a possibility.
<loke> However, proper native integration would be slightly harder. For example, font management can't use the operating-system provided rendering engine (SDL has its own). Also things like cut&paste will not work as well.
<loke> If I use GTK+, then the graphics rendering will be implemented by Cairo, which is _very_ nice.
<loke> splittist: Actually, wasn't a web-based backend being discussed at some point?
<beach> I think someone even wrote one at some point.
enPee has joined #lisp
<splittist> Extensive commentary on the process of writing a backend would make subsequent backends easier and, therefore, more likely. (Since there is no consensus on the 'best' gui library.)
caltelt_ has quit [Ping timeout: 245 seconds]
scymtym has joined #lisp
rumbler31 has joined #lisp
igemnace_ is now known as igemnace
rumbler31 has quit [Ping timeout: 250 seconds]
nowhereman has joined #lisp
powerbit has joined #lisp
t3rtius has joined #lisp
t3rtius has quit [Quit: leaving]
bgardner has quit [Ping timeout: 244 seconds]
flazh has quit [Ping timeout: 250 seconds]
angavrilov has joined #lisp
t3rtius has joined #lisp
sr5h has quit [Remote host closed the connection]
__jrjsmrtn__ has joined #lisp
rozenglass has quit [Ping timeout: 246 seconds]
rozenglass has joined #lisp
t3rtius has quit [Quit: leaving]
karlosz has quit [Quit: karlosz]
fivo has joined #lisp
hhdave has joined #lisp
bgardner has joined #lisp
hhdave has quit [Ping timeout: 245 seconds]
nowhereman has quit [Ping timeout: 246 seconds]
hhdave has joined #lisp
hhdave_ has joined #lisp
<White_Flame> Is there some clever code out there to sign-extend a small integer?
<White_Flame> of known bit-length, of course
<shka__> sign-extend?
<shka__> White_Flame: i like setf ldb
hhdave has quit [Ping timeout: 245 seconds]
hhdave_ is now known as hhdave
<shka__> or dpb, it is the same thing
<White_Flame> how do you fiddle negatives? first test the high bit then do an optional subtraction?
<beach> White_Flame: Can you give an example of what you want?
<White_Flame> given a 10-bit signed number, make a fixnum of equivalent numeric value
<shka__> White_Flame: take the high bit from the integer, dpb into result, take other bits, dpb into result
<beach> And how is that 10-bit signed number represented?
<shka__> done
<White_Flame> 2s complement
<beach> Is it a Common Lisp integer?
<White_Flame> yes, say 1024 in input 10-bit form should turn into -1024 fixnum
<beach> Oh, you have a positive number, and you want to negate it?
<White_Flame> it arrives as a LDB field result
<White_Flame> 1025 should turn into -1023, etc
heisig has joined #lisp
<beach> I see.
<White_Flame> there's some fancy-pants C code that can do it for a fixed register width, but CL doesn't have that notion
<White_Flame> I mean, the naive transformation is pretty straightforward, but as this is in the middle of an emulator, I'd want it to be pretty fast if possible
<White_Flame> and without branching decisions if possible
<shka__> hmm
<shka__> White_Flame: and what should happen with -1024?
<White_Flame> I do have a ffi union that casts between float, double, signed & unsigned ints, char array, etc that I use for float conversions, but the code ends up being surprisingly large
<White_Flame> shka__: the input is an unsigned integer from 0-1023
<White_Flame> that needs to be treated as a signed 10-bit number, resulting in that numeric interpretation
<beach> Why does 1025 turn into -1023?
<beach> 1025 is not a 10-bit number, is it?
<White_Flame> erm, wait, I'm shooting off the cuff a bit quick. For a 10-bit value, it's -512 to +511 I guess
bgardner has quit [Ping timeout: 245 seconds]
<beach> Yeah.
spoeplau has joined #lisp
<beach> ( am thinking something like (+ (lognot 2047) x)
<White_Flame> I'll play with it, just curious if there was some well-known algorithm for non-fixed-width values
<White_Flame> erm, non-fixed-precision variables
bgardner has joined #lisp
scymtym has quit [Ping timeout: 252 seconds]
<White_Flame> well, that was actually pretty simple
<White_Flame> (- x (ash (logand 512 x) 1))
q3d has joined #lisp
<White_Flame> and nice & tight with just 1 type declaration: https://pastebin.com/EK5RjW4S
bgardner has quit [Ping timeout: 246 seconds]
bgardner has joined #lisp
bgardner has quit [Ping timeout: 246 seconds]
orivej has quit [Ping timeout: 246 seconds]
shifty has quit [Ping timeout: 244 seconds]
q3d has quit [Ping timeout: 256 seconds]
bgardner has joined #lisp
enPee has quit [Ping timeout: 256 seconds]
pjb has quit [Ping timeout: 252 seconds]
scymtym has joined #lisp
libertyprime has joined #lisp
<p_l> beach: haven't done much with it, but GemStone/S is essentially a smalltalk environment where some objects are persisted transparently + there are interfaces for indexing them
adip has joined #lisp
<adip> Hi, I'm trying to rewrite funciton in lisp (sbcl). I'd need a for loop like this one for(int i=3; i<x/2; i+=2)
<adip> I've read few webpages about loops avalible in common lisp, but I can't find something similar.
<adip> Did I miss something, or do I have to write some monster out of simple loops and IFs?
pjb has joined #lisp
<p_l> adip: LOOP can do what you want easily
<p_l> a more primitive, for-like approach might be DO
adip has quit [Read error: Connection reset by peer]
m00natic has joined #lisp
adip has joined #lisp
adip has quit [Read error: Connection reset by peer]
kslt1 has joined #lisp
atgreen has joined #lisp
Ukari has joined #lisp
Achylles has joined #lisp
gareppa has joined #lisp
gareppa has quit [Max SendQ exceeded]
gareppa has joined #lisp
scymtym has quit [Ping timeout: 250 seconds]
brundleticks has joined #lisp
brundleticks has quit [Quit: Leaving]
<beach> p_l: I see. Thanks.
<didi> Bummer. In FIVEAM, I can't pass FLET functions inside tests.
<beach> Sounds like you need to write another test framework.
<p_l> beach: while there are non-Smalltalk interfaces to GemStone, the database always provides the programming model of "just write smalltalk in the same image and enjoy persistence"
<beach> p_l: So when you quit the system and start it again, the objects are still there?
<didi> beach: "yay"...
flazh has joined #lisp
<p_l> beach: yes. I believe that due to real world-friction, some of it might depend on whether something is marked as persistent or not, but references etc. remain valid
<beach> Interesting.
<p_l> I'll have to experiment with it further, it's a bit interesting :)
<p_l> (though I also like SQL databases since I stumbled into better understanding of SQL)
<beach> I am wondering whether SQL can be used with universal persistence.
<beach> Maybe some operations won't make sense.
brundleticks has joined #lisp
amerlyq has joined #lisp
<p_l> beach: all do
<p_l> there are some things that would make *less* sense, but they already make less
<p_l> (cursors)
<beach> I see.
<p_l> cursors are essentially indexes to a result set array
<p_l> I consider them least SQL-like part of SQL because they explicitly deal with "array" instead of a set
kslt1 has quit [Remote host closed the connection]
didi has left #lisp ["O bella ciao bella ciao bella ciao, ciao, ciao."]
<beach> Hmm, OK.
<p_l> by itself SQL is mostly a bit COBOL-esque language for set manipulation, and doesn't really require any special relationship with disk and the like
<p_l> but the quality of education about it is dismal and I spent a long time fixing issues caused by it :( :(
<p_l> maybe not as bad as what typical student takes away about lisp from typical CS course, but...
wigust- has joined #lisp
<beach> I did learn some SQL in the past. I should look at its definition at some point.
wigust has quit [Ping timeout: 246 seconds]
dddddd has joined #lisp
<p_l> it can get pretty nice when approached the right way, IMO
atgreen has quit [Ping timeout: 240 seconds]
<p_l> and unlike typical language, it even has it's CL:DISSASSEMBLE equivalent! ;)
<White_Flame> yeah, I work with a really good SQL guy. I personally have never dug too much into it
<White_Flame> I'm amazed at the horror stories he tells me, compared to what I'm used to seeing from him
<p_l> I don't consider myself good at it, but if your data can be viewed as set relations, it's pretty amazing
<p_l> White_Flame: there's a lot of very bad database work
<p_l> often that database work is on SQL because it kinda won for a long time over some other options
rozenglass has quit [Read error: Connection reset by peer]
ebrasca has joined #lisp
orivej has joined #lisp
__jrjsmrtn__ has quit [Read error: Connection reset by peer]
no-defun-allowed has quit [Ping timeout: 240 seconds]
dtw has quit [Ping timeout: 240 seconds]
Jachy has quit [Ping timeout: 252 seconds]
Gnuxie[m] has quit [Ping timeout: 250 seconds]
akanouras has quit [Ping timeout: 252 seconds]
LdBeth has quit [Ping timeout: 264 seconds]
Manny8888 has quit [Ping timeout: 264 seconds]
illandan[m] has quit [Ping timeout: 250 seconds]
xylef has quit [Ping timeout: 250 seconds]
sielicki has quit [Ping timeout: 252 seconds]
Woazboat has quit [Ping timeout: 252 seconds]
colelyman has quit [Ping timeout: 252 seconds]
juristi has quit [Ping timeout: 264 seconds]
djeis[m] has quit [Ping timeout: 268 seconds]
gxt has joined #lisp
irdr_ has quit [Remote host closed the connection]
irdr has joined #lisp
gxt has quit [Ping timeout: 252 seconds]
vlatkoB_ has joined #lisp
nwoob has joined #lisp
vlatkoB has quit [Ping timeout: 246 seconds]
nwoob has quit [Ping timeout: 255 seconds]
patlv has joined #lisp
dgtlcmo has joined #lisp
_patlv has joined #lisp
Lord_of_Life has quit [Ping timeout: 250 seconds]
Lord_of_Life has joined #lisp
patlv has quit [Ping timeout: 250 seconds]
_patlv is now known as patlv
q3d has joined #lisp
warweasle has joined #lisp
<warweasle> Good morning.
<beach> Hello warweasle.
Krystof has quit [Ping timeout: 252 seconds]
selwyn has joined #lisp
<warweasle> beach: I got to use lisp yesterday.
ym555 has joined #lisp
libertyprime has quit [Ping timeout: 246 seconds]
<Xach> warweasle: sounds good
<beach> warweasle: You don't use it every day then?
jprajzne has quit [Quit: Leaving.]
Bike has joined #lisp
<warweasle> beach: No. I sometimes need to manipulate large amounts of data and it's very useful for that and templating my applications.
<warweasle> Although at home I mostly use Unreal Engine. I want to use lisp to prototype the story part of my game.
lucasb has joined #lisp
<beach> I see.
nowhereman has joined #lisp
<warweasle> beach: If you could make a quality game engine in lisp, I would appreciate it.
jayemar has joined #lisp
shifty has joined #lisp
<beach> warweasle: I don't think I am the right person for that.
scymtym has joined #lisp
<selwyn> warweasle: i am interested in using Clasp - a CL implementation - together with UE4 to allow one to do game development interactively in Lisp using that engine
<warweasle> selwyn: That will be awesome. I've decided I need to make a game and not engine stuff so I've taken a different path. I thought lisp could be a secret weapon in that but it hasn't panned out.
<selwyn> warweasle: we are in nearly the same situation then. making a high-quality game engine is hard!
<warweasle> selwyn: I spent a decade trying.
<mfiano> warweasle: That's because writing a game is a lot of work. Wiriting a professional game requires hundreds of people. With Lisp, most of us to prefer to work alone, or at least with a very low bus factor.
<mfiano> I guess code is a projection of one's own mind, and macros let us change the way we think about code, so it is only natural to customize the language for yourself.
<warweasle> mfiano: I think that's part of the lisp curse. Also, lisp is pretty powerful. It's usually easier to just do something than delegate.
<mfiano> That power is a big reason why it's so personal
<selwyn> warweasle: i have been playing with and can recommend https://github.com/Shirakumo/trial
nowhereman has quit [Ping timeout: 250 seconds]
<warweasle> selwyn: BTW: https://github.com/BradWBeer/clinch
Josh_2 has joined #lisp
<warweasle> Looks like you've already made it further than I did.
<mfiano> psilord and I have been writing a game engine comparable to Unity with CL for the last several years. It may be ready for simpler games soon.
dgtlcmo has quit [Ping timeout: 250 seconds]
Ukari has quit [Remote host closed the connection]
<selwyn> warweasle: thanks for the link. but I am not the author of trial if that's what you mean :)
<mfiano> Trial is Shinmera's pet
<warweasle> Ah.. There is much happening anymore. It's impossible to keep up with it all.
<mfiano> Reminds me, I never mentioned the game jam here yet
<mfiano> I scheduled the game jam a few months ago, but it takes place next week. Hope to see some serious CL participation this time
<warweasle> Is there a gensym for keywords?
dale_ has joined #lisp
<mfiano> a gensym is an uninterned symbol
dale_ is now known as dale
<warweasle> mfiano: Well, I need a random keyword generator.
<warweasle> I figured there was already one in lisp, and likely is but I can roll my own.
<mfiano> What is your use case. That sounds odd you would need them to be keywords
<warweasle> I have dialogue blocks and I need to give them names to keep them in a database.
<mfiano> Why must they be keywords? You can key by a gensym in a hash table for example and look it up with the same symbol pointer
wxie has joined #lisp
<warweasle> mfiano: Oh, I guess you are correct. I guess I just like keywords?
mindCrime has joined #lisp
<warweasle> well, boss needs me to play hero. I gotta run.
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
FreeBirdLjj has joined #lisp
gareppa has quit [Quit: Leaving]
dgtlcmo has joined #lisp
FreeBirdLjj has quit [Ping timeout: 240 seconds]
aindilis has joined #lisp
moei has joined #lisp
xkapastel has joined #lisp
warweasle has joined #lisp
<warweasle> Back.
sjl_ has joined #lisp
<mfiano> Hello again
<moldybits> in the beginning of Object-Orient Programming in Common Lisp by Sonja Keene, her :after methods assume that :before and primary methods will throw exceptions on errors, so when you reach the :after methods the preceding methods can be presumed to have succeeded. is this the usual approach?
<mfiano> warweasle: So if you just like keywords, nothing is preventing you from using a serial number affixed onto some prefix. That'll at least play nicer with editor completion than random symbol names.
<mfiano> something like (let ((serial 0)) (defun make-serial-keyword (prefix) (alexandria:format-symbol :keyword "~a~d" prefix (incf serial))))
<warweasle> Cool, thank you!
<heisig> moldybits: That sounds reasonable.
<beach> Reasonable, yes, but it is not the only way to do it.
<moldybits> i suppose in cl, you usually throw a condition on errors rather than returning some error value ...
<beach> moldybits: Yes, except that the term is "signal" a condition. Not "throw".
<moldybits> beach: but if you don't throw something, you can't abort the chain of methods, can you?
<moldybits> ok :)
<selwyn> warweasle: would you recommend unreal engine for indie development? Also we might continue our conversation at #lispgames it's a bit offtopic
<dlowe> Annoyingly, THROW means another non-local control mechanism in CL
<dlowe> one that I've never used nor seen used
<dlowe> I'm sure someone has, though
wxie has quit [Ping timeout: 268 seconds]
<selwyn> heisig: do your non-lispy colleagues use cl4py to experiment with lisp and petalisp?
<dlowe> since pretty much every CL function signals on an error rather than throwing, I assume it was bolted on as a concession
<beach> moldybits: That would be the good way to abort the chain, yes.
<Bike> THROW probably predates the condition system
<beach> It does.
<beach> It was in Maclisp as I recall.
<Bike> figures
<dlowe> MacLiiiiisp *shakes fist*
<Bike> one place throw/catch is used is the CMU definition of format, used by ecl and sbcl, to implement ~^
<Xach> hunchentoot uses throw/catch to short-circuit handlers
<heisig> selwyn: Not yet. The cl4py project is just a few weeks old. But that is the reason why I wrote it.
<heisig> selwyn: But one of my colleagues plans to use it now.
<heisig> I don't have any use for cl4py myself. I can't even understand why anyone would want to use Python :)
<beach> dlowe: Hey, Lisp was there first.
<dlowe> There are some definite things I like about Python that I miss in CL. I'm not going to enumerate them here, however.
<p_l> dlowe: do you have the list somewhere?
* p_l will admit to hating Python even more after having to dig into internals once
<dlowe> p_l: no. Good idea for a blog entry, though.
* p_l makes encouraging noises
<warweasle> selwyn: I like Unreal a lot. I think it's pretty solid. I don't know much about Unity, bucause I don't like C#.
<warweasle> (Sorry, I'm at work jumping between jobs.)
<p_l> from my understanding UE4 is the half-ton gorrilla which is however reliable base to build everything (even pseudo flight sim...)
<warweasle> p_l: It's big and will take a while to learn.
<dlowe> heisig: I'm curious as to what lisp library functionality isn't already implemented in python
<dlowe> heisig: cool project, though
<p_l> warweasle: yes. But it seems to handle pretty much everything one needs by now
<p_l> dlowe: my first guess would be speed and parallel/concurrent processing
<warweasle> I gave a talk on a locomotion system (code) I bought. It's here if you want to see it: https://youtu.be/5ESXDHUMFsc
<selwyn> i recall being tempted by Hy before deciding on Common Lisp, solely due to the comfort of having Python available. a great strength of cl4py may be that it leads python devs towards common lisp as opposed to settling at a lispy halfway point
<selwyn> warweasle: thanks for the link
dxtr has quit [Ping timeout: 258 seconds]
<p_l> dlowe: but pretty much, if your code starts being cpu-bound in any reasonable way (including "our I/O is fast enough to not wait on it") Python starts to stink badly
<p_l> and I mean really, really badly
<warweasle> selwyn: "And remember to slam that subscribe button. And the like button. And the bell! And the big "x" in the upper right corner!"
<selwyn> haha
<dlowe> p_l: sure, but I'm interested in the specific motivation, because there's probabably a C library out there too that does most everything currently implemented lisp libraries are doing
<p_l> this got hammered into me when troubleshooting an issue in production system let me down the rabbit hole of how the processing script that was slowing us down (but maxing single core), which was essentially scapy parsing a pcap file into CSV, spent pretty much all the time in Python bytecode interpreter
<p_l> dlowe: while Pyrex (or whatever it's called now, Cython?) helps with integrating C libs, it's not trivial from my memories
<p_l> so having a fast higher level language could help
<dlowe> this got hammered into me with Ruby, when I made a 3d engine intended to use Ruby scripting, and adding acceleration to the velocity in Ruby took more time than the rendering and sorting back-to-front of >100k polys
<Bike> uh, wow.
<p_l> well, travelling through the method call chain can be long...
<selwyn> dlowe: a python fanatic tells me that Python lacks adequate symbolic computation libraries (sympy is not good enough apparently)
<heisig> dlowe: Python is not well suited for anything that needs to run fast (or reliable). Python C extensions are ... ugly. So cl4py certainly has its use.
<heisig> dlowe: Funny example - you can call cl.compile from Python to have JIT compilation and cl.disassemble to inspect it.
t58 has joined #lisp
<heisig> selwyn: Yes, sympy is a mess. I'd love to see a cl4py interface to Maxima.
<dlowe> heisig: I was just wondering if there was a specific library that motivated this
<heisig> dlowe: In that case, Petalisp and Maxima.
oystewh has quit [Quit: .]
cl-arthur has joined #lisp
Inline has joined #lisp
_patlv has joined #lisp
q3d has quit [Ping timeout: 256 seconds]
wilfredh has joined #lisp
ym555 has quit [Ping timeout: 264 seconds]
ym555_ has joined #lisp
ym555_ has quit [Ping timeout: 252 seconds]
shka_ has joined #lisp
random-nick has joined #lisp
_patlv has quit [Ping timeout: 268 seconds]
heisig has quit [Quit: Leaving]
* splittist loves the cl4py bird!
<dlowe> yeah, a good logo is a must for project longevity
eschatologist has quit [Ping timeout: 258 seconds]
rippa has joined #lisp
rumbler31 has joined #lisp
lumm has joined #lisp
eschatologist has joined #lisp
<fivo> Is it possible in CLOS to instantiate an instance of subclass B from an instance of superclass A.
<fivo> I mean without writing something like
<fivo> (make-instance 'B :slot1 (slot1-accessor A) .....)
<p_l> Direct subclasses using MOP, then once you have the class pass it to make-instance?
<shka_> fivo: not really, you can add defgeneric cloning-information to make it less annoying
jmercouris has joined #lisp
<shka_> well, or at least i don't think that this is possible
<beach> fivo: You may want to use CHANGE-CLASS.
milanj has joined #lisp
rumbler31 has quit [Remote host closed the connection]
<fivo> beach: CHANGE-CLASS only solves it if I don't inherit mulitple classes
<Bike> which, what, you'd provide multiple superclass instances and get a copy combining all of them?
<fivo> yes
<Bike> there's definitely nothing built in for that.
<Bike> you'd have to specify some stuff, like what to do if the superclasses share a slot but have different values in it.
<p_l> Wouldn't a custom metaclass work?
<shka_> overkill and not needed
milanj has quit [Ping timeout: 255 seconds]
<scymtym> this sounds like a prototype-based object system. maybe https://github.com/sbcl/specializable/blob/master/examples/prototype-specializer.lisp is relevant
<jackdaniel> can anyone suggest some resource which provides some background knowledge about writing benchmarks?
ym555_ has joined #lisp
<shka_> heh, you are seriously making it more complex then it needs to be
* jackdaniel ?
<selwyn> on that note, can someone suggest a resource that provides background knowledge about writing unit tests
patlv has quit [Quit: patlv]
<Fade> richard gabriel wrote an article some time ago about implementing his benchmarks, but I"m having trouble finding it.
jmercouris has quit [Ping timeout: 268 seconds]
<housel> Fade: You mean http://rpgpoet.com/Files/Timrep.pdf ?
<Fade> ah, here. sorry pdf link: https://www.dreamsongs.com/Files/Timrep.pdf
<jackdaniel> thank you, I'll read it
<Fade> housel, indeed.
<housel> The paper cited in https://github.com/smarr/are-we-fast-yet is also useful
rwlisp has joined #lisp
okeg has joined #lisp
nowhereman has joined #lisp
Ukari has joined #lisp
spoeplau has quit [Ping timeout: 255 seconds]
hhdave has quit [Ping timeout: 245 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
warweasle has quit [Quit: later]
nowhereman has quit [Ping timeout: 268 seconds]
nowhereman has joined #lisp
m00natic has quit [Remote host closed the connection]
selwyn has quit [Remote host closed the connection]
Josh_2 has quit [Ping timeout: 250 seconds]
fanta7531 has joined #lisp
nowhereman has quit [Ping timeout: 252 seconds]
xkapastel has joined #lisp
knicklux has joined #lisp
karlosz has joined #lisp
LiamH has joined #lisp
nanoz has joined #lisp
amerlyq has quit [Ping timeout: 250 seconds]
amerlyq has joined #lisp
atgreen has joined #lisp
mrak has joined #lisp
nowhereman has joined #lisp
fivo has quit [Quit: WeeChat 1.9.1]
Quasus has joined #lisp
nowhereman has quit [Ping timeout: 252 seconds]
karlosz has quit [Quit: karlosz]
gxt has joined #lisp
karlosz has joined #lisp
warweasle has joined #lisp
karlosz has quit [Quit: karlosz]
atgreen has quit [Read error: Connection reset by peer]
atgreen_ has joined #lisp
Ukari has quit [Remote host closed the connection]
Ukari has joined #lisp
<moldybits> does this function have a name, and does it exist? (f '(1 2 3)) => ((1 2) (2 3) (3 1))
ym555_ has quit [Ping timeout: 250 seconds]
ym555_ has joined #lisp
<Bike> you're collecting all the length 2 combinations
<Bike> (let ((c nil)) (alexandria:map-combinations (lambda (x) (push x c)) '(1 2 3) :length 2) c)
<Bike> verbose, admittedly
Achylles has quit [Ping timeout: 252 seconds]
<pjb> Perhaps he's collecting successive pairs cycling back. (defun f (list) (loop for (a b) on list collect (list a (or b (first list))))) (f '(1 2 3)) #| --> ((1 2) (2 3) (3 1)) |#
nanoz has quit [Ping timeout: 264 seconds]
atgreen_ has quit [Ping timeout: 250 seconds]
<moldybits> oh
<moldybits> right, that's kinda obvious now that i see it. :)
<moldybits> thanks, pjb and Bike.
knicklux has quit [Remote host closed the connection]
shka_ has quit [Ping timeout: 264 seconds]
gravicappa has quit [Ping timeout: 246 seconds]
Krystof has joined #lisp
kutsuya has quit [Remote host closed the connection]
rumbler31 has joined #lisp
<sjl_> pjb: (f '(1 2 nil 4))
<sjl_> (defun f (list) (loop for (a . b) on list collect (list a (if b (car b) (first list)))))
random-nick has quit [Read error: Connection reset by peer]
mrak has quit [Remote host closed the connection]
vlatkoB_ has quit [Remote host closed the connection]
kutsuya has joined #lisp
Tordek has quit [Ping timeout: 244 seconds]
lnostdal has quit [Ping timeout: 268 seconds]
lnostdal has joined #lisp
nowhereman has joined #lisp
<warweasle> I never thought about it, but common lisp can use recursive macros, right?
xkapastel has quit [Quit: Connection closed for inactivity]
<dlowe> sure
<flip214> warweasle: as long as you have some termination condition that triggers before the compiler stack is full...
<warweasle> Ok. Then my mistake is somewhere else.
<flip214> warweasle: care to paste?
<warweasle> flip214: No, I moved everything into two functions just in case.
<warweasle> I'll be happy to share when I'm done. It's for the lisp jam...It take a dialogue tree and executes it.
Tordek has joined #lisp
ym555_ has quit [Quit: leaving...]
nowhereman has quit [Ping timeout: 252 seconds]
libertyprime has joined #lisp
phoe has quit [Remote host closed the connection]
dxtr has joined #lisp
libertyprime has quit [Ping timeout: 250 seconds]
<pjb> sjl_: indeed.
phoe has joined #lisp
dgtlcmo has quit [Ping timeout: 240 seconds]
scymtym has quit [Ping timeout: 252 seconds]
makomo has quit [Quit: WeeChat 2.2]
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
joh11 has joined #lisp
shifty has quit [Ping timeout: 252 seconds]
fouric has joined #lisp
atgreen_ has joined #lisp
fanta7531 has quit [Quit: fanta7531]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
cl-arthur has quit [Quit: Lost terminal]
dgtlcmo has joined #lisp
Ukari has quit [Remote host closed the connection]
themsay has joined #lisp
Ukari has joined #lisp
libertyprime has joined #lisp
libertyprime has quit [Remote host closed the connection]
zotan has quit [Ping timeout: 240 seconds]
zotan has joined #lisp
orivej has quit [Ping timeout: 246 seconds]
adip has joined #lisp
smasta has joined #lisp
tsizz has joined #lisp
<tsizz> hello
lumm has quit [Remote host closed the connection]
orivej has joined #lisp
lumm has joined #lisp
lumm has quit [Client Quit]
xkapastel has joined #lisp
lumm has joined #lisp
joh11 has quit [Quit: Leaving]
Bike has quit []
mindCrime has quit [Ping timeout: 240 seconds]
scymtym has joined #lisp
amerlyq has quit [Quit: amerlyq]
mindCrime has joined #lisp
gigetoo has quit [Ping timeout: 268 seconds]
gigetoo has joined #lisp
Achylles has joined #lisp
mindCrime has quit [Ping timeout: 245 seconds]
fengshaun has left #lisp ["Leaving"]
libertyprime has joined #lisp
Achylles has quit [Ping timeout: 252 seconds]
karlosz has joined #lisp
keep_learning_M has quit [Ping timeout: 246 seconds]
stux|RC-only has quit [Ping timeout: 240 seconds]
karlosz has quit [Client Quit]
Achylles has joined #lisp
keep_learning_M has joined #lisp
<gjvc> does anyone have any suggestions on getting SLIME working on Fedora 30 ? it can't find swank-loader.lisp
tsizz has quit [Ping timeout: 256 seconds]
eschatologist has quit [Excess Flood]
eschatologist has joined #lisp
igemnace has quit [Remote host closed the connection]
rpg has joined #lisp
Bike has joined #lisp
wxie has joined #lisp
smasta has quit [Ping timeout: 264 seconds]
[jlk] has joined #lisp
torbo has joined #lisp
lumm has quit [Quit: lumm]
themsay has quit [Quit: Quit]
[jlk] has quit [Ping timeout: 264 seconds]
LiamH has quit [Quit: Leaving.]
wxie has quit [Ping timeout: 240 seconds]
zaquest has joined #lisp
<Xach> gjvc: how did you install slime?
akater has quit [Quit: WeeChat 2.3]
karlosz has joined #lisp
[jlk] has joined #lisp
wigust- has quit [*.net *.split]
DGASAU has quit [*.net *.split]
mrcom has quit [*.net *.split]
patrixl has quit [*.net *.split]
cyraxjoe has quit [*.net *.split]
jxy has quit [*.net *.split]
hugotty has quit [*.net *.split]
d4ryus has quit [*.net *.split]
trn has quit [*.net *.split]
mfiano has quit [*.net *.split]
karlosz has quit [Quit: karlosz]
smasta has joined #lisp
wigust- has joined #lisp
DGASAU has joined #lisp
jxy has joined #lisp
mrcom has joined #lisp
patrixl has joined #lisp
d4ryus has joined #lisp
mfiano has joined #lisp
hugotty has joined #lisp
cyraxjoe has joined #lisp
trn has joined #lisp
<Xach> the world may never know
dale has quit [Quit: dale]
Kevslinger has quit [Quit: Connection closed for inactivity]
nai has quit [Quit: o/]
nai has joined #lisp
<gjvc> Xach, hmm not sure
<gjvc> i think it's there via rpm
<gjvc> emacs-slime-2.19-4.fc29.noarch
<gjvc> fc29!
smasta has quit [Ping timeout: 268 seconds]
smasta has joined #lisp
<gjvc> * (ql:quickload "quicklisp-slime-helper")
<gjvc> yay
<gjvc> running
smasta has quit [Ping timeout: 246 seconds]
sjl has quit [Quit: WeeChat 2.2-dev]