While initially the life of a rock star appears to be a non-stop hedonistic one way journey through the pleasure dome; but I think that for most, there are more than enough cautionary tales to convince us that this is not a sustainable lifestyle. Nor one that we would really welcome. Aspects, now and then would most certainly be appreciated ! However the tendency to become acclimatised and then inured to the highs appears to create a preponderance of lows. It is no surprise that the literature addressing the abuse of narcotics utilizes identical language. The fix soon becomes insufficient and increasingly higher dosages never seem to be enough. This does not sound like happiness !
Conversely, a consistent/persistent level of happiness achieved by doing what you enjoy or enjoying what you do, to be more realistic for the majority, sounds more attractive ( at least to me ). Pursuing a goal of a high level of happiness through identifying and aligning yourself with a lifestyle, and this almost certainly encompasses your professional role(s) , that you both feel good about, and are willing to excel in, can provide greater satisfaction ( yes mick , you can get it) than a futile chase for ephemeral gratification.
To have a purpose behind, and in fact underneath, your endeavors can lead to yet another level of the happiness that we tend to seek. The knowledge that our actions are beneficial to not only ourselves but to others brings with it a multitude of bonuses.
Doing what you say. Simple. I expect others to do this and I try to do it all the time. I am nowhere nearly as good at this as I wish I was , but as I know how much it winds me up when people don’t, I have a great motivation to do so.
Saying what you think . Diplomacy is necessary and admirable but detrimental when masking an important issue. I’m not so bad at this one (oups, did I say that out loud). There are of course times and places for different types of conversations but repressing a problem makes it harder to fix, in my opinion.
Not as a blinkered and uncritical following (except for the glorious Chelsea); but rather as an unwavering support and help for what I think is right and the expectation that I will receive this also. Fostering an ‘esprit de corp’ and creating synergistic relationships strike me as the best ways to achieve goals for all concerned.
In a freedom of speech ‘do what you want as long as you're not stopping anyone else doing what they want’ kind of way. Not a ‘dirty fed's trin’ to steal my gunz’ kind of way. Oppression/repression, politically, militarily and and economically, is to me demonstratively detrimental to the whole world.
I just love the word, it’s sonorous. There’s something about s’ and l’ that just sound good together. Apparently cats like it too. The idea that failure can lead to success, and in fact sometimes be integral to that success, is a great comfort to me at the moment( looks like I am well on the way to becoming a world class ninja). Accepting that obstacles, blocks and even outright mistakes are not a cause for despair but can instead be used as tools for improvement can lead to ultimately successful completion.
I know I keep banging on about it, but I feel that cryptocurriencies and the blockchain technology that underpin them could be a force that begins the process of recalibrating our socio-economy and offering a real chance to enrich all the world's populous ( not just us hummies either ).


The top-level content of this page should have a "medium" amount of
horizontal padding — thanks to the u-ph-md
helper class.
The following blocks should have an "extra small" amount of margin between them — thanks
to the u-mb-xs
helper class.
The following blocks should have a "small" amount of margin between them — thanks
to the u-mb-sm
helper class.
The following blocks should have an "medium" amount of margin between them — thanks
to the u-mb-md
helper class.
The following blocks should have a "large" amount of margin between them — thanks
to the u-mb-lg
helper class.
The following blocks should have an "extra-large" amount of margin between them — thanks
to the u-mb-xl
helper class.
The following blocks should have no margin between them — thanks
to the u-mb-0
helper class.


thumbpdf - generate thumbnail images for a PDF file created with pdftex
thumbpdf [ OPTION... ] PDF_FILE
thumbpdf is used to create thumbnail images of individual pages within a PDF (Portable Document Format) document.
First run pdftex(1) on your document to create a PDF file. Then run thumbpdf to generate the thumbnails, a PDF file containing the thumbnails, and a pdfTeX file to include the thumbnails in the PDF file. Finally, run pdftex(1) on your file again to create the final PDF file.
thumbpdf calls gs(1) to generate PNG images of the pages within PDF_FILE, and pdftex(1) to create a PDF file containing the thumbnail images.
print usage
make PNG thumbnail images (default: true)
generate new PDF file containing the thumbnails (default: true)
create a TeX file for pdftex(1) to read in (default: true)
suppress messages (default: false)
verbose messages (default: false)
print debugging information while parsing (default: false)
resolution for GhostScript step (default: 9)
epdfcompresslevel for thumbpdf.pdf (0-9; default: 9)
\fB--device\fP | \fBpng\fP\fIdev\fP
GhostScript PNG device; dev = `mono´, `gray´, `16´, `256´, `16m´ (default: `png16m´)
PNG thumbnail images
PDF file containing thumbnail images
A pdfTeX program to include the thumbnails file
pdfTeX log file
a LaTeX package to be included in files for which a user wants to generate thumbnails
gs(1), pdftex(1).
Web page: <http://tug.org/teTeX/>
None known, but report any bugs found to the author.
Copyright Â[co] 1999. thumbpdf is distributed under version 1, or (at your option) a later version of the LaTeX Project Public License.
thumbpdf was written by Heiko Oberdiek<EMAIL_ADDRESS>This manual page was written by C.M. Connelly<EMAIL_ADDRESS>for the Debian GNU/Linux system. It may be used by other distributions without contacting the author. Any mistakes or omissions in the manual page are my fault; inquiries about or corrections to this manual page should be directed to me (and not to the primary author).


×
Customize Columns
Name
Description
Import VCF File
File
Name
Import Analysis
File
×
Analyses
Upload Status
Running Filters. Please wait...
Server Error
Error


Summary
Hosts are what the PerfStat application is built around. A host is any device being monitored by the PerfStat application. A host could be a server, network device, or anything with an IP Address.
Add a Host
1) Select "App Configs->Host Config" within the PerfStat application
2) Under the "Add Host" section enter the Host Name, IP Address, select the OS Type from a drop down list and select "Enter" to add host
<PICTURE>
Modify Host
1) Select "App Configs->Host Config" within the PerfStat application
2) Under the "Manage Hosts" section select "Config" to configure host
3) Under the "Modify Host" section modify the Host Name and/or IP Address and select "Enter" to modify host
<PICTURE>
Delete Host
Data is associated with a host in the PerfStat application. If you delete a host from the PerfStat application all it's status and performance data will also be deleted.
1) Select "App Configs->Host Config" within the PerfStat application
2) Under the "Manage Hosts" section select "Delete" to delete host, you will be prompted before host is deleted
<PICTURE>


The autoregressive model is one of a group of linear prediction formulas that attempt to predict an output y[n] of a system based on the previous outputs ( y[n-1],y[n-2]...) and inputs ( x[n], x[n-1], x[n-2]...).
Deriving the linear prediction model involves determining the coeffiecients a1,a2,.. and b0,b1,b2,... in the equation:
ye[n] (estimated) = a1*y[n-1] + a2*y[n-2]... + b0*x[n] + b1*x[n-1] + ...
Note the REMARKABLE similarity between the prediction formula and the difference equation used to describe discrete linear time invariant systems. Calculating a set of coefficients that give a good prediciton ye[n] is tantamount to determining what the system is, within the constraints of the order chosen.
A model which depends only on the previous outputs of the system is called an autoregressive model (AR), while a model which depends only on the inputs to the system is called a moving average model (MA), and of course a model based on both inputs and outputs is an autoregressive-moving-average model (ARMA). Note that by definition, the AR model has only poles while the MA model has only zeros.
Several methods and algorithms exist for calculating the coefficients of the AR model, all of which are implemented by the matlab command 'ar'. We use the default setting ('forward-backward') to calculate the AR model for the vocal tract, with the following justifications:
The simplest model for the vocal tract, consisting of linked cylindrical tubes, produces an all-pole transfer function.
Only the outputs of the system are available to us.
Note that the AR model is based on frequency-domain analysis and should be windowed. (We use the hamming.)
The order of the system: We are using the AR model to determine the characteristics of the vocal system and from this system model evaluate the formants, or resonant frequencies of the vocal system.(i.e. the peaks in the frequency response) One conjugate pole pair is required to produce each formant, and one formant is expected in each 1kHz band or so. Therefore the order of the model is a function of the sampling frequency: fs/2 + 2 (the added 2 being the 'empirically determined adjustment factor')
All our autoregressive matlab techniques are in the function formants.m.
There is TONS of material about autoregressive models. Check out your library...


{include file="common/top" /}
{include file="common/left" /}
Welcome to background management system


{% block style %}{% endblock %} {% block script %}{% endblock %}
Arena Drafting Game
beta
New Game
Easy
Normal
Hard
Very hard
Practice
|
Leaderboards
Easy
Normal
Hard
Very Hard
Overall
Hall of Fame
|
Shoutouts
{% block content %}{% endblock %}


Follow us
Sub title
The wave
Crafting with a bunch of buzz words.
New Wave Sound
Gary Numan saw a synthesizer left by another music act and started playing around with it. In 1979, he released two number one albums and two number one singles (one of each under his band name Tubeway Army).
Blondie
1980
"Rapture" by Blondie was an homage to rap music.


--- layout: post status: publish published: true title: Blog Content author: display_name: Tomas Restrepo login: tomasr email<EMAIL_ADDRESS>url: http://winterdom.com/ author_login: tomasr author_email<EMAIL_ADDRESS>author_url: http://winterdom.com/ wordpress_id: 1021 wordpress_url: http://winterdom.com/2006/09/blogcontent date: '2006-09-20 11:38:00 +0000' date_gmt: '2006-09-20 11:38:00 +0000' categories: - Blogging tags: [] comments: - id: 720 author: Nish author_email: '' author_url: http://blog.voidnish.com date: '2006-09-20 14:22:51 +0000' date_gmt: '2006-09-20 14:22:51 +0000' content: | Maybe, some non-tech stuff about what you do in your spare time.  We just need more of it :) - id: 722 author: Tomas Restrepo author_email<EMAIL_ADDRESS>author_url: http://www.winterdom.com/weblog/ date: '2006-09-24 14:23:30 +0000' date_gmt: '2006-09-24 14:23:30 +0000' content: | Scott: I'm glad you like it. I'm working on posting more stuff and keeping up with a higher posting frequency, hopefully it will be stuff you like! ---
As some of you have probably noticed by now, I've been trying to pick up my posting frequency on this blog; mostly trying to become more regular with the stuff I post and trying to share a bit more about the stuff I'm working on and the stuff I'm playing and experimenting with.
I would love to hear from some of you, though, on what you think of the blog. Do you like the content I'm putting up? Is it useful? Are the topics I'm focusing interesting to you? I sure appreciate any feedback on this and any comments on topics you'd like to see more/less on. I certainly don't promise anything, but I do try to post stuff that will benefit someone besides myself :-)
Feel free to leave a comment or send me an email!


