ComputerScientist
174 subscribers
14 photos
3 files
206 links
▜ The Inventor

Stuff that inspire you to create.

See also: ▙ @LitMind
Download Telegram
“You don't have to make a functionality for every nice terminology.”
#TheSemicolon
The mind is a self-rewriting computer.
dead variables := written to, but never read again
Swing versus AWT
Every Swing lightweight interface ultimately exists within an AWT heavyweight component because all of the top-level components in Swing (JApplet, JDialog, JFrame, and JWindow) extend an AWT top-level container.

AWT components
• are heavyweight
• are implemented by platform-specific code.
• are rendered and controlled by a native peer component specific to the underlying windowing system.

Swing components
• are lightweight
• are written entirely in Java and therefore are platform-independent.
• do not require allocation of native resources in the OS's windowing toolkit.
• Rendering is provided by Java 2D.
• More powerful and flexible
• More components such as tabbed panel, scroll panes, trees, tables, and lists.
• Customizable look and feel

After Java 6, both Swing and AWT components can co-exist in one GUI without Z-order issues.

#Java

“Fuck both of them, and fuck Java on top of it. But if you must, of course, Swing.”
#TheSemicolon
Complement qualifications
A set of qualifications is defined as the universal set. This means that the children of this universalSet have to be qualifed for at least or exactly one of them.
“Either throw Windows out of the computer or throw the computer out of the window.”
#Richard_Stallman
“The principle of simplicity is the central theme of Ockham’s approach, so much so that this principle has come to be known as "Ockham’s Razor"; Ockham uses the razor to eliminate unnecessary hypotheses.
— Sharon Kaye
“If you have built castles in the air, your work need not be lost; that is where they should be. Now put the foundations under them.”
#Henry_David_Thoreau, advocating top-down design
“When walking in open territory, bother no one. If someone bothers you, ask him to stop. If he does not stop, destroy him.”
#Anton_LaVey, Eleven Satanic Rules of the Earth

also very good advice for an MMORPG.
A strong pilot propels the idea.
Minimum object size is 16 bytes for modern 64-bit JDK since the object has 12-byte header, padded to a multiple of 8 bytes. In 32-bit JDK, the overhead is 8 bytes, padded to a multiple of 4 bytes.

References have a typical size of 4 bytes on 32-bit platforms and on 64-bits platforms with heap boundary less than 32Gb (-Xmx32G), and 8 bytes for this boundary above 32Gb.

#Java

read more
#characters
Arrows
#language #Pharo
Pharo

First appeared: 2008

Features:
• live programming
• purely object-oriented
• dynamically typed
• reflective
• inspired by #Smalltalk
• single inheritance between classes
• traits: groups of methods
"Pharo syntax fits on a single postcard."
Impromptu
- is an environment for live coding. It is built around #Scheme.

First appeared: 2005

Temporal recursion
Looping is performed by "temporal recursion", i.e. by having a function asynchronously schedule a future call to itself as its final action.

Though syntactically Scheme-like, it is semantically closer to #C, and is designed for real-time sound synthesis and other computationally heavy tasks. A programmer/performer can create and schedule code for future execution, as well as data events such as notes and graphics objects. It allows audio synthesis and video composition. It is compiled to machine language by #LLVM.
#toWatch

▶️ A Study in Keith

A live coding performance in Impromptu by Andrew Sorensen. The first two minutes (1:56) are silent, while the performer writes the program that will produce the introduction of the piece. From then on, he modifies the code on the fly to evolve the composition.
#Nile
The member operator (.)

Property get
"a.prop":
if a is an object
if local variable prop exists
=> a.prop;
else
=> call(a.type, 'get', prop, a)
else
type = ...
=> call(type, 'get', prop, a)


Method call
"a.meth(args)":
if a is an object
=> call(a.type, meth, a, args)
else
type = ...
=> call(type, meth, a, args)
Reformation versus mutation
• Reform (nurtural versus natural): to alter an instance
• Mutate (deep reformation) (mutable versus immutable): to alter the instance of the type of an instance, i.e. the seed

When a mutation method is applied to an object:
• Mutable: is changed and still occupies the same object address
• Immutable: is itself unchanged, rather returns a reconstructed version of itself where the mutation has taken place

What altering means for:
• Natural: cannot be altered, rather its type is altered
• Nurtural: the set of qualifications are modified

#Nile
Nature
What: what the Child PULLs from its Parent(s)
When: at the moment of conception

Nurture
What: what a Parent PUSHes to its Child(ren)
When: anytime
Soft inheritance
The idea that an organism can pass on characteristics that it has acquired during its lifetime to its offspring.

Hard inheritance
The idea that characteristics of an organism's offspring will not be affected by the actions that the parental organism performs during its lifetime.
Forwarded from ComputerScientist
Immutable objects
An immutable (unchangeable) object is an object whose state cannot be modified after it is created. This is in contrast to a mutable (changeable) object, which can be modified after it is created. Here is how and where they can be useful:

• thread safe
• more secure
• constants initialized both before and after the program is executed.
• when sharing the references of objects, it matters whether the state of an object can vary.
• if an object is known to be immutable, it can be copied simply by making a copy of a reference to it instead of copying the entire object.