Re: Aalborg D meetup

2018-06-15 Thread bauss via Digitalmars-d-announce

On Friday, 15 June 2018 at 08:45:29 UTC, Bienlein wrote:

On Friday, 15 June 2018 at 07:34:07 UTC, biocyberman wrote:

On Friday, 15 June 2018 at 07:20:04 UTC, Bienlein wrote:

On Wednesday, 13 June 2018 at 12:37:26 UTC, bauss wrote:

On Wednesday, 13 June 2018 at 12:12:11 UTC, bauss wrote:
I'll be there since I live there and would be nice to see 
monthly meetups! :)


I forgot to ask. Is it free entry? :)


Yeah, and the Aalborg Akvavit is also free ? ;-)


Depending on the volume you can take and how you transport to 
and from the meetup :) But I am taking some beer, soft drinks 
(saft vand?), fruit and chips. It's good for discussing 
socializing parts


It is called soda vand, I think. Unhappily I'm about 1000 km 
away from Aalborg :-(


You can make it!

@Aalborg Akvavit - laughed. Can't drink alcohol at the moment, 
because of health issues unfortunately :(


Re: D only has Advantages

2018-06-14 Thread bauss via Digitalmars-d-announce

On Thursday, 14 June 2018 at 20:04:06 UTC, Walter Bright wrote:

On 6/14/2018 12:30 PM, Jordan Wilson wrote:
I remember reading your answer on how you generate income. You 
said you bought high and sold low. I suffered several losses 
before I realised your particular sense of humor.



My superpower is control over the stock market. Immediately 
after I buy a stock, the stock tanks. Immediately after I sell, 
it zooms upwards.


It's proof that I'm living in a simulation!


IF YOU'RE READING THIS, YOU'VE BEEN IN A SIMULATION FOR ALMOST 20 
YEARS NOW. WE'RE TRYING A NEW TECHNIQUE. WE DON'T KNOW WHERE THIS 
MESSAGE WILL END UP IN YOUR DREAM, BUT WE HOPE WE'RE GETTING 
THROUGH.


Re: Aalborg D meetup

2018-06-13 Thread bauss via Digitalmars-d-announce

On Wednesday, 13 June 2018 at 12:12:11 UTC, bauss wrote:
I'll be there since I live there and would be nice to see 
monthly meetups! :)


I forgot to ask. Is it free entry? :)


Re: iopipe v0.1.0 - now with Windows support!

2018-06-13 Thread bauss via Digitalmars-d-announce
On Sunday, 10 June 2018 at 20:10:31 UTC, Steven Schveighoffer 
wrote:

-Steve


Does iopipe work with CTFE?


Re: Aalborg D meetup

2018-06-13 Thread bauss via Digitalmars-d-announce

On Wednesday, 13 June 2018 at 11:17:15 UTC, biocyberman wrote:
Reminded by Mike with Seoul D meetup 
(https://forum.dlang.org/thread/fvswwfcbuuqkaqpmp...@forum.dlang.org) I will unleash my excitement to tell you that we are going to have first D meetup at Aalborg, Denmark 21st June: https://www.meetup.com/AalborgD-Programming-Language/events/251102967/


Ali Cehreli is going to give a lecture about "Introduction to D 
programming language". It is a excellent opportunity for 
someone new to D. We plan to make monthly meetup. The meetups 
intention is to exchange knowledge, and teach each other so 
that members have better understanding of D and programming, 
thereby be more productive, more fun to work with D and your 
tasks. With that in mind, the meetups will be more of a 
'tutorial' style than 'show-off' style. So we will be helpful 
to each other.


We invite all D enthusiasts, experts and professionals to join 
us to teach and learn.


I'll be there since I live there and would be nice to see monthly 
meetups! :)





Re: DasBetterC: Converting make.c to D

2018-06-11 Thread bauss via Digitalmars-d-announce

On Monday, 11 June 2018 at 14:52:13 UTC, Andrea Fontana wrote:

On Monday, 11 June 2018 at 14:21:20 UTC, Mike Parker wrote:
Walter's latest post on -betterC is now on the blog. Here, he 
shows step-by-step an example of using -betterC to convert a 
real-world program, one small enough to describe in a blog 
post, from C to D.


The blog:
https://dlang.org/blog/2018/06/11/dasbetterc-converting-make-c-to-d/

Reddit:
https://www.reddit.com/r/programming/comments/8q9u5t/dasbetterc_converting_makec_to_d/


It seems that blog page is returned correctly by server but 
status is 404.


Andrea


I noticed that too



Re: GitHub could be acquired by Microsoft

2018-06-09 Thread bauss via Digitalmars-d-announce
On Saturday, 9 June 2018 at 23:41:43 UTC, Nick Sabalausky 
(Abscissa) wrote:

(I just hope it doesn't lead to GitLab running out of cash too.)


And then Microsoft acquires both and everyone moves to Bitbucket.

Endless cycle :)


Diamond (Full-stack MVC web-framework) - v2.10.0 (GDPR Patch)

2018-06-09 Thread bauss via Digitalmars-d-announce

Happy to announce version 2.10.0 of Diamond.

This release is primarily a GDPR Security Patch with respect for 
privacy during logging, sensitive data detection/validation etc. 
Of course as with everything else in Diamond it can be tweaked as 
much as you want, or disabled.


Since last announced release the following features has also been 
added:


* More helper functions for various things.
* Secure file-access
* More caching
* Static views (Can be statically cached over time periods etc.)
* New metadatas for views
* GDPR Helper Functionality
* More standard imports for views
* Ability to handle "no-actions" for controllers (Useful for 
certain REST designs.)

* Database relationships
* Data-proxy for data-management with the ORM
* Host white-list

Thank you!

Github: https://github.com/DiamondMVC/Diamond/
DUB: https://code.dlang.org/packages/diamond
Website: http://diamondmvc.org/ (Powered by Diamond!)


Re: unit-threaded v0.7.45 - now with more fluency

2018-05-09 Thread bauss via Digitalmars-d-announce

On Wednesday, 9 May 2018 at 10:37:52 UTC, Cym13 wrote:
On Wednesday, 9 May 2018 at 04:40:37 UTC, Nick Sabalausky 
(Abscissa) wrote:

On 05/08/2018 05:05 AM, Cym13 wrote:

[...]


No, it really doesn't mean the same thing at all. Not when you 
look away from the unimportant implementation details and 
towards the big picture:


[...]


With UFCS I find that in my code a dot means "function 
composition" more often than "is a member of". Maybe it's just 
that I like writting in a functional style, but UFCS chains are 
very much endorsed by the language, so I wouldn't call it a 
stretch.


I agree with this in this case.


Re: unit-threaded v0.7.45 - now with more fluency

2018-05-09 Thread bauss via Digitalmars-d-announce

On Saturday, 5 May 2018 at 15:51:11 UTC, Johannes Loher wrote:

On Saturday, 5 May 2018 at 13:28:41 UTC, Atila Neves wrote:
For those not in the know, unit-threaded is an advanced 
testing library for D that runs tests in threads by default. 
It has a lot of features:


http://code.dlang.org/packages/unit-threaded

New:

* Bug fixes
* Better integration testing
* unitThreadedLight mode also runs tests in threads
* More DDoc documentation (peer pressure from Adam's site)
* Sorta kinda fluent-like asserts

On the new asserts (should and should.be are interchangeable):

1.should == 1
1.should.not == 2

1.should.be in [1, 2, 3]
4.should.not.be in [1, 2, 3]

More controversially (due to a lack of available operators to 
overload):


// same as .shouldApproxEqual
1.0.should ~ 1.0001;
1.0.should.not ~ 2.0;

// same as .shouldBeSameSetAs
[1, 2, 3].should ~ [3, 2, 1];
[1, 2, 3].should.not ~ [1, 2, 2];


I also considered adding `.should ~=`. I think it even reads 
better, but apparently some people don't. Let me know?


The operator overloads are completely optional.


Atila


Personally, I don't like that kind of "abuse" of operators at 
all. I think it looks really unusual and it kind of breaks your 
"flow" when reading the code.


I agree with this. If the comments weren't added, nobody reading 
the code would have any idea what it actually does except for 
whoever wrote it.





Re: Funding for code-d/serve-d

2018-05-07 Thread bauss via Digitalmars-d-announce

On Saturday, 5 May 2018 at 11:21:29 UTC, Mike Parker wrote:
This morning at the Hackathon I announced that the D Foundation 
is raising money for code-d/serve-d, the plugin for Visual 
Studio Code and its companion Microsoft Language Server 
Protocol implementation for D.


[...]


There!

I went ahead and made a monthly subscription of $25! :)


Re: Diamond mentioned in stackshare.io article

2018-05-07 Thread bauss via Digitalmars-d-announce

On Sunday, 6 May 2018 at 19:33:09 UTC, Gheorghe Gabriel wrote:

On Sunday, 6 May 2018 at 18:05:45 UTC, bauss wrote:
On Saturday, 5 May 2018 at 18:56:52 UTC, Gheorghe Gabriel 
wrote:

[...]


I could be wrong, but I think D has some issues with DLL's at 
the moment, so recompiling is the only way to dynamically have 
code.


I'm working on a possible future solution in Diamond, but I'm 
not sure how to go about it yet. If that's what it's related 
to!


On Saturday, 5 May 2018 at 20:34:05 UTC, Gheorghe Gabriel 
wrote:

[...]


Sounds like an interesting project and if you need help with 
it, I wouldn't mind dropping in with a few contributions!


On Saturday, 5 May 2018 at 20:45:40 UTC, Gheorghe Gabriel 
wrote:

[...]


As long as we understand your post, then I don't think it's a 
big deal.


I believe most people don't speak natively English around here 
anyway.


Thanks! I will search for contribuitors after the release of 
the 0.1-stable version. I am using a private git repository 
until then.
P.S. Godot-D uses dlls for dynamic compilation. I will try 
figure it out how they did it.
I would like to upload a demo screenshot with a part of my 
current work.


Awesome!

On Sunday, 6 May 2018 at 21:13:19 UTC, Gheorghe Gabriel wrote:

On Sunday, 6 May 2018 at 19:33:09 UTC, Gheorghe Gabriel wrote:

On Sunday, 6 May 2018 at 18:05:45 UTC, bauss wrote:

[...]


Thanks! I will search for contribuitors after the release of 
the 0.1-stable version. I am using a private git repository 
until then.
P.S. Godot-D uses dlls for dynamic compilation. I will try 
figure it out how they did it.
I would like to upload a demo screenshot with a part of my 
current work.


Here it is:
https://dsunshineproject.weebly.com/
Hope you like it!


It looks great


Re: Diamond mentioned in stackshare.io article

2018-05-06 Thread bauss via Digitalmars-d-announce

On Saturday, 5 May 2018 at 18:56:52 UTC, Gheorghe Gabriel wrote:

On Saturday, 5 May 2018 at 14:06:45 UTC, Bauss wrote:
On Saturday, 5 May 2018 at 12:32:38 UTC, Gheorghe Gabriel 
wrote:

On Saturday, 5 May 2018 at 12:17:48 UTC, Bauss wrote:

On Saturday, 5 May 2018 at 12:14:38 UTC, bachmeier wrote:

On Saturday, 5 May 2018 at 10:00:16 UTC, Bauss wrote:


[...]


Absolutely. This, not [technical feature X], is what will 
lead to adoption of D.


Agreed! D can have all these nice features, but what matters 
in enterprise development is what frameworks D had that can 
be used in productivity and not just for projects you code 
at home.


That was the sole reason I did Diamond too. I focused on 
having it fit for enterprise development since the beginning.


I love Diamond!
It is my favorite framework written in D so far.
I've been working on a big project in D for three weeks, 
after one year of D experience.

Can't wait to finally expose it.


Thank you so much!

When you get started with it, don't hesitate to ask me about 
stuff!


Thank you! I need a little help (maybe an example) on dll 
reflection.

I can't figure it out how to do it.
I need to instantiate new "Unknown" objects from dll, without 
closing the app and recompiling it.


I could be wrong, but I think D has some issues with DLL's at the 
moment, so recompiling is the only way to dynamically have code.


I'm working on a possible future solution in Diamond, but I'm not 
sure how to go about it yet. If that's what it's related to!


On Saturday, 5 May 2018 at 20:34:05 UTC, Gheorghe Gabriel wrote:

On Saturday, 5 May 2018 at 18:56:52 UTC, Gheorghe Gabriel wrote:

On Saturday, 5 May 2018 at 14:06:45 UTC, Bauss wrote:
On Saturday, 5 May 2018 at 12:32:38 UTC, Gheorghe Gabriel 
wrote:

On Saturday, 5 May 2018 at 12:17:48 UTC, Bauss wrote:

On Saturday, 5 May 2018 at 12:14:38 UTC, bachmeier wrote:

On Saturday, 5 May 2018 at 10:00:16 UTC, Bauss wrote:


[...]


Absolutely. This, not [technical feature X], is what will 
lead to adoption of D.


Agreed! D can have all these nice features, but what 
matters in enterprise development is what frameworks D had 
that can be used in productivity and not just for projects 
you code at home.


That was the sole reason I did Diamond too. I focused on 
having it fit for enterprise development since the 
beginning.


I love Diamond!
It is my favorite framework written in D so far.
I've been working on a big project in D for three weeks, 
after one year of D experience.

Can't wait to finally expose it.


Thank you so much!

When you get started with it, don't hesitate to ask me about 
stuff!


Thank you! I need a little help (maybe an example) on dll 
reflection.

I can't figure it out how to do it.
I need to instantiate new "Unknown" objects from dll, without 
closing the app and recompiling it.


