• More philosophy about declarative programming and imperative programmin

    From World90@21:1/5 to All on Mon May 31 17:02:46 2021
    Hello,


    More philosophy about declarative programming and imperative programming
    and object oriented programming..

    I invite you to read the following interesting webpage from wikipedia
    about declarative programming:

    https://en.wikipedia.org/wiki/Declarative_programming

    I think that declarative programming is too much abstraction
    since Functional programming is declarative programming that attempts to minimize or eliminate side effects by describing what the program must accomplish in terms of the problem domain, rather than describe how to accomplish it as a sequence of the programming language primitives (the
    how being left up to the language's implementation). This is in contrast
    with imperative programming, which implements algorithms in explicit
    steps. So declarative programming like functional programming generally
    uses higher levels of abstractions than imperative programs or OOP. That
    is, they’re further away from describing what’s actually happening in
    the computer or lower level layers of programming, so i think that
    declarative programming like functional programming is too much
    abstraction that lacks understanding of the lower level layers of
    programming that is also very important to know so that to become
    efficient, so i think that this way of too much abstraction or/and too
    much centralization of cloud computing like of Amazon or functional
    programming and such look like the old way of too much centralization
    and too much abstraction of the mainframe computer that was lacking on efficiency, so then we have to know how to "balance" so that to be
    efficient.

    More philosophy about functional programming and more..

    I think that the Delphi List Monad and the Delphi Maybe Monad that i am
    giving below are not slower and they are working correctly.

    I think i am smart and i understand the objections of neo-Nazism and
    white supremacism, but i think that neo-nazis and white supremacists are
    not thinking correctly, because there way of thinking there racial
    superiority is not the correct way simply because they are not taking
    correctly into account the exponential progress of our humanity,
    since i am convinced that with this exponential progress of our humanity
    we will soon (in about 20 years or 30 years from now) be able to enhance
    much more our genetics and become much more smart
    or much more beautiful and we will soon be able to do much more
    than that because we will soon become so powerful because of this
    exponential progress of our humanity, so this is why i am not in
    accordance with white supremacism and neo-nazism since they have to
    adapt to this exponential progress of our humanity.

    More philosophy about the exponential progress and about artificial intelligence..

    I think i am smart and i think that we are going to become so powerful
    soon, i mean that this exponential progress of our humanity is an
    amazing thing, and i think that with this exponential progress,
    artificial intelligence too will soon become so powerful soon, so i
    think that the most important thing now is not to ask if we are going to
    become so powerful soon, but the most important thing it is that we have
    to ensure high "safety" or high "reliability" of this process of
    becoming so powerful by for example being a sophisticated philosophy.
    And i invite you to look at the following video so that to understand
    this exponential progress of our humanity:

    Exponential Progress: Can We Expect Mind-Blowing Changes In The Near Future

    https://www.youtube.com/watch?v=HfM5HXpfnJQ&t=144s

    More philosophy about artificial intelligence and about the objective
    function that guides..

    I think i am smart, and i have quickly thought about the objective
    function of artificial intelligence that guides, so the important
    philosophical question in artificial intelligence is:

    Is general artificial intelligence possible and what is the the
    objective function that guides general artificial intelligence ?

    I think that the objective function of general artificial intelligence
    is not the same as a gradient descent with wich we optimize, since i
    think that the objective function in artificial intelligence is
    that we have to build like a model that approximate the result
    of the reality, i mean that the objective function of general artificial intelligence has to be that we measure the meaning with the previous
    meanings from the data, and this way we approximate the meaning, so we
    have to build much more meanings and meaning from the data and we have
    to measure the unknown meaning with the previous meanings and if it
    doesn't approximate well, so it is like a baby that doesn't know about
    the meaning and it can become a dangerous environment for the baby like
    for general artificial intelligence, and my way is also valid in a
    distributed environment with many artificial intelligence robots, so i
    think that the more localized artificial intelligence will become
    incrementally and rapidly a more and more generalized artificial
    intelligence that can approximate a general artificial intelligence, so
    i think that general artificial intelligence is possible.

    More philosophy about Swarm intelligence and about the too much
    abstraction and more..

    I invite you to read about Swarm intelligence here:

    How Swarm Intelligence Is Making Simple Tech Much Smarter

    https://singularityhub.com/2018/02/08/how-swarm-intelligence-is-making-simple-tech-much-smarter/

    I think that humanity is using "specialization" and the "division" of
    labour that reduces complexity so that to be efficient, so our evolution
    looks like Swarm intelligence algorithms, since Swarm intelligence
    algorithms also have to both explore with a bigger size of the
    population of the Swarm intelligence algorithms and have to do
    exploitation so that to reduce complexity and be efficient, and this
    bigger size of of the population in Swarm intelligence algorithms that
    explore is the division of labour that we use and it is also a
    specialization and it looks like a divide and conquer algorithms, since
    notice in the mergesort algorithm that we are reducing the time
    complexity from for example a time complexity of an n^2 sorting
    algorithm to n*log(n), and you are noticing it clearly since the
    mergesort algorithm reduces much more the time complexity by recursively "dividing" the array of elements so that to obtain a small arrays that
    are already sorted(or we can sort the small arrays of 10 elements by
    using an algorithm of sorting of n^2 and it will be more efficient), and
    notice that when we obtain those small arrays that are already sorted,
    it is what reduces the complexity and brings much more efficiency, since
    we are recursively using the merge algorithm after that, and notice that
    the mergesort is also like Swarm intelligence since when we recursively
    divide and obtain the already sorted arrays, notice that this
    recursively dividing leads to many already sorted arrays, and it is like
    the bigger size of the population in Swarm intelligence that explore and
    that leads to high efficiency, so i think that artificial
    intelligence must be like a divide and conquer algorithm, so you divide
    like in a Divide and conquer algorithm so that to obtain a high quality
    or high efficiency since you reduce complexity, so it looks
    like PathNet in artificial intelligence, read my following thoughts
    about it:

    https://groups.google.com/g/alt.culture.morocco/c/BKGvkTI5FY4

    More philosophy about black box models and too much abstraction..

    I think that black box models in AI in deep learning etc. are also too
    much abstraction, and speaking about the too much abstraction, i invite
    you to read my following thoughts of my philosophy about Liberalism of
    the philosopher and economist Adam Smith:

    https://groups.google.com/g/comp.programming.threads/c/-UEOsak12mM

    So as you are noticing from my thoughts in the above web link that the
    economic Liberalism of Adam Smith is a too reductionist system that is
    too much abstraction that doesn't work correctly and i am explaining it
    in my thoughts above of my philosophy, other than that notice that
    economic Liberalism of Adam Smith is not even taking into account an
    important factor that i am speaking about in my below thoughts and it is
    the too much abstraction that can happen in economy and that can lead to inefficiency, so as you are noticing that this too much abstraction can
    not be based on monopolistic practices, but it can lead to inefficiency,
    i mean for example when you abstract too much, the others can not be
    able of understanding sufficiently and correctly the inside or the
    behind of your abstraction, so they can "lack" understanding and be inefficient, so we have to be careful about cloud computing of Amazon
    and such that can become a too much abstraction that leads to this kind
    of inefficiency, so i think it is too much abstraction if you program
    the software in a too high level way lacking programming and
    understanding of the lower level ways of programming.

    More philosophy about abstraction and the Divide and Conquer methodology..

    I think that humanity is abstracting much more with cloud computing and
    with functional programming and such, but since i think i am a
    philosopher, there is a question in philosophy and it is the following:

    Is abstraction always good ?

    I think that abstraction comes with disadvantages and advantages,
    so the best way is to know how to balance, it is like balancing between Evolutionary design with an agile discipline and Planned design since
    they both come with disadvantages and advantages, abstraction comes with
    an important disadvantage , and it is that it can become a monopolistic practice, i mean that when you abstract, the others can become too
    dependent on your abstraction and they can not understand the inside of
    the abstraction, so they can become inefficient, so we have to be
    careful about abstraction since too much abstraction is not good, so i
    think that functional programming is too much abstraction and i think
    Chapel is too much abstraction, read here more about Chapel:

    WILL CHAPEL MARK NEXT GREAT AWAKENING FOR PARALLEL PROGRAMMERS?

    https://www.nextplatform.com/2018/04/10/will-chapel-mark-next-great-awakening-for-parallel-programmers/

    I have just posted previously my thoughts about continuation—passing
    style (CPS) and Monads, here they are:

    https://groups.google.com/g/alt.comp.lang.borland-delphi/c/kdP6YSTcjj4


    And here is the List Monad in Delphi that works correctly:


    program List_monad;

    {$APPTYPE CONSOLE}

    uses
    System.SysUtils;

    type
    TmList = record
    Value: TArray<Integer>;
    function ToString: string;
    function Bind(f: TFunc<TArray<Integer>, TmList>): TmList;
    end;

    function Create(aValue: TArray<Integer>): TmList;
    begin
    Result.Value := copy(aValue, 0, length(aValue));
    end;

    { TmList }

    function TmList.Bind(f: TFunc<TArray<Integer>, TmList>): TmList;
    begin
    Result := f(self.Value);
    end;

    function TmList.ToString: string;
    var
    i: Integer;
    begin
    Result := '[ ';
    for i := 0 to length(value) - 1 do
    begin
    if i > 0 then
    Result := Result + ', ';
    Result := Result + value[i].toString;
    end;
    Result := Result + ']';
    end;

    function Increment(aValue: TArray<Integer>): TmList;
    var
    i: integer;
    begin
    SetLength(Result.Value, length(aValue));
    for i := 0 to High(aValue) do
    Result.Value[i] := aValue[i] + 1;
    end;

    function Double(aValue: TArray<Integer>): TmList;
    var
    i: integer;
    begin
    SetLength(Result.Value, length(aValue));
    for i := 0 to High(aValue) do
    Result.Value[i] := aValue[i] * 2;
    end;

    var
    ml1, ml2: TmList;

    begin
    ml1 := Create([3, 4, 5]);
    ml2 := ml1.Bind(Increment).Bind(double);
    Writeln(ml1.ToString, ' -> ', ml2.ToString);
    readln;
    end.


    Output:
    [ 3, 4, 5] -> [ 8, 10, 12]


    Thank you,
    Amine Moulay Ramdane.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)