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
Fare has quit [Ping timeout: 250 seconds]
Fare has joined #lisp
libertyprime has joined #lisp
jruchti has quit [Remote host closed the connection]
jruchti has joined #lisp
Josh_2 has joined #lisp
libertyprime has quit [Ping timeout: 245 seconds]
libertyprime has joined #lisp
Essadon has quit [Quit: Qutting]
antonv has joined #lisp
<antonv> so, CMUCL for linux is only 32 bits?
smasta has quit [Ping timeout: 245 seconds]
<Josh_2> There is sbcl
smasta has joined #lisp
zmt00 has joined #lisp
smasta has quit [Ping timeout: 246 seconds]
gxt_ has joined #lisp
Josh_2 has quit [Read error: Connection reset by peer]
gxt has quit [Ping timeout: 245 seconds]
Josh_2 has joined #lisp
zmt00 has quit [Read error: Connection reset by peer]
Josh_2 has quit [Read error: Connection reset by peer]
zmt00 has joined #lisp
<p_l> antonv: there's no 64bit CMUCL, afaik
<White_Flame> and while CMUCL is still around, SBCL forked from it and supports 64-bit linux and a lot more
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 246 seconds]
Lord_of_Life_ is now known as Lord_of_Life
Oladon has joined #lisp
smasta has joined #lisp
t58 has quit [Quit: Night all]
igemnace has joined #lisp
smasta has quit [Ping timeout: 245 seconds]
antonv has quit [Ping timeout: 255 seconds]
_whitelogger has joined #lisp
dale has quit [Quit: dale]
Fare has quit [Ping timeout: 255 seconds]
libertyprime has quit [Ping timeout: 245 seconds]
libertyprime has joined #lisp
lavaflow has quit [Read error: Connection reset by peer]
lavaflow has joined #lisp
smasta has joined #lisp
smasta has quit [Ping timeout: 246 seconds]
ltriant has quit [Ping timeout: 245 seconds]
libertyprime has quit [Ping timeout: 246 seconds]
libertyprime has joined #lisp
aindilis has joined #lisp
aindilis has quit [Remote host closed the connection]
aindilis has joined #lisp
libertyprime has quit [Ping timeout: 268 seconds]
smasta has joined #lisp
smasta has quit [Ping timeout: 245 seconds]
Fare has joined #lisp
libertyprime has joined #lisp
smasta has joined #lisp
ltriant has joined #lisp
krwq has joined #lisp
dale has joined #lisp
Oladon has quit [Quit: Leaving.]
zmt00 has quit [Read error: Connection reset by peer]
libertyprime has quit [Ping timeout: 250 seconds]
Bike has quit [Quit: Lost terminal]
libertyprime has joined #lisp
catchme has quit [Quit: Connection closed for inactivity]
zmt00 has joined #lisp
smasta has quit [Ping timeout: 255 seconds]
libertyprime has quit [Ping timeout: 250 seconds]
smasta has joined #lisp
ym555 has joined #lisp
okeg has quit [Quit: WeeChat 1.6]
refpga has quit [Read error: Connection reset by peer]
smasta has quit [Ping timeout: 245 seconds]
smasta has joined #lisp
smasta has quit [Ping timeout: 245 seconds]
libertyprime has joined #lisp
aru_ has joined #lisp
Aruseus has quit [Ping timeout: 250 seconds]
nanoz has joined #lisp
caltelt_ has joined #lisp
gravicappa has joined #lisp
<beach> Good morning everyone!
aru_ has quit [Remote host closed the connection]
makomo_ has joined #lisp
amerlyq has joined #lisp
<makomo_> morning
ltriant has quit [Ping timeout: 245 seconds]
<makomo_> beach: even when at els you continue to rise early as usual :-)
libertyprime has quit [Ping timeout: 246 seconds]
Arcaelyx has quit [Ping timeout: 250 seconds]
libertyprime has joined #lisp
ym555 has quit [Ping timeout: 255 seconds]
<loke> hello!
<makomo_> hi loke
libertyprime has quit [Ping timeout: 250 seconds]
<pjb> makomo_: biological cycles…
dale has quit [Quit: dale]
nanoz has quit [Ping timeout: 255 seconds]
frodef has joined #lisp
orivej has joined #lisp
space_otter has joined #lisp
ltriant has joined #lisp
jprajzne has joined #lisp
Xach has quit [Ping timeout: 250 seconds]
Xach has joined #lisp
wigust- has joined #lisp
wigust has quit [Ping timeout: 246 seconds]
notzmv has quit [Ping timeout: 245 seconds]
smasta has joined #lisp
ltriant has quit [Quit: leaving]
smasta has quit [Ping timeout: 244 seconds]
dddddd has quit [Remote host closed the connection]
Inline has quit [Quit: Leaving]
smasta has joined #lisp
<Jachy> minion: memo for flip214: Ping me when you're around, I've got your book.
<minion> Remembered. I'll tell flip214 when he/she/it next speaks.
gxt_ has quit [Ping timeout: 258 seconds]
andrei-n has joined #lisp
makomo_ has quit [Ping timeout: 246 seconds]
scymtym has quit [Ping timeout: 246 seconds]
caltelt_ has quit [Ping timeout: 250 seconds]
amerlyq has quit [Quit: amerlyq]
vlatkoB has joined #lisp
keep_learning has quit [Remote host closed the connection]
Arcaelyx has joined #lisp
JohnMS_WORK has joined #lisp
smasta has quit [Ping timeout: 250 seconds]
smasta has joined #lisp
andrei-n has quit [Remote host closed the connection]
smasta has quit [Ping timeout: 246 seconds]
Fare has quit [Ping timeout: 245 seconds]
Fare has joined #lisp
nowhere_man has quit [Ping timeout: 258 seconds]
keep_learning has joined #lisp
kayront has left #lisp ["Leaving"]
scymtym has joined #lisp
varjag has joined #lisp
angavrilov has joined #lisp
krwq has quit [Remote host closed the connection]
figurelisp has joined #lisp
figurelisp has left #lisp [#lisp]
smasta has joined #lisp
smasta has quit [Ping timeout: 258 seconds]
smasta has joined #lisp
smasta has quit [Ping timeout: 258 seconds]
stux|RC-only has quit [Quit: Aloha!]
gxt_ has joined #lisp
jmercouris has joined #lisp
m00natic has joined #lisp
akssri has joined #lisp
hhdave has joined #lisp
<akssri> hello. i have a use case where i'm maintaining gpu memory, and using post-hooks to impl. gc using trivial-garbage might reduces throughput. is there a implementation of memory pool anyone here is aware of ?
space_otter has quit [Remote host closed the connection]
hhdave_ has joined #lisp
hhdave has quit [Ping timeout: 250 seconds]
hhdave_ is now known as hhdave
khisanth_ has quit [Ping timeout: 255 seconds]
<flip214> Jachy: ping ;) see pm.
<minion> flip214, memo from Jachy: Ping me when you're around, I've got your book.
_whitelogger has joined #lisp
smasta has joined #lisp
khisanth_ has joined #lisp
smasta has quit [Ping timeout: 245 seconds]
jackdaniel has quit [Remote host closed the connection]
jackdaniel has joined #lisp
spoeplau has joined #lisp
<beach> makomo: Yes, it's a genetic defect in my family.
akssri has quit [Remote host closed the connection]
* p_l is late for ELS because he forgot to set alarm clock ... :(
st_iron has joined #lisp
<st_iron> good morning
brundleticks has joined #lisp
amerlyq has joined #lisp
<jmercouris> good morning
<gilberth> makomo, beach: I would not call this a defect. My family has the opposite. I personally cannot get to sleep before 4:00 in the morning which would be very early for me. So when beach gets up I would crash.
<gilberth> makomo: When you really want to know more about this google ASPS and DSPS.
Fare has quit [Ping timeout: 246 seconds]
elderK has quit [Quit: Connection closed for inactivity]
Achylles has joined #lisp
smasta has joined #lisp
pankajgodbole has joined #lisp
esrse has joined #lisp
jmercouris has quit [Remote host closed the connection]
__jrjsmrtn__ has joined #lisp
<jackdaniel> I know it is a joke etc etc, but I like *better* current stackoverflow UI (which imitates 90s)
<jackdaniel> it is just simpler to use
<shka__> good day
<loke> jackdaniel: I'm on SO right now. Looks normal to me.
<shka__> loke: it has weird css for me
<shka__> and new layout
<shka__> and i like the layout
<shka__> CSS, less so
<loke> Well, it's new compared to last time I was there. But it must be 2 years ago I went to SO last :-)
<gilberth> What stackoverflow? A core dump is a perfectly fine UI for that to me. :)
<loke> Oh wait. Once I clicked on a question, it swtiched to 90's mode. I see what you mean now.
<loke> Oh, and stars follow my mouse.
orivej has quit [Ping timeout: 245 seconds]
<jackdaniel> april's fool joke
<jackdaniel> gilberth: it is a forum revolving around programming problems. you may find there various questions (from dull ones to really interesting) with community-provided answers
* jackdaniel digs back into complex floats
<gilberth> jackdaniel: Oh! That sounds nice. I need to check that out :)
q3d has joined #lisp
ym555 has joined #lisp
pankajgodbole has quit [Ping timeout: 250 seconds]
Achylles has quit [Remote host closed the connection]
esrse has quit [Ping timeout: 268 seconds]
ggole has joined #lisp
Achylles has joined #lisp
smasta has quit [Ping timeout: 250 seconds]
q3d has quit [Ping timeout: 256 seconds]
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
orivej has joined #lisp
zooey has quit [Ping timeout: 256 seconds]
zooey has joined #lisp
karlosz has quit [Client Quit]
karlosz has joined #lisp
Fare has joined #lisp
QwantE has joined #lisp
cuso4 has joined #lisp
smasta has joined #lisp
smasta has quit [Ping timeout: 245 seconds]
deepestthought42 has joined #lisp
frodef has quit [Ping timeout: 246 seconds]
Aruseus has joined #lisp
libertyprime has joined #lisp
cuso4 has quit [Ping timeout: 250 seconds]
deepestthought42 has quit [Ping timeout: 252 seconds]
Aruseus has quit [Remote host closed the connection]
atgreen has joined #lisp
Lord_of_Life has quit [Ping timeout: 245 seconds]
Lord_of_Life has joined #lisp
brundleticks has quit [Remote host closed the connection]
Lycurgus has joined #lisp
QwantE has quit [Remote host closed the connection]
libertyprime has quit [Ping timeout: 245 seconds]
dddddd_ has joined #lisp
smasta has joined #lisp
Bike has joined #lisp
dddddd_ is now known as dddddd
smasta has quit [Ping timeout: 250 seconds]
ian_0xF has joined #lisp
ian_0xF has quit [Client Quit]
Fare has quit [Ping timeout: 246 seconds]
st_iron has quit [Remote host closed the connection]
warweasle has joined #lisp
gigetoo has quit [Ping timeout: 246 seconds]
gxt_ has quit [Ping timeout: 250 seconds]
frodef has joined #lisp
gigetoo has joined #lisp
myrkraverk has quit [Ping timeout: 250 seconds]
LiamH has joined #lisp
LiamH has left #lisp [#lisp]
LiamH has joined #lisp
dale_ has joined #lisp
dale_ is now known as dale
Zaab1t has joined #lisp
Zaab1t has quit [Remote host closed the connection]
Lycurgus has quit [Quit: Exeunt]
Bob- has quit [Ping timeout: 250 seconds]
jprajzne has quit [Quit: Leaving.]
bobby has joined #lisp
lucasb has joined #lisp
quazimodo has quit [Ping timeout: 268 seconds]
quazimodo has joined #lisp
lumm has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
rippa has joined #lisp
smasta has joined #lisp
smasta has quit [Ping timeout: 246 seconds]
brocco has quit [Remote host closed the connection]
verisimilitude has joined #lisp
Achylles has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 246 seconds]
cuso4 has joined #lisp
orivej has joined #lisp
t58 has joined #lisp
nowhere_man has joined #lisp
m00natic has quit [Remote host closed the connection]
cage_ has joined #lisp
milanj has joined #lisp
Ukari has quit [Ping timeout: 246 seconds]
shka_ has joined #lisp
JohnMS_WORK has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
gareppa has joined #lisp
gareppa has quit [Remote host closed the connection]
gxt_ has joined #lisp
Ukari has joined #lisp
Essadon has joined #lisp
<seok> Storing lisp objects in a file, how bad is it compared to using an RDM
<Xach> seok: how bad it is depends on your needs and priorities
<seok> Hi Xach!
<Xach> in some cases it is not at all bad
<Xach> hi seok
<seok> Well until we get a database which can handle lisp objects, I cannot see how it can be bad
<seok> is file indexing much slower than RDM queries.
<seok> .
<seok> ?
<Xach> there are some things that databases do very well and it can sometimes be wasteful to recreate them on your own for lisp if you are in a hurry
<Xach> seok: there is no file indexing you can use off the shelf. if you write you own indexing it might be faster or might be slower, depending on your data and your needs.
<Xach> databases are programs, and lisp can be used to write programs, and it isn't too hard when things are simple to make programs that work well
<Xach> when the needs and data get complex it can help to reuse programs other people have written and made fast, with great effort, for complex tasks
frodef has quit [Ping timeout: 245 seconds]
<seok> Makes sense
<seok> A bit abstract though
__jrjsmrtn__ has quit [Remote host closed the connection]
<Xach> seok: the choice will depend on your needs and priorities
<Xach> neither option is automatically bad or good
kajo has quit [Ping timeout: 250 seconds]
<seok> Yes I get that
<Xach> Can you share info about those things? Maybe it would help with more concrete advice.
<seok> Now I need to get my head around which situations would favor a standard RDM
<seok> and which situations for file based lisp objects
varjag has joined #lisp
<seok> Say we have a game which has large number of game objects
<seok> I see there can be great benefit in keeping these as lisp objects
<seok> Will there be losses in performance.
<seok> ?
<PuercoPop> seok: what size/throughput. But why don't you give storing transactions in file a try?. Checkout clobber and bknr-store
Inline has joined #lisp
<seok> PuercoPop: O Nice. Thank you
<PuercoPop> clobber is the bare bones solution. bknr-store builds on top of the idea, providing indexes as well as 'checkpoints'
hhdave has quit [Ping timeout: 250 seconds]
karlosz has quit [Quit: karlosz]
t58 has quit [Ping timeout: 250 seconds]
nowhere_man has quit [Ping timeout: 245 seconds]
nowhere_man has joined #lisp
upline is now known as grumble
akater has quit [Quit: WeeChat 2.3]
smasta has joined #lisp
Arcaelyx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
smasta has quit [Ping timeout: 244 seconds]
orivej has quit [Ping timeout: 250 seconds]
cuso4 has quit [Quit: WeeChat 2.4]
nowhere_man has quit [Ping timeout: 250 seconds]
Zaab1t has joined #lisp
Zaab1t has quit [Client Quit]
Josh_2 has joined #lisp
Josh_2 has quit [Read error: Connection reset by peer]
Josh_2 has joined #lisp
Fare has joined #lisp
Jesin has quit [Quit: Leaving]
Josh_2 has quit [Ping timeout: 246 seconds]
karlosz has joined #lisp
<p_l> ok, something doesn't work for me here and I haven't written a setf function in a long time: https://pastebin.com/us0y85Ln
<verisimilitude> Let's see.
<p_l> when I do (setf (tag *word*) new-tag-value) it doesn't update the tag in *word*
<p_l> so I'm wondering if I'm missing something
spoeplau has quit [Ping timeout: 257 seconds]
<Bike> word is just an integer, right? it's not mutable
<Bike> i don't think you can do what you want with a setf function
<verisimilitude> Well, (SETF LDB) takes a place.
<Bike> and the place that it's getting is a parameter
<p_l> Bike: I want the end result to be that *word* has the specified field replaced
<Bike> not *word*
<Bike> so you need to use defsetf i think
<p_l> and define an update function?
<Bike> just the long form
nowhere_man has joined #lisp
<Bike> so that (setf (tag *word*) new-tag-value) macroexpands into (setf (ldb (byte 6 32) *word*) new-tag-value), essentially
<verisimilitude> Yes, that makes good sense.
<Bike> right now it expands into (funcall #'(setf tag) new-tag-value *word*), so it's not going to do anything to the *word* symbol value
<p_l> ... I think I need to either macro it up or something
<verisimilitude> That's what he's telling you, p_l.
<p_l> the core problem - I have an integer which is composed of three parts - 32bit, 6 bit and 2 bit, and I want to make accessors for the fields
<Bike> defsetf essentially defines a macro.
<verisimilitude> Using DEFUN for a SETF function defines a particular type of SETF expansion, but this isn't good for what you need.
<p_l> verisimilitude: yeah, I get that, I was thinking I might need to macro up the defsetf part as well
<verisimilitude> I don't regularly write SETF expansions, but this seems trivial enough for quasiquote to handle.
Jesin has joined #lisp
LiamH has quit [Read error: Connection reset by peer]
LiamH has joined #lisp
keep_learning_M has quit [Ping timeout: 250 seconds]
smasta has joined #lisp
smasta has quit [Ping timeout: 250 seconds]
karlosz has quit [Quit: karlosz]
cage_ has quit [Remote host closed the connection]
nowhere_man has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
sauvin has quit [Read error: Connection reset by peer]
quazimodo has quit [Ping timeout: 250 seconds]
quazimodo has joined #lisp
atgreen has quit [Ping timeout: 245 seconds]
atgreen has joined #lisp
t58 has joined #lisp
rumbler31 has joined #lisp
<jasom> p_l: consider define-setf-expansion?
frodef has joined #lisp
nanoz has joined #lisp
smasta has joined #lisp
gravicappa has quit [Ping timeout: 250 seconds]
<dim> I'm having some trouble designing a proper API, that's for reading db3 files containing a “memo”, that's another file with out-of-line data... should I automatically handle open/close on that extra file? will the GC happily close the stream for me if I let it open in some CLOS instance that's not used anymore?
<minion> dim, memo from jackdaniel: I've left some answers so please scroll up ;-)
<dim> ahah, I like that already ;-)
<dim> jasom: I think my proxy doesn't keep enough of history, it's lost for me, will try the public archives now
rumbler31 has quit [Remote host closed the connection]
<buffergn0me> dim: Don't rely on garbage collection to manage operating system resources like file handles
kajo has joined #lisp
<buffergn0me> The best way to deal with something like that is using UNWIND-PROTECT around whatever dynamic scope needs to read from the file
<dim> yeah but I'm only doint the low-level API where the main entry point is expecting an already opened stream, and now I have to open another one; I don't know when the callers are going to be done with it
<buffergn0me> The problem with leaving a stream around is first of all, what is the stream position going to be. Also, if the file is deleted, the filesystem will not free up space for it until the file handle is closed
<dim> I could maybe offer a restart that said?
<dim> but would that mean that the caller now knows how to handle closing the stream it still didn't open really
<dim> or I have to introduce a new API based on filenames rather than streams, and memo files are only going to be compatible with that new API, maybe that's ok
<buffergn0me> dim: Do the memo files only need to be kept open while reading the corresponding record from the db file? In that case you can close them when done reading the record
DGASAU has quit [Read error: Connection reset by peer]
DGASAU has joined #lisp
<dim> yeah but then open/close for each record? my only caller is going to read all the records in a tight loop and the close the file...
rumbler31 has joined #lisp
<buffergn0me> dim: Benchmark and see if it is a problem. If it is, then sounds like you need to go with filenames
hiroaki has joined #lisp
amerlyq has quit [Quit: amerlyq]
smasta has quit [Ping timeout: 246 seconds]
smasta has joined #lisp
smasta has quit [Ping timeout: 246 seconds]
vlatkoB has quit [Remote host closed the connection]
milanj has quit [Quit: This computer has gone to sleep]
<dim> yeah... thanks!
stux|RC-only has joined #lisp
<jasom> dim: have it take a stream-designator; then they can choose to manage the stream themselves with with-open-file or open a stream for you?
<dim> stream designator?
<jasom> nevermind, pathnames can't be used there
<jasom> okay whatever (or pathname string stream) would be
__jrjsmrtn__ has joined #lisp
scymtym has quit [Ping timeout: 268 seconds]
ym555 has quit [Ping timeout: 268 seconds]
josemanuel has joined #lisp
atgreen has quit [Ping timeout: 245 seconds]
libertyprime has joined #lisp
CyL_ is now known as CyL
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
scymtym has joined #lisp
cdegroot has joined #lisp
cdegroot has quit [Client Quit]
smasta has joined #lisp
shka_ has quit [Ping timeout: 268 seconds]
__jrjsmrtn__ has quit [Quit: ZZZzzz…]
milanj has joined #lisp
nirved is now known as Guest74904
Guest74904 has quit [Killed (adams.freenode.net (Nickname regained by services))]
nirved has joined #lisp
bobby has quit [Ping timeout: 245 seconds]
ym555 has joined #lisp
smasta has quit [Ping timeout: 245 seconds]
smasta has joined #lisp
atgreen has joined #lisp
Arcaelyx has joined #lisp
hiroaki has quit [Ping timeout: 268 seconds]
josemanuel has quit [Quit: leaving]
Bob- has joined #lisp
ggole has quit [Quit: Leaving]
hiroaki has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
gxt_ has quit [Quit: WeeChat 2.4]
ltriant has joined #lisp
Bike has quit []
Fare has quit [Ping timeout: 245 seconds]
frodef has quit [Ping timeout: 268 seconds]
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
LiamH has quit [Quit: Leaving.]
stux|RC-only has quit [Ping timeout: 250 seconds]
angavrilov has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 255 seconds]
orivej_ has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 26.1)]
logicmoo has joined #lisp
dmiles has quit [Ping timeout: 245 seconds]
logicmoo is now known as dmiles
milanj has quit [Quit: This computer has gone to sleep]
lumm has quit [Quit: lumm]
hiroaki has quit [Ping timeout: 250 seconds]
emaczen has joined #lisp
<emaczen> Where can I get information about lisp on windows? I'm trying to port some code and am running into several issues.
tsizz has joined #lisp
<tsizz> Hello
<t58> hello tsizz
<tsizz> how different is haskell from CL? my HW Is in haskell, but i rather learn lisp haha
<verisimilitude> Unlike Haskell, Common Lisp encourages writing programs that work on more than a single implementation, tsizz.
<emaczen> forgot about cliki...
<verisimilitude> What's wrong with the cliki?
<tsizz> verisimilitude: what do you mean?
<tsizz> sorry im very new :)
<emaczen> nothing pjb just reminded me to look there
<tsizz> oh no
<tsizz> i forget that book someone Josh2 told me about in here
rumbler31 has quit [Remote host closed the connection]
<tsizz> if anyone knows. i asked for like the holy grail of learning lisp resource
<verisimilitude> I mean that, unlike Haskell, Common Lisp programmers tend to (or at least should) write programs that adhere to the standard well and work across multiple implementations.
<verisimilitude> It's my understanding Haskell mainly uses GHC, which has multiple extensions and that the other implementations are mostly dead.
wxie has joined #lisp
<gilberth> And then Haskell is a functional programming language and CL is multi-paradigm.
<pjb> Then there's Liskell, so you can have both funs at once.
<gilberth> So they are quite different from each other.
hiroaki has joined #lisp
stux|RC-only has joined #lisp
<gilberth> pjb: Wait a second. Liskell is just a sane syntax for Haskell, isn't it?
<pjb> Yes.
<gilberth> Plus macros, it seems.
ltriant has quit [Ping timeout: 255 seconds]
* gilberth skims the paper
<grewal> tsizz: I think Josh_2 recommended Practical Common Lisp. It's free online
<tsizz> grewal: that was it thanks!
Fare has joined #lisp
hiroaki has quit [Ping timeout: 246 seconds]
ltriant has joined #lisp
nanoz has quit [Ping timeout: 246 seconds]
<gilberth> I wonder what would have happend if Dylan picked a C-like syntax instead of an Pascal-like syntax. But then I wonder too much in general.
smasta has quit [Ping timeout: 245 seconds]
<housel> Apple in that era was still heavily into Object Pascal
<housel> NewtonScript also ended up with a Pascalish syntax
smasta has joined #lisp
<gilberth> Ah. Wasn't Dylan used on the Newton?
<housel> It was being developed for the Newton prototypes, but it ended up being too heavy and so they built NewtonScript instead
Josh_2 has joined #lisp
<gilberth> OK. I have no idea how much RAM a Newton has. But given that Dylan is just Common Lisp with a different syntax, you want a few MB for that.
<pjb> gilberth: C-like syntax wasn't such a fad when Dylan was designed. It became after Java.
<housel> MessagePad 100 was 4 MB ROM, 640 KB RAM (according to Wikipedia; I programmed for one at the time, but I didn't pay attention to its memory capacity)
<gilberth> pjb: Really? Java was earlier than Dylan. My memory must be mixed up.
<housel> No, the Dylan Intermediate Reference Manual was 1993, I first heard of Java in 1995
<gilberth> housel: That's tight for a Common Lisp.
<p_l> gilberth: Oak happened after Dylan, afaik
<pjb> You're right, Java is older than Dylan by 1 year. Sorry.
<p_l> huh, 1991
<p_l> I don't think there's much resemblance between Oak of 1991 and Java of 1994, though
<gilberth> Anyhow, I still wonder _object_ oriented programming would be common these days, if Dylan would have used C-syntax. [And I mean CLOS with object oriented programming, that is generic functions.]
zigpaw has quit [Read error: Connection reset by peer]
<housel> Object systems such as Flavors and CLOS were fairly well-known in Lisp circles by 1990
<pjb> gilberth: syntax doesn't matter.
<pjb> This is why it's better to use s-expressions.
<gilberth> Sure. But I still do not get the differentiation between "methods" and "function". It's silly, if you ask me. Very silly.
<gilberth> pjb: It does for popularity. Don't get me wrong: I love our s-exprs.
orivej_ has quit [Ping timeout: 255 seconds]
<tsizz> question: is the W in Hello world supposed to be capitalized
<tsizz> ASKING THe important questions here
<gilberth> Why should it?
<housel> Out of respect?
<gilberth> For the world? Do you mean the planet as such? Then yes. Otherwise: No.
<tsizz> hmmm so either are correct depending who you're saying hello too lol
<gilberth> :)
<gilberth> The other question is: Do we need a comma?
<grewal> I never liked the the difference between methods and functions either. The symmetry in CLOS is very satisfying
<grewal> gilberth, tsizz: The other, other question: Do you use a period or an exclamation mark?
Essadon has quit [Quit: Qutting]
<tsizz> grewal: ! for sure
<tsizz> yeah i think the comma too
<gilberth> grewal: Exactly. And this has implications. Take C++ or Java or some other object-oriented language. You import/include/use some class from some library. Can you define new methods on that class? No. Can you in CL define new generic functions? Yes.
kutsuya has joined #lisp
<gilberth> I also would pick an "!".
Jesin has quit [Quit: Leaving]
<gilberth> It is more joyfull and outgoing, if you ask me.
<grewal> gilberth: My main issue was figuring out how to define a function that takes two different classes. Is obj1.func(obj2) better than obj2.func(obj1). Or should I just forget the whole thing and just define func(obj1, obj2). ...This is giving me bad flashbacks of the friend keyword in C++
rumbler31 has joined #lisp
rumbler31 has quit [Remote host closed the connection]
Jesin has joined #lisp
<gilberth> grewal: Yes. This is the issue. Why would the 'x' in 'x.foo(y)' be special? Why? This is "subject-oriented" programming.
asarch has joined #lisp
<gilberth> grewal: As in: A sentence has exactly _one_ subject but could have multiple objects.
<asarch> Where is closette.lisp?
<asarch> I mean, the official closette.lisp?
rumbler31 has joined #lisp
<gilberth> Wasn't that an appendix in some book? If so, seek my book-shelf, you'd find it.
<aeth> grewal: CL still has an arbitrary choice: the method-or-function issue when working with something that takes in a custom object.
t58 has quit [Quit: Leaving]
<aeth> Of course, if you have e.g. a (define-function foo ((bar baz)) ...) macro then it's trivial to then switch it to (defmethod foo ((bar baz)) ...) or vice versa with the slight semantic difference that you're replacing a type with a class or vice versa.
<gilberth> aeth, grewal: But here syntax has an impact on semantics. Once you choose the 'x.f(y)' syntax you confine yourself to just methods. Or put otherwise: Generic function only specializing on exactly _one_ argument.
akater has joined #lisp
<grewal> Exactly, I only have to think about it once: when I define it. It doesn't have to remind me of my (potentially) bad life choices everytime I call it
<pjb> aeth: defmethod defines a method on a generic function!
<aeth> grewal: There is, however, a separate API issue: in which package do you place the defgeneric?
<grewal> And the choice of method or function is sometimes made for you
<gilberth> grewal: *nod*
emaczen has quit [Ping timeout: 250 seconds]
<asarch> Thank you!
<aeth> grewal: Generally, I make the distinction as follows: a method acting on an object that is an instance of class foo is for the user to potentially extend, a function acting on an object with type foo is internal. Performance will be better, and user extension might break things unexpectedly.
<grewal> aeth: I haven't gotten there yet. Don't try to encourage my existential crises :P I hate making arbritrary choices.
<asarch> Thank you very much! :-)
<aeth> pjb: Yes, I definitely prefer having separate defgenerics, but (most? all?) implementations will let you just do the refactoring I said without adding the defgeneric.
cantstanya has quit [Ping timeout: 256 seconds]
<grewal> It's in the spec. "If (fboundp function-name) is nil, a generic function is created "
<aeth> interesting.
<aeth> Strange how some implementations warn, then. I think SBCL stopped doing that, though
vhost- has joined #lisp
cantstanya has joined #lisp
<gilberth> My issue was another: Say I use a libarary which defines a 'rectangle' class. I want to know the area of such a rectangle. The library does not provide for 'r.area()'. Why then cannot I define a new "method" 'area'? In CL there is no such distinction between a function and a method. So in other languages the you sometimes write 'x.f(y)' and at others 'f(x,y)' and that arbitrarily. I find that annoying.
<aeth> grewal: Anway, I would personally (it's a matter of style) make the assumption that any method (with the exception of unexported accessors, mostly generated by defclass) is part of the API of your code, which the user could potentially intercept (e.g. with :before, :after, and :around, or with a subclass) and change the behavior of
<aeth> s/unexported accessors/accessors with unexported symbols/
<aeth> grewal: So for the very high level stuff, or for very dynamic code, methods make sense. If it's 100% internal, a function might make more sense, especially if you're making a lot of assumptions.
<aeth> s/Anway/Anyway/
<grewal> Re SBCL warning: The warning might be there in case you meant to use a different mehtod name. It's a common error that a compiler in other languages would catch.
<pjb> aeth: No, I mean that when you write (defmethod moo ((x string)) (list 'string x)) you cannot call that method.
<pjb> aeth: You can only call the generic function named moo, taking one argument of any class.
<pjb> aeth: it's up to that generic function to find applicable methods, and to call the method with an implementation-defined mechanism (call-method), that you cannot call yourself outside of the generic function dispatching code. (See define-method-combination).
arescorpio has joined #lisp
<grewal> aeth: Personally, I'm not a fan of OO, so I can't comment too much. And my experience with CL is quite limited.
<aeth> pjb: I was thinking more in terms of code written with the object in mind (so you're extending with before/after/around or a subclass) rather than code written with ducktyping in mind (anything that has a foo method works), but you're correct.
<aeth> s/a foo method/a quack method/
<aeth> It's duck typing after all
<pjb> in lisp there's a single type: T
<pjb> All lisp objects are of type T.
rumbler31 has quit [Remote host closed the connection]
<aeth> pjb: "duck typing" just means (quack foo 42) will work as long as foo is an instance of something that has a method (or whose superclasses/etc. do) quack for the generic quack. Doesn't have to do with types here!
ltriant has quit [Ping timeout: 246 seconds]
asarch has quit [Remote host closed the connection]
asarch has joined #lisp
<pjb> duck typing means that mostly, you use NIL as pre-condition and T as post-condition.
ltriant has joined #lisp
<grewal> pre-condition? post-condition?
<pjb> Yea, if you don't know that, you're not an OOP.
<pjb> Or a programmer at all, even.
<aeth> pjb: afaik (and programming terms have multiple definitions/uses, especially in inter-language contexts) "duck typing" is just a style where you take in an object, do a method call on that object, and you don't care at all about the object as long as that method call works (and if it doesn't you'll get an exception)
<aeth> so you're writing your function so you just do (quack object 42) and if it's a duck it'll quack 42 times and if it's a cat you'll get an exception and it's up to the user
<pjb> aeth: in CL, we don't care for conditions.
tsizz has quit [Ping timeout: 256 seconds]
<pjb> (+ object 42) and you don't care whether object is 1, 1.2, 1/2, #c(1 2), as long as it quacks^W adds with 42, you're good.