I think it's a very big step for D to have a Studio Software.
My idea is to create an editor for D app development.
Wanted features:
  1) Main templates:
  - GUI Application with a 2D/3D scene (this is where I 
need dll reflection)
  - Web Application using Diamond (with a powerful GUI 
Editor)

  2) Targets:
  - Windows, Linux, MacOS
  - Android, iOS*, WinStore*
  - HTML5 using WebAssembly
  - Vulkan and OpenGLES
  - Maybe multithreaded safe
Some current features:
- Awsome Event Listener for GUI. I am sure you will love it.
- A 3D scene with a camera movement (mouse + WASD keys)
- Node based scene (unique id per node)
- Class managers for Input, Core, Graphics, Audio
- Very productive (It has a lot of static if, static foreach, 
mixin, UDA, __traits ..) - Just D cool stuff.
- It uses OpenGL as it's main graphics library and SDL2 for 
window, keyboard..

- It is very fast because of its architecture, very optimized
Some good statistics: Simple 3D scene with some objects, 
compiled with DMD on Win64 release mode (i7-6700k, 24gb ram + 
GTX960m = 600 fps 1080p)
I have a lot ideas for it but the exam session will finish 
after two months, so, unfortunately, I won't be able to work on 
it until then.

After this, I am going to take 4 hours per day to work on it.
My dream is to have the chance to present it at DConf 2020. :)
...
And by the way, I will implement it's website in Diamond MVC.


Sounds like an interesting project and if you need help with it, 
I wouldn't mind dropping in with a few contributions!


On Saturday, 5 May 2018 at 20:45:40 UTC, Gheorghe Gabriel wrote:

On Saturday, 5 May 2018 at 20:34:05 UTC, Gheorghe Gabriel wrote:

[...]


Sorry for my english mistakes. I am very tired right now and 
english is not my main language. I cannot correct that 2 it's 
-> to -> its.


As long as we understand your post, then I don't think it's a big 
deal.


I believe most people don't speak natively English around here 
anyway.


Re: Diamond mentioned in stackshare.io article

2018-05-05 Thread Bauss via Digitalmars-d-announce

On Saturday, 5 May 2018 at 12:32:38 UTC, Gheorghe Gabriel wrote:

On Saturday, 5 May 2018 at 12:17:48 UTC, Bauss wrote:

On Saturday, 5 May 2018 at 12:14:38 UTC, bachmeier wrote:

On Saturday, 5 May 2018 at 10:00:16 UTC, Bauss wrote:

Because it means that D is getting some exposure to 
industrial development!


Absolutely. This, not [technical feature X], is what will 
lead to adoption of D.


Agreed! D can have all these nice features, but what matters 
in enterprise development is what frameworks D had that can be 
used in productivity and not just for projects you code at 
home.


That was the sole reason I did Diamond too. I focused on 
having it fit for enterprise development since the beginning.


I love Diamond!
It is my favorite framework written in D so far.
I've been working on a big project in D for three weeks, after 
one year of D experience.

Can't wait to finally expose it.


Thank you so much!

When you get started with it, don't hesitate to ask me about 
stuff!


Re: Diamond mentioned in stackshare.io article

2018-05-05 Thread Bauss via Digitalmars-d-announce

On Saturday, 5 May 2018 at 12:14:38 UTC, bachmeier wrote:

On Saturday, 5 May 2018 at 10:00:16 UTC, Bauss wrote:

Because it means that D is getting some exposure to industrial 
development!


Absolutely. This, not [technical feature X], is what will lead 
to adoption of D.


Agreed! D can have all these nice features, but what matters in 
enterprise development is what frameworks D had that can be used 
in productivity and not just for projects you code at home.


That was the sole reason I did Diamond too. I focused on having 
it fit for enterprise development since the beginning.


Re: Diamond mentioned in stackshare.io article

2018-05-05 Thread Bauss via Digitalmars-d-announce

On Saturday, 5 May 2018 at 10:44:37 UTC, Mengu wrote:

On Saturday, 5 May 2018 at 10:00:16 UTC, Bauss wrote:
Read article here: 
https://stackshare.io/posts/dev-tools-roundup-april-2018


Why is this relevant?
Because it means that D is getting some exposure to industrial 
development!


congratulations!


Thanks!


Re: Funding for code-d/serve-d

2018-05-05 Thread Bauss via Digitalmars-d-announce

On Saturday, 5 May 2018 at 11:21:29 UTC, Mike Parker wrote:
This morning at the Hackathon I announced that the D Foundation 
is raising money for code-d/serve-d, the plugin for Visual 
Studio Code and its companion Microsoft Language Server 
Protocol implementation for D.


We've set up a goal of $3000 at our Open Collective page:

https://opencollective.com/dlang#

At the top of the page, you'll see our current balance, the 
projected balance at the end of the year based on the current 
level of monthly donations, and the goal of $3000 on the far 
right.


We're sitting at just over $1100 as I write this, which means 
we're almost halfway there already. We encourage those of you 
who use Webfreak's VS Code plugin to contribute whatever you 
can in order to fund its development, especially if you want to 
see it improve.


An important point is that development on serve-d can 
ultimately benefit not just code-d, but other IDE and editor 
plugins where it may be used.


If we reach $2700 within 30 days, the D Foundation will throw 
in the remaining $300 and we'll let Webfreak get to work.


If this proves successful, we hope to use future goals to fund 
development across the D ecosystem. Some of our targets will be 
driven by the results of the recent State of D Survey and 
others will be driven by other concerns. If you are interested 
in helping to move the state of D development forward, please 
consider contributing!


This is great! I'll donate at some point this month (probably 
near the endsame)


Diamond mentioned in stackshare.io article

2018-05-05 Thread Bauss via Digitalmars-d-announce
Read article here: 
https://stackshare.io/posts/dev-tools-roundup-april-2018


Why is this relevant?
Because it means that D is getting some exposure to industrial 
development!


Diamond MVC (Full-stack web-framework) - v2.9.1

2018-04-15 Thread bauss via Digitalmars-d-announce

Pleased to announce a new version of Diamond - v2.9.1

This release comes with the following:

* SEO Functionality, full support for schema.org (With the most 
common data structures already implemented.)


* placeHolder's deprecation period is over and all places using 
"placeHolder" must now use "placeholder".


* Fixes a critical bug that caused applications to crash with 
double slashes in the url.


* Better error messages for views.

Github: https://github.com/DiamondMVC/Diamond/

Website: http://diamondmvc.org/

DUB: https://code.dlang.org/packages/diamond

Thanks to everyone who has helped Diamond get where it is!


Re: Release: nanovega.d rendering lib like html5 canvas

2018-04-11 Thread bauss via Digitalmars-d-announce

On Saturday, 7 April 2018 at 09:13:06 UTC, drug wrote:

https://github.com/drug007/nanogui

I would be glad if you take a look


The documentation should probably be updated to match ddoc.


Diamond MVC (Full-stack web-framework) - v2.8.6

2018-04-04 Thread bauss via Digitalmars-d-announce

I'm pleased to announce yet another release of Diamond MVC.

If you haven't heard of Diamond before, then it's a full-stack 
web-framework built on-top of vibe.d using a similar style to 
ASP.NET.


It also comes with additional features, as Diamond is meant to be 
fit for enterprise development.


This release contains the following:

* Mongodb wrapper
* Markdown parser (compile-time compatible)
* New view metadata entries for content-types
* Specialized placeholders for partial view rendering

The markdown parser follows the standards from the following 
cheat sheet: 
https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet


Thanks to everyone who has been supporting the project so far.

Github: https://github.com/DiamondMVC/Diamond
DUB: https://code.dlang.org/packages/diamond
Website: http://diamondmvc.org/


Re: CPUblit v0.1.0

2018-04-04 Thread bauss via Digitalmars-d-announce

On Wednesday, 4 April 2018 at 00:50:31 UTC, solidstate1991 wrote:

https://github.com/ZILtoid1991/CPUblit

I have put the rendering functions of my engine to an external 
library for general use in other applications where image 
composing is needed.


I can add functions on request, currently I'm planning more 
functions for drawing and higher-level functions, with no much 
plans on direction with the latter one other than minimizing 
external dependencies and avoiding the use of the garbage 
collector and even possibly classes.


This is really cool and nice to see it's @nogc


Re: Need a fancy domain for your project? .dub.pm has you covered!

2018-03-31 Thread bauss via Digitalmars-d-announce

On Thursday, 23 February 2017 at 14:16:35 UTC, Seb wrote:

Hey all,

As I own dub.pm since a year and it hasn't been used much, I 
have just configured automatic sub-domain rewriting, s.t. 
everyone can have nice and fancy URLs. All sub-domains get 
redirected to their respective DUB package page, so now you can 
browse e.g.


[...]


This is pretty cool.


diamondmvc.org has been launched - Also release of Diamond MVC v2.8.5

2018-03-31 Thread bauss via Digitalmars-d-announce
I'm happy to announce that Diamond finally has its own website, 
that is hosted as a Diamond project, instead of a Github-page!


It can be found here: http://diamondmvc.org/

The website is open-source and can be used as a reference on how 
to use Diamond, although it doesn't use a lot of "advanced" 
features as of now.


The website project can be found here: 
https://github.com/DiamondMVC/Diamond-website


On top of that v2.8.5 has been released which comes with some 
task functionality.


Since last announcement v2.8.1 the following has also been added:

* Special placeholders for i18n
* File uploading improvements

Thanks to everyone who has helped Diamond getting where it is, 
whether it has been through contributions to Diamond's 
dependencies, the d programming language or anything else!




Re: D_vs_nim: git repo to compare features of D vs nim and help migrating code bw them. PRs welcome

2018-03-27 Thread bauss via Digitalmars-d-announce

On Tuesday, 27 March 2018 at 12:11:58 UTC, Guillaume Piolat wrote:
- ability to write file during CTFE is not necessarily 
positive. THough I can't tell why from the top of my mind.


Only thing I can think of is that 3rd party modules can end up 
writing to your file-system during compilation and could 
potentially access data etc. they're not allowed to.


That is because you may invoke your compiler with the highest 
permissions possible, but not necessarily the compiled binary 
file.


Which means that the compile-time may not have any restrictions 
at all and thus potentially security holes are open.


Whereas the run-time will be limited and restricted.

However by allowing writes etc. at compile-time then the 
restriction at run-time suddenly doesn't matter, because 
libraries can just do what they want during compile-time and you 
don't really want to limit the compiler's permissions etc. 
because some things may be needed at compile-time that aren't 
necessarily things you want your run-time to access.


I don't know if that makes sense though, but I tried to explain 
my reasoning as much as I could.


