Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Matt Searle
    @ChocPanda
    Hi all, I am trying to learn purescript, what's the best resource for doing so?
    Olli Helenius
    @liff
    @ChocPanda you could start here, there’s a link to the book
    Henry Story
    @bblfish

    I was trying to parse a piece of code in the article ”A real World App with a comonadic UI" but I don't understand it.

    class Pairing m w | m -> w, w -> m where
       pair :: (a -> b -> c) -> m a -> w b -> c
    select :: Pairing m w => m b -> w (w a) -> w a
     select = pair (\_ wa -> wa)

    I don’t understand what \_ does? Any ideas?

    Henry Story
    @bblfish
    (it may just be typos in the article…. I think I found a flipping of variables further down. But my Haskell/Purescript is not good enough for me to tell, if the problem here lies with my lack of knowledge)
    Henry Story
    @bblfish
    I am trying to use the Atom ide to get a better feel for PureScript but connot get a simple project made with pulp init to build from within it. Any ideas? Should I use another IDE?
    Henry Story
    @bblfish
    Ah got it. I followed (some of) the instructions on https://qiita.com/kimagure/items/570e6f2bbce5b4724564 and that helped. I was missing psc-package
    Henry Story
    @bblfish
    Is there a Monoid instance for Int?
    Henry Story
    @bblfish
    It looks like the whole Eff part of PureScript was abandoned. Am I right?
    Ali Hammad
    @alihammad-gist
    is there an infix operator for exponential . like 2**4 -> 2 raise to the power 4
    giuliohome
    @giuliohome
    Sorry to insist on this question I already asked a month ago, but just to double check: is anyone using (twitter) oauth (likely server side) on purescript?
    giuliohome
    @giuliohome
    Well, I think the best approach would be writing the binding for the npm oauth module as I've suggested here https://stackoverflow.com/a/56061066
    quanganhtran
    @quanganhtran
    hi, could someone help me with installing purescript through npm? My npm i -g purescript is stuck at Check if a prebuilt 0.13.2 binary is provided for macOS for a very long time
    I do not know whether it is just slow or stuck
    Ebmtranceboy
    @Ebmtranceboy
    @quanganhtran I think you need to check by yourself, meaning downloading the binairies and installing them by hand. I advise you install 0.12.5 first because I've noticed a few problems with 0.13. Good luck
    quanganhtran
    @quanganhtran
    @Ebmtranceboy thanks, I have successfully installed 0.12.5
    though that check is supposed to just "check", as there is a download step right after
    Octav Zaharia
    @octavz
    hi, is there any kind of resources for beginners? basic installation fails miesrable, any tutorial I tried failed to compile/install stuff.
    something tested like a up to date docker or something ? or a .deb ?
    Ebmtranceboy
    @Ebmtranceboy
    @octavz The simplest way for beginners would be to install the binairies, noy
    *no need for Node at first, at least on Linux. Then, you'll have an updated version of PureScript-by-Example book at https://github.com/dwhitney/purescript-book. Updated to chapter 10 for now but work in progress
    Ebmtranceboy
    @Ebmtranceboy
    Octav Zaharia
    @octavz
    Can you point me to binaries for debian ? that was the question...
    can I do any meaningful work w/o node ?
    most of my node ecosystem works fine btw, just purescript doesn't install
    permission denied, mkdtemp '/home/ozaharia/.npm-global/lib/node_modules/purescript/node-purescript-MDgQnG'
    (node:25796) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, open '/home/ozaharia/.cache/purescript-npm-installer-nodejs/index-v5/90/cc/afa51ff139146ebe0e8b2b0a26d78342d4cbeb1020f4d3f80c109c4b5b7d'
    (node:25796) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
    (node:25796) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    after sudo npm install -g purescript
    perhaps a docker would be the way to go if installation is so unstable ?
    Ebmtranceboy
    @Ebmtranceboy
    https://github.com/purescript/purescript/releases/tag/v0.13.2 just copy the binaries where you want and modify your PATH accordingly
    Ebmtranceboy
    @Ebmtranceboy
    then you can install pulp, bower, and probably your prefered tool but I personnally don't use anything else, with npm
    Octav Zaharia
    @octavz
    ty @Ebmtranceboy I thought that I needed more stuff beside this.
    Stacy Curl
    @stacycurl
    Hello. I’m using spago to build a small project, everything has been fine, but some dependency has compiled to a require call, is there a way to find out which one ?
    Stacy Curl
    @stacycurl
    I think the more general thing I want is some way of finding out which dependency requires NPM. At least this stack overflow seems to suggest so: https://stackoverflow.com/questions/43104335/psci-uncaught-referenceerror-require-is-not-defined-when-using-port
    Stacy Curl
    @stacycurl
    No help, hmm, this channel is much quieter than I expected.
    Anyhow I think I’ve peeled back the onion, it wasn’t a dependency, npm or otherwise.
    After splitting the problematic module into small pieces, with the expectation that the problem would shift to one of the pieces, I ended up with a module that had no dependencies and looked like any other.
    I then suspected the name of the module, so I renamed it and everything worked.
    I then recalled that at some brief point I had different capitalisation for that module.
    I then verified by recreating the problem.
    1) create module FOO with a function, ensure it’s used, build
    2) rename to Foo, build again
    3) grep for require in index.js you’ll find a line 'var Bar =require("../Bar/index.js”);’
    this line persists until you do a clean build
    I’ll raise an issue.
    oops, I mean, Foo, not bar in step 3.
    Kayvan Kazeminejad
    @kayvank

    this builds fine:

    instance semiMonoid :: Semigroup Multiply where
      append  (Multiply a) (Multiply b) = Multiply (a * b)

    But this fails with the error Unexpected token '(<>)'

    instance semiMonoid :: Semigroup Multiply where
      (<>)  (Multiply a) (Multiply b) = Multiply (a * b)
    Ebmtranceboy
    @Ebmtranceboy
    I think you can't define infix instance methods with symbols
    Ebmtranceboy
    @Ebmtranceboy
    In fact, you can't define infix functions like this.
    Instead you should use your first version and complete your definition with an alias:
    infixr 5 append as <>
    But, in your case, it's not necessary since the alias is already defined in prelude.
    Kayvan Kazeminejad
    @kayvank
    thnx @Ebmtranceboy
    Ebmtranceboy
    @Ebmtranceboy
    I'm looking for a reset of the publish process.
    Ebmtranceboy
    @Ebmtranceboy
    I think there is a conflict with another package named similarly but strangely not figuring on pursuit. Anyways, I've just created a new one: https://pursuit.purescript.org/packages/purescript-cartesian/1.0.1
    Richard Forrester
    @RichardForrester
    I'm going through the javascript-to-purescript tutorials and I want to just fool around with the /test/Main.purs file and have it run. There's no premade npm test script. Is there a build in test runner I can use to just fool around with?
    Albert ten Napel
    @atennapel
    What's the story on impredicativity in PureScript, I was playing around with ids :: Array (forall t. t -> t) (which is accepted), cons id ids (not accepted, which makes sense), rcons ids id (this works surprisingly, for rcons h t = cons t h) but (flip cons) ids id does not work
    Is the little bit of impredicativity that is accepted by design?
    Albert ten Napel
    @atennapel
    Haskell simply rejects any impredicative instantiation, but Purescipt seems to accept it inconsistently
    James Brock
    @jamesdbrock

    How do I make a Semiring instance for a simple record type like data A = A {a1:Int,a2:Int}

    https://pursuit.purescript.org/packages/purescript-prelude/4.1.0/docs/Data.Semiring#t:Semiring

    (Besides actually implementing all the class members.) Since a1 and a2 are both Semirings, can I somehow derive the instance automatically?
    Kurt Milam
    @kurtmilam
    @jamesdbrock you'll find more help and activity on:
    1. The #purescript and #purescript-beginners channels on the FP Slack
    2. The purescript channel on the FP Discord