Re: Why do map/get and similar return nil if not found?

2016-01-12 Thread Dennis Haupt
i agree with the fast fail camp if a value is nil but is not supposed to be, i want the program to immediately tell me about that instead of telling me later and force me to trace it back. in scala, this is solved by providing 2 methods. one that gives you a result or crashes, one that maybe gives

Re: DSL in RTL (Right to Left) languages.

2015-01-14 Thread Dennis Haupt
i encountered a "german" progamming language once. it was terrible. everybody should stick to english when it comes ot programming - you have to do it anyway, and there is no reason not to go ahead and learn a language since that is what brains are built for 2015-01-14 17:11 GMT+01:00 Jesse Alama

Re: Considering dropping Eclipse 3.x support for counterclockwise

2014-12-04 Thread Dennis Haupt
yuno 2014-12-04 11:45 GMT+01:00 Laurent PETIT : > The following Eclipse names are 3.x based : Indigo, Helios, Galileo > > The following are 4.x based : Juno, Kepler, Luna > > 2014-12-04 11:17 GMT+01:00 Laurent PETIT : > >> Hello, >> >> Eclipse 4.x has been around for many years now, and I'm cons

Re: shenandoah

2014-03-13 Thread Dennis Haupt
i also did an asteroid game in clojure. i don't think you can ever achieve the performance of hackedyhack-mutablility with pure functional algorithms - my approach to get the best performance while staying as clean as possible would be to keep two copies of the game world, using one as source data

Re: Do I have to have knowlegde about Lisp

2014-03-10 Thread Dennis Haupt
you can learn clojure without learning lisp first :) 2014-03-10 15:41 GMT+01:00 Roelof Wobben : > Hello, > > I like the idea of Clojure but I wonder if I have to know a lot of Lisp to > work with Clojure. > > What is the best way to go from a absolute beginner to someone who can > work with Cloj

Re: why my java code (call clojure from java ) run spend so much loooooog time .

2014-02-13 Thread Dennis Haupt
give your vm more memory 2014-02-13 17:02 GMT+01:00 Xiaojun Weng : > I am a new clojure player,but i have wrote java code by few years. > > when i use emacs run my clojure code (read a big file 50M ) , nrepl run > over use 30 second. > but i use lein uberjar clojure to jar .and i use it jar i

Re: JRE/JVM for development

2014-01-29 Thread Dennis Haupt
my vm starts up within a second or so, what's the problem for you? 2014-01-29 > 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 car

Re: equality

2014-01-27 Thread Dennis Haupt
one does not simply compare floating point numbers for equality 2014-01-27 Eric Le Goff > Newbie question : > > user=> (= 42 42) > true > user=> (= 42 42.0) > false > > I did not expect last result. > > I understand that underlying classes are not the same > i.e > user=> (class 42) > java.lang.

Re: Read Microsoft Word .doc files in Clojure

2014-01-02 Thread Dennis Haupt
use apache poi and write a small wrapper or something this is what i did 2014/1/2 Joshua Mendoza > Hi!, > > I've been looking for libraries or resources to read MS .doc files in > Clojure, but found none. Does anyone have tried, used, encountered or > witnessed such a thing to read them? > > I

some clojure experience

2013-12-31 Thread Dennis Haupt
i solved a few little thingy with clojure now, including some euler problems, java interop and an asteroids clone. my summary would be: * very nice to write +1. i used clojure's collections for a lot of things, and they made a good impression * you need to plan far ahead compared to java. in java,

Re: Is Clojure right for me?

2013-12-26 Thread Dennis Haupt
exactly which part of OOP is missing in clojure that you would like to use? if you took my java code and ported it to clojure, the main difference would be (a b) instead of b.a , but the main design would be similar 2013/12/26 Massimiliano Tomassoli > On Thursday, December 26, 2013 7:51:39 PM U

Re: How to go about 'proving' why dynamically typed languages are better.

2013-12-20 Thread Dennis Haupt
in my mental world, there is a "pure human", and a 4 armed human would probably be a 95% human or something, just like a hobbit would be. the other way round, a human would be a "95% hobbit". an elephant would be 4% hobbit on that scale. this model is flexible, covers everything, and is not really

Re: How to go about 'proving' why dynamically typed languages are better.

2013-10-09 Thread Dennis Haupt
especially haskell & scala are missing in your list :) as long as you haven't at least seen haskell, you haven't seen the creme de la creme of statically typed languages 2013/10/9 Softaddicts > Let's see: > > strong data typing: > > Fortran > Cobol > Pl/1 > Pascal > C/C++ > Java > C# > Ruby > >

Re: How to go about 'proving' why dynamically typed languages are better.

2013-10-09 Thread Dennis Haupt
let's see... really used: sql java javascript basic pascal/delphi scala experimented with: logo (some old language intended to teach people to make their first steps) haskell kotlin clojure seen in action: php groovy still prefer smart static typing :D 2013/10/9 Nando Breiter > >> The best

Re: How to go about 'proving' why dynamically typed languages are better.

2013-10-08 Thread Dennis Haupt
while i can see the strengths of both sides, the ideal solution is imho this: everything is statically typed. always. but you *never* have to write the type explicitly. you *can* do it, but it is always optional. i made good experiences with both scala and haskell (although i just wrote minor thi

Re: too circular?

2013-08-29 Thread Dennis Haupt
thx again 2013/8/30 Bruno Kim Medeiros Cesar > This exact use case is covered by letfn, which creates a named fn > accessible to all function definitions and the body. That even allows > mutual recursive definitions without declare. Your example would be > > (defn fib-n [n] >(letfn [(fib [

Re: profiler?

2013-08-27 Thread Dennis Haupt
yep, yourkit 2013/8/27 Jay Fields > What are you all using these days? I've been using YourKit and I'm > fairly happy with it. Just making sure I'm not missing out on some new > hotness. > > Cheers, Jay > > -- > -- > You received this message because you are subscribed to the Google > Groups "C

Re: too circular?

2013-08-27 Thread Dennis Haupt
thx 2013/8/26 Marshall Bockrath-Vandegrift > Dennis Haupt writes: > > > (defn fib-n [n] > > (let [fib (fn [a b] (cons a (lazy-seq (fib b (+ b a)] > > (take n (fib 1 1 > > > > can't i do a recursion here? how can i achieve this without doing

too circular?

2013-08-26 Thread Dennis Haupt
(defn fib-n [n] (let [fib (fn [a b] (cons a (lazy-seq (fib b (+ b a)] (take n (fib 1 1 can't i do a recursion here? how can i achieve this without doing an "outer defn"? -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to thi

Re: can't compile anything except "def"

2013-06-23 Thread Dennis Haupt
d > occasional problems with it. > > > On 23 June 2013 02:29, Dennis Haupt <mailto:d.haup...@gmail.com>> wrote: > > it happens with both clojure 1.5.1 and 1.4.0. when intellij tries to > compile clojure files, something strange happens. if i remove the >

Re: multimethods for non constant values?

2013-06-23 Thread Dennis Haupt
alues > )) > ;; dispatch on the dispatch values > (defmethod x :less-then-10 [x] (do )) > > Hope it helps > > Las > > > 2013/6/23 Dennis Haupt > >> i found example that i can do >> (defmethod x 5 [y] (do stuff)) >> >> but can i do >&

multimethods for non constant values?

2013-06-23 Thread Dennis Haupt
i found example that i can do (defmethod x 5 [y] (do stuff)) but can i do (defmethod #(< % 10) [y] (do stuff)) somehow? like in a pattern match of haskell/scala? -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: multimethod noob question

2013-06-22 Thread Dennis Haupt
"identity" :) 2013/6/22 Chris Bilson > Dennis Haupt writes: > > > yes. all glory to the repl that makes me figure out the internals via > experiments :D > > is there a way to just pass the given value along? > > Yes, that's what I meant by my inspec

Re: multimethod noob question

2013-06-22 Thread Dennis Haupt
ere stuff is the "match" and stuff2 is the complete set of original arguments? can you provide an example where stuff2 has more information than stuff? for fac, both are equal thx :D 2013/6/22 Dennis Haupt > yes. all glory to the repl that makes me figure out the internals

Re: multimethod noob question

2013-06-22 Thread Dennis Haupt
yes. all glory to the repl that makes me figure out the internals via experiments :D is there a way to just pass the given value along? 2013/6/22 Chris Bilson > Dennis Haupt writes: > > > i am not trying anything, i just want to figure out what happens. this > is my output

Re: can't compile anything except "def"

2013-06-22 Thread Dennis Haupt
it happens with both clojure 1.5.1 and 1.4.0. when intellij tries to compile clojure files, something strange happens. if i remove the option to compile the files (and instead just use clojure.main and run them) there is no problem 2013/6/22 Jim - FooBar(); > On 22/06/13 15:21, Dennis Ha

Re: can't compile anything except "def"

2013-06-22 Thread Dennis Haupt
running the file works (from inside intellij), just intellijs compilation seems to be broken i can ignore the problem for now 2013/6/22 Dennis Haupt > clojure jvm, intellij's repl. i'll try to run the file via commandline and > see what happens > > > 2013/6/22

Re: can't compile anything except "def"

2013-06-22 Thread Dennis Haupt
clojure jvm, intellij's repl. i'll try to run the file via commandline and see what happens 2013/6/22 Jim - FooBar(); > On 22/06/13 15:16, Dennis Haupt wrote: > >> i don't know what "properly set up the environment" means exactly, but i >> can

Re: multimethod noob question

2013-06-22 Thread Dennis Haupt
13-14-15-16-17-18-19-20-21-22-23-24-25-26-27-28-until stackoverflow 2013/6/22 Chris Bilson > Dennis Haupt writes: > > > i was taking a look at multimethods: > > (defmulti fac int) > > (defmethod fac 1 [_] 1) > > (defmethod fac :default [n] (*' n (fac (

Re: can't compile anything except "def"

2013-06-22 Thread Dennis Haupt
i don't know what "properly set up the environment" means exactly, but i can run my script in the repl 2013/6/22 Jim - FooBar(); > On 22/06/13 15:09, Dennis Haupt wrote: > >> where the line number is pointing at a line that contains something that >> is declare

can't compile anything except "def"

2013-06-22 Thread Dennis Haupt
hi, i'm trying to compiler a clojure file using intellij. the error i get is: Clojure Compiler: java.io.IOException: The system cannot find the path specified, compiling:(D:\cloj\MultiMethod.clj:3) where the line number is pointing at a line that contains something that is declared in core.clr if

multimethod noob question

2013-06-22 Thread Dennis Haupt
hi, i was taking a look at multimethods: (defmulti fac int) (defmethod fac 1 [_] 1) (defmethod fac :default [n] (*' n (fac (dec n this works however, this also works: (defmulti fac print) (defmethod fac 1 [_] 1) (defmethod fac :default [n] (*' n (fac (dec n what exactly is "int" or "pr

Re: clojure diffs

2013-06-07 Thread Dennis Haupt
intellij can do exactly what you want 2013/6/7 Moocar > Hi all, > > Diffs for clojure code (and lisps in general) can be hard to read. Every > time we wrap a form, any lines below are indented. The resulting diff just > shows that you've deleted lines and added lines, even though you've only >

Re: Why is this code so slow?

2013-02-03 Thread Dennis Haupt
without looking at the code: ranges in scala have been optimized in i think 2.10 to be able to be inlineable completely when you iterate over them. at runtime, it *should* be equal to a simple while loop and a counter variable Am 03.02.2013 14:28, schrieb Jules: > The Scala version is probably fas

Re: is intellij idea a good ide for clojure development?

2013-01-29 Thread Dennis Haupt
Am 29.01.2013 23:05, schrieb Phil Hagelberg: > > Jay Fields writes: > >> On Tue, Jan 29, 2013 at 11:45 AM, Laurent PETIT >> wrote: >>> Hello Jay, >>> >>> I'd like to learn a little bit more from what makes you prefer emacs >>> over IntelliJ. >>> As the main developer of Counterclockwise, I'm I

Re: is intellij idea a good ide for clojure development?

2013-01-29 Thread Dennis Haupt
i don't know emacs, so i would like to know as well what the killer features are that make you more productive with emacs 2013/1/29 Laurent PETIT > Hello Jay, > > I'd like to learn a little bit more from what makes you prefer emacs > over IntelliJ. > As the main developer of Counterclockwise, I

is intellij idea a good ide for clojure development?

2013-01-28 Thread Dennis Haupt
the only ides i have used so far for clojure are intellij idea and netbeans. is there one that is a lot better? if yes, why? i am not interested in details or single features, i just want to know if there is some magic editor out there that i should look into because it is *obviously a lot* better

max doesn't return max?

2012-12-12 Thread Dennis Haupt
maybe i am blind, but why does max return the complete lazy seq here instead of the maximum number? if i just print as-products, i get a list of numbers. (count solution) tells me there are 1000+ and yet max gives me the complete list? (ns euler.Problem8) (def digits "73167176531330624919225119

Re: why is nth called here?

2012-12-12 Thread Dennis Haupt
if anyone is interested, i used reduces instead of reductions. 2012/12/11 Dennis Haupt > i just saw my error :/ > > > Am 11.12.2012 22:22, schrieb Ben Wolfson: > > nth is called in doing the destructuring for the argument lists in > > your fns defined in try-find-

Re: why is nth called here?

2012-12-11 Thread Dennis Haupt
i just saw my error :/ Am 11.12.2012 22:22, schrieb Ben Wolfson: > nth is called in doing the destructuring for the argument lists in > your fns defined in try-find-sequence. > > On Tue, Dec 11, 2012 at 1:20 PM, Dennis Haupt wrote: >> i am trying to solve euler problem

why is nth called here?

2012-12-11 Thread Dennis Haupt
i am trying to solve euler problem 125. when i tested this code: (ns euler.Problem125) (defn is-palindrome [n] (let [s (str n)] (= (seq s) (reverse s (defn to-check [] (filter is-palindrome (range 1 1000))) (defn square-root [n] (Math/sqrt n)) (defn squared [n] (* n n)) (defn

Re: help choosing dev environment for clojure

2012-11-25 Thread Dennis Haupt
can you give a few examples that should convince a lot of people on the spot? Am 25.11.2012 17:57, schrieb Jay Fields: > I spent 3 years doing Clojure (for prod apps) in IntelliJ. 3 months ago > I switched to emacs - and would never go back. > > If the idea of customizing your dev environment to

Re: Efficiency of Dijkstra's algorithm

2012-11-21 Thread Dennis Haupt
i used a java priorityqueue for this. it's mutable (but local), and since you're not going to access he queue with more than in thread you can hide this fact and still pretend to be functional. i did it. in reality, cheats are always allowed. 2012/11/21 Sergey Didenko > I have used mutable code

Re: Clojure to Haskell Compiler

2012-11-17 Thread Dennis Haupt
why not just use haskell instead? i doubt you can just convert the code Am 17.11.2012 19:31, schrieb Ahmed Shafeeq Bin Mohd Shariff: > Hi guys, > > I've been frustrated with Clojure's slow speed on the JVM. I've been > thinking of how it can be compiled to native and I feel that compiling > C

Re: Clojure : a good start for non-programmers?

2012-09-25 Thread Dennis Haupt
basically anything except brainfuck is a good idea :) Am 26.09.2012 06:45, schrieb Leonardo Borges: > Hi Gregorius! > > I think Clojure is a great way to start to learn to program! Clojure > is a flavour of lisp and so is Scheme - which has been used for > decades to teach programming to MIT unde

Re: language shootout / the phonecode study

2012-09-23 Thread Dennis Haupt
i did not need the hint to develop a correct solution. the hint just clarifies what could have been misunderstood. Am 23.09.2012 21:03, schrieb Mark Engelberg: > I agree that Odersky's version doesn't match the spec. Hint or no hint, > it doesn't look like he even attempts to address the issue of

Re: language shootout / the phonecode study

2012-09-22 Thread Dennis Haupt
now. Am 22.09.2012 18:22, schrieb David Nolen: > On Sat, Sep 22, 2012 at 11:27 AM, Dennis Haupt <mailto:d.haup...@gmail.com>> wrote: > > here's my solution: > https://gist.github.com/3766508 > > the original (done in 2 hours) solution is commented out.

Re: language shootout / the phonecode study

2012-09-22 Thread Dennis Haupt
here's my solution: https://gist.github.com/3766508 the original (done in 2 hours) solution is commented out. i made some improvements and solved the whole thing in 39 lines (counting only the content of "main"). doing it in the minimal amount of lines was not my goal. i was trying to minimize the

Re: language shootout / the phonecode study

2012-09-20 Thread Dennis Haupt
i came to a correct solution without that hint :) just like in reality, i started coding without reading the spec. a few surprises came along the way ("what? they want it like this? they just added this to mock me!") i spent about 50% of the time writing code and 50% thinking about it. i'll tell m

Re: language shootout / the phonecode study

2012-09-20 Thread Dennis Haupt
Thursday, September 20, 2012 5:07:52 PM UTC+2, David Nolen wrote: > > On Thu, Sep 20, 2012 at 10:52 AM, Dennis Haupt > > wrote: > > i stumbled upon this: > http://page.mi.fu-berlin.de/prechelt/phonecode/ > <http://page.mi.fu-berlin.de/prec

Re: language shootout / the phonecode study

2012-09-20 Thread Dennis Haupt
asured, no debugging, fixing and so on) i'll have to think about that 2012/9/20 David Nolen > On Thu, Sep 20, 2012 at 10:52 AM, Dennis Haupt > wrote: > >> i stumbled upon this: >> http://page.mi.fu-berlin.de/prechelt/phonecode/ >> >> the results: >> http

language shootout / the phonecode study

2012-09-20 Thread Dennis Haupt
i stumbled upon this: http://page.mi.fu-berlin.de/prechelt/phonecode/ the results: http://page.mi.fu-berlin.de/prechelt/Biblio/jccpprt_computer2000.pdf summary: concise languages bashed c, c++ and java if you look at the time needed to complete the program. however, in 1999, there were no good id

Re: 'functional' performance VS 'imperative' complexity

2012-08-25 Thread Dennis Haupt
+1 i stay functional if possible and fall back to mutable on isolated, performance critical spots if i can't get it done fast enough in a purely functional way. i solved the move-mess-up-everything problem by forcing a move to implement both apply and unapply on a game board. (it was a java proje

Re: real-world usage of reducers?

2012-08-21 Thread Dennis Haupt
i assume you are coming from a java background? if so, every time you wrote this: Result result = null; for (Stuff s:stuffList) { if (result ==null) result = ... result.cuddleWith(s); } return result a reducer would have been a functional alternative to this Am 21.08.2012 13:04, schrieb Jim - F

Re: 'last' on empty collections

2012-07-01 Thread Dennis Haupt
i'd do (actually, i did) it like this: (my-special-last coll) -> returns the last element or throws an exception if there is none (my-special-last coll if-empty) -> in case of an empty collections, ifEmpty is returned Am 01.07.2012 21:47, schrieb Warren Lynn: > Right now > > (last []) => nil >

Re: Boolean

2012-04-07 Thread Dennis Haupt
i've never seen a "new Boolean(...)" in my 10 years of developing java code. Am 07.04.2012 22:49, schrieb Michael Klishin: > Steven Obua: > >> (if (Boolean. false) "jesus" "christ") >> >> will return "jesus", not "christ". Googling this on the net, I found >> that this is a known phenomenon > >

Re: Boolean

2012-04-07 Thread Dennis Haupt
why is there an exception for Boolean.FALSE? Am 07.04.2012 17:28, schrieb Softaddicts: > Hi, > > You are not in the Clojure play ground when you use (Boolean. false). > > This expression creates a Java object, hence (if any-java-object ...) > always evaluate the "true" branch in Clojure. > > In

Re: Best IDE

2012-01-19 Thread Dennis Haupt
> I would love it if La Clojure got more love, but I'm not holding my breath. > > On Wed, Jan 18, 2012 at 4:00 PM, Dennis Haupt > wrote: > > when i say "debugging", i mean "inspect fields and evaluate expressions". > > > > i attached a scree

Re: Best IDE

2012-01-18 Thread Dennis Haupt
Am 18.01.2012 21:10, schrieb Sean Corfield: > On Wed, Jan 18, 2012 at 10:42 AM, Dennis Haupt > wrote: >> there is no really good ide (analysis, error highlighting, debugging) > > Hmm, I have error highlighting and debugging. Not sure what you mean > by "analysis&quo

Re: Best IDE

2012-01-18 Thread Dennis Haupt
there is no really good ide (analysis, error highlighting, debugging) Am 18.01.2012 17:18, schrieb Jay Fields: > Use emacs, if you want the path of least resistance for writing pure > clojure code. You'll have the most support from the community. > > Use whatever IDE you already use for Java, if

Re: are non programmers the better programmers?

2012-01-18 Thread Dennis Haupt
let's call it the "biased experience effect". if there are 20 ways to solve a problem, and you just know 3 of them, you are a hammer and the problem looks like a nail. if you have a broader knowledge, you can pick a more appropriate solution. what i claim is that if you know NO solutions, the one y

Re: are non programmers the better programmers?

2012-01-17 Thread Dennis Haupt
Am 17.01.2012 23:08, schrieb daly: > On Tue, 2012-01-17 at 21:46 +0100, Dennis Haupt wrote: >> after the "wtf"s have worn off a bit, go on reading. >> imagine a simple problem: you have a collection of numbers and you have >> to write a function which collects all

Re: are non programmers the better programmers?

2012-01-17 Thread Dennis Haupt
Am 17.01.2012 22:46, schrieb James Reeves: > On 17 January 2012 20:46, Dennis Haupt wrote: >> i've noticed this since i started to work as a programmer 10 years ago. >> programmers in general are supposed to be good at finding simple >> solutions, but my experienc

Re: are non programmers the better programmers?

2012-01-17 Thread Dennis Haupt
Am 17.01.2012 22:17, schrieb Cedric Greevey: > On Tue, Jan 17, 2012 at 3:46 PM, Dennis Haupt > wrote: >> after the "wtf"s have worn off a bit, go on reading. >> imagine a simple problem: you have a collection of numbers and you have >> to write a function which

are non programmers the better programmers?

2012-01-17 Thread Dennis Haupt
after the "wtf"s have worn off a bit, go on reading. imagine a simple problem: you have a collection of numbers and you have to write a function which collects all the numbers that are contained uneven times. for example, for a collection (1,2,3,2,3,4) the correct result is (1,4) ask a child: "you

Re: i am so bored

2012-01-15 Thread Dennis Haupt
calls to get file system details, > etc. > > Right now you cannot even stat a file from clojure without calling the stat > command from a shell. :/ > > > --- > Joseph Smith > j...@uwcreations.com > (402)601-5443 > > > On Jan 14, 2012, at 6:12 AM, Dennis Ha

Re: i am so bored

2012-01-14 Thread Dennis Haupt
deploying anything in clojure). > If I can get stuff done I am planning to make a web app from it at some > point, but I am starting to realize I am not good enough to do the whole > thing by myself, hence that email. > > Looking forward to have a reply from you, > Sam > > On

i am so bored

2012-01-14 Thread Dennis Haupt
hi there, i am looking for something to do, preferably something that makes me rich, but that is not a must have - if it's interesting, i'll code for free. i can offer almost 15 years of coding experience (important: while being open minded the whole time). i am a one man army, if you will :) (pr

Re: want to make a 'debug' function, how to get current source and line number?

2011-12-15 Thread Dennis Haupt
in java i would throw an exception and parse its stack trace. don't know how to do that in clojure, but probably similar Am 15.12.2011 06:48, schrieb jaime: > Hello there, > > I want to write a function named "debug" which will print out "date- > time msg + current source-line + etc. info", but I

Re: Another newbie question

2011-11-07 Thread Dennis Haupt
actually, we avoid dynamically typed languages like the plague. i am taking a peek at clojure because i'm curious. Am 07.11.2011 11:19, schrieb pron: > I see. So namespaces are helpful here. > What other team practices do you use? E.g. what do you use for effective > documentation? With Java you

Re: problems of a newbie

2011-11-07 Thread Dennis Haupt
Am 07.11.2011 14:02, schrieb Scott Jaderholm: > On Mon, Nov 7, 2011 at 4:27 AM, Dennis Haupt <mailto:d.haup...@googlemail.com>> wrote: > > Am 07.11.2011 10:18, schrieb Dennis Haupt: > > > >> > >> > >> In his cod

Re: problems of a newbie

2011-11-07 Thread Dennis Haupt
Am 07.11.2011 14:01, schrieb Milton Silva: > > > On Nov 7, 12:41 pm, Milton Silva wrote: >> On Nov 7, 9:14 am, Dennis Haupt wrote: >> >>>>> The main thing to keep in mind is that when coming from java/scala, >>>>> you'll have a hard time

Re: problems of a newbie

2011-11-07 Thread Dennis Haupt
Am 07.11.2011 08:00, schrieb Sean Corfield: > On Sun, Nov 6, 2011 at 12:15 PM, Dennis Haupt > wrote: >> if by compatible you mean "has a specific set of functions and fields", >> then scala can do that without sacrificing static type safety: > > Yes, I star

Re: Another newbie question

2011-11-07 Thread Dennis Haupt
Am 06.11.2011 12:56, schrieb pron: > Hi. I'm new to Clojure, and enjoy using it very much. It's been years > since I learned Scheme back in college, and it's a pleasure going back > to lisp. > I do, however, have a question regarding real-world Clojure use in large > teams. While I clearly underst

Re: problems of a newbie

2011-11-07 Thread Dennis Haupt
Am 07.11.2011 10:18, schrieb Dennis Haupt: > >> >> >> In his code I did notice he doesn't use destructing very much. >> > > where would that have been useful? defn x [{:keys [foo bar]} param] instead of defn x [param] (let [foo (:foo param)...]) ? --

Re: problems of a newbie

2011-11-07 Thread Dennis Haupt
> > > In his code I did notice he doesn't use destructing very much. > where would that have been useful? -- 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 membe

Re: problems of a newbie

2011-11-07 Thread Dennis Haupt
> >> The main thing to keep in mind is that when coming from java/scala, >> you'll have a hard time adjusting to clojure, and you're making it >> harder by trying something so inherently full of state. I understand >> the need to tackle problems that we like, but without a good >> understanding o

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
ilter the clutter out. all i need is a big screen. :) but you're right, reading concise high level code > reading verbose low level code > > On Nov 6, 2011 11:49 AM, "Dennis Haupt" <mailto:d.haup...@googlemail.com>> wrote: > > "special cases" that

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
Am 06.11.2011 20:56, schrieb Sean Corfield: > On Sun, Nov 6, 2011 at 11:12 AM, Dennis Haupt > wrote: >> let me guess: you had some classes that were used more than they should >> have been because they were the best match and introducing a better one >> would have tak

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
Am 06.11.2011 19:06, schrieb Sean Corfield: > On Sunday, November 6, 2011, Dennis Haupt <mailto:d.haup...@googlemail.com>> wrote: >> this is a double edged sword. you *do* get it right *if* you think it >> through, but reality is often more complex than you assume. if you

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
rvices > so the new app will initially just be a very thin skin that uses > those json services in the short term. Later on the functionality > will be rewritten in the new app. > > Exciting times! > > Sent from my iPad > > On 6 Nov 2011, at 16:49, Dennis Haupt >

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
e cases" fewer given the notion that functions > should be entirely defined by their inputs as oppose to being > dependant on mutable state external to he function, in the most > part. > > I am agreeing with you, and find these real world experiences > incredibly useful. >

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
l haven't written more than 2 > lines of clojure so it probably isn't worth 2p :) > > Sent from my iPad > > On 5 Nov 2011, at 12:16, Dennis Haupt > wrote: > > hi, > > i'm half done with my asteroids clone. i stumbled over a few > problems and wanted

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
soon as i have to change existing code :/ > > However it seems that in the lisp world, code analysis tools are > that wanted. We have Common Lisp for quite some time now, and > people seem quite happy with slime. > > Razvan > > On Nov 5, 2:16 pm, Dennis Haupt wrote: >

Re: anyone interested in a small game?

2011-11-06 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 30.10.2011 19:32, schrieb Dennis Haupt: > hi community, > > i decided to create a (small) game in clojure to get a bit of > non-theoretical experience. i'm pretty much a clojure noob (only > did a few experiments) but have do

problems of a newbie

2011-11-05 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi, i'm half done with my asteroids clone. i stumbled over a few problems and wanted to know how others already solved them :) i am used to "less concrete programming". i ask my tools to do the actual analysis and coding for me: * where is that used?

Re: see if any branch of a cond succeeded

2011-11-05 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 what about >> (cond (= dir :left) ((move-left)(:ok)) (= dir :up) >> ((move-up)(:ok)) :else :nok) or whatever the exact syntax is Am 05.11.2011 08:22, schrieb Alan Malloy: > On Nov 4, 11:49 pm, Baishampayan Ghose wrote: >> On Sat, Nov 5, 2011 at 11

Re: a better way to write this

2011-11-04 Thread Dennis Haupt
which > I think would be equivalent: > > (let [full-test (every-pred type-pred bounds-check contact)] ... > > On Nov 4, 9:51 am, Dennis Haupt wrote: >> (let [type-pred #() bounds-check #() contact #() full-test (fn >> [element] (and (type-pred element) > (bounds-check &g

a better way to write this

2011-11-04 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 here's a part of my clojureoids-code: (let [type-pred #() bounds-check #() contact #() full-test (fn [element] (and (type-pred element) (bounds-check element) (contact element)))] (filter full-test (:game-elements @world-at

Re: -> vs ->> and names vs anonymous function

2011-11-02 Thread Dennis Haupt
gt;> "hi" println) . If you wanted to > give the function multiple arguments you could do this: > > (-> "hello" (println "world!")) and the other form it would be > (->> "world!" (println "Hello")) > > Matt Hoyt >

Re: -> vs ->> and names vs anonymous function

2011-11-02 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 thx *note: use macroexpand next time* Am 02.11.2011 10:58, schrieb Jonas: > > > On Wednesday, November 2, 2011 11:37:32 AM UTC+2, HamsterofDeath > wrote: > > hi there, > > i stumbled over two odd things 1) -> and ->> have the same source > code. w

-> vs ->> and names vs anonymous function

2011-11-02 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi there, i stumbled over two odd things 1) -> and ->> have the same source code. why is that? 2) why can't i use "(-> "hi" #(println %))" directly? why do i have to put my function into a symbol first? is there a way to avoid this? (let [dummy #(pri

Re: anyone interested in a small game?

2011-11-01 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 i went a step further: since my asteroids are all immutable, they don't contain a renderer. the renderer would either require a reference to the asteroids data, position, size and so on - if that "changes" the renderer would be obsolete - or would req

Re: anyone interested in a small game?

2011-11-01 Thread Dennis Haupt
email unless it is absolutely > necessary. Spread environmental awareness. > > > > > > On Mon, Oct 31, 2011 at 12:02 AM, Dennis Haupt > wrote: hi community, > > i decided to create a (small) game in clojure to get a bit of > non-theoretical experience. i'm

Re: anyone interested in a small game?

2011-10-31 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 if you *really* make zero assumptions, every second call has to be a protocol/interface call. *i know what i am, so no assumption* -> *interface call* -> *repeat* i think "no assumptions" should be "make no assumptions about the internals of what you

Re: anyone interested in a small game?

2011-10-31 Thread Dennis Haupt
n if you don't > implement anything but the JVM version, if you can at least show > that your engine would work on these other platforms without heavy > modifications (massive kodos if you can do this without any > modifications to the core engine at all) then I would say you have &

Re: anyone interested in a small game?

2011-10-31 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 no need for "IRender" since everything has a java.awt.polygon. i just draw it. in a sense, the polygon is my IRender and it's data is the implementation. i was thinking about using a simple type (:asteroid, :ship, :bullet) for each entity and pick an

Re: anyone interested in a small game?

2011-10-31 Thread Dennis Haupt
t step on each > other's toes. > > Timothy > > On Mon, Oct 31, 2011 at 9:37 AM, Dennis Haupt > wrote: one agent per entity? i'd have > done an agent for the whole world and apply functions like > "apply-collision" and "apply-shot-fired" to it >

Re: anyone interested in a small game?

2011-10-31 Thread Dennis Haupt
> > (send entity update-time timespan) > > (send asteroid do-split) > > etc. > > Actually, this really isn't too long of a project, at least the > asteroids part isn't. > > Timothy > > On Mon, Oct 31, 2011 at 8:00 AM, Dennis Haupt > wr

Re: anyone interested in a small game?

2011-10-31 Thread Dennis Haupt
sion of SpaceWar! > > http://www.youtube.com/watch?v=yY5qHe2VadA > > I like the idea of doing a Asteroids/Spacewar! clone, mostly > because it would give us a chance to introduce Agents as the > building block of the game engine. > > Timothy > > On Sun, Oct 30, 201

  1   2   >