Re: anyone in Santa Cruz?
On Mar 27, 2014, at 10:21 AM, Brian Craft wrote: > Looking for clojure users in the Santa Cruz, Ca area who are interested in a > meetup, study group, etc. > I’m in Sunnyvale and using Clojure occasionally. Not exactly Santa Cruz, but I travel there often. -- ST4096-RIPE signature.asc Description: Message signed with OpenPGP using GPGMail
Re: JRE/JVM for development
On Jan 29, 2014, at 6:58 PM, Mikera wrote: > The real issue issue is loading / initialisation of Clojure code after JVM > startup - i.e. loading clojure.core and the (potentially large) graph of > required namespaces. This quickly becomes noticeable if you are using a large > set of libraries in your project. Right, because it needs to compile all this code. Disabling JIT usually shaves off a lot of time: on my machine running clojure -e "(+ 1 2)" in client jvm take 1.5 seconds, while taking only 1 second if -Xint is specified (which runs JVM in the interpreter mode). -- ST4096-RIPE -- -- 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: JRE/JVM for development
On Jan 29, 2014, at 1:44 PM, ton...@gmail.com wrote: > Are there any Java VMs strictly for development use that could be started up > quicker, use less memory or compile clojure during execution? Alternatively > can OpenJDK or similar be configured to do so? I don't care about application > performance during development. > You may try turning off JIT compilation. That should decrease the startup time. I'm not aware of any other modern Java VMs with faster startup times, unfortunately. :( -- ST4096-RIPE -- -- 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: Do web apps need Clojure?
On Nov 14, 2013, at 3:28 AM, Sean Johnson wrote: > Agreed. This is a huge point. And not just in lowered hosting costs, but also > potentially a better user experience (lower latency). I am actually not sure how true it is. While the raw throughput of JVM applications is indisputably much higher than those based on non JVM ruby virtual machines, in my experience the response latency in JVM is much more unpredictable and have a much higher worst case. I believe this is due to the fact that ruby HTTP servers tend to spawn multiple processes to handle requests which lead to a per-process garbage collection, and thus to shorter pauses. At least that was true for all the applications I built around Sinatra. I never used rails, so cannot comment on that. Regarding multithreading, modern ruby implementations like rubinius are completely multithreaded and it's up to the application code to take advantage of it. However, the lack of proper multiprocessing primitives in the language and lack of multithreading in the ruby interpreters for a long time lead to libraries and frameworks designed around the asynchronous abstraction and are generally not thread-safe. So in practice, it's very hard to take advantage of that support. For me, the biggest advantage of using ruby vs clojure for web development comes from the development standpoint. While I love clojure as a language, which is arguably a much more powerful and better designed language than ruby is, it suffers from the typical problems any JVM platform has: 1) long startup time. While there are workarounds to this problem like using a persistent vm, it's still a hassle compared to a non-jvm platform where one does not even have to think about it; 2) horrible dependencies management. In jvm world you have to use maven or ant style jar artifacts, which are tarballs with compiled java classes inside. Those have no versions in them, so when something breaks you cannot easily debug the issue just by looking at the corresponding line of code like one does in ruby: I routinely have to decompile class file to look at the code to try to figure out what broke (I even set up mc to invoke jad(1) automatically when I view a class file). The lack of versions in classfiles lead to another problem: you are never sure that the jars hosted on the public artifact sites correspond to the code versions they advertise, I found it to be not true in a lot of cases and spent hours debugging issues which were not present in the actual source code of the library I used. There is also no verification of who uploads those jar files to the artifactory and you cannot AFAIK provide maven or ant with the checksum of the artifact you want, so those are as safe to use as running a random code downloaded from the internet. Unfortunately, it seems that the only way to do development on the jvm platform at the time is to set up your own artifactory and set up an automated build for each dependency version you are using. :-(. Which slows develoment a lot. Another issue I often face is that class files are not namespaced via symbol versioning like native libraries are. That is the entire JVM application has to use a specific dependency version for all it's code. What happens if some library you use uses a different dependency version than you need? You end up maintaining a fork. Some of this is true for ruby libraries as well, but late binding, relaxed version specifications and generally better API stability in ruby world makes this issue rare. And if it happens, it's much easier to submit a fix upstream and rely on it, at least in my experience. 3) General lack of decent tools. The only jvm debugger, jdb, while nice, does not allow you to attach to an already running process like gdb would. Profiling tools are pretty much GUI only so won't allow you to collect profiled data in an automated way. The same goes to JMX counters: you can only collect them by using a gui application, or by using java API; there are no command line tools provided in standard distribution which complicates ad-hoc monitoring and collection. There are no easy to use tools or APIs to work with bytecodes, jars, manifests and so on either. I guess the bottom line is that jvm does not play well with the outside world and you pretty much have to commit to JVM platform if you want to use it for development. Any interoperation with other platforms and OS services was a big hassle for me. I hope that clojurejs on nodejs will make the life much easier in that regard. As as a side note, I used erlang/webmachine for one of my recent projects and found the experience quite pleasant. While the language is not as powerful as clojure or any other kind of lisp is and metaprogramming capabilities are quite limited, it is very easy to spawn pro
Re: getting a stack trace
On Oct 18, 2013, at 12:35 PM, Brian Craft wrote: > ah, sorry, that's a shell tool? I meant dumping a stack trace from code. > Throwing & catching works, it's just a bit goofy. Like > > (defn- stack-trace [msg] > (try > (throw (IllegalArgumentException. msg)) > (catch IllegalArgumentException e > (stacktrace/print-stack-trace e Seems like what you want is ,--- | (Thread/dumpStack) `--- . -- ST4096-RIPE signature.asc Description: Message signed with OpenPGP using GPGMail
Re: IDE feature
On Aug 8, 2013, at 5:44 AM, Lee Spector wrote: > Agreed. But good brace/paren *matching* (highlighting the mate and/or > unmatched brackets) solves this problem without all the downsides (IMHO) of > paredit. I too had a similar experience. Often when writing code I don't even produce it in the LISP form but more like a freehand drawing, and then, if the idea turned out to be valid, correct the syntax and put in the parenthesis. Paren matching helps me to do it without any effort by showing which parens are complimentary and, more importantly, without getting in the way. Having said that, paredit can be a great tool depending on your editing habits. One should definitely try it to see if it works for him, but saying it is a panacea for balancing parens/braces is a bit for stretch as other tools solve this problem as well. -- ST4096-RIPE -- -- 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: Walking a tree
On Jul 6, 2013, at 9:33 AM, looselytyped wrote: > Good morning everyone! > > I have a problem that I have been struggling with for a few days now. I have > a directed acyclic graph that I am trying to walk, and can't seem to figure > out a to prevent my walking already visited branches. Here is the code > > (def values > [{:v "a" :parent ["b"]} >{:v "b" :parent ["c"]} >{:v "c" :parent ["d" "e"]} >{:v "d" :parent ["f"]} >{:v "e" :parent ["f"]} >{:v "f"}]) It sounds like what you have here is not a directed acyclic graph. In DAGs all links are directed and there are no cycles. > > As you can see, I have a vector of records, each with a "value" and a vector > of "parent"s. A node can have more than zero or more parents. > > a o >| > b o >| > c o >|\ > d o o e >|/ > f o > You might want to look at standard graph traversal algorithms, like DFS and BFS [1]. I'd also suggest to store links to childs instead of links to parents, so you don't have to traverse it backwards, though for undirected graph there's no difference . [1] http://en.wikipedia.org/wiki/Graph_traversal -- ST4096-RIPE -- -- 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: lein repl and missing yank
On Wed, 26 Jun 2013 19:31:49 -0400 Cedric Greevey mentioned: > Have you tried control-V, which has been the industry standard paste key > binding for at least the past 20 years? Legacy bindings from before user > interfaces started becoming more standardized will not typically work > outside of the particular legacy applications (in your case, apparently > emacs) where they originated. The Clojure REPL, being rather younger than > 20 years, is probably using the standardized "CUA" bindings on all > platforms. > Huh? C-v is only standard on Windows and clones. Manuel, regarding the question, I think you need some kind of wrapper around the clojure repl to get a line editing functionality. rlwrap may or may not do it. Another possibility is to run the repl in emacs, so you get all line editing features. -- Stanislav Sedov ST4096-RIPE () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments -- -- 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.