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.




Reading from stdin significantly slower than reading file directly?

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

Hi,

Relative beginner to D-lang here, and I'm very confused by the 
apparent performance disparity I've noticed between programs that 
do the following:


1) cat some-large-file | D-program-reading-stdin-byLine()

2) D-program-directly-reading-file-byLine() using File() struct

The D-lang difference I've noticed from options (1) and (2) is 
somewhere in the range of 80% wall time taken (7.5s vs 4.1s), 
which seems pretty extreme.


For comparison, I attempted the same using Perl with the same 
large file, and I only noticed a 25% difference (10s vs 8s) in 
performance, which I imagine to be partially attributable to the 
overhead incurred by using a pipe and its buffer.


So, is this difference in D-lang performance typical? Is this 
expected behavior?


Was wondering if this may have anything to do with the library 
definition for std.stdio.stdin 
(https://dlang.org/library/std/stdio/stdin.html)? Does global 
file-locking significantly affect read-performance?


For reference: I'm trying to build a single-threaded application; 
my present use-case cannot benefit from parallelism, because its 
ultimate purpose is to serve as a single-threaded downstream 
filter from an upstream application consuming (n-1) system 
threads.


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: How to compile Windows exe files from this source

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

On Sunday, 9 August 2020 at 19:04:07 UTC, Marc wrote:
I don't know much more about D than creating a 'hello world' 
exe file with the DMD Compiler

but I'm interested in using the eBay/tsv-utils binaries.
Unfortunately, the author didn't create any MS Windows binaries:
https://github.com/eBay/tsv-utils/releases

Does anyone know how to compile this code into MS Windows 
binaries?


It is a bit off-topic but I strongly suggest that you take a look 
at the windows subsystem for Linux, that is a on-board feature in 
Windows 10 
(https://www.microsoft.com/en-us/p/ubuntu/9nblggh4msv6?activetab=pivot:overviewtab)


It makes working with tools like tsvutils much more effective.


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++).