Better HN
topnewbestaskshowjobs
Log inSign up

cryptos

1,795 karma · joined Sep 13, 2012 (14y ago) · 646 submissions

Submissions

comment 9y ago · link · parent

Why does the Scala community needs its own build tool? Why not just use Gradle? Or if something is missing, adding this to Gradle and then using Gradle.

comment 9y ago · link · parent

I hope that firefox will continue to protect users privacy as good as possible. I'm thinking of super cookies and the like. Other brother vendors don't seem to be very engaged in this area.

comment 9y ago · link · parent

Reading the paragraph about "illegal states" that should be avoided in software, I thought of "design by contract", what never really took off. Microsoft .NET has a really nice implementation called "code contracts", but it doesn't seem to be used that often. However it would be a simple and powerful way to improve the software quality.

comment 9y ago · link · parent

It's a bit disappointing that Django doesn't emphasize REST more. I'm expecting that "classic" web application frameworks with templates rendered on the server (as long as they are not templates from a client-side framework rendered there for some optimization) are on their way out. And, to be honest, REST is not a strength of Django ...

comment 9y ago · link · parent

I see a clear pro Scala tendency in this article. Take for example this statement:

> In addition, Scala includes features that you won’t find in either Kotlin or Java, such as full support for pattern matching, macros, and higher-kinded types, which makes Scala ideal for big data processing tasks such as: graph analysis, aggregation computations, and complex, mathematically-focused modelling (e.g. medical modelling.)

This statement is unfortunately not backed by any explanation.

Kotlin has less Stackoverflow questions, but there is also less need for explanation.

Limited operator overloading in Kotlin is a good thing! I've seen way to many Scala with completely absurd and unreadable opertors.

Having worked with both Kotlin and Scala, I see Kotlin as much more pragmatic, what means real world suitable. While Scala was engineered with programming language research in mind (not an ivory tower language like Haskell, though), Kotlin considers more practical aspects like tool support or long-term maintainability. The Scala compiler is, for example, relatively slow. And what about binary (in)compatility in Scala? No word in the article. What about the imminent breaking change with Scala 3 (aka Dotty)?

Scala macros are problematic for tool support. Kotlin will probably get some kind of tool friendly meta-programming, but deliberately not macros.

> Kotlin may be widely considered the easier language to learn, but if it doesn’t have all the features you need, then those few hours spent familiarizing yourself with the Kotlin syntax was time that you could have spent starting to learning a language that does give you the functionality you need.

That may be true for some features, but Scala is a pretty complex beast with many advanced features, which are not only hard to learn, but which also make the code hard to understand or modify. Think of implicit conversions, implicit parameters, which can make it hard to understand what is going on by looking at the code.

Kotlin is much more readable in general: constructos are just named `cunstructor`, init blocks are called `init`, variadic argument are called `vararg`, annotations for co- and contravariance are called `in` and `out`. Scala has to offer method signatures like the following:

    flatten[U](implicit ev: <:<[T, Try[U]]): Try[U]
Don't get me wrong, I don't want do condemn Scala and like it in principle, but I think that Kotlin is the better choice in most cases.

comment 9y ago · link · parent

I would rather suggest the opposite: the compilers will be moved out of frameworks, because they will become more and more powerful and general purpose, so that there is no need to handle framework specific things.

When we have web assembly and compilers like the Kotlin compiler that can translate a high-level language to web assembly, there is little need for framework specific compilation.

comment 9y ago · link · parent

It is important to compress it with bzip2 or your even better custom algorithm before finally archiving it in /dev/null

comment 9y ago · link · parent

Hey, at least is was an enterprise cloud scale infinite loop.

comment 9y ago · link · parent

And what relevance would have such a metric?

comment 9y ago · link · parent

There are already two or three static site generators out there ... https://staticsitegenerators.net/

comment 9y ago · link · parent

I've tried a few static site generators and I've written my own in Python. But they all sucked at some point - despite Hugo! Hugo is incredible fast, offers many features and is pleasant to use. But the killer feature is: Hugo just works out of the box without the need for an annoying setup. Just copy the binary and you are done!

comment 9y ago · link · parent

This article sounds a lot like a big argument for Domain Driven Design without naming it.

