www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - vibe.d 0.7.12 released

reply =?ISO-8859-15?Q?S=F6nke_Ludwig?= <sludwig outerproduct.org> writes:
Changes:

 - Refactored the MongoDB client to better match the actual database
   structure + range interface for query results (by Dicebot)

 - A number of important fixes in the HttpClient and ConnectionPool

 - Correct memory alignment is now enforced in the custom memory allocators
   (Caused exceptions on 32-bit Linux)

 - Added task management methods (interrupt(), join() and running)

 - Lots of smaller fixes and enhancements

Full change log: http://vibed.org/blog/posts/vibe-release-0.7.12
Download: http://vibed.org/download?file=vibed-0.7.12.zip
GitHub: https://github.com/rejectedsoftware/vibe.d
Feb 11 2013
next sibling parent Jordi Sayol <g.sayol yahoo.es> writes:
Al 11/02/13 12:53, En/na S=C3=B6nke Ludwig ha escrit:
 Changes:
=20
  - Refactored the MongoDB client to better match the actual database
    structure + range interface for query results (by Dicebot)
=20
  - A number of important fixes in the HttpClient and ConnectionPool
=20
  - Correct memory alignment is now enforced in the custom memory alloca=
tors
    (Caused exceptions on 32-bit Linux)
=20
  - Added task management methods (interrupt(), join() and running)
=20
  - Lots of smaller fixes and enhancements
=20
 Full change log: http://vibed.org/blog/posts/vibe-release-0.7.12
 Download: http://vibed.org/download?file=3Dvibed-0.7.12.zip
 GitHub: https://github.com/rejectedsoftware/vibe.d
=20
Congratulations for this new release S=C3=B6nke! Great work! --=20 Jordi Sayol
Feb 11 2013
prev sibling next sibling parent reply =?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com> writes:
On 02/11/2013 03:53 AM, Sönke Ludwig wrote:

 Full change log: http://vibed.org/blog/posts/vibe-release-0.7.12
 Download: http://vibed.org/download?file=vibed-0.7.12.zip
 GitHub: https://github.com/rejectedsoftware/vibe.d
Great work! :) I use vibe.d as an example of how useful a tool D is. Recently, somebody has shown me a web server code written in Python: It was in 14 lines, could you belive it? Well, I've responded back with a vibe.d example. It was basically the same code as Python, translated to D. Of course, the solution that use vibe.d does not have Python's infamous GIL; instead, it comes with parallelism and concurrency out of the box. And you are aware of typos in your code even before running your program. ;) Ali
Feb 11 2013
next sibling parent reply FG <home fgda.pl> writes:
Great project -- a flagship example of D's real world application!

On 2013-02-11 19:11, Ali Çehreli wrote:
 same code as Python, translated to D. Of course, the solution that use vibe.d
 does not have Python's infamous GIL; instead, it comes with parallelism and
 concurrency out of the box. And you are aware of typos in your code even before
 running your program. ;)
Running worker processes can make the GIL problem a little less of a PITA, but having the typos pointed out before running the app... is just priceless. :) I'm struggling with the temptation to move a Python website to vibe.d. What keeps me from doing that are Django templates. Not even because vibe's templates have to be recompiled each time some small markup change is introduced -- I got used to that with LaTeX ;) -- but because of Jade. It's way too far off course from HTML for my tastes. I see no reason for inventing a completely new format when all you need is templating. So let me use this opportunity to ask you: is somebody working on other template systems for vibe.d already or shall I get involved myself? I'm thinking about something similar to this, syntax-wise: http://jinja.pocoo.org/
Feb 11 2013
next sibling parent reply "Aleksandar Ruzicic" <aleksandar ruzicic.info> writes:
On Monday, 11 February 2013 at 19:08:16 UTC, FG wrote:
 Great project -- a flagship example of D's real world 
 application!

 On 2013-02-11 19:11, Ali Çehreli wrote:
 same code as Python, translated to D. Of course, the solution 
 that use vibe.d
 does not have Python's infamous GIL; instead, it comes with 
 parallelism and
 concurrency out of the box. And you are aware of typos in your 
 code even before
 running your program. ;)
