B-C

 view release on metacpan or  search on metacpan

.gdb/dashboard  view on Meta::CPAN

    else:
        return ansi(divider_fill_char * width, divider_fill_style)

def check_gt_zero(x):
    return x > 0

def check_ge_zero(x):
    return x >= 0

def to_unsigned(value, size=8):
    # values from GDB can be used transparently but are not suitable for
    # being printed as unsigned integers, so a conversion is needed
    return int(value.cast(gdb.Value(0).type)) % (2 ** (size * 8))

def format_address(address):
    return '0x{:016x}'.format(address)

# Dashboard --------------------------------------------------------------------

class Dashboard(gdb.Command):
    """Redisplay the dashboard."""

.gdb/dashboard  view on Meta::CPAN

                module.enabled = False
            # move and enable the selected modules on top
            last = 0
            n_enabled = 0
            for directive in directives:
                # parse next directive
                enabled = (directive[0] != '!')
                name = directive[not enabled:]
                try:
                    # it may actually start from last, but in this way repeated
                    # modules can be handler transparently and without error
                    todo = enumerate(modules[last:], start=last)
                    index = next(i for i, m in todo if name == m.name)
                    modules[index].enabled = enabled
                    modules.insert(last, modules.pop(index))
                    last += 1
                    n_enabled += enabled
                except StopIteration:
                    def find_module(x):
                        return x.name == name
                    first_part = modules[:last]

ramblings/remark.js  view on Meta::CPAN

require=function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t)...
this.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[this.BACKSLASH_ESCAPE]};this.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such)...
SUBST.contains=EXPRESSIONS;return{aliases:["coffee","cson","iced"],keywords:KEYWORDS,contains:EXPRESSIONS.concat([{className:"comment",begin:"###",end:"###"},hljs.HASH_COMMENT_MODE,{className:"function",begin:"("+JS_IDENT_RE+"\\s*=\\s*)?(\\(.*\\))?\\...
}()},{}],8:[function(require,module,exports){exports.addClass=function(element,className){element.className=exports.getClasses(element).concat([className]).join(" ")};exports.removeClass=function(element,className){element.className=exports.getClasse...
events.on("slideChanged",updateHash);navigateByHash()}function navigateByHash(){var slideNoOrName=(dom.getLocationHash()||"").substr(1);events.emit("gotoSlide",slideNoOrName)}function updateHash(slideNoOrName){dom.setLocationHash("#"+slideNoOrName)}}...

ramblings/rperl.md  view on Meta::CPAN

B::C can do int and num and accepts str.
rperl requires also object and void, and can already do aggregate types, like arrayrefs and hashrefs of those types.
perl6 adds bool, some more numbers and intermediate and meta object types, which we dont need yet.
What needs to be added are sized array declarations to be able to omit run-time bounds checks, but this should be trivial.

rperl already offers compile-time or run-time type-checks and compile-time type optimizations.

How to interface?

Inline is not easy to interface with, notoriously hard to debug, and has several unmaintained bugs and omissions.
But it's the best and most transparent way, and the only way to mix perl and rperl code on the source level.
The biggest bug is the notorious "namespace hack", i.e. the stashes for the generated functions and data are missing.
Also argument passing has some serious limitations. Will is using a really crazy hack right now in rperl to push
arrayrefs and hashref arguments properly onto the stack, the inline stack macros are too simple, they only work for
trivial examples. Inline::CPP does not properly support passing plain arrays and hashes to and from perl5 code, so now rperl uses just scalar types, esp. arrayrefs and hashrefs.
We will need to look into lifting those limitations.

Methods

Methods and subroutines need to be seperated at compile-time for rperl/Inline:CPP. In the old days there was a :method attribute idea, which is not compile-time accessible, only at run-time. And there were Devel::Declare based hacks to support class ...
In rperl method types are done via special type names, to denote the return type and if it's a method or normal subroutine.



( run in 0.584 second using v1.01-cache-2.11-cpan-a1d94b6210f )