[aklug] OT: Clojure help
Christopher Howard
christopher.howard at qlfiles.net
Fri May 26 07:43:42 AKDT 2017
I was having trouble subscribing without use of the proprietary Web
interface <https://www.gnu.org/philosophy/javascript-trap.en.html>. But
I think I just figured out how to do the email subscription.
I imagine I'll get plenty of help there.
On 05/26/2017 07:18 AM, Tim Johnson wrote:
> clojure at googlegroups.com :)
>
> * Christopher Howard <christopher.howard at qlfiles.net> [170526 05:16]:
>> Is there a Clojure programmer on one of these lists who wouldn't mind
>> corresponding with a Clojure n00b to answer a few basic questions? Here
>> is the first one:
>>
>> When I run
>>
>> tutorial.core> (let [img (new-image 32 32)] (set-pixel img 10 10 cyan)
>> (show img))
>>
>> from the REPL, this returns a javax.swing.JFrame object, and displays
>> the frame and image as expected. However, if put the same in
>>
>> (defn -main
>> "Generates image."
>> [& args]
>> (let [img (new-image 32 32)]
>> (set-pixel img 10 10 cyan)
>> (show img)))
>>
>> in more core.clj, and run (-main) from the REPL, I get error
>>
>> ClassCastException java.awt.image.BufferedImage cannot be cast to
>> clojure.lang.IFn tutorial.core/-main (core.clj:11)
>>
>> Why the difference?
>>
>> --
>> https://qlfiles.net
>> _______________________________________________
>> aklug mailing list
>> aklug at aklug.org
>> https://lists.aklug.org/mailman/listinfo/aklug
>
--
https://qlfiles.net
More information about the aklug
mailing list