Re: Interest in a Full Featured Clojure Blog Engine

2013-07-20 Thread Chris Allen
http://github.com/bitemyapp/neubite/ Could probably use a WYSIWYG editor, beyond that, pretty serviceable. On Thursday, July 18, 2013 7:24:06 AM UTC-7, frye wrote: > > Hello, > > I'm thinking of how to build a composable blogging engine in Clojure. > There have been a few attempts at this, with

Re: Proposed change to let-> syntax

2013-07-20 Thread Korny Sietsma
It'd be better, when coming up with great ideas, if you didn't reply to 15-month-old threads as if they were recent! It makes for very confusing reading in most mail clients. Better to start a new thread, if you feel like the discussion is still relevant. - Korny On 19 Jul 2013 22:28, "Daniel Dinn

Re: Introducing a new SQL migration library for clojure / jdbc

2013-07-20 Thread Plínio Balduino
Thank you, Chris I think it will be very useful for my next project. Regards Plínio On Sat, Jul 20, 2013 at 7:19 PM, Chris Kuttruff wrote: > When starting a project to create a clojure blog with > ring/compojure/hiccup, I quickly found myself looking for an SQL migration > library to use. > >

Introducing a new SQL migration library for clojure / jdbc

2013-07-20 Thread Chris Kuttruff
When starting a project to create a clojure blog with ring/compojure/hiccup, I quickly found myself looking for an SQL migration library to use. There are some interesting projects out there, but I found myself wanting the following features: - A standard up/down migration method setup (so

Re: Interest in a Full Featured Clojure Blog Engine

2013-07-20 Thread Timothy Washington
Cool. I'm very open to any help you can offer. Right now, I'm working through: - if / how to attach assets (images, etc) to .rtf or .md file formats (see here ) - how to cleanly model entity rel

Re: Socket.IO and Clojure?

2013-07-20 Thread Anand Prakash
BTW one more thing. If I am building anything serious. Anything which might be user facing and could potentially be used by even thousands of users, I would never consider Socket.IO. I just feel that it's a super hack which tries to do too many things with no guarantees on anything. On Saturday

Re: Socket.IO and Clojure?

2013-07-20 Thread Christopher Martin
Shameless plug: I recently shared a Clojure library for WebSockets and HTTP Kit: http://cljwamp.us It provides some features similar to Socket.IO in regards to pubsub/multiplexing events, and uses the WAMP spec which has several multi-platform options: http://wamp.ws/implementations While clj

Re: Interest in a Full Featured Clojure Blog Engine

2013-07-20 Thread Timothy Washington
On Sat, Jul 20, 2013 at 1:13 AM, James Ashley wrote: > > From the peanut gallery: > > I think this basic idea sounds fabulous. I've been kicking clojure's > tires, and I keep meaning to slap a blog engine together. But then I go > into tailspin because I want to blog about the experience, but my b

Re: Socket.IO and Clojure?

2013-07-20 Thread Anand Prakash
This is an awesome discussion. Hope this leads to some good frameworks in the community. I was looking at Socket.IO webpage and they seem to support the following: Websocket, Adobe Flash Socket, AJAX long polling, AJAX multipart streaming, Forever Iframe, JSONP polling. I understand some people

Re: concat primitive arrays

2013-07-20 Thread Brian Craft
Here are some experiments that aren't polymorphic. The System/arraycopy version is fastest, by far. Is there any good way to make the other versions faster, or make them handle any array type? (defn bconcat [& arrays] (let [sizes (map count arrays) sizes_r (vec (reductions + sizes))

Re: separate namespace for extra-special forms?

2013-07-20 Thread Cedric Greevey
Shouldn't the "macro?" case have an (eval ...) wrapped around the (apply ...)? On Sat, Jul 20, 2013 at 4:19 PM, Gary Verhaegen wrote: > fn and let are macros in the clojure.core namespace; & is technically not > a valid character in a symbol, but the Clojure reader is quite lenient on > that fro

concat primitive arrays

2013-07-20 Thread Brian Craft
Is there an easy, fast way to concat primitive arrays? I was hoping java arrays had some common interface for this, but I haven't found much of use. I mostly see code like this: byte[] c = new byte[a.length + b.length]; System.arraycopy(a, 0, c, 0, a.length); System.arraycopy(b, 0, c, a.length,

Re: separate namespace for extra-special forms?

2013-07-20 Thread Gary Verhaegen
fn and let are macros in the clojure.core namespace; & is technically not a valid character in a symbol, but the Clojure reader is quite lenient on that front. As far as I know, it is not treated as anything special at the level of the language, it is just interpreted by the destructuring macros.

Re: java interop: passing int[]

2013-07-20 Thread Brian Craft
I've been looking at hiphip, though it's not clear to me how it's related to h2 user functions. ;) It wasn't immediately clear to me if hiphip handles multidimensional matix operations. On Saturday, July 20, 2013 9:32:50 AM UTC-7, Alex Fowler wrote: > > BTW, take a look > http://blog.getprisma

Re: java interop: passing int[]

2013-07-20 Thread Brian Craft
I don't think proxy creates a named class, though. I believe h2 looks up user functions via a string naming the class. On Saturday, July 20, 2013 9:31:38 AM UTC-7, Alex Fowler wrote: > > So, out of what you're saying - you want to implement an interface, > without adding new methods - I strongly

Re: java interop: passing int[]

2013-07-20 Thread Alex Fowler
So, out of what you're saying - you want to implement an interface, without adding new methods - I strongly suggest using proxy and delegate all the type-resolution hassle to JVM (just rely on it). If you are really sure you need specifying types explicitly, then use type hints and dedicated cl

Re: Interest in a Full Featured Clojure Blog Engine

2013-07-20 Thread Manuel Paccagnella
Interesting +1 I've slammed together some quick and dirty Clojure code and wrote my own little blog engine (I'll not link the repo, the code is... well quick&dirty: I needed something running quickly). But it has the bare minimum and I didn't find any real feature complete blog engine as the on

