This paragraph either demonstrates a fundamental misunderstanding of the tech on the Author's side, or a haphazardly lazy presentation of facts.

Just because the altcoins are "faster" & have lower energy consumption & transaction fees doesn't make them "better". Or safer. Or more popular. In fact, many of these alternative blockchains face the serious issue of rendering average users unable to run a full node themselves. Just look at Solana's recommended system specs. You literally need to invest in a modern gaming PC to run a full node. …


Personally, I found UnionAll to be a rather difficult topic — though primarily due to its namely similarity to the much simpler Union type. But once the differences are clear, it’s flexibility and power become apparent.

Decorative image of a stylized Union.
Decorative image of a stylized Union.
Graphic © by 100%Open

UnionAll is used in a single context: generic types. Particularly such where at least one type argument remains unassigned. For example:

struct Foo{T}
value::T
end
typeof(Foo) <: UnionAll

But what does this mean? The answer is rather simple: UnionAll represents all specializations of Foo with specified type argument. In a sense, it is a Union with a “placeholder” for the type argument. Hence the…


One of my favorite tools and a double edged blade in the Julia programming language are Meta Types. Loosely related to Metaprogramming, meta types, derived from the Greek word μετα, “transcend” beyond a simple data structure. Rather than simply describe a physical data structure in memory, a meta type includes information on the type itself. Typically, this is may even be all the information the type provides — and the underlying data structure itself is empty. This relates to metaprogramming in that it is a way to manipulate the compiler’s behavior — albeit more indirectly than macros.

Ascension — by Suirebit @ Deviant Art.

The Simplest Meta Type

The simplest form…


This is a particularly niche Julia trick: IOBuffers where data is written to the end and read from the beginning.

Why are Duplex Buffers useful? Duplex Buffers facilitate arbitrary byte-wise communication between two distinct endpoints within your application. They are very akin to Julia’s built-in Channels. In fact, for most applications one will likely prefer the latter for improved semantics and multi-processing capabilities. But sometimes, the application calls for much finer control. …


Decorative image of labels “getters” and “setters” above a code editor.
Decorative image of labels “getters” and “setters” above a code editor.

Julia’s dynamic multiple dispatch is an incredibly powerful language feature. It also powers retrieving fields of objects through getfield, setfield!, hasfield, and various other functions. Some versions ago (somewhere around version 1.1), these methods were complemented with “property” variants— which allow us to implement custom behavior upon accessing (getting) or overriding (setting) the value of a field, or even more interesting: virtual fields which do not physically exist on the object.

An Example

Nothing goes over learning by example. This is how you might implement getters & setters:

abstract type Animal end
abstract type Quadruped <: Animal end
struct Dog <: Quadruped…


Python is an interpreted and dynamically typed language. But that doesn’t mean you should forget entirely about types.

A nifty feature introduced with PEP 484 is called “Type Hints” a.k.a type annotations. Mainly, it simply tells fellow developers, or even just yourself, what type is expected as a function argument or what type is returned. While Python itself does literally nothing with this information (hence “hint”), it is an incredibly invaluable tool for us humans.

The IDE can extract these types and plug them into an IntelliSense system for autocomplete. …


Illustration of a computer network. For decoration.
Illustration of a computer network. For decoration.
Illustration: Computer Network Basics. IP of i-netsolutions.net.

The Scenario

Feel free to skip this section. All I do here is explain why I even worked on this problem.

One of the bigger challenges I have faced while writing Pia.jl is that Julia’s standard library does not provide timeouts for I/O operations whatsoever, particularly including TCP & UDP Sockets. This is likely a direct consequence of the usage of the underlying library: libuv — which in itself does not seem to provide such timeouts. However, it is Julia’s integration which poses a serious problem.

After some experimentation, I discovered that Julia does not immediately read all available data on a…

Kiruse

Freelance Software Engineer | DLT/Blockchain Enthusiast & Future Entrepreneur

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store