Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Shlomi Fish (918)

Shlomi Fish
AOL IM: ShlomiFish (Add Buddy, Send Message)
Yahoo! ID: shlomif2 (Add User, Send Message)

I'm a hacker of Perl, C, Shell, and occasionally other languages. Perl is my favourite language by far. I'm a member of the Israeli Perl Mongers, and contribute to and advocate open-source technologies. Technorati Profile []
+ -

  Comment: A few notes (Score 1) on 2010.05.25 6:49

by Shlomi Fish on 2010.05.25 6:49 (#72005)
Attached to: Ctypes for Perl: Intro and API spec

Hi doubi,

I'm glad you have the enthusiasm to work on this project. As you know (and some other readers here may), I've also proposed a CTypes for Perl project to the TPF two or three times, but it wasn't accepted, so I'm glad it was accepted as part of GSoC.

I'd like to note that when I requested help with some ctypes (in Python) problems on #python on Freenode, some of the people there told me that they now prefer to use Cython over ctypes and that "it also has a strict subset so that a cython module can be used directly in Python, rather than compiled" (but "idea how good that is though.") so it may be worth to investigate. Cython is not a core Python module though, which has been the case for ctypes for a few years now.

Otherwise, note that your first interface is procedural rather than functional (see Functional programming on the wikipedia, which is not the opposite of Object Oriented programming). The interface looks fine, but I think we may eventually overgrow the pack/unpack like notation because ctypes and the C programming language supports quite a bit more than what unpack gives. Also see the Data-ParseBinary CPAN module, which also has origins in the Python "construct" module, and which is far superior to pack/unpack.

I agree with the other people here that we should call it "ctypes" or something and not "ptypes". I tried to log-in into twitter and follow your tweets, but it said that "Twitter is over capacity." and wouldn't let me. I'm not visiting Twitter a lot often. In any case, I'm subscribed to the master Perl feed, and you should see about getting it syndicated on the various Perl planets.

Good luck with perlifying ctypes.

Read More 6 comments
Comments: 6
+ -

  Comment: Conditional for removing "." and ".." (Score 1) on 2010.01.03 4:15

by Shlomi Fish on 2010.01.03 4:15 (#71469)
Attached to: CPAN's Greatest Hits - Path::Class

Hi Schwern!

Your conditional reads: $_ ne '.' or $_ ne '..' but it is wrong, and should be either $_ ne '.' and $_ ne '..' or alterantively ! ($_ eq '.' or $_ eq '..'). Furthermore, a better, more idiomatic, way would be to use File::Spec->no_upwards.

Read More 5 comments
Comments: 5
+ -

  Comment: Re:I never cared for Joel that much (Score 1) on 2009.11.21 12:24

by Shlomi Fish on 2009.11.21 12:24 (#71202)
Attached to: Criticizing Academia -- Oops

Well, since we're down to personal accusations and pointless discussions on who ultimately has the burden of proof lies, allow me to invoke Godwin's Law and end this discussion: you are a Nazi!

OK, I've lost, now let's go on with the rest of our lives. I'll continue to link to Joel when and if I agree with him. If you think he (or whomever I'm citing) is wrong and you expect to convince me that you are right, then you'll need to give me a proper argument explaining why and where he is wrong. Otherwise, I'll remain convinced in my original opinion, because it seems logical to me. When trying to convince someone else of your opinion, the burden of proof is on you, because that someone should not and probably will not listen to your rejection of their opinion by faith alone. See also this Hackers-IL post.

Anyway, enjoy your victory. ;-)

Read More 9 comments
Comments: 9
+ -

  Comment: Re:I never cared for Joel that much (Score 1) on 2009.11.16 13:24

by Shlomi Fish on 2009.11.16 13:24 (#71146)
Attached to: Criticizing Academia -- Oops

I don't like the hype/cult around Joel either, but I'm still an avid reader of his articles because I find them funny, amusing and usually insightful, or otherwise giving good food for thoughts and acting as a useful starting point for further discussion of the matter. I don't always agree with what Joel says, and naturally buy everything he says with a grain of salt, but still find value in what he says.

It seems there's often an opposite phenomenon from what you describe - that many times I mention something that Joel says for support someone gives an ad-hominem attack saying how much Joel sucks and how much it means my article is invalid.

If you have specific arguments against what Joel (or whoever) said, feel free to mention them giving proper reasons for why you think they are wrong. But from my impression of your Internet persona, you tend to throw many arguments into the air without giving proper explanation or reasoning (like "I disagree. What you said or your link sucks."), and expect us to guess why you think so. To do so is anti-intellectual, and I can easily dismiss what you said for lack of proper reasoning.

Now I tend to agree with you and Ovid (and the article he quoted) about education, and that it's impossible to teach everything within the scope of the degree, or that high education (or below) can fully prepare people and make them suitable for the job market. I wouldn't accuse Joel of trying to sell his tools on purposes - that doesn't seem to be his primary motivation behind his post, but he still may believe he knows too well how to do things the right way.

I may have errored with the same error, when I claimed that too little focus is given on reading "real-world code", which may not be the most elegant, and may be somewhat buggy. One constantly hear people complain about how bad the code that they work or what other people have written is, and how they would love to start over. (This was in fact inspired by what Joel said in "Things you Must Never Do, Part I"). In their studies, most people are not exposed to having to read and improve real code, which may be hard-to-read inelegant, or somewhat buggy, but which rewriting it from scratch will be much more time consuming than improving it by writing automated tests, refactoring, etc. In any case, there's little focus given to it in the universities, but I'm not sure if putting it in the curriculum will be a good idea. Maybe giving more projects where students contribute to open-source code (and not necessarily the best open-source code out there - there's a lot that's pretty bad), and then eventually merging it in, instead of writing something from scratch would be a good idea.

But I agree that measuring universities based on metrics is bad.

Read More 9 comments
Comments: 9
+ -

  Comment: CPAN6 (Score 1) on 2009.10.20 14:27

by Shlomi Fish on 2009.10.20 14:27 (#70931)
Attached to: Downgrading Moose

From what I understood, this is among the many things that CPAN6 was supposed to solve. I looked at the presentation and could not understand it at first, but maybe I will now. As I recall I had read the Aegis version control page with its features-list when I was looking for a VCS and not understanding what most of its features mean, and then after I had used BitKeeper, understanding most of them, so I guess maturity and experience count. :-).

But like I want to say, the current CPAN ownership, release and versioning system leaves a lot to be desired. It seems like a lot of patchwork to me with hacks upon hacks. I still don't understand why there can only be one namespace master in PAUSE, and not several who can hand out uploading bits. And naturally there should be a way in the admin screen to assign ownership to all modules maintained by the Catalyst team to any of the Catalyst maintainers. And naturally, people would sometimes love to create alternative CPAN branches of modules that were forgotten or unmaintained without their missing-in-action author's approval, or as a github-like fork of the module that will hopefully be merged into the main one.

CPAN is probably better than most of the source code repositories for other languages that I know about. Even its comprehensiveness is second to none. But in its years it has accumulated a lot of historical cruft, partly due to "Release Early, Release Often". So I think something like CPAN6 will be a good thing, assuming we can get everyone to gradually switch to it without breaking production (possibly by syndicating stuff to the old CPAN and its mirrors.).

Read More 9 comments
Comments: 9
+ -

  Comment: For the blog stuff, look at Catable (Score 1) on 2009.09.10 8:36

by Shlomi Fish on 2009.09.10 8:36 (#70535)
Attached to: Thinking Aloud

Hi Yaron! For the WordPress-like blog engine, look at Catable, which Altreus and I started working on. It's written in Perl 5 using Catalyst, Template Toolkit, DBIx-Class, etc., has several tests and it is MIT/X11L. It's still not ready for deployment, but we're making progress, and we'd love to have more contributors. Feel free to fork the github repository, and hack on.

I'd like to work on it more intensively in the near future, because I'd like to move my blogs to, where I can have more blogs, put some ads, have an unlimited amount of user-pics (always a plus) and have more control of the blog.

Read More 7 comments
Comments: 7
+ -

  Comment: Nice, but it's not always true (Score 1) on 2009.08.25 8:59

I'm glad autodia has been so popular and attracted so many contributors. But it's not always true for many small projects (or even some medium-scale ones). I've started several projects of my own, and often I'm happy just to hear of people who are using them, are trying to use them, or are just interested in them, while people trying to actively contribute code or other patches is something I consider quite a luxury. So consider yourself privileged with autodia.

Note that I'm not complaining. I'm not forcing and cannot force anyone to contribute, I'm just saying that one should not expect every project to be interesting enough to gather co-developers. So I've come to accept the fact that I need to do most of the work myself, and not hear too much from my users. I'm still keen on publicising the interesting projects in such resources as Freshmeat, or the FSF directory because I'm still hopeful to acquire some users through them, which will hopefully translate into some feedback and contributions.

Read More 1 comments
Comments: 1
+ -

  Comment: Thanks! (Score 1) on 2009.08.25 7:45

by Shlomi Fish on 2009.08.25 7:45 (#70255)
Attached to: source code on GitHub

Many thanks for making the source available. I still have the source of the old, static HTML site if anyone is interested. Anyway, I'll be sure to check it out.

Read More 3 comments
Comments: 3
+ -

  Comment: I've been having a similar feeling (Score 1) on 2009.08.24 5:40

by Shlomi Fish on 2009.08.24 5:40 (#70238)
Attached to: Myth of rarity of "good Perl programmers"

Hi scrottie!

I've been having a similar feeling about most Perl workplaces too, but didn't have the chance to put it into words yet. Naturally, this is a generalisation, and I believe there are some Perl shops out there that give their Perl hackers a wonderful treatment and conditions. It's very possible that many Perl programmers are simply intelligent enough to have found jobs using other technologies, where they are treated better.

Google is indeed a good example. They hire Perl programmers and Python programmers to write Java code because they know they will be better than native Java programmers. I don't hold it against Google for choosing to standardise on Python instead of Perl (you usually have to standardise on something, unless you are NASA), but it's illustrative of how non-Perl shops generally treat programmers better.

I've written "The End of Info-Tech Slavery" (not Perl-specific) out of similar sentiments. I think it's a good read, but it's still very cynical. I have started working on a better essay, but had a lack of inspiration about it.

In any case, what should we do about it? "Those who can - do. Those who can't - complain." Perhaps we can write a feature about it, and refer prospective Perl shop managers there. What do you say?

Read More 3 comments
Comments: 3
+ -

  Comment: Perl isn't always perfect (Score 1) on 2009.08.04 6:08

by Shlomi Fish on 2009.08.04 6:08 (#69854)
Attached to: Descriptive errors?

The situation with Perl's warnings and errors is not always so rosey. For example, with this program:


use strict;
use warnings;

$name = "Sophie";

print "Hello $name!\n";

We get:

Global symbol "$name" requires explicit package name at line 6.
Global symbol "$name" requires explicit package name at line 8.
Execution of aborted due to compilation errors.

After years of using use strict I got used to the fact that it means that I haven't declared the variable using a "my" or an "our" or whatever. However, many newcomers fall on it when they are trying to add "strict" to their programs, and then ask us about it on Freenode's #perl.

Granted, it may be too late to change this message due to backwards compatibility. "use diagnostics" seems to help, though.

Regarding Subversion, it is documented in "Dispelling Subversion FUD" that "A lot of error messages could be clearer. We're working on it.". And I'm not sure the error messages emitted by most other programs (including most Perl programs) will be much clearer if they suddenly run out of disk-space on the device.

Read More 3 comments
Comments: 3
+ -

  Comment: Re:how? (Score 1) on 2009.06.23 2:29

by Shlomi Fish on 2009.06.23 2:29 (#69138)
Attached to: Tight Coupling of Applications

With Subversion, the internals are a morass of complexity. I wrote a few scripts in my time, eg. to undo broken commits immediately after they were made, but they were trivial in their effects and still involved a lot of cargo cult because the Subversion data model is just such a hairy construction.

I didn't find the Subversion internals that complex. I contributed some patches to Subversion back at the time, and found the code easy enough to understand and change. Subversion indeed uses a transactional database for storing the tree and the changesets, but it's not as complex as you describe.

With git, though, I still don't understand how exactly its data model works. After reading this document and asking some people, I can finally handle the day-to-day operation of git, but I still feel it does a lot of voodoo behind the scenes.

Read More 11 comments
Comments: 11
+ -

  Comment: Interesting (Score 1) on 2009.06.23 2:24

by Shlomi Fish on 2009.06.23 2:24 (#69137)
Attached to: Tight Coupling of Applications

That's the second hard-to-reproduce bug I heard with Subversion the past few weeks (this one being the first). I've never ran into such problems with Subversion - it just works, so it seems very strange to me. If you can somehow reproduce the problematic behaviour on non-confidential, example repositories than I'm sure the Subversion developers will appreciate a bug report.

Complaining is easy, but actually fixing the problems is more worthwhile in the long run.

Read More 11 comments
Comments: 11
+ -

  Comment: I'm Mostly Blogging on my LiveJournal Tech Blog (Score 1) on 2009.05.22 10:52

by Shlomi Fish on 2009.05.22 10:52 (#68738)
Attached to: Leaving use.perl

I've been mostly blogging on my tech blog, which is technically a LiveJournal community. I tag all Perl-related entries with the "perl" tag. On the link I have some aggregated blogs - one of them for all Perl-related stuff. The LiveJournal solution works for me, but is not ideal. For example Technorati refuses to index this blog because it's an LJ community.

Read More 5 comments
Comments: 5
+ -

  Comment: Firefox is not that bad here. (Score 1) on 2009.05.19 5:02

by Shlomi Fish on 2009.05.19 5:02 (#68641)
Attached to: Windows? Why?

I'm using Firefox as my main browser here on my Mandriva Linux Cooker system, and it's not slow, does not hang, and crashes very rarely (and when it does, it's probably due to the Flash plugin). So I'm very happy with it.

If Firefox is acting up on your system, it's probably due to a problem there, and not a general quality of Firefox. What is your version of Ubuntu? Did you try filing a bug report for it?

One thing that irritates me about Firefox is that its memory use increases over time for some reason, and so I need to restart it from time to time. But this takes several good hours to have an effect.

Read More 10 comments
Comments: 10
+ -

  Journal: Meta: Script to Filter the Master Blogs' Feed on 2009.05.13 9:30

Journal by Shlomi Fish on 2009.05.13 9:30
use Perl

As expected from the latest trend in the Perl blogosphere this post will be about Roles. And Moose! And Roles in Moose! And Moose in Roles! And Roles outside Moose…

Read More 0 comments