Skip to content

Instantly share code, notes, and snippets.

View lucaswerkmeister's full-sized avatar

Lucas Werkmeister lucaswerkmeister

View GitHub Profile
@lucaswerkmeister
lucaswerkmeister / createIssues.js
Last active August 29, 2015 13:55
JS script to create Ceylon OBR "multiplexer" issues
var repoNames = [
"ceylon/ceylon-spec",
"ceylon/ceylon-compiler",
"ceylon/ceylon-js",
"ceylon/ceylon-dist",
"ceylon/ceylon.language",
"ceylon/ceylon-runtime",
"ceylon/ceylon-common",
"ceylon/ceylon-module-resolver"
];
@lucaswerkmeister
lucaswerkmeister / AssertionError.md
Created February 25, 2014 23:59
Ceylon bug report stacktraces
!SESSION 2014-03-08 22:58:32.090 -----------------------------------------------
eclipse.buildId=4.3.2.M20140221-1700
java.version=1.7.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -data /home/lucas/ceylon-ide-eclipse -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.core.resources 4 2 2014-03-08 23:01:47.401
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".
!STACK 0
@noanno Anything myConcatenate({String*}* iterables) => nothing;
@noanno [String]|[String,String] oneOrTwo(String element) => nothing;
@noanno Anything v = myConcatenate(*[""].map(oneOrTwo));
@noanno void do() {
@noanno {String+} following = {"a"}.following("a");
}
#!/bin/bash
cd /tmp
ceylon new hello-world --module-name=tmp --module-version=1.0.0 --ant=false --eclipse=false "ceylon.language#429"
cd "ceylon.language#429"
cat > source/tmp/run.ceylon << EOF
import ceylon.file { Visitor }
void f() {
object w extends Visitor() {}
}

java.lang.NullPointerException at com.redhat.ceylon.compiler.loader.AbstractModelLoader.getCacheKeyByModule(AbstractModelLoader.java:366) at com.redhat.ceylon.compiler.loader.impl.reflect.mirror.ReflectionClass.getCacheKey(ReflectionClass.java:291) at com.redhat.ceylon.compiler.loader.AbstractModelLoader.getOrCreateDeclaration(AbstractModelLoader.java:926) at com.redhat.ceylon.compiler.loader.AbstractModelLoader.convertToDeclaration([AbstractModelLoader.java:565](https://github.com/ceylon/ceylon-compiler/blob/1519950c67c9

@lucaswerkmeister
lucaswerkmeister / hashes.sh
Created April 11, 2014 19:36
Script to find mentions of git commit hashes in commit messages or diffs
(
commits=($(git log --pretty='format:%h' -S'\b[a-f0-9]{7,}\b' --pickaxe-{all,regex}));
commits+=($(git log --pretty='format:%h' --grep='\b[a-f0-9]\{7,\}\b'));
for commit in ${commits[*]}; do
for shaish in $(git show $commit | tail -n+5 | grep -v '^index' | grep -oe '[a-f0-9]\{7,\}'); do
if git rev-list HEAD.."$shaish" &> /dev/null; then
echo $shaish;
fi
done
done

Goals

Create a ceylon.ast module

This will allow to use Ceylon’s named arguments to create a Ceylon AST. For example:

value actions = {
void run() {
// print("`` `module tmp`.name ``/`` `module tmp`.version ``");
print("```module tmp`.name``/```module tmp`.version``");
// print("`` `module tmp` ```` `module tmp` ``");
print("```module tmp``````module tmp```");
}