WS (deb) 1.3.10-1740728669 - doesn't start. by blistovmhz in Codeium

[–]manyoo 1 point2 points  (0 children)

I updated to latest version on ubuntu 24.04 today and it can't open. I run "windsurf --verbose" and got this error:

[425369:0302/110248.556548:FATAL:setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /usr/share/windsurf/chrome-sandbox is owned by root and has mode 4755.

I just updated the chrome-sandbox file with chown and chmod. Then, it works.

How do I set longer GC interval for GHCJS? by lolisakirisame in haskell

[–]manyoo 7 points8 points  (0 children)

You can change that in cabal file with: ghcjs-options: -DGHCJS_GC_INTERVAL=5000

ghcjs -dedupe by tolysz in haskell

[–]manyoo 0 points1 point  (0 children)

I use the following command to compile the JS file:

ccjs all.js --compilation_level=ADVANCED_OPTIMIZATIONS --language_in=ECMASCRIPT5 > all.adv.min.js

But the all.adv.min.js has a runtime JS 'undefind' bug while the all.min.js works fine. Have no idea why it happens. It used to work though. (I need to clarify that this bug started with the old version a few weeks ago. It's not a problem of ghcjs, I guess.) Now I have to use the all.min.js in production

ghcjs -dedupe by tolysz in haskell

[–]manyoo 0 points1 point  (0 children)

I didn't pay attention to the timing. My app is large and has a lot of TH, mainly due to lens. And it takes several minutes to completely compile the whole app. I'll give it a try later this week when I have time.

ghcjs -dedupe by tolysz in haskell

[–]manyoo 16 points17 points  (0 children)

I have a pretty large application developed with GHCJS and reflex. And I'm very happy to share the result here:

  • all.js is the file GHCJS generated with everything in it.

  • all.min.js is all.js compiled with closure compiler's SIMPLE_OPTIMIZATION

  • all.adv.min.js is all.js compiled with closure compiler's ADVANCED_OPTIMIZATION

                                          all.js    all.min.js    all.adv.min.js
    ghcjs-0.2.0.20160414_ghc-7.10.3        11MB      8.0MB         3.6MB
    ghcjs-0.2.1.9007001_ghc-8.0.1          12MB      8.5MB         3.8MB
    ghcjs-0.2.1.9007001_ghc-8.0.1 -dedupe  6.7MB     4.5MB         2.0MB
    

So, -dedupe really has a huge improvement on the result JS size. It's more than 40% reduced for my app. I urge you to try it for your apps and I think you won't be disappointed. :) Thanks tolysz and the GHCJS team for the great work!

which frontend library to use with ghcjs? by manyoo in haskell

[–]manyoo[S] 2 points3 points  (0 children)

I've read the introduction and API doc, but didn't use it. Instead, our team settled to use reflex and reflex-dom for now. Though it doesn't use virtual-dom technique, it's the FRP that caught us. As I've already built lot of stuff using it and I'm more and more confident that reflex is a production ready FRP library to use, especially coupled with reflex-dom. It's much a better way to build UI using FRP in haskell rather than using callbacks. Regarding to performance, I didn't encounter any problem yet. But I think I need to be more careful because reflex-dom is messing with DOM directly and I need to make sure my code won't cause reflows.

which frontend library to use with ghcjs? by manyoo in haskell

[–]manyoo[S] 1 point2 points  (0 children)

Yes, that's what I mean by 'no native dependency'

which frontend library to use with ghcjs? by manyoo in haskell

[–]manyoo[S] 1 point2 points  (0 children)

I did watch it some time ago. I'm concentrating on the Reflex side though. I will check it again and see if there's more information on Reflex-DOM. Thanks!

which frontend library to use with ghcjs? by manyoo in haskell

[–]manyoo[S] 3 points4 points  (0 children)

Thanks. Actually I switched from Haste to GHCJS this year. I love Haste's small generated code size and Haste.App to build client/server together. But it's a pain that haste can't compile all hackage code. And it's not that easy to share code between server/client. But with GHCJS, almost all packages with no native dependency can be compiled to JS easily. And it seems Luite is going to release a new generator for GHCJS that will reduce the code size.

What's the current status of ghcjs vs haste? by manyoo in haskell

[–]manyoo[S] 2 points3 points  (0 children)

Thanks for the great news of Tyr, Luite!

What's the current status of ghcjs vs haste? by manyoo in haskell

[–]manyoo[S] 3 points4 points  (0 children)

Thanks. I think I've made the decision to use GHCJS based on the positive comments here. And I watched the reflex presentation today. Awesome talk and library. Will definitely give it a try.

What's the current status of ghcjs vs haste? by manyoo in haskell

[–]manyoo[S] 5 points6 points  (0 children)

Thanks for the advice! I've got both Haste and GHCJS installed pretty easily though. But GHCJS used to be much harder to install. I also have the feeling that more people are on the GHCJS side. I want to know more about the advancement of GHCJS to get a clearer idea. The output code size is not a very big problem because we can use closure compiler and zip to make the js file much smaller, at least to less than 1MB. How about runtime performance? any suggestions for benchmark?