<shka_>
Shinmera: oh, so that's what you were doing lately!
nowhere_man has joined #lisp
<Shinmera>
Gonna write a continuation of the previous entry about geometry clipmaps later
<Shinmera>
On my blog I mean
light2yellow has quit [Quit: light2yellow]
gigetoo has quit [Read error: No route to host]
<shka_>
Shinmera: it looks very smooth
gigetoo has joined #lisp
<Shinmera>
As it should.
<shka_>
indeed
Kundry_Wag has joined #lisp
<Shinmera>
Still plenty to do though, especially in terms of optimisation.
<Shinmera>
As it is, the
<Shinmera>
re's absolutely no optimisation at all.
<Shinmera>
And by the way, my engine uses CLOS all over the place, and pays practically no attention to consing or anything, and it still runs just fine for pretty much everything I've done so far.
<no-defun-allowed>
but GCs are bad for games /s
<shka_>
honestly, that sums up my total expirience with clos as well
<Shinmera>
Just to give a counterpoint to all the games people (even in here) that constantly brag about how optimised their stuff is.
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
<shka_>
To be fair, many people seems to complain about how costly generic functions are.
<shka_>
but for me, it never was any issue
<Shinmera>
It has been an issue for me in some cases, like real time audio processing, but most of the time it has not impacted me at all.
<no-defun-allowed>
i could do realtime synthesis with sbcl and clos
<no-defun-allowed>
lemme think, around 8 2 op FM at 44.1k/16bit channels
smokeink has quit [Ping timeout: 240 seconds]
<Shinmera>
Sure, what I did was more heavy weight.
<Shinmera>
Sample conversion and interpolation, various effects and mixing of multiple channels, etc.
<Shinmera>
Anyway, now I've got Harmony and that problem is pretty much solved.
<Shinmera>
(except for the native Windows backend being broken)
<shka_>
neat, guy at #lisp-pl is into sound/signal processing stuff
<shka_>
i will paste it to him
aindilis has quit [Ping timeout: 276 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
<dim>
I think it boils down to not using generic function in your inner-loops processing, at least that's what I do in pgloader
DGASAU has quit [Ping timeout: 260 seconds]
<dim>
I mean I use them extensively for preparing the catalogs and all, and not at all when actually reading and re-formating and writing bytes over the network
<Shinmera>
For my game engine I use GFs in the main draw and update steps all over. It's fine.
<shka_>
dim: unless those are functions you really want to inline, GF work just fine
<shka_>
i am under impression that notion about performance of GF is not relevant with current hardware
<jackdaniel>
benchmark everything if unsure.
<Shinmera>
It depends on the workload. There's definitely overhead and that can be enough to matter
<shka_>
yeah, sure
<jackdaniel>
if you process (say) images, you have loops going over each pixel, so even if gf gives you 1ms, you lose 1s etc
dented42 has joined #lisp
<jackdaniel>
of course time values were totally made up :)
Bronsa has joined #lisp
<shka_>
application is your ultimate benchmark anyway
<jackdaniel>
I don't know what's that supposed to mean: you start to implement fast methods only after you prove that you wrote a complete application which is painfully slow?
<shka_>
I mean: write prototype, benchmark it. Don't attempt to perform microbenchmarks because results are misleading
<heisig>
Oh, microbenchmarks can be quite enlightening. Otherwise I wouldn't have figured out that if you do certain MOP things (e.g., calling ADD-METHOD yourself) SBCL switches from fast methods to slow methods.
<heisig>
That can be an order of magnitude slower. Of course, whether that matters depends on your application.
Kundry_Wag has quit [Ping timeout: 264 seconds]
lumm has joined #lisp
shrdlu68 has quit [Ping timeout: 244 seconds]
shifty has joined #lisp
random-nick has joined #lisp
cpape has joined #lisp
dented42 has quit [Ping timeout: 268 seconds]
CrazyEddy has quit [Ping timeout: 240 seconds]
krwq has quit [Remote host closed the connection]
tralala has quit [Remote host closed the connection]
tralala has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
thawes has quit [Remote host closed the connection]
thawes has joined #lisp
CrazyEddy has joined #lisp
thawes has quit [Remote host closed the connection]
thawes has joined #lisp
gpiero has quit [Remote host closed the connection]
<shka_>
Shinmera: harmony looks rather cool!
<shka_>
you continue to amaze me with sheer volume of decent projects you created
<Shinmera>
Thanks
gpiero has joined #lisp
gpiero has quit [Quit: Leaving.]
gpiero has joined #lisp
housel has quit [Read error: Connection reset by peer]
dented42 has joined #lisp
makomo has joined #lisp
milanj has joined #lisp
fikka has joined #lisp
jack_rabbit has quit [Ping timeout: 276 seconds]
m00natic has joined #lisp
jack_rabbit has joined #lisp
rozenglass has quit [Remote host closed the connection]
dented42 has quit [Ping timeout: 244 seconds]
light2yellow has joined #lisp
Kundry_Wag has joined #lisp
dddddd has joined #lisp
light2yellow has quit [Ping timeout: 268 seconds]
light2yellow has joined #lisp
ismdeep has joined #lisp
ismdeep has quit [Client Quit]
rocx has quit [Remote host closed the connection]
light2yellow has quit [Ping timeout: 264 seconds]
markoong has joined #lisp
Kundry_Wag has quit [Ping timeout: 268 seconds]
<LdBeth>
good evening
gaqwas has joined #lisp
rumbler31 has joined #lisp
<no-defun-allowed>
Hello LdBeth
<LdBeth>
today looked at Yale Haskell, which is written in Scheme flavored Common Lisp
rumbler31 has quit [Remote host closed the connection]
<LdBeth>
sounds awkward.
<no-defun-allowed>
That's.... What the fuck
mishoo has joined #lisp
<beach>
What could a "Scheme flavored Common Lisp" be?
<LdBeth>
yes. many haskell implementations are deprecated. and i can't find one can be compiled without GHC
<antoszka>
> # This is a hack; we run Allegro on both sparc and next boxes, and
<antoszka>
Good times. Long gone.
<LdBeth>
beach: it's a compatblity layer made by wrapping a few CL utils and write the rest of world in Scheme style
rumbler31 has joined #lisp
DGASAU has joined #lisp
atgreen has quit [Ping timeout: 268 seconds]
<beach>
I see. Thanks.
Bike has joined #lisp
fikka has quit [Ping timeout: 272 seconds]
<Xof>
slyrus1: hi
Josh_2 has joined #lisp
fikka has joined #lisp
light2yellow has joined #lisp
smokeink has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
dented42 has quit [Ping timeout: 268 seconds]
fikka has joined #lisp
smokeink has quit [Remote host closed the connection]
smokeink has joined #lisp
<smokeink>
does this look like the proper way to delete an object from the manardb database? http://pastecode.ru/944ee43/
fikka has quit [Ping timeout: 252 seconds]
random-nick has quit [Remote host closed the connection]
random-nick has joined #lisp
fikka has joined #lisp
<smokeink>
by calling that (gc _everything_except_the_obj_I_don't_need_any_more :verbose t) ? that doesn't look right to me, I think I must be missing something
<LdBeth>
smokeink: does other objects holds the reference to it?
HarpoRoeder has joined #lisp
<LdBeth>
ie, it's the CDR of anthor list which is in everything_except_the_obj_I_don't_need_any_more
<smokeink>
if other objects don't hold references to it, then that obj gets destroyed. I pushing adding that obj into a list but that doesn't make it count as "referenced"
<smokeink>
I don't (yet) know how to make an obj "referenced"
fikka has quit [Ping timeout: 264 seconds]
<Bike>
not that i'm familiar with this system, but if you deal with things through a garbage collector, is "delete this particular object" even a thing the system wants you to be able to do?
SaganMan has joined #lisp
<smokeink>
I want to understand in such a system how am I supposed to delete a blog post from the db, for example
fikka has joined #lisp
<jdz>
Which blog post?
<jdz>
In other words: how do you know which blog post you want to delete?
<smokeink>
this small app here can add blog posts, but shouldn't I also be able to delete them? (by ID for example, since each post has a unique ID)
<jdz>
That's not an answer.
<jdz>
Where do you get an ID of a blog post you want to delete?
rumbler31 has quit [Remote host closed the connection]
<smokeink>
when I create a blog post, I create a unique ID for it. Then in the HTML I can output that ID for the action of a "delete" button for example
<smokeink>
and the ID can be stored in the db (it's a slot)
<jdz>
I may have come to the discussion at a wrong moment, but if you know what you want to delete, then obviously you have some kind of a reference, so it seems very wrong to want to "make object referenced".
<smokeink>
:) you'll have to explain why you think that if an object exists then it must be referenced by something else.
<smokeink>
it just exists by itself, it's there, floating in the database. And I want to delete it, since nobody wants it any more (and nobody actually rferences it )
<jdz>
It's the old philosophical question: do you exist if you don't see you?
<Shinmera>
objects only exist if they can be referenced.
<Bike>
"you'll have to explain why you think that if an object exists then it must be referenced by something else" because otherwise the gc would delete it
<Bike>
no?
<Shinmera>
No, because if it's not referenced it simply doesn't exist by the programmer's view.
<jdz>
The issue here is multiple systems: the lisp system, and the database.
<jdz>
Seems to be the issue to me.
<LdBeth>
smokeink: if (1 2 3 FOO) is excluded then other references to FOO alse won't be wiped
<LdBeth>
since after save into db, the #'lisp-object-to-mptr to the save symbol will always return the same mptr
<LdBeth>
s/save/same
argoneus_ is now known as argoneus
<Bike>
i'm just saying, practically speaking, if the post isn't referenced from the database, surely gc will axe it
<smokeink>
you are right
<smokeink>
just tested that now
<smokeink>
if I make another class (let's call it posts) that references individual post objects, and I tell the gc that I don't want to gc posts, then it'll spare all the referenced individual post objs
<smokeink>
now, is that the right way to work? to have a class post and then another class posts that references post objects ??
<smokeink>
is that the idiomatic way to do it ?
<LdBeth>
gc will with even circular reference, so don't worry
<LdBeth>
s/with/work
<jdz>
I'd expect "posts" to be a sequence, not a class [instance].
<Bike>
the roots sequence you pass to gc, even
<smokeink>
I used a class with a slot of type sequence. I 'd like to use a simple sequence directly but I am not sure how to access it
<smokeink>
using a class I know I can do (first (manardb:retrieve-all-instancess 'posts))
<LdBeth>
doesn't mmarry fit you need?
<jdz>
smokeink: why not (manardb:retrieve-all-instances 'post)?
<smokeink>
jdz: yes that's better
<smokeink>
LdBeth: I'll try it and see
<smokeink>
jdz: but what if I want to push a new post? For that I'll need access to posts
<jdz>
How did the old post get there?
<smokeink>
posts has a slot which is a list. I pushed the post into posts's slot
Kevslinger has quit [Quit: Connection closed for inactivity]
<smokeink>
but after I restart the lisp system I shouldn't call make-instance again, I should read it from the db
Denommus has joined #lisp
<jdz>
How dit the POSTS instance get into the DB?
<smokeink>
when you (make-instance ) it just goes
<smokeink>
automatically
<jdz>
So why do POST instances not get into the DB automatically?
<smokeink>
posts is defined with (manardb:defmmclass
<smokeink>
instead of pure simple defclass
<jdz>
If you want to store posts in DB, they should also be defined similarly.
heisig has quit [Quit: Leaving]
atgreen has joined #lisp
<smokeink>
yes, sure. The issue was how to delete an individual post. It's solved. Now the second issue is whether it's possible to use make-marray for posts , instead of defmmclass
<jdz>
But why?
<jdz>
You don't need an array if the posts themselves are stored, right?
<smokeink>
you need an array or a class, that references those posts, otherwise you won't be able to delete individual posts
Kundry_Wag has joined #lisp
<smokeink>
you'll be able to store post objects, ... and you'll be able to delete them all. But if you want to delete them individually, you need a parent structure that references them, and call (manardb:gc (list parent_struct1 parent_struct2) :verbose t) , and that will delete only those objects which are not referenced by these parent structures
<jdz>
Is there documentation for the project?
Fare has joined #lisp
<smokeink>
very scarce. 1sec
<jdz>
Oh, I see there are HTML files in doc directory.
<jdz>
And of course not viewable through Github...
<smokeink>
I also hoped for an elegant way... there shouldn't be a need to have both post and posts objects. And then user & users, comment & comments, and so on...
<jdz>
The documentation says "manardb is just starting out...", and some ways to improve it include the things you want.
<smokeink>
then I'll make a helper macro
atgreen has quit [Ping timeout: 240 seconds]
dented42 has joined #lisp
fikka has joined #lisp
light2yellow has joined #lisp
tralala has quit [Ping timeout: 240 seconds]
<jdz>
Aren't there some more complete persistence libraries out there?
<jdz>
Any.
<smokeink>
do you have recommend any ? which one was good in your experience?
<smokeink>
I tried elephant and it was always crying and making things complicated, (I forgot the details)
<jdz>
I have not used any.
<smokeink>
postmodern sucks
<Shinmera>
Nah
<jdz>
What's wrong with postmodern?
<smokeink>
it has some stuff only half implemented
anewuser has joined #lisp
<jdz>
At least the storage part is solid, though.
<smokeink>
also, I'd like not to depend on postgres or mysql
<jdz>
I personally would not like to not depend on postgres.
nowhere_man has quit [Ping timeout: 252 seconds]
<smokeink>
:)
<smokeink>
for small to medium projects I'd rather depend only on lisp
Kundry_Wag has quit [Ping timeout: 264 seconds]
DGASAU has quit [Remote host closed the connection]
mishoo has quit [Ping timeout: 252 seconds]
DGASAU has joined #lisp
warweasle has joined #lisp
sjl has joined #lisp
dented42 has quit [Ping timeout: 272 seconds]
FreeBirdLjj has joined #lisp
steiner has quit [Remote host closed the connection]
shenghi has joined #lisp
dale_ has joined #lisp
dale_ is now known as dale
<smokeink>
jdz Bike Shinmera LdBeth thanks for the help
housel has joined #lisp
milanj has quit [Read error: No route to host]
Inline has joined #lisp
milanj has joined #lisp
fikka has quit [Ping timeout: 244 seconds]
smokeink has quit [Ping timeout: 244 seconds]
Kundry_Wag has joined #lisp
Denommus has quit [Remote host closed the connection]
fikka has joined #lisp
<slyrus1>
Xof: whatever happened to your McCLIM SVG backend?
Khisanth has quit [Ping timeout: 240 seconds]
metaYan has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 240 seconds]
orivej has quit [Ping timeout: 264 seconds]
Kundry_Wag has quit [Remote host closed the connection]
Khisanth has joined #lisp
milanj has quit [Read error: No route to host]
stacksmith has quit [Ping timeout: 276 seconds]
bateman has joined #lisp
stacksmith has joined #lisp
<bateman>
Hi guys, I'm having some trouble with a basic common lisp program. Could someone look at my code and tell me what I'm doing wrong?
<jackdaniel>
as of learning CL from the level on which you are, you should read pcl
<jackdaniel>
minion: tell bateman about pcl
<minion>
bateman: direct your attention towards pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
<beach>
bateman: If you use incorrect indentation, you force the people reading your code to count parentheses, which is not what Common Lisp programmers do. They rely on correct indentation to understand the code. As you noticed I immediately though i was out of scope.
shka_ has quit [Quit: WeeChat 1.9.1]
<bateman>
Alright, indentation is important, I'll learn how to correctly format my code
<Shinmera>
sabrac: It has everything I've ever needed so I don't have any suggestions :)
<Shinmera>
sabrac: By the way, how did your tour with Staple 2 turn out?
<antoszka>
Certainly does, but isn't there anymore information we'd like to convey?
<antoszka>
s/anymore/any more/
gaqwas has left #lisp [#lisp]
orivej has joined #lisp
<sabrac>
Shinmera: Still struggling a bit with method documentation. E.g. all those sql-ops in s-sql in postmodern. Otherwise, I like it. I need to find time to publish a review.
<Shinmera>
sabrac: I'm sorry-- I don't remember. What was the method documentation problem?
<bateman>
This is how my code appears in emacs. Are there issues with the indentation still?
ebzzry has quit [Ping timeout: 272 seconds]
<Xof>
slyrus1: hm. It might be on my last-but-one laptop somewhere?
<Xof>
I don't immediately know where it is
steiner has joined #lisp
<bateman>
@beach
<Shinmera>
bateman: Indentation looks fine now.
papachan has joined #lisp
<bateman>
Alright, thanks
<bateman>
"Evaluation aborted on #<TYPE-ERROR expected-type: (OR FUNCTION SYMBOL) datum: (+ 1 3)>"
<bateman>
This is the error I'm getting. Any ideas where it's coming from?
<Bike>
what did you do to cause it?
<Bike>
like, what did you try to evaluate.
<LdBeth>
bateman: (reduce #'+ mltlst)
<Bike>
Oh. Yeah.
<Bike>
that'd do it
<bateman>
Thanks
<bateman>
That seemed to fix things
<bateman>
So is the rule with #' that you have to use it when you're using a function as an argument?
<LdBeth>
Weirdly, almost all other languages use same namespace for both functions and variables
ebzzry has joined #lisp
<LdBeth>
so #' gets function definition of a symbol, otherwise use it's as a variable
dented42 has joined #lisp
<bateman>
Do you ever need to do that with a symbol right after an open paren? (eg, (myfunc arg1 arg2) )
<Shinmera>
#'foo is short for (function foo). ((function foo) ..) is not a valid form.
<Shinmera>
Note that not all paren pairs are forms.
<Shinmera>
Eg the first and second pairs of parens within this let are not forms, but expressions: (let ((foo 0)))
fikka has joined #lisp
<fouric>
actually, on that note, why have i seen older code that has #'(lambda ...) instead of (lambda ...) in it?
<fouric>
i think the example was (mapcar #'(lambda ...))
<Shinmera>
Because before CL got standardised, LAMBDA was not yet a macro that expanded to (function (lambda ...))
<fouric>
o
<slyrus1>
Xof: would love to take a look at it if you can dig it up. Was thinking of starting my own, but, obviously, starting with yours would be preferable.
<fouric>
so what _was_ lambda?
<Shinmera>
Just a symbol, not fbound.
<fouric>
if it wasn't fbound and not a macro, would that make it a special form?
<Shinmera>
"If name is a lambda expression, then a lexical closure is returned. In situations where a closure over the same set of bindings might be produced more than once, the various resulting closures might or might not be eq."
<fouric>
oh! so plain (lambda ...) was not actually a valid form?
Jesin has quit [Quit: Leaving]
<Bike>
it wasn't, back in the day
milanj has joined #lisp
<fouric>
that's weird to think about, but it makes sense
<fouric>
ty
<Shinmera>
I actually consider #'(lambda ..) an anti-pattern nowadays because some things do expect lambda expressions, and not function expressions, so #'(lambda ..) does not work everywhere, while (lambda ..) does.
fikka has quit [Ping timeout: 260 seconds]
<Shinmera>
Examples being a lambda-expression as the name of a form, and the condition report function.
Xof has quit [Ping timeout: 272 seconds]
mindCrime has joined #lisp
<fouric>
to clarify: not all expressions are valid forms, but all valid forms are expressions?
<Shinmera>
No, the distinction is that forms are expressions meant to be evaluated.
<jackdaniel>
or Lisp-flavoured LOOP if you like ;)
Copenhagen_Bram has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
lumm_ has joined #lisp
lumm has quit [Read error: Connection reset by peer]
lumm_ is now known as lumm
cage_ has joined #lisp
<jasom>
Shinmera: Lexical bindings of dynamically determined values doesn't make any sense IMO
<jasom>
You could imitate a dynamic binding of those via symbol-function and unwind-protect though.
jkordani has joined #lisp
<jasom>
nevermind I misunderstood what you were getting at with that.
kajo has joined #lisp
jkordani_ has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [*.net *.split]
ski has quit [*.net *.split]
steiner has quit [*.net *.split]
anewuser has quit [*.net *.split]
thawes has quit [*.net *.split]
uint has quit [*.net *.split]
ircbrowse has quit [*.net *.split]
eschatologist has quit [*.net *.split]
slyrus has quit [*.net *.split]
vibs29 has quit [*.net *.split]
vhost- has quit [*.net *.split]
shelvick has quit [*.net *.split]
crsc has quit [*.net *.split]
dieggsy has quit [*.net *.split]
joast has quit [*.net *.split]
slyrus1 is now known as slyrus
borodust has quit [*.net *.split]
juristi has quit [*.net *.split]
uint has joined #lisp
<cgay>
Is there a thing that takes a type, e.g. (member :a :b :c) or (integer 1), and turns it into an English description of the type? I imagine it being a format directive written by the same person who wrote ~@R, for example.
<Bike>
there is not.
<Bike>
check-type allows you to specify your own string, since it sometimes depends on context.
<cgay>
I have CL type specs leaking into command-line flag --help output and thought it would be fun if there were a converter. :)
<jackdaniel>
cgay: clon has automatic description of lisp arguments
<jackdaniel>
(clon is a library for command-line binaries)
<cgay>
Command-Line Options Nuker -- nice
ircbrowse has joined #lisp
dvdmuckle has quit [Quit: Bouncer Surgery]
dlowe has joined #lisp
dvdmuckle has joined #lisp
joast has joined #lisp
scottj has joined #lisp
meepdeew has quit [Remote host closed the connection]
Fare has quit [Ping timeout: 252 seconds]
ski has joined #lisp
pierpal has quit [Quit: Poof]
DGASAU has quit [Ping timeout: 276 seconds]
DGASAU has joined #lisp
<jasom>
IIRC CLON's readme describes itself as "overengineered"
milanj has quit [Quit: This computer has gone to sleep]
<Shinmera>
I found CLON to be much too heavy-weight. Fare's command-line-arguments is nice and simple.
<jasom>
I seem to not recall that correctly though
Dvarkin has joined #lisp
<jasom>
for programs with a lot of arguments clon can be nice. If you consider "cat -v" harmful then you probably don't need it
Dvarkin has quit [Remote host closed the connection]
nowhere_man has quit [Ping timeout: 264 seconds]
shifty has quit [Ping timeout: 240 seconds]
<LdBeth>
so once unpon time common lisp is capable for parallel data processing
vlatkoB has quit [Remote host closed the connection]
jkordani has quit [Ping timeout: 240 seconds]
<emaczen>
how do you specify a union type in cffi:foreign-slot-value of cffi:with-foreign-slots?
orivej has quit [Ping timeout: 240 seconds]
aindilis has joined #lisp
<Bike>
i think you just specify the actual type
<jackdaniel>
I've found CLON a very good library, definetely not overengineered
<jackdaniel>
and for once I've found lisp library with a good documentation
X-Scale has quit [Ping timeout: 240 seconds]
<Bike>
i mean, foreign-slot-value returns a value
<jackdaniel>
(usually I find libraries with no documentations, readmes or half-finished ones)
<Bike>
if you tell it "this thing is either an int or a char*" that doesn't really give cffi anything to work with
<emaczen>
Bike: Ok, so in the C code it object.union.field.field in lisp it would be (slot (slot object))
<Bike>
yeah, i think so.
<Bike>
cffi is kind of apathetic about a lot of C stuff. it just takes memory and goes "that's a float? you got it, boss, float coming right up"
[X-Scale] has joined #lisp
[X-Scale] is now known as X-Scale
<emaczen>
Bike: CFFI is pretty good, I like that approach. I only wish it was a bit more steamlined to find out the constants I need for me -- I don't want to mess around with the groveller
<Bike>
well, i mean
<Bike>
if you're talking about a #define
<Bike>
information about those literally does not exist in the object file
<Bike>
it's entirely a compile-time thing. that's why you have to use the groveler
<emaczen>
I wrote a macro that writes a c program that prints out the info I want in a plist, and then I compile it, run it and read it.
<Bike>
that's
<Bike>
what the groveler is? right?
<Bike>
i'm pretty sure that's what the groveler is
<Shinmera>
Yes.
<emaczen>
Bike: Oh, well I spent more time a few months ago looking at the groveller than an hour getting this to work
<Bike>
fair enough
cage_ has quit [Quit: Leaving]
tralala has joined #lisp
scottj has left #lisp [#lisp]
makomo has quit [Quit: WeeChat 2.2]
zooey has quit [Remote host closed the connection]
<emaczen>
Bike: does clasp compile on non 12GB memory computers yet?
<emaczen>
Is there any reasonable way to get it on a rpi?
<Shinmera>
No, no.
shka_ has quit [Ping timeout: 272 seconds]
<Bike>
what he said
<Bike>
it's x64 only for the forseeable future
tralala has quit [Quit: out]
Jesin has quit [Quit: Leaving]
<jasom>
I think you only need 12GB of virtual memory to compile clas
<jasom>
if you're willing to wait a couple of GB should be enough for it to make forward progress
<jasom>
(so long as swap is large enough)
dented42 has joined #lisp
atgreen has joined #lisp
atgreen has quit [Remote host closed the connection]
Copenhagen_Bram has quit [Ping timeout: 252 seconds]
papachan has joined #lisp
mathrick has quit [Ping timeout: 260 seconds]
Josh_2 has joined #lisp
zooey has joined #lisp
Jesin has joined #lisp
kajo has quit [Ping timeout: 252 seconds]
Achylles has joined #lisp
jdhorwitz has quit [Quit: Connection closed for inactivity]
rumbler31 has joined #lisp
<whartung>
it can’t be cross compiled to an rpi? or does it simply not support ARM?
rumbler31 has quit [Remote host closed the connection]
random-nick has quit [Read error: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number]
random-nick has joined #lisp
<Shinmera>
It does not support anything that isn't AMD64 Linux/OS X
<whartung>
well then, that’s that :)
sukaeto has joined #lisp
skidd0 has quit [Quit: WeeChat 2.2]
Copenhagen_Bram has joined #lisp
AroPar has joined #lisp
rocx has joined #lisp
mindCrime has quit [Ping timeout: 272 seconds]
AroPar has quit [Quit: Leaving]
milanj has quit [Ping timeout: 272 seconds]
Bike has quit [Ping timeout: 252 seconds]
rozenglass has joined #lisp
<no-defun-allowed>
Hello everyone
slyrus2 has joined #lisp
<pjb>
Hello one.
markoong has quit [Ping timeout: 240 seconds]
markong has joined #lisp
ski has quit [Ping timeout: 260 seconds]
Cymew has joined #lisp
Bike has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
rocx has quit [Ping timeout: 260 seconds]
jack_rabbit has quit [Ping timeout: 272 seconds]
rocx has joined #lisp
zotan has joined #lisp
rocx has quit [Quit: laptop's latch clicking, barstool screeching as he leaves, he hates these mornings. -- a haiku]
kajo has joined #lisp
zxcvz has quit [Quit: zxcvz]
ski has joined #lisp
jack_rabbit has joined #lisp
sjl has quit [Ping timeout: 264 seconds]
Achylles has quit [Quit: Leaving]
skidd0 has joined #lisp
bateman has quit [Quit: Page closed]
ebrasca has quit [Ping timeout: 252 seconds]
xsperry has joined #lisp
<xsperry>
hi. what would be the closest equivalent of list comprehensions in lisp? loop macro?
random-nick has quit [Read error: Connection reset by peer]
<xsperry>
particularly in cases when you iterate over two or more lists. do I need nested loops for that?
<shachaf>
You can certainly write e.g. (loop for x in xs for y in ys collect (f x y))
<edgar-rft>
a) what are "list comprehensions"? b) It's possible to iterate over several lists at once with the same pros and cons as in other languages. Nested loops are the simplest possibility.
<Bike>
list comprehensions are a syntactic construct in python and other languages that is indeed kind of like loop.
<Bike>
(loop for x in list when predicate collect (key x)) or so, i guess
<no-defun-allowed>
loop (and iterate) are certainly more powerful than python's for
<xsperry>
ok, here's a simple example that is very easy to express with list comprehensions. given two lists, '(1 2 3) and '(4 5 6), make a list of conses consisting of each element from list A and list B. so '((1 . 4) (1 . 5) (1 . 6) (2 . 4) (2 . 5) (2 . 6) (3 . 4) (3 . 5) (3 . 6))
<jasom>
(loop for x in xs nconc (loop for y in ys collect (cons x y)))
<xsperry>
so you have to use nested loop - ok. that is what I was asking
<jasom>
xsperry: I believe that's a nested loop in python as well (unless you use itertools which has that function builtin IIRC)
<Bike>
it would have to be a nested loop under the hood since you're iterating over both lists independently, anyway.
<xsperry>
jasom I think you don't, but I am not 100% sure. it has been years since I used python, but python's list comprehensions were inspired by haskell's, and in haskell you don't need to nest list comprehensions for this
<xsperry>
I am actually trying to replicate this really elegant example from haskell tutorial in CL
aeth has quit [Ping timeout: 260 seconds]
<jasom>
xsperry: how do you indicate that you want nesting rather than iterating in parallel
<jasom>
e.g. difference between what you want and (1 . 4) (2 . 5) (3 . 6)
<jasom>
as in (loop for x in xs for y in ys collect (cons x y)) would return just 3 items with your inputs.
<xsperry>
jasom, you would zip lists first, and then then pattern match on resulting list. but at that point you probably wouldn't be using list comprehension
<shachaf>
Oh, LOOP iterates through lists together instead of nesting? That's what I get for saying something in here.
<shachaf>
In GHC Haskell you can write [(x,y) | x <- xs, y <- ys] for nesting and [(x,y) | x <- xs | y <- ys] for zipping. But zipping seems to me like a much more unusual behavior.
<xsperry>
this is the example I'm trying to rewrite in CL. it takes first 10 right triangle that has integers for all sides
<jasom>
I see. Now I understand why so many people ask for a zip in lisp.
<xsperry>
take 10 [(a,b,c) | c <- [1..], b <- [1..c], a <- [1..b], c^2 == a^2 + b^2]
* ski
idly thinks (do)/2 in ECLiPSe Prolog does it like CL `loop', here ..
<jasom>
xsperry: I'm not sure how the haskell example works; does it find all right triangles where the first side is of length "1" first?
<jasom>
actually it's unclear to me how it ever gets past (1,1,_)
<jasom>
oh, I see you have upper bounds on the second 2, I missed that.
<jasom>
yes, 3 nested loops is how it would be done in lisp
<xsperry>
jasom, [1..] is an infinite list of integers. take 10 drivers computation, and since haskell is lazy it will only compute enough to take first 10 such triangles
<jasom>
(loop for i from 1 ...) will give you [1..] as an iteration
<jasom>
the termination upon finding 10 items will need to be manually written though.
<aeth_>
Well, that was an incredible mess. nickserv and chanserv were down but nearly every channel was +r and in every other one you couldn't speak. So if your Internet went down in a period of about 4-5 hours or you tried to connect, you were out of luck, apparently.
pierpa has joined #lisp
<ebrasca>
aeth_: Now I understand my problems reconnecting to irc.
<aeth_>
And the best part is, when it forced my nick to Guest1234 or whatever when nickserv came back, it made my nick temporarily unavailable.
<aeth_>
Temporarily at this point is looking like 15 minutes to an hour
<xsperry>
jasom, ok, this is a lot more similar to the solution above than I imagined it to be. if I got it right, can I use loop to generate some lazy equivalent of a list (infinite list of right triangles), and then take first 10 such elements?
<shachaf>
As I'm trying to figure out some language ideas the language is becoming more and more like lisp. I guess this is an old story.
<shachaf>
Probably not quite enough like lisp to use S-expressions, though.
Bike has quit [Quit: Lost terminal]
markong has quit [Quit: Konversation terminated!]
<no-defun-allowed>
i'm sure ITERATE has some stuff for "when we have 10 elements"
<no-defun-allowed>
increment a counter when and only when we have a match?
meepdeew has joined #lisp
charh has quit [Read error: Connection reset by peer]
charh has joined #lisp
dura has joined #lisp
froggey has quit [Ping timeout: 240 seconds]
lnostdal has quit [Read error: Connection reset by peer]
froggey has joined #lisp
dura is now known as Alcinous
eschatologist has quit [Ping timeout: 264 seconds]