Martin Häusler

150 posts

Martin Häusler

Martin Häusler

@MartinHusler

Katılım Kasım 2012
53 Takip Edilen26 Takipçiler
Martin Häusler
Martin Häusler@MartinHusler·
@ChessJoscho @straceX Yes that us what I'm talking about. It's an obscure detail and every guide on clean code out there will tell you not to rely on it. Doing x++ standalone is totally fine; doing it in a complex expression as in the given example... not so much.
English
0
0
0
6
Joscho
Joscho@ChessJoscho·
@MartinHusler @straceX Which „details“ of the ++ operator..? If you talk about the postfix variant incrementing after evaluation I would rather call that „purpose“.
English
1
0
0
13
Strace
Strace@straceX·
The classic strcpy implementation from K&R. Still one of the most quietly beautiful loops in C.
Strace tweet media
English
47
66
848
257.3K
Martin Häusler
Martin Häusler@MartinHusler·
@kotlin Does this version work with the intellij build chain again?
English
0
0
0
351
Kotlin by JetBrains
Kotlin by JetBrains@kotlin·
📢 Kotlin 2.3.0 is out! Here are some of the highlights: ✅Language: More stable and default features, unused return value checker, explicit backing fields, and changes to context-sensitive resolution. ✅Kotlin/JVM: Support for Java 25. ✅Kotlin/Native: Improved interop through Swift export, faster build time for release tasks, C and Objective-C library import in Beta. ✅Kotlin/Wasm: Fully qualified names and new exception handling proposal enabled by default, and new compact storage for Latin-1 characters. ✅Kotlin/JS: New experimental suspend function export, `LongArray` representation, unified companion object access, and more. ✅Gradle: Compatibility with Gradle 9.0 and a new API for registering generated sources. ✅Compose compiler: Stack traces for minified Android applications. ✅Standard library: Stable time tracking functionality and improved UUID generation and parsing. Learn more: ➡️ kotl.in/2-3-0
Kotlin by JetBrains tweet media
English
6
107
429
47.1K
Martin Häusler
Martin Häusler@MartinHusler·
@PavitraGolchha @relizarov So where do you put resource files (configs, images, non-code things like that)? I think the "resources" folder has earned its place.
English
1
0
0
43
pavi2410
pavi2410@PavitraGolchha·
thr conventional structure has a partition for languages, which is useful for projects with Java and Kotlin mix. For Kotlin-only projects, it makes sense to simplify the convention to just "src/main". Now, we have two logical groups of code - src and test - conventionally, they are "src/main" and "src/test". We can simplify it further to just src and test dirs. Imagine the micro impact of having such less deep nesting.
English
1
0
0
105
Roman Elizarov
Roman Elizarov@relizarov·
Writing a small new project in Kotlin. IDEA still generates src/main/kotlin bloat. What a shame for such a concise programming language.
English
15
4
112
12.9K
Martin Häusler
Martin Häusler@MartinHusler·
@relizarov That's certainly one use case. But just for that, the cost (storage, processing, complexity) of retaining all previous data is pretty high. Usually "as of" is used to generate timelines "after the fact".
English
1
0
0
137
Roman Elizarov
Roman Elizarov@relizarov·
@MartinHusler People do branches on storage level nowadays. But that’s a different use-case like testing. What I’m talking about is “sh*t, I ran a bad sql script in prod and deleted wrong rows, so what they were 15 min ago?”
English
1
0
0
266
Roman Elizarov
Roman Elizarov@relizarov·
It is 2025. How come PostgreSQL still does not have any native analogue of Oracle's flashback query ("select .. as of") that was introduced back in 2002? It is a crucial feature that speeds up troubleshooting/fixing DB blunders in production. Saved me multiple times in the past.
English
6
0
22
4.2K
Martin Häusler
Martin Häusler@MartinHusler·
@schaerdinger eure ASMR-Werbung auf Spotify ist so unglaublich penetrant, es ist unerträglich! Ich mag eure Produkte eigentlich sehr, aber ich will es nicht als ASMR hören!
Deutsch
0
0
0
10
Martin Häusler
Martin Häusler@MartinHusler·
@_m3tatr0n @antonarhipov Of course. Null-safety at runtime also doesn't come for free. But here we're talking about nested loops, primitives and some arithmetic, which is why I wonder were the Kotlin runtime overhead comes from. No time to look deeper into it, but would be interesting.
English
1
0
0
26
Anton Arhipov
Anton Arhipov@antonarhipov·
"Java and Kotlin are quick" - this sounds so wrong. It's not the language that is fast, but it's the runtime, the JVM. "The JVM is very fast" - that should be the correct conclusion.
Ben Dicken@BenjDicken

