Jump to page: 1 2
Thread overview
Tiny Redis- a Redis driver for D
Jul 26, 2012
Adil
Jul 26, 2012
simendsjo
Jul 27, 2012
Russel Winder
Jul 27, 2012
Sönke Ludwig
Jul 27, 2012
Jacob Carlborg
Orbit resourcing [ was Re: Tiny Redis- a Redis driver for D ]
Jul 28, 2012
Russel Winder
Jul 28, 2012
Jacob Carlborg
Jul 27, 2012
Adil
Jul 26, 2012
H
Jul 27, 2012
Adil
Jul 27, 2012
Jacob Carlborg
Jul 27, 2012
Adil
July 26, 2012
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
July 26, 2012
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).
July 26, 2012
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

July 26, 2012
i have an error
rdmd src/example.d src/tinyredis.d
--- errorlevel 127
make: *** [example] Error 127

July 27, 2012
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
July 27, 2012
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.

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 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


July 27, 2012
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...

July 27, 2012
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


July 27, 2012
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


July 27, 2012
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.
« First   ‹ Prev
1 2