Great Kevin,
you just poured more oil on the fire...
Code is not the only thing about Clojure. Getting newbies on board is
needed and if they need pointers fine with me. There has to be a place to
jump start people. This mailing is a starting point and has to be somewhat
friendly.
I myself can
I would not be surprised if some regulatory agency (UE) puts it's nose in
this if it has real impacts. Especially if Oracle does not abide by previous
agreements with the Open Source community.
If a regulator sanctions Oracle, others will follow most likely.
If Oracle wants to be the next Micros
Then I would need to place the call within Ring... I tried to do what I
need in middle ware but it's simply impossible. What I need to init is
related to how routes are dispatched by Ring and needs to be done outside
of Ring.
I need the servlet context, I have to get the container call me with the
For my part, I need stuff done prior to anything being done including
routing a request and I need to access the servlet context.
I'll explain this in a couple of days, it's related to a deployment problem.
I am in it right now.
Robert McIntyre wrote ..
> Why not use good old runonce from lancet?
Yep but some app servers have bugs with this interface (GlassFish 2,
jetty 6.1, tomcat 5.5, ...) and the interface is not called appropriately.
There are less problems reported with the load-on-startup flag.
Of course if you know your app server's behavior regarding this feature,
it might not be
>From http://docstore.mik.ua/orelly/java-ent/servlet/ch03_03.htm
-
Just like applets, servlets can define init() and destroy() methods. A servlet's
init(ServletConfig) method is called by the server immediately after the server
constructs the servlet's instance.
Hi,
Normally this is done use an initialization servlet.
You need a separate class inheriting javax.servlet.http.HttpServlet
and a entry in your web.xml file to get it executed once at application
startup.
Look at load-on-startup here:
http://www.caucho.com/resin-3.0/servlet/servlet.xtp#load-on-s
We use a combination of apache common logging and log4j.
In dev we can remove log4j and still have some decent console logging.
Luc P.
Dave Newton wrote ..
> On Tue, Nov 23, 2010 at 5:46 PM, Stuart Sierra
> wrote:
>
> > On Nov 20, 5:56 pm, HiHeelHottie wrote:
> > > What do you recommend for lo
Re-oups, Clojure 1.0 to 1.2 upgrade glitch :)
Mark Engelberg wrote ..
> (keep identity l) is preferable to (filter identity l)
>
> --
> 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
>
Oups.. :)
Stuart Campbell wrote ..
> On 17 November 2010 12:37, wrote:
>
> > user=> (time (filter identity [ nil 1 2 nil 4]))
> > "Elapsed time: 0.053219 msecs"
> > (1 2 4)
> >
> > user=> (time (remove nil? [ nil 1 2 nil 4]))
> > "Elapsed time: 0.065092 msecs"
> > (1 2 4)
> >
> > Choose the fla
user=> (time (filter identity [ nil 1 2 nil 4]))
"Elapsed time: 0.053219 msecs"
(1 2 4)
user=> (time (remove nil? [ nil 1 2 nil 4]))
"Elapsed time: 0.065092 msecs"
(1 2 4)
Choose the flavor your prefer...
Luc P.
Glen Rubin wrote ..
> What is the fastest way to remove nils from a sequence?
>
>
Daniel Gagnon wrote ..
> I spoke to the guys on reddit. They said it is tongue-in-cheek.
> They have no knowledge of functional programming
???
> but strongly feel it isn't suited to their field.
???
Isn't this a bit contradictory ? It's ok to follow your own gut feeling but
it needs
Hi,
You are lucky you do not work with me day to day, my sense of humor
is not always "on". The last two weeks I had to interact with zombies
in two different IT departments (two separate customers) and swearing
mode was on for most of that period. Yesterday was particularly awful.
I think you g
Sometimes a bit of acid in a joke improves it...
I`ll be there next year certainly :))
Baishampayan Ghose wrote ..
> Luc,
>
> > Gosu -> standard athlete on performance enhancing drugs (EPO, steroids, ...)
> > Clojure -> genetically modified athlete
> >
> > A big generation gap, comparison stops
Gosu -> standard athlete on performance enhancing drugs (EPO, steroids, ...)
Clojure -> genetically modified athlete
A big generation gap, comparison stops here, no need to discuss details :)))
Luc P.
David Sletten wrote ..
> I don't want to start any language wars, but this is funny:
> http:/
Hi,
Make sure none of your serial I/O calls are executing while compiling...
If you have anything like global defs that indirectly try to do an I/O
it will get executed as part of the AOT.
I have been playing with AOT a lot in the last two months and got trapped
a couple of time with this. Your c
Sticking to long and double gets away from Java semantic but it is done
to improve numeric performances. You can actually hint in 1,3 on the return
type of a function to avoid automatic boxing and have your code work
entirely with a "native" type. Boxing if I recall correctly will
convert systemati
Ken Wesson wrote ..
> On Fri, Nov 5, 2010 at 2:42 PM, wrote:
> > Customers are not getting usable components delivered in the near future.
> > They just get vague promises that something will be delivered in x years.
> > Nothing tangible there just vapor ware.
>
> That's more than Half-Life fan
Steven Arnold wrote ..
>
> On Nov 5, 2010, at 10:20 AM, lprefonta...@softaddicts.ca wrote:
>
> > Having expert people mastering several tools in any project increases the
> > like
> > hood of being on time and within budget.
>
> I agree partially. Given unlimited resources, it would be great
Steven Arnold wrote ..
> On Nov 3, 2010, at 11:43 AM, Sean Corfield wrote:
>
> > Why are folks so insistent on monolingual systems?
>
> Business reasons. Two languages means staffing expertise in both languages,
either
> people who know both and cost more, or two people who cost less. In comps
Rich at the Conj explained that he wanted to remove a bunch of
verifications each time a value was referenced to gain some speed.
The basis was of his reasoning was that an unbound
value is an exception more than a common thing and all these verifications at
run time were really slowing things si
Sean Corfield wrote ..
> On Wed, Nov 3, 2010 at 8:51 AM, Luke VanderHart
> wrote:
> > I have nothing but respect for Rails, and I look forward to the day
> > when Clojure has a comparable system.
>
> I sort of have to ask "why?" - what's wrong with using Rails on JRuby
> for the front end and Cl
Ahem..
Your comment misses the point. We chose RAILS because it met 90% of our
needs... not because of some claims it would solve any problem.
We then selected RAILS over Grails then based on the time it required us to
code, the # of code lines was a very good measure then to make our final
sel
Luke, I must agree with Wilson, other frameworks have some advantages
presently over Clojure for certain tasks.
We use RAILS and JRuby to create CRUD GUIs with ActiveScaffold.
Our controllers are typically 20 lines or less of configuration statements...
We do not need to maintain HTML templates e
user=> (doc ffirst)
-
clojure.core/ffirst
([x])
Same as (first (first x))
nil
user=>
That could help a bit :
Luc P.
andrei wrote ..
> Hi,
>
> I have a code similar to this:
>
> (def pairs (list [1 :a] [2 :b] [3 :c]))
> ...
> (loop [ps pairs, ret {}]
> (cond
Hi Stu,
I came back from the Conj with 12 pages of notes in a 2 inches by 3 inches
notebook. That represented 3 months of work at least.
On the return flight, I added another 3 pages of notes. I made some connections
between ideas exposed at the Conj in relation with our work here.
Now I have ab
Hi,
readability might be a concern but it's not the only criteria.
a) Do you need to trace intermediate results ? Then you need a
binding so you do not redo the work twice (presumably, I exclude memoized
functions here). Of course if the code has some side effects, the choice
is obvious,
No email received but just got one :)))
Luc P.
Eric Lavigne wrote ..
> > What's this about an after party?
>
> I received an email today at 1:22pm with the following link, but when
> I tried to register at ~4pm it said sold out. More recently, tickets
> became available again and I have one pri
Hu ? What party ? Where ? When ?
Luc
Seth wrote ..
> What's this about an after party?
>
> On Oct 18, 5:59 pm, Eric Lavigne wrote:
> > > Hey Conj goers,
> >
> > > I'm scheduled to arrive around 6:30, and after I check in am planning
> > > to spend the rest of the night writing code. Anyone wan
This is a more recent tutorial than what I had in my hands up to now
so I'll work on it tonight and look at the example app closely.
Thank you
Luc P.
Linus Ericsson wrote ..
> This tutorial covers the subject pretty well, I assume you've already read
> it.
>
> http://mmcgrana.github.com/2010/0
Count me out, pretty sure I'll need a drink by the time I arrive (21:00).
I like so much airplane travels, livestock receives more attention from their
carriers than airline passengers these days. Meuh !
Luc P.
Ryan Waters wrote ..
> I probably wouldn't be able to show up until 8:00pm but I'd b
Hi everyone,
I have been banging my head on the walls for a few hours now and really cannot
figure out the proper way to serve static files in a Compojure application
deployed on Tomcat or Glassfish...
Feeling pretty dumb in fact...
I tried to configure the default servlet to catch up requests b
Choose functions over macros when you can write an equivalent function.
I use macros when:
a) I have a repetitive pattern in the code that cannot be easily turned
into a function (too much context to pass as args to a function).
You can then hide a binding form in the macro to refer to the
I need a new pair of eyes...
Saul Hazledine wrote ..
> On Oct 13, 1:21 pm, lprefonta...@softaddicts.ca wrote:
> > Good to know... is this written somewhere ? I looked at Clojars yesterday
> > but did not find anything...
> >
>
> Its mentioned near the end of the tutorial:
> http://github.com/a
Good to know... is this written somewhere ? I looked at Clojars yesterday
but did not find anything...
Luc P.
Saul Hazledine wrote ..
> On Oct 13, 5:31 am, lprefonta...@softaddicts.ca wrote:
> > As far a publishing to Clojars, I do not know the policy.
> > Uploading various jars maintained by ot
Normally the people maintaining the Minim project should publish their
stuff in a maven public repo. There are the ones in control of their
releases.
As far a publishing to Clojars, I do not know the policy.
Uploading various jars maintained by other teams not involved in
Clojure may "pollute" the
a) Assuming all the dependencies are published in a maven repo out there:
If you put all your deps in project.clj, the pom.xml file generated by
leiningen will reference all of them as dependencies to your own lib.
You only need to publish your own library and the pom.xml to Clojars.
Anyo
(:use [clojure.contrib.def])
(defvar- x ...)
A bit shorter than writing the meta-data by hand.
Def provides a number of other interesting shortcuts. Have a look at
def.clj in contrib.
I prefer to keep things private and avoid cluttering the use
clause with a long :only list. I use :only only wh
We use common logging with a thin Clojure layer around it. It allows us to
have different behaviors in dev pre-prod and production. We avoid the hassle
of configuring log4j in dev.
The default implementation (simple logging) is more than enough most of the
time.
In prod, we specify the log4j confi
The install task publishes to your local repo. Did you check
$HOME/.m2/repository to see if your helloworld library is there ?
You should find the jar and the pom.xml after running the install task.
Make sure the names are matching between your library POM and your
reference in your project.clj in
Adam Burry wrote ..
> On Sep 9, 5:06 pm, alux wrote:
> > But, @Luc
> > "pushing the advantage of Lisp
> > macros to the forefront is not obvious if the audience cannot compare
> > with another (good/simple) implementation they understand well."
> >
> > Thats why I want to use a nifty metaphor ;-)
I solved my maven corruption problem. On if the m2 index folder was not
cleaned properly.
Luc P,
lprefonta...@softaddicts.ca wrote ..
> Hi Phil,
>
> I upgraded to 1.3.1 but started to experience some problems with
> my our-classe-only hook. I made it return 0 since 1.3.1 expects a numeric
> re
Hi Phil,
I upgraded to 1.3.1 but started to experience some problems with
my our-classe-only hook. I made it return 0 since 1.3.1 expects a numeric
return code from the compile task but then ended up with other problems
in the jar task.
I want to revert to 1.3.0 for a few days. Any idea about th
alux wrote ..
> Interesting discussion!
>
> I think about taking some of the topics into separate threads. Will
> see, I'm a bit under project pressure. Wont tell you the language ;(
>
> But, @Luc
> "pushing the advantage of Lisp
> macros to the forefront is not obvious if the audience cannot c
The major thing that made me used macros as much as possible when available
in any language was writing assembly code. Not 100 lines projects, 20,000 and
above, mainly made of macro calls.
That's when you realize that you need to use macros to generate instructions
for three reasons:
a) keeping t
alux wrote ..
> Hello Luc,
>
> what you say is of course completely true. Nevertheless it seems true
> for Scala too. And now I come with a new language again. The curious
> people in my team (well, or its the one with enough spare time :)
> already had some look into Scala, and I think I need ad
Hi,
My main motivation to get away from Java as much as possible was the code
size. I was tired of having to write tons of code lines for what I considered
mundane things. Using wizards was not satisfactory to me. The generated code
size is significant and still it has to be maintained either by h
I am a bit puzzled, I did a quick test and rebinding using a declare
should work (outside of your sample code). I have a reminiscence of a
similar problem I encountered before version 1.0 and used a def to solve my
problem at the time.
But the small test I just made with 1.2 is working.
There's a
Oups, forget about my last post, I was under the impression you could not
bind to a declared thing... wrong was I...
Luc P.
lprefonta...@softaddicts.ca wrote ..
> Hi Cameron,
>
> Use def or defvar (if you use contrib.def) to create an instance of *macros*.
> Declare is used for forward referenc
Hi Cameron,
Use def or defvar (if you use contrib.def) to create an instance of *macros*.
Declare is used for forward references (when you reference something
before declaring it) so the compiler knows that your code is sane but it does
not "define" anything by itself.
Yes, it may look a bit conf
Booked... for technical reasons (bought a package flight + hotel through
expedia.ca), I'll be a staying at the nearby Hyatt hotel.
I had no other choice to be there since I argued loudly for a "central" location
for this event :)))
See you there all.
Luc P.
--
You received this message because
My rough estimate is that more than 40 replies to that thread heave been
generated up to now (I deleted the 28 ones without reading them after reading
a couple of replies to the original post).
Hmmm,,, I am about to think that we could have powered a small town
with all that electrical nerve impul
Hi Phil,
there's a tar file at this url with the entire project skeleton:
http://cid-0bd9c1ec7356c53b.office.live.com/browse.aspx/lein-our-classes-only-0.0.1-SNAPSHOT?Bsrc=GetSharingLink&Bpub=SDX.Docs
I added a README file. There is a small twist when building the target.
For those having the s
Fine,
I'll post entire project in a tar file this week end and will come back with
the URL before Sunday night. Need to complete urgent work in the garden today :)
Luc P.
Phil Hagelberg wrote ..
> On Fri, Aug 27, 2010 at 8:06 PM, wrote:
> > I got it working with the our-classe-only plug-in.
>
Hi Phil,
I got it working with the our-classe-only plug-in.
I tested it on my brain damaged project and it kept only the class files
for which a name space exists in the source folder. The target is now
cleaned up of any external class dependencies.
Now, if others need this what do you suggest ?
I'll try it today and let you know by the end of today if I can
manage it :)
Luc P.
Phil Hagelberg wrote ..
> On Thu, Aug 26, 2010 at 5:59 PM, wrote:
> > Instead I decided to experiment a Leiningen plug in, sauberjar to create the
> > target only with the class files and only the ones for whic
I read the ticket on Assembla and found it risky to try to implement the
patch.
Instead I decided to experiment a Leiningen plug in, sauberjar to create the
target only with the class files and only the ones for which there is a
corresponding source file in the source folder. To start this asap,
Thank you Phil,
I will give it a try today. If it does not work I'll filter the resulting
jar files to retain only our name spaces.
I'll come back with the status later today.
Luc P.
Phil Hagelberg wrote ..
> On Wed, Aug 25, 2010 at 5:59 PM, wrote:
> > We are completing the migration to cloj
Hi all,
We are completing the migration to clojure and contrib 1.2.
I am working on the packaging this week using leinigen 1.3 for acceptance
tests.
I download artifacts from Clojars and other maven repos using our archiva
server here.
I have a problem that I do not understand yet (slowly comin
We use archiva to proxy accesses to external repos (central, clojar, ...)
Very simple to deploy and to use and it does the job.
We looked at nexus but found it more complex to use for our limited
needs.
I use an instance on my laptop to pull what I need from our central location
and keep it in cac
I like magic, life is so complicated these days :)))
Luc P.
Phil Hagelberg wrote ..
> On Fri, Jul 30, 2010 at 8:03 AM, wrote:
> > +1,
> >
> > auto loading is simple and if performance becomes an issue, an explicit
> > list of hooks would solve this issue. I would however leave auto loading by
+1,
auto loading is simple and if performance becomes an issue, an explicit
list of hooks would solve this issue. I would however leave auto loading by
default. We have a couple of hundred jar dependencies so speed for us is
an issue but auto loading seems to me a decent default for beginners, bet
Hmm.. I would give it a try for a critical app.
We have sever apps in Clojure running for months non-stop now without
unscheduled down time. Clojure has not been a source of problems, we
had more problems with the customer networks and other site specific
conditions.
We run redundant components by
We worked on it but realize at some point that it involved many
redefinitions of some parts of the Clojure runtime in a TIM.
And this had to be maintainefd while Clojure evolved.
We opted instead to share stuff using Java classes from Clojure rather than
directly in Clojure.
However as Clojure mo
Same story here...
Dictatorship has definitively some value :)))
Luc P.
Sedit qui timuit ne non succederet.
Wilson MacGyver wrote ..
> my story isn't a very interesting one. I simply told everyone on the team to
> learn it, because we are going to use it :)
>
> On Tue, Jul 6, 2010 at 4:50 AM
I never said we should not provides ways to tune code and get higher throughput
or arbitrary sized numbers. There has to be a path to satisfies those needs.
The stuff that was proposed on this thread (specialized ops, ...) should allow
people to tune their code if they require to do so.
I said tha
Welcome to the club of production ready apps in Clojure :)))
I see a bunch of opportunities for this kind of service in the medical
field especially when you get that image to text stuff in play.
Our customers have walls filled of medical record files and getting these in
some form of electronic
I read the explanation on how they compute their charts.
I do not see why a Cobol or Fortran programmer would query the Web for
references on a regular basis.
What can be the significance of computing references on the Web about older
languages that do not evolve too much but that have a large a
We are willing to put some time into this at our end.
We are in the process of replacing our Java desktop apps by Clojure apps.
Removing Java code is a mid-term goal that we want to keep in our scope
as we move on.
Anything to reduce code size is a welcomed.
How and when do we start this ?
Luc P
Antony Blakey wrote ..
> I doubt this subthread is of any use to the OP at this point.
I run a software business, I generally look at product decisions in terms
of cost/benefits from end to end over time not just looking solely at a
specific item and specific time frame.
>
> On 31/05/2010, at
Mike Meyer wrote ..
> On Mon, 31 May 2010 10:53:45 +0930
> Antony Blakey wrote:
>
> >
> > On 31/05/2010, at 10:44 AM, Marc Spitzer wrote:
> > > also lets not forget about LD_LIBRARY_PATH issues,
> > No Mac or Windows user would encounter these.
>
> You forget that the Mac is a Unix box. It su
Antony Blakey wrote ..
>
> On 31/05/2010, at 11:13 AM, Marc Spitzer wrote:
>
> > I actually primarily do not care about mac or windows, personally or
> > professionally. Also keep in mind that one of the selling points of
> > clojure is that it runs where *Java* runs not mac and windows, I woul
Hi all,
it's not that I want to put pressure on anyone here but there has been a number
of discussions about the 1.2 release and I was wondering what's the horizon for
a first release ?
We are still in prod with 1.0 but some are salivating about some of the features
of 1.2. We did not move to 1.1
Usually if has mustaches, 4 legs, oval shaped eyes, fur and
makes p ! prrr ! when I touch it, I call it a cat :)))
Most of my customers are accustomed to my crude language.
Since they have results when they deal with me compared to what
they get internally and from other suppliers, they forgi
I agree about "consultants" (these days it's not anymore an synonym for
expert) and the state of the market but...
If you write a new software product and
you are concerned with deadlines and speed in general, Java is not
the way to go anymore considering the pile of code you need to do
anything
"Application" programming is exactly what we do with Clojure,
we are not using it in a bubble, it's there to implement all
the complex logic we need.
We use over 130 jars (Spring,...) and we use them from both Clojure and
some Java components. We are replacing with Clojure code
the Java high lev
76 matches
Mail list logo