Re: vibe.d and my first web service

2020-11-29 Thread James Blachly via Digitalmars-d-learn

On 11/27/20 12:05 PM, Steven Schveighoffer wrote:


FYI, this bug was just fixed (eventcore version 0.9.11). I tested it and 
it works.


Thanks Sönke for fixing this!

-Steve

https://github.com/vibe-d/vibe-core/issues/205


Hooray and congrats to Soenke and team!


Re: vibe.d and my first web service

2020-11-27 Thread Steven Schveighoffer via Digitalmars-d-learn

On 8/12/20 9:46 AM, James Blachly wrote:

On 7/18/20 8:16 AM, Andre Pany wrote:

On Saturday, 18 July 2020 at 09:10:04 UTC, Mr. Backup wrote:

 >> ...
I started the program with "dub" command and everything worked as I 
expected. Except that there were a lot "deprecation" warnings and 
long time to compile.But when I exit the service by ctrl + c and 
start again the program cannot start again with error message:

...


I assume you are using vibe.d 0.8.4 or older. Please check whether 
adding this to dub.json solves your problem:


​"versions": [ "VibeHighEventPriority" ]

(Restart your pc)

Vibe.d 0.9 0 will be released soon. I hope it will work out of the box 
there.


Unfortunately the problem still occurs with Vibe.d 0.9.0

IMO **this is the single most important problem to fix** for vibe.d -- 
if the most basic of examples (indeed, supplied by dub itself) fails so 
spectacularly, the casual new user will not spend the time to find out 
why this is happening, but instead move on. The ctrl-C non-termination 
bug has existed since at least 2015 from what I can tell from the forums.


Tangent:

Does Sönke have a Patreon or the project an OpenCollective etc. ? I 
would be willing to support fixing of some of these bugs.


Alternatively, could we vote on whether a web framework is worthy of 
foundation support? Having an ergonomic, workable web framework is 
absolutely essential to surviving as a language in 2020 (notable 
exception being 800# gorilla incumbents C/C++).


FYI, this bug was just fixed (eventcore version 0.9.11). I tested it and 
it works.


Thanks Sönke for fixing this!

-Steve

https://github.com/vibe-d/vibe-core/issues/205


Re: vibe.d and my first web service

2020-08-23 Thread Pierce Ng via Digitalmars-d-learn

On Sunday, 23 August 2020 at 09:56:25 UTC, Andre Pany wrote:
Please have a look at the end of this site: 
https://d-land.sepany.de/tutorials/cloud/sichere-docker-images-fuer-cloud-anwendungen-erstellen/
It describes how to build really small vibed applications on 
Alpine by using docker scratch image.


Also it is possible to cache the dub package builds, but i am 
writing from my mobile and have currently no example: you copy 
dub.json / dub.selections.json first into your docker image. 
Dub.json contains a configuration with name e.g. "prebuild" and 
as far as I remember targetType "None". You execute dub build 
with this configuration and after that you copy all source code 
files into your docker image and build the complete application.

This will give you a lot faster docker builds.



Thank you, Andre. I'll try these.




Re: vibe.d and my first web service

2020-08-23 Thread Andre Pany via Digitalmars-d-learn

On Sunday, 23 August 2020 at 06:41:03 UTC, Pierce Ng wrote:

On Thursday, 20 August 2020 at 18:13:46 UTC, ddcovery wrote:

[...]


Recently I too started to look at web frameworks for compiled 
languages. Currently playing with Free Pascal - fast compiler, 
several web frameworks to evaluate, and Object Pascal is easy 
to pick up. At the same time I checked out D and Vibe, and was 
put off by the control-c thing.


[...]


Please have a look at the end of this site: 
https://d-land.sepany.de/tutorials/cloud/sichere-docker-images-fuer-cloud-anwendungen-erstellen/
It describes how to build really small vibed applications on 
Alpine by using docker scratch image.


Also it is possible to cache the dub package builds, but i am 
writing from my mobile and have currently no example: you copy 
dub.json / dub.selections.json first into your docker image. 
Dub.json contains a configuration with name e.g. "prebuild" and 
as far as I remember targetType "None". You execute dub build 
with this configuration and after that you copy all source code 
files into your docker image and build the complete application.

This will give you a lot faster docker builds.

Kind regards
Andre


Re: vibe.d and my first web service

2020-08-22 Thread Pierce Ng via Digitalmars-d-learn

On Thursday, 20 August 2020 at 18:13:46 UTC, ddcovery wrote:
Last month I decided it was time to start a new project (my own 
company) and I reviewed some languages/frameworks for web 
development (REST services, image processing, PDF generation, 
...):  Java based ones (I'm experienced with 
scala/playframework and spring/java, and Kotlin is really 
nice), c# and Net core, Node/Typescript (Last 6 years I have 
been mainly a node backend developer) and,  finally, native 
ones (GO, Rust and D... I developed some windows apps in 90's 
using Symantec C++ but 20 years are a really long time).

[...]
Finally I'm using Rust (with Rocket and Diesel):  it's my money 
folks :).


Recently I too started to look at web frameworks for compiled 
languages. Currently playing with Free Pascal - fast compiler, 
several web frameworks to evaluate, and Object Pascal is easy to 
pick up. At the same time I checked out D and Vibe, and was put 
off by the control-c thing.


I prefer to deploy my programs as Alpine Linux Docker containers. 
Good that D is already available for Alpine. For the hello world 
Vibe example, on my Ubuntu 20.04 laptop:


% ls -l helloworld.*
-rwxr-xr-x 3 pierce pierce 8664832 Aug 23 14:04 helloworld.dmd*
-rwxr-xr-x 3 pierce pierce 2858944 Aug 23 14:04 helloworld.ldc*

The Docker images created by multistage builds:

% sudo docker images | egrep hellow
helloworldldc   86be595038026 hours 
ago 114MB
helloworlddmd   d377c0ab97ec6 hours 
ago 19.6MB


Is the huge size difference to be expected?

For both DMD and LDC, the Docker image building process took 
long. Does the following mean that everything was downloaded and 
built each time? Possible to structure the Dockerfile so that 
some bits get cached, as per "the Docker way"? (For Free Pascal, 
executables built on Ubuntu run on Alpine as is with the 
libc6-compat package, so building Docker images is really fast 
since it just involves copying a few files and reuses some cached 
Docker layers.)


 ---> Running in a95e6ef7a8c1
Fetching vibe-core 1.9.3 (getting selected version)...
Fetching botan-math 1.0.3 (getting selected version)...
Fetching taggedalgebraic 0.11.16 (getting selected version)...
Fetching vibe-d 0.9.0 (getting selected version)...
Fetching memutils 1.0.4 (getting selected version)...
Fetching stdx-allocator 2.77.5 (getting selected version)...
Fetching botan 1.12.18 (getting selected version)...
Fetching diet-ng 1.7.2 (getting selected version)...
Fetching openssl 1.1.6+1.0.1g (getting selected version)...
Fetching eventcore 0.9.7 (getting selected version)...
Fetching mir-linux-kernel 1.0.1 (getting selected version)...
Fetching libasync 0.8.6 (getting selected version)...
Running pre-generate commands for vibe-d:tls...
Performing "release" build using ldc2 for x86_64.
taggedalgebraic 0.11.16: building configuration "library"...
eventcore 0.9.7: building configuration "epoll"...
stdx-allocator 2.77.5: building configuration "library"...
vibe-core 1.9.3: building configuration "epoll"...
vibe-d:utils 0.9.0: building configuration "library"...
vibe-d:data 0.9.0: building configuration "library"...
mir-linux-kernel 1.0.1: building configuration "library"...
vibe-d:crypto 0.9.0: building configuration "library"...
diet-ng 1.7.2: building configuration "library"...
vibe-d:stream 0.9.0: building configuration "library"...
vibe-d:textfilter 0.9.0: building configuration "library"...
vibe-d:inet 0.9.0: building configuration "library"...
vibe-d:tls 0.9.0: building configuration "openssl"...
vibe-d:http 0.9.0: building configuration "library"...
/usr/include/d/std/conv.d(4614,38): Deprecation: constructor 
`vibe.stream.wrapper.ProxyStream.this` is deprecated - Use 
createProxyStream instead.
/usr/include/d/std/conv.d(4618,21): Deprecation: constructor 
`vibe.stream.wrapper.ProxyStream.this` is deprecated - Use 
createProxyStream instead.
/usr/include/d/std/range/primitives.d(174,38): Deprecation: 
`alias byKeyValue this` is deprecated - Iterate over .byKeyValue 
instead.
/usr/include/d/std/range/primitives.d(176,27): Deprecation: 
`alias byKeyValue this` is deprecated - Iterate over .byKeyValue 
instead.
/usr/include/d/std/range/primitives.d(174,38): Deprecation: 
`alias byKeyValue this` is deprecated - Iterate over .byKeyValue 
instead.
/usr/include/d/std/range/primitives.d(176,27): Deprecation: 
`alias byKeyValue this` is deprecated - Iterate over .byKeyValue 
instead.

