[link] [comments]
(dxxii) 8 great CPAN modules released last week
Updates for great CPAN modules released last week. A module is considered great if its favorites count is greater or equal than 12. App...niceperl.blogspot.com
submitted by /u/briandfoy [link] [comments] |
- YouTube
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.www.youtube.com
I've been trying to port a couple of GUI programs I have from Tkx to Prima in order to get free from ActiveState's shenaningans. I have succesfully translated part of my GUIs to Prima, but I have a lot of trouble with layout.
I don't see a simple way to do what I want, which is to have several rows of controls (buttons at the top and bottom, and a TextView or Edit control in the middle) without it turning into a mess.
I was using frames in Tkx, which are like invisible containers for controls, but Prima doesn't seem to have an equivalent. There are GroupBoxes which always include a border and legend, and FrameSets which always display a border and seem to always be resizable.
I haven't found any comprehensive documentation on any of these, and in particular, the example program for frames shows the use of some exotic properties that don't seem to be documented anywhere.
I'd be grateful if someone could point me to any posts, tutorials, or documentation about frames or whatever I can use as a container for buttons and controls.
submitted by /u/elbitjusticiero
[link] [comments]
I'm attempting to port this C hashing function to Perl but it's not working:
c static inline uint64_t hash64(uint64_t val, unsigned bits) { return (val * 0x61c8864680b583ebull) >> (64 - bits); }
Here is what I came up with:
``` sub hash64 { my ($val, $bits) = @_; my $magic_constant = 0x61c8864680b583eb;
# Perform the hash computation my $hashed = ($val * $magic_constant) >> (64 - $bits); return $hashed;
} ```
My hashed values aren't matching what I'm seeing from C. I suspect it has to do with how Perl handles numbers larger than 64bit? C would truncate them (I think) but Perl will happily work with larger numbers?
12345 hashed to 64bits should output 6832837858993532755 according to the C version. Am I missing something obvious?
submitted by /u/scottchiefbaker
[link] [comments]