Search Results: "ag"

4 February 2009

Daniel Kahn Gillmor: Python editor/IDE for new (high school) coders?

I'm supporting a class of high school students who are new to programming, and will be learning some python. Most of these students are comfortable with computers, but not hacker types, and few if any of them have written code before. I'm looking for an editor or an Integrated Development Environment (IDE) that won't be too scary for them, and will help them get used to the novel idea of writing code without simultaneously having to get used to the novel idea of an unfamiliar user interface. So i can't expect them to pick up my beloved emacs, for example. But on the other end of the spectrum, i'd hate for them to try to write python in an word processor (i've seen people do it!). Here's what i think i'm looking for: Do you have suggestions for tools that work well for the above needs? Favorites? Are there features other than the "top three" i listed above that you think i should pay attention to? FWIW, they'll be working in a labful of machines running Ubuntu Hardy for the most part, but i'm willing to port and deploy programs (particularly ones that feel like a perfect fit) if they're not available in hardy.Tags: ide, python, recommendations, student

Stefano Zacchiroli: sort gotcha

sorting text records on the first column only It turns out that join is a strange beast. Let's say you have two files, which are textual records using TAB as separator, containing different columns beside the first one, which is the record key. Using join you can do cool stuff like join file1 file2 to obtain a join in the relations sense, by default on the first column. The join manpage states that the two fields must be sorted on the join field. This is of course to avoid complexity explosion. The annoying thing is that if you forget to do that, you will miss tuples, without any warning, which is not good (and can actually be at least spotted avoiding complexity explosion ...). So yeah, if I'm here it's because after having been hit by this, I finally read the fine manpage :-) But how to sort on the join field? Turns out that dear old sort -u file sponge file is not enough. Why? Because by default it will use all keys to sort and then you will end up sorting also on data values; needless to say that such sorting methods is not stable among the two different files you want to sort in turn. OK then, let's try with sort -u -k 1 file sponge file. Not even, but close. ... because sort with this syntax will start sorting at key 1 (which is the default), but then continue sorting with the other keys, in the hope of doing you a favour. The magic line is then sort -u -k 1,1 file sponge file, which tells sort to (damn) sort using only the first (damned) key and stopping there. Thank you sort. Have a nice day. I m going to FOSDEM, the Free and Open Source Software Developers  European Meeting PS I've been sick this week, but I'm definitely getting better, so I can finally announce that I'm going to FOSDEM 2009, yay, see you there!

Gunnar Wolf: How active are your local Linux,Free Software User Groups?

Ted T'so wonders about the LUGs over the world, seeking to answer a conversation he recently had at the Linux Foundation. He quotes a blog posting in Lenovo, Local User Groups - gone the way of the dinosaur? . I think this is an interesting point to gather input from others. In Mexico City, we did have a strong LUG several years ago, holding not-very-regular-but-good-quality-wise meetings, roughly monthly, at Instituto de Ciencias Nucleares. I was active there ~1996-2001.
By 2001, however, the group stopped acting as one - Maybe one of the main factors is that we had a very strong, unquestionable group leader and cohesion factor (Miguel), who worked at Nucleares and regularly got said auditorium. Once Miguel left to form Ximian, the group slowly disgregated. In one of the last LUG meetings, we started working towards the National Free Software Conference (CONSOL)... Nowadays, in Mexico (as a country) we have several conferences around the year, although I'd be hard-pressed to say whether any of them really fills the needs of a LUG (and my answer would probably be negative). Now, there are several smaller groups that have popped up in the void left by the Mexico City LUG - Mainly LUGs local to universities or faculties... And yes, a 25-million-people city is too large to have a single, functional LUG - Just the geographical size of the thing is too daunting. Besides, we are too many people, even though few of us are contributing any real work. But I also recognize that a local *users* group should care about making the users better, before focusing on making the world a better place ;-) Anyway... My intention with this post, besides writing what I see, is to ask to other people that read me (I know this blog is syndicated at Planeta Linux Mexico, maybe even people reading in other Latin American countries through Planeta EDUSOL) to write what they see at their local communities. To make this a bit more useful, please leave a comment (in English, if possible) at this blog, so this can be used as a summary for Ted's request as well.

Ian Wienand: On Complexity

