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
nafg
@nafg
Apologies if I've said this before, it would be nice if all of the amazing dead code elimination logic in scala.js could also be leveraged to tell me what in my codebase is dead code
Bonus points if that could be run on JVM code, but even if it was just logged from what scala.js is doing anyway
Nikita Gazarov
@raquo
@nafg not exactly what you're asking for, but the pointers here can indirectly give you some class usage info: scala-js/scala-js#3556
João Costa
@JD557

that might be the case, I'll try to run some local benchmarks later. Thanks :)

Update on this: Turns out that Firefox struggles a lot with multiple flatMaps and the ES 5.1 is indeed faster than the ES 2015 (in FF). Here's the code that I used, in case anyone wants to try to replicate the results: https://gist.github.com/JD557/3acf3d426c21f66fd9e8e25ab21813fe

Eric K Richardson
@ekrich
@sjrd I haven't been able to get the ScalaJSJUnitPlugin configured manually. Seth was trying to help me over in sbt/sbt. His suggestion with compilerPlugin adds the dependency but I am not sure what else is needed. I tried setting autoCompilerPlugins := true but that didn't help.
Eric Peters
@er1c
Eric Peters
@er1c
@sjrd did you have an opinion on adding the sbt scalastyle alias verses just using the one I created (scalastyleCheck) for https://github.com/scala-js/scala-js/pull/4169/files/9daaa5ca88bc9bdf9ef691659b9b555b70674478#diff-fdc3abdfd754eeb24090dbd90aeec2ce ?
my muscle memory is to type sbt scalastyle which is where that is coming from
Eric Peters
@er1c
:+1: thanks for responding, updated PR - just trying to push them through so I don't forget about em :)
Eric Peters
@er1c
@sjrd no issues with the scalastyleCheck after merge?
Alexis Hernandez
@AlexITC
what can anyone recommend for rendering charts with sjs? I have saw some wrappers over js libraries, but they are outdated, and there is no sjs 1.0.0 support
Sébastien Doeraene
@sjrd
@er1c apparently not ;)
aappddeevv
@aappddeevv
Where do you want to render it and to what output format?
Alexis Hernandez
@AlexITC
Just a webpage, a simple bar chart, there are many js libraries but I haven't found any upgraded facade
Gábor Bakos
@aborg0
@AlexITC check out https://scalablytyped.org/docs/readme.html (I have a working demo with SJS 1 and chart.js, it was working with plot.ly too. https://github.com/aborg0/oeis-series)
1 reply
Øyvind Raddum Berg
@oyvindberg
@AlexITC If you don't mind some react in there I found nivo pretty awesome, check the demo at https://github.com/ScalablyTyped/SlinkyDemos
2 replies
kerr
@hepin1989
@aborg0 does scalablytyped generate from d.ts?
Gábor Bakos
@aborg0
Yes, that's how it works. You specify the npmDependencies for the .d.ts and the actual .js and from the .ts it generates Scala sources.
Robert Walker
@olofwalker
ScalablyTyped is an amazing project, try it out!
kerr
@hepin1989
@aborg0 Thanks, at work I have to use https://github.com/alibaba/ice, which is current go with typescript :(
Gábor Bakos
@aborg0
@hepin1989 That should not be an issue if the .ts files are bundled in the npm package. (Though I haven't tried. @oyvindberg probably can confirm whether that usecase is supported or not.)
Øyvind Raddum Berg
@oyvindberg
It doesn't accept .ts files, but if that's what you receive you could always run the typescript compiler with --declaration and have it generate the .d.ts files for you
Stuart Schmukler
@sasconsul

I am having problems with the tutorial's step 1, the command "npm install source-map-support" fails because there was no package.json generated by the sbt run. Here is the transcript:
webapp % npm install source-map-support
npm WARN saveError ENOENT: no such file or directory, open '/Users/sasconsul/devenv/github/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/sasconsul/devenv/github/package.json'
npm WARN github No description
npm WARN github No repository field.
npm WARN github No README data
npm WARN github No license field.

1 package is looking for funding
run npm fund for details

found 23 vulnerabilities (19 low, 4 high)
run npm audit fix to fix them, or npm audit for detail

trepidacious
@trepidacious
@sasconsul Maybe npm init first? That said, you often don't need to have a package.json in scala-js, generally a plugin will handle that kind of thing for you, e.g. with npmDependencies and sbt-scalajs-bundler
Sébastien Doeraene
@sjrd
Those were only warnings. The command succeeded.
aappddeevv
@aappddeevv
@AlexITC I think scalablytyped is a good way to go. I do have a plotlyjs and react facade libs that run on the latest scalajs for my scalajs-reaction facade, but I think sticking with your current react facade and scalablytyped probably is easiest. I've been rendering to plotly's json format on the server then send that over to the client to perform final screen render in plotlyjs and that has worked well for me. @oyvindberg I think I discover a new react js plotting lib every week, so nivo gets added to the list :-)
1 reply
Eric K Richardson
@ekrich
@gzm0 After looking at the document you sent, the rebase/squash made sense. I tried to do the same thing but didn't quite understand it.
Eric Peters
@er1c
image.png
For these tests, I guess I just can't test any codePoint > 16 bits, that sound right?
Eric K Richardson
@ekrich
@sjrd Thanks for all the help getting me through the additions to java.util.Properties. It has been a long haul. I plan to backport the changes back to Scala Native so just a little bit more.
Sébastien Doeraene
@sjrd
@er1c For the Char overload, yes, clearly, since a Char has only 16 bits. For the Int overload, we can test all possible ranges, obviously.
Eric Peters
@er1c
@sjrd thanks, and btw the scalastyleCheck is already saving jenkins time :)
doing the code gen of the tests, and finding a few more edge cases, so I guess that's good :)
Eric Peters
@er1c
[error] /Users/eric/Work/scala-js/test-suite/shared/src/test/scala/org/scalajs/testsuite/javalib/lang/CharacterUnicodeBlockTest.scala: illegal start of simple expression: Token(RPAREN,),136794,)) any idea what the positiion is suppose to be?
@ekrich congrats on the PR merge
Eric K Richardson
@ekrich
Thanks @er1c
Carlos Quiroz
@cquiroz
@er1c I’ve seen that on scala style when you have a dangling comma in a list
Eric Peters
@er1c
@cquiroz I just did a vi :goto and that looks likely, thanks!@
looks like that was character/byte index
Eric Peters
@er1c
@ekrich @cquiroz would love to get you guys on a call sometime to talk about .toUppercase(Locale)/.toTitleCase options (re: https://github.com/ekrich/scala-unicode/ & https://github.com/cquiroz/scala-java-locales/issues/197), open to other ideas/workflows for trying to approach it
@sjrd you are invited if interested :)
kerr
@hepin1989
@ekrich cool
Eric Peters
@er1c
scala.js is ECMAScript5 not 6, correct?
Eric Peters
@er1c
got a comment from @sjrd: Those we should be able to easily implement by delegating to the String equivalents, after having encoded the code points as UTF-16 code unit(s). (re: implementing java.lang.Character.toUpperCase(codePoint: Int): Int) anyone have specific guidance on how to do that?
Eric Peters
@er1c
(I'm trying to figure out if that's just encoding a string like '\uD83D\uDCA9' that gets passed in or some other approach)
Eric K Richardson
@ekrich
Look at the instance method of Character.toChar(codePoint: Int). It may help.
Eric Peters
@er1c
its ES6 :/
  def toUpperCase(codePoint: scala.Int): scala.Int = {
    val codePoints = toChars(codePoint)
    val s = new String(codePoints, 0, codePoints.length)
    val upperCaseChars = s.toUpperCase.toCharArray

    if (upperCaseChars.length > 2)
      codePoint
    else if (upperCaseChars.length == 2)
      toCodePoint(upperCaseChars(0), upperCaseChars(1))
    else
      upperCaseChars(0).toInt
  }