[Haskell-cafe] Haskell for Physicists

Jack Norton jack at 0x6a.com
Wed Sep 30 16:00:55 EDT 2009


Khudyakov Alexey wrote:
> В сообщении от Среда 30 сентября 2009 23:08:02 вы написали:
>   
>> Yep, sure did.  I just hit `reply' assuming haskell-cafe was in the
>> reply-to.  I do that more often than not it seems.
>> Going back to the OP, what area of physics, and how on earth are you
>> going to convert years of fortran users to haskell?
>> I mean, in particle physics (were I came from) it seems as though only
>> recently have they moved from fortran to C++ (note: C was skipped).
>> There are things written in python (like Athena) but, well..., they are
>> unreliable crap (I do like python though).
>> In fact, when I was in undergraduate, not 4 years ago, a PhD student was
>> writing his big QCD project in fortran from the ground up.  I'm not even
>> familiar enough with fortran to attempt such a thing (I would have used
>> C).  Case in point, I think there are some areas of physics that exist
>> as a communal project (i.e. experimental particle physics) and because
>> of this, you are limited to the tools and data used by your peers
>> (Athena, Geant4, etc...).  It is really hard to introduce anything new.
>> So I guess my advice would be to avoid Haskell as a 'replacement' for
>> anything to a physicist (including mathematica -- which I never liked
>> myself).  They will immediately ignore you.  Approach it as a new tool,
>> and focus on what it can do that software-x can't.
>>
>>     
> I'm particle physicist too. And sometimes I think that it would be better if 
> they stay with fortran. Object-disoriented which is done in C++ scares me. 
> Random segfaults in ROOT, or even worse segfault loops...
>
> It's possible to use safety as argument for haskell. Type safety, no 
> segfaults.
>
> As for existing code there are two strategies. 
>
> First is to dump all code into Geneva lake. There are environmental concerns 
> of course. And it's difficult to throw away "tested" code.
>
> Second one - do not touch it and use haskell for small isolated tasks. It's 
> easier to do this in smaller experiments. I use haskell to process 
> experimental data with reasonable success. Code is much cleaner and easier to 
> understand that C++ code.
>
> In fact I just reworded your statement
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>   
Root has pissed me off more times than I can remember.  I've also done 
lots of Geant4 work (my thesis work actually), and that is a steaming 
pile of OO confusion.  Geant4 is getting close to 40MB of source, and it 
is still nothing more than a library of interfaces to interfaces to 
....  to the CLHEP C++ library.  It is OOP gone mad.   Not to mention 
that if anyone asks for a feature implemented, it gets implemented.   
There are features in the geant4 library that I'm sure even geant4 
developers don't know about.
Functional programming should be the to-go tool in physics, but it 
isn't.  Somewhere down the road, someone thought OOP was the messiah and 
worthy of a fortran replacement.  I fail to see the logic in this.
If anything I would start by scolding the physicists in the room on 
their programming practices.  Then introduce Haskell as you wish.  If I 
were to give a talk about programming to physicists, the first words out 
of my mouth would probably be "I'm embarrassed by you all."
Ok I'm done, I think you all get my point.  A comp-sci minor should be 
required for every physics major.

-jack   


More information about the Haskell-Cafe mailing list