Fools ignore complexity. Pragmatists suffer it. Some can avoid it. Geniuses remove it.
Alan J. Perlis, Eipgrams on Programming, SIGPLAN Notices Vol. 17, No. 9, September 1982, pages 7-13.

Lior Kaplan: Debian follows Openoffice.org 3.x in the experimental archive


While Debian unstable is in freeze (and deep freeze), Rene Engelhard, started uploading openoffice.org 3 packages to the experimental archive. I ve been enjoying following the openoffice.org development process through updating the packages on my machine. As Rene keeps the packages up to date, I got to use 3.0-beta2, 3.0-rc2/3/4, 3.0 official, 3.0.1-rc1/2 and 3.0.1 official. The packages are uploaded simultaneously with the availability of the versions. As I m following the RTL related bugs (and fixes), I get a chance to enjoy the fixes very quickly and easily. So, I see this as an opportunity to thank Rene for his excellent work (; Posted in Debian GNU/Linux, Openoffice.org Tagged: debian, openoffice, package maintainership

Joerg Jaspert: Package -> File mapping

Yesterday I merged a patch from weasel into our dak repository. We are now generating a mapping between a package and the associated files on our mirrors. While the initial customer for this is a new snapshot.debian.org implementation, it might be useful for others too. If you want to have a look at it, it is on every mirror, file indices/package-file.map.bz2. The entries are plain rfc2822 format and currently have the following information: It currently doesn t make any difference for suites, but if that is needed it could be added, i guess. Well, one could also look in the suite-*.list.gz files in files/components and take that together with the above to get this info. (And yes, you could get this information by parsing all Packages and Sources files of all suites. I bet you will waste way more cpu time, coding effort, whatever, in doing that. :) ) Anyway, whenever you need something like this, don t hesitate to ask. Especially not if you yourself get us the code for it. :)

MJ Ray: Reject the Term Extension Directive

One of the most frustrating things about Copyright Expansion is that it s being driven through at international levels, far away from most of the people that it affects. When we try to contact our international representatives, such as national government ministers or officers, or Members of the European Parliament (MEPs), it usually takes me at least two attempts to convince them that I actually understand the issue that I fell they re about to bodge. So, here we go again:-
The European Parliament is being asked to nearly double the term of copyright afforded to sound recordings. Industry lobbyists suggest that extending copyright term will help increase the welfare of performers and session musicians. But the Term Extension Directive, which will be voted on by the Legal Affairs Committee in a few weeks time, will do no such thing.
Follow developments on EDRI s Copyright page and Write to your MEP, like Stuart Langridge did. I ll contact Neil Parish MEP directly and hopefully he ll remember me, so I won t have to do that stop sending me copy-pasta from Malcolm Harbour dance. I ll also see if I can get nice responses out of the other parties this time.

Theodore Ts'o: How active are your local Linux User s Groups?

At the Linux Foundation, I recently had been brainstorming with some my colleagues about ways in which we might be able to reach out to the various local Linux User s Group (LUGS). So I was quite surprised when I saw a blog posting from Lenovo s Connections blog asking the question: Local User Groups - gone the way of the dinosaur? and even more provocatively, Has the web now relegated the user group to history, along with dot matrix printers, cassette tapes for mass storage, and dial up modems with acoustic couplers? I checked on the web for a number of LUG s, such as the Boston Linux and Unix User Group (BLU) and the Silicon Valley LUG (SVLUG), and they appeared to be active, at least in terms of mailing list activity and event calanedars. But of course that doesn t indicate how many people are actually attending the face-to-face meetings, and how strong the LUG s are in general. So let me ask here do you attend or participate in a LUG? How active is it? What do you get out of participating in a LUG?

Ian Wienand: NoMachine NX - the missing non-manual

