Open serialhex opened 7 years ago
I don't know how much experience you or the other ppl have w/ Common Lisp, so I'll assume the answer is "very little"
You are extremely correct in that regard :) My only experience with lisp is emacs lisp and even then I have to refer to the manuals extensively.
On that note, here goes a possibly stupid question. If possible I want this repo to contain wrappers for other lisp dialects too. Would it be possible to organize the repo so that some of the code can be reused for this purpose ?
OOOHhhhhhhhhh.... That's a tricky one! I know we could do one w/ Common Lisp, and possibly have other subdirs for Scheme and possibly Racket (which, being a dialect of scheme, shouldn't be too hard). Though it's almost like asking can we have one repo with wrappers for both Ruby and Python because while they are conceptually similar, they are very different (even the syntax is different, with both Ruby & python and Common Lisp and Scheme).
So while noble, I don't think that effort will work too well. Thankfully having just CL and Scheme wrappers covers pretty much all of the Lisp landscape (besides Clojure, and like 6.28x10^31 other much smaller dialects). That being said, as I'm not too familiar with the Scheme environment I probably wouldn't be able to effectively pull this off without a lot of extra work & looking into the landscape.
Lastly, most lispers "know" that if they want to get "real work" done, you do it in Common Lisp, and not Scheme. Mostly because Scheme is more of an academic language, being small and a lot of the add-ons are up to the implementor (at least that's what I understand from the RnRS for n={5,6,7}). Both of those are in quotes because they are gross overgeneralizations, and there are plenty who do "real work" with Scheme (one of the products we are looking into acquiring to help finish the project has high-level bindings in Scheme. (Also, this leaves out Clojure, even though it is the most popular lisp right now. But I think ArrayFire already has Java bindings, and thus Clojure bindings, as you can very easily deal with Java functions & objects from Clojure).
If you want to get started, I recommend Clozure or ECL (though I have had trouble compiling ECL on Windows recently) for your Lisp implementation, along with Quicklisp to quickly get libraries from the interwebs. As for learning you some CL I recommend Land of Lisp or Casting SPELs in Lisp for a quick intro. I can give you more references as you level up, but that should be good for now.
I'll set up a basic project and get everything bootstrapped. Watch for pull requests (unless you want to add me as a collaborator, that's fine also).
@serialhex I did not realize that they were that far apart. I was hoping the lisp dialects would be more like {C, C++, C#, D, Objective C} where you can have interoperability to some extent.
Going slightly off topic, part of me wants to change the repo name to indicate that this is going to be for common lisp only, but arrayfire-cl
may get confused with opencl and arrayfire-common-lisp
is too big :)
Coming back to topic, I'll have a go at creating the skeleton for the project over the weekend.
How about arrayfire-clisp
and split the difference?
Just so you know I'm like 90% done with a bare bones skeleton which I'll UL and make a pull request. It doesn't mean you have to use the skeleton I make, you have more experience with ArrayFire itself (and from your repos ffi's in general) than I do. I'm just starting it how I would build it, (which is using only the C aspects and some of the aforementioned libraries).
I probably won't have time to build anything more before the weekend anyway, and since it's pretty much all boilerplate I don't care if it gets scrapped :stuck_out_tongue: so don't feel bad if you think doing things a different way would be better.
Thanks for making this @pavanky I've forked the repo and since there is no other way for me to communicate with you or the other people who are watching this repo (Hi @umar456 and @shehzan10 ) I figured I'd open an issue and start there.
I don't know how much experience you or the other ppl have w/ Common Lisp, so I'll assume the answer is "very little" and if I'm wrong... then no harm done. I typically use a directory structure like the following for most projects:
For the most part, if we use cl-autowrap and the C API of ArrayFire it should make life easier & faster. cl-sdl2 uses cl-autowrap completely and the SDL library is pretty extensive. I don't have any experience with the C portions of ArrayFire, but from looking at the docs, it looks pretty close.
As for style of the code, I try and stick to the Google CL Style Guide but that's just me (and I'm not a style nazi... unless you're using tabs & spaces for indentation!!!)
If you want me to set the groundwork on directory structure & whatnot that's cool. Just let me know which direction I should take, or if you have questions let me know & I'll try to answer them.