home.social

#objectoriented — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #objectoriented, aggregated by home.social.

  1. @badrihippo modern frameworks like React, Vue, and Van.js are all very similar, but I have not seen a consistent name for this family of frameworks. I have heard it called “The Elm Architecture,” because they are loosely based on how the Elm programming language originally did GUI programming in the browser. I have also heard it called the Model-View-Update paradigm. But most people just call it “React-like” or “Reactive Programming” because they are all similar to the very popular “React.js” framework.

    Note that this should not be confused with Functional Reactive Programming (FRP), although the two are not completely different. As I understand it, React-like GUIs and FRP can both be implemented on top of a more powerful and more general computation model called “propagators” (here is the PDF of the original Propagators paper).

    @dthompson wrote a really good blog post about FRP, propagators, and React-like frameworks.

    I hope that helps, but I am not as well-versed in the theory of this stuff as I should be.

    Oh, and I should say, before React-like took over the world wide web, GUI programming was mostly intertwined with Object Oriented Programming and design, so a good place to start might be to read up on Smalltalk OOP and GUI design.

    #tech #software #GUI #ReactiveProgramming #FRP #Scheme #Haskell #SchemeLang #Propagators #ElmArchitecture #ReactJS #Smalltalk #OOP #ObjectOriented

  2. @badrihippo modern frameworks like React, Vue, and Van.js are all very similar, but I have not seen a consistent name for this family of frameworks. I have heard it called “The Elm Architecture,” because they are loosely based on how the Elm programming language originally did GUI programming in the browser. I have also heard it called the Model-View-Update paradigm. But most people just call it “React-like” or “Reactive Programming” because they are all similar to the very popular “React.js” framework.

    Note that this should not be confused with Functional Reactive Programming (FRP), although the two are not completely different. As I understand it, React-like GUIs and FRP can both be implemented on top of a more powerful and more general computation model called “propagators” (here is the PDF of the original Propagators paper).

    @dthompson wrote a really good blog post about FRP, propagators, and React-like frameworks.

    I hope that helps, but I am not as well-versed in the theory of this stuff as I should be.

    Oh, and I should say, before React-like took over the world wide web, GUI programming was mostly intertwined with Object Oriented Programming and design, so a good place to start might be to read up on Smalltalk OOP and GUI design.

    #tech #software #GUI #ReactiveProgramming #FRP #Scheme #Haskell #SchemeLang #Propagators #ElmArchitecture #ReactJS #Smalltalk #OOP #ObjectOriented

  3. @badrihippo modern frameworks like React, Vue, and Van.js are all very similar, but I have not seen a consistent name for this family of frameworks. I have heard it called “The Elm Architecture,” because they are loosely based on how the Elm programming language originally did GUI programming in the browser. I have also heard it called the Model-View-Update paradigm. But most people just call it “React-like” or “Reactive Programming” because they are all similar to the very popular “React.js” framework.

    Note that this should not be confused with Functional Reactive Programming (FRP), although the two are not completely different. As I understand it, React-like GUIs and FRP can both be implemented on top of a more powerful and more general computation model called “propagators” (here is the PDF of the original Propagators paper).

    @dthompson wrote a really good blog post about FRP, propagators, and React-like frameworks.

    I hope that helps, but I am not as well-versed in the theory of this stuff as I should be.

    Oh, and I should say, before React-like took over the world wide web, GUI programming was mostly intertwined with Object Oriented Programming and design, so a good place to start might be to read up on Smalltalk OOP and GUI design.

    #tech #software #GUI #ReactiveProgramming #FRP #Scheme #Haskell #SchemeLang #Propagators #ElmArchitecture #ReactJS #Smalltalk #OOP #ObjectOriented

  4. @badrihippo modern frameworks like React, Vue, and Van.js are all very similar, but I have not seen a consistent name for this family of frameworks. I have heard it called “The Elm Architecture,” because they are loosely based on how the Elm programming language originally did GUI programming in the browser. I have also heard it called the Model-View-Update paradigm. But most people just call it “React-like” or “Reactive Programming” because they are all similar to the very popular “React.js” framework.

    Note that this should not be confused with Functional Reactive Programming (FRP), although the two are not completely different. As I understand it, React-like GUIs and FRP can both be implemented on top of a more powerful and more general computation model called “propagators” (here is the PDF of the original Propagators paper).

    @dthompson wrote a really good blog post about FRP, propagators, and React-like frameworks.

    I hope that helps, but I am not as well-versed in the theory of this stuff as I should be.

    Oh, and I should say, before React-like took over the world wide web, GUI programming was mostly intertwined with Object Oriented Programming and design, so a good place to start might be to read up on Smalltalk OOP and GUI design.

    #tech #software #GUI #ReactiveProgramming #FRP #Scheme #Haskell #SchemeLang #Propagators #ElmArchitecture #ReactJS #Smalltalk #OOP #ObjectOriented

  5. 🚀 Ah, the age-old #debate of why #SQLite isn't coded in your favorite 🦄 object-oriented or 🦺 "safe" language. Spoiler alert: because #C is like a reliable old pickup truck that just won't quit and doesn't care about your trendy hybrid 🚗. #Redditors and Hacker News commenters must be devastated that their "insightful" feedback didn't lead to a full rewrite in Python. 🤯
    sqlite.org/whyc.html #ObjectOriented #Programming #HackerNews #HackerNews #ngated

  6. 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.

  7. 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.

  8. 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.

  9. 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.

  10. 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.

  11. @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: codeberg.org/GrantH/Pyside6-Po

  12. 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:

    openhumanitiespress.org/books/

    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:

    openhumanitiespress.org/books/

  13. 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

  14. 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

  15. 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

  16. 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

  17. 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

  18. CW: #rstats hivemind assistance request: How to structure a program to change the algebraic properties of an arithmetic calculation independent of the structure of the calculation?

    #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 (en.wikipedia.org/wiki/Pitch_dr). 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

  19. CW: grumpy comment about Shiffman wrapping everything in classes (OO)

    I love Daniel Shiffman and the people porting NOC examples, but their insistence on wrapping everything in classes, and in this particular example, to put them on separate files... Take this L-System example: github.com/nature-of-code/noc-

    And the JS original: natureofcode.com/fractals/#l-s (you have to open the p5js editor and click a lot to find the lsystem.js file)

    In my view it doesn't help at all learners grasp what is going on to have to switch to two other tabs to look at a few lines of code that could be two functions.

    Ignore for a moment it's Python and compare the previous code to these procedural implementations:
    abav.lugaralgum.com/material-a

    (Now, I take back the "ignore for a moment it's Python", and I suggest you marvel at the elegance of the Python dict)

    #natureofcode #Processing #LSystem #Python #JavaScript #ObjectOriented #procedural

  20. I've hit upon a new kind of Liskov Substitution Principle in #Programming.

    "If I substitute Barabara Liskov for myself, right here in this chair, do I still call this cruft, and the language it is written in, #ObjectOriented ?"

  21. I’m currently reading Extreme Programming Explained 2e (Beck et. al), Object Thinking (West), and Object-Oriented Analysis and Design With Applications 3e (Booch et. al). The contrast between OT and OOADwA is startling. OT got me reading eXPE, and I regret not reading it sooner. Am I destined to say that about every Beck book I read?

    #Reading #Books #Programming #OOP #XP #Agile #SoftwareEngineering #Analysis #Design #ObjectOriented

  22. Little preview video: Kitten’s improved component model

    • Class-based page routes and components
    • Object-oriented
    • Event-based
    • Seamless hypermedia-driven WebSocket-based event mapping and interface updates (Streaming HTML)
    • A light server-side live component hierarchy with event bubbling
    • Almost as if you’re building a desktop or mobile app instead of a web app…

    … another authoring simplification made possible because on the Small Web – which is a peer-to-peer web – you build a web app/site as a tool for one person (the owner of the site/app) instead of as a tool for you to farm millions of people.

    … still experimental ;)

    vimeo.com/1049055406

    Learn more about Kitten:

    kitten.small-web.org

    If you like what you see and want us to keep existing, we could definitely use your support:

    small-tech.org/fund-us/

    :kitten:💕

    #Kitten #SmallWeb #SmallTech #StreamingHTML #objectOriented #eventBased #hypermedia #htmx #WebSocket #HTML #JavaScript #CSS #NodeJS

  23. Pretty soon, you’re going to be able to view your live pages and the events on them in real time while developing Kitten apps.

    The improved component model with support for class-based routes (and a server-side component hiearchy that lets you build well-encapsulated components and pages and work in an event-driven way) is coming along nicely and I’m back to writing Place¹ using it.

    (In the GIF, you’re looking at Place’s profile settings page. Not shown here but those profile changes reflect in realtime on all open pages. The highlighted piece of code is what streams the event details to the browser.)

    ¹ codeberg.org/place/app

    #Kitten #StreamingHTML #SmallWeb #htmx #hypermedia #WebSockets #web #dev #eventDriven #objectOriented #JavaScript #NodeJS

  24. REPOST (JAN 2024): My first thoughts on #Psion's dialect of Object Oriented C for the Series 3 and related portable computers.

    Includes the JPI/Clarion #TopSpeed #compiler, a proprietary preprocessor, the Eiffel programming language, and a handful of calling conventions.

    Also, did somebody say Objective-C?

    This is an old blog post from the beginning of the year. If you've been following my journey in recreating #CTRAN, this was written a week before I decided to take the plunge.

    hackaday.io/project/161291-the

    (Yes, I did say in the article that I definitely wouldn't be writing a compiler. I did say that.)

    #RetroComputing #EPOC16 #CDECL #Clarion #TopSpeed #TopSpeedC #RetroProgramming #RetroDev #Smalltalk #ObjectPascal #preprocessor #Eiffel #OOP #ObjectiveC #compilers #ObjectOriented

  25. REPOST (JAN 2024): My first thoughts on #Psion's dialect of Object Oriented C for the Series 3 and related portable computers.

    Includes the JPI/Clarion #TopSpeed #compiler, a proprietary preprocessor, the Eiffel programming language, and a handful of calling conventions.

    Also, did somebody say Objective-C?

    This is an old blog post from the beginning of the year. If you've been following my journey in recreating #CTRAN, this was written a week before I decided to take the plunge.

    hackaday.io/project/161291-the

    (Yes, I did say in the article that I definitely wouldn't be writing a compiler. I did say that.)

    #RetroComputing #EPOC16 #CDECL #Clarion #TopSpeed #TopSpeedC #RetroProgramming #RetroDev #Smalltalk #ObjectPascal #preprocessor #Eiffel #OOP #ObjectiveC #compilers #ObjectOriented

  26. REPOST (JAN 2024): My first thoughts on #Psion's dialect of Object Oriented C for the Series 3 and related portable computers.

    Includes the JPI/Clarion #TopSpeed #compiler, a proprietary preprocessor, the Eiffel programming language, and a handful of calling conventions.

    Also, did somebody say Objective-C?

    This is an old blog post from the beginning of the year. If you've been following my journey in recreating #CTRAN, this was written a week before I decided to take the plunge.

    hackaday.io/project/161291-the

    (Yes, I did say in the article that I definitely wouldn't be writing a compiler. I did say that.)

    #RetroComputing #EPOC16 #CDECL #Clarion #TopSpeed #TopSpeedC #RetroProgramming #RetroDev #Smalltalk #ObjectPascal #preprocessor #Eiffel #OOP #ObjectiveC #compilers #ObjectOriented

  27. REPOST (JAN 2024): My first thoughts on #Psion's dialect of Object Oriented C for the Series 3 and related portable computers.

    Includes the JPI/Clarion #TopSpeed #compiler, a proprietary preprocessor, the Eiffel programming language, and a handful of calling conventions.

    Also, did somebody say Objective-C?

    This is an old blog post from the beginning of the year. If you've been following my journey in recreating #CTRAN, this was written a week before I decided to take the plunge.

    hackaday.io/project/161291-the

    (Yes, I did say in the article that I definitely wouldn't be writing a compiler. I did say that.)

    #RetroComputing #EPOC16 #CDECL #Clarion #TopSpeed #TopSpeedC #RetroProgramming #RetroDev #Smalltalk #ObjectPascal #preprocessor #Eiffel #OOP #ObjectiveC #compilers #ObjectOriented

  28. REPOST (JAN 2024): My first thoughts on #Psion's dialect of Object Oriented C for the Series 3 and related portable computers.

    Includes the JPI/Clarion #TopSpeed #compiler, a proprietary preprocessor, the Eiffel programming language, and a handful of calling conventions.

    Also, did somebody say Objective-C?

    This is an old blog post from the beginning of the year. If you've been following my journey in recreating #CTRAN, this was written a week before I decided to take the plunge.

    hackaday.io/project/161291-the

    (Yes, I did say in the article that I definitely wouldn't be writing a compiler. I did say that.)

    #RetroComputing #EPOC16 #CDECL #Clarion #TopSpeed #TopSpeedC #RetroProgramming #RetroDev #Smalltalk #ObjectPascal #preprocessor #Eiffel #OOP #ObjectiveC #compilers #ObjectOriented

  29. Firing up #Inform7 on my #Mac to write another #interactiveFiction #game. Getting stuck into the prologue. This will be a much bigger game than I've written before, including 7 main sections in the #code. It is going to take some time. So best get on with it sooner rather than later! Excited to be back #coding. There's something magical about using this #declarative / #naturalLanguage / #objectOriented #programming language and IDE. #GameDev #IndieGame #TextGames #Parser #TextAdventure #Inform

  30. In the DES examples I have seen, the style of programming looks similar to microcontroller event handling code.

    I've spent a long time writing object oriented code and find difficult to follow event driven code.

    #programming #objectoriented

  31. I have a question for people with better theoretical background on #ObjectOriented #programming and especially for #CPlusPlus developers.

    #askFedi #fediHelp Is the following pattern known and does it have a name?

    I have a number of classes (call them C1, C2, etc) that all derive from the same class B. I have a superclass (template, actually) D that derives from C1, C2 etc. To have a single B, the standard solution is to go with virtual inheritance to close the diamond (so far, so good).

    1/n

  32. The things that come to mind when hearing these three letters are cars, inheritance, getters, setters, and ObjectFactoryFactorySingleton.

    https://blog.sigma-star.io/2024/01/people-dont-understand-oop/

  33. A summary of my first impressions of #Psion's object oriented ecosystem for #EPOC16.

    TL;DR: It feels janky, but I'm also a noob. Plus what about Objective-C?

    I'm certain there's loads that I've missed with this. Do feel free to comment with constructive information.

    #retrocomputing #retrodev #ObjectOriented #OOP #OO #ObjectiveC #programming #16bit #oldtech #smalltalk #epoc #psion3

    hackaday.io/project/161291-the

  34. I've been a proponent of starting with the user scenario or business problem first for decades now. I think that can take the form of storyboarding, or business process documentation. Those activities (imo) always lead to domain object modeling next, and figuring out the data mapping later.

    This article **Mark Seemann** does a nice job describing how and why this is a good idea.

    blog.ploeh.dk/2023/10/23/domai

  35. Some #RealTime #ObjectOriented programming in #ATS for #RosettaCode. And I mean really #OO, not type hierarchy masquerading as OO. Communicating objects.

    There is no type hierarchy, because none is needed. One can use a closure to connect two objects, as long as the connection is compatible at both ends.

    And there is just one thread, because why in heck would you need two threads, just to read the time on the clock??????

    rosettacode.org/wiki/Active_ob

    #ATSlang

  36. @Perl For those who haven’t been following @ovid’s #Corinna project to bring modern effective #ObjectOriented #programming to #Perl, it’s coming this year with version 5.38’s experimental `class` feature.

    Release engineer @rjbs is collecting the release branch in github.com/Perl/perl5/pull/211; you can read the new `class` feature announcement at github.com/rjbs/perl5/blob/rel, check github.com/rjbs/perl5/blob/rel for a full reference, or dive deep into the internals at github.com/rjbs/perl5/blob/rel

  37. If you're serious about #objectOriented programming, try to use #DesignByContract to the fullest extent your language supports it. Your future debugging self will thank you. At the very least, liberally use #assertions throughout your code to state what should be true at any given point in your code.

    en.wikipedia.org/wiki/Design_b

    #dbc #SoftwareEngineering

  38. #Currying in #FunctionalProgramming is a way to temporarily retain a value for later use. The value is retained in a new, scoped function instance.

    Wait.

    What?

    Isn't that quite similar to what the #ObjectOriented #Java #programmingLanguage does when it retains a value in a Class instance, for later use?

    Yes.

    Yes, it is.

    And that makes currying feel like cheating. Which makes #FP languages that allow it, feel like a hack.

    So, what else is there? #Memoization?

  39. Over on Reddit I'm participating in a discussion about code smells. Invariably, the number of lines in a method and the number of methods in a class are mentioned. And I completely and utterly disagree. Here's a copy of my argument agains line counts and method counts. #softwareArchitecture #codeSmells #objectOriented