Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

January 28 2012

Harald "LaF0rge" Welte: New OsmocomBB RSSI monitor firmware

Jolly has been hacking up a nice new RSSI monitoring firmware application for OsmocomBB.

I let the pictures speak for themselves:

I really hope this trend continues and we'll get some actual user interface in OsmocomBB at some point this year..

January 25 2012

Harald "LaF0rge" Welte: OP25 project joins hosting on osmocom.org

Some days ago, I noticed that the famous OP25 project (a Free Software implementation of the APCO25 system, a digital trunked radio system) was no longer reachable on-line. It seems they were running this on a desktop PC in a university. As nobody in the project still seems to be at that university, a change in the network configuration had accidentally rendered the website unreachable.

After some quick e-mails, I offered to host them within the osmocom.org family of Free Software Projects for mobile communications. This is when op25.osmocom.org was created, and a full-site backup uploaded + installed.

I'm really happy that we were able to do a small part to help to make sure this valuable project remains accessible to interested parties in the signal processing and mobile communications field.

January 02 2012

SlyBlog: Building a Case for the Goldelico GTA04


I just came home from my christmas holidays and found a nice, little parcel from Shapeways in my mail box. It contained my first experiment with the Blender 3D software and the Shapeways 3D printing service.

The Story

A few weeks earlier I started to work on the original Openmoko Neo 1973 (GTA01) CAD files, as found at goldelico.com, with the intention of creating a 3D printable model, which I could print and use as a case for my new Goldelico GTA04 smartphone. To get started I got a Blender 3D crash course by a friend of mine.

First Attempt

As I never did any 3D work before I started with the easiest part – the battery cover:

   
This first prototype was printed using the “White Strong & Flexible” material offered by Shapeways. As you can see on the pictures, this material is a little rough, but still feels nice in the hands. Furthermore I removed the hole at the bottom, as it was pretty hard to design.

The printed part fits nicely on my existing Openmoko Neo Freerunner (GTA02) case, which contains my GTA04 board at the moment:

     

Future Plans

Now, that my first attempt was pretty successful, I plan to further work on this topic, to acquire a full case for my GTA04, so I can use the old case for my beloved Openmoko Neo Freerunner (GTA02) again.
As a next step I’ll modify the Neo 1973′s middle and front parts to be printable with a 3D printer and I’ll probably try to print them using a less rough material, to compare the results.

How you can help

If you like this effort, I’d be happy if you’d go to my Shapeways site (“SlyParts”) and order the first part of your GTA04 case, which will raise 1€ for myself, which I’ll use to order further prototypes.

If you don’t have a Goldelico GTA04, yet, you should take a look at the GTA04 Group Buy Tour, where we collect a batch of 350 orders which will be produced at once, so the price can get squeezed down.

If you ordered a part at my Shapeways site, please leave a comment here about which material you used and how it feels.

January 01 2012

Rui Seabra: GTA04 Free Software Smartphone group buy

There is a successor for the Free Software phone that OpenMoko Freerunner was. While the Freerunner was officially called GTA02, this new successor is called GTA04 and there is a group buy effort going on.

I know the price isn’t very cheap, but we aren’t a big company able to order in bulk hundreds of thousands of devices, if not millions, so 449 € + shipping for the first batch if we get 400 buyers will help get this phone into the hands of some Free Software developers.

Some reasons to buy one of these (the tricky part is having a Freerunner case if you want to use it as a phone):

  1. you are a programmer, you have some money set aside and you want to help develop a Free Software anti-vendor stack like http://wiki.freesmartphone.org/index.php/Main_Page
  2. you are not a programmer, but you can contribute with other important stuff like testing, designing, and have the money to buy a device into which you’d be able to test your stuff
  3. you only want to use a Free Software phone, and as such will have a lot of tolerance towards the inevitable bugs of new emerging platforms that don’t have millions of Euros to hire full time programmers, designers, etc.
  4. you have some money and would like to give that phone as charity to one of the above
  5. you are an angel with a lot of money, and would like to offer the first batch to the amount of registered buyers (under 400)