vibe-d:mail 0.9.0: building configuration "library"...
vibe-d:mongodb 0.9.0: building configuration "library"...
/usr/include/d/std/format.d(3645,26): Deprecation: function 
`std.typecons.Nullable!string.Nullable.get_` is deprecated - 
Implicit conversion with `alias Nullable.get this` will be 
removed after 2.096. Please use `.get` explicitly.
/usr/include/d/std/format.d(3645,26): Deprecation: function 
`std.typecons.Nullable!(Alternate).Nullable.get_` is deprecated - 
Implicit conversion with `alias Nu

Re: vibe.d and my first web service

2020-08-21 Thread aberba via Digitalmars-d-learn

On Friday, 21 August 2020 at 09:50:38 UTC, ddcovery wrote:

On Friday, 21 August 2020 at 08:48:34 UTC, ddcovery wrote:

On Thursday, 20 August 2020 at 21:36:04 UTC, Andre Pany wrote:

[...]

Thanks a lot Andre,

I opened immediately the issues to receive some feedback:

[...]


EDIT: 23 days ago new vibe.d (0.9.0) was released... Testing 
with it memory problem has disappeared!!!


+1 to vibe.d :-)


I'm glad you came around.


Re: vibe.d and my first web service

2020-08-21 Thread ddcovery via Digitalmars-d-learn

On Friday, 21 August 2020 at 08:48:34 UTC, ddcovery wrote:

On Thursday, 20 August 2020 at 21:36:04 UTC, Andre Pany wrote:

[...]

Thanks a lot Andre,

I opened immediately the issues to receive some feedback:

[...]


EDIT: 23 days ago new vibe.d (0.9.0) was released... Testing with 
it memory problem has disappeared!!!


+1 to vibe.d :-)


Re: vibe.d and my first web service

2020-08-21 Thread ddcovery via Digitalmars-d-learn

On Thursday, 20 August 2020 at 21:36:04 UTC, Andre Pany wrote:

On Thursday, 20 August 2020 at 18:13:46 UTC, ddcovery wrote:

On Monday, 17 August 2020 at 15:45:05 UTC, aberba wrote:

[...]


After 18 years following DLang, and some disagrees about 
productivity lacks at the beggining (no IDE, Debugging?, an 
standard library battle, not a good database connection 
library, missing web framework) and Walter adding more and 
more compiler functionalities (all of them nice ones) I 
decided to forget DLang for a time (C# covered my needs really 
well).


Last month I decided it was time to start a new project (my 
own company) and I reviewed some languages/frameworks for web 
development (REST services, image processing, PDF generation, 
...):  Java based ones (I'm experienced with 
scala/playframework and spring/java, and Kotlin is really 
nice), c# and Net core, Node/Typescript (Last 6 years I have 
been mainly a node backend developer) and,  finally, native 
ones (GO, Rust and D... I developed some windows apps in 90's 
using Symantec C++ but 20 years are a really long time).


I really wanted to give D an opportunity: lets go with vibe.d

I tested vibe.d on my ubuntu 20.04 and SURPRISE: the hello 
world project began to eat all my machine memory (just 
requesting with Firefox and CTRL+F5 pressed continuosly).  
Using an HAPROXY between calls and backend memory problems 
disappeared.


Process doesn't stop properly after CTRL+C... but I decided 
not to be so demanding.


I discovered hunt-framework (with a fantastic ORM 
implementation) and my eyes shinned. I tried an example 
project. Like vibe.d, I began to perform requests with Firefox 
and CTRL+F5 pressed and application stopped immediately 
(yesterday I discovered it is a SIGPIPE unmanaged signal that 
stops the process).  I'm quite sure if I use HAPROXY to 
intermediate between requests and backend, the problem will 
disappear, but I don't want to perform this test, because I 
decided not to use hunt-framework neither.


Finally I'm using Rust (with Rocket and Diesel):  it's my 
money folks :).


Sorry for this not constructive post.

DLang needs to bright in some market niche to attract 
developers and to solve the actual most demanded needs:  a lot 
of developers, like me, expect a good/robust framework for 
backend development (web/rest/microservices/data processing) 
and a de-facto standard library for Database integration.


In my opinion, "hunt-framework" (or similar) should be one of 
the central projects of DLang next years (like vibe.d in the 
past) with a really impressive documentation (English, 
please!!!) demonstrating how robust, performant and expressive 
D lang is.


Actually your feedback is very constructive, thanks a lot. The 
ctrl+c issue can be solved with a work around, by adding the 
version "VibeHighEventPriority".


I have only a very small vibed backend application (websockset) 
and never noticed the memory issue. Also another forum user 
which has a quite large web application in productive use 
didn't mentioned this issue.


Could I ask you to open a github issue for vibe-d describing 
your findings regarding the memory issue?
As far as I remember the GC does not immediately runs, but only 
at a certain limit. Maybe your memory issue isn't really an 
issue but the desired behavior. (Not an expert here, just what 
I remember).


Kind regards
Andre

Thanks a lot Andre,

I opened immediately the issues to receive some feedback:

In vibe.d
https://github.com/vibe-d/vibe.d/issues/2459

In hunt-framework
https://github.com/huntlabs/hunt-framework/issues/161

With vibe.d case, memory is never recalled.

Problems disappear in vibe.d when I introduce an intermediate 
HAPROXY... this gave me an idea about the origin of the problem:  
Local pipe closed by destination (that haproxy manages nicely)


Linux man page about write and EPIPE: 
https://linux.die.net/man/2/write

EPIPE
   fd is connected to a pipe or socket whose reading end is 
closed. When this happens
   the writing process will also receive a SIGPIPE signal. 
(Thus, the write return
   value is seen only if the program catches, blocks or ignores 
this signal.)


I have to recognize I learned this last days (I am not a native 
linux developer, but I began to recall my past knowledge about it 
:-)


The main reason I have dropped the 2 frameworks for my new 
project:


* Entry "ready for use" projects simple examples must work (I 
can't be confident that projects based on them will be stable on 
production if basic projects fail in development)




Re: vibe.d and my first web service

2020-08-20 Thread Andre Pany via Digitalmars-d-learn

On Thursday, 20 August 2020 at 18:13:46 UTC, ddcovery wrote:

On Monday, 17 August 2020 at 15:45:05 UTC, aberba wrote:

[...]


After 18 years following DLang, and some disagrees about 
productivity lacks at the beggining (no IDE, Debugging?, an 
standard library battle, not a good database connection 
library, missing web framework) and Walter adding more and more 
compiler functionalities (all of them nice ones) I decided to 
forget DLang for a time (C# covered my needs really well).


Last month I decided it was time to start a new project (my own 
company) and I reviewed some languages/frameworks for web 
development (REST services, image processing, PDF generation, 
...):  Java based ones (I'm experienced with 
scala/playframework and spring/java, and Kotlin is really 
nice), c# and Net core, Node/Typescript (Last 6 years I have 
been mainly a node backend developer) and,  finally, native 
ones (GO, Rust and D... I developed some windows apps in 90's 
using Symantec C++ but 20 years are a really long time).


I really wanted to give D an opportunity: lets go with vibe.d

I tested vibe.d on my ubuntu 20.04 and SURPRISE: the hello 
world project began to eat all my machine memory (just 
requesting with Firefox and CTRL+F5 pressed continuosly).  
Using an HAPROXY between calls and backend memory problems 
disappeared.


Process doesn't stop properly after CTRL+C... but I decided not 
to be so demanding.


I discovered hunt-framework (with a fantastic ORM 
implementation) and my eyes shinned. I tried an example 
project. Like vibe.d, I began to perform requests with Firefox 
and CTRL+F5 pressed and application stopped immediately 
(yesterday I discovered it is a SIGPIPE unmanaged signal that 
stops the process).  I'm quite sure if I use HAPROXY to 
intermediate between requests and backend, the problem will 
disappear, but I don't want to perform this test, because I 
decided not to use hunt-framework neither.


Finally I'm using Rust (with Rocket and Diesel):  it's my money 
folks :).


Sorry for this not constructive post.

DLang needs to bright in some market niche to attract 
developers and to solve the actual most demanded needs:  a lot 
of developers, like me, expect a good/robust framework for 
backend development (web/rest/microservices/data processing) 
and a de-facto standard library for Database integration.


In my opinion, "hunt-framework" (or similar) should be one of 
the central projects of DLang next years (like vibe.d in the 
past) with a really impressive documentation (English, 
please!!!) demonstrating how robust, performant and expressive 
D lang is.


Actually your feedback is very constructive, thanks a lot. The 
ctrl+c issue can be solved with a work around, by adding the 
version "VibeHighEventPriority".


I have only a very small vibed backend application (websockset) 
and never noticed the memory issue. Also another forum user which 
has a quite large web application in productive use didn't 
mentioned this issue.


Could I ask you to open a github issue for vibe-d describing your 
findings regarding the memory issue?
As far as I remember the GC does not immediately runs, but only 
at a certain limit. Maybe your memory issue isn't really an issue 
but the desired behavior. (Not an expert here, just what I 
remember).


Kind regards
Andre


Re: vibe.d and my first web service

2020-08-20 Thread ddcovery via Digitalmars-d-learn
"After 18 years following DLang," its not well expressed...may be 
"at first Dlang stages, after  2 years following its evolution, 
and ..."


Re: vibe.d and my first web service

2020-08-20 Thread ddcovery via Digitalmars-d-learn

On Monday, 17 August 2020 at 15:45:05 UTC, aberba wrote:

On Thursday, 13 August 2020 at 09:54:06 UTC, Mr. Backup wrote:
On Wednesday, 12 August 2020 at 13:46:06 UTC, James Blachly 
wrote:


Unfortunately the problem still occurs with Vibe.d 0.9.0

IMO **this is the single most important problem to fix** for 
vibe.d -- if the most basic of examples (indeed, supplied by 
dub itself) fails so spectacularly, the casual new user will 
not spend the time to find out why this is happening, but 
instead move on. The ctrl-C non-termination bug has existed 
since at least 2015 from what I can tell from the forums.




As a casual new novice, I really like dlang as such, and I 
think it should be the most widespread and popular language in 
the world. And as soon as I came across it, I wanted to use it 
in my project. But it has many packages for the same things, 
but these packages are unfinished. Everyone creates their own. 
You start comparing them and don't know what to choose for 
your job and then you find out that you should have chosen 
another and then find out that you should have written it 
yourself. And then I finally done it in golang in a while. I 
think the dlang community should focus on creating a quality 
standard library.


We live in the 21st century where there are web technologies 
everywhere around us, so I think that the http package should 
be part of a standard library.



It takes time. I was comparing packages available in D compared 
to say nodejs which I've been using for a while.


Very few important ones are missing. The others too lack some 
documentation. Other than that, you get pretty much what you 
need. Except cloud sdks.


also using vibe.d has some missing pieces on how to do certain 
things... that I agree we Users need to do writing about them.


You're also right that people keep rolling their own 
implementations. Most people here are really good and can roll 
their own so its quite tempting...plus reading someone's code 
and implementation can be a lil...sometimes. except rolling 
your own means it'll be half baked and undocumented.


Also I suspect lot of community members primary don't do web 
stuff primarily.


If you ask me, I'll say vibe.d is the most solid and feature 
complete web framework at the moment...code, docs, libraries. 
It's not perfect but its never been a blocker. That's if you 
know your way around it. Sonke is a pretty cool guy.


Will be nice if he had a GitHub sponsor or something for vibe.d

Hunt framework is also your laravel D alternative.


After 18 years following DLang, and some disagrees about 
productivity lacks at the beggining (no IDE, Debugging?, an 
standard library battle, not a good database connection library, 
missing web framework) and Walter adding more and more compiler 
functionalities (all of them nice ones) I decided to forget DLang 
for a time (C# covered my needs really well).


Last month I decided it was time to start a new project (my own 
company) and I reviewed some languages/frameworks for web 
development (REST services, image processing, PDF generation, 
...):  Java based ones (I'm experienced with scala/playframework 
and spring/java, and Kotlin is really nice), c# and Net core, 
Node/Typescript (Last 6 years I have been mainly a node backend 
developer) and,  finally, native ones (GO, Rust and D... I 
developed some windows apps in 90's using Symantec C++ but 20 
years are a really long time).


I really wanted to give D an opportunity: lets go with vibe.d

I tested vibe.d on my ubuntu 20.04 and SURPRISE: the hello world 
project began to eat all my machine memory (just requesting with 
Firefox and CTRL+F5 pressed continuosly).  Using an HAPROXY 
between calls and backend memory problems disappeared.


Process doesn't stop properly after CTRL+C... but I decided not 
to be so demanding.


I discovered hunt-framework (with a fantastic ORM implementation) 
and my eyes shinned. I tried an example project. Like vibe.d, I 
began to perform requests with Firefox and CTRL+F5 pressed and 
application stopped immediately (yesterday I discovered it is a 
SIGPIPE unmanaged signal that stops the process).  I'm quite sure 
if I use HAPROXY to intermediate between requests and backend, 
the problem will disappear, but I don't want to perform this 
test, because I decided not to use hunt-framework neither.


Finally I'm using Rust (with Rocket and Diesel):  it's my money 
folks :).


Sorry for this not constructive post.

DLang needs to bright in some market niche to attract developers 
and to solve the actual most demanded needs:  a lot of 
developers, like me, expect a good/robust framework for backend 
development (web/rest/microservices/data processing) and a 
de-facto standard library for Database integration.


In my opinion, "hunt-framework" (or similar) should be one of the 
central projects of DLang next years (like vibe.d in the past) 
with a really impressive documentation (English, please!!!) 
demonstrating how robust

Re: vibe.d and my first web service

2020-08-20 Thread Ben via Digitalmars-d-learn

On Thursday, 13 August 2020 at 09:54:06 UTC, Mr. Backup wrote:
And as soon as I came across it, I wanted to use it in my 
project. But it has many packages for the same things, but 
these packages are unfinished. Everyone creates their own. You 
start comparing them and don't know what to choose for your job 
and then you find out that you should have chosen another and 
then find out that you should have written it yourself. And 
then I finally done it in golang in a while. I think the dlang 
community should focus on creating a quality standard library.


We live in the 21st century where there are web technologies 
everywhere around us, so I think that the http package should 
be part of a standard library.


People have been pushing for that for years but the answer in D ( 
and some other languages ) always tend to be the same.


"We do not want to bloat the standard library". In reality it 
comes down to: "We do not want the responsibility of maintaining 
a lot more code".


So the buck gets pushed to the community and if its not a big 
community, you will see a of people starting projects. It works 
for them on their projects and then it get abandoned as they move 
to new languages or have no time.


If we look at Go or Crystal or ... a lot of the reason why people 
pick up those languages, boils down to "its easy to get some 
output". A few lines of code and it makes people feel successful 
and they move on to the next step and forward from their on. 
Growing more into the languages.


In D's case, we enjoy the constant Vibe.D warning hell ( when it 
did not break outright with specific D versions! ). That not only 
scares away people, it also makes development annoying when your 
constantly spammed with warnings and you can not see what is 
vibe.d's warnings and what is your code's warnings!


And vibe.d is on the front pages, as the prime example for people 
to try out D.

o_O

Anyway, its a dead argument, go back in time to see that same 
suggestion in 2017, 2015, 201... And people argued about it, 
people telling other "no" and new users kept enjoying the vibe.d 
issue train ( among other issues ) while leaving fast. And then 
people keep wondering why a lot of people do not stick around and 
run towards Go or other languages ... I wonder why D has 
popularity issues.


Re: vibe.d and my first web service

2020-08-17 Thread aberba via Digitalmars-d-learn

On Thursday, 13 August 2020 at 09:54:06 UTC, Mr. Backup wrote:
On Wednesday, 12 August 2020 at 13:46:06 UTC, James Blachly 
wrote:


Unfortunately the problem still occurs with Vibe.d 0.9.0

IMO **this is the single most important problem to fix** for 
vibe.d -- if the most basic of examples (indeed, supplied by 
dub itself) fails so spectacularly, the casual new user will 
not spend the time to find out why this is happening, but 
instead move on. The ctrl-C non-termination bug has existed 
since at least 2015 from what I can tell from the forums.




As a casual new novice, I really like dlang as such, and I 
think it should be the most widespread and popular language in 
the world. And as soon as I came across it, I wanted to use it 
in my project. But it has many packages for the same things, 
but these packages are unfinished. Everyone creates their own. 
You start comparing them and don't know what to choose for your 
job and then you find out that you should have chosen another 
and then find out that you should have written it yourself. And 
then I finally done it in golang in a while. I think the dlang 
community should focus on creating a quality standard library.


We live in the 21st century where there are web technologies 
everywhere around us, so I think that the http package should 
be part of a standard library.



It takes time. I was comparing packages available in D compared 
to say nodejs which I've been using for a while.


Very few important ones are missing. The others too lack some 
documentation. Other than that, you get pretty much what you 
need. Except cloud sdks.


also using vibe.d has some missing pieces on how to do certain 
things... that I agree we Users need to do writing about them.


You're also right that people keep rolling their own 
implementations. Most people here are really good and can roll 
their own so its quite tempting...plus reading someone's code and 
implementation can be a lil...sometimes. except rolling your own 
means it'll be half baked and undocumented.


Also I suspect lot of community members primary don't do web 
stuff primarily.


If you ask me, I'll say vibe.d is the most solid and feature 
complete web framework at the moment...code, docs, libraries. 
It's not perfect but its never been a blocker. That's if you know 
your way around it. Sonke is a pretty cool guy.


Will be nice if he had a GitHub sponsor or something for vibe.d

Hunt framework is also your laravel D alternative.






Re: vibe.d and my first web service

2020-08-13 Thread Steven Schveighoffer via Digitalmars-d-learn

On 8/13/20 3:28 AM, WebFreak001 wrote:

On Wednesday, 12 August 2020 at 21:11:54 UTC, Daniel Kozak wrote:

[...]

Unfortunately, I think vibe-d is dead. With every release it is worse 
than before and it seems there is almost no activity. So D really need 
new champion here maybe hunt will be next champion.


Can you give an example how vibe.d gets worse? It's really stable right 
now and while I would enjoy the feature PRs to go in more quickly, I 
think they are pretty well reviewed when they get reviewed and 
eventually once merged it's only good code that makes it in.


The environment just updated and made previous versions more unstable, 
most of which is inherited into current versions too, but these things 
are getting fixed. Like for example a lot of linux distros changed to 
OpenSSL 1.1 which broke HTTPS client calls in vibe.d and was fixed in 
0.8.6 or MongoDB 3.4+ changed a lot of things like indexes which were 
then broken which was fixed in 0.9.0 now though.


I haven't had a really big problem with vibe.d, except for the ctrl-c 
bug (which I've worked around as described).


I agree with the OP of this subthread that it is the most important 
problem for vibe.d (and vibed-core really).


I wish I knew how to fix it...

My experience with getting features into vibe.d has been good, I've 
added a few and Sonke has been very receptive, even if his responses are 
delayed (he must be really busy). I've been there too.


-Steve


Re: vibe.d and my first web service

2020-08-13 Thread Mr. Backup via Digitalmars-d-learn

On Wednesday, 12 August 2020 at 13:46:06 UTC, James Blachly wrote:


Unfortunately the problem still occurs with Vibe.d 0.9.0

IMO **this is the single most important problem to fix** for 
vibe.d -- if the most basic of examples (indeed, supplied by 
dub itself) fails so spectacularly, the casual new user will 
not spend the time to find out why this is happening, but 
instead move on. The ctrl-C non-termination bug has existed 
since at least 2015 from what I can tell from the forums.




As a casual new novice, I really like dlang as such, and I think 
it should be the most widespread and popular language in the 
world. And as soon as I came across it, I wanted to use it in my 
project. But it has many packages for the same things, but these 
packages are unfinished. Everyone creates their own. You start 
comparing them and don't know what to choose for your job and 
then you find out that you should have chosen another and then 
find out that you should have written it yourself. And then I 
finally done it in golang in a while. I think the dlang community 
should focus on creating a quality standard library.


We live in the 21st century where there are web technologies 
everywhere around us, so I think that the http package should be 
part of a standard library.




Re: vibe.d and my first web service

2020-08-13 Thread WebFreak001 via Digitalmars-d-learn

On Wednesday, 12 August 2020 at 21:11:54 UTC, Daniel Kozak wrote:

[...]

Unfortunately, I think vibe-d is dead. With every release it is 
worse than before and it seems there is almost no activity. So 
D really need new champion here maybe hunt will be next 
champion.


Can you give an example how vibe.d gets worse? It's really stable 
right now and while I would enjoy the feature PRs to go in more 
quickly, I think they are pretty well reviewed when they get 
reviewed and eventually once merged it's only good code that 
makes it in.


The environment just updated and made previous versions more 
unstable, most of which is inherited into current versions too, 
but these things are getting fixed. Like for example a lot of 
linux distros changed to OpenSSL 1.1 which broke HTTPS client 
calls in vibe.d and was fixed in 0.8.6 or MongoDB 3.4+ changed a 
lot of things like indexes which were then broken which was fixed 
in 0.9.0 now though.


Re: vibe.d and my first web service

2020-08-12 Thread mw via Digitalmars-d-learn

On Wednesday, 12 August 2020 at 13:46:06 UTC, James Blachly wrote:

... The ctrl-C non-termination bug has existed since at least 
2015 from what I can tell from the forums.


It's such a pity that so many dub packages are not in 
friction-free mode.


For this particular problem, maybe before it get fixed, can we 
add to the vibe.d doc suggesting people develop web-server on a 
virtual machine (e.g. VirtualBox): at least it can reduce some 
friction to reboot the (virtual) machine more easily.




Re: vibe.d and my first web service

2020-08-12 Thread Daniel Kozak via Digitalmars-d-learn
On Wed, Aug 12, 2020 at 3:51 PM James Blachly via Digitalmars-d-learn <
digitalmars-d-learn@puremagic.com> wrote:

> Unfortunately the problem still occurs with Vibe.d 0.9.0
>
> IMO **this is the single most important problem to fix** for vibe.d --
> if the most basic of examples (indeed, supplied by dub itself) fails so
> spectacularly, the casual new user will not spend the time to find out
> why this is happening, but instead move on. The ctrl-C non-termination
> bug has existed since at least 2015 from what I can tell from the forums.
>
> Tangent:
>
> Does Sönke have a Patreon or the project an OpenCollective etc. ? I
> would be willing to support fixing of some of these bugs.
>
> Alternatively, could we vote on whether a web framework is worthy of
> foundation support? Having an ergonomic, workable web framework is
> absolutely essential to surviving as a language in 2020 (notable
> exception being 800# gorilla incumbents C/C++).
>

Unfortunately, I think vibe-d is dead. With every release it is worse than
before and it seems there is almost no activity. So D really need new
champion here maybe hunt will be next champion.


Re: vibe.d and my first web service

2020-08-12 Thread James Blachly via Digitalmars-d-learn

On 7/18/20 8:16 AM, Andre Pany wrote:

On Saturday, 18 July 2020 at 09:10:04 UTC, Mr. Backup wrote:

>> ...
I started the program with "dub" command and everything worked as I 
expected. Except that there were a lot "deprecation" warnings and long 
time to compile.But when I exit the service by ctrl + c and start 
again the program cannot start again with error message:

...


I assume you are using vibe.d 0.8.4 or older. Please check whether 
adding this to dub.json solves your problem:


​"versions": [ "VibeHighEventPriority" ]

(Restart your pc)

Vibe.d 0.9 0 will be released soon. I hope it will work out of the box 
there.


Unfortunately the problem still occurs with Vibe.d 0.9.0

IMO **this is the single most important problem to fix** for vibe.d -- 
if the most basic of examples (indeed, supplied by dub itself) fails so 
spectacularly, the casual new user will not spend the time to find out 
why this is happening, but instead move on. The ctrl-C non-termination 
bug has existed since at least 2015 from what I can tell from the forums.


Tangent:

Does Sönke have a Patreon or the project an OpenCollective etc. ? I 
would be willing to support fixing of some of these bugs.


Alternatively, could we vote on whether a web framework is worthy of 
foundation support? Having an ergonomic, workable web framework is 
absolutely essential to surviving as a language in 2020 (notable 
exception being 800# gorilla incumbents C/C++).


Re: vibe.d and my first web service

2020-07-19 Thread bauss via Digitalmars-d-learn

On Saturday, 18 July 2020 at 17:23:06 UTC, Mr. Backup wrote:

On Saturday, 18 July 2020 at 12:16:09 UTC, Andre Pany wrote:

On Saturday, 18 July 2020 at 09:10:04 UTC, Mr. Backup wrote:

[...]


I assume you are using vibe.d 0.8.4 or older. Please check 
whether adding this to dub.json solves your problem:


​"versions": [ "VibeHighEventPriority" ]

(Restart your pc)

Vibe.d 0.9 0 will be released soon. I hope it will work out of 
the box there.


Kind regards
Andre


Thank you, it really works. But I dont feel good from it. There 
are many warnings during compiling. I will rather try to create 
my own web service only based on standard library. And 
hunt-http looks pretty good too.


The deprecation warnings are fine, it's just due to changes in 
DMD. They will eventually be fixed and ruled out as well.


They don't really do anything.

hunt-http is not really stable compared to vibe.d and there 
aren't much documentation either as it's in the beginning 
development phase I believe.


I use vibe.d in production with thousands of users on my sites 
and everything works just fine so don't worry about it. vibe.d is 
fairly stable.


Re: vibe.d and my first web service

2020-07-18 Thread Steven Schveighoffer via Digitalmars-d-learn

On Saturday, 18 July 2020 at 09:10:04 UTC, Mr. Backup wrote:

by ctrl + c and start again the program cannot start again with 
error message:


Failed to listen on ::1:8080
Failed to listen on 127.0.0.1:8080
Failed to listen for incoming HTTP connections on any of the 
supplied interfaces.


https://github.com/vibe-d/vibe-core/issues/205

-Steve


Re: vibe.d and my first web service

2020-07-18 Thread Mr. Backup via Digitalmars-d-learn

On Saturday, 18 July 2020 at 12:16:09 UTC, Andre Pany wrote:

On Saturday, 18 July 2020 at 09:10:04 UTC, Mr. Backup wrote:

[...]


I assume you are using vibe.d 0.8.4 or older. Please check 
whether adding this to dub.json solves your problem:


​"versions": [ "VibeHighEventPriority" ]

(Restart your pc)

Vibe.d 0.9 0 will be released soon. I hope it will work out of 
the box there.


Kind regards
Andre


Thank you, it really works. But I dont feel good from it. There 
are many warnings during compiling. I will rather try to create 
my own web service only based on standard library. And hunt-http 
looks pretty good too.


Re: vibe.d and my first web service

2020-07-18 Thread Andre Pany via Digitalmars-d-learn

On Saturday, 18 July 2020 at 09:10:04 UTC, Mr. Backup wrote:

Hello,

I wanted to create simple web service to start learning more 
about D lang and compare with another languages. I have used 
"dub init -t vibe.d" to create basic example:


import vibe.vibe;

void main()
{
auto settings = new HTTPServerSettings;
settings.port = 8080;
settings.bindAddresses = ["::1", "127.0.0.1"];
listenHTTP(settings, &hello);

logInfo("Please open http://127.0.0.1:8080/ in your browser.");
runApplication();
}

void hello(HTTPServerRequest req, HTTPServerResponse res)
{
res.writeBody("Hello, World!");
}



I started the program with "dub" command and everything worked 
as I expected. Except that there were a lot "deprecation" 
warnings and long time to compile.But when I exit the service 
by ctrl + c and start again the program cannot start again with 
error message:


Failed to listen on ::1:8080
Failed to listen on 127.0.0.1:8080
Failed to listen for incoming HTTP connections on any of the 
supplied interfaces.


or

leaking eventcore driver because there are still active handles


Probably the application was terminated incorrectly. What 
should I do to ensure that the application closes properly?


Thank you in advance


I assume you are using vibe.d 0.8.4 or older. Please check 
whether adding this to dub.json solves your problem:


​"versions": [ "VibeHighEventPriority" ]

(Restart your pc)

Vibe.d 0.9 0 will be released soon. I hope it will work out of 
the box there.


Kind regards
Andre


Re: vibe.d and my first web service

2020-07-18 Thread aliak via Digitalmars-d-learn

On Saturday, 18 July 2020 at 09:10:04 UTC, Mr. Backup wrote:

Hello,

I wanted to create simple web service to start learning more 
about D lang and compare with another languages. I have used 
"dub init -t vibe.d" to create basic example:


[...]


Think it's just Vibe.d:

I had a similar issue: 
https://github.com/vibe-d/vibe.d/issues/2436


And this is still open (default server doesn't clean itself up): 
https://github.com/vibe-d/vibe.d/issues/2245