I hereby claim:
- I am renatoathaydes on github.
- I am renatoathaydes (https://keybase.io/renatoathaydes) on keybase.
- I have a public key ASD6izZl-Pe5lHzlFdjcZS6HjOG_pPWAkvLfZvAEo2Q9xwo
To claim this, I am signing this object:
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>CheerpJ test</title> | |
<script src="https://cjrtnc.leaningtech.com/1.3/loader.js"></script> | |
</head> | |
<body> | |
</body> | |
<script> |
use col = "collections" | |
use fmt = "format" | |
type Error is String | |
type Result is (F64 | Error) | |
type MaybeArray is (Array[F64] iso | Error val) | |
interface ReceiveUV | |
be receive(m: MaybeArray, a: Array[F64] iso) |
<div id="errors" style=" | |
background: #c00; | |
color: #fff; | |
display: none; | |
margin: -20px -20px 20px; | |
padding: 20px; | |
white-space: pre-wrap; | |
"></div> | |
<div id="root"></div> | |
<script> |
// This is a comparison between Scala and Ceylon based on this previous comparison I made between Haskell and Groovy: | |
// https://gist.github.com/renatoathaydes/5078535 | |
// Ex 1. If we have two lists, [2,5,10] and [8,10,11] and we want to get the products of all the possible | |
// combinations between numbers in those lists, here's what we'd do. | |
/* SCALA */ | |
for { x <- List(2,5,10); y <- List(8,10,11) } yield x*y |
/* | |
* HTTPClient usage circa version 5.0-beta. | |
*/ | |
package org.apache.hc.core5.http.examples; | |
import java.io.ByteArrayInputStream; | |
import java.nio.charset.StandardCharsets; | |
import java.util.concurrent.TimeUnit; |
// more config options at http://hc.apache.org/httpcomponents-asyncclient-4.0.x/httpasyncclient/examples/org/apache/http/examples/nio/client/AsyncClientConfiguration.java | |
public RequestRunner provideRequestRunner( ComponentContext context, URI pageUri, Iterable<URI> assetUris ) | |
throws IOException | |
{ | |
try | |
{ | |
IOReactorConfig ioReactorConfig = IOReactorConfig.custom() | |
.setIoThreadCount( Runtime.getRuntime().availableProcessors() ) | |
.setConnectTimeout( 30_000 ) |
I hereby claim:
To claim this, I am signing this object:
import groovy.io.FileType | |
import groovy.util.slurpersupport.GPathResult | |
import groovy.xml.XmlUtil | |
def intellijFileVisitor = { File intellijFile -> | |
def groovyDir = new File(intellijFile.parentFile, 'src/test/groovy') | |
if (groovyDir.isDirectory() && groovyDir.list()?.size() > 0) { | |
def module = new XmlSlurper().parse(intellijFile) | |
GPathResult sources = module.component.content.sourceFolder | |
def groovySources = sources.any { it.@url == 'file://$MODULE_DIR$/src/test/groovy' } |
package com.athaydes.automaton.internal; | |
import org.hamcrest.Description; | |
import org.hamcrest.Factory; | |
import org.hamcrest.Matcher; | |
import org.junit.internal.matchers.TypeSafeMatcher; | |
/** | |
* User: Renato | |
*/ |
"A read-only property." | |
shared interface Property<out Prop> { | |
"Gets the value of this property." | |
shared formal Prop get; | |
"On change of the value of this property, the given function will be invoked." | |
shared formal void onChange(Anything(Prop) runOnChange); | |
} |