Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 18 19:06
    @sjrd banned @Amitgup48798297_twitter
  • Mar 29 07:47
    @sjrd banned @quangs
  • Jan 23 06:34
    @sjrd banned @Rebeka58_gitlab
  • Jun 08 2020 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
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
Hanns Holger Rutz
@Sciss
perhaps laminar or plain dom .... and steal some css
Anton Sviridov
@keynmol
Laminar is excellent.
Hanns Holger Rutz
@Sciss
I just watched the presentation, it seems very nice, also the presentation calm and clear, the docs seem clear. Now trying the demo
nafg
@nafg
@Sciss in html there aren't layout managers, there are css layouts. Flexbox and Grid are kind of similar to layout managers I suppose in a way
Everything works with events just like in Swing
that's how html works
Hanns Holger Rutz
@Sciss
yeah, it doesn't seem to far off. Something like FlowPanel, GridPanel, BorderPanel should be straight forward to implement.
at least I never used GridBagLayout in my API :sweat_smile:
it's just small user programmable embeddable panels, so the DSL is still fairly small, and it looks like it's not too difficult to have a sjs version, even if the look-and-feel diverges
nafg
@nafg
Everything in CSS is GridBagLayout. You can put sizing properties on anything
FlowPanel is kind of the default situation
Hanns Holger Rutz
@Sciss
ok
nafg
@nafg
If you want something like BorderPanel you might use absolute positioning, or maybe CSS Grid?
But in general you should try to unlearn Swing while doing HTML
Hanns Holger Rutz
@Sciss
first, I will just make the minimum case, Button, Label, ComboBox, FlowPanel, that should be enough to create some basic examples
nafg
@nafg
For instance web pages are scrolling documents, not windows that like to be resized
Hanns Holger Rutz
@Sciss
Well, I'm doing both, so I want the APIs to be fairly close to each other
nafg
@nafg
Maybe use react-native via Slinky
then you can write the code once
Or just embed a web view with JavaFX
Hanns Holger Rutz
@Sciss
No, the application is desktop/swing (and will remain that way, I hate web UIs), just some user break-outs should be able to run in a client side browser window. So JavaFX doesn't help. It seems with DOM + some sugar from Laminar that's not too bad
nafg
@nafg
idk what break-outs means but abstracting over an HTML and Swing version of those bits is not necessarily worth it
ritschwumm
@ritschwumm
agreed, that might become quite frustrating. although html and swing are conceptually quite similar, all the details are different.
@Sciss i don't know what you are trying to achieve, but have you seen open stage control https://openstagecontrol.ammd.net/ ?
works quite well to cobble together a bit of a ui running in the browser that talks to the rest of your stuff over OSC.
ritschwumm
@ritschwumm
(actually, i generate the description for the ui in o-s-c from scala code and send it there over OSC)
Hanns Holger Rutz
@Sciss
it's a bit more generic; basically inside soundprocesses you have different DSLs, one for real-time sound synthesis, one for offline, one for patterns, one that can lead to expressions/actions/controls/widgets. the last one, widget, is what would be useful to be able to render in scala.js as well, if I want to make, for example, an online sound installation, and it needs a couple of user controls. but it's not necessarily about controlling an OSC device.

it could look like this

val rPerform = Runner("init")

val pf = PathField()
pf.mode = PathField.Folder
pf.value <--> ArtifactLocation("base")

val p = GridPanel(
  Label("Sound file base directory:"),
  pf,
  Empty(),
  Label(
    "<html><body>Initialization creates three<p>" +
      "sub-directories here: 'db', 'ph', 'tmp'.<p>" +
      "Make sure there is enough free space."
  )
)

p.border          = Border.Empty(4)
p.columns         = 2
p.compactColumns  = true

val ggInit = Button("Initialize")
ggInit.clicked ---> rPerform.runWith("check" -> false)

val bp = BorderPanel(
  north = p,
  south = FlowPanel(ggInit)
)

bp.border = Border.Empty(4)
bp

This is an expression snippet leading to a Widget which is then rendered in a window or container. On the desktop in a regular window, if the workspace was run by an audience in the browser, it would be rendering in a <div>.

So you can see, the nomenclature is close to Swing, but only like 5% of the API is exposed, so it's not too difficult to think of another UI backend like DOM.
Hanns Holger Rutz
@Sciss
in other words, I don't want to introduce another UI representation solely for the purpose of running in the browser. Instead, it should be possible to run a subset of what you do in the regular desktop application, within a client-side browser application. I wouldn't even mind if it looks a bit different.
ritschwumm
@ritschwumm
the layouts will be fun to port, this is an area where swing is very different from html. and equally horrible.
Hanns Holger Rutz
@Sciss
Screenshot from 2020-10-23 13-25-50.png