<moon-child>
for which of its functions (if any) do I have to multiply the length parameter by the size of an individual object?
<moon-child>
Like, where in c I would say 5 * sizeof(float), when do I have to include the sizeof(float)?
<no-defun-allowed>
I would hope the answer is none.
<no-defun-allowed>
There isn't a sizeof in Lisp, so it wouldn't make much sense.
<oni-on-ion>
about to say, no need. but you would probably like to know how to get those data types for use with cl-opengl
<moon-child>
no-defun-allowed: right, but 'float' has a defined size (likely 4) on the host, since opengl is a c library
<moon-child>
oni-on-ion: it has some helper functions. I found an example usage, but it's relatively simple. Notably it had 0 for the specific parameters I was concerned about, so size wouldn't matter
dilated_dinosaur has quit [Ping timeout: 260 seconds]
davepdotorg has joined #lisp
dilated_dinosaur has joined #lisp
davepdotorg has quit [Ping timeout: 272 seconds]
smazga has joined #lisp
wsinatra has joined #lisp
slyrus_ has joined #lisp
smazga has quit [Ping timeout: 250 seconds]
slyrus__ has quit [Ping timeout: 256 seconds]
wsinatra has quit [Client Quit]
wsinatra has joined #lisp
wsinatra has quit [Client Quit]
wsinatra has joined #lisp
wsinatra has quit [Client Quit]
wsinatra has joined #lisp
wsinatra has quit [Client Quit]
<aeth>
moon-child: I don't think you have to, because CFFI is type aware so it's probably doing those conversions. I'm not 100% sure, though
wsinatra has joined #lisp
<aeth>
there are some simple test cases that could be written, treating the same foreign array pointer as two different things, to test.
Viko96 has joined #lisp
wsinatra has quit [Client Quit]
wsinatra has joined #lisp
FreeBirdLjj has joined #lisp
wsinatra has quit [Client Quit]
ebzzry has joined #lisp
wsinatra has joined #lisp
bitmapper has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Ping timeout: 256 seconds]
<|3b|>
when using the "low-level" api in CL-OpenGL (the %GL package), you would have to pass sizes as octets where you would in C (so multiply by sizeof or whatever, cffi:foreign-type-size can tell you that, though the sizes are pretty much fixed so you can just use 4 for single-float)
space_otter has joined #lisp
<|3b|>
the "high-level" APIs (GL: package) should calculate sizes as needed, though the APIs it has for buffer objects aren't a very good fit to modern GL, so i usually just use %GL: for that
davisr_ has joined #lisp
davisr has quit [Ping timeout: 256 seconds]
Viko96 has quit [Ping timeout: 246 seconds]
<aeth>
ah, sorry, that's right, I have a bunch of constants for the sizes that I pass in because I mostly use %GL now... it's been a while
<aeth>
It's pretty clearly part of the function API when it's required, though
libertyprime has joined #lisp
wsinatra has quit [Quit: WeeChat 2.7.1]
pilne has joined #lisp
wsinatra has joined #lisp
wsinatra has quit [Client Quit]
notzmv has quit [Read error: Connection reset by peer]
gko_ has joined #lisp
wsinatra has joined #lisp
gko_ has quit [Ping timeout: 246 seconds]
efm has quit [Read error: Connection reset by peer]
<aeth>
By the way, the reason to use %GL over GL is that GL copies, while with %GL you can use a library like static-vectors to avoid copying. This can save minutes.
wsinatra has quit [Quit: WeeChat 2.7.1]
efm has joined #lisp
iAmDecim has joined #lisp
<moon-child>
aeth, |3b|: ahh, that is helpful
<moon-child>
thank you!
iAmDecim has quit [Ping timeout: 250 seconds]
igemnace has joined #lisp
loli has quit [Ping timeout: 272 seconds]
akoana has joined #lisp
william1_ has joined #lisp
EvW1 has quit [Ping timeout: 246 seconds]
loli has joined #lisp
|Pirx| has quit [Ping timeout: 250 seconds]
william1_ has quit [Ping timeout: 240 seconds]
iAmDecim has joined #lisp
iAmDecim has quit [Ping timeout: 250 seconds]
iAmDecim has joined #lisp
davepdotorg has joined #lisp
karlosz has joined #lisp
PuercoPope has joined #lisp
davepdotorg has quit [Ping timeout: 246 seconds]
orivej has quit [Ping timeout: 264 seconds]
smazga has joined #lisp
notzmv has joined #lisp
semz has quit [Ping timeout: 246 seconds]
gioyik has joined #lisp
semz has joined #lisp
semz has joined #lisp
semz has quit [Changing host]
ebzzry has quit [Remote host closed the connection]
oni-on-ion has quit [Remote host closed the connection]
karlosz has quit [Quit: karlosz]
oni-on-ion has joined #lisp
davepdotorg has joined #lisp
smazga has quit [Ping timeout: 250 seconds]
davepdotorg has quit [Ping timeout: 272 seconds]
ebzzry has joined #lisp
torbo has quit [Remote host closed the connection]
madage has quit [Remote host closed the connection]
<no-defun-allowed>
Is there a way that I can print the backtrace of another thread?
karlosz has joined #lisp
<oni-on-ion>
got to raise a signal
ebzzry has quit [Remote host closed the connection]
<oni-on-ion>
in the other thread
<no-defun-allowed>
bt:interrupt-thread appears to work how I want in SBCL.
madage has joined #lisp
danielboston26 has quit [Ping timeout: 264 seconds]
karlosz has quit [Quit: karlosz]
william1_ has joined #lisp
PuercoPope has quit [Remote host closed the connection]
william1_ has quit [Ping timeout: 250 seconds]
<moon-child>
oh, yeah, huh, you totally have to pass actual sizes with the gl: api
<moon-child>
(not just lengths)
<moon-child>
aeth: if you work directly with a gl-array (using the gl: api), does it still copy?
<aeth>
It's been a while, but I think gl-array is the mechanism it uses to copy? But I mean, maybe there's a way to initialize a new one
<aeth>
static-vectors is way easier, though
<aeth>
static-vectors gives you a CL-native array that also doubles as a C array, at the expense of being static (i.e. not movable by the GC) and probably (though not certainly) something you have to manually free
<aeth>
but freeing something in a game engine is just a matter of unwind-protect (and there probably is already a with-foo macro that does this)
<moon-child>
Oh, hmmm. In static memory--that means there's a limited amount you can have allocated at a given time?
<aeth>
I think it's heap memory that's static in the sense of not being movable by the GC, although I could be wrong.
<aeth>
I've used it for huge things and haven't noticed failure
<aeth>
This is graphcs, things can get huge.
<aeth>
*graphics
<moon-child>
ok, cool
<moon-child>
I've still not decided if I'm going to do 3d yet--probably will, but we'll see
<moon-child>
if not, then I might end up not needing the static-vectors, but it's good to know about
<aeth>
well, it took a ~3 minute startup time to an unnoticable one in a (2D, but generated into flat 3D geometry) map test
<aeth>
large map.
<aeth>
It's not so much 2D vs. 3D as the size of the data.
<moon-child>
well sure, but a single 3d model is already pretty big
<moon-child>
And--wow, that is a big difference
<aeth>
well, if your 2D is just one big quad or something, then, yes... this was terrain that could have in theory added height at some point
<aeth>
terrain can get very large (Minecraft is sort of the worst case, since it's voxel... and those world files are GB)
gko_ has joined #lisp
iAmDecim has quit [Ping timeout: 256 seconds]
iAmDecim has joined #lisp
_whitelogger has joined #lisp
karlosz has joined #lisp
<Josh_2>
how do I get the return value from calling (bt:make-thread ..) ?
<Josh_2>
the value that is returned by running the thread in the background
gioyik has quit [Ping timeout: 256 seconds]
whiteline has quit [Remote host closed the connection]
<flip214>
Josh_2: about thread return values, look at lparallel
william1_ has joined #lisp
william1_ has quit [Ping timeout: 240 seconds]
smazga has quit [Ping timeout: 250 seconds]
ljavorsk has joined #lisp
<phoe>
moon-child: ensures that a block of code is executed unconditionally when control leaves the protected form
<phoe>
so basically when the function returns, when an error handler or a GO or a THROW performs a non-local transfer of control, the cleanup forms are executed
ebzzry has joined #lisp
william1_ has joined #lisp
sarna has quit [Ping timeout: 246 seconds]
pmden has joined #lisp
gioyik has quit [Quit: WeeChat 2.7.1]
space_otter has quit [Remote host closed the connection]
sarna has joined #lisp
shka_ has joined #lisp
libertyprime has quit [Ping timeout: 264 seconds]
shinohai has quit [Ping timeout: 256 seconds]
davepdotorg has joined #lisp
iAmDecim has joined #lisp
nowhere_man has quit [Remote host closed the connection]
iAmDecim has quit [Ping timeout: 264 seconds]
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 240 seconds]
Lord_of_Life_ is now known as Lord_of_Life
knicklux has joined #lisp
Josh_2 has quit [Ping timeout: 264 seconds]
zdm has joined #lisp
dddddd has quit [Ping timeout: 250 seconds]
yangby has joined #lisp
jprajzne has quit [Quit: jprajzne]
davepdotorg has quit [Ping timeout: 246 seconds]
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
karlosz has quit [Remote host closed the connection]
ym has joined #lisp
|Pirx| has joined #lisp
smazga has joined #lisp
ebzzry has quit [Read error: Connection reset by peer]
cartwright has quit [Remote host closed the connection]
cartwright has joined #lisp
zdm has quit [Quit: WeeChat 2.7.1]
orivej has joined #lisp
ldb has joined #lisp
ebzzry has joined #lisp
<ldb>
how should one develop their own style of writing lisp?
<Josh_2>
By writing lisp?
smazga has quit [Ping timeout: 250 seconds]
<no-defun-allowed>
Mostly that, and looking at other peoples' styles and deciding what you like.
<phoe>
write code, submit it for review, think about the results, rinse, repeat
<ldb>
yes, but i'm curious if you can think of a particular project/book that have influenced your coding style?
<phoe>
google and LUV style guides
KDr2 has joined #lisp
<Shinmera>
All of the ones I've written have influenced my coding style
<Josh_2>
well when I read Sonya Keene's OOP in CL, I decided to write some OOP and then realized that it becomes quite messy quite quickly xD
<phoe>
also many of the ones I've read have influenced my coding style
<phoe>
but then nothing in particular; alexandria, split-sequence, Shinmera's libs, beach's code, implementation source code
KDr24 has quit [Ping timeout: 256 seconds]
<phoe>
their LOOP and FORMAT sources; just a big bunch of everything
Ven`` has joined #lisp
zaquest has quit [Quit: Leaving]
cosimone_ has joined #lisp
cosimone has quit [Ping timeout: 246 seconds]
bitmapper has joined #lisp
prince1 has quit [Ping timeout: 256 seconds]
<TMA>
some articles on program design [a concrete example popped into mind: for many macros there usually is some function that can do the exact thing as the macro, except the interface is cumbersome -- the &body needs to be wrapped in a (lambda () ...) for example; even if that function does not exist, it probably should]
<no-defun-allowed>
Many macros of CLIM are like that, where WITH-FOO expands to CALL-WITH-FOO.
<TMA>
[... and the macro can be straightforwardly expressed by constructing the cumbersome scaffolding and calling the function]
ebzzry has quit [Remote host closed the connection]
<TMA>
that's the pattern
<ldb>
because it's the syntax that matters
<phoe>
see the MOP as well
<phoe>
ensure-class, ensure-generic-function
<phoe>
defclass and defgeneric expand into these
ebzzry has joined #lisp
davepdotorg has quit [Remote host closed the connection]
davepdotorg has joined #lisp
iAmDecim has joined #lisp
<beach>
ldb: You should not develop your own style. You should use established conventions.
cosimone_ has quit [Remote host closed the connection]
cosimone_ has joined #lisp
ljavorsk has quit [Remote host closed the connection]
ljavorsk has joined #lisp
iAmDecim has quit [Ping timeout: 250 seconds]
sarna has quit [Quit: bye]
sarna has joined #lisp
jebes has joined #lisp
<ldb>
beach: true. but conventions have been evolving
<beach>
Absolutely. Not very fast though. You should try to use the most recent ones, of course.
<Posterdati>
hi
<Josh_2>
'ello
msk has quit [Remote host closed the connection]
<beach>
ldb: Despite its age, PAIP has some fairly conventional-looking code.
msk has joined #lisp
<beach>
ldb: It has a lot less object-oriented code than you would find these days perhaps.
<beach>
Common Lisp Recipies looks good too, but the code snippets are small.
<beach>
PCL looks fairly good, but there is some strange indentation in some examples.
<beach>
ldb: You could also look at some existing real projects. I am fairly pleased with the Cluffer library, for instance.
jmercouris has joined #lisp
msk has quit [Remote host closed the connection]
msk has joined #lisp
xkapastel has joined #lisp
jebes has quit [Ping timeout: 260 seconds]
msk has quit [Remote host closed the connection]
msk has joined #lisp
ldb has quit [Ping timeout: 264 seconds]
asarch has joined #lisp
ljavorsk has quit [Ping timeout: 264 seconds]
william1_ has quit [Ping timeout: 256 seconds]
yangby has quit [Quit: Go out for a walk and buy a drink.]
nowhere_man has joined #lisp
william1_ has joined #lisp
nowhere_man has quit [Remote host closed the connection]
bendersteed has quit [Remote host closed the connection]
bendersteed has joined #lisp
nowhere_man has joined #lisp
shinohai has joined #lisp
prince1 has joined #lisp
z147 has joined #lisp
prince1 has quit [Ping timeout: 240 seconds]
smazga has joined #lisp
ldb has joined #lisp
Necktwi has quit [Ping timeout: 264 seconds]
davepdot_ has joined #lisp
davepdotorg has quit [Ping timeout: 256 seconds]
william1_ has quit [Ping timeout: 250 seconds]
tourjin has joined #lisp
william1_ has joined #lisp
<tourjin>
how do I read progn? how does it sound?
<beach>
prog-enn
<tourjin>
thank you.
<beach>
Sure.
milanj has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
iAmDecim has joined #lisp
dddddd has joined #lisp
iAmDecim has quit [Ping timeout: 250 seconds]
zaquest has joined #lisp
smazga has quit [Ping timeout: 240 seconds]
ldb has quit [Ping timeout: 256 seconds]
gko_ has joined #lisp
loli has quit [Ping timeout: 246 seconds]
loli has joined #lisp
joels has joined #lisp
Bike has joined #lisp
davepdot_ has quit [Remote host closed the connection]
davepdotorg has joined #lisp
ggole has joined #lisp
Necktwi has joined #lisp
joels has quit [Ping timeout: 240 seconds]
davepdot_ has joined #lisp
davepdotorg has quit [Read error: Connection reset by peer]
tourjin has quit [Ping timeout: 264 seconds]
varjag has joined #lisp
gko_ has quit [Ping timeout: 264 seconds]
jprajzne has quit [Read error: Connection reset by peer]
jprajzne has joined #lisp
ldb has joined #lisp
borodust has quit [Remote host closed the connection]
rippa has joined #lisp
heisig has quit [Quit: Leaving]
sjl_ has joined #lisp
trocado has joined #lisp
z147 has quit [Ping timeout: 240 seconds]
trocado has quit [Ping timeout: 250 seconds]
knicklux has quit [Ping timeout: 246 seconds]
hlavaty has joined #lisp
oni-on-ion has quit [Remote host closed the connection]
lavaflow has joined #lisp
oni-on-ion has joined #lisp
prince1 has joined #lisp
ldb has quit [Ping timeout: 256 seconds]
ebzzry has quit [Read error: Connection reset by peer]
danielboston26 has joined #lisp
borodust has joined #lisp
prince1 has quit [Ping timeout: 250 seconds]
smazga has joined #lisp
knicklux has joined #lisp
KDr2 has quit [Remote host closed the connection]
froggey has quit [Remote host closed the connection]
KDr2 has joined #lisp
froggey has joined #lisp
trocado has joined #lisp
ldb has joined #lisp
pticochon has joined #lisp
pticochon has quit [Changing host]
pticochon has joined #lisp
asarch has quit [Quit: Leaving]
ebzzry has joined #lisp
danielboston26 has quit [Quit: leaving]
asarch has joined #lisp
trocado has quit [Ping timeout: 256 seconds]
prince1 has joined #lisp
prince1 has quit [Ping timeout: 250 seconds]
lavaflow has quit [Ping timeout: 250 seconds]
ldb has quit [Ping timeout: 265 seconds]
oni-on-ion has quit [Ping timeout: 246 seconds]
loli has quit [Ping timeout: 260 seconds]
joels has joined #lisp
ebzzry has quit [Read error: Connection reset by peer]
<dlowe>
Redirects have to be set up by server ops, and they are serious about enforcing the ## convention if it comes up
Lord_Nightmare has joined #lisp
<dlowe>
oni-on-ion: like most warts in lisp, it's that way for historical reasons :)
Inline has joined #lisp
asarch has quit [Quit: Leaving]
<parjanya>
jcowan: grandfathered?
<jcowan>
Something which continues to exist, despite violating a rule, simply because it has been in effect for a long time and it would be too disruptive to change now.
<oni-on-ion>
dlowe, ahh... good point, actually =) mind at ease
efm has quit [Quit: Konversation terminated!]
<jcowan>
The idea is that if you grandfather was allowed to do something, you are too.
efm has joined #lisp
<parjanya>
jcowan: oh I see, like treating a grandfather as wrong but beyond fixing ; )
<jcowan>
Yes. In the American South in the bad old days, black people could only vote if they could prove that their grandfathers had voted also. That hardly ever happened.
<jcowan>
(in some places, not the whole South)
stepnem has quit [Ping timeout: 256 seconds]
stepnem has joined #lisp
<Bike>
they put in new rules that you had to pay a poll tax and other evil things, but if you could prove your grandfather had voted you were grandfathered in and could skip those. the net effect of which was obviously to disenfranchise black people without explicitly segregating them, but that's not part of the phrase any more
shangul has quit [Ping timeout: 256 seconds]
prince1 has joined #lisp
stepnem has quit [Read error: Connection reset by peer]
xuxuru has joined #lisp
leb has joined #lisp
nowhere_man has quit [Ping timeout: 246 seconds]
nowhereman has joined #lisp
prince1 has quit [Ping timeout: 256 seconds]
stepnem has joined #lisp
snits_ has quit [Ping timeout: 256 seconds]
xuxuru has quit [Remote host closed the connection]
xuxuru_ has joined #lisp
xuxuru_ has quit [Client Quit]
nowhereman has quit [Ping timeout: 240 seconds]
nowhereman has joined #lisp
xuxuru has joined #lisp
krid has joined #lisp
jonatack has quit [Ping timeout: 246 seconds]
madage has quit [Remote host closed the connection]
madage has joined #lisp
manicennui has quit []
cosimone_ has quit [Quit: Quit.]
whiteline has quit [Remote host closed the connection]
gareppa has joined #lisp
jonatack has joined #lisp
whiteline has joined #lisp
Frobozz has quit [Quit: quit]
bitmapper has quit [Ping timeout: 265 seconds]
snits has joined #lisp
leb has quit []
bitmapper has joined #lisp
Inline has quit [Ping timeout: 246 seconds]
minion has quit [Remote host closed the connection]