Re: Release candidate vibe.d 0.8.1-rc.1

2017-08-12 Thread Sönke Ludwig via Digitalmars-d-announce
Am 12.08.2017 um 10:41 schrieb Andrew Benton: On Saturday, 12 August 2017 at 07:55:14 UTC, Sönke Ludwig wrote: The first release candidate for 0.8.1 is out, notably containing some API fixes (mostly missing @safe annotations), as well as a bunch of improvements in the HTTP sub system. Full

Re: DIP 1011-extern(delegate)--Formal Review

2017-08-12 Thread Patrick Schluter via Digitalmars-d
On Friday, 11 August 2017 at 17:57:30 UTC, Dominikus Dittes Scherkl wrote: On Friday, 11 August 2017 at 10:45:03 UTC, Mike Parker wrote: The first stage of the formal review for DIP 1011 [1], "extern(delegate)", is now underway. I see no problem with this DIP. And even if the usecase is rare,

ddoc and method overriding.

2017-08-12 Thread Alexandru Ermicioi via Digitalmars-d-learn
Hi all, Having a trivial example such as: ```D class Foo { /** * A documentation info **/ void fancy(); } class Moo { override void fancy(); } ``` Is there a way to tell ddoc to use Foo.fancy documentation block for overriding Moo.fancy method? Thx.

Re: Need some vibe.d hosting advice

2017-08-12 Thread Andre Pany via Digitalmars-d
On Saturday, 12 August 2017 at 08:49:44 UTC, Paolo Invernizzi wrote: On Friday, 11 August 2017 at 13:06:54 UTC, aberba wrote: So I'm into this platform with a vibe.d api server + back-end and I'm confused/curious to know the hosting package to use. I will have a lot of images uploaded by

Re: Need some vibe.d hosting advice

2017-08-12 Thread Sebastiaan Koppe via Digitalmars-d
On Friday, 11 August 2017 at 13:06:54 UTC, aberba wrote: So I'm into this platform with a vibe.d api server + back-end and I'm confused/curious to know the hosting package to use. I will have a lot of images uploaded by users. I would definitely outsource the storage. AzureBlob, S3, Wasabi,

Re: Bug in -J

2017-08-12 Thread Vladimir Panteleev via Digitalmars-d
On Saturday, 12 August 2017 at 06:02:57 UTC, Vladimir Panteleev wrote: Sounds reasonable, the compiler could check if paths start with a -J path. There is a potential ambiguity here: dmd -Jsomedir test.d test.d: import("somedir/file.txt"); Does the user mean to import "somedir/file.txt" or

Release candidate vibe.d 0.8.1-rc.1

2017-08-12 Thread Sönke Ludwig via Digitalmars-d-announce
The first release candidate for 0.8.1 is out, notably containing some API fixes (mostly missing @safe annotations), as well as a bunch of improvements in the HTTP sub system. Full change log: https://github.com/rejectedsoftware/vibe.d/blob/master/CHANGELOG.md 0.8.1-rc.1 on code.dlang.org:

Re: Dynamic array leak?

2017-08-12 Thread Temtaime via Digitalmars-d
On Friday, 11 August 2017 at 22:36:27 UTC, bitwise wrote: On Friday, 11 August 2017 at 19:01:44 UTC, Yuxuan Shui wrote: On Friday, 11 August 2017 at 18:44:56 UTC, bitwise wrote: [...] My guess is a pointer to the array still lives somewhere on the stack. This gives the expected output: void

Re: Need some vibe.d hosting advice

2017-08-12 Thread Paolo Invernizzi via Digitalmars-d
On Friday, 11 August 2017 at 13:06:54 UTC, aberba wrote: So I'm into this platform with a vibe.d api server + back-end and I'm confused/curious to know the hosting package to use. I will have a lot of images uploaded by users. [...] We are using dockerized vibe.d containers in a docker

Re: Bug in -J

2017-08-12 Thread Vladimir Panteleev via Digitalmars-d
On Saturday, 12 August 2017 at 05:42:21 UTC, Mr. Pib wrote: I'm pretty sure that on no OS does the same location mean different things? I understand what you mean, but just to clarify on the .. thing: $ mkdir d d/x d/z $ ln -s d/z x $ echo foo > d/z/y $ echo bar > d/x/y $ cat x/y foo + cat

