Skip to content

Instantly share code, notes, and snippets.

View pvorb's full-sized avatar
🏠
Working from home

Paul Vorbach pvorb

🏠
Working from home
View GitHub Profile
@non
non / answer.md
Last active January 9, 2024 22:06
answer @nuttycom

What is the appeal of dynamically-typed languages?

Kris Nuttycombe asks:

I genuinely wish I understood the appeal of unityped languages better. Can someone who really knows both well-typed and unityped explain?

I think the terms well-typed and unityped are a bit of question-begging here (you might as well say good-typed versus bad-typed), so instead I will say statically-typed and dynamically-typed.

I'm going to approach this article using Scala to stand-in for static typing and Python for dynamic typing. I feel like I am credibly proficient both languages: I don't currently write a lot of Python, but I still have affection for the language, and have probably written hundreds of thousands of lines of Python code over the years.

import scala.collection.mutable.ListBuffer
class Ummutable[T] private (buf: ListBuffer[T]) {
def this(xs: T*) = this(ListBuffer() ++= xs)
def append(ys: T*): this.type = { buf ++= ys ; this }
final val xs: List[T] = buf.toIterable match { case xs: List[T] => xs }
override def toString = s"Ummutable(xs = ${xs mkString ", "})"
}
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 27, 2024 06:36
A badass list of frontend development resources I collected over time.
@viktorklang
viktorklang / InterruptibleCancellableFuture.scala
Last active June 1, 2020 13:45
Interruptible-Cancellable-scala.concurrent.Future
/*
Copyright 2018 Viktor Klang
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@huynhjl
huynhjl / play_cygwin.patch
Created June 16, 2012 03:52
Patch for play and framework/build to run under cygwin and mingw32
diff -r --unified play-2.0-orig/framework/build play-2.0-cygwin/framework/build
--- play-2.0-orig/framework/build 2012-03-12 20:25:28.000000000 -0700
+++ play-2.0-cygwin/framework/build 2012-06-15 17:56:57.436000000 -0700
@@ -8,4 +8,4 @@
DEBUG_PARAM="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${JPDA_PORT}"
fi
-java ${DEBUG_PARAM} -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -Dfile.encoding=UTF8 -Dplay.version="${PLAY_VERSION}" -Dsbt.ivy.home=`dirname $0`/../repository -Dplay.home=`dirname $0` -Dsbt.boot.properties=`dirname $0`/sbt/sbt.boot.properties -jar `dirname $0`/sbt/sbt-launch.jar "$@"
\ No newline at end of file
+java ${DEBUG_PARAM} -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -Dfile.encoding=UTF8 -Dplay.version="${PLAY_VERSION}" -Dsbt.ivy.home=`dirname $0`/../repository -Dplay.home=`dirname $0` -Dsbt.boot.properties=$BOOTPROP`dirname $0`/sbt/sbt.boot.properties -jar `dirname $0`/sbt/sbt-launch.jar "$@"
@ziadoz
ziadoz / awesome-php.md
Last active April 17, 2024 21:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@billywhizz
billywhizz / bufftest.js
Created December 3, 2011 18:25
testing buffer write performance
Buffer.prototype.xwriteUInt8 = function(value, offset) {
this[offset] = value & 0xff;
}
Buffer.prototype.xwriteUInt16BE = function(value, offset) {
this[offset++] = (value >>> 8) & 0xff;
this[offset] = value & 0xff;
}
Buffer.prototype.xwriteUInt32BE = function(value, offset) {
@pvorb
pvorb / backup.sh
Created July 28, 2011 08:53
Backup script
#!/bin/bash
# Sichert die Dateien auf host
DIR="tmp"
if [ -d $DIR ]; then
cd $DIR
else
mkdir $DIR
cd $DIR
@bellbind
bellbind / HOWTO.md
Created June 12, 2011 06:24
[scala][msys]patch for support to launch scala command on msys