<html><head></head><body><div class="yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div dir="ltr" data-setdir="false">OK, I'm on lines 4 and 5 of 'hello world' and ran into yet another brick wall. Trying to convert the following two lines into ABCL:</div><div dir="ltr" data-setdir="false"><font face=""lucida console", sans-serif"><br></font></div><div dir="ltr" data-setdir="false"><div><pre><font face=""lucida console", sans-serif"><code class="ydp95351ea5language-java" data-lang="java"><span class="ydp95351ea5nc">List</span><span class="ydp95351ea5o"><</span><span class="ydp95351ea5nc">Integer</span><span class="ydp95351ea5o">></span> <span class="ydp95351ea5n">data</span> <span class="ydp95351ea5o">=</span> <span class="ydp95351ea5nc">Arrays</span><span class="ydp95351ea5o">.</span><span class="ydp95351ea5na">asList</span><span class="ydp95351ea5o">(</span><span class="ydp95351ea5mi">1</span><span class="ydp95351ea5o">,</span> <span class="ydp95351ea5mi">2</span><span class="ydp95351ea5o">,</span> <span class="ydp95351ea5mi">3</span><span class="ydp95351ea5o">,</span> <span class="ydp95351ea5mi">4</span><span class="ydp95351ea5o">,</span> <span class="ydp95351ea5mi">5</span><span class="ydp95351ea5o">);</span>
<span class="ydp95351ea5nc">JavaRDD</span><span class="ydp95351ea5o"><</span><span class="ydp95351ea5nc">Integer</span><span class="ydp95351ea5o">></span> <span class="ydp95351ea5n">distData</span> <span class="ydp95351ea5o">=</span> <span class="ydp95351ea5n">sc</span><span class="ydp95351ea5o">.</span><span class="ydp95351ea5na">parallelize</span><span class="ydp95351ea5o">(</span><span class="ydp95351ea5n">data</span><span class="ydp95351ea5o">);</span></code></font></pre></div><div><br></div><div dir="ltr" data-setdir="false">it looks like it should be easy. Heck, I can do that in one line:</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false"><font face=""courier new", courier, monaco, monospace, sans-serif"><span>(#"parallelize" *sc* '(1 2 3 4 5)) ; *sc* defined yesterday and known to be correct</span></font></div><div dir="ltr" data-setdir="false"><span><br></span></div><div dir="ltr" data-setdir="false"><span>But no, it claims "no applicable method named parallelize found on JavaSparkContext" (but there is!). Reading through section 3.1.1 of the documentation, it appears that this is probably because '(1 2 3...) is a LispObject and not a Java object (why no automatic conversion?). Let's try to convert it:</span></div><div dir="ltr" data-setdir="false"><span><br></span></div><div dir="ltr" data-setdir="false"><span></span><font face=""courier new", courier, monaco, monospace, sans-serif"><span>(#"parallelize" *sc* (#"copytoArray" '(1 2 3 4 5)))</span></font></div><div dir="ltr" data-setdir="false"><font face=""courier new", courier, monaco, monospace, sans-serif"><span><br></span></font></div><div dir="ltr" data-setdir="false"><font face=""courier new", courier, monaco, monospace, sans-serif"><span><span>No instance method named copytoArray found for type org.armedbear.lisp.Cons'</span></span></font></div><div dir="ltr" data-setdir="false"><font face=""lucida console", sans-serif"><span><span><br></span></span></font></div><div dir="ltr" data-setdir="false"><font face=""lucida console", sans-serif"><span><span><font style="background-color: inherit;" face=""Helvetica Neue", Helvetica, Arial, sans-serif">And the same with using an array, e.g. </font><font style="background-color: inherit;" face=""courier new", courier, monaco, monospace, sans-serif"><span><span>(#"parallelize" *sc* (#"copytoArray" #(1 2 3 4 5)))</span></span></font></span></span></font></div><div dir="ltr" data-setdir="false"><span><span><span><span><br></span></span></span></span></div><div dir="ltr" data-setdir="false"><span><span><span><span><b><span><font style="background-color: inherit;" face=""lucida console", sans-serif"><span><span><font style="background-color: inherit;" face=""Helvetica Neue", Helvetica, Arial, sans-serif"><i><font size="3">Sigh</font></i></font></span></span></font></span></b><br></span></span></span></span></div><div dir="ltr" data-setdir="false"><span><span><span><span><br></span></span></span></span></div><div dir="ltr" data-setdir="false"><span><span><span><span></span></span></span></span>It's been a week and my intention was to have a working prototype by now and present ABCL as a viable alternative to use in a project. I haven't got past line 5 in 'hello world'. This doesn't bode well.<br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">I've been reading about ABCL for years, and it's impressive. Full MOP, extensible sequences, nearly 100% ANSI compliance, and the ability to deploy on the JVM are major achievements. However, as a not-inexperienced Lisp programmer, I find the barrier to entry remarkably high and the documentation and examples sparse and insufficient to surmount the hurdles I encountered.<br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Please take these comments in the way they are intended: constructive feedback from someone who is a fan of the project and would love to be able to use it. It's nearly impossible to get Lisp introduced into enterprise environments, and ABCL provides a wedge into those types of projects, ticking the boxes on deployment and ability to work with legacy Java code. Perhaps it makes more sense to someone approaching Lisp from the Java side, but coming from the Lisp side to Java, there's a high barrier to entry. I know that no volunteer wants to write documentation, but more and clearer docs are sorely needed here. This is probably not news, but sometimes it helps to be reminded of the obvious.<br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">I hate giving up, so this will be a personal background project in the hopes that at the next opportunity things will have improved to the point where we can consider introducing ABCL, so if anyone has any pointers, generally (though I think I would have found any docs or examples (lsw2) by now) and explaining this problem in particular, it would be greatly appreciated.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">@easye, you mentioned your ember project. If you're going to continue with that, please message me. A Spark wrapper would be useful, serve as a good exemplar for using ABCL to wrap a large library and, with a companion tutorial, help others overcome the kind of obstacles I've encountered. I'd be happy to contribute.<br></div><div dir="ltr" data-setdir="false"><br></div></div></div></body></html>