I would fit somewhere between 1 and 2 except I can’t afford 449 € on this, so I’m kind of hoping for someone circa number 5…

December 31 2011

Sean Moss-Pultz: Caring.

My apologies for not sharing any books these past few months. I’ve been reading on a Kindle. And Amazon, it seems, doesn’t agree that second hand books are worth handing down to the digital age.

There is a tip I’d like to share. Something that has worked very well for me is to identify a writer I love. Read everything they have written. Read what they read. And continue ad infinitum.

For the last five years I’ve pretty much exclusively read fiction. Dostoyevsky to Kafta to Kundera to Cervantas and now Vargas Llosa. But I could not resist reading Isaacson’s biography of Steve Jobs (I highly recommend it!).

Since then I continued with Einstein. And currently Benjamin Franklin. But back to the first two…

Einstein and Jobs are connected in more ways than dying and being born (respectively) in the same year.  I’ve wanted to write about my favorite connection for some time. Since today is the last day of 2011, it probably explains my sense of urgency.

I remember watching Jonathan Ive’s speech at “Celebrating Steve” and being moved to tears by what he said:

Now while hopefully the work appeared inevitable. Appeared simple, and easy, it really cost. It cost us all, didn’t it?

But you know what? It cost him most. He cared the most. He worried the most deeply. He constantly questioned, ‘Is this good enough? Is this right?’

And despite all his successes, all his achievements, he never presumed, he never assumed, that we would get there in the end. And when the ideas didn’t come, and when the prototypes failed, it was with great intent, with faith, he decided to believe we would eventually make something great.

But it wasn’t until Einstein’s biography that I started thinking about caring in the large scope of life. Physicist Lee Smolin described Einstein as, “a gardener weeding a flower bed.” He wrote:

I believe what allowed Einstein to achieve so much was primarily a moral quality. He simply cared far more than most of his colleagues that the laws of physics have to explain everything in nature coherently and consistently.

Care about what you do. Sweat the small stuff. Charles Eames once said, “The details are not the details. They are the product”. I believe this to my core. My New Year’s Resolution is simple: To care even more.

Happy New Year!

openmoko-fr: Happy new year !

Juste un petit message pour souhaiter à tous une excellente année 2012 ! :-)

J'en profite pour signaler l'excellent article de l'ami Trim sur linuxfr.org.

Vous y apprendrez que le projet GTA04 "Phoenux" a atteint la phase de commercialisation grand public ainsi que les nombreuses améliorations par rapport au Neo Freerunner (GTA02).

Mais l'article est très complet, je vous laisse le découvrir.
Bonne lecture et bonne fête ;-)

December 27 2011

SlyBlog: Openmoko Community Survey 2011


As the year 2011 nears it’s end, we – the Openmoko Community – did a poll [0] about which is the most popular hardware and which is the most popular software in our community. The poll was open for one week now and we got votes from 73 people.

I decided to close the poll now and release the results to the public. To create a ranking I gave 1 point to a “YES” vote and 0.5 points to a “(YES)” vote. The maximum (100%) is 73 points.

Rankings

Software Side:

1. SHR                  48.5 points    (66%)
2. QtMoko               41.5 points    (57%)
3. Debian               26.5 points    (36%)
4. Other Distro         16.5 points    (23%)


Hardware Side:

1. Om GTA02             65.0 points    (89%)
2. Goldelico GTA04      27.0 points    (37%)
3. Nokia N900           12.0 points    (16%)
4. Other Device         10.0 points    (14%)
5. Palm Pre (+variants)  7.0 points    (10%)
6. Om GTA01              5.0 points    ( 7%)
7. Google Nexus S        3.0 points    ( 4%)

Conclusion

On the software side SHR is still the most popular distro, directly followed by QtMoko. Quiet a few people commented, that they intend to code their own software/GUI mostly to educated themselves.

On the hardware side the Om GTA02 is the clear winner (which was expected). Surprisingly the Goldelico GTA04 is the 2nd most interesting device in this community, even though very few people have one, yet. Still, most of the developers already own one and you should get yours soon [1], as it seems to become a common target of this community. The Palm Pre, Om GTA01 and Google Nexus S got very few points and thus are probably not worth to support…

Happy New Year

Now, i’d like to wish all you Open Hard- and Software-Enthusiasts out there a good start into the year 2012. I hope the GTA04 project will flourish in 2012 and will help our community to grow and free the phone again!

Links

[0] http://www.doodle.com/sh6insnivnvqyz7h
[1] http://www.handheld-linux.com/wiki.php?page=GTA04 Group Tour

December 23 2011

Xiangfu Liu: Linux version usbboot for Ingenic xburst 4770

‘Yuenshu Fong’ create a Linux version usbboot for xburst 4770 cpu. you can find the source tar ball here

Xiangfu Liu: Icarus mining report

15 days mining about Total: 4.04000000 BTC��� the mining software restart about 850 times.

December 20 2011

Andrew Cowie: Poisoning DNS perhaps a bad idea

This is insane. I’m sitting at a café in Sydney using their hotspot. Went to search for something, and I kept getting strange looking “site not found” pages. Huh? Thy were working a few hours ago. So I started digging.

The café’s upstream ISP is “Optus”, one of the major Australian carriers. To my astonishment I found that Optus’s DNS servers are interfering with Google searches, stealing their DNS lookups and serving results pages on their own (shitty quality) branded search instead! Try https:? No connection; and Google+ wouldn’t load either.

Obviously as soon as realized what’s going on I immediately changed DNS servers to something reliable. Before I did I found a tiny “about this page” link at the bottom of the heinous Optus search results page, where I was told how great this was for me, but how I could opt out of their “default” search engine if I wanted to but was warned this was an “advanced setting”.

Seriously, what do Optus think they’re doing? From a commercial standpoint, do they really think that their captive audience matters to anyone advertising on the web? Of course not, but in the mean time they’re certainly going to alienate customers who just maybe actually do want to use (in this case) Google sites.

There’s a bigger issue, though. Unaltered answers to DNS queries is a backbone of net neutrality. That’s our problem, but once carriers start poisoning nameservers in their own favour it will be but a blink before everyone is doing it to each other and lookups will become worthless. While I’m sure the morons in Marketing who thought that sabotaging DNS queries would be a good idea won’t be worried about the wreckage that will cause for everyone else, such a war wouldn’t be good for any of the companies involved, either. And meanwhile, if they really want everyone to learn how to install an app to “fix” the internet…

Of course, this is only a taste of what we’ll be in for when the communications minister finally gets his compulsory Great Firewall of Australia censorship in place, but one thing at a time. If you’re looking for internet access down here, clearly Optus or anything that uses their network should be blacklisted.

AfC

December 13 2011

Michael "mickeyl" Lauer: IT has seen a crazy year

Information Technology has seen a really crazy year. Among all the smaller incidents, the big bangs involved Nokia partnering with Microsoft, abandoning Maemo, HP driving with WebOS against the wall, patent lawsuits everywhere.

What that means for FOSS-lovers is clear… you can’t trust any company to continue working on anything. Business demands are what counts in the world of mass markets. If you want longterm support for a platform, your best bet is to build a community around it. But you will also want to work on hardware support otherwise you’ll run into the next dead end.

To be honest, right now I don’t see much of a future for any mobile Linux-inspired platform other than the mutation called Android. But that’s not much of a problem per se. The smartphone market is crazy. To compete in that world, you have to give up on freedom. But is the mass market really what we want? Is it what mobile Linux needs?

I don’t think so. There are still huge opportunities for using Linux-based mobile software platforms in niches such as machine2machine communication, home automation, research, teaching, and more. That’s where a service-based middleware like FSO comes into the game: for special interests. However, even niche-adoption is hindered without a minimal set of applications. And that is where we still lack: Even special interest people want to use their smartphones to manage contacts, browse the web, send mails, play media, etc. We don’t have an integrated software stack with a complete set of UI applications that would cover these needs. Openmoko worked on one, but failed. Nokia worked on multiple ones, but gave up (multiple times). What else do we have?

With HP’s recent announcement about releasing WebOS as open source, the game may have changed. If we could use the WebOS application stack on top of the FSO middleware, we may have a real chance to get something great and usable – and complete – soon. I have always liked the WebOS UI. If it’s a bit slower than other UIs, who cares as long as it is free?

December 09 2011

SlyBlog: webOS is going to be OpenSource Software


HP the company which bought Palm some time ago just announced, that they are going to release webOS as open source software! The Linux kernel side of webOS was open souce since the beginning, with a few exceptions like the PowerVR 3D driver and the touchscreen driver.
We’ll see how far HP will go and what parts they’ll really open up (their announcement didn’t mention the modem protocol for example).

webOS is probably the best and most intuitive software running on smartphones today. And was said to be “the iPhone killer”. Unfortunately the first device it was sold on (Palm Pre) wasn’t exactly the best hardware as it had serveral flaws like a bad keyboard slider. Thus webOS wasn’t adopted by masses of developers and suffered from a lack of applications, which in turn made it uninteresting to end users.

I got a Palm Pre in the early days and I also got a HP|Palm Pre2 developer device some months ago, which I still enjoy to use. All in all I enjoyed developing for those devices, too, but it was pretty depressing to reverse engineer parts of the modem protocol, to be able to have it communicate with the FreeSmartphone.org (FSO) middleware and run a really free and open source operating system like SHR.

So with this news from HP what we could probably get in 2012 is:

Let’s hope the best for the mobile FOSS community in 2012!

Michael "mickeyl" Lauer: Towards the end of 2011

Tempus fugit. I can tell you. Even more so, if you have a baby. I must confess I somewhat underestimated the impact the baby would have on my spare time. In some weird mindset I really thought I could continue working as usual on my open source projects… as we know now I couldn’t. I completely lost track and have to catch up with all changes that happened over the last 6 months.

The first bunch of weeks with the baby were really demanding. I mean, really. She screamed a lot and could only sleep in our arms. Boy, were we tired. We carried her around so much we have Schwarzenegger arms now. But it’s great to see her developing, err… growing up, of course. With 6 months now she is a very interested baby, eager to learn new things and always trying to become more mobile.

Luckily both my wife and me are self-employed. It so much easier when you can skip some hours at the usual start of the workday and also at the usual end. Of course, the work needs to be done, so we have to compensate when she’s in bed. But still, it’s very satisfying being able to see her twice a day for a couple of hours — not all families have this luxury. Plus the existence of our two invaluable grandmas… it’s great.

Company-wise, the Lauer & Teuber GbR had an amazing year with many interesting iOS (and some Android) projects. We have reached the maximum we can do with the two guys we are, so we decided to grow and hire our first regular employee who’s going to start in 2012. We also rented another office and are already moving.

I’m slowly getting back into some of my beloved open source projects… it’s great that work on e.g. FSO did not stall at all, but continued while I was “away”. Last week, I attended the 3rd installment of the Open Hard- and Software Workshop in munich, where the latest development of the very promising GTA04 mobile phone was presented. I had a talk about Vala which was well received. By the way, my Vala-book plans are not dead yet… just in parking position :)

Next week I’m attending the FSOSHRCON, a joined conference with the people working on the freesmartphone.org middleware and the SHR software. It’s going to be great seeing all the folks again, concentrating a full weekend to agree on some important issues laying the path forward for the next year. Can’t wait to be there.

What’s left is the feeling that an extremely busy year has passed by, spiced with incredibly intense emotions. I’m a happy man and I love my life. I’m given exciting opportunities, but also challenges – and I plan to accept everything :)

All the best to you guys!

December 08 2011

Xiangfu Liu: Copyleft FPGA board: Icarus