[Issue 17740] ghost "internal" symbols show up sometimes

2017-08-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17740 Jonathan M Davis changed: What|Removed |Added CC|

Re: Release candidate vibe.d 0.8.1-rc.1

2017-08-12 Thread Andrew Benton via Digitalmars-d-announce
On Saturday, 12 August 2017 at 07:55:14 UTC, Sönke Ludwig wrote: The first release candidate for 0.8.1 is out, notably containing some API fixes (mostly missing @safe annotations), as well as a bunch of improvements in the HTTP sub system. Full change log:

[Issue 17747] New: extern(C) shared static module constructor should be called in betterC programs

2017-08-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17747 Issue ID: 17747 Summary: extern(C) shared static module constructor should be called in betterC programs Product: D Version: D2 Hardware: All OS: All

Re: jai-like CTFE string formating

2017-08-12 Thread ixid via Digitalmars-d
On Saturday, 12 August 2017 at 11:47:10 UTC, Stefan Koch wrote: Whereas the following alternative takes 20 ms : { import ctfe_utils; pragma(msg, format_jai("Hello % % % % % % % % %", " I ", " just", " have" , " to", " concat", " a lot", " of", " strings ...", 9)); } see for yourself:

Re: Raspberry PI needs some love

2017-08-12 Thread WebFreak001 via Digitalmars-d
On Saturday, 12 August 2017 at 11:43:32 UTC, Jonas Minnberg wrote: I am currently using D on my Raspberry PI, but two things that makes it harder are; 1. There is no way to detect that I am running on the PI. This is needed in my case to use the special OpenGL ES version on that machine.

Re: Bug in -J

2017-08-12 Thread Mr. Pib via Digitalmars-d
On Saturday, 12 August 2017 at 06:06:33 UTC, Vladimir Panteleev wrote: On Saturday, 12 August 2017 at 06:02:57 UTC, Vladimir Panteleev wrote: Sounds reasonable, the compiler could check if paths start with a -J path. There is a potential ambiguity here: dmd -Jsomedir test.d test.d:

Re: Is there a cleaner way of doing this?

