Fast JSON in Scala 3 with Typeclass Derivation :: Feb 15, 2021
In Scala.js, we cannot just write
Vendetta against Java Streams :: Jan 11, 2020
I like Java Streams as much as the next guy, but I can’t say that my experience using them has been all sunny. Here’s the long list of problems I’ve had with Streams during the last few years I’ve used them:
Fast Universal Hashing in Java :: Jan 11, 2020
Every Java Object has a
hashCode, but often many are required. This is Universal Hashing, and tools like Bloom Filters, Count-Min-Sketch, Minimal Perfect Hashing, and other probabilistic datastructures need it to be fast. Some people use a specially designed function like FNV or Murmur, but there is a cleaner (and faster) way with just
Parallelism with Java Streams and CountedCompleter :: Dec 28, 2019
Parallel processing is an optimization. So if a problem demands parallelization, you should make sure the computational model is as performant as possible.
Build OpenJDK for a Nice Speedup :: Nov 2, 2019
Just-in-time compilation (JIT) is a beautiful thing, and Java leads the industry. But unlike C2, which compiles your class files with optimizations for a particular OS (mac), ISA (x86_64), and Architecture (Intel Broadwell), JVM distributions themselves are compiled only for OS and ISA. This enables portability while reducing the number of build combinations for vendors.
*Really* Small Java Apps :: Mar 4, 2019
Since bundling apps and runtime is the new best-practice (whether with Docker or jpackage), and the full JVM weighs in at hundreds of megabytes, how can we include only the minimal JVM subset our application requires? This post explores 4 complementary ways:
Scripting in Java :: Sep 28, 2017
Java is often ridiculed for its verbosity.
Removing scala.Predef for scala-library.jar Independence :: Aug 6, 2017
Completely removing scala.Predef can be enforced by the compiler with option
-Yno-predef. In addition to changing default type signatures and functions, removing Predef lets one become independent of Scala’s collections library.
.jar files can then be directly executed with
java, without having to add the 5 megabyte
scala-library.jar to the classpath.
JVM Startup Times :: Jun 9, 2017
The JVM’s Achilles heel is long startup times. This is especially true for Scala programs, which require megabytes of additional jars on the classpath. On my 2015 i5 8gb ram Macbook Pro with Scala 2.12.2 and Java 8, the following takes over one second to execute:
Retroactive Polymorphism with Scala Typeclasses :: Jan 31, 2017
As an object-functional language, Scala supports many ways of writing generic, polymorphic code. This article will introduce retroactive polymorphism, and examine the advanced language features enabling it in Scala.
Phaeton CTF :: Jan 18, 2017
Around April 2016 I worked on a Halo 5 Forge map, set on the Parallax canvas. Originally the map was purely aestetic, but was later redesigned to support Phaeton-on-Phaeton CTF mayhem.
Giter8 Scala Templates :: Dec 2, 2016
Defending the configuration of my Scala templates.
Recommended scalac Options :: Dec 1, 2016
Threat Stack recently published a sound review of scala’s compiler flags. Here’s the archived links:
Creature Features :: Jul 24, 2016
A showcase of evolution’s diversity. Inspired by Mr. Traina’s Evolution, Biodiversity, and Ecology (EBE) class at the Illinois Math and Science Academy.
Pancreatic Cancer Research :: May 1, 2014
From May 2014 to August 2014, I researched Transforming Growth Factor Beta’s effect on epithelial-mesenchymal transition, which is implicated in the development of pancreatic adenocarcinoma. I worked under the guidance of Dr. Paul Grippo and Danny Principe of Northwestern University.