jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.5.4, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
lucasb has quit [Quit: Connection closed for inactivity]
xkapastel has quit [Quit: Connection closed for inactivity]
makomo has quit [Ping timeout: 258 seconds]
krid has quit [Read error: Connection reset by peer]
shifty has joined #lisp
mstdnuser[m] has joined #lisp
alexanderbarbosa has quit [Remote host closed the connection]
alexanderbarbosa has joined #lisp
shifty has quit [Ping timeout: 268 seconds]
shifty has joined #lisp
EvW has quit [Ping timeout: 250 seconds]
Oladon_wfh has quit [Ping timeout: 260 seconds]
Oladon has joined #lisp
lavaflow has joined #lisp
tourjin has joined #lisp
akoana has quit [Quit: leaving]
nanoz has quit [Ping timeout: 244 seconds]
<Fade> o/
Fade is now known as Fade
techquila has joined #lisp
mindthelion has quit [Read error: Connection reset by peer]
semz has quit [Ping timeout: 264 seconds]
jeosol has joined #lisp
semz has joined #lisp
shifty has quit [Ping timeout: 268 seconds]
shifty has joined #lisp
tourjin has quit [Remote host closed the connection]
tourjin has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
Jeanne-Kamikaze has joined #lisp
fitzsim_ has quit [Quit: ERC (IRC client for Emacs 26.1.50)]
khisanth_ has quit [Ping timeout: 268 seconds]
tourjin has quit [Quit: Leaving]
karswell has quit [Remote host closed the connection]
karswell has joined #lisp
khisanth_ has joined #lisp
analogue has joined #lisp
analogue has quit [Quit: Leaving]
_whitelogger has joined #lisp
techquila has quit [Ping timeout: 268 seconds]
Jeanne-Kamikaze has quit [Quit: Leaving]
zacts has joined #lisp
dddddd has quit [Remote host closed the connection]
_whitelogger has joined #lisp
Petit_Dejeuner has quit [Ping timeout: 245 seconds]
greaser|q has quit [Remote host closed the connection]
greaser|q has joined #lisp
zch has joined #lisp
_whitelogger has joined #lisp
Bike has quit [Quit: Lost terminal]
<jack-thomas> Hi, so in Slime, I'm looking at the debug backtrace and I toggle details. This is what I see. " 0: (UIOP/RUN-PROGRAM:RUN-PROGRAM "/bin/bash" :INPUT #<SB-IMPL::STRING-INPUT-STREAM {1003F059A3}> :OUTPUT #<SB-IMPL::STRING-OUTPUT-STREAM {1003F05B43}> :ERROR-OUTPUT #<SB-IMPL::STRING-OUTPUT-STREAM {1003F.. Locals: SB-DEBUG::ARG-0 = "/bin/bash" SB-DEBUG::MORE = (:INPUT #<SB-IMPL::STRING-INPUT-STREAM {1003F059A3}> :OUTPUT
<jack-thomas> #<SB-IMPL::STRING-OUTPUT-STREAM {1003F05B43}> :ERROR-OUTPUT #<SB-IMPL::STRING-OUTPUT-STREAM {1003F05B43}> ...)" (New lines replaced with 4 spaces.) Any idea how to see the rest of those details?
<jack-thomas> I can post a pic if that will help. I'm not seeing anything in the slime documentation
alexande` has joined #lisp
alexanderbarbosa has quit [Read error: Connection reset by peer]
bjorkintosh has quit [Remote host closed the connection]
bjorkintosh has joined #lisp
gravicappa has joined #lisp
<no-defun-allowed> Anything in specific, say, more stack frames?
_whitelogger has joined #lisp
superkumasan has quit [Ping timeout: 244 seconds]
<jack-thomas> no-defun-allowed: No, do you notice how I can only see part of the function call? The sexp ends with ...
<jack-thomas> I can't find how to see the rest of it.
<aeth> try clicking on it? just a guess
<no-defun-allowed> You could click on sb-debug::more, which will show it in the inspector.
SaganMan has joined #lisp
cink has joined #lisp
jack-thomas has quit [Ping timeout: 246 seconds]
alexande` has quit [Remote host closed the connection]
alexande` has joined #lisp
ggole has joined #lisp
<beach> Good morning everyone!
<beach> fengshaun: Some people, including me, are working on creating a debugger worthy of the name for Common Lisp.
<cink> and nyef?
vlatkoB has joined #lisp
<thijso> and what would such a beast give us, beach ?
froggey has quit [Ping timeout: 258 seconds]
<stylewarning> This is a weak point I have with lisp... files. How can I make a file shorter without overwriting it? Something like truncating it.
froggey has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
<Shinmera> You can't, not in ANSI anyway.
<stylewarning> Didn't think so.
<Shinmera> What do you hope to do by truncating the file anyway?
cink has left #lisp [#lisp]
<stylewarning> Shinmera: I'm not sure, I'm experimenting around with how I want to manage the use of files as temporary (swap-like) storage of data
<Shinmera> I'd keep the file size constant and just have a first field in the file that denotes the allocated bytes in the file.
<beach> thijso: Stepping, break points, examining data, etc.
shka_ has joined #lisp
elderK has joined #lisp
<stylewarning> beach: what about displaying in the backtrace where dynamic bindings or restarts are installed
<beach> Sure, why not.
SaganMan has quit [Ping timeout: 258 seconds]
refpga has joined #lisp
refpga has quit [Client Quit]
refpga has joined #lisp
zaquest has quit [Read error: No route to host]
<fengshaun> beach, ooh ice
<fengshaun> nice*
<thijso> sounds good, beach
<thijso> when will we have it? *grin*
<beach> Don't hold your breath. It will require support from the Common Lisp implementation, and maintainers of implementations other than SICL will probably be reluctant to adding such support.
makomo has joined #lisp
fengshaun has quit [Ping timeout: 245 seconds]
defaultxr has quit [Ping timeout: 244 seconds]
zaquest has joined #lisp
fengshaun has joined #lisp
refpga` has joined #lisp
pyx has joined #lisp
pyx has quit [Client Quit]
monokrom has joined #lisp
seok has joined #lisp
<seok> When writing a long function, do you write the functions in parts and assemble them finally for readability, or do you just write the long form for shorter code?
<seok> what do you guys do
<no-defun-allowed> You should avoid writing long functions, so writing it in parts is ideal.
<no-defun-allowed> There's a joke that you shouldn't ever write a function longer than your head, but in Lisp, you should probably aim for shorter.
<seok> Sounds good. Guess I am re-writing mine
dddddd has joined #lisp
vaporatorius has quit [Read error: Connection reset by peer]
alexande` has quit [Remote host closed the connection]
Lord_of_Life has quit [Ping timeout: 245 seconds]
Lord_of_Life has joined #lisp
zmyrgel has joined #lisp
zmyrgel has quit [Quit: ERC (IRC client for Emacs 26.2)]
<no-defun-allowed> Are there any benchmarks on how using type tagged pointers instead of consing up fixnums in the heap perform in (some kind of Lisp)?
monokrom has quit [Remote host closed the connection]
schjetne has quit [Ping timeout: 252 seconds]
zmyrgel has joined #lisp
<no-defun-allowed> I know the former is much, much better, but I'm trying to estimate by how much.
zmyrgel has left #lisp [#lisp]
adam4567 has joined #lisp
<Shinmera> Tagging and untagging is practically free on the CPU, whereas the rest requires constant memory access. So the benchmark is, well, your memory bandwidth and cache.
<Shinmera> Unless I'm misunderstanding what exactly it is you want to benchmark.
<no-defun-allowed> Eh, maybe I can make something up with structures and fixnums in SBCL.
<no-defun-allowed> I have a bytecode Lisp interpreter in CL and I'm looking at another bytecode interpreter in C, and wondering how mine is 10x faster on the only "benchmark" they have provided.
<Shinmera> Did you compare on your own machine?
<no-defun-allowed> Yes.
<Shinmera> My only explanation is that writing slow code is easy in any language :)
cosimone has joined #lisp
<no-defun-allowed> My guess is that my environment model (a list of vectors) is faster than theirs (a hash table of some kind, I am not very good at reading C), and that they use heap-allocated numbers, whereas I snarf SBCL's fixnums.
nowhere_man has joined #lisp
<no-defun-allowed> The former has a 3x or so speed increase, and I'm about to test the latter.
SaganMan has joined #lisp
v88m has quit [Ping timeout: 244 seconds]
<no-defun-allowed> SBCL is too clever for my benchmarks, but there's a factor 14x there.
<jonatack> seok: i'm not sure how lispy this is, but one advantage to me of breaking a long function into shorter ones is that you can unit test them.
<seok> Yeah that sure is
<jonatack> beach: sounds great
<beach> jonatack: Thanks. Very preliminary stuff at metamodular.com/clordane.mp4
<jonatack> beach: nice. Will try SICL and Cleavir.
<beach> Please don't.
<jonatack> ah?
<beach> Cleavir can only be used to implement a Common Lisp compiler, and SICL is not in a state to be used by a general audience.
<jonatack> Ok. Standby for now then.
<beach> Yeah.
<beach> But I have set an objective to have a SICL executable by the end of the year.
<ck_> hey, that's news to me. A date! :)
<beach> Heh.
adam4567 has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<thijso> So I'm wondering... those of you using emacs as your editor, do you just use it's default indenting for CL code? Or are there packages (or settings) that make it better?
<no-defun-allowed> Using the slime-indentation contrib for SLIME guarantees you don't get odd looks when you show your code to #lisp.
<no-defun-allowed> The default Emacs indentation is okay, but slime-indentation makes it work much better. I think LOOP is the best example of the differences between them.
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
cosimone_ has joined #lisp
<jackdaniel> loop indentation proposed by slime is awful
<beach> How so?
cosimone_ has quit [Client Quit]
<jackdaniel> sorry, I meant: proposed by emacs
<jackdaniel> (without slime contrib)
<beach> Indeed.
TMA has quit [Ping timeout: 268 seconds]
Ven`` has joined #lisp
cosimone has quit [Quit: Leaving]
cosimone has joined #lisp
varjag has joined #lisp
mn3m has joined #lisp
scymtym has quit [Ping timeout: 258 seconds]
awolven has quit [Ping timeout: 264 seconds]
<thijso> Ah, thanks. I'll look into that.
tourjin has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
iskander has quit [Ping timeout: 246 seconds]
tourjin has quit [Remote host closed the connection]
igemnace has quit [Quit: WeeChat 2.5]
iskander has joined #lisp
cosimone has quit [Quit: Leaving]
scymtym has joined #lisp
Inline has joined #lisp
ravenousmoose has joined #lisp
<thijso> So if I have a part of my lisp code light up in red in emacs, it means there's something wrong, right? Apart from (error "whatever") where 'error' is red, I mean?
<thijso> Is there a way to have emacs tell me more about _what_ is wrong? Or slime, maybe?
SaganMan has quit [Ping timeout: 246 seconds]
<selwyn_> emacs may only be complaining about how you have laid out your code on the page
<no-defun-allowed> If you write (foo (bar baz <Newline> quux) bloop), Emacs will highlight bloop red because it's in a silly spot.
<selwyn_> yes
<selwyn_> this is valid code written in bad style
<thijso> Ah, ok...
<thijso> Uhm. But what is wrong with (loop named something<newline>do<newline>(function-called) .. ? 'function-called' is marked red here, which I find a little strange. Is it the 'do'?
<White_Flame> if your function name starts with "assert" it also changes red like "error" does
<thijso> Yeah. It doesn't.
<White_Flame> can you post the actual code?
<White_Flame> and is it red font, or a red underline?
<thijso> It looks like something else is going on. Is the function name "check-schedule" something special? It lights up anywhere I put it in my code...
<thijso> red font
<White_Flame> yeah, that's the same as assert then
<thijso> Oh, wait. Is it the check- prefix?
<White_Flame> some assumption on naming, which I personally find annoying
<thijso> Yeah, looks like it. If I rename it to "run-check-schedule" it's fine.
<White_Flame> and "do-" highlights purple, like builtins
<thijso> Is there somewhere I can change those assumptions? I'm fine with 'assert' and 'error', but 'check-' not so much
<thijso> exactly, White_Flame. Don't really like that one either.
<White_Flame> I haven't mucked with it personally. I tend to leave my environment alone
<thijso> Hah. I don't. I customize the bleep out of it.
<thijso> Of course, I'm running a clfswm window manager on sbcl on funtoo, so that might explain some things...
nanoz has joined #lisp
cosimone has joined #lisp
schjetne has joined #lisp
EvW has joined #lisp
EvW has quit [Client Quit]
EvW1 has joined #lisp
gareppa has joined #lisp
orivej has joined #lisp
Bike has joined #lisp
nowhere_man has quit [Ping timeout: 244 seconds]
lucasb has joined #lisp
refpga` has quit [Remote host closed the connection]
red-dot has joined #lisp
ravenousmoose has quit [Remote host closed the connection]
ravenousmoose has joined #lisp
aautcsh has joined #lisp
gareppa has quit [Quit: Leaving]
v88m has joined #lisp
notzmv has quit [Ping timeout: 245 seconds]
bendersteed has joined #lisp
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bendersteed has quit [Quit: bye folks]
vaporatorius has joined #lisp
mn3m has quit [Ping timeout: 245 seconds]
zacts has quit [Quit: WeeChat 2.4]
refpga` has joined #lisp
refpga` has quit [Remote host closed the connection]
IndoRuby has joined #lisp
pgomes1 has joined #lisp
quazimodo has quit [Ping timeout: 244 seconds]
oldtopman has joined #lisp
xkapastel has joined #lisp
pgomes1 has quit [Read error: Connection reset by peer]
pgomes1 has joined #lisp
IndoRuby has quit [Quit: Leaving]
refpga` has joined #lisp
<drmeister> With slime - does anyone know how to shut down this message?
<drmeister> "Compilation failed. Load fasl file anyway?"
<drmeister> It's like my damn bank machine eternally asking me if I want to use English.
<beach> That's stupid. Here in Europe, the machine switches to the official language of the country where the card was issued.
<beach> Well, maybe not ATMs. I don't know that. But when you pay in a store with a card for instance.
<Bike> the US doesn't have an official language and we have many people who would prefer languages other than english. melting pot and all.
<beach> True.
<Bike> of course it's pretty annoying when the ATM says it will remember your preference and then asks you the exact same question next time
<beach> Heh.
refpga` has quit [Remote host closed the connection]
Ven`` has quit [Quit: Textual IRC Client: www.textualapp.com]
pjb has quit [Read error: Connection reset by peer]
pjb has joined #lisp
fitzsim has quit [Ping timeout: 245 seconds]
quazimodo has joined #lisp
pgomes1 has left #lisp ["ERC (IRC client for Emacs 26.3)"]
elderK has quit [Ping timeout: 244 seconds]
frgo has joined #lisp
x[LGWs4x4i]uG2N0 has joined #lisp
frgo_ has quit [Ping timeout: 258 seconds]
EvW1 has quit [Ping timeout: 250 seconds]
pgomes has joined #lisp
zch has quit [Quit: Leaving]
jmercouris has joined #lisp
jmercouris has quit [Remote host closed the connection]
pgomes has quit [Ping timeout: 246 seconds]
igemnace has joined #lisp
Patzy has quit [Quit: WeeChat 2.5]
pjb has quit [Remote host closed the connection]
pjb has joined #lisp
dale has joined #lisp
Patzy has joined #lisp
Patzy has quit [Client Quit]
Patzy has joined #lisp
stepnem has quit [Ping timeout: 245 seconds]
stepnem has joined #lisp
Lycurgus has joined #lisp
<flip214> Bike: would the ATM store the preference locally, or put it on your card's EEPROM?
<p_l> it can try, but not get allowed
<flip214> well, depending on the card format any user could use unused space for their own files...
<p_l> flip214: ATM cards typically don't expose storage interface
<p_l> when you put the card in, the ATM will query it for list of applications, then select from it the few that it supports (for example, Mastercard or Visa), then talk to that specific application
gareppa has joined #lisp
<fiddlerwoaroof> thijso: it's in the contrib slime-fontifying-fu
defaultxr has joined #lisp
gareppa has quit [Quit: Leaving]
scymtym has quit [Ping timeout: 250 seconds]
glamas has left #lisp ["Be back later..."]
glamas has joined #lisp
grumble has quit [Quit: Martini. Gin, not vodka. Obviously. Stirred for 10 seconds while glancing at an unopened bottle of vermouth.]
tjmaynes` has joined #lisp
yoeljacobsen has joined #lisp
scymtym has joined #lisp
grumble has joined #lisp
tjmaynes` has quit [Remote host closed the connection]
kajo has joined #lisp
fitzsim has joined #lisp
yoeljacobsen has quit [Ping timeout: 258 seconds]
refpga has quit [Read error: Connection reset by peer]
refpga has joined #lisp
kajo has quit [Ping timeout: 264 seconds]
Necktwi has quit [Quit: leaving]
EvW has joined #lisp
Posterdati has quit [Ping timeout: 245 seconds]
EvW has quit [Ping timeout: 250 seconds]
<jeosol> Does cl-mop:deep-copy of an object creates a complete new copy even for slots that are class objects?
<jeosol> I am trying to create a new fresh object and modify one of the slot objects. Or what is a better way to do this.
<Lycurgus> (in sbcl)
<jeosol> Yeah in SBCL
<jeosol> I have used cl-mop:deep-copy, I changed the inner slot object and when printed, they have the same value, so I am not doing something right
Posterdati has joined #lisp
q9929t has joined #lisp
<Bike> what's cl-mop?
<Bike> some library, i see
<fiddlerwoaroof> It's sort of badly named, because it looks "official"
<Bike> it looks like it copies values of class slots, but that just means changing the value of the class slot, which is after all shared
<Bike> not sure what you mean by "slots that are class objects"
ealfonso has joined #lisp
<pjb> Bike: people have missing neurons, this is why they miss words in their output flows.
<pjb> "slots that are BOUND TO objects THAT ARE INSTANCES OF SOME CLOS class"
<jeosol> Bike: I apologize for the lack of clarity. I mean have another object that is a slot in the outer one.
<jeosol> pjb: thanks. Thats a better explanation
<pjb> jeosol: all lisp values are lisp objects, or objects.
<pjb> Lisp is purely OO :-)
<Bike> well, it looks like deep-copy is properly recursive for objects
<Bike> but not for sequences or lists or structures
<pjb> clhs copy-tree
<pjb> for conses.
hiroaki has joined #lisp
<Bike> i mean, deep-copy calls copy-tree, but that won't copy the elements in the tree, just the conses
<Bike> this is a pretty big flaw in the library
cosimone has quit [Quit: Leaving]
<jeosol> I see. I was able to get it fixed by still performing a separate copy of the slots. I have used this approach (two step copy) in the past to get the objects to be different and not sure if there is a better way.
<Bike> why do you need the objects to be distinct?
<jeosol> Adding :identity t to (print-unreadable-object is a nice debug feature
<jeosol> I am performing distributed calls, so I create the copies and do parallel calls.
kajo has joined #lisp
<Bike> and what, the calls alter the objects in different ways?
<jeosol> I am trying to do sensitivity analyses by changing some slots (2 or more) in the parent object and can do by a function and submit in parallel
<Bike> ic
<jeosol> Once I change the objects, I use it to create a deck for another black box function (external physics simulator)
karlosz has joined #lisp
<jeosol> each one writes a different input deck when evaluated. I could do it sequentially on the same object, but trying to get the results faster by doing parallel calls.
yoeljacobsen has joined #lisp
kajo has quit [*.net *.split]
<thijso> thanks, fiddlerwoaroof
kajo has joined #lisp
yoeljacobsen has quit [*.net *.split]
yoeljacobsen has joined #lisp
q9929t has quit [Quit: q9929t]
hiroaki has quit [Ping timeout: 276 seconds]
Posterdati has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
xkapastel has quit [Quit: Connection closed for inactivity]
Posterdati has joined #lisp
__jrjsmrtn__ has joined #lisp
__jrjsmrtn__ has quit [Max SendQ exceeded]
__jrjsmrtn__ has joined #lisp
_jrjsmrtn has quit [Ping timeout: 246 seconds]
Akhetopnu has quit [Quit: leaving]
aautcsh has quit [Ping timeout: 252 seconds]
seok17 has joined #lisp
<seok17> how can I change the :test for a hash-table?
<seok17> (setf (hash-table-test..)) doesn't work
aautcsh has joined #lisp
<Bike> seok17: can't
cosimone has joined #lisp
xkapastel has joined #lisp
<thijso> seok17: (make-hash-table :test 'equal) ?
shka_ has quit [Ping timeout: 246 seconds]
<seok17> thijso: hashtables are already there
<Bike> you cannot change the test of an existing table
refpga has quit [Ping timeout: 245 seconds]
refpga` has joined #lisp
<thijso> Ah, ok. Yeah, then you're out of luck. Only way I see is to copy into a newly created hashtable with the correct test, but that is probably quite expensive...
vlatkoB has quit [Remote host closed the connection]
<seok17> hm quite inconvenient since the default eq does not work with string keys
jmercouris has joined #lisp
gravicappa has quit [Ping timeout: 245 seconds]
yoeljacobsen has quit [Ping timeout: 240 seconds]
<pjb> seok17: and so, you can't imagine a way to do it?
<aeth> I think the general expectation is to work with symbols/keywords if possible, where string= hash tables would mostly be for keys for things based on user input... so, yes, it's inconvenient, but not as commonly needed as it is in many other languages
<seok17> most json libraries return objects as hash with string keys
<jmercouris> thoughts on cl-annot?
<aeth> Depending on what you'd need, you could make a make-hash-table* that defaults to string= (or equal or whatever), or a copy-hash-table... but alexandria has the latter.
<pjb> seok17: (defun change-hash-table-test (old new-test) (let ((new (make-hash-table :test new-test :size (hash-table-count old)))) (maphash (lambda (k v) (setf (gethash k new) v)) old) new))
<aeth> It looks like alexandria:copy-hash-table takes a keyword argument called test where if it's defined it will change what the test is (and if it isn't, it keeps the old test). So you could turn default hash-tables into #'equal hash tables that will also work on strings
<aeth> (alexandria:copy-hash-table foo :test #'equal)
<aeth> You could also test for EQUAL or STRING= or EQUALP or STRING-EQUAL being used in the HASH-TABLE-TEST first to save a copy.
<aeth> s/save a copy/save yourself from having to do a copy/
<pjb> (let ((old (make-hash-table))) (setf (gethash "foo" old) 42 (gethash (copy-seq "foo") old) 1) (hash-table-keys (change-hash-table-test old 'equal))) #| --> ("foo") |#
<pjb> The only valid values for test is eq equal and equalp; not string= or string-equal!
<aeth> weird
<aeth> I would have assumed that those two would be supported
<aeth> I guess CL predates strings being so commonplace in hash tables
<pjb> aeth: string= and string-equal don't compare strings!
yoeljacobsen has joined #lisp
<Bike> the library encodes to a hash table with string keys but eq test? really?
<Bike> looks to me like cl-json and yason both do an equal hash table
refpga` has quit [Read error: Connection timed out]
refpga` has joined #lisp
Oladon has joined #lisp
yoeljacobsen has quit [Ping timeout: 240 seconds]
refpga` has quit [Remote host closed the connection]
pgomes has joined #lisp
ggole has quit [Quit: Leaving]
pgomes has quit [Read error: Connection reset by peer]
akoana has joined #lisp
gxt has joined #lisp
refpga has joined #lisp
nydel has quit [Ping timeout: 245 seconds]
nydel has joined #lisp
Lord_of_Life has quit [Ping timeout: 245 seconds]
seok17 has quit [Remote host closed the connection]
jmercouris has quit [Remote host closed the connection]
ealfonso3 has joined #lisp
ealfonso has quit [Ping timeout: 258 seconds]
aautcsh has quit [Ping timeout: 248 seconds]
ealfonso3 is now known as ealfonso
Jeanne-Kamikaze has joined #lisp
Involuntary has joined #lisp
Nomenclatura has joined #lisp
Jeanne-Kamikaze has quit [Ping timeout: 265 seconds]
nanoz has quit [Ping timeout: 268 seconds]
schjetne has quit [Ping timeout: 244 seconds]
slyrus_ has quit [Remote host closed the connection]
slyrus_ has joined #lisp
Adamclisi has quit [Quit: leaving]
techquila has joined #lisp
Lycurgus has quit [Quit: Exeunt]
_whitelogger has joined #lisp
<mrcode_> Xach: does this mean it's impossible to specialize a method for a (simple-array character *) vs (simple-array (unsigned-byte 8) *) ?
<Xach> mrcode_: methods specialize on classes, not types.
<Xach> string is a system class, as is array, but (simple-array ub8 *) is not.
<mrcode_> ahh..
<mrcode_> ok. makes sense. i knew i was missing something. thanks Xach
skibo has joined #lisp
<mrcode_> hmm, I guess a quick followup to that, how does one specialize a method on an array in general ?
<mrcode_> adding (arg array) doesn't work
<mrcode_> (arg string) does
<pjb> mrcode_: the right way to do that is to define two custom classes, one that wraps the array of unsigned-byte and the other a string, and to specialize on those classes.
<pjb> Of course, you can also specialize on the classes returned there, or rather, one of their superclasses, since the result is somewhat implementation dependent or too restrictive: (values (class-name (class-of (make-array 3 :element-type 'unsigned-byte))) (class-name (class-of (make-string 3 :element-type 'character)))) #| --> simple-vector ; simple-base-string |#
<pjb> mrcode_: array is definitely a system class, you can specialize on it. (find-class 'array) #| --> #<built-in-class array> |#
<pjb> mrcode_: defining wrapping classes would have to be done, assuming you don't want your method to dispatch for arrays of signed-byte or arrays of (unsigned-byte 8), say…
<Xach> array is a system class and should work usually.
<pjb> Yes; it's just that it's too general, in general.
<mrcode_> Xach: it works for me now, after a fresh image start
<mrcode_> pjb: thanks for the suggestion
cosimone has quit [Ping timeout: 240 seconds]
<no-defun-allowed> How should I go about reading :report :flat reports from sb-sprof?
<no-defun-allowed> I think the "self" column is how many samples have called that function last, and "total" is how many have that function anywhere on the stack.
<no-defun-allowed> But then that would mean my interpreter is in the dispatch loop (as opposed to running some code) 53% of the time, which I don't believe.
varjag has quit [Ping timeout: 245 seconds]
<ck_> That'll be the 's' part in sprof. Have you tried the non-statistical profiler?
<no-defun-allowed> Could try that. My opcodes are lambda functions and thus I can't name them to trace, but I'm interested to see if that 53% number is anything near realistic.
<no-defun-allowed> Or that could be possible, since the loop does quite a few checks to limit conses and cycles and establishes a restart too.
EvW has joined #lisp
<no-defun-allowed> Yep, it was that restart all along. I guess I will have to split up this loop into a setup part, then a run part, so that it's possible to continue running the interpreter when we raise a signal for some external data.
karlosz has quit [Remote host closed the connection]
karlosz has joined #lisp
mn3m has joined #lisp
mn3m has quit [Max SendQ exceeded]
analogue has joined #lisp
karlosz has quit [Quit: karlosz]