Objects are abstractions of processing. Threads are abstractions of schedule.
— James O. Coplien
Objects are abstractions of processing. Threads are abstractions of schedule.
— James O. Coplien
Intro to Object Oriented Programming
Don't mind me, I'm just poking around this newfangled OOP thing with LOOPS on Medley Interlisp. LOOPS (Lisp Object-Oriented Programming System) is the object extension of Interlisp.
Russian developer Yegor from yegor256.com uses a simple example of two similar approaches to modeling an action, and their implications from an object-oriented design and programming patterns perspective. One of the two approaches provides superior extensibility, data encapsulation, and more flexible error handling.
"remove(42) vs. find(42).remove()"
#YouTube #AI gets automatic key concept identification wrong:
I'm about to watch a video about two project interaction libraries for my favorite #TextEditor (#Emacs). They're called #Projectile and project.el.
Below the video, YouTube shows an image of a missile, under a heading that says "Key Concepts". Below the image, it says: "A projectile is an object that is propelled by the application".
The hashtags #OOP and #EditorWar come to my mind.
The LOOPS primer, published in 1987, captured well the essence of exploratory programming in Lisp:
The LOOPS interface provides both a programming tool and a thinking tool. As you develop a new system, each preliminary version provides an object for thought and discussion. The preliminary versions are a crucial part of the design process.
LOOPS (Lisp Object-Oriented Programming System) is the OOP extension of Interlisp.
#commonLisp #programming #amop #mop #metaobjectProtocol #exercise #closette #learnToCode (my own experience) #oop
https://screwlisp.small-web.org/amop/eg1/
Today I simply share and solve (hopefully!) The Art of the Metaobject Protocol exercise 1.1
(the softball generic classes #memoization exercise from chapter 1)
I just added a lexical closure of hash tables.
@simoninireland wrote about the art of the metaobject protocol in his #lisp bibliography a year ago. https://simondobson.org/2024/07/23/the-art-of-the-metaobject-protocol/
So. Who likes #object oriented #programming? #OOP that's still a buzzword, right? Who likes it? I don't but I don't want to start complaining just yet. ~Alyx
#programming #oop #commonLisp #GUI #app #McCLIM #gamedev #devlog https://screwlisp.small-web.org/lispgames/hurkling-onwards/ #hurkle
Well, it's pretty graphical now. Yes, table columns goofily resize and the history of button presses appear in the interactor shell: Really I just wanted to show you those features working.
Next article, I'll add two more asks and "launch" the game on itch.io.
Anyone else have a McCLIM show-and-tell?
In the 1980s Xerox PARC taught courses on LOOPS (Lisp Object-Oriented Programming System), the object extension of Interlisp. The participants learned to develop knowledge systems in a simulation game called Truckin which is still available on Medley.
https://ojs.aaai.org/aimagazine/index.php/aimagazine/article/view/400
Published in 1987, "Xerox LOOPS, A Friendly Primer" is a concise tutorial to the LOOPS (Lisp Object-Oriented Programming System) object extension of Interlisp. Some chapters of this copy are in the wrong order but all the content is there.
Are you learning the basics of composition in object-oriented programming?
Read more here:
https://www.devleader.ca/2024/04/04/examples-of-composition-in-csharp-a-simple-guide-for-beginners/
Are you learning the basics of inheritance in object-oriented programming?
Read more here:
https://www.devleader.ca/2024/04/03/examples-of-inheritance-in-csharp-a-simplified-introduction-to-oop/
One pro I have noticed regarding object oriented programming in a large corporate environment: it soft-encourages a team to document their conceptual nouns.
You can certainly do this in functional programming too, but in general I find that when people do their language equivalent of alias SkagWuzzit map<int,map<int,list<map<str,str>>>
, they often completely forget to ever get around to defining what a SkagWuzzit actually is. This is something you can handle with programming discipline (i.e. peer review and make people provide definitions for these types and what they conceptually mean, document the module in which the type is defined, etc.), but a class
definition with no docs looks naked in a way that a single type def on a line by itself doesn't.
Nobody want to be a shitty programmer. The question is: Do you do anything not to not be one?
Reading blogs or social media and watching YouTube videos is fun. After them, your code may be a little better, of course. But you need a lot. You need to study! Read good books and study the code of other programmers, for example. Maybe work with a new language, architectures and paradigms. You need break the routine.
If you know Object-oriented programming, you learn functional programming.
If you know Model-View-Controller, you learn Model-View-ViewModel.
If you don't know anything about architectures, you learn Clean Architecture, Hexagonal Architecture, etc.
If you know Python, you learn Ruby or Go.
If you know Clojure or Lisp... you don't need to learn anything else. You are already a good programmer. Just kidding. You can learn Elixir or Scala.
Be a good programmer my friend.
#Programmin #OOP #FunctionalProgramming #MVC #MVVM #CleanArchitecture #HexagonalArchitecture #Python #RubyLang #Golang #Clojure #Lisp #ElixirLang #Scala
New Kitten Release
(Run `kitten update` to update your dev machines. Production machines will automatically update in a couple of hours.)
• You can now add a generic script block to your markdown pages (see https://mastodon.ar.al/@aral/114432417394114105)
• Markdown pages can now be `KittenPage` instances and attach `KittenComponent` instances (so you get a full server-side component hierarchy with an event-based workflow; ideal for authenticated pages where you can be use only the author of the page will be accessing them and thus the additional memory and processing overhead are not issues. Isn’t the Small Web great? Only having instances of one makes it possible to optimise so many things for the human experience instead of vertical scale of the data farming machine.)
• Two new examples showcase the new features: https://codeberg.org/kitten/app/src/branch/main/examples/streaming-html/markdown-script-simple-components and https://codeberg.org/kitten/app/src/branch/main/examples/streaming-html/markdown-kitten-components
• Attributes with object values are no longer serialised into the DOM (but your components’ render functions will continue to receive them, of course.) This is because only string values make sense for attributes in the context of the HTML DOM. (You can still, of course, have stringified representations of objects in attributes, as used by the `data` attribute to pass data from nodes to event handers on the server.)
Write shy code modules that don't reveal anything unnecessary to other modules and that don't rely on other modules' implementations.
— Andy Hunt, Dave Thomas
Mixing #functionalprogramming and object oriented techniques in JavaScript is bad. I can easily see how someone exposed to this would think that #oop was inferior or frustrating. Someone only used to OOP is likely to feel the reverse.