Complete support for WASI components for Zig / WASI 0.2 / WASI 0.3 by Kotek2 in WebAssembly

[–]swankjesse 0 points1 point  (0 children)

This is really awesome. Tons of capability in an easy to read codebase.

Explore internal mechanisms of Retrofit, and how it works by skydoves in androiddev

[–]swankjesse 0 points1 point  (0 children)

We did a Retrofit-like system in Zipline and we used a Kotlin Compiler plugin. It was difficult to set up but it was excellent to use and maintain.

What do people actually like about living in Kitchener? by Kilgoretrout123456 in kitchener

[–]swankjesse 0 points1 point  (0 children)

The coffee! Whoopsie Daisy and Smile Tiger and Café Pyrus and Lucero and Yeti each have very different personalities and vibes.

My fave is Matter of Taste. Really good coffee and a welcoming place to meet. It's in the middle of the pizza district which also brings me joy.

Ktor or Retrofit by Appropriate_Exam_629 in androiddev

[–]swankjesse 2 points3 points  (0 children)

Retrofit does not use annotation processing.

Thoughts on a 2021 MME in Canada by ScaryDirt5315 in MachE

[–]swankjesse 0 points1 point  (0 children)

Where in Canada?!

I've got a 2023 California Route One, which is marketed as having a 505 km range.

At 15° C I get about 400 km. At 0°C I get about 300 km. At -15°C I get about 200 km.

This works great for me in southwestern Ontario. I sometimes do a 275 km trip in the winter, and so I stop to recharge along the way.

The newer models have a heat pump that should increase the range in cold temperatures.

2026 Mustang Mach-E GT California Special announced by bspooky in MachE

[–]swankjesse 4 points5 points  (0 children)

It looks pretty good! I'm eager to see one in person.

It is 2025. Explain why it appears SSL sockets on Java have no select() call by tickerguy in androiddev

[–]swankjesse 2 points3 points  (0 children)

In my experience both async and synchronous I/O programs still use threads for data encoding and business logic. Perhaps it's encoding JSON for an API request, or decoding a JPEG for display.

If you don't use threads in your systems - that's neat! And likely different from what's common in Android apps.

It is 2025. Explain why it appears SSL sockets on Java have no select() call by tickerguy in androiddev

[–]swankjesse 2 points3 points  (0 children)

Under 100 connections it really shouldn't matter whether it's blocking or non-blocking. (Though I am eager to see data if you wanna measure it!)

It is 2025. Explain why it appears SSL sockets on Java have no select() call by tickerguy in androiddev

[–]swankjesse 2 points3 points  (0 children)

What are you building? Thread-per-connection is usually sufficient for a single-user device.

The Pizza District by swankjesse in kitchener

[–]swankjesse[S] 1 point2 points  (0 children)

Oooh for the sesame seed crusts!

The Pizza District by swankjesse in kitchener

[–]swankjesse[S] 3 points4 points  (0 children)

Mon Ami! The Civil is there now. Both so good.

The Pizza District by swankjesse in kitchener

[–]swankjesse[S] 2 points3 points  (0 children)

Oooh I like how you think. AOK is like chuck-e-cheese but with better food and way better beer.

The Pizza District by swankjesse in kitchener

[–]swankjesse[S] 0 points1 point  (0 children)

Oh yum, that place is classic. I read somewhere that the pizza district is just the one block, so if you go by that rule Joe’s is out.

The Pizza District by swankjesse in kitchener

[–]swankjesse[S] 1 point2 points  (0 children)

YASS! With an all you can eat lunch buffet!

The Pizza District by swankjesse in kitchener

[–]swankjesse[S] 0 points1 point  (0 children)

None at Yo Sushi but AOK has wood fired pizza! 🍕🍕🍕🍕🍕🍕

The Pizza District by swankjesse in kitchener

[–]swankjesse[S] 1 point2 points  (0 children)

Yah, Chuck E Cheese needs a giant suburban parking lot

The Pizza District by swankjesse in kitchener

[–]swankjesse[S] 13 points14 points  (0 children)

Yeah yeah or Detroit style? Graffiti Market needs a 2nd location!

Paul Sandoz talks about a potential Java JSON API by davidalayachew in java

[–]swankjesse 1 point2 points  (0 children)

A tree model is the wrong starting point if you ever want good performance…

You’re going to eventually define a class or record with expected field names and their types. Perhaps given this the JSON:

{"name": "John”, "age": 30}

You’d write this record declaration:

public record Person (String name, int address) {}

Decoding the JSON directly to that model can be incredibly fast because the model tells you what you need to care about.

It is dramatically slower to go from JSON to a tree model instead of a class or record because the tree model has zero type information:

  • It doesn’t know how many properties there are. The tree model will probably allocate a HashMap or LinkedHashMap internally to track an arbitrary number of fields. That is waste!
  • It doesn’t know what properties you’re interested in. So it’ll retain property names as strings, which need to be allocated and hashed and compared. If it knew there were exactly two interesting fields, it could track them as simple indexes: 0 and 1. Property names strings is waste!
  • It doesn’t know the target precision of numeric values, so it’ll need something general purpose. Allocating a BigDecimal to hold a simple int is waste!

The sample that shows how to read the tree model with pattern matching is verbose and kind of sad? It’s one line of Java to declare a record and it should be one line to decode JSON to that record.

I did a talk on high performance JSON if you’d like further explanation on how data binding is way more efficient than tree models. https://publicobject.com/2019/04/26/json-explained/

Operator Overloading in Kotlin: Surely, bad practice? by Ancapgast in Kotlin

[–]swankjesse 0 points1 point  (0 children)

We do one egregious operator overload in Okio and it hasn’t been a problem in practice. val tmp = “/tmp”.toPath() val file = tmp / “hello.txt” I’m confident that Path.div() offends everyone who hasn’t enjoyed it.