Message Boards Message Boards

GROUPS:

Use of GIFTools package and "ffpeg" related packages/functions?

Posted 18 days ago
141 Views
|
2 Replies
|
0 Total Likes
|

I am not sure how is the use of packages and a special notation that find confusing . For example, I found this from an Mathematica exhange post

{
 GIFTools`Private`$ReadOneFrame,
 GIFTools`Private`$ReadPalettes,
 GIFTools`Private`$ReadAllFrames,
 GIFTools`Private`$ReadRasterBits,
 GIFTools`Private`$ReadFileMetadata, 
 GIFTools`Private`$ReadFrameMetadata,
 GIFTools`Private`$ReadGlobalPalette
 }

What troubles me is the difficult to type in the keyboard " ` " apostrophe like notation. Also, not sure how this is related to the ffpeg package or function. Please , comment about this.

2 Replies

The backtick character is called a context mark in Mathematica. I suggest that first you learn about contexts: http://reference.wolfram.com/language/tutorial/Contexts.html

Contexts are the equivalent of namespaces of other programming languages. The functions of a package are typically placed in their own context, to avoid conflicts with other packages.

Normally, one does not need to type the backtick often. The code you quote is accessing the internals of a package. You are not really supposed to do this, even if in some cases it turns out to be useful. Do not count on such code to be robust, or to work in the next Mathematica version.

As for ease of typing: the perhaps unfortunate reality is that most programming languages (and shortcut keys) are designed to be easy to type on a US English keyboard. Many will certainly disagree, but I think that if you program a lot, it is worth using a US English keyboard layout (if not physical keyboard). Personally, I use a physical US English keyboard, a US English layout for programming, and the appropriate layout for each language I type. I simply remember the locations of accented characters and important punctuation for each language's layout.

Sorry.. You are so correct. Just missed the location of this back-tick accent (documentation name it a backquote or grave accent which consider a lightly misleading. I am used to the forward accent notation that completely overlook the back-tick location just before preceding the one key.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract