This file contains hidden or 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
const array = [0,1,2,3,4,5,6]; | |
array.shift(); | |
array.shift(); | |
array.shift(); | |
array[3] = '_set_'; | |
array[10] = '_set_'; | |
console.log('atpos', array.map(x => x.toString()).join(',')); |
This file contains hidden or 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
async function bottom() { | |
console.log('in bottom'); | |
const stack = new Error().stack; | |
console.log('stack:', '<<<' + stack + '>>>'); | |
console.log(typeof stack); | |
console.trace('stack trace'); | |
} | |
async function middle() { | |
await bottom(); |
This file contains hidden or 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
Q::Block.new(Q::Statement::Expr.new(Q::Postfix::Call.new( | |
Q::Identifier.new("say"), | |
Q::Literal::Str.new("OH HAI") | |
))); | |
block { | |
expr { | |
call { | |
identifier "say"; | |
str "OH HAI"; |
This file contains hidden or 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
my $precompiled_tests = 't/precompiled'.IO; | |
mkdir($precompiled_tests); | |
for @*ARGS.map(*.IO) -> $file { | |
my $name-part = $file.relative($file.parent.parent).IO; | |
my $module = $file.basename.IO.extension('', :parts(0..*)); | |
if ($module ~~ /^\d/) { | |
$module = 'module_' ~ $module.Str; |
This file contains hidden or 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
Time: <span id="clockDisplay"></span> |
This file contains hidden or 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
for 99...1 -> $bottles { | |
sing $bottles, :wall; | |
sing $bottles; | |
say "Take one down, pass it around"; | |
sing $bottles - 1, :wall; | |
say ""; | |
} | |
#| Prints a verse about a certain number of beers, possibly on a wall. | |
sub sing( |
This file contains hidden or 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
# Empty list sorts to the empty list | |
multi quicksort([]) { () } | |
# Otherwise, extract first item as pivot... | |
multi quicksort([$pivot, *@rest]) { | |
# Partition. | |
my $before := @rest.grep(* before $pivot); | |
my $after := @rest.grep(* !before $pivot); | |
# Sort the partitions. |
This file contains hidden or 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
say("Hello World"); |
This file contains hidden or 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
void main() { | |
print('Hello, World!'); | |
} |
This file contains hidden or 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
Build on Server(pid: 6196, port: 42749) | |
classlist: 175.64 ms | |
(cap): 787.16 ms | |
setup: 999.88 ms | |
analysis: 4,829.95 ms | |
error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Detected a started Thread in the image heap. This is not supported. The object was reached from a static initializer. All static class initialization is done during native image construction, thus a static initializer cannot contain code that captures state dependent on the build machine. Write your own initialization methods and call them explicitly from your main entry point. | |
Detailed message: | |
Error: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Detected a started Thread in the image heap. This is not supported. The object was reached from a static initializer. All static class initialization is done during native image construction, thus a static initializer cannot contain code that captures state dependent on the build machine. Write your own initialization metho |