Coder Social home page Coder Social logo

Learning From History about eo HOT 13 CLOSED

objectionary avatar objectionary commented on August 21, 2024
Learning From History

from eo.

Comments (13)

pchmielowski avatar pchmielowski commented on August 21, 2024 2

Nothing is Something - Sandi Metz

First few minutes is about what is the alternative to if statements in OOP world (or: how to implement Smalltalk style Boolean objects in Ruby).

from eo.

yegor256 avatar yegor256 commented on August 21, 2024 1

@pa9ey perfect idea. how about we create a section in README.md called "Lessons Learned" and list there things that we're aware about. We can say there, as a preface, that "We know about all this, we've seen these videos, don't think that we're re-inventing the wheel..." And then the list of things we've seen will go. What do you think?

from eo.

mdbs99 avatar mdbs99 commented on August 21, 2024 1

Nothing is Something - Sandi Metz

Very good this video!

from eo.

nqafield avatar nqafield commented on August 21, 2024

Ha! Maybe I've bitten off more than I can chew. :) I guess I was thinking of people, first, adding suggestions for a list of resources. (Then maybe I watch them all and try and catch up with you guys!!) (^;

But okay, I'll try and write something in the comments here about what I got from those videos and then see what people think.

(As I mention above, the edits are starting to get out of hand...)

from eo.

nqafield avatar nqafield commented on August 21, 2024

If anyone else has suggestions for videos or resources I'd certainly be interested to see them.

(This also seems very relevant to what we're trying to do, but I can't pretend I understand it all yet.)

from eo.

nqafield avatar nqafield commented on August 21, 2024

@pchmielowski Thanks for that! I've seen a couple of her videos (including that one I think) and I remember being impressed.

from eo.

OneWingedShark avatar OneWingedShark commented on August 21, 2024

@pa9ey -- These are extremely good points:

  • Being able to do everything in a language makes doing anything at all more difficult. (Restrictions matter!)
  • "I don't need a programming language. I need a coherent set of tools for creating software. A language is incidental." (I think this is very much on point.)

With respect to the latter, there was a very interesting project/technology tied to a compiler compiler project called PQCC: IDL (Interface Description Language, here's the specification) -- had PQCC realized its goals a huge chunk of those tools would be available. (I suspect PQCC's failure was more technical limitations of the time than the problem being unsolvable.)

I found out about IDL when researching Ada for a compiler project and stumbled on DIANA (here's DIANA RM revision 3, and revision 4 draft, if you're interested), which is an application of IDL. -- Anyway the reason to bring up IDL is that along with being germane to this wish to have tools rather than languages it has an interesting and unique (to my knowledge) concept of inheritance: a method to exclude items from being inherited.

The syntax/method they used was a keyword named without -- see IDL spec PDF's page 24 (marked as page 18) -- where you can exclude a portion of the inherited structure.

This is eminently relevant for language-design because the standard definition for a type is "a set of values and a set of operations", this can be modeled directly in an OOP-language by an object having two fields: a set of values, and two a set of operations... and any language with subtypes, which are merely the addition of constraints upon the values, like Positive is a subtype of Integer with constraint X > 0 imposed upon the values.

So using Integer and Positive again, we could conceptually describe the types as something like:

Integer = (values: -2**(machine.word_length-1)..2**(machine.word_length-1)-1, operations: Arithmetic_ops)
and
Positive = Integer without values x such that x < 0
Or whatever. (The textual representation and syntax here don't matter, it's the concept that's important; though there is the implicit assumption here that we're dealing with a 2's complement machine here.)


Now, with respect to the former point ("Restrictions matter!"), this is self-evident to anyone who's used subtypes, but it's also the key realization for Ada's generic system which has the interesting property of static polymorphism.

(I'll move what I was going to say about Ada's generics to #1 where it's more directly on-topic.)

The power of being able to add constraints (that is, subtyping) can simplify things immensely, as well as enhance correctness; an example:

  Type Window is tagged private;       -- Whatever, it's just a stub.
  Type Pointer is access Window'Class; -- A pointer to Window, or anything deriving from it.
  Subtype Handle is not null Pointer;  -- A pointer with NULL excluded.

  Procedure Set_Title ( Window : Handle; Text : String ); -- Function header/declaration.

Within the body of Set_Title, the checking of parameter "Window" being null is completely unneeded because it's ensured non-null by the parameter, because the restriction is on/in the definition of Handle.


Things like the "if operator" being an object reminds me of "parselets" from Nystrom's "Pratt Parsers: Expression Parsing Made Easy" article and his example on github and how these "parslets" essentially construct the objects for the parse-tree.

The idea of having an "if operator"-object also beings to mind Forth which owes a lot of its flexibility and simplicity to it's definition of "word" --the Forth equivalent of a subprogram-- which is: either a list of words, or a chunk of machine code. (This definition also forms the basis for other interesting properties.)

On the other hand of the high-/low-level language scale we have Lisp, which similarly deals with lists at the fundamental level, but owes its flexibility to its homoiconicity: the representation of the program itself as data. (Lisp's macros are quite impressive when it comes to meta-programming, as shown by this stackoverflow answer, and the heart of the macro is homoiconicity: "_Before I go further: I should explain a little bit of what a macro is. It is a transform of code by code to code. That is a piece of code read by the interpreter (or compiler) which takes in code as an argument does a manipulation and the returns the result which is then run in place. _")

All of these tie together: we can have a system where everything is represented by objects, where we have objects [well, methods] to operate on objects and treat programs like objects.

from eo.

nqafield avatar nqafield commented on August 21, 2024

@OneWingedShark Thanks! This is all fascinating stuff. Although I'm running to catch up a bit. I think I have a lot of reading to do! :)

from eo.

nqafield avatar nqafield commented on August 21, 2024

Still not really sure what the outcome of this issue should be (I'm quickly getting out of my depth), but I think I'll keep it open for now because there are some interesting things here.

from eo.

OneWingedShark avatar OneWingedShark commented on August 21, 2024

@pa9ey
The links for PQCC, IDL, and DIANA are just to their wikipedia pages, and the stackoverflow link isn't terribly bad either.

The Pratt Parsers post takes more time to mull over (and possibly play with) than it does to read.

It's the IDL spec and DIANA RM that are of any appreciable length, and you can safely ignore DIANA's 4th revision draft.

from eo.

maxinovi avatar maxinovi commented on August 21, 2024

I would propose my object-oriented modeling project. The key ideas of the project are the following:

  • Object-modeling core. Totally declarative decomposition: collaborating objects, template messages, and nothing else. Only high abstractions and pure problem domain terms. Adjusted object-oriented concepts.
  • Escalating the role of aspects. Cross-cutting concerns via alternative naming and projections.
  • Explicit data model. Associations as an abstract way to define data relations.
  • Unification and explicit applying of resources. Separation of object modeling and resource programming. Resources are memory and code (algorithms). All resources are assigned to model abstractions via productions. Separation resources to managed and unmanaged is incidental.
  • Meta features for manipulating modeling and code elements. Generating output code from transformed models. Open object modeling semantic via transformations.
  • Powerful tools via IDE. Alternative source code presentation via hybrid trees instead of plain text. Plain text is incident. Real-time weaving and meta processing. Transpilation into readable and debuggable output code.

Maybe it can be used in eolang in some manners.

from eo.

0crat avatar 0crat commented on August 21, 2024

Job gh:yegor256/eo#5 is not assigned, can't get performer

from eo.

0crat avatar 0crat commented on August 21, 2024

This job is not in scope

from eo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.