Tech Tips: Handling Int Vectors in Perl 5

The Tips

Apparently, perldoc -f vec writes 16-bit / 32-bit / 64-bit quantities in big endian byte order, including on little endian architectures such as x86. This may cause issues when writing XS / etc. bindings.

I ended up using the following approach on x86-64 Linux…

Recent Hacktivity Log

This is another "recent hacktivity log" of some of the open source work I've been up to lately.

New Command-Line App: App-Du-Analyze

App-Du-Analyze (with its command-line script of "analyze-du") is now available on CPAN. What it does is allow you to analyse the output of the UNIX "du" command, get results based on a prefix and a depth, and sort them. It is my preference for a disk usage analyser, with the benefit of being able to run several queries on the …

Tel Aviv Perl Mongers Meeting on 26 March 2014: Special Challenges in Hardware Description Languages

ב-26 במרץ 2014 (יום רביעי) נערוך את מפגש הפרל החודשי שלנו שבו ניפגש לשמוע את הרצאתו מאיר גוטמן על "אתגרים מיוחדים בשפות תיאור חומרה". אנו נפגשים ב-18:30 ומתחילים ב-19:00. כתובת: מכללת שנקר, חדר 247 (הבניין הישן ברחוב אנה פרנק) ברמת גן. ראוי לציין שקשה מעט למצוא את החדר וכדי לעשות זאת יש לעלות …

Tech Tip: Opening a file for read/write without clobbering it.

perlopentut gives several options for opening a file for read and write, and I opted to use '+>' for Maniac Downloader, but as it turned out, it caused the existing file to be clobbered (= its length to be set to zero and all of its contents deleted).

After asking on Freenode's #perl channel, we reached this solution …

Tech Tip: Loop Labels in Perl 6

It is known that one can label loops (or arbitrary blocks) in Perl 5, using the syntax of MYLABEL: while (COND()) { BLOCK } or MYLABEL: for my $x (@array) { BLOCK } and then one can do last MYLABEL;, next MYLABEL;, or redo MYLABEL; (for more information see perldoc perlsyn). However, I was unable to find how to do something like that in Perl 6, despite some amo…