view release on metacpan or search on metacpan
t/01_old_junk.t view on Meta::CPAN
a general solution to this. So I conject:
Burke's Ambiguity Conjecture:
* All natural languages are subject to syntactic ambiguity.
And a corollary:
* Artificial languages constructed to make syntactic ambiguity impossible
will be so unnatural as to be unlearnable by humans. (I.e., that aspect of
the language will be unlearnable. The rest of the language might well be
quite learnable.)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Games/Word/Wordlist/Enable.pm view on Meta::CPAN
cornices corniche corniches cornicing cornicle cornicles cornier corniest
cornification cornifications cornily corniness corninesses corning cornmeal
cornmeals cornpone cornpones cornrow cornrowed cornrowing cornrows corns
cornstalk cornstalks cornstarch cornstarches cornu cornua cornual cornucopia
cornucopian cornucopias cornus cornuses cornute cornuted cornuto cornutos
corny corodies corody corolla corollaries corollary corollas corollate
coromandel coromandels corona coronach coronachs coronae coronagraph
coronagraphs coronal coronals coronaries coronary coronas coronate coronated
coronates coronating coronation coronations coronel coronels coroner coroners
coronet coronets coronograph coronographs coronoid corotate corotated
corotates corotating corotation corotations corpora corporal corporalities
corporality corporally corporals corporate corporately corporation
corporations corporatism corporatisms corporatist corporative corporativism
corporativisms corporator corporators corporeal corporealities corporeality
corporeally corporealness corporealnesses corporeities corporeity corposant
corposants corps corpse corpses corpsman corpsmen corpulence corpulences
lib/Games/Word/Wordlist/Enable.pm view on Meta::CPAN
deconstructions deconstructive deconstructor deconstructors deconstructs
decontaminate decontaminated decontaminates decontaminating decontamination
decontaminations decontaminator decontaminators decontrol decontrolled
decontrolling decontrols decor decorate decorated decorates decorating
decoration decorations decorative decoratively decorativeness decorativenesses
decorator decorators decorous decorously decorousness decorousnesses decors
decorticate decorticated decorticates decorticating decortication
decortications decorticator decorticators decorum decorums decos decoupage
decoupaged decoupages decoupaging decouple decoupled decouples decoupling
decoy decoyed decoyer decoyers decoying decoys decrease decreased decreases
decreasing decreasingly decree decreed decreeing decreer decreers decrees
lib/Games/Word/Wordlist/Enable.pm view on Meta::CPAN
incurves incurving incus incuse incused incuses incusing indaba indabas
indagate indagated indagates indagating indagation indagations indagator
indagators indamin indamine indamines indamins indebted indebtedness
indebtednesses indecencies indecency indecent indecenter indecentest
indecently indecipherable indecision indecisions indecisive indecisively
indecisiveness indecisivenesses indeclinable indecomposable indecorous
indecorously indecorousness indecorousnesses indecorum indecorums indeed
indefatigabilities indefatigability indefatigable indefatigableness
indefatigablenesses indefatigably indefeasibilities indefeasibility
indefeasible indefeasibly indefectibilities indefectibility indefectible
indefectibly indefensibilities indefensibility indefensible indefensibly
indefinabilities indefinability indefinable indefinableness indefinablenesses
lib/Games/Word/Wordlist/Enable.pm view on Meta::CPAN
postatomic postattack postaxial postbaccalaureate postbag postbags postbase
postbellum postbiblical postbourgeois postbox postboxes postboy postboys
postburn postcapitalist postcard postcardlike postcards postcava postcavae
postcaval postclassic postclassical postcode postcodes postcoital postcollege
postcolleges postcollegiate postcolonial postconception postconcert
postconquest postconsonantal postconvention postcopulatory postcoronary
postcoup postcranial postcranially postcrash postcrises postcrisis postdate
postdated postdates postdating postdeadline postdebate postdebutante
postdebutantes postdelivery postdepositional postdepression postdevaluation
postdiluvian postdiluvians postdive postdivestiture postdivorce postdoc
postdocs postdoctoral postdoctorate postdrug posted postediting posteditings
lib/Games/Word/Wordlist/Enable.pm view on Meta::CPAN
ramped rampike rampikes ramping rampion rampions rampole rampoles ramps ramrod
ramrodded ramrodding ramrods rams ramshackle ramshorn ramshorns ramson ramsons
ramtil ramtils ramulose ramulous ramus ran rance rances ranch ranched rancher
ranchero rancheros ranchers ranches ranching ranchman ranchmen rancho ranchos
rancid rancidities rancidity rancidly rancidness rancidnesses rancor rancored
rancorous rancorously rancors rancour rancours rand randan randans randier
randies randiest random randomization randomizations randomize randomized
randomizer randomizers randomizes randomizing randomly randomness randomnesses
randoms rands randy ranee ranees rang range ranged rangeland rangelands ranger
rangers ranges rangier rangiest ranginess ranginesses ranging rangy rani ranid
ranids ranis rank ranked ranker rankers rankest ranking rankings rankish
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Generator/Object.pm view on Meta::CPAN
# protect some state values from leaking
local $self->{orig} = $Coro::current;
local $self->{wantarray} = wantarray;
local $self->{yieldval};
$self->{coro} = Coro->new(sub {
local $_ = $self;
$self->{retval} = [ $self->{sub}->() ];
$self->{exhausted} = 1;
$self->{orig}->schedule_to;
}) unless $self->{coro};
$self->{coro}->schedule_to;
my $yield = $self->{yieldval} || [];
return $self->{wantarray} ? @$yield : $yield->[0];
}
lib/Generator/Object.pm view on Meta::CPAN
=cut
sub restart {
my $self = shift;
delete $self->{coro};
delete $self->{exhausted};
$self->{retval} = [];
}
=head2 retval
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Geo/FIT.pm view on Meta::CPAN
'seesense' => 124,
'nci_technology' => 125,
'iqsquare' => 126,
'leomo' => 127,
'ifit_com' => 128,
'coros_byte' => 129,
'versa_design' => 130,
'chileaf' => 131,
'cycplus' => 132,
'gravaa_byte' => 133,
'sigeyi' => 134,
lib/Geo/FIT.pm view on Meta::CPAN
'hammerhead' => 289,
'kinetic_by_kurt' => 290,
'shapelog' => 291,
'dabuziduo' => 292,
'jetblack' => 293,
'coros' => 294,
'virtugo' => 295,
'velosense' => 296,
'cycligentinc' => 297,
'trailforks' => 298,
'mahle_ebikemotion' => 299,
view all matches for this distribution
view release on metacpan or search on metacpan
use EV; # any order
my $timer = EV::timer 1, 1, sub { print "I am here!\n" };
main Gtk2;
# etc., it just works
# You can even move the glib mainloop into a coroutine:
use Gtk2 -init;
use Coro;
use Coro::EV;
use Glib::EV;
async { main Gtk2 };
view all matches for this distribution
view release on metacpan or search on metacpan
use Event; # any order
Event->timer (after => 1, interval => 1, cb => sub { print "I am here!\n" });
main Gtk2;
# etc., it just works
# You can even move the glib mainloop into a coroutine:
use Gtk2 -init;
use Coro;
use Coro::Event;
use Glib::Event;
async { main Gtk2 };
view all matches for this distribution
view release on metacpan or search on metacpan
xt/oeis/Catalans-oeis.t view on Meta::CPAN
#------------------------------------------------------------------------------
# split = Kreweras
# A000272 n^(n-2) = split, maximal chains
# Kreweras page 348 corollary 5.2 maximal chains m^(m-2).
# And ref to the same from Y. Poupard, "Codage et Denombrement
# Diverse Structures Apparentees a Celle d'Arbre", Cahiers BURO, volume
# 16, 1970, pages 71-80.
#
MyOEIS::compare_values
view all matches for this distribution
view release on metacpan or search on metacpan
type:
my $scm = new Guile::SCM integer => $number;
Another reason to use an explicit type is to create types that have no
obvious corollary in Perl, like a pair. Normally Guile assumes that
array-refs should be translated into lists. To create a pair you need
to specify the "pair" type and a reference to a two-element array:
my $scm = new Guile::SCM pair => ["foo", 20];
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTML/FormHandler/Manual/Intro.pod view on Meta::CPAN
$form->process( params => $c->request->body_parameters,
action => $action,
);
If the parameters are not empty, then validation will be performed. The
corollary is that you should not pass in extra parameters when the form
has not been posted. A special 'posted' flag can be used if
the form consists entirely of fields like checkboxes that do not include
names in params if unchecked, and also works to prevent validation from
being performed if there are extra params:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTML/FormatText/WithLinks.pm view on Meta::CPAN
Struan Donald. E<lt>struan@cpan.orgE<gt>
L<http://www.exo.org.uk/code/>
Ian Malpass E<lt>ian@indecorous.comE<gt> was responsible for the custom
formatting bits and the nudge to release the code.
Simon Dassow E<lt>janus@errornet.de<gt> for the anchor_links option plus
a few bugfixes and optimisations
view all matches for this distribution
view release on metacpan or search on metacpan
EV/BufTie.pm view on Meta::CPAN
HTTP::Server::EV::BufTie - Internal class used by L<HTTP::Server::EV::CGI> for proxifying output to correct L<HTTP::Server::EV::Buffer>.
=head1 DESCRIPTION
Mainly it`s workaround for bug of localizing *STDOUT(no only it, all global vars also) in L<Coro> threads, when calling HTTP::Server::EV::CGI->attach(local *STDOUT) overwrites STDOUT in all now runing coros.
That happens because local() doesn`t create lexical copy of var, it pushes old value to stack and sets new value to glob var, old value is restored when interpreter leaves the scope. So localizing variable in one coro overwrites it in all other.
=head1 BUGS
One coro thread - one socket. All handles attached in coro thread will refer to one socket that attached to filehandle last.
It`s possible to support attaching different sockets to different handles in same coro thread by constructing tie object on flow, but it slow and generally needn't, so not implemented.
=cut
EV/BufTie.pm view on Meta::CPAN
sub new {
unless(tied *{$_[1]}){
tie *{$_[1]} , __PACKAGE__;
}
my $coro = $Coro::current;
$storage{$coro} = $_[2];
Guard::guard {
delete $storage{$coro};
}
}
sub TIEHANDLE { # pkgname, handle, buffer obj
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/Hailo/Test/TimToady.trn view on Meta::CPAN
biab&
the bottom-up parse has to parameterizable for terminators. <expectop>{ is just the terminator
I mean <space>{
except, assume that =cut is probably going away.
just be careful with the minilanguages not to make the same mistake as Perl 5. Calling out to subrules is fine. Finding the end and reparsing is not so fine.
Also, I'm viewing the line boundaries as something more like handover points between coroutines, so it's not necessary that a pod parser act completely inside each pod chunk, or Perl chunk inside each pod chunk.
but the line transition conventions are agreed to by the two parsers so that you can, for instance, ignore the pod, or the pod can ignore the program.
calling out to a main rule is fine for now.
basically, but I don't know if they've updated Doc.pod to reflect what we talked about in Tokyo.
if there's still =pod and =cut in there, assume that's all simplified to =begin/=end with =use for a general "use" mechanism just as with Perl.
anyway, Ingy and Damian are still working it out, last I knew.
t/lib/Hailo/Test/TimToady.trn view on Meta::CPAN
so, are the Zulus in the Zulu time zone?
at the time the module is compiled there is no $env arrow.
it is likely the main is not compiled yet
maybe you want to draw it more like a protocol negotiation between two entities over time.
ok, I was misreading the blue as a module compile
It's not really coroutines
the only thing running is the compiler.
but the parser can generate closures to be executed by the compiler.
and those closures are special in that they do not have to say COMPILING::
maybe you're trying to put too many dimensions in at once.
maybe not
view all matches for this distribution
view release on metacpan or search on metacpan
Word/noun.txt view on Meta::CPAN
cornfield,cornfields
cornflake,cornflakes
cornflower,cornflowers
cornice,cornices
cornishman,cornishmen
corollary,corollaries
coronary,coronaries
coronation,coronations
coroner,coroners
coronet,coronets
corp,corps
corporal,corporals
corporate,corporates
corporation,corporations
corporatist,corporatists
view all matches for this distribution
view release on metacpan or search on metacpan
brotli/tests/testdata/asyoulik.txt view on Meta::CPAN
of love. Leander, he would have lived many a fair
year, though Hero had turned nun, if it had not been
for a hot midsummer night; for, good youth, he went
but forth to wash him in the Hellespont and being
taken with the cramp was drowned and the foolish
coroners of that age found it was 'Hero of Sestos.'
But these are all lies: men have died from time to
time and worms have eaten them, but not for love.
ORLANDO I would not have my right Rosalind of this mind,
for, I protest, her frown might kill me.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IO/Lambda.pm view on Meta::CPAN
=head1 DESCRIPTION
This module is another attempt to fight the horrors of non-blocking I/O. It
tries to bring back the simplicity of the declarative programming style, that
is only available when one employs threads, coroutines, or co-processes.
Usually coding non-blocking I/O for single process, single thread programs
requires construction of state machines, often fairly complex, which fact
doesn't help the code clarity, and is the reason why the asynchronous I/O
programming is often considered 'messy'. Similar to the concept of monads in
functional languages, that enforce a certain order of execution over generally
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IO/Socket/SSL/PublicSuffix.pm view on Meta::CPAN
// sandvik : Sandvik AB
// https://www.iana.org/domains/root/db/sandvik.html
sandvik
// sandvikcoromant : Sandvik AB
// https://www.iana.org/domains/root/db/sandvikcoromant.html
sandvikcoromant
// sanofi : Sanofi
// https://www.iana.org/domains/root/db/sanofi.html
sanofi
view all matches for this distribution
view release on metacpan or search on metacpan
Changes
examples/bind.pl
examples/chain.pl
examples/client4.pl
examples/client5.pl
examples/multi-client-multi-ver-coro-based-server.pl
examples/server4.pl
examples/server5.pl
examples/udp.pl
lib/IO/Socket/Socks.pm
Makefile.PL
view all matches for this distribution
view release on metacpan or search on metacpan
ccv-src/lib/3rdparty/sqlite3/sqlite3.c view on Meta::CPAN
#define SQLITE_FactorOutConst 0x0008 /* Constant factoring */
#define SQLITE_IdxRealAsInt 0x0010 /* Store REAL as INT in indices */
#define SQLITE_DistinctOpt 0x0020 /* DISTINCT using indexes */
#define SQLITE_CoverIdxScan 0x0040 /* Covering index scans */
#define SQLITE_OrderByIdxJoin 0x0080 /* ORDER BY of joins via index */
#define SQLITE_SubqCoroutine 0x0100 /* Evaluate subqueries as coroutines */
#define SQLITE_Transitive 0x0200 /* Transitive constraints */
#define SQLITE_OmitNoopJoin 0x0400 /* Omit unused tables in joins */
#define SQLITE_Stat3 0x0800 /* Use the SQLITE_STAT3 table */
#define SQLITE_AdjustOutEst 0x1000 /* Adjust output estimates using WHERE */
#define SQLITE_AllOpts 0xffff /* All optimizations */
ccv-src/lib/3rdparty/sqlite3/sqlite3.c view on Meta::CPAN
if( pParse->db->mallocFailed && rc==SQLITE_OK ) rc = SQLITE_NOMEM;
if( rc ) return rc;
sqlite3VdbeAddOp2(v, OP_Integer, 1, regEof); /* EOF <- 1 */
sqlite3VdbeAddOp1(v, OP_Yield, regYield); /* yield X */
sqlite3VdbeAddOp2(v, OP_Halt, SQLITE_INTERNAL, OE_Abort);
VdbeComment((v, "End of coroutine"));
sqlite3VdbeJumpHere(v, j1); /* label B: */
return rc;
}
ccv-src/lib/3rdparty/sqlite3/sqlite3.c view on Meta::CPAN
int endOfLoop; /* Label for the end of the insertion loop */
int useTempTable = 0; /* Store SELECT results in intermediate table */
int srcTab = 0; /* Data comes from this temporary cursor if >=0 */
int addrInsTop = 0; /* Jump to label "D" */
int addrCont = 0; /* Top of insert loop. Label "C" in templates 3 and 4 */
int addrSelect = 0; /* Address of coroutine that implements the SELECT */
SelectDest dest; /* Destination for SELECT on rhs of INSERT */
int iDb; /* Index of database holding TABLE */
Db *pDb; /* The database containing table being inserted into */
int appendFlag = 0; /* True if the insert is likely to be an append */
int withoutRowid; /* 0 for normal table. 1 for WITHOUT ROWID table */
ccv-src/lib/3rdparty/sqlite3/sqlite3.c view on Meta::CPAN
if( pTrigger || readsTable(pParse, addrSelect, iDb, pTab) ){
useTempTable = 1;
}
if( useTempTable ){
/* Invoke the coroutine to extract information from the SELECT
** and add it to a transient table srcTab. The code generated
** here is from the 4th template:
**
** B: open temp table
** L: yield X
ccv-src/lib/3rdparty/sqlite3/sqlite3.c view on Meta::CPAN
return rc;
}
#endif /* SQLITE_OMIT_COMPOUND_SELECT */
/*
** Code an output subroutine for a coroutine implementation of a
** SELECT statment.
**
** The data to be output is contained in pIn->iSdst. There are
** pIn->nSdst columns to be output. pDest is where the output should
** be sent.
ccv-src/lib/3rdparty/sqlite3/sqlite3.c view on Meta::CPAN
** <selectA> <operator> <selectB> ORDER BY <orderbylist>
**
** <operator> is one of UNION ALL, UNION, EXCEPT, or INTERSECT. The idea
** is to code both <selectA> and <selectB> with the ORDER BY clause as
** co-routines. Then run the co-routines in parallel and merge the results
** into the output. In addition to the two coroutines (called selectA and
** selectB) there are 7 subroutines:
**
** outA: Move the output of the selectA coroutine into the output
** of the compound query.
**
** outB: Move the output of the selectB coroutine into the output
** of the compound query. (Only generated for UNION and
** UNION ALL. EXCEPT and INSERTSECT never output a row that
** appears only in B.)
**
** AltB: Called when there is data from both coroutines and A<B.
**
** AeqB: Called when there is data from both coroutines and A==B.
**
** AgtB: Called when there is data from both coroutines and A>B.
**
** EofA: Called when data is exhausted from selectA.
**
** EofB: Called when data is exhausted from selectB.
**
ccv-src/lib/3rdparty/sqlite3/sqlite3.c view on Meta::CPAN
** Duplicate removal in the UNION, EXCEPT, and INTERSECT cases is handled
** within the output subroutine. The regPrev register set holds the previously
** output value. A comparison is made against this value and the output
** is skipped if the next results would be the same as the previous.
**
** The implementation plan is to implement the two coroutines and seven
** subroutines first, then put the control logic at the bottom. Like this:
**
** goto Init
** coA: coroutine for left query (A)
** coB: coroutine for right query (B)
** outA: output one row of A
** outB: output one row of B (UNION and UNION ALL only)
** EofA: ...
** EofB: ...
** AltB: ...
** AeqB: ...
** AgtB: ...
** Init: initialize coroutine registers
** yield coA
** if eof(A) goto EofA
** yield coB
** if eof(B) goto EofB
** Cmpr: Compare A, B
ccv-src/lib/3rdparty/sqlite3/sqlite3.c view on Meta::CPAN
SelectDest *pDest /* What to do with query results */
){
int i, j; /* Loop counters */
Select *pPrior; /* Another SELECT immediately to our left */
Vdbe *v; /* Generate code to this VDBE */
SelectDest destA; /* Destination for coroutine A */
SelectDest destB; /* Destination for coroutine B */
int regAddrA; /* Address register for select-A coroutine */
int regEofA; /* Flag to indicate when select-A is complete */
int regAddrB; /* Address register for select-B coroutine */
int regEofB; /* Flag to indicate when select-B is complete */
int addrSelectA; /* Address of the select-A coroutine */
int addrSelectB; /* Address of the select-B coroutine */
int regOutA; /* Address register for the output-A subroutine */
int regOutB; /* Address register for the output-B subroutine */
int addrOutA; /* Address of the output-A subroutine */
int addrOutB = 0; /* Address of the output-B subroutine */
int addrEofA; /* Address of the select-A-exhausted subroutine */
ccv-src/lib/3rdparty/sqlite3/sqlite3.c view on Meta::CPAN
regOutA = ++pParse->nMem;
regOutB = ++pParse->nMem;
sqlite3SelectDestInit(&destA, SRT_Coroutine, regAddrA);
sqlite3SelectDestInit(&destB, SRT_Coroutine, regAddrB);
/* Jump past the various subroutines and coroutines to the main
** merge loop
*/
j1 = sqlite3VdbeAddOp0(v, OP_Goto);
addrSelectA = sqlite3VdbeCurrentAddr(v);
/* Generate a coroutine to evaluate the SELECT statement to the
** left of the compound operator - the "A" select.
*/
VdbeNoopComment((v, "Begin coroutine for left SELECT"));
pPrior->iLimit = regLimitA;
explainSetInteger(iSub1, pParse->iNextSelectId);
sqlite3Select(pParse, pPrior, &destA);
sqlite3VdbeAddOp2(v, OP_Integer, 1, regEofA);
sqlite3VdbeAddOp1(v, OP_Yield, regAddrA);
VdbeNoopComment((v, "End coroutine for left SELECT"));
/* Generate a coroutine to evaluate the SELECT statement on
** the right - the "B" select
*/
addrSelectB = sqlite3VdbeCurrentAddr(v);
VdbeNoopComment((v, "Begin coroutine for right SELECT"));
savedLimit = p->iLimit;
savedOffset = p->iOffset;
p->iLimit = regLimitB;
p->iOffset = 0;
explainSetInteger(iSub2, pParse->iNextSelectId);
sqlite3Select(pParse, p, &destB);
p->iLimit = savedLimit;
p->iOffset = savedOffset;
sqlite3VdbeAddOp2(v, OP_Integer, 1, regEofB);
sqlite3VdbeAddOp1(v, OP_Yield, regAddrB);
VdbeNoopComment((v, "End coroutine for right SELECT"));
/* Generate a subroutine that outputs the current row of the A
** select as the next output row of the compound select.
*/
VdbeNoopComment((v, "Output routine for A"));
ccv-src/lib/3rdparty/sqlite3/sqlite3.c view on Meta::CPAN
** the required db locks. See ticket d6b36be38. */
sqlite3CodeVerifySchema(pParse, -1);
sqlite3VdbeAddOp0(v, OP_Goto);
addrTop = sqlite3VdbeAddOp1(v, OP_OpenPseudo, pItem->iCursor);
sqlite3VdbeChangeP5(v, 1);
VdbeComment((v, "coroutine for %s", pItem->pTab->zName));
pItem->addrFillSub = addrTop;
sqlite3VdbeAddOp2(v, OP_Integer, 0, addrEof);
sqlite3VdbeChangeP5(v, 1);
sqlite3SelectDestInit(&dest, SRT_Coroutine, pItem->regReturn);
explainSetInteger(pItem->iSelectId, (u8)pParse->iNextSelectId);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Inline/Lua.pm view on Meta::CPAN
Lua being an embeddable language uses this one to handle generic C types. As of
now, this is not yet supported by Inline::Lua.
=item * B<thread>
Used to implement coroutines. Not yet handled by Inline::Lua
=item * B<table>
Lua tables act as arrays or hashes depending on what you put into them.
Inline::Lua can handle that transparently.
view all matches for this distribution
view release on metacpan or search on metacpan
duk_pop(thr);
}
#if 0
/* This check would prevent a heap destruction time finalizer from
* launching a coroutine, which would ensure that during finalization
* 'thr' would always equal heap_thread. Normal runtime finalizers
* run with ms_running == 0, i.e. outside mark-and-sweep. See GH-2030.
*/
if (thr->heap->ms_running) {
DUK_D(DUK_DPRINT("refuse Duktape.Thread.resume() when ms_running != 0"));
* we must assume that the valstack contains enough temporary space for
* arguments and such.
*
* While the error handler runs, any errors thrown will not trigger a
* recursive error handler call (this is implemented using a heap level
* flag which will "follow" through any coroutines resumed inside the
* error handler). If the error handler is not callable or throws an
* error, the resulting error replaces the original error (for Duktape
* internal errors, duk_error_throw.c further substitutes this error with
* a DoubleError which is not ideal). This would be easy to change and
* even signal to the caller.
#endif
DUK_DD(DUK_DDPRINT("-> return not caught, thread terminated; handle like yield, restart execution in resumer"));
return DUK__RETHAND_RESTART;
#else
/* Without coroutine support this case should never happen. */
DUK_ERROR_INTERNAL(thr);
DUK_WO_NORETURN(return 0;);
#endif
}
* leaving a single return value on top of the stack. Function calls
* and thread resumptions are handled internally. If an error occurs,
* a longjmp() with type DUK_LJ_TYPE_THROW is called on the entry level
* setjmp() jmpbuf.
*
* ECMAScript function calls and coroutine resumptions are handled
* internally (by the outer executor function) without recursive C calls.
* Other function calls are handled using duk_handle_call(), increasing
* C recursion depth.
*
* Abrupt completions (= long control tranfers) are handled either
view all matches for this distribution
view release on metacpan or search on metacpan
lib/JavaScript/Duktape/C/lib/duktape.c view on Meta::CPAN
* we must assume that the valstack contains enough temporary space for
* arguments and such.
*
* While the error handler runs, any errors thrown will not trigger a
* recursive error handler call (this is implemented using a heap level
* flag which will "follow" through any coroutines resumed inside the
* error handler). If the error handler is not callable or throws an
* error, the resulting error replaces the original error (for Duktape
* internal errors, duk_error_throw.c further substitutes this error with
* a DoubleError which is not ideal). This would be easy to change and
* even signal to the caller.
lib/JavaScript/Duktape/C/lib/duktape.c view on Meta::CPAN
#endif
DUK_DD(DUK_DDPRINT("-> return not caught, thread terminated; handle like yield, restart execution in resumer"));
return DUK__RETHAND_RESTART;
#else
/* Without coroutine support this case should never happen. */
DUK_ERROR_INTERNAL(thr);
DUK_WO_NORETURN(return 0;);
#endif
}
lib/JavaScript/Duktape/C/lib/duktape.c view on Meta::CPAN
* leaving a single return value on top of the stack. Function calls
* and thread resumptions are handled internally. If an error occurs,
* a longjmp() with type DUK_LJ_TYPE_THROW is called on the entry level
* setjmp() jmpbuf.
*
* ECMAScript function calls and coroutine resumptions are handled
* internally (by the outer executor function) without recursive C calls.
* Other function calls are handled using duk_handle_call(), increasing
* C recursion depth.
*
* Abrupt completions (= long control tranfers) are handled either
view all matches for this distribution
view release on metacpan or search on metacpan
lib/JavaScript/Embedded/C/lib/duktape.c view on Meta::CPAN
duk_pop(thr);
}
#if 0
/* This check would prevent a heap destruction time finalizer from
* launching a coroutine, which would ensure that during finalization
* 'thr' would always equal heap_thread. Normal runtime finalizers
* run with ms_running == 0, i.e. outside mark-and-sweep. See GH-2030.
*/
if (thr->heap->ms_running) {
DUK_D(DUK_DPRINT("refuse Duktape.Thread.resume() when ms_running != 0"));
lib/JavaScript/Embedded/C/lib/duktape.c view on Meta::CPAN
* we must assume that the valstack contains enough temporary space for
* arguments and such.
*
* While the error handler runs, any errors thrown will not trigger a
* recursive error handler call (this is implemented using a heap level
* flag which will "follow" through any coroutines resumed inside the
* error handler). If the error handler is not callable or throws an
* error, the resulting error replaces the original error (for Duktape
* internal errors, duk_error_throw.c further substitutes this error with
* a DoubleError which is not ideal). This would be easy to change and
* even signal to the caller.
lib/JavaScript/Embedded/C/lib/duktape.c view on Meta::CPAN
#endif
DUK_DD(DUK_DDPRINT("-> return not caught, thread terminated; handle like yield, restart execution in resumer"));
return DUK__RETHAND_RESTART;
#else
/* Without coroutine support this case should never happen. */
DUK_ERROR_INTERNAL(thr);
DUK_WO_NORETURN(return 0;);
#endif
}
lib/JavaScript/Embedded/C/lib/duktape.c view on Meta::CPAN
* leaving a single return value on top of the stack. Function calls
* and thread resumptions are handled internally. If an error occurs,
* a longjmp() with type DUK_LJ_TYPE_THROW is called on the entry level
* setjmp() jmpbuf.
*
* ECMAScript function calls and coroutine resumptions are handled
* internally (by the outer executor function) without recursive C calls.
* Other function calls are handled using duk_handle_call(), increasing
* C recursion depth.
*
* Abrupt completions (= long control tranfers) are handled either
view all matches for this distribution
view release on metacpan or search on metacpan
lib/LaTeXML/Plugin/LtxMojo/public/js/editor/examples.js view on Meta::CPAN
'\\newtheorem{example}[theorem]{Example}',
'\\newtheorem{xca}[theorem]{Exercise}',
'',
'\\theoremstyle{remark}',
'\\newtheorem{remark}[theorem]{Remark}',
'\\newtheorem{corollary}{Corollary}',
'\\newtheorem*{corollary*}{Corollary}',
'',
'\\numberwithin{equation}{section}',
'',
'\\begin{document}',
'\\title{Sample amsart}',
lib/LaTeXML/Plugin/LtxMojo/public/js/editor/examples.js view on Meta::CPAN
'Some \\text{text}',
'\\begin{equation}',
'a = \\text{something}',
'\\end{equation}',
'',
'\\begin{corollary}',
' Whatever!',
'\\end{corollary}',
'\\begin{corollary*}',
'And whatever.',
'\\end{corollary*}',
'',
'\\end{document}',
'',
'\\begin{flalign*}',
'a_{11} &= b_{11} &',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/LaTeXML/Package/OmniBus.cls.ltxml view on Meta::CPAN
\newtheorem{theorem}{Theorem}[section]
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{proof}[theorem]{Proof}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{question}[theorem]{Question}
lib/LaTeXML/Package/OmniBus.cls.ltxml view on Meta::CPAN
\newtheorem{prin}[thm]{Principle}
\newtheorem{alg}{Algorithm}
EOL
for my $env (qw(
conjecture theorem corollary definition example exercise lemma
note problem proof proposition question remark solution
thm cor lem claim axiom conj fact hypo assum prop crit defn exmp rem prob prin alg)) {
my $beginenv = "\\begin{$env}";
DefMacroI(T_CS($beginenv), undef, sub {
RequirePackage('amsthm');
view all matches for this distribution
view release on metacpan or search on metacpan
vhost/cgi-bin/templates/survey/results-feedback.html view on Meta::CPAN
</span>
</div>
<div id="content">
<div class="corona">
<b class="top"><b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b><b class="b5"></b></b>
<div class="float-right">
<h2 class="noprint">Contents:</h2>
<ul>
view all matches for this distribution
view release on metacpan or search on metacpan
hugs98-Nov2003/libraries/Hugs/ConcBase.hs view on Meta::CPAN
-- write c = putChar c >> write c
--
-- will print either "aaaaaaaaaaaaaa..." or "bbbbbbbbbbbb..."
-- instead of some random interleaving of 'a's and 'b's.
--
-- Cooperative multitasking is sufficient for writing coroutines and simple
-- graphical user interfaces but the usual assumptions of fairness don't
-- apply and Channel.getChanContents cannot be implemented.
-----------------------------------------------------------------------------
module Hugs.ConcBase(
forkIO,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Language/LispPerl/Role/BuiltIns/Coro.pm view on Meta::CPAN
use Language::LispPerl::Atom;
use Language::LispPerl::Seq;
=head1 NAME
Language::LispPerl::Role::BuiltIns::Coro - A role with coro primitives for the BuiltIns objects.
=head1 SYNOPSIS
my $lisp = Language::LispPerl::Evaler->new();
$lisp->builtins()->apply_role('Language::LispPerl::Role::BuiltIns::Coro');
.. lisp now implements the coro functions.
=head2 FUNCTIONS
To be documented. Look at the source code for now..
=cut
my $_CORO_FUNCTIONS = {
# Coro stuff
"coro" => \&_impl_coro,
"coro-suspend" => \&_impl_coro_suspend,
"coro-sleep" => \&_impl_coro_sleep,
"coro-yield" => \&_impl_coro_yield,
"coro-resume" => \&_impl_coro_resume,
"coro-wake" => \&_impl_coro_wake,
"coro-join" => \&_impl_coro_join,
"coro-current" => \&_impl_coro_current,
"coro-main" => \&_impl_coro_main,
};
around 'has_function' => sub {
my ( $orig, $self, $fname, @rest ) = @_;
lib/Language/LispPerl/Role/BuiltIns/Coro.pm view on Meta::CPAN
return $f;
}
return $self->$orig( $fname, @rest );
};
sub _impl_coro {
my ( $self, $ast, $symbol ) = @_;
$ast->error("coro expects 1 argument") if $ast->size() != 2;
my $b = $self->evaler()->_eval( $ast->second() );
$ast->error( "core expects a function as argument but got " . $b->type() )
if $b->type() ne "function";
my $coro = new Coro sub {
my $evaler = $self->evaler()->new_instance();
my $fc = Language::LispPerl::Seq->new({ type => "list" });
$fc->append($b);
$evaler->_eval($fc);
};
$coro->ready();
return Language::LispPerl::Atom->new({type => "coroutine", value => $coro });
}
sub _impl_coro_suspend {
my ( $self, $ast, $symbol ) = @_;
$ast->error("coro-suspend expects 1 argument") if $ast->size() != 2;
my $coro = $self->evaler()->_eval( $ast->second() );
$ast->error( "coro-suspend expects a coroutine as argument but got "
. $coro->type() )
if $coro->type() ne "coroutine";
$coro->value()->suspend();
return $coro;
}
sub _impl_coro_sleep {
my ( $self, $ast ) = @_;
$ast->error("coro-sleep expects 0 argument") if $ast->size != 1;
$Coro::current->suspend();
cede();
return Language::LispPerl::Atom->new({ type => "coroutine", value => $Coro::current });
}
sub _impl_coro_yield {
my ( $self, $ast ) = @_;
$ast->error("coro-yield expects 0 argument") if $ast->size() != 1;
cede;
return Language::LispPerl::Atom->new({ type => "coroutine", value => $Coro::current });
}
sub _impl_coro_resume {
my ( $self, $ast ) = @_;
$ast->error("coro-resume expects 1 argument") if $ast->size() != 2;
my $coro = $self->evaler()->_eval( $ast->second() );
$ast->error(
"coro-resume expects a coroutine as argument but got " . $coro->type() )
if $coro->type() ne "coroutine";
$coro->value()->resume();
$coro->value()->cede_to();
return $coro;
}
sub _impl_coro_wake {
my ( $self, $ast ) = @_;
$ast->error("coro-wake expects 1 argument") if $ast->size() != 2;
my $coro = $self->evaler()->_eval( $ast->second() );
$ast->error(
"coro-wake expects a coroutine as argument but got " . $coro->type() )
if $coro->type() ne "coroutine";
$coro->value()->resume();
return $coro;
}
sub _impl_coro_join {
my ( $self, $ast ) = @_;
$ast->error("join-coro expects 1 argument") if $ast->size() != 2;
my $coro = $self->evaler()->_eval( $ast->second() );
$ast->error(
"join-coro expects a coroutine as argument but got " . $coro->type() )
if $coro->type() ne "coroutine";
$coro->value()->join();
return $coro;
}
sub _impl_coro_current {
my ( $self, $ast ) = @_;
$ast->error("coro-current expects 0 argument") if $ast->size() != 1;
return Language::LispPerl::Atom->new({ type => "coroutine", value => $Coro::current });
}
sub _impl_coro_main {
my ( $self, $ast ) = @_;
$ast->error("coro-main expects 0 argument") if $ast->size() != 1;
return Language::LispPerl::Atom->new({ type => "coroutine", value => $Coro::main });
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
etc/walden.txt view on Meta::CPAN
and had clarified its waters and colored them of the hue they now
wear, and obtained a patent of Heaven to be the only Walden Pond in
the world and distiller of celestial dews. Who knows in how many
unremembered nations' literatures this has been the Castalian
Fountain? or what nymphs presided over it in the Golden Age? It is a
gem of the first water which Concord wears in her coronet.
Yet perchance the first who came to this well have left some trace
of their footsteps. I have been surprised to detect encircling the
pond, even where a thick wood has just been cut down on the shore, a
narrow shelf-like path in the steep hillside, alternately rising and
view all matches for this distribution