In my eyes, it's definitely a no-go to allow writes at 
compile-time, especially without restrictions. (I don't know if 
Nim has any restrictions, but doesn't sound like it.)


- AST macros are not necessarily easier or more tractable, 
which have been argued repeatedly by Walter in these forums. 
The avoidance of AST macros is a plus, not a minus.




Sometimes it's much simpler to use mixins, mixin templates etc. 
than constructing AST nodes.


I think this really comes down to taste.

However AST nodes seem to be more flexible to manage, but they 
also open up a lot of complexity.


I guess there is no real answer to that, as it'll always be a 
biased answer.




Re: Diamond MVC - v2.8.0 (Backup functionality & cookie consent support added)

2018-03-24 Thread bauss via Digitalmars-d-announce

Just made a new release for v2.8.1

https://github.com/DiamondMVC/Diamond/releases/tag/v2.8.1

This release contain the following:

* Smtp mail support
* Virtual html elements (Useful for dynamic html generation 
without being textual. Ex. for backends)

* File upload/download management
* Validation such as credit cards, emails, files, types and urls.

It also deprecates all usage of "placeHolder", which has been 
replaced with "placeholder" ex. "addPlaceHolder" should be 
"addPlaceholder" -- in 2.9.0 any place with "placeHolder" will be 
removed in favor for "placeholder"


Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-23 Thread bauss via Digitalmars-d-announce

On Friday, 23 March 2018 at 00:47:20 UTC, Tony wrote:
I think unittest blocks are good for write-once and 
quick-and-dirty projects, or as a first-cut of testing that 
ultimately gets moved to a full-grown test suite in a separate 
project. I'd prefer not to read source code that has unittest 
blocks inter-mixed with the actual code.


I partially agree with this.

It's really annoying if you have to look for an implementation 
and then half the module is unittests and searching isn't always 
straightforward.


Diamond MVC - v2.8.0 (Backup functionality & cookie consent support added)

2018-03-22 Thread bauss via Digitalmars-d-announce

I'm happy to announce the next version of Diamond MVC.

Release: https://github.com/DiamondMVC/Diamond/releases/tag/v2.8.0

This is a breaking change to the cookie API, since it implements 
cookie consent and not in a backward compatible way to make sure 
it's enforced.


This release also contains backup functionality, which allows you 
to implement backup services that can backup files, data etc.


By default there is a backup file service which can be used to 
backup files, but it's possible to implement your own backup 
services that can backup databases etc.


It was something I saw as necessary for Diamond to be used as an 
enterprise framework, since backups are vital.


Diamond now supports vibe.d 0.8.3 and mysql-native 2.2.1

---

If you wonder what other features Diamond has, here are some of 
the key features:


* Full control over requests / responses when wanted.
* "Websettings" file that lets you control requests / responses 
for:

  * Before a request is handled.
  * After a request has been handled.
  * When an error occurres.
  * When a page or controller action wasn't found.
  * When a static file has been requested.
* Multiple static file paths
* Let's you bind to multiple ip addresses and ports.
* Let's you control default headers for each type of request 
(default, static files, errors, not found etc.)
* Uses vibe.d for backend, so it's very powerful and all vibe.d 
features can be used with Diamond
* Easy control over the application's type using *static if* 
constructs.

  * isWeb (true for both web-servers and web-apis.)
  * isWebServer (true for web-servers)
  * isWebApi (true for web-apis)
  * isWeb, isWebServer and isWebApi will be false for standalone.
* ACL & Authentication tied to it
* Separate authentication that can be used either with or without 
the ACL

* CSRF Protection
* Easy integrated cookie/session API.
* The network can be restricted to specific ips.
* Transactions
* Unittesting
* Logging
* i18n
* Version-control
* Route rewriting
* Database Integration & Object Relational Mapping
* Websockets
* Specialized Routes (Can fetch resources external internal or 
local)
* Views are parsed at compile-time, thus rendering of views are 
super fast

* Views can have layout views
* Views have a metadata section that lets you change view 
configurations such as its controller, model, layout, route and 
placeholders.
* Views have placeholders and layout view's can access the render 
view's placeholders.

* Views can encode their data
* Has a rich syntax that allows for complex and innovative 
rendering.
* Easy access to the current request / response using the 
properties: *httpRequest* and *httpResponse*

* Can render other views within itself
* Any type of D code can be written within views.
* Allows for sections, which is useful to only render a part of 
the view. (Very useful for responsive designs)

* Can be passed to controllers by their base view
* Layout views can be changed dynamically
* Expensive views can be cached.
* Flash-messages
* Controller actions are mapped through attributes. (By default 
the route name will be the name of the function.)
  * If wanted actions can be mapped manually, but that's a legacy 
feature.
* Controller actions can easily control how the response is 
handled, as they require a status returned

  * Status.success (Will continue to handle the request.)
  * Status.end (Will end the request; useful for json responses 
etc. *Note: using the json() function already does it for you.)*

  * Status.notFound (Will issue a 404 status for the response.)
* Can map mandatory actions that are executed on every requests. 
(Useful for authentication etc.)

* Easy integrated authentication (Can be combined with ACL)
* RESTful
* Specific actions can be restricted to specific ips.

Github: https://github.com/DiamondMVC/Diamond

DUB: https://code.dlang.org/packages/diamond

You can find the last release here:

https://forum.dlang.org/post/mjueykdyfbeajaofq...@forum.dlang.org

Thank you all!


Re: Why think unit tests should be in their own source code hierarchy instead of side-by-side

2018-03-22 Thread bauss via Digitalmars-d-announce
On Thursday, 22 March 2018 at 11:47:34 UTC, Alexandru Ermicioi 
wrote:

On Thursday, 22 March 2018 at 11:19:46 UTC, Basile B. wrote:

On Thursday, 22 March 2018 at 11:00:31 UTC, Atila Neves wrote:

On Thursday, 22 March 2018 at 10:59:56 UTC, Atila Neves wrote:

Blog post:

https://atilanevesoncode.wordpress.com/

Atila


Direct link:

https://atilanevesoncode.wordpress.com/2018/03/22/keep-d-unittests-separated-from-production-code/

Sorry for the forum spam.

Atila


I don't agree at all. Everything is so much faster when 
unittest blocks are in the same module as the stuff that are 
tested. Generally i think that it makes things easier.


It's easier, true. But not all code can be nicely unittested 
using small chunks of unittests near the actual code. Consider 
unittested objects/structs, in each unittest you'll have to 
instantiate and stuff with mocks if needed and test a small 
piece of functionality from them. Also there is a problem with 
mocked objects where they will go? If every bit of 
functionality will be tested in same module with source code, 
then unittest / line of actual code will be much more to 
unittests part. It will make your module hard to navigate and 
discover what your source code is actually doing. So having a 
separate module with unittests indeed will help in making more 
claner and more understandable since they won't interfere with 
actual code.


Also if you use templates with unittests sometimes private 
symbols may succeed in the unittest, but fail when the template 
is used in practice.


Such bugs have existed in Phobos plenty of times.


Re: Ecoji-d v1.0.0 is released - Base1024 using emojis 😂👌

2018-03-18 Thread bauss via Digitalmars-d-announce

On Sunday, 18 March 2018 at 12:51:23 UTC, Anton Fediushin wrote:

On Friday, 16 March 2018 at 08:25:30 UTC, bauss wrote:
Besides your encoding isn't going to work with actual 
web-pages anyway, because your encoder doesn't have browser 
support.


Well, encoding is not *mine*, only D implementation is. What do 
you mean by "browser support"? Indeed, ecoji-d cannot be used 
on the client side, but since algorithm is simple and code is 
publically available anyone can implement decoding in 
JavaScript or any other language.




Yes, but that makes your example pointless, because having to 
decode in javascript is not exactly something that anybody in 
their sane mind would ever do with a webpage or anything like 
that anyway.




Re: User Stories: Funkwerk

2018-03-17 Thread bauss via Digitalmars-d-announce
On Saturday, 17 March 2018 at 19:54:07 UTC, Jonathan M Davis 
wrote:
On Saturday, March 17, 2018 12:48:07 bauss via 
Digitalmars-d-announce wrote:

On Friday, 16 March 2018 at 19:42:11 UTC, Rubn wrote:
> On Wednesday, 14 March 2018 at 14:17:50 UTC, Mike Parker 
> wrote:

>> foreach(auto element: elements)
>
> ":" is C++ syntax

Also "auto" can be omitted.

foreach (element; elements)


Not only can be. It must be. auto is not legal in a foreach 
loop in D, which is arguably a bit inconsistent, but for better 
or worse, that's the way it is.


- Jonathan M Davis


Ahh, I didn't know it had become illegal or at least I think I 
remember foreach loops accepting auto in the past, but that's 
probably years ago or maybe I remember wrong and it has always 
been illegal?


Re: Vision document for H1 2018

2018-03-17 Thread bauss via Digitalmars-d-announce
On Friday, 16 March 2018 at 19:08:47 UTC, Nick Sabalausky 
(Abscissa) wrote:

On 03/16/2018 02:35 PM, Tony wrote:

On Friday, 16 March 2018 at 15:04:21 UTC, Kagamin wrote:

On Thursday, 15 March 2018 at 16:03:14 UTC, rumbu wrote:
Are you sure that you are talking about phobos and not 
tango? :)

I'm eager to find how I'm uninformed.


Tango doesn't use UFCS, while phobos and .net framework are 
big on extension methods. Also tango uses object oriented 
console IO, while phobos and .net framework use procedural 
style for it.


I thought C# was like Java and does not allow free procedures. 
Can you give an example of C# procedural-style IO?




It doesn't (last I used it), buy you CAN mark individual member 
functions to be usable UFCS-like. IIRC, I think it might have 
to be static member function.


It's been awhile, so I don't remember it exactly, but it's 
something like this:


class Bar {}

class Foo {
static void SomeFunc(extention Bar bar, int num) {...}
}

class MyApp {
static void Run() {
Bar bar = new Bar();
bar.SomeFunc(2);
}
}


Actually it's like:

static void SomeFunc(this Bar bar, int num) { ... }


Re: User Stories: Funkwerk

2018-03-17 Thread bauss via Digitalmars-d-announce

On Friday, 16 March 2018 at 19:42:11 UTC, Rubn wrote:

On Wednesday, 14 March 2018 at 14:17:50 UTC, Mike Parker wrote:

foreach(auto element: elements)


":" is C++ syntax


Also "auto" can be omitted.

foreach (element; elements)


Re: Ecoji-d v1.0.0 is released - Base1024 using emojis 😂👌

2018-03-16 Thread bauss via Digitalmars-d-announce

On Thursday, 15 March 2018 at 18:45:51 UTC, Anton Fediushin wrote:

On Thursday, 15 March 2018 at 09:32:50 UTC, bauss wrote:

Fun, but seems pretty useless in practice.


I disagree. Ecoji (base1024) has bigger character set meaning 
that it can encode more information per emoji than base64 can 
encode per character.


For example ecoji encoded "abcde" looks like this: "👖📸🎦🌭"
And base64 encoded one looks like this: "YWJjZGU=".

Even though each emoji is 4 bytes long, there is a noticable 
difference in size when we are talking about larger chunks of 
data:


---
$ dd if=/dev/urandom bs=4K count=16K of=test.raw
16384+0 records in
16384+0 records out
67108864 bytes (67 MB, 64 MiB) copied, 1.90423 s, 35.2 MB/s
$ dd if=test.raw | ./ecoji-d |  wc -c
67108864 bytes (67 MB, 64 MiB) copied, 6.7699 s, 9.9 MB/s
71591534 # Size increased just by 6%
$ dd if=test.raw | base64 |  wc -c
67108864 bytes (67 MB, 64 MiB) copied, 0.750174 s, 89.5 MB/s
90655837 # 35%(!) increase in size
---

And if we move to real word scenarios, where web pages are 
gzip'ped most of the time:


---
$ dd if=test.raw | gzip -c | wc -c
67108864 bytes (67 MB, 64 MiB) copied, 5.49022 s, 12.2 MB/s
67119122 # Raw files are terrible for compression
$ dd if=test.raw | ./ecoji-d | gzip -c | wc -c
67108864 bytes (67 MB, 64 MiB) copied, 27.9972 s, 2.4 MB/s
32178275 # 48% improvement
$ dd if=test.raw | base64 | gzip -c | wc -c
67108864 bytes (67 MB, 64 MiB) copied, 10.3381 s, 6.5 MB/s
68892893 # Pretty bad, yeah
---

So yeah, ecoji is better than base64 in everything but speed. 
Speed will be improved. Later.


If your care about size of data then you're not going to encode 
anyway.

Same goes for speed.

Besides your encoding isn't going to work with actual web-pages 
anyway, because your encoder doesn't have browser support.


Sure you can encode your data and gzip it, but once it reaches 
the browser and it unzips it, then what? The browser doesn't know 
what to do with the data. You can't even use base64 for http 
headers.


At most it could be used for email clients, since they do support 
"Content-Transfer-Encoding" but browsers don't. They only support 
"Content-Encoding" which at most can be compressions such as gzip.


Re: Ecoji-d v1.0.0 is released - Base1024 using emojis 😂👌

2018-03-15 Thread bauss via Digitalmars-d-announce
On Wednesday, 14 March 2018 at 17:30:18 UTC, Anton Fediushin 
wrote:
🖖, I'm glad to announce that ecoji-d - pure D implementation of 
ecoji encoding version 1️⃣.0️⃣.0️⃣ is finally released❗


What is ecoji?

Ecoji encodes data as base1024 with an emoji character set. It 
can be used instead of boring and old base64 🤮🤮🤮.


Encoding example:

---
$ echo "Base64 is so 1999, isn't there something better?" | 
ecoji-d

🏗📩🎦🐇🎛📘🔯🚜💞😽🆖🐊🎱🥁🚄🌱💞😭💮🇵💢🕥🐭🔸🍉🚲🦑🐶💢🕥🔮🔺🍉📸🐮🌼👦🚟🥴📑
---

And decoding:

---
$ echo -n "🏗📩🎦🐇🎛📘🔯🚜💞😽🆖🐊🎱🥁🚄🌱💞😭💮🇵💢🕥🐭🔸🍉🚲🦑🐶💢🕥🔮🔺🍉📸🐮🌼👦🚟🥴📑" | ecoji-d 
-d

Base64 is so 1999, isn't there something better?
---


Ecoji-d's features:

✔️ Range interface
✔️ Lazy encoding/decoding
✔️ Low memory usage
✔️ @safe and pure when possible
✔️ Many tests
✔️ Can be used as a library and as a CLI utility


API consists of just 2️⃣ functions:

👉 `encode`, which does encoding
👉 `decode`, which does decoding


Links:

📦 DUB package page: http://code.dlang.org/packages/ecoji-d
👍 GitHub repository: https://github.com/ohdatboi/ecoji-d
🤟 GitHub repository of the reference Go implementation: 
https://github.com/keith-turner/ecoji


Fun, but seems pretty useless in practice.


Re: Released vibe.d 0.8.3

2018-03-09 Thread bauss via Digitalmars-d-announce

On Friday, 9 March 2018 at 10:07:28 UTC, Sönke Ludwig wrote:
The deprecation phase of the legacy "vibe-d:core" module starts 
with this release by defaulting to the new "vibe-core" package. 
Additionally, DMD 2.079.0 is finally supported, and some 
notable improvements have been made to the HTTP implementation. 
URLRouter in particular has received memory optimizations (to 
avoid fragmentation) that can result in a heavy reduction of 
memory use.


See the change log for instructions to opt for the legacy 
vibe-d:core module in case of any issues with vibe-core.


Change log:
https://vibed.org/blog/posts/vibe-release-0.8.3

DUB package:
https://code.dlang.org/packages/vibe-d/0.8.3


Great news. Good job!


Re: "Advent of D" article on Reddit

2018-03-09 Thread bauss via Digitalmars-d-announce

On Friday, 9 March 2018 at 05:47:08 UTC, sarn wrote:

On Friday, 9 March 2018 at 05:34:31 UTC, bauss wrote:

Lmao I love Reddit.

The D hate has moved onto a new level.

Instead of hating on D, it's now geared towards the amount of 
upvotes a D post on reddit gets.


What an amusement.


To be fair, some things get posted to /r/programming that 
really should stay on /r/d_language.  Spamming doesn't create a 
good image.


Yes, but this is not one of those things.


Re: mysql-native v2.1.0

2018-03-08 Thread bauss via Digitalmars-d-announce
On Thursday, 8 March 2018 at 16:24:22 UTC, Steven Schveighoffer 
wrote:

On 3/8/18 11:14 AM, bauss wrote:
On Thursday, 8 March 2018 at 15:09:07 UTC, Steven 
Schveighoffer wrote:
The point of a pool is to avoid some costly setup. In my 
case, I'm not even closing the connection because I feel the 
"cost" of allocating a connection from the heap isn't worth 
worrying about. But I also limit the pool so it's only going 
to allow X concurrent Db connections per thread.




If you limit the amount of concurrent db connections will the 
task wait until a connection can be acquired or will it throw 
an exception?


It uses a semaphore with a max count, so it would just pause 
the fiber.


