Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 02:49
    ChristopherDavenport synchronize #184
  • 02:48
    ChristopherDavenport synchronize #184
  • 02:40
    ChristopherDavenport synchronize #187
  • 02:38
    ChristopherDavenport synchronize #187
  • 01:56
    ChristopherDavenport commented #187
  • 01:55
    ChristopherDavenport synchronize #187
  • 01:40
    gvolpe review_requested #187
  • 01:40
    gvolpe review_requested #187
  • 01:34
    ChristopherDavenport opened #187
  • 01:30
    ChristopherDavenport commented #184
  • 01:15
    gvolpe labeled #185
  • 01:15
    gvolpe labeled #185
  • 01:15
    gvolpe labeled #185
  • 01:15
    gvolpe edited #185
  • 00:18

    gvolpe on master

    Make Final, Add Documentation t… Merge pull request #186 from Ch… (compare)

  • 00:18
    gvolpe closed #186
  • 00:17
    gvolpe commented #185
  • 00:11
    gvolpe commented #184
  • 00:03
    ChristopherDavenport opened #186
  • Dec 12 23:56
    ChristopherDavenport opened #185
Calvin Lee Fernandes
@calvinlfer
lol
Gabriel Volpe
@gvolpe
Awesome, I'll have a look in a few hours when I get to my laptop but if Jakub gave the green light that's fine :)
Tomasz Szymula
@tomaszym
Hello, I can't find any reason for an argument ev: Numeric[V] in interpreter.BaseRedis.zAddIncr where V is a member in ScoreWithValue[V] – unless I'm entirely missing something you might want to check it
Gabriel Volpe
@gvolpe
Hi @tomaszym , I think you're right. Would you like to raise an issue? I can fix it fairly quickly or if you would like to, feel free to send a PR :) Just let us know here to avoid work duplication.
Tomasz Szymula
@tomaszym
I'll gladly do it even if it's more a gesture than a substantial help this time :)
Gabriel Volpe
@gvolpe
Please do, go for it @tomaszym :)
Gabriel Volpe
@gvolpe
Madan Kumar Epuri
@madanepuri
what is the equivalent command for https://redis.io/commands/exists? I see only hExists in HashCommands
Gabriel Volpe
@gvolpe
Hi @madanepuri , it seems missing. Raise an issue or even better get a PR in :)
I'm curious though, in what cases would you need such command?
Madan Kumar Epuri
@madanepuri
@gvolpe Raised issue - profunktor/redis4cats#151 for exists command support
we use redis as global cache for whitelisting purposes. One of components writes to redis and other component only requires the presence of a key to process streaming events
Gabriel Volpe
@gvolpe
:+1:
PawelJ-PL
@PawelJ-PL
Hi. I would like to add Redis INFO command to library. Lettuce returns just String. What is the best approach in this project? Should I return raw String or convert it to Map<String, Any> or create custom structure? INFO command returns a lot of fields and I'm not sure, whether it's equal on each environment, so I think the best option is Map<String, Any>
Gabriel Volpe
@gvolpe
Hi @PawelJ-PL , returning a Map[String, Any] would be good for now I guess.
PawelJ-PL
@PawelJ-PL
In the meantime, I thought that it would be better to return Map[String, String]. I'll prepare PR tonight.
Gabriel Volpe
@gvolpe
Yeah that's fine too, I don't have any strong opinion on that so go with the one you prefer the most :)
PawelJ-PL
@PawelJ-PL
I've created issue profunktor/redis4cats#156 and PR profunktor/redis4cats#155 with some diagnostic Redis command
Gabriel Volpe
@gvolpe
Thanks @PawelJ-PL :tada:
ikempf
@ikempf

Hi. I have some truble understanding the incr command's interface.

def incr(key: K)(implicit N: Numeric[V]): F[Long]

It expects Numeric evidence for the value but that would mean that I create a Redis connection with a RedisCodec[String, Long]. Does it make any sens to write such a codec ? Everything is a string in redis and a Long codec would juste write longs as string and read strings as longs.
In this case I feel like the lettuce interface makes more sens

public RedisFuture<Long> incr(K key) {

Am I missing something here ?

Gabriel Volpe
@gvolpe
Hi @ikempf , it does matter indeed. What does it mean to increase a String value?
Lettuce's interface is lying to you. It'll blow up if the value contained in that key is not numeric.
From the Scala side we try to prevent these errors at compile time.
ikempf
@ikempf
Ok you're right.
I kinda knew this but it still feels weird because I want to do the parsing on a higher level (retrieve the string from redis and parse whatever I expect) and not inside a Codec.
But for incr it does make more sense, thx :)
Gabriel Volpe
@gvolpe
@PawelJ-PL @alirezameskin @zakolenko your changes are now out! :tada:
Rob Norris
@tpolecat
object RedisURI {
  def make[F[_]: Sync](uri: => String): F[JRedisURI] =
    Sync[F].delay(JRedisURI.create(uri))
}
@gvolpe why is this in F? Is JRedisURI.create impure?
Gabriel Volpe
@gvolpe
Yeah I think JRedisURI.create throws an Exception if the URI is not valid
Rob Norris
@tpolecat
In that case you could weaken that constraint to ApplicativeError and use catchNonFatal instead of delay.
(not a big deal)
Oh by the way I just replaced a file cache with redis4cats and it worked the first time! :tada:
Gabriel Volpe
@gvolpe
That sounds better, will get it done soon :)
Awesome, glad to hear!
Rob Norris
@tpolecat
Also I have never used Redis before.
Gabriel Volpe
@gvolpe
Redis is awesome!
I used to write games for a company in 2012 and we used Redis for everything
The best thing I built used the Pub/Sub mechanism
Rob Norris
@tpolecat
It seems good so far.
Paulius Imbrasas
@CremboC
Is there an example with watch in transactions? I found the issue but seems like nothing has happened since 2 weeks ago
Gabriel Volpe
@gvolpe
Not for now @CremboC , PRs welcome though :)
Paulius Imbrasas
@CremboC
I need an example because I don't know how to use it :D
but don't worry, I ended up not using redis :eyes:
Gabriel Volpe
@gvolpe
Hehe no problems
If you know how to use the command using plain Redis, you should be able to get it working in Scala, the API is pretty much autodiscoverable
Madan Kumar Epuri
@madanepuri
Is TTL(https://redis.io/commands/ttl) or PTTL(https://redis.io/commands/pttl) redis command supported?
Anyway opened issue profunktor/redis4cats#164
Gabriel Volpe
@gvolpe
Done @madanepuri . Only thing missing is docs, maybe someone else can PR that in :)
Madan Kumar Epuri
@madanepuri
Thanks @gvolpe