Several implementations of java.lang.Short at the time of this writing:
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
| extern crate libc; | |
| use libc::{c_ulong, c_int, c_char}; | |
| use std::ffi::{CString}; | |
| #[allow(non_camel_case_types)] | |
| pub type c_bool = ::libc::c_uchar; | |
| pub type Chtype = c_ulong; | |
| pub type Window = *mut i8; | |
| pub type CharP = *const c_char; |
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
| package main | |
| import ( | |
| "encoding/json" | |
| "errors" | |
| "fmt" | |
| "go/ast" | |
| "go/importer" | |
| "go/parser" | |
| "go/token" |
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 scala.annotation.tailrec | |
| object PgUtil { | |
| def parseHstore(str: String): Map[String, String] = { | |
| // Find next key or value piece; Expects str to be trimmed | |
| def nextPiece(str: String): (Option[String], String) = if (str.isEmpty) None -> str else { | |
| if (str.charAt(0) != '"') { | |
| // Run until the next non key char or the end | |
| str.indexWhere(c => c.isWhitespace || c == '=' || c == ',') match { |
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
| package rt | |
| import ( | |
| "math" | |
| "sync" | |
| ) | |
| type Java__lang__String__Static struct { | |
| CASE_INSENSITIVE_ORDER Java__util__Comparator__Instance | |
| COMPACT_STRINGS bool |
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
| package dht | |
| import ( | |
| "container/heap" | |
| "fmt" | |
| "math/big" | |
| "net" | |
| "sync" | |
| ) |
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
| package onion | |
| import ( | |
| "context" | |
| "crypto/rand" | |
| "fmt" | |
| "github.com/cretz/deaf9/common" | |
| "github.com/cretz/deaf9/util" | |
| "math/big" | |
| "net" |
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
| INFO[0000] Creating 500 users | |
| INFO[0000] Created new user: Peer(id=3e5c2e5362, addr=[::]:60081) user=0 | |
| INFO[0000] Created new user: Peer(id=c4ae56d6da, addr=[::]:60082) user=1 | |
| INFO[0000] Created new user: Peer(id=04e02cbdcf, addr=[::]:60083) user=2 | |
| INFO[0000] Created new user: Peer(id=ae4f05f11c, addr=[::]:60084) user=3 | |
| INFO[0000] Created new user: Peer(id=4b7d2a6b3f, addr=[::]:60085) user=4 | |
| INFO[0000] Created new user: Peer(id=839c86c5b0, addr=[::]:60086) user=5 | |
| INFO[0000] Created new user: Peer(id=c3171ad443, addr=[::]:60087) user=6 | |
| INFO[0000] Created new user: Peer(id=77c3cc8abf, addr=[::]:60088) user=7 | |
| INFO[0000] Created new user: Peer(id=47afc10f19, addr=[::]:60089) user=8 |
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
| package asmble.ast | |
| import asmble.util.Either | |
| sealed class SExpr { | |
| data class Multi(val vals: List<SExpr> = emptyList()) : SExpr() | |
| data class Symbol(val contents: String = "", val quoted: Boolean = false) : SExpr() | |
| companion object { | |
| data class ParseError(val charOffset: Int, val msg: String) |
These are things that I found annoying writing a complex library in Kotlin. While I am also a Scala developer, these should not necessarily be juxtaposed w/ Scala (even if I reference Scala) as some of my annoyances are with features that Scala doesn't even have. This is also not trying to be opinionated on whether Kotlin is good/bad (for the record, I think it's good). I have numbered them for easy reference. I can give examples for anything I am talking about below upon request. I'm sure there are good reasons for all of them.