pointer
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 253
Devel::Pointer 1.00
Devel::Pointer is a Perl module that can fiddle around with pointers. more>>
Devel::Pointer is a Perl module that can fiddle around with pointers.
SYNOPSIS
use Devel::Pointer;
$a = address_of($b); # a = &b;
$b = deref($a); # b = *a;
$a = unsmash_sv(0+$scalar_ref);
@a = unsmash_av(0+$array_ref);
%a = unsmash_hv(0+$hash_ref);
&a = unsmash_cv(0+$code_ref);
# OK, you cant do that, but you get the idea
$c = deref(-1); # *(-1), and the resulting segfault.
The primary purpose of this is to turn a smashed reference address back into a value. Once a reference is treated as a numeric value, you cant dereference it normally; although with this module, you can.
Be careful, though, to avoid dereferencing things that dont want to be dereferenced.
<<lessSYNOPSIS
use Devel::Pointer;
$a = address_of($b); # a = &b;
$b = deref($a); # b = *a;
$a = unsmash_sv(0+$scalar_ref);
@a = unsmash_av(0+$array_ref);
%a = unsmash_hv(0+$hash_ref);
&a = unsmash_cv(0+$code_ref);
# OK, you cant do that, but you get the idea
$c = deref(-1); # *(-1), and the resulting segfault.
The primary purpose of this is to turn a smashed reference address back into a value. Once a reference is treated as a numeric value, you cant dereference it normally; although with this module, you can.
Be careful, though, to avoid dereferencing things that dont want to be dereferenced.
Download (0.003MB)
Added: 2007-07-26 License: Perl Artistic License Price:
821 downloads
aPong
aPong is a Pong game written in x86 Assembly language. more>>
aPong is a Pong game written in x86 Assembly language.
As I run Linux on my own machine, I dont do a lot with intel syntax. I needed to learn this for a lab. After scouring the internet for a few hours, I came across NASM. This looked as though Id be able to just code in this, take it into the Windows computers and have it just work.
No such luck. So, thats beside the point now, but I wrote this in order to get to grips with the syntax (which turned out to be the wrong one.)
Main features:
- 2-player
The left one uses Q/A to go up/down, the second one uses P/L. Escape to quit.
- Uses SDL from assembly language
I quite like SDL. I quite dislike x86. I already know SDL. It was already a learning exercise, I wasnt going to go off learning xlib or something at the same time. This gave me a way to quickly get the code written.
- Avoids the use of frame pointers
Why do you need frame pointers if youre not going to be running it in a debugger. Its not difficult to keep track of the stack frame if youre writing it yourself. You dont need to keep moving the stack pointer inside a function, just once at the start and once at the end. Then all you need is to take offsets from esp (so long as you remember how big the frame is at the time.)
This really gets on my nerves. People dont seem to realise the amount of overhead (in terms of lost cycles) that a function call has. To say global variables are BAD is just plain wrong. Sure, it can lend itself to abuse, but thats like saying you shouldnt code in C or use UNIX because they dont hold your hand.
- The input system isnt great.
Because I was trying to keep the code size down, I went the way of using SDL_GetKeyState and SDL_PumpEvents. These mean that if the key is not actually down at the time of the PumpEvents call, it drops the keypress. (if you want to see how you should do it, look at the events system in STP
<<lessAs I run Linux on my own machine, I dont do a lot with intel syntax. I needed to learn this for a lab. After scouring the internet for a few hours, I came across NASM. This looked as though Id be able to just code in this, take it into the Windows computers and have it just work.
No such luck. So, thats beside the point now, but I wrote this in order to get to grips with the syntax (which turned out to be the wrong one.)
Main features:
- 2-player
The left one uses Q/A to go up/down, the second one uses P/L. Escape to quit.
- Uses SDL from assembly language
I quite like SDL. I quite dislike x86. I already know SDL. It was already a learning exercise, I wasnt going to go off learning xlib or something at the same time. This gave me a way to quickly get the code written.
- Avoids the use of frame pointers
Why do you need frame pointers if youre not going to be running it in a debugger. Its not difficult to keep track of the stack frame if youre writing it yourself. You dont need to keep moving the stack pointer inside a function, just once at the start and once at the end. Then all you need is to take offsets from esp (so long as you remember how big the frame is at the time.)
This really gets on my nerves. People dont seem to realise the amount of overhead (in terms of lost cycles) that a function call has. To say global variables are BAD is just plain wrong. Sure, it can lend itself to abuse, but thats like saying you shouldnt code in C or use UNIX because they dont hold your hand.
- The input system isnt great.
Because I was trying to keep the code size down, I went the way of using SDL_GetKeyState and SDL_PumpEvents. These mean that if the key is not actually down at the time of the PumpEvents call, it drops the keypress. (if you want to see how you should do it, look at the events system in STP
Download (0.008MB)
Added: 2007-03-05 License: GPL (GNU General Public License) Price:
965 downloads
PDL::Internals 2.4.3
PDL::Internals is a Perl module that contains a description of some aspects of the current internals. more>>
PDL::Internals is a Perl module that contains a description of some aspects of the current internals.
Intro
This document explains various aspects of the current implementation of PDL. If you just want to use PDL for something, you definitely do not need to read this. Even if you want to interface your C routines to PDL or create new PDL::PP functions, you do not need to read this man page (though it may be informative). This document is primarily intended for people interested in debugging or changing the internals of PDL. To read this, a good understanding of the C language and programming and data structures in general is required, as well as some Perl understanding. If you read through this document and understand all of it and are able to point what any part of this document refers to in the PDL core sources and additionally struggle to understand PDL::PP, you will be awarded the title "PDL Guru" (of course, the current version of this document is so incomplete that this is next to impossible from just these notes).
Warning: If it seems that this document has gotten out of date, please inform the PDL porters email list (pdl-porters@jach.hawaii.edu). This may well happen.
Piddles
The pdl data object is generally an opaque scalar reference into a pdl structure in memory. Alternatively, it may be a hash reference with the PDL field containing the scalar reference (this makes overloading piddles easy, see PDL::Objects). You can easily find out at the Perl level which type of piddle you are dealing with. The example code below demonstrates how to do it:
# check if this a piddle
die "not a piddle" unless UNIVERSAL::isa($pdl, PDL);
# is it a scalar ref or a hash ref?
if (UNIVERSAL::isa($pdl, "HASH")) {
die "not a valid PDL" unless exists $pdl->{PDL} &&
UNIVERSAL::isa($pdl->{PDL},PDL);
print "This is a hash reference,",
" the PDL field contains the scalar refn";
} else {
print "This is a scalar ref that points to address $$pdl in memoryn";
}
The scalar reference points to the numeric address of a C structure of type pdl which is defined in pdl.h. The mapping between the object at the Perl level and the C structure containing the actual data and structural that makes up a piddle is done by the PDL typemap. The functions used in the PDL typemap are defined pretty much at the top of the file pdlcore.h. So what does the structure look like:
struct pdl {
unsigned long magicno; /* Always stores PDL_MAGICNO as a sanity check */
/* This is first so most pointer accesses to wrong type are caught */
int state; /* Whats in this pdl */
pdl_trans *trans; /* Opaque pointer to internals of transformation from
parent */
pdl_vaffine *vafftrans;
void* sv; /* (optional) pointer back to original sv.
ALWAYS check for non-null before use.
We cannot inc refcnt on this one or wed
never get destroyed */
void *datasv; /* Pointer to SV containing data. Refcnt inced */
void *data; /* Null: no data alloced for this one */
int nvals; /* How many values allocated */
int datatype;
PDL_Long *dims; /* Array of data dimensions */
PDL_Long *dimincs; /* Array of data default increments */
short ndims; /* Number of data dimensions */
unsigned char *threadids; /* Starting index of the thread index set n */
unsigned char nthreadids;
pdl *progenitor; /* Im in a mutated family. make_physical_now must
copy me to the new generation. */
pdl *future_me; /* Im the "then" pdl and this is my "now" (or more modern
version, anyway */
pdl_children children;
short living_for; /* perl side not referenced; delete me when */
PDL_Long def_dims[PDL_NDIMS]; /* Preallocated space for efficiency */
PDL_Long def_dimincs[PDL_NDIMS]; /* Preallocated space for efficiency */
unsigned char def_threadids[PDL_NTHREADIDS];
struct pdl_magic *magic;
void *hdrsv; /* "header", settable from outside */
};
This is quite a structure for just storing some data in - what is going on?
<<lessIntro
This document explains various aspects of the current implementation of PDL. If you just want to use PDL for something, you definitely do not need to read this. Even if you want to interface your C routines to PDL or create new PDL::PP functions, you do not need to read this man page (though it may be informative). This document is primarily intended for people interested in debugging or changing the internals of PDL. To read this, a good understanding of the C language and programming and data structures in general is required, as well as some Perl understanding. If you read through this document and understand all of it and are able to point what any part of this document refers to in the PDL core sources and additionally struggle to understand PDL::PP, you will be awarded the title "PDL Guru" (of course, the current version of this document is so incomplete that this is next to impossible from just these notes).
Warning: If it seems that this document has gotten out of date, please inform the PDL porters email list (pdl-porters@jach.hawaii.edu). This may well happen.
Piddles
The pdl data object is generally an opaque scalar reference into a pdl structure in memory. Alternatively, it may be a hash reference with the PDL field containing the scalar reference (this makes overloading piddles easy, see PDL::Objects). You can easily find out at the Perl level which type of piddle you are dealing with. The example code below demonstrates how to do it:
# check if this a piddle
die "not a piddle" unless UNIVERSAL::isa($pdl, PDL);
# is it a scalar ref or a hash ref?
if (UNIVERSAL::isa($pdl, "HASH")) {
die "not a valid PDL" unless exists $pdl->{PDL} &&
UNIVERSAL::isa($pdl->{PDL},PDL);
print "This is a hash reference,",
" the PDL field contains the scalar refn";
} else {
print "This is a scalar ref that points to address $$pdl in memoryn";
}
The scalar reference points to the numeric address of a C structure of type pdl which is defined in pdl.h. The mapping between the object at the Perl level and the C structure containing the actual data and structural that makes up a piddle is done by the PDL typemap. The functions used in the PDL typemap are defined pretty much at the top of the file pdlcore.h. So what does the structure look like:
struct pdl {
unsigned long magicno; /* Always stores PDL_MAGICNO as a sanity check */
/* This is first so most pointer accesses to wrong type are caught */
int state; /* Whats in this pdl */
pdl_trans *trans; /* Opaque pointer to internals of transformation from
parent */
pdl_vaffine *vafftrans;
void* sv; /* (optional) pointer back to original sv.
ALWAYS check for non-null before use.
We cannot inc refcnt on this one or wed
never get destroyed */
void *datasv; /* Pointer to SV containing data. Refcnt inced */
void *data; /* Null: no data alloced for this one */
int nvals; /* How many values allocated */
int datatype;
PDL_Long *dims; /* Array of data dimensions */
PDL_Long *dimincs; /* Array of data default increments */
short ndims; /* Number of data dimensions */
unsigned char *threadids; /* Starting index of the thread index set n */
unsigned char nthreadids;
pdl *progenitor; /* Im in a mutated family. make_physical_now must
copy me to the new generation. */
pdl *future_me; /* Im the "then" pdl and this is my "now" (or more modern
version, anyway */
pdl_children children;
short living_for; /* perl side not referenced; delete me when */
PDL_Long def_dims[PDL_NDIMS]; /* Preallocated space for efficiency */
PDL_Long def_dimincs[PDL_NDIMS]; /* Preallocated space for efficiency */
unsigned char def_threadids[PDL_NTHREADIDS];
struct pdl_magic *magic;
void *hdrsv; /* "header", settable from outside */
};
This is quite a structure for just storing some data in - what is going on?
Download (2.1MB)
Added: 2007-07-07 License: Perl Artistic License Price:
839 downloads
MyPaint 0.5.0
MyPaint is a painting application with brush dynamics. more>>
MyPaint is a painting application with brush dynamics.
MyPaint is a fast painting/scribbling program. It is like the GIMP with only the airbrush tool, but with more dynamics.
For example you can noisify the brush radius depending on the pointer speed. It supports pressure sensitive graphic tablets. MyPaint has an infinite canvas and an own color selector, but no layers and no undo function.
<<lessMyPaint is a fast painting/scribbling program. It is like the GIMP with only the airbrush tool, but with more dynamics.
For example you can noisify the brush radius depending on the pointer speed. It supports pressure sensitive graphic tablets. MyPaint has an infinite canvas and an own color selector, but no layers and no undo function.
Download (1.1MB)
Added: 2007-06-11 License: GPL (GNU General Public License) Price:
870 downloads
OpenInput 0.2.3
OpenInput is a cross-platform, easy-to-use, portable input handler library, written in C. more>>
OpenInput project is a cross-platform, easy-to-use, portable input handler library, written in C.
The primary goal of OpenInput is to make it easier for application programmers to write portable code that deals with input from mice, keyboards, joysticks and other devices.
In other words, OpenInput will allow you to write a single piece of code that handles input for your application for all platforms, for example GNU/Linux, Windows and MacOS X.
This is achieved by abstracting the low-level platform-specific input device handling into a stable, intuitive, platform-independent API: OpenInput.
Main features:
- Total platform independence
- Easy to use, sane and simple API
- Fully documented functions and data structures
- Automatic configuration of available devices
- Generic event handling
- Keyboard state managment (eg. up/down/lock)
- Mouse motion and state managment (eg. movement, buttons up/down)
- Joystick motion and state handling for axes, hats and trackballs
- Can "hook" into existing windows
- Provides resize, iconify, close and expose events for the application window
- Action mapping, so events can be handled without any knowledge of the underlying device
- Pointer (mouse) grabbing inside window
- Show/hide pointer inside window
- Keyboard focus grabbing
Enhancements:
- This version contains major documentation updates, both big and small bugfixes, and minor feature enhancements which dont break the API.
<<lessThe primary goal of OpenInput is to make it easier for application programmers to write portable code that deals with input from mice, keyboards, joysticks and other devices.
In other words, OpenInput will allow you to write a single piece of code that handles input for your application for all platforms, for example GNU/Linux, Windows and MacOS X.
This is achieved by abstracting the low-level platform-specific input device handling into a stable, intuitive, platform-independent API: OpenInput.
Main features:
- Total platform independence
- Easy to use, sane and simple API
- Fully documented functions and data structures
- Automatic configuration of available devices
- Generic event handling
- Keyboard state managment (eg. up/down/lock)
- Mouse motion and state managment (eg. movement, buttons up/down)
- Joystick motion and state handling for axes, hats and trackballs
- Can "hook" into existing windows
- Provides resize, iconify, close and expose events for the application window
- Action mapping, so events can be handled without any knowledge of the underlying device
- Pointer (mouse) grabbing inside window
- Show/hide pointer inside window
- Keyboard focus grabbing
Enhancements:
- This version contains major documentation updates, both big and small bugfixes, and minor feature enhancements which dont break the API.
Download (0.45MB)
Added: 2006-09-13 License: LGPL (GNU Lesser General Public License) Price:
1137 downloads
The Examiner 0.5
The Examiner is a forensic tool to disassemble binary executables. more>>
The Examiner is an application that utilizes the objdump command to disassemble and comment foreign executable binaries. This app was designed to analyze static compiled binaries but works ok with others. The intention is for forensic research but could also be used in general reverse engineering.
This program can only handle basic dissassembly. If the binary has been modified to resist debugging then the Examinier probably will not be able to analyze the code. Also the Examiner will not analyze live running code. This can be a good thing but if you need to look at code when it runs or deal with complicated disassembly you should probably use Fenris.
Main features:
- Automates objdump usage
- Can generate cross-reference files of functions, interrupts and other useful things
- Locates functions within the binary
- Understands the stack and comments on its state
- Can parse and understand the contents of the .rodata section
- Cross references .rodata calls and comments on them
- Locates .data pointer references to .rodata
- Provides an easy to read CALL syntax for comments
- Understands and looks up interrupts calls
- Utilizes Linux source headers to determine function names based on what interrupt is called
- Can differentiate all of the socketcall functions
- Can comment on some C like constants for function calls
- Separates functions based on ret calls
- Can recognize and attempts to decode UPX compressed binaries
- Works with TCT and Fenris dress utility
- Can detect crippled ELF executables and burneye executables
- Recognizes symbols and will cross-reference dynamic libraries
Enhancements:
- Has rudementary detection of burneye via 7350 sig.
- Can detect crippled ELF header files (optionally uncripple)
- Added a TUTORIAL file
- Modified default working dir to $HOMEexaminer-data
- Can cross-reference .data pointers to .rodata sections
- Now records pushl calls
- Fixed -H to dump headers instead of -R
- Added -o to specify an output file or STDOUT with -
- Added -c to specify a comment character
- Added a new util xhierarchy to print function call hierarchy
<<lessThis program can only handle basic dissassembly. If the binary has been modified to resist debugging then the Examinier probably will not be able to analyze the code. Also the Examiner will not analyze live running code. This can be a good thing but if you need to look at code when it runs or deal with complicated disassembly you should probably use Fenris.
Main features:
- Automates objdump usage
- Can generate cross-reference files of functions, interrupts and other useful things
- Locates functions within the binary
- Understands the stack and comments on its state
- Can parse and understand the contents of the .rodata section
- Cross references .rodata calls and comments on them
- Locates .data pointer references to .rodata
- Provides an easy to read CALL syntax for comments
- Understands and looks up interrupts calls
- Utilizes Linux source headers to determine function names based on what interrupt is called
- Can differentiate all of the socketcall functions
- Can comment on some C like constants for function calls
- Separates functions based on ret calls
- Can recognize and attempts to decode UPX compressed binaries
- Works with TCT and Fenris dress utility
- Can detect crippled ELF executables and burneye executables
- Recognizes symbols and will cross-reference dynamic libraries
Enhancements:
- Has rudementary detection of burneye via 7350 sig.
- Can detect crippled ELF header files (optionally uncripple)
- Added a TUTORIAL file
- Modified default working dir to $HOMEexaminer-data
- Can cross-reference .data pointers to .rodata sections
- Now records pushl calls
- Fixed -H to dump headers instead of -R
- Added -o to specify an output file or STDOUT with -
- Added -c to specify a comment character
- Added a new util xhierarchy to print function call hierarchy
Download (0.033MB)
Added: 2005-03-07 License: GPL (GNU General Public License) Price:
1696 downloads
Yasper 1.04
Yasper (Yet Another Smart Pointer) is a sweet and simple single-header smart pointer for C++. more>>
Yasper (Yet Another Smart Pointer) is a sweet and simple single-header smart pointer for C++.
Why write another C++ smart pointer?
There are two high quality libraries that include smart pointers: Loki and Boost. Alexandrescus Loki SmartPtr is customizable to a fault. I find policy templates unspeakably ugly and dont need the extra options. Boosts shared_ptr is quite nice, but is too restrictive and introduces undesirable dependency on the massive Boost library. What I need is a small, simple smart pointer: yasper.
Philosophy
small (contained in single header)
simple (nothing fancy in the code, easy to understand)
maximum compatibility (drop in replacement for dumb pointers)
The last point can be dangerous, since yasper permits risky (yet useful) actions (such as assignment to raw pointers and manual release) disallowed by other implementations. Be careful, only use those features if you know what youre doing!
<<lessWhy write another C++ smart pointer?
There are two high quality libraries that include smart pointers: Loki and Boost. Alexandrescus Loki SmartPtr is customizable to a fault. I find policy templates unspeakably ugly and dont need the extra options. Boosts shared_ptr is quite nice, but is too restrictive and introduces undesirable dependency on the massive Boost library. What I need is a small, simple smart pointer: yasper.
Philosophy
small (contained in single header)
simple (nothing fancy in the code, easy to understand)
maximum compatibility (drop in replacement for dumb pointers)
The last point can be dangerous, since yasper permits risky (yet useful) actions (such as assignment to raw pointers and manual release) disallowed by other implementations. Be careful, only use those features if you know what youre doing!
Download (0.002MB)
Added: 2007-05-25 License: zlib/libpng License Price:
885 downloads
Sparkler 0.9
Sparkler is a small app that generates sparkles around the X pointer. more>>
Sparkler is a small app that generates "sparkles" around the X pointer.
It generates an effect similar to that of the game "Discworld": around the pointer, sparkles keep appearing and disappearing when it is moved.
<<lessIt generates an effect similar to that of the game "Discworld": around the pointer, sparkles keep appearing and disappearing when it is moved.
Download (0.013MB)
Added: 2006-09-28 License: GPL (GNU General Public License) Price:
1124 downloads
PDL::Indexing 2.4.3
PDL::Indexing Perl module contains a tutorial on how to index piddles. more>>
PDL::Indexing Perl module contains a tutorial on how to index piddles.
This manpage should serve as a first tutorial on the indexing and threading features of PDL.
This manpage is still in alpha development and not yet complete. "Meta" comments that point out deficiencies/omissions of this document will be surrounded by square brackets ([]), e.g. [ Hopefully I will be able to remove this paragraph at some time in the future ]. Furthermore, it is possible that there are errors in the code examples. Please report any errors to Christian Soeller (c.soeller@auckland.ac.nz).
Still to be done are (please bear with us and/or ask on the mailing list, see PDL::FAQ):
document perl level threading
threadids
update and correct description of slice
new functions in slice.pd (affine, lag, splitdim)
reworking of paragraph on explicit threading
Indexing and threading with PDL
A lot of the flexibility and power of PDL relies on the indexing and looping features of the perl extension. Indexing allows access to the data of a pdl object in a very flexible way. Threading provides efficient implicit looping functionality (since the loops are implemented as optimized C code).
Pdl objects (later often called "pdls") are perl objects that represent multidimensional arrays and operations on those. In contrast to simple perl @x style lists the array data is compactly stored in a single block of memory thus taking up a lot less memory and enabling use of fast C code to implement operations (e.g. addition, etc) on pdls.
pdls can have children
Central to many of the indexing capabilities of PDL are the relation of "parent" and "child" between pdls. Many of the indexing commands create a new pdl from an existing pdl. The new pdl is the "child" and the old one is the "parent". The data of the new pdl is defined by a transformation that specifies how to generate (compute) its data from the parents data. The relation between the child pdl and its parent are often bidirectional, meaning that changes in the childs data are propagated back to the parent. (Note: You see, we are aiming in our terminology already towards the new dataflow features. The kind of dataflow that is used by the indexing commands (about which you will learn in a minute) is always in operation, not only when you have explicitly switched on dataflow in your pdl by saying $a->doflow. For further information about data flow check the dataflow manpage.)
Another way to interpret the pdls created by our indexing commands is to view them as a kind of intelligent pointer that points back to some portion or all of its parents data. Therefore, it is not surprising that the parents data (or a portion of it) changes when manipulated through this "pointer". After these introductory remarks that hopefully prepared you for what is coming (rather than confuse you too much) we are going to dive right in and start with a description of the indexing commands and some typical examples how they might be used in PDL programs. We will further illustrate the pointer/dataflow analogies in the context of some of the examples later on.
There are two different implementations of this ``smart pointer relationship: the first one, which is a little slower but works for any transformation is simply to do the transformation forwards and backwards as necessary. The other is to consider the child piddle a ``virtual piddle, which only stores a pointer to the parent and access information so that routines which use the child piddle actually directly access the data in the parent. If the virtual piddle is given to a routine which cannot use it, PDL transparently physicalizes the virtual piddle before letting the routine use it.
Currently (1.94_01) all transformations which are ``affine, i.e. the indices of the data item in the parent piddle are determined by a linear transformation (+ constant) from the indices of the child piddle result in virtual piddles. All other indexing routines (e.g. ->index(...)) result in physical piddles. All routines compiled by PP can accept affine piddles (except those routines that pass pointers to external library functions).
Note that whether something is affine or not does not affect the semantics of what you do in any way: both
$a->index(...) .= 5;
$a->slice(...) .= 5;
change the data in $a. The affinity does, however, have a significant impact on memory usage and performance.
<<lessThis manpage should serve as a first tutorial on the indexing and threading features of PDL.
This manpage is still in alpha development and not yet complete. "Meta" comments that point out deficiencies/omissions of this document will be surrounded by square brackets ([]), e.g. [ Hopefully I will be able to remove this paragraph at some time in the future ]. Furthermore, it is possible that there are errors in the code examples. Please report any errors to Christian Soeller (c.soeller@auckland.ac.nz).
Still to be done are (please bear with us and/or ask on the mailing list, see PDL::FAQ):
document perl level threading
threadids
update and correct description of slice
new functions in slice.pd (affine, lag, splitdim)
reworking of paragraph on explicit threading
Indexing and threading with PDL
A lot of the flexibility and power of PDL relies on the indexing and looping features of the perl extension. Indexing allows access to the data of a pdl object in a very flexible way. Threading provides efficient implicit looping functionality (since the loops are implemented as optimized C code).
Pdl objects (later often called "pdls") are perl objects that represent multidimensional arrays and operations on those. In contrast to simple perl @x style lists the array data is compactly stored in a single block of memory thus taking up a lot less memory and enabling use of fast C code to implement operations (e.g. addition, etc) on pdls.
pdls can have children
Central to many of the indexing capabilities of PDL are the relation of "parent" and "child" between pdls. Many of the indexing commands create a new pdl from an existing pdl. The new pdl is the "child" and the old one is the "parent". The data of the new pdl is defined by a transformation that specifies how to generate (compute) its data from the parents data. The relation between the child pdl and its parent are often bidirectional, meaning that changes in the childs data are propagated back to the parent. (Note: You see, we are aiming in our terminology already towards the new dataflow features. The kind of dataflow that is used by the indexing commands (about which you will learn in a minute) is always in operation, not only when you have explicitly switched on dataflow in your pdl by saying $a->doflow. For further information about data flow check the dataflow manpage.)
Another way to interpret the pdls created by our indexing commands is to view them as a kind of intelligent pointer that points back to some portion or all of its parents data. Therefore, it is not surprising that the parents data (or a portion of it) changes when manipulated through this "pointer". After these introductory remarks that hopefully prepared you for what is coming (rather than confuse you too much) we are going to dive right in and start with a description of the indexing commands and some typical examples how they might be used in PDL programs. We will further illustrate the pointer/dataflow analogies in the context of some of the examples later on.
There are two different implementations of this ``smart pointer relationship: the first one, which is a little slower but works for any transformation is simply to do the transformation forwards and backwards as necessary. The other is to consider the child piddle a ``virtual piddle, which only stores a pointer to the parent and access information so that routines which use the child piddle actually directly access the data in the parent. If the virtual piddle is given to a routine which cannot use it, PDL transparently physicalizes the virtual piddle before letting the routine use it.
Currently (1.94_01) all transformations which are ``affine, i.e. the indices of the data item in the parent piddle are determined by a linear transformation (+ constant) from the indices of the child piddle result in virtual piddles. All other indexing routines (e.g. ->index(...)) result in physical piddles. All routines compiled by PP can accept affine piddles (except those routines that pass pointers to external library functions).
Note that whether something is affine or not does not affect the semantics of what you do in any way: both
$a->index(...) .= 5;
$a->slice(...) .= 5;
change the data in $a. The affinity does, however, have a significant impact on memory usage and performance.
Download (2.1MB)
Added: 2007-06-28 License: Perl Artistic License Price:
848 downloads
Tk::ContextHelp 0.10
Tk::ContextHelp is a context-sensitive help with perl/Tk. more>>
Tk::ContextHelp is a context-sensitive help with perl/Tk.
SYNOPSIS
use Tk::ContextHelp;
$ch = $top->ContextHelp;
$ch->attach($widget, -msg => ...);
$ch->HelpButton($top)->pack;
$ch2 = $top->ContextHelp(-podfile => "perlfaq");
$ch2->attach($widget2, -pod => description);
ContextHelp provides a context-sensitive help system. By activating the help system (either by clicking on a HelpButton or calling the activate method, the cursor changes to a left pointer with a question mark and the user may click on any widget in the window to get a help message or jump to the corresponding pod entry.
<<lessSYNOPSIS
use Tk::ContextHelp;
$ch = $top->ContextHelp;
$ch->attach($widget, -msg => ...);
$ch->HelpButton($top)->pack;
$ch2 = $top->ContextHelp(-podfile => "perlfaq");
$ch2->attach($widget2, -pod => description);
ContextHelp provides a context-sensitive help system. By activating the help system (either by clicking on a HelpButton or calling the activate method, the cursor changes to a left pointer with a question mark and the user may click on any widget in the window to get a help message or jump to the corresponding pod entry.
Download (0.010MB)
Added: 2006-10-28 License: Perl Artistic License Price:
1091 downloads
LinkPreview 2.1
LinkPreview displays a thumbnail image of a link by moving the mouse pointer over the link. more>>
LinkPreview displays a thumbnail image of a link by moving the mouse pointer over the link.
View a thumbnail image of a link by moving the mouse pointer over the link or in the right-click context menu.
<<lessView a thumbnail image of a link by moving the mouse pointer over the link or in the right-click context menu.
Download (0.030MB)
Added: 2007-04-16 License: MPL (Mozilla Public License) Price:
925 downloads
Absolute 1.1.0
Absolute is an XFree86 driver for absolute positioning pointer devices, such as tablets and touchscreens. more>>
Absolute is an XFree86 driver for absolute positioning pointer devices, such as tablets and touchscreens.
Absolute project currently supports arbitrary-point calibration and several types of hardware. It also includes calibration utilities for touchscreens and tablets.
Installation:
Driver:
- sudo apt-get install xorg-dev
- cd xorg
- PREFIX=/usr ./configure
- make
- sudo make install
- Add the driver to your /etc/X11/XF86Config-4 using examples from xfree86/example-configs
Calibration Utility:
- ./configure
- make
- sudo make install
Then, start (or restart) X, and run "calibrate" or "sudo calibrate"
Supported Software:
Tested:
- X.Org Debian GNU/Linux 7.0.14
Supported Hardware:
Tested:
- KeyTec MagicTouch USB-X
- ELO 1525L
- JamStudio KG-TAB1
Untested, but believed to work:
- Anything properly supporting the Linux Input Event interface
Enhancements:
- Support for axis flipping and device hot-plugging was added.
- The driver was ported to X.org 7.0.
<<lessAbsolute project currently supports arbitrary-point calibration and several types of hardware. It also includes calibration utilities for touchscreens and tablets.
Installation:
Driver:
- sudo apt-get install xorg-dev
- cd xorg
- PREFIX=/usr ./configure
- make
- sudo make install
- Add the driver to your /etc/X11/XF86Config-4 using examples from xfree86/example-configs
Calibration Utility:
- ./configure
- make
- sudo make install
Then, start (or restart) X, and run "calibrate" or "sudo calibrate"
Supported Software:
Tested:
- X.Org Debian GNU/Linux 7.0.14
Supported Hardware:
Tested:
- KeyTec MagicTouch USB-X
- ELO 1525L
- JamStudio KG-TAB1
Untested, but believed to work:
- Anything properly supporting the Linux Input Event interface
Enhancements:
- Support for axis flipping and device hot-plugging was added.
- The driver was ported to X.org 7.0.
Download (0.030MB)
Added: 2006-04-20 License: LGPL (GNU Lesser General Public License) Price:
1284 downloads
Powerbox for Gtk 1.15
Powerbox for Gtk is a patch to Gtk which replaces its GtkFileChooserDialog. more>>
Powerbox for Gtk is a patch to Gtk which replaces its GtkFileChooserDialog
Powerbox is a normal file chooser dialog box, except that it dynamically grants the application the right to access the file that the user picks.
This helps provide security because the application can be run without needing access to all the users files. Powerbox-for-Gtk patches Gtk to replace GtkFileChooserDialog with a powerbox.
It is based on Plash, which provides a restricted execution environment on Linux.
Enhancements:
- Add gtk-powerbox.c: an LD_PRELOADed patch to Gtk to replace the GtkFileChooserDialog interface so that it calls Plashs powerbox.
- Rename "plash" executable to "pola-shell".
- fs-operations.c: Add log method. Add an "end" log message when the fs_op object is dropped.
- gettextization
- make.sh: Add "-Wl,-z,relro" when linking ld.so. Fixes obscure problem when dlopen()ing libraries that might require an executable stack.
- Intercept getsockname() so that it returns the correct pathname for Unix domain sockets. Extended the g_fds array in libc so that it can contain these pathnames. It is now an array of "struct libc_fd"s, rather than an array of "cap_t"s. libc-fds.h: New file. libc-misc.c: Introduced fds_resize(), fds_slot_clear(). Changed open(), close(), dup2(), etc. libc-connect.c: Add getsockname() and change connect() and bind().
- Reason: I discovered that gconfd2 (or possibly Orbit) was relying on getsockname() returning the pathname that it earlier passed to bind(). This meant that Gnumeric was unable to spawn a gconf process itself, and it produced loads of errors.
- fs-operations.c, libc-misc.c: Fixed fstat() to return the correct information on directory FDs. Added the fsop_dir_fstat method to implement this.
- build-fs-dynamic.c: Implement link() and rename() methods. This is needed for when GNOME and KDE apps hard link files inside $HOME.
- filesysobj-real.c: Changes to allow rename and hard link calls of the form rename("dir/foo1", "dir/foo2") to work.
- The problem: The real_dir_rename and real_dir_link methods only work in the same-directory case; their test was a pointer comparison on real_dir objects. However, resolving a directory pathname like "dir" always returns a new real_dir object. This meant that the rename() call wouldnt work when you use full pathnames.
- This was causing some failures. eg. Konqueror wouldnt start: some code relied on creating "$HOME/.ICEauthority-l" as a hard link to "$HOME/.ICEauthority-c".
- The partial solution: Change the same-directory check to compare inode and device number of directory, after trying a pointer comparison.
<<lessPowerbox is a normal file chooser dialog box, except that it dynamically grants the application the right to access the file that the user picks.
This helps provide security because the application can be run without needing access to all the users files. Powerbox-for-Gtk patches Gtk to replace GtkFileChooserDialog with a powerbox.
It is based on Plash, which provides a restricted execution environment on Linux.
Enhancements:
- Add gtk-powerbox.c: an LD_PRELOADed patch to Gtk to replace the GtkFileChooserDialog interface so that it calls Plashs powerbox.
- Rename "plash" executable to "pola-shell".
- fs-operations.c: Add log method. Add an "end" log message when the fs_op object is dropped.
- gettextization
- make.sh: Add "-Wl,-z,relro" when linking ld.so. Fixes obscure problem when dlopen()ing libraries that might require an executable stack.
- Intercept getsockname() so that it returns the correct pathname for Unix domain sockets. Extended the g_fds array in libc so that it can contain these pathnames. It is now an array of "struct libc_fd"s, rather than an array of "cap_t"s. libc-fds.h: New file. libc-misc.c: Introduced fds_resize(), fds_slot_clear(). Changed open(), close(), dup2(), etc. libc-connect.c: Add getsockname() and change connect() and bind().
- Reason: I discovered that gconfd2 (or possibly Orbit) was relying on getsockname() returning the pathname that it earlier passed to bind(). This meant that Gnumeric was unable to spawn a gconf process itself, and it produced loads of errors.
- fs-operations.c, libc-misc.c: Fixed fstat() to return the correct information on directory FDs. Added the fsop_dir_fstat method to implement this.
- build-fs-dynamic.c: Implement link() and rename() methods. This is needed for when GNOME and KDE apps hard link files inside $HOME.
- filesysobj-real.c: Changes to allow rename and hard link calls of the form rename("dir/foo1", "dir/foo2") to work.
- The problem: The real_dir_rename and real_dir_link methods only work in the same-directory case; their test was a pointer comparison on real_dir objects. However, resolving a directory pathname like "dir" always returns a new real_dir object. This meant that the rename() call wouldnt work when you use full pathnames.
- This was causing some failures. eg. Konqueror wouldnt start: some code relied on creating "$HOME/.ICEauthority-l" as a hard link to "$HOME/.ICEauthority-c".
- The partial solution: Change the same-directory check to compare inode and device number of directory, after trying a pointer comparison.
Download (1.3MB)
Added: 2005-12-13 License: LGPL (GNU Lesser General Public License) Price:
1410 downloads
cid-compiler 0.1
cid-compiler is a language tool to easily create C code with object oriented features. more>>
cid-compiler is a language tool to easily create C code with object oriented features. Its compiler generates header (.h) files and implementations (.c) from a specification file (.i).
The generated C code consists of a struct, a opaque pointer to it (in the header file) and rewritten functions. The defined functions will get prefixed with the class name, they will also get a new first argument that is a pointer to the newly defined struct.
Functions that do not have a return value are considered constructors and will not get a new 1st argument but will automatically get a return value of pointer to the struct. The place between @class "name" and @attributes is e. g. for include statements and will make it into the header file.
To ease renaming the class, you can use the define CLASS, which will always be a define to a pointer of the new struct type.
Interface example
@class cstring
#include < stdio.h >
#include < string.h >
@attributes
char *c;
@methods
new(char *n) {
CLASS i = NEWCLASS;
i->c = strdup(n);
return i;
}
int length() {
return strlen(this->c);
}
@end
will yield a cstring.h file:
#ifndef _CSTRING_H_
#define _CSTRING_H_
#include < stdio.h >
#include < string.h >
typedef struct cstring *cstring;
cstring cstring_new(char *n);
int cstring_length(cstring this);
#endif
and a cstring.c file:
#include "cstring.h"
#define CLASS cstring
#define NEWCLASS malloc(sizeof(struct cstring));
#define NEWCLASS_M malloc(sizeof(struct cstring));
#define NEWCLASS_C calloc(1,sizeof(struct cstring));
struct cstring {
char *c;
};
cstring cstring_new(char *n) {
CLASS i = NEWCLASS;
i->c = strdup(n);
return i;
}
int cstring_length(cstring this) {
return strlen(this->c);
}
Issues:
The current compiler (v0.1) will reject quite some valid C code. Also the given error is not very helpful;
<<lessThe generated C code consists of a struct, a opaque pointer to it (in the header file) and rewritten functions. The defined functions will get prefixed with the class name, they will also get a new first argument that is a pointer to the newly defined struct.
Functions that do not have a return value are considered constructors and will not get a new 1st argument but will automatically get a return value of pointer to the struct. The place between @class "name" and @attributes is e. g. for include statements and will make it into the header file.
To ease renaming the class, you can use the define CLASS, which will always be a define to a pointer of the new struct type.
Interface example
@class cstring
#include < stdio.h >
#include < string.h >
@attributes
char *c;
@methods
new(char *n) {
CLASS i = NEWCLASS;
i->c = strdup(n);
return i;
}
int length() {
return strlen(this->c);
}
@end
will yield a cstring.h file:
#ifndef _CSTRING_H_
#define _CSTRING_H_
#include < stdio.h >
#include < string.h >
typedef struct cstring *cstring;
cstring cstring_new(char *n);
int cstring_length(cstring this);
#endif
and a cstring.c file:
#include "cstring.h"
#define CLASS cstring
#define NEWCLASS malloc(sizeof(struct cstring));
#define NEWCLASS_M malloc(sizeof(struct cstring));
#define NEWCLASS_C calloc(1,sizeof(struct cstring));
struct cstring {
char *c;
};
cstring cstring_new(char *n) {
CLASS i = NEWCLASS;
i->c = strdup(n);
return i;
}
int cstring_length(cstring this) {
return strlen(this->c);
}
Issues:
The current compiler (v0.1) will reject quite some valid C code. Also the given error is not very helpful;
Download (0.098MB)
Added: 2006-03-07 License: BSD License Price:
1327 downloads
xtermcontrol 2.8
xtermcontrol enables dynamic control of XFree86 xterm properties. more>>
xtermcontrol enables dynamic control of XFree86 xterm properties. xtermcontrol project makes it easy to change colors, titles, fonts, and the geometry of a running xterm, as well as to report the current settings of the properties.
Window manipulations such as (de)iconify, raise and lower, maximize and restore, and reset are also supported. It also lets advanced users issue any xterm control sequence.
Options:
--fg=COLOR
Set foreground color to COLOR.
--bg=COLOR
Set background color to COLOR.
--colorN=COLOR
Set Nth [0-15] color to COLOR.
--highlight=COLOR
Set highlight color to COLOR.
--cursor=COLOR
Set cursor color to COLOR.
--mouse-fg=COLOR
Set mouse pointer foreground color to COLOR.
--mouse-fg=COLOR
Set mouse pointer background color to COLOR.
--font=FONT
Set font name to FONT. Alternatively it is possible to specify a fontmenu index as #[0-6] or navigate the fontmenu by relative sizes as #+N or #-N, where N is an optional integer.
--title=STRING
Set window title. Note that mechanisms like the Bash PROMPT_COMMAND may overwrite the title. Se also How to change the title of an xterm.
--geometry=WIDTHxHEIGHT+XOFF+YOFF
Set size and/or position. Through its control sequences the xterm only recognize positive XOFF and YOFF offsets, which are pixels relative to the upper left hand corner of the display. xtermcontrol is therefore unable to handle negative offsets as described in the X Geometry Specifications and therefore truncates negative values to zero.
--get-fg
Report foreground color.
--get-bg
Report background color.
--get-colorN
Report Nth [0-15] color.
--get-highlight
Report highlight color.
--get-cursor
Report cursor color.
--get-mouse-fg
Report mouse pointer foreground color.
--get-mouse-bg
Report mouse pointer background color.
--get-font
Report font.
--get-title
Report window title.
--get-geometry
Report size and position. The size of the text area is reported in characters and the position is reported in pixels relative to the upper left hand corner of the display.
--maximize
Maximize window.
--restore
Restore maximized window.
--iconify
Iconify window.
--de-iconify
De-iconify window.
--raise
Raise window.
--lower
Lower window.
--reset
Full reset.
--raw=CTLSEQS
Issue the raw control sequences CTLSEQS.
--file=FILE
Force xtermcontrol to read configurations from FILE instead of the standard personal initialization file ~/.xtermcontrol.
--force, -f
Skip TERM environment variable check.
--verbose, -v
Print verbose reports.
--help, -h
Print help and exit.
--version
Print the version number and exit.
Enhancements:
- src/configuration.c: Fix regexp, so the #rrggbb way to specify a color works in configuration file. Reported by Olle Mulmo.
- doc/xtermcontrol.roff: add BUGS section describing how install needs to setuid root on some broken systems.
<<lessWindow manipulations such as (de)iconify, raise and lower, maximize and restore, and reset are also supported. It also lets advanced users issue any xterm control sequence.
Options:
--fg=COLOR
Set foreground color to COLOR.
--bg=COLOR
Set background color to COLOR.
--colorN=COLOR
Set Nth [0-15] color to COLOR.
--highlight=COLOR
Set highlight color to COLOR.
--cursor=COLOR
Set cursor color to COLOR.
--mouse-fg=COLOR
Set mouse pointer foreground color to COLOR.
--mouse-fg=COLOR
Set mouse pointer background color to COLOR.
--font=FONT
Set font name to FONT. Alternatively it is possible to specify a fontmenu index as #[0-6] or navigate the fontmenu by relative sizes as #+N or #-N, where N is an optional integer.
--title=STRING
Set window title. Note that mechanisms like the Bash PROMPT_COMMAND may overwrite the title. Se also How to change the title of an xterm.
--geometry=WIDTHxHEIGHT+XOFF+YOFF
Set size and/or position. Through its control sequences the xterm only recognize positive XOFF and YOFF offsets, which are pixels relative to the upper left hand corner of the display. xtermcontrol is therefore unable to handle negative offsets as described in the X Geometry Specifications and therefore truncates negative values to zero.
--get-fg
Report foreground color.
--get-bg
Report background color.
--get-colorN
Report Nth [0-15] color.
--get-highlight
Report highlight color.
--get-cursor
Report cursor color.
--get-mouse-fg
Report mouse pointer foreground color.
--get-mouse-bg
Report mouse pointer background color.
--get-font
Report font.
--get-title
Report window title.
--get-geometry
Report size and position. The size of the text area is reported in characters and the position is reported in pixels relative to the upper left hand corner of the display.
--maximize
Maximize window.
--restore
Restore maximized window.
--iconify
Iconify window.
--de-iconify
De-iconify window.
--raise
Raise window.
--lower
Lower window.
--reset
Full reset.
--raw=CTLSEQS
Issue the raw control sequences CTLSEQS.
--file=FILE
Force xtermcontrol to read configurations from FILE instead of the standard personal initialization file ~/.xtermcontrol.
--force, -f
Skip TERM environment variable check.
--verbose, -v
Print verbose reports.
--help, -h
Print help and exit.
--version
Print the version number and exit.
Enhancements:
- src/configuration.c: Fix regexp, so the #rrggbb way to specify a color works in configuration file. Reported by Olle Mulmo.
- doc/xtermcontrol.roff: add BUGS section describing how install needs to setuid root on some broken systems.
Download (0.12MB)
Added: 2006-02-06 License: GPL (GNU General Public License) Price:
1356 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above pointer search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed