<pierpa>
(many string functions accept a string designator)
<White_Flame>
ah, forgot about that
<pierpa>
comes handy very often!
<mfiano>
Ah yes, forgot about that as well.
<mfiano>
Nice!
<White_Flame>
I tend to be very explicit in my code, instead of relying on "auto-casting"
<White_Flame>
but for learning, cast away ;)
trocado has joined #lisp
<beardio>
nice!
<pierpa>
I understand this point of view. OTOH, it's CL, not ML :)
Folkol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<aeth>
ML would be a great name for a lisp implementation. Modern Lisp.
kerrhau has joined #lisp
kerrhau has joined #lisp
kerrhau has quit [Changing host]
<aeth>
(or maybe Macro Lisp?)
<pierpa>
unfortunately it's already taken (several times :)
<pierpa>
(whew, looks like nobody noticed the mistake in (sort '(a d b f e c) #'string<) :)
fisxoj has joined #lisp
hhdave has joined #lisp
<rpg>
How about Standard Modern Lisp of New Jersey? ;-)
<pierpa>
:)
<merskiasa>
why is 2 an insecure base with a modulus of 257 for Diffie-Hellman?
vmmenon has joined #lisp
siraben has joined #lisp
<mfiano>
pierpa: I did, but I didn't want to say anything :)
<pierpa>
good :)
hhdave has quit [Ping timeout: 268 seconds]
<merskiasa>
Anyone?
<mfiano>
It was a problem with my example to fwiw
<LdBeth>
ML is already existed as a functional language family inspired by lisp
kmurphy4 has joined #lisp
<mfiano>
too*
<pierpa>
LdBeth: and in addition to this, also Machine Language, Machine Learning, ...
<pierpa>
mfiano: yes, indeed, I copied without thinking
<mfiano>
I see what you did there :)
comborico1611 has quit [Quit: Konversation terminated!]
_krator44- has quit [Remote host closed the connection]
schjetne has quit [Ping timeout: 265 seconds]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pierpal has quit [Read error: Connection reset by peer]
_krator44 has joined #lisp
elfmacs has joined #lisp
kmurphy4 has quit [Quit: kmurphy4]
siraben has quit [Ping timeout: 240 seconds]
warweasle has joined #lisp
markoong has quit [Ping timeout: 268 seconds]
orivej has quit [Ping timeout: 245 seconds]
trocado has quit [Ping timeout: 265 seconds]
skidd0 has quit [Quit: WeeChat 2.1]
eli_oat has joined #lisp
Mutex7 has quit [Quit: Leaving]
dddddd has quit [Remote host closed the connection]
wxie has quit [Ping timeout: 256 seconds]
dented42 has joined #lisp
wxie has joined #lisp
eminhi has joined #lisp
kerrhau has quit [Ping timeout: 268 seconds]
siraben has joined #lisp
marusich has joined #lisp
schjetne has joined #lisp
scottj has joined #lisp
light2yellow has quit [Quit: light2yellow]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
smurfrobot has joined #lisp
kerrhau has joined #lisp
kerrhau has joined #lisp
kerrhau has quit [Changing host]
skeuomorf has quit [Ping timeout: 265 seconds]
smurfrobot has quit [Ping timeout: 260 seconds]
wxie has quit [Quit: Bye.]
pierpal has joined #lisp
smurfrobot has joined #lisp
smurfrobot has quit [Ping timeout: 256 seconds]
eli_oat has quit [Quit: Leaving.]
smurfrobot has joined #lisp
eminhi has quit [Quit: leaving]
fisxoj has quit [Quit: fisxoj]
pierpa has quit [Quit: Page closed]
schjetne has quit [Ping timeout: 240 seconds]
robotoad has joined #lisp
robotoad has quit [Client Quit]
smurfrobot has quit [Ping timeout: 276 seconds]
hhdave has joined #lisp
hhdave has quit [Ping timeout: 260 seconds]
siraben has quit [Remote host closed the connection]
fyodost has quit [Quit: Leaving]
slacko_580 has joined #lisp
hjek has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
pjb` has joined #lisp
pjb has quit [Ping timeout: 255 seconds]
nickenchuggets has quit [Quit: Leaving]
warweasle has quit [Quit: Leaving]
pjb`` has joined #lisp
<aeth>
Is there a way to detect if I'm no longer using any symbols from a package that I am importing from? Yes, there's no way to detect this perfectly because you can basically do whatever, but I'm sure I probably am importing from some packages unnecessarily.
<aeth>
e.g. if I only was using a package for some constants or deftypes that then got moved to another package
pjb` has quit [Ping timeout: 256 seconds]
pjb``` has joined #lisp
pjb`` has quit [Ping timeout: 256 seconds]
pjb```` has joined #lisp
igemnace has joined #lisp
pjb``` has quit [Ping timeout: 256 seconds]
pjb````` has joined #lisp
smurfrobot has joined #lisp
smurfrobot has quit [Remote host closed the connection]
<mfiano>
Yes, you could run the deterministic profiler, giving it that package name
pjb```` has quit [Ping timeout: 260 seconds]
pjb`````` has joined #lisp
robotoad has joined #lisp
pjb````` has quit [Ping timeout: 276 seconds]
hjek has left #lisp [#lisp]
pjb`````` has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #lisp
nickenchuggets has joined #lisp
ricky____ has quit [Ping timeout: 260 seconds]
schjetne has joined #lisp
smurfrobot has joined #lisp
jfrancis has joined #lisp
ophan has joined #lisp
smurfrobot has quit [Ping timeout: 256 seconds]
quazimodo has joined #lisp
megalography has quit [Ping timeout: 248 seconds]
himmAllRIght17 has quit [Ping timeout: 256 seconds]
michalisko has quit [Ping timeout: 255 seconds]
himmAllRIght17 has joined #lisp
jfrancis has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
michalisko has joined #lisp
schjetne has quit [Ping timeout: 260 seconds]
slacko_580 has quit [Remote host closed the connection]
<jlarocco>
FWIW, in that conversation a few hours ago, (sort '(a d b f e c) #'string<) is legal because #'string< takes string designators, and symbols are string designators
<aeth>
mfiano: thanks, that's really clever!
<mfiano>
Sure
<mfiano>
jibanes: We already discussed that, and that's not the problem we were referring to :)
<mfiano>
err jlarocco
<jlarocco>
oh, haha, sorry
<mfiano>
See if you can spot what's wrong with that form
<jlarocco>
you mean passing a literal list to sort?
<mfiano>
Right
<jlarocco>
sorry, I should have scrolled up further
FreeBirdLjj has joined #lisp
karlosz has quit [Remote host closed the connection]
megalography has joined #lisp
schoppenhauer has quit [Ping timeout: 260 seconds]
schoppenhauer has joined #lisp
beardio has quit [Ping timeout: 240 seconds]
asarch has joined #lisp
ealfonso has joined #lisp
<ealfonso>
is it possible to disable ldb in a buildapp-generated executable?
<edgar-rft>
ealfonso, you can FMAKUNBOUND the LDB function in your Lisp code before you're dumping the image.
megalography has quit [Ping timeout: 260 seconds]
igemnace has quit [Read error: Connection reset by peer]
SaganMan has joined #lisp
igemnace has joined #lisp
karlosz has joined #lisp
rumbler3_ has quit [Remote host closed the connection]
himmAllRIght17 has quit [Ping timeout: 265 seconds]
surya has joined #lisp
himmAllRIght17 has joined #lisp
<phoe>
edgar-rft: I do not think he means #'LDB but rather he means SBCL's low level debugger.
ealfonso has quit [Ping timeout: 276 seconds]
daniel-s has joined #lisp
<edgar-rft>
then he should say so
smurfrobot has joined #lisp
hhdave has joined #lisp
dtornabene has joined #lisp
hhdave has quit [Client Quit]
megalography has joined #lisp
mn3m has quit [Quit: mn3m]
schjetne has quit [Ping timeout: 265 seconds]
karlosz has quit [Quit: karlosz]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
siraben has joined #lisp
smurfrobot has quit [Remote host closed the connection]
daniel-s_ has joined #lisp
daniel-s has quit [Ping timeout: 265 seconds]
megalography has quit [Ping timeout: 265 seconds]
BillyZane2 has joined #lisp
jibanes has quit [Ping timeout: 248 seconds]
BillyZane has quit [Ping timeout: 268 seconds]
jibanes has joined #lisp
johnvonneumann has joined #lisp
johnvonneumann is now known as Guest15747
fikka has joined #lisp
hhdave has joined #lisp
hhdave has quit [Client Quit]
fikka has quit [Ping timeout: 256 seconds]
BillyZane2 is now known as BillyZane
asarch has quit [Quit: Leaving]
fikka has joined #lisp
fikka has quit [Ping timeout: 245 seconds]
mflem has joined #lisp
Pixel_Outlaw has quit [Quit: Leaving]
dented42 has joined #lisp
megalography has joined #lisp
phenoble has joined #lisp
nickenchuggets has quit [Read error: Connection reset by peer]
fikka has joined #lisp
schjetne has joined #lisp
ealfonso has joined #lisp
Ukari has quit [Remote host closed the connection]
dented42 has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
<phoe>
Hm
<beach>
What?
<phoe>
Do I want to treat my RDBMS as plain old data store, and therefore have all logic on the Lisp side
<phoe>
Or do I want to offload some logic to PL/PGSQL and therefore learn a bit of it?
<phoe>
Hm, why not both?
<phoe>
I'll learn PL/PGSQL that way, and then end up writing the same in Lisp nonetheless because hell, I prefer to debug Lisp rather than to debug procedural SQL.
<phoe>
beach: just thinking out loud.
<beach>
Sure.
fikka has quit [Ping timeout: 265 seconds]
<phoe>
I was initially thinking about performance, but then remembered that premature optimization is the sqrt of all evil and it's easy to speculate about something that does not yet exist.
vlatkoB has joined #lisp
fikka has joined #lisp
surya_ has joined #lisp
rumbler31 has joined #lisp
surya has quit [Ping timeout: 265 seconds]
fikka has quit [Ping timeout: 260 seconds]
rumbler31 has quit [Ping timeout: 265 seconds]
Mutex7 has joined #lisp
thinkpad has quit [Quit: lawl]
derefpointer has joined #lisp
smokeink has joined #lisp
schjetne has quit [Ping timeout: 248 seconds]
rumbler31 has joined #lisp
thinkpad has joined #lisp
rumbler31 has quit [Ping timeout: 240 seconds]
BillyZane2 has joined #lisp
BillyZane has quit [Ping timeout: 260 seconds]
sjl_ has joined #lisp
orivej has joined #lisp
sjl__ has joined #lisp
sjl__ has quit [Client Quit]
sjl_ has quit [Ping timeout: 260 seconds]
sjl__ has joined #lisp
BillyZane2 has quit [Ping timeout: 268 seconds]
smurfrobot has joined #lisp
shangul has joined #lisp
daniel-s_ has quit [Remote host closed the connection]
derefpointer has left #lisp ["sic - 250 LOC are too much!"]
<phoe>
I need a Common Lisp utility that, given some kind of lambda list with annotated types, and a function's return value, will give me a valid DECLAIM FTYPE form.
<phoe>
Something like ((foo string) bar (baz (or symbol number))) (values t boolean) as input, and (function (string t (or symbol number)) (values t boolean)) as output.
<phoe>
Does anyone know of such a thing? I would not want to reinvent it, if possible.
ealfonso has quit [Remote host closed the connection]
ealfonso has joined #lisp
eschatologist has quit [Ping timeout: 276 seconds]
eschatologist has joined #lisp
_whitelogger has joined #lisp
robotoad has quit [Quit: robotoad]
fikka has joined #lisp
surya_ has quit [Ping timeout: 240 seconds]
marusich has quit [Quit: Leaving]
robotoad has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
BillyZane has joined #lisp
BillyZane has quit [Client Quit]
sjl__ has quit [Ping timeout: 265 seconds]
schjetne has joined #lisp
ophan has quit [Ping timeout: 256 seconds]
Mutex7 has quit [Quit: Leaving]
random-nick has joined #lisp
bendersteed has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
dddddd has joined #lisp
phenoble has quit [Quit: WeeChat 1.9.1]
shka_ has joined #lisp
fikka has joined #lisp
schjetne has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
siraben has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 265 seconds]
light2yellow has joined #lisp
fikka has joined #lisp
Patzy has quit [Quit: WeeChat 2.1]
Patzy has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
phenoble has joined #lisp
fikka has joined #lisp
kerrhau has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 240 seconds]
EvW has joined #lisp
fikka has joined #lisp
EvW has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 265 seconds]
Kevslinger has quit [Quit: Connection closed for inactivity]
<pjb>
(but other than 8-bit by 8-bit and possibly bit-by-bit on current hardware, it's probably implementation dependent how the bytes are mapped to the files).
fikka has quit [Ping timeout: 248 seconds]
<phoe>
elderK: there is also lisp-binary which fails to compile on modern sbcl.
<phoe>
Or rather - requires special workarounds to be compiled.
random-nick has joined #lisp
Patzy has quit [Quit: WeeChat 2.1]
pierpal has quit [Ping timeout: 240 seconds]
<elderK>
phoe: I'd prefer to learn how to do it myself, not using other libraries.
Patzy has joined #lisp
<elderK>
pjb: I just figure you'd need to create functions so that you could say, read-u32 from some arbitrary position in the blob that you've loaded.
<phoe>
elderK: oh, that
damke_ has joined #lisp
<phoe>
you could read the code for https://github.com/rpav/fast-io to learn how it works - it has functions for {read,write}[u]{8,16,32,64,128}{-be,-le}
<pjb>
yeah, bit is not portable or useful. clall -r '(with-open-file (out (format nil "/tmp/foo-~A" (lisp-implementation-type)) :direction :output :if-exists :supersede :if-does-not-exist :create :element-type (quote bit)) (write-sequence #(1 0 1 1 0 1 0 0 1 1) out) (file-length out))' ; ls -l /tmp/foo-* ; for f in /tmp/foo-* ; do od -t x1 "$f" ; done
<pjb>
clisp writes bit by bit, but writes first a 32-bit little endian file-length (in number of bits). the other implementations write one bit per octet, which is useless.
<pjb>
This is why the usual advice is to use (unsigned-byte 8) as element-type, and format the binary file yourself, octet-by-octet.
shangul has quit [Remote host closed the connection]
fikka has joined #lisp
shangul has joined #lisp
<random9899>
pjb: what is clall -r ?
<_death>
the nibbles library is handy
shangul has quit [Remote host closed the connection]
<phoe>
AFAIR it's pjb's script that calls the following code with all CL implementations available on the machine
<jmercouris>
ah you know what, it suggests a symlink IIRC
<phenoble>
I'm currently learning CL. Any recommended resources on learning CL debugging techniques? I finished Seibel's "Practical Common Lisp" today. Nothing about debugging in there.
<pjb>
Unix scripts should not have any file extension.
<pjb>
They unnecessarily expose implementation detail (breaking encapsulation).
hjek has joined #lisp
<pjb>
They uselessly and incompletely mimic detail from the #! line.
<pjb>
They capture insufficient detail to be useful at the system level (and aren't used).
<jmercouris>
pjb: yeah, I was just testing
<pjb>
They clash with recommended Unix (and Linux) practice.
<pjb>
They add noise to the command-level API.
<pjb>
They are very commonly technically incorrect for the script.
<jmercouris>
pjb: my scripts dir has no suffixes
<pjb>
They give incorrect impressions about the use of the files they adorn.
<pjb>
They aren't validated even for what little info is present in them.
<pjb>
They interfere with switching scripting languages.
<pjb>
They interfere with changing scripting language versions.
<pjb>
They interfere with changing to presumably-faster compiled forms.
<pjb>
They encourage naively running scripts with the extension-implied interpreter.
<jmercouris>
Yes, I get it :D
<pjb>
They infect novice scripters with misinformation about Unix scripting.
<pjb>
They ironically are only a problem when interpreted by humans.
<pjb>
Go read the url above.
<pjb>
And of course, NO normal directory shall have file name "extension"!
<jmercouris>
Yes, of course
<pjb>
You may have extensions on directory names, when they're "file packages", as implemented on NeXTSTEP/OpenStep/MacOSX/iOS.
<beach>
phenoble: Unfortunately, the debugging tools available for free Common Lisp implementations are not so great.
<pjb>
GNUstep, etc.
<jmercouris>
beach: I would have to agree with that
<jmercouris>
when I was looking into it, I was really dissappointed
<beach>
phenoble: Start by putting (proclaim '(optimize (debug 3) (speed 0) (safety 3) (compilation=speed 0))) in your start-up file.
<pjb>
phenoble: but nowadays people will use in general sldb in slime.
<pjb>
compilation-speed
<phenoble>
beach, jmercouris: that's unfortunate. Though I got the impression that some "trace" functionality would be a thing in CL debugging?
<beach>
phenoble: Yes, trace is fine.
<beach>
phenoble: And if you are using SBCL, you can use :break t with trace.
<pjb>
phenoble: not all implementation implement the STEP operator, or starting a trace from the debugger. For this, have a look at my conforming cl-stepper.
<phenoble>
pjb: oh, interesting. Slime has its own debugger.
<beach>
phenoble: Otherwise, you need to stick a (break) in the place where you want to stop, then C-c C-c to compile that function, then run your program.
<phenoble>
pjb: thanks
gigetoo has quit [Ping timeout: 260 seconds]
gigetoo has joined #lisp
<beach>
phenoble: From the backtrace, you can then find local variables, and you can use the SLIME inspector to inspect them.
<phenoble>
beach: thank you for that starter. I will consider that initialization code.
slyrus_ has joined #lisp
<phenoble>
pjb: do you have a link to cl-stepper? I can't find anything on google about it.
<beach>
phenoble: Most of the time, though, you run the program until it fails, look at the backtrace. Figure out why things were called the way they were. Hit SPACE in front of your stack frames, look at variables, inspect, etc.
<pjb>
phenoble: the thing is that since we can easily just redefine a function while running the program, lisp debugging techniques are often source-based. You just edit the source of your function, adding print and break and other forms to help you debug it, re-evaluate the function, and go on executing.
<phenoble>
beach: Yes, the standard is to be expected. Though I would not've been surprised if CL offered something extra-nice in conjunction with e.g. slime.
<pjb>
The only case where it's not possible, is when your function is on the call stack (it's being executed), such as a main loop, or when its calls are optimized (it's inlined), notably when it's called from other functions in the same file. For this, you have to declare it notinline and recompile the file.
<pjb>
(Probably a (debug 3) would make all functions notinline, check your implementation documentation).
<beach>
phenoble: It probably does, but you would have to pay for a commercial implementation.
<beach>
phenoble: There has not been enough manpower for the free implementations to become excellent when it comes to debugging techniques.
<phenoble>
pjb: I see. Yes. That's how I am increasingly working with elisp. Though my implementations are not all that nested, or dependent on each other. I could well imagine that even this rather comfortable style can get to its limits. So more sophisticated tools might become necessary.
<MichaelRaskin>
Also, Common Lisp has macros, so you can quickly add some interesting tracing where needed. Like writing a special trace-let macro that shows all the bindings as they are made
<phenoble>
MichaelRaskin: showing all the bindings as they are made... does that count as a modification of the compiler?
<beach>
MichaelRaskin: But that also requires modifying the source as pjb pointed out.
<MichaelRaskin>
Yes, sure
<beach>
phenoble: Yes, one way of looking at macros is as a means of programming the compiler.
<pjb>
indeed, macros are hooks into the compiler.
<pjb>
compiler plug-ins.
<phenoble>
beach: I can imagine. I have a bit of a background in C++ metaprogramming, so I'm not all too new to the rationale behind it. Though this in particular, changing the way bindings are done or the like, intrigues me very much.
<beach>
phenoble: Nah, it just wraps the binding code in some trace printing. Normal stuff.
<pjb>
phenoble: (it has bit-rotten, but it could be revived, notably with clang).
<phoe>
phenoble: templates aren't really like Lisp macros
<pjb>
or the MOP…
<phoe>
with Lisp macros, you simply accept some S-expressions and then output some S-expressions
<phoe>
that just happen to be Lisp source code
<beach>
MichaelRaskin: For debugging, I would prefer not to modify the source. For one thing, it takes time to insert the code, and then I often forget to take it out. And I certainly don't want my "production" code to have debugging information in it. But it is also sometimes the case that the problem disappears when the code is modified that way.
<phenoble>
pjb: interesting link to this OpenC++ project, thanks! Most likely not an option in my professional environment though. We have our tools in place, and some momentum with it.
<beach>
MichaelRaskin: But, as pjb pointed out, that is often the only way to do it with the tools at our disposal.
<phoe>
beach: in theory, you could use the CLtL2 environments to insert additional debugging information into code only when DEBUG is 3, for example.
<phoe>
If DEBUG is below 3, code without debugging information is emitted.
<phoe>
And you could do this without touching the compiler - just inside macros and/or compiler macros, because you have the ability to query &env for declaration information.
<pjb>
There's also the elpp proof-of-concept (a copy at https://github.com/informatimago/elpp ) this is an emacs lisp pre-processor, which allows you to define macros in emacs lisp to generate code for any programming language you have to use.
<beach>
phoe: How would you insert it?
<MichaelRaskin>
I am too used to putting debug printing as a way of understanding the code (not only in Lisp)
<beach>
MichaelRaskin: I am sorry to hear that.
<phenoble>
phoe: I know, yes. That's why things like "binding code in some trace printing" is considered normal in CL I suppose. Rather impossible in C++ (I suppose).
jmercouris has quit [Ping timeout: 256 seconds]
damke has joined #lisp
<MichaelRaskin>
beach: well, at least this is a tranferrable skill, I can read strace output comfortably, too
<beach>
MichaelRaskin: Congratulations.
<phenoble>
beach: Interesting point about not modifying the source for debugging. I appreciate very much that this is so easy in lisp(s).
<phenoble>
beach: You write "with the tools at our disposal"... - that sounds like you had better tools in mind. That so? Like what?
<beach>
phenoble: Yes, I am planning such tools, but don't hold your breath.
<beach>
phoe: But you would have to insert calls to FOO in your code, right?
<phoe>
beach: yes, but here I assume that FOO is a macro that is already used somewhere in the code.
<phoe>
It is some part of logic that we want to debug.
<phoe>
If FOO is a function, we can use compiler macros instead.
pierpal has quit [Ping timeout: 256 seconds]
<MichaelRaskin>
Hm, I guess I have all the moving parts to inject tracing the bindings without changing the source code, just with a recompilation.
<MichaelRaskin>
Not sure if I want that, but maybe it is a good idea to try…
<beach>
phoe: So then I would have to modify every function or macro that I use in the same way?
<phoe>
beach: the ones you want to debug, yep. Quite possibly it can be wrapped in a macro to hide the syntax, but this implies that you need to wrap your functions in special debugging sugar to be able to utilize this behavior at DEBUG 3.
<beach>
MichaelRaskin: That's another thing. I usually don't want tracing. I want a breakpoint where I can stop, examine the variables using the inspector, step from that breakpoint to some other place, etc.
<phoe>
Not the best or most productive approach, but this is the thing I thought of.
<beach>
phoe: Yes, I see.
damke_ has joined #lisp
<shka_>
is calling C++/java/C♯/python style object orientation "message passing" is correct?
<MichaelRaskin>
Well, injecting tracing and injecting breaks are comparable implementation-wise
<beach>
shka_: Or "single dispatch".
hjek has quit [Remote host closed the connection]
<shka_>
beach: you consider those two terms to be synonyms, yes?
<pjb>
shka_: not really. There's may one or two languages that implement actual message passing.
<beach>
MichaelRaskin: Sounds good. Now you just need to wrap the entire thing in an interactive application called a "debugger".
<pjb>
message passing shall be asynchronous.
<MichaelRaskin>
Traces give me time-dimensions (with restrictions on breadth), breakpoints give broad access space-wise, but in a limited amount of points in time
<pjb>
shka_: what all the OOP implement (including smalltalk!) are function calls with some dispatching.
damke has quit [Ping timeout: 244 seconds]
<MichaelRaskin>
I have lost belief in interactive applications by now, I guess.
<shka_>
pjb: hm, i see where are you going with this
<pjb>
shka_: now you can still use a "message passing programming style". For example, don't let your method compute stuff and return results. Instead, if there are results to be obtained, let them send back a message to some other object.
<shka_>
ok
<pjb>
Like the target/action in OpenStep/Cocoa frameworks.
<beach>
MichaelRaskin: Yes, I understand. Then the current debugging environment that is available to us should suit you just fine.
<shka_>
well, i better stick to "single dispatch" it seems to be more precise
<pjb>
shka_: but you have to be careful, because you code can still have implicit synchronization expectations.
<pjb>
Those expectations are met until you change the implementation of your methods and "order" of message sending changes…
<MichaelRaskin>
Yes, pure SBCL debug REPL plus some macros added as-needed mostly satisfy my needs.
<pjb>
then your system breaks…
<shka_>
though, it seems to miss generic functions VS interface discussion
<pjb>
Well, multiple dispatch is rather an orthogonal point, and can trivially mapped to single-dispatch, so there's no reason to avoid it, when pertinent.
<shka_>
It seems like if you want to compare CLOS to something in vein of C++ you better of put table to compare those two
<jmercouris>
Is that the question? I thought we weren't supposed to attempt to redefine asdf:*central-registry* directly anymore
fikka has quit [Ping timeout: 265 seconds]
<jmercouris>
pjb: lol that's an interesting link, I'll have to read it thanks
<jmercouris>
I guess I am a Unixer...
<pjb>
There's few things I hate more than deprecators.
<pjb>
Or changes of API in general.
<pjb>
eg. I still cannot use llvm. I don't see why it should have a different user interface than gdb (and why I should get python backtraces each time I launch it).
<pjb>
Shitty software.
<pjb>
Anyways, this is the big advantage of CL, it hasn't changed since 1989 and is mostly compatible with everything done worth doing since 1959…
<jmercouris>
well, sometimes the API must change...
<jmercouris>
anyways, I'm not interested in getting into this argument, gotta go, thanks for the info!
<pjb>
This means that the little code we write now with the few resources we have, gets a chance to be usable in 20 or 50 years…
FreeBirdLjj has quit [Remote host closed the connection]
<pjb>
I wouldn't bet anything on any version of python, and does anybody remember perl?
<pjb>
jmercouris: you can add, but keep the old API.
fikka has joined #lisp
FreeBirdLjj has joined #lisp
schjetne has joined #lisp
Arcaelyx has joined #lisp
surya has quit [Ping timeout: 260 seconds]
varjag has joined #lisp
FreeBirdLjj has quit [Ping timeout: 260 seconds]
buoyantair_ has joined #lisp
<jeosol>
morning guys. Interesting discussions about debug methods and techniques.
buoyantair has quit [Ping timeout: 260 seconds]
jmercouris has quit [Remote host closed the connection]
surya has joined #lisp
sjl__ has joined #lisp
sjl__ has quit [Client Quit]
buoyantair__ has joined #lisp
igemnace_ has joined #lisp
igemnace has quit [Read error: Connection reset by peer]
fisxoj has quit [Quit: fisxoj]
buoyantair_ has quit [Ping timeout: 256 seconds]
buoyantair has joined #lisp
igemnace_ has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
buoyantair__ has quit [Ping timeout: 265 seconds]
asarch has quit [Quit: Leaving]
schjetne has quit [Ping timeout: 256 seconds]
beardio has joined #lisp
scymtym has quit [Ping timeout: 265 seconds]
random-nick has quit [Remote host closed the connection]
orivej has joined #lisp
damke_ has quit [Ping timeout: 244 seconds]
random-nick has joined #lisp
random-nick has quit [Read error: Connection reset by peer]
scymtym has joined #lisp
rippa has joined #lisp
igemnace has quit [Read error: Connection reset by peer]
puchacz has joined #lisp
<puchacz>
hi, if I pass readonly that is known at compile time, this macro gives me deleting unused code warning (obviously): (defmacro <textarea ((readonly) &rest rest) `(if ,readonly (<:textarea :readonly "readonly" ,@rest) (<:textarea ,@rest)))
<puchacz>
any better way of writting it pls?
<stylewarning>
puchacz: is it always known at compile time?
<puchacz>
stylewarning: nope
igemnace has joined #lisp
<stylewarning>
puchacz: try doing (if (constantp readonly) <do explicit if> <expand into if like above>)
<puchacz>
stylewarning, thanks
<flip214>
or `(<:textarea ,(if readonly :readonly :not-readonly) "readonly" ,@rest) ....
<puchacz>
no good, as sometimes something is known at compiletime, yet is is not a constant
<flip214>
ah, yes, sorry.
<puchacz>
e.g. (let ((readonly t))
random-nick has joined #lisp
<puchacz>
but it is an improvement
<flip214>
`(<:textarea :readonly (if ,readonly "readonly" "not-readonly") ,@rest) and let the compiler be smart enough for constants
<puchacz>
flip214: thanks
<flip214>
I guess that at compile time _more_ "constantp"-ness is known than at macro-expansion time...
<puchacz>
indeed. and different lisps might have different ideas
<stylewarning>
flip214: isn’t that basically equivalent and will still lead to dead code
<stylewarning>
The point isn’t that the compiler can or cannot figure something out, it’s that it *is* working but identifying dead code and annoyingly emitting messages about it.
<puchacz>
well, the flip214 solution muffles compiler OK, I only wonder if readonly="not-readonly" is a standard HTML
<puchacz>
I did not know this for example
<flip214>
puchacz: then do (if ,readonly :readonly :not-readonly) "readonly" instead
<flip214>
;;; Muffle compiler-notes based on lexical scope
<puchacz>
ah, very good. tks
<flip214>
is that true currently? > (At present, no companies or consultants wish to advertise paid support or custom SBCL development in this manual).
CrazyEddy has quit [Ping timeout: 260 seconds]
bbobb has quit [Quit: bbobb]
<pjb>
puchacz: you seem to be wanting a function, not a macro. Why is this <textarea operator a macro?
nowhere_man has quit [Read error: Connection reset by peer]
nowhereman_ has joined #lisp
<pjb>
puchacz: also, the recursive calls don't have the right form. The macro takes a list containing readonly. The recursive calls don't pass such a list!
mflem has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
kerrhau has joined #lisp
kerrhau has joined #lisp
kerrhau has quit [Changing host]
sjl has quit [Quit: WeeChat 2.1]
fikka has quit [Ping timeout: 260 seconds]
EvW has joined #lisp
schjetne has joined #lisp
fikka has joined #lisp
innovati has joined #lisp
CrazyEddy has joined #lisp
EvW has quit [Ping timeout: 265 seconds]
pierpal has joined #lisp
herr_jth has joined #lisp
hhdave has joined #lisp
buoyantair has quit [Quit: Leaving]
pierpal has quit [Read error: Connection reset by peer]
hhdave has quit [Client Quit]
dddddd has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
earl-ducaine has quit [Ping timeout: 240 seconds]
dented42 has joined #lisp
nowhereman_ has quit [Ping timeout: 245 seconds]
schjetne has quit [Ping timeout: 265 seconds]
groovy2shoes has quit [Quit: moritura te salutat]
<rumbler31>
beach: re: debugging, what tools have you used that are not available in free implementations?
<pjb>
rumbler31: what tool would you trust that 1- you haven't programmed yourself. 2- that are not at least available as free software?
<pjb>
Even google "don't do evil" did evil and now is removing their moto.
otwieracz has quit [Ping timeout: 256 seconds]
random-nick has joined #lisp
light2yellow has joined #lisp
otwieracz has joined #lisp
ealfonso has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
<ealfonso>
how can I disable ldb from lisp? is ldb an sbcl-specific feature? I'm trying to use fmakunbound but can't find the right function.. is it SB-KERNEL:%LDB?
<ealfonso>
also, is there a simple way to intentionally trigger ldb to test this? other than requesting a lot of memory?
herr_jth has quit [Remote host closed the connection]
Posterdati has joined #lisp
fikka has joined #lisp
Posterdati has quit [Client Quit]
Posterdati has joined #lisp
asarch has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
schjetne has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
phenoble has quit [Quit: WeeChat 1.9.1]
schoppenhauer has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 260 seconds]
pierpa has joined #lisp
Posterdati has quit [Remote host closed the connection]
fikka has joined #lisp
<ealfonso>
what is the best way to understand which objects are consuming the most memory in the heap? is it the sbcl statistical profiler?
Posterdati has joined #lisp
<aeth>
I use sb-profile and if you break things up into small enough functions it's pretty easy to see where the allocations are happening.
cods has quit [Changing host]
cods has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
<ealfonso>
if I'm interpreting correctly, statistical profiler or sb-profile gives me a 'consed' column or the amount of new allocs, but does not account for gc'd memory. I have a lot of functions that seem to alloc memory temporarily. what I'd like to see is which memory has been allocated and not gc'd (e.g. to optimize long-running process slow memory leak)
lumm has quit [Quit: lumm]
<aeth>
well, there's sb-sprof and sb-profile. I find sprof gives me more noise.
fikka has joined #lisp
shka_ has quit [Ping timeout: 240 seconds]
terpri has joined #lisp
<aeth>
ealfonso: you can try (room)
schoppenhauer has joined #lisp
<aeth>
you can diff two (rooms) to see what has changed, but the act of producing the string for (room) probably allocates. There's probably a low-level, SBCL-specific thing you can use to bypass this.
<aeth>
s/(rooms)/(room)s/
<aeth>
It's also possible that SLIME is continuously allocating new things.
surya has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
<ealfonso>
I can see dynamic space usage with (room), but not which objects or which functions are generating it. I can see a snapshot of new allocations with sb-*prof*, but it includes temporary allocations that might be gc'd. I guess I also need information about what is being gc'd
<aeth>
ealfonso: how temporary are the temporary allocations? Could you (declare (dynamic-extent foo)) them?
ZombieChicken has joined #lisp
fikka has joined #lisp
<ealfonso>
I don't know why a function with a single cffi:foreign-funcall sexp is showing the most 'consed'. when there should not be any allocs in the foreign function
<ealfonso>
could there be some cffi overhead causing conses?
<aeth>
I don't think so. My CFFI code doesn't cons. The overhead tends to be from poorly wrapped CFFI, like copying huge arrays (cl-opengl likes do do this, but fortunately it also has the %gl package)
marusich has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.1)]
<ealfonso>
https://pastebin.com/2tacbyZZ this is my wrapper that is showing the most conses... does it mean my_foreign_function must be allocating?
<pjb>
normally, CFFI does its magic at compilation time.
fikka has joined #lisp
<ealfonso>
pjb is cffi:foreign-funcall the wrong (slower) approach, should I be using defcfun instead?
<pjb>
I would say so.
<pjb>
Using defcfun will generate at macroexpansion time the native FFI definitions that the compiler should be able to call directly. AFAIK, it's bound to be more efficient.
schjetne has joined #lisp
<pjb>
Do you mean the size of the C data? or the size of the Lisp object?
<ealfonso>
size of the lisp object
<pjb>
With CFFI you can ask the foreign-type-size.
<pjb>
Yes, for the lisp object it's implementation dependent whether there's such a function, or even such a notion.
fikka has quit [Ping timeout: 240 seconds]
<ealfonso>
pjb I will try switching to defcfun. how about getting the size of a lisp class (or defstruct)
<pjb>
Well, in ccl it expand to the same as your code.
fikka has joined #lisp
<pjb>
and in sbcl too.
<pjb>
So perhaps it's not useful to change.
stnutt has quit [Ping timeout: 268 seconds]
kerrhau has quit [Ping timeout: 265 seconds]
karlosz has joined #lisp
stnutt has joined #lisp
kuwze has quit [Quit: Page closed]
trocado has joined #lisp
schjetne has quit [Ping timeout: 260 seconds]
tomsen has joined #lisp
Oladon has joined #lisp
dtornabene has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
lel has joined #lisp
<pjb>
minion: memo for beach: apropos 9:17 https://www.youtube.com/watch?v=ZJr81DtSwUc (loop for i below 10 sum i maximizing (sin i) into maxin collect (* i i) into squares finally (print (list maxin squares))) is conforming AFAIK. it has several accumulations clauses of different types… ;-)
<minion>
Remembered. I'll tell beach when he/she/it next speaks.