I've been meaning to try NoMachine NX for a while. Its promise of fast remote X11 sessions sounded exactly like what I wanted to log into my work desktop remotely (I really like having a remote desktop with saved state you can just pick up from when using remote access). That was pretty much all I knew about the software, so I was a completely blank slate. The getting started guide is the perfect example of how not to write a getting started guide. Firstly, Section 1 - "Getting started" - gives me a full history of the product, goes into significant depth about the challenges of forwarding X11 requests, talks about the caching and compression implementation, round-trip latency measurement, the details of two-way proxying system and discusses every other feature of the software. My eyes glazed over after about the first paragraph. That's all great -- I just want to know what to do! At this point, I assume that I'm required to run some sort of daemon at the remote end. I download and install the server package (it is explained that the server package requires the client and agent packages as well, fine). I'm paging down, looking for something to get me started. I'm happy to see Section 7 - "Set up your NX Server environment" (remember, at this point I though I needed some daemon running in the background constantly). It even has some commands commands to type, so I tap away, running nxserver --useradd nxtest --system. My server binary doesn't even seem to recognise these options. I give up, assuming that the server isn't running and nothing will work. The getting started guide has abruptly ended and I have no idea what to do. As it turns out, it's all completely trivial. Here's the missing "getting started guide". Additional tips: Other than the documentation, it really works as promised, making remote X11 usable. One really nice feature is that it is smart about the resolution of the remote desktop, filling up your local screen. Add to that you don't need anything setup but your normal ssh connection, and it's a great remote desktop solution.

Dirk Eddelbuettel: Correct Datetime / POSIXct behaviour for R and kdb+

We have started to look into kdb+ as a possible high-performance column-store backend. Kx offers free trials -- and so I have played with this for a day or two, both the general system, data loads and dumps and in particular with the interface to R, Based on the few files (one C source with interface code, one R file to access the C code, one object file to link against, one header file and a simple Makefile), it took just a couple of minutes to turn this into a proper CRAN-style R package. Anyway, the reason for this post was that the R / kdb+ glue code works well ... but not for datetimes. I really like to be able to pass date/time objects natively between systems as easily as, say, numbers or strings (and see e.g. my Rcpp package for doing this with R and C++) and I was a bit annoyed when the millisecond timestamps didn't move smoothly. Turns out that the basic converter function in the code had a number of problems: it converted to integer, only covered a single scalar rather than vectorised mode, and erroneously reduced a reference count. A better version, in my view, is as follows:
static SEXP from_datetime_kobject(K x) 
 
	SEXP result;
	int i, length = x->n;
	if (scalar(x))  
		result = PROTECT(allocVector(REALSXP, 1));
		REAL(result)[0] = (kF(x)[0] + 10957) * 86400;
	  else  
		result = PROTECT(allocVector(REALSXP, length));
		for(i = 0; i < length; i++)  
		    	REAL(result)[i] = (kF(x)[i] + 10957) * 86400;
		 
	 
	SEXP datetimeclass = PROTECT(allocVector(STRSXP,2));
	SET_STRING_ELT(datetimeclass, 0, mkChar("POSIXt"));
	SET_STRING_ELT(datetimeclass, 1, mkChar("POSIXct"));
	setAttrib(result, R_ClassSymbol, datetimeclass);
	UNPROTECT(2); 
        return result; 
 
This deals with vectors as well as scalars, converts Kdb's 'fractional days since Jan 1, 2000' to the Unix standard of seconds since the epoch -- including the R extension of fractional seconds -- and as importantly, sets the class attributes to POSIXt POSIXct as needed by R. With that, a simple select max datetime from table does just that, and vectors of timestamped records of trades or quotes or whatever also come with proper POSIXct behaviour into R. Note that it needs TZ to be set to UTC, though, or you get a timezone offset you may not want.

3 February 2009

David Bremner: source-highlight and oz

In order to have pretty highlighted oz code in HTML and TeX, I defined a simple language definition "oz.lang"
keyword = "andthen at attr case catch choice class cond",
          "declare define dis div do else elsecase ",
          "elseif elseof end fail false feat finally for",
          "from fun functor if import in local lock meth",
          "mod not of or orelse prepare proc prop raise",
          "require self skip then thread true try unit"
meta delim "<" ">"
cbracket = " "
comment start "%"
symbol = "~","*","(",")","-","+","=","[","]","#",":",
       ",",".","/","?","&","<",">","\ "
atom delim "'" "'"  escape "\\"
atom = '[a-z][[:alpha:][:digit:]]*'
variable delim " " " "  escape "\\"
variable = '[A-Z][[:alpha:][:digit:]]*'
string delim "\"" "\"" escape "\\"
The meta tags are so I can intersperse EBNF notation in with oz code. Unfortunately source-highlight seems a little braindead about e.g. environment variables, so I had to wrap the invocation in a script
#!/bin/sh
HLDIR=$HOME/config/source-highlight
source-highlight --style-file=$HLDIR/default.style --lang-map=$HLDIR/lang.map $*
The final pieces of the puzzle is a customized lang.map file that tells source-highlight to use "oz.lang" for "foo.oz" and a default.style file that defines highlighting for "meta" text.

