Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 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
  • Jan 31 2019 15:30
    erikvanoosten commented #2665
  • Jan 31 2019 10:41
    sjrd review_requested #3554
elyphas
@elyphas
[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
yes. fortunately, I only use a small number of layouts now, none of which looks too complicated to approximate with CSS.
GroupPanel would be quite hard I guess.
ritschwumm
@ritschwumm
year.. display:grid might do, but that's a bit of a monster (and not supported in IE, but you probably don't care)
Hanns Holger Rutz
@Sciss
that's useful, thanks
Hanns Holger Rutz
@Sciss
excellent, grid-layout seems to allow the implementation of the specification: https://www.w3schools.com/code/tryit.asp?filename=GJZOFRV56E75
Hanns Holger Rutz
@Sciss
basic buttons and panels up and running: https://www.sciss.de/temp/soundprocesses.js/
ritschwumm
@ritschwumm
impressive
Ali Shah
@Alee02
Hey guys, i was testing out the module splitting in scalajs 1.3.0. I created a simple project based on the release notes. However i keep getting org.scalajs.linker.interface.ReportToLinkerOutputAdapter$UnsupportedLinkerOutputException: Linking did not return exactly one public module.
Here is the link to the project for reference : https://github.com/Alee02/module_splitting_scalajs
It's bare bones only containing scalajs and bundler plugin with code from the release notes.
Sébastien Doeraene
@sjrd
@Alee02 Perhaps you're trying to use fastOptJS? With module splitting you need to use fastLinkJS instead.
Ah no you're using scalajs-bundler. That doesn't work with module splitting yet.
Ali Shah
@Alee02
@sjrd ahh ok thanks, i thought latest scalajs bundler 0.20 worked with 1.3.0 :(
Domas Poliakas
@domaspoliakas
I think it does work with 1.3.0, just not the module splitting part
Invert Avian
@Invert_Avian_twitter
hi again, all- the standalone distribution packages at https://www.scala-js.org/doc/internals/downloads.html don't seem to include anything >1.0.0. does the standalone exist for 1.1.0 or greater? if so, where can it be downloaded/built from?