What are the community's thoughts on a Haskeller's critique of PureScript?

I mean, it was one comment. I left formal education at 16 but have been a core contributor to the language/compiler/libraries since 2014, I’m not aware of anyone holding it against me.

5 Likes

Please don’t lock the thread. I’d like to eventually follow-up with a tris rewrite.

I don’t understand, if you have something new to talk about, you can make a new thread right? One that isn’t based on providing traffic to something like this blog post?

Note, I am not a moderator of this forum, so I can’t lock anything.

1 Like

Do you think that it’s bad that purescript is discussed despite the tone? You’re even here taking it like stellar demonstrating great tolerance as a community. Whatever bad you may feel by reading it, it passes. You told me it’s in condescending tone and I’ve listened to you.

Though that post about IDE really sounds like a good idea. I’ll write it with a better tone. The experience of trying to compile&test stuff without anything else but Vim alone, and spago, bit of contributed to it all.

If we can keep the conversation polite and focus on constructive questions about the language then I’m ok with it continuing here. If you do write a followup, @cheery, I encourage you to make a new thread and keep in mind that PureScript contributors do read these pieces and it can have an emotional impact.

4 Likes

Hello all. I’ve been watching this thread as it has developed, but have been unable to respond sooner. I apologize for that.

First, I apologize to you, @cheery. It is my understanding that you wrote your post as a way to build a Tetris-like game. During that process, you used PureScript and likely got frustrated at it because it wasn’t like Haskell. Thus, many of your critiques against PureScript were likely written in frustration and/or anger. Something to the effect of “Ugh! Why does PureScript work THAT way? Why not THIS OTHER way!?” When I read your post, I walked away from it thinking that this person was dismissive and critical of PureScript. It seemed like there was nothing good about PureScript. I don’t think that post fairly represents who you are. Rather (and as you admit in a comment above), I imagine that it represents someone who is likely venting their frustration/anger.

My goal in starting this thread in the first place was to identify the critiques you made and ask whether there was any weight to them. Even if it did bother me that the tone wasn’t as friendly as it could be, I didn’t want to dismiss the critiques inside the post. However, I could have been more respectful towards you. Rather than quoting your venting verbatim, I could have summarized the critiques you made and repackaged them in a better format, one that was honestly just asking for clarifications on these matters.

Second, I apologize to you, @natefaubion, @hdgarrood, @garyb, other core contributors who read this thread but perhaps did not participate, and those who have invested hours into making PureScript better overall. Posts that are hostile and find fault in the things on which you have worked for years and in which you have invested your love are particularly draining and discouraging. By not repackaging the critiques in a more friendly way, I needlessly spouted negativity your way. There are no doubt many other more important things to spend your time and energies on, but I stole some of that by turning this into an issue.

To both parties, I ask for your forgiveness.

10 Likes

Hi @cheery, i’m the (only) person who used the term auto-didact, i have nothing at all against auto-didacticism, quite the reverse. When i write “classic auto-didact” i’m really referring to a tendency for some people - unfortunately i’ve seen a lot of them in the thirty years i’ve been in online programming communities - who prefers to write a multi-thousand word complaint about some open source project rather than engage constructively with it via, for example Slack, Reddit or this Discourse (or even Github issues).

If this doesn’t describe you, i apologize and look forward to a better engagement in future.

all the best, Andrew

1 Like

You really hit the point there then. I’ve written plenty of complaints like these into this same blog. It is rare that I otherwise engage with communities. Also it’s not all good or even correct. I haven’t been always ready to discuss the topics I’ve been writing about. There are communication skills I have had to learn to get there.

Many of these subjects would easily be #wontfix due to them not being easy to fix. Also most of my complaints are unconstructive. Dunno are they even in the right place there? I guess part of the outrage is due to the enticing title and wet rag that waits on the other side. In other hand I thought the *tris is pretty cool and make up for all that.

I’m studying for writing a new programming language. I know this is a response to a bit of arrogance I left into the post. Yup! I’m doing that and thinking I’m passing by Purescript. I believe it’s probably variations of Haskell/Purescript what all programming languages will look like in 10 to 20 years.

