Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
two questions about lua scripting
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Xiangrong Fang  
View profile  
 More options Jul 26 2012, 9:50 pm
From: Xiangrong Fang <xrf...@gmail.com>
Date: Fri, 27 Jul 2012 09:50:22 +0800
Local: Thurs, Jul 26 2012 9:50 pm
Subject: two questions about lua scripting

Hi All,

1) Is there a sha1 function?  I read here:
http://antirez.com/m/p.php?i=234about sha1(), but seems not available?

2) I need to write current time to a hash's field (as an object's last
updated timestamp), but TIME is not allowed in writing context. I can use
an external time source, but why on earth is this decision? What
consequence will there be, if we can call TIME in lua scripting?

Thanks,
Shannon

--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Arek Bochinski  
View profile  
 More options Jul 27 2012, 12:01 am
From: Arek Bochinski <zeeero.co...@gmail.com>
Date: Fri, 27 Jul 2012 00:01:24 -0400
Local: Fri, Jul 27 2012 12:01 am
Subject: Re: two questions about lua scripting

redis.sha1hex(string) will return a hex digest.
https://github.com/antirez/redis/blob/unstable/src/scripting.c#L508


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sebastian  
View profile  
 More options Jul 27 2012, 7:41 am
From: Sebastian <seppo0...@gmail.com>
Date: Fri, 27 Jul 2012 08:41:28 -0300
Local: Fri, Jul 27 2012 7:41 am
Subject: Re: two questions about lua scripting

About the time, I'm pretty sure that's because of replication. If the
time is a parameter it can be replicated, but if the time is read from
the OS every time the results will be different. The same thing applies
to random parameters.

On 7/27/12 1:01 AM, Arek Bochinski wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Xiangrong Fang  
View profile  
 More options Jul 29 2012, 9:48 pm
From: Xiangrong Fang <xrf...@gmail.com>
Date: Mon, 30 Jul 2012 09:48:25 +0800
Local: Sun, Jul 29 2012 9:48 pm
Subject: Re: two questions about lua scripting

I still don't understand why replication is a problem. On the EVAL document
page there is a demo on generating random keys, by calling math.random() in
lua.   Since it is "random" why Redis insist that Master and Slave must
hold the same data?

2012/7/27 Sebastian <seppo0...@gmail.com>

--

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »