<html><head><base href="x-msg://513/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Yes, my first project was initially also done over ports - the async model was perfect.<div><br><div><div>On Mar 13, 2012, at 5:58 PM, Robert Virding wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><div style="font-family: 'Times New Roman'; font-size: 12pt; color: rgb(0, 0, 0); ">We used ports. External hardware was a "process" with which you communicated through messages. The asynchronous model fitted hardware very well, at least the hardware in which we were interested.<br><br>Robert<br><br><hr id="zwchr"><blockquote style="border-left-width: 2px; border-left-style: solid; border-left-color: rgb(16, 16, 255); margin-left: 5px; padding-left: 5px; color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica, Arial, sans-serif; font-size: 12pt; "><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 12pt; "><div><span>How do you interact with the hardware?</span></div><div><span>Do you use GPIB C libr and wrap it with a NIF?</span></div><div><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; "><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><div dir="ltr"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight: bold; ">From:</span></b><span class="Apple-converted-space"> </span>Joe Armstrong <<a href="mailto:erlang@gmail.com">erlang@gmail.com</a>><br><b><strong>To:</strong></b><span class="Apple-converted-space"> </span>Jared Kofron <<a href="mailto:jared.nance@gmail.com">jared.nance@gmail.com</a>><span class="Apple-converted-space"> </span><br><b><span style="font-weight: bold; ">Cc:</span></b><span class="Apple-converted-space"> </span>Erlang Questions <<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a>><span class="Apple-converted-space"> </span><br><b><span style="font-weight: bold; ">Sent:</span></b><span class="Apple-converted-space"> </span>Tuesday, March 13, 2012 12:34 PM<br><b><span style="font-weight: bold; ">Subject:</span></b><span class="Apple-converted-space"> </span>Re: [erlang-questions] Erlang meets physics<br></font></div><br>Great news - spread the word !<br><br>Just for the record Erlang programmers numbers 1 and 2 (ie myself and<br>Robert Virding)<br>are both ex physicists.<br><br>When I lecture I often point out the similarity between causality and<br>message reception.<br>You don't know that something has happened until you get a message<br>telling that it has happened.<br><br>(In physics it's a ray of light, or a photon, or something -<br>forgetting entanglement for the moment)<br><br>In computing it's the reception of a message.<br><br>As a ex physicist I know that we can't say anything about simultaneous<br>events occurring<br>at different places in space-time - turn this into computer science<br>and the same arguments<br>apply to things like making sure replicated data is consistent on<br>remote sites - well you can't<br>- at least if you want to change it - Brewer's CAP theorem applies -<br>which for a physicist makes<br>perfect sense.<br><br>Also as an ex physicist I realize that things do actually happen in<br>parallel in the real world,<br>so modelling them in a sequential programming language (if I wanted to do that)<br>is big time crazy - just describe the parallel stuff in a concurrent<br>language and the program<br>writes itself. Wait a few years till we have million core computers<br>and the parallel problems<br>can be solved 1:1 on parallel computers - and programming simulations<br>and so on will be<br>really easy - but don't even think about doing it in a sequential language...<br><br>Cheers<br><br>/Joe<br><br><br>On Mon, Mar 12, 2012 at 2:34 AM, Jared Kofron <<a href="mailto:jared.nance@gmail.com" target="_blank">jared.nance@gmail.com</a>> wrote:<br>> Hi All,<br>> I've been using Erlang at work for a few years now, and I thought I'd throw my experience out there, as<br>> my application is a little different than what you usually see on the list - I am a graduate student at the<br>> Center for Nuclear Physics and Astrophysics at the University of Washington, and use Erlang extensively<br>> in my work.<br>><br>> In my experience, something that Erlang is really great at but doesn't receive much attention for these days<br>> is managing and interacting with hardware.  In any physics experiment of even modest sizes, you wind up<br>> having to keep track of the state of various pieces of equipment, often modify that state, and constantly<br>> interrogate particular values.  For example, we might want to change the current in a magnetic trap, turn<br>> that trap off altogether, or simply read back the voltage drop across our superconducting magnet.<br>><br>> So far, I have deployed Erlang in this zone for two separate experiments (SNO+, a large particle physics<br>> experiment in Canada) and Project 8 (a small nuclear physics experiment here in Seattle).  Both times have<br>> been great successes, and I have found the reception of Erlang in this market to be great.  In general, what<br>> I have done is wrap a hardware management layer with some kind of outside world interface. For SNO+, we<br>> used Webmachine and RESTful control, and for Project 8 we actually conduct all communication<br>> by using CouchDB as a message passing interface.<br>><br>> Physicists are suspicious creatures, but once you demonstrate the feature set that you get for practically<br>> free with OTP, they see the advantage pretty quickly.  On top of that, the development cycle for sophisticated<br>> applications can be greatly reduced - more than once it made my group float to the top in terms of meeting<br>> goals.<br>><br>> In short, as far as I am concerned, Erlang has found a new niche in the world of Physics, and I intend to<br>> spread the word as much as I can!<br>><br>> Jared Kofron<br>> _______________________________________________<br>> erlang-questions mailing list<br>><span class="Apple-converted-space"> </span><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>><span class="Apple-converted-space"> </span><a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><br>_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br><br><br></div></div></div><br>_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br><a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions</a><br></blockquote><br></div></div></span><br class="Apple-interchange-newline"></blockquote></div><br></div></body></html>