David Welton: Langpop.com - now with IRC

Someone suggested the clever idea of counting IRC channel users as a metric to use for langpop.com, so I went ahead and gathered that data. Since this is the first month, there are a few glitches (I missed #fortran - sorry guys), and a thing or two to iron out, but I thought I'd go ahead and publish the new results. IRC counts towards the "discussion" portion of the stats, rather than the main part. Like everything else, it has its biases - I used the Freenode network, which is definitely more about free software than other places might be. One number that really jumps out is just how popular the Haskell channel is - it's right up there with all the most popular languages. It will be interesting to see if, over several years, all the "talk" about Haskell starts to translate into people using it for fun and for their jobs. I welcome comments on this post, but there's also a Google group I've set up for discussion of the results, data sources, languages, and so on: http://groups.google.com/group/langpop/ Another idea I'm kicking around is to create a separate page for "up and coming" languages, stuff like Scala, Clojure, F#... that kind of thing. It might have to use different metrics, because the newer languages often don't show up on many of the ones I use for the languages we currently have.

Ross Burton: Sound Juicer "I Should Be Crying, But I Just Can't Let It Show" 2.25.2

Sound Juicer "I Should Be Crying, But I Just Can't Let It Show" 2.25.2 has been released. Tarballs are available on burtonini.com, or from the GNOME FTP servers.

Gustavo R. Montesino: libgda3 3.0.2-4

This new Debian release of libgda moves gtk-doc and related packages back to build-depends-indep, and add some makefile logic on debian/rules to detect if gtk-doc is installed (looking for gtk-doc.pc) and enable or not documentation (re)generation on-the-fly. Of course, I've also been bitten by the sha1 checksums on the changes files, as I had a new version of dpkg-dev and an old devscripts/debsign installed. It took me some time to figure how to fix this one.

Peter Eisentraut: Debian PostgreSQL Packaging Project

We have launched the Debian PostgreSQL Packaging Project at http://pkg-postgresql.alioth.debian.org/. We are a group of people interested in maintaining Debian packages related to PostgreSQL.

Obviously, Debian already contains a large number of packages related to PostgreSQL. The idea behind this project is to get the involved maintainers together, concentrate resources, exchange ideas, and allow more people to get involved in small ways. See our web site about participating.

Aigars Mahinovs: Superbowl 2009

It has become a hidden tradition for me to watch Superbowl every year, despite disappointment in the game and coverage quality in the years before. It started as before: pre-game show, pre-pre-game show, coin toss show and kick-off show It is clear that the show is planned by and for advertisers and not for the viewers. That is a shame and a disgrace - the viewer must be the master of the TV programming and NOT the advertisers. In soccer the program starts, you see the captains exchange a handshake, you see the referee throw a coin and 10-15 seconds later the game is going full steam. Why do you need 3 ad breaks and 2 songs before the game is beyond me - get to the game! The camera work and NBC commentary is MUCH better than last year - stable shots with good close-ups and explanations that actually make sense even to people that are not American football experts. Oh and they actually use units - saying they won x out of y games this season and not they are x in y this season , mostly at least. The game had more fun than usual in the beginning, but the legal things slow it up again - it is weird that a guy got over the line but was called beck because of the knee touching and then a penalty for a false start ? Too much rules and regulations. Soon you ll have a team of lawyers on the sidelines and lawyer drafts will be more important than player drafts. And then again holding and chopping - isn t that what the blockers are supposed to do? Is that some kind of sissy sport? Maybe not. 100 yard interception return run I am speechless. Now that was a great, great play. That episode alone made watchig this thing worth it. Not the best sport thing I ve seen, but the best American football moment for sure. I like the basis of the game, it is a good game, but there is way too much fluff on it. That game needs to be cut down - less rules, less breaks, less interruption, less advertisements, less time to think and relax for the players. 10 seconds of play and 5 minutes of players chatting is not a sport, even curling has more action. The whole Superbowl should be over in 1 hour real time. If the TV transmission starts at 17:00, it should be done before 18:00. There is no content there to justify anything longer than that. Why is there a limited number of challenges? Do the referees make only a limited number of mistakes per game? No. Illogical. And when I though it was done and sealed, Arizona does a great drive and get a great touchdown. One more drive like that and the game could go either way. Now that is a good game. But again penalties spoil the whole game Fitsgerald gets a touchdown, another great play to turn the game around, but only because of the holding penalty giving Arizona safety score. Not deserving in my opinion. And the Steelers drive back AMAZING game! Now this is actually close to the best sports game that I have ever seen. I sure was not expecting that. And Arizona tries to drive back again. I was sleepy when I started to watch this, no sleep now. That was a great game. Despite all the commercialization, it is still a great game and it is very watchable if you download it from the Internet or watch it with TiVo and can skip the adds and the slow parts.

2 February 2009

Biella Coleman: Hacking RFID

Have you seen the New American Passport? If you have, you know it is kinda creepy. First, the abundance of patriotic pictures (eagles, presidents, flags, you get the picture) is in fact so patriotic, it might burn a hole in your hand if you hold onto it for too long. Aside from the visual creepiness, well, it is also RFID enabled and depending on your take, this is creepy (or not). But whatever your view, here is a great example of how easy it is to crack, . RFID is, as Chris Paget puts it succinctly available to be queried by a suitable reader.

Romain Francoise: First Emacs 23 pretest released

Emacs 23.0.90 was released yesterday, it's the first pretest for the upcoming 23.1 version. Debian packages for etch and lenny/sid are here; Ubuntu packages for hardy, intrepid and jaunty are here. If you find any bugs please use M-x report-emacs-bug (unless it's a packaging issue, in which case feel free to email me directly).