We bought a copyleft FPGA Develop/Bitcoin Mining board: Icarus made by Ngzhang, the PCB, FPGA code, Mining software is all open. for more information please check bitcointalk.org.

I setup the Icarus with my server.here is the script file to keep it minng all the time. you can find more logs here.

IMG_1219_Icarus_case IMG_1221_Icarus Icars

December 07 2011

Sean Moss-Pultz: Hero vs Coward.

“I tell my kids, what is the difference between a hero and a coward? What is the difference between being yellow and being brave? No difference. Only what you do. They both feel the same. They both fear dying and getting hurt. The man who is yellow refuses to face up to what he’s got to face. The hero is more disciplined and he fights those feelings off and he does what he has to do. But they both feel the same, the hero and the coward. People who watch you judge you on what you do, not how you feel.”

—Cus D’amato, legendary boxing trainer

December 04 2011

Sean Moss-Pultz: The Secret of Life

I find it hard to believe I have never seen these 46 seconds before:

“When you grow up you, tend to get told that the world is the way it is and your life is just to live your life inside the world, try not to bash into the walls too much, try to have a nice family, have fun, save a little money. That’s a very limited life. Life can be much broader, once you discover one simple fact, and that is that everything around you that you call life was made up by people that were no smarter than you. And you can change it, you can influence it, you can build your own things that other people can use. Once you learn that, you’ll never be the same again.” – Steve Jobs

So true.

(found via http://www.brainpickings.org)

December 03 2011

Xiangfu Liu: Naihanli’s crates and milkymist one

4PM DEC 2 2011. Upon invitation from Terrence Curry, Associate Professor at Tsinghua University’s School of Architecture, Naihan Li gave a talk about her crates in front of about 50 students. this event is about the story of her and her mobile furniture crates. you can find more info about her work at google :) . but here is a small picture can give you a brief idea. she will using her Media Wall while the speech. this Meida Wall is most interesting things for us. since it have DMX-Light, DMX-Laser, Speakers, Big Screen, Projector. since I have no idea about architecture or design stuff, I will just put the entire event video record somewhere later. then people who have interesting can download this video. there about ~50 students in this event, total time is ~1 hour, Milkymist One is keep rendering about ~20 minutes at the Answer Section, students like it since they think it part of the arcwork :) I will just put some pictures:

IMG_1128_Intro IMG_1188_Media_wall IMG_1126_Chairs IMG_1141_technology_behind IMG_1176_Bar IMG_1177_Media_wall_2 IMG_1180_More_stuff IMG_1181_Chairs IMG_1194_Small_bar

Events Presentation
Professor_Curry_Form_follows_function_or_does_it.pdf
Naihanli_Crates_设计的故事.pdf

Events video
Naihanli_Tsinghua_Event_Crates_1
Naihanli_Tsinghua_Event_Crates_2
Naihanli_Tsinghua_Event_Crates_3
Naihanli_Tsinghua_Event_Crates_4

About Naihanli:
http://naihanli.com/
http://en.wikipedia.org/wiki/Naihan_Li
http://www.core77.com/blog/design_festivals/beijing_design_week_2011_crates_by_naihan_li_20686.asp

About Milkymist One:
http://en.qi-hardware.com/wiki/Milkymist_One
https://sharism.cc/shop/product_info.php?products_id=13

Xiangfu Liu: Prepare Milkymist One for Nanhaili’s event

Nanhanli a independent architect and designer for architectural and graphic design, she will give a speech at TQinghua university at DEC 2 2011, she will use her new Media Wall as the screen talk about her Crates story. there is a chance for Milkymist One that can connect to the artwork or part of artwork. since she bought a Milkymist One and we have a big update at NOV 30 2011, so we update her Milkymist One for her event.

she is live at 红 a great place at Caochangdi Beijing. oh when I saw this building the first thing come from my mind is change them to HEX. :) , will update Milkymist one is not hard, just boot it and click the ‘Webupdate’, on thing is the ‘Webupdate’ will not update the standby.fpg, which will not give you the AUTO-ON feature. so I have to use reflash_m1.sh –release for update the standby.fpg, after update just re-plug the power cable. the middle led will immediate on. no needs press middle button any more. here is a picture after new images boot.