Running worker processes can make the GIL problem a little less of a PITA, but having the typos pointed out before running the app... is just priceless. :) I'm struggling with the temptation to move a Python website to vibe.d. What keeps me from doing that are Django templates. Not even because vibe's templates have to be recompiled each time some small markup change is introduced -- I got used to that with LaTeX ;) -- but because of Jade. It's way too far off course from HTML for my tastes. I see no reason for inventing a completely new format when all you need is templating. So let me use this opportunity to ask you: is somebody working on other template systems for vibe.d already or shall I get involved myself? I'm thinking about something similar to this, syntax-wise: http://jinja.pocoo.org/
I'm working on porting Twig (http://twig.sensiolabs.org/) to D (so I can use it with vibe.d) but I'm still far even from a preview release.. I'm hoping to have more spare time in upcoming months to implement at least small usable subset of Twig features. I will post in this forum/NG once I have something to show..
Feb 11 2013
parent FG <home fgda.pl> writes:
On 2013-02-11 20:40, Aleksandar Ruzicic wrote:
 I'm working on porting Twig (http://twig.sensiolabs.org/) to D (so I can use it
 with vibe.d) but I'm still far even from a preview release.. I'm hoping to have
 more spare time in upcoming months to implement at least small usable subset of
 Twig features.
Splendid. Tell me if you need help with that.
Feb 11 2013
prev sibling next sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2013-02-11 20:08, FG wrote:
 Great project -- a flagship example of D's real world application!

 On 2013-02-11 19:11, Ali Çehreli wrote:
 same code as Python, translated to D. Of course, the solution that use
 vibe.d
 does not have Python's infamous GIL; instead, it comes with
 parallelism and
 concurrency out of the box. And you are aware of typos in your code
 even before
 running your program. ;)
Running worker processes can make the GIL problem a little less of a PITA, but having the typos pointed out before running the app... is just priceless. :) I'm struggling with the temptation to move a Python website to vibe.d. What keeps me from doing that are Django templates. Not even because vibe's templates have to be recompiled each time some small markup change is introduced -- I got used to that with LaTeX ;) -- but because of Jade. It's way too far off course from HTML for my tastes. I see no reason for inventing a completely new format when all you need is templating. So let me use this opportunity to ask you: is somebody working on other template systems for vibe.d already or shall I get involved myself? I'm thinking about something similar to this, syntax-wise: http://jinja.pocoo.org/
I like Haml, it's similar to Jade but without the pipes for the plain text. What about plain HTML, like Ruby (Erb) or PHP uses. -- /Jacob Carlborg
Feb 11 2013
parent reply FG <home fgda.pl> writes:
On 2013-02-11 21:37, Jacob Carlborg wrote:
 On 2013-02-11 20:08, FG wrote:
 I'm struggling with the temptation to move a Python website to vibe.d.
 What keeps me from doing that are Django templates. Not even because
 vibe's templates have to be recompiled each time some small markup
 change is introduced -- I got used to that with LaTeX ;) -- but because
 of Jade. It's way too far off course from HTML for my tastes. I see no
 reason for inventing a completely new format when all you need is
 templating.
I like Haml, it's similar to Jade but without the pipes for the plain text. What about plain HTML, like Ruby (Erb) or PHP uses.
The problem I have with those is that they are designed for HTML. What if I wanted to make an email template instead?
Feb 11 2013
next sibling parent "jerro" <a a.com> writes:
On Monday, 11 February 2013 at 21:06:41 UTC, FG wrote:
 On 2013-02-11 21:37, Jacob Carlborg wrote:
 On 2013-02-11 20:08, FG wrote:
 I'm struggling with the temptation to move a Python website 
 to vibe.d.
 What keeps me from doing that are Django templates. Not even 
 because
 vibe's templates have to be recompiled each time some small 
 markup
 change is introduced -- I got used to that with LaTeX ;) -- 
 but because
 of Jade. It's way too far off course from HTML for my tastes. 
 I see no
 reason for inventing a completely new format when all you 
 need is
 templating.
I like Haml, it's similar to Jade but without the pipes for the plain text. What about plain HTML, like Ruby (Erb) or PHP uses.
The problem I have with those is that they are designed for HTML. What if I wanted to make an email template instead?
If you need a D templating engine that can be used for anything, not just HTML, you could try http://mustache.github.com/.
Feb 11 2013
prev sibling parent reply Jacob Carlborg <doob me.com> writes:
On 2013-02-11 22:07, FG wrote:

 The problem I have with those is that they are designed for HTML.
 What if I wanted to make an email template instead?
Erb is like a Ruby preprocessor that can be used for any format. It's used for many things in Ruby on Rails: index.html.erb - Erb preprocessor, result is HTML <% if foo %> <li>asd</li> <% end %> bar.js.coffee.erb - Erb then CoffeeScript preprocessor, result is JavaScript <% if foo %> bar = -> console.log("asd") <% end %> foo.text.erb - Erb preprocessor, result is plain text <% if foo %> asd <% end %> database.yml.erb - Erb preprocessor, result is YAML development: username: <%= username %> password: <%= password %> -- /Jacob Carlborg
Feb 11 2013
parent "Nathan M. Swan" <nathanmswan gmail.com> writes:
On Monday, 11 February 2013 at 21:41:33 UTC, Jacob Carlborg wrote:
 On 2013-02-11 22:07, FG wrote:

 The problem I have with those is that they are designed for 
 HTML.
 What if I wanted to make an email template instead?
Erb is like a Ruby preprocessor that can be used for any format. It's used for many things in Ruby on Rails: index.html.erb - Erb preprocessor, result is HTML <% if foo %> <li>asd</li> <% end %> bar.js.coffee.erb - Erb then CoffeeScript preprocessor, result is JavaScript <% if foo %> bar = -> console.log("asd") <% end %> foo.text.erb - Erb preprocessor, result is plain text <% if foo %> asd <% end %> database.yml.erb - Erb preprocessor, result is YAML development: username: <%= username %> password: <%= password %>
This really makes sense for D. It can be easily combined with D's mixin capabilities to make it so you don't even need to implement stuff like various loops: <% [d code] %> -> [d code] <%= [d expr] %> -> buffer.write([d expr]); [text] -> buffer.write("[text]"); NMS
Feb 12 2013
prev sibling next sibling parent Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Mon, 11 Feb 2013 20:08:44 +0100
FG <home fgda.pl> wrote:

 Great project -- a flagship example of D's real world application!
=20
 On 2013-02-11 19:11, Ali =C7ehreli wrote:
 same code as Python, translated to D. Of course, the solution that
 use vibe.d does not have Python's infamous GIL; instead, it comes
 with parallelism and concurrency out of the box. And you are aware
 of typos in your code even before running your program. ;)
=20 Running worker processes can make the GIL problem a little less of a PITA, but having the typos pointed out before running the app... is just priceless. :) =20 I'm struggling with the temptation to move a Python website to vibe.d. What keeps me from doing that are Django templates. Not even because vibe's templates have to be recompiled each time some small markup change is introduced -- I got used to that with LaTeX ;) -- but because of Jade. It's way too far off course from HTML for my tastes. I see no reason for inventing a completely new format when all you need is templating. =20 So let me use this opportunity to ask you: is somebody working on other template systems for vibe.d already or shall I get involved myself? I'm thinking about something similar to this, syntax-wise: http://jinja.pocoo.org/
I admit I'm not a fan of Jade either. Indent-syntaxes just aren't my thing. And fixing the larger semantic issues I have with HTML/CSS isn't part of Jade's charter, AFAICT. (That said, I don't have any problem with it being in Vibe.d.) Personally, I just use Adam's HTML DOM for D: https://github.com/adamdruppe/misc-stuff-including-D-programming-language-w= eb-stuff I've built up a couple utility libs that use the DOM to help automate some stuff (defining a page, caching rendered pages, repeating elements on a page, building/validating forms). It's mostly independent of Vibe.d, but I do use it with Vibe.d. I've been planning to release those utility libs when they're a little bit more ready (they're still a little too closely integrated into a private project of mine, and they still need some more work).
Feb 11 2013
prev sibling next sibling parent =?UTF-8?B?U8O2bmtlIEx1ZHdpZw==?= <sludwig outerproduct.org> writes:
Am 11.02.2013 20:08, schrieb FG:
 
 So let me use this opportunity to ask you: is somebody working on other
template systems for vibe.d
 already or shall I get involved myself? I'm thinking about something similar
to this, syntax-wise:
 http://jinja.pocoo.org/
I personally also wanted to start a purely text based template system for a while*, but never got around to it, yet. My idea was to make something that is similar to the existing template syntax, so also wanted to more directly use D statements instead of special casing all of them, like the Twig-likes do - which is a lot of work and probably has higher memory requirements during compilation (which is already often at it's limit right now). Of course, for people coming from Twig/Django it would be a big familiarity advantage to provide the same syntax, and existing templates could be reused. So that would be great to have. However, as soon as I really need it and nothing else exists yet, I will probably implement a very basic version of the former that can be extended later. Twig, from the first looks, just seems like much more involved than I can afford for this ATM. * For HTML I very much prefer to have all the syntax overhead of HTML taken off. It's faster to type and more readable (more readable also because it's possible to leave blank lines to structure the code without having them appear in the output). But of course this is a topic of personal taste/preference.
Feb 11 2013
prev sibling parent reply Johannes Pfau <nospam example.com> writes:
Am Mon, 11 Feb 2013 20:08:44 +0100
schrieb FG <home fgda.pl>:

 Great project -- a flagship example of D's real world application!
=20
 On 2013-02-11 19:11, Ali =C3=87ehreli wrote:
 same code as Python, translated to D. Of course, the solution that
 use vibe.d does not have Python's infamous GIL; instead, it comes
 with parallelism and concurrency out of the box. And you are aware
 of typos in your code even before running your program. ;)
=20 Running worker processes can make the GIL problem a little less of a PITA, but having the typos pointed out before running the app... is just priceless. :) =20 I'm struggling with the temptation to move a Python website to vibe.d. What keeps me from doing that are Django templates. Not even because vibe's templates have to be recompiled each time some small markup change is introduced -- I got used to that with LaTeX ;) -- but because of Jade. It's way too far off course from HTML for my tastes. I see no reason for inventing a completely new format when all you need is templating. =20 So let me use this opportunity to ask you: is somebody working on other template systems for vibe.d already or shall I get involved myself? I'm thinking about something similar to this, syntax-wise: http://jinja.pocoo.org/
mustache has a D implementation since some time: https://github.com/repeatedly/mustache-d There's no special vibe.d integration, but it shouldn't be hard to get it working. I've used mustache-d before it's pretty easy to use but it's a simple template system, it might not have all features you'd expect.
Feb 12 2013
parent reply =?UTF-8?B?U8O2bmtlIEx1ZHdpZw==?= <sludwig outerproduct.org> writes:
Am 12.02.2013 09:36, schrieb Johannes Pfau:
 
 mustache has a D implementation since some time:
 https://github.com/repeatedly/mustache-d
 
 There's no special vibe.d integration, but it shouldn't be hard to get
 it working. I've used mustache-d before it's pretty easy to use but
 it's a simple template system, it might not have all features you'd
 expect.
 
In particular it just has to have support for writing to a char/dchar output range (vibe.d's OutputStream implements a range interface).
Feb 12 2013
parent "Michael" <pr m1xa.com> writes:
Another one template engine that has pretty syntax is Razor in 
ASP.NET MVC. It's opensource and can be used in non-web areas.

Although it would be good to read a simple tutorial "how to 
use/integrate 3rd party template engine with vibe.d".
Feb 13 2013
prev sibling parent reply Russel Winder <russel winder.org.uk> writes:
On Mon, 2013-02-11 at 10:11 -0800, Ali =C3=87ehreli wrote:
[=E2=80=A6]
 I use vibe.d as an example of how useful a tool D is. Recently, somebody=
=20
 has shown me a web server code written in Python: It was in 14 lines,=20
 could you belive it? Well, I've responded back with a vibe.d example. It=
=20
 was basically the same code as Python, translated to D. Of course, the=
=20
 solution that use vibe.d does not have Python's infamous GIL; instead,=
=20
 it comes with parallelism and concurrency out of the box. And you are=20
 aware of typos in your code even before running your program. ;)
Python is not being compared to D here, vibe.d is being compared to <what?> Flask, Bottle,=E2=80=A6 I would suggest that vibe.d can be a real competitor in the Flask, Sinatra, Ratpack, etc. in the microframework space. But it needs the word spreading, which means serious applications mentioned in Python, Ruby, Groovy, and Go mailing lists. Issues about Python GIL are irrelevant (even if true) as people just use process pools via multiprocessing or concurrent.futures. It is important to not obviously compare apples with wing nuts ;-) Connections to SQL, MongoDB, Cassandra, Redis, Neo4J, etc. and templating engines are the real kicker here not the even loop. If it's all in place get the marketing material in place and let the presses roll. --=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
Feb 11 2013
next sibling parent Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Mon, 11 Feb 2013 20:11:13 +0000
Russel Winder <russel winder.org.uk> wrote:

 On Mon, 2013-02-11 at 10:11 -0800, Ali =C3=87ehreli wrote:
 [=E2=80=A6]
 I use vibe.d as an example of how useful a tool D is. Recently,
 somebody has shown me a web server code written in Python: It was
 in 14 lines, could you belive it? Well, I've responded back with a
 vibe.d example. It was basically the same code as Python,
 translated to D. Of course, the solution that use vibe.d does not
 have Python's infamous GIL; instead, it comes with parallelism and
 concurrency out of the box. And you are aware of typos in your code
 even before running your program. ;)
=20 Python is not being compared to D here, vibe.d is being compared to <what?> Flask, Bottle,=E2=80=A6 =20
The "aware of typos in your code even before running your program" is definitely a direct Python vs D thing. And it's a huge deal, IMO (And yea, I'm saying that after having [tried to] use Python/Bottle).
 I would suggest that vibe.d can be a real competitor in the Flask,
 Sinatra, Ratpack, etc. in the microframework space. But it needs the
 word spreading, which means serious applications mentioned in Python,
 Ruby, Groovy, and Go mailing lists. Issues about Python GIL are
 irrelevant (even if true) as people just use process pools via
 multiprocessing or concurrent.futures. It is important to not
 obviously compare apples with wing nuts ;-)
=20
While I agree that Vibe.d vs Flask/DJango/etc is the bigger comparison here, I think GIL is still relevant: With the Python-based stuff (as far as I'm aware), it's something that has to be actively worked around. When I tried to use Python/Bottle, I didn't even *know* how to do that ('Course, I'm not super-experienced with Python - and hope to never be - but still.) With D/Vibe.d, OTOH, GIL is simply a non-issue period.
Feb 11 2013
prev sibling parent FG <home fgda.pl> writes:
On 2013-02-11 21:11, Russel Winder wrote:
 Python is not being compared to D here, vibe.d is being compared to
 <what?> Flask, Bottle,…
Who knows, maybe Python was being compared. You can have a nice HTTP server in Python in 0 lines of code, by running: python -m SimpleHTTPServer :)
 Issues about Python GIL are irrelevant (even if true) as people just use
 process pools via multiprocessing or concurrent.futures.
