• cheeser
  • ernimril
  • joed
  • kinabalu
  • lunk
  • ojacobson
  • r0bby
  • ThaDon
  • ricky_clarkson
  • topriddy

« 2021-01-23


2021-01-25 »

Nick Message Date
crabskuttles [crabskuttles!~crabskutt@2403:6200:8810:a0e1:51cf:b1d7:69ea:c345] has joined #kotlin [12:19]
sleepster [sleepster!~user@gateway/tor-sasl/sleepster] has joined #kotlin [12:54]
sleepster I have a function right now where I execute a 'map' and then an 'any'. From my understanding, Kotlin will execute the entire map function which executes over all elements, then performs the 'any' [12:55]
sleepster is there a way to optimize this? so after an element is executed in the map, immediately execute the any [12:55]
ricky_clarkson What's the source, a list? [12:56]
ricky_clarkson probably list.asSequence().map { blarg }.any { blarg } will do what you want. [12:57]
ricky_clarkson Sequences are lazy. If you come from the Java world they're analogous to streams. In other worlds, iterables/iterators/enumerables/enumerators [12:57]
ricky_clarkson Is there a less {}y way of providing two or more lambdas as parameters to a function? [01:31]
ricky_clarkson toImmutableMap({ obj -> }) { obj -> obj } looks a bit odd [01:32]
raoul11 [raoul11!~raoul11@unaffiliated/raoul11] has joined #kotlin [02:13]
phaleth [phaleth!~phaleth@unaffiliated/phaleth] has joined #kotlin [04:24]
veegee [veegee!~veegee@] has joined #kotlin [04:35]
esro [esro!] has joined #kotlin [05:12]
Lengsdorfer [Lengsdorfer!~Lengsdorf@unaffiliated/lengsdorfer] has joined #kotlin [05:58]
veegee_ [veegee_!~veegee@] has joined #kotlin [06:15]
esro [esro!] has joined #kotlin [06:58]
Bombe ricky_clarkson, { obj -> } can be replaced by obj::id? but generally no, lambdas require the braces so unless you can use method references you?re stuck with them. [08:43]
cheeser /1/1 [08:47]
Siecje [Siecje!~siecje@2607:fea8:e200:6900:cd2a:2a99:641e:461a] has joined #kotlin [09:51]
snalty [snalty!] has joined #kotlin [10:29]
mossylane [mossylane!~user@] has joined #kotlin [10:30]
zutat [zutat!4e30774b@unaffiliated/zutat] has joined #kotlin [12:46]
esro [esro!] has joined #kotlin [12:53]
rayyyy [rayyyy!~nanoz@gateway/tor-sasl/nanoz] has joined #kotlin [01:01]
rayyyy1 [rayyyy1!~nanoz@gateway/tor-sasl/nanoz] has joined #kotlin [01:12]
veegee [veegee!~veegee@] has joined #kotlin [01:46]
zutat [zutat!4e30774b@unaffiliated/zutat] has joined #kotlin [02:22]
raoul11 [raoul11!~raoul11@unaffiliated/raoul11] has joined #kotlin [02:58]
orbyt_ [orbyt_!~orbyt@] has joined #kotlin [02:58]
raoul11 [raoul11!~raoul11@unaffiliated/raoul11] has joined #kotlin [04:47]
hnOsmium0001 [hnOsmium0001!uid453710@gateway/web/] has joined #kotlin [05:05]
ricky_clarkson I found I can get from List<Deferred<Foo>> to List<Foo> with .awaitAll() .. [06:41]
ricky_clarkson Any idea how I'd do that with Map<Foo, Deferred<Bar>> -> Map<Foo, Bar> ? [06:41]
cheeser how would you get the Foo? [06:42]
ricky_clarkson The map already contains foos [06:42]
ricky_clarkson Maybe I can use a Pair<Foo, Deferred<Bar>> as a midpoint in getting there, and somehow convert that to a Deferred<Pair<Foo, Bar>>, do awaitAll() on a list of those, and convert the result to a map [06:44]
ricky_clarkson Looks like deliberately doesn't exist.. [06:47]
ricky_clarkson I don't get it but it looks like I can do .await() on each deferred in a loop, I guess that has performance problems [07:10]
ffwacom [ffwacom!sid36937@gateway/web/] has joined #kotlin [07:19]
hnOsmium0001 [hnOsmium0001!uid453710@gateway/web/] has joined #kotlin [07:20]