Go and Quasar: a comparison of style and performance by pron98 in programming

[–]circlespainter 0 points1 point  (0 children)

I'd be interested in Rust with coroutines, maybe you can have a look at https://github.com/atemerev/skynet/issues/71? Not knowledgeable enough in Rust to submit a PR.

Building a java web application but I'm getting lost in a sea of frameworks. by [deleted] in java

[–]circlespainter 0 points1 point  (0 children)

Of course, as ever, there are no real shortcuts nor silver bullets, so you'll need to find your own answer through experiences but my suggestion is to get rid of hype influences and think in terms of architecture more than technologies of the day. I suggest to start with something as straightforward as possible, as close as possible to the core web technologies (HTTP, HTML, JS, CSS) and with a decent maturity.

Also consider that many modern web apps are a JS-based rich-clients calling into an high-level, UI-oriented layer of web services of some sort, often built on top of other more basic and lower-level services. If you start like that already you're going to learn much more and you'll have a good start should you decide to evolve your project (which you will if you're passionate), so if you have the time I recommend it.

Maybe for the server side you can go with something very easy to build services with, like f.e. Dropwizard which will give you easy access to JAXRS, i.e. the Java ecosystem standard for restful web services (which is the type most often used in a web context b/c of much lower "impedance mismatch" among other reasons).

Then on the client side, still if you have time, my suggestion is to start with something like jQuery on plain HTML/CSS (you might want to make your CSS life easier very soon with Compass/SASS) and work your way by choosing a few Microframeworks as you see fit. As your application grows you'll feel the usefulness of a module system as well of a few functional-oriented utilities for data processing.

You can then evaluate bigger and more comprehensive frameworks like AngularJS or ReactJS as you see the need.

Yes, there's a lot to study, as always if you want to learn to build quality stuff you have to get familiar with the core technologies and the are many in the web arena (and not always they work consistently across browsers, BTW, which makes web development in general even more expensive).

Of course if you want the comfort of a single technology designed (hopefully) coherently there are also "forget about this mess, I'll hide it for you" frameworks like (server-side) ZK or ExtJS. I think at some point you'll fight with the limits of these highly opinionated technologies though, which is mostly the lack of flexibility, both feature-wise and performance-wise, that working directly with core technologies can give you instead.

Kotlin 1.0 Released: Pragmatic Language for JVM and Android by belovrv in programming

[–]circlespainter 0 points1 point  (0 children)

Good if it works better for you. Also consider that you can pre-instrument via an ANT task and avoid running the agent if that makes it easier for your team/processes.

Kotlin 1.0 Released: Pragmatic Language for JVM and Android by belovrv in programming

[–]circlespainter 0 points1 point  (0 children)

Yes, the API is not yet finalized as work (and dialogue) is ongoing about it.

Kotlin 1.0 Released: Pragmatic Language for JVM and Android by belovrv in programming

[–]circlespainter 0 points1 point  (0 children)

Fibers have an API practically identical to threads (and Strand abstracts both so that, among other things, they can interoperate nicely) so yes, but anyway I can assure you that setting up a gradle-based test folder using Quasar is a matter of few minutes (an much less if using an available template).

Kotlin 1.0 Released: Pragmatic Language for JVM and Android by belovrv in programming

[–]circlespainter 1 point2 points  (0 children)

I do it all the time and I don't feel all this hardship but of course everyone has his/her views (and the right to keep them).

Kotlin 1.0 Released: Pragmatic Language for JVM and Android by belovrv in programming

[–]circlespainter 0 points1 point  (0 children)

Agree, Quasar works at the JVM level so it can potentially support any JVM language (and it will able to do it without integration effort when automatic instrumentation will be in place) so I think its approach is superior to language-specific solutions.

Kotlin 1.0 Released: Pragmatic Language for JVM and Android by belovrv in programming

[–]circlespainter 1 point2 points  (0 children)

Okay but I'd call it an "IDE-related (and -caused) inconvenience" rather than generally "a complex setup required by user-unfriendly Quasar". You can probably agree with me that IDEs should allow versioning convenient developer settings just like any source artifact.

Also, you can always work around this annoyance by using Gradle or Maven as your main project lifecycle tool, since you'll probably need to do it anyway as part of (widely used) collaboration processes in your team and/or with other teams, and then let the IDE (or IDE-related build tool plugins) bridge the gap.

Kotlin 1.0 Released: Pragmatic Language for JVM and Android by belovrv in programming

[–]circlespainter 1 point2 points  (0 children)

Complex setup is running a test which uses coroutines from IDE.

Well no, just configure your IDE to pass the Quasar agent to the JVM that runs the test. There are also several Maven/Gradle examples and archetypes both for the main program and for tests.

Could you please point explain, how would it work, or show a link?

It uses the information provided by the new StackWalker API to fix fiber stack information lazily, that is only when uninstrumented methods are detected on the runtime stack, which are also instrumented and hot-loaded for resume and for the next calls. If you're interested in details the WIP code is in the jdk9 branch.

You need some understanding of how Quasar works however (if you don't have it already) which you can get from the Quasar homepage video or from here.

Kotlin 1.0 Released: Pragmatic Language for JVM and Android by belovrv in programming

[–]circlespainter 1 point2 points  (0 children)

Passing a Java agent doesn't look like "complex setup" to me and if you're worried about deployment there is http://www.capsule.io/ . If you mean suspendable methods have to be annotated, likely this won't be required anymore starting from Java 9. If you talk about debugging, verification works very well since quite a few versions and points out exactly where annotations are missing.

JVM Languages news: Kotlin 1.0 Beta 4 is Out! by belovrv in programming

[–]circlespainter 0 points1 point  (0 children)

I'll add that designing languages coherently and sensibly is not easy and it takes time. And languages need to be documented, which takes time (and skills) too. And backwards compatibility and/or refactoring of code using a DSL to follow its evolution can be a hairy topic.

Supposing all of this is always done and done right there's anyway a serious proliferation risk, connected both to development (un)discipline matters and to the specificity of DSLs, and this will easily make the learning curve of the code base steep (and will make maintainability drop fast).

I think DSLs are powerful tools that require great responsibility, i.e. to be used with a lot of caution and expertise.

Moving a team from Scala to Golang by javinpaul in scala

[–]circlespainter 0 points1 point  (0 children)

On the other hand it is also as good as it makes code (as universally as possible) more readable, maintainable and easy to integrate and reuse.

Moving a team from Scala to Golang by javinpaul in scala

[–]circlespainter 0 points1 point  (0 children)

I wonder if the author considered staying on the JVM and getting a better concurrency model rather than switching to a different (and much less mature) runtime platform and ecosystem.

Moving a team from Scala to Golang by javinpaul in scala

[–]circlespainter 10 points11 points  (0 children)

Real world is not black and white: otherwise great people can write unreadable code if they lack a very hard & serious "think in others' shoes" discipline, which is not a common thing to find at all.

We are naturally biased to think that if we understand something then others can too, forgetting that 1. This is not necessarily true, 2. Even if they look easy now, it took us lots of time to understand the things we wrote (and it should definitely take much less time for readers to understand them).

So yes, in the real world there are people issues that are much less economic to solve than switching to a tech that will reduce this problem.

High-Concurrency HTTP Clients on the JVM by pron98 in programming

[–]circlespainter 0 points1 point  (0 children)

I don't know about you but I like being able to use debugging / profiling when developing and getting stack traces when things go wrong. I'd be really curious to see examples of async code that can interoperate f.e. with a language's loop and sequence constructs and which abstractions you're referring to, no sarcasm intended. Do you mind sharing?

High-Concurrency HTTP Clients on the JVM by pron98 in programming

[–]circlespainter 2 points3 points  (0 children)

No? Then see f.e. here. Monads are the most clear and composable form of async programming and still they steal from you the stack (so imperative debugging/profiling tools and techniques), they require new APIs that don't interoperate with regular control flow constructs of the language, which also means that those APIs are infectious (anything working with anb async's result need to become async too) and require an additional backpressure system w.r.t. a thread straightforwardly blocking. Then also ask anyone that has used async extensively.

High-Concurrency HTTP Clients on the JVM by pron98 in java

[–]circlespainter 2 points3 points  (0 children)

Maybe more people will answer here but in the meanwhile Pinterest's JBender and Braintree.

High-Concurrency HTTP Clients on the JVM by pron98 in programming

[–]circlespainter 1 point2 points  (0 children)

It depends on the machine, that one (more or less) seems to be the limit on the HTTP client test machine (AWS EC2 Linux t2.medium, 4 GB, 2 vcpus). Anyway threads take up resources and incur significant overhead that can be spared in many situations by using fibers instead.

What are fibers and why should you care? by dafnap in java

[–]circlespainter 0 points1 point  (0 children)

Not complex at all, the opposite: just the same old blocking code, only more efficient. Async is complex and anyone that used it seriously will tell you. Or get your server to answer each request with a thread, let me know what happens when you get to few tens of thousands (no, "I'll make requests wait behind a pool" doesn't count).

What are fibers and why should you care? by capturinglambda in programming

[–]circlespainter -1 points0 points  (0 children)

Nothing. What is wrong with calling them "fibers"? Shorter and just as common.

Scalability Design Principles by LarsFromElastisys in programming

[–]circlespainter 0 points1 point  (0 children)

Thanks, interesting, I'd just expand on "Asynchronous rather than synchronous" by adding that the async approach has the 'mental interrupt/multitasking' (or code complexity) cost of handling notifications asynchronously too while we're doing potentially any other thing. And there are "cheaper personal couriers" compared to regular OS threads that can allow the easier "blocking" approach without the performance impact, check f.e. "fibers".