Re: primitive array casts

2013-07-20 Thread Softaddicts
Type hints are given so the compiler can optimize the generated code by assuming first that the value passed will be of the type hint. It does not preclude you from passing something that is not what the hint says it should be. In this case the usual behavior is to use reflection on the value cl

Re: java interop: passing int[]

2013-07-20 Thread Alex Fowler
BTW, take a look http://blog.getprismatic.com/blog/2013/7/10/introducing-hiphip-array-fast-and-flexible-numerical-computation-in-clojure суббота, 20 июля 2013 г., 17:42:36 UTC+4 пользователь Brian Craft написал: > > I'm trying to write a user function for h2. I think that means I need > gen-clas

Re: java interop: passing int[]

2013-07-20 Thread Cedric Greevey
That would specify an array of boxed ints. If you want an array of primitive ints, I think that's [I instead. On Sat, Jul 20, 2013 at 9:42 AM, Brian Craft wrote: > I'm trying to write a user function for h2. I think that means I need > gen-class, but I'm extremely fuzzy on how java class loadin

Re: [ANN] REST in Peace 0.1.0

2013-07-20 Thread Sebastian Rojas
Link to repository https://github.com/sebastiansen/rip On Friday, July 19, 2013 7:03:18 PM UTC-4, Sebastian Rojas wrote: > > A library for RESTFul applications built on top of Compojure, includes > routing abstractions with reverse routing functionalities and validation > helpers. -- -- You r

Re: primitive array casts

2013-07-20 Thread Brian Craft
Can you explain this more? In the second example, it's unhappy because a vector is not a primitive array? And I don't understand the idea of a "soft hint". It looks like "this may be ints", but that's true without the hint. So what is the hint doing? On Saturday, July 20, 2013 2:31:50 AM UTC-7,

Re: java interop: passing int[]

2013-07-20 Thread Brian Craft
I'm trying to write a user function for h2. I think that means I need gen-class, but I'm extremely fuzzy on how java class loading works. Perhaps my question is moot, because I just ran across this obscure note in a gen-class example: ;; declare only new methods, not superclass methods If I'm

Can't get namespace metadata

2013-07-20 Thread Alexander Yakushev
Example: user=> (meta (find-ns 'clojure.set)) nil user=> (meta (find-ns 'clojure.string)) nil user=> (meta (find-ns 'clojure.core)) {:doc "Fundamental library of the Clojure language"} clojure.core is the only namespace that has metadata. Apparently because it has metadata set differently https

Re: Making RPCs with Shoreleave

2013-07-20 Thread Alex Fowler
That wasn't hte case either. After some buzz with ddellacosta and others on #clojure, it was found that the RPC call is unable to find that very remote procedure I was requesting. Then I have verified that all is properly stored in the remote procedures registry on backend and that the front end

Re: primitive array casts

2013-07-20 Thread Michał Marczyk
Also, ^foo-style hints are "soft hints" in the following sense: (let [^ints xs [1 2 3]] xs) ; no complaint from compiler or RTE In contrast, ints & Co. demand that the casts be correct: (let [xs (ints [1 2 3])] xs) ; ClassCastException On 20 July 2013 11:29, Michał Marczyk wrote: > More compl

Re: java interop: passing int[]

2013-07-20 Thread Alex Fowler
Some questions to clarify things up: Do you mean - how do you create that type of value or how do you generatte a method that accepts that very type? Are you sure you need to use gen-class and not proxy or reify? суббота, 20 июля 2013 г., 7:28:03 UTC+4 пользователь Brian Craft написал: > > For

async.core : how to process (match) sequences of events ?

2013-07-20 Thread bernardH
Dear Clojurians, I'm currently wrapping my head around core.async and it seems really great to process events from various souces. However, I don't currently see how I could use it for my use case. I want to make a kind of multiplayer action game with "combos" moves for sequences of input events

Re: [ANN] REST in Peace 0.1.0

2013-07-20 Thread bernardH
On Saturday, July 20, 2013 3:21:47 AM UTC+2, Steven Degutis wrote: > > https://github.com/sebastiansen/rip > > Thanks ! I'll be implementing RESTful ws this summer and intended to use http://clojure-liberator.github.io/liberator/ . How does your library compares to it ? Any advice on how to ma

Re: primitive array casts

2013-07-20 Thread Michał Marczyk
More complete example: (defn get-some-ints [] (int-array [1 2 3])) (set! *warn-on-reflection* true) ;; causes a reflection warning (let [xs (get-some-ints)] (aget xs 0)) ;; do not cause reflection warnings (let [xs (ints (get-some-ints))] (aget xs 0)) (let [xs ^ints (get-some-ints)] (a

Re: primitive array casts

2013-07-20 Thread Michał Marczyk
I think it's more about clojure.core/{ints,longs,...}. These are basically tools for removing reflection: (let [xs (ints (get-some-ints))] (aget xs 0)) ; no reflection here thanks to the cast Cheers, Michał On 20 July 2013 10:47, Mikera wrote: > Do you mean something like (int-array [1 2 3

Re: primitive array casts

2013-07-20 Thread Mikera
Do you mean something like (int-array [1 2 3 4])? This is a cast-like operation that produces a primitive array of ints, exactly like int[] in Java. You can then use it with array operations like "aget". If you want to type-hint int-array parameters then you need to use something like "^ints"