https://www.gravatar.com/avatar/306d401b2a8c0efe0996fec60e0c90aa?s=240&d=mp

My coding journey

Disclaimer: it's just for fun

JVM: Names and Descriptors

This post is a note taken during reading 4.2 and 4.3 sections of chapter 4.

Section 4.2 describes the rules of representing class and interface names, field and method names, module and package names.

Section 4.3 describes descriptors and provides a short grammar according to which a representation of a type is constructed.

Names

Binary class and interface names

  • those names always appear in a fully qualified form known as binary name (see JLS 13.1)
  • they are represented with forward slash instead of a dot (for historical reasons)
  • represented as CONSTANT_Utf8_info structures
  • referenced from CONSTANT_NameAndType_info and from CONSTANT_Class_info structures

Field and method names

Unqualified names are used to strore:

JVM: Class File Format - Structure

Class File

Each .class file contains the definition of a single:

  • class
  • interface or
  • a module

Class format (the specific order and meaning of bytes) described in the spec not neceserily applies to an actual file on the filesystem: those “bytes” might have been read from the database, downloaded from the web or constructed by a class loader; keep this in mind whenever you encounter the phrase “class file format”.

Palettes - research notes

Generating a color palette

While playing with p5.js I often stumble upon a problem of color palette choice. The colors that I use in my artictic/programming playground are (usually) randomly generated. Even though I’m familiar with practical superiority of HSL/HSB over RGB colorscpace and I seldom use RGB in my scripts, I haven’t tried to create a color palette algorithm myself.

I’m sure there are many such algorithms. There are plenty of pages that allow the user to enter a color and they helpfully output a set of matching, somehow related colors that form some kind of a palette. The obvious target users of such pages are: