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
Sébastien Doeraene
@sjrd
No, it doesn't.
Russ White
@russwyte
Ok thanks :D
Do you know if it's in the works?
Anton Sviridov
@keynmol

Related to SJS bundler - is there any appetite for native Scala JS bundler? I've realised that people don't shy away from writing bundlers in different languages (e.g. https://github.com/evanw/esbuild)

So may be SJS can benefit from one as well? To avoid shelling out and paying webpack's performance penalty

Sébastien Doeraene
@sjrd
Sure. Do you want to write one? ;)
Anton Sviridov
@keynmol
That's why I was asking :) Mate recommended I check here "to make sure Sebastien hasn't already started one"
nafg
@nafg
What do you mean native?
Anton Sviridov
@keynmol

Just written in Scala, designed to be used with Scala.js and ScalablyTyped, for example.

At the moment scalajs-bundler shells out to local webpack CLI, which, apart from being webpack and kinda slow, causes some issues for me on WSL 2.

So without fully grasping how much of a horror show this undertaking will be, I was thinking that may be it's possible to write one from scratch in Scala

nafg
@nafg
I would recommend first surveying the existing bundlers. There are many besides webpack, and many are supposed to be much faster
Another thing I'm not clear about is, to what extent are bundlers needed nowadays, with <script type=module> support in browsers?
1 reply
Hanns Holger Rutz
@Sciss

Ok; that's pretty exciting, I quickly hacked a "real-time" audio output node for WebAudio - https://www.sciss.de/temp/soundprocesses.js/ - it kinda works, at least on a fast computer despite using ScriptProcessorNode, and the framework is not at all optimised for real-time through-put (throwing around sound buffers with Akka-Stream). https://www.sciss.de/temp/soundprocesses.js/

It's just filtered white noise with sine-modulated cut-off frequency for the lowpass

      val n       = WhiteNoise()
      val SR      = 48000
      val modFreq = Seq[GE](0.1, 0.123).map(_ / SR)
      val freq    = SinOsc(modFreq).linExp(-1, 1, 200, 2000)
      val f       = LPF(n, freq / SR)
      val sig   = f * 100
      Frames(sig.out(0)).poll(Metro(SR), "metro")
      WebAudioOut(sig)
Russ White
@russwyte
That is pretty cool.
Hanns Holger Rutz
@Sciss
look ma' no supercollider
Hanns Holger Rutz
@Sciss
CPU load quite heavy though. If I publish the artefacts, one could perhaps use this in Scastie.
Hanns Holger Rutz
@Sciss
oh well, chromium performs better :-/
ritschwumm
@ritschwumm
a lot better for me, with all "interesting" sjs code.
Hanns Holger Rutz
@Sciss
succumb to google...
ritschwumm
@ritschwumm
4fps vs 60fps when i drag around things in my app - which is not exactly cpu-friendly, being implemented in pure FP and heavily relying on tagless final
Hanns Holger Rutz
@Sciss
that's video or graphics?
ritschwumm
@ritschwumm
just regular dom-shuffling after some fairly involved manipulation of data structures. so i'd call it graphics.
Hanns Holger Rutz
@Sciss

well, fscape is pretty straight forward imperative array manipulation as you'd expect for DSP, but within Akka Stream graphic stage logic, so that's a bit funny in terms of push/pull and back-pressure. but i never made any attempt to find bottle necks, just intuitive choices for buffering.

by the way, is there a performance advantage of js.typedarray.Float32Array over Array[Float] or Array[Double]? or are the latter basically represented by JS native arrays?

Sébastien Doeraene
@sjrd
A Float32Array might perform better.
For Firefox, forcing ECMAScript 5.1 also helps.
For some reason their engine is still terrible at dealing with ECMAScript 2015 features.
Hanns Holger Rutz
@Sciss
ok, noted
ritschwumm
@ritschwumm
fuck. me. that makes a huge difference. thanks @sjrd, i never thought it would!
Dan Di Spaltro
@dispalt
@ritschwumm yeah we can't use 2015 in production, even though it would be nice, because some of our mobile users see like 10-20s load times that go away with 5.1
Hanns Holger Rutz
@Sciss

using sbt-crossproject, I'm running into a problem in that sbt +publishSigned publishes jvm and js artefacts, but then ultimately fails, I think for the Scala version that is shared between JVM and JS (JVM 2.13), saying Repository for publishing is not specified.. Any idea?

lazy val root = crossProject(JSPlatform, JVMPlatform).in(file("."))
  .settings(commonSettings)  // scalaVersion := "2.13.3"
  .settings(publishSettings) // publishTo := ...
  .settings(
    name                  := "scala-stm",
  )
  .jvmSettings(
    crossScalaVersions := Seq("0.27.0-RC1", "2.13.3", "2.12.12", "2.11.12"),
  )
  .jsSettings(
    crossScalaVersions := scalaVersion.value :: Nil,
  )