More languages, more insights! A few interesting takeaways: * Java and Kotlin are quick! Possible explanation: Google is heavily invested in performance here. * Js is really fast as far as interpreted / jit languages go. * Python is quite slow without things like PyPy.

English
30
47
413
37.1K
Martin Häusler
Martin Häusler@MartinHusler·
@relizarov @relizarov I don't see it as a flaw. Some maps are unordered, some are ordered by key, some are ordered by insertion. And insertion ordered maps have the drawback of additional memory overhead for maintaining said order. I would never rely on the ordering of an arbitrary map.
English
0
0
0
44
Roman Elizarov
Roman Elizarov@relizarov·
My daughter (still) studies Java in university. Watching her struggles gives me a unique insight into the language design. I can definitely tell that Java 9's decision to have "unspecified" iteration order in Map.of method is a mistake.
Roman Elizarov tweet media
English
25
4
184
25.6K
Martin Häusler
Martin Häusler@MartinHusler·
I've disabled the @kotlin K2 mode in my @intellijidea again for now. The performance boost is nice, but there are just too many features missing. I hope this gets fixed before the full release. #Kotlin
English
0
0
1
42
Fear the Phantom (game in bio)
Fear the Phantom (game in bio)@Phantom_TheGame·
REMINDER When you parse a float, it takes into account the language on the computer you're using. Some cultures use a period for decimal points, while some use commas. More than once have I gotten game breaking bugs due to forgetting about this.
Fear the Phantom (game in bio) tweet media
English
96
217
2.7K
781.2K
Martin Häusler
Martin Häusler@MartinHusler·
@leyrer @GLS_Germany @leyrer am Freitag hab ich mein GLS Paket leider verpasst. Dann kam nichts. Keine Mail, keine Benachrichtigung. Nur durch aktive Recherche in der Sendungsverfolgung erfuhr ich dass es in der Paketstation war. HEUTE (drei Tage später) hab ich die follow-up-mails bekommen.
Deutsch
1
0
1
20
@leyrer@23.social | Martin Leyrer
.@GLS_Germany ist eine einzige Shitshow. Aus meiner Inbox von heute Früh: 01:45: Dein Paket: GLS-Zustellversuch und wie es weitergeht 01:47: Dein Paket wurde durch GLS zugestellt [an die korrekte Adresse, Anm.] Zustellzeit laut der zweiten Mail: 05.07.2024, 11:04 Uhr
GIF
Deutsch
5
0
4
392
Martin Häusler
Martin Häusler@MartinHusler·
@reduzio Bonus: When Label3D and planes are used together you'll get all sorts of Z fighting and Z sorting issues.
English
0
0
0
2
Martin Häusler
Martin Häusler@MartinHusler·
@reduzio - GDScript has no global error checker and is therefore a non-starter. - It's way too cumbersome to display UI on a 3D object (e.g. a plane). Vice versa, it's also not easy to get a 3D object into the UI. - Profiler lacks detail information (which scripts take long?)
English
1
0
0
52
Martin Häusler
Martin Häusler@MartinHusler·
@MZarechenskiy @gmitch215 @MZarechenskiy where exactly is the advantage of companion objects over static fields and methods? Standalone objects as singletons are fine, but companion objects? I only use them when I need a static method or constant, for lack of a better alternative. They're kinda ugly.
English
0
0
0
10
Mikhail Zarechenskii
Mikhail Zarechenskii@MZarechenskiy·
@gmitch215 Not in our short-term plans. We've been going back and forth with statics as we want to be very careful here. Statics are very similar to companions in terms of use cases, and we don't really want to provide a similar feature without a clear story
English
1
0
0
63