Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 19 03:45

    darkfrog26 on master

    Updated to most recent version … (compare)

  • Aug 14 17:09

    darkfrog26 on master

    Minor code cleanup and dependen… (compare)

  • Aug 06 03:35

    darkfrog26 on master

    Additional dom element creation… (compare)

  • Jul 26 01:53

    darkfrog26 on master

    Lots of updates to URL support (compare)

  • Jul 17 02:25

    darkfrog26 on master

    Lots of updates to URL support (compare)

  • Jun 24 00:34

    darkfrog26 on 0.13.16

    (compare)

  • Jun 24 00:34

    darkfrog26 on master

    Release 0.13.16 (compare)

  • Jun 23 23:27

    darkfrog26 on master

    Added support for PushNotificat… (compare)

  • Jun 09 23:56

    darkfrog26 on 0.13.15

    (compare)

  • Jun 09 23:56

    darkfrog26 on master

    Release 0.13.15 (compare)

  • Jun 09 23:25

    darkfrog26 on master

    Added better scrolling function… (compare)

  • Jun 08 22:59

    darkfrog26 on 0.13.14

    (compare)

  • Jun 08 22:59

    darkfrog26 on master

    Release 0.13.14 (compare)

  • Jun 08 21:01

    darkfrog26 on master

    Minor updates (compare)

  • Jun 07 01:06

    darkfrog26 on master

    Minor cleanup (compare)

  • May 31 19:10

    darkfrog26 on master

    Continued improvements to themi… (compare)

  • May 31 00:55

    darkfrog26 on master

    Simplified ThemeComponent (compare)

  • May 31 00:50

    darkfrog26 on master

    Better theming support (compare)

  • May 29 22:13

    darkfrog26 on master

    Minor update (compare)

  • May 29 21:29

    darkfrog26 on master

    Added Capacitor module (compare)

Jose C
@jmcardon
It's a matter of changing your style though. What you may find clean and concise others may not.
(not saying you should,. just that what you might find f'ed up in FP others may see it making sense)
Matt Hicks
@darkfrog26
definitely, which is something a lot of people take issue with when migrating to Scala from another language like Java
I try to examine my reasoning and give things a fair shake, but I am also much more concerned with readable code than most people.
Which is why all of my open-source projects are so pretty. ;)
Jose C
@jmcardon
I think "readable" depends what you're used to
like cats used to look like black magic before
or doobie
Matt Hicks
@darkfrog26
Though this is mostly true, there's something to be said for readability without special knowledge. Lift eventually becomes "readable", but to any outsider it looks like gibberish. There's a trade-off that comes with "black magic" and very often I think Scala devs don't take that into consideration or just don't care. If the trade-off is worthwhile then I'm willing to make it, but very often the trade-off happens for no valid reason for some obscure "better practice" that is easily arguable. Further, immutable code very often suffers from serious performance impact.
Having written Scribe, which is more than three times faster than log4j, written 3d engines, and a strong focus on big data, performance is important to me.
@jmcardon I do hope you'll challenge the ideas put forth in youi, but I hope you're ready to defend the reasoning better than, "this is FP best practice" :-p
René Vangsgaard
@rvangsgaard
Hi, what is the best version to use right now? Thinking of building a prototype with youi.
Matt Hicks
@darkfrog26
@rvangsgaard what kind of application? If you want to use the UI elements (a high-level DOM) then 0.9.0 is somewhat gutted
0.8.0 is your best bet
if you don't need any of that then 0.9.0-M8 is your best bet
@rvangsgaard I read your email, but it's still a bit unclear. You have an existing HTML template you're working with?
Matt Hicks
@darkfrog26
@rvangsgaard FYI, I'm currently publishing 0.9.0-M9
most of the changes have to do with the HttpClient though
Michael Ahlers
@michaelahlers
:+1:
Matt Hicks
@darkfrog26
@/all I'm trying to get 0.9.0 released by the end of June and I'd be very interested in getting some feedback from you all about how you currently work with web applications (particularly frontend) and any thoughts on how youi might make life easier for you.
Lorenzo Gabriele
@lolgab
@darkfrog26 don't know if I have time but I try to test and give my two cents 😊
Matt Hicks
@darkfrog26
@lolgab at the moment I'm just looking for some general feedback regarding ideals of a web app library
Matt Hicks
@darkfrog26
hey, for a library that I haven't focused on optimizing performance, we're doing pretty well on TechEmpower: https://www.techempower.com/benchmarks/#section=data-r18&hw=ph&test=json&l=zijunz-f
Lorenzo Gabriele
@lolgab
That's the power of simplicity 😎🤘
Henrik Härkönen
@heharkon

Hi all! I started to look for new web app building tools while picking up interest in scala again after a long time. I've been mostly doing stuff with Liftweb previously. YouI seems very interesting tool, so I'm trying it out next!

I'm building the example, I pulled the latest from GitHub and I'm getting some XNIO runtime exception, but it doesn't seem to be fatal, I still get "Hello world" to my browser. But is there something I should change perhaps?

[info] 2020.06.05 21:42:03 [XNIO-1 I/O-3] ERROR io.youi.ErrorSupport.defaultHandler:28:38 - java.lang.RuntimeException: Invalid reference to recursive state with no previous value for Some(Set()). This should only happen if the function doesn't always expose a reference to itself.

I'm using openjdk version "11.0.7" 2020-04-14 on Xubuntu 20.04

