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
Cymew has joined #lisp
Fare has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
pierpal has quit [Ping timeout: 240 seconds]
Cymew has quit [Ping timeout: 240 seconds]
Fare has quit [Ping timeout: 240 seconds]
troydm has joined #lisp
smasta has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
brendyn has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
robotoad has quit [Quit: robotoad]
nickenchuggets has quit [Read error: Connection reset by peer]
nickenchuggets has joined #lisp
sbwhitecap has quit [Ping timeout: 256 seconds]
sbwhitecap has joined #lisp
markoong has quit [Ping timeout: 240 seconds]
<mfiano> Does anyone know how to use the type pattern in trivia, on arguments of a list, and also bind the arguments for use in the clause body?
nowhereman_ has quit [Ping timeout: 276 seconds]
terpri has quit [Ping timeout: 255 seconds]
smasta has joined #lisp
smasta has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
ldb_ has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
fikka has quit [Ping timeout: 264 seconds]
smasta has joined #lisp
Kundry_Wag has joined #lisp
vtomole has quit [Ping timeout: 260 seconds]
dddddd has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 245 seconds]
quazimodo has joined #lisp
fikka has joined #lisp
smasta has quit [Ping timeout: 264 seconds]
Khisanth has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 268 seconds]
johnvonneumann has joined #lisp
johnvonneumann is now known as Guest47607
<jack_rabbit> sbcl 1.4.8
<jack_rabbit> Can anyone quickload string-case?
Khisanth has joined #lisp
fikka has joined #lisp
<jack_rabbit> my SBCL seems to have an issue with the package interning sb-vm::xor
daniel-s has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
milanj has quit [Quit: This computer has gone to sleep]
eschatologist has quit [Remote host closed the connection]
akkad has quit [Remote host closed the connection]
eschatologist has joined #lisp
Pixel_Outlaw has joined #lisp
milanj has joined #lisp
fikka has joined #lisp
<jack_rabbit> hmmmm. I don't seem to be able to unlock the package either.
eli_oat has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
eli_oat has quit [Client Quit]
caltelt has joined #lisp
zachk has quit [Quit: Leaving]
caltelt has quit [Client Quit]
caltelt has joined #lisp
ismdeep has joined #lisp
fikka has joined #lisp
smasta has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
quazimod1 has joined #lisp
quazimodo has quit [Ping timeout: 256 seconds]
smasta has quit [Ping timeout: 240 seconds]
ismdeep has quit []
rumbler31 has quit [Remote host closed the connection]
fikka has joined #lisp
rumbler31 has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
pierpal has joined #lisp
fikka has joined #lisp
Naergon has quit [Ping timeout: 256 seconds]
shifty has joined #lisp
robotoad has joined #lisp
pierpal has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 256 seconds]
papachan_ has quit [Quit: Saliendo]
pierpal has joined #lisp
EvW has joined #lisp
DataLinkDroid has quit [Ping timeout: 240 seconds]
estest has quit [Remote host closed the connection]
terpri has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
<LdBeth> Is there any systems still support message passing style OOP?
pierpa has quit [Quit: Page closed]
smasta has joined #lisp
fikka has joined #lisp
mflem has joined #lisp
<loke> LdBeth: “message passing” is just a terminology thing
<loke> It just depends on what you call it
fikka has quit [Ping timeout: 240 seconds]
AetherWind has joined #lisp
housel has joined #lisp
fikka has joined #lisp
skidd0 has quit [Quit: WeeChat 2.1]
fikka has quit [Ping timeout: 264 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
<jack_rabbit> LdBeth, You mean like (message object arg) ?
<jack_rabbit> hmm. actually nevermind. I was confused.
smasta has quit [Quit: WeeChat 2.1]
asarch has joined #lisp
<LdBeth> This seems to be what I want
milanj_ has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
karlosz has joined #lisp
<beach> Good morning everyone!
<loke> I recall having an extended debate with someone on social media where it was claimed to me that “message passing” was a fundamentally different way to do object orientation. I desperately tried to get this person to explain exactly how it was different, other than a superficial syntactic different (and a difference in the way the actual technical working were explained to the programmer), but I never got any proper answer.
<beach> Of course you didn't.
<beach> People like to argue without having the proper knowledge.
<pillton> I thought there were proposals where each object had its own thread.
mange has joined #lisp
<loke> pillton: Yes, that would be Erlang style.
<loke> pillton: But that's not object orientation :-)
jonh has left #lisp ["WeeChat 1.4"]
fikka has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
<pillton> I am not sure about that. Alan Kay said "I thought of objects being like biological cells and/or individual computers on a network, only able to communicate with messages ..." (http://www.purl.org/stefan_ram/pub/doc_kay_oop_en). I am probably misquoting.
<pillton> You would think there would be some link between that and the actor model.
<pillton> Anyway, I'll shut up because I don't really know and because I have to go to a meeting.
<beach> Heh.
quazimodo has joined #lisp
<mfiano> Is anyone really familiar with the trivia library? I cannot seem to figure out how to compose the 'struct/class' and 'place' patterns, such that I can match a struct and define symbol macros for their slots in the process. Thanks.
charh has joined #lisp
quazimodo has quit [Ping timeout: 268 seconds]
gector has joined #lisp
<beach> MichaelRaskin: I don't know how feasible your idea of hooking Clordane up to SBCL is, but you gave me a similar, but different, idea. I can create a Cleavir-based compiler for SBCL that propagates source information to executable code and that adds the interaction code required by Clordane. Again, it won't be as fast as native SBCL, but it will me much easier than to wait for a native SICL executable.
fikka has joined #lisp
karlosz has quit [Ping timeout: 276 seconds]
Oddity has joined #lisp
<jack_rabbit> Morning, beach!
gector has quit [Ping timeout: 268 seconds]
fikka has quit [Ping timeout: 264 seconds]
<beach> MichaelRaskin: It would still take some time to create Clordane and this Cleavir-based SBCL compiler, of course. But such a thing would allow me to debug SICL code in a very comfortable environment without having to deal with the additional problems of a native SICL executable.
<beach> MichaelRaskin: So I will probably move Clordane closer to the top of the list of projects to work on.
mange has quit [Remote host closed the connection]
gector has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
<LdBeth> Low cost abstraction is useful
pjb has joined #lisp
fikka has joined #lisp
quazimodo has joined #lisp
libre-man has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
pjb has quit [Remote host closed the connection]
Ukari has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
fikka has joined #lisp
<asarch> bar and baz both have the foo function. How could I shado baz::foo instead of bar::foo?
<asarch> (defpackage :asarch (:use :common-lisp :bar :baz) (:shadow :foo))?
surya has joined #lisp
<beach> asarch: It is a bad idea to :USE packages other than COMMON-LISP. Use explicit package prefixes instead.
<beach> asarch: your code will be much clearer, because the person reading it will know from which package the symbols came.
<asarch> Ok
fikka has quit [Ping timeout: 240 seconds]
* asarch takes notes...
<beach> asarch: Plus, if you find yourself needing two ::, then you are doing something wrong.
<beach> It means you are violating the public protocol of those packages, OR that you didn't design those packages correctly (in case you are the author).
<asarch> Well, I just used that symbol because the REPL from SBCL uses it
<beach> Then you are doing something wrong because those symbols are not exported.
<loke> beach: OR you might be dealing with code designed in the 60's :-)
<asarch> Ok
<makomo> morning :-)
<loke> Interfacing with maxima involves a lot of ::
<MichaelRaskin> beach: I thought a bit, and as long as you accept limitations about not being able to see return value of top-level eval-when, the rest seems very feasible and not too much work.
<beach> If a package P is not yours and you do a :USE P, you expose yourself to future modifications of P. If, in the future, the author of P decides to add new functions to the public protocol(s), then your code could break with a conflicting-symbols error even though you have not changed anything.
<beach> Hello makomo.
<beach> MichaelRaskin: Sounds good to me.
<jack_rabbit> asarch, do you understand the difference between the single : and double ::?
<asarch> No, I don't
<MichaelRaskin> Probably the eval-when problem can be solved with a few tons of annoying special-casing.
<beach> Heh.
<asarch> My brain has :: from C++
<beach> asarch: Oh! Sorry.
<beach> asarch: I thought you did.
orivej has joined #lisp
<asarch> Don't worry
<asarch> :-)
* beach takes a break and will be back in a few hours.
<jack_rabbit> asarch, So double colon references symbols interned by a package. Single colon can only be used to reference symbols *exported* by the package.
fikka has joined #lisp
moei has joined #lisp
<jack_rabbit> asarch, So packages export symbols they intend to be used. A library will export functions it wants library users to call, constants, variables, etc.
<jack_rabbit> asarch, internal variables, functions, etc. that it doesn't want a user to use, it doesn't export.
<jack_rabbit> asarch, So when using a package, you should (almost always) only use the exported symbols (single colon)
<jack_rabbit> asarch, That's why beach said you're either doing something wrong, or the package creator did something wrong, if you're using the double colon to use non-exported symbols.
<jack_rabbit> asarch, make sense?
sauvin has joined #lisp
sauvin has quit [Max SendQ exceeded]
<asarch> Sure!
fikka has quit [Ping timeout: 240 seconds]
<jack_rabbit> Oh, minor note. Symbols that can be accessed with a single colon can *also* be accessed with a double colon. It's just best practice to use the single colon.
<asarch> (defpackage :bar (:use :common-lisp) (:export :foo)), (defpackage :baz (:use :common-lisp) (:export :foo)) <- I don't want to use :foo from baz in :asarch
<jack_rabbit> asarch, Right, so in asarch, don't :use :bar nor :baz
sauvin has joined #lisp
<jack_rabbit> asarch, Then you can explicitly reference either with bar:foo or baz:foo
<asarch> But what if I would like to use other functions exported by baz
<jack_rabbit> asarch, packages have access to other loaded packages, even without :use'ing them.
<jack_rabbit> asarch, same thing. Just baz:whatever-exported-function
<asarch> If I do: (defpackage :asarch (:use :common-lisp :bar :baz)), I would conflict the REPL at the time when I use (foo), right?
<jack_rabbit> asarch, You would conflict when you load the package.
<asarch> How could I avoid it'
<asarch> ?
<jack_rabbit> asarch, don't :use either.
<jack_rabbit> just (:use :common-lisp)
<jack_rabbit> <jack_rabbit> asarch, packages have access to other loaded packages, even without :use'ing them.
<jack_rabbit> asarch, It's not like java or python, etc. where you have to import packages to have access to them.
<asarch> (defpackage :asarch (:use :common-lisp)) <- But any other functions in bar or in baz would not be accessible
<jack_rabbit> asarch, wrong.
<asarch> ?
<jack_rabbit> You just have to preface them with the package name.
fikka has joined #lisp
<jack_rabbit> (bar:whatever-function argument)
<asarch> How?
<asarch> Oh
<asarch> Thank you!
<jack_rabbit> (baz:some-other-function another-argument)
<jack_rabbit> np
<asarch> Thank you very much jack_rabbit :-)
<jack_rabbit> :)
fikka has quit [Ping timeout: 260 seconds]
<jack_rabbit> asarch, When you :use a package, it just imports all that package's symbols into the target package, so they can be used as if they were part of the target package.
<jack_rabbit> That's what beach advised against. Using explicit package prefixes makes the code clearer, since you can tell at the call site where functions, etc. reside.
<asarch> Ok
<asarch> I thought this was more like Pythons import statement
<jack_rabbit> Yes, I can totally understand the confusion. :)
<asarch> from gi.repository import Gtk
<jack_rabbit> right.
<asarch> Thank you very much once again jack_rabbit :-)
<jack_rabbit> np
smurfrobot has joined #lisp
<asarch> Everything is in my notes now
<jack_rabbit> It makes sense once you get used to it. It's just a little different than a lot of common systems.
<asarch> Common Lisp is wonderful gentlemen!
<jack_rabbit> Yes!
* jack_rabbit hurrahs
<asarch> Cheers! o/
fikka has joined #lisp
igemnace has joined #lisp
cyberlard has joined #lisp
<asarch> Have a nice day
<asarch> See you later :-)
<jack_rabbit> o/
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
andrei-n_ has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
smurfrobot has quit [Remote host closed the connection]
shrdlu68 has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
nowhereman_ has joined #lisp
phenoble has joined #lisp
mathZ has joined #lisp
smurfrobot has joined #lisp
fikka has joined #lisp
smurfrobot has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
mrcom has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
Kundry_Wag has quit [Ping timeout: 248 seconds]
mrcom has quit [Quit: This computer has gone to sleep]
surya has quit [Read error: Connection reset by peer]
surya_ has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
IdleBot_4bca4710 has joined #lisp
fikka has joined #lisp
scymtym has joined #lisp
shangul has joined #lisp
Smokitch has joined #lisp
Ven`` has joined #lisp
shangul has quit [Remote host closed the connection]
eschatologist has joined #lisp
shangul has joined #lisp
mathZ has quit [Remote host closed the connection]
shrdlu68 has quit [Ping timeout: 268 seconds]
shrdlu68 has joined #lisp
quazimodo has quit [Ping timeout: 276 seconds]
smurfrobot has joined #lisp
phenoble has quit [Quit: WeeChat 2.1-dev]
milanj_ has quit [Quit: This computer has gone to sleep]
shrdlu68 has quit [Ping timeout: 248 seconds]
verisimilitude has joined #lisp
<verisimilitude> Are you currently here, jackdaniel?
shrdlu68 has joined #lisp
<verisimilitude> I wanted to make you aware of an article I've written that is related to yours:
<verisimilitude> This is what I've been meaning to do since first reading your ``CL-CHARMS Crash Course''; it's a first draft, but I'll work on improving it later.
<verisimilitude> Well, that's all.
verisimilitude has quit [Client Quit]
shrdlu68 has quit [Client Quit]
shrdlu68 has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Ven`` has quit [Read error: Connection reset by peer]
Ven` has joined #lisp
Naergon has joined #lisp
vlatkoB has joined #lisp
fikka has joined #lisp
terpri has joined #lisp
nowhereman_ has quit [Ping timeout: 264 seconds]
varjag has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
Ven` has quit [Read error: Connection reset by peer]
mrcom has joined #lisp
Ven`` has joined #lisp
surya_ has quit [Ping timeout: 240 seconds]
skeuomorf has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
<beach> jackdaniel: Unless you are in a very good mood, my advice is for you to ignore that link.
fikka has quit [Ping timeout: 245 seconds]
robotoad has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
milanj_ has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
imjacobclark has joined #lisp
hhdave has joined #lisp
<imjacobclark> Are there any good pieces of literature on how nreverse works?
DataLinkDroid has joined #lisp
Ven` has joined #lisp
Ven`` has quit [Read error: Connection reset by peer]
<beach> I can explain it to you if you want.
<jackdaniel> beach: no worries, I've barely understood 1/10th of it
<beach> jackdaniel: Heh!
<jackdaniel> verisimilitude: calling people idiots is not the best way of communicating your ideas
<imjacobclark> beach: that would be awesome if you could
<beach> imjacobclark: You mean for a list, right?
<imjacobclark> yeah (nreverse 1 2 3 4)
<beach> imjacobclark: Do you want code or words?
<imjacobclark> both, if that's okay?
<beach> Sure. I'll start with code. Hold on...
<beach> I hope that works. I am not used to pastebin.
_cosmonaut_ has joined #lisp
<beach> Oh, bad indentation because of TABs.
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
<beach> imjacobclark: You initialize a variable RESULT to the empty list.
<beach> imjacobclark: And you initialize a variable REMAINING to the entire list.
<beach> You then loop until there are no more CONS cells on the list REMAINING.
attila_lendvai has quit [Read error: Connection reset by peer]
<beach> In each iteration, you remove a CONS cell from the beginning of REMAINING, and you stick it first on the list RESULT.
<beach> When you are done, all the initial CONS cells are on REMAINING in reverse order.
<beach> Finally, return REMAINING.
fikka has joined #lisp
trittweiler has joined #lisp
<beach> imjacobclark: Clear? Questions?
<imjacobclark> beach: just reading up
<imjacobclark> Ah, okay I see!
shrdlu68 has quit [Ping timeout: 248 seconds]
shrdlu68 has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
<imjacobclark> That makes total sense, thanks beach !
<beach> Good!
<beach> Er, when you are done, all the initial CONS cells are on RESULT (not REMAINING) in reverse order.
<beach> Finally, return RESULT (not REMAINING).
<beach> Sorry about that.
<beach> But you got it anyway.
fraya has joined #lisp
nowhereman_ has joined #lisp
dddddd has joined #lisp
verisimilitude has joined #lisp
<verisimilitude> I suppose you're right; I've changed the wording, jackdaniel.
<verisimilitude> I suppose xterm is just carrying on the UNIX way of making up stardards and violating real ones, anyway.
<verisimilitude> So, what else did you think of it?
schweers has joined #lisp
Ven` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
imjacobclark has quit [Ping timeout: 260 seconds]
<beach> verisimilitude: Your code has several style issues.
<verisimilitude> It could be better, yes, but my main intent was showing how easy it is to write this functionality without using Ncurses.
<verisimilitude> The code in ACUTE-TERMINAL-CONTROL is much better; I've updated it, but not yet published that update; the article is a ``crash course'' for that, in a way.
libre-man has quit [Ping timeout: 265 seconds]
ak5 has joined #lisp
random-nick has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
Ven`` has joined #lisp
<verisimilitude> Anyway, what would those style issues be, in your opinion, beach?
jmercouris has joined #lisp
<jmercouris> any way to get slime to open up in the same window?
<jmercouris> instead of just randomly splitting the window and ending up somewhere in the frame?
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
doesthiswork has joined #lisp
robotoad has quit [Quit: robotoad]
<jackdaniel> verisimilitude: can I use it in my gnome-terminal? because if not, I'm definetely not your target audience
<verisimilitude> I do extensive testing in gnome-terminal, actually, because I like its looks.
<jackdaniel> and as I've said, examples weren't complete programs and I hardly understood 10% of it
attila_lendvai has quit [Read error: Connection reset by peer]
<verisimilitude> I'm only using standard ECMA-48 control functions, so most any terminal should work with it.
<beach> verisimilitude: It is not just my opinion. It is also that of Peter Norvig and Kent Pitman. Can I assume you have read their "LUV slides" on Good Lisp Programming Style?
<verisimilitude> It looks like the culprit, jmercouris, is the pop-to-buffer in slime-start.
<verisimilitude> So, start looking there.
<verisimilitude> I've not, no, beach.
<beach> Then I suggest you start with that.
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
libre-man has joined #lisp
<beach> In particular, page 13.
<jmercouris> verisimilitude: I'll take a look, thanks
<jmercouris> beach: When should I use a macro instead of a function?
<jmercouris> I've been thinking about this for months now, and I'm still never sure
<beach> jmercouris: When you need a different evaluation rule than a function provides, i.e, you don't want all the arguments to be evaluated.
<jmercouris> Ah
attila_lendvai has quit [Read error: Connection reset by peer]
<jmercouris> that makes some sense
<jmercouris> what about implementing a macro that uses a macro?
<jmercouris> I'm thinking about a macro for a common conditional case
francogrex has joined #lisp
<jmercouris> but I'm building up that macro with an if block
<beach> Sure, you can use a macro both in the expander code and in the expanded code. That's not a problem.
verisimilitude has quit [Remote host closed the connection]
<jmercouris> my macro is something like (with-conditional-execution ...)
schweers has quit [Remote host closed the connection]
<jmercouris> and within with-conditional-execution, I'm checking some boolean and branching
attila_lendvai has joined #lisp
<francogrex> Hi, I wonder if someone could help me understand why when I load this clsql asdf there is a recompilation every time (!) https://pastebin.com/Ad0aVkuC
verisimilitude has joined #lisp
<jmercouris> its just syntactic sugar, works just fine by nesting the condition in each spot
<jmercouris> but I wasn't sure whether it demanded a function or a macro
<verisimilitude> That doesn't really tell me much at the present, beach.
<shrdlu68> Heh, I like what (reduce #'list '(0 1 2 3 4 5 6 7 8 9) :from-end t) does.
<jmercouris> because of course it could be done with a function as well
<beach> verisimilitude: Sorry to hear that.
<shrdlu68> => (0 (1 (2 (3 (4 (5 (6 (7 (8 9)))))))))
<francogrex> I understand that the first time use this is expected but every new time is weird
<beach> verisimilitude: For instance, in (OR CURSOR (error ...)), you are violating one of the rules on page 13.
<jmercouris> francogrex: maybe your machine is wiping out some parts of disk?
shrdlu68 has quit [Remote host closed the connection]
<makomo> jmercouris: some macros are written just for the purpose of writing macros for example
<jmercouris> francogrex: some config in some cahched dir?
shrdlu68 has joined #lisp
<makomo> jmercouris: see WITH-GENSYMS and ONCE-ONLY :-)
<makomo> ONCE-ONLY is especially interesting ;-)
<jmercouris> makomo: I don't see that in the hyperspec
<makomo> jmercouris: yeah, they're not in there
<makomo> they're part of alexandria for example
<makomo> (i say for example, since they're mentioned in a lot of places)
<verisimilitude> I'd not seen the PDF you'd linked, until now.
<jmercouris> makomo: Ah ok
<verisimilitude> I'll give that page thirteen a quick look, beach.
schweers has joined #lisp
<beach> verisimilitude: I think you should read the entire thing.
<makomo> jmercouris: i think both PCL and PAIP mention ONCE-ONLY
<francogrex> jmercouris: ok it seems the fasl files compiled by asdg are still were they are (cached)
<jmercouris> here is my macro for reference: https://gist.github.com/15acdd2b6ef7f6f14e4c8741b748be7a
<jmercouris> makomo: I don't remember it I guess
<beach> verisimilitude: So when you said "That doesn't really tell me much at the present", you hadn't really looked at it yet?
<jmercouris> I am just wondering if my macro is excessive, or I should use a function or idk
<verisimilitude> My connection issues happened before you'd submitted the PDF.
<verisimilitude> So, I only saw it in the logs.
<makomo> jmercouris: using a function in this case would mean that you would still have to use a conditional within the caller
<jmercouris> otherwise both branches would get evaluated
<jmercouris> aha!
<jmercouris> YES!
<jmercouris> I think I am finally starting to truly understand one of the strenghts
<jmercouris> s/strenghts/strengths
<makomo> i think you misunderstood me, but if i correctly see what you're thinking, that's correct i guess
<makomo> i meant that if with-logged-in was a function instead, not the IF
<makomo> i.e. if you wanted a "function version" of with-logged-in
<jmercouris> I'm saying that if "with-logged-in" is a function, the body of whatever you pass to it will get evaluated
<jmercouris> and that is not something we want
<makomo> right, that's true
<makomo> right
<makomo> i was thinking of something like: say you make something like "logged-in-p"
<jmercouris> I've been studying Lisp now for like 8 months I think
<jmercouris> and I feel like there is still so much that hasn't clicked
<makomo> i.e. replace the functionality of the macro with a function
<makomo> you would have to do the IF explictily every time
<jmercouris> ah, I wasn't thinking of a predicate
<makomo> if that's something that happens so often, then WITH-LOGGED-IN might be a good idea
<jmercouris> yeah, sorry, it was clear in my head :)
<makomo> :-)
<jmercouris> I should have said it out loud!
<makomo> but if this session check happens only a few times, factoring it out in a macro might be an overkill
<jmercouris> It happens very frequently
<jmercouris> and in many routes
<makomo> then i guess it makes sense to write it
orivej has joined #lisp
<makomo> what i was trying to say is that, without macros, you would be forced to do this conditional in the function that calls LOGGED-IN-P
<jmercouris> yes, I see
<makomo> or maybe you would have something like CHECK-LOGGED-IN that would somehow do a non-local transfer of control or something? idk
<makomo> perhaps throw an error and catch it somewhere else, but then you're using errors for control flow and i don't know how good is that
<jmercouris> no, I think this way makes sense
<makomo> maybe CL has different guidelines regarding that since the condition/signal system is more powerful
<makomo> yeah, i'm also for the macro
<makomo> this is something you don't get in other languages
<makomo> which is very nice
<jmercouris> that it is
<verisimilitude> The condition system isn't just for errors.
<verisimilitude> Control flow and message passing are explicit parts of it.
<makomo> verisimilitude: yeah i suppose so, but i haven't seen any usages yet where it was used to guide "normal" control flow
housel has joined #lisp
<jmercouris> You could use any try-catch system for flow control
<jmercouris> the fact of the matter is that people use it for errors
<verisimilitude> Using CATCH and THROW is what I prefer.
<makomo> jmercouris: yes, and that is often regarded as a bad practice
<verisimilitude> You don't need to define a condition, then.
<jmercouris> makomo: I was just trying to illustrate a point
attila_lendvai has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
<verisimilitude> So, I prefer (OR ... ...) rather than (IF (NOT ...) ...), beach.
m00natic has joined #lisp
<beach> verisimilitude: Yes, I figured you would say that. But style issues are not about personal preference but about communication with other people. If you submit your code for others to read, it would be polite to respect such conventions rather than insisting on your own personal preference.
<verisimilitude> Well, I like that Common Lisp is a language without kings and other such things.
<beach> Good for you.
<verisimilitude> There is no official Common Lisp style.
<verisimilitude> There never will be, either.
shrdlu68 has quit [Ping timeout: 264 seconds]
shrdlu68 has joined #lisp
<dim> Norvig's guide is very good
shrdlu68 has quit [Ping timeout: 240 seconds]
<dim> and beach has some opinions that makes your code better when you apply them, too
<verisimilitude> Well, it's just example code. I'd be interested in other critiques about it, though.
shrdlu68 has joined #lisp
<dim> I'm in the middle of rewriting a PR due to code style issues, and I don't like doing it, but I appreciate that the result is worth it
mrcom has quit [Quit: Leaving]
<beach> verisimilitude: Style issues are distractions to the people reading your code. You can't expect people to ignore those issues and concentrate on something else, simply because the distraction is too great. It is sort of like asking someone to comment on the contents of a novel that is full of typos, typesetting problems, grammar mistakes, etc.
<jmercouris> I think that verisimilitude was looking for something higher level
<beach> jmercouris: See my previous remark then.
<jmercouris> well yeah, I see it
<jmercouris> maybe you and I are different, but I can read code that is not in my style
<verisimilitude> Pretend the OR isn't there, then.
<jmercouris> I often have to read massive, old codebases that include many different styles as they evolved
<beach> Conventions are about avoiding distractions so that people can concentrate on the essence. Programmers who don't understand that have not understood the first rule of programming.
<dim> code should show the developer's intentions
<jmercouris> Its not that I do not understand, it is that I have no choice
<verisimilitude> My intention was to show how simple it is to write terminal manipulation programs without Ncurses.
<jmercouris> Well, I think your intention might have been a little different
<jmercouris> I didn't see the original draft before it was changed
<jmercouris> but I think your first intention was to show how clever you are
<jmercouris> of course, I am assuming, and we know the old saying...
<verisimilitude> I only changed a few words, jmercouris, since submitting it here.
<verisimilitude> I don't quite like the CFFI, jmercouris; ideally, no Common Lisp program should be using a C program for anything.
<jmercouris> I know a lot of people feel that way
<jmercouris> personally I do not mind it, if it is correct code, and it works, it could be written in potato
<verisimilitude> The loading mechanism is also, as I've found, fragile, and you can very easily be prevented from loading a program because it can't find some shared library somewhere.
<jmercouris> that's a problem for all C programs, not just within the realm of CFFI
<verisimilitude> I know.
<jackdaniel> NIH syndrome is strong in Lisp community, that's a well known fact
<verisimilitude> For something as benign as terminal manipulation, it's surprising Ncurses was ever used like this.
<jackdaniel> interesting (for me) is the fact, that we can talk about two NIH variants (both popular)
<verisimilitude> It's less than one thousand lines to replace it with something better.
<jmercouris> jackdaniel: what are the two variants?
<jackdaniel> NIH as in "not CL" and NIH as in "not written by me in CL"
<jmercouris> Oh lol
fraya has quit [Remote host closed the connection]
<jmercouris> The second variant is worse I think
<jmercouris> lots of CL libraries do the same things over and over
<jmercouris> despite such a small community, one would imagine less duplication of efforts
<verisimilitude> I prefer this way to the alternative; I wouldn't want Common Lisp to be like, say, Go.
<jmercouris> CL needn't become useless to avoid duplication
<LdBeth> >> “lots of CL libraries do the same things over and over” like what
<verisimilitude> Well, there's several different Ncurses bindings.
<jmercouris> LdBeth: there's many different web frameworks, for example
<jmercouris> sure, they do things in different ways
<LdBeth> Like what?
<jmercouris> but communities with 10x, 100x as many users have the same amount of web frameworks
francogrex has quit [Remote host closed the connection]
<verisimilitude> This is a good document so far, beach, sans that note about IF, WHEN, and OR I disagree with.
<beach> jmercouris: "number". Amount of stuff, number of things.
<jmercouris> beach: not sure what you mean, I did isearch-backward and I didn't say number or "amount of stuff"
<verisimilitude> In section 4.1, I find something else.
<beach> jmercouris: You said "amount of web frameworks".
<jmercouris> Oh, I see
<jmercouris> Right yes, I meant number
<beach> But web framework is countable, so you should have used "number of web frameworks".
rumbler31 has quit [Remote host closed the connection]
<verisimilitude> I'm not always inclined to create a class or struct when I want a record; usually, it's more convenient to use a list and simply control all ways things are modified.
<jackdaniel> they (frameworks) probably passed this strange point where numbers become amounts, we can't count them anymore ;-)
<jmercouris> what we need is another standard! ;)
<jackdaniel> that only proves, that we have so many (much!) of them :)
<verisimilitude> I'm certainly not going to make types that are simply standard types with a documentation string attached.
<beach> Does the same thing hold true for "game engines"?
<LdBeth> I think one of few things been invented a lot of times in CL is markup language
<beach> verisimilitude: Using a list is fine, as long as you wrap it in a consistent protocol. I suspect you wouldn't do that, though.
<verisimilitude> Well, I do.
<beach> verisimilitude: Then you would have more code than if you did it with a standard class.
<verisimilitude> I'd rather use standard types if I can, then introduce my own types and then functions that only work on those types.
<beach> ... :accessor bla, vs (defun bla (thing) (car thing)) (defun (setf bla) (new-value thing) (setf (car bla) new-thing))
<verisimilitude> One of my favorite type sysetms is APL's; you have arrays or single values of numbers or characters and that's it.
trittweiler has quit [Ping timeout: 245 seconds]
<LdBeth> CL can also restrict type in an ARRAY
<TMA> verisimilitude: try the type system of MUMPS, even simpler... you have string and associative array (each variable is both at once, and each variable value is both at once, although expression values are just strings)
<schweers> in forth one has the machine word ;P
<verisimilitude> Yes, LdBeth; that's interesting, TMA.
<jackdaniel> I like the binary type system, everything is either 1 or 0 ;-) that said I'll check on later \o
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<verisimilitude> The ``type system'' of a typical machine code is what enables its homoiconicity, so, yes, it's very nice.
<loke> TMA: What is the string prepresentation of an associative array in MIMS?
<loke> MUMPS
milanj_ has quit [Read error: Connection reset by peer]
<xificurC> I have a function that is used from a script and is calling exit at the end. Invoking that in the slime REPL exits the session :)
<jmercouris> xificurC: that makes sense, no?
Kundry_Wag has joined #lisp
<verisimilitude> Maybe you should use RETURN-FROM, xificurC, right?
<xificurC> jmercouris: yes, not very convenient though :)
<xificurC> when writing bash scripts and calling a script from the repl the script is a forked process so it exits with an exit code and you're back in the shell
<verisimilitude> Bash has many design oddities.
<loke> verisimilitude: Bash is reasonably sensible. What aspects of it do you feel that is odd? (as opposed to its ancestors)
<verisimilitude> Well, I can't rightly criticize Bash if I don't get to criticize sh and everything else.
<loke> verisimilitude: Right. It's not bash's fault that the language it shit
<TMA> loke: there is no string representation of an array (that is no "builtin" string representation) you can write your own, eg.: a="a" a("a")="a" a("a","a")="a"
<verisimilitude> Of course not.
<loke> I feel Bash did as best as it could.
<verisimilitude> I mostly use sh for writing programs to launch my real programs. I'd hate more to do anything else in it.
Kundry_Wag has quit [Ping timeout: 260 seconds]
milanj has joined #lisp
<verisimilitude> Peter Norvig doesn't seem to like PROG at all.
<loke> verisimilitude: Who does? It's kinda useless.
<shrdlu68> Hardly ever use it outside macros.
<verisimilitude> Well, I like it.
<loke> verisimilitude: For what?
<verisimilitude> I use it for control flow when the other options are less elegant.
<verisimilitude> If you want efficiency, it's virtually guaranteed you're going to get a better expansion than LOOP; LOOP implementations are generally quite poor in that respect.
<verisimilitude> What does SBCL's LOOP MACROEXPAND to, SB-LOOP::LOOP-BODY; that's very informative.
milanj has quit [Read error: Connection reset by peer]
<verisimilitude> Well, that was a pleasant read, beach.
milanj has joined #lisp
shrdlu68 has quit [Ping timeout: 240 seconds]
<beach> Good.
shrdlu68 has joined #lisp
housel has quit [Remote host closed the connection]
<verisimilitude> I didn't disagree with most of it.
<verisimilitude> I still don't plan to use more than one semicolon for comments, though.
zooey has joined #lisp
<beach> Of course.
<verisimilitude> Now, with regards to my article, I can recognize the obvious issues with DRAW-WINDOW-BORDER and how some of the other functions could be cleanly split into more parts, but I was aiming for one direct purpose for each function and doing otherwise would've distracted from the actual points being made, I think.
fikka has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
markoong has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
milanj has quit [Read error: Connection reset by peer]
<aeth> verisimilitude: I find that the often-neglected DO is a nice middle ground between LOOP and TAGBODY/PROG, especially for macros instead of direct use.
<aeth> DO also tends to have a straightforward macroexpand-1, unlike LOOP, and you *can* put GO in it if you need to.
papachan_ has joined #lisp
fikka has joined #lisp
<aeth> As for PROG, it's so rare to use it directly that emacs/slime doesn't even correctly format it iirc, unlike tagbody.
milanj has joined #lisp
milanj has quit [Client Quit]
<aeth> As for sh, imo it's only a good choice for < 20 lines or so, but it's pretty hard to beat for those < 20 lines.
fikka has quit [Ping timeout: 260 seconds]
<LdBeth> Only reason to use sh is for portability, because Perl is not standardized enough
<aeth> I've always thought that the optimal length of a scripting language file is about 100 lines.
<aeth> That's 5x longer than my intuition for sh. And it does seem to match my experience in trying to convert sh to a scripting language, even CL + UIOP.
MasouDa has joined #lisp
<dim> is there some docs online showing how to compile SBCL with say openssl already linked in the ELF binary (avoiding dlopen)?
<aeth> Some people were experimenting with packaging libraries with binaries in #lispgames so they might have an answer if no one in here knows. (As for me, I never got to the binary part.)
MasouDa_ has joined #lisp
wigust has joined #lisp
MasouDa has quit [Remote host closed the connection]
MasouDa_ has quit [Remote host closed the connection]
<LdBeth> dim: there’s some technique prepend linked libraries into binary
<dim> LdBeth: any known howto/document to do that?
MasouDa has joined #lisp
nowhereman_ has quit [Ping timeout: 256 seconds]
Ven`` has joined #lisp
fikka has joined #lisp
<beach> dim: Why do you want to avoid dlopen?
<beach> dim: I don't know the issue, so it's a serious question.
<dim> because it may dlopen a different ssl lib at build-time and at run-time, and then the lisp image contains symbols that are not found, and then I don't undertand anything other than it fails
Ven`` has quit [Read error: Connection reset by peer]
<beach> Oh, I see. This is C stuff so you can't just do save-lisp-and-die?
Ven`` has joined #lisp
<jackdaniel> dim: doesn't (cl+ssl:reload) help with that?
<dim> ahah, I wish
<shka> how stable-sort checks of equality?
<jackdaniel> it takes predicate as an argument
<jackdaniel> it is up to your function you pass to it
<beach> shka: It assumes a total ordering, so if neither (funcall less x y) nor (funcall less y x) is true, then it assumes x and y are equal.
<beach> shka: Same thing for ordinary sort.
<beach> Not particular to stable-sort.
<shka> oh
<shka> makes sense!
<shka> thanks for answer
<beach> Sure.
<jackdaniel> stability only ensures, that if a preceedes b, and neither is lessp then the other, then a will preceede b in the resulting sequence
milanj has joined #lisp
<beach> shka: Right. STABLE-SORT typically does not have to test for equality. It just makes sure that the order is not altered unless the second is strictly less than the first.
<shka> got it, thanks
eli_oat has joined #lisp
dtornabene has joined #lisp
Ukari has quit [Remote host closed the connection]
m00natic has quit [Read error: Connection reset by peer]
m00natic has joined #lisp
eli_oat has quit [Client Quit]
eli_oat has joined #lisp
fikka has quit [Ping timeout: 276 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<beach> Speaking of which, there is a related project that could result in an ELS paper. It is known that merge sort (which is stable) is faster than quicksort (which is not). But naive merge sort requires O(n) additional memory to sort a vector (but not a list). There are research papers that turn that into O(1) but at a cost. The project is to implement merge sort on vectors by checking whether there is available space on the stack. If
<beach> so, use it to make merge sort fast. If not, use one of the published algorithms to make it correct but slower.
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
<beach> No takers?
<beach> Aww! :(
<shka> beach: you have patience of 5 years old :]
<jmercouris> beach: I'm interested
papachan_ has quit [Quit: Saliendo]
<beach> shka: Thanks (I guess)!
<beach> jmercouris: I'll point you to some papers if you like.
<jmercouris> sure, email me them
<beach> Will do.
hhdave_ has joined #lisp
<shka> simply dynamic-excent array if?
<shka> like a separate branch?
<shka> beach: can I also get those papers, please?
hhdave has quit [Read error: Connection reset by peer]
hhdave_ is now known as hhdave
<beach> Oh, sure. What's your address again?
<shka> sirherrbatka at gmail please
<beach> Done.
<shka> thank you
<beach> There are only two papers, but there are others in the list of references.
<shka> i need some kind of sorting for cl-ds anyway...
<beach> shka, jmercouris: now that I think about it. Those papers may not be available for free, so be careful what you do with them.
Ven` has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
<jmercouris> beach: Ok
fikka has joined #lisp
<shka> beach: i am not going to take it to academia, i just need runnable code :P
fraya has joined #lisp
Ven`` has quit [Ping timeout: 276 seconds]
<beach> shka: Sure. Still, someone needs to write the tests and compare to the SORT implementations of various Common Lisp systems. There is plenty of non-academic work in a paper like that.
<shka> sure
<shka> do you want to get the results?
<jkordani> beach: that sounds interesting to me too. but how can it be known how much space is available on the stack?
<beach> jkordani: I am pretty sure your Common Lisp implementation has a way of telling you. I know SBCL does.
fikka has quit [Ping timeout: 240 seconds]
<jkordani> in hindsight I suppose that it is known/enforced by the os so I guess I shouldn't be surprised that there is a way for a program to discover the limit
Inline has joined #lisp
eli_oat has quit [Quit: Leaving.]
<beach> jkordani: And in the case of SBCL, I believe the default stack size is fixed by SBCL itself. It is per thread.
<jkordani> hmm
<schweers> beach: out of curiosity, how does one get the free stack space?
<schweers> (on sbcl)
<beach> Now you are asking me to remember that. No way. Let me see whether I can dig it up...
<schweers> beach: I thought you knew it off the top of your head, don’t go to too much effort just to satisfy my curiosity please.
attila_lendvai has quit [Read error: Connection reset by peer]
<beach> OK. I'll see if it is the paper we wrote about processing lists in reverse order. Hold on...
attila_lendvai has joined #lisp
charh has quit [Ping timeout: 240 seconds]
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
fikka has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
<beach> schweers: sb-vm:*conrol-stack-end* sb-vm:*control-stack-start* sb-kernel:control-stack-usage is what I see in our code.
charh has joined #lisp
<beach> control, not conrol.
<schweers> cool, thanks!
<beach> so you do (- sb-vm:*control-stack-end* sb-vm:*control-stack-start* (sb-kernel::control-stack-usage))
<beach> We used it for this paper: http://metamodular.com/reverse-order.pdf
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
<schweers> oh, control-stack-usage is not external. that explains why I couldn’t find it at first
<beach> Yeah, there is some internal stuff there. To be expected.
<schweers> but yeah, cool :)
fikka has quit [Ping timeout: 245 seconds]
<beach> Time for a break. I'll be back later.
fikka has joined #lisp
FreeBirdLjj has joined #lisp
smurfrobot has quit [Remote host closed the connection]
TCZ has joined #lisp
housel has joined #lisp
nowhereman_ has joined #lisp
Bike has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
TCZ has quit [Quit: Leaving]
attila_lendvai has quit [Read error: Connection reset by peer]
mindCrime has joined #lisp
swflint has joined #lisp
ak5 has quit [Read error: Connection reset by peer]
Tristam has joined #lisp
sjl has joined #lisp
smurfrobot has joined #lisp
Ven` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
EvW1 has joined #lisp
Kundry_Wag has joined #lisp
gabiruh has joined #lisp
Kundry_Wag has quit [Ping timeout: 256 seconds]
andrei-n_ has quit [Remote host closed the connection]
shrdlu68 has quit [Ping timeout: 260 seconds]
shrdlu68 has joined #lisp
smurfrobot has quit [Remote host closed the connection]
pierpal has joined #lisp
_cosmonaut_ has quit [Ping timeout: 256 seconds]
ak5 has joined #lisp
fraya has quit [Quit: Leaving]
eli_oat has joined #lisp
Kundry_Wag has joined #lisp
ak5 has quit [Ping timeout: 276 seconds]
_cosmonaut_ has joined #lisp
kuwze has joined #lisp
Kundry_Wag has quit [Ping timeout: 276 seconds]
fikka has quit [Ping timeout: 240 seconds]
Ven`` has joined #lisp
eli_oat has quit [Quit: Leaving.]
asarch has joined #lisp
lumm has joined #lisp
<beach> loke: I have invented a synchronization protocol for the garbage collectors of SICL. If you feel like reading it, here it is: http://metamodular.com/garbage-collection.pdf
<beach> loke: I included the entire chapter, because it explains the different techniques as well.
<beach> loke: I am not a synchronization expert. There might be simplifications possible, using (say) condition variables rather than semaphores.
<beach> loke: The chapter is not entirely complete. I have yet to describe locking in the global collector as a result of promotion requests and as a result of using multiple threads for the global collector.
<beach> Anyone else who would like to read it is of course welcome to do so. I take questions and requests for improvements as usual.
fikka has joined #lisp
<Bike> this isn't directly related, but how are conses recognized if they don't have a class pointer?
<beach> tag bits
gigetoo has joined #lisp
<Bike> oh, duh.
<beach> Heh!
<Bike> and racks don't move. the only time you'd need to resize one is for change-class, but you can just allocate a new rack instead and actually sorta have to, so there's no problem
<beach> The racks move in the nursery but not in the global heap.
<beach> Correct.
<beach> And I want allocate a new one because I want to use CAS to install it.
eli_oat has joined #lisp
<beach> That way, certain operations can go on in parallel.
<beach> Like an array access and an adjust-array operation.
al-damiri has joined #lisp
<beach> I don't know what Clasp does in this case.
angavrilov has joined #lisp
<beach> Typical situation: thread A wants to set an element, thread B shrinks the array.
smurfrobot has joined #lisp
<beach> A checks the size, then gets blocked. B shrinks the array. A wakes up and sets an element outside the array.
<flip214> what's the easiest way to get an (array (unsigned-byte 8) *) MSB-filled from a bigint? a loop with LDB, or is there a faster way?
<Bike> probably a loop with ldb
SaganMan has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
<flip214> ah, IRONCLAD:INTEGER-TO-OCTETS sounds promising
<beach> In SICL, the plan is that A checks the size which is stored in the rack and the rack does not change its size. B shrinks the array by allocating a new rack. It then uses the CAS operation to install the new rack. A needs to access the rack again only after a call to an external function, or in an infinite loop.
<beach> So does Clasp have a lock for every array access? Or is it just not thread safe? Or some other solution that I can't think of?
smurfrobot has quit [Ping timeout: 264 seconds]
<Bike> I think that it's not thread safe in this area.
<beach> Hmm.
<beach> Any plans to make it thread safe? If so, how?
<beach> A lock for each array access seems very costly. But maybe it isn't with SLE.
<Bike> i don't think it's on the agenda now. other fires to put out and all.
<beach> Sure, yeah.
<beach> I should ask scymtym to look at this as well, since he knows about SBCL internals.
MasouDa_ has joined #lisp
<jackdaniel> afaik Jose's idea about thread-safety was that programmer is responsible for locking access when appropriate (and since drmeister reimplemented same algorithms in C++ initially, that behavior is inherited)
<beach> I see, yes.
<beach> There is also the fact that "thread safety" means different things for different people.
<beach> ... and in different situations.
MasouDa has quit [Ping timeout: 240 seconds]
wheelsucker has joined #lisp
<beach> What I want for SICL is that it won't crash with a segmentation fault or similar.
<drmeister> I think we could add thread safety by making the type that points to the rack and the rack slots to atomic.
<beach> But it can give the wrong answer in some situations unless the programmer take precautions.
<drmeister> ... by switching the type that points ...
<beach> ?
<beach> Can you describe what to do for the use case I indicated?
<Bike> we store the size separately from the data vector, so it would be more involved.
kajo has joined #lisp
kajo has quit [Read error: Connection reset by peer]
<drmeister> I can't answer at the moment - I'll need to think hard about what you proposed and what I'm thinking.
<drmeister> I may be wrong.
<beach> No rush.
<beach> I am just interested in what others do.
Quetzal2 has joined #lisp
rumbler31 has joined #lisp
eli_oat has quit [Quit: Leaving.]
azimut has joined #lisp
eli_oat has joined #lisp
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
Kundry_Wag has joined #lisp
edgar-rft has joined #lisp
mindCrime has quit [Quit: Leaving]
JuanDaugherty has joined #lisp
gsl has joined #lisp
Kundry_Wag has quit [Ping timeout: 245 seconds]
mangul has joined #lisp
robotoad has joined #lisp
shangul has quit [Ping timeout: 256 seconds]
shrdlu68 has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 265 seconds]
mindCrime has joined #lisp
smurfrobot has joined #lisp
fikka has joined #lisp
Tristam has quit [Ping timeout: 264 seconds]
rumbler31 has quit [Remote host closed the connection]
mathrick has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
Tristam has joined #lisp
priyadarshan has joined #lisp
jmercouris has quit [Remote host closed the connection]
mangul is now known as shangul
pjb has joined #lisp
shangul has quit [Quit: sudo rm -rf /usr/*]
fikka has quit [Ping timeout: 248 seconds]
Quetzal2 has quit [Quit: ?? Bye!]
smurfrobot has quit [Remote host closed the connection]
vitali has joined #lisp
dtornabene has quit [Remote host closed the connection]
<beach> Suppose I wanted to implement Clordane for SBCL, or rather, for SBCL code compiled with a Cleavir-based compiler, so that I can control precisely what that code does. I translate to HIR, then back to a simpler Common Lisp that I compile with the native SBCL compiler. But the resulting code is supposed to interrogate a table in the thread structure say before and after each form to evaluate.
<pjb> loke: message passing was what was envisionned originally by Alan Kay. Unfortunately, he named it object-oriented, and the first implementations used function calls, so all went awry. The difference is that function calls are synchronous, while message passing is asynchronous: the sender doesn't wait for the recipient to process th message. This is not necessarily related to multi-threading or multi-processing, and if you have
<pjb> threads, a single object may be processing multiple messages in parallel, or not.
dtornabene has joined #lisp
<beach> Now, SBCL represents threads with structure objects, so I can't change-class if I want to add more stuff to them. Do I need to modify the source of SBCL to make this work.
<pjb> loke: when objects are restricted to a single thread, they're called "monitors". Then they're the focal point of synchronisation, since processing their messages is mutually-exclusive.
<beach> I mean, I could do that, I guess, but it's a bit scary.
<pjb> beach: but it may be the easiest way to do it, if you depend on change-class.
<beach> I can't do change-class on a structure object, right?
<pjb> beach: wrapping your own object around things often lead to re-implementing a lot…
<beach> Yeah.
<pjb> Theorically not. Perhaps sbcl structure objects allow it?
<beach> That's possible. I'll make a small test.
dtornabene_ has joined #lisp
dtornabene has quit [Read error: Connection reset by peer]
buffergn0me has joined #lisp
<beach> Nah.
<pjb> So patch.
<beach> Yeah, shouldn't be too hard.
<pjb> Let's benefit from freedom software and open source!
<beach> Absolutely.
<beach> I need to figure out exactly what I need first.
<beach> For native SICL code, I imagined having several tables mapping values of the program counter to source locations, for things like stepping.
<beach> I need to use something to replace program-counter values.
<beach> Perhaps HIR instructions could play that role.
fortitude has joined #lisp
fikka has joined #lisp
dtornabene_ has quit [Remote host closed the connection]
dtornabene_ has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
<beach> That might work. Before and/or after evaluating an expression, the code consults a hash table in the thread object. If the hash table contains TRUE, then the threads stops, waiting for the debugger to allow it to continue.
<mfiano> beach: Are there any implementations of your fast generic dispatching paper?
attila_lendvai has quit [Read error: Connection reset by peer]
<beach> mfiano: Yes, in Clasp.
<beach> mfiano: Also an experimental implementation in SBCL.
<mfiano> Ah is there more evidence than in the paper? :-)
<beach> mfiano: It is inconclusive. In SBCL it is sometimes faster and sometimes slower than the native technique.
shka_ has joined #lisp
<mfiano> I see. Thanks.
<beach> mfiano: In Clasp, it is hard to tell because there are other performance problems.
attila_lendvai has joined #lisp
<beach> I guess it must also indicate where it stopped (the HIR value) so that the debugger can consult a table to figure out the corresponding source location.
vhost- has joined #lisp
<beach> This doesn't sound terribly hard unless performance is a problem.
trittweiler has joined #lisp
<beach> mfiano: For details in Clasp, you can ask drmeister or Bike.
<Bike> mhm
<beach> mfiano: For SBCL, scymtym is the one who did the implementation.
<Bike> it's faster than what we had. the main issue with it is warmup time, which is exacerbated by unrelated factors. and sbcl has warmup time too. such is caching
<beach> mfiano: The beauty of Common Lisp is that several techniques could coexist. Some generic functions could use one technique and some others some other technique, so the best one can be chosen on an individual bases. The same generic function can even use different techniques at different times, depending on the applicable methods.
stnutt has joined #lisp
Fare has joined #lisp
<beach> One might for instance choose one technique for a simple slot reader, and a different technique for (say) PRINT-OBJECT.
<mfiano> Interesting. The MOP is a beautiful thing.
<beach> Indeed.
<mfiano> I am toying with Masataro Asai's implemebtation at the moment. No data yet :)
<beach> I use that fact when I run SICL generic functions inside SBCL. I use the fast generic dispatch technique to create the discriminating function, and SBCL uses its own technique of course.
verisimilitude has quit [Remote host closed the connection]
<beach> mfiano: His implementation of what?
<mfiano> inlinable GFs
<beach> Ah, OK. Nice.
buffergn0me has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #lisp
<beach> What someone should do some day is to figure out how to recompile call sites when the callee changes, and doing so while still respecting the semantics of Common Lisp. I am pretty convinced that just recompiling the calling function from scratch would violate the semantics.
fikka has joined #lisp
EvW1 has quit [Ping timeout: 255 seconds]
skapata has joined #lisp
<Bike> How?
<beach> How would it violate the semantics? Well, for one thing, if you start from source code, you will have violated the "minimal compilation" restriction, because some macros might have changed in the meantime.
<beach> Starting from HIR might be better.
<Bike> oh, makes sense
fikka has quit [Ping timeout: 256 seconds]
housel has quit [Read error: Connection reset by peer]
housel has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
attila_lendvai has joined #lisp
fikka has joined #lisp
<beach> We could represent the discriminating function of the callee as HIR, inline it, and then do things like type inference on the result.
<beach> I obviously haven't thought about the details.
fikka has quit [Ping timeout: 255 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
nickenchuggets has joined #lisp
nickenchuggets has joined #lisp
nickenchuggets has quit [Changing host]
fikka has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
<asarch> What's wrong?: http://paste.scsys.co.uk/577729
FreeBirdLjj has quit [Remote host closed the connection]
hhdave has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
vitali has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 240 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
schweers has quit [Ping timeout: 276 seconds]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
<Xach> asarch: what are you trying to do?
d4ryus has joined #lisp
<phoe> asarch: one second
<phoe> is this *all* compilation output?
<phoe> ...it seems to be
Fare has quit [Ping timeout: 256 seconds]
<phoe> "WARNING: No installation directory specified." seems to be the root cause
<phoe> later it fails to find the file "foo.mem"
<phoe> asarch: unrelated question - any particular reason why clisp?
attila_lendvai has quit [Read error: Connection reset by peer]
<Xach> Don't clog the question queue!
<phoe> Your question is first on the queue anyway!
fikka has joined #lisp
_cosmonaut_ has quit [Ping timeout: 260 seconds]
<Bike> i hope clisp compilation doesn't result in all those warmings normally. whoof.
tmf has joined #lisp
shangul has joined #lisp
<Xach> phoe: but clearly it is one that takes a lot of resources to process
littlelisper has joined #lisp
<Xach> phoe: two questions could take hours
milanj has quit [Quit: This computer has gone to sleep]
<shangul> phoe, oh hello!
<shangul> pjb, and you
<phoe> shangul: heyyy
eli_oat has quit [Quit: Leaving.]
fikka has quit [Ping timeout: 240 seconds]
<asarch> There is no official Debian package for clisp phoe
<shangul> are you sure?
<asarch> Yeah, I'm sure
<asarch> There is no "foo.mem" at the compilation directory
<Xach> Oh no :( my question got skipped
<Xach> thanks a lot, phoe
<shangul> asarch, however there is in Ubuntu packages
m00natic has quit [Read error: Connection reset by peer]
<phoe> Xach: ;_; sorry
<asarch> What was your question Xach?
<asarch> Yeah, Ubuntu does have it
<asarch> Even Slackware has it in its base installation
<Xach> asarch: what are you trying to do?
<asarch> To have clisp in the stable version of Debian AMD64
* asarch feels proud
<Xach> asarch: what commands did you run to try to do that?
<asarch> The latest release of SBCL went fine: http://paste.scsys.co.uk/577730
<asarch> asarch@hell:~/Projects/clisp-2.49$ ./configure --cbc built-with-gcc > compilacion.log 2>&1
<asarch> shka was right. I used an old release of SBCL to build the newest one
littlelisper has quit [Ping timeout: 276 seconds]
mflem has joined #lisp
akkad has joined #lisp
<akkad> is it possible to alias defn/def to defun?
<phoe> akkad: sure it is
<phoe> akkad: but don't show that code to other people who write Common Lisp
* akkad has to stop thinking in scheme
<akkad> sure, just make some shims to reduce my porting effortt
<phoe> (setf (macro-function 'def) (macro-function 'defun))
<phoe> but you actually want to write a different macro
Fare has joined #lisp
<phoe> because (def foo ...) and (def (foo ...) ...) mean two different things
<akkad> right. makes sense, especially one with a lambda that dtrt.
smurfrobot has joined #lisp
<phoe> also you're in Lisp-2 now so these two different forms of def start making little sense now
mangul has joined #lisp
shangul has quit [Ping timeout: 248 seconds]
<Xach> \
MichaelRaskin has joined #lisp
rumbler31 has joined #lisp
JuanDaugherty has quit [Quit: Exeunt]
foom has joined #lisp
rumbler31 has quit [Ping timeout: 260 seconds]
IdleBot_4bca4710 has left #lisp [#lisp]
Fare has quit [Ping timeout: 256 seconds]
obicons has joined #lisp
kuwze has quit [Ping timeout: 260 seconds]
gousuto has joined #lisp
nickenchuggets has quit [Ping timeout: 256 seconds]
sz0 has joined #lisp
shrdlu68 has joined #lisp
igemnace has quit [Quit: WeeChat 2.1]
<mangul> Xach, :\ you meant?
mangul has quit [Quit: sudo rm -rf /usr/*]
tmf has quit [Quit: WeeChat 1.9.1]
Fare has joined #lisp
eli_oat has joined #lisp
priyadarshan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ak5 has joined #lisp
vitali has joined #lisp
ak5 has left #lisp [#lisp]
Kundry_Wag has joined #lisp
varjag has joined #lisp
Fare has quit [Ping timeout: 248 seconds]
Fare has joined #lisp
sauvin has quit [Remote host closed the connection]
comborico1611 has joined #lisp
random-nick has quit [Read error: Connection reset by peer]
<makomo> is there a way to create a never-before-seen package just like you can do for symbols with GENSYM?
slyrus_ has joined #lisp
<makomo> i can do (make-package (gensym)) but the SYMBOL-NAME is used as the package's identifier right?
<makomo> so any other symbol with the same name will return the same package when FIND-PACKAGE is used
priyadarshan has joined #lisp
<edgar-rft> makomo, try (progn (make-package 'foo) (make-package 'foo)) ans see what happens.
<Xach> makomo: there is nothing directly comparable to gensym.
vitali has quit [Ping timeout: 245 seconds]
<Xach> All packages are registered by name, globally.
<makomo> what i need is to READ some code, and i want to do so within a new fresh package
<Inline> then import while reading ?
<makomo> and i want a fresh package every time i READ to make sure that i get a new environment of sorts
<makomo> i guess i could reserve a name for myself and then DELETE-PACKAGE when i'm done and ready to READ again
<makomo> but i could have multiple "simulations" running, which would require multiple fresh packages at the same time
<Inline> (defpackage (gensym my-packag-)....
<makomo> won't that fail because defpackage is a macro?
<MichaelRaskin> Package names are strings, not symbols
<makomo> right :^(
<makomo> i see this as the same problem of "well, just come up with a funny name that nobody else will think of"
<makomo> how come it was handled for macros but not for gensyms?
<makomo> s/of/as/
<MichaelRaskin> I would generate a random name (as in (format nil "~36r" (random (expt 36 20))) ) add prefix, check for collisions, hope for the best
<makomo> not for packages*, jesus...
dtornabene_ has quit [Quit: Leaving]
<makomo> MichaelRaskin: yeah lol, pretty much the only way
fikka has joined #lisp
<makomo> but i wonder why strings were chosen as package identifiers? would it really be weird if symbols named packages?
<makomo> maybe you would have the problem of bootstrapping or something?
shrdlu68 has quit [Ping timeout: 240 seconds]
<MichaelRaskin> I think ABCL moved to using symbols for package names
<MichaelRaskin> And it works well
<makomo> i see, that's nice
<makomo> also, neat way of generating a random string :D
<MichaelRaskin> By the way, as make-package signals if there is a conflict, you can write a make-random-package function that is guaranteed not to collide with its own things
<makomo> mhm, true
jmercouris has joined #lisp
<dlowe> Isn't there a reader implementation with its own symbol objects?
ckonstanski has joined #lisp
shrdlu68 has joined #lisp
<dlowe> That would be better than using the built-in reader and hacking it to do what you want.
SaganMan has quit [Ping timeout: 268 seconds]
<jdz> c
<scymtym> makomo: another option would be https://github.com/robert-strandh/eclector which can be customized to not intern symbols
<makomo> dlowe: i'm not really hacking it. all i'm doing is READ-ing and that's it
<makomo> i guess something like eclector then?
<makomo> scymtym: right! :D
fikka has quit [Ping timeout: 265 seconds]
<dlowe> makomo: random package names come pretty close to ugly hacks
<MichaelRaskin> One day beach will release SICL with first-class global environments and there will be much rejoicing
<makomo> MichaelRaskin: indeed
<makomo> dlowe: ah, that's what you meant. i guess so
asarch has quit [Quit: Leaving]
asarch has joined #lisp
<asarch> Two questions: where can I learn more about ASDF and where about the debugger?
<sjl> asarch: ASDF has a manual. It's worth sitting down and reading the whole thing at some point https://common-lisp.net/project/asdf/asdf.html
<asarch> Thank you sjl
<asarch> Thank you very much :-)
kajo has joined #lisp
random-nick has joined #lisp
kajo has quit [Read error: Connection reset by peer]
priyadarshan has quit [Quit: Textual IRC Client: www.textualapp.com]
priyadarshan has joined #lisp
priyadarshan has quit [Client Quit]
eli_oat has quit [Quit: Leaving.]
fikka has joined #lisp
Fare has quit [Ping timeout: 256 seconds]
housel has quit [Remote host closed the connection]
shrdlu68 has quit [Ping timeout: 264 seconds]
shrdlu68 has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
pagnol has joined #lisp
SaganMan has joined #lisp
jmsb has joined #lisp
fikka has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
didi` has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
<didi`> So I'm reading CLtL2's section 22.1.1 What the Read Function Accepts, and it contains a description of the reader algorithm. It looks interesting.
<didi`> Do implementations follow this algorithm?
Fare has joined #lisp
SaganMan has quit [Ping timeout: 260 seconds]
<dlowe> Presumably, the algorithm followed is in the spec
<didi`> Cool.
vitali has joined #lisp
figurehe4d has joined #lisp
<butterthebuddha> Are vectors atoms?
<didi`> butterthebuddha: Yeap.
<didi`> I am trying to write a reader for JSON, using CLOS, but I stopped at writing various (defmethod read-number (stream (x (eql 0))) ...), (defmethod read-number (stream (x (eql 1))) ...), ... CL's algorithm might be a better one.
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
Fare has quit [Ping timeout: 264 seconds]
kajo has joined #lisp
akkad has quit [Remote host closed the connection]
fikka has joined #lisp
Smokitch has quit []
Kundry_Wag has quit [Remote host closed the connection]
<dlowe> butterthebuddha: everything not a cons or NIL is an atom.
<dlowe> butterthebuddha: it's really not that useful of a concept.
Kundry_W_ has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
<butterthebuddha> Yeah I thought so; I am implementing an interpreter and was wondering if there was any functional difference between a vector and an "atom" that I wasn't aware of
jmercouris has quit [Remote host closed the connection]
Kundry_W_ has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
<dlowe> butterthebuddha: atoms only exist conceptually as an opposition to a "list"
<didi`> Well, it's a way of differentiating ... Dang, you, dlowe...
<sjl> dlowe: NIL is an atom
<sjl> clhs atom
fikka has joined #lisp
sz0 has quit [Quit: Connection closed for inactivity]
pierpa has joined #lisp
SaganMan has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
MasouDa has joined #lisp
MasouDa has quit [Client Quit]
trittweiler has quit [Ping timeout: 245 seconds]
MasouDa_ has quit [Ping timeout: 260 seconds]
zachk has joined #lisp
<aeth> atoms were useful... before Lisp added arrays, hash-tables, structs, CLOS objects, streams, ...
zachk has quit [Changing host]
zachk has joined #lisp
fikka has joined #lisp
<MichaelRaskin> https://gitlab.common-lisp.net/mraskin/agnostic-lizard/blob/master/debugger-hooks.lisp — the core of core of portable debugger hooks support. Not as simple as I hoped, not as horrible as I feared (and forced me to add some more useful data in Agnostic Lizard)
<aeth> It might still be a meaningful distinction in elaborate macros, but you'd generally be testing for lists and then handling the rest differently, not testing for atoms
<MichaelRaskin> Zero clue how to add anything about file positions
<aeth> MichaelRaskin: agnostic-lizard? I'm glad someone else uses my naming scheme
<aeth> adjective-animal
<MichaelRaskin> Ubuntu isn't enough for you?
<aeth> well, they go for matching the starting letters, too
smasta has joined #lisp
scymtym has quit [Ping timeout: 245 seconds]
<MichaelRaskin> For some reason, such names feel good for my attempts at something small that traverses something
<aeth> small?
<aeth> [2~[3~
<aeth> oops
<aeth> that's the problem with a terminal. press some keys and some line noise will come out
<aeth> Anyway, I don't use the naming scheme for small things.
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
<MichaelRaskin> Well, not really really small
fikka has quit [Ping timeout: 256 seconds]
<dlowe> sjl: it's true. NIL is an atom.
<dlowe> so useful.
_whitelogger has joined #lisp
Kundry_Wag has joined #lisp
<MichaelRaskin> True, but I am too lazy to token-count
Kundry_Wag has quit [Remote host closed the connection]
<sjl> I wish cloc would count docstrings as comments, not code
fikka has joined #lisp
Kundry_Wag has joined #lisp
<MichaelRaskin> And I guess if my mess of throwing together «escape browser dump web to text editor» is ever worth a release, I keep the package name thoughtful-theridion (theridia is the taxon of cobweb spiders)
wigust has quit [Quit: ZNC 1.7.0 - https://znc.in]
fikka has quit [Ping timeout: 264 seconds]
Kundry_Wag has quit [Remote host closed the connection]
vitali has quit [Ping timeout: 265 seconds]
<dim> can I (open "..." :direction :probe :if-exists :rename) and expect the rename to happen?
rumbler31 has joined #lisp
Guest47607 has quit [Ping timeout: 256 seconds]
guaqua has quit [Ping timeout: 264 seconds]
johnvonneumann has joined #lisp
johnvonneumann is now known as Guest4111
<dim> it seems not, so I'm using with-open-file and a dummy instruction to avoid the warning about the variable being unused
guaqua has joined #lisp
fikka has joined #lisp
scymtym has joined #lisp
Kundry_Wag has joined #lisp
fikka has quit [Ping timeout: 245 seconds]
spm_ has joined #lisp
<makomo> dim: you could use an ignore declaration instead of dummy operations
johnvonneumann_ has joined #lisp
Guest4111 has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
SaganMan has quit [Ping timeout: 265 seconds]
rumbler31 has quit [Remote host closed the connection]
earl-ducaine has joined #lisp
fikka has joined #lisp
wheelsucker has quit [Quit: Client Quit]
attila_lendvai has joined #lisp
pagnol has quit [Ping timeout: 240 seconds]
mikecheck has joined #lisp
pagnol has joined #lisp
orivej has joined #lisp
rumbler31 has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
mindCrime has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
Bike has quit [Ping timeout: 260 seconds]
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
Naergon has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 240 seconds]
pagnol has quit [Ping timeout: 240 seconds]
pagnol has joined #lisp
MoziM has quit [Quit: WeeChat 2.1]
fikka has joined #lisp
sjl has quit [Quit: WeeChat 2.2-dev]
karlosz has joined #lisp
vlatkoB has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 264 seconds]
kajo has joined #lisp
milanj has joined #lisp
shifty has joined #lisp
pagnol has quit [Quit: Ex-Chat]
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
shka_ has quit [Ping timeout: 268 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
random-nick has quit [Ping timeout: 255 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
fikka has joined #lisp
attila_lendvai has joined #lisp
rumbler31 has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 245 seconds]
krwq has joined #lisp
mega_beginner has joined #lisp
Bike has joined #lisp
karlosz has quit [Quit: karlosz]
fikka has joined #lisp
fikka has quit [Ping timeout: 245 seconds]
karlosz has joined #lisp
kajo has quit [Read error: Connection reset by peer]
fikka has joined #lisp
asarch has quit [Quit: Leaving]
fikka has quit [Ping timeout: 265 seconds]
<stylewarning> On SBCL, I have a function F which allocates lots of memory, but doesn't maintain the references. (loop (f)) causes a heap exhaustion, while (loop (gc :full t) (f)) does not. Any hints on why this could be?
<didi`> stylewarning: I usually fight SBCL's GC. If you discover something, please tell me.
fikka has joined #lisp
nirved has quit [Ping timeout: 245 seconds]
SaganMan has joined #lisp
<didi`> stylewarning: One thing that I observed is that it consumes memory before freeing memory.
<didi`> I mean, during the freeing, it consumes more memory.
papachan has quit [Quit: WeeChat 2.1]
<pierpa> didi`: is your program standard CL or are you using sbcl specifics?
<didi`> pierpa: Standard.
<pierpa> then, me, I would report this as a bug.
<didi`> pierpa: Thanks.
<pierpa> yw ;)
<stylewarning> I wonder if SBCL tries to do a full GC. It looks like all of my objects are in gen1 or 2, and SBCL is just ignoring those.
kajo has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
<pierpa> oops, I meant to ask stylewarning, not didi`!
<didi`> I feel like it consumes approximately 2 times the allocated memory to free it.
<didi`> pierpa: oic
<dim> makomo: the dummy declaration didn't do the trick
<dim> sorry, the (declare (ignore ...)) did raise another warning
<dim> Unknown or invalid declaration (IGNORE (DATA))
<dim> ahah, that's just the syntax being wrong, oops
MoziM has joined #lisp
nirved has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
<stylewarning> pierpa: it's standard.
<pierpa> ok
attila_lendvai has joined #lisp
SaganMan has quit [Ping timeout: 264 seconds]
SaganMan has joined #lisp
skeuomorf has quit [Remote host closed the connection]
fikka has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
vsync_ has joined #lisp
vsync has quit [Ping timeout: 255 seconds]
karlosz has quit [Quit: karlosz]
fikka has joined #lisp
varjag has quit [Ping timeout: 248 seconds]
scymtym has quit [Ping timeout: 256 seconds]
vitali has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
robotoad has quit [Quit: robotoad]
karlosz has joined #lisp
<stylewarning> pierpa: didi`: Here's a minimal test case: http://codepad.org/3rYlei16
loli has joined #lisp
<didi`> stylewarning: Please keep me inform. :-)
sjl has joined #lisp
comborico1611 has quit [Ping timeout: 256 seconds]
comborico1611 has joined #lisp
<pierpa> it could be an unfortunate effect of sbcl's gc conservativeness
fikka has joined #lisp
<pierpa> OTOH, it could also be something else, so I'd ask the sbcl people for an opinion
fikka has quit [Ping timeout: 256 seconds]
vitali has quit [Remote host closed the connection]
<pierpa> the hash tables that the function F creates are pretty big, so even a small percentage of them being kept because of false positives could explain the phenomenon.
vitali has joined #lisp
<stylewarning> pierpa: It would have to be holding on to a few of the large tables from a previous call to F
<pierpa> this theory agrees with the forst two of your starred points, while I don't understand the third one
<pierpa> *first
<Bike> if it was conservatism, how would calling gc manually fix it? it's not any less conservative just because it's forced
SaganMan has quit [Ping timeout: 264 seconds]
openthesky has joined #lisp
<pierpa> perhaps full gc is less conservative?
<pierpa> I don't know sbcl at all
SaganMan has joined #lisp
<stylewarning> I'm trying to figure out in the SBCL source where GC gets called upon a failed allocation
<Bike> in the runtime, i would guess
<stylewarning> I've been poking around there.
<stylewarning> Adding a CLRHASH upon return seems to fix it too.
<pjb> sbcl has generational GC.
mathrick has quit [Ping timeout: 276 seconds]
fikka has joined #lisp
<pjb> But in anycase, if the memory is full, GC should be called and dead memory freed.
<Bike> well, that's the mystery.
<pjb> Perhaps there's a bug that prevents automatic GC to collect older generations?
karlosz has quit [Quit: karlosz]
fikka has quit [Ping timeout: 264 seconds]
sjl has quit [Ping timeout: 264 seconds]
lumm has quit [Quit: lumm]
kajokajo has joined #lisp
kajo has quit [Ping timeout: 264 seconds]
openthesky has quit [Quit: Leaving.]
karlosz has joined #lisp
openthesky has joined #lisp
openthesky has quit [Client Quit]
attila_lendvai has quit [Quit: Leaving.]
Kundry_Wag has quit [Remote host closed the connection]
vitali has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
Trystam has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Tristam has quit [Ping timeout: 240 seconds]
Trystam is now known as Tristam
drl has joined #lisp
caltelt_ has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
Kundry_Wag has joined #lisp
<stylewarning> Looks like all the interesting stuff about GC triggering on allocation starts here: https://github.com/sbcl/sbcl/blob/master/src/runtime/gencgc.c#L3739
Kundry_Wag has quit [Client Quit]