[ANN] map-regexps, regexps for map seqs instead of text

2015-03-26 Thread Oskar Kvist
Hi! (let [a {:a 1} b {:b 1}] (map-regexps/re-seq "{:a 1}+" [a b a a])) > ([{:a 1}], [{:a 1} {:a 1}]) Check out https://github.com/oskarkv/map-regexps I hope you find it useful! This is my very first public library, so feel free to give comments and critique about anything and everything. I'

Re: Vim+fireplace+lein repl+tools.namespace give: "nREPL: namespace not found"

2014-05-02 Thread Oskar Kvist
05:16:41PM -0700, Oskar Kvist wrote: > > Hi guns, thanks for your input! > > > > I see, but it only happens from within Vim, not if I run `ctnr/refresh` > in > > the repl outside vim. I made an issue on fireplace's github that > describes > > how to repr

Re: Vim+fireplace+lein repl+tools.namespace give: "nREPL: namespace not found"

2014-05-02 Thread Oskar Kvist
06:59 PM UTC+2, Oskar Kvist wrote: > > Hi! > > I'm using Vim, vim-fireplace, `lein repl`, and tools.namespace. > > When I run `(tools.namespace.repl/refresh)` from within vim via fireplace, > it usually (perhaps always) works the first time. Say there is a simple >

Re: Vim+fireplace+lein repl+tools.namespace give: "nREPL: namespace not found"

2014-05-02 Thread Oskar Kvist
Although, sometimes it works. I don't know exactly what conditions triggers it. Maybe it depends on where the error is, what type of error it is, or something else. Sigh. On Friday, May 2, 2014 6:06:59 PM UTC+2, Oskar Kvist wrote: > > Hi! > > I'm using Vim, vim-firep

Re: Vim+fireplace+lein repl+tools.namespace give: "nREPL: namespace not found"

2014-05-02 Thread Oskar Kvist
And to be clear, the fireplace issues that I found when searching for a solution have all been fixed and closed. On Friday, May 2, 2014 6:06:59 PM UTC+2, Oskar Kvist wrote: > > Hi! > > I'm using Vim, vim-fireplace, `lein repl`, and tools.namespace. > > When I run `(tools

Vim+fireplace+lein repl+tools.namespace give: "nREPL: namespace not found"

2014-05-02 Thread Oskar Kvist
Hi! I'm using Vim, vim-fireplace, `lein repl`, and tools.namespace. When I run `(tools.namespace.repl/refresh)` from within vim via fireplace, it usually (perhaps always) works the first time. Say there is a simple error like a misspelled word. The second time I try to run `(tools.namespace.re

Re: A Design (Simplification) Problem

2013-11-15 Thread Oskar Kvist
Thank you everyone for your input! @James Hm, I think I understand what you mean. Interesing idea, I will think some more about it. @Sacha Ah, yes, of course. I don't know why I didn't think of it. Probably because I had I similar idea when I first started out but discarded it for some forgo

A Design (Simplification) Problem

2013-11-13 Thread Oskar Kvist
Hi! I'm making an MMORPG. For those of you not into games, MMORPG is short for massively multiplayer online role-playing game. That means that hundreds of players can connect to the same server and play a role playing game simultaneously. There is of course a big game state on the server that chan

"I don't feel the absence of a debugger, because I've learnt enough that I don't ever need a debugger."

2013-05-27 Thread Oskar Kvist
Stuart Halloway said in his video Clojure in the Field ( http://www.infoq.com/presentations/Clojure-tips) from March 1, 2013 (I think): "I don't feel the absence of a debugger because I've learnt enough that I don't ever need a debugger." I am very intrigued by that statement. What does he (or y

Re: Coding while running the program

2013-03-24 Thread Oskar Kvist
. This allows you > to change the game without recompiling the entire engine unnecessarily. > > > On Mar 23, 2013, at 5:06 PM, Oskar Kvist > > wrote: > > John: I don't really understand why you say it's a waste of time. Speeding > up the feedback cycle seems g

Re: Coding while running the program

2013-03-23 Thread Oskar Kvist
s or something else that's fun. > > Look, I'm not trying to be mean, but unless you have a specific goal in > mind, then > this new feature is a waste of time :) . > > On Sat, Mar 23, 2013 at 12:20 PM, Oskar Kvist > > wrote: > >> It's not about looking