comment 9y ago · link · parent

No, it's not. Scala can call Java easily, but not the other way around. Calling Java from Scala is awkward at best (in many cases) and sometimes impossible. Scala was never engineered with a smooth Java/Scala mixed mode in mind. The opposite is true: In Scala almost everything from Java gets reinvented sooner or later.

524.

Dark or white color theme is better for the eyes?(ux.stackexchange.com ↗)

3 points · by cryptos · 9y ago · 1 comment

comment 9y ago · link · parent

I think this is related to monetization, since the web gets "louder" to attract advertising consumers. Most companies are actually advertising companies and the users are just part of the product (sold to advertisers). Maybe we need more paid services - and the will to pay.

I'm thinking about creating a hierarchical forum like the usenet, but I'm sceptical whether this would earn enough money to work in the long run.

comment 9y ago · link · parent

I think Kotlin would be a much better language to learn programming. Kotlin avoids much of the noise and is very readable.

The hello world example is symptomatic:

    public class Example {
        public static void main(String ...args) {
            System.out.println("Hell, World!");
        }
    }
vs

    fun main(args: Array<String>) {
        println("Hello, World!")
    }
Some more examples:

    // java
    for (Element element : collection)

    // kotlin
    for (element in collection)

    
    // java
    (OtherType) somehting;

    // kotlin
    somehting as OtherType


    // java
    a.equals(b);

    // kotlin
    a == b
  

    // java
    Color color = x < 5 ? Color.RED : Color.GREEN;

    // kotlin
    val color = if (x < 5) Color.RED else Color.GREEN
And some more like constructors just named "constructor", init blocks are name "init", varargs are prefixed with "vararg", type checks with "is", ranges with 1..9, strings wicht embedded variables ...

527.

Corda: Why Kotlin?(corda.net ↗)

1 points · by cryptos · 9y ago · discuss

528.

KotlinTest – flexible and comprehensive testing tool(github.com ↗)

3 points · by cryptos · 9y ago · discuss

comment 9y ago · link · parent

I've used IntelliJ for Scala some time and did encounter way more IDE bugs than in Java. I think JetBrains did a good job, but Scala is not engineered towards tool support. That is one big flaw of the language.

Kotlin is much more pagmatic (not only) in this regard, what is no surprise coming from a tool vendor.

comment 9y ago · link · parent

I wouldn't develop software for surveillance, advertisement, weapon systems, high-frequency trading.

comment 9y ago · link · parent

What companies will profit when Uber fails?

532.

Why are radio buttons circles?(ux.stackexchange.com ↗)

6 points · by cryptos · 9y ago · 1 comment

comment 9y ago · link · parent

I don't like the name, too. KeepassX is terrible and KeepassXC odd even worse. Maybe we should start a contest to find a better name.

comment 9y ago · link · parent

After testing some static site generators I've settled with Hugo and never looked back. I like especially the fact that I only have a single static file with no further dependencies. And the speed is fantastic. Hot reloading is very useful.

comment 9y ago · link · parent

As long as keyboards can not show a different layout (e. g. OLED keys), all these efforts will not get much traction.

comment 10y ago · link · parent

I'm so happy that I switched to Diigo some time ago!

537.

Why I abandoned Java in favour of Kotlin(hashnode.com ↗)

2 points · by cryptos · 10y ago · discuss

comment 10y ago · link · parent

It would be nice, if they would improve the terminal window a bit with tabs and the like (like Gnome Terminal for example).

comment 10y ago · link · parent

My stack would be: Java or (better) Kotlin, JAX-RS, bean validation, JPA, CDs or Guide, Postgres. I've no clear preference for front-end.

comment 10y ago · link · parent

I've used both, Scala and Kotlin, and I like Kotlin very much.

A programming with more features is not necessarily better. The limited features of Kotlin (compared to Scala) are an advantage, if you change your point of view. Some advantages:

  * easier to learn (a Java dev will be more productive than in Java in a day or two)
  * easier to maintain since Kotlin doesn't allow so much hard to understand code constructs
  * fewer discussions about the one true style or way to do something
  * it's easier to build good tooling
  * much faster compilation
  * smoother Java interop
  * performance implications are more predictable
1
171819
22