IRC channel logs

2013-09-06.log

back to list of logs

<nalaginrut>morning guilers~
<youlysses_mbl>Evening.
<nalaginrut>heya
<davexunit>hey nalaginrut
<nalaginrut>davexunit: sorry I realize I'm in wingo 's wip-particles branch, so it's not the latest
<nalaginrut>the patch is obsolete ;-/
<davexunit>okay. glad to have it resolved. got me worried, there.
<nalaginrut>;-)
<davexunit>I was wondering: is guile-2d broken on every machine but my own? :(
<davexunit>I'm glad you got the examples to run.
<nalaginrut>broken? I'll test it with guile-figl master now
<davexunit>okay :)
<nalaginrut>it's OK for me
<nalaginrut>but I have another bug report
<nalaginrut>animation.scm can't quit
<davexunit>interesting. you should be able to quit via pressing ESC or Q
<davexunit>or clicking the X button on the window
<nalaginrut>click X button is useless
<davexunit>ohhh I see the issue.
<davexunit>I didn't register the hook for the X button
<nalaginrut>I wonder if I should press ESC
<davexunit>press ESC
<nalaginrut>just press q?
<davexunit>or Q
<nalaginrut>I pressed q
<nalaginrut>and I killed guile process, then guile-2d window still there
<nalaginrut>I can close it
<nalaginrut>I can't close it
<davexunit>okay, first thing: did the demo work at all?
<davexunit>did you see an animated sprite in the center of the window?
<nalaginrut>ok, killed
<nalaginrut>yes
<nalaginrut>I see
<nalaginrut>the spirte just don't move anymore
<nalaginrut>I'll try it again
<nalaginrut>alright, ESC & Q works
<davexunit>weird.
<nalaginrut>I typed that in console, I should do it in X window
<nalaginrut>I just typed Ctrl+c in console ;=O
<davexunit>do you guile-sdl >= 0.5.0 installed?
<nalaginrut>yes I installed all the latest things I think
<davexunit>okay
<nalaginrut>guile-2d is so cool
<nalaginrut>;-P
<davexunit>guile-2d requires >= 0.5.0, but last I checked it doesn't crash with the previous release.
<davexunit>which lead to me wasting an entire evening on a bug hunt.
<davexunit>glad you like it. a lot of rough edges still.
<davexunit>did you have any issues installing guile-figl?
<nalaginrut>I'm in guile-sdl-0.5.1
<davexunit>I always get an error when building docs
<davexunit>okay, cool.
<nalaginrut>yes there's docs issues
<nalaginrut>I ignored that
<nalaginrut>and I found I can't use make -j3
<nalaginrut>just make
<nalaginrut>or there're errors
<davexunit>with figl?
<nalaginrut>only for Guile projects, I found such problem
<davexunit>I guess guile compilation can't be parallelized right now.
<nalaginrut>I encountered the same problem with gwrap
<nalaginrut>well, in my Ragnarok project, I can use make -j3
<davexunit>oh.
<davexunit>nvm then.
<nalaginrut>I think there's some dependencies problem in modules, dunno
<nalaginrut>and guile-gnome is fine for make -j3
<davexunit>I wonder what the issue is.
<davexunit>I'm currently working on branch to reduce the amount of boilerplate needed to make a guile-2d program. what do you think? https://github.com/davexunit/guile-2d/blob/wip-scenes/examples/animation.scm
<nalaginrut>looks nice
<nalaginrut>I think it's easier to understand
<davexunit>me too. I'm still working on tweaking it.
<nalaginrut>when I saw animation.scm of master, I can't understand where was sprite called
<davexunit>but there's some good stuff here. like by default, there are callbacks that will close the window when you like click X or press ESC or Q.
<nalaginrut>yes
<davexunit>so that when you're writing quick programs you don't have to wire it all up.
<nalaginrut>is there sound example?
<davexunit>not yet.
<davexunit>it's in the TODO list... along with many other things.
<nalaginrut>events, images, animation, font, and sound needed
<davexunit>yes.
<nalaginrut>I think these are the fundamental elems
<davexunit>I have events, images, animation, and fonts.
<davexunit>I agree.
<nalaginrut>yes I see
<davexunit>I think I just need to add some layer over SDL's sound addon.
<nalaginrut>yes
<davexunit>and I'll have sound without much trouble.
<davexunit>or I'll just say: use SDL's sound library.
<davexunit>not sure yet.
<nalaginrut>better to have wrapper
<davexunit>yeah, I think you're right.
<davexunit>now that I have 35 stars on my repo, I better deliver some functionality. :P
<davexunit>I've never had a project that interested as many people.
<nalaginrut>yes, I thought Artanis is the most faved one, till I saw guile-2d
<nalaginrut>yeah, I should put more effort ;-O
<davexunit>I promote it on 4chan, and someone posted it to r/scheme
<davexunit>on reddit
<nalaginrut>anyway, Artanis hasn't have a release, so I didn't pub/annource it
<davexunit>guile-2d doesn't have a release either.
<davexunit>some day :)
<nalaginrut>when we have MVC/ORM and cli tools, I'll announce it
<nalaginrut>let's do it better then consider release
<nalaginrut>;-)
<davexunit>better to release early than never. :)
<davexunit>MVC and ORM. those are going to take a lot of work!
<davexunit>especially the ORM. are you aiming for ActiveRecord style stuff?
<nalaginrut>yes I planed so, but I wonder if there's better way for that, papers?
<nalaginrut>I mean if no use ActiveRecord
<davexunit>I work on a rails application at my job.
<nalaginrut>cool
<davexunit>activerecord is cool, but there's definitely some problem areas
<nalaginrut>any better way?
<davexunit>I don't know of one.
<davexunit>the problem is that it's easy to write a pretty ActiveRecord query... that translates into terrible SQL
<nalaginrut>alright, I saw an one, DataMapper
<nalaginrut>davexunit: you mean the 'sql compiler' of ActiveRecord is not an optimized one?
<nalaginrut>I my mind, it a thing compiling rails syntax to SQL
<nalaginrut>it's
<davexunit>it's optimized.
<davexunit>my point is more that the abstraction can hide some performance issues.
<davexunit>for instance, let's say we have 2 models. Users and Profile. Every User has a Profile.
<davexunit>User.all.map(&:profile)
<davexunit>this is a bad example, because we could just be doing: Profile.all
<davexunit>but here's the point: That line of code does 1 query from all of the user records, and then n more queries for each profile, where n is the number of users.
<davexunit>User.all.include(:profile).map(&:profile) would do it in 1 query.
<davexunit>I guess this a problem with ORMs in general.
<davexunit>since we're putting a layer of abstraction between the user and the database.
<nalaginrut>interesting
<davexunit>alright, I think I am going to merge wip-scenes into master. :)
<davexunit>I just added the ability to switch between scenes.
<nalaginrut>my question is 'does pattern itself matter for such optimization'?
<nalaginrut>or the optimized SQL depends on patterns?
<davexunit>there's a point where the abstraction breaks down
<nalaginrut>anyway, I dream to find a FP way for relational-mapping, rather than ORM
<davexunit>that would be nice.
<davexunit>can SQL queries be described as lists?
<davexunit>might be possible.
<davexunit>perhaps I should try to make a prototype sometime. ;)
<nalaginrut>for key-values insert/query, it's easy to do
<nalaginrut>and Artanis has ssql for the basic SQL abstract
<nalaginrut>(well, ssql is under developing yet)
<davexunit>oh okay.
<nalaginrut>I want to build a higher level relational-mapping based on ssql
<davexunit>gotcha.
<nalaginrut>it's a hard problem I faced, how to choose the pattern, then how to implement it
<nalaginrut>if I can't find the first answer, I have to try ORM first
<davexunit>yeah, better to make something than struggle with an idea that goes nowhere.
<davexunit>maybe when artanis gets more users a solution will appear :)
<nalaginrut>yeah, maybe, if so, maybe I should do MVC first, for attracting more users
<nalaginrut>;-)
<davexunit>:)
<davexunit>oh wow I just found some awesome game fonts http://opengameart.org/content/pixel-fonts-by-pix3m
<nalaginrut>my wife used to be an animator/designer of webgames, we planed to write games, but never have a start..
<nalaginrut>since I'm waiting for a chance to use Guile
<davexunit>I want to make a 2D shoot-em-up game.
<davexunit>but I want to be able to write the game scripts in Scheme.
<davexunit>thus guile-2d.
<nalaginrut>I ever thought using Guile for game script only, the rest is c/c++, but you know, I'd like to use Scheme only now
<davexunit>I started that way.
<davexunit>C core with Guile for scripting.
<nalaginrut>sounds niece
<nalaginrut>nice
<davexunit>but then I thought that it would be cool to use pure Guile.
<davexunit>guile-2d will probably have a small C extension at some point.
<nalaginrut>maybe a project like pygame
<davexunit>that's kind of the aim.
<youlysses_mbl>I'm actually quite excited for the future of guile-2d and it may be the driving factor of me porting guile to Android... though I am worried of the status of SDL2.
<davexunit>to provide something like pygame, but better.
<davexunit>I use SDL 1.2 currently.
<davexunit>I'm hoping that guile-2d will catch on and I can get some help implementing features and performance tuning.
<nalaginrut>it would be better to run it on Android, is there any possible?
<youlysses_mbl>Didn't someone say that porting guile-sdl to SDL2, rather than rewriting it completely.
<nalaginrut>then I could write network-games
<davexunit>youlysses_mbl: ttn asked my opinion about that on the mailing list.
<nalaginrut>oops? I never heard of that
<davexunit>SDL 2 is a much different API.
<davexunit>I think it might be easier to start from scratch.
<youlysses_mbl>What, having games that are based on guile-2d, on Android?
<davexunit>and also target guile >= 2.0
<davexunit>and forget about 1.8.x
<davexunit>and also use the FFI instead of a C extension.
<davexunit>perhaps I will move to SDL2 if I can write my own small wrapper for the functions that I need.
<davexunit>which aren't many.
<youlysses_mbl>davexunit: On guile-user?
<davexunit>the bug-guile-sdl list
*youlysses_mbl is very optimistic, and excited for the Guile. :-)
<youlysses_mbl>Future state
<davexunit>I'm optimistic too
<davexunit>the people working on the VM and compiler are smart
<davexunit>friendly community
<davexunit>and people like us writing cool libraries :)
<youlysses_mbl>I'll be back in like an hour or-so.
<youlysses_mbl>But yeah, same sentiments on this end. Peace out for now though.
<davexunit>see ya
<davexunit>doing some of my first live-coding with guile-2d.
<nalaginrut>davexunit: you don't sleep? what's your timezone?
<davexunit>eastern time.
<davexunit>it's almost 1 am here.
<nalaginrut>alright, mine is +8
<nalaginrut>oops, not plus 8 based on yours
<davexunit>I took the day off from work tomorrow. taking a long weekend.
<davexunit>I think I'm -5 ?
<davexunit>I can never remember.
<nalaginrut>it's 12:49 for me now
<nalaginrut>12:49am
<civodul>Hello Guilers!
<nalaginrut>heya ludo
<civodul>howdy wingo!
<wingo>moin :)
<wingo>happy friday :)
<civodul>right, happy Friday :-)
<nalaginrut>Stroustrup ever suggested whitespace overloading http://www.stroustrup.com/whitespace98.pdf May I suggest define whitespace as variable name ;-P
<civodul>you can already do that with (define   2)
<civodul>where   is the NON-BREAKING SPACE
<civodul>actually that's a bug, i think
<civodul>at the REPL you can do the above, then (+   3), but not just  
<nalaginrut>scheme@(guile-user)> (define 1)
<nalaginrut>While compiling expression:
<nalaginrut>ERROR: Syntax error:
<nalaginrut>unknown file:1:0: source expression failed to match any pattern in form (define 1)
<nalaginrut>well, seems I need reader option?
<civodul>are you sure you typed the non-breaking space?
<civodul>nalaginrut: are you sure you typed the non-breaking space?
<civodul>use C-x 8 RET in Emacs
<dje42>Weee.....
<dje42>(gdb) scm (display ((@@ (gdb) lookup-type) "struct s")) (newline)
<dje42>#<gdb:type s>
***anderson is now known as Guest24316
<nalaginrut>alright, anyway it's just a funny test ;-P
<nalaginrut>I always want to avoid OO in Artanis, but it seems so hard for relational-mapping
<taylanub>dje42: What's that ?
<dje42>Calling Scheme from gdb to lookup type "struct s".
<taylanub>How does one get this scm command ?
<dje42>The @@ is just because lookup-type isn't exported yet. Should be: scm (lookup-type "struct s")
<dje42>scm is a new command, akin to the existing python command.
<dje42>It's in a sandbox of mine, dunno when it'll get into FSF gdb.
<taylanub>Ah I see, so this is just a GDB extension/plugin or so using Guile, providing a Scheme API to GDB functionality, right ?
<dje42>right
<wingo>dje42: nice :-))
<taylanub>Is the (gdb) module also available and usable from Guile itself, or does one have to use a GDB process that embeds Guile ?
<dje42>gdb isn't a library, not yet anyway, so yeah - the latter. One has to start gdb.
<taylanub>I see.
<dje42>g'nite
<taylanub>Good night!
*taylanub just started work.
<civodul>dje42: soudns really cool
<civodul>*sounds
<civodul>dje42: and you know you have support from rms ;-) http://sourceware.org/ml/gdb-announce/2012/msg00000.html
<ijp>y'arr
<taylanub>ijp: おはようございます!
<nalaginrut>alas
<nalaginrut>since I can't avoid OO in ORM, I'm trying to write all design-patterns examples of Guile...
*ijp facepalms
<nalaginrut>who's the hero to teach me get rid of OO totally?
***ijp is now known as ijp2
***ijp2 is now known as ijp
<nalaginrut>is there anyway to make a method of class be protected?
<ijp>no
<nalaginrut>I know #:allocation #:each-subclass does similar thing, but it seems no fit for method but attribute
<ijp>goops has no notion of method attached to a class
<ijp>methods are a separate entity
<ijp>you could choose not to export it, but that's still not protected in a meaninful sense
<nalaginrut>alright, that's a way to go
<ijp>because it's closer to private than protected, and it's still really easy to access
<nalaginrut>I don't know why use protected, IMO, it just avoid to call it by mistake?
<nalaginrut>If I want to call a function anyway, there's method
<nalaginrut>maybe illegal, but possible
<ijp>it's for internal procedures that may be useful to a subclass
<nalaginrut>for subclass I would add a call-protected with @@
<ijp>ijpbot: help help
<ijpbot>help COMMAND : returns the documentation for COMMAND
<ijp>typical aidalgol isn't on when I have some Cool New Features™
<add^_>:-)
<add^_>aww
<ijp>ijpbot: quit
<ijpbot>You need to be my master to do this "ijp"
<add^_>ijp: design tip, don't make it spam out stuff, like a list of commands.
<add^_>I did that, not good.
<add^_>lol
<add^_>ijpbot: quit darn you
<ijpbot>You need to be my master to do this "add^_"
<add^_>:-D
<ijp>hmm, dunno where the " comes from though, probably a bad format
<add^_>Hm
<add^_>Is the code hosted somewhere? Like, github?
<ijp>it's on aidalgol's bitbucket, but I have a lot local
<add^_>ah
<add^_>ok
<add^_> https://bitbucket.org/aidalgol/cunning-bot ?
<ijp>yes
<add^_>Ok
<ijp>there's more on the plugins branch
<add^_>Ah
<add^_>Nice
<ijp>hold on, I'll push what I have
<add^_>:-)
<nalaginrut>I wrote factory pattern in Guile according to GoF, but I still don't get why I have to do so with Guile ;-/
<ijp>nalaginrut: in goops, factory = not using 'make'
<ijp>add^_: if you look now, you'll see (roughly) what I have at HEAD
<nalaginrut>since we have first-class function and dynamic type, I don't know if it's worthy to write like this
<ijp>if at any point, you are not specifying the type explicitly, you have a factory
<ijp>it's actually really common in scheme
<ijp>s/explicitly/explicitly when constructing an object/
<nalaginrut>I could write Factory just one line (define-method (factory-create klass . args) (apply make klass args))
<nalaginrut>but what's the benefit
<ijp>that's not a factory
<ijp>(define-method (factory-create . args) (apply make klass args)) would be a factory
<nalaginrut>hmm? where's klass in your args?
<ijp>exactly
<add^_>ijp: ah
<nalaginrut>since we don't have to define a brand new class for produce new classes
<ijp>if "everything is a class" then obviously you need to attach a factory method to a class
<nalaginrut>so we don't even need factory class
<ijp>but scheme isn't that way, you can have standalone functions
<nalaginrut>we can overload a generic function without any 'mother class'
<nalaginrut>I think the factory class is needed because OO language has to define a class then overload its methods
<nalaginrut>but we have generic function
<add^_>Actually, ijp, you and aidalgol could work on guile-irc to improve that, and make the bot from there ;-)
<add^_>Not that you need to do that now, now that you've already made a bot.
<add^_>But still
<ijp>well, I did say about 2 years ago that there were about 5 different people doing this
<add^_>Doing "this"?
<ijp>guile irc
<add^_>oh
<add^_>There are more than one? *confused*
<ijp>NIH earmuffs
*add^_ is confused
<add^_>better? :-P
<nalaginrut>ijp: IIRC you said guile-json at that time
<ijp>I've said it about a lot of things
<nalaginrut>;-D
<add^_> https://github.com/fbs/guile-irc needs love :-/
<add^_>Oh well
<add^_>Whatever :-)
<add^_>It's nice to see you've gotten a bot together
<add^_>More bots to take over the world!
<add^_>Yay
*nalaginrut is a bot, actually
<ijp>people ask me if I'm a bot at least once a week
*nalaginrut will add auto-reply "no I'm not" to ijp bot
<ijp>the response I use, which I believe I stole from fsbot, is "I am an organic"
<ijp>add^_: you could take it up with aidalgol, he might be happy to get rid of the mess of regexps
<add^_>Nah
<add^_>guile-irc needs some fixing up (again) to be easier to use
<civodul>add^_: was there any release of guile-irc?
<civodul>maybe you should run a name contest too ;-)
<add^_>name contest? uh
<ijp>guile's uniquely intelligent loquacity engine
<civodul>oh, nice one :-)
<civodul>but the acronym still wouldn't be very original
<ijp>then, how about the Library for Irc Networking UniX
<ijp>on*
<civodul>heh :-)
<Arne`>Why doesn’t scheme allow for adding strings? (+ "ab" "cd") — having to explicitely use (string-append "ab" "cd") feels overly complex after knowing python…
<Arne`>s/scheme/guile scheme/
<ijp>because string addition is not commutative, and therefore not really addition
<ijp>besides, goops
<Arne`>oh, nice! http://www.gnu.org/software/guile/manual/html_node/Methods-and-Generic-Functions.html#Methods-and-Generic-Functions
<civodul>or: (let ((+ string-append)) (+ "a" "b"))
<civodul>and now it no longer feels "overly complex" ;-)
<Arne`>(googlability of the manual would rise massively if the chapters would note the use-modules command needed to use them…
<ijp>the majority of them do
<ijp>and goops does at the beginning of its chapter
<Arne`>I found it by pressing UP :)
<ijp>I need to sit down one of these days and come up with a solution to ad hoc polymorphism I actually like
<ijp>for functional programming*
<Arne`>why isn’t that behaviour the default? Is the default defined as “bare scheme”?
<ijp>Arne`: because scheme doesn't have ad-hoc polymorphism
<ijp>which they won't add because 1) it isn't primitive 2) there is no one clear cut way to do it
<Arne`>civodul: let doesn’t actually solve my problem: I could also use string-append, but I don’t want to have to remember it.
<ijp>but you remember a non-standard use of + ?
<ijp>and one which is incorrect from an algebraic point of view
<Arne`>+: “I want to add up something”
<ijp>for instance, if I wrote the following code (define (sum3 a b c) (+ b a c))
<Arne`>ijp: My experience with Python shows, that this works really well.
<ijp>this is absolutely correct according to a mathematical understanding of +
<Arne`>so you should only use it with numbers…
<ijp>but then you've just undermined your own argument
<Arne`>or rather: If you gave that to someone else he or she would rightfully complain that this is not generically useful.
<ijp>it is generically useful
<Arne`>ijp: No: Your function should only be used with number, but that does not hold for + itself.
<ijp>it works for every commutative monoid
<ijp>now, at this point, I'm taking the piss
<ijp>but it reminds me of the common argument that lisp is bad for not doing infix arithmetic
<Arne`>I would reply to that with (nfx 1 + 2)
<ijp>and yet most of those same languages * and / are not inverses
<Arne`>Those languages are often used for much different tasks then math.
<Arne`>In python I often used 5 * "a". It was perfectly clear what that should do.
<ijp>anyway, the point is, mine is not less general than yours, it generalises differently
<Arne`>your (sum3) keeps the expectations for numbers, but it is surprising for strings.
<ijp>for instance, both of ours accommodate booleans
<Arne`>The key point I see is to find commonly understandable notations which fit as many operations as possible. Essentially to find a minimal language to express most tasks.
<Arne`>But since goops allows me to add that, I’ll just have to remember to use that when I do string-work.
<ijp>sigh, you don't get it
<Arne`>I get that there is a specific reason why + does not work on strings by default. I just do not agree that this reason is more important than having a minimal set of functions to use when working on problems. Those are two different requirements.
<ijp>actually, we have covered 3 things
<Arne`>ijp: which ones? (I thought I’d ask after waiting >10min for the next line :) )
<ijp>1. scheme only defines + over complex numbers
<ijp>2. alebraicists use + to define commutative binary operations
<ijp>3. some langauges also use + for concatenation
<Arne`>yepp
<Arne`>and actually the first example for generics in GOOPS is string-concatenation, so 3 seems pretty obvious.
<Arne`>also 2 isn’t given in scheme: (+ …) is much more general than a + b.
<Arne`>and the same is true for string-append…
<Arne`>so using 2 as an argument against string-concatenation with + feels a bit awkward.
<ijp>well, the extensions to + for 0 1 and >2 arguments are valid algebraicly
<ijp>what I am saying is, your assertion that one is "obvious" only true if you ignore it's conventional usage amongst mathematicians
*Arne` avoids going too deep into math-notations.
<ijp>which, you can do, by all means, but it's important to rember that "obvious" is in the eye of the beholder
<icelesstea>As I see it, the "biggest issue" with using + for string concatenation, is that you then have to take more care with what you give + as arguments. With separate string-append it's more explicit. (Sorry for randomly butting in)
*Arne` forgot too much from the lectures to corrrectly speak about subspaces with relaxed conditions and such…
<Arne`>ijp: that’s true
<Arne`>icelesstea: because you won’t have type-checking?
<wingo>relatedly, http://www.more-magic.net/posts/thoughts-on-substring.html
<ijp>Aren`: no, because string append is ordered
<icelesstea>If a mistake can be made, it's quite certain some people will from time to time make it, and this can cause some rather peculiar behaviour and bugs in code.
<ijp>for me, this is one of the reasons I have trouble with global mutation based polymorphism
<ijp>which is how goops works
<ijp>because the assumptions I made in my code can be broken by someone else whose module has no interaction with mine
<icelesstea>Precisely. And this effectively breaks the black box idea of procedures/functions.
<Arne`>ijp: so when I define (+ …) in my code and a module uses it, that module gets the additional capability to concatenate strings with +, which might break its error checking?
<ijp>Arne`: well, maybe, maybe not, it depends on the code
<ijp>you've used it in python, you know what the deal is
<ijp>if you only define, say, string-string concatenation, there is less chance for error, than if you, say, coerced numbers to strings, and appended
<ijp>then, "foo" + 3 might give you "foo3", but 3 + "foo" gives you an error
<ijp>cough, php
<ijp>wingo: the string-trepanation yesterday, this today, is something at work fuelling your choice of rants?? :)
<wingo>ijp: dude, you don't even know... ;)
<wingo>today i spent three hours debugging this:
<wingo>js> foo
<wingo>null
<wingo>wtf why is it null????
<ijp>where foo is unbound?
<wingo>turns out it wasn't
<wingo>because...
<wingo>js> foo === null
<wingo>false
<wingo>turns out some things just print as null
<wingo>and they aren't
<wingo>w.
<wingo>t.
<wingo>f.
<davexunit>js> 1 + []
<davexunit>"1"
<ijp>wingo: lol
<civodul>ah ah :-)
<davexunit>I'm having an issue with case-lambda
<Arne`>ijp: What I now defined for myself is string-string concatenation and an explicit error for string-number and number-string.
<ijp>the other issue I can foresee is if someone else _also_ redefines those
<Arne`>ijp: In python string concatenation everywhere with + does not create any problems (I know of), because programmers expect that to be the default.
<davexunit>I have a rect-contains? procedure, and I want that procedure to either take 2 arguments, x and y, or a 2D vector.
<Arne`>and 1 + "2" is an error
<Arne`>(in python)
<davexunit> http://paste.lisp.org/display/138802
<ijp>well, one example would be mean(["foo","bar","baz"])
<Arne`>ijp: There’s something I don’t understand, though, which the knowledge you seem to have of GOOPS could help untangle (I take your distaste for knowledge):
<Arne`>(define-method (+ (x <string>) (y <number>)) (throw 'mixed-strings-and-numbers))
<davexunit>(rect-contains? world-bounds (bullet-position b)) throws the error ERROR: Wrong type to apply: #<syntax-transformer bullet-position>
<ijp>the obvious definition of mean works for any field, but would fail for strings
<ijp>Arne`: you could just leave it unbound, and it should be fine
<ijp>davexunit: huh, I don't see why that would be an issue there
<davexunit>found the problem. bullet-position is defined *after* the procedure that calls rect-contains?
<ijp>actually, the earlier statement about mean is false
<ijp>brainfart
*ijp tries vainly to remember what it is he is supposed to be doing
<ijp>hmm, actually, I can think of a way to make the definition of mean work, but it's
<ijp>not going to be very useful, I think
<dsmith-w`>Happy Friday, Guilers!!
***dsmith-w` is now known as dsmith-work
<ijp> http://paste.lisp.org/display/138803 is the useless abstraction I was thinking of
<ijp>see, it makes perfect sense!
*ijp twirls moustache evilly
<dsmith-work>ijp: What's GF2?
<ijp>the smallest finite field, it contains 0 and 1 (here #f and #t)
***ijp` is now known as ijp