cromachina has joined #lisp
Kundry_Wag has joined #lisp
wxie has quit [Remote host closed the connection]
Amplituhedron has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
jmercouris has quit [Remote host closed the connection]
<nyef`> jasom: Could this be a variant on https://bugs.launchpad.net/sbcl/+bug/998946 ?
peccu2 has quit [Read error: Connection reset by peer]
peccu2 has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
fikka has joined #lisp
red-dot has quit [Remote host closed the connection]
red-dot has joined #lisp
``Erik has quit [Ping timeout: 264 seconds]
``Erik has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
pedh has joined #lisp
pierpa has quit [Quit: Page closed]
markong has quit [Ping timeout: 264 seconds]
sebboh has quit [Ping timeout: 250 seconds]
pedh has quit [Ping timeout: 240 seconds]
<AeroNotix> jasom: you should really pare that down to a very small example, I can't run that code you've given me without libraries/etc
Kundry_Wag has joined #lisp
lisp_guest has quit [Ping timeout: 265 seconds]
ketralnis has left #lisp ["Textual IRC Client: www.textualapp.com"]
anunnaki has joined #lisp
pedh has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
pedh has quit [Ping timeout: 256 seconds]
ChadMcNugget has quit [Quit: Leaving]
QualityAddict has quit [Read error: Connection reset by peer]
fikka has joined #lisp
QualityAddict has joined #lisp
earl-ducaine has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
<earl-ducaine> Lisponians! Re: style (and maybe functionality), is there ever a reason not to use iterate over loop if you're so disposed?
<earl-ducaine> e.g., iterate no longer mainted, not as reliable, not as fast, some think it looks barbaric, ambigously defined, keeps you from learning loop, as God intended, etc.
<nyef`> It's an extra dependency.
<nyef`> If you're willing to pay that price, plus the price of inconveniencing anyone who doesn't use/know/like iterate that might want to hack on your code, feel free.
<earl-ducaine> nyef`: Which is not trivial issue, as I'm learning trying to get Garnet to work on a second, non-sbcl CL, so I can get it accepted into quicklisp. Total dependancy hell.
karswell has quit [Ping timeout: 240 seconds]
karswell has joined #lisp
hexfive has quit [Quit: WeeChat 1.9.1]
tko has joined #lisp
Arcaelyx has quit [Quit: Textual IRC Client: www.textualapp.com]
zaquest has joined #lisp
pedh has joined #lisp
pedh has quit [Ping timeout: 256 seconds]
Baggers has quit [Ping timeout: 265 seconds]
<aeth> earl-ducaine: If you want idiomatic Lisp instead of that loop language, what tends to work is to just write macros on top of do, do-foo, etc. Even occasionally mapfoo, e.g. I wrote a do-hash-table on top of maphash.
<aeth> What I find is that loop is usually only necessary (as in, a fast alternative will be a mess to write) for collect. There are also possibly a handful of other, very rare forms in loop that I've never encountered.
<aeth> do isn't really that bad, it's basically let with two additions: an optional step clause (which is functional, so use 1+ instead of incf, etc.) and a terminating condition with an optional return clause after that.
<aeth> Unfortunately, nearly everyone uses loop, so if you directly use do, people will complain, even though do is perfectly readable if you're used to it.
<aeth> I suspect iterate will be even worse than do in terms of complaints because at least do's built into the language and is in related languages like Scheme, too.
<basket> DO feels like writing C
<aeth> Really? do is purely functional, or at least you can model it that way.
<basket> Not in Common Lisp it isn't
<basket> In Scheme it's implemented over lambda application, but the CL version is just a C-style for loop
<basket> It has different semantics in CL and Scheme with regards to closures for that reason
<aeth> Even though under the hood it is using tagbody with go and setting the step each iteration, it behaves nearly exactly equivalent to Scheme's do form (afaik, the only difference is the implicit tagbody for local gotos, which only exists in CL), which is implemented tail-recursively.
fikka has joined #lisp
<aeth> And, I suppose, a few other edge cases, like apparently closures.
<nyef`> Mmm. Every time I run into a DO in CL I have to pull up the relevant CLHS page.
<basket> aeth: It isn't any more 'functional' than a C-style for loop; it's functional to the extent that the C equivalent is
<aeth> basket: but, anyway, I treat any do without a body (which can easily be half of them, except maybe some type declarations or temporary print statements) as purely functional.
Kundry_Wag has joined #lisp
<nyef`> On the one hand, clearly I don't use it enough. On the other, clearly its syntax and semantics aren't memorable enough.
<basket> Do you feel that way about for loops with empty bodies in C?
<aeth> The macroexpansion of it is irrelevant. It's not actually setting.
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<aeth> basket: do has a return clause in CL
<basket> That's a strange opinion, I think
<aeth> do without a body is used purely for its return value.
<aeth> because it is an expression.
<aeth> This is nothing like C.
<aeth> Ultimately, all functional programming is implemented in an imperative way.
SuperJen has joined #lisp
<basket> It is 100% like C except it implicitly assigns a single variable for you whereas in C you have to do it explicitly
<basket> Otherwise there is no difference whatsoever
<aeth> Imo, this is a pure functional (and inefficient) way to generate the number 43: (do ((i 0 (1+ i))) ((> i 42) i))
<aeth> There is no explicit setting there, and even though do is implemented imperatively, it could easily be implemented other ways as well. The actual under-the-hood details of the macro don't matter.
ryanbw has joined #lisp
<basket> It's purely functional to the extent that 'int i; for (i = 0; i <= 42; ++i) ;' is
<basket> It is working with mutable variables in ways that are a part of its visible semantics
fikka has quit [Ping timeout: 265 seconds]
<basket> The fact that you can choose not to take advantage of that doesn't make it different
JenElizabeth has quit [Ping timeout: 240 seconds]
<nyef`> int foo (int i) { if (i <= 42) { return foo(i + 1); } else { return i; } }
<aeth> basket: the difference is that in the C case, you're quite explicitly repeatedly incrementing the variable i. In the CL do case, you're returning the result of an expression.
<nyef`> Only, you know, as an anonymous function that is immediately called with 0 as a parameter.
<aeth> basket: and they're not directly equivalent, the scopes are different.
Kundry_Wag has quit [Ping timeout: 272 seconds]
<aeth> The i is internal to the do expression, and since it is not being explicitly set, I do not consider that as imperative.
<basket> aeth: But it is being set as a mutable assignment. That is part of DO's semantics
<basket> If it worked how it did in Scheme a lot of Lisp programs would break
<nyef`> ... Somewhere or other there needs to be a paper (or article) titled "The evolution of scopes in Lisp".
<aeth> basket: But that part is irrelevant if you're not using it.
atgreen has joined #lisp
<basket> aeth: Yes, C is the same way
<aeth> C is not the same way.
<basket> Why not?
<aeth> C is explicitly mutable, even in your simple example.
<basket> I is being mutably reassigned, even in your simple Lisp example
<basket> It being implicit about it doesn't mean it isn't happening, and it isn't hard to write programs that show it's happening
<basket> Similarly, it's not hard to write C programs that would work whether or not it worked as in Scheme with rebindings
d4ryus1 has joined #lisp
<aeth> If you write a program that shows that it's happening, then you're no longer using do in a functional way.
whoman has quit [Read error: Connection reset by peer]
<aeth> It's not hard to produce useful do programs without any visible side effects. Sure, the variables still implicitly mutate, but they mutate in controlled ways, which is pretty much how functional programming works under the hood anyway.
<basket> Yes, but the fact that DO exposes an imperative interface, and it's your responsibility to only use it in a way that does not take advantage of that, means that calling DO a purely functional operator is nonsense
d4ryus has quit [Ping timeout: 264 seconds]
<basket> It is an imperative construct that produces visible side effects as a result of operating on mutable state
<aeth> That's how you do purely functional programming in CL. You can override it, but you show discipline and don't.
Jen has joined #lisp
<basket> You can use it in a functional way, the same way you can use anything in a functional way
<basket> Including C
<basket> aeth: CL has lambda, actually
Jen is now known as Guest97875
Rawriful has quit [Quit: WeeChat 1.4]
<aeth> You can't really write functional C to any meaningful extent. You'll be combating the langauge every step of the way.
<aeth> And if you do that by some miracle, it'll be pretty slow because the langauge isn't made for that.
SuperJen has quit [Ping timeout: 272 seconds]
<basket> aeth: How is using mutable state purely functional?
<aeth> Purely functional is an abstraction on top of something that is actually mutable.
<basket> I thought your argument was that you can use it in such a way that the mutable state is localised and presents an immutable interface, like your specific DO example
<basket> That's not hard to do in C
<aeth> It's much harder to do in C than CL.
Devon has joined #lisp
<basket> If you're ok with hiding what's going on in CL, why would you stop at a C-style for loop but with return values?
<basket> That seems like a very low level interface
<aeth> How do you do multiple return values in a pure way in C?
<basket> What do multiple return values have to do with functional programming?
<aeth> I'm just demonstrating something that you can do trivially in a pure FP way in CL, but afaik cannot do trivially in a pure FP way in C.
<basket> What?
<aeth> Multiple return values are quite useful. C idioms to emulate this don't really mix well with FP.
<basket> It's totally irrelevant to functional programming
<basket> ML, Erlang, Haskell, most Schemes, etc, don't have multiple return values
<aeth> Idiomatic C is afaik to do something equivalent to multiple return values is pass by reference and mutate. I suppose a potentially pure alternative is to return a data structure that holds the multiple values, but because C isn't GCed, you now have to manage that.
<aeth> Actually, I think most Schemes do have multiple return values. And it even made its way into the standard document. It's there in r7rs at the very least.
<basket> What does it have to do with functional programming?
<aeth> The specification for Scheme is quite picky about what it lets in because people want it to be minimal.
<basket> Does the standard include it because you can't implement it with lambda application, then?
wxie has joined #lisp
<aeth> basket: Looks like you can implement it with call/cc in Scheme, apparently.
anunnaki is now known as vertigo
<basket> call/cc isn't functional
<aeth> Anyway, while FP doesn't require multiple return values, I use multiple return values all the time, *especially* in my functional CL code. If you return multiple non-boxed values (e.g. fixnums or (in 64-bit implementations) single-floats), you don't heap allocate. So it's very useful in CL pure functions.
<_death> usage of DO constitutes of two styles, those with a body and those without.. the latter is usually functional
Amplituhedron has quit [Ping timeout: 256 seconds]
<aeth> You can technically create side effects in the other forms like the return form or the step parts of the variable bindings. But this is rare, and if you're doing this, you'll probably be better off just making a regular style do with a body.
<basket> aeth: I would argue that multiple return values are more common in imperative code than functional code, in the form of out parameters. That's certainly an imperative interface, like DO, but you can use it in a functional way, like you can with DO, so I don't see how you could defend DO as functional but object to those as imperative
<basket> They're useful in either paradigm, though
<aeth> basket: Multiple return values enforce immutability when you're using them with basic things like numbers.
<basket> What?
<aeth> you can't redefine 42f0
<aeth> you can't mutate parts of it.
<_death> you can always use LIST instead of multiple values, they are simply for efficiency
<aeth> If you return (values 42f0 42f0 42f0) it's guaranteed pure. If you return (list 42f0 42f0 42f0) someone can (setf (car l) 41f0) or something once it's returned.
<basket> aeth: And if you use DO you are mutating the loop variables
<basket> You're giving DO a pass because you can write code that doesn't
<basket> You can also be disciplined in your use of out parameters
<basket> Code that doesn't take advantage of that mutation I mean
<aeth> basket: You're missing the importance here. If you're returning values, and then using those values in multiple-value-call, etc., you're ensuring that the whole section of code is purely functional because you're not using a data structure where discipline is keeping it from mutating. And, of course, if you're using data structures in CL, mutability will probably be more efficient, too.
<_death> you can think of DO as a recursive macro that's functional
<basket> aeth: But you said DO was ok because you can write code that doesn't take advantage of the mutation. DO does not enforce that you don't
<aeth> An entire section of code that works on multiple values, as returns and as parameters to a new function call, is pure. No way to cheat.
<_death> (that is, a macro that expands to iteration in the form of self-referncing functional call..)
<basket> So it has the exact same problems you are now complaining about
<aeth> If you mean do has problems over using a set of pure functions, yes.
<aeth> It has advantages, too, though. Usually more efficient.
<basket> Because it's a for loop
<basket> They're useful sometimes
<aeth> Do is not a for loop.
<basket> I was just objecting to you calling it functional
<basket> Yes it is
<aeth> If you think do is a for loop, you haven't seen advanced (ab)uses of do
<basket> It can return a value
<basket> That is the only difference
<basket> It is still an imperative construct built on jumps and mutable assignment, and that mutable assignment is part of its visible semantics
<aeth> That is a huge difference. for loops statements are necessarily used for their side effects while do is an expression
<basket> I don't understand how you can defend DO because you can write code that is oblivious to the mutable semantics, but you simultaneously write off out parameters because they allow writing code that takes advantage of it
<basket> DO also allows writing code that takes advantage of it, and you can also write code that is oblivious to the mutability in out parameters
<aeth> Using multiple return values of non-mutable objects like numbers enforces purely functional code in that section of the program. The performance overhead isn't high, and afaik most of that performance overhead is already paid for by implementing support for multiple return values in the first place, whether or not you use them. Inline those pure functions and good compiler magic can happen.
<aeth> That was my argument w.r.t. returning multiple values.
<basket> Yes, I'm saying it contradicts your point about DO
<basket> When you were talking about out parameters, you explained why your argument about DO was faulty
<_death> here is a simplistic functional DO: https://gist.github.com/death/3ca4dab9770ffce2910f853f08ad1b66
<aeth> Using do directly isn't perfect. It's much better to write a macro on top of do if you can get away with it.
<_death> (I am a bit drunk, so excuse the code :)
Guest97875 has quit [Remote host closed the connection]
<aeth> It's not a contradiction to make different design compromises in different parts of the program. It's idiomatic CL to do so. CL is incredibly multi-paradigm, perhaps the most multi-paradigm language out there.
Guest97875 has joined #lisp
<basket> aeth: But you said it was functional
<basket> That was your word
<aeth> do, like many parts of the CL standard, can be used in a functional way but is not required to be used in a functional way. This is especially apparent in iteration, e.g. map.
<basket> MAP is not required to use visibly imperative semantics
<aeth> map nil
<aeth> Do something useful with map nil without side effects :-p
<basket> That's what the function you give it does, not what MAP does
<aeth> You're splitting hairs. "map nil" exists because it's a common enough use of map.
<basket> Mutating the object being traversed in a call to map is explicitly undefined behaviour in the standard
<basket> DO's imperative semantics are explicitly laid out as its semantics
<basket> That is not splitting hairs
<basket> The fact that you can pass an impure function to MAP is not the same thing as MAP's interface *forcing* you to use mutable state
<aeth> "map nil" pretty much forces you to use a mutable state, just not the sequence(s) being iterated over.
<basket> That has nothing at all to do with how MAP works, aeth
<basket> It calls a function that it's passed; the body of that function is not part of MAP's definition
<aeth> It has everything to do with how map works. "map" provides support for a "nil" return so you can use it for dirty, impure things.
<basket> And if that function does something mutable that might affect how MAP works, it's UB
<aeth> UB that usually breaks things
Devon has quit [Ping timeout: 265 seconds]
<basket> You're confusing MAP with arguments to MAP
<aeth> map nil is essentially CL's foreach, especially since the other equivalent, dolist, only works on lists, not sequences in general.
<basket> Again, you're confusing functions with their uses
damke_ has joined #lisp
pedh has joined #lisp
kolb has quit [Read error: Connection reset by peer]
fikka has joined #lisp
<aeth> Is "for foo in foobar" pure if the language makes it UB if you mutate foobar? And if it's not pure, is there really that much of a difference between a lambda in map nil and a statement body in a for each statement?
mrcom has joined #lisp
mrottenkolber has joined #lisp
mrottenkolber is now known as Guest85270
SuperJen has joined #lisp
<basket> aeth: Yes, the specified part of its semantics are pure, provided that `foo` is a fresh binding on each iteration
damke has quit [Ping timeout: 264 seconds]
<basket> Because it has no inherently mutable semantics defined for it
<aeth> okay
<basket> It could be implemented as a macro on top of pure lambda application; it does not take advantage of mutable state
<basket> Neither of those are true for Common Lisp's DO operator
<aeth> correct
pedh has quit [Ping timeout: 240 seconds]
<aeth> The do operator is more of a super-iteration thing that wants to make everything possible. If you want to build your own iteration, pure or impure, and restrict it, you can directly use do, or use macros that probably directly use do like dotimes or dolist (although they're not required to use do)
fikka has quit [Ping timeout: 272 seconds]
Guest97875 has quit [Ping timeout: 264 seconds]
<aeth> You could write _death's functional-do on top of do.
<basket> aeth: And you can implement mutable semantics on top of lambdas, too; that's just turing completeness
<basket> That's the context in which Scheme's do was initially introduced
whoman has joined #lisp
<aeth> CL is basically a language for writing (mostly) efficient declarative languages, while not itself being declarative (which wouldn't really be possible, there are many kinds of declarative languages)
<aeth> I'm using the definition of declarative that includes FP under declarative. Wikipedia uses this definition.
Jen has joined #lisp
Jen is now known as Guest83509
<aeth> Another possible phrase other than 'declarative languages' would be 'fifth-generation programming languages'. This is sufficiently archaic enough that it might have been an explicit goal of CL.
atgreen has quit [Quit: atgreen]
<whoman> some people like to work with limbs, some like to play with guys. others prefer the clothings or outer garments, while others yet freely form their style
<aeth> You want ugly mutability to be possible in something like CL's do because you might need it when writing an interpreter or compile-to-CL compiler or whatever you're writing. If you want it to be functional, either restrict your use of do (through discipline) or build a pure macro on top of do (trivial)
<whoman> parens are like skeletal ribs,, =P
SuperJen has quit [Ping timeout: 272 seconds]
<whoman> when skeleton protrudes flesh, we have horns and other undesirable jagged and bony features. it is good that the system works right all together with itself. CL is ultra-powerful about that
<whoman> (smalltalk too iircafaik)
<dmiles> aeth: speaking of mutibility.. i have be struggling within DO deciding between compiling to prolog to use a mutable loop vs a non mutable loop :) non mutable loops are ugly to look at and debug
<dmiles> right now i doing non-mutable.. but about to change that
Devon has joined #lisp
<aeth> dmiles: that's a good question, and I haven't really found a satisfactory answer
ahungry has joined #lisp
<aeth> the mutability often makes it a million times clearer, yes
<dmiles> oh also non mutable lops secretly make the system slower
<dmiles> loops*
<dmiles> at least for mine
<nyef`> Aww... No bunny jokes?
<tko> which lisp do you guys prefer , I've been using clojure and at times elisp but I'm about to try common lisp
<aeth> dmiles: Have you considered writing custom iteration macros?
<nyef`> tko: This is a Common Lisp channel, so the argument here will be about particular Common Lisp implementations. SBCL being the best, of course. d-:
<dmiles> aeth: well i started out basing everything on tagbody compiel design for a worsecases jumping arround.. but indeed i might simplify it
<tko> aha oh ok, this is about my first time on irc, I'm connecting through emacs and just searched "lisp"
<aeth> tko: #lisp is for Common Lisp and possibly direct historical precursors to Common Lisp, ##lisp is for the Lisp family of languages.
<tko> I'm pretty sure sbcl is what I just installed
<tko> ok, thank you
milanj has quit [Quit: This computer has gone to sleep]
<aeth> dmiles: every time I've started out with tagbody and go, I've found do simplifies it
<dmiles> aeth: meaning i might need ot make 3-4 idioms that custom to my ideal
<dmiles> aeth: *nod* my DO convert to a tagbody
rawste has quit [Quit: ZZZzzz…]
<nyef`> tko: Also, whatever version of SBCL you just installed is probably out-of-date already. Last release was SBCL 1.4.2. Current git HEAD is 1.4.2.215 or so.
<aeth> dmiles: What I personally find useful for advanced things (and Prolog would count) is to write a lot of macros, and perhaps use those macros in other macros.
<aeth> that is... prolog?
<dmiles> yes
<nyef`> tko: But don't let that stop you. My primary installed SBCL is 1.3.8.26 or so, and I keep a 1.0.23 around for some things.
<dmiles> prolog sorta works wonderfully mixed with lisp
<aeth> That's definitely not the kind of Prolog they teach in schools!
<dmiles> lines 930-103 is of course lisp fiorms
<tko> nyef`: oh it won't, unless it turns out it has some new feature I really need
<dmiles> aeth: i write in imperative prolog about 50/50 from declarative.. i think they only teach declaritive
<nyef`> tko: Fair enough. I'm looking forwards to the 1.4.3 release, as a bug that I really need fixed just got fixed recently. As in within the last twelve hours.
Karl_Dscc has joined #lisp
<aeth> dmiles: I guess people who learn Lisp in school think it's about purely functionally processing lists (which is wrong on multiple levels) and people who learn Prolog in school probably think it's... sort of like SQL for classical logic, I guess. Define some relations and deduce things in a query.
jameser has joined #lisp
<nyef`> ... Given some of the stunts that I've pulled or seen pulled in SQL...
<dmiles> aeth: exactly
<aeth> nyef`: If you like abuse of SQL, wait until I complete the transitioning of my entity-component-system to an in-memory database. Then you'll see some fun abuse of queries.
<dmiles> i've always wanted to see a OO program be completely backed by a database
<dmiles> (it is onyl completely natural)
<aeth> dmiles: Does the MOP let you abstract over the concept of a slot completely? I might make an "ORM" of sorts to make things easier to debug and inspect interactively.
<dmiles> so far as a can tell so far, it does let me abstract over the concept of as slot (or field)
<dmiles> but i'd like to hear opinions as to where our thinking might break downj
dieggsy has joined #lisp
<aeth> well, if I can just say that the slot foo is really (aref whatever (id-to-index 42)) and slot bar is really (array-row-of-4 something-else (id-to-index 42)) then nothing's stopping me from writing an "ORM" of sorts.
<dmiles> teh difficult part for me (when putting objects into the cold storage of the database) is when people are messign with cones suppoedly in a slot
<dmiles> conses at a slot
pjb has quit [Remote host closed the connection]
<dmiles> i have to keep such a CONS in warm livving memory.. and make the coldly stored slot value a ppointer to live memory
<aeth> In case I was unclear, (array-row-of-2 some-array some-index) returns (values (aref some-array some-index 0) (aref some-array some-index 1)) and the setter is similar, except it'll take in n values (2, 3, or 4 depending on which one)
<aeth> I demonstrated the 2-length one instead of the 4-length one for obvious reasons.
tko has quit [Remote host closed the connection]
<aeth> dmiles: That's not an issue for me, since my "database" is just going to be abstractions over 1D or 2D arrays, depending on what's being stored (i.e. either a simple value or an array row)
<aeth> It can, of course, be written to disk for persistence, such as saving a game, although maybe save-lisp-and-die should be the only way to save a game :-p
<aeth> Types will be a bit of a problem because only character and bit arrays are guaranteed. In fact, with my approach, character arrays themselves are problematic.
<dmiles> what is returned by (values (aref some-array some-index 0) (aref some-array some-index 1)) going to be the values copied over or more liek places?
<dmiles> (i know in lisp this values copied over)
<aeth> At the moment, I only put in things that are (probably) specialized arrays so I don't have to worry about it. e.g. single-float or various integers or bits
<aeth> If I want to support more types, I'll have issues, and I'll also have to wrap around check-type in places etc.
pjb has joined #lisp
<aeth> dmiles: I don't think it copies ever, though.
<aeth> I'm pretty sure the only time you copy in CL is explicitly, e.g. copy-foo (a struct foo automatically define a copy-foo) or copy-seq
<dmiles> before you said specialized typed arrays i was sorta was imagining that you were copying a reference .. like a pointer to the nth index of the array
<dmiles> but that is a whole different concept from what you were taslking about
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
sjl has joined #lisp
<dmiles> i was thinking about how in some situations seeing what is even there at that refenrce is not needed until it was needed
<dmiles> (by whatever code used VALUES)
<Bike> numbers and characters can be copied by the implementation. that's basically it.
Karl_Dscc has quit [Remote host closed the connection]
wigust_ has quit [Quit: ZNC 1.6.5 - http://znc.in]
tko has joined #lisp
dieggsy has quit [Remote host closed the connection]
<beach> Good morning everyone!
<tko> bood morning
<dmiles> Bike any thoughts on aeth's and my question? <aeth> dmiles: Does the MOP let you abstract over the concept of a slot completely?
<Bike> i'm not sure what that means. you can definie pretty different slot concepts, at least.
<aeth> Well the actual use right now is to essentially copy with-accessors, but with the addition of an index because the accessors all have an additional index, with three possibilities: (aref foo index) (aref foo index another-index) (array-row-of-n foo index) where n is 2, 3, or 4 at the moment (doing it generally cannot be as efficient). The first two return a value, the third returns n values. The first two set one value, the third sets n val
red-dot has joined #lisp
<dmiles> i guess my question actualyl is: "can slots actually be the complete abstraction?"
<aeth> the third sets n values. (These are accessors, setf array-row-of-n is defined for sizes 2, 3, and 4)
<Bike> i have even less idea of what that means, dmiles
<beach> dmiles: Your recent questions make me more and more convinced that you don't know the semantics of Common Lisp.
sjl has quit [Ping timeout: 256 seconds]
<dmiles> beach: which question in particualr?
<beach> Well, not a question this time, but things like "like a pointer to the nth index of the array".
<dmiles> beach: perhaps aeth and i should discuss this in another channel
<aeth> an example of my abstraction in its current state: (with-selection ecs (entity-id) ((location (old-location old-location :row-of 3) (location location :row-of 3))) (setf old-location location))
<beach> dmiles: Whatever. I am not going to get involved.
<aeth> accessors can be ":row-of n" where n is 2, 3, or 4. These work with multiple values (either providing them or requiring them in the setf). It can also be e.g. "1" such as (location.y location 1) and it can also be something simple if it's not a 2D array, e.g. (foo? foo?) where foo? is, unfortunately a bit of 1 or 0 instead of a boolean. This is one place where the abstraction leaks. bit arrays are optimized, boolean ones are not.
<aeth> An object abstraction over this would probably be to get everything that's defined for some ID, and pretend that it's one object so it's easy to do something like e.g. print the object or inspect it in slime. This would be very easy if slots can return and set multiple values. I'm not sure if they can. And if they can, would it break the SLIME inspector?
<dmiles> aeth: good example
<Bike> multiple values aren't really a thing that can be stored, or a thing at all
<Bike> you would just have multiple slots
<aeth> That's not that big of an issue because there are two ways to access the 2D arrays, either one slot at a time (like my example where I bind a location.y) or as multiple values
<dmiles> aeth: by multiple values you mean they return the row?
<dmiles> aeth: by multiple values you mean the row?
<aeth> I may have to define official names for them, though. At the moment any slot names for a slot in a 2D array are only bound at the accessor level, i.e. (location.y location 1) binds (aref location some-index 1) to location.y in a symbol-macrolet not unlike with-accessors
<aeth> dmiles: Well, not really, since that would require bounds checking and this is for a game engine.
<aeth> dmiles: I defined array-row-of-2, array-row-of-3, and array-row-of-4 as accessors (both to get values and set values). You can use them improperly. If you e.g. (setf (array-row-of-2 some-array-with-length-four-rows 42) (values 1f0 2f0)) it'll just set the two fields. If you do the reverse and do array-row-of-4 on something with length-two rows, it will fail with a runtime error unless safety is 0, which no one should ever use.
EvW has joined #lisp
<Bike> i don't understand what multiple values have to do with slots. you defined some multiple value accessors, no big.
wxie has quit [Remote host closed the connection]
<dmiles> aeth: oh, i hear you, you are thinking about wether or not it is sensible to create an accessor
<aeth> Bike: If I can abuse the MOP to work somewhat like this as well, I create an alternative interface into the database that's more first-class within the language, so I could have more debugging power.
<dmiles> aeth: sensible in the sense that there is at least some translation in which debugging would be livable
nimiux has quit [Ping timeout: 240 seconds]
<aeth> i.e. if slots can simply access into the arrays similar to my accessors
notzmv has quit [Quit: WeeChat 2.0]
<Bike> i don't see what multiple values adds to debugging. they're not fun to debug, in my experience.
<Bike> if you were dedicated, you could probably define an alternate standard-object with a completely overriden allocate-instance so that slot values are stored in an array or whatever.
<aeth> well, multiple values allows me to do an easy copy, e.g.: (setf old-location location)
nimiux has joined #lisp
Kundry_Wag has joined #lisp
<aeth> or (setf location (values x y z)) as a way to initially set location
<Bike> sure, but that has nothing to do with slots.
<jasom> anyone know of a decent library for making a fininte state machine in lisp? something like a LABELS inside LOOP would be nice. Mutually recursive functions work with proper optimization settings, but I've been told not to do that in common lisp :P
<jasom> I can write it myself, but trying not to reinvent the wheel too much
<aeth> Bike: well, I was wondering if I could make a similar interface through CLOS, although I guess I *can*, just as accessors, rather than as slots, and the slots would have to use the direct one-value accessor.
<Bike> yes. that's what i'm saying. i don't understand why you want multiple value slots when you already have multiple value accessors.
<nyef`> jasom: Is there some reason that just writing your FSM out longhand is inappropriate?
<aeth> The main thing I'd want from CLOS is a way to see an ID as an object rather than a bunch of arrays that mostly contain irrelevant values. It doesn't even need to be efficient, since ideally it'd only be used for debugging purposes like defining a print-object.
<aeth> I would also ideally want to be able to use the SLIME inspector.
<aeth> Essentially, an alternative way to query.
<Bike> you have an alternate way to query, with your accessors.
<jasom> nyef`: well I find tagbody looks good for writing out longhand, but labels with a loop has the logic inside-out and is problematic to indent automatically.
<Bike> slots are like, the actual storage. you can access it multiple ways.
schoppenhauer has quit [Ping timeout: 264 seconds]
<jasom> but of course tagbody doesn't let you parameterize the states
Kundry_Wag has quit [Ping timeout: 240 seconds]
<aeth> Bike: Yes, but what I would want is a CLOS object that can have slots called e.g. location.x, location.y, location.z, etc. And then if I inspect that object, location.x will show the value of (aref location (id-to-index entity-id) 0) and location.y would show the value of (aref location (id-to-index entity-id) 1) etc.
<nyef`> What's the matter with the mutually-tail-recursive functions?
<Bike> what is location?
<aeth> location is more commonly known as position, but that name's taken in CL.
<Bike> what is it. where is it.
<aeth> It is an entity's position in the world. 3 single-float values, normally. Some systems use double-float if the worlds are massive.
<jasom> nyef`: people reading the code complain "This isn't scheme"
schoppenhauer has joined #lisp
<jasom> *cough* use integers for coordinates *cough*
<aeth> What it actually is, in my system, is a row of a 2D array.
<Bike> so you want an object that doesn't actually store its position, it just stores an index into some global array.
<aeth> not global
<aeth> It's an array in a struct in a struct.
<Bike> multiple objects have indices into this array? global enough.
<aeth> yeah
<aeth> At the moment the arbitrary cap is 2500
<Bike> okay, so, again, why do these need to be actual slots, rather than just accessors?
<jasom> and you can override print-object to show the actual coordinates ...
<aeth> I use accessors without having any standard-objects already, and it works fine.
<aeth> But I would like to be able to use the SLIME inspector, have defined print-objects, etc.
<dmiles> having slots is so you can at least feel like you are holding an object in your hands?
<aeth> i.e. I would like to make a CLOS object whose slots are accessors, if that's at all possible
<Bike> what is preventing you from defining a print object method
<jasom> structs are also standard-objects btw
<aeth> Bike: there is no object
<jasom> structs are also objects rather
<Bike> uh, so what argument would print-object be getting, exactly
<jasom> you can specialize print-object for any class, including structs
<Bike> as its... object
<jasom> clhs defstruct
<dmiles> having slots is so you can at least feel like you are holding an object in your hands? I see yes.. so you can use things like print-object can even change values on the target if needbe
<jasom> " defstruct without a :type option defines a class with the structure name as its name. The metaclass of structure instances is structure-class. "
<aeth> Bike: I can have an entity with the label cube which is mapped to the ID 42 which is mapped to the index 37 (well, I haven't written the third part quite yet, but that's coming very soon... at the moment IDs are the indices). The entity doesn't exist. There are many arrays.
<Bike> that doesn't answer my question
<aeth> Bike: The entity is index 37 in every array where I say the index 37 is valid.
<Bike> perhaps i should be more explicit. there is no need for you to use print-object for printing some non-object. you can have your own printing function to print it. this is no loss to you since nothing could possibly call print-object on your object because there is no object.
<Bike> if you wanted, you could define a kind of proxy object that just stores 37 and defines a bunch of accessors, but you haven't, which presumably you have some reason for.
<aeth> Well, I could (if I modify my query system to allow for an "all") write something called print-entity that queries all of the places where 37 is a valid index, and prints it as if it's one object.
<Bike> indeed.
<aeth> But I'm wondering how deep I can go in making a proxy object, which could have uses where the query macro(s) fail, although the performance would probably not make it anything useful outside of debugging.
<Bike> you can obviously define a proxy object and define a print object method on it that prints whatever you want, and the object having data in its slots is immaterial.
<aeth> If I could actually have proxy slots instead of proxy accessors, I could use the SLIME inspector itself.
<Bike> the inspector is trickier, but the inspector isn't customizable anyway.
<aeth> So does it not work on non-standard slot definitions?
<Bike> the inspector? the inspector is wholly implementation defined.
<Bike> i think swank has some kind of interface you can customize, but it might not be exported.
<Bike> you can customize describe, if that matters.
tom45 has joined #lisp
<tom45> hi
<aeth> It would be very useful (more useful than just a print, which I can do through a query macro with some small changes) if I could somehow inspect an object and see the slots as if it was an object, even though they're just slots in various arrays.
<Bike> well, look at swank::inspect-object
<Bike> that general area
tko has quit [Remote host closed the connection]
<beach> Hello tom45.
<Bike> swank:emacs-inspect, not that it's intended for you
<beach> tom45: Are you new here? I don't recognize your nick.
<aeth> Bike: thanks, looks like going beyond that it's defmethod all-slots-for-inspector ((object standard-object))
<aeth> in swank-fancy-inspector.lisp
<Bike> shorter version: if you want to inspect weird things, you don't need to parlay that into sweeping ideas about clos
tko has joined #lisp
<aeth> It looks like swank uses the MOP, so if the MOP is powerful enough to change the concept of what a slot is, I should be able to make it SLIME inspectable without having to modify swank. i.e. if I can make a slot a call to an accessor (well, actually two since I don't actually know what the index is, only what the ID is)
<Bike> does this legitimately strike you as more sensible than customizing the inspector
<aeth> The inspector is just what I know would be useful now. If I use the MOP, it's possible that there's a future use to the object abstraction.
<aeth> So I'm not sure.
tom45 has quit [Ping timeout: 260 seconds]
<aeth> One thing I could do that's probably easier and even less efficient is to have a query object, i.e. query into an object or something.
<aeth> This is probably the first thing that I would have thought of in a less powerful language without a MOP
LocaMocha has joined #lisp
LocaMocha has quit [Max SendQ exceeded]
pedh has joined #lisp
LocaMocha has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
<aeth> i.e. instead of having the object constructed via the MOP to directly access the slots, I construct an object in a similar way that I would do something like print-entity, except returning an object with populated slots from the accessors instead of writing to a stream.
pedh has quit [Ping timeout: 264 seconds]
<tko> hmm I just started CL a few minutes about coming from Clojure but I'm curious what this convo is all about
<tko> I don't know anything about MOP / CLOS, although CLOS is one of the first things I wanted to look into with common lisp
<tko> a few minutes ago coming from*
<aeth> tko: I have a very elaborate data structure. Because it's elaborate, it's not easy to inspect the contents in an intuitive way.
<aeth> One way to inspect the contents in an intuitive way would be to allocate a temporary standard-object (i.e. an object that's created with a CLOS defclass) that somehow has the same contents because those are trivial to inspect.
<aeth> Things are inspected through SLIME, the CL IDE for Emacs. swank is the protocol that SLIME uses to talk to a running CL.
<aeth> Technically, other editors and IDEs can write their own SLIME-like thing using swank, but nearly everyone programs CL in Emacs+SLIME.
<tko> so the temporary standard object would be like an object that contains all the values of your structure (or less) and that is organized in a way thats easier to read or interpret?
<aeth> sort of
myrkraverk has quit [Ping timeout: 268 seconds]
<aeth> It would combine all of the pieces of data that represent an entity into one object. Which would be 1/2500 of the data structure, if it's filled to the arbitrary constant cap I set for it.
<aeth> Well, worst case 1/2500.
myrkraverk has joined #lisp
<aeth> I think Bike's alternative approach would be to define methods that swank uses that are ultimately used by the SLIME inspector, i.e. create new things that swank will dispatch on as various relevant defmethods
<nyef`> aeth: Or you could "just" declare for SBCL and unportability and implement an INSPECTED-PARTS method.
nika has joined #lisp
Kundry_Wag has joined #lisp
<Bike> i mean, with the whole novel clos thing you're still relying on the inspector working in some particular way with slots
<aeth> Would that work, though? I want to inspect one particular ID stored in a large data structure. A simpler example would be e.g. inspecting one node in a tree by providing the tree and what to look up into the tree.
<Bike> just write your own inspector then, cl's only takes one object
<aeth> But since it's only used for debugging it doesn't need to be efficient. I could just allocate an object from a query and then inspect that. Although then if I'm inspecting it live I'd have to do some trick to avoid filling the heap.
pedh has joined #lisp
astronavt has joined #lisp
astronavt has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 240 seconds]
<aeth> Bike: Hmmm... Or... I could be really lazy and make an object that encapsulates two objects...
<Bike> so that you can take advantage of all the standard customization facilities that arne't real, makes sense to me
<aeth> i.e. two slots, the data structure and the ID
khisanth_ has quit [Ping timeout: 260 seconds]
<aeth> Bike: however non-standard things are, my own solution would be even more non-standard and even less supported
<Bike> well, my main advice is to try something out rather than write a dissertation over the course of two hours, i'd do well to remember that
pedh has quit [Ping timeout: 265 seconds]
orivej has quit [Ping timeout: 264 seconds]
Bike has quit [Quit: Lost terminal]
<dmiles> aeth: well i am glad that I was correct in imagining that you were copying a reference setf-able place
EvW has quit [Ping timeout: 265 seconds]
cromachina has quit [Read error: Connection reset by peer]
cromachina has joined #lisp
hyero has quit [Remote host closed the connection]
hyero has joined #lisp
sbryant has quit [Ping timeout: 240 seconds]
<aeth> dmiles: Well, I'm making local bindings to arrays (which does not copy the arrays themselves), and then using symbol-macrolet over accessors that are too complicated for with-accessors (such as aref or my custom array-row accessors)
hexfive has joined #lisp
ozzloy_ has joined #lisp
ozzloy has quit [Ping timeout: 252 seconds]
sbryant has joined #lisp
<dmiles> you know for these synthesized objects you are thinking about there is a system for synchronising them.. https://bitbucket.org/tarballs_are_good/cl-locatives
djh has quit [Ping timeout: 248 seconds]
djh has joined #lisp
<dmiles> you point the object at your proxy and your real thing.. when your proxy changes.. so does the real thing
<earl-ducaine> Out of fairness to other CLs and the libraries in the Quicklisp repo, the problem that I described as 'dependancy hell' (for ccl) was only that I was using the wrong CLX library. Once I installed a compatible one using ASDF everything else worked.
<dmiles> (the object= the locative)
<aeth> that looks like that solves a similar problem
SaganMan has joined #lisp
<aeth> my model is with-accessors, though.
<aeth> with accessors is the thing that can turn (foo some-object) into foo, so you can (setf foo 42) and it's really (setf (foo some-object) 42)
dddddd has quit [Read error: Connection reset by peer]
khisanth_ has joined #lisp
<dmiles> hrrm the package i was thinking of was actually was more in depth.. pjb suggested it to me the other week)
<aeth> I took the recommended way of implementing with-accessors and modified it to work on (aref a 42) (aref a 42 0) and my custom array row accessors
<dmiles> of course would still only been 10% of what you would write
<dmiles> and doing a proxy with-accessors makes good sense instated
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
damke_ has quit [Ping timeout: 264 seconds]
turkja has quit [Ping timeout: 248 seconds]
Xal has quit [Ping timeout: 265 seconds]
Xal has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
turkja has joined #lisp
Oladon has quit [Read error: Connection reset by peer]
Oladon has joined #lisp
Devon has quit [Ping timeout: 256 seconds]
pedh has joined #lisp
damke_ has joined #lisp
pedh has quit [Ping timeout: 240 seconds]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<aeth> dmiles: proxy with-accessors? as in an object that can call with-accessors (or, actually, with-entity-accessors in this case) on itself every second or something, to keep a somewhat up to date picture of what's going on? Could become a threading mess, though.
sjl has joined #lisp
sjl has quit [Ping timeout: 272 seconds]
EvW has joined #lisp
raphaelss has joined #lisp
vtomole has joined #lisp
rippa has joined #lisp
EvW has quit [Ping timeout: 240 seconds]
<dmiles> aeth: though it would update every second :P
shka has joined #lisp
pedh has joined #lisp
pedh has quit [Ping timeout: 240 seconds]
lisp_guest has joined #lisp
Devon has joined #lisp
dvdmuckle has quit [Quit: Bouncer Surgery]
Devon has quit [Ping timeout: 248 seconds]
ahungry has quit [Remote host closed the connection]
dvdmuckle has joined #lisp
vtomole has quit [Ping timeout: 260 seconds]
resttime has joined #lisp
zooey has quit [Remote host closed the connection]
lisp_guest has quit [Ping timeout: 240 seconds]
zooey has joined #lisp
turkja has quit [Ping timeout: 260 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
pedh has joined #lisp
basket has quit [Remote host closed the connection]
red-dot has joined #lisp
pedh has quit [Ping timeout: 265 seconds]
sjl has joined #lisp
fikka has joined #lisp
turkja has joined #lisp
sjl has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 248 seconds]
zooey has quit [Remote host closed the connection]
zooey has joined #lisp
shka has quit [Ping timeout: 240 seconds]
tko has quit [Ping timeout: 265 seconds]
mm__ has quit [Ping timeout: 260 seconds]
Devon has joined #lisp
pedh has joined #lisp
Devon has quit [Ping timeout: 264 seconds]
mishoo has joined #lisp
pedh has quit [Ping timeout: 272 seconds]
nalkri has joined #lisp
Murii has joined #lisp
mm__ has joined #lisp
``Erik_ has joined #lisp
fourier has joined #lisp
``Erik has quit [Ping timeout: 272 seconds]
pedh has joined #lisp
milanj has joined #lisp
pedh has quit [Ping timeout: 272 seconds]
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
josemanuel has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
fourier has quit [Ping timeout: 265 seconds]
damke has joined #lisp
damke_ has quit [Ping timeout: 246 seconds]
fourier has joined #lisp
resttime has quit [Remote host closed the connection]
Devon has joined #lisp
Devon has quit [Ping timeout: 240 seconds]
eve_ has joined #lisp
pedh has joined #lisp
eve_ has quit [Client Quit]
pedh has quit [Ping timeout: 272 seconds]
Kevslinger has quit [Quit: Connection closed for inactivity]
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
mm__ has quit [Ping timeout: 265 seconds]
pedh has joined #lisp
quazimodo has joined #lisp
pedh has quit [Ping timeout: 240 seconds]
fourier` has joined #lisp
fourier has quit [Ping timeout: 240 seconds]
wxie has joined #lisp
wxie has quit [Remote host closed the connection]
random-nick has joined #lisp
Tobbi has joined #lisp
Devon has joined #lisp
lisp_guest has joined #lisp
nirved has joined #lisp
Devon has quit [Ping timeout: 255 seconds]
random-nick has quit [Remote host closed the connection]
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
random-nick has joined #lisp
Tobbi has joined #lisp
Tobbi has quit [Client Quit]
Tobbi has joined #lisp
heurist` has quit [Ping timeout: 260 seconds]
heurist`_ has joined #lisp
Karl_Dscc has joined #lisp
SaganMan has quit [Ping timeout: 265 seconds]
attila_lendvai has quit [Quit: Leaving.]
heurist`_ has quit [Ping timeout: 240 seconds]
heurist`_ has joined #lisp
myrkraverk has quit [Remote host closed the connection]
SaganMan has joined #lisp
yeticry has quit [Ping timeout: 264 seconds]
SuperJen has joined #lisp
yeticry has joined #lisp
Amplituhedron has joined #lisp
Guest83509 has quit [Ping timeout: 248 seconds]
damke has quit [Read error: Connection reset by peer]
damke has joined #lisp
fourier` has quit [Ping timeout: 240 seconds]
nalkri has quit [Ping timeout: 240 seconds]
sjl has joined #lisp
heurist_ has joined #lisp
heurist`_ has quit [Ping timeout: 264 seconds]
Devon has joined #lisp
yeticry has quit [Ping timeout: 240 seconds]
sjl has quit [Ping timeout: 265 seconds]
fikka has joined #lisp
Devon has quit [Ping timeout: 265 seconds]
heurist_ has quit [Ping timeout: 265 seconds]
lisp_guest has quit [Ping timeout: 256 seconds]
yeticry has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
rawste has joined #lisp
stara has joined #lisp
heurist_ has joined #lisp
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
zooey has quit [Remote host closed the connection]
zooey has joined #lisp
scymtym has quit [Ping timeout: 260 seconds]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
heurist_ is now known as heurist
d4ryus1 is now known as d4ryus
scymtym has joined #lisp
wxie has joined #lisp
bigos_ has joined #lisp
_whitelogger has joined #lisp
hexfive has quit [Quit: 4:04am hexfive not found]
red-dot has joined #lisp
Devon has joined #lisp
damke has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
Devon has quit [Ping timeout: 248 seconds]
wxie has quit [Remote host closed the connection]
atgreen has joined #lisp
pedh has joined #lisp
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
pedh has quit [Ping timeout: 240 seconds]
Bike has joined #lisp
Sigyn has quit [Quit: People always have such a hard time believing that robots could do bad things.]
Sigyn has joined #lisp
varjag has joined #lisp
fikka has joined #lisp
damke has joined #lisp
shka has joined #lisp
rpg has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 240 seconds]
moei has joined #lisp
pedh has joined #lisp
pedh has quit [Ping timeout: 240 seconds]
SAL9000_ has joined #lisp
SAL9000 has quit [Ping timeout: 264 seconds]
Devon has joined #lisp
Guest85270 is now known as kolb
jameser has joined #lisp
recallfuture has joined #lisp
shka has quit [Ping timeout: 248 seconds]
Jen has joined #lisp
Jen is now known as Guest97254
recallfuture has quit [Client Quit]
jameser has quit [Ping timeout: 264 seconds]
SaganMan has quit [Ping timeout: 240 seconds]
Kevslinger has joined #lisp
SuperJen has quit [Ping timeout: 240 seconds]
SuperJen has joined #lisp
stara has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Guest97254 has quit [Ping timeout: 272 seconds]
atgreen has quit [Quit: atgreen]
pchrist has quit [Quit: leaving]
EvW has joined #lisp
pchrist has joined #lisp
dddddd has joined #lisp
Vicfred has joined #lisp
stara has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 265 seconds]
SaganMan has joined #lisp
Amplituhedron has quit [Remote host closed the connection]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
omilu has joined #lisp
ebzzry has joined #lisp
<ebzzry> I’m trying to automate the installation of Quicklisp
<ebzzry> I have `sbcl --load quicklisp.lisp --eval '(progn (quicklisp-quickstart:install) (let ((ql-util::*do-not-prompt* t)) (ql:add-to-init-file) (sb-ext:quit))'` but it doesn’t wokr.
bigos_ has quit [Remote host closed the connection]
pedh has joined #lisp
pedh has quit [Ping timeout: 265 seconds]
<scymtym> ebzzry: try sbcl --load quicklisp.lisp --eval '(quicklisp-quickstart:install)' --eval '(let …)' --quit
red-dot has joined #lisp
SlowJimmy has joined #lisp
Murii has quit [Ping timeout: 248 seconds]
Kundry_Wag has joined #lisp
stara has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Kundry_Wag has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
Amplituhedron has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
Amplituhedron has quit [Read error: Connection reset by peer]
stara has joined #lisp
SlowJimmy has left #lisp ["ERC (IRC client for Emacs 25.3.1)"]
oleo has quit [Quit: Leaving]
quazimodo has joined #lisp
oleo has joined #lisp
oleo has quit [Changing host]
oleo has joined #lisp
fourier` has joined #lisp
<ebzzry> scymtym: thanks!
varjag has quit [Read error: Connection reset by peer]
Sigyn has quit [Quit: People always have such a hard time believing that robots could do bad things.]
Sigyn has joined #lisp
fourier` has quit [Ping timeout: 264 seconds]
karswell has quit [Ping timeout: 264 seconds]
pedh has joined #lisp
hifitim has joined #lisp
pedh has quit [Ping timeout: 268 seconds]
pseudonymous has joined #lisp
Arcaelyx has joined #lisp
rippa has joined #lisp
varjag has joined #lisp
myrkraverk has joined #lisp
<XachX> ebzzry: without-prompting is exported
whartung has quit [Ping timeout: 248 seconds]
hyero has left #lisp ["ERC (IRC client for Emacs 25.3.1)"]
zmt00 has quit [Quit: Leaving]
pedh has joined #lisp
hifitim has quit [Quit: Leaving]
pedh has quit [Ping timeout: 268 seconds]
Murii has joined #lisp
EvW has quit [Quit: EvW]
lisp_guest has joined #lisp
Devon has quit [Ping timeout: 272 seconds]
fikka has joined #lisp
vertigo has quit [Remote host closed the connection]
rawste has quit [Quit: ZZZzzz…]
fikka has quit [Ping timeout: 265 seconds]
himmAllRight has quit [Remote host closed the connection]
himmAllRight has joined #lisp
rawste has joined #lisp
fikka has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 264 seconds]
Kyo91 has joined #lisp
rawste has quit [Quit: ZZZzzz…]
ebzzry has quit [Ping timeout: 260 seconds]
orivej_ has joined #lisp
orivej has quit [Ping timeout: 272 seconds]
pedh has joined #lisp
ebzzry has joined #lisp
QualityAddict has quit [Remote host closed the connection]
LiamH has joined #lisp
pedh has quit [Ping timeout: 265 seconds]
fourier` has joined #lisp
<Fade> roswell also gives a reasonable installation
<Fade> I use it with travis to test my stuff.
QualityAddict has joined #lisp
quazimodo has quit [Ping timeout: 248 seconds]
fourier` has quit [Ping timeout: 256 seconds]
stara has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Karl_Dscc has joined #lisp
peterhil` has quit [Ping timeout: 272 seconds]
peterhil has joined #lisp
fourier` has joined #lisp
rawste has joined #lisp
varjag has quit [Ping timeout: 272 seconds]
Vicfred has quit [Quit: Leaving]
pedh has joined #lisp
<Xach> so many picodollars
Ukari has joined #lisp
Xal has quit [Ping timeout: 248 seconds]
pedh has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
shka has joined #lisp
fourier` has quit [Ping timeout: 240 seconds]
Xal has joined #lisp
<loke> Hello xach
fourier` has joined #lisp
Ukari has quit [Quit: bye bye]
Ukari has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
fourier` has quit [Ping timeout: 260 seconds]
fourier` has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
ebzzry has quit [Ping timeout: 240 seconds]
scymtym has quit [Ping timeout: 265 seconds]
<Xach> ahoy loke
wheelsucker has joined #lisp
Arcaelyx has quit [Ping timeout: 240 seconds]
Arcaelyx_ has joined #lisp
SaganMan has quit [Quit: mata]
nika has quit [Quit: Leaving...]
fikka has joined #lisp
scymtym has joined #lisp
python476 has joined #lisp
varjag has joined #lisp
varjag has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 265 seconds]
python476 has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
<fourier`> does anyone know if the Prime Time Freeware for AI software collection is available anywhere?
ebzzry has joined #lisp
Kundry_Wag has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
Kundry_Wag has quit [Ping timeout: 240 seconds]
zaquest has quit [Read error: Connection reset by peer]
pedh has joined #lisp
<rme> Wasn't PTF for AI just a subset of the CMU AI repository?
mrcom has quit [Read error: Connection reset by peer]
Ukari has quit [Quit: bye bye]
pedh has quit [Ping timeout: 240 seconds]
mrcom has joined #lisp
<fourier`> yep.
<fourier`> I didn't know it exist.
python476 has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
<akkad> when jni to sbcl is faster and less expensive than using abcl...
stara has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
DeadTrickster has joined #lisp
knobo has joined #lisp
astronavt has joined #lisp
astronavt has joined #lisp
astronavt has quit [Remote host closed the connection]
ebzzry has quit [Ping timeout: 272 seconds]
rawste has quit [Quit: ZZZzzz…]
turkja has quit [Ping timeout: 256 seconds]
<fiddlerwoaroof> Lispwork's java foreign language interface is pretty nice too
josemanuel has quit [Quit: leaving]
rawste has joined #lisp
* beach strongly recommends that people program in Common Lisp rather than in some other language.
<fiddlerwoaroof> beach: I agree generally, but sometimes one has to interoperate with libraries/systems that are impractical to duplicate
rawste has quit [Client Quit]
* beach also thinks that a way-too-high fraction of the utterances in this channel are about languages other than Common Lisp.
Jesin has joined #lisp
<beach> fiddlerwoaroof: I think there is way too much activity aimed at satisfying individual needs for immediate solutions, rather than implementing Common Lisp equivalents for the common good of everyone.
<jackdaniel> interoperability between Common Lisp and other languages fits the channel topic, doesn't it?
<beach> Sure.
<fourier`> beach: cl is dead without interoperability
<beach> fourier`: That's very harsh.
mejja has joined #lisp
<fourier`> its fun since just today I've read an article by Richard C. Waters "The Survival of Lisp: Either We Share, Or It Dies" dated 1994 where he stated about C taking ground and importance of interoperability with it :)
<beach> I just think it is sad that so many people just seem to want to further their personal goals when there is so much work to do for the common good. It would be way much more productive to target common goals first.
<akkad> that which is common, is of little value. -nietzsche
<mejja> ;-)
<beach> fourier`: I think Common Lisp is doing very well now, compared to a few years ago. But more work is needed. That's why I am sad that so much energy is spent on other things.
<fourier`> interoperability is not other thing, is one of the key things to survive. CL community is too small to implement everything on its own, therefore interoperability with languages with bigger ecosystem is crucial for any projects to take off.
<akkad> sounds like the mission statement of Islisp
damke_ has joined #lisp
<fourier`> nah major CLs are good with it now - abcl with java, others with C, LW with both C and Java (and obj-c on osx), ccl with c and obj-c, so we are quite good now ;)
<fiddlerwoaroof> The other thing is that, if you want convince people to adopt common lisp, you have to provide them with a low-cost way to integrate their lisp code base with their existing software
<fiddlerwoaroof> fourier`: there's also jfli which, I think, provides portable cl<->jvm interop
<beach> fourier`: Indeed. I think that's what I just said. Most people spend most of their energy on things other than Common Lisp.
<fiddlerwoaroof> At least, it runs on both LispWorks and CCL
<jackdaniel> diverse tactics to advance CL sound like a good strategy, I don't think any particular tactic could win on its own
damke has quit [Ping timeout: 264 seconds]
<akkad> beach is right. we need to force these other implementations to divert their time and energies to sbcl. the one true lisp :P
<rme> I'm not ready to give up on CCL just yet.
<fourier`> i barely use sbcl (only test with compatibility with it), and mainly use LW and CCL which both are real good
<jackdaniel> testing software on 3 or 4 implementations definetely improves software quality
<akkad> fouric: you make anything cool with lw yet?
fikka has joined #lisp
<fiddlerwoaroof> I bought a lispworks hobbyistdv license just because CAPI is so nice
<fourier`> akkad: maybe you mean me ? :)
<akkad> yeah fournier`
<fourier`> i did this small tool i'm using on a vacation-per-vacation basis https://github.com/fourier/mediaimport
<akkad> irc is hard
<fourier`> but generally all other cl development I do in LW since IDE is so nice (but editor is so terrible so quite often I revert to emacs)
* fouric tried to use lw through the student license but couldn't actually get the dang thing to *run*
<fiddlerwoaroof> fourier`: have you noticed that slime is a bit slow to respond when connecting to lispworks?
<fourier`> no i dont use slime with lw, only with sbcl and ccl
<fiddlerwoaroof> If I build a console image, it works fine, but if I connect to swank running in the ide, it takes a while to respond
<fiddlerwoaroof> It's really hard to give up emacs for lisp development :)
fikka has quit [Ping timeout: 260 seconds]
<akkad> fourier`: ahh 7.0
<Xach> lispworks's editor is in the emacs family tree
<oleo> lispworks editor seems like a more advanced mcclim
<oleo> lol
<fiddlerwoaroof> Yeah, but it doesn't have evil-mode :)
Trystam has joined #lisp
<fiddlerwoaroof> And I haven't been able to find something to replace paredit
* akkad uses slime on lw, no real delay locally
<akkad> evil-mode is like convincing your new gf, that she should let you call her by your ex-wife's name.
<fiddlerwoaroof> I like telling people that the best vi implementation is written in emacs lisp ;)
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Tristam has quit [Ping timeout: 260 seconds]
<akkad> fiddlerwoaroof: the 32bit version of lw is sure a bit slower starting up for me than 64bit was
Trystam has quit [Ping timeout: 264 seconds]
<fiddlerwoaroof> my issue is that when I try to use completion, it takes a significant amount of time for the completion list to appear
Arcaelyx_ has quit [Quit: Textual IRC Client: www.textualapp.com]
ketralnis has joined #lisp
<akkad> is there a good multithreaded cl benchmark? lparallel-bench seems close, but not quite
drichards has joined #lisp
<fouric> fiddlerwoaroof: have you tried smartparens, out of curiosity?
<fouric> has *anyone*?
<fouric> (it's still an emacs-only script, but it ships as the spacemacs default for some reason, and i'm trying to figure out why)
<fiddlerwoaroof> I think I may have a while ago
<fiddlerwoaroof> I think it didn't behave like I expected it to, so I switched back to paredit, with some custom keybindings for evil-mode
<fouric> hm, k
fittestbits has joined #lisp
<Murii> Can I use dotimes for going from the N element to 0 ?
<fiddlerwoaroof> (dotimes (x n) (let ((x (- n x)
<fiddlerwoaroof> something like that might work...
mishoo_ has joined #lisp
<aeth> paredit itself doesn't behave how I expect it to. Its author has something against using # or something. I have to (setq paredit-space-for-delimiter-predicates '((lambda (endp delimiter) nil))) so it won't break dispatch reader macros, e.g. #foo() becomes #foo () without it. In fact, I think there's a hardcoded workaround for #() and all other #...() will insert a space before the parens in a very non-idiomatic way.
mishoo has quit [Ping timeout: 240 seconds]
<fiddlerwoaroof> Yeah, that's one of my annoyances with it
<aeth> e.g. If someone writes #h(...) they're probably using a reader macro literal notation (in this case, probably for hash tables)
<fiddlerwoaroof> The other is that it treats backticks weirdly
<aeth> iirc, it treats ` as if it's quoted source and ' as if it's quoted data. So if I do macroexpand or macroexpand-1, I actually use ` even though I'm not unquoting, so it's properly indented as quoted source
<fiddlerwoaroof> if I have `(1 2 3) and I hit paredit-wrap-sexp, it puts the new parens around the backquote, when I'd prefer it to go inside the backquote
<aeth> oh no wait, that probably wouldn't be paredit, sorry
fourier` has quit [Ping timeout: 272 seconds]
<fiddlerwoaroof> Because, usually, I'm trying to change the quasi-quoted data rather than the macro
<aeth> I've never encountered that
fourier` has joined #lisp
<aeth> can you provide an example?
DeadTrickster has quit [Read error: Connection reset by peer]
DeadTrickster has joined #lisp
attila_lendvai has joined #lisp
LocaMocha has quit [Quit: Leaving]
LocaMocha has joined #lisp
drichards has quit []
Kundry_Wag has joined #lisp
drichards has joined #lisp
<rme> Murii: I'd say forget dotimes in the counting down case. Even if you're a loop hater, (loop for n from 5 downto 0 do (print n)) is pretty clear.
<Murii> rme: thanks, what's the difference between '+' an 'incf' ?
<Murii> and*
<fiddlerwoaroof> incf updates the value of a place, + just adds two numbers
<Murii> ok
<fiddlerwoaroof> in other languages, incf would be the += operator
<Murii> thought so too
<rme> (setq a (+ a 1)) is just like (incf a). (setq a (+ a 5)) is just like (incf a 5).
Kundry_Wag has quit [Ping timeout: 272 seconds]
SuperJen has quit [Remote host closed the connection]
SuperJen has joined #lisp
<aeth> fiddlerwoaroof: I see
<whoman> i wonder what 'f' is historically, in setf and incf et al
<aeth> rme: If you're a loop hater there's always (do ((n 5 (1- n))) ((> 0 n)) (print n))
<jackdaniel> whoman: set field
Tristam has joined #lisp
malice has joined #lisp
random-nick has quit [Read error: Connection reset by peer]
random-nick has joined #lisp
<malice> Hi! Is there some way to *enforce* the type of certain slot, other than adding before/around methods for initialize-instance/setters/etc. ? :type specifier doesn't force implementation to check for the type...
<malice> Thanks for the code, Shinmera.
<malice> I'll take a look at it, thanks!
earl-ducaine has quit [Remote host closed the connection]
earl-ducaine has joined #lisp
rawste has joined #lisp
raphaelss has quit [Ping timeout: 256 seconds]
<aeth> My approach is different. When I want to force the type (which still isn't entirely portable), I use structs, which tend to be better at doing that. When I want to force the types and still use standard-objects, I usually can get away with embedding a struct as a slot in a standard-object. Depending on what you're doing, that might be better or worse.
<aeth> iirc, type-checking is done in CCL for CLOS standard-objects iirc. So it can be used, it's just not standard to check.
<fiddlerwoaroof> aeth: I think you could use the mop to define your own semantics for slot-types, though
<aeth> fiddlerwoaroof: that is Shinmera's linked approach afaik
<fiddlerwoaroof> yeah
<aeth> But if the struct approach is good enough (i.e. the typed thing can easily be thought of as a sub-object) then that saves having to mess with the MOP
<fiddlerwoaroof> I tend to think of structs as deprecated :)
<aeth> I tend to think of struct objects as static objects and CLOS standard-objects as dynamic objects.
Devon has joined #lisp
<aeth> So structs are good for storing well-defined data that's mostly numbers that's sent to some C library over CFFI (e.g. various OpenGL things) or for a hot loop of things of well-defined and hopefully-optimized types.
<aeth> And then there's a second, basically different (e.g. if you want the type, you have to deftype the array manually), struct that's used to define convenience accessors on top of a sequence. CL's complicated like that.
<fiddlerwoaroof> Yeah, I use those occasionally, if I'm using vectors with certain semantics
<fiddlerwoaroof> (defstruct (point :type vector) x y)
<fiddlerwoaroof> etc.
stara has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Jen has joined #lisp
Jen is now known as Guest96622
impulse has joined #lisp
python476 has quit [Remote host closed the connection]
SuperJen has quit [Ping timeout: 260 seconds]
shka has quit [Ping timeout: 240 seconds]
varjag has joined #lisp
Devon has quit [Ping timeout: 265 seconds]
pedh has joined #lisp
pedh has quit [Ping timeout: 240 seconds]
pierpa has joined #lisp
<whoman> jackdaniel, ah cool, thanks! going to read thta
<whoman> (i had thought 'feature' briefly)
impulse has quit [Quit: Lost terminal]
random-nick has quit [Remote host closed the connection]
markong has joined #lisp
random-nick has joined #lisp
EvW has joined #lisp
davsebamse has quit [Ping timeout: 255 seconds]
davsebamse has joined #lisp
Karl_Dscc has joined #lisp
fourier` has quit [Ping timeout: 248 seconds]
mishoo_ has quit [Ping timeout: 240 seconds]
damke has joined #lisp
Danishman has joined #lisp
DeadTrickster has quit [Read error: Connection reset by peer]
DeadTrickster has joined #lisp
<malice> Shinmera: in your typed-slot-class, does simply providing :type for slot work?
<malice> I'm trying to get it to work by copying typed-slot-class and conditions, but my instance raises incompatible type due to the type being NIL, even though I supplied a type.
<malice> (or so I think)
damke_ has quit [Ping timeout: 264 seconds]
<malice> Thanks, didn't find that in other files I looked at :p
<Shinmera> It doesn't use :type to avoid clashing with whatever the implementation does with :type
<malice> I see.
<malice> Thanks for help :)
Amplituhedron has joined #lisp
mejja has quit [Quit: mejja]
random-nick has quit [Remote host closed the connection]
Amplituhedron has quit [Ping timeout: 264 seconds]
Trasformatore has quit [Remote host closed the connection]
Trasformatore has joined #lisp
pedh has joined #lisp
pedh has quit [Ping timeout: 264 seconds]
Amplituhedron has joined #lisp
Amplituhedron has quit [Remote host closed the connection]
rawste has quit [Quit: ZZZzzz…]
Devon has joined #lisp
pedh has joined #lisp
Jesin has quit [Ping timeout: 248 seconds]
wheelsucker has quit [Quit: Client Quit]
fikka has joined #lisp
pedh has quit [Ping timeout: 263 seconds]
wxie has joined #lisp
markong has quit [Ping timeout: 260 seconds]
<malice> aeth: thanks for your insight
fikka has quit [Ping timeout: 256 seconds]
pmetzger has joined #lisp
<malice> Is there fdefinition for local functions?
<Shinmera> clhs fdefinition
wheelsucker has joined #lisp
<Shinmera> clhs flet
orivej_ is now known as orivej
<Shinmera> By nature of the flets being lexical, and thus compile-time, there is no fdefinition to retrieve it at run-time.
Murii has quit [Ping timeout: 268 seconds]
<Shinmera> You can just use #'foo to get the function object if you know the name at compile-time, though.
<Shinmera> clhs function
_Trasformatore_ has joined #lisp