Skip to content

Instantly share code, notes, and snippets.

View quintesse's full-sized avatar

Tako Schotanus quintesse

  • RedHat
  • Madrid, Spain
View GitHub Profile
//$webrun_full_script
import ceylon.language.meta.declaration {
ValueDeclaration
}
shared void run() {
for (dec in `class String`.memberDeclarations<ValueDeclaration>()) {
print(dec);
}
}
final Options opts = new Options().addRepo("build/runtime").outRepo("build/test/proto");
final RepositoryManager repoman = CeylonUtils.repoManager()
.cwd(opts.getCwd())
.systemRepo(opts.getSystemRepo())
.userRepos(opts.getRepos())
.outRepo(opts.getOutRepo())
.buildManager();
JsModuleManagerFactory.setVerbose(true);
TypeCheckerBuilder tcb = new TypeCheckerBuilder().verbose(false)
.moduleManagerFactory(new JsModuleManagerFactory(null))
TypeCheckerBuilder tcb = new TypeCheckerBuilder();
for (File path: this.sourceFolders) {
tcb.addSrcDirectory(applyCwd(path));
}
TypeChecker tc = tcb.getTypeChecker();
PhasedUnits pus = tc.getPhasedUnits();
pus.visitModules();
@quintesse
quintesse / module.ceylon
Last active August 29, 2015 14:07
A test script for the Ceylon web runner: http://try.ceylon-lang.org/
module web_ide_script "1.0.0" {
}
@echo off
setlocal EnableDelayedExpansion
set LF=^
REM Two empty lines are necessary
set "USAGE=[OPTION]... ( FILE [--and FILE]... [--to FILE] )..."
set "DESCRIPTION=format Ceylon source code"
set "LONG_USAGE= ceylon run ceylon.formatter source!LF!"
@quintesse
quintesse / destruct.ceylon
Last active September 2, 2015 00:40
Ceylon Web Runner: Destructuring examples
void tupleVar([Integer, Float, String] tuple) {
value [i1, f1, s1] = tuple;
value [i2, Float f2, s2] = tuple;
value [Integer i3, Float f3, String s3] = tuple;
}
void tupleLiteral() {
value [i1, f1, s1] = [0, 1.0, "foo"];
value [i2, Float f2, s2] = [0, 1.0, "foo"];
value [Integer i3, Float f3, String s3] = [0, 1.0, "foo"];
osgi-p2:
[mkdir] Created dir: /home/ceylon/ceylon/ceylon-dist/osgi/build/dist/features
generateFeatures:
[mkdir] Created dir: /home/ceylon/ceylon/ceylon-dist/osgi/build/dist/features/com.redhat.ceylon.dist.feature_1.1.1.v20150108-2102
[xslt] Processing /home/ceylon/ceylon/ceylon-dist/osgi/build/dist/repository.xml to /home/ceylon/ceylon/ceylon-dist/osgi/build/dist/features/com.redhat.ceylon.dist.feature_1.1.1.v20150108-2102/feature.xml
[xslt] Loading stylesheet /home/ceylon/ceylon/ceylon-dist/osgi/p2/generateDistributionFeature.xsl
[xslt] Warning: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.
[xslt] Warning: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
@quintesse
quintesse / errors1
Created January 29, 2015 20:49
IDE errors "com.redhat.ceylon.eclipse.ui.ceylon" project
Description Resource Path Location Type
Some classes are missing from the generated module archives, probably because of an error in the Java backend compilation.
The detail of missing classes is given in the Information markers. com.redhat.ceylon.eclipse.ui.ceylon Unknown Ceylon Backend Error
expression has type 'Nothing' createPhasedUnit.ceylon /com.redhat.ceylon.eclipse.ui.ceylon/source/test/com/redhat/ceylon/eclipse/ui/ceylon/model/delta line 62 Ceylon Backend Error
expression has type 'Nothing' createPhasedUnit.ceylon /com.redhat.ceylon.eclipse.ui.ceylon/source/test/com/redhat/ceylon/eclipse/ui/ceylon/model/delta line 63 Ceylon Backend Error
expression has type 'Nothing' deltaMockups.ceylon /com.redhat.ceylon.eclipse.ui.ceylon/source/test/com/redhat/ceylon/eclipse/ui/ceylon/model/delta line 3 Ceylon Backend Error
expression has type 'Nothing' deltaMockups.ceylon /com.redhat.ceylon.eclipse.ui.ceylon/source/test/com/redhat/ceylon/eclipse/ui/ceylon/model/delta line 11 Ceylon Backend Error
expression has ty
@quintesse
quintesse / ormerod_autolevel_calibration
Last active August 29, 2015 14:15
Ormerod Bed Levelling calibration procedure
1. Send M561 then M556 S100 X0 Y0 Z0. This resets any bed plane and orthogonal axis compensation.
2. Move the X axis so that the proximity probe is over the tag closest to X0 Y0. This is usually around X55 Y0 (you can use G1 X55 Y0 to go there).
3. Move the Z axis down so the nozzle just touches the bed (Use a piece of paper, move it down 0.1mm at a time, until it traps the paper. Then move it down 0.1mm more.)
4. Send G92 Z0. This sets the current Z position to 0, for reference.
5. Move the Z axis up 2mm. Send G31. The response will most likely be higher than 600.
6. Move the Z axis up 0.1mm. Send G31.
7. Repeat the above until G31 reports a value of just below 600
8. Send M114, and note the Z height.
9. Send G31 Z[zzz] P[ppp], where [zzz] is the height of Z from the M114 command, and [ppp] is the value reported by the last G31 command, for EXAMPLE G31 Z2.5 P598
@quintesse
quintesse / keybase.md
Created February 27, 2015 22:50
Proof of my identity via keybase

Keybase proof

I hereby claim:

  • I am quintesse on github.
  • I am quintesse (https://keybase.io/quintesse) on keybase.
  • I have a public key whose fingerprint is D59E 542D F796 8F9B 35AC FBD9 AD18 C845 746F F7AA

To claim this, I am signing this object: