<no-defun-allowed>
Yeah, it's a really boring argument in favour for static-structural typing.
kiroul has quit [Ping timeout: 246 seconds]
<no-defun-allowed>
("doesn't understand" would call Object#doesNotUnderstand: rather.)
Inline has joined #lisp
random-nick has quit [Ping timeout: 265 seconds]
<oni-on-ion>
ahh, yeah. and yeah =)
<no-defun-allowed>
In my case, I am pretty sure my inference techniques are NP-hard - but I guess the "type" of my objects would be the union of their protocols, with all the real names stripped out for gensyms.
<lotuseater>
in things about legal expressions: i tell people that i can easily use eg '1/z for the name of a lexically scoped parameter and everybody gets confused and responds that's not understandable
<no-defun-allowed>
That's decidable (I think ML type inference is also NP) but if you also permit arbitrary code in the FSM I describe, it is definitely undecidable.
<no-defun-allowed>
lotuseater: Heh, yeah, I once showed some Scheme code to someone and they got confused about the ? in number?
<lotuseater>
hehe
<lotuseater>
or "the function's name is m/s". no way!
shifty has quit [Ping timeout: 264 seconds]
<no-defun-allowed>
And I recall the ! in set! also was hard to read.
<no-defun-allowed>
With a pair of || you can even write |Behold, a variable name!|
<lotuseater>
it's very expressive
andreyorst has quit [Remote host closed the connection]
zcheng3 has quit [Ping timeout: 240 seconds]
tempest_nox has joined #lisp
<lotuseater>
but how does it work with the pipes? with (get-macro-character #\|) I get NIL
<no-defun-allowed>
I'll have to check, but it's part of the symbol reading stuff and thus not a macro character.
nkatte` has quit [Quit: ERC (IRC client for Emacs 28.0.50)]
<no-defun-allowed>
The vertical bar | is a multiple escape character, and so rule #7 applies.
<lotuseater>
ah cool, didn't read that section yet
<lotuseater>
but I thought "first dispatch-macro-characters, then macro-characters"
nkatte has joined #lisp
<lotuseater>
and yes, | is good to escape the routine that brings all chars to uppercase
nkatte has quit [Client Quit]
nkatte has joined #lisp
grfn is now known as glittershark
glittershark is now known as grfn
thmprover has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
galex-713 has joined #lisp
skapate has joined #lisp
<thmprover>
Question: when I write something like (defstruct (foo (:type list)) name age weight), this is just creating a list "under the hood", right? In the sense that (make-foo "Joe" 38 145) produces the same result as '("Joe" 38 145).
skapata has quit [Ping timeout: 272 seconds]
<no-defun-allowed>
From memory (I don't usually use a different :type), yes, except that you can mutate the result of the former but not the latter without UB.
<lotuseater>
and it gives you structured initialization
<thmprover>
So would omitting the '(:type list) part, would that change the memory layout at all?
<White_Flame>
yes you'd get a structure object, which is generally a single block of memory
benjamin-l has quit [Ping timeout: 272 seconds]
<lotuseater>
good question, I thought about structs up to now in general represented in memory as vectors
<no-defun-allowed>
That would create its own object, which is trivial to detect as an instance of the structure-class FOO.
<oni-on-ion>
UB?
<no-defun-allowed>
That wouldn't be too far off, except that structures are tagged as such. (type-of (make-foo ...)) should return FOO every time.
<no-defun-allowed>
oni-on-ion: It is undefined behaviour as to what happens if you modify literal data.
<oni-on-ion>
ah right.
<thmprover>
So wait, let me get this straight, without the 'type, it's layout is like a vector? More analogous to C structs in memory? Whereas `(:type list)` would make it a linked list in memory (well, I just confirmed on my repl it's `equal` to a list with the same components)
<White_Flame>
yes, just like C structs
<White_Flame>
except they have some sort of type identifier at the front
<thmprover>
C structs with bonus parts :)
<lotuseater>
providing (:type list) also generates SETF methods
<White_Flame>
which is usually just a single pointer to the struct's type
<thmprover>
OK, this is all good to know.
<lotuseater>
just do MACROEXPAND on your example and explore yourself :)
karlosz has joined #lisp
<White_Flame>
or DISASSEMBLE the creation, and see the multiple cons allocations for each list cell, vs a single allocation for the stuct
<lotuseater>
thmprover: using CLOS for easy stuff could be a bit heavy, DEFSTRUCT is very lightweight and you can also have simple inheritance
<White_Flame>
I use (:type list) to automatically create accessors for the fields of preexisting lists
<White_Flame>
but yeah normal structs otherwise
shifty has joined #lisp
<thmprover>
I've been working on a pattern matching program to do symbolic math, and I'm about to add integrals to it, which is what prompts my asking.
<lotuseater>
oh cool
<thmprover>
I wasn't sure if there was any advantage to a defstruct + (:type list), or just a vanilla '(list 'integral ...)
<White_Flame>
identity, and performance
<White_Flame>
you don't know if (INTEGRAL ...) is an actual intentional integral, or a list that happens to have that value there
rumbler31 has joined #lisp
<White_Flame>
(oh, a defstruct without :type list I mean)
<thmprover>
White_Flame: good point!
<no-defun-allowed>
I would use standard-classes first, then structure-classes if the added indirection of standard-class is a problem.
<thmprover>
Although highly unlikely, I would want to avoid the accidental '(integral ...) mistaken as an intentional integral
<lotuseater>
thmprover: maybe chapters 8 and 15 of the PAIP book help you :) it gave me good insights
Fare has joined #lisp
<thmprover>
lotuseater: those are good chapters of PAIP, I'm actually mulling over chapter 15.
<thmprover>
I've been reading the first few chapters of BPS while studying the SCMUTILS library. SCMUTILS is what prompted this little adventure, trying to get something similar working in Common Lisp.
<lotuseater>
but if I also would be really good in C++ there where less job problems ... it does not fit in my head
<no-defun-allowed>
UNLESS will evaluate its body if the test value is false. Consider what (unless (member 4 '(0 1 2)) body ...) will do.
<lotuseater>
matzy_: sry slow internet atm
<matzy_>
i understand what that does, it recurses, so I go "three" layers deep so to speak until I enter 2, so I understand why 2 prints, but does it then go "back up the stack" so to speak and complete the code for the rest of the functions, past the point where the recursion was called?
<no-defun-allowed>
Also, note that FORMAT will always be called after. I'll guess either of those is what surprised you.
<no-defun-allowed>
Yes, it will continue evaluating after a function call.
<Josh_2>
matzy_: yes
EvW has quit [Ping timeout: 260 seconds]
<matzy_>
so it hits the first recursive function, goes in there, that hits a recursive function which is valid and completes, then that exits back to the middle function, which completes, and then that exits to the outer function which then completes?
<no-defun-allowed>
My guess is this function is supposed to keep prompting the user until they enter 0, 1 or 2, and then do something with the result.
<matzy_>
exactly
<matzy_>
i was just surprised it printed 3 and 4
<matzy_>
i thought it would print 2 and stop
<no-defun-allowed>
So you are asking it to always write the number with FORMAT outside a conditional form.
<matzy_>
yeah, i guess i thought when you hit a recursive function, you go in there and stop executing the rest
<no-defun-allowed>
It does continue as normal. I don't think Common Lisp has a notion of recursive or non-recursive functions.
<no-defun-allowed>
(But it is not a tail call anyway, you still have stuff to do after calling PLAYER-TURN2.)
<matzy_>
calling a function within itself isn't considered recursive?
Josh_2 has quit [Read error: Connection reset by peer]
<no-defun-allowed>
A Common Lisp implementation doesn't really care, it does the same thing if it is calling the same function or another one.
<matzy_>
ahhhh ok
<matzy_>
gotcha
<matzy_>
thank you!!
<no-defun-allowed>
Sure.
<White_Flame>
and that's not really CL specific. most programming language behave that way
<no-defun-allowed>
Indeed.
<White_Flame>
most recursive programming is usually "if still-recursing, then do some work & recurse, else print/return final value"
<White_Flame>
so the UNLESS would turn into an IF to only print the innermost result
<White_Flame>
doing the FORMAT in the success case, and recursing on the failure case
<no-defun-allowed>
My guess (again) is that you may have thought that form would be tail-recursive, which is the case if there's nothing more to do, and so immediately jumping into that function, without setting up returning to the current function, maintains the illusion that you have called them like normal.
<no-defun-allowed>
If you write the base case first, then a reader who is familiar with induction would be able to decide if your code will behave and not infinitely recurse.
<White_Flame>
if you just want to jump back, GOTO style, (tagbody try-again (format t "Please ...") ... (unless (member ..) (go try-again)) ...)
<White_Flame>
the tail-recursive IF is actually equivalent to that
<White_Flame>
just cleaner
<surabax>
cl-glfw3's fragment-shader-example instantly closes on launch without any errors on SBCL and Windows 10
<surabax>
Every other example works fine
<surabax>
It's supposed to show a box until the user closes it
<surabax>
How do I even debug this?
rumbler31 has quit [Remote host closed the connection]
<surabax>
It seems to be dying on the gl:uniformf call that updates the time variable in the render function
orivej has joined #lisp
karlosz has quit [Quit: karlosz]
kreyren has joined #lisp
kreyren is now known as kreyren2
kreyren2 is now known as kreyren
dyelar has quit [Ping timeout: 264 seconds]
<surabax>
I forced it to recompile the shaders, and now it works
<surabax>
Looks like the examples don't clean up the OpenGL state after themselves so they break if you try to run more than one without reloading everything
renzhi has joined #lisp
miasuji has quit [Ping timeout: 264 seconds]
dyelar has joined #lisp
rumbler31 has joined #lisp
surabax has quit [Quit: Leaving]
rumbler31 has quit [Ping timeout: 260 seconds]
jibanes has quit [Ping timeout: 260 seconds]
shifty has quit [Ping timeout: 260 seconds]
jibanes has joined #lisp
Inline has quit [Ping timeout: 272 seconds]
<matzy_>
no-defun-allowed: yeah you're guess sounds right, i basically thought as soon as the UNLESS condition was met and it called itself (the recursive function), it stopped executing and just exectured taht function instead rinse and repeat
<matzy_>
*your
<no-defun-allowed>
Right, UNLESS and WHEN will not affect the evaluation of anything outside of their bodies by themselves.
<matzy_>
so my thought was the only function call who should hit that second format statement would be a call that did not hit the unless and did not stop to execute another function
<matzy_>
but it makes sense - if i was calling some other random function, i sure as well wouldn't want my original/main function to stop executing after the call and return
<matzy_>
it's just weird to think about what value x has at various stages in that process, to me at least
<matzy_>
if i enter 4, 3, and 2 (lets always use this as an example - it rejects 4 and 3 and is only happy when i enter 2)
<matzy_>
it spits out 2, 3, and 4, in that order
nkatte has joined #lisp
Fare has quit [Ping timeout: 264 seconds]
urek has joined #lisp
urek__ has quit [Remote host closed the connection]
toorevitimirp has quit [Remote host closed the connection]
toorevitimirp has joined #lisp
nullheroes has joined #lisp
urek__ has quit [Quit: urek__]
thmprover has quit [Quit: [Exit, pursued by bear]]
Krystof has quit [Ping timeout: 260 seconds]
Fare has quit [Ping timeout: 264 seconds]
bilegeek has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
mbomba has joined #lisp
mbomba has quit [Client Quit]
aaaaaa has quit [Ping timeout: 265 seconds]
mangul has left #lisp [#lisp]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 246 seconds]
galex-713 has quit [Ping timeout: 260 seconds]
galex-713 has joined #lisp
jprajzne_ has quit [Quit: jprajzne_]
jprajzne has joined #lisp
ski has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
skapate has quit [Quit: Leaving]
saganman is now known as nekosagan
pankajsg has joined #lisp
narimiran has joined #lisp
greaser|q_ has joined #lisp
greaser|q_ has quit [Changing host]
amb007 has quit [Read error: Connection reset by peer]
greaser|q_ is now known as GreaseMonkey
amb007 has joined #lisp
_whitelogger has joined #lisp
andreyorst has joined #lisp
notzmv has quit [Ping timeout: 246 seconds]
lotuseater has quit [Ping timeout: 260 seconds]
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
<flip214>
fiddlerwoaroof: right.
gproto23 has joined #lisp
johnjay has joined #lisp
paul0 has joined #lisp
retropikzel has joined #lisp
_paul0 has quit [Ping timeout: 256 seconds]
kir0ul_ has quit [Ping timeout: 272 seconds]
andreyorst_ has joined #lisp
_whitelogger has joined #lisp
gproto23 has quit [Ping timeout: 256 seconds]
<phoe>
heyyyy
<oni-on-ion>
hello
<no-defun-allowed>
Hello phoe.
srji has quit [Quit: leaving]
srji has joined #lisp
jello_pudding has quit [Ping timeout: 260 seconds]
notzmv has joined #lisp
jello_pudding has joined #lisp
_whitelogger has joined #lisp
ormantle has joined #lisp
tempest_nox has quit [Remote host closed the connection]
frodef has quit [Ping timeout: 240 seconds]
retropikzel has quit [Quit: retropikzel]
amb007 has quit [Read error: Connection reset by peer]
retropikzel has joined #lisp
amb007 has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
retropikzel has quit [Client Quit]
retropikzel has joined #lisp
<loke[m]>
Recently my SLIME is only giving me 20 frames in the debugger. Is there a setting somewhere that limits this? It's consistently 20 frames, so it seems as it's just stopping.
<no-defun-allowed>
Can you not click on --more-- to get more frames?
<loke[m]>
No, there is no "more" button.
<no-defun-allowed>
Oh dear.
<loke[m]>
There used to be.
<loke[m]>
I'm going to update slime.
<loke[m]>
Hmm, after updating SLIME, the more button reappeared.
abel-abel has quit [Remote host closed the connection]
surabax has joined #lisp
retropikzel has quit [Client Quit]
retropikzel has joined #lisp
aartaka has joined #lisp
srji has quit [Quit: leaving]
srji has joined #lisp
aartaka_d has quit [Ping timeout: 256 seconds]
mikaelj has quit [Ping timeout: 256 seconds]
srji has quit [Client Quit]
srji has joined #lisp
abel-abel has joined #lisp
vegansbane has joined #lisp
abel-abel has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
ormantle has joined #lisp
abel-abel has joined #lisp
ormantle has quit [Client Quit]
ormantle has joined #lisp
galex-713 has quit [Ping timeout: 272 seconds]
ormantle has quit [Client Quit]
ghard` has joined #lisp
pankajsg has joined #lisp
kreyren has quit [Ping timeout: 240 seconds]
ghard has quit [Ping timeout: 260 seconds]
ghard` has quit [Client Quit]
ghard has joined #lisp
mikaelj has joined #lisp
EvW has joined #lisp
mikaelj has quit [Remote host closed the connection]
abel-abel has quit [Remote host closed the connection]
abel-abel has joined #lisp
urek has quit [Ping timeout: 272 seconds]
drl has quit [Quit: Leaving]
KREYREEN has joined #lisp
gko_ has quit [Ping timeout: 264 seconds]
retropikzel_ has joined #lisp
ormantle has joined #lisp
retropikzel has quit [Ping timeout: 240 seconds]
retropikzel_ is now known as retropikzel
abel-abel has quit [Remote host closed the connection]
abel-abel has joined #lisp
lotuseater has joined #lisp
abel-abe_ has joined #lisp
abel-abel has quit [Ping timeout: 260 seconds]
edgar-rft has joined #lisp
shifty has quit [Ping timeout: 272 seconds]
retropikzel has quit [Quit: retropikzel]
retropikzel has joined #lisp
rumbler31 has joined #lisp
urek has joined #lisp
retropikzel has quit [Client Quit]
retropikzel has joined #lisp
rumbler31 has quit [Ping timeout: 240 seconds]
wayneeseguin has joined #lisp
cosimone has joined #lisp
wayneeseguin has quit [Ping timeout: 256 seconds]
wayneeseguin has joined #lisp
andreyorst_ has quit [Ping timeout: 256 seconds]
ghard has quit [Ping timeout: 240 seconds]
retropikzel_ has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
retropikzel has quit [Ping timeout: 264 seconds]
retropikzel_ is now known as retropikzel
ormantle has quit [Quit: Flying away]
drl has joined #lisp
verdammelt has joined #lisp
treflip has quit [Quit: WeeChat 2.6]
<wayneeseguin>
Can anyone point me to an example of how to actually run the tests using a `cl-project` generated project? TIA :)
rudi has joined #lisp
<wayneeseguin>
My main confusion point is I see a :perform (test-op ... inside the asdf:defsystem for testing, however, it's not clear to me what the intended invocation metiond is.
<ane>
does anyone know of an interesting blog/article/whatever detailing good examples of using the metaobject protocol?
<aeth>
_death: yeah, but unfortunately, ASDF:TEST-SYSTEM doesn't preserve the return value of test suites (I guess for the sake of portability, since they all mean something different)
<aeth>
_death: so it's not very useful for CI since you might want to fail if the return value = bad
<ane>
I think I just saw something, not sure where, maybe it was that insurance thing? something postgresql something?
<phoe>
ane: I'd ask no-defun-allowed
<phoe>
cl-decentralize2 uses those a real lot
<Xach>
hhdave: beware
<phoe>
ane: sealable-metaobjects is one other good use
KREYREEN has quit [Remote host closed the connection]
aorst has joined #lisp
verdammelt has quit [Quit: ERC (IRC client for Emacs 27.1)]
<ane>
thanks
wayneeseguin has quit [Ping timeout: 256 seconds]
<lotuseater>
ane: there are two books, object oriented programming in CL and art of the meta object protocol. the first one is like a big tutorial on how using CLOS
andreyorst has quit [Ping timeout: 256 seconds]
em1n has joined #lisp
retropikzel has quit [Quit: retropikzel]
verdammelt has joined #lisp
KREYREEN has joined #lisp
retropikzel has joined #lisp
<_death>
aeth: ok, I wasn't talking about CI
verdammelt has left #lisp [#lisp]
skapata has joined #lisp
<ane>
lotuseater: thanks!
<phoe>
AMOP is amazing because it shows how to use MOP to implement CLOS
<phoe>
which is a very good use case :D
<lotuseater>
yes it is, but I not far right now understanding
retropikzel has quit [Client Quit]
retropikzel has joined #lisp
<_death>
ane: you can also check out stuff by Pascal Costanza like contextl or filtered-functions
<lotuseater>
phoe: and the cover is awesome
abel-abe_ has quit [Ping timeout: 256 seconds]
<lotuseater>
the book by Keene is from 1989 and still so good
<_death>
lotuseater: there was another CLOS book with a cover by the same author btw
<lotuseater>
it's great my mind didn't get confused with other OO stuff before
verdammelt has joined #lisp
abel-abel has joined #lisp
verdammelt has left #lisp ["ERC (IRC client for Emacs 27.1)"]
aartaka has quit [Ping timeout: 240 seconds]
rumbler31 has joined #lisp
<_death>
I'm reminded of Yegge's Execution in the Kingdom of Nouns ;)
kir0ul_ has joined #lisp
<bqv>
1 > Error: The value #<A Dead Mac Pointer> is not of the expected type MACPTR. 2 > While executing: CLOSE-SHARED-LIBRARY, in process Initial(0). 3 > Type :GO to continue, :POP to abort, :R for a list of available restarts. 4 >
<bqv>
If continued: Skip (possibly crucial) startup function GLIB::RUN-INITIALIZERS.
<bqv>
Anyone know what I should do here?
<bqv>
I can run this, if I do it in the repl, but if I try and ccl:save-application, I get dead pointers
<bqv>
Yet I've literally only loaded a system
<phoe>
do you close and reopen libraries upon saving the core?
<phoe>
foreign libraries must be closed before the image is saved and must be reopened after the image is thawed
<bqv>
Can libi
<phoe>
otherwise you get dangling pointers.
<bqv>
*libraries be opened due to asdf:load-system?
<phoe>
yes
<bqv>
Ack.
<bqv>
Hmm, ok I have an idea, brb
wayneeseguin has joined #lisp
EvW has quit [Ping timeout: 240 seconds]
KREYREEN has quit [Remote host closed the connection]
<bqv>
Ok, thought I could somehow have the load-system as part of the toplevel function, but no. So, say I have a system I wanted to create an image with, how could I do that, if it loads libraries?
<bqv>
I can't edit it to close and reopen
<bqv>
Or can I, somehow?
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
<phoe>
bqv: well
<phoe>
usually you can close the libraries as a part of exit hooks and reopen them as a part of reopen hooks
<phoe>
look up Shinmera's Deploy for something that attempts to do this automatically
<bqv>
Hm
Bike has joined #lisp
KREYREEN has joined #lisp
cosimone has quit [Remote host closed the connection]
<lotuseater>
did you know there's CLOS for C?
nkatte has quit [Ping timeout: 272 seconds]
<phoe>
I saw it a few times
* edgar-rft
wears his CLoak Of Shadows
<lotuseater>
:D
aorst has quit [Ping timeout: 240 seconds]
cosimone has joined #lisp
aorst has joined #lisp
wayneeseguin has quit [Ping timeout: 272 seconds]
nkatte has joined #lisp
wayneeseguin has joined #lisp
<eta>
how do you provide a prefix argument for FORMAT from a variable?
<eta>
basically I want to print a number N with mincols set to X
<beach>
I used to know that.
<Bike>
use v instead of a number
<beach>
Thanks. Saved me some time.
<eta>
just the literal string "v"?
fitzsim has quit [Read error: Connection reset by peer]
<lotuseater>
i cannot imagine what is meant :/
fitzsim has joined #lisp
<eta>
yep, seems to work; thanks :)
Qudit314159 has quit [Read error: Connection reset by peer]
<beach>
lotuseater: Normally, you would give parameters to a FORMAT directive as literals in the string itself, but occasionally, you want an argument to FORMAT to provide the parameter.
<lotuseater>
hm can you give an example?
<_death>
(format t "[~VA]~%" 5 123)
<lotuseater>
ahhh
zcheng3 has joined #lisp
<lotuseater>
that prints 5 cols and 2 after 123
<_death>
some options support V, others do not.. kind of arbitrary
<eta>
hmm, what's the LOOP directive for iterating over every element in an arbitrary-dimensional array
<eta>
ACROSS doesn't seem to want to work
<_death>
there is none.. you can use array-row-major-index and array-total-size or a displaced array
KREYREEN has quit [Remote host closed the connection]
<lotuseater>
yes i do not know one direct either
KREYREEN has joined #lisp
<lotuseater>
and in SERIES/ITERATE? they're extensible, right?
<_death>
erm, I meant row-major-aref
cosimone has quit [Ping timeout: 260 seconds]
<_death>
lotuseater: yes, you could extend them to do that
<lotuseater>
phew
<lotuseater>
can anyone tell me how to use FORMATs "~?"? i think it's for function calling
<_death>
(format t "~?" "~A" (list 123))
<lotuseater>
ah i call a control string as a function itself
<_death>
that way you can pass a control string and its respective arguments.. you can also nest it
<lotuseater>
uii
__jrjsmrtn__ has joined #lisp
_jrjsmrtn has quit [Ping timeout: 240 seconds]
<_death>
(format t "[~?]" "{~?}" (list "(~A)" (list "so deep")))
<lotuseater>
format magic
<_death>
also yes, FORMAT can take a function as a control string.. (format t (lambda (stream &rest args) (prin1 args stream)) 1 2 3)
galex-713 has joined #lisp
wayneeseguin has quit [Ping timeout: 256 seconds]
<lotuseater>
i always tell people it's printf on illegal drugs
<lotuseater>
or you do (format t (lambda (stream &rest args) (format NIL ...)))
<_death>
well, C compilers tend not to do anything smart with printf, even if the control string is known.. maybe give warnings, but at runtime printf interprets it
aartaka has joined #lisp
<_death>
FORMAT has a compiler macro so can avoid runtime interpretation in such a case
aartaka has quit [Read error: Connection reset by peer]
aartaka_d has joined #lisp
<_death>
you can also pass a string instead of a stream
amb007 has quit [Read error: Connection reset by peer]
<_death>
(let ((s (make-array 0 :fill-pointer t :element-type 'character))) (format s "Hello ") (format s "world") s)
amb007 has joined #lisp
<lotuseater>
oh that automatically does VECTOR-PUSH-EXTEND
<_death>
it can be useful if you format things repeatedly, keeping the string around and just resetting the fill pointer
<_death>
(let ((s (make-array 0 :fill-pointer t :element-type 'character))) (format s "Hello ") (setf (fill-pointer s) 4) (format s "world") s)
aaaaaa has joined #lisp
<lotuseater>
let me also try that in SLIME
bitmapper has quit [Quit: Connection closed for inactivity]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
aartaka has joined #lisp
<lotuseater>
yes worked as expected :)
<lotuseater>
if i reset the fill-pointer the array is just shown up to that, even if it were wider extended. and LENGTH also just give the "new" value
aartaka_d has quit [Ping timeout: 256 seconds]
<lotuseater>
or maybe implementation dependent
<_death>
right.. and there's no need to repeatedly allocate new strings
em1n has left #lisp ["ERC (IRC client for Emacs 27.1)"]
<lotuseater>
yeees that is great
<lotuseater>
i recently good croatoan running and that got me think on such stuff
gproto023 has joined #lisp
shka_ has joined #lisp
EvW has joined #lisp
gak has joined #lisp
<_death>
in the particular example I gave, the array should have also been made adjustable so that its identity is guaranteed to be preserved.. but FORMAT only needs it to have a fill pointer, so you could use a big enough nonadjustable string if needed
gproto23 has quit [Ping timeout: 256 seconds]
gproto023 is now known as gproto23
andreyorst has joined #lisp
retropikzel has quit [Remote host closed the connection]
PuercoPop has joined #lisp
andreyorst has quit [Quit: andreyorst]
andreyorst has joined #lisp
Fare has joined #lisp
wayneeseguin has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
benjamin-l has joined #lisp
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
gothnbass has joined #lisp
amb007 has joined #lisp
emys has joined #lisp
KREYREEN has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
drl has quit [Quit: Leaving]
kaftejiman has joined #lisp
Krystof has joined #lisp
KREYREEN has joined #lisp
gareppa has joined #lisp
andreyorst has quit [Quit: andreyorst]
andreyorst has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
kaftejiman_ has joined #lisp
wayneeseguin has quit [Ping timeout: 256 seconds]
kaftejiman has quit [Ping timeout: 240 seconds]
urek__ has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
urek has quit [Ping timeout: 272 seconds]
wayneeseguin has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
abel-abel has quit []
amb007 has quit [Read error: Connection reset by peer]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
amb007 has joined #lisp
gareppa has quit [Quit: Leaving]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
wayneeseguin has quit [Ping timeout: 256 seconds]
liberliver has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
emys has quit [Read error: Connection timed out]
emys has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
<surabax>
Is claw-sdl supposed to be built with the cxx branch of claw? The master branch seems to be missing some symbols
<_death>
mfiano: cool, now hopefully sdl2_gfx maintainer should merge one more PR
amb007 has quit [Read error: Connection reset by peer]
<mfiano>
The thread management of cl-sdl2 is kinda blah. I always had all sorts of errors in that regard, so I just use the raw init/quit/event-loop stuff
amb007 has joined #lisp
<_death>
I see.. I have simple needs and it seems to work most of the time ;)
<mfiano>
This has worked for me because I hacked Sly/SLIME to run the REPL inside the event loop, so there is no difference from main thread
<mfiano>
Also means I don't have to do (sdl2:in-main-thread ...) for quick repl tests
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #lisp
amb007 has quit [Read error: Connection reset by peer]
<mfiano>
the "running repl inside game loop" is actually a recognized feature of Sly with official support now :)
<_death>
nice.. I've not tried sly in years.. mainly because I prefer a very stable working environment
Josh_2 has joined #lisp
amb007 has joined #lisp
<Josh_2>
Evening
<mfiano>
Odd, I have been using it for years without any stability issues
<_death>
including look and feel things? when these change it makes me crazy
emys has quit [Ping timeout: 256 seconds]
<flip214>
which UI toolkit (with a CL library) would you recommend if I need MacOS, Windows, Linux with "local" look and feel?
<Josh_2>
I'm trying to write a macro to validate the contents of a λ list, when the function is called. My attempts have not worked as I end up with a list like
<Josh_2>
oops
<Josh_2>
oo maybe I have figured out a solution
<Josh_2>
not like I explained my problem very well
Fare has quit [Ping timeout: 260 seconds]
verdammelt has joined #lisp
emys has joined #lisp
retropikzel has joined #lisp
Fare has joined #lisp
emys has quit [Ping timeout: 272 seconds]
Fare has quit [Ping timeout: 260 seconds]
<johnjay>
flip214: tha
<johnjay>
t is a contradiction in terms
<johnjay>
cross-platform toolkits will not have the native look and feel generally speaking
krid has quit [Ping timeout: 240 seconds]
wayneeseguin has joined #lisp
<Josh_2>
Okay plan failed. I am defining one function X which has a λ list, I would then like to make a new function Y with the exact same λ list; then from X I would like to call Y with It's λ list
<Josh_2>
I don't know if that makes sense
<phoe>
why is &rest args not an option?
<Josh_2>
oof
<Josh_2>
wait
<phoe>
(defun x (&rest args) (apply #'y args))
<phoe>
(defun y #.your-lambda-list ...)
<Josh_2>
maaaan
<Josh_2>
nope that won't work, X needs to act like a normal function
<phoe>
X is a normal function though
<phoe>
what's wrong with it?
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
emys has joined #lisp
aartaka has quit [Read error: Connection reset by peer]
aartaka_d has joined #lisp
emys has quit [Ping timeout: 256 seconds]
nkatte has quit [Ping timeout: 272 seconds]
wayneeseguin has quit [Ping timeout: 260 seconds]
imode has joined #lisp
aindilis has joined #lisp
notzmv has quit [Read error: No route to host]
notzmv has joined #lisp
vzcx has joined #lisp
nkatte has joined #lisp
Bike has quit [Remote host closed the connection]
<fiddlerwoaroof>
flip214: CAPI
<Josh_2>
okay I finally figured something out phoe, using &rest just like you said
<Josh_2>
Thanks!
zulu-inuoe has joined #lisp
<phoe>
<3
urek has joined #lisp
urek__ has quit [Ping timeout: 272 seconds]
<Josh_2>
it doesn't work with keywords in λ-lists but it works for normal variable names
phantomics has quit [Ping timeout: 240 seconds]
andreyorst has quit [Ping timeout: 240 seconds]
tmf has quit [Quit: leaving]
izh_ has joined #lisp
retropikzel_ has joined #lisp
retropikzel has quit [Ping timeout: 260 seconds]
retropikzel_ is now known as retropikzel
Oladon1 has quit [Read error: Connection reset by peer]
Oladon has joined #lisp
shka_ has quit [Ping timeout: 256 seconds]
dim has quit [Ping timeout: 264 seconds]
dim has joined #lisp
choegusung has joined #lisp
cosimone has joined #lisp
srji has quit [Quit: leaving]
srji has joined #lisp
retropikzel has quit [Quit: retropikzel]
vaporatorius has joined #lisp
rudi has quit [Quit: rudi]
Bike has joined #lisp
vaporatorius__ has quit [Ping timeout: 260 seconds]
urek has quit [Ping timeout: 272 seconds]
mbomba has joined #lisp
bitmapper has joined #lisp
EvW has quit [Ping timeout: 244 seconds]
choegusung has quit [Quit: leaving]
alexshendi has joined #lisp
aorst has quit [Quit: WeeChat 3.0]
shifty has joined #lisp
nkatte_ has joined #lisp
izh_ has quit [Quit: Leaving]
verdammelt has left #lisp ["ERC (IRC client for Emacs 27.1)"]
EvW has joined #lisp
hnOsmium0001 has joined #lisp
vzcx` has joined #lisp
narimiran has quit [Ping timeout: 240 seconds]
gproto23 has quit [Ping timeout: 256 seconds]
vzcx has quit [Ping timeout: 260 seconds]
urek has joined #lisp
zcheng3 has quit [Ping timeout: 260 seconds]
Bike has quit [Remote host closed the connection]
krid has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
phantomics has joined #lisp
FareTower has joined #lisp
torbo has joined #lisp
FareTower has quit [Ping timeout: 260 seconds]
<White_Flame>
does anybody use Lisa? the old rete lib in quicklisp. the logical lhs form seems to not work for me, even from a clean load
FareTower has joined #lisp
<oni-on-ion>
heh "Guided Tour" for McCLIM links to a scientific paper. neat...