Matt Hicks
@darkfrog26
@heharkon, ouch...Lift?
how are you running it?
sbt
>project exampleJVM
>;appJS/fastOptJS;reStart
Henrik Härkönen
@heharkon
Haha, I think Lift was just the right kind of quirky for me. :-D I think what I'm aiming for, is something that I don't have to concentrate how the data flows between server and client, just that it's well defined and works. Another very interesting is Korolev, where everything flows through websocket to a very thin client.
I ran it with one command from the CLI: sbt exampleJS/fastOptJS exampleJVM/run. Copied that from the github page.
Henrik Härkönen
@heharkon
I tried that reStart as well from sbt shell:
sbt:exampleJVM> ;exampleJS/fastOptJS;reStart
[success] Total time: 4 s, completed Jun 6, 2020, 11:01:45 AM
[info] Application exampleJVM not yet started
[info] Starting application exampleJVM in the background ...
exampleJVM Starting io.youi.example.ServerExampleApplication.main()
[success] Total time: 1 s, completed Jun 6, 2020, 11:01:46 AM
sbt:exampleJVM> exampleJVM 2020.06.06 11:01:50 [main] INFO io.youi.server.Server.implementation:34:20 - Using server implementation: io.youi.server.UndertowServerImplementation...
exampleJVM[ERROR] Jun 06, 2020 11:01:53 AM org.xnio.Xnio <clinit>
exampleJVM[ERROR] INFO: XNIO version 3.3.8.Final
exampleJVM[ERROR] Jun 06, 2020 11:01:53 AM org.xnio.nio.NioXnio <clinit>
exampleJVM[ERROR] INFO: XNIO NIO Implementation Version 3.3.8.Final
exampleJVM[ERROR] WARNING: An illegal reflective access operation has occurred
exampleJVM[ERROR] WARNING: Illegal reflective access by org.xnio.nio.NioXnio$2 (file:/home/henrik/.ivy2/cache/org.jboss.xnio/xnio-nio/jars/xnio-nio-3.3.8.Final.jar) to constructor sun.nio.ch.EPollSelectorProvider()
exampleJVM[ERROR] WARNING: Please consider reporting this to the maintainers of org.xnio.nio.NioXnio$2
exampleJVM[ERROR] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
exampleJVM[ERROR] WARNING: All illegal access operations will be denied in a future release
exampleJVM 2020.06.06 11:01:54 [main] INFO io.youi.server.Server.start:68:16 - Server started on HTTP 127.0.0.1:8080
exampleJVM 2020.06.06 11:02:29 [XNIO-1 I/O-3] ERROR io.youi.ErrorSupport.defaultHandler:28:38 - java.lang.RuntimeException: Invalid reference to recursive state with no previous value for Some(Set()). This should only happen if the function doesn't always expose a reference to itself.
Henrik Härkönen
@heharkon
oh, nevermind, I think I should use the main youi repository, not the youi-example from gh...
Henrik Härkönen
@heharkon
now no runtime errors with:
;appJS/fastOptJS;reStart
but when I open localhost:8080 in firefox, it redirects to localhost:8080/ui-examples.html but seems it's not found, says console:
exampleJVM[ERROR] 2020.06.06 16:19:14 [ERROR] io.youi.ErrorSupport.defaultHandler:30:38 - java.lang.RuntimeException: Invalid URL or not found in class-loader: app/application-fastopt.js.youi.
going directly to some example apps, like session, works though, yay! typed localhost:8080/session.html to address bar
Matt Hicks
@darkfrog26
@heharkon that's really odd...try: ;exampleJS/clean;exampleJS/fastOptJS;reStart and see if that fixes it...and make sure you're running on master
Regarding effortless flow between client and server, I assume you've looked a bit into how communication works in YouI, that's kind of the whole goal there to allow method signatures to be defined and shared and implemented where it should be run.
The errors you're seeing imply that the Scala.js wasn't built for the example project.
Also, if you want an example of an application built on YouI: https://app.courio.com
Henrik Härkönen
@heharkon
@darkfrog26 ok I'll try to clean first. seems that master is the branch currently
pretty impressive that courio app, nice!
@darkfrog26 that clean helped, thanks!
have to start learning this thing, let's see if I can wrap my head around it :D
babysteps, babysteps...
Matt Hicks
@darkfrog26
@heharkon, dig into the example source code...while there isn't great documentation, the functionality is fairly well represented / tested in the examples
Henrik Härkönen
@heharkon

@darkfrog26 I think I can now follow many things that is going on in the examples, but I have one critical question that I don't yet understand. It relates to the filter DSL: I think serving for example a simple json, like in the example, is pretty self explainatory, but how about the JS app part?

I mean what is the 'binding factor' which triggers the build to compile the JS app and include it to the html part, so that browser will load it?

For example, what actually happens here:

combined.any(
            path.exact(path"/courio.html"),
            path.matches("/examples/.*[.]html"),
            path.exact("/ui-examples.html")
          ) / Application / ServerApplication.AppTemplate

more specifically in the last line? How does it know that ClientExampleApplication.scala needs now a build etc? Is it convetion based on the file naming, or how?
Sorry this might seem a silly question with an obvious answer, but... :-D

Matt Hicks
@darkfrog26
@heharkon, technically, exampleJVM doesn't know anything about the compiler in exampleJS, which is why you have to compile exampleJS/fastOptJS before reStart to make sure the Scala.js is compiled.
When you compile the JS code it puts it into the exampleJVM resources directory so that the server can serve it up.
The Application and ServerApplication.AppTemplate have more to do with setting up the HTML to reference that Scala.js so that it will run the application in the client.
Henrik Härkönen
@heharkon
@darkfrog26 ah, ok, that makes sense. I have to check the Application and the AppTemplate more, thx!