for prepare the event I created 7 patches for that. here is two screenthos:Screenshot-03-JJ at the end of the day we project the milkymist one performance to the wall just for fun :)

Xiangfu Liu: Create xburst-tools Debian package under Ben Nanonote

Why compile xburst-tools under ben nanonote, please checkout this bug(xburst-tools: contains precompiled binaries in debian/). this means we have to compile the target firmware under a MIPS Debian system. that is why I try to compile xburst-tools under ben nanonote. I just write down the command I used :

0. follow this link install debian in your Nanonote.
1. add this like to /etc/apt/sources.list
deb-src http://ftp.debian.org/debian sid main

2. install packages for compile xburst-tools
apt-get update
apt-get install build-essential autoconf automake libusb-dev libconfuse-dev
apt-get install debhelper pkg-config devscripts
apt-get install libusb-1.0-0-dev libreadline-dev dpkg-dev
apt-get -b source xburst-tools

3. then all you need do is follow the debian/README compile xburst-tools. it’s simpile

4. problem is this work have to be done by a package sponsor. I have to find a DD who have a MIPS EL machine or give one Ben Nanonote to a DD. :)

November 28 2011

Andrew Cowie: Learning Haskell

In the land of computer programming, newer has almost always meant better. Java was newer than C, and better, right? Python was better than Perl. Duh, Ruby is better than everything, so they’d tell you. But wait, Twitter is written in Scala. Guess that must be the new hotness, eh?

Haskell has been around for quite a while; somehow I had it in my head that it was outdated and only for computer science work. After all, there are always crazy weirdos out there in academia working on obscure research languages — at least, that’s the perspective from industry. After all, we’re the ones getting real work done. All you’re doing is sequencing the human genome. We invented Java 2 Enterprise Edition. Take that, ivory tower.

The newness bias is strong, which is why I was poleaxed to find people I respect like Erik de Castro Lopo and Conrad Parker working hard in, of all things, Haskell. And now they’re encouraging me to program in it, too (surely, cats and dogs are sleeping together this night). On their recommendation I’ve been learning a bit, and much to my surprise, it turns out Haskell is vibrant, improving, and really cutting edge.

The next thing

I get the impression that people are tired of being told that the some cool new thing makes everything else they’ve been doing irrelevant. Yet many professional programmers (and worse, fanboy script kiddies) are always looking to the next big thing, the next cool language. Often the very people you respect about a topic have already moved on to something else (there’s a book deal in it for them if they can write it fast enough).

But still; technology is constantly changing and there’s always pressure to be doing the latest and greatest. I try my best to resist this sort of thing, just in the interest of actually getting anything done. Not always easy, and the opposite trap is to adopt a bunker mentality whereby you defend what you’re doing against all comers. Not much learning going on there either.

There is, however, a difference between the latest new thing and learning something new.

One of the best things about being active in open source is the opportunity to meet people who you can look up to and learn from. I may know a thing or two about operations and crisis and such, but my techie friends and colleagues are my mentors when it comes to software development and computer engineering. One thing they have taught me over the years is the value of setting out deliberately to “stretch” your mind. Specifically, experimenting with a new programming language that is not your day-to-day working environment, but something that will force your to learn new ways of looking at problems. These guys are professionals; they recognize that whatever your working language(s) are, you’re going to keep using them because you get things done there. It’s not about being seduced by the latest cool project that some popular blogger would have you believe is the be-all-and-end-all. Rather, in stretching, you might be able to bring ideas back to your main work and just might improve thereby. I think there is wisdom there.

Should I attempt to learn Haskell?

I’ve had an eye on functional programming for a while now; who hasn’t? Not being from a formal computer science or mathematics background — (“damnit Jim, I’m an engineer, not an english major” when called upon to defend my atrocious spelling) — the whole “omigod, like, everything is function and that’s like, totally cool” mantra isn’t quite as compelling by itself as it might be. But lots of people I respect have been going on about functional programming for a while now, and it seemed a good direction to stretch. So I asked which language should I learn?

My colleagues suggested Haskell for a number of reasons. That cutting edge research was happening there and that increasingly powerful things were being implemented in the compiler and runtime as a result sounded interesting. That Haskell being a pure functional language (I didn’t know yet what that meant but that’s beside the point) would really force me to learn a functional way of doing at things (as opposed to some others where you can do functional things but can easily escape those constraints; pragmatic, perhaps, but since the idea was to learn something new, that made Haskell sound good rather than perceiving this as a limitation). Finally, they claimed that you could express problems concisely (brevity good, though not if it’s so dense that it’s write-only).

Considering a new language (or, within a language, considering various competing frameworks for web applications, graphical user interface, production deployment, etc) my sense is that when we look at such things we are all fairly quick to judge, based on our own private aesthetic. Does it look clean? Can I do things I need to do with this easily? How do the authors conceive of the problem space? (in web programming especially, a given framework will make some things easy and other things nigh on impossible; you need to know what world-view you’re buying into).

I don’t know about you, but elegance by itself and in the abstract is not sufficient. Elegance is probably the most highly valued characteristic of good engineering design, but it must be coupled with practicality. In other words, does the design get the job done? So before I was willing to invest time learning Haskell, I wanted to at least have some idea that I’d be able to use it for something more than just academic curiosity.

Incidentally, I’m not sure the Haskell community does itself many favours by glorifying in how clever you can be in the language; the implied corollary is that you can’t do anything without being exceedingly clever about it. If true, that would be tedious. I get the humour of the commentary that as we gain experience we tend to overcomplicate things, as seen in the many different ways there are to express a factorial function. But I saw that article linked from almost every thread about how clever you can be with Haskell; is that the sort of thing that you want to use as an introduction for newcomers? Given the syntax is so different from what people are used to in mainstream C-derived programming languages, the code there just looks like mush. The fact that there are people who studied mathematics are doing theorem proving in the language is fascinating, but the tone is very elevated as a result. A high bar for a newcomer — even a professional with 25 years programming experience — to face.

It became clear pretty fast that I wouldn’t have the faintest idea what I was looking at, but I still tried to see if I could get a sense of what using Haskell would be like. Search on phrases like “haskell performance”, “haskell in production”, “commercial use of haskell”, “haskell vs scala”, and so on. You get more than enough highly partisan discussion. It’s quick to see people love the language. It’s a little harder to evidence see it being used in anger, but eventually I came across pages like Haskell in Industry and Haskell Weekly News which have lots of interesting links. That pretty much convinced me it’d be worth giving it a go.

A brief introduction

So here I am, struggling away learning Haskell. I guess I’d have to say I’m still a bit dubious, but the wonderful beginner tutorial called Learn You A Haskell For Great Good (No Starch Press) has cute illustrations. :) The other major starting point is Real World Haskell (O’Reilly). You can flip through it online as well, but really, once you get the idea, I think you’ll agree it’s worth having both in hard copy.

Somewhere along the way my investigations landed me on discussion of something called “software transactional memory” as an approach to concurrency. Having been a Java person for quite some years, I’m quite comfortable with multi-threading [and exceptionally tired of the rants from people who insist that you should only write single threaded programs], but I’m also aware that concurrency can be hard to get right and that solving bugs can be nasty. The idea of applying the database notion of transactions to memory access is fascinating. Reading about STM led me to this (short, language agnostic) keynote given at OSCON 2007 by one Simon Peyton-Jones, an engaging speaker and one of the original authors of GHC. Watching the video, I heard him mention that he had done an “introduction to Haskell” earlier in the conference. Huh. Sure enough, linked from here, are his slides and the video they took.