Re: Coding while running the program

2013-03-23 Thread Oskar Kvist
eature to make something > entertaining :) . > > I'm making a game with a tool called GameMaker. Not as full-featured or > powerful as with a programming language? Sure, but then I want to first > have a game under my belt, then I'll worry about looking cool in the > process

Coding while running the program

2013-03-23 Thread Oskar Kvist
Hi! I saw this video http://www.youtube.com/watch?v=BES9EKK4Aw4 of Notch coding on Minecraft while the game was running, and of course seeing the changes in the running program. He used some kind of debug mode in his IDE (I don't really know which IDE). I want to make a game, and I want to to a

Re: Strange behavior with future

2012-12-30 Thread Oskar Kvist
Oh, now I understand! I close the stream (in the with-open) in the main thread before the other thread got a chance to play it. On Monday, December 31, 2012 3:49:25 AM UTC+1, Oskar Kvist wrote: > > Ok, here is some more code: > > The line (-> in Player. .play) nil)) in the first f

Re: Strange behavior with future

2012-12-30 Thread Oskar Kvist
(recur (shutdown-agents)) On Monday, December 31, 2012 12:12:09 AM UTC+1, Moritz Ulrich wrote: > > Laziness might be your problem, but that wouldn't explain (println > "called") working without a deref. > > Can you show a bit more code around this call

Strange behavior with future

2012-12-29 Thread Oskar Kvist
Hi! I'm trying to play a sound in my application, using http://www.javazoom.net/javalayer/documents.html that lib. Anyway, I tried playing the sound in a future, so the main thread would not block while playing, like so: (future (-> in Player. .play)). But if I don't deref the future, the soun

Designing for Simplicity

2012-11-17 Thread Oskar Kvist
Hi! I have listened to Rich's presentation Simple Made Easy, and he has convinced me of the virtures of simplicity. However, I am not so good at designing simple stuff myself. Writing things down makes me think more clearly, and I was also hoping that you can help me by giving some input and c

Re: Nasty java interop problem -- ideas?

2011-08-12 Thread Oskar Kvist
Oh yes, of course. Why didn't I think of that? For some reason, implementing 2 interfaces never occurred to me. :P On Aug 12, 4:48 pm, David Powell wrote: > > The simplest so far seems to be to use gen-interface to create a > > subinterface of Controller with all the methods I need, or gen-class.

Nasty java interop problem -- ideas?

2011-08-12 Thread Oskar Kvist
Hi! I have the following problem. I'm using a Java lib for making GUIs. One lays out the GUI in XML, then uses a Controller (Listener type thing) to do stuff. For example, in the XML one might have onClick="doSomething()". And then reflection is used to find the method of the controller instance.

Re: Predicate problem

2011-08-02 Thread Oskar Kvist
I'm stupid today... I meant: (contains? #{(int 1)} (long 1)) false On Aug 2, 10:19 am, Oskar Kvist wrote: > Btw, that should be fixed in 1.3 I think. > > On Aug 2, 10:18 am, Oskar Kvist wrote: > > > > > > > > > Sorry, didn't read your post pr

Re: Predicate problem

2011-08-02 Thread Oskar Kvist
Btw, that should be fixed in 1.3 I think. On Aug 2, 10:18 am, Oskar Kvist wrote: > Sorry, didn't read your post properly. Maybe it's because the ints are > of different types. > > (contains? [(int 1)] (long 1)) > false > > On Aug 2, 10:13 am, Oskar Kvist wrote:

Re: Predicate problem

2011-08-02 Thread Oskar Kvist
Sorry, didn't read your post properly. Maybe it's because the ints are of different types. (contains? [(int 1)] (long 1)) false On Aug 2, 10:13 am, Oskar Kvist wrote: > "Returns true if _key_ is present in the given collection, otherwise > returns false." > &g

Re: Predicate problem

2011-08-02 Thread Oskar Kvist
"Returns true if _key_ is present in the given collection, otherwise returns false." For sets like #{200, 210} the values also count as keys. On Aug 2, 10:10 am, Petr Gladkikh wrote: > I spent hour already and can not understand what is wrong here. > > I want to filter collection based on a nest