Re: ICFP 2009 / ICFP 2010
There's one question that came up when I implemented this. Is there a way to get the name of a clojure function, when all I have is the function object? Is it stored alongside the function? I didn't see any metadata or anything. Would I really have to reverse lookup the name in some namespace maps? Functions don't have to have names: (fn [] (println I'm anonymous!)) If you have a symbol you can get the name, though: (name ') = or (str ') = The former will print only the name. The latter will print the namespace, too, if the symbol has one. Does that help? -- 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
Re: ICFP 2009 / ICFP 2010
On 12 June 2010 04:51, Eugen Dück eu...@dueck.org wrote: I put the first part of my implementation online: http://read-eval-puke.blogspot.com/2010/06/icfp-2009-orbit-binary-file-reader.html so anyone who's interested do have a look. Interesting, thanks! There's one question that came up when I implemented this. Is there a way to get the name of a clojure function, when all I have is the function object? Is it stored alongside the function? I didn't see any metadata or anything. Would I really have to reverse lookup the name in some namespace maps? In 1.2, defn-created functions have :name metadata. I mean the fns themselves, not only the Vars. In 1.1, functions can't have metadata attached to them, so if you're planning to use that, this won't help. At any rate, for whichever reason, fn-created functions currently have no :name metadata even if explicitly given a name, e.g. (meta (fn foo [] :foo)) = nil. Still, one can interrogate a function to find out its name in the following super-clumsy way (not to say there isn't a better way -- just my first shot): (defn fn-name [the-fn] (- (.toString the-fn) (.split #\$) next second (.split #_) first)) (fn-name (fn foo [] :foo)) ; = foo (fn-name (fn [] :foo)) ; = fn ; generic response for anonymous fns I wonder if perhaps the reflection api might provide a cleaner way to get at this information... Sincerely, Michał -- 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
ICFP 2009 / ICFP 2010
I plan on doing ICFP 2010 next weekend in clojure (1.1), if the problem is interesting. In preparation, I'm currently doing the (implementation-wise) crucial bits of last year's contest. I put the first part of my implementation online: http://read-eval-puke.blogspot.com/2010/06/icfp-2009-orbit-binary-file-reader.html so anyone who's interested do have a look. It would be great to see others participating in this year's contest! I found last year's problem really interesting - implementing a vm and a binary file parser and then using it to solve the actual problems. You can form teams of any size. And if I get any good suggestions (you can comment in my blog), I'll work them into the code, so it can be used as a cheat sheet in case we get similar problems this year. There's one question that came up when I implemented this. Is there a way to get the name of a clojure function, when all I have is the function object? Is it stored alongside the function? I didn't see any metadata or anything. Would I really have to reverse lookup the name in some namespace maps? The hack I'm currently using is a reverse-lookup map that I manually fill with all the functions that I need, which is only a few: user= (def fn-to-name { = = = = = = }) #'user/fn-to-name user= (fn-to-name ) Cheers Eugen -- 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
Re: ICFP 2009 / ICFP 2010
BTW, there will also be a 24h lightning round for those who can't waste an extended weekend. On Jun 12, 11:51 am, Eugen Dück eu...@dueck.org wrote: I plan on doing ICFP 2010 next weekend in clojure (1.1), if the problem is interesting. In preparation, I'm currently doing the (implementation-wise) crucial bits of last year's contest. I put the first part of my implementation online:http://read-eval-puke.blogspot.com/2010/06/icfp-2009-orbit-binary-fil... so anyone who's interested do have a look. It would be great to see others participating in this year's contest! I found last year's problem really interesting - implementing a vm and a binary file parser and then using it to solve the actual problems. You can form teams of any size. And if I get any good suggestions (you can comment in my blog), I'll work them into the code, so it can be used as a cheat sheet in case we get similar problems this year. There's one question that came up when I implemented this. Is there a way to get the name of a clojure function, when all I have is the function object? Is it stored alongside the function? I didn't see any metadata or anything. Would I really have to reverse lookup the name in some namespace maps? The hack I'm currently using is a reverse-lookup map that I manually fill with all the functions that I need, which is only a few: user= (def fn-to-name { = = = = = = }) #'user/fn-to-name user= (fn-to-name ) Cheers Eugen -- 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
Re: Anyone planning on using Clojure for ICFP 2009?
On Thu, Jun 11, 2009 at 2:54 AM, Sethseth.schroe...@gmail.com wrote: So the 12th International Conference on Functional Programming is coming up soon. A few months before the event a programming contest is held, typically with very ambitious requirements in a short period of time (2-3 days). The 2009 contest will be held from Friday 26 to Monday 29 June and I would be surprised if they tightly restrict the acceptable languages. I submitted a fair/poor entry in Ruby last year (team Foognostic). I apologize if I've missed the obvious, but is anyone planning on using Clojure for the contest? There was a thread about this recently. http://groups.google.com/group/clojure/search?group=clojureq=ICFP -- Michael Wood esiot...@gmail.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Anyone planning on using Clojure for ICFP 2009?
So the 12th International Conference on Functional Programming is coming up soon. A few months before the event a programming contest is held, typically with very ambitious requirements in a short period of time (2-3 days). The 2009 contest will be held from Friday 26 to Monday 29 June and I would be surprised if they tightly restrict the acceptable languages. I submitted a fair/poor entry in Ruby last year (team Foognostic). I apologize if I've missed the obvious, but is anyone planning on using Clojure for the contest? Link to the ICFP 2009 contest site: http://www.ittc.ku.edu/icfp-contest/ Here is a copy of the task description from 2008: http://smlnj.org/icfp08-contest/task.html --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Anyone planning on using Clojure for ICFP 2009?
I'm going to do what I did last year: 1. Learn a functional language (Clojure this year; OCaml last year). 2. Try to do the the problem in said new language. 3. Give up and switch to Python. :) On Jun 11, 1:54 am, Seth seth.schroe...@gmail.com wrote: So the 12th International Conference on Functional Programming is coming up soon. A few months before the event a programming contest is held, typically with very ambitious requirements in a short period of time (2-3 days). The 2009 contest will be held from Friday 26 to Monday 29 June and I would be surprised if they tightly restrict the acceptable languages. I submitted a fair/poor entry in Ruby last year (team Foognostic). I apologize if I've missed the obvious, but is anyone planning on using Clojure for the contest? Link to the ICFP 2009 contest site:http://www.ittc.ku.edu/icfp-contest/ Here is a copy of the task description from 2008:http://smlnj.org/icfp08-contest/task.html --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: ICFP 2009
Just an update on this thread - it turns out my wife and I are out of town at a wedding the weekend of the contest this year, so if anyone wants to organize a clojure team, don't depend on me to organize it. Good luck! On Thu, Apr 23, 2009 at 1:34 PM, Jason Wolfe jawo...@berkeley.edu wrote: I'm interested, although I'm not sure if I'll be around that weekend. I've done quite well in past TopCoder-style contests (where I've had to use Java); it would be fun to do a competition in Clojure. -Jason --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: ICFP 2009
Sounds like a fun thing to try. Could someone give a brief description of what would be required in terms of time commitment to participate on a team? (Sadly, spare time is hard to come by...) It's just one weekend. As much or as little time as you can commit to for that weekend. --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---
Re: ICFP 2009
On Apr 23, 8:59 am, Andrew Wagner wagner.and...@gmail.com wrote: Sounds like a fun thing to try. Could someone give a brief description of what would be required in terms of time commitment to participate on a team? (Sadly, spare time is hard to come by...) It's just one weekend. As much or as little time as you can commit to for that weekend. Although being competitive requires pretty much all waking hours during that weekend :) Rich --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---
Re: ICFP 2009
On Thu, Apr 23, 2009 at 11:04 AM, Rich Hickey richhic...@gmail.com wrote: On Apr 23, 8:59 am, Andrew Wagner wagner.and...@gmail.com wrote: Sounds like a fun thing to try. Could someone give a brief description of what would be required in terms of time commitment to participate on a team? (Sadly, spare time is hard to come by...) It's just one weekend. As much or as little time as you can commit to for that weekend. Although being competitive requires pretty much all waking hours during that weekend :) Rich And some non-waking hours! :) Paul --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---
Re: ICFP 2009
I'm interested, although I'm not sure if I'll be around that weekend. I've done quite well in past TopCoder-style contests (where I've had to use Java); it would be fun to do a competition in Clojure. -Jason --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---
Re: ICFP 2009
On Apr 20, 10:42 pm, Andrew Wagner wagner.and...@gmail.com wrote: It would be fun to have a team of clojure programmers work on the ICFP '09 contest. Has this been done previously? Anybody interested? I'm new to clojure and to lisps in general, but have a pretty good grasp of functional programming (mostly from haskell). It would be great fun to work with some more experienced clojure developers. Here's a sample of a previous task, from 2008:http://smlnj.org/icfp08-contest/task.html I think it would be great if a Clojure team could have a go. Rich --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---
Re: ICFP 2009
On Apr 22, 4:55 am, Rich Hickey richhic...@gmail.com wrote: I think it would be great if a Clojure team could have a go. Rich Interestingly, in the 11 year history of the ICFP contest, a Lisp variant never won, not even a third prize (unless you consider Dylan a Lisp), and not for lack of trying. http://en.wikipedia.org/wiki/ICFP_Programming_Contest --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---
Re: ICFP 2009
On Mon, Apr 20, 2009 at 10:42 PM, Andrew Wagner wagner.and...@gmail.com wrote: It would be fun to have a team of clojure programmers work on the ICFP '09 contest. Has this been done previously? Anybody interested? I'm new to clojure and to lisps in general, but have a pretty good grasp of functional programming (mostly from haskell). It would be great fun to work with some more experienced clojure developers. Here's a sample of a previous task, from 2008: http://smlnj.org/icfp08-contest/task.html I spent a day on last year's contest, but failed to talk anybody else into helping: https://projects.cecs.pdx.edu/~jgmorris/icfpc08/index.cgi/wiki/TeamPages#Chouser --Chouser --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---
Re: ICFP 2009
On Wed, Apr 22, 2009 at 10:49 PM, Chouser chou...@gmail.com wrote: On Mon, Apr 20, 2009 at 10:42 PM, Andrew Wagner wagner.and...@gmail.com wrote: It would be fun to have a team of clojure programmers work on the ICFP '09 contest. Has this been done previously? Anybody interested? I'm new to clojure and to lisps in general, but have a pretty good grasp of functional programming (mostly from haskell). It would be great fun to work with some more experienced clojure developers. Here's a sample of a previous task, from 2008: http://smlnj.org/icfp08-contest/task.html Sounds like a fun thing to try. Could someone give a brief description of what would be required in terms of time commitment to participate on a team? (Sadly, spare time is hard to come by...) Cheers, Victor Rodriguez. I spent a day on last year's contest, but failed to talk anybody else into helping: https://projects.cecs.pdx.edu/~jgmorris/icfpc08/index.cgi/wiki/TeamPages#Chouser --Chouser --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---
Re: ICFP 2009
Try your hand at one of the older contests, like this one: http://www.boundvariable.org/task.shtml --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---
ICFP 2009
It would be fun to have a team of clojure programmers work on the ICFP '09 contest. Has this been done previously? Anybody interested? I'm new to clojure and to lisps in general, but have a pretty good grasp of functional programming (mostly from haskell). It would be great fun to work with some more experienced clojure developers. Here's a sample of a previous task, from 2008: http://smlnj.org/icfp08-contest/task.html --~--~-~--~~~---~--~~ 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 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 -~--~~~~--~~--~--~---