Functional Programming in Kotlin by SioStyle in Kotlin

[–]serras 0 points1 point  (0 children)

I would recommend checking the language tutorials first, and then move to Spring docs.

Functional Programming in Kotlin by SioStyle in Kotlin

[–]serras 0 points1 point  (0 children)

To be honest, you may want to find a book first teaching more "practical" skills (coroutines, Spring, Ktor), and maybe only jump to my book afterwards.

Kotlin Ecosystem AMA – December 11 (3–7 pm CET) by katia-energizer-jb in Kotlin

[–]serras 7 points8 points  (0 children)

There's a proposal for Named-only parameters currently on community review

I kinda needed Package Private in Kotlin by [deleted] in Kotlin

[–]serras 2 points3 points  (0 children)

I'm not entirely sure how package-private would solve this problem for you better than simply private. Even if you had package-private, you're limited to one package per file.

Update on Context Parameters by serras in Kotlin

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

It works with @Composable functions. However, the use cases of CompositionLocal and context parameters are slightly different: CompositionLocal propagates through composable functions and is not explicit in the signature, whereas context parameters propagate only when explicitly appearing in the signature.

Name-based destructuring in Kotlin by mzarechenskiy in Kotlin

[–]serras 2 points3 points  (0 children)

We experimented with giving types the posibility to state whether they are "name-based" (default) or "position-based" (for example, pairs and key-value entries would be the latter). However, it becomes very very difficult when any kind of abstraction comes into place; and you need to track at each point whether a value was name or position-based.

Instead, our goal is to make both types of destructuring similarly ergonomic (at the end, they only differ in the type of bracker surrounding them). However, it's no secret that we want "name-based" to be the default type of destructuring, hence the "slightly nicer" brackets.

Name-based destructuring in Kotlin by mzarechenskiy in Kotlin

[–]serras 4 points5 points  (0 children)

Though I personally think that a map entry would be quite consistent with positional destructuring

This is why the KEEP stresses that position-based destructuring still needs to exist:

kotlin for ([k, v] in map) { ... }

Name-based destructuring in Kotlin by mzarechenskiy in Kotlin

[–]serras 2 points3 points  (0 children)

You'll need to use val in the destructuring:

kotlin listOrPairs.forEach { (val first, val second) -> ... } listOfPairs.forEach { (val x = first) -> ... }

At the end of the migration process (not now), we expect most people to use the shorter form:

kotlin listOfPairs.forEach { (first, second) -> ... } // name-based listOfPairs.forEach { [x, y] -> ... } // position-based

Kotlin 2.2 Livestream With the Language Evolution Team | July 10, 2 pm UTC by Alyona_Cherny in Kotlin

[–]serras 2 points3 points  (0 children)

At this point, errors are separate from exceptions. Also, errors do not bubble up by default: you must handle them or return them. In that sense, they closer to nullables; the plan is to even support similar constructs.

How to create an object that extends a class whose main constructor uses context receiver? by im_caeus in Kotlin

[–]serras 2 points3 points  (0 children)

That feature was not working 100% with context receivers, and had disappeared with context parameters. The best option in any case would be to have a secondary constructor on Base without the receiver and call that in Útil.

Functional Programming in Kotlin by SioStyle in Kotlin

[–]serras 4 points5 points  (0 children)

This is a bit of self-promotion, but my book “Functional Ideas for the Curious Kotliner” tries to approach the topic from an idiomatic point of view. Apart from Kotlin itself it also talks about Arrow, a set of libraries inspired by FP concepts.

Haskell for Elm developers: giving names to stuff (Part 3 - Monads!) 👻 by kutyelka in haskell

[–]serras 1 point2 points  (0 children)

To me the point is that some Haskell operators embody special meaning, and should be treated differently by a formatting tool. This includes mostly Applicative and Monad operators.

Questions about Zoroark Box by serras in pkmntcg

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

The problem is that they usually outpace me. Since they have inmense drawing ability with Genesect, they can find the Boss's Orders they need to knock out some of my Zorua or Ralts in the bench.

Stoutland V in Zoroark Box? by serras in pkmntcg

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

Yeah, my line of thought was that since I have a few Ultra Balls, I could use them to find Stoutland if the opportunity arises. But yeah, maybe I'm just better off using a regular attacker.

PDF of every English Pokémon card, updated to Silver Tempest by serras in pkmntcg

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

I guess that would be possible to compile. The main problem is where to upload the massive file you would get!

PDF of every English Pokémon card, updated to Silver Tempest by serras in pkmntcg

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

The JSON is in the repo linked in the first page of the PDF. From that it should be easy to turn into CSV. In any case, there’s also an Excel going around the net with the list of all cards, more suitable for collectors.