This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In S05, is there a way to "expand" a rule within another? | |
Example, <=v> whould expand the productions of v within a | |
rule so that | |
token t { <=v> | <d> } | |
token v { <a> | <b> | <c> } | |
Compared to C<< <=v> >>, C<< <=v> would | |
would avoid an additional level in the parse tree, that would | |
be equivalent to : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun shell-to-current-directory () | |
"go to '*shell*' and cd it to current directory of current buffer" | |
(interactive "") | |
(let pwd default-directory) | |
(switch-to-buffer "*shell*") | |
(end-of-buffer) | |
(insert pwd) | |
(comint-send-input) | |
)(defun shell-to-current-directory () | |
"go to '*shell*' and cd it to current directory of current buffer" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head2 conditional dereference | |
A conditional dereference is a pattern matching and data structure | |
walking at once that blends well with laziness and functional | |
programming. A conditional dereference expression is denoted by | |
prefixing a dereference circumfix with either a C<?>, a C<??> or | |
C<?=>. When the dereference value does not exist the statement is | |
silently aborted if the prefix is C<?> or throws an exception if the | |
prefix is C<??>. In case of a silent abortion the flow proceeds | |
directly to the next statement, but if the conditional dereference |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head2 conditional dereference | |
A conditional dereference is a pattern matching and data structure | |
walking at once that blends well with laziness and functional | |
programming. | |
Conditional dereference are special dereference operators that work | |
as their not conditional counterpart if the dereference value des not | |
exist. Otherwise, the C<<< postcircumfix:<< < >! >> >>>, operator | |
thows an exception and the C<<< postcircumfix:<< < >? >> >>> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
# Null PMC access in type() | |
# in Main (file src/gen_setting.pm, line 295) | |
class SVG { | |
our subset Attr of Pair where { $_.value !~~ Array }; | |
our subset Element of Pair where { $_.value ~~ Array }; | |
our subset Text_node of Str; | |
our subset Node where Text_node | Element; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Cursor | |
constructor: (dadDiv) -> | |
dadDiv.append $ "<div class='cursor'></div>" | |
@visible = false | |
toggle : -> | |
cursor.style.visibility = | |
if @visible = !@visible then 'visible' else 'hidden' | |
setTimeout toggle, 500 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
opts = [ | |
{ name: 'lexfile', | |
position: 1, | |
help: 'Lexical grammar file (optional)' | |
}, | |
{ name: 'outfile', | |
string: '-o FILE, --output-file=FILE', | |
help: 'Filename and base module name of the generated parser' | |
} | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_ = require 'underscore' | |
fs = require 'fs' | |
fnm = 'registry.json' | |
json = JSON.parse fs.readFileSync fnm, 'utf8' | |
console.log (_.keys json).length |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env coffee | |
fs = require 'fs' | |
spawn = (require 'child_process').spawn | |
log = console.log | |
data = fs.readFileSync '.git/FETCH_HEAD', 'utf8' | |
for ln in data.split /\n/ | |
match = /(.{40}).*?branch '(.*)'/.exec ln | |
continue unless match |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[17:44] cognominal: ryah, in child_process.js, setupChannel uses ascii as encoding, why not utf8? | |
[17:44] ryah: why utf8? | |
[17:44] Aikar: cognominal: he just responded to the commit about that | |
[17:45] cognominal: in Europe, we use plenty of characters that don't fit in ascii | |
[17:45] ryah: this is an american project | |
[17:45] Aikar: lolz | |
[17:45] ryah: so... sorry | |
[17:46] tjholowaychuk: america fuck yeah | |
[17:46] MooGoo: yea fuck those off brand characters | |
[17:46] Bonuspunkt: ^^ <3 |
OlderNewer