www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Tiny Redis- a Redis driver for D

reply "Adil" <simplyadilb gmail.com> writes:
Announcing Tiny Redis.

Tiny Redis is a Redis driver for the D programming language (v2). 
The api is minimalist and makes working with Redis trivial. All 
the basic operations on all data types are supported :

strings
hashes
lists
sets
sorted sets
transactions

The more esoteric features like Lua scripting and Pub/Sub have 
not been tested yet.

Read about it here : https://github.com/adilbaig/Tiny-Redis

If you're not familiar with Redis, go to http://redis.io/

This is an early attempt at working in D. FWIW, i've only tested 
this on Linux with DMD 2.059. Any suggestions to improve the code 
(and bug reports) are very welcome.

Adil
Jul 26 2012
next sibling parent simendsjo <simendsjo gmail.com> writes:
On Thu, 26 Jul 2012 22:29:58 +0200, Adil <simplyadilb gmail.com> wrote:

 FWIW, i've only tested this on Linux with DMD 2.059
Haven't tested it, but it compiles on linux64 and dmd-trunk (2.060ish).
Jul 26 2012
prev sibling next sibling parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 7/26/12 4:29 PM, Adil wrote:
 Announcing Tiny Redis.

 Tiny Redis is a Redis driver for the D programming language (v2). The
 api is minimalist and makes working with Redis trivial.
[snip] Awesome! On reddit: http://www.reddit.com/r/programming/comments/x7js2/tiny_redis_a_redis_driver_for_the_d_programming/ Andrei
Jul 26 2012
parent reply Russel Winder <russel winder.org.uk> writes:
On Thu, 2012-07-26 at 16:39 -0400, Andrei Alexandrescu wrote:
 On 7/26/12 4:29 PM, Adil wrote:
 Announcing Tiny Redis.

 Tiny Redis is a Redis driver for the D programming language (v2). The
 api is minimalist and makes working with Redis trivial.
[snip] =20 Awesome! On reddit: =20 http://www.reddit.com/r/programming/comments/x7js2/tiny_redis_a_redis_dri=
ver_for_the_d_programming/ OK, but does this actually achieve anything to aid uptake of D? If D is to get traction, there should be a maintained page of validated libraries and frameworks. When people want to know things about a language they use Google and want links to pages other than things like GMane or Reddit. Actually put "dlang tiny redis" into Google and there is no mention of Reddit. OK so the first link is to this exchange in the forum (which is good), but the second link (for me when I did it, but as we know Google do an awful lot of anti-SEO) is to the Go libraries pages: http://go-lang.cat-v.org/pure-go-libs This page is not really the right one for Go these days, http://godashboard.appspot.com/project is. The beauty of all this is I can do, for example: go get github.com/mattn/go-gtk/gtk and now I have access to the Go GTK API. package main =20 import "github.com/mattn/go-gtk/gtk" =20 func main ( ) { gtk.Init ( nil ) window :=3D gtk.Window ( gtk.GTK_WINDOW_TOPLEVEL ) window.SetTitle ( "Hello World." ) window.Connect ( "destroy" , func ( w *gtk.GtkWidget , userData st= ring ) { gtk.MainQuit ( ) } , "Dummy string." ) window.Add ( gtk.Label ( "Hello World." ) ) window.ShowAll ( ) gtk.Main ( ) } I wonder if having one person working on a package management system for D as a side-project is a missed opportunity for D. Putting more effort and resource into this aspect of D is probably far more constructive to traction than tinkering with the language, the compiler and optimization. I appreciate that GTK is actually something of a minority thing, but it stands as a great example of how Go has a core and a supported way of dealing with contributed extras. D has a core (Phobos) and a collection of emails and posts on forums. I know actions speak louder than words but for the moment all my actions have to be with Python and Groovy in order to create income. If I could create income from D, I'd be doing less waffling here about D and more acting. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Jul 27 2012
next sibling parent reply =?UTF-8?B?U8O2bmtlIEx1ZHdpZw==?= <sludwig outerproduct.org> writes:
Am 27.07.2012 10:59, schrieb Russel Winder:
 I wonder if having one person working on a package management system for
 D as a side-project is a missed opportunity for D. Putting more effort
 and resource into this aspect of D is probably far more constructive to
 traction than tinkering with the language, the compiler and
 optimization.

 I appreciate that GTK is actually something of a minority thing, but it
 stands as a great example of how Go has a core and a supported way of
 dealing with contributed extras. D has a core (Phobos) and a collection
 of emails and posts on forums.

 I know actions speak louder than words but for the moment all my actions
 have to be with Python and Groovy in order to create income. If I could
 create income from D, I'd be doing less waffling here about D and more
 acting.
