Searching...
Perl keeps impressing me (negatively) with weird stuff such as implicit context and so on....
but that one is really out of the ordinary...
prompt~/ perl
print "-------\n\n";
my $x = 'hostname1.foo.net';
$x->{'datacenter'} ||= '__';
use Data::Dumper;
print Dumper $x;
print "x".$x->{'datacenter'}."x\n";
my $y = 'hostname1.foo.neT';
print "y".$y->{'datacenter'}."y\n";
my $z = 'hostname1.foo.net';
print "z".$z->{'datacenter'}."z\n";
-------
$VAR1 = 'hostname1.foo.net';
x__x
yy
z__z
prompt~/
first, I thought calling ->{} on a scalar/string would crash. to my surprise, my program passed.
so I wrote this test only to learning something even crazier about perl.
couldn't this be a security issue?
Posted in Random Thoughts, Tech / Computers / Programming, Linux, English, Perl |
Posted on 30 Mar 2010 14:11by somekool | 2 comments
real good
[somekool@rockinTV ~]$ sudo pacman -R gail libgnomecanvas ruby-gnomecanvas \
libbonobouiruby-gnome2 libgnomeui nautilus-cd-burner \
gnome-python gnome-media rhythmbox
checking dependencies...
( 1/10) removing rhythmbox [########################################] 100%
( 2/10) removing gnome-media [########################################] 100%
( 3/10) removing gnome-python [########################################] 100%
( 4/10) removing nautilus-cd-burner [########################################] 100%
( 5/10) removing ruby-gnome2 [########################################] 100%
( 6/10) removing libgnomeui [########################################] 100%
( 7/10) removing libbonoboui [########################################] 100%
( 8/10) removing ruby-gnomecanvas [########################################] 100%
( 9/10) removing libgnomecanvas [########################################] 100%
(10/10) removing gail [########################################] 100%
[somekool@rockinTV ~]$
Posted in Tech / Computers / Programming, Linux, Gnome, English |
Posted on 26 Oct 2008 08:13by somekool | no comments
Le samedi 1er décembre prochain, le groupe
Linuq organise une journée "Porte ouverte à Linux". Au cours de cette
journée, ses membres feront des démonstrations des logiciels libres
répondant à presque tous les besoins domestiques et démontreront
qu'ils ne demandent pas plus d'expertise que les logiciels
propriétaires classiques. Mieux, ils vous montreront que tous ces
logiciels peuvent s'installer en quelques instants et gratuitement
avec une distribution Linux. Il en existe de nombreuses, mais les plus
facilement utilisables sont les distributions Mandriva, OpenSUSE et
Ubuntu. Encore mieux, ils se proposent à vous aider à installer une de
ces distributions dans votre ordinateur (inscription requise sur
www.linuq.org).
Les logiciels libres ont pris un essor extraordinaire depuis 15 ans
dans tous les domaines, que ce soit Internet qui n'existerait tout
simplement pas sans les logiciels libres (le contrôle du trafic est
assuré par des logiciels libres, les centaines de milliers
d'ordinateurs de Google fonctionnent avec du logiciel libre, les deux
tiers des sites web utilisent essentiellement du logiciel libre, ...),
plus près de nous, le plus puissant ordinateur du gouvernement du
Québec fonctionne sous Linux.
Les logiciels libres offrent de nombreux avantages: évidemment ils
sont gratuits (sans piratage!), mais aussi ils sont très sécuritaires
(à l'abri des virus), légers (pas besoin d'un ordinateur dernier cri),
compatibles avec les formats de fichier habituels (texte, image ou
son), faciles à utiliser, durables (ils ne vous forcent pas à changer
quand vous n'en n'avez pas besoin), à la pointe de la technologie. Ils
sont à nous tous, que nous ayons ou pas participé à leur écriture.
Pourquoi organisent-ils cette journée? Ils le font pour diverses
raisons, certains par fraternité, d'autres parce qu'ils aiment
bricoler leurs logiciels et partager leur passion, mais tous parce
qu'ils trouvent normal de « redonner un peu à la communauté ». La
plupart d'entre eux n'utilisent que des logiciels libres, du moins
quand ils ont le choix.
La journée se déroule de 9 heures à 17 heures au locaux 2325 et 2327
du Pavillon Palasis-Prince de l'Université Laval. Il est à noter que
le stationnement est gratuit la fin de semaine. Pour faire installer
sur son ordinateur, une inscription est requise en remplissant le
formulaire sur le site web www.linuq.org.
Tags Linux, quebec
Posted in Linux, Français |
Posted on 24 Nov 2007 13:28by somekool | no comments
I just made a small discovery last night. I already knew about ext2fs but it was not really stable, rather incompatible and as far as I remember, read-only. So, rather useless.
Now there is something I would call "new". ext2IFS. IFS for Installable FileSystem. it is simply wonderful. and for anyone using windows who needs access to their ext2/3 partitions, try this one out.
As you already know. your data is the most important part of computing. and with all open source software, I recommend reading all the documentation. in this case, it is all shown during the install process. please read it or don't cry when something happen.
Tags data, disk, ext2, ext2fs, ext2ifs, ext3, Linux, partition, unix, vista, windows, xp
Posted in Linux, English |
Posted on 05 Sep 2007 14:47by somekool | 1 comment
To follow my last post. Here is the list of interesting articles I fall upon today. As I already said. Today has been a very rewarding day for finding interesting articles. So, here it comes. I will not place them in order of preference but instead I will try to place them in order of accessibility (less geek to the geekiest)
The police to start analyzing our urine through the sewers. That's the cherry on the sundae. If they bring their sample extraction device all the way to our houses. Not only they will be able to know who use what drugs but also what other consumer products we use. Then use the data for marketing purposes. That's the beginning of real privacy violation. And people worry about computers?
Get Rich Slowly. No comments, excellent reading. And this article really makes me believe again that justbudget is totally appropriate and does help in financial Independence.
Plasma VS LCD HTTV comparison
Computing article ... lots of good points. last page is Linux Kernel stuff
only, kinda technical. But the first two pages are interesting to anyone curious about computer history. It brings a fresh point of view on the truth. Linux lovers be careful. I knew XOrg had great optimization needs but this article simply make me wish I had something better than Linux to run my favorite desktop environment.
Call me ignorant but I don't even understand how a project like a free browser might need a CEO. This article explains it all. How is Mozilla Firefox making $US55million a year? (and much more...)
More Linux related articles from apcmag. I think today was the first time I was visiting their site and one of the reason I am blogging about it today is to make sure I will visit them again.
And finally the article that brought me to their site. The Linus Torvalds Interview on Linux 3.0.
Tags articles, drugs, financial, firefox, independence, interesting, linus, Linux, mozilla, privacy, violation
Posted in Tech / Computers / Programming, Linux, Drugs, English |
Posted on 23 Aug 2007 03:13by somekool | no comments
If you are like me, you like system that works and you care much more about the latest version of KDE than the latest version of XOrg. especially when updating KDE is pain-less and bug-free while XOrg means talking with God, backup-ing your Mother and what not.
So I wanted to be able to run
emerge -avUNt world
like everyone else, while staying on XOrg 6.9
Like you might know, the recent portage are not forcing us to do the update. you cannot run 'emerge world' without upgrading. and upgrading is far from being easy. While preventing portage from forcing is not as easy as it sound. It is not that hard. thanks to /etc/portage system.
here is how to do it.
- first add the following lines in /etc/portage/package.mask
### I dont want to update X
>=x11-base/xorg-x11-7.0
>=app-doc/doxygen-1.4.5
>=media-gfx/imagemagick-6.2.5.6
>=x11-libs/qt-4.1.4-r1
>=media-gfx/graphviz-1.16-r2
>=app-office/openoffice-bin-2.0.3
>=media-libs/libsdl-1.2.8-r2
x11-libs/libXScrnSaver
### END
- then add the following line in /etc/portage/package.unmask
<x11-base/xorg-x11-7.0
after that you might get 1 or 2 more problem. I remember I also had to modify an ebuild and remove a useless dependency on a package. if it does not work for you. please comment below. I'm gonna help you to go through it and I'll update this post for a more accurate information.
have a nice day.
Tags 6.9, 7.1, emerge, gentoo, kde, Linux, pain, world, xorg
Posted in Tech / Computers / Programming, Linux, Gentoo, English |
Posted on 17 Nov 2006 07:20by somekool | no comments
Apparemment il y aurait des efforts de la part du Gouvernement du Quebec en regards avec l'OpenSource. C'est dure de dire a qu'elle point ils sont serieux et jusqu'ou il se renderont. Mais deja, cest un debut. Et tres apprecier, du moins en ce qui me concerne. Idealement, nous verrons de plus en plus de projet de ce genre et plus d'aide sera apporter au monde du logiciel libre. Lequel a son tour aidera le monde entier, encore plus que deja.
reference
Tags gouvernement, libre, Linux, logiciel, open, polique, quebec, source
Posted in Linux, Canadian Politics, Français |
Posted on 23 Oct 2006 05:10by somekool | no comments
KDE, the world famous open source desktop environment is now 10 years old. WOW.
Matthias Ettrich's 14th October 1996 announcement original post
It's the great moment for KDE right now, KDE 3.5.5 just got released. The most powerful and stable release ever. and KDE 4 is just around the corner. KDE4 Beta Packages already available for Mac OS X and for Linux
I think its a great time to watch screenshots and try it out (Kubuntu, Sabayon) and get involved
KDE Happy 10 years and we wish you another good 10 years.
omedeto & gambatte
Tags 10years, kde, kubuntu, Linux, sabayon
Posted in Tech / Computers / Programming, Linux, KDE, English |
Posted on 13 Oct 2006 22:25by somekool | no comments
Maybe some of you have tried the excellent Enlightenment 17. Although still under heavy development, its definitly worth the look. Luckily for us gentoo user, there is ebuilds already done which makes the compiling task easy. Still, when is time to upgrade, it's a not all automatic. The problem is; all packages keeps de same version (9999 for development). So, if you re-emerge e, it will not re-emerge all the dependencies, because they are already installed and the version number has NOT changed. So You have to check all the dependencies and make sure to re-emerge them all, in order. its a bit of a pain in the butt when you just want to see the latest development the team has made. So I wrote a script to make it even easier. I wrote it few months ago while I was doing it by hand. and Few days ago, I thought I might upgrade E17 again and check it out. so I tried out my script which worked with not too many bug fixes ;) hehe.
click more for the script and to send comments
It's not 100% production quality, but it does the job ;) maybe you'll laugh on the incomplete part, maybe not.
$ cat ~/bin/emerge_e17
#!/bin/sh
# krypton ~ # epm -qa | grep 9999 | cut -d \- -f 1 | xargs echo
# eet embryo engrave e_utils examine edje epsilon epeg engage ewl evas ecore esmart e
# http://www0.get-e.org/EFL_User_Guide/English/_pages/print.html
e17_ignored_libs="imlib2 edb"
e17_libs="eet evas ecore epeg embryo edje epsilon esmart emotion ewl engrave emotion"
e17_wm="e"
e17_dm="entrance"
e17_apps="entice elicit embrace eclair evfs entropy exhibit eclair ephoto erss evidence"
e17_misc="e_utils examine engage"
e17_proto="etk exhibit entropy"
e_modules="calendar flame monitor mount rain screenshot slideshow snow tclock weather"
default="$e17_libs e engage entice elicit eclair"
function choose_packages() {
if [ -f /tmp/.e17.package_list ]
then
echo `cat /tmp/.e17.package_list`
else
echo "what would you like to (re)install ?"
echo "-1 - The Default ($default)"
echo "0 - imlib2"
echo "1 - libraries ($e17_libs)"
echo "2 - Window Manager (e17)"
echo "3 - Extra packages ($e17_apps $e17_misc $e17_proto)"
echo "4 - Extra Modules ($e_modules)"
echo "5 - Themes (none)"
read answer
echo "you choose ($answer) but I'll go anyway with the default because I'm lazy."
echo "$default" > /tmp/.e17.package_list
echo `cat /tmp/.e17.package_list`
fi
}
function compile_app_list() {
did_something=0
for package in $1
do
if [ ! -e /tmp/.e17.$package ]
then
echo "emerging $package...."
emerge $package
err_code=$?
if [ $err_code -eq 0 ]
then
touch /tmp/.e17.$package
did_something=1
else
echo "... emerge returned error code $err_code"
fi
fi
done
echo $did_something
}
function main() {
list=`choose_packages`
rep=`compile_app_list "$list"`
if [ $rep -eq 0 ]
then
echo "All package has already been emerged, you would like to start over ? (y/n)"
read answer
if [ "$answer" == "y" ]
then
rm -f /tmp/.e17.*
list=choose_packages
compile_app_list $list
fi
fi
}
main
enjoy
Tags 17, e, ebuild, emerge, enlightenment, gentoo, Linux, script
Posted in Tech / Computers / Programming, Linux, Gentoo, English |
Posted on 12 Aug 2006 00:35by somekool | 1 comment
Here is my latest toy. I made myself a Kanji studying tool. It took me only few hours to build using QtRuby. I find it pretty amazing what I built in this short amount of time even though I don't have much experience with this technology. It is a really impressive technology.
I build up a small kexi (sqlite3) database, which I open with ActiveRecord. I could have used Qt's SQL module, but I'm so used to AR that I did not bother.
I named it kikkanji because I first intended to create a kicker panel applet. but, panel applets are not yet possible with QtRuby. so I had to wait. I instead used Qt Designer and created myself a main window.

download now
comments and feature request are definitely welcome.
Tags activerecord, japanese, kanji, kexi, nihongo, qt, qtruby, ruby, sqlite
Posted in Tech / Computers / Programming, Ruby, Ruby on Rails, QtRuby, Linux, KDE, Qt, 日本人のために書きました, English, 日本語を勉強しています |
Posted on 16 May 2006 21:53by somekool | no comments