Exactly, for example spawn a few processes with uWSGI and the Python script doesn't have to deal with multithreading or even use greenlets. So in most of the cases there is no GIL issue... unless you really need multithreading for a fast web service keeping internal states and locks, entering a no-python land.
 Connections to SQL, MongoDB, Cassandra, Redis, Neo4J, etc. and
 templating engines are the real kicker here not the even loop.  If it's
 all in place get the marketing material in place and let the presses
 roll.
Yeah, a sane templating engine is a must. Once you have those things covered, you can win people over by playing to the performance tune. They love that. Of course having a big traffic site using it would help a lot.
Feb 11 2013
prev sibling next sibling parent reply Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> writes:
On Mon, 11 Feb 2013 12:53:55 +0100
S=F6nke Ludwig <sludwig outerproduct.org> wrote:

 Changes:
=20
  - Refactored the MongoDB client to better match the actual database
    structure + range interface for query results (by Dicebot)
=20
  - A number of important fixes in the HttpClient and ConnectionPool
=20
  - Correct memory alignment is now enforced in the custom memory
 allocators (Caused exceptions on 32-bit Linux)
=20
  - Added task management methods (interrupt(), join() and running)
=20
  - Lots of smaller fixes and enhancements
=20
 Full change log: http://vibed.org/blog/posts/vibe-release-0.7.12
 Download: http://vibed.org/download?file=3Dvibed-0.7.12.zip
 GitHub: https://github.com/rejectedsoftware/vibe.d
The full changelog is missing this: HttpFileServerSettings.maxAge is changed from (was it int/ulong/..?
Feb 11 2013
parent =?ISO-8859-1?Q?S=F6nke_Ludwig?= <sludwig outerproduct.org> writes:
Am 11.02.2013 22:29, schrieb Nick Sabalausky:
 On Mon, 11 Feb 2013 12:53:55 +0100
 Sönke Ludwig <sludwig outerproduct.org> wrote:
 
 Changes:

  - Refactored the MongoDB client to better match the actual database
    structure + range interface for query results (by Dicebot)

  - A number of important fixes in the HttpClient and ConnectionPool

  - Correct memory alignment is now enforced in the custom memory
 allocators (Caused exceptions on 32-bit Linux)

  - Added task management methods (interrupt(), join() and running)

  - Lots of smaller fixes and enhancements

 Full change log: http://vibed.org/blog/posts/vibe-release-0.7.12
 Download: http://vibed.org/download?file=vibed-0.7.12.zip
 GitHub: https://github.com/rejectedsoftware/vibe.d
The full changelog is missing this: HttpFileServerSettings.maxAge is changed from (was it int/ulong/..?
Thanks, it's in now. It's easy to get lost in the commit log/issue list. It would be nice to have an automated solution, but that won't work, as trivial things and fixes for unreleased stuff just adds noise and needs to be manually filtered out somehow...
Feb 11 2013
prev sibling parent reply David <d dav1d.de> writes:
Am 11.02.2013 12:53, schrieb Sönke Ludwig:
 Changes:
 
  - Refactored the MongoDB client to better match the actual database
    structure + range interface for query results (by Dicebot)
 
  - A number of important fixes in the HttpClient and ConnectionPool
 
  - Correct memory alignment is now enforced in the custom memory allocators
    (Caused exceptions on 32-bit Linux)
 
  - Added task management methods (interrupt(), join() and running)
 
  - Lots of smaller fixes and enhancements
 
 Full change log: http://vibed.org/blog/posts/vibe-release-0.7.12
 Download: http://vibed.org/download?file=vibed-0.7.12.zip
 GitHub: https://github.com/rejectedsoftware/vibe.d
 
Cool, but one thing hinders me from moving from Python to Vibe, is a Postgres DB driver (any plans on integrating Postgres?) and (non vibe related) something so amazing and fucking awesome like SqlAlchemy!
Feb 11 2013
parent "Dicebot" <m.strashun gmail.com> writes:
I have considered writing and proposing one, but it is a very low 
priority to me now, sorry. Should be not that difficult 
considering driver for MySQL can be used as an example ( 
http://registry.vibed.org/packages/mysql-native ), just 
time-consuming.
Feb 11 2013