A category is formally defined as being a group of one or more classes.

#OOP #ObjectOriented #ObjectOrientedProgramming

Have you heard of this use of "category" before? If so, in which context/language/compiler?

EDIT: For context, from the #Psion SIBO C SDK's Object Oriented Programming Guide:

A category is formally defined as being a group of one or more classes. The classes are packaged into a load module which, when loaded, occupies a single code segment. A code segment may not contain more than one category. There is, therefore, a one-to-one correspondence between a category and the executable code in a single code segment. Note that this implies that an application that occupies a single code segment may not contain more than one category.

Yes
0%
No
100%
Poll ended at .
@chakie #Python #ObjectOriented
Question.
I have written #PySide classes to implement editable multi-segment lines for both straight lines and hermite splines. The interfaces are identical, barring the spline constructor, which takes a tangent list.
I want to create a parent class `PolyLine` which can either be `straight` or `hermite`. A "Strategy Pattern" _seems_ to be the solution, but it feels complex. Putting an `if` into every method feels worse.
Ideas?

Code: https://codeberg.org/GrantH/Pyside6-PolyLines/src/branch/main/

Found a way to identify the science kids in my programming class..

OOP Review: We are all all inherited from fish right?

#programming #science #scishow #hankgreen #oop #software #genetics #fish #teaching #objectoriented

Open Humanities Press has published a 2nd edition of Timothy Morton's Realist Magic: Objects, Ontology, Causality. Comes complete with a new preface by Morton.

Like all OHP books, Realist Magic is available open access:

https://www.openhumanitiespress.org/books/titles/realist-magic-2nd-ed/

Book description

#ObjectOriented ontology offers a startlingly fresh way to think about causality that takes into account developments in #physics since 1900. Causality, argues Object Oriented Ontology (OOO), is #aesthetic. In this book, Timothy Morton explores what it means to say that a thing has come into being, that it is persisting, and that it has ended. Drawing from examples in #physics, #biology, #ecology, #art, #literature and #music, Morton demonstrates the counterintuitive yet elegant explanatory power of OOO for thinking causality.

#philosophy #theory

The book is published as part of the New Metaphysics series:

https://www.openhumanitiespress.org/books/series/new-metaphysics/

Open Humanities Press– Realist Magic

A scholar led open access publishing collective

What's in a name? that which we call as a method
By any other name would work as correctly.
(After WS.)

We say "comma-separated values", but we do
>>> ','.join(("foo", "bar", "baz"))
'foo,bar,baz'

Wherefore art thou Joiner—or Separator...

#ComputerProgramming
#Names
#Naming
#ObjectCentric
#ObjectOriented
#Paraphrases
#ProgrammingLanguages
#RJ
#Rose

one aspect on the complexity of software projects is a complex graph of dependencies (I'm not thinking only to other packages, but class/module dependencies inside a single package/library).

Functional programming encourages to use really tiny and precise dependencies (i.e. functions) instead of collections of them (e.g. classes).

This makes the dependency graph more complex. Hence managing and organizing the dependency graph becomes harder.

Could this be a reason why in functional programming projects I tend to see less code organization than in OOP ones?

#functionalprogramming #oop #objectoriented #objectorienteddesign #complexity #Haskell

#programming #simulation (technically, an #objectOriented #simulation of an #ontology )

https://screwlisp.small-web.org/lispgames/LCKR-running-the-simulation/

Last of my scrappy #gamedev where I spend more attention on introducing pieces of infrastructure for the first time than anything else.

Anyway, the simulation game is seen being both accessed and having commands sent to it from outside; the state-of-the-world is retrieved, and rendered (rendered in the sense of unicode characters being printed.

Tomorrow, more game-y.

#leonardoCalculus #Sandewall #programming #objectOriented #simulation #lisp #commonLisp

I feel like this article is one of those moments that is a monumental achievement for the writer themselves, but precedes adding glitzy picture making (which will eventually come too).

If you remember, I was recapitulating my somewhat failed #lispgamejam #gamedev . This time and in about half a week just now - I got the plant/insect/bird Breitenbergian Vehicle simulation workin'.

https://screwlisp.small-web.org/lispgames/LCKR-completing-the-simulation/

#rstats hivemind assistance request:
How to structure an #rstats program to change the algebraic properties of an arithmetic calculation independent of the structure of the calculation?
(I want this in #rstats because it's the only programming language in which I am non-negatively competent.)

I have some simple arithmetic calculations structured as data flow graphs like the one below (where each node corresponds to an algebraic operator). I want to investigate the effect of changing the algebraic properties of the operators (in this example, addition and multiplication) while keeping the structure of the calculation constant.

[EDIT] I may eventually want to vary the algebraic properties of the operators per node in the data flow graph. For example, addition may work differently at different nodes in the days flow graph.

This is analogous to having an #rstats arithmetic expression (e..g. a + b * c) and changing the types of the operands (e.g. int, double, complex). The structure of the arithmetic expression stays constant and the operators just "do the right thing" dependent on the type of the operands.

Obviously, I will have to program the operators. For the types of algebraic operators I am considering I am reasonably confident that I can get away with representing the operands as #rstats primitive numeric types (int, double, or complex). That is, I am not contemplating algebras where the operands have to be composite structures like graphs or matrices.

Also, I want all the operands to be *vectors* of values of the same type, so that vectorised arithmetic just works in the standard #rstats fashion.

I am presuming the idiomatic way to do this in #rstats would involve object-oriented programming with me writing methods for the operators and dispatching on the types of the operands.

Given a choice, I would prefer an approach that minimises the code I have to write and minimises the extent to which I have to turn my brain inside-out to comprehend what I am doing (because I am a mediocre programmer, at best).

The implementation doesn't have to be blazingly fast, but I can't afford it to be pitch-drop slow (https://en.wikipedia.org/wiki/Pitch_drop_experiment). A typical experiment will consist of a few thousand replicates of a recurrent calculation consisting of maybe 10 operations on vectors of 10,000 elements, carried out for 100 iterations.

So:
1) What #rstats programming approach would you suggest for solving this problem?
2) Is there an idiots' guide to something similar that I might be able to follow and adapt?

Thanks in advance.

#algebra #ObjectOriented