THE GODFATHER A film review by Walter Frith Copyright 1997 Walter Frith
Celebrating its twenty fifth anniversary in 1997 is one of the most important movies in the history of film. Mario Puzo and Francis Ford Coppola's 'The Godfather' is actually one of those very rare occasions when the movie is actually an improvement over the book by Puzo. Spanning approximately ten years (1945 to 1955), the film tells many different stories. To simply say that this motion picture is about organized crime would be shallow and inept to say the least. To properly list everything 'The Godfather' is about would constitute writing a book in the single context of this review so to make things easy, see the film if you haven't already done so. Those of you who share the belief that it is one of the greatest films ever also must believe that it's greatness is not only derived from what appears on the screen but the events that transpired to make it happen.
Don Vito Corleone (Marlon Brando) is arguably the film's protagonist but that view is not shared by everyone as we will discover later in this text. Some other contenders for the leading role as the head of the fictional Corleone crime family (portrayed as the most powerful in America at that time) included Danny Thomas, Ernest Borgnine and Laurence Olivier. All of them admirable choices but Brando brought a dapper quality of refined essence and a sharply perceptive amount of dignity and wisdom to this role. His three sons by blood, Michael (Al Pacino), Santino or Sonny (James Caan), and Fredo (John Cazale all display the highest amount of family love and loyalty although Michael prefers to take a back seat to the "family business" and decides to live a life separate from that of his brothers. Also included as one of the Corleone brothers is Robert Duvall as the adopted German-Irish son whom Don Corleone relies on as his attorney.
Director Coppola is the real genius of this production which was originally intended as a trashy, low budget money maker for the studio but Coppola crafted it into a masterpiece of sublime and clandestine story telling with character development of the highest order. It's hard to believe that at one point the executive, non-creative branch of the film's development actually wanted either Jack Nicholson, Ryan O'Neal or Robert Redford in the part of Michael and Coppola stood alone in his decision to cast Pacino and James Caan also auditioned for the role of Michael and Coppola is rumoured to have asked Diane Keaton who she wanted as Michael because her role as Kay Adams, the woman who would eventually fall victim as Michael's wife, would prove to be a pivotal one and the chemistry would have to be right. Keaton reportedly chose Pacino as her preference and most of the film's casting was set.
'The Godfather' opens with what we would eventually see is a family wedding but before that we hear 'I believe in America...' before the film's first visual frame opens and an undertaker is telling Vito Corleone that he needs him to set up a hit on two men responsible for permanently injuring his daughter in an attempted rape. Corleone refuses and explains his philosophy for the refusal and the film immediately displays a quality of intelligence and depth. As 'The Godfather' progresses the audience is drawn into the family wedding scene which lasts approximately half an hour so the audience would be fully introduced to the film's colourful cast of major characters. It's a repetitive trademark Coppola would use in all three 'Godfather' films as a way to breed familiarity into linking all three films together although they are all vastly different.
The real attraction in 'The Godfather' aside from Brando is Pacino. His characterization of Michael is impressive difference from the time the film opens until it concludes. Some would argue that Pacino and not Brando is the film's true protagonist and the debate that has raged all these years among fans of the film only re-enforces its stature as one of the best character studies in film history. Michael is a man who knows right from wrong but eventually becomes drawn (somewhat reluctantly) into a life of crime after his father is nearly murdered by a rival crime lord. He is the logical choice to replace his father one day as head of the family, something his father was always against. Sonny, the 'hotheaded' brother wouldn't have lasted because of his temper constantly clouding his judgement and Fredo was always the naive and weak son bent more on reaping the rewards of crime rather than working to achieve them. Robert Duvall probably has the most under rated role in 'The Godfather' as the fourth son, made to feel somewhat like an outsider as he is not a blood relative and his loyalty to the family is constantly tested. A test he always passed with flying colours. One classic scene has Brando and Pacino on screen together (they would share surprisingly little time on screen together which would turn out to be very effective) in a long conversation about the future of the family and what Brando always aspired Pacino would become.
Many reviewers have stated over the years that 'The Godfather Part II' (1974) is actually a better film than the original and having been the only sequel to win the Best Picture Academy Award in history is proof that even many in the film community feel the same way. In the opinion of this reviewer I believe that the sequel 'mushroomed' the story better and offered Coppola a chance to go to a broader horizon but overall, the original is preferred because of its freshness in breathig new life into the gangster category of film history. Its controversial subject matter stirred up much debate at the time of its release and is also certainly one of the most talked about films of all time. As 'The Godfather' draws to a conclusion it sets up Part II in such a way that you feel satisfied that you've seen Part I and it doesn't have a cliff hanger ending which is frustrating and empty.
Other members of the cast include Talia Shire (whose character would be greatly improved upon in the other two films), Sterling Hayden, John Marley, Al Lettieri, Al Martino, Abe Vigoda, Richard Conte, Morgana King and Alex Rocco.
'The Godfather' is one of the pioneering films that will carry the film industry into the next century and its important legacy is a testament not only to the talent of its cast, filmmakers and their crews but it's a film that will undoubtedly stand the test of time and is one of those classics that simply cannot be remade better than the original.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Statements¶
A program in Céu is a sequence of statements delimited by an implicit enclosing block:
Program ::= Block
Block ::= {Stmt `;´}
Note: statements terminated with the end
keyword do not require a
terminating semicolon.
Nothing¶
nothing
is an innocuous statement:
Nothing ::= nothing
Blocks¶
A Block
delimits a lexical scope for
storage entities
and
abstractions,
which are only visible to statements inside the block.
Compound statements (e.g. do-end, if-then-else, loops, etc.) create new blocks and can be nested to an arbitrary level.
do-end
and escape
¶
The do-end
statement creates an explicit block.
The escape
statement terminates the deepest matching enclosing do-end
:
Do ::= do [`/´(ID_int|`_´)] [`(´ [LIST(ID_int)] `)´]
Block
end
Escape ::= escape [`/´ID_int] [Exp]
A do-end
and escape
accept an optional identifier following the symbol /
.
An escape
only matches a do-end
with the same identifier.
The neutral identifier _
in a do-end
is guaranteed not to match any
escape
statement.
A do-end
also supports an optional list of identifiers in parenthesis which
restricts the visible storage entities inside the block to those matching the
list.
An empty list hides all storage entities from the enclosing scope.
A do-end
can be assigned to a variable whose type must be
matched by nested escape
statements.
The whole block evaluates to the value of a reached escape
.
If the variable is of option type, the do-end
is allowed
to terminate without an escape
, otherwise it raises a runtime error.
Programs have an implicit enclosing do-end
that assigns to a
program status variable of type int
whose meaning is platform dependent.
Examples:
do
do/a
do/_
escape; // matches line 1
end
escape/a; // matches line 2
end
end
var int a;
var int b;
do (a)
a = 1;
b = 2; // "b" is not visible
end
var int? v =
do
if <cnd> then
escape 10; // assigns 10 to "v"
else
nothing; // "v" remains unassigned
end
end;
escape 0; // program terminates with a status value of 0
pre-do-end
¶
The pre-do-end
statement prepends its statements in the beginning of the
program:
Pre_Do ::= pre do
Block
end
All pre-do-end
statements are concatenated together in the order they appear
and are moved to the beginning of the top-level block, before all other
statements.
Declarations¶
A declaration introduces a storage entity to the enclosing block. All declarations are subject to lexical scope.
Céu supports variables, vectors, pools, internal events, and external events:
Var ::= var [`&´|`&?´] [ `[´ [Exp [`*`]] `]´ ] [`/dynamic´|`/nohold´] Type ID_int [`=´ Sources]
Pool ::= pool [`&´] `[´ [Exp] `]´ Type ID_int [`=´ Sources]
Int ::= event [`&´] (Type | `(´ LIST(Type) `)´) ID_int [`=´ Sources]
Ext ::= input (Type | `(´ LIST(Type) `)´) ID_ext
| output (Type | `(´ LIST([`&´] Type [ID_int]) `)´) ID_ext
[ do Block end ]
Sources ::= /* (see "Assignments") */
Most declarations support an initialization assignment.
Variables¶
A variable declaration has an associated type and can be optionally initialized. Declarations can also be aliases or option aliases.
Examples:
var int v = 10; // "v" is an integer variable initialized to 10
var int a=0, b=3; // "a" and "b" are integer variables initialized to 0 and 3
var& int z = &v; // "z" is an alias to "v"
Vectors¶
A vector declaration specifies a
dimension between brackets,
an associated type and can be optionally
initialized.
Declarations can also be aliases.
TODO: ring buffers
Examples:
var int n = 10;
var[10] int vs1 = []; // "vs1" is a static vector of 10 elements max
var[n] int vs2 = []; // "vs2" is a dynamic vector of 10 elements max
var[] int vs3 = []; // "vs3" is an unbounded vector
var&[] int vs4 = &vs1; // "vs4" is an alias to "vs1"
Pools¶
A pool declaration specifies a dimension and an associated type. Declarations for pools can also be aliases. Only in this case they can be initialized.
The expression between the brackets specifies the dimension of the pool.
Examples:
code/await Play (...) do ... end
pool[10] Play plays; // "plays" is a static pool of 10 elements max
pool&[] Play a = &plays; // "a" is an alias to "plays"
TODO: data pools
Dimension¶
Declarations for vectors or pools require an expression between brackets to specify a dimension as follows:
- constant expression: Maximum number of elements is fixed and space is statically pre-allocated.
- variable expression: Maximum number of elements is fixed but space is dynamically allocated. The expression is evaulated once at declaration time.
- omitted: Maximum number of elements is unbounded and space is dynamically allocated. The space for dynamic dimensions grow and shrink automatically.
TODO: ring buffers
Events¶
An event declaration specifies a type for the values it carries when occurring. It can be also a list of types if the event communicates multiple values.
External Events¶
Examples:
input none A; // "A" is an input event carrying no values
output int MY_EVT; // "MY_EVT" is an output event carrying integer values
input (int,byte&&) BUF; // "BUF" is an input event carrying an "(int,byte&&)" pair
TODO: output &/impl
Internal Events¶
Declarations for internal events can also be aliases. Only in this case they can be initialized.
Examples:
event none a; // "a" is an internal events carrying no values
event& none z = &a; // "z" is an alias to event "a"
event (int,int) c; // "c" is a internal event carrying an "(int,int)" pair
Assignments¶
An assignment associates the statement or expression at the right side of the
symbol =
with the location(s) at the left side:
Assignment ::= (Loc | `(´ LIST(Loc|`_´) `)´) `=´ Sources
Sources ::= ( Do
| Emit_Ext
| Await
| Watching
| Thread
| Lua_Stmts
| Code_Await
| Code_Spawn
| Vec_Cons
| Data_Cons
| Exp
| `_´ )
Céu supports the following constructs as assignment sources:
do-end
block- external emit
- await
- watching statement
- thread
- lua statement
- code await
- code spawn
- vector length & constructor
- data constructor
- expression
- the special identifier
_
The special identifier _
makes the assignment innocuous.
In the case of assigning to an option type, the _
unsets
it.
TODO: required for uninitialized variables
Copy Assignment¶
A copy assignment evaluates the statement or expression at the right side and copies the result(s) to the location(s) at the left side.
Alias Assignment¶
An alias assignment, aka binding, makes the location at the left side to be an alias to the expression at the right side.
The right side of a binding must always be prefixed with the operator &
.
Event Handling¶
Await¶
The await
statement halts the running trail until the specified event occurs.
The event can be an input event, an
internal event, a terminating
code abstraction, a timer, a
pausing event, or forever (i.e., never awakes):
Await ::= await (ID_ext | Loc) [until Exp] /* events and option aliases */
| await (WCLOCKK|WCLOCKE) /* timers */
| await (pause|resume) /* pausing events */
| await FOREVER /* forever */
Examples:
await A; // awaits the input event "A"
await a until v==10; // awaits the internal event "a" until the condition is satisfied
var&? My_Code my = <...>; // acquires a reference to a code abstraction instance
await my; // awaits it terminate
await 1min10s30ms100us; // awaits the specified time
await (t)ms; // awaits the current value of the variable "t" in milliseconds
await FOREVER; // awaits forever
An await
evaluates to zero or more values which can be captured with an
optional assignment.
Event¶
The await
statement for events halts the running trail until the specified
input event or
internal event occurs.
The await
evaluates to a value of the type of the event.
The optional clause until
tests an awaking condition.
The condition can use the returned value from the await
.
It expands to a loop
as follows:
loop do
<ret> = await <evt>;
if <Exp> then // <Exp> can use <ret>
break;
end
end
Examples:
input int E; // "E" is an input event carrying "int" values
var int v = await E until v>10; // assigns occurring "E" to "v", awaking only when "v>10"
event (bool,int) e; // "e" is an internal event carrying "(bool,int)" pairs
var bool v1;
var int v2;
(v1,v2) = await e; // awakes on "e" and assigns its values to "v1" and "v2"
Code Abstraction¶
The await
statement for a code abstraction halts the running trail
until the specified instance terminates.
The await
evaluates to the return value of the abstraction.
TODO: option return on kill
Example:
var&? My_Code my = spawn My_Code();
var? int ret = await my;
Timer¶
The await
statement for timers halts the running trail until the specified
timer expires:
WCLOCKK
specifies a constant timer expressed as a sequence of value/unit pairs.WCLOCKE
specifies an integer expression in parenthesis followed by a single unit of time.
The await
evaluates to a value of type s32
and is the
residual delta time (dt
) measured in microseconds:
the difference between the actual elapsed time and the requested time.
The residual dt
is always greater than or equal to 0.
If a program awaits timers in sequence (or in a loop
), the residual dt
from
the preceding timer is reduced from the timer in sequence.
Examples:
var int t = <...>;
await (t)ms; // awakes after "t" milliseconds
var int dt = await 100us; // if 1000us elapses, then dt=900us (1000-100)
await 100us; // since dt=900, this timer is also expired, now dt=800us (900-100)
await 1ms; // this timer only awaits 200us (1000-800)
Pausing¶
Pausing events are dicussed in Pausing.
FOREVER
¶
The await
statement for FOREVER
halts the running trail forever.
It cannot be used in assignments because it never evaluates to anything.
Example:
if v==10 then
await FOREVER; // this trail never awakes if condition is true
end
Emit¶
The emit
statement broadcasts an event to the whole program.
The event can be an external event, an
internal event, or a timer:
Emit_Int ::= emit Loc [`(´ [LIST(Exp)] `)´]
Emit_Ext ::= emit ID_ext [`(´ [LIST(Exp)] `)´]
| emit (WCLOCKK|WCLOCKE)
Examples:
emit A; // emits the output event `A` of type "none"
emit a(1); // emits the internal event `a` of type "int"
emit 1s; // emits the specified time
emit (t)ms; // emits the current value of the variable `t` in milliseconds
Events¶
The emit
statement for events expects the arguments to match the event type.
An emit
to an input or timer event can only occur inside
asynchronous blocks.
An emit
to an output event is also an expression that evaluates to a value of
type s32
and can be captured with an optional assignment (its
meaning is platform dependent).
An emit
to an internal event starts a new
internal reaction.
Examples:
input int I;
async do
emit I(10); // broadcasts "I" to the application itself, passing "10"
end
output none O;
var int ret = emit O(); // outputs "O" to the environment and captures the result
event (int,int) e;
emit e(1,2); // broadcasts "e" passing a pair of "int" values
Timer¶
The emit
statement for timers expects a timer expression.
Like input events, time can only be emitted inside asynchronous blocks.
Examples:
async do
emit 1s; // broadcasts "1s" to the application itself
end
Lock¶
TODO
Conditional¶
The if-then-else
statement provides conditional execution in Céu:
If ::= if Exp then
Block
{ else/if Exp then
Block }
[ else
Block ]
end
Each condition Exp
is tested in sequence, first for the if
clause and then
for each of the optional else/if
clauses.
On the first condition that evaluates to true
, the Block
following it
executes.
If all conditions fail, the optional else
clause executes.
All conditions must evaluate to a value of type bool
.
Loops¶
Céu supports simple loops, numeric iterators, event iterators, and pool iterators:
Loop ::=
/* simple loop */
loop [`/´Exp] do
Block
end
/* numeric iterator */
| loop [`/´Exp] NumericRange do
Block
end
/* event iterator */
| every [(Loc | `(´ LIST(Loc|`_´) `)´) in] (ID_ext|Loc|WCLOCKK|WCLOCKE) do
Block
end
/* pool iterator */
| loop [`/´Exp] (ID_int|`_´) in Loc do
Block
end
Break ::= break [`/´ID_int]
Continue ::= continue [`/´ID_int]
NumericRange ::= /* (see "Numeric Iterator") */
The body of a loop Block
executes an arbitrary number of times, depending on
the conditions imposed by each kind of loop.
Except for the every
iterator, all loops support an optional constant
expression `/´Exp
that limits the maximum number of
iterations to avoid infinite execution.
If the number of iterations reaches the limit, a runtime error occurs.
break
and continue
¶
The break
statement aborts the deepest enclosing loop.
The continue
statement aborts the body of the deepest enclosing loop and
restarts it in the next iteration.
The optional modifier `/´ID_int
in both statements
only applies to numeric iterators.
Simple Loop¶
The simple loop-do-end
statement executes its body forever:
SimpleLoop ::= loop [`/´Exp] do
Block
end
The only way to terminate a simple loop is with the break
statement.
Examples:
// blinks a LED with a frequency of 1s forever
loop do
emit LED(1);
await 1s;
emit LED(0);
await 1s;
end
loop do
loop do
if <cnd-1> then
break; // aborts the loop at line 2 if <cnd-1> is satisfied
end
end
if <cnd-2> then
continue; // restarts the loop at line 1 if <cnd-2> is satisfied
end
end
Numeric Iterator¶
The numeric loop executes its body a fixed number of times based on a numeric range for a control variable:
NumericIterator ::= loop [`/´Exp] NumericRange do
Block
end
NumericRange ::= (`_´|ID_int) in [ (`[´ | `]´)
( ( Exp `->´ (`_´|Exp))
| (`_´|Exp) `<-´ Exp ) )
(`[´ | `]´) [`,´ Exp] ]
The control variable assumes the values specified in the interval, one by one, for each iteration of the loop body:
- control variable:
ID_int
is a read-only variable of a numeric type. Alternatively, the special anonymous identifier_
can be used if the body of the loop does not access the variable. -
interval: Specifies a direction, endpoints with open or closed modifiers, and a step.
- direction:
->
: Starts from the endpointExp
on the left increasing towardsExp
on the right.<-
: Starts from the endpointExp
on the right decreasing towardsExp
on the left. Typically, the value on the left is smaller or equal to the value on the right.
- endpoints:
[Exp
andExp]
are closed intervals which includeExp
as the endpoints;]Exp
andExp[
are open intervals which excludeExp
as the endpoints. Alternatively, the finishing endpoint may be_
which means that the interval goes towards infinite. - step:
An optional positive number added or subtracted towards the limit.
If the step is omitted, it assumes the value
1
. If the direction is->
, the step is added, otherwise it is subtracted.
If the interval is not specified, it assumes the default
[0 -> _[
. - direction:
A numeric iterator executes as follows:
-
initialization: The starting endpoint is assigned to the control variable. If the starting enpoint is open, the control variable accumulates a step immediately.
-
iteration:
- limit check: If the control variable crossed the finishing endpoint, the loop terminates.
- body execution: The loop body executes.
- step
Applies a step to the control variable. Goto step
1
.
The break
and continue
statements inside numeric iterators accept an
optional modifier `/´ID_int
to affect the enclosing
loop matching the control variable.
Examples:
// prints "i=0", "i=1", ...
var int i;
loop i do
_printf("i=%d\n", i);
end
// awaits 1s and prints "Hello World!" 10 times
loop _ in [0 -> 10[ do
await 1s;
_printf("Hello World!\n");
end
// prints "i=0", "i=2", ..., "i=10"
var int i;
loop i in [0->10],2 do
_printf("i=%d\n", i);
end
var int i;
loop i do
var int j;
loop j do
if <cnd-1> then
continue/i; // continues the loop at line 1
else/if <cnd-2> then
break/j; // breaks the loop at line 4
end
end
end
Note : the runtime asserts that the step is a positive number and that the control variable does not overflow.
Event Iterator¶
The every
statement iterates over an event continuously, executing its
body whenever the event occurs:
EventIterator ::= every [(Loc | `(´ LIST(Loc|`_´) `)´) in] (ID_ext|Loc|WCLOCKK|WCLOCKE) do
Block
end
The event can be an external or internal event or a timer.
The optional assignment to a variable (or list of variables) stores the carrying value(s) of the event.
An every
expands to a loop
as illustrated below:
every <vars> in <event> do
<body>
end
is equivalent to
loop do
<vars> = await <event>;
<body>
end
However, the body of an every
cannot contain
synchronous control statements, ensuring
that no occurrences of the specified event are ever missed.
TODO: reject break inside every
Examples:
every 1s do
_printf("Hello World!\n"); // prints the "Hello World!" message on every second
end
event (bool,int) e;
var bool cnd;
var int v;
every (cnd,v) in e do
if not cnd then
break; // terminates when the received "cnd" is false
else
_printf("v = %d\n", v); // prints the received "v" otherwise
end
end
Pool Iterator¶
The pool iterator visits all alive abstraction instances residing in a given pool:
PoolIterator ::= loop [`/´Exp] (ID_int|`_´) in Loc do
Block
end
On each iteration, the optional control variable becomes a reference to an instance, starting from the oldest created to the newest.
The control variable must be an alias to the same type of the pool with the
same rules that apply to spawn
.
Examples:
pool[] My_Code my_codes;
<...>
var&? My_Code my_code;
loop my_code in mycodes do
<...>
end
Parallel Compositions¶
Pars ::= (par | par/and | par/or) do
Block
with
Block
{ with
Block }
end
Spawn ::= spawn [`(´ [LIST(ID_int)] `)´] do
Block
end
Watching ::= watching LIST(ID_ext|Loc|WCLOCKK|WCLOCKE|Abs_Cons) do
Block
end
The parallel statements par/and
, par/or
, and par
fork the running trail
in multiple others.
They differ only on how trails rejoin and terminate the composition.
The spawn
statement starts to execute a block in parallel with the enclosing
block.
The watching
statement executes a block and terminates when one of its
specified events occur.
See also Parallel Compositions and Abortion.
par¶
The par
statement never rejoins.
Examples:
// reacts continuously to "1s" and "KEY_PRESSED" and never terminates
input none KEY_PRESSED;
par do
every 1s do
<...> // does something every "1s"
end
with
every KEY_PRESSED do
<...> // does something every "KEY_PRESSED"
end
end
par/and¶
The par/and
statement stands for parallel-and and rejoins when all nested
trails terminate.
Examples:
// reacts once to "1s" and "KEY_PRESSED" and terminates
input none KEY_PRESSED;
par/and do
await 1s;
<...> // does something after "1s"
with
await KEY_PRESSED;
<...> // does something after "KEY_PRESSED"
end
par/or¶
The par/or
statement stands for parallel-or and rejoins when any of the
trails terminate, aborting all other trails.
Examples:
// reacts once to `1s` or `KEY_PRESSED` and terminates
input none KEY_PRESSED;
par/or do
await 1s;
<...> // does something after "1s"
with
await KEY_PRESSED;
<...> // does something after "KEY_PRESSED"
end
spawn¶
The spawn
statement starts to execute a block in parallel with the enclosing
block.
When the enclosing block terminates, the spawned block is aborted.
Like a do-end
block, a spawn
also supports an
optional list of identifiers in parenthesis which restricts the visible
variables inside the block to those matching the list.
Examples:
spawn do
every 1s do
<...> // does something every "1s"...
end
end
<...> // ...in parallel with whatever comes next
watching¶
A watching
expands to a par/or
with n+1 trails:
one to await each of the listed events,
and one to execute its body, i.e.:
watching <e1>,<e2>,... do
<body>
end
expands to
par/or do
await <e1>;
with
await <e2>;
with
...
with
<body>
end
The watching
statement accepts a list of events and terminates when any of
them occur.
The events are the same supported by the await
statement.
It evaluates to what the occurring event value(s), which can be captured with
an optional assignment.
If the event is a code abstraction, the nested blocked does not
require the unwrap operator !
.
Examples:
// reacts continuously to "KEY_PRESSED" during "1s"
input none KEY_PRESSED;
watching 1s do
every KEY_PRESSED do
<...> // does something every "KEY_PRESSED"
end
end
Pausing¶
The pause/if
statement controls if its body should temporarily stop to react
to events:
Pause_If ::= pause/if (Loc|ID_ext) do
Block
end
Pause_Await ::= await (pause|resume)
A pause/if
specifies a pausing event of type bool
which, when emitted,
toggles between pausing (true
) and resuming (false
) reactions for its body.
When its body terminates, the whole pause/if
terminates and proceeds to the
statement in sequence.
In transition instants, the body can react to the special pause
and resume
events before the corresponding state applies.
TODO: finalize/pause/resume
Examples:
event bool e;
pause/if e do // pauses/resumes the nested body on each "e"
every 1s do
<...> // does something every "1s"
end
end
event bool e;
pause/if e do // pauses/resumes the nested body on each "e"
<...>
loop do
await pause;
<...> // does something before pausing
await resume;
<...> // does something before resuming
end
<...>
end
Exceptions¶
TODO
Throw ::= throw Exp
Catch ::= catch LIST(Loc) do
Block
end
Asynchronous Execution¶
Asynchronous execution allow programs to departure from the rigorous synchronous model and preform computations under separate scheduling rules.
Céu supports asynchronous blocks, threads, and interrupt service routines:
Async ::= await async [ `(´LIST(Var)`)´ ] do
Block
end
Thread ::= await async/thread [ `(´LIST(Var)`)´ ] do
Block
end
Isr ::= spawn async/isr `[´ LIST(Exp) `]´ [ `(´ LIST(Var) `)´ ] do
Block
end
Atomic ::= atomic do
Block
end
Asynchronous execution supports tight loops while keeping the rest of the application, aka the synchronous side, reactive to incoming events. However, it does not support any synchronous control statement (e.g., parallel compositions, event handling, pausing, etc.).
By default, asynchronous bodies do not share variables with their enclosing scope, but the optional list of variables makes them visible to the block.
Even though asynchronous blocks execute in separate, they are still managed by the program hierarchy and are also subject to lexical scope and abortion.
Asynchronous Block¶
Asynchronous blocks, aka asyncs, intercalate execution with the synchronous side as follows:
- Start/Resume whenever the synchronous side is idle. When multiple asyncs are active, they execute in lexical order.
- Suspend after each
loop
iteration. - Suspend on every input
emit
(see Simulation). - Execute atomically and to completion unless rules
2
and3
apply.
This rules imply that asyncs never execute with real parallelism with the synchronous side, preserving determinism in the program.
Examples:
// calculates the factorial of some "v" if it doesn't take too long
var u64 v = <...>;
var u64 fat = 1;
var bool ok = false;
watching 1s do
await async (v,fat) do // keeps "v" and "fat" visible
loop i in [1 -> v] do // reads from "v"
fat = fat * i; // writes to "fat"
end
end
ok = true; // completed within "1s"
end
Simulation¶
An async
block can emit input and timer events towards the
synchronous side, providing a way to test programs in the language itself.
Every time an async
emits an event, it suspends until the synchronous side
reacts to the event (see rule 1
above).
Examples:
input int A;
// tests a program with input simulation in parallel
par do
// original program
var int v = await A;
loop i in [0 -> _[ do
await 10ms;
_printf("v = %d\n", v+i);
end
with
// input simulation
async do
emit A(0); // initial value for "v"
emit 1s35ms; // the loop in the original program executes 103 times
end
escape 0;
end
// The example prints the message `v = <v+i>` exactly 103 times.
Thread¶
Threads provide real parallelism for applications in Céu. Once started, a thread executes completely detached from the synchronous side. For this reason, thread execution is non deterministic and require explicit atomic blocks on accesses to variables to avoid race conditions.
A thread evaluates to a boolean value which indicates whether it started successfully or not. The value can be captured with an optional assignment.
Examples:
// calculates the factorial of some "v" if it doesn't take too long
var u64 v = <...>;
var u64 fat = 1;
var bool ok = false;
watching 1s do
await async/thread (v,fat) do // keeps "v" and "fat" visible
loop i in [1 -> v] do // reads from "v"
fat = fat * i; // writes to "fat"
end
end
ok = true; // completed within "1s"
end
Asynchronous Interrupt Service Routine¶
TODO
Atomic Block¶
Atomic blocks provide mutual exclusion among threads, interrupts, and the synchronous side of application. Once an atomic block starts to execute, no other atomic block in the program starts.
Examples:
// A "race" between two threads: one incrementing, the other decrementing "count".
var s64 count = 0; // "count" is a shared variable
par do
every 1s do
atomic do
_printf("count = %d\n", count); // prints current value of "count" every "1s"
end
end
with
await async/thread (count) do
loop do
atomic do
count = count - 1; // decrements "count" as fast as possible
end
end
end
with
await async/thread (count) do
loop do
atomic do
count = count + 1; // increments "count" as fast as possible
end
end
end
end
C Integration¶
Céu provides native declarations to import C symbols, native blocks to define new code in C, native statements to inline C statements, native calls to call C functions, and finalization to deal with C pointers safely:
Nat_Symbol ::= native [`/´(pure|const|nohold|plain)] `(´ LIST(ID_nat) `)´
Nat_Block ::= native `/´(pre|pos) do
<code definitions in C>
end
Nat_End ::= native `/´ end
Nat_Stmts ::= `{´ {<code in C> | `@´ (`(´Exp`)´|Exp)} `}´ /* `@@´ escapes to `@´ */
Nat_Call ::= [call] (Loc | `(´ Exp `)´) `(´ [ LIST(Exp)] `)´
Finalization ::= do [Stmt] Finalize
| var [`&´|`&?´] Type ID_int `=´ `&´ (Call_Nat | Call_Code) Finalize
Finalize ::= finalize [ `(´ LIST(Loc) `)´ ] with
Block
[ pause with Block ]
[ resume with Block ]
end
Native calls and statements transfer execution to C, losing the guarantees of
the synchronous model.
For this reason, programs should only resort to C for asynchronous
functionality (e.g., non-blocking I/O) or simple struct
accessors, but
never for control purposes.
TODO: Nat_End
Native Declaration¶
In Céu, any identifier prefixed with an underscore is a native symbol defined externally in C. However, all external symbols must be declared before their first use in a program.
Native declarations support four modifiers as follows:
const
: declares the listed symbols as constants. Constants can be used as bounded limits in vectors, pools, and numeric loops. Also, constants cannot be assigned.plain
: declares the listed symbols as plain types, i.e., types (or composite types) that do not contain pointers. A value of a plain type passed as argument to a function does not require finalization.nohold
: declares the listed symbols as non-holding functions, i.e., functions that do not retain received pointers after returning. Pointers passed to non-holding functions do not require finalization.pure
: declares the listed symbols as pure functions. In addition to thenohold
properties, pure functions never allocate resources that require finalization and have no side effects to take into account for the safety checks.
Examples:
// values
native/const _LOW, _HIGH; // Arduino "LOW" and "HIGH" are constants
native _errno; // POSIX "errno" is a global variable
// types
native/plain _char; // "char" is a "plain" type
native _SDL_PixelFormat; // SDL "SDL_PixelFormat" is a type holding a pointer
// functions
native _uv_read_start; // Libuv "uv_read_start" retains the received pointer
native/nohold _free; // POSIX "free" receives a pointer but does not retain it
native/pure _strlen; // POSIX "strlen" is a "pure" function
Native Block¶
A native block allows programs to define new external symbols in C.
The contents of native blocks is copied unchanged to the output in C depending on the modifier specified:
pre
: code is placed before the declarations for the Céu program. Symbols defined inpre
blocks are visible to Céu.pos
: code is placed after the declarations for the Céu program. Symbols implicitly defined by the compiler of Céu are visible topos
blocks.
Native blocks are copied in the order they appear in the source code.
Since Céu uses the C preprocessor, hash
directives #
inside native blocks must be quoted as ##
to be considered
only in the C compilation phase.
If the code in C contains the terminating end
keyword of Céu, the native
block should be delimited with matching comments to avoid confusing the parser:
Symbols defined in native blocks still need to be declared for use in the program.
Examples:
native/plain _t;
native/pre do
typedef int t; // definition for "t" is placed before Céu declarations
end
var _t x = 10; // requires "t" to be already defined
input none A; // declaration for "A" is placed before "pos" blocks
native _get_A_id;
native/pos do
int get_A_id (void) {
return CEU_INPUT_A; // requires "A" to be already declared
}
end
native/nohold _printf;
native/pre do
##include <stdio.h> // include the relevant header for "printf"
end
native/pos do
/******/
char str = "This `end` confuses the parser";
/******/
end
Native Statement¶
The contents of native statements in between {
and }
are inlined in the
program.
Native statements support interpolation of expressions in Céu which are
expanded when preceded by the symbol @
.
Examples:
var int v_ceu = 10;
{
int v_c = @v_ceu * 2; // yields 20
}
v_ceu = { v_c + @v_ceu }; // yields 30
{
printf("%d\n", @v_ceu); // prints 30
}
Native Call¶
Expressions that evaluate to a native type can be called from Céu.
If a call passes or returns pointers, it may require an accompanying finalization statement.
Examples:
// all expressions below evaluate to a native type and can be called
_printf("Hello World!\n");
var _t f = <...>;
f();
var _s s = <...>;
s.f();
Resources & Finalization¶
A finalization statement unconditionally executes a series of statements when its associated block terminates or is aborted.
Céu tracks the interaction of native calls with pointers and requires
finalize
clauses to accompany the calls:
- If Céu passes a pointer to a native call, the pointer represents a local resource that requires finalization. Finalization executes when the block of the local resource goes out of scope.
- If Céu receives a pointer from a native call return, the pointer represents an external resource that requires finalization. Finalization executes when the block of the receiving pointer goes out of scope.
In both cases, the program does not compile without the finalize
statement.
A finalize
cannot contain
synchronous control statements.
Examples:
// Local resource finalization
watching <...> do
var _buffer_t msg;
<...> // prepares msg
do
_send_request(&&msg);
finalize with
_send_cancel(&&msg);
end
await SEND_ACK; // transmission is complete
end
In the example above, the local variable msg
is an internal resource passed
as a pointer to _send_request
, which is an asynchronous call that transmits
the buffer in the background.
If the enclosing watching
aborts before awaking from the await SEND_ACK
,
the local msg
goes out of scope and the external transmission would hold a
dangling pointer.
The finalize
ensures that _send_cancel
also aborts the transmission.
// External resource finalization
watching <...> do
var&? _FILE f = &_fopen(<...>) finalize with
_fclose(f);
end;
_fwrite(<...>, f);
await A;
_fwrite(<...>, f);
end
In the example above, the call to _fopen
returns an external file resource as
a pointer.
If the enclosing watching
aborts before awaking from the await A
, the file
would remain open as a memory leak.
The finalize
ensures that _fclose
closes the file properly.
To access an external resource from Céu requires an
alias assignment to a
variable alias.
If the external call returns NULL
and the variable is an option alias
var&?
, the alias remains unbounded.
If the variable is an alias var&
, the assigment raises a runtime error.
Note: the compiler only forces the programmer to write finalization clauses, but cannot check if they handle the resource properly.
Declaration and expression modifiers may suppress the requirement for finalization in calls:
nohold
modifiers or/nohold
typecasts make passing pointers safe.pure
modifiers or/pure
typecasts make passing pointers and returning pointers safe./plain
typecasts make return values safe.
Examples:
// "_free" does not retain "ptr"
native/nohold _free;
_free(ptr);
// or
(_free as /nohold)(ptr);
// "_strchr" does retain "ptr" or allocates resources
native/pure _strchr;
var _char&& found = _strchr(ptr);
// or
var _char&& found = (_strchr as /pure)(ptr);
// "_f" returns a non-pointer type
var _tp v = _f() as /plain;
Lua Integration¶
Céu provides Lua states to delimit the effects of inlined Lua statements. Lua statements transfer execution to the Lua runtime, losing the guarantees of the synchronous model:
Lua_State ::= lua `[´ [Exp] `]´ do
Block
end
Lua_Stmts ::= `[´ {`=´} `[´
{ {<code in Lua> | `@´ (`(´Exp`)´|Exp)} } /* `@@´ escapes to `@´ */
`]´ {`=´} `]´
Programs have an implicit enclosing global Lua state which all orphan statements apply.
Lua State¶
A Lua state creates an isolated state for inlined Lua statements.
Example:
// "v" is not shared between the two statements
par do
// global Lua state
[[ v = 0 ]];
var int v = 0;
every 1s do
[[print('Lua 1', v, @v) ]];
v = v + 1;
[[ v = v + 1 ]];
end
with
// local Lua state
lua[] do
[[ v = 0 ]];
var int v = 0;
every 1s do
[[print('Lua 2', v, @v) ]];
v = v + 1;
[[ v = v + 1 ]];
end
end
end
TODO: dynamic scope, assignment/error, [dim]
Lua Statement¶
The contents of Lua statements in between [[
and ]]
are inlined in the
program.
Like native statements, Lua statements support
interpolation of expressions in Céu which are expanded when preceded by a @
.
Lua statements only affect the Lua state in which they are embedded.
If a Lua statement is used in an assignment, it is evaluated as an expression that either satisfies the destination or generates a runtime error. The list that follows specifies the Céu destination and expected Lua source:
- a boolean variable
expects a
boolean
value - a numeric variable
expects a
number
value - a pointer variable
expects a
lightuserdata
value - a byte vector
expects a
string
value
TODO: lua state captures errors
Examples:
var int v_ceu = 10;
[[
v_lua = @v_ceu * 2 -- yields 20
]]
v_ceu = [[ v_lua + @v_ceu ]]; // yields 30
[[
print(@v_ceu) -- prints 30
]]
Abstractions¶
Céu supports reuse with data
declarations to define new types, and code
declarations to define new subprograms.
Declarations are subject to lexical scope.
Data¶
A data
declaration creates a new data type:
Data ::= data ID_abs [as (nothing|Exp)] [ with
(Var|Vec|Pool|Int) `;´ { (Var|Vec|Pool|Int) `;´ }
end
Data_Cons ::= (val|new) Abs_Cons
Abs_Cons ::= [Loc `.´] ID_abs `(´ LIST(Data_Cons|Vec_Cons|Exp|`_´) `)´
A declaration may pack fields with storage declarations which become publicly accessible in the new type. Field declarations may assign default values for uninitialized instances.
Data types can form hierarchies using dots (.
) in identifiers:
- An isolated identifier such as
A
makesA
a base type. - A dotted identifier such as
A.B
makesA.B
a subtype of its supertypeA
.
A subtype inherits all fields from its supertype.
The optional modifier as
expects the keyword nothing
or a constant
expression of type int
:
nothing
: thedata
cannot be instantiated.- constant expression: typecasting a value of
the type to
int
evaluates to the specified enumeration expression.
Examples:
data Rect with
var int x;
var int y;
var int h;
var int w;
var int z = 0;
end
var Rect r = val Rect(10,10, 100,100, _); // "r.z" defaults to 0
data Dir as nothing; // "Dir" is a base type and cannot be intantiated
data Dir.Right as 1; // "Dir.Right" is a subtype of "Dir"
data Dir.Left as -1; // "Dir.Left" is a subtype of "Dir"
var Dir dir = <...>; // receives one of "Dir.Right" or "Dir.Left"
escape (dir as int); // returns 1 or -1
TODO: new, pool, recursive types
Data Constructor¶
A new data value is created in the contexts that follow:
- Prefixed by the keyword
val
in an assignment to a variable. - As an argument to a
code
invocation. - Nested as an argument in a
data
creation (i.e., adata
that contains anotherdata
).
In all cases, the arguments are copied to the destination. The destination must be a plain declaration (i.e., not an alias or pointer).
The constructor uses the data
identifier followed by a list of arguments
matching the fields of the type.
Variables of the exact same type can be copied in assignments.
For assignments from a subtype to a supertype, the rules are as follows:
- Copy assignments
- plain values: only if the subtype contains no extra fields
- pointers: allowed
- Alias assignment: allowed.
data Object with
var Rect rect;
var Dir dir;
end
var Object o1 = val Object(Rect(0,0,10,10,_), Dir.Right());
var Object o2 = o1; // makes a deep copy of all fields from "o1" to "o2"
Code¶
The code/tight
and code/await
declarations specify new subprograms that can
be invoked from arbitrary points in programs:
// prototype declaration
Code_Tight ::= code/tight Mods ID_abs `(´ Params `)´ `->´ Type
Code_Await ::= code/await Mods ID_abs `(´ Params `)´
[ `->´ `(´ Params `)´ ]
`->´ (Type | NEVER)
[ throws LIST(ID_abs) ]
Params ::= none | LIST(Var|Vec|Pool|Int)
// full declaration
Code_Impl ::= (Code_Tight | Code_Await) do
Block
end
// invocation
Code_Call ::= call Mods Abs_Cons
Code_Await ::= await Mods Abs_Cons
Code_Spawn ::= spawn Mods Abs_Cons [in Loc]
Code_Kill ::= kill Loc [ `(` Exp `)` ]
Mods ::= [`/´dynamic | `/´static] [`/´recursive]
A code/tight
is a subprogram that cannot contain
synchronous control statements and its body
runs to completion in the current internal reaction.
A code/await
is a subprogram with no restrictions (e.g., it can manipulate
events and use parallel compositions) and its body execution may outlive
multiple reactions.
A prototype declaration specifies the interface parameters of the abstraction which invocations must satisfy. A full declaration (aka definition) also specifies an implementation with a block of code. An invocation specifies the name of the code abstraction and arguments matching its declaration.
Declarations can be nested.
A nested declaration is not visible outside its enclosing declaration.
The body of a nested declaration may access entities from its enclosing
declarations with the prefix outer
.
To support recursive abstractions, a code invocation can appear before the
implementation is known, but after the prototype declaration.
In this case, the declaration must use the modifier /recursive
.
Examples:
code/tight Absolute (var int v) -> int do // declares the prototype for "Absolute"
if v > 0 then // implements the behavior
escape v;
else
escape -v;
end
end
var int abs = call Absolute(-10); // invokes "Absolute" (yields 10)
code/await Hello_World (none) -> NEVER do
every 1s do
_printf("Hello World!\n"); // prints "Hello World!" every second
end
end
await Hello_World(); // never awakes
code/tight/recursive Fat (var int v) -> int; // "Fat" is a recursive code
code/tight/recursive Fat (var int v) -> int do
if v > 1 then
escape v * (call/recursive Fat(v-1)); // recursive invocation before full declaration
else
escape 1;
end
end
var int fat = call/recursive Fat(10); // invokes "Fat" (yields 3628800)
TODO: hold
Code Declaration¶
Code abstractions specify a list of input parameters in between the symbols
(
and )
.
Each parameter specifies an entity class
with modifiers, a type and an identifier.
A none
list specifies that the abstraction has no parameters.
Code abstractions also specify an output return type.
A code/await
may use NEVER
as output to indicate that it never returns.
A code/await
may also specify an optional public field list, which are
local storage entities living in the outermost scope of the abstraction body.
These entities are visible to the invoking context, which may
access them while the abstraction executes.
Likewise, nested code declarations in the outermost scope, known as methods,
are also visible to the invoking context.
TODO: throws
Code Invocation¶
A code/tight
is invoked with the keyword call
followed by the abstraction
name and list of arguments.
A code/await
is invoked with the keywords await
or spawn
followed by the
abstraction name and list of arguments.
The list of arguments must satisfy the list of parameters in the code declaration.
The call
and await
invocations suspend the current trail and transfer
control to the code abstraction.
The invoking point only resumes after the abstraction terminates and evaluates
to a value of its return type which can be captured with an optional
assignment.
The spawn
invocation also suspends and transfers control to the code
abstraction.
However, as soon as the abstraction becomes idle (or terminates), the invoking
point resumes.
This makes the invocation point and abstraction to execute concurrently.
The spawn
invocation evaluates to a reference
representing the instance and can be captured with an optional
assignment.
The alias must be an option alias variable of
the same type of the code abstraction.
If the abstraction never terminates (i.e., return type is NEVER
), the
variable may be a simple alias.
If the spawn
fails (e.g., lack of memory) the option alias variable is unset.
In the case of a simple alias, the assignment raises a runtime error.
The spawn
invocation also accepts an optional pool which provides
storage and scope for invoked abstractions.
When the pool goes out of scope, all invoked abstractions residing in that pool
are aborted.
If the spawn
omits the pool, the invocation always succeed and has the same
scope as the invoking point: when the enclosing block terminates, the invoked
code is also aborted.
TODO: kill
Code References¶
The spawn
invocation and the control variable of
pool iterators evaluate to a reference as an
option alias to an abstraction instance.
If the instance terminates at any time, the option variable is automatically
unset.
A reference provides access to the public fields and methods of the instance.
Examples:
code/await My_Code (var int x) -> (var int y) -> NEVER do
y = x; // "y" is a public field
code/tight Get_X (none) -> int do // "Get_X" is a public method
escape outer.x;
end
await FOREVER;
end
var& My_Code c = spawn My_Code(10);
_printf("y=%d, x=%d\n", c.y, c.Get_X()); // prints "y=10, x=10"
Dynamic Dispatching¶
Céu supports dynamic code dispatching based on multiple parameters.
The modifier /dynamic
in a declaration specifies that the code is dynamically
dispatched.
A dynamic code must have at least one dynamic
parameter.
Also, all dynamic parameters must be pointers or aliases to a
data type in some hierarchy.
A dynamic declaration requires other compatible dynamic declarations with the
same name, modifiers, parameters, and return type.
The exceptions are the dynamic
parameters, which must be in the same
hierarchy of their corresponding parameters in other declarations.
To determine which declaration to execute during runtime, the actual argument
runtime type is checked against the first formal dynamic
parameter of each
declaration.
The declaration with the most specific type matching the argument wins.
In the case of a tie, the next dynamic parameter is checked.
A catchall declaration with the most general dynamic types must always be provided.
If the argument is explicitly typecast to a supertype, then dispatching considers that type instead.
Example:
data Media as nothing;
data Media.Audio with <...> end
data Media.Video with <...> end
data Media.Video.Avi with <...> end
code/await/dynamic Play (dynamic var& Media media) -> none do
_assert(0); // never dispatched
end
code/await/dynamic Play (dynamic var& Media.Audio media) -> none do
<...> // plays an audio
end
code/await/dynamic Play (dynamic var& Media.Video media) -> none do
<...> // plays a video
end
code/await/dynamic Play (dynamic var& Media.Video.Avi media) -> none do
<...> // prepare the avi video
await/dynamic Play(&m as Media.Video); // dispatches the supertype
end
var& Media m = <...>; // receives one of "Media.Audio" or "Media.Video"
await/dynamic Play(&m); // dispatches the appropriate subprogram to play the media
Synchronous Control Statements¶
The synchronous control statements which follow cannot appear in
event iterators,
pool iterators,
asynchronous execution,
finalization,
and
tight code abstractions:
await
, spawn
, emit
(internal events), every
, finalize
, pause/if
,
par
, par/and
, par/or
, and watching
.
As exceptions, an every
can emit
internal events, and a code/tight
can
contain empty finalize
statements.


strace
Troubleshooting tool for tracing system calls.
More information: home page
- Start tracing a specific process by its PID:
strace -p pid
- Trace a process and filter output by system call:
strace -p pid -e system_call_name
- Count time, calls, and errors for each system call and report a summary on program exit:
strace -p pid -c
- Show the time spent in every system call:
strace -p pid -T
- Start tracing a program by executing it:
strace program
- Start tracing file operations of a program:
strace -e trace=file program


https://docs.python.org/3/library/os.html
https://docs.python.org/3/library/os.path.html
OS module provides various functions to interact with the operating system. Programs that import and use 'os' stand a better chance of being portable between different platforms. Programs should leave all pathname manipulation to 'os.path' (e.g., split and join).
import os # current working directory current = os.getcwd() # '/home/andrzej' in Linux Debian # Using join(). # parent directory print ( os.pardir ) # ".." in UNIX parent = os.path.join(current, os.pardir) # '/home/andrzej/..' # Join two or more pathname components, inserting os.sep as needed. print ( current + os.sep + os.pardir ) # the same print ( os.path.abspath(parent) ) # '/home', the absolute path print ( os.path.relpath(parent) ) # '..' the relative path
# Using split(). path = '/home/andrzej/Pobrane' print ( os.path.exists(path) ) # True print ( os.path.isabs(path) ) # True, it is the absolute path print ( os.path.isfile(path) ) # False print ( os.path.isdir(path) ) # True print ( os.path.getsize(path) ) # the number of bytes print ( os.path.split(path) ) # ('/home/andrzej', 'Pobrane') # Split a pathname. Returns tuple "(head, tail)" where "tail" is # everything after the final slash. Either part may be empty. print ( os.path.basename(path) ) # 'Pobrane' print ( os.path.dirname(path) ) # '/home/andrzej'
# Create a directory. dirname = "MyWork" print ( os.path.isdir(dirname) ) # False os.mkdir(dirname) # os.rename(old_name, new_name) print ( os.path.isdir(dirname) ) # True print ( os.path.abspath(dirname) ) # '/home/andrzej/MyWork' os.rmdir(dirname) # a directory have to be empty # Create directory and all intermediate directories if don't exists. dirname = "A/B/C" if not os.path.exists(dirname): os.makedirs(dirname)
# Delete everything reachable from the directory named in "top", # assuming there are no symbolic links. # CAUTION: This is dangerous! For example, if top == '/', # it could delete all your disk files. import os for root, dirs, files in os.walk(top, topdown=False): # walking bottom-up # 'root' is a string, the path to the directory # 'dirs' is a list of the names of the subdirectories in 'root' # 'files' is a list of the names of the non-directory files in 'root' for name in files: os.remove(os.path.join(root, name)) for name in dirs: os.rmdir(os.path.join(root, name))
# Display the number of bytes taken by non-directory files in each directory # under the starting directory ('top'). Skip any CVS subdirectory. import os for root, dirs, files in os.walk(top): # walking top-down (default) print(root, "consumes", end=" ") print(sum(os.path.getsize(os.path.join(root, name)) for name in files), end=" ") print("bytes in", len(files), "non-directory files") if 'CVS' in dirs: dirs.remove('CVS') # don't visit CVS directories
# For a given directory find the number of PDF files in the directory tree # (".pdf" extensions). import os n_pdf = 0 # the number of PDF files for root, dirs, files in os.walk(top): # walking top-down (default) for name in files: #if name[-4:] == ".pdf": #if name.endswith(".pdf"): if name.lower().endswith(".pdf"): # for *.PDF files n_pdf += 1 print("The number of PDF files in {} directory is {}".format(top, n_pdf))


Introduction
Setting Up Your Environment
Introduction to R
Programming Fundamentals
R Data Structures
Logical Operators
Subsetting
Controlling Program Flow
Additional Resources
My Marquette Experience:
Since Marquette:
{uptasticsearch}
and {pkgnet}
packages on CRANLightGBM
The main objectives for the course are as follows:
Programming in R begins with installing R!
R comes with a command-line client and a default GUI, but most users prefer to use other IDEs ("integrated development environment"). The most popular IDE for R, and the one we'll use in this class, is RStudio:
Sequences of R code are typically saved in scripts with the file extension ".R". To open a blank script in RStudio and start editing, you can either go to "File --> New File --> R script" or choose "R Script" from the paper image in RStudio:
When you author a script in RStudio, the file you create will be stored with the file extension ".R" by default. Out in the wild (i.e. editing in text editors), you are responsible for saving files with the appropriate file extension so the software that uses them can interpret them correctly. Trust me, there are a lot of them
A few common ones you'll want to know for this course:
Scripts and Docs
Data
R is an interpreted language (more on this later). TL;DR, you need to send your code to some software that knows what to do with it ("R"). RStudio makes this super easy to do. You can execute your code interactively (one line at a time) in the R console or run your .R scripts using the "run" button.
Using Scripts
The Console
When R is just one of the tools in your stack, it's often quicker to execute your code from a terminal rather than going into a dedicated application for each type of file.
The R REPL
R
from the command linequit()
or q()
Rscript
Rscript
command.Interpreted languages are those which break commands down into building blocks called "subroutines" that have already been compiled in machine code (source: Wikipedia). Much of the R source code (including these subroutines) is actually written in C.
To ensure that that process of breaking down ("interpreting") code goes smoothly, R needs to use a few keywords to identify crucial operations. Like other scripting languages, it has a set of "reserved words" which you cannot use as object names.
Run ?reserved
in RStudio
Run TRUE = 4
in RStudio
Some languages like Java required you to declare the types of objects you create
R is "dynamically typed"
| Extension | Description |
|---|---|
| .r, .R | Text format for scripts. |
| .rda, .RData | R data format. One or many R objects |
| .rds | R data format. Single R object. Can be loaded into a named object |
# .r and .R scripts can be run inside R with source()
source("my_script.R")
# .rda and .RData files can be loaded into an R session with load()
load("all_of_the_data.rda")
# .rds files can be read directly into an R object
someData <- readRDS("my_data.rds")
When you execute a statement like x <- 5
in R, you are creating an object in memory which holds the numeric value 5 and is referenced by the variable name "x".
If you later ask R to do something like y <- x + 2
, it will search through a series of namespaces until it finds a variable called "x". Namespaces can be thought of as collections of labels pointing to places in memory. You can use R's search()
command to examine the ordered list of namespaces that R will search in for variables.
# Check the search path of namespaces
search()
# use ls() to list the objects in one of those namespaces
ls("package:stats")
Languages like Java and C are more verbose than R partially because they require programmers to explicitly declare types for data values. We will not go into the intricacy of typing in this course, but you should be familiar with the following types (this knowledge will serve you well across all languages):
anInteger <- 1L
someNums <- c(1.005, 2)
someLogicals <- c(TRUE, FALSE, FALSE)
stringVar <- "Chicago Heights"
# Addition with "+"
4 + 5
## [1] 9
# Subtraction with "-"
100 - 99
## [1] 1
# Multiplication with "*"
4 * 5
## [1] 20
# Division with "/"
15 / 3
## [1] 5
# Exponentiation with "^"
2^3
## [1] 8
# Order of Operations
4 * 5 + 5 / 5
## [1] 21
# Control with parentheses
4 * (5 + 5) / 5
## [1] 8
# Ordered sequence of integers
1:5
# Counting by 2s
seq(from = 0, to = 14, by = 2)
# Replicate the same values
rep(TRUE, 6)
# Concatenate multiple values with the "c" operator
c("all", "of", "the", "lights")
# Watch out! Mixing types will lead to silent coercion
c(1, TRUE, "hellos")
# Some functions, when applied over a vector, return a single value
is.numeric(rnorm(100))
# Others will return a vector of results
is.na(c(1, 5, 10, NA, 8))
# Vectors can be named
batting_avg <- c(youkilis = 0.300, ortiz = 0.355, nixon = 0.285)
# You can combine two vectors with c()
x <- c("a", "b", "c")
y <- c("1", "2", "3")
c(x, y)
Vectors are the first multi-item data structure all R programmers learn. Soon, though, you may find yourself frustrated with the fact that they can only hold a single type. To handle cases where you want to package multiple types (and even multiple objects!) together, we will turn to a data structure called a list
.
| Capabilities | Vectors | Lists |
|---|---|---|
| Optional use of named elements | ✔ | ✔ |
| Support math operations like mean() | ✔ | |
| Hold multiple types | ✔ | |
| Hold multiple objects | ✔ |
# Create a list with list()
myList <- list(a = 1, b = rep(TRUE, 10), x = c("shakezoola", "mic", "rulah"))
# Examine it with str()
str(myList)
R comes with a special type called a "factor" for modelling categorical variables. To save memory, internally R will convert factor values to integers and then keep around a single table that says, for example, 1 = "Africa", 2 = "Asia", etc.
regions <- as.factor(c("Africa", "Asia", "Europe", "Asia"))
region_fac <- as.factor(regions)
print(region_fac)
## [1] Africa Asia Europe Asia
## Levels: Africa Asia Europe
print(as.integer(region_fac))
## [1] 1 2 3 2
See "Factors" in the programming supplement for an example.
Data frames are tables of data. Each column of a data frame can be a different type, but all values within a column must be the same type.
See "Data Frames" in the programming supplement for some examples.
Often in your code, you'll want to do/not do something or select / not select some data based on a logical condition (a statement that evaluates to TRUE or FALSE).
# "and" logic is expressed with "&"
TRUE & TRUE # TRUE
TRUE & FALSE # FALSE
FALSE & FALSE # FALSE
-5 < 5 & 3 > 2 # TRUE
# "or" logic is expressed with "|"
TRUE | TRUE # TRUE
TRUE | FALSE # TRUE
FALSE | FALSE # FALSE
3 < 8 | 8 > 19 # TRUE
The most common operators used to generate logicals are >
, <
, ==
, and !=
# "equality" logic is specified with "=="
3 == 3 # TRUE
4 == 4.1 # FALSE
# "not" logic is specified with !. In a special case, != signifies "not equal"
!TRUE # FALSE
!FALSE # TRUE
! (TRUE | FALSE) # FALSE
4 != 5 # TRUE
# "greater than" and "less than" logic are specified in the way you might expect
5 < 5 # FALSE
6 <= 6 # TRUE
4 > 2 # TRUE
3 >= 3 # TRUE
As a general rule, when you put a vector on the left-hand side of a logical condition like ==
or >
, you will get back a vector as a result.
vehicleSizes <- c(1, 5, 5, 2, 4)
# Create a logical index. Note that we get a VECTOR of logicals back
bigCarIndex <- vehicleSizes > 4
# Taking the SUM of a logical vector tells you the number of TRUEs.
sum(bigCarIndex)
# Taking the MEAN of a logical vector tells you the proportion of TRUEs
mean(bigCarIndex)
Subsetting is the act of retrieving a portion of an object, usually based on some logical condition (e.g. "all elements greater than 5"). In R, this is done with the [
operator.
# Create a vector to work with
myVec <- c(var1 = 10, var2 = 15, var3 = 20, av4 = 6)
# "the first element"
myVec[1]
## var1
## 10
# "second to fourth elements"
myVec[2:4]
## var2 var3 av4
## 15 20 6
# "the element named var3"
myVec["var3"]
## var3
## 20
Lists, arbitrary collections of R objects, support three subsetting operators.
[
= returns a 1-element list
someList["grades"]
someList[1]
[[
= returns the object in its natural form (whatever it would look like if it wasn't in a list)
someList[["grades"]]
someList[[1]]
$
= similar to [[
, but uses unquoted keys and cannot use positions
someList$grades
Please see "Subsetting Lists" in the programming supplement.
Data frames are the workhorse data structure of statistics in R. The best way to learn data frame subsetting is to just walk through the examples below:
# Create a data frame
someDF <- data.frame(
, conference = c("Big East", "Big Ten", "Big East", "ACC", "SEC")
, school_name = c("Villanova", "Minnesota", "Marquette", "Duke", "LSU")
, wins = c(18, 14, 19, 24, 12)
, ppg = c(71.5, 45.8, 66.9, 83.4, 58.7)
)
# Grab the wins column (NOTE: will give you back a vector)
someDF[, "wins"]
# Grab the first 3 rows and the two numeric columns
someDF[1:3, c("wins", "ppg")]
So far, we've seen how to subset R objects using numeric indices and named elements. These are useful approaches, but both require you to know something about the contents of the object you're working with.
Using these methods (especially numeric indices like saying give me columns 2-4) can make your code confusing and hard for others to reason about. Wherever possible, I strongly recommend using logical vectors for subsetting. This makes your code intuitive and more flexible to change.
Please see "Using Logical Vectors" in the programming supplement for an example.
Soon after you start writing code (in any language), you'll find yourself saying "I only want to do this thing if certain conditions are met". This type of logic is expressed using if-else syntax)
x <- 4
if (x > 5){
print("x is above the threshold")
}
See "If-Else" in the programming supplement for more examples.
What if you want to express more than two possible outcomes? For this, we could use R's else if
construct to nest conditions. Note that conditional blocks can have any number of "else if" statements, but only one "else" block.
# Try to think through what this will do before you run it yourself
if (4 > 5){
print("3")
} else if (6 <= (5/10)) {
print("1")
} else if (4 + 4 + 4 == 12.0001) {
print("4")
} else {
print("2")
}
One of the most powerful characteristics of general purpose programming languages is their ability to automate repetitive tasks. When you know that you want to do something a fixed number of times (say, squaring each item in a vector), you can use a for
loop.
# Create a vector
x <- c(1, 4, 6)
# Print the square of each element one at a time
print(1^2)
print(4^2)
print(6^2)
# BETTER: Loop over the vector and print the square of each element
for (some_number in x){
print(some_number^2)
}
For loops are suitable for many applications, but they can be too restrictive in some cases. When you want to say "run this code until some condition is met", a while
loops is more appropriate.
i <- 1
while (i < 5) {
print(i)
i <- i + 1
}
## [1] 1
## [1] 2
## [1] 3
## [1] 4
See "While Loops" in the programing supplement for a hands-on example.
For the brave and curious, I've included a few online free resources for learning more about the technologies we discussed.
Bash: Codecademy | Learn Bash
R: swirl | JHU Data Science
RStudio: RStudio blog
Subsetting: Quick-R | R-bloggers | Advanced R book


--- layout: post title: 'Perian: H264 AVI Videos on Quicktime (Mac OS)' date: '2008-08-03T14:54:00+02:00' tags: - easypix - dv5311hd - h264 - video - videos - quicktime - macos - mac - perian - development - textmadebyme tumblr_url: http://blog.alezzandro.com/post/44547263/perian-h264-avi-videos-on-quicktime-mac-os ---
Hoping you already know Perian (http://perian.org/),
if you have problems watchin H264 AVI Videos on Quicktime (Mac OS X), the matter isn’t your video but Perian, there is a bug in Perian 1.1 corrected in the latest development version.
You can download the latest development version by follow these instructions,
Installing this version you will watch H264 AVI videos on Quicktime fine:
1. Go to System Preferences -> Perian -> Remove Perian.
2. Open Terminal (Applications -> Utilities -> Terminal)
3. In Terminal, type the following:
cd /
(Note: if it asks you to accept something, just temporary accept them.)
svn co http://svn.perian.org/trunk perian
cd perian
make
4. Wait for everything to finish….
5. In Finder, use Go to Folder (shift+command+g), and enter: /perian/build/Deployment
6. Double-click on “Perian.prefPane” to install the new Perian.
7. In the new Perian preferences, go to the General tab and Install Perian.
8. Once you are done, you can remove the perian folder; to do this in Terminal, type:
cd /
rm -fr perian
9. Congratulations! You are done!
That’s all!
Good Luck!
source: http://forums.cocoaforge.com/viewtopic.php?f=25&t=16525


Installing .Net Core on Mac OS X
Here are the steps to install .Net Core in Mac OS X, as instructed in .Net Core web site
-
Install Homebrew
As instructed in Homebrew webiste, run in the terminal:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
With the following output:
Type in the password...and the installation continues...
Homebrew should be installed and up-to-date at this point but..
brew update
That should outpu:
-
Install .Net Core package
-
Download packgage
Click the link that says "official PKG package"
-
Install the package
This will download the package through the Mac OS download manager. Double-click on it.
-
Follow the wizard instrunctions
Click "Continue" in "Introduction"
Click "Continue" in "License"
"Agree"
Click "Install" in "Installation Type"
Type in the password
And were done
Confirm installation
Go to the Terminal and:
dotnet --version
That should output:


Forgot/Reset your password or user ID?
* Denotes required field.
Forgot/Reset your Password?
To change your current password, enter your User ID then click Continue.
*User ID   Forgot/Reset your Password?
If you forgot your User ID, enter your email address associated with your User ID then click Continue.
*Email Address


This Primus example allows you to experiment with the API's and see how all components interact with each other.
connect
"end"
{ echo: "data" }
{ pipe: true }
"kill"


Upward uses the following coding style. Whether or not you adopt this in your Upward application is completely up to you.
- Indentation
- Two spaces
- Spaces, not tabs
- Variables and names
- camelCased
- Individual
var
declarations
var
declarations after nested functions
- Comments
- Liberal double-slash comments, at least one per routine
- Double-slash comments at beginning of every file
- Use of YUIDoc-style comments for important APIs whose parameters/return value need explicit documentation
- Line breaking
- Short
if
, else
, for
and while
statement bodies may follow on the same line, with no curly brackets
- Short function bodies may also follow on the same line
- Vertical spacing
- Empty lines between routines, unless closely paired
- Wherever else makes sense for readability
- Horizontal spacing
- No spaces after left parentheses or before right parentheses
- Spaces around operators
- Spaces after left brackets and before right brackets, both for single-line functions and object literals
- Spaces before and after dots accessing chained methods, such as
E('div') . has(....)
; when the has
is to be placed on a separate line, the preceding period on the first line
- Spacing to align and show the relationship between consecutive lines, as in
- Exports
- At bottom
- Preference for default exports


Thank you for ordering some HYPE SNEAKS!!
Once your package ships we will send you a tracking number. You can check the status of your order by logging into your account.
Order #
Date
Subtotal:
Recipient Information:
Name:
Address:
Phone:
Thank you!


A thin wrapper around a Doctrine\DBAL\Driver\Statement that adds support for logging, DBAL mapping types, etc.
| author |
Roman Borschel<EMAIL_ADDRESS>|
|---|---|
| since | 2.0 |
| package |
Default |
__construct(string $sql, \Doctrine\DBAL\Connection $conn)
string
The SQL of the statement.
bindParam(string $name, mixed &$var, integer $type = \PDO::PARAM_STR, integer|null $length = null) : boolean
Binding a parameter by reference does not support DBAL mapping types.
string
The name or position of the parameter.
mixed
The reference to the variable to bind.
integer
The PDO binding type.
integer|null
Must be specified when using an OUT bind so that PHP allocates enough memory to hold the returned value.
boolean
TRUE on success, FALSE on failure.
bindValue(string $name, mixed $value, mixed $type = null) : boolean
The value can optionally be bound with a PDO binding type or a DBAL mapping type. If bound with a DBAL mapping type, the binding type is derived from the mapping type and the value undergoes the conversion routines of the mapping type before being bound.
string
The name or position of the parameter.
mixed
The value of the parameter.
mixed
Either a PDO binding type or a DBAL mapping type name or instance.
boolean
TRUE on success, FALSE on failure.
closeCursor() : boolean
boolean
TRUE on success, FALSE on failure.
columnCount() : integer
integer
errorCode() : string
string
errorInfo() : array
array
execute(array|null $params = null) : boolean
If the prepared statement included parameter markers, you must either: call PDOStatement->bindParam() to bind PHP variables to the parameter markers: bound variables pass their value as input and receive the output value, if any, of their associated parameter markers or pass an array of input-only parameter values.
| Throws |
|
|---|
array|null
An array of values with as many elements as there are bound parameters in the SQL statement being executed.
boolean
TRUE on success, FALSE on failure.
fetch(integer|null $fetchMode = null) : mixed
integer|null
mixed
The return value of this function on success depends on the fetch type. In all cases, FALSE is returned on failure.
fetchAll(integer|null $fetchMode = null, mixed $fetchArgument) : array
integer|null
mixed
array
An array containing all of the remaining rows in the result set.
fetchColumn(integer $columnIndex) : mixed
integer
mixed
A single column from the next row of a result set or FALSE if there are no more rows.
getIterator()
{@inheritdoc}
getWrappedStatement() : \Doctrine\DBAL\Driver\Statement
rowCount() : integer
If the last SQL statement executed by the associated Statement object was a SELECT statement, some databases may return the number of rows returned by that statement. However, this behaviour is not guaranteed for all databases and should not be relied on for portable applications.
integer
The number of affected rows.
setFetchMode( $fetchMode, $arg2 = null, $arg3 = null)
sql : string
| var |
|---|
string
params : array
| var |
|---|
array
types : array
| var |
|---|
array
stmt : \Doctrine\DBAL\Driver\Statement
platform : \Doctrine\DBAL\Platforms\AbstractPlatform
conn : \Doctrine\DBAL\Connection


{{page.heading}}
This is the 'about us' page, it has child views you can see by clicking on the links below. You can also have the page load directly with a child view if you use the drop down menu vs the about link. Child views have their own controllers just as a named view can. However, a child's controller can access the parents.
Multiple Named Views and Child Views
Our about page contains both multiple named views and child views. The menu, bottom, and footer are named views. It also contains two child views that can be changed with out leaving the main view.
Index
About
Menu Content View
About Child View
About Bottom View
Footer View