Ingo Juergensmann: Asrock P4V88 and 4 GB barrier

Dear Lazyweb,

today I bought 2 GB addtional RAM for my Asrock P4V88 mainboard to max it out with 4 GB RAM. So, 2 GB RAM were already installed. I'm well aware that I can't use all of the 4 GB due to PCI address space allocation.
Asrock states on their webpage:

Memory:
- Dual Channel DDR memory technology
- Supports DDR400/333/266 non-ECC, un-buffered memory
- DIMM slots: 4
- Max. capacity of system memory: 4GB*

*Due to the chipset limitation, the actual memory size may be less than 4GB for the reservation for system usage under Windows XP.


So, everything should be fine with adding 2 more Gigs to the already existing 2 GB of RAM, right?

Well, sadly it isn't. When adding the additional DIMMs I get a black, blank screen after powering the machine on. It seems to hang in POST. The HDD-LED ist lit all the time, but despite waiting for about 5 minutes nothing happens anymore. Just a blank and black screen.
Alas, the machine runs fairly well with 3 GB RAM, but then it's not Dual Ranked anymore.

I've already upgraded the BIOS to version 1.80 but no improvement. Anything else I can try? TIA!

David Moreno: And now Apache2::EmbedMP3 for your songs collections!

After I spent time working on Apache2::EmbedFLV, I thought it was a good idea to do the same for audio files, specifically MP3 files. So now that you have your MP3 files on your web server and they are accessible to the world, you may want to show them with an embedded audio player. Well, Apache2::EmbedMP3 is exactly for you! EmbedMP3 uses the fabulous WP Audio Player, a small, elegant, GPL Flash audio player, similarly to how Apache2::EmbedFLV uses Flowplayer. The interesting thing about EmbedMP3 is that you can display more interesting data on the template such as song name, artist, album, year and also lyrics, which was an interesting feature I added. In this fashion, it s very easy to just drop a whole bunch of files into a directory and all be served with the custom interface. You have to instruct Apache2:
<Files ~ "\.mp3$">
       SetHandler modperl
       PerlSetVar wpaudioplayer /audio-player/player.swf
       PerlSetVar wpaudioplayer_js /audio-player/wpaudioplayer.js
       PerlResponseHandler Apache2::EmbedMP3
</Files>
And that s it. Take a look at the documentation to see how to point it to specific locations for WP Audio Player, template file, etc. You can see the hack in action at http://dev.axiombox.com/~david/mp3. If it struggles a bit by buffering, it s because that s directly from my home Internet connection, so give it a small break :-) And, as I suggested the Radiohead video with EmbedFLV, I suggest now this Black Eyed Peas song, Like That, it s very catchy and I love it ;-) Go get the code at the Git repo or at CPAN (once it s updated and published).

Next.

Previous.