Haskell

151 views
Skip to first unread message

Josh Rubin

unread,
May 14, 2019, 11:23:37 AM5/14/19
to Racket Users
It just occurred to me that Haskell could be a powerful way to manipulate programs in other languages (like Scheme or Racket). Unfortunately, I don't know Haskell. Has anybody been down this path?
-- 
Josh Rubin
jlr...@gmail.com


John Clements

unread,
May 14, 2019, 2:40:21 PM5/14/19
to Josh Rubin, Racket Users
Hmm… While I certainly agree that functional languages are good at manipulating program representations, this job (manipulating programs) is more or less *the one thing* that Racket does better than any other language. So… I guess I’d be more likely to use Racket to manipulate Haskell programs than vice versa. Of course, your mileage may vary… :)

John Clements
> --
> You received this message because you are subscribed to the Google Groups "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/d2961559-f8af-c6d0-15e1-9c20b3dab959%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.



Tom Gillespie

unread,
May 14, 2019, 4:04:33 PM5/14/19
to John Clements, Josh Rubin, Racket Users
Hackett comes to mind, but that might be going in the opposite direction of what you are thinking.

Matt Jadud

unread,
May 14, 2019, 9:36:52 PM5/14/19
to Josh Rubin, Racket Users
The last time I saw a colleague sit down to write a compiler in Haskell, they first had to do a bunch of heavy lifting to get the type system to play along sensibly.


Your mileage may vary. I'd just use Racket. (See John's note.)

Cheers,
Matt

David Storrs

unread,
May 15, 2019, 12:42:31 PM5/15/19
to Josh Rubin, Racket Users
What specific feature does Haskell offer that makes you select it for this purpose as opposed to a different language?  It's possible that some other language (e.g. Racket) offers that feature and also others.

On Tue, May 14, 2019 at 11:23 AM Josh Rubin <jlr...@gmail.com> wrote:

Josh Rubin

unread,
May 15, 2019, 1:26:51 PM5/15/19
to David Storrs, Racket Users
Type inference; laziness as the default; the language forces me to think in a different way than racket (or scheme) makes me think.

The examples I have seen have a breath-taking level of abstraction that appeals to the mathematician in me.

-- 
Josh Rubin
jlr...@gmail.com


Matthias Felleisen

unread,
May 15, 2019, 2:14:40 PM5/15/19
to Josh Rubin, David Storrs, Racket Users


> On May 15, 2019, at 1:26 PM, Josh Rubin <jlr...@gmail.com> wrote:
>
> Type inference; laziness as the default; the language forces me to think in a different way than racket (or scheme) makes me think.
>
> The examples I have seen have a breath-taking level of abstraction that appeals to the mathematician in me.


That’s precisely why developers don’t really take to it.

Siddhartha Kasivajhula

unread,
May 16, 2019, 4:16:29 AM5/16/19
to Josh Rubin, Racket Users

Though, as others have said, this sounds like a more typical usecase for racket.


Geoffrey Knauth

unread,
May 16, 2019, 1:17:20 PM5/16/19
to Racket Users
On Tuesday, May 14, 2019 at 11:23:37 AM UTC-4, Josh Rubin wrote:
It just occurred to me that Haskell could be a powerful way to manipulate programs in other languages (like Scheme or Racket). Unfortunately, I don't know Haskell. Has anybody been down this path?

As John Clements said, Racket does this better than any other language.

I'm no Haskell expert. Some of the people on this list are.
My primary motivation for learning more Haskell is to make my Scala code better.
We write a lot of Scala at work, because we have a lot of legacy JVM libraries(jars), and Scala is much more fun and to the point than Java.

Racket's macro system is the best I've seen in my lifetime (58.962 years so far).
With that macro system you can do anything that I've ever needed to do and much more.
My main use of the macro system these days is to define DSLs (domain-specific languages) useful to meteorologists.
The art in that is to figure out how to seduce meteorologists into craving the DSLs.
The art of seduction is knowing what people want and giving it to them.
I'm overstating the seduction part, but getting people to use your stuff is the hardest puzzle to solve.
That puzzle is much easier to solve in Racket than it is in Haskell, however powerful Haskell's type wizardry.

Geoff
Reply all
Reply to author
Forward
0 new messages