Watching the tutorial implies a non-trivial investment in time, and a bit of care to manually track the slides with him as he is presenting, but viewing it all the way through was a very rewarding experience. By the time I watched this I’d already read Learn You A Haskell and a goodly chunk of Real World Haskell, but if anything that made it even more fascinating; I suppose I was able to concentrate more on what he was saying for the emphasis on why things in Haskell are the way they were.

I was quite looking forward to how he would introduce I/O to an audience of beginners; like every other neophyte I’m grinding through learning what “monads” are and how they enable pure functional programming to coexist with side effects. Peyton-Jones’s discussion of IO turns up towards the end (part 2 at :54:36), when this definition went up on a slide:

IO (a) :: World -> (a, World)

accompanied by this description:

“You can think of it as a function that takes a World to a pair of a and a new World … a rather egocentric functional programmer’s view of things in which your function is center of the universe, and the entire world sort of goes in one side of your function, gets modified a bit by your function, and emerges, in a purely functional way, in a freshly minted world which comes out the other…”

“Oh, so that’s a metaphor?” asked one of his audience.

“Yes. The world does not actually disappear into your laptop. But you can think of it that way if you like.”

Ha. :)

Isolation and reusability

A moment ago I mentioned practicality. The most practical thing going these days is the web problem, i.e. using a language and its toolchain to do web programming. Ok, so what web frameworks are there for Haskell? Turns out there are a few. Two newer ones in particular, Yesod and the Snap Framework. Their raw performance as web servers looks very impressive, but the real question is how does writing web pages & application logic go down? Yesod’s approach, called “Hamlet“, doesn’t do much for me. I can see why type safety across the various pieces making up a web page would be something you’d aspire to, but it ain’t happening (expecting designers to embed their work in a pseudo-but-not-actually HTML language has been tried before. Frequently. And it’s been a bust every time). Snap, on the other hand, has something called “Heist“. Templates are pure HTML and when you need to drop in programmatically generated snippets you do so with a custom tag that gets substituted in at runtime. That’s alright. As for writing said markup from within code there’s a different project called “Blaze” which looks easy enough to use.

Reading a thread about Haskell web programming, I saw explicit acknowledgement on the part of framework authors from all sides that it would be possible to mix and match, at least in theory. If you like Yesod’s web server but would rather to use Snap’s Heist template engine, you could probably do so. You’d be in for all the glue code and knowing what you’re about, but this still raises an interesting point.

A big deal with Haskell — and one of the core premises of programming in a functional language that emphasizes purity and modularity — is that you can rely on code from other libraries not to interfere with your code. It’s more than just “no global variables”; pure functions are self contained, and when there are side effects (as captured in IO and other monads) they are explicitly marked and segregated from pure code. In IT we’ve talked about reusable code for a long time, and we’ve all struggled with it: the sad reality is that in most languages, when you call something you have few guarantees that nothing else is going to happen over and above what you’ve asked for. The notion of a language and its runtime explicitly going out of its way to inhibit this sort of thing is appealing.

Hello web, er world

Grandiose notions aside, I wanted to see if I could write something that felt “clean”, even if I’m not yet proficient in the language. I mentioned above that I liked the look of Snap. So, I roughed out some simple exercises of what using the basic API would be like. The fact that I am brand new at Haskell of course meant it took a lot longer than it should have! That’s ok, I learnt a few things along the way. I’ll probably blog separately about it, but after an essay about elegance and pragmatism, I thought I should close with some code. The program is just a little ditty that echos your HTTP request headers back to you, running there. You can decide for yourself if the source is aesthetically pleasing; ’tis a personal matter. I think it’s ok, though I’m not for a moment saying that it’s “good” style or anything. I will say that with Haskell I’ve already noticed that what looks deceptively simple often takes a lot of futzing to get the types right — but I’ve also noticed that when something does finally compile, it tends to be very close to being done. Huh.

So here I am freely admitting that I was quite wrong about Haskell. It’s been a bit of a struggle getting started, and I’m still a bit sceptical about the syntax, but I think the idea of leveraging Haskell shows promise, especially for server-side work.

AfC

Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.