jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language<http://cliki.net/> logs:<https://irclog.whitequark.org/lisp,http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.5, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
fikka has quit [Ping timeout: 264 seconds]
Cymew has quit [Ping timeout: 240 seconds]
Cymew has joined #lisp
rumbler31 has joined #lisp
fikka has joined #lisp
Cymew has quit [Ping timeout: 260 seconds]
Cymew has joined #lisp
rumbler31 has quit [Ping timeout: 260 seconds]
wxie has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
Cymew has quit [Ping timeout: 256 seconds]
Cymew has joined #lisp
fikka has joined #lisp
Cymew has quit [Ping timeout: 256 seconds]
Cymew has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
Cymew has quit [Ping timeout: 260 seconds]
<pfdietz> I don't see COVER in QL.
Cymew has joined #lisp
fikka has joined #lisp
comborico1611 has quit [Quit: Konversation terminated!]
hel-io has joined #lisp
Cymew has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 265 seconds]
Cymew has joined #lisp
Karl_Dscc has joined #lisp
pioneer42 has joined #lisp
Cymew has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
Cymew has joined #lisp
verisimilitude has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
pagnol has quit [Ping timeout: 260 seconds]
<aeth> I think that the issue I was having might be an interaction between ASDF, ECL, and certain libraries that deal with foreign code. When I updated to the latest Quicklisp, the distro-provided ECL stopped working with my program again. I guess ASDF isn't detecting when some things become stale in ECL?
<aeth> I couldn't get the roswell ECL to work, but I suspect the solution is delete even more cached files than I thought to delete.
fikka has quit [Ping timeout: 264 seconds]
<on_ion> try ECL from source ?
Cymew has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
wxie has quit [Remote host closed the connection]
wxie has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
rotty has quit [Ping timeout: 265 seconds]
drunkencoder has quit [Ping timeout: 268 seconds]
hel-io has quit [Remote host closed the connection]
hel-io has joined #lisp
hel-io has quit [Remote host closed the connection]
fikka has joined #lisp
hel-io has joined #lisp
hel-io has quit [Read error: Connection reset by peer]
hel-io has joined #lisp
drunkencoder has joined #lisp
rotty has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
siraben` has quit [Ping timeout: 255 seconds]
hel-io has quit [Ping timeout: 260 seconds]
warweasle has quit [Quit: Leaving]
rotty has quit [Ping timeout: 276 seconds]
johnnymacs is now known as dorothyw
hel-io has joined #lisp
rotty has joined #lisp
hel-io has quit []
fikka has joined #lisp
Folkol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dorothyw> How can I get the performance of hash tables with pseudo-purely functional programming
fikka has quit [Ping timeout: 265 seconds]
Karl_Dscc has quit [Remote host closed the connection]
<dorothyw> As far as I know when programming in a pure way you can't get the same o notation as an array
EvW has quit [Ping timeout: 265 seconds]
damke has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
sjl has joined #lisp
<jcowan> You cannot, although there are algorithms that can give you *local* O(1) performance by clever caching
d4ryus1 has joined #lisp
<jcowan> dorothyw: ^^
iqubic has joined #lisp
fikka has joined #lisp
d4ryus has quit [Ping timeout: 245 seconds]
fikka has quit [Ping timeout: 240 seconds]
<dorothyw> how good is 0(1) compared to the worst performance of a hash table and how good is it compared to the best performance in layman's terms
<|3b|> depends on the hash table, some have pretty bad 'worst case' performance
semz has quit [Ping timeout: 265 seconds]
<|3b|> (usually something like O(N) insert time on collisions)
<ldb> dorothyw: the regular perfomance on all operations to hash table is O(1)
<|3b|> i think 'pure functional' dictionaries usually just do fairly flat trees, so you have a small log term which is close enough to constant in practice
<dorothyw> ah so make an immutable tree out of long arrays rather than linked lists
<ldb> and hashtable operations in the worst case are O(n)
<|3b|> along with various strategies to keep the tree balanced efficiently
damke_ has joined #lisp
fikka has joined #lisp
<ldb> depends on what kinds of operations you prefer
<ldb> for concatenation and split
<|3b|> also have to balance out how much memory you waste, if you care about that (in both cases, since hash tables need free space to avoid collisions, and trees spend space on pointers)
<ldb> rope is quite good
siraben has joined #lisp
<dorothyw> I've read that binary search trees are o log n. DOes that mean that it gets progressively easier over time?
damke has quit [Ping timeout: 264 seconds]
damke__ has joined #lisp
asarch has joined #lisp
<ldb> yes, except you need to blance the tree
<|3b|> it means that if you have N entries, searching takes log(n) time. so 256 entries for a balanced binary tree is log2(256)=8
mpah has quit [Quit: sleep]
<dorothyw> is a score of 9 better than a score of 8
<|3b|> 8 as in you have to check 8 nodes
fikka has quit [Ping timeout: 256 seconds]
<ldb> dorothyw: larger number means slower
<|3b|> while a 256 entry list you would have to search on average half of the list = checking 128 nodes (best case 0, worst 256)
<dorothyw> what is the limit of log 2 x as x approaches infinity
<|3b|> or a hash table you would (on average) search 1 node
<|3b|> infinite
damke_ has quit [Ping timeout: 264 seconds]
<|3b|> but log2(most memory you could address in a pc)=48
Oladon has joined #lisp
<|3b|> and in practice you probably addressing things larger than 1 byte and have much less than 2^48 bytes of ram (something like 256TB), so more realistically log2(X) is unlikely to get much past low 30s
semz has joined #lisp
semz has joined #lisp
semz has quit [Changing host]
<dorothyw> Is there a sort of monadic approach to handling hash tables
<|3b|> and if you make the tree flatter, you would reduce that number even further
fikka has joined #lisp
<dorothyw> For example I could hook up lisp to sqlite in a pseudo pure way using monads
<dorothyw> but pretend a hash table is sqlite
fikka has quit [Ping timeout: 260 seconds]
<ldb> then just need monads
<iqubic> I thought CL didn't have monads.
varjag has joined #lisp
fikka has joined #lisp
<pierpa_> what CL does not have it can be added
<LdBeth> iqubic: monads are just lambdas
<iqubic> LdBeth: That's not true?
jealousmonk has quit [Read error: Connection reset by peer]
slyrus1 has joined #lisp
varjag has quit [Ping timeout: 260 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
fikka has quit [Ping timeout: 268 seconds]
ldb has quit [Remote host closed the connection]
wxie has quit [Ping timeout: 240 seconds]
wxie has joined #lisp
damke__ has quit [Ping timeout: 264 seconds]
damke__ has joined #lisp
Cymew has joined #lisp
wxie has quit [Ping timeout: 264 seconds]
voidlily has quit [Remote host closed the connection]
voidlily has joined #lisp
<White_Flame> Is EOF the only situation in which read-sequence returns less than the requested length? Does TCP packetization ever cause this to return partially filled sequences?
Cymew has quit [Ping timeout: 245 seconds]
safe has joined #lisp
fikka has joined #lisp
damke has joined #lisp
wxie has joined #lisp
damke__ has quit [Ping timeout: 264 seconds]
lemoinem has quit [Read error: Connection reset by peer]
elderK has quit [Quit: WeeChat 1.9]
lemoinem has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
milanj has quit [Quit: This computer has gone to sleep]
fikka has joined #lisp
jealousmonk has joined #lisp
<White_Flame> that's calling read-line, not read-sequence
fikka has quit [Ping timeout: 264 seconds]
<jcowan> White_Flame: TCP does not preserve packet boundaries
<White_Flame> I know. I've done a ton of network programming. I'm asking a very specific question:
<White_Flame> WHen I call read-sequence, and I get a shorter read because some TCP info is currently available, but not enough to fill the buffer?
<White_Flame> s/and/can/
<jcowan> Your call to read-sequence will hang until the relevant part of the sequence has been filled.
<White_Flame> the clhs doesn't make it 100% clear that EOF is the only thing that will truncate
<White_Flame> ok
ccl-logbot has quit [Quit: Client terminated by server]
ccl-logbot has joined #lisp
mathrick has quit [Ping timeout: 264 seconds]
TMA has quit [Ping timeout: 250 seconds]
yeticry has quit [Ping timeout: 240 seconds]
siraben has quit [Ping timeout: 265 seconds]
TMA has joined #lisp
damke_ has joined #lisp
yeticry has joined #lisp
damke has quit [Ping timeout: 264 seconds]
jcowan has quit [Ping timeout: 260 seconds]
Arcaelyx_ has quit [Remote host closed the connection]
jcowan has joined #lisp
Arcaelyx has joined #lisp
<jcowan> White_Flame: I read the phrase "which might be less than end because the end of file was reached" as meaning that there is no other reason why the returned value would be less than 'end'.
fikka has joined #lisp
mathrick has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
schoppenhauer has quit [Ping timeout: 240 seconds]
schoppenhauer has joined #lisp
<LdBeth> iqubic: the original monad paper uses lambda to explain the idea
fikka has joined #lisp
<LdBeth> Monad itself is proved in lambda calculus
fikka has quit [Ping timeout: 260 seconds]
wxie has quit [Remote host closed the connection]
pierpa_ has quit [Quit: Page closed]
Louge has joined #lisp
verisimilitude has joined #lisp
wxie has joined #lisp
dddddd has quit [Remote host closed the connection]
damke has joined #lisp
fikka has joined #lisp
pioneer42 has quit [Quit: Leaving.]
damke_ has quit [Ping timeout: 264 seconds]
wxie has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
varjag has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
siraben has joined #lisp
wxie has joined #lisp
paul0 has quit [Quit: Leaving]
varjag has quit [Ping timeout: 240 seconds]
igemnace has quit [Client Quit]
Arcaelyx has quit [Read error: Connection reset by peer]
asarch has quit [Quit: Leaving]
Lord_Nightmare2 has joined #lisp
Fare has joined #lisp
Louge has quit [Quit: Louge]
Kevslinger has quit [Quit: Connection closed for inactivity]
Lord_Nightmare has quit [Ping timeout: 260 seconds]
Lord_Nightmare2 is now known as Lord_Nightmare
Arcaelyx has joined #lisp
ldb has joined #lisp
jcowan has quit [Quit: Leaving]
Fare has quit [Ping timeout: 265 seconds]
pierpa has joined #lisp
fikka has joined #lisp
rumbler31 has joined #lisp
drot has quit [Ping timeout: 240 seconds]
Arcaelyx has quit [Read error: Connection reset by peer]
damke_ has joined #lisp
drot has joined #lisp
rumbler31 has quit [Ping timeout: 276 seconds]
damke__ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
presiden has quit [Ping timeout: 255 seconds]
damke_ has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
emaczen has quit [Read error: Connection reset by peer]
presiden has joined #lisp
<on_ion> caveman2 -- nice !
damke has joined #lisp
wxie has quit [Ping timeout: 265 seconds]
damke__ has quit [Ping timeout: 264 seconds]
ldb has quit [Read error: Connection reset by peer]
orivej has quit [Ping timeout: 264 seconds]
Arcaelyx has joined #lisp
emaczen has joined #lisp
jibanes has quit [Ping timeout: 264 seconds]
wxie has joined #lisp
jibanes has joined #lisp
quazimodo has quit [Ping timeout: 260 seconds]
quazimodo has joined #lisp
Arcaelyx has quit [Read error: Connection reset by peer]
ldb has joined #lisp
Fare has joined #lisp
<ldb> sup.
<verisimilitude> Hello, ldb.
quazimodo has quit [Ping timeout: 260 seconds]
<ldb> verisimilitude: hello
quazimodo has joined #lisp
marusich has joined #lisp
<ldb> I see, Introduction to Common Lisp has a chapter about how to control terminal.
Arcaelyx has joined #lisp
fouric has quit [Ping timeout: 276 seconds]
fouric has joined #lisp
Oberon4278 has quit []
orivej has joined #lisp
<LdBeth> There’re always similar to learn
<LdBeth> something
orivej has quit [Ping timeout: 264 seconds]
damke_ has joined #lisp
fisxoj has joined #lisp
damke has quit [Ping timeout: 264 seconds]
mflem has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
elderK has joined #lisp
elderK has quit [Changing host]
elderK has joined #lisp
<elderK> Hey guys!
<ldb> yes
<elderK> I'm trying to understand why some code is using a macro, rather than an ordinary function. Perhaps you can shed some light on the question.
BlueRavenGT has quit [Read error: Connection reset by peer]
<ldb> have you used MACROEXPAND-1, elderK?
<elderK> No, I haven't.
BlueRavenGT has joined #lisp
<epony> verisimilitude Have you met your soul mate in assembler land?
<verisimilitude> No.
<verisimilitude> Why do you ask?
<ldb> elderK: then try it. https://pastebin.com/P5KNKJCt
<elderK> ldb: Reading the macro, I think I get what he's going for. The input 'dlist' might be bound to nil. If it were a normal function, he wouldn't be able to change that. So, he's using the macro so that he can update the binding.
jealousmonk has quit [Quit: Leaving]
<epony> verisimilitude saw your posts in ##asm
<LdBeth> elderK: I don’t see it takes a clever approach, the IF statement can be omitted during expension
Arcaelyx has quit [Read error: Connection reset by peer]
<LdBeth> according to MACROEXPAND result
shka has joined #lisp
<elderK> LdBeth: You mean the code could expand differently depending on whether whatever was passed in, was falsey or not? I agree.
<epony> There might be slightly higher chance of finding assembler aware people programming skillfully lisp, than lisp skilled people programming assembler.
wxie has quit [Remote host closed the connection]
<LdBeth> Then what he get is a FORTH expert wwww
<elderK> LdBeth: His code semi-answer a question of mine. I was wondering how you emulate pointers, rather than pure references.
<elderK> Like, function(&some_list_to_populate).
<LdBeth> elderK: yup
<elderK> So, you'd use macros in this case?
sauvin has joined #lisp
SaganMan has joined #lisp
<elderK> When I was playing in Scheme, I had to "box" things to achieve a similar result.
<LdBeth> Macro is definitely easier to understand compared to using closure
<LdBeth> But macro can’t be funcalled
<elderK> LdBeth: I'm not sure how to best achieve the following: I have a function, it takes two parameters. First, is some input value. Second, is a list to populate. I imagine you could say (func 1 var) where var is bound to something like the result of (list) ?
<phoe> felideon: list to populate? what do you mean?
<LdBeth> phoe: something like PUSH
<phoe> you could go with (defun func (input-value &optional (list '())) ...)
<elderK> phoe: I figure that was directed to me :) I mean, based on the input, the function will add one or more things to the list.
<phoe> woops, worry, correct
<phoe> elderK: good, then the above definition stands correct
<elderK> I.e. The list you pass into the function, is denoting where we will write output.
<elderK> Why would I do that? The list is not optional :)
<phoe> inside FUNC, you can functionally modify the list, and return the new one
<phoe> elderK: for a sane default value
<phoe> if the list is empty
<elderK> In other words, the list is an output parameter.
<phoe> oh, so you want to *destructively* modify the output
<phoe> it won't work if you want to append conses to its front.
<elderK> Yes.
<elderK> In C,
verisimilitude has quit [Remote host closed the connection]
JenElizabeth has joined #lisp
<elderK> list l; f(input, &l)
fisxoj has quit [Quit: fisxoj]
<phoe> yes. you can't take addresses in Lisp.
verisimilitude has joined #lisp
<elderK> Yup. I am asking how I would achieve such a thing in Lisp. And, of various ways, which is the preferred.
<phoe> you need to take one more step of indirection so you can modify the reference of your output list.
<elderK> So, boxing?
<phoe> boxing, yep - the simplest box is a cons cell
Arcaelyx has joined #lisp
<verisimilitude> Would you rephrase that, epony?
<phoe> so your input can be in form of (nil . input) where the CAR of this cons cell can be anything and the CDR is arbitrarily modifiable
<epony> no.
<phoe> and you can destructively modify that.
<elderK> phoe: That sounds kinda painful?
<verisimilitude> Alright, then.
<elderK> I was thinking of creating a doubly-linked list type of my own, with push-back/front pop-back/front. So that, yknow, insertion and stuff would be O(1). The list would then be an instance - and it could be modified inside functions.
<phoe> yep, utilizing a box in form of an instance is doable, too
<phoe> since you can then modify its slot
<elderK> Yeah. Makes sense :) Thank you.
<elderK> About loop collect, btw. CLHS says that each element collected is added to the end of the list, rather than consed onto the front. That sounds pretty painful, if you're collecting a lot of stuff.
ldb has quit [Remote host closed the connection]
<verisimilitude> You can maintain the end of the list, elderK.
<LdBeth> elderK: you can just do a nrevers, which is really quick
<LdBeth> NREVERSE
<LdBeth> never need a dlist
fourier has joined #lisp
<elderK> verisimilitude: Track the tail and add only to it?
<phoe> elderK: no, just collect to the front and then nreverse the list which is O(n)
<verisimilitude> Yes, elderK.
<elderK> verisimilitude: I was hoping collect would do something like that :)
<verisimilitude> A good LOOP implementation probably will, yes.
<rme> You see both ways, and both are fine. Build the list backwards, than nreverse at the end, or else keep track of the tail of the list and build it up via rplacd/(setf cdr), as the collect clause of the loop macro typically does.
<elderK> As for populating some list, then reversing it, that requires an extra cycle through the list.
<phoe> (loop for i from 0 to 10 collect i) pushes 0 to NIL, then 1 to (0), then 2 to (1 0), then 3 to (2 1 0), ..., then nreverses (10 9 8 7 6 5 4 3 2 1 0)
<verisimilitude> A cursory glance shows that SBCL and ECL do.
<phoe> elderK: in practice it's fast enough compared to the others
<elderK> Aye. I'm just splitting hairs :)
<verisimilitude> That's still O(1) compared to O(n).
<phoe> since if we're dealing with lists that have thousands of elements then something goes seriously wrong elsewhere in your code
<elderK> verisimilitude: The tracking the tail? Yeah, it would be O(1).
<phoe> verisimilitude: except your O(1) has a higher constant cost than my O(n)
<LdBeth> Because usually we don’t use a lot of lists in CL
<verisimilitude> No good LOOP implementation would actually use NREVERSE when it could instead do this.
<verisimilitude> It's just a single pointer, phoe.
<verisimilitude> So, both have O(1) space considerations, not counting the actual list.
Oladon has quit [Quit: Leaving.]
Pixel_Outlaw has quit [Remote host closed the connection]
<elderK> LdBeth: Aye. Use the right ADT for the job :) It's just sometimes, a list is exactly what is required. Preferably one that isn't slow to push to the end of :D
<elderK> Thank you for answering my questions :)
<beach> Good morning everyone!
<elderK> Good Morning beach!
<verisimilitude> Hello, beach.
<LdBeth> Morning
rotty has quit [Ping timeout: 245 seconds]
Arcaelyx has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 264 seconds]
verisimilitude has quit [Remote host closed the connection]
verisimilitude has joined #lisp
Arcaelyx has joined #lisp
BlueRavenGT has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
omps has joined #lisp
Arcaelyx has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
marusich has quit [Quit: Leaving]
vlatkoB has joined #lisp
rumbler31 has quit [Ping timeout: 265 seconds]
Arcaelyx has joined #lisp
<elderK> :) Any advice on which unit testing framework to use? The wiki seems to recommend either FiveAM or Prove.
<verisimilitude> My advice is to write one yourself.
<elderK> Prove seems pretty nice
<elderK> :P
<Shinmera> Colleen: tell elderK look up parachute
orivej has joined #lisp
<beach> Shinmera: Is that one of your projects?
<phoe> beach: it is
<beach> Shinmera: Does it support the kind of random testing that I like?
rotty has joined #lisp
<Shinmera> beach: I'm not sure what a framework would need to have in order to support or not support it.
<beach> Neither am I.
<phoe> beach: do you have some examples of your random tests?
<beach> Which is why I have not been using any testing frameworl.
<beach> phoe: Sure. Look in the Cluffer repository for example.
<Shinmera> I would be interested in making it have explicit support for it, but right now I'm neck deep in thesis work, so maybe after this month's over I'll think about it.
<beach> phoe: Basically, to test some abstract data type, I implement a trivial (but slow) version of it. Then I emit random operations on both of them and check that the result is the same.
<beach> Shinmera: Oh, sure. No rush.
<beach> phoe: It is tricky, because the randomness must have some memory so that there is a certain probability of long sequences of the same operation. So I use a Markov process to emit operations.
<phoe> That is what I see. And I don't know of a framework that would support that.
siraben has quit [Quit: ERC (IRC client for Emacs 26.0.91)]
<Shinmera> Parachute could certainly be made to support that.
<Shinmera> Well, it could support it right now, just not conveniently :)
fikka has quit [Ping timeout: 260 seconds]
<phoe> Shinmera: s/support that/explicitly support that/
fikka has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
milanj has joined #lisp
damke has joined #lisp
verisimilitude has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
damke_ has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
Arcaelyx has quit [Read error: Connection reset by peer]
bjorkint0sh has quit [Quit: Leaving]
bjorkintosh has joined #lisp
kqr has joined #lisp
<kqr> sooo... what testing frameworks are recommended? I'm looking at doing property testing with check-it, but it wants to be embedded in a framework
<elderK> Shinmera: Parachute looks nice. How is it rendering the tick-signs?
<kqr> well, wants is the wrong word. I'd prefer it to*
<elderK> Does it behave if you're not on a Unicode-aware terminal? :D
leighzi has joined #lisp
<elderK> Shinmera: Looks really nice, even. :)
<elderK> Great work!
ldb has joined #lisp
<fourier> kqr: im using prove, its simple and good
Arcaelyx has joined #lisp
heisig has joined #lisp
janivaltteri has joined #lisp
Bike has quit [Quit: Lost terminal]
ldb has quit [Quit: Common Lisp IRC library - http://common-lisp.net/project/cl-irc]
puchacz has joined #lisp
ldb has joined #lisp
<ldb> just assembled a simple irc clinet
<ldb> *client*
<leighzi> (defparameter spelling-correct nil)
<kqr> fourier, thank you, will look into it!
omps has quit [Ping timeout: 260 seconds]
<elderK> kqr: Same question as me :)
<elderK> kqr: I like the look of prove and parachute.
puchacz has quit [Client Quit]
<ldb> i need a spell checker
<leighzi> write one
<elderK> aspell? :)
<ldb> or a lineditor with spell checker support
madmalik has joined #lisp
<ldb> yes i need to write one. most lineditor don't support CJK chars
<iqubic> Do you need CJK support?
<LdBeth> Yes. I’m Chinese
earl-ducaine has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 240 seconds]
ldb has quit [Ping timeout: 264 seconds]
leighzi has quit [Ping timeout: 245 seconds]
<phoe> My UIOP:DEFINE-PACKAGE form is indented like https://pastebin.com/BHvhhctd
<phoe> How can I fix it?
<Shinmera> elderK: It's just unicode. ✓
fikka has joined #lisp
<Shinmera> phoe: Gotta let Slime know via trivial-indent
<phoe> (trivial-indent:define-indentation uiop:define-package (2 &body))
<phoe> and nothing seems to change
<phoe> the form is still indented the same way
<Shinmera> Hmm, odd.
<rme> I hate to ask, but what's wrong with cl:defpackage that makes you want to use this other thing?
<phoe> rme: :REEXPORT option in UIOP:DEFINE-PACKAGE
<phoe> therefore, convenience
fikka has quit [Ping timeout: 240 seconds]
<phoe> also DEFINE-PACKAGE does not complain if symbol FOO is exported from package but then I write defpackage's :export without including FOO
<mfiano> As a side note, me and a friend recently patched defpackage+ to support package-local-nicknames with a graceful fallback if not supported on an implementation. Definitely not perfect, but it's useful.
<phoe> on SBCL, it produces a warning in defpackage; define-package just silently unexports that symbol.
fikka has joined #lisp
malice has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
FreeBirdLjj has joined #lisp
shka has quit [Quit: Konversation terminated!]
<phoe> What is the way to remove a defined condition from a Lisp image?
<phoe> (define-condition foo () ())
<Shinmera> (setf (find-class 'foo) NIL)
python476 has joined #lisp
<phoe> (defun test () (define-condition g638 () ()) (setf (find-class 'g638) nil))
<phoe> Compile-time error: attempt to dump reference to obsolete class: #<SB-KERNEL::UNDEFINED-CLASSOID G638>
<phoe> woop, I found a bug
milanj has quit [Quit: This computer has gone to sleep]
pyericz has joined #lisp
safe has quit [Read error: Connection reset by peer]
<phoe> hey, it gets better, (defun test () (define-condition foo () ()))
varjag has joined #lisp
varjagg has joined #lisp
<phoe> It is valid to DEFINE-CONDITION not at toplevel, right?
<phoe> because this thing compiles perfectly in REPL but fails when C-c C-c'd from inside SLIME.
varjag has quit [Remote host closed the connection]
varjagg has quit [Client Quit]
varjag has joined #lisp
energizer has quit [Ping timeout: 265 seconds]
wigust has joined #lisp
pyericz has quit [Quit: This computer has gone to sleep]
nowhere_man has joined #lisp
glv has joined #lisp
frgo has joined #lisp
fikka has joined #lisp
heisig has quit [Ping timeout: 240 seconds]
<LdBeth> phoe: must be SLIME’s problem because direct eval to this sexp with SLY just works
<phoe> LdBeth: I don't suspect slime, I suspect the compiler.
<Shinmera> C-c C-c performs a compile-file/load, not an eval.
fourier has quit [Ping timeout: 245 seconds]
<phoe> https://pastebin.com/2NXM4iDa - see line 25 of this file, step 5 in backtrace.
<phoe> It's actually LOADing a fasl.
<LdBeth> If interpreted eval works, there are no reasons for compile failure
<phoe> LdBeth: if only Lisp was this simple and easy (:
<phoe> it must be something on the fasl boundary. something doesn't get written to the compiled fasl or something doesn't get read from it.
<LdBeth> phoe: do you use SBCL?
<phoe> LdBeth: t
pyericz has joined #lisp
wxie has joined #lisp
<LdBeth> phoe: well then that’s strange because SBCL compiles every sexps it executes even in repl
<Shinmera> compile is not the same as compile-file
<Shinmera> the error is specifically about dumping.
<malice> It works for me in 1.4.6, phoe has 1.4.4.
<phoe> yes, let me upgrade.
<LdBeth> Reproduced in 1.4.0
<phoe> malice: nope, reproduced in 1.4.6
fikka has quit [Ping timeout: 245 seconds]
<elderK> Guys, I'm having trouble finding information on the :perform clause of ASDF files.
<elderK> I'm reading through ASDF's manual - and :perform and such is in the grammar.
<elderK> But there's little explanation as to what it is about. I see that there are special operation objects, which methods are specialized on.
<elderK> But that doesn't really explain :perform :|
<Shinmera> It allows you to define methods on perform specialised on your system.
<elderK> So, that would be like defmethod with s eql to whatever my system's name is?
<Shinmera> So a declarative way of doing (defmethod asdf:perform ((op op-name) (system (eql (asdf:find-system :my-system))) ..)
<elderK> for say, test-op?
<elderK> Ahh
<elderK> Thank you, Shinmera :)
<Shinmera> Yes, test-op hook-in is the typical case. https://github.com/Shinmera/3d-vectors/blob/master/3d-vectors-test.asd#L17
<elderK> Shinmera: As for parachute, is there a fallback incase the terminal isn't Unicode friendly?
<Shinmera> There's a fallback if the implementation doesn't know unicode, but terminals are not ANSI, so
<Shinmera> no
<Shinmera> In my opinion if any part of your system is not unicode capable it should be nuked
<Shinmera> But that's just me
quazimodo has quit [Ping timeout: 260 seconds]
<elderK> What does ssa stand for in your 3d vectors package? :)
<elderK> static single assignment? simd?
<elderK> I see you are defining vops. Looks like support for simd.
<Shinmera> It was an attempt at adding simd stuff yes
<elderK> Nice
<elderK> I was recently wondering how matrices would be implemented in CL.
<elderK> You've got a lot of cool stuff, Shin :)
<Shinmera> It's not on by default
<Shinmera> Thanks
<Shinmera> 3d-vectors and 3d-matrices is gross code though, so beware.
<elderK> :P I've booked you and beach on GitHub :P I intend to study the hell out of your work, to learn.
<elderK> :)
spacebat1 has joined #lisp
<beach> elderK: I am flattered. Let me know if you have any questions.
<elderK> beach: You too have a lot of interesting stuff :)
<elderK> You guys are kind of like inspiration.
<phoe> elderK: inorite?
* elderK nods
<elderK> :D
<elderK> I've decided that anything I write that isn't for school, I will try and do in CL.
<elderK> No excuses. Yes, I could do something in C or C++. But nope, gotta try and do it in CL.
<elderK> I'm never going to learn CL or get any good at it if I don't force myself to use it for real stuff.
<elderK> :)
pierpa has quit [Ping timeout: 260 seconds]
<beach> Good plan.
kerrhau has quit [Ping timeout: 260 seconds]
<elderK> :) I think the first thing I'll do is write a few of my favorite ADTs.
<elderK> Years of using C has engrained several bad habits.
<elderK> :P So, writing my favorite ADTs in new languages is a thing I do.
<elderK> It can be pretty fun :)
<LdBeth> phoe: find the similar problem in cmucl
damke_ has joined #lisp
<phoe> LdBeth: hm? what do you mean?
<LdBeth> phoe: the compile error to define-condition in lambda
<phoe> LdBeth: are you able to pastebin it?
damke has quit [Ping timeout: 264 seconds]
damke has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
<LdBeth> It’s a warning, but I suspect they are related
<elderK> Guys, when should you create a generic method with a name like, add, instead of something prefixed like bs-tree-add?
<malice> I guess that pretty much always
<malice> if it's bs-tree-add then it's not too generic now is it
<elderK> Well, no.
<elderK> :) But when you have an avl tree, too, you'd have avl-tree-add
<malice> I mean, I'd suspect tree-ad gf with method specialized on bs-tree or avl-tree
<elderK> You could hide those differences by specializing on the type.
<malice> yes
<malice> Though there is an upside to the data-type-operation in that you can type data-type- and autocompletion will show you available functions
<elderK> I figure it's not a big deal anyway - at the end of the day, you could always add a GF and have the specizliation call the lower-level functions, right?
<malice> yep
<elderK> That's a good point, malice.
random-nick has joined #lisp
<malice> also it's generic function and not generic method
Karl_Dscc has joined #lisp
<malice> and frankly, lisp's OOP is a bit different and because it's not mainstream, it's not as "standardized" as the OOP where dot notation exists
makomo has joined #lisp
<malice> but the general rule of thumb (as I see it) is that generic function should be as generic as possible(but not anymore than that)
<malice> if you need avl-tree-add, create it as a function with defun
<LdBeth> elderK: use Generics or not depends on whether and how you want you and others to extend the program
<malice> nothing wrong with working on class instance using functions
<malice> this comes from other languages; in the OOP world, you manipulate objects exclusively through methods, functions are just some helper stuff that doesn't touch any instance
<malice> or its insides
<malice> in CL, you already have these two separated
<malice> so functions are all right
<TMA> on the other hand the function shall do "the same" for all its specialized methods. too unspecific a name (say add instead of tree-add) might be confusing then
<malice> That's true.
<malice> There is also a funny thing, that you can add documentation to a generic function
<malice> but you can also add documentation to any of methods that implement it, and they are all different
<LdBeth> If you want, you can even use BOLCK and GOTO
<malice> though imho it's not useful due to the fact that if you want to get documentation for a specific method, you have to get that method object, which isn't something you do often, so it's not straightforward for typical user
<elderK> malice: Next question :)
<elderK> When I have a class, say, and I want to access its slots, should I use slot-value or the accessor?
<elderK> I believe there is a macro, with-slots, or something like that.
<Shinmera> The accessor.
<elderK> I was wondering if it makes use of the accessors or just does slot-value
<Shinmera> with-slots uses slot-value
<Shinmera> with-accessors uses accessors
<elderK> I read somewhere that accessors are preferred because they can be combined.
<elderK> Ah, awesome.
<phoe> elderK: yep, but slots are usually implementation details, and accessors are usually the exported interface of a module.
<elderK> Thank you, Shin :)
<Shinmera> accessors are preferred because they are shorter to write, more idiomatic, and can perform checks/computations
<beach> elderK: Use accessors. Slots are implementation details.
<phoe> and do not have to refer to slots at all in the end.
wxie has quit [Quit: Bye.]
<Shinmera> slot-value should be used only for internals / bypassing accessors in select cases.
<LdBeth> elderK: but there are some cases you want slot-value explicitly
<elderK> LdBeth: Such as?
<beach> LdBeth: Name two!
<LdBeth> elderK: you want to bypass accessor
pyericz has quit [Quit: This computer has gone to sleep]
<LdBeth> beach: ?
milanj has joined #lisp
<phoe> yep, when you twiddle with the implementation details
<beach> LdBeth: "but there are some cases you want slot-value explicitly". I am asking you to give me two such cases.
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
<malice> elderK: you can also export accessors but not slots
<Shinmera> you can't export either
<Shinmera> you only export symbols
<Shinmera> which name slots and functions
<malice> Isn't it obvious what I meant?
<Shinmera> Your statement is wrong in every way I can interpret it
<malice> I meant that you can export symbols naming accessors(e.g. acc-a), but not export symbols naming slots(e.g. slot-a), so that when user tries to access slot, a condition is signalled, which encourages use of accessors
<malice> Does that make sense?
<Shinmera> Yes.
<phoe> yep
<elderK> Can you export something with a different name?
random-nick has quit [Remote host closed the connection]
<Shinmera> No, symbols can't have aliases.
<elderK> Ah, okay.
<elderK> Like, in the package, it's say, X. But when I export X, I give it a new public name?
<malice> You can. Just bind it to new symbol and export that symbol
<Shinmera> That's not an alias.
<malice> (though it's "you can")
<malice> yes
<Shinmera> And while you can do things like tie the same function definition to a symbol, you can't do so for slots.
<malice> If you really need to, you can try using macros for that
random-nick has joined #lisp
fikka has joined #lisp
<malice> (with-alias (origin newname) (print newname)) ;;same as (print origin)
<malice> but I don't think that would be useful
wigust has quit [Quit: ZNC 1.6.6 - http://znc.in]
<Shinmera> You can do that with symbol-macros, but it will break in subtle ways when you consider quotation or runtime dereferencing.
random-nick has quit [Remote host closed the connection]
pyericz has joined #lisp
random-nick has joined #lisp
arbv has quit [Quit: ZNC - http://znc.in]
<LdBeth> beach: okay, if there is a standard instance, the slot value is fixnum, and another specialized instance with the same slot as another object, and the accessor returns
<phoe> LdBeth: I did not understand that
arbv has joined #lisp
<LdBeth> beach: fixnums for both, but there is a need to access the object in the specialized instance
<phoe> LdBeth: which object in the specialized instance?
<phoe> (defclass foo () ((%thing :accessor thing :type fixnum))) (defclass bar (foo) ())
<phoe> this is how I imagine it so far
heisig has joined #lisp
<LdBeth> phoe: (deflass bar (foo) (thing :accessor thin :type super-fixnum)))
<Shinmera> What is super-fixnum?
<LdBeth> While super-fixnum is a subclass of fixnum
<elderK> Thanks peeps :)
<Shinmera> fixnum isn't a class
<LdBeth> Just a case
<phoe> LdBeth: so you have four classes in there
<phoe> (defclass foo-thing () ()) (defclass bar-thing (foo-thing) ()) (defclass quux () ((%thing :accessor thing :type foo-thing))) (defclass fred (quux) ((%thing :accessor thing :type bar-thing)))
<phoe> something like that?
fikka has quit [Ping timeout: 240 seconds]
<phoe> if yes, then the generic function #'THING always returns something of type FOO-THING
<phoe> additionally if (TYPEP X 'FRED) then you know that (THING X) will return a BAR-THING
<LdBeth> phoe: The accessor THING for FRED should return a standard FOO-THING
<LdBeth> because in practical like Shinmera says, fixnum is not a class
<phoe> LdBeth: what?
kozy has joined #lisp
<phoe> each BAR-THING is a FOO-THING because BAR-THING is a subclass of FOO-THING
<phoe> so the accessor THING for FRED returns a FOO-THING
<LdBeth> Please allow me write down the code
<phoe> okiedokie
kozy has quit [Remote host closed the connection]
<malice> Isn't there a rule that in subclasses, the type of the slot needs to be the subtype of the same slot in its superclasses?
<Shinmera> slot types are mostly disregarded
glv has quit [Quit: Leaving]
<malice> That's the other thing
<Shinmera> "The contents of a slot will always be of type (and T1 ... Tn) where T1 ...Tn are the values of the :type slot options contained in all of the slot specifiers. If no slot specifier contains the :type slot option, the contents of the slot will always be of type t. The consequences of attempting to store in a slot a value that does not satisfy the type of the slot are undefined."
<Shinmera> clhs 7.5.3
<specbot> Inheritance of Slots and Slot Options: http://www.lispworks.com/reference/HyperSpec/Body/07_ec.htm
<elderK> To be crazy, is there any specific order people like to have things sorted when defining slots?
<elderK> Like, :documentation before :initargs before :initform ?
<elderK> Or is it largely irrelevent?
<elderK> :)
<elderK> Pretty much in all the source I read, :documentation is last.
<Shinmera> I use (slot [initform] [initarg] [accessor/reader/writer])
<elderK> Sweet. Thank you.
fourier has joined #lisp
<elderK> What's the deal with line breaking wrt documentation strings?
<Shinmera> I don't document slots because nobody looks at that. I write references to the accessors for slots into the class' docstring, and obviously add docstrings for accessors.
<Shinmera> What do you mean, "what's the deal"?
<elderK> How do you add docstrings to the accessors? I mean, doesn't defclass generate thsoe?
<elderK> Sorry. I mean, how do people do it?
<phoe> (setf (documentation 'accessor 'function) "skdjghksdjdgh")
<Shinmera> (setf (documentation 'accessor-name 'function) "bla bla")
<Shinmera> Or just use documentation-utils
<elderK> In C, you can just say something like "sfasd" "asdfsa", the second part could be on another line.
<phoe> where ACCESSOR is the name of the accessor
<elderK> Ah, cool.
<Shinmera> Colleen: look up documentation-utils
<phoe> also Shinmera has a toolkit for dealing with that
<phoe> exactly this one
<elderK> :) I noted it was a dependency of parachute.
<Shinmera> It's a dependency of most of all my newer projects.
<elderK> Does with-slots / with-accessors work for structs?
<elderK> BTW, thank you for answering all of my questions. I know they're all probably very simple. I really appreciate it :)
<Shinmera> it might but it's not specified.
* elderK nods
<Shinmera> clhs slot-value
<elderK> This is why I don't just try things in my impl. and accept it as gospel :)
<Shinmera> "The specific behavior depends on object's metaclass. An error is never signaled if object has metaclass standard-class. An error is always signaled if object has metaclass built-in-class. The consequences are unspecified if object has any other metaclass--an error might or might not be signaled in this situation. Note in particular that the behavior for conditions and structures is not specified."
<elderK> Aha. Not specified.
<elderK> Beat me to it!
<elderK> :)
<elderK> Is using (values ...) considered expensive?
<Shinmera> Typically only the single-value return case is optimised.
<Shinmera> So using multiple values is probably going to be more expensive, but you'll have to profile on your implementation.
<malice> elderK: is it?
makomo has quit [Ping timeout: 260 seconds]
<elderK> I'm trying to think of how I'll return stuff when I do my tree insertion. If I do iterative, no biggy. If I do it recursive, then things will be different as each call to %tree-add or whatever will return the reference to a node.
<malice> is using (print ...) expensive?
<elderK> malice: :P
<malice> if (values ...) is your bottleneck, then I've got a bad news for you
<LdBeth> phoe: finally https://pastebin.com/q5arNxnz
fourier has quit [Ping timeout: 260 seconds]
<Shinmera> malice: Compared to simply returning things yes.
<malice> Or not. Both run so fast I wouldn't notice.
<malice> The speed always depends on the context
pyericz has quit [Quit: This computer has gone to sleep]
<LdBeth> malice: because print some data structure means recursively expand them
<malice> LdBeth: ?
<LdBeth> malice: for example passing a long list is just pass a reference, and print it mean you need to go through CAR and CDR recursively
fikka has joined #lisp
<malice> Yes, but I don't understand what you're trying t tell me
<malice> I asked about the (print) as a rhetorical figure to demonstrate my point, that cost is relative to the task
<malice> So the question like "Is Common Lisp fast?" is actually an invalid question, imho
<elderK> God damn it's going to take me ages to get used to not having pointers. At least, not with the freedom I'm used to.
<elderK> :D
<Shinmera> I find having pointers a nuisance
<elderK> Perhaps I will feel that way too, in time.
<LdBeth> Umm. So VALUES costs some but it is better than return a cons cell
<elderK> But for now: I'm very used to being able to use and abuse them for all kinds of handy purposes.
<elderK> :P I feel equally restricted in Java.
* elderK shudders
<elderK> (University /loves/ Java.)
<malice> In what ways?
<LdBeth> If it is implemented correctly
<elderK> :) I'm headed off.
<elderK> Thanks for your help! :)
<malice> LdBeth: I don't think that matters.
<malice> I think what's more important is the interface you're providing than the speed of this particular operation
elderK has quit [Quit: waves]
<malice> In the long run, the user is going to deal with values or cons all the time
<malice> and the speed of this is just a tiny factor which he would probably simply ignore
<malice> For example, when creating a floor function, I simply can't imagine it returning a cons cell
<malice> even if it was faster
<malice> it's just bad design
<malice> and I feel that's far more important than microoptimizations
<Shinmera> Depends on your goal of course, but you're right that typically the user should come first.
<malice> I can't really imagine any goal that would make it worthwhile
<malice> look at Python, it's *relatively slow*, so are its libraries
<malice> yet it is widely popular
<LdBeth> Hard to say
<malice> because if you need speed, you get that where you need it(c libs and stuff)
<Shinmera> fortran's APIs are pretty annoying to use, but they are that way for good reason.
<Shinmera> people still use it for numerics today
<malice> Yes. I don't know fortran though. Plus saying that people still use it is a bit of a stretch
<Shinmera> nah
<LdBeth> And in the old day people use FORTRAN to write EMACS!
<Shinmera> People still use fortran and its numerical libraries.
<malice> Yes, they do. But I don't think that it's popular, and I think that many of them use it for different reasons
<malice> (not knowing any better)
<LdBeth> But no one would use is as a general purpose language
<malice> but this may be my subjective opinion derived from my observations
<LdBeth> Luckily Lisp is not restricted to AI
<malice> Yeah, you can see how languages like Python are used all over the place for the machine learning, where you need things to be *fast* because you compute so much
<malice> but it doesn't mather if it's in Python, Lisp or Brainfuck if at the end the number-crunching is done via some Fortran library
<malice> And CL's probably never gonna get that fast to be used for this purpose
<Shinmera> Well, heisig is doing high performance computing with Lisp for instance
<LdBeth> I have point out that CL can also call foreign libraries for specialized tasks
* heisig hears his name.
<heisig> malics: I see no technical reason why CL should be slower than e.g. Fortran.
<malice> probably GC
<malice> but it also depends on the context
<Shinmera> GC shouldn't trigger if you don't cons
<heisig> malice: When you provide type annotations, the CL compiler has the same knowledge as a C++ or Fortran compiler.
<heisig> And yes, you just avoid consing in HPC code.
<beach> malice: What Shinmera said. Plus, if you need GC in Lisp you would need the equivalent of malloc/free in some other language, and those are slower than GC in general.
fikka has quit [Ping timeout: 264 seconds]
<malice> I'm playing a bit of devil's advocate in here. I am aware type annotations help a lot and that malloc/free can be really bad in terms of performance
<LdBeth> I’m also interested in One Reference Only approach
<heisig> Admittedly, Lisp compilers are not (yet) as good as GCC, Clang or ICC when it comes to number crunching.
<LdBeth> malice: what you said are situations
<beach> LdBeth: What is "One Reference Only" approach?
Karl_Dscc has quit [Remote host closed the connection]
fikka has joined #lisp
<LdBeth> beach: copy by values and discard memories right after no reference. Since each object is referenced once, there are no needs for GC or reference count
<beach> LdBeth: But that would be WAY slower than GC.
<beach> LdBeth: Plus, it is much harder to get the semantics right then.
k-stz has joined #lisp
<beach> LdBeth: A simple assignment usually takes a single register-to-register instruction. If you copy objects, you need to allocate memory, and access all the slots, so many more memory accesses.
<LdBeth> beach: about slow, the approach is allocate a larger chuck memory and recycles memories from the chunck
<beach> LdBeth: Just accessing memory is very expensive these days.
<beach> This is exactly the reason why I often say "It is impossible to write a C++ program that is both modular and fast".
fikka has quit [Ping timeout: 240 seconds]
<beach> LdBeth: Like I said, every assignment turns into multiple memory references. The same thing holds for every argument passing.
<beach> LdBeth: Then, because you have duplicate objects, the cache will fill up more easily.
<LdBeth> beach: practically it can be down with only pointer assignments
<beach> Then you have multiple references.
<LdBeth> beach: but unreferenced objects are `freed` immediately
<LdBeth> GC approach also could have GC hell
Kevslinger has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
fikka has joined #lisp
<LdBeth> And more destructive operations can be used
damke has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
xaotuk has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
<LdBeth> Yes, it is hard to get semantics right
<LdBeth> ORO mean there would be no circular structures
margeas has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
DVSSA has quit [Read error: Connection reset by peer]
fikka has joined #lisp
<Shinmera> So how would you do sparse graphs
<Shinmera> Or, well, anything that actually does require multiple references.
<LdBeth> No way
fikka has quit [Ping timeout: 260 seconds]
<LdBeth> Except invent some representation
DVSSA has joined #lisp
<LdBeth> like the '#1=(1 #1#)
<LdBeth> Or, allow some special case
fikka has joined #lisp
<LdBeth> _death: 👍👌
<phoe> are we having a garbage collection discussion again
<_death> but.. I don't like it, and especially dislike languages like Rust
<LdBeth> _death: it has longer history than Rust
<_death> I think my link shows that ;)
<LdBeth> Be delighted, I first read such a concept from NewLisp, which started at 2002
fikka has quit [Ping timeout: 264 seconds]
frgo has quit [Ping timeout: 276 seconds]
Bike has joined #lisp
fikka has joined #lisp
scymtym has quit [Ping timeout: 264 seconds]
TCZ has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
<_death> anyway, I thought this http://www.cs.cmu.edu/~cmartens/thesis/ was more interesting use case for linear logic
TCZ has quit [Quit: Leaving]
fikka has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
quazimodo has joined #lisp
hhdave has joined #lisp
<LdBeth> _death: Just go for sleep, and thanks for sharing
<LdBeth> I think Forth also takes linear logic
TCZ has joined #lisp
fikka has joined #lisp
makomo has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
DVSSA has quit [Quit: Lost terminal]
Fare has quit [Ping timeout: 260 seconds]
hhdave has quit [Quit: hhdave]
krasnal has quit [Ping timeout: 276 seconds]
pagnol has joined #lisp
nalik891 has joined #lisp
nowhere_man has quit [Ping timeout: 245 seconds]
Fare has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
quazimod1 has joined #lisp
fikka has joined #lisp
quazimodo has quit [Ping timeout: 276 seconds]
TCZ has quit [Quit: Leaving]
scymtym has joined #lisp
SaganMan has quit [Ping timeout: 240 seconds]
madmalik has quit [Quit: Connection closed for inactivity]
Arcaelyx has quit [Quit: Textual IRC Client: www.textualapp.com]
EvW has joined #lisp
TCZ has joined #lisp
Arcaelyx has joined #lisp
raynold has quit [Quit: Connection closed for inactivity]
pierpa has joined #lisp
<phoe> Is there a utility function like REMOVE-DEPENDENCIES but one that retains them instead of removing?
<phoe> (retain-dependencies '(a b c a a b d)) ;=> (A A B) ;order does not matter
<Bike> you mean duplicates?
<phoe> uh
<phoe> duplicates
<phoe> sorry, thinking of two things at once
<Bike> anyway, i don't think so
SaganMan has joined #lisp
<beach> It is not hard to write though.
<phoe> (let ((multiset '(a b c a a b d))) (reduce (lambda (x y) (remove y x :count 1)) (list* multiset (remove-duplicates multiset))))
<phoe> ugly and O(n²)
<phoe> could go down to amortized O(n) with a hashtable
TCZ has quit [Quit: Leaving]
Folkol has joined #lisp
FreeBirdLjj has joined #lisp
fourier has joined #lisp
<Shinmera> Well, if you want duplicates to be retained, (remove 1 list :key (lambda (a) (count a list)))
<phoe> Shinmera: not that; I basically want to remove one of each kind from a list.
<Shinmera> Okey.
<phoe> so that (append (remove-duplicates x) (retain-duplicates x)) is equal to x, sans order of elements
fikka has quit [Ping timeout: 265 seconds]
fikka has joined #lisp
<beach> Do you care whether the return value is (A A B) or (A B A) or something else?
Kevslinger has quit [Quit: Connection closed for inactivity]
<_death> could use MAPCON to add obscurity to ugliness ;)
<Shinmera> Here's a loop oneliner I guess (loop with r = () for i in (list 1 2 3 1 3 3 4) if (find i r) collect i else do (push i r))
tomlukeywood has joined #lisp
<phoe> beach: I don't
<phoe> the order is not relevant
<beach> (loop for rest on list when (member (first rest) (rest rest)) collect (first rest))
<beach> Still quadratic.
<Shinmera> Mine's only O(nk) for k being the unique keys in the list.
<Shinmera> And it would be trivially changeable to a hash-table variant.
<phoe> okay, I don't think my lists will be longer than 20 elements anyway
<beach> Then don't worry about it. Hash tables have a fairly large overhead anyway.
lnostdal has quit [Ping timeout: 260 seconds]
Kevslinger has joined #lisp
<phoe> ugh
<phoe> a non-evaluated '() is a valid list of length 1
<phoe> #justlispthings
<Xof> (let ((k (gensym))) (loop with r = () for i in multiset when (> (get i k 0) 0) collect i incf (get i k 0))) ; untested, O(n) in theory
<Xof> (for symbol keys)
tomlukeywood has quit [Quit: tomlukeywood]
<pfdietz> (scrolls back and reads hours-ago stuff)
<phoe> Xof: #'GET is not O(1) though
<Xof> ... collect i do (incf (get i k 0)))))
<pfdietz> Prove is nice, but package name collision.
<phoe> it reads a property *list* of a symbol, and traversing a list is linear
<phoe> unless some implementation implements symbol properties as some sorta hash table at which point we could use a hash table anyway
<pfdietz> I really want package local nicknames to become de facto standard.
<Shinmera> I don't think anyone would be opposed to that
<pfdietz> So, all public package names could be big hairy things, and if you want to use one, you nickname it locally to something short.
<Xof> phoe: true, but in terms of n and k that is a constant
<Xof> of course my version scales with c, the number of times you call the function :-)
<Xof> so to fix that you could access symbol-plist directly. (I'm not seriously advocating this anyway)
<pfdietz> I've wanted CL collecton libraries to enable a WITH-MAPPING feature, that allows one to use a field in the objects in the collection as a temporary mapping. It would default to using a hash table if someone else had already grabbed that resource.
nmajo has quit [Ping timeout: 260 seconds]
nmajo has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
gabiruh has quit [Ping timeout: 256 seconds]
gabiruh has joined #lisp
quazimod1 has quit [Ping timeout: 265 seconds]
EvW has quit [Ping timeout: 260 seconds]
EvW has joined #lisp
wigust has joined #lisp
yeticry has quit [Ping timeout: 276 seconds]
yeticry has joined #lisp
EvW has quit [Quit: EvW]
joh11 has joined #lisp
shangul has joined #lisp
<joh11> LdBeth: a bit late, but I use ECL on a rPi 3. I found a solution : it seems to be a known bug, resolved in the dev branch (https://gitlab.com/embeddable-common-lisp/ecl/issues/406)
Karl_Dscc has joined #lisp
lnostdal has joined #lisp
<pfdietz> Cool.
<shangul> I'm going to use vim for typing Lisp codes. Is there anything which I have to know? Because many suggest Emacs instead
<beach> shangul: Sorry to hear that.
<phoe> shangul: vlime or slimv are what people use
<shangul> phoe, those are editors?
<beach> shangul: Replacements for SLIME.
<phoe> shangul: plugins for vim that allow interaction with Lisp images.
<shangul> beach, the common lisp implementation?
<phoe> Lisp is an image-based programming language. SLIME is a toolkit made for interacting with that image.
<phoe> For interactive code compilation and recompilation, debugging, tracing, inspecting.
<phoe> Coding Lisp without such a toolkit is a major pain in the behind and strips the language of about 50% of its strengths and fun sides.
<phoe> Lisp workflow isn't the workflow from languages like C or C++ or Java which goes like, write some code/run compiler on everything/run the resulting binary/stare at results
janivaltteri has quit [Quit: leaving]
<phoe> Lisp is interactive compared to them, you add stuff incrementally to the running Lisp image and build your program bit by bit while the previous bits are already there and working.
<phoe> as for an implementation, what OS are you on?
<phoe> if you're on MacOS, go for CCL; if you're on Windows or other unixlikes, grab SBCL.
<shangul> I now have both "clisp" and "sbcl" on my machine. Also it's Ubuntu
<shangul> phoe, where could I read more about what you called it "lisp workflow"
<phoe> hmmmm
<pfdietz> Common Lisp Recipes chapter 16, perhaps. But that's more nuts and bolts of things you do in a workflow.
gigetoo has quit [Ping timeout: 260 seconds]
asarch has joined #lisp
<phoe> I'm looking for a proper video that demonstrates that concept
gigetoo has joined #lisp
<phoe> I have some of them recorded but they are in Polish
pioneer42 has joined #lisp
<phoe> https://www.youtube.com/watch?v=xqWkVvubnSI seems pretty nice for a very short demo of the REPL
<phoe> https://www.youtube.com/watch?v=bl8jQ2wRh6k is another fun one that describes a lot of Lisp along the way
<phoe> and shows practical coding - in this case, https://github.com/cicakhq/potato
<beach> shangul: In summary, you typically have one or more editor buffers with source code in them, and also an editor window that runs a REPL. You can then send code from a source window to the REPL by a simple keystroke. This way, you will write a small amount of code, send it to your Common Lisp system, then switch to the REPL and immediately test what you have done.
<beach> shangul: So there is not edit-compile-link-execute cycle.
<beach> shangul: The program is created and tested incrementally.
Oladon has joined #lisp
pagnol has quit [Ping timeout: 260 seconds]
xrash has joined #lisp
jealousmonk has joined #lisp
damke has quit [Read error: Connection reset by peer]
damke has joined #lisp
<beach> shangul: Any questions?
yeticry has quit [Ping timeout: 245 seconds]
yeticry has joined #lisp
schjetne has joined #lisp
<fourier> shangul: have a look here for typical workflow https://www.youtube.com/watch?v=5FlHq_iiDW0
dddddd has joined #lisp
xrash has quit [Ping timeout: 256 seconds]
<beach> Maybe shangul fainted.
edgar-rft has joined #lisp
<phoe> beach: or maybe he's watching.
<beach> Sure, that could be.
<phoe> Have there been any proposals for an extensible #'DOCUMENTATION generic function?
<Bike> you mean other than the standard one?
<beach> It already is, no?
<phoe> So I can go (documentation 'foo 'my-documentation-type) where MY-DOCUMENTATION-TYPE is user-defined?
<Bike> you can totally already do that, my droog
<phoe> Oh wait, I can already define methods on it
<phoe> WOW!
pierpa has quit [Ping timeout: 260 seconds]
<phoe> For some reason, I was blind to that fact. Thanks!
pierpa_ has joined #lisp
<scymtym> it would still be interesting to have additional parameters for specifying things like the format or language
<beach> Indeed.
<beach> Now, luckily, nothing really depends on DOCUMENTATION so we can just not use it, and use something better instead.
<phoe> or decide to extend the standard and add a &KEY to #'DOCUMENTATION
<beach> Then you have to convince the maintainers of every Common Lisp implementation.
<malice> and hope people will use it
<phoe> Yep. So it would be better to do something like #'TRIVIAL-DOCUMENTATION:DOCUMENTATION that falls back to #'CL:DOCUMENTATION when it can.
<malice> since it's non-standard
<shangul> phoe, I'm now downloading the youtube videos
<scymtym> the Julia people make good use of their (more) generic dispatch for a similar problem: https://docs.julialang.org/en/latest/base/io-network/#Base.Multimedia.display
<phoe> shangul: okay.
<shangul> beach, So the only benefit of an specified editor is that I can run my program with a single keystroke?
<phoe> shangul: no
<phoe> you can program it incrementally, you can use the debugger, the inspector, the stepper and various other small tools
<beach> shangul: No. The benefit is that you can develop your program incrementally.
pioneer42 has left #lisp [#lisp]
<phoe> you can compile/link/run any program with a single keystroke if you make a trivial keybinding to something like "sh make && ./a.out"
<phoe> except this does not give you all of the interactivity of Lisp
<shangul> phoe, there is something which I don't understand, yet. Should I ask you or just follow the book(PCL)?
<shangul> "you" means the channel
<beach> shangul: The beauty of Common Lisp is that there is no distinction between compile time and run time. A program is just a series of modifications to the state of the initial image. We take advantage of this fact by making very small modifications and testing each modification before going to the next one.
<beach> shangul: You can ask here. If the question is not suitable, you will be told.
<phoe> shangul: you should follow PCL, yep. just make sure to get yourself a proper editor&environment first.
<phoe> https://portacle.github.io/ is the suggested environment for beginners. It's an emacs+sbcl+slime+quicklisp+git distribution.
<beach> shangul: Also, let me point out an important thing. If you decide to use an editor other than Emacs, and by doing so you end up with code that is badly indented, you will be told to indent it correctly if you try to submit it for people here to read.
<shangul> well I see that I can write my code with an editor, then compile and get a binary(and go like C/C++) or execute it with interrupter(like Python/Perl/etc) and this seems fine.
<shangul> I mean this already seems okay. Why should I get something else and bother?
<beach> shangul: You will understand why, once you try it and get used to it.
<shangul> aha
<Shinmera> phoe: Note that documentation-utils already has support for custom documentation syntax -- the only requirement being that it just converts to a string somewhere. So you can already define an extension to it that would be "backwards compatible".
jealousmonk has quit [Read error: Connection reset by peer]
<beach> shangul: Nobody forces you to do anything you don't want. We are just giving you advice, and telling you about the consequences if you don't follow this advice.
<beach> shangul: Incremental program development and testing will make you more productive than the traditional edit-compile-link-run cycle. If you don't want to be productive, there is nothing we can do about it.
<shangul> beach, the problem's not that I don't want. the problem's that I don't want to do what I don't have any reason to. and that's probably because I've worked with other languages before
<Shinmera> Making things more convenient sounds like a very compelling reason to me, and SLIME is exactly that.
<Xach> I like mikel evins's analogy: interactive languages are like teaching an eager assistant, versus building from plan
<beach> shangul: Well, stuff like that is hard appreciate without actually trying it out. So there is really no way to convince you a priori other than to ask you to trust the advice.
<shangul> beach, okay. seems now I should just follow what you and the books says.
<shangul> s/books/book/
<beach> That is what we are all hoping by giving you this advice.
<TMA> shangul: in a sense learning to use an editor is waste of time when you are proficient enough with the card puncher
<shangul> TMA, I don't understand.
segmond has left #lisp [#lisp]
SenasOzys_ has joined #lisp
rumbler31 has joined #lisp
<TMA> shangul: in the history computer input was performed by feeding paper cards with holes; if you were proficient with the machine for making the holes you would see no advantage in using an interactive editor for editing the programs. same way if you are proficient with the edit-compile-link-run workflow, the REPL workflow does seem worse (because it is a yet another new thing to learn)
rumbler31 has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
<pierpa_> Every time you compile and run a C/C++ program you are restarting from 0. In lisp you have a live image that you modify. You don't get all your data structures wiped away every time you have to modify a detail.
<shangul> TMA, So you are saying because I've worked with an interactive editor I know its advantages over past methods
pierpa_ is now known as pierpa
BlueRavenGT has joined #lisp
<TMA> shangul: yes. but because you have not worked with the REPL, you do not yet know its advantages
<shangul> pierpa, How about interrupted languages? In these we don't need to restart from 0
<shangul> TMA, I've got your point.
<beach> shangul: Do you mean "interpreted"?
<pierpa> never heard this term
<beach> shangul: There is no such thing as "interpreted language".
<shangul> beach, pierpa, I think I misspelled it.
<pierpa> Ok
<beach> shangul: Any language can be implemented with either a compiler or an interpreter or both. What you are thinking of as an "interpreter" may very well be a compiler that compiles the code on the fly.
jonh has joined #lisp
rumbler31 has quit [Ping timeout: 265 seconds]
<shangul> beach, yes
<beach> shangul: The distinction is important because "interpreter" often implies "slow". So people who think that Common Lisp is interpreted also think it is slow.
<beach> shangul: This is not the case. Modern Common Lisp implementations compile the expressions as you type them.
<shangul> I know
<beach> Good.
<shangul> (well just this part)
<pierpa> Then of course CL would be a better language even if the only implementations available were batch compilers
<beach> shangul: Conversely, people think that "compiler" think that it must process an entire file and create object code as output. Again, this is not true.
<TMA> shangul: I personally use the edit-compile-run cycle most of the time even with common lisp. On the other hand, I do use the REPL a lot while debugging and during exploratory work. the workflows tend to complement each other well
<shangul> beach, the entire file or a part of it
<beach> shangul: What do you mean?
<shangul> beach, compiler may skip parts of the code. for example with #if of #ifndef preprocessors in C
<beach> Sure. But the point here is that an interactive (not interpreted) system is able to compile one expression at a time, and no object file is generated.
<phoe> Shinmera: I see. That could be useful.
<Shinmera> I think shka_ already published an extension like that for his own preferred syntax.
<Shinmera> Also note that both documentation-utils and staple have support for letting you add additional "symbol types" that you can then document like anything else.
Pixel_Outlaw has joined #lisp
<Shinmera> ::look up radiance hook radiance-core:startup
<Colleen> Hook radiance-core:startup https://shirakumo.github.io/radiance#HOOK%20RADIANCE-CORE%3ASTARTUP
<Shinmera> ^as an example of that
nsrahmad has joined #lisp
<slyrus_> Shinmera, is there a summary of why one might want to use radiance over, say, caveman/clack/lack anywhere?
<Shinmera> I don't know why one would want to use caveman/clack/lack, so I can't tell you.
<Shinmera> As in, I have no experience with them.
pierpa has quit [Ping timeout: 260 seconds]
<Shinmera> What I can tell you is that their goals are different. Radiance is not a traditional web framework in that its goal is to provide you with tools to let multiple applications run on the same site, rather than just giving you tools to build a website.
rotty has quit [Ping timeout: 265 seconds]
<Shinmera> It is also different from a number of frameworks in that it makes no direct requirements about templating, database, etc.
pierpa has joined #lisp
<Shinmera> There are strong suggestions on which to pick due to my own preferences, but it is built with the intention of allowing you to choose whatever you want.
<Shinmera> Or rather, it is built without any knowledge about what you're going to pick, but certain systems already have integration libraries in place because I wrote them, so they're more convenient. If you prefer others you could easily write your own integration though.
<slyrus_> ok, I'll take a look. I've been reasonably happy with caveman/etc... but it's always nice to have options.
<Shinmera> I'm always happy to hear people's thoughts.
pierpa has quit [Ping timeout: 260 seconds]
pierpa has joined #lisp
sauvin has quit [Ping timeout: 260 seconds]
EvW has joined #lisp
Oladon has quit [Quit: Leaving.]
pierpa has quit [Ping timeout: 260 seconds]
sauvin has joined #lisp
joh11 has quit [Ping timeout: 240 seconds]
nsrahmad has quit [Quit: Leaving]
<Xach> hunchentoot is complicated and you can make something useful without going through all its machinations
<Xach> that is a random thought, sorry.
karswell has quit [Remote host closed the connection]
rotty has joined #lisp
mflem has joined #lisp
joh11 has joined #lisp
jealousmonk has joined #lisp
orivej has joined #lisp
energizer has joined #lisp
vypr has joined #lisp
lnostdal has quit [Read error: Connection reset by peer]
lnostdal has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
<flip214> Xach: but it's easy-handlers _are_ easy to use...
shangul has quit [Quit: sudo rm -rf /usr/*]
orivej has quit [Ping timeout: 276 seconds]
<thorondor[m]> flip214: you could try with this for Hunchentoot: https://github.com/mmontone/easy-routes
fikka has joined #lisp
nmajo has quit [Ping timeout: 260 seconds]
<flip214> thorondor[m]: looks interesting, too. and it's already in QL!
<thorondor[m]> yep :)
energizer has quit [Remote host closed the connection]
<flip214> thorondor[m]: but it's missing a genform that gives a <form ...> with hidden fields for POST parameters! ;)
scymtym has quit [Ping timeout: 260 seconds]
<thorondor[m]> I don't know what you mean, but you can declare post parameters like &post <my-post-arg>, etc
<thorondor[m]> you have cl-forms for form handling
rotty has quit [Ping timeout: 276 seconds]
fikka has quit [Ping timeout: 268 seconds]
hhdave has joined #lisp
hhdave has quit [Client Quit]
vypr has quit [Quit: The Lounge - https://thelounge.github.io]
joh11 has quit [Ping timeout: 260 seconds]
vypr has joined #lisp
energizer has joined #lisp
nmajo has joined #lisp
jealousmonk has quit [Ping timeout: 260 seconds]
energizer has quit [Remote host closed the connection]
energizer has joined #lisp
rotty has joined #lisp
nowhere_man has joined #lisp
scymtym has joined #lisp
SenasOzys_ has quit [Quit: Leaving]
SenasOzys has joined #lisp
fikka has joined #lisp
<phoe> Where does the standard define valid functional types for FTYPE?
pagnol has joined #lisp
d4ryus1 is now known as d4ryus
fikka has quit [Ping timeout: 264 seconds]
SenasOzys has quit [Read error: Connection reset by peer]
SenasOzys has joined #lisp
jealousmonk has joined #lisp
warweasle has joined #lisp
EvW has quit [Ping timeout: 255 seconds]
dieggsy has joined #lisp
tomlukeywood has joined #lisp
kerrhau has joined #lisp
kerrhau has quit [Changing host]
kerrhau has joined #lisp
SenasOzys has quit [Quit: Leaving]
SenasOzys has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
SenasOzys has quit [Client Quit]
SenasOzys has joined #lisp
rotty has quit [Ping timeout: 255 seconds]
jealousmonk has quit [Quit: Leaving]
fikka has joined #lisp
FreeBirdLjj has quit [Ping timeout: 264 seconds]
rotty has joined #lisp
<Bike> you can use any type in an ftype. of course since it's a function, you're lying if it's not some kind of function type
<Bike> but you could use a deftype type that expands into function, and such
<phoe> Bike: I'm writing some code that expands into DECLAIM FTYPE, and I need to construct function types.
fikka has quit [Ping timeout: 245 seconds]
janivaltteri has joined #lisp
fikka has joined #lisp
frgo has joined #lisp
milanj has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
shka has joined #lisp
shka_ has quit [Ping timeout: 256 seconds]
loli has quit [Quit: WeeChat 2.1]
loli has joined #lisp
jmarciano has joined #lisp
<LdBeth> joh11: [LdBeth: a bit late...] nice to hear that
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
dieggsy has quit [Remote host closed the connection]
dieggsy has joined #lisp
karswell has joined #lisp
pierpa has joined #lisp
sabrac has joined #lisp
<sabrac> Looking for recommendations on code to read with threads and clos finalization with inherited classes.
<phoe> sabrac: inherited classes?
<phoe> oh, you mean which thread the finalizers are run in?
<sabrac> yes
SuperJen has joined #lisp
<phoe> sabrac: what is your implementation?
<phoe> because SBCL tells us that http://www.sbcl.org/manual/#Finalization
Jen has joined #lisp
JenElizabeth has quit [Ping timeout: 260 seconds]
SuperJen has quit [Ping timeout: 240 seconds]
dddddd has quit [Ping timeout: 260 seconds]
EvW has joined #lisp
<sabrac> :phoe I am testing in many different implementations for postmodern, so I cannot rely on just sbcl.
<sabrac> Someone has run into a race problem when using many threads and I am trying to find best practices to solve
<phoe> sabrac: what are you finalizing?
<phoe> (defvar *finalizer-lock* (bt:make-lock)) (finalize obj (lambda () (with-lock-held (*finalizer-lock*) ...)))
<phoe> would be slow as hell but also safe for sure because no two finalizers would execute at the same time
<phoe> yep, I see
jmarciano has quit [Read error: Connection reset by peer]
Fare has quit [Ping timeout: 276 seconds]
<Shinmera> cl-out123 does some finalization of C data that tries to deal with threads "nicely". I don't know how applicable that is to your case though
<Bike> so... mop finalization rather than finalizers.
<Shinmera> Meaning inheritance finalisation?
<Bike> yeah.
<Shinmera> oh
<Bike> on the bright side, much more standardized.
<Shinmera> Well, redefining classes while threaded is usually bad juju
<Bike> i think it's more there's a custom metaclass which is doing some weird thing
ebrasca has joined #lisp
<sabrac> Bike has it right.
hiroaki has quit [Ping timeout: 268 seconds]
<Bike> you can make the (unless (class-finalized-p class) (finalize-inheritance class)) a critical session and i think that would about do it
<Bike> but i don't fully understand this problem.
dddddd has joined #lisp
equwal has joined #lisp
heisig has quit [Quit: Leaving]
equwal has quit [Remote host closed the connection]
vlatkoB has quit [Remote host closed the connection]
raynold has joined #lisp
_whitelogger has joined #lisp
ryanbw has joined #lisp
fikka has joined #lisp
joh11 has joined #lisp
TCZ has joined #lisp
Oladon has joined #lisp
pagnol has quit [Quit: Ex-Chat]
SenasOzys has quit [Remote host closed the connection]
SenasOzys has joined #lisp
Jen has quit [Read error: Connection reset by peer]
SuperJen has joined #lisp
lnostdal has quit [Ping timeout: 264 seconds]
fisxoj has joined #lisp
fortitude_ has joined #lisp
Jen has joined #lisp
SuperJen has quit [Read error: Connection reset by peer]
sabrac has quit [Quit: Konversation terminated!]
wigust has quit [Ping timeout: 255 seconds]
damke_ has quit [Ping timeout: 264 seconds]
<sjl> Shinmera: hey, the example of translation/scaling/rotation on https://shinmera.github.io/3d-matrices/ fails with a type error, because the last step is multipling a mat4 with a vec3
* Shinmera is embarrassed
<Shinmera> I'm busy right now, but I'll take a look in about an hour.
<sjl> also in `(let ((mat (mat4 1))) ...` should that be (meye 4) instead of (mat4 1) or am I missing something?
<sjl> shouldn't you start with the identity matrix to build up the transforms
<sjl> ?
<Shinmera> You are right, yes.
EvW has quit [Ping timeout: 255 seconds]
joh11 has quit [Ping timeout: 260 seconds]
<sjl> Shinmera: Also, would you be interested in a patch that added `1` to swizzling? So you could e.g. `(vxy1 some-vec-2)` to convert a bare 2d vector to a 2d homogenous-coords-style. Or is there a cleaner way to do that?
<sjl> (vec3 (vx somevec) (vy somevec) 1) is a lot of typing
<Shinmera> Adding even more swizzling is making me a bit uncomfortable. It's pretty extreme already as is.
<Shinmera> Let me think
<sjl> no rush, I've gotta head out for the day pretty soon anyway
EvW has joined #lisp
<Shinmera> I guess I could change n/vorder to accept numbers as arguments as well so you could do (vorder vec :x :y 1)
tomlukeywood has quit [Quit: tomlukeywood]
<Shinmera> No, actually, that doens't work
<Shinmera> and would be pretty bad in terms of violating expectations
Nouv has joined #lisp
jealousmonk has joined #lisp
TCZ has quit [Quit: Leaving]
orivej has joined #lisp
dddddd has quit [Remote host closed the connection]
TCZ has joined #lisp
Pixel_Outlaw has quit [Quit: Leaving]
<makomo> is there an error in the first example of HANDLER-CASE? http://clhs.lisp.se/Body/m_hand_1.htm
<makomo> the (setq #1# temp) in the first lambda?
<makomo> shouldn't it be #2#?
dieggsy has quit [Ping timeout: 276 seconds]
<Bike> probably.
fisxoj has quit [Quit: fisxoj]
<makomo> not a big deal i guess, but is there a procedure for dealing with errors like these?
<makomo> i presume other errors have been found over the years too, are they collected somewhere?
<Shinmera> makomo: Examples are not normative
<makomo> Shinmera: of course, but still an error/type
<makomo> typo*
<Shinmera> Sure, but it's not a big deal.
<makomo> yeah, true
<makomo> Bike: nice, thanks
ldb has joined #lisp
ldb has quit [Read error: Connection reset by peer]
ldb has joined #lisp
ldb has quit [Read error: Connection reset by peer]
ldb has joined #lisp
<ldb> sup. now my irc client supports switch channel
paul0 has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
warweasle has quit [Quit: Leaving]
random-nick has quit [Read error: Connection reset by peer]
jason_m has joined #lisp
orivej has joined #lisp
Pixel_Outlaw has joined #lisp
<asarch> Is the Half-Life 2 logo a lambda symbol?
<asarch> It is, isn't it?
orivej has quit [Ping timeout: 240 seconds]
<asarch> I got the "An Introduction to Functional Programming Through Lambda Calculus" book from Greg Michaelson
<Shinmera> The half-life of atomic decay is denoted by lambda in physics.
Arcaelyx_ has joined #lisp
<asarch> Thank you Shinmera
Arcaelyx has quit [Ping timeout: 245 seconds]
dieggsy has joined #lisp
<asarch> "λ is a positive number called the decay constant of the decaying quantity."
<asarch> Thank you very much :-)
Nouv has quit [Remote host closed the connection]
fisxoj has joined #lisp
ldb has quit [Ping timeout: 265 seconds]
damke_ has joined #lisp
fourier has quit [Ping timeout: 256 seconds]
nalik891 has quit [Ping timeout: 255 seconds]
TCZ has quit [Quit: Leaving]
jason_m has quit [Ping timeout: 260 seconds]
janivaltteri has quit [Quit: leaving]
nalik891 has joined #lisp
raynold has quit [Quit: Connection closed for inactivity]
jason_m has joined #lisp
SenasOzys has quit [Remote host closed the connection]
SenasOzys has joined #lisp
<esthlos> what are my options when I want to mapcar a macro, or why is it bad to want to do this in the first place?
Cthulhux has quit [Ping timeout: 264 seconds]
<Bike> what macro is it
<pfdietz> The decay constant and the half life are different (but related) things. t_1/2 = (ln 2) / lambda.
earl-ducaine has joined #lisp
Cthulhux has joined #lisp
<LdBeth> esthlos: you could consider inline function or compiler macros
fikka has quit [Ping timeout: 240 seconds]
<LdBeth> And what macro is it?
ldb has joined #lisp
ldb has quit [Remote host closed the connection]
fikka has joined #lisp
ldb has joined #lisp
<esthlos> I need a bunch of classes which are basically identical (but will have different behaviors in different methods)
fikka has quit [Ping timeout: 240 seconds]
<Bike> mop ensure-class
<Bike> i wouldn't design things that way if i were you, though
<esthlos> my idea was to have a macro (defmacro foo (type-symbol) `(defclass ,type-symbol (something) ()))
<esthlos> yeah, it's a bad design, not sure what to do
<esthlos> thanks
<Bike> do you know all the names at compile time?
<esthlos> yes
<Bike> then just write a macro
<Bike> (defmacro defclasses (&rest names) `(progn ,@(loop for name in names collecting `(defclass ,name ...))))
<esthlos> I just want to create a bunch of classes without a list of defclasses
<esthlos> will those classes be bound in the global environment?
<Bike> yeah
<esthlos> cool, i'll do that until I have a better architecture
lemonpepper24 has joined #lisp
<esthlos> thanks again
fikka has joined #lisp
varjag has quit [Ping timeout: 240 seconds]
Cthulhux has quit [Changing host]
Cthulhux has joined #lisp
DataLinkDroid has joined #lisp
fikka has quit [Ping timeout: 265 seconds]