<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="http://wiki.carl.fun/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://wiki.carl.fun/feed.php">
        <title>Carl&#039;s Hacking Notes</title>
        <description></description>
        <link>http://wiki.carl.fun/</link>
        <image rdf:resource="http://wiki.carl.fun/_media/wiki:dokuwiki.svg" />
       <dc:date>2026-08-10T21:45:37+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://wiki.carl.fun/python?rev=1785386926&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.carl.fun/grpc?rev=1783969567&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.carl.fun/start?rev=1783702317&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.carl.fun/futures?rev=1783669388&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.carl.fun/java:futures?rev=1783669360&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.carl.fun/logs_and_metrics?rev=1783668438&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.carl.fun/programming?rev=1783473027&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.carl.fun/java:wishlist?rev=1782234773&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.carl.fun/numeric?rev=1773522118&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://wiki.carl.fun/_media/wiki:dokuwiki.svg">
        <title>Carl's Hacking Notes</title>
        <link>http://wiki.carl.fun/</link>
        <url>http://wiki.carl.fun/_media/wiki:dokuwiki.svg</url>
    </image>
    <item rdf:about="http://wiki.carl.fun/python?rev=1785386926&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-07-30T04:48:46+00:00</dc:date>
        <dc:creator>carl (carl@undisclosed.example.com)</dc:creator>
        <title>python</title>
        <link>http://wiki.carl.fun/python?rev=1785386926&amp;do=diff</link>
        <description>Python

Python is a programming language common in the data science space.  Here is a list of gotchas that I have encountered while using it, coming from a Java world.

Wishlist

Typesafety is complex.

Static checkers are okay, but the runtime type system is pretty weak.  There is no equivalent of type capture in Java (e.g.</description>
    </item>
    <item rdf:about="http://wiki.carl.fun/grpc?rev=1783969567&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-07-13T19:06:07+00:00</dc:date>
        <dc:creator>carl (carl@undisclosed.example.com)</dc:creator>
        <title>grpc</title>
        <link>http://wiki.carl.fun/grpc?rev=1783969567&amp;do=diff</link>
        <description>gRPC

Status Codes

Status codes are intentionally vague, to enable automatic processing by code.   There are not 5 different flavors of internal errors.   This is balance between being precise, and being automatable.  

Additionally, status codes intentionally do not indicate if they originated from the client or server.</description>
    </item>
    <item rdf:about="http://wiki.carl.fun/start?rev=1783702317&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-07-10T16:51:57+00:00</dc:date>
        <dc:creator>carl (carl@undisclosed.example.com)</dc:creator>
        <title>start</title>
        <link>http://wiki.carl.fun/start?rev=1783702317&amp;do=diff</link>
        <description>Hi, I&#039;m Carl.  This site is a list of my notes.

	*  Java Notes, particularly around concurrency.
	*  Python Notes, particularly around type-safety and runtime stuff
	*  Numeric Numerical properties in computers.
	*  General Programming Notes on general programming concepts
	*  Logs and Metrics Logs and Metrics</description>
    </item>
    <item rdf:about="http://wiki.carl.fun/futures?rev=1783669388&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-07-10T07:43:08+00:00</dc:date>
        <dc:creator>carl (carl@undisclosed.example.com)</dc:creator>
        <title>futures</title>
        <link>http://wiki.carl.fun/futures?rev=1783669388&amp;do=diff</link>
        <description>Futures

Futures are a complex, heterogeneous feature.  Each language handles them slightly differently.  Most of the discussion here is for Java.

A future has 3 parties involved in the lifecycle.

	*  The Scheduler.  This party (thread) usually creates the future object.  The scheduler is the one that sets up the fulfillment of the future.</description>
    </item>
    <item rdf:about="http://wiki.carl.fun/java:futures?rev=1783669360&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-07-10T07:42:40+00:00</dc:date>
        <dc:creator>carl (carl@undisclosed.example.com)</dc:creator>
        <title>futures</title>
        <link>http://wiki.carl.fun/java:futures?rev=1783669360&amp;do=diff</link>
        <description>Futures

Java has 2 main Future implementations:  CompletableFuture and FutureTask.  They both implement the Future interface.  Additionally ForkJoinTask implements Future but this is less managable.

CompletableFuture

CompletableFuture is a full featured Future implementation, capable of chaining and joining.  However, its main weakness is that cancellation doesn&#039;t stop the underlying computation, and interruption is not supported.</description>
    </item>
    <item rdf:about="http://wiki.carl.fun/logs_and_metrics?rev=1783668438&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-07-10T07:27:18+00:00</dc:date>
        <dc:creator>carl (carl@undisclosed.example.com)</dc:creator>
        <title>logs_and_metrics</title>
        <link>http://wiki.carl.fun/logs_and_metrics?rev=1783668438&amp;do=diff</link>
        <description>Logs and Metrics

Often logs and metrics appear to be interchangeable with one another.   This page covers differences between them, and when to use them,

Logs vs. Metrics

	*  Logs have precise timestamps.  To compare the order of events, you need to look at logs.  Metrics are usually aggregated locally at seconds or minute granularity, making it challenging to establish an order.   Traces are even more precise.</description>
    </item>
    <item rdf:about="http://wiki.carl.fun/programming?rev=1783473027&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-07-08T01:10:27+00:00</dc:date>
        <dc:creator>carl (carl@undisclosed.example.com)</dc:creator>
        <title>programming</title>
        <link>http://wiki.carl.fun/programming?rev=1783473027&amp;do=diff</link>
        <description>General Programming

Ternary Operators

Are there any non-conditional ternary operators?  As asked here, The answer there suggests that no, there are no ternary operators, and you might as well call a function. 

However, upon thinking more, unary and binary operators make sense because they naturally split a linear progression of text.  A binary operator conjoins the</description>
    </item>
    <item rdf:about="http://wiki.carl.fun/java:wishlist?rev=1782234773&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-06-23T17:12:53+00:00</dc:date>
        <dc:creator>carl (carl@undisclosed.example.com)</dc:creator>
        <title>wishlist - created</title>
        <link>http://wiki.carl.fun/java:wishlist?rev=1782234773&amp;do=diff</link>
        <description>Wishlist

This is a collection of things I&#039;d like from Java.   Many other languages, runtimes, and libraries have made improvements that I think would help the Java ecosystem.

PriorityQueue

PriorityQueue Reprioritize Items

Go allows modifying the priority of an item in a PriorityQueue.  Java&#039;s doesn&#039;t allow this in an efficient manner.  Instead, you need to remove the item (linear time), and re-enqueue it.</description>
    </item>
    <item rdf:about="http://wiki.carl.fun/numeric?rev=1773522118&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-03-14T21:01:58+00:00</dc:date>
        <dc:creator>carl (carl@undisclosed.example.com)</dc:creator>
        <title>numeric</title>
        <link>http://wiki.carl.fun/numeric?rev=1773522118&amp;do=diff</link>
        <description>Numeric Types

Numeric types represent Real numbers in a computer.  Because computers have limited space, most numeric values are approximations of a real value.  

Math in a computer is a combination of a storage of data, and a collection of operators.   Interpretation of the bits is up to the operators.  When we talk about a type of a number, we are usually referring to the operations we can do on them, rather than the storage.</description>
    </item>
</rdf:RDF>