2017-08-12 Thread Mark via Digitalmars-d
On Monday, 7 August 2017 at 08:01:26 UTC, Shachar Shemesh wrote: The problem is what happens when the param is optional. The common way to do this is to set T to void. This results in the following code: struct S(T) { enum HasParam = !is(T == void); static if( HasParam ) {

[Issue 17750] New: DMD should consider namespaces when validating declaration names

2017-08-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17750 Issue ID: 17750 Summary: DMD should consider namespaces when validating declaration names Product: D Version: D2 Hardware: x86_64 OS: Linux Status:

Re: html fetcher/parser

2017-08-12 Thread Soulsbane via Digitalmars-d-learn
On Saturday, 12 August 2017 at 19:53:22 UTC, Faux Amis wrote: I would like to get into D again by making a small program which fetches a website every X-time and keeps track of all changes within specified dom elements. fetching: should I go for std curl, vibe.d or something else? parsing: I

Re: Need some vibe.d hosting advice

2017-08-12 Thread sarn via Digitalmars-d
On Friday, 11 August 2017 at 13:06:54 UTC, aberba wrote: How would you do it if you were using vibe.d? Depends on who wants it built. I do consulting, so let me answer that way. "I don't want to think about ops and scalability and availability at all!" Then you'll have to pay a premium

Re: jai-like CTFE string formating

2017-08-12 Thread Manu via Digitalmars-d
On 13 August 2017 at 00:15, Stefan Koch via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Saturday, 12 August 2017 at 13:19:12 UTC, ixid wrote: > >> On Saturday, 12 August 2017 at 11:47:10 UTC, Stefan Koch wrote: >> >>> Whereas the following alternative takes 20 ms : >>> { >>>

Re: jai-like CTFE string formating

2017-08-12 Thread Stefan Koch via Digitalmars-d
On Sunday, 13 August 2017 at 00:42:08 UTC, Manu wrote: On 13 August 2017 at 00:15, Stefan Koch via Digitalmars-d < [ ... ] If you're keen to introduce a new function, I'd strongly suggest changing to {1} {2} {3}, or %1 %2 %3, format/printf functions where you don't supply the place index

[Issue 17747] extern(C) shared static module constructor should be called in betterC programs

2017-08-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17747 --- Comment #1 from Илья Ярошенко --- And extern(C++), extern(D) can/should work too. --

Re: jai-like CTFE string formating

2017-08-12 Thread tetyys via Digitalmars-d
On Saturday, 12 August 2017 at 11:47:10 UTC, Stefan Koch wrote: [...] very nice

Re: __dtor vs __xdtor

2017-08-12 Thread Marco Leise via Digitalmars-d-learn
Am Fri, 11 Aug 2017 17:10:14 + schrieb bitwise : > Ok thanks. > > I don't understand why you would ever want to call __dtor > then...is it possible to have only __dtor without also having > __xdtor? Like, if I want to call a struct's destructor, do I have > to check

Re: jai-like CTFE string formating

2017-08-12 Thread Stefan Koch via Digitalmars-d
On Saturday, 12 August 2017 at 13:19:12 UTC, ixid wrote: On Saturday, 12 August 2017 at 11:47:10 UTC, Stefan Koch wrote: Whereas the following alternative takes 20 ms : { import ctfe_utils; pragma(msg, format_jai("Hello % % % % % % % % %", " I ", " just", " have" , " to", " concat", "

Raspberry PI needs some love

2017-08-12 Thread Jonas Minnberg via Digitalmars-d
I am currently using D on my Raspberry PI, but two things that makes it harder are; 1. There is no way to detect that I am running on the PI. This is needed in my case to use the special OpenGL ES version on that machine. 2. Profiling does not seem to work. You can build a profiling build

jai-like CTFE string formating

2017-08-12 Thread Stefan Koch via Digitalmars-d
Hi Guys, I've just implemented a subset of the std.format functionality. In the same style that Johnathan Blow uses for JAI. It's about 10x faster then using std.format and uses much less memory :) the follwing code takes over 250 ms to compile : { import std.format; pragma(msg,

Second release candidate 0.8.1-rc.2

2017-08-12 Thread Sönke Ludwig via Digitalmars-d-announce
v0.8.1-rc.2 now supports setting a version "VibeUseOpenSSL11" in the package recipe to compile against the OpenSSL 1.1.0 API on systems that don't have 1.0.1 anymore.

[Issue 17748] New: extern(C) do nothing on struct methods

2017-08-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17748 Issue ID: 17748 Summary: extern(C) do nothing on struct methods Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: major Priority: P1

Re: Is there a cleaner way of doing this?

2017-08-12 Thread Mark via Digitalmars-d
On Saturday, 12 August 2017 at 15:02:34 UTC, Mark wrote: I was going to suggest using Algebraic/Variant, as in: void initialize(Algebraic!(int,void)) { This should read: void initialize(Algebraic!(int,void) param) {

[Issue 17749] New: Compilation error "shared method ~this is not callable using a non-shared object" on shared object

2017-08-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17749 Issue ID: 17749 Summary: Compilation error "shared method ~this is not callable using a non-shared object" on shared object Product: D Version: D2 Hardware: x86_64

Re: How to make http requests to unix socket?

2017-08-12 Thread Sebastiaan Koppe via Digitalmars-d-learn
On Friday, 11 August 2017 at 18:39:54 UTC, dvnguyen wrote: How to make http requests to unix socket? For example, in Docker engine api, curl --unix-socket /var/run/docker.sock http:/v1.24/containers/json I made a pull request a year ago or so to have vibe-d's requestHttp to support unix

Re: Dynamic array leak?

2017-08-12 Thread bitwise via Digitalmars-d
On Saturday, 12 August 2017 at 17:52:47 UTC, Dgame wrote: [...] auto s(T, size_t n)(T[n] values) { return values; } assert(equal(a[], [S(0), S(1)].s)); This seems to work, but I'm trying to determine if it's 100% guaranteed safe. Tacking on @nogc doesn't seem to stop it from

Does anyone understand how to use "shared" types with concurrency send/receive functions?

2017-08-12 Thread Arek via Digitalmars-d-learn
I have the folowing problem: I like to envelope the class object in struct to control the destruction moment and then send this object to another thread/fiber (or task, cause I use vibe-d). I can't find any method to make it working. Any ideas? dmd (version 075) gives so stupid results, I

Re: An Issue I Wish To Raise Awareness On

2017-08-12 Thread Arek via Digitalmars-d
On Friday, 21 July 2017 at 08:53:44 UTC, Atila Neves wrote: This works fine in dmd 2.075: struct A { this(string a) {} this(string a) shared {} ~this() {} this(this T)(this) {} // you can reflect to find out if shared } void main() { auto nonShared = A(""); auto

[Issue 17748] extern(C) do nothing on struct methods

2017-08-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17748 ki...@gmx.net changed: What|Removed |Added CC||ki...@gmx.net --- Comment #1 from

[Issue 17706] std.math.isFinite does not compile for cdouble: "No traits support for cdouble"

2017-08-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17706 --- Comment #1 from Vladimir Panteleev --- Complex types are on the path to deprecation: https://dlang.org/deprecate.html#Imaginary%20and%20complex%20types --

Re: Second release candidate 0.8.1-rc.2

2017-08-12 Thread Andrew Benton via Digitalmars-d-announce
On Saturday, 12 August 2017 at 12:43:14 UTC, Sönke Ludwig wrote: v0.8.1-rc.2 now supports setting a version "VibeUseOpenSSL11" in the package recipe to compile against the OpenSSL 1.1.0 API on systems that don't have 1.0.1 anymore. Thanks for making that change!

Re: Need some vibe.d hosting advice

2017-08-12 Thread Faux Amis via Digitalmars-d
On 2017-08-12 12:46, Andre Pany wrote: On Saturday, 12 August 2017 at 08:49:44 UTC, Paolo Invernizzi wrote: On Friday, 11 August 2017 at 13:06:54 UTC, aberba wrote: So I'm into this platform with a vibe.d api server + back-end and I'm confused/curious to know the hosting package to use. I will

html fetcher/parser

2017-08-12 Thread Faux Amis via Digitalmars-d-learn
I would like to get into D again by making a small program which fetches a website every X-time and keeps track of all changes within specified dom elements. fetching: should I go for std curl, vibe.d or something else? parsing: I could only find these dub packages: htmld & libdominator. And

Re: html fetcher/parser

2017-08-12 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 12 August 2017 at 19:53:22 UTC, Faux Amis wrote: I would like to get into D again by making a small program which fetches a website every X-time and keeps track of all changes within specified dom elements. My dom.d and http2.d combine to make this easy:

Re: Dynamic array leak?

2017-08-12 Thread bitwise via Digitalmars-d
On Saturday, 12 August 2017 at 08:16:56 UTC, Temtaime wrote: Collect - is a hint to the GC, not an order. It can ignore this request. If this is the case, then D's GC should have an option to force collection like C#'s GC: https://msdn.microsoft.com/en-us/library/bb495757(v=vs.110).aspx

Re: Dynamic array leak?

2017-08-12 Thread Dgame via Digitalmars-d
On Saturday, 12 August 2017 at 17:25:36 UTC, bitwise wrote: On Saturday, 12 August 2017 at 08:16:56 UTC, Temtaime wrote: Collect - is a hint to the GC, not an order. It can ignore this request. If this is the case, then D's GC should have an option to force collection like C#'s GC:

Re: Does anyone understand how to use "shared" types with concurrency send/receive functions?

2017-08-12 Thread crimaniak via Digitalmars-d-learn
On Saturday, 12 August 2017 at 18:57:44 UTC, Arek wrote: I have the folowing problem: I like to envelope the class object in struct to control the destruction moment and then send this object to another thread/fiber (or task, cause I use vibe-d). I can't find any method to make it working.

Re: Dynamic array leak?

2017-08-12 Thread Marco Leise via Digitalmars-d
Am Fri, 11 Aug 2017 18:44:56 + schrieb bitwise : > […] That can't work and here is why: Druntime employs a conservative GC that will treat several things as potential pointers to GC memory. From the top of my head, the entire stack as well as void[] arrays and unions

Re: html fetcher/parser

2017-08-12 Thread Michael via Digitalmars-d-learn
On Saturday, 12 August 2017 at 20:22:44 UTC, Adam D. Ruppe wrote: On Saturday, 12 August 2017 at 19:53:22 UTC, Faux Amis wrote: [...] My dom.d and http2.d combine to make this easy: https://github.com/adamdruppe/arsd/blob/master/dom.d https://github.com/adamdruppe/arsd/blob/master/http2.d