These are chat archives for chandu0101/scalajs-react-components

26th
Sep 2015
Marius B. Kotsbak
@mkotsbak
Sep 26 2015 15:29
@tpdi about the untyped props, why not map it as a generic variable if you know the wrapped component is sjs-react?
@elacin hi, got anything sjs in production in Oslo?
Øyvind Raddum Berg
@oyvindberg
Sep 26 2015 15:34
no, unfortunately
i just quit the place i used to work where i could have made it happen
though i ported one pretty cool project to have a scalajs/react interface, think i will try to sell them that
youre based in trondheim? know anyone?
Marius B. Kotsbak
@mkotsbak
Sep 26 2015 15:38
Ah, that is bad. Trondheim yes, no, even Scala users here are few. Mostly.net and some Java.
Øyvind Raddum Berg
@oyvindberg
Sep 26 2015 15:39
it has been a surprisingly hard sell so far
we've been more or less at it for 3-4 years
Marius B. Kotsbak
@mkotsbak
Sep 26 2015 15:40
But all use JS so there is a potensial. And even though C# might be more DRY than Java 8, Scala beats them both
Øyvind Raddum Berg
@oyvindberg
Sep 26 2015 15:40
i'm sensing a second opportunity here with the focus on functional programming and immutable data in the frontend world nowadays
plus we have the node argument now - shared code on the frontend and on the backend
its too sweet to give up
Marius B. Kotsbak
@mkotsbak
Sep 26 2015 15:42
Japp, get an easy setup for a frontend sjs kit, with autowire to a nice server with a good ORMish, it could be very powerful
Øyvind Raddum Berg
@oyvindberg
Sep 26 2015 15:43
yeah, slick fills that ORM position very nicely
someone needs to fix autowire someday
its almost amazing
Marius B. Kotsbak
@mkotsbak
Sep 26 2015 15:43
FB react could be a gateway to the right way of thinking, then sjs-react, and then wondering why not Scala on server side too
Øyvind Raddum Berg
@oyvindberg
Sep 26 2015 15:44
once sjs-react 0.10 settles down i'll try to promote it around here
even the frontenders are into transpiling these days, so the leap shouldnt be /that/ big anymore
Marius B. Kotsbak
@mkotsbak
Sep 26 2015 15:44
The production stability issue is not so important when the sjs code is just generated, not any server running in production
Øyvind Raddum Berg
@oyvindberg
Sep 26 2015 15:45
im not sure if thats an issue in any case
Marius B. Kotsbak
@mkotsbak
Sep 26 2015 15:45
For slick activeslick looks promising to get rid of the dirty boilerplate
Main issue is developers not wanting to learn anything new, at least not before half of the developers in the world are using it, e.g.Angular
Øyvind Raddum Berg
@oyvindberg
Sep 26 2015 15:48
yeah i havent looked much at activeslick - i guess i have found the boilerplate pretty livable so far
and yeah, people dont like change, apparently
Marius B. Kotsbak
@mkotsbak
Sep 26 2015 15:49
Just now was compatible with 3.x
Øyvind Raddum Berg
@oyvindberg
Sep 26 2015 15:50
though i think the biggest issue is resistance within organizations, i wouldnt always blame the devs
Marius B. Kotsbak
@mkotsbak
Sep 26 2015 15:51
Sure, the managers could be more strict, and existing code and languages/frameworks is also an issue
And standardisation
Øyvind Raddum Berg
@oyvindberg
Sep 26 2015 15:52
yep
spring and hibernate is essentially incompatible with proper scala code
you can grease the sale process by opting in to keeping them of course
Marius B. Kotsbak
@mkotsbak
Sep 26 2015 15:53
Spring works quite nice. Its on github
Hibernate huge impedance mismatch
Øyvind Raddum Berg
@oyvindberg
Sep 26 2015 15:53
well yeah, it can work equally «well» with scala
but yeah, hibernate is worse
so far i've seen teams adopting scala for microservices
there is another opening there
since those are disjoint codebases anyway
i just ended up in a pretty big project in public sector now
jdk7 and all that madness
yet they've got some scala at the edges
Marius B. Kotsbak
@mkotsbak
Sep 26 2015 15:55
Ah ok
Øyvind Raddum Berg
@oyvindberg
Sep 26 2015 15:56
because that is close to zero risk of course
Marius B. Kotsbak
@mkotsbak
Sep 26 2015 15:56
But what Spring is useful in Scala im unsure about. Probably cake pattern solves it better
Øyvind Raddum Berg
@oyvindberg
Sep 26 2015 15:57
exactly, it's only ever in the way of a sane codebase
Marius B. Kotsbak
@mkotsbak
Sep 26 2015 15:57
Get them to upgrade to jdk 8, and its less painful
Øyvind Raddum Berg
@oyvindberg
Sep 26 2015 15:57
i will definitely do my best
anyways cake pattern is compile time, and affords you more flexibility
Marius B. Kotsbak
@mkotsbak
Sep 26 2015 15:58
Ppl are trying to replicate scala libs; http://www.functionaljava.org
Øyvind Raddum Berg
@oyvindberg
Sep 26 2015 15:59
yeah i saw a new one today https://github.com/aol/cyclops
i saw another project for making case classes too, but i forgot the name
it's getting to the point where if you had some more type inference it could almost be livable
Marius B. Kotsbak
@mkotsbak
Sep 26 2015 16:00
Lombok?
Its a little pain, but ok with intellij plugin
When it works
But java 8 closures are bad. All are implemented as SAM
And that is what the IDE is presenting, not the actual function required as parameter
Øyvind Raddum Berg
@oyvindberg
Sep 26 2015 16:02
hmm might be, this thing i saw also created mutable builders
which, given the circumstances, is actually positive
yes yes it's pretty terrible, but better than before
now if we could get state in interfaces so they could be proper traits
Marius B. Kotsbak
@mkotsbak
Sep 26 2015 16:05
Think of java as Debian stable and Scala as unstable
Opened an issue about that in IntelliJ so it is possible to solve in the tools. In Scala also often FunctionX is used for performance, but I think IDE is understanding that
Øyvind Raddum Berg
@oyvindberg
Sep 26 2015 16:22
well that analogy falls apart because of the culture around the languages - which are completely different imo
mutable, big versus immutable, small
FunctionX is used for performance?
TP Diffenbach
@tpdi
Sep 26 2015 17:12
SAM??
Marius B. Kotsbak
@mkotsbak
Sep 26 2015 18:16
Single abstract method
Like used before in java is recognized as a lambda type
Yes I have read that the function classes are performing better than X=> Y syntax
TP Diffenbach
@tpdi
Sep 26 2015 20:44
Oh, ok, lambda turns into an anonymous implementor of some one method interface, and then that method is called on it.
Marius B. Kotsbak
@mkotsbak
Sep 26 2015 21:13
Japp,
Øyvind Raddum Berg
@oyvindberg
Sep 26 2015 23:42
In scala a lambda turns into a class, so there is a penalty, regardless of tye syntax. A sam, afaik, uses the new infrastructure in jdk8 so its faster, no? Thats partly why scala 2.12 is focused on adapting to that infrastructure