I fully agree! For vibe.d [which btw. also has a redis driver ;)] I made a simple package manager using github repositories as the source. However, if there would have been a 'standard' package manager, I wouldn't even have thought about writing my own. But to attract people who want to get something going fast, IMO it's vital to have an easy to use package management system. Of course, if you are C++ or something, you don't really need to attract those people...
Jul 27 2012
parent reply Jacob Carlborg <doob me.com> writes:
On 2012-07-27 15:58, Sönke Ludwig wrote:

 I fully agree! For vibe.d [which btw. also has a redis driver ;)] I made
 a simple package manager using github repositories as the source.
 However, if there would have been a 'standard' package manager, I
 wouldn't even have thought about writing my own.
Working on that: https://github.com/jacob-carlborg/orbit/wiki/Orbit-Package-Manager-for-D -- /Jacob Carlborg
Jul 27 2012
parent reply Russel Winder <russel winder.org.uk> writes:
Jacob,

On Fri, 2012-07-27 at 22:01 +0200, Jacob Carlborg wrote:
[=E2=80=A6]
 Working on that:=20
 https://github.com/jacob-carlborg/orbit/wiki/Orbit-Package-Manager-for-D
The problem here is exemplified by the commit history: this is a volunteer side project by a busy individual. To progress this at a decent speed, and thus enable D to have greater traction, there needs to be more than one person working on this, and preferably some-one paid to work on it, even if part time. I am not in a position to actively contribute for the moment, sadly, except to try and chivvy up some support to get this project moving. How can we get more people involved? Are there any organizations out there who could through =C2=A320,000 at the problem either as cash or by allocating an employee to work on the project? --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Jul 28 2012
parent Jacob Carlborg <doob me.com> writes:
On 2012-07-28 15:41, Russel Winder wrote:

 The problem here is exemplified by the commit history: this is a
 volunteer side project by a busy individual.  To progress this at a
 decent speed, and thus enable D to have greater traction, there needs to
 be more than one person working on this, and preferably some-one paid to
 work on it, even if part time.
Yeah, that is constantly a problem. I've been working on DStep lately. -- /Jacob Carlborg
Jul 28 2012
prev sibling next sibling parent "Adil" <simplyadilb gmail.com> writes:
On Friday, 27 July 2012 at 09:10:19 UTC, Russel Winder wrote:
 On Thu, 2012-07-26 at 16:39 -0400, Andrei Alexandrescu wrote:
 On 7/26/12 4:29 PM, Adil wrote:
 Announcing Tiny Redis.

 Tiny Redis is a Redis driver for the D programming language 
 (v2). The
 api is minimalist and makes working with Redis trivial.
[snip] Awesome! On reddit: http://www.reddit.com/r/programming/comments/x7js2/tiny_redis_a_redis_driver_for_the_d_programming/
OK, but does this actually achieve anything to aid uptake of D? If D is to get traction, there should be a maintained page of validated libraries and frameworks. When people want to know things about a language they use Google and want links to pages other than things like GMane or Reddit. Actually put "dlang tiny redis" into Google and there is no mention of Reddit. OK so the first link is to this exchange in the forum (which is good), but the second link (for me when I did it, but as we know Google do an awful lot of anti-SEO) is to the Go libraries pages: http://go-lang.cat-v.org/pure-go-libs This page is not really the right one for Go these days, http://godashboard.appspot.com/project is. The beauty of all this is I can do, for example: go get github.com/mattn/go-gtk/gtk and now I have access to the Go GTK API. package main import "github.com/mattn/go-gtk/gtk" func main ( ) { gtk.Init ( nil ) window := gtk.Window ( gtk.GTK_WINDOW_TOPLEVEL ) window.SetTitle ( "Hello World." ) window.Connect ( "destroy" , func ( w *gtk.GtkWidget , userData string ) { gtk.MainQuit ( ) } , "Dummy string." ) window.Add ( gtk.Label ( "Hello World." ) ) window.ShowAll ( ) gtk.Main ( ) } I wonder if having one person working on a package management system for D as a side-project is a missed opportunity for D. Putting more effort and resource into this aspect of D is probably far more constructive to traction than tinkering with the language, the compiler and optimization. I appreciate that GTK is actually something of a minority thing, but it stands as a great example of how Go has a core and a supported way of dealing with contributed extras. D has a core (Phobos) and a collection of emails and posts on forums. I know actions speak louder than words but for the moment all my actions have to be with Python and Groovy in order to create income. If I could create income from D, I'd be doing less waffling here about D and more acting.
I second this proposal. My line of work, web and server-side development, routinely requires a mix of many libraries (ORMs, NoSQL apis, Social network API among others) that have many competing implementations and are constantly in the state of flux. Not to mention they change frequently from project to project. Having a package manager that allows me to install a library with all its dependencies in one command eases development of server-side applications in D. It will make it more conducive to a lot of web/application developers to start using D in their projects, and hence introduce it into their organizations.
Jul 27 2012
prev sibling parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 7/27/12 4:59 AM, Russel Winder wrote:
 I wonder if having one person working on a package management system for
 D as a side-project is a missed opportunity for D. Putting more effort
 and resource into this aspect of D is probably far more constructive to
 traction than tinkering with the language, the compiler and
 optimization.
