<lispmacs[work]>
so, I see with that type, used for a class slot, SBCL doesn't actual do any type checking of its own on the inner values you plug in
<lispmacs[work]>
I see in the spec that "The consequences of attempting to store in a slot a value that does not satisfy the type of the slot are undefined"
<lispmacs[work]>
so, I'm guessing to have something like actual type safety with slots accessors, you'd need to define your own accessor methods that analyzes whatever you try to put in
<mfiano>
Right, typically I use a :BEFORE auxillary method with check-type.
<mfiano>
The only declarations that are specified to be enforced, have nothing to do with types.
<aeth>
boilerplate annoyed me so I check in a metaclass
<aeth>
it's ridiculous that SBCL doesn't check when they check basically everywhere else (structs, declare, etc.)
<aeth>
*at default optimization levels
<mfiano>
SBCL's default optimization levels are not the greatest and lead to a many conformance problems.
<mfiano>
SBCL is also over-rated. This is CL afterall.
<moon-child>
a type like (cons a b) is rather problematic, because the cons cell could be shared with other code, and that other code could (say) surrepitiously change the car to no longer be an a at any time
<aeth>
yes, SBCL is overrated, time to yak shave an entire CL implementation
<moon-child>
array types don't have this problem; they have a different problem instead (u-a-e-t)
<mfiano>
lispmacs[work]: speaking of, the only declarations that matter to every implementation are: SPECIAL, NOTINLINE, and semantics surrounding specific OPTIMIZE qualities.
Gleefre has quit [Remote host closed the connection]
<aeth>
if implementations decide to ignore INLINE and DYNAMIC-EXTENT, it's on them, really
Gleefre has joined #commonlisp
<aeth>
what's more problematic is when implementations assume rather than check declared types, which is the case for SBCL with (safety 0), but the solution to that is never (safety 0)
<hayley>
It's on me if I lazily allocate and inline without annotations from the programmer, noted.
<mfiano>
Not everyone codes CL like C
<aeth>
moon-child: Yes, properly typed conses are badly needed. You can get around this a bit with typed slots in structs (though can't guarantee that implementations will check it), but now you have to reimplement all of the list functions you want to use and it'll be slower.
<moon-child>
what implementation strategy do you think could be faster than structs with typed slots?
<mfiano>
It would be nice if types could only be known at runtime. Then CL wouldn't be so confused.
<hayley>
Monomorphising without declared types could yield more precise types, but I suspect my suggestions are the opposite of what aeth is expecting.
<aeth>
moon-child: it'll be slower than a built-in, I mean
<moon-child>
aeth: I am asking what implementation strategy you think a 'built-in' could use that would be faster than structs with typed slots
<aeth>
moon-child: it's not so much CAR/CDR as the reimplementation of every list-related and sequence-related function that you want to use on these new not-CONSes
habamax has quit [Ping timeout: 268 seconds]
<moon-child>
well, first make car and cdr generic functions
<aeth>
no, you'd probably just want to extend extensible sequences (or maybe the functions in extensible sequences are good enough other than car/cdr/cons themselves)
<moon-child>
sure. same difference
<aeth>
I'm guessing most custom sequences are either going to be vector-like or list-like in big-O
<aeth>
so you could make extensible sequences way easier to use
certainty has joined #commonlisp
patrix has quit []
habamax has joined #commonlisp
patrix has joined #commonlisp
certainty has quit [Ping timeout: 276 seconds]
<aeth>
and typed conses are fairly repetitive because they basically come in two varieties: car (list) and car-and-cdr (tree or graph); i.e. if it's type A then in the first one, the car is always A and the cdr is always the-struct-itself-or-NIL and in the second type, the car and the cdr can both be any of the three
<aeth>
(if you need NIL in the car in the first kind then you can just put that into the type)
<aeth>
though the one that started this conversation is a special case because it's a cons with a car of A and a cdr B, which you can't use to build a list or a graph
notzmv has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
random-nick has quit [Ping timeout: 260 seconds]
certainty has joined #commonlisp
certainty has quit [Ping timeout: 245 seconds]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
lucasta has quit [Remote host closed the connection]
lispmacs[work] has quit [Ping timeout: 255 seconds]
luis7 has joined #commonlisp
luis has quit [Ping timeout: 255 seconds]
luis7 is now known as luis
even4voi1 has quit [Ping timeout: 264 seconds]
even4void has joined #commonlisp
triffid has quit [Remote host closed the connection]
triffid has joined #commonlisp
triffid has quit [Ping timeout: 240 seconds]
certainty has joined #commonlisp
masinter has joined #commonlisp
avocadoist has quit [Ping timeout: 256 seconds]
triffid has joined #commonlisp
certainty has quit [Ping timeout: 268 seconds]
alfplayer has joined #commonlisp
habamax has quit [Ping timeout: 268 seconds]
habamax has joined #commonlisp
certainty has joined #commonlisp
Gleefre has joined #commonlisp
certainty has quit [Ping timeout: 256 seconds]
tyson2 has quit [Remote host closed the connection]
edr has quit [Quit: Leaving]
certainty has joined #commonlisp
Gleefre has quit [Ping timeout: 250 seconds]
certainty has quit [Ping timeout: 255 seconds]
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
certainty has joined #commonlisp
certainty has quit [Ping timeout: 255 seconds]
certainty has joined #commonlisp
jobhdez has joined #commonlisp
certainty has quit [Ping timeout: 255 seconds]
decweb has quit [Ping timeout: 276 seconds]
<jobhdez>
hey you all! In C if one unrolls loops then gcc can generate faster code according to the textbook "Computer Systems, A programmers perspective." is common lisp the same? i have tried this little experiment on some linear algebra code using sbcl. and the loop unrolling version of the linear algebra operator was faster. but wanted to ask someone
<jobhdez>
here. the idea is that if you help the compiler by writing optimized code the compiler can generate faster code even if the compiler has optimizations enabled. thanks
<hayley>
Common Lisp runs on the same processors, so yes. But SBCL will never unroll whereas your favourite compiler might.
<hayley>
*automatically unroll
<jobhdez>
sbcl doesnt use loop unrolling in its optimizer? mhmm interesting
<hayley>
It doesn't use many things, regrettably.
<hayley>
GCC is reluctant to unroll in my experience; Clang is more eager.
<jobhdez>
i wonder now what makes sbcl so fast
<moon-child>
you can get 50% of the way there for 5-10% of the work
dcb has quit [Quit: MSN Messenger 4.1.1]
<hayley>
Of the catalog <https://www.clear.rice.edu/comp512/Lectures/Papers/1971-allen-catalog.pdf> SBCL only does inlining (when you ask it to), constant folding, dead code elimination, register allocation and peepholing. Though maybe "shadow variables" (talking about optimising COBOL!) has an equivalent in deciding to box values or not.
<jobhdez>
wow! I cant believe it. and this is enough for being as fast as c huh. interesting. thanks for sharing.
bilegeek has joined #commonlisp
<moon-child>
it does do the good modern version of peepholes, though--based on dataflow--not the version described in the catalogue where you just scan for instruction sequences
<moon-child>
(I think I saw some stubs and comments related to the latter but I don't think it's actually done?)
<hayley>
It's done at the assembly level.
<moon-child>
I mean like deftransform
<hayley>
Oh, right. There's deftransform which works at a higher level, and there's another peephole at the end.
<hayley>
See the DEFPATTERN forms in src/compiler/x86-64/insts.lisp
hineios2 has quit [Ping timeout: 264 seconds]
hineios2 has joined #commonlisp
certainty has joined #commonlisp
certainty has quit [Ping timeout: 268 seconds]
chomwitt has joined #commonlisp
jobhdez has quit [Ping timeout: 250 seconds]
King_julian has joined #commonlisp
certainty has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
certainty has quit [Ping timeout: 260 seconds]
jobhdez has joined #commonlisp
Pixel_Outlaw has quit [Quit: Leaving]
certainty has joined #commonlisp
tertek has quit [Remote host closed the connection]
tertek has joined #commonlisp
certainty has quit [Ping timeout: 268 seconds]
Meritamen has joined #commonlisp
<White_Flame>
jobhdez: I think SBCL's type inferencing is one of its biggest speed advantages, avoiding a lot of runtime work as opposed to just trying to use runtime tricks to make the same work faster
Meritamen has quit [Remote host closed the connection]
<jobhdez>
ah ok - interesting.
<White_Flame>
but it's very likely just a combination of all of the above
Josh_2 has quit [Remote host closed the connection]
King_julian has quit [Ping timeout: 260 seconds]
certainty has quit [Ping timeout: 252 seconds]
rgherdt has joined #commonlisp
Josh_2 has joined #commonlisp
<Josh_2>
How can I inspect what a running lisp image is wasting all its time on?
certainty has joined #commonlisp
<Josh_2>
1 cpu of mine is chilling at 50% on StumpWM :(
jobhdez has quit [Quit: Client closed]
igemnace has quit [Read error: Connection reset by peer]
<Josh_2>
Tryna find out what its doing, ofcourse I could use the sbcl profiling tools but I am wondering if there is a way I can do that within the running image
kenran has joined #commonlisp
King_julian has joined #commonlisp
<Josh_2>
I figured it out :skull: all my fault like normal :)
<White_Flame>
that'd be implementation specific, look for profilers
<White_Flame>
sbcl as sb-sprof, which is a statistical sampling profiler and works pretty well
<White_Flame>
*has
<Josh_2>
Can I use sb-sprof to profile when the image is already running its main loop?
<White_Flame>
possibly, it's been a while
<Shinmera>
You can, I do it all the time
<Shinmera>
Also shoutout to slime-sprof, which is 100000000x more readable than sbcl's output
<White_Flame>
yeah, default is to profile all threads
<White_Flame>
ah, I hadn't heard of that one yet
igemnace has joined #commonlisp
kenran has quit [Remote host closed the connection]
kenran` has joined #commonlisp
varjag has joined #commonlisp
<Josh_2>
Thanks Shinmera & White_Flame
sleetdrop has joined #commonlisp
Meritamen has joined #commonlisp
rtypo has quit [Ping timeout: 260 seconds]
<Josh_2>
Now I have to figure out why stumpwm would be sat at 50% running something in the background that takes 1second...
<Josh_2>
and is only executed after a command is executed
shka has joined #commonlisp
habamax has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1.90)]
Lycurgus has joined #commonlisp
mgl has joined #commonlisp
donleo has joined #commonlisp
Lycurgus has quit [Quit: leaving]
habamax has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
danza has joined #commonlisp
bilegeek has quit [Quit: Leaving]
<Josh_2>
Huh
<Josh_2>
I just hit an unhandled memory fault in SBCL
<Josh_2>
(defmethod update-instance-for-different-class :after ((p has-version) c &rest initargs) (break "~A ~A" p c)) -> move p to sly repl and inspect it :thinking:
<Josh_2>
Probably more to do with sly than sbcl itself
King_julian has quit [Ping timeout: 255 seconds]
danza has quit [Ping timeout: 260 seconds]
King_julian has joined #commonlisp
danse-nr3 has joined #commonlisp
zetef has joined #commonlisp
Meritamen has quit [Ping timeout: 252 seconds]
zetef has quit [Remote host closed the connection]
zetef has joined #commonlisp
anticrisis has quit [Read error: Connection reset by peer]
zetef has quit [Client Quit]
Lycurgus has joined #commonlisp
Lycurgus has quit [Changing host]
Lycurgus has joined #commonlisp
bendersteed has joined #commonlisp
zetef has joined #commonlisp
Lycurgus has quit [Client Quit]
Meritamen has joined #commonlisp
King_julian has quit [Ping timeout: 256 seconds]
Lord_of_Life_ has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life_ is now known as Lord_of_Life
King_julian has joined #commonlisp
_whitelogger has joined #commonlisp
habamax has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1.90)]
habamax has joined #commonlisp
certainty has quit [Quit: WeeChat 4.1.1]
habamax has quit [Remote host closed the connection]
herjazz has joined #commonlisp
<Josh_2>
Fixing things that aint broke, now thats what I call good life advice!
<Josh_2>
Found a good use for specializing #'update-instance-for-different-class
<Josh_2>
and thats automatic updating of the new slots in my database
attila_lendvai has joined #commonlisp
habamax has joined #commonlisp
<Shinmera>
the previous object has dynamic-extent within u-i-f-d-c
<Shinmera>
so letting it escape is undefined behaviour
Gleefre has joined #commonlisp
habamax has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1.90)]
habamax has joined #commonlisp
dnhester26 has joined #commonlisp
avocadoist has joined #commonlisp
meritamen has quit [Remote host closed the connection]
zetef has quit [Ping timeout: 255 seconds]
habamax has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1.90)]
habamax has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
decweb has joined #commonlisp
semarie has quit [Quit: WeeChat 4.0.5]
Gleefre has quit [Ping timeout: 250 seconds]
azimut has joined #commonlisp
dnhester26 has joined #commonlisp
Posterdati has quit [Remote host closed the connection]
Posterdati has joined #commonlisp
habamax has quit [Remote host closed the connection]
herjazz has quit [Quit: leaving]
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
semarie has joined #commonlisp
Devon has quit [Ping timeout: 260 seconds]
random-nick has joined #commonlisp
dnhester_ has joined #commonlisp
dnhester26 has quit [Read error: Connection reset by peer]
danse-nr3 has quit [Ping timeout: 256 seconds]
Devon has joined #commonlisp
danse-nr3 has joined #commonlisp
waleee has quit [Ping timeout: 264 seconds]
King_julian has quit [Ping timeout: 245 seconds]
attila_lendvai_ has joined #commonlisp
sleetdrop has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
attila_lendvai has quit [Ping timeout: 240 seconds]
attila_lendvai_ has quit [Ping timeout: 276 seconds]
dnhester_ has quit [Ping timeout: 245 seconds]
dnhester26 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
markb1 has quit [Ping timeout: 256 seconds]
markb1 has joined #commonlisp
dnhester26 has joined #commonlisp
gerogaga has joined #commonlisp
random-nick has quit [Ping timeout: 252 seconds]
King_julian has joined #commonlisp
danse-nr3 has quit [Ping timeout: 255 seconds]
danse-nr3 has joined #commonlisp
edr has joined #commonlisp
danse-nr3 has quit [Remote host closed the connection]
danse-nr3 has joined #commonlisp
<dnhester26>
help! my slime get's stuck using ppcre, I `C-c C-b` to investigate, then `d` and executed the line I thought was causing the infinite loop or whatever it is, now all of emacs froze and `C-c C-b` seems to not stop the execution running in the `d` evaluation frame in the debugger. Is there a way to interrupt or cancel the execution without having to kill the emacs process?
kenran` has quit [Remote host closed the connection]
yitzi has joined #commonlisp
tyson2 has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
green_ has quit [Ping timeout: 268 seconds]
danse-nr3 has quit [Read error: Connection reset by peer]
mgl has quit [Ping timeout: 255 seconds]
rgherdt_ has joined #commonlisp
danse-nr3 has joined #commonlisp
rgherdt__ has joined #commonlisp
rgherdt has quit [Ping timeout: 260 seconds]
dnhester26 has joined #commonlisp
mgl has joined #commonlisp
rgherdt_ has quit [Ping timeout: 245 seconds]
notzmv has quit [Ping timeout: 255 seconds]
<bjorkint0sh>
C-g not working?
rgherdt has joined #commonlisp
<mfiano>
FWIW, sending SIGUSR2 will enable debug-on-error when C-g doesn't do anything useful on its own.
rgherdt__ has quit [Ping timeout: 256 seconds]
green_ has joined #commonlisp
kenran has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
King_julian has quit [Ping timeout: 276 seconds]
dnhester26 has joined #commonlisp
gerogaga has quit [Quit: Client closed]
szkl has quit [Quit: Connection closed for inactivity]
alfplayer has quit [Ping timeout: 255 seconds]
igemnace has quit [Read error: Connection reset by peer]
<dnhester26>
yeah, C-g didn't work. had to kill the process
mgl has quit [Ping timeout: 256 seconds]
<dnhester26>
I am trying to do regex replace with this character: `→` and I think ppcre is crashing because of that. Does anyone know what types of characters is ppcre limited to? is it only ascii?
<dnhester26>
I made a plaster with what I'm trying to do
<dnhester26>
Using `ppcre:scan` is failing
<dnhester26>
I have an idea maybe it'll work
<dnhester26>
one sec
mgl has joined #commonlisp
grawlinson has quit [Ping timeout: 252 seconds]
grawlinson has joined #commonlisp
green_ has quit [Ping timeout: 256 seconds]
igemnace has joined #commonlisp
<dnhester26>
If i just want to write a new line character inside a string, how do I do that? `~%` is probably only inside format, and `\n` or `\\n` doesn't seem to work.
<dnhester26>
I know I can do (format NIL "~%askdn")
<dnhester26>
but I just want "\naskj"
szkl has joined #commonlisp
<beach>
Just put the newline in the string.
<mfiano>
dnhester26: There are many ways to do what you want, with the simplest being what beach said. Another: ,(concatenate 'string '(#\a #\b #\newline #\c))
<dnhester26>
beach that's what I'm asking I don't know how to, do you mean ,"\Newlinemytext"?
<mfiano>
He means press enter in your editor to bring it to a new line in the middle of the ""
<mfiano>
literal strings are after all literal
<dnhester26>
ahhh thanks, mfiano, now I understand
bendersteed has quit [Quit: bendersteed]
<dnhester26>
how hard would it be to add to lisp a string mode where we can use strings like in other languages with \n \t etc available? and also a regex string mode without the need to escape backslashes and regex characters?
<dnhester26>
Also, if string literals are literal, how come when I want to print a backslash e.g. "\a" only "a" prints?
<dnhester26>
would adding that be a read macro?
<mfiano>
Try cl-interpol's read macro or similar if you want that garbage
<dnhester26>
mfiano, thanks, I see you are not a fan
<dnhester26>
,(format NIL "\a") does not print "\a". Why?
<ixelp>
(format NIL "\a") => "a"
<Josh_2>
,(format nil "~S" "\abc")
<ixelp>
(format nil "~S" "\abc") => "\"abc\""
<beach>
Because backslash is an escape character. It is not in the string.
<dnhester26>
if it's literal, why do I need to esacpe the back slash, and if it's not literal, how come I can't use anything inside the string literal like \Newline
<dnhester26>
beach it's an escape for what?
<mfiano>
\Newline is not a Common Lisp symbol
<Josh_2>
#\Newline is a character, they also evaluate to themselves
<Josh_2>
character != string
<beach>
dnhester26: To take the next character literally, for example if you want a " in there.
<dnhester26>
beach: ah ok. thanks. So is the only use case for backslashes escaping the double quote?
<dnhester26>
,(format nil "\\a") somehow seems to be two slashes, but I take it that's because it's showing me that it's escaped and it's really one character?
<ixelp>
(format nil "\\a") => "\\a"
<dnhester26>
beach thanks for the docs
<beach>
,(length "\\a")
<ixelp>
(length "\\a") => 2
<mfiano>
did you try #'PRINC?
<dnhester26>
thanks beach, that's a nice confirmation
<mfiano>
You are getting confused by the basics of the CL reader and printer. It is good to ask these questions, but you may get better and more direct help in #clschool.
<dnhester26>
mfiano princ for what?
<dnhester26>
yeah sorry, I just didn't want to loose the logs because when my IRC client closes I loose them (not sure why) and they are not saved like in here. but you are right
<beach>
dnhester26: PRINT prints readably, so the escape character is included.
<beach>
dnhester26: PRINC does not.
<dnhester26>
beach: thanks, I didn't understand that.
<mfiano>
dnhester26: change your format to (format t ...)
<mfiano>
Right now, it is just returning the string, which the printer handles in the REPL.
<mfiano>
And I bet *print-readably* is T
<beach>
Right, ,(format t "~a" "\\a")
<ixelp>
(format t "~a" "\\a") \a => NIL
<mfiano>
,(format t "~s" "\\a")
<ixelp>
(format t "~s" "\\a") "\\a" => NIL
jmdaemon has quit [Ping timeout: 268 seconds]
<mfiano>
Lots of things going on here, and can be tuned at various levels. That's why I say start with understanding the basics of the reader and printer.
<dnhester26>
beach mfiano got it, thanks!
<dnhester26>
will re-read the spec to see if more things click for me now
<dnhester26>
Thanks
<dnhester26>
I think I understood based on your explanations so thanks again!
dnhester26 has quit [Remote host closed the connection]
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
lispmacs[work] has joined #commonlisp
<lispmacs[work]>
hi, if I have a vector of characters, rather than a string proper, what would be the most efficient way to print it (i.e., like if it were a string)
<lispmacs[work]>
should I assemble it into a string first?
<beach>
lispmacs[work]: A vector with element type CHARACTER *is* a string.
<beach>
lispmacs[work]: So I take it the element type is T but it so happens to contain characters only?
<lispmacs[work]>
um, well, it is a vector of bytes in the ASCII character range. I didn't set a type explicitly
avocadoist has quit [Remote host closed the connection]
<lispmacs[work]>
bytes pulled off a serial port
<beach>
Bytes are not characters. They are integers.
<beach>
So then you don't have a vector of characters?
<Shinmera>
The right thing to do is use babel to convert the octets according to the encoding used
<lispmacs[work]>
babel?
<beach>
lispmacs[work]: It is not me defining it that way. It is the standard.
<Josh_2>
#'babel:octets-to-string
<lispmacs[work]>
Josh_2: that a package I have to install?
<Josh_2>
Ye
green_ has joined #commonlisp
kenran has quit [Remote host closed the connection]
<aeth>
code-char will work if it's ASCII and the implementation is ASCII/Unicode... otherwise, you can't assume bytes and characters line up, in which case you need to some some function that will turn some (potentially variable, like with UTF-8) length of bytes into a string
<aeth>
generally, I start with code-char in a rough ASCII-only prototype and then do a second pass to make it properly unicode
<aeth>
it's naïve to assume that even English can be written with only ASCII, though.
<aeth>
though the few English words like naïve or coöperation or résumé (in some places "CV") or the various uses of æ (e.g. encyclopædia) have fallen out of favor, probably because of typewriters and computers
<aeth>
there's still "Pokémon", though
zxcvz has joined #commonlisp
dnhester26 has joined #commonlisp
zxcvz has quit [Client Quit]
<sellers>
would the use of smt-lib with common lisp be suitable for presentation at els?
<sellers>
smt-lib cannot be said to be a lisp, but it is an s-expression based language
josh203 has joined #commonlisp
josh203 has quit [Excess Flood]
josh203 has joined #commonlisp
danse-nr3 has quit [Ping timeout: 260 seconds]
dnhester26 has quit [Remote host closed the connection]
chomwitt has quit [Ping timeout: 268 seconds]
<beach>
sellers: To present something at ELS, you can either give a 5-minute "lightning talk", or it must be a presentation of a paper that you submitted, and that after peer review was accepted for publication.
dnhester26 has joined #commonlisp
<beach>
sellers: There are two kinds of papers, a full paper of max 8 pages, and a "demo paper", but I don't know the details of the latter.
<sellers>
will the use of an smt solver be suitable subject matter though
<beach>
I suppose. It depends more on the originality of the work than on the exact subject.
<beach>
Of course, if it is only marginally related to "Lisp", then the referees might reject the paper.
josh203 has quit [Remote host closed the connection]
josh203 has joined #commonlisp
yitzi has quit [Remote host closed the connection]
josh203 has quit [Remote host closed the connection]
josh203 has joined #commonlisp
chomwitt has joined #commonlisp
josh203 has quit [Read error: Connection reset by peer]
younder has quit [Remote host closed the connection]
alfplayer has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
amb007 has quit [Ping timeout: 255 seconds]
amb007 has joined #commonlisp
Gleefre has joined #commonlisp
<Shinmera>
beach: since this year there's also the "experience report" category
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<lispmacs[work]>
If you make a 2D array, can you return individual vectors from that?
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
<lispmacs[work]>
maybe you just need to make vector of vectors?
<aeth>
what are you trying to do/
dcb has joined #commonlisp
notzmv has joined #commonlisp
JamesF has joined #commonlisp
<bike>
lispmacs[work]: you can make arrays displaced into it, but that's usually kinda slow.
younder has joined #commonlisp
azimut has quit [Ping timeout: 240 seconds]
rtypo has joined #commonlisp
dnhester26 has joined #commonlisp
azimut has joined #commonlisp
waleee has joined #commonlisp
zetef has joined #commonlisp
Guest63 has joined #commonlisp
<aeth>
if the rows are small, you can just write a macro to multiple-value-bind multiple AREFs at once (I've done this for 2-4, so it effectively works for 1, 2, 3, and 4)
<aeth>
which may work, or may not, since it doesn't e.g. let you call the sequence functions on them
<Josh_2>
An experience report :O
_cymew_ has joined #commonlisp
mgl has quit [Ping timeout: 256 seconds]
<aeth>
actually, might've been symbol-macrolet instead of multiple-value-bind (so you can SETF it, too)
Josh_2 has quit [Quit: Gotta go fast!]
yitzi has joined #commonlisp
Gleefre has quit [Remote host closed the connection]
zxcvz has joined #commonlisp
cage has joined #commonlisp
Gleefre has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
dnhester26 has joined #commonlisp
<lispmacs[work]>
So, back to the basics here...
<lispmacs[work]>
say, you've got some incoming ASCII data, which you want to store in a store
<lispmacs[work]>
store in a string, I meant
<lispmacs[work]>
but you don't know necessarily whether the string implementation uses ascii code points
random-nick has joined #commonlisp
zetef has quit [Remote host closed the connection]
JamesF has quit [Ping timeout: 268 seconds]
<lispmacs[work]>
so you need to convert the incoming ASCII data into lisp CHARACTERs, right?
<aeth>
yes
<lispmacs[work]>
or you could store the data in an integer vector, but then later you've got to covert
<lispmacs[work]>
convert to CHARACTERs if you want to print it out
<aeth>
the messy way is to use code-char (ASCII only... and this is assuming the implementation is ASCII or Unicode) and the proper way is to use something like babel:octets-to-string
amb007 has quit [Read error: Connection reset by peer]
<aeth>
because the "octets" are likely UTF-8 (near universal outside of legacy platforms like Java, JavaScript, and Windows)
amb007 has joined #commonlisp
<aeth>
while the implementation string may or may not be UTF-32
<lispmacs[work]>
I know the data coming in from the com port is ASCII, or at least is supposed to be interpreted as such
zxcvz has quit [Quit: zxcvz]
<lispmacs[work]>
but if I try to store it in a string, the data then might be corrupted if it was interpeted differently
<lispmacs[work]>
so, maybe I should store the data in an integer vector and use octets to string when needed to print
<aeth>
the disadvantage of doing it the babel way is you'd have to use octets instead of (unsigned-byte 7)s for the array (at least using that function) and the advantage is that you can just change the encoding
<aeth>
(babel's also probably going to be a bit slower because it does it properly and more generally)
<lispmacs[work]>
okay. something in the back of my mind is how this is going to play out when I am outputting to a CLIM pane. But I am imagine that is covered in some CLIM spec chapter
Guest63 has quit [Quit: Client closed]
yitzi has quit [Ping timeout: 252 seconds]
yitzi_ has joined #commonlisp
yitzi_ has quit [Remote host closed the connection]
yitzi has joined #commonlisp
<lispmacs[work]>
so, say I've stored the ASCII code points in an integer array
<lispmacs[work]>
and I want to print them out using the #'code-char approach (for now)
<lispmacs[work]>
but I only want to print part of the array
<lispmacs[work]>
can I get a slice of the array, or what is the best approach there?
<aeth>
babel takes start/end
<aeth>
map does not (so you'd have to do something like subseq, which will allocate a new string)
<aeth>
s/new string/new array/
<lispmacs[work]>
sounds like babel is the way to go
<lispmacs[work]>
it looks like *muffled-warnings* is what I want, just need to figure what the exact type of the redefinition warning is
attila_lendvai_ has joined #commonlisp
pve has quit [Quit: leaving]
<lispmacs[work]>
er, muffle-conditions
<lispmacs[work]>
I think
<bike>
sb-kernel:redefinition-warning i think
danza has quit [Ping timeout: 255 seconds]
<ecraven>
hm.. if I have a (PROCLAIM '(SPECIAL DESTINATION-CONTEXT)), then (SETQ DESTINATION-CONTEXT 'FOO), will a (PROG (DESTINATION-CONTEXT) ..) then bind DESTINATION-CONTEXT to NIL, or will I still see 'FOO?
_cymew_ has joined #commonlisp
<ecraven>
the sbcl repl shows that DESTINATION-CONTEXT is always NIL inside PROG, irrespective of whether I put it into the vars or not
<ecraven>
ah, my fault, not calling RETURN
<bike>
if a variable is globally special, local bindings (as by prog) will also be special
<ecraven>
yes, but it will be bound to nil locally, I won't see the global binding, right?
<ecraven>
(if I don't specify an init value in the PROG)
anticrisis has joined #commonlisp
<bike>
Yes.
akoana has quit [Quit: leaving]
ym has joined #commonlisp
szkl has quit [Quit: Connection closed for inactivity]
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
dnhester26 has quit [Remote host closed the connection]
brettgilio has quit [Ping timeout: 245 seconds]
chiheisen has quit [Ping timeout: 245 seconds]
shunter has quit [Ping timeout: 245 seconds]
jonlevin has quit [Read error: Connection reset by peer]
slondr has quit [Read error: Connection reset by peer]
whereiseveryone has quit [Read error: Connection reset by peer]
artyn has quit [Read error: Connection reset by peer]
jonlevin has joined #commonlisp
shunter has joined #commonlisp
brettgilio has joined #commonlisp
whereiseveryone has joined #commonlisp
slondr has joined #commonlisp
chiheisen has joined #commonlisp
artyn has joined #commonlisp
\f has quit [Read error: Connection reset by peer]
jmbr has quit [Write error: Connection reset by peer]
alethkit has quit [Write error: Connection reset by peer]
sm2n has quit [Read error: Connection reset by peer]
artyn has quit [Read error: Connection reset by peer]
nathanb has quit [Read error: Connection reset by peer]
rselim has quit [Write error: Connection reset by peer]
jasom has quit [Remote host closed the connection]
mhcat has quit [Write error: Connection reset by peer]
nytpu has quit [Remote host closed the connection]
mcoll has quit [Read error: Connection reset by peer]
ggb has quit [Write error: Connection reset by peer]
sherbert has quit [Read error: Connection reset by peer]
chiheisen has quit [Read error: Connection reset by peer]
payphone has quit [Read error: Connection reset by peer]
zyd has quit [Read error: Connection reset by peer]
Schnouki has quit [Read error: Connection reset by peer]
brettgilio has quit [Write error: Connection reset by peer]
skin has quit [Remote host closed the connection]
whereiseveryone has quit [Read error: Connection reset by peer]
slondr has quit [Write error: Connection reset by peer]
srhm has quit [Write error: Connection reset by peer]
paulapatience has quit [Remote host closed the connection]
theothornhill has quit [Write error: Connection reset by peer]
migalmoreno has quit [Read error: Connection reset by peer]
pvac has quit [Read error: Connection reset by peer]
theesm has quit [Read error: Connection reset by peer]
cpli has quit [Write error: Connection reset by peer]
shunter has quit [Remote host closed the connection]
jonlevin has quit [Read error: Connection reset by peer]
sirufer has quit [Read error: Connection reset by peer]
sirufer has joined #commonlisp
Schnouki has joined #commonlisp
pvac has joined #commonlisp
mhcat has joined #commonlisp
paulapatience has joined #commonlisp
ggb has joined #commonlisp
shunter has joined #commonlisp
slondr has joined #commonlisp
mcoll has joined #commonlisp
brettgilio has joined #commonlisp
skin has joined #commonlisp
theothornhill has joined #commonlisp
jasom has joined #commonlisp
nathanb has joined #commonlisp
nytpu has joined #commonlisp
sherbert has joined #commonlisp
payphone has joined #commonlisp
theesm has joined #commonlisp
whereiseveryone has joined #commonlisp
zyd has joined #commonlisp
jonlevin has joined #commonlisp
artyn has joined #commonlisp
cpli has joined #commonlisp
alethkit has joined #commonlisp
migalmoreno has joined #commonlisp
chiheisen has joined #commonlisp
jmbr has joined #commonlisp
sm2n has joined #commonlisp
rselim has joined #commonlisp
\f has joined #commonlisp
srhm has joined #commonlisp
sm2n has joined #commonlisp
rselim has joined #commonlisp
rselim has quit [Changing host]
sm2n has quit [Changing host]
alethkit has joined #commonlisp
alethkit has quit [Changing host]
cage has quit [Quit: rcirc on GNU Emacs 29.1]
azimut has quit [Ping timeout: 240 seconds]
azimut has joined #commonlisp
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
azimut has quit [Remote host closed the connection]