r/purescript • • Jan 10 '22

The world's shortest complete monadic parsing tutorial

18 Upvotes

Read the world's shortest complete monadic parsing tutorial in the Quick Start section of the README for purescript-parsing https://github.com/purescript-contrib/purescript-parsing#quick-start


r/purescript • • Dec 10 '20

Take the State of JS Survey (PureScript is included!)

Thumbnail
discourse.purescript.org
18 Upvotes

r/purescript • • Jun 10 '20

WebCheck -- generative testing for web GUIs

Thumbnail
webcheck.tools
18 Upvotes

r/purescript • • Jun 21 '19

Real World PureScript workshop from Monadic Party

Thumbnail
discourse.purescript.org
18 Upvotes

r/purescript • • May 03 '19

Academic / theoretical basis of the PureScript type system

Thumbnail
discourse.purescript.org
18 Upvotes

r/purescript • • Jul 18 '18

Type-safe, Type-level, Type-driven solutions with PureScript (slides from FEDC Taiwan)

Thumbnail
speakerdeck.com
18 Upvotes

r/purescript • • Dec 26 '17

Elm architecture examples with purescript-spork

Thumbnail
github.com
18 Upvotes

r/purescript • • Sep 29 '17

Writing a Simple REST Service in Purescript

Thumbnail
abhinavsarkar.net
18 Upvotes

r/purescript • • Sep 03 '17

Automatically create reactive web interfaces from type signatures

Thumbnail sharkdp.github.io
18 Upvotes

r/purescript • • May 05 '17

PureScript numeric hierarchy guide

18 Upvotes

Following on from https://www.reddit.com/r/purescript/comments/5y0y60/im_writing_an_introduction_to_the_mathematics/ I've decided to start sharing links to my guide to the mathematics behind the numeric type classes in Prelude: namely, Semiring <= Ring <= CommutativeRing <= EuclideanRing <= Field.

Enjoy: https://a-guide-to-the-purescript-numeric-hierarchy.readthedocs.io/en/latest/ Please also feel free to share this link with anyone who you think might be interested.

It's not quite done yet, I still want to write chapters on e.g. the EuclideanRing and Field classes, but there's plenty there already to get your teeth into. Feedback is very welcome (see the introduction).


r/purescript • • Apr 05 '17

What are you using PureScript for?

18 Upvotes

This is a continuation of the previous thread, but I thought we could make it a little more general.

Do you have an interesting PureScript project that you'd like to share?


r/purescript • • Jan 24 '16

Try Thermite!

Thumbnail paf31.github.io
18 Upvotes

r/purescript • • Apr 07 '15

slamdata/purescript-halogen - A declarative, type-safe UI library

Thumbnail
github.com
18 Upvotes

r/purescript • • Mar 15 '23

The Second Annual PureScript Survey!

Thumbnail
discourse.purescript.org
17 Upvotes

r/purescript • • Aug 01 '22

HTML to PureScript converter

17 Upvotes

Hey guys,

I found converting HTML snippets to PureScript (with React) tedious so I made a tool to help with that.

Try it out here https://purescriptify.web.app/

Repository at https://github.com/dnikolovv/purescriptify


r/purescript • • Dec 27 '21

Formless 3 (RFC)

Thumbnail
discourse.purescript.org
17 Upvotes

r/purescript • • Nov 15 '21

ANN: dovetail - a PureScript interpreter with a Haskell FFI

Thumbnail hackage.haskell.org
17 Upvotes

r/purescript • • Oct 06 '21

purescript-droplet: type-safe ORM

17 Upvotes

github | docs

Hello everybody,

droplet is a type-safe SQL library targeting (so far, only) Postgres. Two main features set it apart from similar PureScript (or Haskell) libraries:

  • SQL like DSL

The eDSL used tries to stay as close as possible to regular SQL. IMO, this has the advantage of making the translation from PureScript to SQL transparent, specially for more complex queries.

So far, most common usage SQL keywords are supported, e.g., SELECT INSERT DELETE UPDATE UNION PREPARE, etc.

  • Query mapper

Query result rows are always expressed as records, with projected columns as keys. The query mapper can also be used independently from the DSL, in case raw SQL strings are needed.

