Flowing tables

  • 2 Replies
  • 1829 Views
*

Zero

  • Eve
  • ***********
  • 1287
Flowing tables
« on: July 06, 2018, 01:53:31 pm »

Here is a rather serious project (yeah, every once in a while, I need to post serious stuff) about a very specific model of computation.

It is strongly inspired from spreadsheets, as you can see:


    table Scores apprenants

        row Apprenants
            list
                Joseph
                Pierre
                Paul
                Jacques
            end
           
        row Moyenne par matière
            average
                Apprenants
            end
       
        col Notes
            list
                Maths
                Français
                Histoire
            end
           
        col Moyenne par apprenant
            average
                Notes
            end
       
        val Apprenants \ Notes
            constant
                15, 18, 13
                12, 08, 09
                05, 15, 16
                19, 12, 11
            end
       
    end


(sorry for the lack of translation)

This piece of code corresponds to a simple, classical spreadsheet table that would look like this:


+---------------------+----------+----------+----------+-------------+
|   Scores apprenants |   Maths  | Français | Histoire | Moyenne par |
|  Apprenants \ Notes |          |          |          |  apprenant  |
+---------------------+----------+----------+----------+-------------+
|              Joseph |    15    |    18    |    13    |     15.3    |
|              Pierre |    12    |     8    |     9    |      9.7    |
|                Paul |     5    |    15    |    16    |     12.0    |
|             Jacques |    19    |    12    |    11    |     14.0    |
+---------------------+----------+----------+----------+-------------+
| Moyenne par matière |   12.8   |   13.3   |   12.3   |
+---------------------+----------+----------+----------+


You're probably wondering, what's the point.

The point is to make flow-based programming using tables. For example, rows and cols headers are defined as constant lists in this example, but it needs not be the case. These lists could be obtained from a filter or a map function. Same goes for values: in this example, they are constant, but they can also be obtained from other tables.

It's different from a typical spreadsheet, since cols and rows header lists are always growing and shrinking, as time steps.

Programming here is done by setting up table declarations that define how a table's headers and values are calculated using data from other tables at the previous time step.

Any calculus applicable to lists can be used to calculate the lists of rows and cols headers. Values themselves can be anything, including strings, lists, objects, ...etc, depending on the host programming language, which could be Python or Javascript for instance.

My first idea was to authorize any number of dimensions, but it turns out it's hard for the human brain to visualize more-than-3D tables, so I've decided to keep it 2D. Anyway, you can obtain the same effect with additional tables, since the rows or cols headers list of one table can be obtained from the value list from another table: then you've got 3D. If you do it again, you've got 4D and so on.

There's probably tools like that "Flowing tables" thing out there already.


*

spydaz

  • Trusty Member
  • *******
  • Starship Trooper
  • *
  • 325
  • Developing Conversational AI (Natural Language/ML)
    • Spydaz_Web
Re: Flowing tables
« Reply #1 on: July 06, 2018, 02:11:47 pm »
Usually in this situation i would use a List Object (creating a structure / Type)

Public Structure StudentScore
     Public Student as String
     Public Maths as Double
     Public Francais as Double
     Public History as Double
     Public TotalAverage as Double
End Structure

Public Structure ClassTermScores
     Public Students as List (of studentScore)
     Public AvgClass as double
     Public AvgMaths as Double
     Public AvgFrancais as Double
     Public AvgHistory as Double
     Public TotalAverage as Double
End Structure

Usually i would also Make an averaging function for Students so that the variable which need calculating would auto calculate as students are added to the list

Its not so bad in vb.net

IT can be further refined to Accommodate Random Classes by creating a Class structure instead using inheritance; Then it would contain a list of ClassTopics ... etc... i dot often use the object technique to define my data structures ... but often it can allow for generic additions with changes in the main class just inherit again... this means class objects can be sealed at higher levels... But i prefer structured lists as the compiler handles them with the same rules as variables... maintaining integrity.. where as data within a class object often become changed after interrogation...
But both can be loaded by a Comma Separated, list... adding , removing , updating , calculation are all easy with such lists.


*

ranch vermin

  • Not much time left.
  • Terminator
  • *********
  • 947
  • Its nearly time!
Re: Flowing tables
« Reply #2 on: July 06, 2018, 07:51:40 pm »
automated spreadsheets are powerful nerd equipment.

 


Requirements for functional equivalence to conscious processing?
by DaltonG (General AI Discussion)
November 19, 2024, 11:56:05 am
Will LLMs ever learn what is ... is?
by HS (Future of AI)
November 10, 2024, 06:28:10 pm
Who's the AI?
by frankinstien (Future of AI)
November 04, 2024, 05:45:05 am
Project Acuitas
by WriterOfMinds (General Project Discussion)
October 27, 2024, 09:17:10 pm
Ai improving AI
by infurl (AI Programming)
October 19, 2024, 03:43:29 am
Atronach's Eye
by WriterOfMinds (Home Made Robots)
October 13, 2024, 09:52:42 pm
Running local AI models
by spydaz (AI Programming)
October 07, 2024, 09:00:53 am
Hi IM BAA---AAACK!!
by MagnusWootton (Home Made Robots)
September 16, 2024, 09:49:10 pm
LLaMA2 Meta's chatbot released
by spydaz (AI News )
August 24, 2024, 02:58:36 pm
ollama and llama3
by spydaz (AI News )
August 24, 2024, 02:55:13 pm
AI controlled F-16, for real!
by frankinstien (AI News )
June 15, 2024, 05:40:28 am
Open AI GPT-4o - audio, vision, text combined reasoning
by MikeB (AI News )
May 14, 2024, 05:46:48 am
OpenAI Speech-to-Speech Reasoning Demo
by MikeB (AI News )
March 31, 2024, 01:00:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am

Users Online

404 Guests, 0 Users

Most Online Today: 597. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles