Search Results: "ag"

7 June 2006

John Goerzen: Announcing HSH, the Haskell Shell

Following the "release early, release often" motto, I am happy to announce version 0.1.0 of HSH, the Haskell shell.

You may obtain it with:

darcs get --tag 0.1.0 http://darcs.complete.org/hsh

Things are still very rough in many ways, but this version already lets you:



Here is an example session: (some lines wrapped for readability)

$ ghci -fglasgow-exts HSH
*HSH> run $ ("ls", ["."])
COPYING    HSH        HSH.hs    TODO    announcements  testsrc
COPYRIGHT  HSH.cabal  Makefile  _darcs  test.hs
*HSH> run $ ("ls", ["-l"]) - - ("wc", ["-l"])
12
*HSH> :m +Text.Printf
*HSH Text.Printf> let countLines = (zipWith (\i line -> printf "%-5d %s" i line) 
       [(1::Int)..])::([String] -> [String])
*HSH Text.Printf> run $ ("ls", ["-l"]) - - countLines - - ("grep", ["hs$"])
6     -rw-r--r-- 1 jgoerzen jgoerzen  1285 Jun  6 09:43 HSH.hs
11    -rw-r--r-- 1 jgoerzen jgoerzen   565 Jun  6 09:43 test.hs
*HSH Text.Printf> :m +Data.List
*HSH Text.Printf Data.List> run $ ("ls", ["-l"]) - - countLines - - 
         filter (isSuffixOf "hs")
6     -rw-r--r-- 1 jgoerzen jgoerzen  1285 Jun  6 09:43 HSH.hs
11    -rw-r--r-- 1 jgoerzen jgoerzen   565 Jun  6 09:43 test.hs
*HSH Text.Printf Data.List> run $ ("ls", ["-l"]) - - countLines - - filter (isSuffixOf "hs") 
       - - ("tr", ["a-z", "A-Z"])
6     -RW-R--R-- 1 JGOERZEN JGOERZEN  1285 JUN  6 09:43 HSH.HS
11    -RW-R--R-- 1 JGOERZEN JGOERZEN   565 JUN  6 09:43 TEST.HS
*HSH Text.Printf Data.List> let generator = \(_::String) -> unlines . map show $ [1..20]
*HSH Text.Printf Data.List> generator ""
"1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20\n"
*HSH Text.Printf Data.List> run $ generator - - ("grep", ["1"])
1
10
11
12
13
14
15
16
17
18
19
Future versions will likely simplify syntax to make it easier to write scripts and introduce a sh to hsh converter. I also plan to add pure Haskell tools for some common shell-ish things that one could do in Haskell.

David Pashley: Oracle 10.2.0.1 Instant Client hanging?

Does your Oracle client hang when connecting? Are you using Oracle 10.2.0.1? Do you get the following if you strace the process?
gettimeofday( 1129717666, 622797 , NULL) = 0
access("/etc/sqlnet.ora", F_OK) = -1 ENOENT (No such file or directory)
access("./network/admin/sqlnet.ora", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/sqlnet.ora", F_OK) = -1 ENOENT (No such file or directory)
access("./network/admin/sqlnet.ora", F_OK) = -1 ENOENT (No such file or directory)
fcntl64(155815832, F_SETFD, FD_CLOEXEC) = -1 EBADF (Bad file descriptor)
times(NULL) = -1808543702
times(NULL) = -1808543702
times(NULL) = -1808543702
times(NULL) = -1808543702
times(NULL) = -1808543702
times(NULL) = -1808543702
times(NULL) = -1808543702
.
.
.
Has your client been up for more that 180 days? Well done; you've just come across the same bug that has bitten two of our customers in the last week. Back in the days of Oracle 8, there was a fairly imfamous bug in the Oracle client where new connections would fail if the client had been up for 248 days or more. This got fixed, and wasn't a problem with Oracle 9i at all. Now Oracle have managed to introduce a similar bug in 10.2.0.1, although in my experience the number of days appears to be shorter (180+). Thankfully, this has been fixed in the 10.2.0.2 Instant Client. More information can be found on forums.oracle.com and www.redhat.com.

Baruch Even: Head is up

My graphical skills are known to be poor but I still managed to use the gimp to create a hackergotchi for myself out of the ugly image from my student web page. The hackergotchi was quickly added to the Debian Planet, before I regret that move. I probably should raid my digital photos for a better picture, if a skilled hackergotchi maker is interested in making something more palatable I'd be happy to privately offer some other possible pictures for the conversion.

Martin F. Krafft: Build dependencies and the clean target

I find it rather annoying that some packages require their build-dependencies to be satisfied to run fakeroot debian/rules clean. Those packages include:
  • all packages using debhelper (hm...)
  • all packages using cdbs
  • packages cooking with Python distutils
  • ...
I think they all should fail gracefully when asked to clean themselves, even if the build dependencies aren't satisfied. Rationale: if the build dependencies aren't there, there's probably nothing to clean. Otherwise it's a royal pain to quickly build packages on production systems with pbuilder or the like -- those clean first (rightly so), then try to package. Of course, an alternative would be to tell pbuilder to ignore failures from the clean process. But I'd much rather fix causes than symptoms. Also, this would mean that the clean target may actually not finish, because commands after the failed one get ignored. So please, prefix your dh_* or similar lines with a - (minus sign) in the clean target of debian/rules today. That minus will make ignore the errors. Thanks. /me now awaits the flame flood. Update: the discussion is going on (#debian-devel/irc.debian.org). It has been claimed that pbuilder must be fixed. I'd like to point out that dpkg-buildpackage does not check for build dependencies when asked to build a source package (which is when you need the clean target) with the -S switch. Update ^2: I could be coerced into accepting dpkg-buildpackage fixed to check for build dependencies before it cleans the source tree in the process of creating a source package. Note that it does this unless you pass -S, because then you're actually asking it to build the binary package, not just the source. The real question I guess is whether build dependencies need to be satisfied to "build" a source package. Update ^3: Junichi, the pbuilder author, has since followed up.

Carlos Villegas: Project SVN repository is up

Used part of my 6 hours in Malmo aiport to prepare the summer project webpage. Just 2 buses per day to Sturup airport (Malmo) from Copenhagen!!

Well, so the webpage will be again available soon as it will be updated automatically from the SVN repository thanks to Petter.
>http:/initscripts-ng.alioth.debian.org/soc2006-bootsystem
>http:/initscripts-ng.alioth.debian.org/soc2006-bootsystem
http://initscripts-ng.alioth.debian.org/soc2006-bootsystem

For hotspots, reading Henrique de Moraes [1] got interested in serel [2] and will consider to include it in the things to test. Besides, got to read some months of initscripts-ng mailing list being interesting a comment from Erich Schubert about readahead (use it just at the very beginning and while bringing up the gdm/kde desktop) among others.

[1] http://alioth.debian.org/docman/view.php/30730/38/debconf2-initscripts-bkg.pdf
[2] http://www.fastboot.org

Peter Van Eynde: stupid CL errors

  • Do not assume :always does a check on an empty list:
    [1]> (loop :for x :in '() :always (oddp x))
    T
    is the correct result. But deep inside logic involving "have all entries that property?" it can be surprising.
  • 0 is not NIL. Stop laughing, it took me 2 days to find that one part of the program thought it was talking T/NIL while the other talked 0/1 or 2. One (declare (type boolean result)) and a few runtime errors later the program gives sane results again.

Erich Schubert: Mystery subscription

My last.fm status is "subscriber", though I never subscribed. Interesting. I thought maybe it was a test subscription of one month for my birthday or so (which was less then one month ago), but why didn't I get any mail to tell me of this test subscription then? Weird. So if anyone "secretly donated" this subscription to me, please, don't. But who would do so without telling me? I'm happy with their free service... So if you insist on wasting some money on me, consider my amazon wishlist instead (though I don't really care much about that stuff either...). Well, maybe the "ad" message was just delivered to the spam folder. After all, there is still a "subscribe" button on the last.fm page.

Antti-Juhani Kaijanaho: My new studio apartment

I got fed up with living with flatmates, and with the certainty of having to move out after I finish the PhD degree. So I went out and found a cheap and small studio apartment about 100 meters away from my old place. [image] That’s the building, though when I took the picture, I did not know on which side the apartment would be, and it turned out this is not the side. Would have been nice, though: a view to a small patch of forest, beyond which I could have seen (barely) the old building. Instead, my view from the windows is toward the yard-cum-parking-lot, though it is possible to vary this a lot by choosing the angle (one angle gives a view toward another forest patch). [image] [image] [image] The first picture is from the kitchenette, the others are from the single room, which I call the living room. I also have a kitchenette — [image] — and an alcove (which I call the bedroom). [image] The bathroom hopefully doesn’t have a mold problem, but probably does. It’s of the older design that frequently didn’t take moisture and water protection seriously enough. Well, at least there are no outward signs of such a problem, and the air circulation system definitely works. I apologise for the poor quality of this picture: [image] I got the keys on the first of this month, and promptly moved in a spring mattress. The next day I walked nearly the recommended 10,000 steps in handling all kinds of issues, including buying a very nice lamp and a barstool to the kitchenette. [image] [image] I got cable service on Monday and am now writing this on my laptop in the kitchenette sitting on the barstool, over a wireless network that is connected to the cable modem.

Jeff Bailey: Played pool

Simon, Kurt and I played pool this evening, it was lovely. The place is a bit slow, but the people there are confident business will pick up. Now that I don't get hit by a wall of smoke when I go, I think I'll become a regular.

They're open until three on a Wednesday night, anyway. I imagine it's probably the same other nights of the week.

Adam Rosi-Kessel: An Appropriate Use of Flash

I was recently complaining about how much kids these days depend on Macromedia Flash to create websites. This, on the other hand, is a fully appropriate use of flash. (Not sure if I’m ahead or behind on the meme propagation curve here.)

Dirk Eddelbuettel: Vraiment mal!

A few days ago, AvantGo syncing to my trusted (yet dated) Tungsten C failed all of a sudden. As I hadn't updated anything on the Kubuntu / Ubuntu box I use as my home workstation, and the (aptly named) malsync library which implements the protocol under Linux/Unix didn't change, I was a tad puzzled. Perusing AvantGo's website was pointless. Years ago they mentioned Linux support via the (unsupported) malsync library, now they seem to hide it. So what the heck, off went an email to AvantGo's support. To their credit, a reply arrived within 48 hours. While they pointed me to a Mac OS X answer (eek!) in their knowledgebase, it contained the basic hint: new prc files for a new version were required. So Google: if someone asks you why AvantGo syncing from Linux all of a sudden fails, tell them to get the new files from here. The app is now called M-Business and requires a fresh setup of server, id and password; but you're off to the races afterwards.

Evan Prodromou: 18 Prairial CCXIV

Another thing I've been wrong about in the past? JavaScript. I've always held that it was a cheap, lame, ugly knockoff language little better than a spreadsheet macro tool. I'm happy to say that my recent revisiting of JavaScript in the last 2 years has proved me wrong. JS is crazy, bizarre, and convoluted, true, but it's got a fundamental simplicity that I find appealing. The prototype-based inheritance is wacky, too. Anyways, I was interested to see that the ECMAScript 4 working group has published some specs for the next version of the language. It looks pretty cool.

Junichi Uekawa: Category for DebianJP.

I've recently started using wiki.debian.org for taking down notes and tracking progress with Debian JP tasks, since there is currently no wiki server for Debian JP, and some tasks really need tracking and public review.To track what pages are created for this, I've created a category for Debian JP.

Mike Beattie: I speak proper england!

(... well, I like to think I can!) So, on a completely unimportant website that I frequent, I've ended up being a moderator on the site forums. Something about knowing *nix and PHP apparently.. Anyway, I've always had a beef with the way english is used and abused on the Internet. You know, all those abbreviations, and incorrect word usage that just seethes "I'm an illiterate prick." U, 2, ur, da, r, etc etc.. and also the so incredibly common misuse of your/you're and they're/there/their. GAH. Yech. Anyway, this particular site is no exception. Some of the users have appalling habits. (Ab)using my powers as a moderator, I've started to demand some care and attention to the most glaring errors - mainly towards my most intense pet peeve, misuse of "your" and "you're". Looking for a place that describes all this stuff well, I stumbled across this site. I couldn't have said it better. Thank you Sarah D. Bunting! (I especially liked, and agree with this:
And no, in fact, I don't know what you mean when you write me a hate mail that reads, "You're site sucks," because that doesn't mean anything. Because it's grammatically incorrect. Because you've substituted a contraction of a verb phrase for an adjective, thus rendering the sentence nonsensical. And it makes you look stupid, and therefore I cannot take you seriously.
)

6 June 2006

Erich Schubert: Why I use (well, wrote) my firewall tool

Wouter Verhelst wonders why you would use a firewall config tool (apart from a GUI) instead of writing iptables rules directly. While I do just use a couple of iptables statements in a shell script here on my laptop, this is not manageable for larger networks IMHO. In fact, I wrote my Pyroman firewall admin tool for the very reason that it replaced an existing iptables script which was a pain to maintain. I'm talking 300-400 lines here. Four networks, two failover firewalls, a dozen of servers in the DMZ network some of which with extra access rights into the internal network (such as accessing the LDAP directory). And no full-time admin to take care of them. So I needed a firewall script that everybody can edit and that won't fail miserably when they make a mistake. A script with extensive error checking and that prevents people from locking themselves out. With an easy syntax. The first approach was in Perl, and already worked quite good. The rewrite then was in Python, and the users (read: fellow volunteer "admins", that don't know the firewall by heart as I do) liked it a lot. They now could add new hosts and services without depending on me to update the firewall. This is a configuration file they'll immedeately understand:
# add the web server
add_host(
        name="web",
        ip="10.100.1.2",
        iface="dmz"
)
# offering, well, web service.
allow(
        server="web",
        client="ANY DMZ INT",
        service="www ssh ping"
)
In contrast to any pure iptables script. It also helps to require them to commit their changes to a SVN repository (for getting the changes synched to the failover firewall) - that way you have version control and undo.

Aigars Mahinovs: The curse of Montesuma - a British Internet manjana

A couple of days before going off to Debconf6 the wireless access to the Internet stopped working for me in the network of my university. I went to the network guys and they told me that I was using too much of it, so they blocked my IP address and now need to check my laptop for anything that could be of a copyright violation. When they found out that the laptop in question only has Linux installed and that the "high traffic" was mostly bunch of podcast downloads and some CD's of Linux distros (including some Dapper beta CDs), they decided to not look at my laptop (they would not know how anyway) and assured me that my laptop would be connected back the next day. I still could access the net by tethering myself to an Ethernet socked, so I was not worried. The next day the wireless was still non-functional and so it was the day after that. I was working on with Ethernet and then left for Debconf. Almost three weeks later I come back to the university only to find out that my wireless is still blocked. I go to computer guys again and they again assure me that it will be enabled the next day ... or at least on Monday. During the weekend I do all I can to get my Debconf6 photos out to somewhere you could see them and do it in proper format and quality. In the end I get them uploaded to http://koyanet.lv/~aigarius/ as zip files (no compression). "aday" is the day of my arrival, "cday*" are the DebCamp days and "day*" are the main conference days with "day0" being the Debian Day. I go home satisfied only to come back next morning and find that now _both_ wireless and Ethernet access is blocked for my laptop. Apparently my interactions with the photos and catching up on some audio and video podcasts have generated around 14 Gb of traffic (both ways summed together) and that looks to be a big NO-NO in this university. After long and heated negotiations between my boss and the IT department the best we could agree on was that my laptop will be reconnected tomorrow, but if I use more then 2 Gb of traffic (both ways) in one month again, the laptop will be removed from the network permanently. Wonderful studying conditions, right? The only solution anyone could offer me is to get a ADSL connection in the place I am renting. That will cost me 12 pounds per month for "line rental" and 25 pounds per month for 8 Mbit down / 512 Kbit down ADSL connection with 40 Gb monthly traffic cap. And that is the best deal that I could find, because if I do exceed that cap for two months in a row they will not charge me per Gb as other will, but will only downgrade priority of my traffic until the end of the month. And the traffic cap in this service only applies to peak time and I can use it all I want during the night. But still the prices are just crazy and there still is a traffic limit. Encouraging the use and discovery of new Internet technologies, right? (.... sarcasm-o-meter overload ....)

Uwe Hermann: OS Install Experiences - Part 4: Ubuntu


Note: This article is part of my OS Install Experiences series.
Next OS — the recently released Debian-derived distribution Ubuntu 6.06 (Dapper Drake). Install
  1. First, I downloaded a Ubuntu 6.06 CD image, burned it on a CD, and booted from that.
  2. The first installer screen allows you to choose between a normal install, "safe graphics mode", "check CD for defects", "memory test", and "boot from first hard disk". If you hit enter and wait a few minutes, you're dropped right into a fully working GNOME session (think Live-CD). No user-iteraction is required at all...
  3. If you like you can use the system for normal tasks already (web browsing, whatever). If you want to install Ubuntu, you click the "Install" icon on the desktop...
  4. After choosing the language, timezone (by clicking on your country on a nice graphical world map!), and keyboard layout, the installation begins.
  5. You must enter your user password (no root password, in Ubuntu you have to use sudo for everything which requires root permissions), user account name, and (ugh!) you must enter a full name (same annoying behaviour as with PC-BSD).
  6. The partitioning tool is graphical and quite easy to use. It takes ages to scan the disk(s) and partitions though (yes, I have quite a lot of them, but still)...
  7. That's mostly it, the installation of the packages starts now, and after it's finished, a window pops up asking you whether you want to reboot or continue using the Live CD for a little longer.
  8. What's noticeable is that I was not asked where or how I want to install a bootloader, Ubuntu simply scans the disks, tries to detect the OSes and writes itself into the MBR. Which sucks quite a bit, especially for more complicated setups like I'm using here. For example, it didn't detect the PC-BSD installation, so I can no longer boot that for now (need to fix GRUB manually).
  9. That's it, after a reboot you're dropped into GNOME and the installation is done. Pretty impressive how easy such Linux installations have gotten recently...
Security Continue reading here...

Steve Kemp: Learning to cry for fun and profit

I saw on Planet Debian that Enrico Zini had some trouble using xen-tools:
Installing the base system.   This will take a while!
	
Copying files from host to image.
Finished
Something went wrong with the debootstrap installation
Aborting
This basically means that the invocation of debootstrap failed to leave the system with a /bin/ls present - meaning it failed for some reason. My immediate mad debugging skillz suggest retrying with either –verbose, or –cache=no. The first will hopefully show the problem, the second will most likely fix the problem. I’ve seen this a few times, but haven’t updated the code to check for it. When creating a new Xen instance of, say 4gb, we copy all the packages from the host systems /var/cache/apt/archives so that debootstrap doesn’t redownload things and use up bandidth. If these cached files are >4gb then the new image is 100% full and debootstrap won’t run successfully! In related news I’m currently working on a system called image-server - this is a distributed xen-create-image script. The idea is that you have a central host which is responsible for creating Xen images of Debian, RedHat, Gentoo, and serving them to clients. This isn’t much use for a home user, but as a hosting company wanting to provide Xen instances of semi-arbitary Linux distributions it should come in handy. In other news I want to work on modularising the Xen tools scripts and moving them onto xen-tools.org.

Erich Schubert: WM opening game cancelled: city Münich does not exist.

Apparently, FIFA can't spell Munich right... Go to the official german FIFA worldcup page on Munich, choose the first Video link (which won't play, but who cares) and have a look at the city menu in the video player... Guess what: Münich So since FIFA doesn't know how to write München, I guess the opening game won't take place here, since the teams won't find it? [Update: Screenshot done by a friend]

Ross Burton: Flickr Uploading

On a whim I gave up with my personal web gallery implementation and switched to Flickr. Now, uploading is fun. I could use the web-based upload form, but as I can't DnD from Nautilus into a text field that is dull, and whilst copy/paste works that is also dull. I can email images but I can't send lots at once (they have a 12M limit per email), and have to remove the signature and GPG signing for every message. Also dull. I'll get a billion people shouting "use F-Spot", which I tried, but it doesn't want to import some of my photos, and it doesn't work with my photo storage either, so that isn't an option for now. Thus, I'm considering writing a small Nautilus extension in Python, so that in the context menu of every image there is a Upload to Flickr option. I'd prefer not to re-invent the wheel so does anyone else has written a simple GNOMEy uploading tool for Flickr? Thanks!

Next.

Previous.