[erlang-questions] re moving nth element from a list

Anupam Kapoor <>
Wed Jun 25 13:08:09 CEST 2008


Richard A. O'Keefe <> wrote:

,----
| Strictly speaking, there isn't one.  Various people have been saying
| that a decent interface to something like (say) GSL would be nice, and
| it's hard to disagree (although I might be willing to give it a go
| (:-)).
`----
cool.

,----
| Eh?  The vector cross product is only defined for 3-dimensional space,
`----
it is defined for n-dimensional vectors too. 

,----
| For what it's worth, I wrote a simplex algorithm implementation in
| Burroughs Algol back in, oh, maybe 1977 or 1978, and I don't recall
| any cross products turning up in it at all.  With hindsight, I think
| everything I needed was in the level 1 or level 2 BLAS, not that they
| existed as such back then.
`----
but you are ofcourse right about it not appearing in simplex at all. but
once you have a dot-product, you owe it to yourself to have a
cross-product too :) 

,----
| I'm not sure that this particular exercise will teach you anything
| other than "Erlang wasn't designed for this."   Implementing the TFTP
| protocol might be more illuminating, or even the Dining Philosophers.
`----
that is very true indeed. but i just wanted to see how hard it was to do
something it is not designed for...more fundamentally, i guess, i wanted
to 'see' how i can define layers of primitive operations over simple
representations, combine them etc. etc.

once the whole thing is there, it would be fun to see where the
bottlenecks are, then optimize those portions locally (hopefully !)

lather-rinse-repeat.  

kind regards
anupam

ps: thanks for indulging me.



More information about the erlang-questions mailing list