I’m glad to see some mutual understanding here about what acceptable engagement looks like for PureScript – namely, that constructive criticism is welcome and that tone and kindness matter; a post that uses aggressive language probably won’t get a constructive response here even if some or all of the criticism is useful. But posts that describe the experience of using PureScript (including issues) are still welcome.

Fortunately, this thread has not been escalating and so I don’t think it’s necessary to close the topic. That said, it is probably best to bring this conversation to an end and to open a new thread to discuss any of the technical points that folks want to talk about.

Also – to anyone in this thread not already on it – I do encourage you to join the #purescript Slack channel – it’s a great place to ask one-off questions about some of what came up in the original blog post!

I’m pleased this conversation could happen without becoming heated, as is so common in online communities. Thanks to everyone for keeping things civil.

8 Likes

…hmm

I’ve spent a lot of time and efforts compiling different FP languages into dynamic ones like Python, Ruby, Julia.

I still remember the FFI of Idris1, which is quite similar to the post owner’s proposal. I recall how annoying it is in practice.

foreigh import in PureScript does not mean import things from a javascript or any other file with the same filename as the purescript module. It just tells the compiler that there is an external API, in some type, as the provider of an alternative backend, you can later implement your expected and concrete protocols.

something like the following

import FFI.Javascript (Function, Double, Inline)
import FFI.C.xxx

It’s harmful.

This specifies many details in purescript, however those details are always understood better by the backend language.

This proposal makes it

  • much harder for alternative backend providers to implement their wanted protocols, and they might not want to do this in purescript.

  • require implementing some analysis of the backend in purescript, hence difficult and cumbersome, and even redundant and unrealistic. For the Py backend, I implemented foreign import details in Py, because I need to access Python’s dynamic import mechanism and tools from stdlib. Implementing them in PureScript is seemingly impossible, at least too hard and can get rid of.

  • much harder for users to learn about your FFI.Backend's APIs.

I remember that I’ve given my appreciation in this discourse somewhere, for how elegant, intuitive and simple the PureScript FFI has been. It brings immediate flexibility for making alternative backends.

3 Likes

p.s
(I personally prefer overloading literals, because I want to emulate dependent types with this syntax: Matrix Number 3 4

Sorry I cannot stop myself from making another post…

Is this a joke?

Had to check how it works. I remember I didn’t like it either. The following is from their FFI reference.

do_fopen : String -> String -> IO Ptr
do_fopen f m
   = foreign FFI_C "fileOpen" (String -> String -> IO Ptr) f m

It’s the same problem there. The notation confuses Idris types to C types there, except that it’s doubles down by an additional type annotation.

I don’t insist that the type information should be declared in the Purescript file. For Lever I used my own CFFI generator. It read the declarations from the file. If I were to work on this again I would keep the .json file shaped like the C header was structured and adjust the mapping on the other side so that it could be used in conjunction with any language.

Little snippets from the libSDL2.json, these only encode C-side:

"DropEvent": {
  "fields": [
    ["type", "uint"], 
    ["timestamp", "uint"], 
    ["file", "ubyte*"]
  ], 
  "type": "struct"
}

Here’s an another one:

"AllocPalette": {
  "name": "SDL_AllocPalette", 
  "type": {
    "argtypes": ["int"], 
    "restype": "Palette*", 
    "type": "cfunc", 
    "vararg": false
  }
}, 

Then you need a third structure that relates different language’s types together. That is, this is how it’d go logically. Those structures in different languages aren’t the same things.

I’ll probably see how Purescript’s FFI works in practice. It’s probably not the first thing in a bunch that I look at though.

I get the attraction to row polymorphism but also find it entirely superfluous. At least the implementation did seem to work well.

I remember getting started and being really frustrated but have ended up really liking it.

@BebeSparkelSparkel The Purescript language, or the post? Either way I’m glad that you like.

@cheery the language. I thought the post was a farce.

@BebeSparkelSparkel :sweat_smile: All right, I guess the next one I’ll write about Purescript will be better than this.

@cheery I had the same experience of being super pissed off at most of the same things you were. I get it.

2 Likes