by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 08 20:43
    @sjrd banned @sw7240614
  • Sep 29 2019 08:35
    @sjrd banned @8bitpitRBX_twitter
  • May 23 2019 13:44
    @sjrd banned @BIGCRYPTO001_gitlab
  • May 01 2019 14:31
    @sjrd banned @Certificates1_gitlab
  • Apr 22 2019 15:31
    @sjrd banned @lerbatax
  • Jan 31 2019 23:04
    sjrd commented #3555
  • Jan 31 2019 22:56
    sjrd review_requested #3555
  • Jan 31 2019 22:56
    sjrd opened #3555
  • Jan 31 2019 21:06

    sjrd on 0.6.x

    Remove dead code: specific coll… Adapt the signature of `js.Arra… Merge pull request #3554 from s… (compare)

  • Jan 31 2019 21:06
    sjrd closed #3554
  • Jan 31 2019 20:54
    erikvanoosten commented #2665
  • Jan 31 2019 16:33
    sjrd commented #3538
  • Jan 31 2019 15:54

    sjrd on master

    Fix analyzer cycle detection to… Add toString methods to analyze… Do not provide linked ClassInfo… and 1 more (compare)

  • Jan 31 2019 15:54
    sjrd closed #3552
  • Jan 31 2019 15:54

    sjrd on master

    Remove Logger.success It is un… Make level helpers final Clean-up ScalaConsoleLogger cod… and 1 more (compare)

  • Jan 31 2019 15:54
    sjrd closed #3553
  • Jan 31 2019 15:33
    sjrd commented #2665
  • Jan 31 2019 15:30
    erikvanoosten commented #2665
  • Jan 31 2019 10:41
    sjrd review_requested #3554
  • Jan 31 2019 10:41
    sjrd opened #3554
OlegYch
@OlegYch
perhaps someone can help me understand why a whitespace change would cause all my sources to be recompiled https://gist.github.com/OlegYch/775e657ad4edb41b77c88e0fa8be3c83
Sébastien Doeraene
@sjrd
Incremental compilation is ruled by sbt. You will probably have more luck asking on the sbt/sbt channel.
OlegYch
@OlegYch
yeah not much luck there
haven't seen this kind of behavior outside of this particular scala.js project though
jhegedus42
@jhegedus42
image.png
@sjrd ^ are you using one of these ?
i picked up a sentence here
a few days ago...
that you are not using intellij
are u using mac ? @sjrd ?
Sébastien Doeraene
@sjrd
I'm using VS Code on Windows and Linux.
DongHee Kim
@terdong
@sjrd How about VS Code? I tried to use it, but I had to go back to the intellij because "rename symbol" feature didn't work on VS Code.
Sébastien Doeraene
@sjrd
I don't really care about rename symbol. I need reliable diagnostics, go to definition, type at point and completions. That's all.
DongHee Kim
@terdong
@sjrd, thank you for the answer. I also think it is a good editor and expect it to be better.
Dan Di Spaltro
@dispalt
@OlegYch so I actually have this problem every once and while, and I usually end up going through and marking a bunch of stuff private
OlegYch
@OlegYch
weird
can this be scala.js specific?
Sébastien Doeraene
@sjrd
@OlegYch It's very unlikely that it would be Scala.js specific. Scala.js doesn't alter the typer nor the phases of zinc that are responsible for incremental compilation.
OlegYch
@OlegYch
ok good to know
jhegedus42
@jhegedus42

I'm using VS Code on Windows and Linux.

hmm... for scala development ... interesting ... well, what do you mean by reliable diagnostics ? --- how is VS Code better for you than IntelliJ ?

@sjrd ^
Sébastien Doeraene
@sjrd
It reports exactly the compile errors that compile reports. Not more, not less.
mseddon
@mseddon
IntelliJ has it's own scala analyser that is mostly unrelated scalac. I imagine hacking on the compiler with it would be fairly confusing
jhegedus42
@jhegedus42
any idea about garbage collection / finalizers in scalajs ? http://sodium.nz/t/sodium-seems-to-work-with-scala-js/439/2
Stephen says, that sodium causes memory leak in scala.js
The issue with using Sodium on Scala.js is that Sodium requires Java finalizers for its memory management, and Javascript does not allow for these to be implemented. They are impossible to implement in Javascript, so (unless I am wrong) Scala.js can't possibly have done it. Note that this will only leak memory if you use the Sodium 'switch' primitive, because the issue is in cleaning up Sodium objects that are no longer used, and this can only happen when you use 'switch'.
What do you think about this @sjrd ?
is this really an issue ?
" Java finalizers for its memory management"
Sébastien Doeraene
@sjrd
Yeah Java finalizers are impossible toi implement in JavaScript.
Dario Abdulrehman
@dabd
Hi, a long question: there is a fairly large third-party library of UI components built with Node.js and a templating language (Nunjucks). At our shop we would like to reuse those components from Scala (JVM) frontends using Play. We attempted to reuse the third party lib with a Play module that essentially runs Node on the JVM to render the components. It is terribly slow as expected. Could scalajs help here?
Salar Rahmanian
@softinio
so I am using the scalajs for the first time and trying to create a tcp server using node net lib: https://millermedeiros.github.io/mdoc/examples/node_api/doc/net.html
using js.Dynamic.global.require("net") to import the library
my question is if you look at the above example for createServer whats the scalajs way of passing a promise to it?
OlegYch
@OlegYch
@dabd not sure why you'd do it on server, and scalajs certainly woudnt be of much use there, but otherwise it can help
aappddeevv
@aappddeevv
I’ve used templating libraries on node using scalajs and they worked fine. Whether it’s fast enough will be based on how you code the data side of the problem. I was only templating emails though,
Nothing complicated or high volume.
aappddeevv
@aappddeevv
So I think you have only a few options if you keep node templating. Use node backend for server with scala js, use node in graal or proxy to a real node server assuming node on jvm is to slow.
David Portabella
@dportabella
We are hiring a Scala/ScalaJs software developer, at the EPFL Swiss university.
Let me know if you are interested, or if you know someone else.
https://lnkd.in/ec_XvPS
The job ad does not say it explicitly, but the platform is written 100% in Scala/ScalaJs.
Dario Abdulrehman
@dabd
@OlegYch if wewant to reuse the library are there any other options than having a server rendering the components?
Dario Abdulrehman
@dabd
@aappddeevv another option would be to compile Nunjucks templates to Twirl or ScalaTags but it would be a challenging task to write the compiler
OlegYch
@OlegYch
if that's a js library then you can just as well run it on client
aappddeevv
@aappddeevv
@dabd would be a bunch of work :-) if performance is that critical and you have to use nunjucks, probably a "nunjucks rendering microservice" along side the jvm service would be cleanest. I just scanned the latest graal and it looks like it would work but its probably harder to setup.
Dario Abdulrehman
@dabd
@aappddeevv wouldn't that have a bit of overhead? Why not as @OlegYch suggests having the client run the Nunjucks library? I'm not sure how can you achieve that to be honest but it would be a matter of having the Play controllers (ScalaJVM) communicating with the client in ScalaJs. Is there an example of such an application I could take a look at?
aappddeevv
@aappddeevv
You can have the client (js or scalajs) run templating for some standard UI rendering vs email server-side rendering that I mentioned earlier. Depending on the volume of templating though, rendering on the client may not make sense. I'm not sure I uderstand what you are trying to do though and the constraints you face. If the templating is for the UI exclusively, then rendering on the client is fine and I've done that as well using the exact same rendering library as I did for the server side emails. Based on your initial description, it sounded like you wanted rendering server side so the client is not impacted.
Dario Abdulrehman
@dabd
@aappddeevv We have a bunch of Play frontend microservices which are doing server-side rendering and they are all using Twirl. Howeve,r soon we will have to use this js library built on Nunjucks which provides standardised UI components for the organisation. I think moving to client-side rendering would have some security implications. Sticking with server-side rendering seems to be the most likely acceptable solution.
aappddeevv
@aappddeevv
That's what I thought. I think that my three "server-side" options are valid unless you rewrite the templating engine. You can skip rewriting the entire server in scala.js as that's probably not feasible. scala.js does not help you per se as you need to run a js-based templating library and scala.js requires a js engine to run on. graal jvm/node is probably too much work to get working and may have ops implications. So if you have to run those js-based templates server side, a small, templating microservice based on nodejs is conceptually easy and callable by your primary play server. It's not clear the overhead from calling a second server is significanlly less than the "slow" rendering though.
Dario Abdulrehman
@dabd
I actually rewrote the templating library in Twirl and used scalacheck to ensure parity of the rendered HTML with the output of the Nunjucks templates, however it is a pain to maintain.
aappddeevv
@aappddeevv
Hmm..you only have a few choices...good luck.
Dario Abdulrehman
@dabd
Thanks for the ideas @aappddeevv !