On Friday, November 7, 2014, Marcus Denker <[hidden email]> wrote:
well I don't know but i tried to post to the top level simon dimon himon and i got this error message that i am unknown and that if this condition persisted i should send a message to the postmaster so after failing over a couple times to figure out how to do that it
|
In reply to this post by kilon.alios
On Friday, November 7, 2014, kilon alios <<a href="javascript:_e(%7B%7D,'cvml','kilon.alios@gmail.com');" target="_blank">kilon.alios@...> wrote:
bravo i like it so i looked up some more about monads and the teacher said no it was another teacher but i can't find him now something that is really sticking in my head he said something like he said the state changes are in the monads they are localised in the monads like we stick the dangerous bits into a seperate Package ( info ) so we know where they are the pure functions defined outside of the monads are not really pure ( my take ) they are definitely manipulating state
|
something happened
gmail just blew a main spring so continuing from below above like we stick the dangerous bits into a seperate Package ( info ) so we know where they are the pure functions defined outside of the monads are not really pure ( my take ) they are definitely manipulating state but the state is hidden inside the pipes inside the pure functions and no global variables or other places where state hangs out can be accessed from in there the bind >>= and return functions are confusing but >>= takes in a Monad m with a data value a in it m a and also a function [ :a | m ( a message ) ] <---[ mixing metaphors languages ] and returns a Monad m a' to the next >>= in line. So the a is taken out of the Monad m and manipulated by a pure function I'm guessing namely the function #message which is pure or can be pure and then the data a is put back into the Monad m and m is passed to the next >>= bind in line return is like takes in a data a and returns m a so the function [ :a | m ( a message ) ] is actually [ :a | ( a message ) return ] or [ :a :monad | ( a message ) return: monad ] so this is all optimized by the compiler down into native code. So to get away from this >>= bind nonsense the compiler has a do { s1 ; s2 ; s3 ; s4 ... } which gets translated by a preprocessor into ( ( ( s1 >>= s2 ) >>= s3 ) >>= s4 ) ... where s1 returns an m a and the si have the form [ :a | ( a messagei) return: m ] another gmail blow out I can't see what I am typing I'm typing blind oh well snow blind On Tuesday, November 11, 2014, Kjell Godo <[hidden email]> wrote:
|
so i do start to think Smalltalk might suffer from a
random state problem which as you say is greatly made a lot lot lot easier by coding in the debugger and mass test driven development on LIVE OBJECTS which hide the state. but the state is still in there and a method ffffff that takes in data1 at time t0 and returns data2 and then at time t1 does data3 := data1 ffffff where ( data1 isNotEquivalentTo: data3 ) causes the ability to reason about ffffff to get a lot harder so that automated and manual proof methods refuse to halt. On Tuesday, November 11, 2014, Kjell Godo <[hidden email]> wrote: something happened |
so I'm saying
what if we use Haskell to make Smalltalk better. what if we use something like lambda lisp which is a merger of Smalltalk and Lisp and used it as syntactic sugar on top of ghc = Haskell by sticking this TFTruthHaskell into a tree based code editor pane which prevents common syntax errors by not allowing them to happen and stick the native ghc output into the CompiledMethod and create a new Smalltalk which has the best of both worlds Smalltalk Lisp and Haskell this also gives the ability to do Lisp macros. And it will be fast. blazing fast me buckos. Ok so it's strongly typed. But we can bend that nonsense and create a new Smalltalk that has a live image and live Objects ( don't ask me ) just like in real Smalltalk but is blazing fast native and it's good sales marketing to increase mindshare because it is strongly typed. who's with me Gentlemen! ok I'm out On Tuesday, November 11, 2014, Kjell Godo <[hidden email]> wrote: so i do start to think Smalltalk might suffer from a |
In reply to this post by Andreas Wacknitz
Thank you for the detailed reply Andreas
Are there any Smalltalk packages implementing Category Theory based functional programming constructs for function composition like functors , applicatives , monads , arrows , etc ? Do people have opinions about whether or not these plus immutable data structures would be good for managing state in Smalltalk like they do it in Haskell etc? i know that monads are not built into Haskell but are implemented as addons via Haskell packages. My Haskell friend said all you need to do functional programming is first class functions which Smalltalk Block contexts almost are except they lack their own stack? if you wrap a Block in a Function Object do you then get the stack effect so you can essentially call the Block recursively? i have been wondering about taking a crack at implementing these in Smalltalk and i wonder if it would be theoretically possible to speed them up by inlining them via the Smalltalk compiler Thank you On Saturday, November 8, 2014, Andreas Wacknitz <[hidden email]> wrote:
|
> On 06 Jul 2015, at 15:16, Kjell Godo <[hidden email]> wrote: > > Thank you for the detailed reply Andreas > > > > Are there any Smalltalk packages implementing > > Category Theory based > > functional programming constructs > > for function composition like > > functors , applicatives , monads , arrows , etc ? > > > > Do people have opinions about whether or not > > these plus immutable data structures would be good for managing state > > in Smalltalk like they do it in Haskell etc? i know that monads are not built > > into Haskell but are implemented as addons via Haskell packages. > > My Haskell friend said all you need to do functional programming is > > first class functions > > which Smalltalk Block contexts almost are except they lack their own stack? > > if you wrap a Block in a Function Object do you then get the stack > > effect so you can essentially call the Block recursively? The following article: Lambda Calculus in Pharo Yes, the Y Combinator is useful in normal programs https://medium.com/concerning-pharo/lambda-calculus-in-pharo-a4a571869594 touches on some of the options in this area, answering some of your questions. TL;DR - Pharo blocks are real lambdas/closures. > i have been wondering about taking a crack at implementing these > > in Smalltalk and i wonder if it would be > > theoretically possible > > to speed them up by inlining them via the Smalltalk compiler > > > Thank you > > > > On Saturday, November 8, 2014, Andreas Wacknitz <[hidden email]> wrote: > >> Am 07.11.2014 um 16:51 schrieb Kjell Godo <[hidden email]>: >> >> This is off topic. >> >> I tried to post it as a top level thread but I have become unknown. > Why do you expect that? Many people here are using Smalltalk for years. > Just because you have been silent for some time doesn’t mean everybody will forget about you :) > >> >> I don't know if you want this crap in here but I have decided not to wait for the >> >> postmaster to get back to me on the subject of becoming known. Feel free. >> >> >> >> >> >> ( Original-SUBJECT: "( picoVerse-:( what about state , is state really evil? ) )" ) >> >> >> >> >> >> >> I am a Smalltalker. >> >> But in the past few months i have been running with the Haskellers. >> >> The Haskellers hate state. >> >> This seemed strange at first because as a Smalltalker i love(d) state. State iswas my friend. >> >> 90% of my life as a Smalltalker is state wrangling. I am a state herder. >> >> The debugger is my staff I use to whack the state. And TestCase is my sheep dog. >> >> But to the Haskellers >> >> state is >> >> the evil trinity >> >> of >> >> satan the anti christ and the false prophet >> >> all rolled into one. >> >> State is the true dev incarnation of the total catastrophe of development Armageddon. >> >> Blood up to the bridles for hundreds of miles. Dogs and cats living together. Mass hysteria. >> >> They say. >> >> I'm not sure i quite get it yet but they keep preaching on this one point most of all. >> >> State is evil. >> >> You must keep all state in a Monad. As many methods/functions m as possible >> >> must be 100% dependent on the input parameters ONLY. >> >> No hidden instance variables affecting the return value of m are allowed. >> >> The only effect m can have is to return a value. >> >> If all this is true then m is pure. >> >> And pure is good. Pure is very good. And the wind says >> >> very. >> >> So i wonder if any of you fellow >> >> Smalltalkers >> >> have thought about this at all. > First, there are no good definitions of what is an object oriented language and what is a functional language. > Thus, languages like C++, C#, Java are being considered object oriented. But their object orientation is not the same like Smalltalk’s. > The same problem exists in the functional language world: Some consider LISP being functional, some deny that. > > Second, for some years I am constantly seeking for „the best“ language to solve my problems in. Alas I wasn’t successful yet and don’t expect > to be successful in the future. Every programming paradigm has its strengths and weaknesses when it comes to real world problems. > So in my eyes it is best to know the different programming paradigms and its representative languages in order to be able to choose the > best fitting language for your problem at hand. > > Third, there have been many attempts to create multi-paradigm languages (like C++, C#, Java, Scala, …). The idea behind is simple: combine > the best characteristics. In my eyes all of them failed because what always have been created is Frankenstein’s monster. When you combine > paradigms you will may get some advantages of all but sure you will get a lot of additional complexity. > > Fourth, it has been said many times before: What makes Smalltalk so nice is not only the language. It’s the whole system: the language, duck typing, > the image (object world), the tools, the VM, the simplicity, the elegance, … And last but not least the communities around. > > Regards > Andreas > > PS: If you are interested in functional programming and don’t like static typing you should have a look at Clojure. It has some nice ideas about > how to deal with state concurrently. > > > >> Thanks >> >> Kjell E Godø >> >> >> >> >> >> >> >> >> >> (((((((((( Maybe Smalltalk should be called Statewalk >> >> as in yak it up fuzz ball. )))))))))) >> > |
In reply to this post by Kjell Godo
Hi Kjell,
I recommend spending some time reading the code for the core execution classes and the compiler, and running examples interactively to learn how the system works. It's a fun process and well supported by the tools. Remember that the debugger includes a meta circular interpreter for executing the system's bytecode, and that the compiler compiles source to bytecode in the firm of CompiledMethod instances you can inspect, decompile and list their bytecode. All the questions you have above you can answer for yourself by running examples and using the tools to observe what happens. This is a route to mastering the system; IMNERHO the best.
Eliot (phone)
|
In reply to this post by Kjell Godo
Object Orientation
seems to freak out most Haskell programmers. They are opposed to it. They have never tried Smalltalk. They see OOP as bad practice in the languages they have seen it in and say it promotes chaotic program behaviour and unmaintainable software that is brittle and full of costly bugs. They have never tried Smalltalk and some are a bit bewildered when i say Smalltalk is usually very stable. i just wonder if functional state management would make Smalltalk development faster and less Chaotic and how you could marry OOP and functional and if you did then how would you do it how can the concepts of functional and OOP be combined is my question what are all the concepts and how can they be combined because i do think that perhaps Smalltalk development is slowed down and made more Chaotic and unmaintainable by mutable data in Objects so in order to correct this in my opinion the first step would be to create immutable Objects my Generator package i published for Pharo is perhaps an example of how immutable sequences can be done in Smalltalk but the basic idea is that you create new Objects that link into the pieces of old ones instead of mutating the old ones no instance variables can be rebound once they have been bound ok so this boggles the mind a bit but they swear by it in Haskell so what exactly are the Haskellers talking about? and can it be applied to Smalltalk to Smalltalk's benefit? On Monday, July 6, 2015, Kjell Godo <[hidden email]> wrote: Thank you for the detailed reply Andreas |
i cannot seem to find this generator package on SmalltalkHub and i wonder where it could be On Monday, July 6, 2015, Kjell Godo <[hidden email]> wrote: Object Orientation |
Haskell fits well for those, who wants a proof instead of solution. -- Best regards,
Igor Stasenko. |
In reply to this post by Eliot Miranda-2
On Monday, July 6, 2015, Eliot Miranda <[hidden email]> wrote:
is there any tutorial? how do i do this?
|
is there anybody
here who knows both Haskell and Smalltalk ? Can Smalltalk benefit from functional ideas and Haskell's ideas about Immutability Currying Function composition and the State and IO Monads ? I like the way Haskell is now based on Category Theory which is the mathematics of function composition . Haskell was not always thus it had a pre Category Theory epoch . which apparently was a UM or Ugly Mess . Can these ideas be applied to Smalltalk? And would it be good? Can Smalltalk have a way of making a framework that has an API and is statically typed inside using a Haskell like type system?
On Saturday, August 1, 2015, Kjell Godo <[hidden email]> wrote:
|
We will kick you out if you send crap to this list.
One more mail like that and you are out.
|
In reply to this post by Andreas Wacknitz
On Saturday, November 8, 2014, Andreas Wacknitz <[hidden email]> wrote:
I had an idea BorgLisp where different dialects of Lisp coexist in a single language and these dialects can be combined as in the Cola and Maru languages developed by Alan Kay's institute . Hopefully this would satisfy your objection to multi paradigm languages because each dialect is pure in itself and can be combined with another dialect or left alone and used by itself . And there would be Lisp dialects made that are isomorphic to all the existing languages like C C++ C# Java Scala Clojure Prolog Haskell Lua CommonLisp Scheme Perl Smalltalk etc And all these Lisp dialects can be combined like in Cola but like ... ( haskell-- ...AHaskellLispDialectExpression... ) ... which can have other dialects inside or be used in its seperate pureness and Haskell like category theories of composition
across all the dialects image based or generating seperate small executables This kind of a manoeuvre is designed to kill off the original languages eventually by assimilation into the BorgLisp collective each isomorphic language dialect need not be as phabulous as its original inspiration as whatever it lacks can be gotten from one of the other dialects so not isomorphic but subset isomorphic or isomorphic to a subset of the original language these isomorphic dialects are designed like sirens to drive programmers of those languages mad with desire so they get ship wrecked on the rocks of their dialect in the BorgLisp pleasure dome never to return to what do you object to that kind of thing how can Smalltalk mix with anything else? that's oil and water? BorgLisp is image based but it can generate seperate executables it can generate itself using the Cola Maru bootstrapping process to what do you object? how should it be modified
|
I have removed the sender from the list.
The pharo board decided already last year (from the time when the mails that he is answering now) were written that these emails are just disturbing our work, with no positive value whatsoever. Marcus
|
Free forum by Nabble | Edit this page |