Re: Teaching Clojure to students (how ?)
Nando Breiter na...@aria-media.com writes: To me, this begins to look more like a user interface issue than strictly a programming issue. The folks who do interface design have a technique - pretend it's magic. What would the solution look like if it was magic ( setting all programming considerations aside for the moment) ? This is, indeed, the case. When teaching programming to new programmers the minimum of pain points is an important consideration. At the moment, clojure is quite hard to get going with. Of course, Java is a total pain to get going with also (hello new programmer, this is an IDE -- just ignore most of it), so this isn't the only consideration. The student installs something ... opens something ... and something just works. How would you flesh that out? Someone else installs something for the student. A persistant REPL would be nice (although, of course, as most evaluative programmers restart periodically to avoid a balked environment, it might introduce problems as well). A nice simple environment is key, but with a good path to more complex functionality, as they become familiar the environment. I'd love to have an IDE with a newbie mode which took away all the nonsense, and then slowly turned it on with a here's a new feature dialog. Guess that's not going to happen any time soon! Phil -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
2013/10/9 Phillip Lord phillip.l...@newcastle.ac.uk Nando Breiter na...@aria-media.com writes: To me, this begins to look more like a user interface issue than strictly a programming issue. The folks who do interface design have a technique - pretend it's magic. What would the solution look like if it was magic ( setting all programming considerations aside for the moment) ? This is, indeed, the case. When teaching programming to new programmers the minimum of pain points is an important consideration. At the moment, clojure is quite hard to get going with. Of course, Java is a total pain to get going with also (hello new programmer, this is an IDE -- just ignore most of it), so this isn't the only consideration. The student installs something ... opens something ... and something just works. How would you flesh that out? Someone else installs something for the student. A persistant REPL would be nice (although, of course, as most evaluative programmers restart periodically to avoid a balked environment, it might introduce problems as well). A nice simple environment is key, but with a good path to more complex functionality, as they become familiar the environment. I'd love to have an IDE with a newbie mode which took away all the nonsense, and then slowly turned it on with a here's a new feature dialog. Guess that's not going to happen any time soon! A web based simplified development environment, but directly connected to github underneath, and with a never stopped VM for each student (can be snapshotted, though). When time comes to know better, switch to the editor/IDE of your choice and get all things back from the github repo (but the persistent VM). ? Phil -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
John Gabriele jmg3...@gmail.com writes: Thanks Phil! Didn't know you could do that! Wrote up some notes on getting it working: http://www.unexpected-vortices.com/blog/2013/scripts-in-clojure.html That's useful! Phil -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
Laurent PETIT laurent.pe...@gmail.com writes: 2013/10/9 Phillip Lord phillip.l...@newcastle.ac.uk A persistant REPL would be nice (although, of course, as most evaluative programmers restart periodically to avoid a balked environment, it might introduce problems as well). A nice simple environment is key, but with a good path to more complex functionality, as they become familiar the environment. I'd love to have an IDE with a newbie mode which took away all the nonsense, and then slowly turned it on with a here's a new feature dialog. Guess that's not going to happen any time soon! A web based simplified development environment, but directly connected to github underneath, and with a never stopped VM for each student (can be snapshotted, though). When time comes to know better, switch to the editor/IDE of your choice and get all things back from the github repo (but the persistent VM). Yeah, that's a nice idea. Wouldn't be too hard to get it to work. Phil -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
Thanks for all the feedback. I had already made sure that LightTable is already installed, and the plug-in for eclipse (that they already use). But I don't expect too much trouble on this front as they are already somewhat proficient (with even some converts to the church of Emacs ☺). Cheers, B. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
Another very useful getting started plugin is lein-try: https://github.com/rkneufeld/lein-try Then you can do stuff like: lein try [quil 1.6.0] ;; taken from the quil getting started wiki: (use 'quil.core) (sketch :setup (fn [] (background 20) (ellipse 50 50 80 80)) :title The moon delights the night) and you're off to the races without even needing a project created or worrying about editing dependencies. Sean On Mon, Oct 7, 2013 at 8:12 PM, John Gabriele jmg3...@gmail.com wrote: On Monday, October 7, 2013 4:28:57 AM UTC-4, Phillip Lord wrote: Lee Spector lspe...@hampshire.edu writes: Also IMHO (just trying to deflect some flames here) the Clojure ecosystem currently lacks the ideal environment for this. Tend to agree with this also. As nice as leiningen is, Clojure seems to inherit from Java bulky projects. Compare these two hello worlds: (println hello world) to #!/usr/bin/python print( hello world ) Both equivalently simple, up and till the point you actually try to run them. The best I came up with is... java -jar ~/.m2/repository/org/clojure/clojure/1.5.1/clojure-1.5.1.jar hello_world.clj which, of course, depends on me having installed leiningen and used it. For new users who want to get their feet wet right on the first day, I'd suggest this (after they make sure they've got Java installed): #. Download `lein`, drop it into your ~/bin, and `chmod +x` it if necessary, #. `lein version` (so it installs and thus creates ~/.lein directory (see next step)) #. `touch ~/.lein/profiles.clj`, and into that file put `{:user {:plugins [[lein-exec 0.3.1]]}}` (or whatever the current version of [lein-exec] is when you're reading this. :) ) [lein-exec]: https://github.com/kumarshantanu/lein-exec Now you can create your hello world about as simply as with P{erl,ython}: #. create a ~/wherever/foo.clj file, #. into it goes `(println hi)`, then #. run it in the prescribed way: `lein exec foo.clj`. -- John -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ Perfection is the enemy of the good. -- Gustave Flaubert, French realist novelist (1821-1880) -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
Show interactive programing with the REPL. For example implementing a data transformation function incrementally in the REPL. By starting with an example of input. And successively bringing it closer to the final output. (Threading macros work great for that). I showed it to a few java developers who knew only TDD (or worst `public static void main`). Most of them were very impressed On Oct 6, 2013 12:01 AM, bernardH un.compte.pour.tes...@gmail.com wrote: Hi all, I intend to (ab)use my authority as a teacher to enlighten unsuspecting students about Clojure. On the plus side, I may give them insights that they did not even know they needed. On the minus side, I cannot expect (all of) them to be curious about Clojure. Hence, I want to make a demand driven introduction. My goal is to : 1. identify what novelties Clojure brings to the table to Java developers - homoiconicity : macros - syntaxing sugar (e.g -, cond) - programming paradigms as libraries - core.logic - core.async - dynamic typing - simple concurrency handling : - immutable data structures - ref - atoms - STM - open-ended dynamic dispatching (protocols, namespaced vs. monkey patching) - multiple dispatching (multimethods) - maps instead of classes (no privacy accessors needed thx to dynamic typing and immutable data) and composable libraries instead of frameworks. 2. For as many of those features as possible, I'd like to find a minimal use case that will be : - genuinely interesting (so that they find it beliveable that they might actually want to solve a similar problem) - complex (if possible hard!) / tedious to solve in Java (I will provide the Java code) - simple (if possible easy) to solve in Clojure. The idea being that they would conclude from : 1. that the want to solve these problems 2. that Java won't help them much but Clojure would help them a lot (+ 1. 2.) → 3. They want to learn Clojure ! ☺ I'd be most grateful for any help, either to complete/amend my list in 1., or to provide ideas for 2. Best Regards, B. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
2013/10/6 bernardH un.compte.pour.tes...@gmail.com Hi all, I intend to (ab)use my authority as a teacher to enlighten unsuspecting students about Clojure. I've been teaching Clojure for 3 years now in a university course focused on concurrent and parallel programming http://soft.vub.ac.be/~tvcutsem/multicore/. While I give a basic intro to Clojure, I mostly stick to just functions + basic collections + the seq API, and of course atoms/refs/agents. As part of that course, I developed a meta-circular implementation of Clojure's STM https://github.com/tvcutsem/stm-in-clojure. STM is a pretty complex language feature. I found showing students an implementation of STM in Clojure itself helps them to better understand it. Of course, this is beyond an introductory programming course, so YMMV. Regards, Tom -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
John D. Hume duelin.mark...@gmail.com writes: I'd suggest that Clojure's Hello, World! should happen initially at the repl, where leiningen definitely simplifies the UX. lein repl # from any cwd (println ...) which launches nicely into demonstrating dynamic development. Except that the Clojure repl is not persistant; compare this to R for instance: $ lein repl user= (defn fun[] #_= (println hello)) #'user/fun user= (fun) hello nil user= Bye for now! $ lein repl user= (fun) CompilerException java.lang.RuntimeException: Unable to resolve symbol: fun in this context, compiling:(NO_SOURCE_PATH:1:1) $ R hello - function(){ + print(Hello) + } hello function(){ print(Hello) } hello() [1] Hello Save workspace image? [y/n/c]: y $ R [Previously saved workspace restored] hello() [1] Hello With R, the REPL is a user-interface that you can work in over time. With Clojure, the REPL is somewhere you can experiment, but ultimately you have to keep your source in a file. I've tried teaching python using it's repl and you have the same problem there. It's fine for teaching what print hello does, and what 7/2 returns. After that, you have to say now forget that REPL stuff and let's type a file. Phil -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
Guess you have programmed before. Besides which, if I am teaching any significant number of students, I will get the sys admins to do the installation; otherwise, you the first two weeks, you spend running around fixing peoples environment. This kind of nonsense is soul-destroying for new programmers; it's depressing and saps their desire to learn. Old programmers know the tricks to get through this quickly (students never believe me when I tell them that they will still be writing hello world in 10 years time); and besides, most old programmers sold their souls years ago. All aside from the confusion that of to start Clojure, type lein. Does that make any sense? Phil Nando Breiter na...@aria-media.com writes: I'm in the process of trying to Clojure, and the fact that you need to install leiningen (I think ...) isn't a problem. All I need is clear, simple to follow instructions, and an explanation how all this plumbing works, and what its advantages are. I find installation instructions rather easily. Clear explanations about how the dependency plumbing works seem to be a bit lacking up front. Aria Media Sagl Via Rompada 40 6987 Caslano Switzerland +41 (0)91 600 9601 +41 (0)76 303 4477 cell skype: ariamedia On Mon, Oct 7, 2013 at 10:28 AM, Phillip Lord phillip.l...@newcastle.ac.ukwrote: Lee Spector lspec...@hampshire.edu writes: I teach Clojure, to beginning programmers among others. IMHO you really have to specify your audience(s) before any advice about how best to teach Clojure (or programming in general) will make much sense. I'd absolutely agree with this. If you are teaching brand new programmers, then you really don't want to teach clojure at all; you want to teach programming, with the language being somewhat of a detail. You also need to know *why* you are teaching them. I teach differently if I am teaching new programmers hoping to gain a general understanding of computer science, than new programmers who have an immediate practical need. Also IMHO (just trying to deflect some flames here) the Clojure ecosystem currently lacks the ideal environment for this. Tend to agree with this also. As nice as leiningen is, Clojure seems to inherit from Java bulky projects. Compare these two hello worlds: (println hello world) to #!/usr/bin/python print( hello world ) Both equivalently simple, up and till the point you actually try to run them. The best I came up with is... java -jar ~/.m2/repository/org/clojure/clojure/1.5.1/clojure-1.5.1.jar hello_world.clj which, of course, depends on me having installed leiningen and used it. So this may be totally wrong for many of your purposes, but FWIW: https://github.com/lspector/clojinc That's a nice idea. Phil -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- Phillip Lord, Phone: +44 (0) 191 222 7827 Lecturer in Bioinformatics, Email: phillip.l...@newcastle.ac.uk School of Computing Science, http://homepages.cs.ncl.ac.uk/phillip.lord Room 914 Claremont Tower, skype: russet_apples Newcastle University, twitter: phillord NE1 7RU -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
John Gabriele jmg3...@gmail.com writes: For new users who want to get their feet wet right on the first day, I'd suggest this (after they make sure they've got Java installed): #. Download `lein`, drop it into your ~/bin, and `chmod +x` it if necessary, #. `lein version` (so it installs and thus creates ~/.lein directory (see next step)) #. `touch ~/.lein/profiles.clj`, and into that file put `{:user {:plugins [[lein-exec 0.3.1]]}}` (or whatever the current version of [lein-exec] is when you're reading this. :) ) [lein-exec]: https://github.com/kumarshantanu/lein-exec Now you can create your hello world about as simply as with P{erl,ython}: #. create a ~/wherever/foo.clj file, #. into it goes `(println hi)`, then #. run it in the prescribed way: `lein exec foo.clj`. That's interesting, didn't know about lein-exec (although I'm not surprised someone has written it). Phil -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
On Oct 8, 2013, at 02:36, Phillip Lord wrote: Except that the Clojure repl is not persistant; ... Although lein-exec allows re-use of Clojure scripts, it isn't much like a persistent REPL. So, this seems like an obvious opportunity for improvement. I'd love to have a convenient way to save and return to REPL sessions, pass them along to others, etc. One way to implement this would be to use (say) Git to store branches, commits, etc. -r -- http://www.cfcl.com/rdmRich Morin http://www.cfcl.com/rdm/resume r...@cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Software system design, development, and documentation -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
Rich Morin r...@cfcl.com writes: On Oct 8, 2013, at 02:36, Phillip Lord wrote: Except that the Clojure repl is not persistant; ... Although lein-exec allows re-use of Clojure scripts, it isn't much like a persistent REPL. So, this seems like an obvious opportunity for improvement. I'd love to have a convenient way to save and return to REPL sessions, pass them along to others, etc. One way to implement this would be to use (say) Git to store branches, commits, etc. That wouldn't do the full job. R persistance saves *everything* including state. So if you read a dataframe from a file, the dataframe will be available next time even if the file is not. The easiest way to persist this would probably be to pickle the entire runtime and then load it again. Phil -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
Hi Rich, On Tuesday, 8 October 2013 15:18:17 UTC+5:30, Rich Morin wrote: On Oct 8, 2013, at 02:36, Phillip Lord wrote: Except that the Clojure repl is not persistant; ... Although lein-exec allows re-use of Clojure scripts, it isn't much like a persistent REPL. So, this seems like an obvious opportunity for improvement. (I'm the author of lein-exec.) That's definitely an interesting angle. I would think about how best to implement such a thing. Please feel free to raise an issue or send a pull request. One idea could be to launch a Clooj[1] or Clj-SwingREPL[2] instance with the script. [1] https://github.com/arthuredelstein/clooj [2] https://github.com/alandipert/clj-swingrepl Shantanu -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
Hi Phil, 1. Select the text you want auto-indented and press SHIFT+TAB. 2. The documentation tab opens in a new tabset - to close tabsets you right-click on them and choose 'Close tabset'. 3. I haven't discovered a way to disable auto-brackets. 4. Yes, you can access it from the command pane, or you can add a key-binding in your user.keymap. I have mine set to CMD+; with pmeta-; [:toggle-comment-selection]. 5. Won't you need to copy+paste from the console anyway? Why not just grab the part without the filename? 6. Currently you make projects externally (using Leiningen) and then import them into Light Table. 7. This is one downside to having an IDE that's written in Clojure. 8. You can hide evaluations using the command pane and Eval: Clear inline results, or you can add a key-binding in your user.keymap. I have mine set to CMD+SHIFT+BACKSPACE pmeta-shift-backspace [:clear-inline-results] 9. I don't think Light Table has this feature yet. It's worth noting that Light Table is still in the early stages of development, so it doesn't have all of the features of more mature IDEs. However, Chris is going to add plugin support in the next major release, which will remove him as the bottleneck for adding exactly the kind of features you're looking for. I think it's a very exciting time for Light Table. Cheers, James On Tuesday, October 8, 2013 12:00:52 AM UTC+2, Lee wrote: Hi James, I have indeed tried LightTable, and it does indeed seem promising. Really exciting potential. But I've hit enough snags every time I've tried it that I haven't really found it useful (either for teaching or for my own use). I just tried the latest version again, just now, and just for anyone who may care here are my (opinionated, and YMMV) reactions: 1. Is there auto-reindentation? I don't see it. Pretty essential, IMHO. 2. I can close a tab (like the documentation) if I control-click on it, but the pane remains... and I've ended up with lots of panes that I have to quit to get rid of. In general I love the look of the GUI but wish the controls were more obvious/standard in many cases. 3. Can automatic bracket insertion be turned off? It's problematic in my book, especially for newcomers who should be allowed to use the keyboarding skills that they already have. 4. Is there a block comment/uncomment feature? 5. The console output precedes every line with the file that generated it, which means that you can't get a clean output log. Lots of the code that I and my students write is oriented toward producing textual output in the console, and this sort of rules out those uses (unless you want to clean up the output later, which would be a pain). 6. Can I make a new project? I don't immediately see how... (Digression: tried to search the documentation for this but couldn't see how to do the search... I do get a (novel) find pane for my open editor window, but can I make that work for the documentation pane? Can I make it go away? Again, looks cool but I wish it leveraged more common GUI idioms.) 7. A new project created with lein at the command line works, but an older one gives Light Table requires Clojure Version 1.5.1 or higher... I see that that old project used [org.clojure/clojure 1.4.0]... Awkward that this couldn't be run even if the IDE needs something newer for itself... 8. Expressions that produce big values can make it hard to read your code by interspersing the values, which I may not really want to see. 9. Is there anyway to get arglist on space or arglists (and/or documentation) in another pane or a popup or whatever, either as you type or when you hit a particular key? Overall: Very cool in several ways, some glitches or little issues that I could live with, but also quite a few that would be pretty problematic to me personally, for my teaching and/or my own use (specifically 1, 3, 5, 9). Clooj is better on many of these issues, but it has some other weaknesses (esp that it is not maintained very actively, e.g. I don't know if it works with modern leiningen). NightCode is also getting into the running, I think. But from my perspective none of them yet fill the niche that I've been discussing. -Lee PS I'd be in Clojure IDE heaven if someone could provide some version of one of these light-weight Clojure IDEs that also incorporated nrepl-ritz so that we could see the values of locals when we hit exceptions... On Oct 7, 2013, at 4:15 PM, Jernau wrote: Lee, Have you tried Light Table? I think it would be a perfect match for your use-case. Here's a screencast of me using Light Table's Instarepl to teach list comprehension in Clojure. As you will hopefully agree, Light Table's features are a great match for a learning/teaching situation. Light Table's Instarepl works out-of-box after installation, so it'll be easy to get your students up and running. Then, when your
Re: Teaching Clojure to students (how ?)
On Tue, Oct 8, 2013 at 11:41 AM, Phillip Lord phillip.l...@newcastle.ac.ukwrote: Guess you have programmed before. Besides which, if I am teaching any significant number of students, I will get the sys admins to do the installation; otherwise, you the first two weeks, you spend running around fixing peoples environment. This kind of nonsense is soul-destroying for new programmers; it's depressing and saps their desire to learn. Ah, ok. Understood. Point taken. Old programmers know the tricks to get through this quickly (students never believe me when I tell them that they will still be writing hello world in 10 years time); and besides, most old programmers sold their souls years ago. All aside from the confusion that of to start Clojure, type lein. Does that make any sense? Phil To me, this begins to look more like a user interface issue than strictly a programming issue. The folks who do interface design have a technique - pretend it's magic. What would the solution look like if it was magic ( setting all programming considerations aside for the moment) ? The student installs something ... opens something ... and something just works. How would you flesh that out? Aria Media Sagl Via Rompada 40 6987 Caslano Switzerland +41 (0)91 600 9601 +41 (0)76 303 4477 cell skype: ariamedia -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
On Oct 8, 2013, at 8:47 AM, Jernau wrote: Hi Phil, It was I (Lee) who posted those reactions, but hi and thanks! 1. Select the text you want auto-indented and press SHIFT+TAB. Nice. Is this (re)discoverable somehow from the interface? 2. The documentation tab opens in a new tabset - to close tabsets you right-click on them and choose 'Close tabset'. Okay. Now that I see it. I guess I should right-click on things more to discover stuff in the future. 3. I haven't discovered a way to disable auto-brackets. Unfortunate. I realize I may be unusual in this respect, but this will probably keep me from using it in any serious way. 4. Yes, you can access it from the command pane, or you can add a key-binding in your user.keymap. I have mine set to CMD+; with pmeta-; [:toggle-comment-selection]. Ah. I see, and while it didn't work with the commenting style I was using I think it's fine. I haven't done the key binding yet but I think I see how to do that. 5. Won't you need to copy+paste from the console anyway? Why not just grab the part without the filename? Yes, but I will typically generate outputs from many separate calls to println. I'll want to grab all and only what I asked to have printed, and the only way to do that now will come along with a filename on every line, which I'll then have to remove in post processing. Not impossible but a pain and I don't see why it helps to clutter up the output like that. In general, if you're running your code to produce console output then you probably want the output that you asked to be printed, without extra stuff. 6. Currently you make projects externally (using Leiningen) and then import them into Light Table. I think that's fine, but it could be more obvious that this is what you have to do. You can make files without projects, which is a little odd in the first place, but not projects... 7. This is one downside to having an IDE that's written in Clojure. Maybe it's unavoidable, but I would have thought that one JVM instance could be running the IDE and another the user's code, with different versions of Clojure if necessary. But maybe that's more complicated than I would have thought. 8. You can hide evaluations using the command pane and Eval: Clear inline results, or you can add a key-binding in your user.keymap. I have mine set to CMD+SHIFT+BACKSPACE pmeta-shift-backspace [:clear-inline-results] Seems reasonable. Again, I wonder if this could be more easily discoverable (a go away X next to the result?), but I see that it's workable. 9. I don't think Light Table has this feature yet. Understood. FWIW, this is another pretty important one for me and my students. I never remember argument list order, etc., and I've long relied on Lisp environments unobtrusively reminding me of them as I type. It's worth noting that Light Table is still in the early stages of development, so it doesn't have all of the features of more mature IDEs. However, Chris is going to add plugin support in the next major release, which will remove him as the bottleneck for adding exactly the kind of features you're looking for. I think it's a very exciting time for Light Table. Sounds great. I appreciate that it's early days. I'm just providing this feedback in case it helps. And FYI, in light of the clarifications in your reply, I'd be quite likely to switch my teaching and research to LightTable if/when #3, #5, and #9 are addressed (ability to turn off auto-brackets, get unadorned console output, and some form of dynamic arglist info). Thanks so much, -Lee Cheers, James On Tuesday, October 8, 2013 12:00:52 AM UTC+2, Lee wrote: Hi James, I have indeed tried LightTable, and it does indeed seem promising. Really exciting potential. But I've hit enough snags every time I've tried it that I haven't really found it useful (either for teaching or for my own use). I just tried the latest version again, just now, and just for anyone who may care here are my (opinionated, and YMMV) reactions: 1. Is there auto-reindentation? I don't see it. Pretty essential, IMHO. 2. I can close a tab (like the documentation) if I control-click on it, but the pane remains... and I've ended up with lots of panes that I have to quit to get rid of. In general I love the look of the GUI but wish the controls were more obvious/standard in many cases. 3. Can automatic bracket insertion be turned off? It's problematic in my book, especially for newcomers who should be allowed to use the keyboarding skills that they already have. 4. Is there a block comment/uncomment feature? 5. The console output precedes every line with the file that generated it, which means that you can't get a clean output log. Lots of the code that I and my students write is oriented toward producing textual output in the console, and this sort of rules out those uses (unless you want to clean up the
Re: Teaching Clojure to students (how ?)
On Monday, October 7, 2013 8:12:05 PM UTC-7, John Gabriele wrote: For new users who want to get their feet wet right on the first day, I'd suggest this (after they make sure they've got Java installed): #. Download `lein`, drop it into your ~/bin, and `chmod +x` it if necessary, #. `lein version` (so it installs and thus creates ~/.lein directory (see next step)) #. `touch ~/.lein/profiles.clj`, and into that file put `{:user {:plugins [[lein-exec 0.3.1]]}}` (or whatever the current version of [lein-exec] is when you're reading this. :) You don't need a plugin for that actually: $ lein run -m clojure.main/main -i foo.clj Maybe a shell alias or lein alias would be more convenient though. -Phil -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
On Tue, Oct 8, 2013 at 12:30 PM, Lee Spector lspec...@hampshire.edu wrote: 7. This is one downside to having an IDE that's written in Clojure. Maybe it's unavoidable, but I would have thought that one JVM instance could be running the IDE and another the user's code, with different versions of Clojure if necessary. But maybe that's more complicated than I would have thought. It can't be *too* complicated, because recent versions of clooj do it. Indeed you can even kill -9 a hung REPL process and start a fresh one from your open clooj window, without clooj bombing out (the REPL pane will note that the REPL got disconnected, and almost anything you do will restart it in the namespace you're working in. You'll keep history memory (ctrl-uparrow stuff) but need to reload any code and reenter any stuff you did at the REPL to define vars. And avoid whatever hung your REPL before, such as triggering an infinite loop.) -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
Right, there should be no problem doing this - pretty much all the editors/IDEs out there start an external process for the REPL server, and it should be able to use any Clojure version you like, independently of the version used by the IDE itself. On 9 October 2013 08:21, Cedric Greevey cgree...@gmail.com wrote: On Tue, Oct 8, 2013 at 12:30 PM, Lee Spector lspec...@hampshire.eduwrote: 7. This is one downside to having an IDE that's written in Clojure. Maybe it's unavoidable, but I would have thought that one JVM instance could be running the IDE and another the user's code, with different versions of Clojure if necessary. But maybe that's more complicated than I would have thought. It can't be *too* complicated, because recent versions of clooj do it. Indeed you can even kill -9 a hung REPL process and start a fresh one from your open clooj window, without clooj bombing out (the REPL pane will note that the REPL got disconnected, and almost anything you do will restart it in the namespace you're working in. You'll keep history memory (ctrl-uparrow stuff) but need to reload any code and reenter any stuff you did at the REPL to define vars. And avoid whatever hung your REPL before, such as triggering an infinite loop.) -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
On Tuesday, October 8, 2013 12:52:38 PM UTC-4, Phil Hagelberg wrote: On Monday, October 7, 2013 8:12:05 PM UTC-7, John Gabriele wrote: For new users who want to get their feet wet right on the first day, I'd suggest this (after they make sure they've got Java installed): #. Download `lein`, drop it into your ~/bin, and `chmod +x` it if necessary, #. `lein version` (so it installs and thus creates ~/.lein directory (see next step)) #. `touch ~/.lein/profiles.clj`, and into that file put `{:user {:plugins [[lein-exec 0.3.1]]}}` (or whatever the current version of [lein-exec] is when you're reading this. :) You don't need a plugin for that actually: $ lein run -m clojure.main/main -i foo.clj Maybe a shell alias or lein alias would be more convenient though. Thanks Phil! Didn't know you could do that! Wrote up some notes on getting it working: http://www.unexpected-vortices.com/blog/2013/scripts-in-clojure.html -- John -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
Lee Spector lspec...@hampshire.edu writes: I teach Clojure, to beginning programmers among others. IMHO you really have to specify your audience(s) before any advice about how best to teach Clojure (or programming in general) will make much sense. I'd absolutely agree with this. If you are teaching brand new programmers, then you really don't want to teach clojure at all; you want to teach programming, with the language being somewhat of a detail. You also need to know *why* you are teaching them. I teach differently if I am teaching new programmers hoping to gain a general understanding of computer science, than new programmers who have an immediate practical need. Also IMHO (just trying to deflect some flames here) the Clojure ecosystem currently lacks the ideal environment for this. Tend to agree with this also. As nice as leiningen is, Clojure seems to inherit from Java bulky projects. Compare these two hello worlds: (println hello world) to #!/usr/bin/python print( hello world ) Both equivalently simple, up and till the point you actually try to run them. The best I came up with is... java -jar ~/.m2/repository/org/clojure/clojure/1.5.1/clojure-1.5.1.jar hello_world.clj which, of course, depends on me having installed leiningen and used it. So this may be totally wrong for many of your purposes, but FWIW: https://github.com/lspector/clojinc That's a nice idea. Phil -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
On Oct 7, 2013 3:29 AM, Phillip Lord phillip.l...@newcastle.ac.uk wrote: Tend to agree with this also. As nice as leiningen is, Clojure seems to inherit from Java bulky projects. Compare these two hello worlds: (println hello world) to #!/usr/bin/python print( hello world ) Both equivalently simple, up and till the point you actually try to run them. The best I came up with is... java -jar ~/.m2/repository/org/clojure/clojure/1.5.1/clojure-1.5.1.jar hello_world.clj which, of course, depends on me having installed leiningen and used it. I'd suggest that Clojure's Hello, World! should happen initially at the repl, where leiningen definitely simplifies the UX. lein repl # from any cwd (println ...) which launches nicely into demonstrating dynamic development. If your students work with Java, I'd make a point of demonstrating the joy of the Clojure repl + Java interop, useful even when your project is pure Java. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
On Oct 7, 2013, at 9:59 AM, John D. Hume wrote: I'd suggest that Clojure's Hello, World! should happen initially at the repl, where leiningen definitely simplifies the UX. lein repl # from any cwd (println ...) which launches nicely into demonstrating dynamic development. Agreed. But the complexity cliff is at the next step, after the first demo. Then you really want an editor with some basic features like auto-reindentation and bracket matching. In my teaching context the REPL alone will get us through a productive first day of class, but not a second, while something with roughly the feature set of Clooj will get us through the first semester and maybe even years of serious work depending on what kind of work we're doing. -Lee -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
I'm in the process of trying to Clojure, and the fact that you need to install leiningen (I think ...) isn't a problem. All I need is clear, simple to follow instructions, and an explanation how all this plumbing works, and what its advantages are. I find installation instructions rather easily. Clear explanations about how the dependency plumbing works seem to be a bit lacking up front. Aria Media Sagl Via Rompada 40 6987 Caslano Switzerland +41 (0)91 600 9601 +41 (0)76 303 4477 cell skype: ariamedia On Mon, Oct 7, 2013 at 10:28 AM, Phillip Lord phillip.l...@newcastle.ac.ukwrote: Lee Spector lspec...@hampshire.edu writes: I teach Clojure, to beginning programmers among others. IMHO you really have to specify your audience(s) before any advice about how best to teach Clojure (or programming in general) will make much sense. I'd absolutely agree with this. If you are teaching brand new programmers, then you really don't want to teach clojure at all; you want to teach programming, with the language being somewhat of a detail. You also need to know *why* you are teaching them. I teach differently if I am teaching new programmers hoping to gain a general understanding of computer science, than new programmers who have an immediate practical need. Also IMHO (just trying to deflect some flames here) the Clojure ecosystem currently lacks the ideal environment for this. Tend to agree with this also. As nice as leiningen is, Clojure seems to inherit from Java bulky projects. Compare these two hello worlds: (println hello world) to #!/usr/bin/python print( hello world ) Both equivalently simple, up and till the point you actually try to run them. The best I came up with is... java -jar ~/.m2/repository/org/clojure/clojure/1.5.1/clojure-1.5.1.jar hello_world.clj which, of course, depends on me having installed leiningen and used it. So this may be totally wrong for many of your purposes, but FWIW: https://github.com/lspector/clojinc That's a nice idea. Phil -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
Lee, Have you tried Light Table http://www.lighttable.com? I think it would be a perfect match for your use-case. Here's a screencast https://www.youtube.com/watch?v=5lvV9ICwaMo of me using Light Table's Instarepl to teach list comprehension in Clojure. As you will hopefully agree, Light Table's features are a great match for a learning/teaching situation. Light Table's Instarepl works out-of-box after installation, so it'll be easy to get your students up and running. Then, when your students have progressed to wanting to create their own projects, they can install Leiningen and continue to use Light Table (see my Datomic screencast https://www.youtube.com/watch?v=ao7xEwCjrWQfor an example). Kind regards, James On Monday, October 7, 2013 4:19:22 PM UTC+2, Lee wrote: On Oct 7, 2013, at 9:59 AM, John D. Hume wrote: I'd suggest that Clojure's Hello, World! should happen initially at the repl, where leiningen definitely simplifies the UX. lein repl # from any cwd (println ...) which launches nicely into demonstrating dynamic development. Agreed. But the complexity cliff is at the next step, after the first demo. Then you really want an editor with some basic features like auto-reindentation and bracket matching. In my teaching context the REPL alone will get us through a productive first day of class, but not a second, while something with roughly the feature set of Clooj will get us through the first semester and maybe even years of serious work depending on what kind of work we're doing. -Lee -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
Hi James, I have indeed tried LightTable, and it does indeed seem promising. Really exciting potential. But I've hit enough snags every time I've tried it that I haven't really found it useful (either for teaching or for my own use). I just tried the latest version again, just now, and just for anyone who may care here are my (opinionated, and YMMV) reactions: 1. Is there auto-reindentation? I don't see it. Pretty essential, IMHO. 2. I can close a tab (like the documentation) if I control-click on it, but the pane remains... and I've ended up with lots of panes that I have to quit to get rid of. In general I love the look of the GUI but wish the controls were more obvious/standard in many cases. 3. Can automatic bracket insertion be turned off? It's problematic in my book, especially for newcomers who should be allowed to use the keyboarding skills that they already have. 4. Is there a block comment/uncomment feature? 5. The console output precedes every line with the file that generated it, which means that you can't get a clean output log. Lots of the code that I and my students write is oriented toward producing textual output in the console, and this sort of rules out those uses (unless you want to clean up the output later, which would be a pain). 6. Can I make a new project? I don't immediately see how... (Digression: tried to search the documentation for this but couldn't see how to do the search... I do get a (novel) find pane for my open editor window, but can I make that work for the documentation pane? Can I make it go away? Again, looks cool but I wish it leveraged more common GUI idioms.) 7. A new project created with lein at the command line works, but an older one gives Light Table requires Clojure Version 1.5.1 or higher... I see that that old project used [org.clojure/clojure 1.4.0]... Awkward that this couldn't be run even if the IDE needs something newer for itself... 8. Expressions that produce big values can make it hard to read your code by interspersing the values, which I may not really want to see. 9. Is there anyway to get arglist on space or arglists (and/or documentation) in another pane or a popup or whatever, either as you type or when you hit a particular key? Overall: Very cool in several ways, some glitches or little issues that I could live with, but also quite a few that would be pretty problematic to me personally, for my teaching and/or my own use (specifically 1, 3, 5, 9). Clooj is better on many of these issues, but it has some other weaknesses (esp that it is not maintained very actively, e.g. I don't know if it works with modern leiningen). NightCode is also getting into the running, I think. But from my perspective none of them yet fill the niche that I've been discussing. -Lee PS I'd be in Clojure IDE heaven if someone could provide some version of one of these light-weight Clojure IDEs that also incorporated nrepl-ritz so that we could see the values of locals when we hit exceptions... On Oct 7, 2013, at 4:15 PM, Jernau wrote: Lee, Have you tried Light Table? I think it would be a perfect match for your use-case. Here's a screencast of me using Light Table's Instarepl to teach list comprehension in Clojure. As you will hopefully agree, Light Table's features are a great match for a learning/teaching situation. Light Table's Instarepl works out-of-box after installation, so it'll be easy to get your students up and running. Then, when your students have progressed to wanting to create their own projects, they can install Leiningen and continue to use Light Table (see my Datomic screencast for an example). Kind regards, James -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
On Monday, October 7, 2013 4:28:57 AM UTC-4, Phillip Lord wrote: Lee Spector lspe...@hampshire.edu javascript: writes: Also IMHO (just trying to deflect some flames here) the Clojure ecosystem currently lacks the ideal environment for this. Tend to agree with this also. As nice as leiningen is, Clojure seems to inherit from Java bulky projects. Compare these two hello worlds: (println hello world) to #!/usr/bin/python print( hello world ) Both equivalently simple, up and till the point you actually try to run them. The best I came up with is... java -jar ~/.m2/repository/org/clojure/clojure/1.5.1/clojure-1.5.1.jar hello_world.clj which, of course, depends on me having installed leiningen and used it. For new users who want to get their feet wet right on the first day, I'd suggest this (after they make sure they've got Java installed): #. Download `lein`, drop it into your ~/bin, and `chmod +x` it if necessary, #. `lein version` (so it installs and thus creates ~/.lein directory (see next step)) #. `touch ~/.lein/profiles.clj`, and into that file put `{:user {:plugins [[lein-exec 0.3.1]]}}` (or whatever the current version of [lein-exec] is when you're reading this. :) ) [lein-exec]: https://github.com/kumarshantanu/lein-exec Now you can create your hello world about as simply as with P{erl,ython}: #. create a ~/wherever/foo.clj file, #. into it goes `(println hi)`, then #. run it in the prescribed way: `lein exec foo.clj`. -- John -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Teaching Clojure to students (how ?)
Hi all, I intend to (ab)use my authority as a teacher to enlighten unsuspecting students about Clojure. On the plus side, I may give them insights that they did not even know they needed. On the minus side, I cannot expect (all of) them to be curious about Clojure. Hence, I want to make a demand driven introduction. My goal is to : 1. identify what novelties Clojure brings to the table to Java developers - homoiconicity : macros - syntaxing sugar (e.g -, cond) - programming paradigms as libraries - core.logic - core.async - dynamic typing - simple concurrency handling : - immutable data structures - ref - atoms - STM - open-ended dynamic dispatching (protocols, namespaced vs. monkey patching) - multiple dispatching (multimethods) - maps instead of classes (no privacy accessors needed thx to dynamic typing and immutable data) and composable libraries instead of frameworks. 2. For as many of those features as possible, I'd like to find a minimal use case that will be : - genuinely interesting (so that they find it beliveable that they might actually want to solve a similar problem) - complex (if possible hard!) / tedious to solve in Java (I will provide the Java code) - simple (if possible easy) to solve in Clojure. The idea being that they would conclude from : 1. that the want to solve these problems 2. that Java won't help them much but Clojure would help them a lot (+ 1. 2.) → 3. They want to learn Clojure ! ☺ I'd be most grateful for any help, either to complete/amend my list in 1., or to provide ideas for 2. Best Regards, B. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
I wouldn't be too stiff about your list of novelties. It's easy to shrug off homoiconicity (e.g. the syntax) or dynamic typing as 'bad' things. Don't overwhelm starters with complex (but nice) stuff. Don't neglect the obvious: Clojure's API (clojure.core) is *super* simple. Clojure has a really nice easy sequence api and in general is very good with data. Show them how short a simple implementation of 'Game of Life' (with a set of coordinat-tuples) is. That's also a very good way to introduce java-interop (for graphical output, I suspect they already know Java). Maybe my views on this can help you. Cheers, Moritz bernardH writes: Hi all, I intend to (ab)use my authority as a teacher to enlighten unsuspecting students about Clojure. On the plus side, I may give them insights that they did not even know they needed. On the minus side, I cannot expect (all of) them to be curious about Clojure. Hence, I want to make a demand driven introduction. My goal is to : 1. identify what novelties Clojure brings to the table to Java developers - homoiconicity : macros - syntaxing sugar (e.g -, cond) - programming paradigms as libraries - core.logic - core.async - dynamic typing - simple concurrency handling : - immutable data structures - ref - atoms - STM - open-ended dynamic dispatching (protocols, namespaced vs. monkey patching) - multiple dispatching (multimethods) - maps instead of classes (no privacy accessors needed thx to dynamic typing and immutable data) and composable libraries instead of frameworks. 2. For as many of those features as possible, I'd like to find a minimal use case that will be : - genuinely interesting (so that they find it beliveable that they might actually want to solve a similar problem) - complex (if possible hard!) / tedious to solve in Java (I will provide the Java code) - simple (if possible easy) to solve in Clojure. The idea being that they would conclude from : 1. that the want to solve these problems 2. that Java won't help them much but Clojure would help them a lot (+ 1. 2.) → 3. They want to learn Clojure ! ☺ I'd be most grateful for any help, either to complete/amend my list in 1., or to provide ideas for 2. Best Regards, B. -- -- Moritz Ulrich pgpcWyTfKFXAJ.pgp Description: PGP signature
Re: Teaching Clojure to students (how ?)
On Oct 5, 2013, at 15:01, bernardH wrote: 1. identify what novelties Clojure brings to the table to Java developers A while back, I made a start on a page describing Clojure's Key Concepts. There may be some useful stuff there; feel free to email me with comments. -r -- http://www.cfcl.com/rdmRich Morin http://www.cfcl.com/rdm/resume r...@cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Software system design, development, and documentation -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
what about teaching them how to use the tools - like emacs and light table. i find it easier to demonstrate the value of something by just using it... And explaining the language constructs as you go along... Like writing a simple web app - say with the ring stack, or doing some animations with quil. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
Hi, If I were a programming teacher, I would have students re-realize what one can achieve with programing in general at the start because people's action always come from their inner motivation. To enumerate concrete benefits and success story like TV shopping may be effective. Without motivation, all interesting knowledge will vaporize. Immutable? It must be something great! but I don't care. Cheers, Takahiro 2013/10/6 bernardH un.compte.pour.tes...@gmail.com Hi all, I intend to (ab)use my authority as a teacher to enlighten unsuspecting students about Clojure. On the plus side, I may give them insights that they did not even know they needed. On the minus side, I cannot expect (all of) them to be curious about Clojure. Hence, I want to make a demand driven introduction. My goal is to : 1. identify what novelties Clojure brings to the table to Java developers - homoiconicity : macros - syntaxing sugar (e.g -, cond) - programming paradigms as libraries - core.logic - core.async - dynamic typing - simple concurrency handling : - immutable data structures - ref - atoms - STM - open-ended dynamic dispatching (protocols, namespaced vs. monkey patching) - multiple dispatching (multimethods) - maps instead of classes (no privacy accessors needed thx to dynamic typing and immutable data) and composable libraries instead of frameworks. 2. For as many of those features as possible, I'd like to find a minimal use case that will be : - genuinely interesting (so that they find it beliveable that they might actually want to solve a similar problem) - complex (if possible hard!) / tedious to solve in Java (I will provide the Java code) - simple (if possible easy) to solve in Clojure. The idea being that they would conclude from : 1. that the want to solve these problems 2. that Java won't help them much but Clojure would help them a lot (+ 1. 2.) → 3. They want to learn Clojure ! ☺ I'd be most grateful for any help, either to complete/amend my list in 1., or to provide ideas for 2. Best Regards, B. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
In my opinion it is probably a mistake to focus on the language features in the beginning. They will be meaningless. My approach would be to ask them to write a simple chess program. They have to learn to do conditional statements, iteration, work with data structures, and do I/O. They have to parse simple input (K-P4), and draw a simple ascii chessboard using --- characters. They also have the opportunity, though not the need, to do recursion in either depth-first or breadth-first search. The game is small, it doesn't have to have any strategy beyond make the next legal move but could be more complex. In that way you'll get to see who has a handle on the language. You'll also be able to suggest improvements by citing examples from their code. Anonymous examples can be shown to the class to illustrate ideas for improvements. You can move from simple optimizations to very complex ideas (e.g. concurrent threads searching for suggested moves, memoization of board positions, learning by self-modification to play better games, etc.). Once they get past the point where they have to look up every single function they will be able to use the language. This approach isn't Clojure specific. I've used it for several languages and it seems to work well. Tim Daly -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Teaching Clojure to students (how ?)
I teach Clojure, to beginning programmers among others. IMHO you really have to specify your audience(s) before any advice about how best to teach Clojure (or programming in general) will make much sense. FWIW in my context one of the most important things is to get them started in an environment that is trivial to install and use, yet which allows them to scale up from initial exercises to real work. Also IMHO (just trying to deflect some flames here) the Clojure ecosystem currently lacks the ideal environment for this. The closest I've found is Clooj... (I'm resisting the temptation to digress on the weaknesses, from my perspective, of Clooj and every other currently available environment... but if you're curious or especially if you want feedback on something new along these lines please let me know.) Beyond that, I've been starting my Clojure teaching with a long saved REPL session that builds from zero to the kind of programming that I'm often trying to help students to do, which has a lot more to do with AI than with Java or web stuff or most of the other things that (I gather, from the community surveys) most Clojure programmers do. So this may be totally wrong for many of your purposes, but FWIW: https://github.com/lspector/clojinc -Lee On Oct 5, 2013, at 6:01 PM, bernardH wrote: Hi all, I intend to (ab)use my authority as a teacher to enlighten unsuspecting students about Clojure. [etc] -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.