p_l changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | ASDF 3.3.4
<Xach> markasoftware: how does the binary data and the string relate?
<markasoftware> it's data from a serial port. Sometimes it's ascii text, other times it's binary data.
<markasoftware> i want consumers of my library to be able to access it either way.
oxum has joined #lisp
oxum has quit [Remote host closed the connection]
<no-defun-allowed> If you have the time, you could investigate how exactly Drakma handles it; since it has to read characters for HTTP headers, and then bytes for the content.
<Xach> markasoftware: ah, definitely binary initially then.
<Xach> no-defun-allowed: in my http client i only store the headers as binary. i convert the search terms to binary when looking for header data.
<Xach> it's faster than converting the header to strings and using string-on-string searching.
<no-defun-allowed> Xach: I see. I think Drakma uses a wrapping stream that can read both characters and binary, from memory.
<Xach> i didn't really like that layering
<markasoftware> that's interesting. Maybe i should look into making mine a real stream
<no-defun-allowed> flexi-streams:flexi-input-stream?
<no-defun-allowed> It's an interesting technique, sure.
Krystof has quit [Ping timeout: 246 seconds]
abhixec has quit [Quit: leaving]
abhixec has joined #lisp
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Kundry_Wag has joined #lisp
abhixec has quit [Client Quit]
quazimodo has quit [Ping timeout: 256 seconds]
quazimodo has joined #lisp
<jfrancis_> puercopope: thank you! sketch looks exactly like what I was looking for!
oxum has joined #lisp
<Oladon> Could someone help me understand this error when trying to load Alexandria? "ALEXANDRIA is a nickname for the package ALEXANDRIA.1.0.0"
<Oladon> It sounds like a perfectly acceptable statement of fact to me, not an error :P
asarch has quit [Quit: Leaving]
abhixec has joined #lisp
dmc00 has left #lisp ["ERC (IRC client for Emacs 25.1.1)"]
quazimodo has quit [Read error: Connection reset by peer]
<Bike> i think that's what you'd get if youalready had a package called alexandria?
quazimodo has joined #lisp
<Oladon> Ah, hrm. How can I track down what's loading that version to figure out where the conflict lies?
<Xach> Oladon: do you use quicklisp?
<Oladon> Xach: indeed
<Xach> (ql:where-is-system "alexandria") will show some info
<Oladon> Ah, that's helpful, thanks Xach
zaquest has quit [Quit: Leaving]
lucasb has quit [Quit: Connection closed for inactivity]
zaquest has joined #lisp
anticrisis has joined #lisp
Bourne has quit [Ping timeout: 260 seconds]
davepdotorg has quit [Ping timeout: 244 seconds]
akoana has joined #lisp
rozenglass1 has joined #lisp
srandon111 has quit [Quit: leaving]
oxum has quit [Ping timeout: 258 seconds]
bitmapper has quit [Ping timeout: 256 seconds]
gko has joined #lisp
mangul has joined #lisp
buffergn0me has quit [Remote host closed the connection]
jeosol has joined #lisp
oxum has joined #lisp
oxum has quit [Ping timeout: 260 seconds]
Bourne has joined #lisp
gko has quit [Ping timeout: 260 seconds]
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #lisp
<jeosol> phoe: thanks for uploading the video. Watching now.
rozenglass1 has quit [Ping timeout: 272 seconds]
ralt has quit [Quit: Connection closed for inactivity]
FennecCode has joined #lisp
<jeosol> I guess one thing is the "why" question (why PCS). Hopefully it's addressed and clear in the video.
oxum has joined #lisp
rpg has joined #lisp
oxum has quit [Ping timeout: 256 seconds]
toorevitimirp has joined #lisp
Oladon has quit [Quit: Leaving.]
Josh_2` has quit [Ping timeout: 256 seconds]
turona has quit [Ping timeout: 265 seconds]
turona has joined #lisp
PuercoPope has quit [Read error: Connection reset by peer]
rozenglass1 has joined #lisp
<beach> Good morning everyone!
<beach> jeosol: So that SICL can finally have a condition system.
dyelar has quit [Quit: Leaving.]
oxum has joined #lisp
<beach> jeosol: In fact, not only does it come at a perfect time for SICL, since I haven't written much condition-system code yet. It is also perfectly inline with the goals of the SICL project, namely to create implementation-independent modules that can be used by creators of Common Lisp implementations.
<beach> jeosol: If FLOSS Common Lisp implementations were to use more such modules, we would cut down on the global maintenance burden.
<jeosol> beach: Aha. I forgot the bigger picture of the SICL goal. I was looking at PCS in isolation. This makes a lot of sense now.
Kundry_Wag has quit [Remote host closed the connection]
<jeosol> Thanks for clarifying.
<beach> Of course, phoe didn't write it with SICL in mind.
<beach> But still...
<jeosol> that PCS integrates/or can integrate into SICL
<beach> Very definitely.
<beach> At the moment, we have Eclector (reader), Concrete Syntax Tree (representing Common Lisp code with source information), Trucler (compile-time environments), PCS.
<jeosol> very nice.
<beach> We are working on extracting Cleartext (configurable print-object), AST, CST-to-AST, FORMAT, LOOP.
<jeosol> Are you using like a battery-type design, where parts can be swapped in and out, so it's more modular?
<beach> PCS?
<jeosol> I meant what phoe is calling the Portable Condition System in the video
<beach> I didn't watch the video. Busy cooking.
Bike has quit [Quit: leaving]
<beach> For SICL, it is going to be just PCS, since there is no native system yet.
<jeosol> what cooking? In early or I lost track of time
<beach> I didn't watch the video last night at 18:00 my time zone, because I was in charge of feeding my (admittedly small) family.
<beach> And now it is 5:00 am and I haven't had my coffee yet.
<beach> But I'll watch it sometime today.
<jeosol> No I meant you coming in here.
<jeosol> haha, you use that line (admittedly small) family, sweet
<jeosol> often
<beach> I have an Emacs abbrev, so I just type "asf" and it comes out as "(admittedly small) family".
<beach> Speaking of modules, we haven't started on Cleartext yet, so if someone (perhaps an ambitious newbie) is interested in that project, let me know.
<beach> The idea is to create a bunch of methods for PRINT-OBJECT, and also the macro PRINT-UNREADABLE-OBJECT, in a way that can be configured by the client.
<jeosol> cool trick with the "asf"
<beach> I have the same for "first-class global environments", "Common Lisp HyperSpec", "Common Lisp", "(first) Climacs", "Second Climacs", "Good morning everyone!", "Good afternoon everyone!", etc. etc.
<jeosol> That sounds like something I may take a stab at. I normally write print-objects for my classes, maybe I could use that to learn deepen my skills. Is the spec and expectations somewhere
<beach> Saves hours of typing every month.
<beach> Not yet, but we can work on it.
<jeosol> I need to get those shorts cuts too. I use this via the web, but have emacs open for code. I should just use irc via emacs
<beach> For that, I think there will be a special variable *CLIENT* that client code can bind before calling PRINT-OBJECT.
<jeosol> I see
<LdBeth> Good evening
<beach> Then PRINT-OBJECT will call PRINT-OBJECT-USING-CLIENT with the value of *CLIENT*, the object, and the stream.
<beach> Hello LdBeth.
<jeosol> morning LdBeth
<beach> PRINT-OBJECT-USING-CLIENT will be exported so that client code can create methods on it. It can also specialize to the STREAM parameter which is not conforming for PRINT-OBJECT.
<beach> I think perhaps each method on PRINT-OBJECT will call PRINT-OBJECT-USING-CLIENT, which seems to call for a macro.
<beach> Maybe DEFINE-PRINT-OBJECT-METHOD or something like that.
<beach> That way, PRINT-OBJECT will have as many methods as a client might expect.
<jeosol> when you say "as many methods", as many for any object
<beach> As many as the usual classes, yes.
<jeosol> I get the rest of the idea.
<jeosol> Ok I see
<beach> Some methods on PRINT-OBJECT-USING-CLIENT will be trivial, mainly calling PRINT-UNREADABLE-OBJECT, but others will be very tricky, like the one for SYMBOL will be tricky because of the many cases.
<beach> And PRINT-UNREADABLE-OBJECT will have to call a generic function for the "identity" of an object, because that is highly client specific.
<jeosol> I think I need to get something clear in my head is the ultimate goal of SICL,
<beach> Heh, sure.
<beach> If people in #lisp get tired of us, we can move to #sicl.
<jeosol> I then to confuse it as in living within SBCL or something. hence the confusion above
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jeosol> oh I'll need to join that group.
davepdotorg has joined #lisp
elflng has quit [Quit: Changing server]
elflng has joined #lisp
_jrjsmrtn has joined #lisp
__jrjsmrtn__ has quit [Ping timeout: 264 seconds]
Kundry_Wag has joined #lisp
davepdotorg has quit [Ping timeout: 260 seconds]
Kundry_Wag has quit [Ping timeout: 256 seconds]
Oladon has joined #lisp
EvW has joined #lisp
SGASAU` has joined #lisp
SGASAU has quit [Ping timeout: 264 seconds]
davepdotorg has joined #lisp
elflng has quit [Quit: leaving]
davepdotorg has quit [Ping timeout: 265 seconds]
elflng has joined #lisp
oxum has quit [Remote host closed the connection]
EvW has quit [Ping timeout: 260 seconds]
dddddd has quit [Ping timeout: 260 seconds]
rpg has joined #lisp
Necktwi has quit [Ping timeout: 256 seconds]
Lord_Nightmare has quit [Quit: ZNC - http://znc.in]
Lord_Nightmare has joined #lisp
Oladon has quit [Quit: Leaving.]
Oladon has joined #lisp
akoana has left #lisp ["Leaving"]
zaquest has quit [Ping timeout: 272 seconds]
patlv has quit [Quit: patlv]
oxum has joined #lisp
Oladon has quit [Quit: Leaving.]
davepdotorg has joined #lisp
srazzaque has quit [Remote host closed the connection]
gravicappa has joined #lisp
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
v88m has quit [Remote host closed the connection]
sauvin has joined #lisp
davepdotorg has quit [Ping timeout: 265 seconds]
narimiran has joined #lisp
shifty has quit [Ping timeout: 272 seconds]
mangul is now known as shangul
Oladon has joined #lisp
SGASAU` has quit [Quit: ERC (IRC client for Emacs 26.3)]
SGASAU has joined #lisp
JohnMS_WORK has joined #lisp
davepdotorg has joined #lisp
toorevitimirp has quit [Ping timeout: 272 seconds]
<markasoftware> Is there any predicate for symbols like &optional and &rest?
rwcom3417491 has joined #lisp
davepdotorg has quit [Ping timeout: 256 seconds]
<markasoftware> i guess lambda-list-keywords will do the trick
rgherdt has joined #lisp
mangul has joined #lisp
dalz has joined #lisp
shangul has quit [Ping timeout: 260 seconds]
amer has joined #lisp
amerlyq has quit [Ping timeout: 258 seconds]
rwcom3417491 has quit [Quit: Ping timeout (120 seconds)]
rwcom3417491 has joined #lisp
gravicappa has quit [Ping timeout: 256 seconds]
yankM has quit [Ping timeout: 264 seconds]
gravicappa has joined #lisp
toorevitimirp has joined #lisp
ralt has joined #lisp
milanj has joined #lisp
elephant has joined #lisp
slyrus has joined #lisp
<phoe> markasoftware: member with lambda-list-keywords
Oladon has quit [Quit: Leaving.]
<phoe> jeosol: funnily enough, I totally did not mention SICL in the video - I forgot it out of stress (:
<phoe> I mention a) learning material from the book, b) languages that compile to CL and have their own separate 1condition system
<phoe> c) SICL is a valid point though, too, just as beach mentioned
<jeosol> phoe: I was expecting it in the first few slides, but beach did provide clarification and the global context of the PCS project
<phoe> as is d) "Science isn't about «why», it's about «why not?»"
<jeosol> hahaha. That's ok.
<jeosol> I meant motivation for the work. Maybe why does not convey my intent
<phoe> and as is e) to spread knowledge about the condition system in general, because such exercises are an amazing way to get to know what can be done with it at all in a portable matter
<phoe> oh! well then, all five of these
SGASAU has quit [Remote host closed the connection]
<jeosol> but great video. The slides are very clear. Good use of colors to distinguish the host condition and PCS system
SGASAU has joined #lisp
<phoe> it is not a universal trick since I had a colorblind person during the stream, but I'm glad that it worked for people who could use color data
<jeosol> I am definitely interested in (e), to know it well. In the past, my application runs several works in steps, but if one fails, I often have to go back to the beginning, it was a pain to waste those compute cycles
<jeosol> my amateur hack was to save the state of the object between the workflows. A better solution will be to use a restarts etc, so I just pick things up from the last previous workflow that run without problems
<phoe> that would work
<jeosol> phoe: color was useful, especially for the path, where you described how PCS talks to the host system to get the host system errors and trigger the corresponding one on the PCS side.
<jeosol> If that is worded correctly.
<phoe> yes, it is; thank you
varjag has joined #lisp
<jeosol> In my case, one would not know what workflows to run, but all of them are functions that take one object as argument.
<jeosol> So I could have 10 possible functions 1, 2, 3, ...,10 and a user decides to run (1,2,4,5) or (1,3,6,7), I would like to generate restart information for this as the top-level function
<jeosol> is called. I do know all possible function, just that a subset is used, and in the restart info, I will have the function names for each function and restart info provided upon error. I did write a small use case that worked.
<phoe> this sounds doable
<jeosol> Not sure I used macros, but I to abandon it because it's just me for now
random-nick has joined #lisp
orivej_ has joined #lisp
orivej has quit [Ping timeout: 272 seconds]
<jeosol> Good to know it's doable.
zaquest has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
toorevitimirp has joined #lisp
sdumi has quit [Ping timeout: 264 seconds]
sdumi has joined #lisp
<beach> phoe: I am looking at your presentation now, since I wasn't around yesterday.
<phoe> beach: yes, I've noticed, thanks!
<beach> phoe: One thing I noticed. In the word "bind", the `i' is pronounced "eye".
<beach> ... not "ee".
toorevitimirp has quit [Remote host closed the connection]
toorevitimirp has joined #lisp
<phoe> beach: you're not the first person to notice this! I'll correct that, thanks
<beach> Oh, OK. Just thought I would mention it.
Fare has joined #lisp
Cymew has joined #lisp
<beach> phoe: And the "a" in "datum" is long, as in "late".
<phoe> beach: thanks for that too
<beach> And it is "vAr-ee-abble"
<beach> Emphasis on first syllable and a short `a'.
toorevitimirp has quit [Remote host closed the connection]
toorevitimirp has joined #lisp
<beach> phoe: Your English is otherwise excellent, so these remarks are just to make it perfect. :)
SGASAU has quit [Remote host closed the connection]
pve has joined #lisp
SGASAU has joined #lisp
Krystof has joined #lisp
jeosol has quit [Ping timeout: 245 seconds]
* phoe takes notes
v88m has joined #lisp
jeosol has joined #lisp
Kundry_Wag has joined #lisp
ljavorsk has joined #lisp
SGASAU has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 260 seconds]
SGASAU has joined #lisp
FennecCode has quit [Quit: ERC (IRC client for Emacs 26.3)]
jprajzne has joined #lisp
<beach> phoe: Nice presentation! I won't need it though, since SICL doesn't have a host condition system. So PCS will be THE system for SICL.
<beach> phoe: But I will download your code for PCS, study it, and ask you questions on the best way to adapt it to what I want for SICL.
davepdotorg has joined #lisp
<phoe> beach: no problem :)
<phoe> thanks for the review!
<phoe> If the code for PCS is *not* self-explanatory, then please file a bug - it's meant to be educational material, so it is supposed to be as clean and well-documented as possible
<beach> I will certainly do that.
<phoe> The only thing that might be non-obvious immediately is that someplace I use DEFGENERIC where normally DEFUN would do; that is because I need generic dispatch for integration.
davepdotorg has quit [Ping timeout: 244 seconds]
<beach> I see. Also, if you even need auxiliary methods, a generic function is a must.
remix2000 has joined #lisp
liberliver has joined #lisp
<phoe> In many of these places you don't need generics if you don't need integration with the host, so it's possible that the SICL version might even want to revert those back to DEFUN ;)
<beach> Possibly. Then, on the other hand, SICL generic dispatch is fast, so it won't matter much. :)
<pve> can I ask how you guys name your auxiliary/helper methods? any particular strategy? I often end up with hacky names for those..
<beach> Er, what? Every method has the same name as its generic function.
<beach> Perhaps you don't mean "methods"?
<pve> i meant methods
<pve> yes
<pve> i meant generic functions
<pve> sorry, still having coffee
<phoe> pve: that's a context-dependent question; could you provide some examples?
<beach> Now I am confused. What is an auxiliary generic function?
<Fare> Lispers have lots of gf's.
<Fare> Lispers are Alisters -- but also Plisters.
<remix2000> Hi all, a very unusual question here: Do you know if there is an interpreted LISP implementation suitable for embedded (headless, statically linked et al) *and* with support for serializable continuations?
<Fare> Minima!
<Fare> remix2000, ThinLisp requires manual deallocation, and is probably not suitable to run delico on top of.
<Fare> remix2000, does ECL count as suitable for embedded to you?
<phoe> remix2000: sounds like uLisp, but I have no idea if it has the latter property
<Fare> hu.dwin.delico on top of ECL might do it.
<phoe> also, by "embedded", you mean kilobytes or megabytes or gigabytes of RAM?
<Fare> or on top of CLISP if you can live with CLISP's idiosyncrasies (has it been released since 2010?)
<beach> pve: Auxiliary methods are methods that are typically introduced with :BEFORE, :AFTER, and :AROUND on generic functions.
<remix2000> Ram counts in megabytes, it's just that I have quite an unusual libc (Newlib) there which implements only basic functionalities https://en.wikipedia.org/wiki/Newlib
<pve> beach: gotcha, thanks.. i was thinking of something different
<beach> pve: And what was that?
<phoe> pve: give us a code example, we should understand it better that way ;)
davepdotorg has joined #lisp
<pve> hmm let me see if I can come up with one
<remix2000> Fare, that delico thing looks like it's a real deal. I'm impressed with such a quick response :D Do you have any copy of its (likely defunct?) website?
<phoe> remix2000: http://dwim.hu/?_x=KdOV&_f=yodrOizR still seems alive
<Fare> remix2000, the website should me in the darcs or git repository
<remix2000> Thank you! OT: Who are those dwim.hu guys? Even their website looks like work of some kind of sorcerer :D
<phoe> they are lisp sorcerers, obviously
dale has quit [Quit: My computer has gone to sleep]
shifty has joined #lisp
<remix2000> Citing the famous XKCD, it's truly the language of gods ;D
<phoe> except gods are few and far between and even then they usually use perl™... to quote the same xkcd
<remix2000> They just glue things together with it, but who doesn't? :P
oxum has quit [Remote host closed the connection]
ralt has quit [Quit: Connection closed for inactivity]
davepdotorg has quit [Remote host closed the connection]
davepdotorg has joined #lisp
anticrisis has quit [Quit: Leaving]
edgar-rft has joined #lisp
heisig has joined #lisp
remix2000 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
remix2000 has joined #lisp
dddddd has joined #lisp
oxum has joined #lisp
oxum has quit [Remote host closed the connection]
<pve> phoe: I'm struggling to come up with a *good* example, so my question isn't very well prepared, but if I could direct your attention here:
<pve> The names of those three preprocess-command functions is the kind of thing I'm pondering.
<pve> beach: ^
<pve> I don't really have a problem with the way it's done now, but I get the feeling that there should be a better way.
shinohai has quit [Ping timeout: 272 seconds]
drot has quit [Ping timeout: 256 seconds]
<phoe> what does /2r mean in this context?
<beach> pve: I need to have a look later. I am in the middle of something.
<phoe> (apply #'preprocess-command/2r s (first command) (rest command)) === (apply #'preprocess-command/2r s command)
<pve> ah yes of course
<pve> 2r just denotes 2 required args + a rest argument
ArthurStrong has joined #lisp
<phoe> I see no point in storing that information in the function name in Lisp - slime/sly will tell you the lambda list of every function object, and so should DESCRIBE
<phoe> do you define methods on PREPROCESS-COMMAND elsewhere?
<pve> no, it's currently only used in preprocess-commands
Lord_of_Life_ has joined #lisp
<pve> the point of 2r here is just to make it not clash with preprocess-command, so the question is: what should preprocess-command/2r be called instead?
<phoe> IMO, it shouldn't
Lord_of_Life has quit [Ping timeout: 258 seconds]
<phoe> but you might call this design dirty, since I ignore arguments if COMMAND is a list
Lord_of_Life_ is now known as Lord_of_Life
<phoe> my question would rather by, why do you call PREPROCESS-COMMAND with a list passed as COMMAND
<phoe> so I would instead go with https://plaster.tymoon.eu/view/1821#1822 (the second post)
<phoe> like, I wouldn't define a method where COMMAND is a list, and I'd instead let it fail
<phoe> this way I can fix up my code to actually use APPLY instead of FUNCALL
<pve> ok, so that's just bad naming on my part.. command here really means a list, like (:eval (+ 1 2))
<pve> and in /2r command should be "OP" or something
<phoe> I'd use APPLY then
<phoe> so COMMAND ends up being the symbol :EVAL and so the dispatch works correctly
<phoe> I actually solve a very similar problem in the PCS debugger
<pve> that second post is indeed clearer
davepdotorg has quit [Remote host closed the connection]
<phoe> the original looks like your interface attempting to fix issues with the code, which isn't the good way around
<phoe> the code should fix issues with how it uses the interface
hiroaki_ has joined #lisp
ralt has joined #lisp
oxum has joined #lisp
davepdotorg has joined #lisp
oxum has quit [Ping timeout: 264 seconds]
<pve> I am happy with the end result, thank you for that.. I'll push that change when I get the chance
<phoe> <3
<pve> but at least for me, personally, it's very difficult to *always* resolve naming issues by restructuring the code
<pve> sometimes, because I'm tired, lazy or whatever, I just need to resort to those /2r hacks (which are usually local in nature) just to get the whole thing working
<phoe> they make code dirty though
<pve> so I'm still wondering, what is your version of "/2r"?
<phoe> if I need to, %foo
oxum has joined #lisp
rogersm has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
karlosz has quit [Quit: karlosz]
rozenglass1 has quit [Ping timeout: 246 seconds]
rozenglass1 has joined #lisp
EvW has joined #lisp
cosimone has joined #lisp
dddddd_ has joined #lisp
dddddd has quit [Ping timeout: 246 seconds]
ayuce has joined #lisp
dddddd__ has joined #lisp
dddddd_ has quit [Ping timeout: 264 seconds]
dddddd__ has quit [Ping timeout: 240 seconds]
dddddd__ has joined #lisp
dddddd__ is now known as dddddd
jeosol has quit [Remote host closed the connection]
rogersm has quit [Read error: Connection reset by peer]
rogersm has joined #lisp
EvW has quit [Ping timeout: 240 seconds]
monokrom has joined #lisp
jeosol has joined #lisp
EvW has joined #lisp
<jeosol> Is there a profiling option to see memory consumed/used at function level
<phoe> implementation-defined, if any
<phoe> I think SBCL has one - see sb-aprof
davepdotorg has quit [Remote host closed the connection]
<jeosol> I just used sb-sprof but I was thinking the function is some time proxy
<jeosol> let me post the output
davepdotorg has joined #lisp
elflng has quit [Ping timeout: 258 seconds]
nullman has quit [Ping timeout: 260 seconds]
<phoe> okie, use a pastebin for hat
<phoe> that
<Xach> why did two independent zipper libraries pop up in the last 24 hours
<Xach> are zippers in the air?
<no-defun-allowed> Well, clearly you should zip them up.
<flip214> jeosol: sb-sprof can _also_ do statistical :mode :alloc, but aprof is for _full_ allocation tracing.
jeosol has quit [Remote host closed the connection]
<phoe> Xach: which ones?
jeosol has joined #lisp
ebrasca has joined #lisp
<Xach> zip is clearly unsuitable due to its name
<jeosol> flip214: you said something about :mode :alloc
<jeosol> chrome crashed again
elflng has joined #lisp
EvW has quit [Ping timeout: 252 seconds]
<phoe> jeosol: what are you measuring?
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
dalz has quit [Remote host closed the connection]
elflng has quit [Ping timeout: 264 seconds]
elflng has joined #lisp
EvW has joined #lisp
scymtym has quit [Ping timeout: 264 seconds]
<jeosol> I have to rerun it. to add the :mode :alloc
elflng has quit [Ping timeout: 258 seconds]
Bourne has quit [Read error: Connection reset by peer]
elflng has joined #lisp
<jeosol> here is the update: https://pastebin.com/gtNWxV5i
<phoe> jeosol: what are you measuring?
<jeosol> I did, I just ran this with :mode :alloc
<flip214> yeah, that's statistical profiling... aprof measures _every_ allocation, but IIRC it needs to be enabled during sbcl compilation
<jeosol> I am trying to see what areas are consuming much resources.
<jeosol> oh really
<jeosol> I wasn't using aprof
Bourne has joined #lisp
Bike has joined #lisp
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
davepdotorg has quit [Remote host closed the connection]
davepdotorg has joined #lisp
terpri has quit [Remote host closed the connection]
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
scymtym has joined #lisp
davepdotorg has quit [Ping timeout: 264 seconds]
milanj has joined #lisp
oxum has quit [Remote host closed the connection]
rwcom3417491 has quit [Ping timeout: 256 seconds]
jprajzne has quit [Quit: jprajzne]
RedMallet has joined #lisp
oxum has joined #lisp
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 246 seconds]
X-Scale` is now known as X-Scale
nullman has joined #lisp
davepdotorg has joined #lisp
davepdotorg has quit [Remote host closed the connection]
davepdotorg has joined #lisp
davepdotorg has quit [Ping timeout: 260 seconds]
davepdotorg has joined #lisp
davepdotorg has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
davepdotorg has joined #lisp
jprajzne has joined #lisp
davepdotorg has quit [Remote host closed the connection]
davepdot_ has joined #lisp
RedMallet has quit [Quit: WeeChat 2.8]
sdumi has quit [Read error: Connection reset by peer]
sdumi has joined #lisp
Kundry_Wag has quit [Ping timeout: 264 seconds]
Kundry_Wag has joined #lisp
cosimone has quit [Remote host closed the connection]
yankM has joined #lisp
mangul is now known as shangul
toorevitimirp has quit [Remote host closed the connection]
gko has joined #lisp
toorevitimirp has joined #lisp
EvW has quit [Ping timeout: 256 seconds]
cosimone has joined #lisp
srazzaque has joined #lisp
jw4 has quit [Read error: Connection reset by peer]
jw4 has joined #lisp
jeosol has quit [Remote host closed the connection]
RedMallet has joined #lisp
davepdot_ has quit [Remote host closed the connection]
davepdotorg has joined #lisp
shinohai has joined #lisp
drot has joined #lisp
srazzaque has quit [Remote host closed the connection]
<lukego> Hey in SBCL if I'd (proclaim '(optimize (debug 3) (speed 1))) what're the likely reasons I'll regret so much debug / so little speed?
oxum has quit [Remote host closed the connection]
<Bike> your program being slow?
<beach> I have even better in my .sbclrc.
<Bike> i'm not sure what you're asking.
<beach> lukego: It is plenty fast with (debug 3) (speed 0) (compilation-speed 0) (safety 3)
<beach> ... for me at least.
<lukego> Cool. Just thought maybe wildly impractical things might happen at level 0 and/or 3 for some quantities.
gxt has quit [Remote host closed the connection]
<phoe> lukego: they might, depending on the implementation
<Bike> i wouldn't describe any of it as wildly impractical, no
<beach> Apparently, it generates huge amounts of debug information. But that's good in my book.
<phoe> but that depends on your defin---- what Bike said
<phoe> with safety 0 lots of code is going to crash the implementation instead of signaling errors
jeosol has joined #lisp
gxt has joined #lisp
<phoe> and/or cause memory corruption
davepdotorg has quit [Remote host closed the connection]
srazzaque has joined #lisp
srazzaque has left #lisp [#lisp]
<phoe> with debug 3, AFAIR, tail calls are no longer optimized
davepdotorg has joined #lisp
<phoe> but all of that is implementation-specific
<beach> But you can use the stepper apparently. :)
<phoe> yes
dalz has joined #lisp
<lukego> I'll try beach's settings and see how that goes. thanks all
<phoe> (defun dance () (declare (optimize debug)) (loop (step left-foot) (step right-foot)))
<beach> lukego: I have had it like that for years, and only experienced a problem when I compiled huge generated files, which I no longer do.
zulu-inuoe has joined #lisp
lavaflow has quit [Ping timeout: 256 seconds]
davepdot_ has joined #lisp
davepdotorg has quit [Ping timeout: 260 seconds]
lavaflow has joined #lisp
<jdz> lukego: Indeed some library authors think that (safety 0) is a good thing to do, so I've also added (sb-ext:restrict-compiler-policy 'safety 1) to my ~/.sbclrc.
JohnMS_WORK has quit [Read error: Connection reset by peer]
oxum has joined #lisp
<jdz> The only problems I've had is ending up in debugger when the assumptions of such libraries don't hold.
<jdz> For some values of "problems."
milanj has quit [Quit: This computer has gone to sleep]
EvW1 has joined #lisp
<phoe> that's bugs
patlv has joined #lisp
davepdot_ has quit [Remote host closed the connection]
davepdotorg has joined #lisp
davepdot_ has joined #lisp
davepdotorg has quit [Ping timeout: 260 seconds]
fanta1 has joined #lisp
rogersm has quit [Ping timeout: 240 seconds]
<jdz> Indeed.
<jdz> Well, not always.
<phoe> it's bugs if setting certain optimization settings causes your code to explode
<phoe> similar as when libraries depend on implementation-dependent behavior that might or might not be triggered on certain optimization settings
<jdz> If I try to inflate /dev/urandom I'd expect to end up in debugger, not with a crashed lisp image, even though it's my fault I did not pass properly deflated data to the library.
<phoe> inflate? what do you mean?
<jdz> Decompress.
<jackdaniel> you eat entropy when you read from urandom
<jackdaniel> ah, I misunderstood
<jackdaniel> sorry
<phoe> jdz: decompress using which library/format? I don't understand just yet
<jackdaniel> a function may assume valid input, so it may put some declarations to speed things up
<jackdaniel> without checking each ybte
<jackdaniel> s/ybte/data piece/
<jdz> It does not matter. It's about the contract between the library and the library user.
<phoe> I see
<jdz> jackdaniel: Yes, internal functions. External functions should not just blow up if instead of number I pass a string in the REPL.
<jdz> And even with internal functions it's mostly not worth the trouble (SAFETY 0 that is).
davepdot_ has quit [Remote host closed the connection]
jonatack has quit [Quit: jonatack]
<phoe> I'm staring at ccldoc
<phoe> the documentation at https://trac.clozure.com/ccldoc/wiki/CCLDocOverview seems rather sane
EvW1 has quit [Ping timeout: 252 seconds]
<phoe> the source code of it is still unreadable to me though
<pjb> phoe: that's the point, you should be able to give a library any data, even wrong, even purposely wrong, and expect it doesn't crash, and it doesn't open security holes.
<pjb> phoe: fuzzing explicitely breaks code like this.
ljavorsk has quit [Ping timeout: 264 seconds]
<pjb> we'd need a good fuzzer for lisp functions…
<pjb> jdz: this goes beyond contracts (as in pre/post conditions). With contract programming, you assume that if the contract is not respected, anything can happens, even nasal daemons. But we're beyond that! We need to avoid nasal daemons at all costs, in an internetworked environment, where hostile users do exist, not just idiots.
<pjb> jdz: so we have to add to the contract that (not (union (all preconditions))) => (error signaled) instead of anything else.
<pjb> Ultimately, fuzzying should only detect implementation bugs.
<phoe> this is getting dangerously close to pfdietz's random testing framework
<pjb> I need to try it…
davepdotorg has joined #lisp
davepdotorg has quit [Remote host closed the connection]
davepdotorg has joined #lisp
elephant has quit [Quit: Leaving]
terpri has joined #lisp
<jdz> pjb: Yes, I agree.
toorevitimirp has quit [Remote host closed the connection]
Bourne has quit [Ping timeout: 264 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
terpri has quit [Remote host closed the connection]
rippa has joined #lisp
terpri has joined #lisp
milanj has joined #lisp
sdumi has quit [Ping timeout: 258 seconds]
ebrasca has quit [Remote host closed the connection]
Josh_2 has joined #lisp
kpoeck has joined #lisp
rpg has joined #lisp
MichaelRaskin has quit [Ping timeout: 264 seconds]
EvW has joined #lisp
MichaelRaskin has joined #lisp
dyelar has joined #lisp
rogersm has joined #lisp
<jmercouris> how to do something like "7" and make a string with it 7 times?
<jmercouris> so the resultant string = "7777777"
<jmercouris> python has this nifty syntax "7" * 7
<jmercouris> I'm thinking you could use format
<jmercouris> any other way?
<Bike> mm, basically concatenate
<beach> Also make-array.
<Bike> since the string being "multiplied" can be more than one character, it's probably not as easy as that
<beach> (make-array 7 :element-type 'character :initial-element #\7)
<jmercouris> so you make a list of '("7" ...) and concatenate?
<beach> Oh, I see.
<Bike> jmercouris: or call REPLACE repeatedly. might cons less
<shinohai> Can't you use `(make-string 7 :initial-element #\7)` ?
<Bike> well, almost certainly will cons less, rather
<Bike> the python syntax in question also works like "78" * 4 = "78787878"
<Bike> so, no
<beach> shinohai: That's what I suggested, but the "7" in the example can be a string with several characters in it.
<jmercouris> yeah it could just as well have been "seven"
<shinohai> ah sorry beach just saw that before "SEND"
<jmercouris> this could be a good candidate for the str library I think
<beach> jmercouris: Then I suggest the technique suggested by Bike.
<beach> jmercouris: Allocate a string with the right length, and then call REPLACE repeatedly.
<dlowe> (format nil "~v@{~a~:*~}" 7 "7")
<Bike> (defun string* (string n) (let* ((len (length string)) (new-len (* len n)) (r (make-string new-len))) (loop for i from 0 by len below new-len do (replace r string :start1 i)) r))
<Bike> i think that's about right
<dlowe> (format nil "~v@{~a~:*~}" 4 "78")
<phoe> jmercouris: (phoe-toolbox:vector-times "7" 7)
<Bike> oh yeah, why not generalize it with vectors i guess
<jmercouris> phoe: Ah!
* phoe shines in his five seconds of fame
<beach> I am surprised that such an operation is needed often enough to justify a library routine.
<phoe> okay, back to coding
<jmercouris> well, it is very useful
<jmercouris> you'll find that when you have such a hammer you find its application
sdumi has joined #lisp
<beach> jmercouris: I am willing to believe you, but I don't see it.
<phoe> beach: alternatively, the function is not used often, but it is annoying to write it yourself *when* you actually use it
<phoe> or rather, when you actually want to use it
<beach> I guess so.
davepdotorg has quit [Remote host closed the connection]
shifty has quit [Ping timeout: 246 seconds]
FreeBirdLjj has joined #lisp
oxum has quit [Quit: Leaving...]
<remix2000> Hi again, I've fiddled a bit with ECL and it still has quite a few moving parts. GMP is not that much of a problem, but Boehm was quite "unwilling" to be ported. Then I realized there is also TCP support in ECL, which in turn newlib (the c library I use) doesn't provide header (sys/un.h) for... Sooo, is there an even more basic CL implementation? The thing I need the most is C/C++ FFI.
<pve> is (with-output-to-string (s) (dotimes (n 7) (princ "7" s))) terribly inefficient?
<pjb> beach: I don't think it's needed often. You will probably find that 99% of the use case is the initialization of the vector to 0s.
<phoe> remix2000: where are you porting it?
<pjb> 1000*[0] == (make-array 1000 :initial-element 0)
<phoe> beach: most of the cases can be solved via :INITIAL-ELEMENT
<phoe> yes, that
<Bike> pve: probably less efficient than allocating the whole vector to begin with.
<pve> Bike: yes
<remix2000> phoe: mipsallegrexel-psp AKA Sony PSP :P
<pjb> Let's just think about it, what is the meaning of repeating elements in a vector?
davepdot_ has joined #lisp
<phoe> remix2000: what the hell! nice
<phoe> you could try CLISP, although your mileage may vary
<Bike> can you not conditionalize out the tcp support in ecl?
<Bike> i assume you don't want to actually use tcp
<remix2000> Bike: No, I don't use TCP and haven't noticed conditional there.
<dlowe> I don't think my format solution reiceved the attention it deserved :D
<Bike> it looks like there's a WITH_TCP flag of some kind
<Bike> jackdaniel is probably the person to ask
<remix2000> Oh, found that flag. I incorrectly assumed that there would be a mention of it in tcp.d :D
karswell has joined #lisp
<Bike> and i don't think there's gonna be anything more "basic" in this sense than ECL
<Bike> boehm not working sounds like a barrier
<remix2000> OT: what is ECL made in? It says ".d" but for me it looks like C more that Dlang :P
<beach> I believe it uses a heavily macro-ized C which is then expanded to C, but check with jackdaniel.
<beach> It would be too tedious to write it in plain C.
Cymew has quit [Ping timeout: 272 seconds]
rozenglass1 has quit [Ping timeout: 256 seconds]
<remix2000> Most likely. My compiler failing to expand them would explain one thing I though was an error: https://gitlab.com/embeddable-common-lisp/ecl/-/blob/develop/src/c/time.d#L64
<_death> looks like a genuine error to me..
rozenglass1 has joined #lisp
jonatack has joined #lisp
rutabaga has joined #lisp
<remix2000> There is a progress: now the blocker is https://gitlab.com/embeddable-common-lisp/ecl/-/blob/develop/src/c/unixint.d#L235 failing with "error: called object ‘signal’ is not a function or function pointer" and that one I genuinely have no idea how to solve :P
<Bike> er, what? signal is not a function?
<kpoeck> There is #ecl, perhaps better to ask there
<phoe> you are compiling a file named unixint
<Bike> yeah also that, is this actually a unix system?
<phoe> it likely assumes you're compiling for a unixlike, which might not be the case for a playstation portable
<Bike> signal is a standard C function, tho
davepdot_ has quit [Remote host closed the connection]
<Bike> so that's kind of a weird problem
<remix2000> The funny part is that signal (as a function) works outside of ecl for me :P
<phoe> remix2000: which header defines it?
<Bike> i don't know what to tell you. maybe your compiler has been cursed by a witch. but yeah, #ecl might know more, i don't think any of us are ecl maintainers.
<remix2000> signal.h of course (newlib has sys/signal.h as equivalent)
<phoe> https://github.com/pspdev/newlib/blob/1fac24078a8c619d015a5e8d951c7d127f7c75f7/newlib/libc/signal/signal.c#L203 the function is there, so the compiler that builds ECL should pick it up
<phoe> no idea where to go from here
<_death> doubt that the compiler is pointing at line 235 with that error..
kpoeck has quit [Ping timeout: 245 seconds]
<remix2000> _death: I was surprised with that behavior too, but it genuinely throws exactly that *error* on that very macro definition :O
terpri has quit [Remote host closed the connection]
<_death> strange
terpri has joined #lisp
<_death> could try to define it as a function
kpoeck has joined #lisp
<remix2000> Removing (x,y) on both sides worked. Now it does some implicit function declarations (likely from missing functions in c library). What a bummer that I'm not smart enough to fix it :< Okay, gotta try my luck with CLISP maybe and possibly return to ECL in case that works even worse...
<jackdaniel> remix2000: you may disable most features in ./configure
<jackdaniel> try ./conifgure --help
<jackdaniel> as of ".d" file, it is input for dpp (our own preprocessor), which outputs C file with line annotations and some syntactic sugar
<jackdaniel> like @"lisp string"
<jmercouris> says remove-if-not is deprecated
<jmercouris> what does this mean?
<jmercouris> it’ll be removed in subsequent releases?
<beach> jmercouris: Ignore that.
<jackdaniel> that means that you should avoid using it because it is included for backward compatibility with other lisps
<_death> overzeal when defining complement
<jmercouris> this is exactly about complement
<jmercouris> how did you know lol
<jmercouris> if they remove it in a subsequent lisp though, it would break so much code
<beach> jmercouris: There will be no "subsequent release",
<jmercouris> I don’t understand why they would remove things?
<jmercouris> perhaps not in this universe, or in this lifetime :-D
<jackdaniel> deprecated does not mean "to be removed", it means that you should not use it
<Bike> they'd remove it because nominally you can accomplish the same task more cleanly using remove-if and complement.
<_death> it could have a better name, like keep-if
<jackdaniel> don't forget about keep-if-not! ,)
<beach> _death: But then you could not distinguish between the destructive and the non-destructive versions.
<jackdaniel> complement should be named ~, then it would not be so bothersome to write
<jackdaniel> so, how about a new standard! it's clearly needed ;)
<_death> beach: if remove has delete, keep it could have collect :)
<jackdaniel> oh, word leitmotif is present in English
<Bike> i probably would prefer keep-if to remove-if-not
smazga has joined #lisp
bitmapper has joined #lisp
<phoe> wow
<phoe> eclector is *amazing*
<bitmapper> "The function SB-C::%MORE-ARG-CONTEXT is undefined." what
gko has quit [Ping timeout: 246 seconds]
<phoe> bitmapper: what did you do, and where is the stack trace
EvW has quit [Ping timeout: 256 seconds]
<remix2000> Wait wait, clisp is dead, right? Last version is from 2010...
<phoe> remix2000: it's undead; it hasn't had a release for a decade, but it's maintained
<phoe> you can pull the newest source from clnet gitlab and build it
<bitmapper> phoe: a) Yale Haskell on sbcl
<bitmapper> b) i cant look at the stack trace or i get brain hurt
<bitmapper> because it's a mixture of scheme, haskell, and common lisp
<phoe> bitmapper: we could try to do that though
<Bike> have you considered that when you post something on irc, other people can read it, and maybe their brains won't hurt as much?
<phoe> ^
<bitmapper> sure
<Bike> because if you just post an error message without any context there's nothing we can do for you and it's pretty much just noise.
<bitmapper> yeah i get that
* phoe begins plotting a plot to get CCLDoc to use Eclector
<beach> phoe: Nice!
<phoe> which yale haskell source are you using?
<bitmapper> the original, but i've heavily modified a lot of it
<bitmapper> i'll put it up on git too
<phoe> please do so, yes
davepdotorg has joined #lisp
cantstanya has quit [Write error: Connection reset by peer]
zooey has quit [Remote host closed the connection]
<phoe> beach: CCLDoc currently has a really ugly hack
zooey has joined #lisp
<jackdaniel> if I understand correctly someone got burned for using sbcl internal symbol
<bitmapper> oh god i think it has to do with the fact that it defines the symbol "type"
<phoe> if it doesn't find an external symbol in a package, it interns and exports it; if it doesn't find a package, it creates it
<phoe> which is as ugly as it can get
<phoe> and that's what I hope to fix with eclector
<bitmapper> it's trying to use sb-int:index which is a type
<phoe> bitmapper: let's see the source
<bitmapper> im cleaning up the files
cantstanya has joined #lisp
<bitmapper> like an idiot i wasn't working in a git repo
<bitmapper> :v
<_death> you can at least copy your files over the original repo and commit that
<bitmapper> was planning on doing that
ralt has quit [Quit: Connection closed for inactivity]
davepdotorg has quit [Ping timeout: 240 seconds]
<phoe> so I understand that Yale Haskell has attempted to compile some Haskell to Scheme and then the Scheme gets translated into Lisp
<bitmapper> yes
<bitmapper> but it's not actually scheme
<jackdaniel> naive folk would ask: but why?
<phoe> and the generated source code, for whatever reason, tries to evaluate a form named (SB-C::%MORE-ARG-CONTEXT ...)
<bitmapper> it's a lisp-2
<_death> (sb-ext:unlock-package "CL")
<_death> does not bid well
<bitmapper> _death: it redefines the pretty print stuff and that's it
<bitmapper> but also "type"
<bitmapper> which is...
<bitmapper> uhh
<jackdaniel> (add-locak-package-nickname "my-cl" "cl") or something
<bitmapper> it loads in CCL though!
<_death> better do that in your own package, and shadow the stuff you want
<bitmapper> it does actually do that
<phoe> I ain't gonna touch it if it invokes UB
<bitmapper> phoe: everything is undefined behaviour
<phoe> bitmapper: no.
<bitmapper> there's a fork that works on modern CLisp though
<bitmapper> which i probably should have used as a base
<bitmapper> and there's one that works on modern cmucl
cosimone_ has joined #lisp
<boeg> If i want to read the content of a file, and I know that there will always ever be only one line in the file, which is the line i want, and if there is more, i dont want them, how would I go about that? I don't want to take in to account that there might be more than one, I just want the very first line as a string (and nil if file is missing or line is missing). How would I do that?
rogersm has quit [Quit: Leaving...]
cosimone has quit [Read error: Connection reset by peer]
<Bike> read-line?
<boeg> when I say take into account, i mean looping over all lines, and taking the first one. I dont want that
<mood> boeg: You can just open the file, read-line, close the file
<Bike> i mean just call read-line once.
<Bike> am i missing a complication?
<boeg> nope, maybe its that simple
<boeg> thanks, ill try it
ljavorsk has joined #lisp
<bitmapper> well nevermind
<bitmapper> Yale Haskell Y2.0.5 Clozure Common Lisp version Version 1.12 (v1.12) DarwinX8664 on x86_64
<bitmapper> Type :? for help.
<bitmapper> Main> main = print "hello"
<bitmapper> Main> :eval
<bitmapper> Evaluating main.
<bitmapper> "hello"
<bitmapper> Main>
<Bike> please don't dump multiple lines into chat
bitmapper was kicked from #lisp by phoe [bitmapper]
bitmapper has joined #lisp
<bitmapper> sorry about the multiple lines, i intended just to post the first
<Bike> it happens
<bitmapper> phoe: why'd you kick me though
<phoe> didn't know if you'd post 7 or 70 lines
<phoe> reacted as fast as I noticed
<_death> maybe aimed at boeg's irc client
<phoe> spam avoidance, and such
<bitmapper> fair
<_death> which only shows the first line
<phoe> we have no yale haskell in quicklisp
<boeg> _death: whats with my client?
bars0 has joined #lisp
EvW1 has joined #lisp
drainful- has quit [Quit: ZNC 1.7.5 - https://znc.in]
<_death> nothing.. it was a joke
<boeg> alright
drainful has joined #lisp
devon has quit [Ping timeout: 264 seconds]
PuercoPope has joined #lisp
PuercoPope is now known as PuercoPop
Kundry_W_ has joined #lisp
Kundry_Wag has quit [Read error: Connection reset by peer]
FreeBirdLjj has quit [Remote host closed the connection]
phantomics has joined #lisp
shangul has quit [Ping timeout: 272 seconds]
scymtym has quit [Ping timeout: 240 seconds]
natj212 has quit [Ping timeout: 256 seconds]
drainful has quit [Quit: ZNC 1.7.5 - https://znc.in]
drainful has joined #lisp
natj212 has joined #lisp
davepdotorg has joined #lisp
davepdotorg has quit [Remote host closed the connection]
rgherdt has quit [Ping timeout: 260 seconds]
<bitmapper> is it possible to define an alternative name for a package
<bitmapper> ?
<bitmapper> like a synonym
<Bike> a nickname, they're called
<Bike> clhs package-nicknames
<Bike> well that's not very helpful
<Bike> it's just a list of strings, though, any of which name the package
<bitmapper> is it possible to make a nickname for an already existing package though
<phoe> yes
<phoe> via one of the ugliest functions in the CL standard: RENAME-PACKAGE
dyelar has quit [Quit: Leaving.]
<phoe> don't do that though; use package-local nicknames instead
<phoe> they do not mutate the global state and therefore do not pollute the global namespace.
<heisig> You don't have to use rename-package. The consequences of evaluating more than one defpackage form for a package are undefined - meaning in practice it will just update the existing package.
scymtym has joined #lisp
<heisig> So just add a nickname (or package local nickname) to your defpackage form and reevaluate it.
<phoe> or that, if you are able to
<Odin-> Assuming the implementation you're using hasn't chosen to invoke nasal demons.
<Odin-> (Where's that term from, again? C?)
<phoe> I would gladly have beach add this part to WSCL
<phoe> so going C-c C-c on a DEFPACKAGE form actually becomes worthwhile in theory
<phoe> as it is in practice
liberliver has quit [Ping timeout: 240 seconds]
<LdBeth> would there be any reason not to use `get` and `(setf get)`?
<phoe> LdBeth: only use them if you get dynamic variable names passed to your at runtime
<phoe> which is a relatively rare use case
<bitmapper> ok i have no clue how to get this to stop setting TYPE as a global variable
<phoe> (let ((x '*foo*)) (setf x :bar))
<phoe> bitmapper: re-lock the CL package and see where it attempts to do so
<phoe> and then fix that place
<bitmapper> good idea
<phoe> it isn't that this is a good idea
<phoe> it is that unlocking the CL package is a bad idea
<bitmapper> yes
<bitmapper> good idea is not unlocking it
<_death> LdBeth: if you need a centralized place a hash table makes more sense.. otherwise there's no issue using them
<phoe> uhhh wait
<phoe> (let ((x '*foo*)) (set x :bar))
<phoe> there - I even have reflexes where I type SETF instead of SET :D
<_death> phoe: SET is quite different from GET..
<phoe> _death: SET == SETF SYMBOL-VALUE
<bitmapper> ugh i found it but renaming it would be an insane amount of effort
<phoe> bitmapper: shadow the symbol then?
bars0 has quit [Ping timeout: 264 seconds]
<_death> phoe: and GET ~= (getf (symbol-plist symbol) 'xxx)
<phoe> this way you will be setting FOO:TYPE instead of CL:TYPE
<phoe> _death: wait
<phoe> did I really...
<phoe> yes, I read "get" as "set"
* phoe goes to get an eye replacement
<bitmapper> great, i forget how to do that
<Bike> symbol-value should be renamed get, clearly
<phoe> bitmapper: in the relevant DEFPACKAGE form where you (:use #:cl), add (:shadow #:type)
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<LdBeth> _death: ah, I think might could make use of CLOS instead
<_death> LdBeth: sure
rabuf has joined #lisp
rgherdt has joined #lisp
<_death> phoe: btw a neat trick with SET is when you defvar/defparameter in the repl, and notice you made a mistake.. (set * the-form-i-actually-meant)
<phoe> _death: :D
orivej_ has quit [Ping timeout: 256 seconds]
abhixec has quit [Ping timeout: 256 seconds]
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
karlosz has joined #lisp
orivej has joined #lisp
davepdotorg has joined #lisp
rpg has joined #lisp
terpri has quit [Remote host closed the connection]
Codaraxis_ has quit [Quit: Leaving]
terpri has joined #lisp
bars0 has joined #lisp
efm has quit [Read error: Connection reset by peer]
efm has joined #lisp
davepdotorg has quit [Ping timeout: 272 seconds]
milanj has quit [Quit: This computer has gone to sleep]
RedMallet has quit [Quit: WeeChat 2.6]
bars0 has quit [Ping timeout: 264 seconds]
rand_t has joined #lisp
akoana has joined #lisp
dale has joined #lisp
sauvin has quit [Read error: Connection reset by peer]
kpoeck has quit [Remote host closed the connection]
kpoeck has joined #lisp
fanta1 has quit [Quit: fanta1]
<LdBeth> what is the format directive that ignores the white space between it and the newline before
Lycurgus has joined #lisp
<LdBeth> never mind, it's tilde newline I want
mikecheck has joined #lisp
rand_t has quit [Quit: rand_t]
Fare has quit [Ping timeout: 272 seconds]
ravndal has joined #lisp
orivej_ has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
bars0 has joined #lisp
Fare has joined #lisp
karswell has quit [Remote host closed the connection]
karswell has joined #lisp
cantstanya has quit [Remote host closed the connection]
cantstanya has joined #lisp
Lycurgus has quit [Read error: Connection reset by peer]
orivej_ has quit [Ping timeout: 246 seconds]
Kundry_W_ has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Lycurgus has joined #lisp
bars0 has quit [Quit: leaving]
davepdotorg has joined #lisp
davepdotorg has quit [Ping timeout: 260 seconds]
Lycurgus has quit [Quit: Exeunt]
Bourne has joined #lisp
efm has quit [Quit: Konversation terminated!]
shangul has joined #lisp
Posterdati has quit [Ping timeout: 272 seconds]
heisig has quit [Quit: Leaving]
sdumi has quit [Read error: Connection reset by peer]
Fare has quit [Ping timeout: 240 seconds]
Jesin has quit [Quit: Leaving]
sdumi has joined #lisp
Posterdati has joined #lisp
Jesin has joined #lisp
notzmv has quit [Remote host closed the connection]
corpix_ has joined #lisp
corpix has quit [Quit: No Ping reply in 180 seconds.]
corpix_ has quit [Remote host closed the connection]
corpix has joined #lisp
notzmv has joined #lisp
notzmv is now known as Guest60062
kingragworm has joined #lisp
kingragworm has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
narimiran has quit [Ping timeout: 258 seconds]
jeosol has quit [Remote host closed the connection]
kpoeck has quit [Remote host closed the connection]
sputny[m] has joined #lisp
kpoeck has joined #lisp
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
terpri has quit [Remote host closed the connection]
SGASAU has quit [Remote host closed the connection]
terpri has joined #lisp
SGASAU has joined #lisp
karayan has quit [Ping timeout: 244 seconds]
pve has quit [Quit: leaving]
rgherdt has quit [Ping timeout: 260 seconds]
shangul has quit [Ping timeout: 240 seconds]
kpoeck has quit [Remote host closed the connection]
jeosol has joined #lisp
asarch has joined #lisp
rgherdt has joined #lisp
Kundry_Wag has quit [Read error: Connection reset by peer]
Kundry_W_ has joined #lisp
rgherdt has quit [Ping timeout: 272 seconds]
Lord_of_Life_ has joined #lisp
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ is now known as Lord_of_Life
nightfly has quit [Ping timeout: 258 seconds]
SGASAU has quit [Ping timeout: 265 seconds]
asarch has quit [Quit: Leaving]
dalz has quit [Remote host closed the connection]
gravicappa has quit [Ping timeout: 260 seconds]
nightfly has joined #lisp
rgherdt has joined #lisp
rpg has joined #lisp
Mawile has joined #lisp
shifty has joined #lisp
Mawile has quit [Client Quit]
PuercoPop has quit [Ping timeout: 258 seconds]
Lord_of_Life has quit [Ping timeout: 246 seconds]
Archenoth has quit [Ping timeout: 258 seconds]
Lord_of_Life has joined #lisp
ayuce has left #lisp ["ERC (IRC client for Emacs 28.0.50)"]
[df]_ has quit [Ping timeout: 258 seconds]
SGASAU has joined #lisp
[df] has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
remix2000 has quit [Quit: remix2000]
random-nick has quit [Ping timeout: 272 seconds]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
efm has joined #lisp
ayuce has joined #lisp
cosimone_ has quit [Ping timeout: 256 seconds]
monokrom has quit [Quit: Leaving]
lacroixboy_ has quit [Read error: Connection reset by peer]
ralt has joined #lisp
wxie has joined #lisp
whiteline_ has quit [Remote host closed the connection]
whiteline_ has joined #lisp
ayuce has quit [Read error: Connection reset by peer]
solrize has joined #lisp
<solrize> what's the purpose of using LABELS or FLET, instead of just nesting defuns like in scheme?
<solrize> and what's the practical difference between LABELS and FLET ?
<pjb> solrize: defun doesn't define lexically bound functions. It defines global functions. Therefore nesting defuns doesn't do anything useful.
<pjb> solrize: it only defers the definition of the inner defuns to run-time, which makes that those functions are unknown at compilation-time, possibly not compiled, and thus leads to compilation-time warnings (undefined functions), and run-time performance problems.
<Odin-> The practical difference between labels and flet is in when the scope of the functions kicks in, similar to the difference between let and let*.
<Odin-> Unless I'm completely misremembering, which is possible.
<pjb> solrize: note that certain rules in CL are present to let CL compiler generate efficient code for function calls. This would be made impossible by the use of run-time defined functions.
<solrize> (defun ss (a b)
<solrize> (defun sq (n) (* n n))
<solrize> (+ (sq a) (sq b)))
<solrize> doesn't seem to leave a global definition of sq around
<pjb> warning unknown function sq!
<pjb> exactly.
mikecheck has quit [Remote host closed the connection]
<no-defun-allowed> Yes, you can't nest defuns like that.
<solrize> i just did in clisp, it worked fine ?
<pjb> and if you call (ss 1 2), sq is defined globally.
<no-defun-allowed> If you want local functions, use FLET or LABELS.
<solrize> oh i see, yeah it went and defined sq as a function
<pjb> solrize: there's a difference between working fine and doing what you expect.
<pjb> solrize: most lisp forms will do something.
<no-defun-allowed> What will happen in your function is that calling SS will define the function SQ at runtime.
<solrize> i got confused because i typed "sq" and said "variable sq has no value" and i said aha, sq is undefined like i wanted ;)
<pjb> solrize: also, it will redefine sq again, when you call it again.
<solrize> because i didn't notice the function binding was there when the value binding wasn't
<solrize> yeah i get it now
<solrize> lisp-2 ;O
<solrize> thanks
<pjb> (function sq) #| ERROR: Undefined function: sq |# (ss 1 2) #| --> 5 |# (sq 3) #| --> 9 |#
<no-defun-allowed> If a compiler were to look at that, it would not be informed that you are defining a function called SQ and subsequently warns you.
<Odin-> More than that, actually.
<pjb> So in loops it would be catastrophic.
<solrize> #'sq
<Odin-> defun doesn't do any of the "it's a function" magic.
<Odin-> Not really.
<no-defun-allowed> Try (defun ss (a b) (flet ((sq (n) (* n n))) (+ (sq a) (sq b))))
<Odin-> It's just a macro.
<solrize> right
<Odin-> So I guess in that sense flet and labels are "more fundamental". :p
<solrize> i'm a little more used to scheme but this makes sense
<White_Flame> solrize: fundamentally, it's purely a syntactic thing. Nested functions are different behavior than toplevel functions. Whether they share the name (define) or not (labels/flet) is purely surface level
<White_Flame> also there's certainly some lisp-1 vs lisp-2 involved as well
tinga has quit [Remote host closed the connection]
<ralt> luis: good morning, are you around?
<solrize> White_Flame, i got confused because i typed "sq" and saw "undefined" and thought "ah good, the binding was local" when i had overlooked the fbinding, that's all that happened
<solrize> brb
<pjb> basically, it's in the syntax of begin that you can use define to define stuff in its scope. But this must be extended to the fact that lambda and other operations contain an implicit begin.
tinga has joined #lisp
<White_Flame> yeah, that's the lisp-1 vs lisp-2 part ;)
Guest60062 is now known as notzmv
<White_Flame> but, CL could easily have reused the DEFUN symbol for defining local functions, too, is all I'm saying
<pjb> Similarly, in CL, you could write a set of macro, possibly named by symbols named "DEFUN", "LAMBDA", "PROGN", etc to allow the use of DEFUN forms inside and replace them by LABELS.
<pjb> Or you could just use labels or flet.
<White_Flame> the semantics would be the same (though flet/labels difference in parallelism would have to be expressed)
* Odin- is so superficial that he keeps getting tripped up by not being able to call a short-term variable "list" in Lisp-1s.
* White_Flame is so superficial he can't stand excessive commas, semicolons, etc of non-lisp-family languages
buffergn0me has joined #lisp
<aeth> I think I'm going to make a Lisp-3 at some point. (Lisp-3 is a better name than Lisp-2, although Lisp-6 is most accurate for CL. There are three namespaces that matter all of the time: variable, function, and type/class.)
<buffergn0me> Lisp-∞
<aeth> I mean, yes, any language with macros is technically a Lisp-infinity, not just a Lisp-n. Especially something like CL, where you would expect different namespaces. You can create your own namespaces for your own macros with hash-tables, perhaps tied with symbol-macrolet to further mask it.
<solrize> heh
<buffergn0me> Does anyone know another way to reach Vsevolod Dyomkin? I am trying to buy a printed version of his new book, and Paypal keep showing me an error. I sent him an email a few days ago, but it probably went to spam
<buffergn0me> Scheme only seems to be a Lisp-1 because the special forms like APPLY treat it like one. Anyone can introduce an extra namespace there, because symbols are first-class values.
<solrize> is there an equivalent of takewhile, dropwhile, groups, etc. ?
<buffergn0me> solrize: Where do those come from?
<solrize> originally from ML, i think. scheme has a srfi for them, haskell and python have them, etc
<aeth> buffergn0me: Additionally, Scheme only specifies type predicates like number? rather than types themselves, so if any Scheme had a CL-like DEFTYPE, then it would technically be a "Lisp-2" with (at least) two namespaces, even though it wouldn't have the function/variable namespace distinction.
<Bike> you could define types as predicates.
<aeth> Bike: Are you talking about SATISFIES types in CL? Yes, but they're inefficient and afaik unable to be checked ahead of runtime, so it's probably better to go the other way around, and specify type predicates via TYPEP.
carleos has joined #lisp
<Bike> no, i'm talking about how scheme could have a complex type system like CL's
<Bike> without adding a namespace
<aeth> By having the types share the type predicate's name? I guess.
<buffergn0me> solrize: You would have to look in an iterator library. None made it into the standard, two were proposed (SERIES and generators)
<solrize> aha thanks
<ralt> solrize: I'd say ITERATE is the current trendy library for those?
davepdotorg has joined #lisp
<aeth> Bike: Something like this, I guess. (define-type positive-integer? () `(integer 1 *))
<solrize> ralt, thanks, i think i'm going to try this without lists. i'm trying an exercise i found on comp.lang.lisp
<ralt> good luck.
<buffergn0me> aeth: That is assuming those nefarious Schemers would not define types as some other opaque objects, and then have you put them as values into variables. Problem solved!
davepdotorg has quit [Ping timeout: 265 seconds]
rpg has joined #lisp