Skip to content

Instantly share code, notes, and snippets.

View oscarryz's full-sized avatar

Oscar Reyes oscarryz

View GitHub Profile
@oscarryz
oscarryz / gist:882711
Created March 23, 2011 06:41
Currently possible in Ryz
import ( java.util.Scanner )
main.App {
main() {
out.print("Como te llamas? ")
a : String = Scanner( System.in ).nextLine()
out.printf("Hola %s %n ", a )
}
}
@oscarryz
oscarryz / gist:908324
Created April 7, 2011 17:57
Inline code block
blocks.IfTrueInline {
main() {
value = true
value.ifTrue((){
out.println("Yeap!, still true")
})
}
}
// Estoy por convertir
1 .+( 1 )
// En
+(1,1)
//Como aparece en: http://goo.gl/MZU5e
//O más bien dicho
@oscarryz
oscarryz / gist:977177
Created May 17, 2011 19:25
Long time waited feature ( this is Ryz not Ruby )
testNull() {
a = null
a . isNull? ( {
out.println("a is null")
})
}
@oscarryz
oscarryz / gist:988144
Created May 24, 2011 04:32
Hoy fue un buen día. Ya tengo parametros en los blocks! ( me falta tipo de retorno )
list.each( ( name : String ) {
out.println( name )
})
@oscarryz
oscarryz / _.java
Created May 25, 2011 07:14
Reference wrapper to avoid T[] pattern.
class _<__> {
public __ _;
public _(__ __) {
_ = __;
}
public static void main( String ... args ) {
_<String> s = new _<String>("Hola");
s._ = "Adios";
System.out.println( s._ );
}
find test-samples/ -name "*.ryz" -exec echo \{\} \; -exec cat \{\} \; > s
@oscarryz
oscarryz / gist:999815
Created May 31, 2011 03:23
Recortes.ryz
//;# http://java.sun.com/developer/technicalArticles/GUI/translucent_shaped_windows/
recortes {
AWTUtilitiesWrapper {
import( java.awt.GraphicsConfiguration )
import( java.awt.Shape )
import( java.awt.Window )
import( java.lang.reflect.InvocationTargetException )
@oscarryz
oscarryz / gist:1001783
Created June 1, 2011 04:26
Te imaginas?
//;http://fxexperience.com/2011/05/maps-in-javafx-2-0/
import ( javafx.application.Application )
import ( javafx.scene.Scene )
import ( javafx.scene.paint.Color )
import ( javafx.scene.web.WebEngine )
import ( javafx.scene.web.WebView )
import ( javafx.stage.Stage )
fxdemo.WebMap : Application {
start( stage: Stage ) {
Compare:
"This is the %d time we talk about %s ".%( 2, "dinner" )
To:
String.format("This is the %d time we talk about %s ", 2, "dinner");
The former is more OO ( imho of course )