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
diff --git a/src/wren_compiler.c b/src/wren_compiler.c | |
index cbb9ca6..83420f1 100644 | |
--- a/src/wren_compiler.c | |
+++ b/src/wren_compiler.c | |
@@ -1600,6 +1600,24 @@ void block(Compiler* compiler) | |
emit(compiler, CODE_POP); | |
} | |
+// Defines a default constructor method with an empty body. | |
+static void defaultConstructor(Compiler* compiler) |
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
I downloaded the most recent versions of every package on pub a few weeks ago. | |
Then I ran cloc on them. Here's the stats: | |
packages: 558 | |
.dart files: 9,519 | |
comment lines: 215,179 | |
blank lines: 279,407 | |
code lines: 1,028,710 | |
total: 1,523,296 |
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
#include <stdlib.h> | |
#include <time.h> | |
// This tests a simulated game loop with a bunch of different memory | |
// configurations. You have a bunch of actors. Each actor has a few components. | |
// Each frame every component for every actor is updated. Except for "wrong | |
// order", all components of the same "type" are update for each actor. | |
// In other words, it updates component #1 for every actor, then component #2, | |
// etc. | |
// |
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
// This is a Dart solution to: | |
// | |
// Nick Parlante's "Great Tree-List Recursion Problem" | |
// http://cslibrary.stanford.edu/109/TreeListRecursion.html | |
// | |
// Before you read the code here, try to solve it youself first! | |
main() { | |
var tree = makeTree(100); | |
printTree(tree); |
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
#1 JavaScript | |
#2 Ruby | |
#3 Java | |
#4 Shell | |
#5 Python | |
#6 PHP | |
#7 C | |
#8 C++ | |
#9 Perl | |
#10 CoffeeScript |
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
#1 JavaScript | |
#2 Ruby | |
#3 Java | |
#4 Shell | |
#5 Python | |
#6 PHP | |
#7 C | |
#8 C++ | |
#9 Perl | |
#10 CoffeeScript |
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
Ingredients: | |
- 5-6 tilapia fillets, cut in half lengthwise | |
- 1 cup flour, plus more for dredging | |
- 2 tsp salt (maybe a bit more) | |
- 2 tsp garlic powder | |
- 2 tsp onion powder | |
- 2 tsp black pepper | |
- 1 tbsp paprika | |
- dash cayenne |
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
import 'dart:io'; | |
const MAX_ATTEMPTS = 10000; | |
const MAX_JOBS = 20; | |
var total = 0; | |
var numRunning = 0; | |
main() { | |
for (var i = 0; i < MAX_JOBS; i++) spawnProc(); |
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
class Graph { | |
num nodesNumber; | |
List<List<num>> edges; | |
Graph(this.nodesNumber, List<List<num>> edges) { | |
this.edges = new Iterable.generate(nodesNumber, | |
(_) => new List.fixedLength(nodesNumber)).toList(); | |
for (var e in edges) edge(e[0], e[1], e[2]); | |
} |
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
name: your_awesome_app | |
dependencies: | |
git: /home/daw/myLib # Or whatever the path to myLib is |