Feedback is highly welcomed. Specially ideas to improve error messages or ease the current type class abuse :)


r/purescript • • Feb 16 '21

7 years of purescript development visualized

Thumbnail visualsource.net
17 Upvotes

r/purescript • • Jul 17 '20

Virtual DOM with performance equivalent to Halogen

17 Upvotes

I recently released https://github.com/purescript-grain/purescript-grain.

This is written by PureScript, no npm dependency.

I made it faster.

Basically, So PureScript compiles all functions with curried and we use immutable data, large number of function calls and copying data slows down execution.

It particularly affected indicators under CPU throttling environment.

I've done a lot of things for performance.

But if you want to make any library faster, there are effective approaches not limited to libraries.

Approaches:

  • Do not use monad transformer and so on as far as possible

  • Use Effect.Uncurried and Data.Function.Uncurried

    • halogen-vdom uses this approach too.

  • Do not use immutable data as far as possible

You can check why these approaches is effective by checking compiled JavaScript.

PureScript example:

  fooReaderT :: ReaderT Unit Effect Int
  fooReaderT = do
    u <- ask
    liftEffect $ add_ u 1 2

  fooEffect :: Unit -> Effect Int
  fooEffect u =
    add_ u 1 2

  add_ :: Unit -> Int -> Int -> Effect Int
  add_ _ a b = pure $ a + b

  fooEffectFn :: EffectFn1 Unit Int
  fooEffectFn = mkEffectFn1 \u ->
    runEffectFn3 addEffectFn u 1 2

  addEffectFn :: EffectFn3 Unit Int Int Int
  addEffectFn = mkEffectFn3 _ a b ->
    pure $ a + b

Compiled JavaScript:

  var add_ = function (v) {
      return function (a) {
          return function (b) {
              return Control_Applicative.pure(Effect.applicativeEffect)(a + b | 0);
          };
      };
  };

  var fooEffect = function (u) {
      return add_(u)(1)(2);
  };

  var fooReaderT = Control_Bind.bind(Control_Monad_Reader_Trans.bindReaderT(Effect.bindEffect))(Control_Monad_Reader_Class.ask(Control_Monad_Reader_Trans.monadAskReaderT(Effect.monadEffect)))(function (u) {
      return Effect_Class.liftEffect(Control_Monad_Reader_Trans.monadEffectReader(Effect_Class.monadEffectEffect))(add_(u)(1)(2));
  });

  var addEffectFn = function (v, a, b) {
      return a + b | 0;
  };

  var fooEffectFn = function (u) {
      return addEffectFn(u, 1, 2);
  };

Benchmark


r/purescript • • Jan 04 '20

PureScript Async FFI

Thumbnail blog.drewolson.org
17 Upvotes

r/purescript • • Dec 01 '18

My first package: Introducing PureScript GraphQL

Thumbnail
medium.com
17 Upvotes

r/purescript • • Nov 29 '18

Numeric hierarchy guide: initial release

17 Upvotes

Some of you might remember that last year, I started working on a guide to the PureScript numeric type class hierarchy in the Prelude - that is, Semiring, Ring, and all the subclasses up to Field - aimed at people who haven't necessarily studied mathematics beyond a high school level. (Previously: https://www.reddit.com/r/purescript/comments/69hgqv/purescript_numeric_hierarchy_guide/)

Now, I'm very pleased to announce that it's essentially complete; everything I wanted to cover has now been covered. If the numeric type class hierarchy seems confusing and you'd like to understand it and the ideas behind it better, this guide is for you! https://a-guide-to-the-purescript-numeric-hierarchy.readthedocs.io/en/latest/

I also made a cheatsheet for quick reference which some of you might find useful: https://harry.garrood.me/numeric-hierarchy-overview/

I'm very happy to receive any feedback you might have. Enjoy!


r/purescript • • Nov 17 '18

Type Safe Routing with PureScript Row Types (from Monadic Warsaw 15 Nov)

Thumbnail
speakerdeck.com
17 Upvotes

r/purescript • • Nov 08 '18

Building a Type-safe Embedded DSL for Form Components with Validation

Thumbnail
medium.com
17 Upvotes