https://github.com/vibe-d/vibe.d/blob/master/core/vibe/core/connectionpool.d#L55

-Steve


Great


Re: "Advent of D" article on Reddit

2018-03-08 Thread bauss via Digitalmars-d-announce

On Thursday, 8 March 2018 at 21:19:25 UTC, Ali Çehreli wrote:

Reposting here from the main newsgroup:


https://www.reddit.com/r/programming/comments/82xyu6/advent_of_d_learning_d_with_advent_of_code/

Ali


Lmao I love Reddit.

The D hate has moved onto a new level.

Instead of hating on D, it's now geared towards the amount of 
upvotes a D post on reddit gets.


What an amusement.


Re: mysql-native v2.1.0

2018-03-08 Thread bauss via Digitalmars-d-announce
On Thursday, 8 March 2018 at 15:09:07 UTC, Steven Schveighoffer 
wrote:
The point of a pool is to avoid some costly setup. In my case, 
I'm not even closing the connection because I feel the "cost" 
of allocating a connection from the heap isn't worth worrying 
about. But I also limit the pool so it's only going to allow X 
concurrent Db connections per thread.


-Steve


If you limit the amount of concurrent db connections will the 
task wait until a connection can be acquired or will it throw an 
exception?


Re: mysql-native v2.1.0

2018-03-08 Thread bauss via Digitalmars-d-announce
On Thursday, 8 March 2018 at 13:33:32 UTC, Nick Sabalausky 
(Abscissa) wrote:
Sonke figured out just a few hours ago, and I confirmed, that 
#170 is caused by a bug in MySQLPool.lockConnection introduced 
in v2.1.0. I plan to have that fixed with a new release today.


That bug turned out to be caused by MySQLPool.lockConnection 
allowing the LockedConnection!Connection it received from vibe 
to degrade down to a plain Connection (because of alias this 
allowing implicit conversion). So MySQLPool.lockConnection 
would then return the *raw* Connection instead, thus allowing 
LockedConnection to go out of scope and reclaim the connection 
as soon as MySQLPool.lockConnection returned.


Sonke's been putting thought into how to adjust vibe's 
LockedConnection so this can't happen by accident. Maybe your 
lib fell prey to the same accident mine did?



And yes I need support for multiple connection strings. It's 
not an application, it's a library for writing enterprise 
websites/webapis and thus it should be scalable, since most 
enterprise solutions uses multiple databases.


Ah, I see. Fair enough.


That's possible. Looking forward to the release, then I'll test 
it out and see what happens.




Re: mysql-native v2.1.0

2018-03-08 Thread bauss via Digitalmars-d-announce
On Thursday, 8 March 2018 at 06:49:52 UTC, Nick Sabalausky 
(Abscissa) wrote:

On 03/07/2018 02:32 PM, bauss wrote:


Wait why has it been updated to array() ? So it's not a real 
range anymore? Or was it always represented as an array behind 
the scenes?


I just feel like allocating it into an additional array is a 
waste of memory? But if it was always like that I guess it 
doesn't matter.




query() returns an input range. You can only access one element 
at a time (as its read from the network) and you don't know how 
many there are ahead of time, BUT it avoids allocating a whole 
array to store everything.


In addition to query(), there used to also be a querySet(). The 
querySet() would allocate an array and read ALL the results 
into it so you could get random-access. But that's exactly what 
you already get when you call array() on an input range (such 
as the input range returned by query), so querySet was deemed 
redundant and eliminated.


So if you had code that *did* need an array allocated to store 
all the results, then "querySet()" has been replaced with 
"query().array". But like you said, if you don't really need 
the array, then there's no need to call array() and waste the 
memory.




However idk what I changed, but the issue stopped for me.

However I still have this issue:

https://github.com/mysql-d/mysql-native/issues/153

(Currently trying to see if I can make a minimal example, but 
it's kinda hard to make a minimal example since it's from my 
Diamond MVC (vibe.d) library and it isn't used until deep 
nesting of the application.


Anyway before I report anything else I could easily be doing 
something wrong. There hasn't exactly been any good examples 
on how to use it with vibe.d so it has pretty much been a 
trial and error thing for me.


Using mysql-native with vibe.d isn't any different from using 
it without vibe.d.


It's recommended to use MySQLPool to make a Connection rather 
than doing "new Connection" directly simply because connecting 
is faster that way (though "new Connection" will still work).


But aside from that, there is absolutely nothing different 
about mysql-native whether you're using vibe.d or not.



So basically I keep an associative array of connection pools 
based on connection strings like below:


private static __gshared MySQLPool[string] _pools;

And then I retrieve a connection with the function below.

Perhaps I'm not supposed to make a new pool every time, but 
there is someway to retrieve a pool already? Maybe that's what 
I'm doing wrong?


private static shared globalPoolLock = new Object;

private Connection getMySqlConnection(string connectionString)
{
   auto pool = _pools.get(connectionString, null);

   if (!pool)
   {
     synchronized (globalPoolLock)
     {
   pool = new MySQLPool(connectionString);

   _pools[connectionString] = pool;
     }
   }

   return pool.lockConnection();
}

After I retrieve the connection then it's basically like the 
code I showed you, but that seem to be correct, yes?


Does your application need to support multiple connection 
strings while it's running? That's pretty rare unless you're 
making something like phpMyAdmin (and even then, I'd probably 
do it a little differently). Normally you'd just make one 
connection pool:


MySQLPool pool;

Then "new" that once with your connection string when you start 
up, and you're good.


I guess I can imagine some potential use-cases that get more 
complicated than that, but that's really up to your own 
project's needs.


> However I still have this issue:
>
> https://github.com/mysql-d/mysql-native/issues/153
>
> (Currently trying to see if I can make a minimal example, but
it's kinda
> hard to make a minimal example since it's from my Diamond MVC
(vibe.d)
> library and it isn't used until deep nesting of the
application.

I'm only guessing here, but I wonder if that might be because 
you seem to be trying to share pools and connections across 
threads. I don't know whether vibe is designed to share TCP 
connections across threads or not. I'd say, try ripping out all 
that shared/__gshared/synchronized stuff and see how that works.


But if you can't store the pools anywhere, how are you supposed 
to use them with vibe.d?


Creating a new pool for every thread seems expensive and dosn't 
that defeat the purpose of using pools in the first place?


I mean a 1000 people could connect to a website and potentially 
that could create a thousand threads (It probably won't, BUT it 
could.) and thus it can't be afforded to create a pool per 
request.


I mean it's kind of a corner case, but it's a common corner case 
for big applications.


I don't create any explicit threads.

But like I said, it seems to work after I stopped returning the 
connection and just the pool.


so I think the problem wasn't the pool, but the connection itself.

At least I can't reproduce it and tried with hundreds of queries 
at once and before I could reproduce with less than 1

Re: Diamond Full-stack MVC / Template Engine - v2.7.0 Released!

2018-03-08 Thread bauss via Digitalmars-d-announce

On Wednesday, 7 March 2018 at 22:51:10 UTC, Adam D. Ruppe wrote:

And api documentation for the new version!

http://diamond.dpldocs.info/v2.7.0/index.html


Thanks for updating it!

On Thursday, 8 March 2018 at 01:38:55 UTC, Mike Parker wrote:

On Wednesday, 7 March 2018 at 22:37:36 UTC, bauss wrote:

I finally got around and fixed the last corners here and there.

If you wonder what Diamond is, then it's a library for 
developing full-stack MVC web-applications based on vibe.d.


It contains a lot of features (Which you can see in the READ 
ME)


And you can read more about the project in the Project 
Highlight bauss did on the D Blog a while back:


https://dlang.org/blog/2017/11/20/project-highlight-diamond-mvc-framework/


Yes! Thanks a lot for the recognition!


Re: Lobst.rs now has a "D" tag

2018-03-07 Thread Bauss via Digitalmars-d-announce

On Wednesday, 7 March 2018 at 16:34:31 UTC, Pradeep Gowda wrote:

https://lobste.rs/t/d

Please do not forget to tag your D related submissions with the 
"D" tag.


Can someone invite me at baussproje...@gmail.com


Re: mysql-native v2.1.0

2018-03-07 Thread Bauss via Digitalmars-d-announce
On Thursday, 8 March 2018 at 07:03:15 UTC, Nick Sabalausky 
(Abscissa) wrote:

On 03/07/2018 04:53 PM, bauss wrote:


I can't seem to reproduce it now, but I'll keep an eye for it 
and see if it still happens, but I think the problem is when 
you return the connection from a function.


I had similar issues returning a raw connection created.


By any chance, are you ever storing a Connection or a 
ResultRange anywhere? I don't mean as a function-local variable 
or a a function parameter: I mean like as a class/struct member 
or as a global? (Well, not that D really has true globals, but 
a "global" at the module-level.)


If you keep around a Connection (or a ResultRange, which has a 
reference to its own Connection) past the end of the vibe.d 
task that was using it, then that can definitely cause this 
kind of problem.


(AIUI, vibe.d wants to make the connections you obtain from a 
pool be Scoped. That would help prevent users from accidentally 
storing something they shouldn't and running into this issue.)


Yeah I stores the result range which I assume was the issue, but 
I'm returning results as arrays now so it probably solved it.


That behavior should be documented though, I don't recall reading 
that anywhere and it's kind of a gotcha




Re: Documentation for any* dub package, any version

2018-03-07 Thread bauss via Digitalmars-d-announce

On Friday, 2 March 2018 at 00:04:10 UTC, Adam D. Ruppe wrote:

On Thursday, 1 March 2018 at 11:00:15 UTC, Jonas Drewsen wrote:
Would be cool if you could add support for creating docs from 
any dub project stored on github and not only the ones on 
code.dlang.org.


That might be possible too.


BTW I just put the server code up on github
https://github.com/adamdruppe/dpldocs


there's actually not that much to it right now.


How would you go about updating docs?

I'd like to have http://diamond.dpldocs.info/diamond.html updated

Thank you!


Diamond Full-stack MVC / Template Engine - v2.7.0 Released!

2018-03-07 Thread bauss via Digitalmars-d-announce

I finally got around and fixed the last corners here and there.

If you wonder what Diamond is, then it's a library for developing 
full-stack MVC web-applications based on vibe.d.


It contains a lot of features (Which you can see in the READ ME)

To name a few of the key features:

* Full control over requests / responses when wanted.
* "Websettings" file that lets you control requests / responses 
for:

  * Before a request is handled.
  * After a request has been handled.
  * When an error occurres.
  * When a page or controller action wasn't found.
  * When a static file has been requested.
* Multiple static file paths
* Let's you bind to multiple ip addresses and ports.
* Let's you control default headers for each type of request 
(default, static files, errors, not found etc.)
* Uses vibe.d for backend, so it's very powerful and all vibe.d 
features can be used with Diamond
* Easy control over the application's type using *static if* 
constructs.

  * isWeb (true for both web-servers and web-apis.)
  * isWebServer (true for web-servers)
  * isWebApi (true for web-apis)
  * isWeb, isWebServer and isWebApi will be false for standalone.
* ACL & Authentication tied to it
* Separate authentication that can be used either with or without 
the ACL

* CSRF Protection
* Easy integrated cookie/session API.
* The network can be restricted to specific ips.
* Transactions
* Unittesting
* Logging
* i18n
* Version-control
* Route rewriting
* Database Integration & Object Relational Mapping
* Websockets
* Specialized Routes (Can fetch resources external internal or 
local)
* Views are parsed at compile-time, thus rendering of views are 
super fast

* Views can have layout views
* Views have a metadata section that lets you change view 
configurations such as its controller, model, layout, route and 
placeholders.
* Views have placeholders and layout view's can access the render 
view's placeholders.

* Views can encode their data
* Has a rich syntax that allows for complex and innovative 
rendering.
* Easy access to the current request / response using the 
properties: *httpRequest* and *httpResponse*

* Can render other views within itself
* Any type of D code can be written within views.
* Allows for sections, which is useful to only render a part of 
the view. (Very useful for responsive designs)

* Can be passed to controllers by their base view
* Layout views can be changed dynamically
* Expensive views can be cached.
* Flash-messages
* Controller actions are mapped through attributes. (By default 
the route name will be the name of the function.)
  * If wanted actions can be mapped manually, but that's a legacy 
feature.
* Controller actions can easily control how the response is 
handled, as they require a status returned

  * Status.success (Will continue to handle the request.)
  * Status.end (Will end the request; useful for json responses 
etc. *Note: using the json() function already does it for you.)*

  * Status.notFound (Will issue a 404 status for the response.)
* Can map mandatory actions that are executed on every requests. 
(Useful for authentication etc.)

* Easy integrated authentication (Can be combined with ACL)
* RESTful
* Specific actions can be restricted to specific ips.

After 2.7.0 I have decided to drop backward compatibility as 
2.7.0 barely introduces any major breaking changes, but it fixes 
a lot of issues and now works with vibe.d 0.8.2 and mysql-native 
2.1.0!!


Since last announced update the following has been added:

* i18n messages can now be added dynamically.
* Support for mysql-native 2.1.0
* Support for vibe.d 0.8.2
* Removed backward compatibility with older vibe.d versions
* Slowly moving away from shared static constructors. (Currently 
Diamond implements a main function for a start.)
* Better internal usage of placeholders (They now append to the 
view's content, instead of using std.array.replace.)
* Removed the rootPath property from the View class, because it 
was expensive and kind of useless.

* You can now retrieve placeholder values from views
* Route creation was made public
* Added new view functionality such as the ability to delay view 
render for layouts etc.

* Added the ability to use a single view for routing
* Added a view constructor extension type

Other than that minor optimizations and bug fixes has also taken 
place.


Github: https://github.com/DiamondMVC/Diamond
Dub: https://code.dlang.org/packages/diamond (Currently waiting 
for dub to update the package!)


In the last announcement for Diamond I said I'd implement a SEO 
API and SOAP support and it's still planned, but it wasn't 
prioritized like updating to vibe.d 0.8.2 and mysql-native 2.1.0


I still plan to implement it within the near future!

I think Diamond has reached a stable phase, which means I can 
focus on adding tutorials, examples etc.


I also need to pick up working on the official Diamond website, 
but I have a lot of actual paid work that I can't just put away 
at the mome

Re: mysql-native v2.1.0

2018-03-07 Thread bauss via Digitalmars-d-announce

On Wednesday, 7 March 2018 at 19:36:57 UTC, bauss wrote:
On Wednesday, 7 March 2018 at 11:04:10 UTC, Nick Sabalausky 
(Abscissa) wrote:

On 03/06/2018 01:31 PM, bauss wrote:


I can't seem to find any examples on how they were updated 
and what exactly to change in my code.




Also, FWIW, mysql-native uses semantic versioning (semver), so 
anything that worked in v2.0.0 should still continue working 
in all v2.x.x.


I was all the way down at 1.1.2, because of other issues that I 
can't remember on top of my head, but they have since been 
resolved. There were only one issue back for which was the 
locked connection thing, which my post above has a link to.


So I changed my code to do this with retrieving the pool and 
creating it:


/// Collection of connection pools.
private static __gshared MySQLPool[string] _pools;

/// Global pool lock to ensure we don't attempt to create a 
connection pool twice on same connection string.

private static shared globalPoolLock = new Object;

/**
* Gets a new mysql connection from the pool.
* Params:
*   connectionString = The connection string for the connection.
* Returns:
*   The mysql connection.
*/
private MySQLPool getPool(string connectionString)
{
  auto pool = _pools.get(connectionString, null);

  if (!pool)
  {
synchronized (globalPoolLock)
{
  pool = new MySQLPool(connectionString);

  _pools[connectionString] = pool;
}

return getPool(connectionString);
  }

  return pool;
}

And when using it:

  auto pool = getPool(useDbConnectionString);
  auto connection = pool.lockConnection();

  auto prepared = connection.prepare(sql);
  prepared.setArgs(params);

Rather than just returning the connection from it.

I can't seem to reproduce it now, but I'll keep an eye for it and 
see if it still happens, but I think the problem is when you 
return the connection from a function.


I had similar issues returning a raw connection created.


Re: mysql-native v2.1.0

2018-03-07 Thread bauss via Digitalmars-d-announce
On Wednesday, 7 March 2018 at 11:04:10 UTC, Nick Sabalausky 
(Abscissa) wrote:

On 03/06/2018 01:31 PM, bauss wrote:


I can't seem to find any examples on how they were updated and 
what exactly to change in my code.




Also, FWIW, mysql-native uses semantic versioning (semver), so 
anything that worked in v2.0.0 should still continue working in 
all v2.x.x.


I was all the way down at 1.1.2, because of other issues that I 
can't remember on top of my head, but they have since been 
resolved. There were only one issue back for which was the locked 
connection thing, which my post above has a link to.


Re: mysql-native v2.1.0

2018-03-07 Thread bauss via Digitalmars-d-announce
On Wednesday, 7 March 2018 at 10:14:08 UTC, Nick Sabalausky 
(Abscissa) wrote:

On 03/06/2018 01:54 PM, bauss wrote:

On Tuesday, 6 March 2018 at 18:36:45 UTC, bauss wrote:


Like more specifically do I still call lockConnection() on a 
MySQLPool?


If you're using vibe.d and MySQLPool, then yes. But that's 
completely unrelated to prepared statements, it has nothing to 
do with whether or not you're using them, or how you're using 
them.




I think it would be easier to help me if I put some examples.

I just tried changing stuff and I can't seem to get it working.

I kept using lockConnection() as before, I assume it's the 
right way.


Then I changed the way I retrieve prepared statements from:

   auto prepared = prepare(connection, sql);
   prepared.setArgs(params);

to:

   auto prepared = connection.prepare(sql);
   prepared.setArgs(params);



Either way works. That's just a matter of whether you're using 
D's "UFCS" (uniform function-call syntax) feature or not.



Then ex. for reading many entries:

From:

   return prepared.querySet().map!((row)
   {
     auto model = new TModel;
     model.row = row;
     model.readModel();
     return model;
   });

To:

   return connection.query(prepared).map!((row)
   {
     auto model = new TModel;
     model.row = row;
     model.readModel();
     return model;
   });

But it doesn't seem to work.

I get the following exception:

"Attempting to popFront an empty map" which I assume is 
because the result is empty.




Ok, now that one is a little weird. Should work as far as I can 
tell. I'd say file a ticket here with a minimized test case I 
can just run on my machine to reproduce the error. Please make 
sure the test case shows the return type of the function in 
question (and whether or not it's simply "auto") and how its 
used that leads to the error:


https://github.com/mysql-d/mysql-native/issues

Also, be aware that the updated equivalent to `querySet` is 
`query(...).array()`, not plain `query(...)`. However, based on 
the portion of code you've posted, I don't see why it shouldn't 
work as-is. I'd have to examine a complete test-case to get to 
the bottom of that.


My best guess is that the code which is CALLING your functions 
above may be doing something wrong with the range being 
returned. But again, without a complete test-case, the best I 
can do is make guesses.


Wait why has it been updated to array() ? So it's not a real 
range anymore? Or was it always represented as an array behind 
the scenes?


I just feel like allocating it into an additional array is a 
waste of memory? But if it was always like that I guess it 
doesn't matter.


However idk what I changed, but the issue stopped for me.

However I still have this issue:

https://github.com/mysql-d/mysql-native/issues/153

(Currently trying to see if I can make a minimal example, but 
it's kinda hard to make a minimal example since it's from my 
Diamond MVC (vibe.d) library and it isn't used until deep nesting 
of the application.


Anyway before I report anything else I could easily be doing 
something wrong. There hasn't exactly been any good examples on 
how to use it with vibe.d so it has pretty much been a trial and 
error thing for me.


So basically I keep an associative array of connection pools 
based on connection strings like below:


private static __gshared MySQLPool[string] _pools;

And then I retrieve a connection with the function below.

Perhaps I'm not supposed to make a new pool every time, but there 
is someway to retrieve a pool already? Maybe that's what I'm 
doing wrong?


private static shared globalPoolLock = new Object;

private Connection getMySqlConnection(string connectionString)
{
  auto pool = _pools.get(connectionString, null);

  if (!pool)
  {
synchronized (globalPoolLock)
{
  pool = new MySQLPool(connectionString);

  _pools[connectionString] = pool;
}
  }

  return pool.lockConnection();
}

After I retrieve the connection then it's basically like the code 
I showed you, but that seem to be correct, yes?


Re: mysql-native v2.1.0

2018-03-06 Thread bauss via Digitalmars-d-announce

On Tuesday, 6 March 2018 at 18:36:45 UTC, bauss wrote:

On Tuesday, 6 March 2018 at 18:31:08 UTC, bauss wrote:
On Saturday, 3 March 2018 at 07:37:38 UTC, Nick Sabalausky 
(Abscissa) wrote:

[...]


I'm unsure how I'd go about implementing prepared statements 
in a vibe.d application correctly.


[...]


Like more specifically do I still call lockConnection() on a 
MySQLPool?


I think it would be easier to help me if I put some examples.

I just tried changing stuff and I can't seem to get it working.

I kept using lockConnection() as before, I assume it's the right 
way.


Then I changed the way I retrieve prepared statements from:

  auto prepared = prepare(connection, sql);
  prepared.setArgs(params);

to:

  auto prepared = connection.prepare(sql);
  prepared.setArgs(params);

Then ex. for reading many entries:

From:

  return prepared.querySet().map!((row)
  {
auto model = new TModel;
model.row = row;
model.readModel();
return model;
  });

To:

  return connection.query(prepared).map!((row)
  {
auto model = new TModel;
model.row = row;
model.readModel();
return model;
  });

But it doesn't seem to work.

I get the following exception:

"Attempting to popFront an empty map" which I assume is because 
the result is empty.


So what am I doing wrong in using prepared statements with the 
new updates?


Re: mysql-native v2.1.0

2018-03-06 Thread bauss via Digitalmars-d-announce

On Tuesday, 6 March 2018 at 18:31:08 UTC, bauss wrote:
On Saturday, 3 March 2018 at 07:37:38 UTC, Nick Sabalausky 
(Abscissa) wrote:

[...]


I'm unsure how I'd go about implementing prepared statements in 
a vibe.d application correctly.


[...]


Like more specifically do I still call lockConnection() on a 
MySQLPool?


Re: mysql-native v2.1.0

2018-03-06 Thread bauss via Digitalmars-d-announce
On Saturday, 3 March 2018 at 07:37:38 UTC, Nick Sabalausky 
(Abscissa) wrote:

An all-D MySQL/MariaDB client library:
https://github.com/mysql-d/mysql-native
==

Tagged 'v2.1.0', which mainly adds a few new features, 
including greatly simplified shortcut syntax for prepared 
statements (with automatic, implicit caching and re-use):


---
int i = 5;
string s = "Hello world";
conn.exec("INSERT INTO table_name VALUES (?, ?)", i, s);
conn.query("SELECT * FROM table_name WHERE id=? AND name=?", i, 
s);


// Also works:
Prepared stmt = conn.prepare("INSERT ...blah... (?, ?)");
conn.exec(stmt, i, s);
---

As well as additional tools for optional micro-management of 
registering/releasing prepared statements.


It also fixes #28: "MYXProtocol thrown when using large 
integers as prepared parameters."


Full changelog
https://github.com/mysql-d/mysql-native/blob/master/CHANGELOG.md#v210---2018-03-02


I'm unsure how I'd go about implementing prepared statements in a 
vibe.d application correctly.


With older versions it didn't work properly and I'm not sure how 
to implement it with the new version of prepared statements.


I can't seem to find any examples on how they were updated and 
what exactly to change in my code.


It would be nice with some more examples that aren't basics.

Especially, because I call setArgs() to set arguments from an 
array since I have no control over the arguments passed to the 
function as they're generated elsewhere and thus I cannot 
manually specify the arguments.



I guess I will try to dig around and see what works and what 
doesn't, unless you can pinpoint me in the correct direction.


Re: Article: Why Const Sucks

2018-03-05 Thread bauss via Digitalmars-d-announce

On Monday, 5 March 2018 at 10:57:35 UTC, Jonathan M Davis wrote:

Here's something I wrote up on const:

http://jmdavisprog.com/articles/why-const-sucks.html

I suppose that it's not exactly the most positive article, but 
I feel that it's accurate.


- Jonathan M Davis


Great read for a Monday.


Re: State of D 2018 Survey

2018-03-04 Thread bauss via Digitalmars-d-announce
On Sunday, 4 March 2018 at 18:52:36 UTC, Martin Tschierschke 
wrote:

On Sunday, 4 March 2018 at 17:26:50 UTC, bauss wrote:

On Sunday, 4 March 2018 at 15:13:28 UTC, Kagamin wrote:
But seriously, Stack overflow is a reputation-based system, 
it very hostile from the very start, when you don't have 
enough reputation for pretty much everything, and SO 
vehemently nags you about this on every possible occasion, 
even baiting you to use functionality only to later tell that 
you don't have enough reputation to use it. How can anyone 
like it is beyond me.


It's also very strict and probably have of the posts within 
Learn here wouldn't be allowed there.

http://area51.stackexchange.com/faq

What about trying to start an own "D Exchange"? I like the 
possibility to vote for good questions and answers. There are 
many gems inside the forum, but not so easy to find as in the 
stack exchange based forums.


A custom forum that isn't based on an email client would probably 
be better tbh.


Re: State of D 2018 Survey

2018-03-04 Thread bauss via Digitalmars-d-announce

On Sunday, 4 March 2018 at 15:13:28 UTC, Kagamin wrote:
But seriously, Stack overflow is a reputation-based system, it 
very hostile from the very start, when you don't have enough 
reputation for pretty much everything, and SO vehemently nags 
you about this on every possible occasion, even baiting you to 
use functionality only to later tell that you don't have enough 
reputation to use it. How can anyone like it is beyond me.


It's also very strict and probably have of the posts within Learn 
here wouldn't be allowed there.


Re: State of D 2018 Survey

2018-03-04 Thread bauss via Digitalmars-d-announce

On Sunday, 4 March 2018 at 17:26:50 UTC, bauss wrote:

On Sunday, 4 March 2018 at 15:13:28 UTC, Kagamin wrote:
But seriously, Stack overflow is a reputation-based system, it 
very hostile from the very start, when you don't have enough 
reputation for pretty much everything, and SO vehemently nags 
you about this on every possible occasion, even baiting you to 
use functionality only to later tell that you don't have 
enough reputation to use it. How can anyone like it is beyond 
me.


It's also very strict and probably have of the posts within 
Learn here wouldn't be allowed there.


half*


Re: State of D 2018 Survey

2018-03-01 Thread bauss via Digitalmars-d-announce

On Wednesday, 28 February 2018 at 20:37:36 UTC, Seb wrote:

On Wednesday, 28 February 2018 at 20:24:00 UTC, JN wrote:

On Wednesday, 28 February 2018 at 20:01:16 UTC, Seb wrote:

Thanks! I hope so too!


Is there some way to access the results without retaking the 
survey?


Yeah the link TypeForm generates at the end is permanent:

https://dlang.typeform.com/report/H1GTak/PY9NhHkcBFG0t6ig

though for some reason it doesn't show full-text answers (I 
have opened a support ticket for that a while ago).
Anyhow, as Mike said we will look at all answers and do a 
summary once the survey concluded.


Interesting results. 80% in favor for breaking changes.

Maybe it's time to not care too much about making D better and 
leave old legacy stuff that stops D from evolving behind curtains.


Re: Documentation for any* dub package, any version

2018-02-27 Thread bauss via Digitalmars-d-announce

On Tuesday, 27 February 2018 at 09:16:12 UTC, bauss wrote:
On Monday, 26 February 2018 at 14:59:07 UTC, Adam D. Ruppe 
wrote:

[...]


Tried with http://diamond.dpldocs.info/arsd.html and it gives a 
404


Nvm, I see how stupid I was.


Re: Documentation for any* dub package, any version

2018-02-27 Thread bauss via Digitalmars-d-announce

On Monday, 26 February 2018 at 14:59:07 UTC, Adam D. Ruppe wrote:
Many of you will already know this from the other thread or 
from my twitter, but I just added a on-demand downloader to my 
dpldocs.info domain to fetch and build docs for any* dub 
package.


Simply go to projectname.dpldocs.info/vX.Y.Z/ and it will 
generate docs for dub package projectname, version X.Y.Z. (If 
you don't specify a version, it will pull the master branch.)


For example:

http://arsd-official.dpldocs.info/arsd.html

master branch for the arsd-official package

or:

http://dplug.dpldocs.info/v6.0.22/dplug.html

6.0.22 of the dplug package.

etc.

I'd like to get the code.dlang.org folks to add the correct 
link to the main package site so people can easily discover 
this just put nofollow on it plz so google doesn't trigger 
generation of pages people don't actually need (the lazy 
generation + caching allows me to host this on a cheap VPS)



It builds the docs using my own doc generator 
 which pulls embedded doc 
comments out of the source.


It isn't 100% compatible with ddoc. For example, this 
user-defined macro was not expanded: 
http://dxml.dpldocs.info/dxml.dom.html#source


But, it builds 99% of Phobos so it can probably build your 
project too! And get the ease of adrdox navigation and 
legibility.


Moreover, if you want to embrace it, you can use all the 
features described here: 
http://dpldocs.info/experimental-docs/adrdox.syntax.html except 
for the LaTeX math generation (that's not installed on the dub 
doc server I set up).


You can group functions like seen here: 
http://dpldocs.info/experimental-docs/arsd.nanovega.html and 
use some markdown syntax, and easy [reference] linking and more.




The generated docs may get some customization options in the 
future, like adding a logo, header nav links, or maybe tweaking 
the color scheme. It will probably also start reading 
.gitignore and perhaps a .adrdoxignore file soon to to exclude 
files from generation. I just need to decide the details first 
and it is time to work the day job right now and I want to 
announce sooner rather than later :)



* currently, only github code downloading is actually 
implemented.


Tried with http://diamond.dpldocs.info/arsd.html and it gives a 
404


Re: dxml 0.1.0 released

2018-02-10 Thread bauss via Digitalmars-d-announce
On Friday, 9 February 2018 at 21:15:33 UTC, Jonathan M Davis 
wrote:
I have multiple projects that need an XML parser, and 
std_experimental_xml is clearly going nowhere, with the guy who 
wrote it having disappeared into the ether, so I decided to 
break down and write one. I've kind of wanted to for years, but 
I didn't want to spend the time on it. However, sometime last 
year I finally decided that I had to, and it's been what I've 
been working on in my free time for a while now. And it's 
finally reached the point when it makes sense to release it - 
hence this post.


Currently, dxml contains only a range-based StAX / pull parser 
and related helper functions, but the plan is to add a DOM 
parser as well as two writers - one which is the writer 
equivalent of a StaX parser, and one which is DOM-based. 
However, in theory, the StAX parser is complete and quite 
useable as-is - though I expect that I'll be adding more helper 
functions to make it easier to use, and if you find that you're 
doing a particular operation with it frequently and that that 
operation is overly verbose, please point it out so that maybe 
a helper function can be added to improve that use case - e.g. 
I'm thinking of adding a function similar to std.getopt.getopt 
for handling attributes, because I personally find that dealing 
with those is more verbose than I'd like. Obviously, some stuff 
is just going to do better with a DOM parser, but thus far, 
I've found that a StAX parser has suited my needs quite well. I 
have no plans to add a SAX parser, since as far as I can tell, 
SAX parsers are just plain worse than StAX parsers, and the 
StAX approach is quite well-suited to ranges.


Of note, dxml does not support the DTD section beyond what is 
required to parse past it, since supporting it would make it 
impossible for the parser to return slices of the original 
input beyond the case where strings are used (and it would be 
forced to allocate strings in some cases, whereas dxml does 
_very_ minimal heap allocation right now), and parsing the DTD 
section signicantly increases the complexity of the parser in 
order to support something that I honestly don't think should 
ever have been part of the XML standard and is unnecessary for 
many, many XML documents. So, if you're dealing with XML 
documents that contain entity references that are declared in 
the DTD section and then used outside of the DTD section, then 
dxml will not support them, but it will work just fine if a DTD 
section is there so long as it doesn't declare any entity 
references that are then referenced in the document proper.


Hopefully, the documentation is clear enough, but obviously, 
I'm not the best judge of that. So, have at it.


Documentation: http://jmdavisprog.com/docs/dxml/0.1.0/
Github: https://github.com/jmdavis/dxml
Dub: http://code.dlang.org/packages/dxml

- Jonathan M Davis


This is going to be really useful for people like me who works 
with webservices using soap.


Thanks for the great work.


Re: mysql-native v2.0.0-rc1: Release Candidate: Redesigned Prepared

2018-02-08 Thread bauss via Digitalmars-d-announce
On Monday, 5 February 2018 at 04:47:07 UTC, Nick Sabalausky 
(Abscissa) wrote:

An all-D MySQL/MariaDB client library:

https://github.com/mysql-d/mysql-native

--

I've tagged a release candidate ("v2.0.0-rc1") which, among 
other various enhancements and cleanups, includes a redesign of 
prepared statements which are now connection-independent (among 
other benefits).


If you use prepared statements, this *does* involve some small 
breaking changes. A migration guide is provided here:


https://github.com/mysql-d/mysql-native/blob/master/MIGRATING_TO_V2.md


Motivations and the specific changes for prepared statements 
are explained here:


https://github.com/mysql-d/mysql-native/blob/master/ABOUT_PREPARED_V2.md

--

Full list of all other changes in this release in the changelog:

https://github.com/mysql-d/mysql-native/blob/master/CHANGELOG.md

--

Please give it a try and let me know how it works out. Please 
file any issues here: 
https://github.com/mysql-d/mysql-native/issues


Been waiting for this!

Thank you for all your effort.

Going to test it out later and see how it works compared to now.


Re: NES emulator written in D

2018-02-07 Thread bauss via Digitalmars-d-announce

On Saturday, 3 February 2018 at 13:52:17 UTC, blahness wrote:

Hi everyone,

Not sure how interested people here will be with this but I've 
ported https://github.com/fogleman/nes from Go to D [1]. I 
should point out that I'm not the author of the original Go 
version.


The emulator code itself is 100% D with no dependencies. I've 
also created a little app using SDL to show how you'd put this 
library to use [2].


Its PPU & APU timing isn't 100% accurate (same as the Go 
version) so not all games will work correctly but this should 
be pretty easy to fix.


Links
--
[1] https://github.com/blahness/nes
[2] https://github.com/blahness/nes_test


This is really cool and has definitely got my interest.

I forked your project and will look through it!

Thanks for the work.


Re: Released vibe.d 0.8.2

2017-12-17 Thread bauss via Digitalmars-d-announce

On Sunday, 17 December 2017 at 19:13:44 UTC, Sönke Ludwig wrote:
But what do you mean with anything will break using `.path`? It 
follows the usual deprecation path - currently it's just 
documented as deprecated. In one or two releases, the 
`deprecated` attribute will be set and a few releases later it 
will finally be removed. By that time projects will have had 
quite some time to react on the deprecation.


HTTPServerRequest.path does not have the same definition as 
previously.


It has been changed from a field to a getter function.

Tbh. it should just have been marked with deprecated instead of 
being removed, as you do specify is the normal deprecation 
process.


0.8.1:
/** The _path part of the URL.

			Remarks: This field is only set if HTTPServerOption.parseURL 
is set.

*/
string path;

0.8.2:
/** Deprecated: The _path part of the URL.

Note that this function contains the decoded version of 
the
requested path, which can yield incorrect results if 
the path
			contains URL encoded path separators. Use `requestPath` 
instead to

get an encoding-aware representation.
*/
string path() @safe {
if (_path.isNull) {
_path = urlDecode(requestPath.toString);
}
return _path.get;
}

private Nullable!string _path;

There should still have been a setter property like:

void path(string newPath);

Which should be marked with deprecated until it could be safely 
removed.


Re: Released vibe.d 0.8.2

2017-12-17 Thread bauss via Digitalmars-d-announce

On Sunday, 17 December 2017 at 20:55:15 UTC, bauss wrote:

private Nullable!string _path;


Also does this really make sense?

Why not just have it:

private string _path;

Then instead of:
string path() @safe {
if (_path.isNull) {
_path = urlDecode(requestPath.toString);
}
return _path.get;
}

You could have:
string path() @safe {
if (!_path) {
_path = urlDecode(requestPath.toString);
}
return _path;
}


Re: Released vibe.d 0.8.2

2017-12-17 Thread bauss via Digitalmars-d-announce

On Sunday, 17 December 2017 at 14:13:05 UTC, WebFreak001 wrote:

On Sunday, 17 December 2017 at 12:52:57 UTC, bauss wrote:
This shouldn't have been released as 0.8.2, because it has a 
lot of breaking changes.


For an instance anything that relies on HTTPServerRequest.path 
will break.


I'm aware that there has been added the "requestPath" 
property, but it's still a breaking change to all existing 
code that relies on the old "path" property. Especially when 
it's used to manipulate the path you receive.


Diamond cannot currently be used with latest release of 
vibe.d, because of this and it was relying on vibe.d with 
following dependency:


"vibe-d": "~>0.8.1"

0.8.2 should not be a breaking change, assuming you follow 
semantic versioning.


https://semver.org/


4. Major version zero (0.y.z) is for initial development. 
Anything may change at any time. The public API should not be 
considered stable.


0.x.Y should always be compatible with 0.x.Z without breaking 
changes.


Since it's MAJOR.MINOR.PATCH

This is a patch release 0.8.1 to 0.8.2 which means:

"PATCH version when you make backwards-compatible bug fixes."

Even a minor version should be backward-compatible.

"MINOR version when you add functionality in a 
backwards-compatible manner, and"


I'm all for deprecating said features, but plain removing them in 
a release like this is a breaking change and should at the very 
least be a minor version upgrade, but definitely not a patch.


Re: Released vibe.d 0.8.2

2017-12-17 Thread bauss via Digitalmars-d-announce
This shouldn't have been released as 0.8.2, because it has a lot 
of breaking changes.


For an instance anything that relies on HTTPServerRequest.path 
will break.


I'm aware that there has been added the "requestPath" property, 
but it's still a breaking change to all existing code that relies 
on the old "path" property. Especially when it's used to 
manipulate the path you receive.


Diamond cannot currently be used with latest release of vibe.d, 
because of this and it was relying on vibe.d with following 
dependency:


"vibe-d": "~>0.8.1"

0.8.2 should not be a breaking change, assuming you follow 
semantic versioning.


https://semver.org/



Re: Diamond Full-stack MVC / Template Engine - v2.5.4 Released!

2017-12-17 Thread bauss via Digitalmars-d-announce

These are the features that are upcoming for the next releases.

* Getting rid of deprecated feature usage with mysql-native.
* SEO API
* Soap/Webservice support


Diamond Full-stack MVC / Template Engine - v2.5.4 Released!

2017-12-17 Thread bauss via Digitalmars-d-announce

I'm happy to announce that Diamond v2.5.4 has just been released.

This release comes with the following features:

* Bug fixes
* Websocket support
* White-space support for multi-line i18n translations.
* Specialized routes (Can fetch resources from external, internal 
and local locations.)


Github: https://github.com/DiamondMVC/Diamond

DUB: http://code.dlang.org/packages/diamond

Thank you!


Re: run.dlang.io - a modern way to run D code

2017-12-12 Thread bauss via Digitalmars-d-announce

On Wednesday, 13 December 2017 at 01:14:26 UTC, Seb wrote:
On Wednesday, 13 December 2017 at 00:32:11 UTC, rikki 
cattermole wrote:

On 12/12/2017 6:37 PM, Seb wrote:

=== Supported D Compilers ===

* Latest DMD nightly
* Latest DMD beta
* Latest DMD
* Latest LDC beta
* Latest LDC

The Docker images are rebuilt every day automatically.


Can we please select a version we want to test against?


While it would be rather easier to build more Docker images [1] 
and add them to the tour [2], I fear that this will be too much 
maintenance overhead and will lead to outdated compiler soon.
Also the storage on the machine is limited and we can't drop an 
unlimited amount of Docker images there.


[1] https://github.com/dlang-tour/core-exec
[2] 
https://github.com/dlang-tour/core/blob/master/source/exec/docker.d#L22


What you could do is support the 3 latest versions of the 
compilers.


Ex. for DMD you would support:
2.077.1
2.076.1
2.075.1



Re: Released vibe.d 0.8.2

2017-12-12 Thread bauss via Digitalmars-d-announce

On Tuesday, 12 December 2017 at 19:44:17 UTC, Sönke Ludwig wrote:
The major changes in this release are HTTP forward proxy 
support, handling incoming HTTP requests on custom transports 
and a MongoDB based session store. On top of that, there are 
many smaller improvements in the HTTP server, web/REST 
generator, JSON/BSON support and the TLS sub system.


Change log:
https://vibed.org/blog/posts/vibe-release-0.8.2

DUB package:
https://code.dlang.org/packages/vibe-d/0.8.2


Great job


Re: remake of remake of Konami's Knightmare

2017-11-23 Thread bauss via Digitalmars-d-announce

On Thursday, 23 November 2017 at 12:18:38 UTC, ketmar wrote:
recently i worked on remake of DOS remake of Konami's 
Knightmare game[0]. the game is playable now, it has music from 
original MSX Knightmare, and sfx/gfx/levels from DOS remake. it 
is written in D, of course, and it is FOSS. you can find the 
sources here[1].


[...]


This is pretty neat, good job!


Re: Project Highlight: Diamond MVC Framework

2017-11-20 Thread bauss via Digitalmars-d-announce

On Monday, 20 November 2017 at 14:39:43 UTC, Mike Parker wrote:
You may have seen announcements regarding Diamond here in the 
forums. The project maintainer, Jason Jensen, a.k.a bauss, 
provided me with some info about it for a Project Highlight on 
the D Blog.


Blog:
https://dlang.org/blog/2017/11/20/project-highlight-diamond-mvc-framework/

reddit:
https://www.reddit.com/r/programming/comments/7e98zk/diamond_a_vibedbased_mvc_web_framework_for_d/


Thank you for writing the article!


Re: Munich D Meetup November 2017

2017-11-13 Thread bauss via Digitalmars-d-announce

On Monday, 13 November 2017 at 18:43:13 UTC, Dragos Carp wrote:

Hi all,

Tomorrow November 14th, we will have our next Munich meetup. 
This time Seb and Stefan will give an introductory talk about 
templates and CTFE. After Andrei's awesome talk last month, we 
are happy to welcome new members of our group joining the 
regular meetups.


As usual before and after the talk we will also have good 
conversations with pizza and drinks.


Please RSVP on: 
https://www.meetup.com/de-DE/Munich-D-Programmers/events/244112572/


Thanks,
Dragos


Sounds like fun. I wish I could make it down to Germany, but 
unfortunately I can't, especially not tomorrow with less than a 
day in advance :p


Will there be any possibilities that the talks can be recorded 
and put on youtube?


Re: The latest Terrarium TV 1.8.1 has been updated.

2017-11-10 Thread bauss via Digitalmars-d-announce

On Friday, 10 November 2017 at 10:14:45 UTC, Theresa Henson wrote:

On Wednesday, 8 November 2017 at 10:47:42 UTC, Joakim wrote:
On Wednesday, 8 November 2017 at 10:36:46 UTC, codephantom 
wrote:
On Wednesday, 8 November 2017 at 09:40:01 UTC, Theresa Henson 
wrote:
The update is compatible with the latest Android OS as well 
as all others over Android 4.0


sounds great! thanks!

what is it?


It's spam, don't respond to it, as the mods apparently can't 
delete it then.


It is not spam, i was talking about Terrarium TV 
(http://terrariumtvdownloads.net/)


The latest Terrarium TV 1.8.1 has been updated. so i updated it 
here, nothing more.


and it relates to d how?


Re: The final form of the keyboard = ShionKeys

2017-11-10 Thread bauss via Digitalmars-d-announce

On Friday, 10 November 2017 at 15:06:20 UTC, Shion wrote:
I want to make more people aware of my project of trying to 
change the world (ShionKeys), seek proliferation. More project 
content will be announced at sales time / crowdfunding time. 
Please administrator support this project do not delete, I have 
been many evil community management will be regarded as spam / 
advertising information and delete.

github @ShionAt
twitter @ShionKeys


looks like spam


Diamond Full-stack MVC / Template Engine - v2.5.0 Released!

2017-11-08 Thread bauss via Digitalmars-d-announce

Hello D Community!

I'm pleased to announce Diamond v2.5.0.

What is Diamond?

Diamond is a powerful MVC / Template Framework inspired by 
ASP.NET MVC using vibe.d as backend.


It was originally written as an alternative template engine to 
vibe.d's Diet templtes, but
has since then evolved into a complete web framework on-top of 
vibe.d


The goal of Diamond is to be able to use it for enterprise 
development.


Feature highlight:

General:

* Low Memory & CPU Consumption
* MVC & HMVC Possiblities
* RESTful
* ACL (Access-control-list)
* Cross-platform
* Website/Webapi support
* Stand-alone support (No web)
* i18n (Internationalization)

Data & Storage:

* ORM (Object relational mapping)
* MySql ORM
* Caching
* Mongo (Through vibe.d)
* Redis (Through vibe.d)
* Request-contexts
* Cookies
* Sessions
* Transactions

Views & Frontend:

* Compile-time Parsing
* Partial Views
* Layouts
* Fast & Performant Rendering
* Dynamic
* Any D code can be executed
* Sections
* Flash-messages

Controllers:

* Auto-mapping
* View-integration
* Mandatory Actions
* Version-control

More:

* Authentication
* CSRF Protection
* Cryptography (Through Botan)
* JSON/BSON (Partially through vibe.d)
* Asynchronous (Through vibe.d)
* Fibers/Tasks (Through vibe.d)
* Sharding (Partially using vibe.d)
* Network Security & Restrictions
* Unittesting
* Logging

Between v2.4.0 and v2.5.0 the following changes has been made:

* Bug fixes, refactoring and optimizations
  * As always with every release bugs are fixed, code is 
refactored and optimized.
  * Refactoring is usual not breaking changes, but some breaking 
changes may have happened.

* Minimal vibe.d interaction
  * There has been created wrappers around vibe.d components, 
making it easier to handle certain vibe.d components.

* Unittesting
  * Diamond now has build-in unittesting which can be used to 
test certain areas of the applications.

* Flash-messages
  * Diamond is now able to create flash-messages; which are 
useful for notifications/temporary messages.

* MySql / ORM Implementation
  * Diamond-db has been refactored, optimized and put in as a 
part of the official Diamond repository.
  * This means Diamond-db is no longer a package and to use the 
ORM you must have the framework.
  * This change was done to better interact with the core of 
Diamond.

* Logging
  * Logging has been added to Diamond, allowing to log requests, 
responses, errors etc.
  * Logging can be customized with custom loggers or there can be 
logged to files or a database.

* i18n
  * Internationalization and localization has been added to 
Diamond.
  * This allows for Diamond applications to be written for 
multiple languages and cultures.

* Transactions
  * Transactions have been added, allowing to handle 
transactional memory, as well snapshot types.
  * This is useful for critical areas where invalid/incomplete 
data can't be afforded.

* Route rewriting
  * It's now possible to redirect routes to other routes
  * It's also possible to combine routes to handle multiple 
requests with a single request.

* Version-control
  * Version control has been added being able to develop new 
controller functionality without breaking existing controllers.


There's a temporary website using a default Github theme:

https://diamondmvc.github.io/Diamond/

You can find documentation and API docs there.

The website will be replaced with an official website when it's 
ready.

Which of course will be written using Diamond.

Github: https://github.com/DiamondMVC/Diamond

DUB: http://code.dlang.org/packages/diamond (Currently waiting 
for DUB to update the package.)


Thank you!


Re: Diamond MVC / Template Engine - v2.1.0 Released

2017-11-04 Thread bauss via Digitalmars-d-announce

On Friday, 3 November 2017 at 14:43:32 UTC, WebFreak001 wrote:

On Friday, 3 November 2017 at 14:16:53 UTC, bauss wrote:
On Thursday, 2 November 2017 at 22:55:04 UTC, WebFreak001 
wrote:

[...]


I don't normally use VS Code, so to create a template for it 
are there anything specific it must include?


And yeah I'll come up with some longer examples and tutorials, 
for now I've made a temporary website with a bit of 
documentation as well API docs.


https://diamondmvc.github.io/Diamond/


Cool, I will take a look at that website.

There aren't actually templates in vscode but my D plugin adds 
some for D projects, you can check the folder in here: 
https://github.com/Pure-D/code-d/tree/master/templates


Created a pull-request with empty templates for Diamond projects.


Re: Diamond MVC / Template Engine - v2.1.0 Released

2017-11-03 Thread bauss via Digitalmars-d-announce

On Thursday, 2 November 2017 at 22:55:04 UTC, WebFreak001 wrote:

On Thursday, 19 October 2017 at 23:29:57 UTC, bauss wrote:
I'm pleased to announce that I have just released Diamond 
2.1.0.


There has been a lot of updating to Diamond since last 
announced release.


[...]


Looks really useful, how about making a longer example and 
provide a template project? I could also include that template 
project in the code-d project creation dialog


I don't normally use VS Code, so to create a template for it are 
there anything specific it must include?


And yeah I'll come up with some longer examples and tutorials, 
for now I've made a temporary website with a bit of documentation 
as well API docs.


https://diamondmvc.github.io/Diamond/


Re: Diamond MVC / Template Engine - v2.1.0 Released

2017-10-28 Thread bauss via Digitalmars-d-announce

On Saturday, 28 October 2017 at 13:01:56 UTC, Kapps wrote:
This looks very cool. I already ended up doing my more recent 
project in C# partially due to wanting ASP.NET MVC and Entity 
Framework, but this would have been a really nice replacement 
to ASP.NET MVC.


Yeah, it has been inspired by ASP.NET a lot and have a partial 
ORM implemented as a separate package that integrates pretty well 
with it.


Re: Diamond MVC / Template Engine - v2.1.0 Released

2017-10-25 Thread bauss via Digitalmars-d-announce

On Thursday, 19 October 2017 at 23:29:57 UTC, bauss wrote:

I'm pleased to announce that I have just released Diamond 2.1.0.

There has been a lot of updating to Diamond since last 
announced release.


Diamond has also moved repository from my personal Github to an 
organization Github.


The reason for that change is because I've started a couple 
side projects for a tool-chain that can be used with Diamond.


The organization repository can be found here: 
https://github.com/DiamondMVC


2.1.0 is not backward compatible with the versions released at 
the personal repository.


Here are some of the changes:

* Diamond now has its own organization repository
* Controller actions can be mapped by attributes (@HttpDefault, 
@HttpMandatory, @HttpAction)
* Controllers do no longer require their type to be passed as a 
template parameter to the base-controller class
* Views support sections (See: 
https://github.com/DiamondMVC/Diamond/wiki/Syntax-Reference#sections)
* Views and web configurations have been split into separate 
files
* Default headers can be set for different types of requests 
(Unlike in the legacy version of Diamond where there were only 
one type.) -- These types include gneeral, static files, errors 
and not found (404)
* Better construct to control application type (module: 
diamond.core.apptype -- isWeb, isWebServer, isWebApi; all of 
them are booleans that can be used at compile-time with static 
if, instead of the old construct of using version. This works 
better because they're conditional, unlike versions)
* Allows you to bind to multiple ips and ports, unlike the 
legacy version that only allowed one port for many ip addresses.
* Renames of some members such as request -> httpRequest, 
response -> httpResponse
* A routing class has been added to easier access routing data 
for requests (module: diamond.http.route)

* Most of the compile-time engine has been rewritten.
* A lot of bugs has been fixed, code is better structured etc.

For the latest release see:
http://code.dlang.org/packages/diamond

For the github repository see:
https://github.com/DiamondMVC/Diamond

To see what's upcoming see:
https://github.com/DiamondMVC/Diamond/wiki/Upcoming-Features

Thank you, that's all!


Even though it has only been 5 days since 2.1.0 has been 
announced, I am pleased to announce 2.4.0 now. I have spend the 
past days working almost 24/7 to improve Diamond and make it as 
close to a usable framework as it can get.


Everything that has been implemented between 2.1.0 and 2.4.0:

* Extension support (Extensions can be in form of local 
repositories or repositories that Dub can fetch.)

* Authentication (Can be used with or without the ACL)
* Cookies / Sessions
* ACL (Access Control List)
* CSRF Protection
* RESTFul / Type-secure routing
* Controllers in web-apis can have multiple routes
* Base-view can be passed to a view's controller
* Layout views can be changed dynamically
* Caching for expensive views
* Network restrictions

The wiki and template projects will be updated accordingly to the 
latest version of Diamond.


Thank you!


Diamond MVC / Template Engine - v2.1.0 Released

2017-10-19 Thread bauss via Digitalmars-d-announce

I'm pleased to announce that I have just released Diamond 2.1.0.

There has been a lot of updating to Diamond since last announced 
release.


Diamond has also moved repository from my personal Github to an 
organization Github.


The reason for that change is because I've started a couple side 
projects for a tool-chain that can be used with Diamond.


The organization repository can be found here: 
https://github.com/DiamondMVC


2.1.0 is not backward compatible with the versions released at 
the personal repository.


Here are some of the changes:

* Diamond now has its own organization repository
* Controller actions can be mapped by attributes (@HttpDefault, 
@HttpMandatory, @HttpAction)
* Controllers do no longer require their type to be passed as a 
template parameter to the base-controller class
* Views support sections (See: 
https://github.com/DiamondMVC/Diamond/wiki/Syntax-Reference#sections)

* Views and web configurations have been split into separate files
* Default headers can be set for different types of requests 
(Unlike in the legacy version of Diamond where there were only 
one type.) -- These types include gneeral, static files, errors 
and not found (404)
* Better construct to control application type (module: 
diamond.core.apptype -- isWeb, isWebServer, isWebApi; all of them 
are booleans that can be used at compile-time with static if, 
instead of the old construct of using version. This works better 
because they're conditional, unlike versions)
* Allows you to bind to multiple ips and ports, unlike the legacy 
version that only allowed one port for many ip addresses.
* Renames of some members such as request -> httpRequest, 
response -> httpResponse
* A routing class has been added to easier access routing data 
for requests (module: diamond.http.route)

* Most of the compile-time engine has been rewritten.
* A lot of bugs has been fixed, code is better structured etc.

For the latest release see:
http://code.dlang.org/packages/diamond

For the github repository see:
https://github.com/DiamondMVC/Diamond

To see what's upcoming see:
https://github.com/DiamondMVC/Diamond/wiki/Upcoming-Features

Thank you, that's all!


Re: Diamond MVC / Template Engine - v2.0.4 Released

2017-10-13 Thread bauss via Digitalmars-d-announce

On Friday, 13 October 2017 at 07:23:03 UTC, bauss wrote:

On Friday, 13 October 2017 at 07:16:14 UTC, bauss wrote:
So I finally got around having time in my life to work with 
Diamond, which also meant fixing a few things in it, such as 
making it compatible with the latest version of DMD.


Version 2.0.4 includes the following additions:



I apologize; it's supposed to be version 0.2.4


I noticed a mistake again that I did with previous version 
"0.2.32" of course it wouldn't make "0.2.4" latest version, 
because 32 is above 4.


So I have updated the version to 0.3.0, which I probably should 
have made it originally.


Re: Diamond MVC / Template Engine - v2.0.4 Released

2017-10-13 Thread bauss via Digitalmars-d-announce

On Friday, 13 October 2017 at 07:16:14 UTC, bauss wrote:
So I finally got around having time in my life to work with 
Diamond, which also meant fixing a few things in it, such as 
making it compatible with the latest version of DMD.


Version 2.0.4 includes the following additions:



I apologize; it's supposed to be version 0.2.4


Diamond MVC / Template Engine - v2.0.4 Released

2017-10-13 Thread bauss via Digitalmars-d-announce
So I finally got around having time in my life to work with 
Diamond, which also meant fixing a few things in it, such as 
making it compatible with the latest version of DMD.


Version 2.0.4 includes the following additions:

* Support for escaped expressions using @$=expression;
* Compiles with latest version of DMD (Fixed an issue with 
compile-time AA's)
* New view functionality for rendering (View the wiki for more 
information.)
* Redirection functionality for controllers (View the wiki for 
more information.)


Github: https://github.com/bausshf/Diamond
Dub: https://code.dlang.org/packages/diamond (Currently waiting 
for the registry to update, so manual fetches from Github are 
required until the registry updates to 2.0.4 -- been waiting the 
past 2 hours or so and it seems like the registry has some issues 
atm. so hopefully that's fixed soon.)


Previous releases can be found here:
https://github.com/bausshf/Diamond/releases

-- To people who hasn't seen this project before --

What is Diamond?

Diamond is a MVC / Template library written in Diamond. It was 
written originally as an alternative to the Diet templates in 
vibe.d, but now its functonality and capabilities are far beyond 
templating only.


What does Diamond depend on?

Diamond can be used stand-alone without depending on any 
third-party libraries, other than the standard library Phobos. It 
has 3 types of usage, websites and webservices, where it's used 
on-top of vibe.d and as a stand-alone mvc/template library.


What is the dependency to vibe.d?

Diamond was originally written to be used in a hobby project as 
an alternative syntax to the "standard" diet templates. Thus it 
was originally build on-top vibe.d as a pure website template. It 
has now evolved to be able to run stand-alone however.


What syntax does Diamond use?

Diamond is heavily inspired by the ASP.NET razor syntax, but 
still differs a lot from it. You can read more about that in the 
wiki under Syntax Reference or the comparison with ASP.NET Razor


What advantages does Diamond have over Diet?

It let's you control the markup entirely, can be integrated with 
any-type of D code, not limited to vibe.d and can be used as 
standard template library for any type of project such as email 
templates etc. It also allows for special rendering, easy 
controller implementations and management of request data, 
response etc.


Re: DCD 0.9.0 released

2017-07-06 Thread bauss via Digitalmars-d-announce
On Monday, 3 July 2017 at 08:30:52 UTC, Basile@dlang-community 
wrote:
I'm glad to announce that the dlang-community has released DCD 
0.9.0[1]


[...]


Is there a way to set this up with atom?


Re: D IDE - Coedit 3 first beta

2016-11-27 Thread Bauss via Digitalmars-d-announce

On Tuesday, 22 November 2016 at 23:38:53 UTC, Basile B. wrote:
- Changelog: 
https://gist.github.com/BBasile/5dfb21fd6bd5848922867633eb4136f5
- Github release page: 
https://github.com/BBasile/Coedit/releases/tag/3_beta_1


Note that this announce is short on purpose. It's a 
pre-release, however I've build the usual binaries, see second 
link.


You want to test, you see something not quite right ? The only 
way to get it handled is: 
https://github.com/BBasile/Coedit/issues


a+++


Is themes still based on the theme of your OS or can you choose 
themes yourself? I remember asking this question a long time ago 
in regards to getting a dark theme, but back then it was based on 
whether your OS was a dark theme or not.


Just curious.


Re: New user, even she does not know yet

2016-09-30 Thread Bauss via Digitalmars-d-announce

On Monday, 26 September 2016 at 12:06:58 UTC, Daniel Kozak wrote:

https://onedrive.live.com/?authkey=!AEQ5lsngH-Oe3DA&id=87E57DF7155C89C9!24197&cid=87E57DF7155C89C9


Congratulations


Re: DlangUI 0.9.0: Console backend added

2016-09-13 Thread Bauss via Digitalmars-d-announce

On Friday, 9 September 2016 at 11:21:07 UTC, Vadim Lopatin wrote:

Some screenshots (from dlangui example1 app):

  http://i63.tinypic.com/2wn1bg9.png
  http://i66.tinypic.com/142yctx.png
  http://i64.tinypic.com/snlc08.png
  http://i64.tinypic.com/2n16vcw.png



Good job, but why do people still use tinypic in 2016, when 
things like imgur exist that are a 1000 times faster to use, no 
dirty ads and images won't magically be taken down someday.


Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Bauss via Digitalmars-d-announce

On Tuesday, 28 June 2016 at 03:58:23 UTC, Jay Norwood wrote:

On Tuesday, 28 June 2016 at 03:11:26 UTC, Jay Norwood wrote:

On Tuesday, 28 June 2016 at 01:53:22 UTC, deadalnix wrote:
If we were in interview, I'd ask you "what does this returns 
if you pass it an empty string ?"


oops.  I see ... need to test for empty string.

nothrow pure size_t strlen2(const(char)* c) {
  if (c is null || *c==0)
 return 0;
  const(char)* c_save = c;
  while (*c){ c+=4; }
  while (*c==0){ c--; }
  c++;
  return c - c_save;
}


Why not just do

nothrow pure size_t strlen2(const(char)* c) {
  if (!c)
return 0;

  ...
}


Re: Facebook is using D in production starting today

2016-06-04 Thread Bauss via Digitalmars-d-announce

On Saturday, 4 June 2016 at 00:41:33 UTC, Meta wrote:
On Friday, 11 October 2013 at 00:36:12 UTC, Andrei Alexandrescu 
wrote:
Today I committed the first 5112 lines of D code to Facebook's 
repository. The project is in heavy daily use at Facebook. 
Compared to the original version (written in C++) we've 
measured massive wins in all of source code size, build speed, 
and running speed.


In all likelihood we'll follow up with a blog post describing 
the process.



Andrei


Since this thread has been brought back to life anyway, does 
anyone know if Facebook is still using D now that Andrei has 
left?


Most likely, I mean why would they start to discard it?


Re: PowerNex - New release of my D kernel

2016-05-31 Thread Bauss via Digitalmars-d-announce

On Sunday, 29 May 2016 at 23:15:13 UTC, Wild wrote:

Hey!

I have new release of my D kernel called PowerNex.
This release should be a bit more interesting than the last one 
that I release back in November 2015.


This one contains a working memory manager, a custom TTY 
renderer, BMP image renderer, a VFS, etc.

More information is in the Github release.

https://github.com/Vild/PowerNex/releases/tag/v0.1.0-ALPHA
The Github release also have a precompiled ISO.

The project is fully open source and located at 
https://github.com/Vild/PowerNex under the MPLv2 license.


Hopefully someone will find this interesting.
All feedback is appreciated.

-Dan


This is really amazing!


Re: IDE - Coedit 2, update 6 released

2016-05-28 Thread Bauss via Digitalmars-d-announce

On Saturday, 28 May 2016 at 21:55:58 UTC, Basile B. wrote:

On Saturday, 28 May 2016 at 20:39:18 UTC, Bauss wrote:
So there's no way to do it through the editor? Like I don't 
use a dark theme in my OS, but I do like my editors to be dark.


I confirm. Dark theme only available if the OS widget set has 
one.


That's a shame, damn. May I suggest some proper theme 
configuration that isn't bound to OS then?


Re: IDE - Coedit 2, update 6 released

2016-05-28 Thread Bauss via Digitalmars-d-announce

On Saturday, 28 May 2016 at 13:08:55 UTC, Basile B. wrote:

On Friday, 27 May 2016 at 17:49:18 UTC, Bauss wrote:

On Thursday, 26 May 2016 at 23:44:21 UTC, Basile B. wrote:
Mostly because an important feature of the library manager 
was not compatible with DUB > v0.9.24. Otherwise almost 
nothing.


See https://github.com/BBasile/Coedit/releases/tag/2_update_6 
for the changelog and the binaries.


Is there anyway to get dark theme?


If the native UI of the operating system has a dark theme then 
Coedit will have a dark theme too. You just have to adjust the 
highlighter attributes, like here:


http://imgur.com/sKCB1Vz


So there's no way to do it through the editor? Like I don't use a 
dark theme in my OS, but I do like my editors to be dark.


Re: IDE - Coedit 2, update 6 released

2016-05-27 Thread Bauss via Digitalmars-d-announce

On Thursday, 26 May 2016 at 23:44:21 UTC, Basile B. wrote:
Mostly because an important feature of the library manager was 
not compatible with DUB > v0.9.24. Otherwise almost nothing.


See https://github.com/BBasile/Coedit/releases/tag/2_update_6 
for the changelog and the binaries.


Is there anyway to get dark theme?


Re: Diamond - MVC / Template engine

2016-05-25 Thread Bauss via Digitalmars-d-announce

On Wednesday, 25 May 2016 at 12:29:03 UTC, Kagamin wrote:

On Tuesday, 24 May 2016 at 14:57:03 UTC, Bauss wrote:
Note: If you have a better suggestion, feel free to come with 
one :)


I'd say do what razor does: raw output should require extra 
syntax. Weren't templates created in order to not build html in 
code?


So you suggest to switch them around? :)

@=value; will become encoded and @$=value; will become raw?

That could work out.


Re: Sociomantic's short DConf2016 video

2016-05-24 Thread Bauss via Digitalmars-d-announce

On Tuesday, 24 May 2016 at 11:06:45 UTC, Leandro Lucarella wrote:
For the ones that missed it (and the ones that didn't too), 
here is a short video about the conference.


https://vimeo.com/167235872


Looks amazing. I hope, I can get to join the next one! :)


Re: Diamond - MVC / Template engine

2016-05-24 Thread Bauss via Digitalmars-d-announce

On Tuesday, 24 May 2016 at 15:03:28 UTC, Bauss wrote:

On Tuesday, 24 May 2016 at 15:00:34 UTC, Bauss wrote:

On Tuesday, 24 May 2016 at 14:57:03 UTC, Bauss wrote:

On Tuesday, 24 May 2016 at 14:54:27 UTC, Bauss wrote:

On Tuesday, 24 May 2016 at 13:09:28 UTC, Kagamin wrote:

The values are injected unescaped by default?


Yes. To escape there is the escape function.

Take a look at the comparison for the result.

I'm going to figure out a syntax for escaping though, so 
there'll be one for both.


Not sure what symbols to use though. @$=value_to_escape; is 
probably going to be the result.


Note: If you have a better suggestion, feel free to come with 
one :)


No wait I forgot it already is possible.

Using @(value_to_escape)


I am such a mess today and also wish there was an edit button 
for forum posts.


@(value_to_escape) will only escape text and not variables, so 
a syntax for an expression/variable is still up. I will go with 
the @$= syntax for now


A commit has now been done with escaping for variables / 
expressions.


Can be seen here:
https://github.com/bausshf/Diamond/commit/e082d63d2a351a9e57cfc7f8bee8182711919759

It'll come in version 0.2.4


Re: Diamond - MVC / Template engine

2016-05-24 Thread Bauss via Digitalmars-d-announce

On Tuesday, 24 May 2016 at 15:00:34 UTC, Bauss wrote:

On Tuesday, 24 May 2016 at 14:57:03 UTC, Bauss wrote:

On Tuesday, 24 May 2016 at 14:54:27 UTC, Bauss wrote:

On Tuesday, 24 May 2016 at 13:09:28 UTC, Kagamin wrote:

The values are injected unescaped by default?


Yes. To escape there is the escape function.

Take a look at the comparison for the result.

I'm going to figure out a syntax for escaping though, so 
there'll be one for both.


Not sure what symbols to use though. @$=value_to_escape; is 
probably going to be the result.


Note: If you have a better suggestion, feel free to come with 
one :)


No wait I forgot it already is possible.

Using @(value_to_escape)


I am such a mess today and also wish there was an edit button for 
forum posts.


@(value_to_escape) will only escape text and not variables, so a 
syntax for an expression/variable is still up. I will go with the 
@$= syntax for now


Re: Diamond - MVC / Template engine

2016-05-24 Thread Bauss via Digitalmars-d-announce

On Tuesday, 24 May 2016 at 14:57:03 UTC, Bauss wrote:

On Tuesday, 24 May 2016 at 14:54:27 UTC, Bauss wrote:

On Tuesday, 24 May 2016 at 13:09:28 UTC, Kagamin wrote:

The values are injected unescaped by default?


Yes. To escape there is the escape function.

Take a look at the comparison for the result.

I'm going to figure out a syntax for escaping though, so 
there'll be one for both.


Not sure what symbols to use though. @$=value_to_escape; is 
probably going to be the result.


Note: If you have a better suggestion, feel free to come with 
one :)


No wait I forgot it already is possible.

Using @(value_to_escape)


<    1   2   3   >