6 ms·
Clojure Agents
- st3fan 18y ago'''Flockr is slow. I would profile it, but profiling in Java is a pain''' - weird ... that is not my experience. I've had nothing but excellent results with profilers on Java code. On the microsecond level.
- st3fan 18y agoOh ... nevermind ... I was just reading his 'First stab at Clojure' post on the same blog where he writes: "First of all, I’ve never programmed in any lisp dialect. Second of all, I’ve never programmed in Java." Yeah. I guess profiling is a pain if you have never actually worked with Java before. Duh.
- jmtulloss 18y agoThe problem is there doesn't seem to be an accepted, open source profiler I can just drop in and start seeing some results. There probably is, but I haven't come up with a good way of finding these tools for Java. Being a Python guy, it's often quite frustrating to have to fight so much to find tools, and then fight so much to get them to work in the environment.
- st3fan 18y agoEclipse and Netbeans come with pretty good profilers. You can also get one of the commercial ones. I really like your Clojure blog entries btw. I am very excited to start doing similar stuff.
- jm4 18y agoI haven't found a good open source profiler so I ended up buying a commercial one. The prices are pretty steep, but they are willing to negotiate. A quick email saying it's difficult to justify $499 for a commercial license when I'm just a lone developer resulted in one vendor discounting the product to $99. It ended up being less than an academic license.
- Tichy 18y agoWhat is Flockr?
- jmtulloss 18y agoIt's a silly little twitter portal I'm building for the express purpose of learning clojure. Basically, it aggregates different twitter searches into "channels". There's an intro here: http://justin.harmonize.fm/index.php/2009/03/first-stab-at-learning-clojure/ http://justin.harmonize.fm/index.php/2009/03/first-stab-at-l... This article is the sixth in the series, which you can see here: http://justin.harmonize.fm/index.php/tag/learning-clojure/ http://justin.harmonize.fm/index.php/tag/learning-clojure/
- davidw 18y agoI was thinking that it would be a really cool hack to twiddle an open source Java vm to give it a scheduler like Erlang's, in order to not rely on threads. It would not be a simple hack, but you could potentially do some very cool things with it. Erlang style "processes" are much cheaper than threads.
- pmjordan 18y agoIn the early days of Java, threads were actually lightweight threads that were scheduled in user space. They changed them to true OS threads somewhere along the way, which helps in multiprocessor situations, but I'd love to still have the green threads around as a tool. I don't know enough about the JVM to have any idea how tricky it would be to hack it in; I suspect calling out into a C library that calls setcontext() is going to make the JVM rather unhappy.
- davidw 18y agoCalling out into C or other potentially blocking calls is one of the things Erlang treats very carefully - the scheduler by itself isn't enough. To really make Erlang turn over nicely, you have to isolate contact with external libraries, usually in other Erlang nodes (real, OS level processes). Kind of strange, but very robust.
- pmjordan 18y agoIt makes sense, really; C code can really mess with managed systems like that, and by the sounds of it, Erlang deals with it gracefully. Unfortunately, the JVM feels a little too monolithic for my liking with regard to processes; it's more unixy than .NET, certainly, and I guess that's the price you pay for a VM that sophisticated.
- jmtulloss 18y agoI wonder if it would be more practical in .NET. They have this idea of Application Domains that I've never needed to fully understand, so never have. Perhaps you could hack that into a Erlang style process model?