Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
cel1ne
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
18 ms
·
151.
▲
by
cel1ne
9y ago
Relevant story: https://news.ycombinator.com/item?id=14453281
152.
▲
by
cel1ne
9y ago
Agreed, sorry.
153.
▲
by
cel1ne
9y ago
Yes. You can mix Kotlin and Java in the same-project. Kotlin can call all Java-code and Java can call all Kotlin-code.
154.
▲
by
cel1ne
9y ago
One of Kotlin's design goals was 100% compatibility with java. Whenever I work on a java-codebase and see a class that could be expressed much simpler in Kotlin I press "Cmd+Option+Shift+K". Intellij IDEA automatically conver
155.
▲
by
cel1ne
9y ago
Kotlin is 100% java-compatible, you can mix source-files side-by-side in one project. You can easily call kotlin from java and java from kotlin. That means you have all the libraries, performance and profiling tools that java has.
156.
▲
by
cel1ne
9y ago
Check out kotlin-script https://github.com/andrewoma/kotlin-script
157.
▲
A 100 year old paper article about climate change
(reddit.com)
12 points
by
cel1ne
9y ago
|
2 comments
158.
▲
by
cel1ne
9y ago
About the question whether Apple has invented a better UI and whether someone else did or could have done the same: Regardless what you think about UI-paradigms or vendor lock-in, there is something that Apple spends far more time on than o
159.
▲
by
cel1ne
9y ago
While no-one would dispute the need of proper design, there are workflows like refactoring React/HTML-subtrees, where time is wasted having to fix imports whenever you cut something out and put it into a new file. Or having to manually
160.
▲
by
cel1ne
9y ago
Reducing cognitive load by removing the need to write imports by hand means you have QA-issues? I don't follow.
161.
▲
by
cel1ne
9y ago
I use eslint-plugin-auto-import and eslint-plugin-jsx-import (the latter I have hacked together for myself, it's undocumented and brittle) It get's triggered on each save in TextMate, which I use.
162.
▲
by
cel1ne
9y ago
Off topic, but whenever I see an animation of someone writing an import-statement in Javascript by hand I cringe a little. This stuff costs so much time, use an IDE or some auto-import plugin for eslint.
163.
▲
by
cel1ne
9y ago
Members can be chained, which improves readability a lot.
164.
▲
by
cel1ne
9y ago
I used extensions with multiple receivers for adding context inside data-structures. Example: I have a layout-algorithm for a grid that takes sections: interface Section { val title: String fun something() } The
165.
▲
by
cel1ne
9y ago
If you got time, play around with extensions with multiple receivers, you can do pretty neat stuff with them. See my comment here: https://news.ycombinator.com/item?id=14365317
166.
▲
by
cel1ne
9y ago
* A feature I like about kotlin are the receivers, with which you can write type-safe builders: https://kotlinlang.org/docs/reference/type-safe-builders.htm... * Multiple receivers are possible enabling extension
167.
▲
by
cel1ne
9y ago
More precisely it's humans when they form a bunch / organization ;).
168.
▲
by
cel1ne
9y ago
Off topic: The more I think about organizations the more I they seem to be the key players preventing change to me. (Which is not necessarily a bad thing) Business says: We had this great idea, now let's freeze everything in time and l
169.
▲
by
cel1ne
9y ago
I did all the benchmarks on Android ART. It's not the JVM, but blocking GC is an inherent design problem of finalizers that can't be fixed on any VM.
170.
▲
by
cel1ne
9y ago
Assuming you don't do heavy work in the UI-loop: I find react-native's bridge memory-management on Android rather questionable: [0] They make heavy use of structures in native memory for argument-passing between JavaScript and Jav
171.
▲
by
cel1ne
9y ago
Also many common problems like targeting the correct Jdk, customize start parameters and classpath, shipping agents, selecting native libraries etc. are nowadays better solved by using capsule for packaging. It gets you a single jar without
172.
▲
by
cel1ne
9y ago
I've started writing a fuzzer for the JVM once. It looks at the bytecode and adds instrumentation to check whether a label has been hit = a code-path has been traversed after calling methods. It uses genetic algorithms to spawn agents
173.
▲
by
cel1ne
9y ago
What about my list example?
174.
▲
by
cel1ne
9y ago
You are wrong. Most interfaces in non-functional languages are stateful. Take the JDBC-interface: It's certainly not possible to call setTransactionIsolation(), executeQuery(), commit(), rollback() etc. in any order. Or list: add, remo
175.
▲
by
cel1ne
9y ago
I try to use interfaces that have single methods only. The problem with multiple methods is that you can abstract away the function call, but you can't ensure the caller is the methods in correct order (if that matters, but it often do
176.
▲
by
cel1ne
9y ago
Here in Vienna/Austria 73% commute to work by public transport, walking and bicycle.
177.
▲
by
cel1ne
9y ago
Unfortunately not, since those apps are all business internal. On Android/react-native, the Kotlin parts runs on the JVM directly. I haven't released a KotlinJS-application to the wild yet, but I don't suppose the size is a p
178.
▲
by
cel1ne
9y ago
Why not Elm on google turns up this: http://reasonablypolymorphic.com/blog/elm-is-wrong I think the basic gist was that it's type-system is far from complete.
179.
▲
by
cel1ne
9y ago
I write most my code in Kotlin nowadays, which can compile to JavaScript, or drive react-native on Android. It has delegated properties which are wonderful for redux-style architectures.
180.
▲
by
cel1ne
9y ago
In my opinion mutable state is most often better than immutable state. In JavaScript, that is, I have a different opinion on the JVM. The important point is that the state is _serializable_, meaning it doesn't contain side-effects. Tha
More ›