I think the same. We need badly an expert in package management on team. Or, of course, one who has the time and inclination to become one. Andrei
Jul 28 2012
prev sibling next sibling parent reply "H" <asm hotmail.com> writes:
i have an error
rdmd src/example.d src/tinyredis.d
--- errorlevel 127
make: *** [example] Error 127
Jul 26 2012
parent "Adil" <simplyadilb gmail.com> writes:
I'm not sure what this error is, but a quick google suggests its 
a gcc issue.

On Thursday, 26 July 2012 at 23:36:55 UTC, H wrote:
 i have an error
 rdmd src/example.d src/tinyredis.d
 --- errorlevel 127
 make: *** [example] Error 127
Jul 27 2012
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2012-07-26 22:29, Adil wrote:
 Announcing Tiny Redis.

 Tiny Redis is a Redis driver for the D programming language (v2). The
 api is minimalist and makes working with Redis trivial. All the basic
 operations on all data types are supported :

 strings
 hashes
 lists
 sets
 sorted sets
 transactions

 The more esoteric features like Lua scripting and Pub/Sub have not been
 tested yet.

 Read about it here : https://github.com/adilbaig/Tiny-Redis

 If you're not familiar with Redis, go to http://redis.io/

 This is an early attempt at working in D. FWIW, i've only tested this on
 Linux with DMD 2.059. Any suggestions to improve the code (and bug
 reports) are very welcome.

 Adil
Fails on Mac OS X 64bit: ~/development/d/Tiny-Redis $ make rdmd src/example.d src/tinyredis.d std.socket.SocketOSException std/socket.d(164): Unable to connect socket: Connection refused ---------------- 5 example 0x000000010002da9c std.socket.TcpSocket std.socket.TcpSocket.__ctor(std.socket.Address) + 48 6 example 0x00000001000019cf tinyredis.Redis tinyredis.Redis.__ctor(immutable(char)[], ushort) + 91 7 example 0x00000001000015a4 _Dmain + 72 8 example 0x000000010001eb16 extern (C) int rt.dmain2.main(int, char**).void runMain() + 34 9 example 0x000000010001e4cd extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate()) + 45 10 example 0x000000010001eb60 extern (C) int rt.dmain2.main(int, char**).void runAll() + 56 11 example 0x000000010001e4cd extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate()) + 45 12 example 0x000000010001e457 main + 235 13 example 0x0000000100001554 start + 52 14 ??? 0x0000000000000002 0x0 + 2 ---------------- make: *** [example] Error 1 -- /Jacob Carlborg
Jul 26 2012
parent "Adil" <simplyadilb gmail.com> writes:
Looks like Redis is not running locally. You'll need redis server 
running on the default local host/port.

I have updated the docs to mention this.

On Friday, 27 July 2012 at 06:22:19 UTC, Jacob Carlborg wrote:
 On 2012-07-26 22:29, Adil wrote:
 Announcing Tiny Redis.

 Tiny Redis is a Redis driver for the D programming language 
 (v2). The
 api is minimalist and makes working with Redis trivial. All 
 the basic
 operations on all data types are supported :

 strings
 hashes
 lists
 sets
 sorted sets
 transactions

 The more esoteric features like Lua scripting and Pub/Sub have 
 not been
 tested yet.

 Read about it here : https://github.com/adilbaig/Tiny-Redis

 If you're not familiar with Redis, go to http://redis.io/

 This is an early attempt at working in D. FWIW, i've only 
 tested this on
 Linux with DMD 2.059. Any suggestions to improve the code (and 
 bug
 reports) are very welcome.

 Adil
Fails on Mac OS X 64bit: ~/development/d/Tiny-Redis $ make rdmd src/example.d src/tinyredis.d std.socket.SocketOSException std/socket.d(164): Unable to connect socket: Connection refused ---------------- 5 example 0x000000010002da9c std.socket.TcpSocket std.socket.TcpSocket.__ctor(std.socket.Address) + 48 6 example 0x00000001000019cf tinyredis.Redis tinyredis.Redis.__ctor(immutable(char)[], ushort) + 91 7 example 0x00000001000015a4 _Dmain + 72 8 example 0x000000010001eb16 extern (C) int rt.dmain2.main(int, char**).void runMain() + 34 9 example 0x000000010001e4cd extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate()) + 45 10 example 0x000000010001eb60 extern (C) int rt.dmain2.main(int, char**).void runAll() + 56 11 example 0x000000010001e4cd extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate()) + 45 12 example 0x000000010001e457 main + 235 13 example 0x0000000100001554 start + 52 14 ??? 0x0000000000000002 0x0 + 2 ---------------- make: *** [example] Error 1
Jul 27 2012