HN user

dima_vm

116 karma
Posts0
Comments38
View on HN
No posts found.

Instagram might not became that big, but it definitely was on track to become somewhat big, that's why Facebook bought it, in fear of competition.

Same, Youtube might go down, but the idea was out of the box now, someone else would do that. Technology (ContentID) was there as well. As a consumer, I don't mind if it'd be called differently done by different team. It might have been better or worse of course.

Not always, if rebars are pre-tensioned before concrete solidifies. So the rebar is always under tension. Pretty common in prefab parts, like bridge bars.

Well, technically, you can use cement instead of mortar (wet, but without sand). As far as I understand, sand is more like a neutral filler, to save money on cement. Various other things can be used to fill as well, like gravel. Sometimes even empty plastic bottles (reduces material and weight) are suitable (just make sure they don't float up). If one got very smooth bricks (e.g. precisely cut aerated concrete), then it might make sense, as there's very tiny amount of mortar (or even glue) is needed anyway.

Kotlin has it, but only if the function accepts the function argument, e.g. `foo({println("hello")})` is the same as `foo {println("hello")}` (larger example in my other comment above).

You can also make it on no-args function, if it's a method (attached to a type). Utilizing @get(), like that: `3.mph` and have somewhere else defined

    val Double.mph: Speed
      get() = Speed.mph(this)

You can make that in Kotlin, e.g.: `3.mph` or `(-45..45).deg` for ranges.

with definition like:

    val Double.mph: Speed
      get() = Speed.mph(this)

    data class Speed(val ms: Double)
      companion object {
        fun mph(mph: Double) = Speed(mph * 1609.344 / 3600.0)
      }

Absolutely damned is combination of Kotlin's several features:

1. Lambda functions can be defined with `{}`.

2.`foo(bar, somefunc)` is the same as `foo(bar) somefunc`. In other words, if the last parameter is a function, it can be provided AFTER closing parenthesis.

3. Interfaces that require only one method can be implemented on-side with a lambda function (i.e. `{}` syntax for no-param function).

Combined those three features, the code may look like that:

    routing {
        static("/statics") {
            files("css")
        }
        get("/foo") {
            call.respondText("Hello world!")
        }
    }
So you can make a config-looking file which is just pure Kotlin, with static type checking, autocomplete, suggestions, "this" etc.

It's so damned, I'm surprised author didn't mention it.

You can download phone prefixes with prices from them, and also set max price for an SMS (won't work if they charge just a little amount and you send thousand requests of course).

Another idea you may find interesting: InfoSec. Some of my friends who were looking beyond engineering said "Your Machine Learning is boring. But InfoSec is a very diverse landscape, hard to get bored".

I filed an issue for Scala in 2009, that was answered like "sorry, this particular Java code cannot be used in Scala". In 2012 it still wasn't fixed.

I cannot find the issue now, but I remember I was trying to use gae-mapreduce-java library (built on top of Hadoop interfaces). It couldn't compile with Scala.

As for me the greatest appeal of Kotlin is that it doesn't need its own tooling that bad, it feels like just syntactic sugar over Java.

Both Scala and Kotlin can reuse Java tools, but with Scala it's awkward (and some tricky generics simply don't compile with Scala).

E.g. if I need to parse something, I search for "how to parse that in Java", not "... in Kotlin".

From my past experience, both Google and Apple fervently defend their built-in caller app, and really-really don't like any other app making regular voice calls. Part of that is that they don't want cloning (they clearly state that your caller app must look obviously different from default system one), which is understandable, but even when it clearly not a clone, they make take it pretty hard, it feels like they would rather just ban it.