where publishSettings clearly defines publishTo repository.

Hanns Holger Rutz
@Sciss
[info]  published scala-stm_0.27 ...
[info]  published scala-stm_2.11 ...
[info]  published scala-stm_sjs1_2.13 ...
[info]  published scala-stm_2.12 ...
[error] java.lang.RuntimeException: Repository for publishing is not specified.
?
I can manually run a final sbt ++2.13.3 rootJVM/publishSigned, but it's weird that it doesn't work within +publishSigned
Invert Avian
@Invert_Avian_twitter
hi all- I'm trying to get a basic hello world working with the scalajs cli tools. using the test script from https://github.com/scala-js/scala-js-cli/blob/master/scripts/test-cli.sh and subbing in the pre-built binaries from https://www.scala-js.org/doc/internals/downloads.html , the command "./scalajsld -s -o test.js -mm Foo.main bin" is failing with the error "Referring to non-existent method Foo$.main()scala.Unit" ...any ideas what I'm doing wrong here?
Tobias Schlatter
@gzm0
Well... Is there an object Foo with a method def main(): Unit?
Sébastien Doeraene
@sjrd
I suspect you took the binaries of 0.6.33 but you're following the test script of 1.0.0.
2 replies
1.0.0 would ask for main(Array[String]), not main().
kerr
@hepin1989
Do we still need to import import scala.scalajs.js.| using Scala3?
Hanns Holger Rutz
@Sciss
[warn] Found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[warn]  * org.scala-js:scalajs-library_2.13:1.3.0 is selected over {1.0.1, 1.0.1, 1.0.0, 1.0.1}
This is not a problem, right, because Scala.js chooses other type of semver?
Tobias Schlatter
@gzm0
This is not a problem, indeed.
Anton Sviridov
@keynmol

You can check in the release notes: https://www.scala-js.org/news/2020/10/16/announcing-scalajs-1.3.0/

And I think you're safe:

* It is backward binary compatible with all earlier versions in the 1.x series: libraries compiled with 1.0.x through 1.2.x can be used with 1.3.0 without change.
Sébastien Doeraene
@sjrd
Version conflicts reported by sbt are a nuisance. They're more often false positives than anything else. Don't pay attention to them.
elyphas
@elyphas

Hi, I tried to update up to 1.3.0 but I had troubles so want to downgrade to 1.2.0 but now I can't do it.
because of this error:

[error] org.scalajs.ir.IRVersionNotSupportedException: 
                  Failed to deserialize a file compiled with Scala.js 1.3 (supported up to: 1.2): 
                /home/elyphas/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-js/scalajs-library_2.13/1.3.0/scalajs-library_2.13-1.3.0.jar:/scala/Tuple12$.sjsir
[error] You may need to upgrade the Scala.js sbt plugin to version 1.3 or later.
[error]         at org.scalajs.sbtplugin.ScalaJSPluginInternal$.enhanceIRVersionNotSupportedException(ScalaJSPluginInternal.scala:83)
[error]         at org.scalajs.sbtplugin.ScalaJSPluginInternal$.$anonfun$scalaJSStageSettings$15(ScalaJSPluginInternal.scala:220)
[error]         at sbt.util.FileFunction$.$anonfun$cached$1(FileFunction.scala:80)
[error]         at sbt.util.FileFunction$.$anonfun$cached$4(FileFunction.scala:153)
[error]         at sbt.util.Difference.apply(Tracked.scala:414

any idea? please.
by the way I had sbt 1.4.0

Sébastien Doeraene
@sjrd
@elyphas You'll need to clean.
elyphas
@elyphas
yes I did it
sbt clean cleanFiles
sudo find . -name target -type d -exec rm -rf {} \;
keeps downloading 1.3.0
@sjrd ; I don't know what else to do. :)
elyphas
@elyphas
also I deleted from .cache/coursier/ and try to compile I get this:
[warn] scalajs-library_2.13-1.3.0.jar no longer exists at /home/elyphas/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-js/scalajs-library_2.13/1.3.0/scalajs-library_2.13-1.3.0.jar
[warn] scalajs-library_2.13-1.2.0.jar no longer exists at /home/elyphas/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-js/scalajs-library_2.13/1.2.0/scalajs-library_2.13-1.2.0.jar
Dan Di Spaltro
@dispalt
@sjrd I think this may be the bug in safari that keeps us from going to ES2015, evanw/esbuild#478 tldr; safari does something silly with const/let vs var. More details about the webkit bug here, https://bugs.webkit.org/show_bug.cgi?id=199866
Hanns Holger Rutz
@Sciss
is there an html GUI library that is conceptually close to Swing (or even scala-swing)? e.g. layout managers, event dispatch. ideally with scala.js bindings, or even pure scala.js