Thursday, May 10, 2007
Sunday, May 06, 2007
Programming Erlang
Last night I pre-ordered my copy of Programming Erlang: Software for a concurrent world.
After having read the example chapters I think this is going to be a really good book on the subject. Granted, by the time it gets here I may not really need it, but it will still be nice to have.
One of my favorite things about buying books like this is that I can get a better view of what the author thinks is really important about the language. Instead of a language reference where everything is given equal time. (because that's what you need in a reference) You get a view of some of the best practices around using certain parts of the language.
Languages have syntax, libraries, and idioms. You don't get the idioms from the library reference. You also don't get them from the language reference, it's too busy describing the syntax.
I like what I've seen, and I'm excited to get my copy when it ships later this summer.
After having read the example chapters I think this is going to be a really good book on the subject. Granted, by the time it gets here I may not really need it, but it will still be nice to have.
One of my favorite things about buying books like this is that I can get a better view of what the author thinks is really important about the language. Instead of a language reference where everything is given equal time. (because that's what you need in a reference) You get a view of some of the best practices around using certain parts of the language.
Languages have syntax, libraries, and idioms. You don't get the idioms from the library reference. You also don't get them from the language reference, it's too busy describing the syntax.
I like what I've seen, and I'm excited to get my copy when it ships later this summer.
More erlang awesomenes
This weekend I started playing with erlang again, and erlang started impressing me again.
I just declared a lexically scoped anonymous function and sent it to a different node. I then executed it on that node and it worked as expected.
For those who are not familiar, an anonymous function is a function that exists, but that is not associated with a function name in a global table of functions. It only exists by a variable reference that can and will go away at some point.
Lexical scoping is when you use a variable in an anonymous function that exists in the current scope where the function is created. That is the only copy of the variable that will be used in the execution of the anonymous function, even in the case that another variable of the same name is seen near the anonymous function later.
Creating the lexically scoped anonymous function and sending it to the other host:
Receiving the anonymous function into the variable Fn and executing it using map and executing it directly:
Remember: these are on two different machines executing in a clustered erlang environment.
Is this not awesome?
I just declared a lexically scoped anonymous function and sent it to a different node. I then executed it on that node and it worked as expected.
For those who are not familiar, an anonymous function is a function that exists, but that is not associated with a function name in a global table of functions. It only exists by a variable reference that can and will go away at some point.
Lexical scoping is when you use a variable in an anonymous function that exists in the current scope where the function is created. That is the only copy of the variable that will be used in the execution of the anonymous function, even in the case that another variable of the same name is seen near the anonymous function later.
Creating the lexically scoped anonymous function and sending it to the other host:
(nomad@nomad)43> Var = 4.
4
(nomad@nomad)44> Fn = fun(X) -> Var * X end.
#Fun
(nomad@nomad)45> global:send(slim_proc,Fn).
<4792.72.0>
Receiving the anonymous function into the variable Fn and executing it using map and executing it directly:
(slim@slim)28> receive Fn -> Fn end.
#Fun
(slim@slim)29> L = [1,3,4].
[1,3,4]
(slim@slim)30> lists:map(Fn,L).
[4,12,16]
(slim@slim)31> Fn(3).
12
Remember: these are on two different machines executing in a clustered erlang environment.
Is this not awesome?
Saturday, May 05, 2007
If you die in Canada you die in real life!
Monday, April 16, 2007
New website
Ever since I got my new job at backcountry.com I've been a little busy.
OK... Very busy.
There is however one thing I thought was really cool. This video was put up on whiskeymilita.com for a few weeks before it was to launch.
It's nice to work for people who can have some fun.
OK... Very busy.
There is however one thing I thought was really cool. This video was put up on whiskeymilita.com for a few weeks before it was to launch.
It's nice to work for people who can have some fun.
Monday, March 19, 2007
Income sources
Sunday night I was over at my parents house. My brother and his wife were trying to do their taxes and having trouble classifying things. Our Dad printed a copy of Publication 525 and found this great little bit on page 32.
Stolen property.
If you steal property, you must reports its fier market value in your income in the year you steal it unless in the same year, you return it to its rightful owner.
I already owe enough taxes. It's a good thing I didn't steal anything last year.
Stolen property.
If you steal property, you must reports its fier market value in your income in the year you steal it unless in the same year, you return it to its rightful owner.
I already owe enough taxes. It's a good thing I didn't steal anything last year.
Thursday, March 08, 2007
Interesting news about bad behavior or "I'm shocked! Well, not that shocked..."
Last friday morning at 11:01 I got an interesting text message from Bob.
"Sarahbellum has been asked to stop blogging by the company. See her blog or mine."
I worked with Sarah until just over a month ago. Now, I really don't like working for companies that show signs of retardation and I must say that Protherics is just such a company.
I am not surprised that they asked her to stop blogging. It fits right in with their general way of doing things that can be best summed up thus:
"Lets not tell anyone what's going to happen and when we decide to roll something out lets do it so fast that we can't take time to avoid mistakes."
I don't put up with this kind of retarded behavior in the companies I work for. If a company starts getting too retarded I start sending out my resume.
I must admin though, I am biased. After all, I did leave.
"Sarahbellum has been asked to stop blogging by the company. See her blog or mine."
I worked with Sarah until just over a month ago. Now, I really don't like working for companies that show signs of retardation and I must say that Protherics is just such a company.
I am not surprised that they asked her to stop blogging. It fits right in with their general way of doing things that can be best summed up thus:
"Lets not tell anyone what's going to happen and when we decide to roll something out lets do it so fast that we can't take time to avoid mistakes."
I don't put up with this kind of retarded behavior in the companies I work for. If a company starts getting too retarded I start sending out my resume.
I must admin though, I am biased. After all, I did leave.
Subscribe to:
Posts (Atom)
