Re: core.sys.posix.setjmp unavailable for OS X?

2018-01-15 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Jan 16, 2018 at 08:29:57AM +0100, Jacob Carlborg via Digitalmars-d-learn wrote: > On 2018-01-16 08:29, Jacob Carlborg wrote: > > > They're used to implement Objective-C exceptions on macOS 32bit and > > iOS. > > Forgot the second part: > > ... so I assume that means it works. [...] So

Re: core.sys.posix.setjmp unavailable for OS X?

2018-01-15 Thread Jacob Carlborg via Digitalmars-d-learn
On 2018-01-16 08:29, Jacob Carlborg wrote: They're used to implement Objective-C exceptions on macOS 32bit and iOS. Forgot the second part: ... so I assume that means it works. -- /Jacob Carlborg

Re: core.sys.posix.setjmp unavailable for OS X?

2018-01-15 Thread Jacob Carlborg via Digitalmars-d-learn
On 2018-01-15 20:37, H. S. Teoh wrote: It's probably just a matter of adding the appropriate prototypes / declarations to druntime. Provided that they actually work as advertised, of course. They're used to implement Objective-C exceptions on macOS 32bit and iOS. -- /Jacob Carlborg

[Issue 16017] package functions show up in std.experimental.allocator.common docs

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16017 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/639c07e9428df844bb21adb8007503aa1e33b9b2 Fix Issue 16017 - package functions show up in

[Issue 17440] Nullable.nullify() resets referenced object

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #12 from hst...@quickfur.ath.cx --- I think you misunderstood my comment. I meant that one way to fix this bug is to change Nullable, or at least the overload that takes a single type parameter, so that it does not instantiate for

Re: [theory] What is a type?

2018-01-15 Thread thedeemon via Digitalmars-d
On Monday, 15 January 2018 at 20:46:19 UTC, Ali wrote: If you want to learns the ins and outs of types, this books comes highly recommended https://www.cis.upenn.edu/~bcpierce/tapl/ +1, TAPL is a must read for anyone in CS, I believe. Also recommended: "Type Theory & Functional Programming"

Re: Beta 2.078.1

2018-01-15 Thread Martin Nowak via Digitalmars-d-announce
On 01/16/2018 06:59 AM, Martin Nowak wrote: > Lots of useful fixes, most prominently dub now timeouts and uses one > of the mirrors when code.dlang.org has connection issues. https://github.com/dlang/dub/pull/1338

Beta 2.078.1

2018-01-15 Thread Martin Nowak via Digitalmars-d-announce
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 First beta for the 2.078.1 patch release. Lots of useful fixes, most prominently dub now timeouts and uses one of the mirrors when code.dlang.org has connection issues. http://dlang.org/download.html#dmd_beta

[Issue 18193] module config is in file 'rt/config.d' which cannot be read

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18193 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/10afa6944bb3ac479cbcabc5499a86136907b95f Fix issue 18193 - module config is in file

[Issue 13742] undefined reference to __coverage

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13742 --- Comment #8 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/69e7bd18892df18f682906916bf8c8ad87fb30e5 fix Issue 13742 - undefined reference to __coverage - Nested

[Issue 13742] undefined reference to __coverage

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13742 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 18233] building with -m64 doesn't work with sc.ini from the zip distribution and VS2017

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18233 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/e9b2864e1b0f59415045533423c64447b3e468aa fix issue 18233 - building with -m64 doesn't work with sc.ini

[Issue 18111] unittests get different names depending on how the files are passed to dmd

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18111 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/3b551d3ce6d9d654ba64c11ce0c7c926b1197aa0 Fix issue 18111: use fully qualified name for modules in

Re: I want to transmit the class name and the member name in the method

2018-01-15 Thread Martin Nowak via Digitalmars-d-learn
On Monday, 15 January 2018 at 15:28:19 UTC, Martin Nowak wrote: More concise stuff is possible with heavy compile-time trickery (https://dpaste.dzfl.pl/cd375ac594cf) without incurring dreaded 1+N queries or even any unnecessary SELECT fields. foreach (u; db.select!User.where!"NOT

Re: Does it have an http2 server/client lib like in golang?

2018-01-15 Thread Martin Nowak via Digitalmars-d-learn
On Monday, 15 January 2018 at 18:07:24 UTC, Cergoo wrote: subj WIP but a bit stalled. https://github.com/vibe-d/vibe.d/tree/http2-botan-cleanup Unless you really need server-push of assets, HTTP/2 on a reverse proxy gets you the same performance benefits as well.

[Issue 17440] Nullable.nullify() resets referenced object

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #11 from Marenz --- I can only repeat what I said before. The principle of the least surprise should apply. No one expects their object to be destroyed when a reference to it is set to null, be it through

class initialization

2018-01-15 Thread Marc via Digitalmars-d-learn
in C# you can initilizate the class members like this: var foo = new Foo { a = 1, b = 2 }; I found something similar to structs in D: myStruct S = {a:1, b:2}; But can't figure out if D does have that for classes.

[Issue 18242] DMD Segmentation fault.

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18242 --- Comment #1 from changlon --- /** * This code is based on Adam D. Ruppe $(LINK2 http://arsdnet.net/dcode/minimal.zip minimal.zip). * Probably Boost licensed */ module object; /// All D class objects inherit from Object.

Re: Undefined Reference to OpenSSL EVP functions

2018-01-15 Thread Chris via Digitalmars-d-learn
On Tuesday, 16 January 2018 at 00:52:09 UTC, Chris wrote: I am trying to hook up OpenSSL to a dlang project I'm working on, but I have hit a problem when trying to link. I currently get the following linking error: undefined reference to `EVP_CIPHER_CTX_init' I have made sure to include

Trait compiles

2018-01-15 Thread Jiyan via Digitalmars-d-learn
Hello, is there anyway to do something like this: mixin template foo( exp) { static if(__traits(compiles, exp))exp; } Thanks :)

[Issue 18242] New: DMD Segmentation fault.

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18242 Issue ID: 18242 Summary: DMD Segmentation fault. Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: blocker Priority: P1

Re: TSV Utilities release with LTO and PGO enabled

2018-01-15 Thread Jon Degenhardt via Digitalmars-d-announce
On Tuesday, 16 January 2018 at 00:19:24 UTC, Martin Nowak wrote: On Sunday, 14 January 2018 at 23:18:42 UTC, Jon Degenhardt wrote: Combined, LTO and PGO resulted in performance improvements greater than 25% on three of my standard six benchmarks, and five of the six improved at least 8%.

Re: Phobos bindings

2018-01-15 Thread Steven Schveighoffer via Digitalmars-d
On 1/14/18 1:17 PM, Temtaime wrote: Phobos comes with zlib, curl and sqlite bindings. Zlib sources come with phobos, so there's no need to build and link with it separately. Why there's no curl and sqlite sources ? For example sqlite comes as 1 file. I think we can add it too, isn't it ?

Undefined Reference to OpenSSL EVP functions

2018-01-15 Thread Chris via Digitalmars-d-learn
I am trying to hook up OpenSSL to a dlang project I'm working on, but I have hit a problem when trying to link. I currently get the following linking error: undefined reference to `EVP_CIPHER_CTX_init' I have made sure to include the module wrapping the c headers import

Re: Proposed Phobos equivalent of wcswidth()

2018-01-15 Thread WhatMeForget via Digitalmars-d
On Monday, 15 January 2018 at 13:34:09 UTC, Jack Stouffer wrote: On Saturday, 13 January 2018 at 17:26:52 UTC, H. S. Teoh wrote: ... Thanks for taking the time to do this. And now the obligatory bikeshed: what should the Phobos equivalent of wcswidth be called? std.utf.displayWidth

Re: TSV Utilities release with LTO and PGO enabled

2018-01-15 Thread Martin Nowak via Digitalmars-d-announce
On Sunday, 14 January 2018 at 23:18:42 UTC, Jon Degenhardt wrote: Combined, LTO and PGO resulted in performance improvements greater than 25% on three of my standard six benchmarks, and five of the six improved at least 8%. Yay, I'm usually seeing double digit improvements for PGO alone, and

[Issue 18241] Missing characters from std.uni.unicode.Default_Ignorable_Code_Point

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18241 hst...@quickfur.ath.cx changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: How to run vibe.d web app in XAMPP server ?

2018-01-15 Thread singingbush via Digitalmars-d
On Monday, 15 January 2018 at 06:22:13 UTC, Jayam wrote: In our production server, we have only XAMPP for use to deploy web app and mysql combinedly? Is there any way how to deploy the vibe.d web app into XAMPP ? To use Apache to proxy requests to your D app do something along these lines:

[Issue 18241] Missing characters from std.uni.unicode.Default_Ignorable_Code_Point

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18241 --- Comment #1 from hst...@quickfur.ath.cx --- Actually, strike U+06DD and U+070F from the list. These are explicitly specified by TR 44 as being exceptional cases that should NOT be ignored, even though they belong to the Cf category. --

[Issue 18241] New: Missing characters from std.uni.unicode.Default_Ignorable_Code_Point

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18241 Issue ID: 18241 Summary: Missing characters from std.uni.unicode.Default_Ignorable_Code_Point Product: D Version: D2 Hardware: x86_64 OS: Linux

Re: Tuple DIP - tuple unification with arrays and structs

2018-01-15 Thread Walter Bright via Digitalmars-d
On 1/14/2018 6:55 AM, Q. Schroll wrote: How is (1, 2) different from [1, 2] (static array)? It's a very good question. It's corollary is how is (1, 2) different from struct S { int a, b; } It does turn out that int[2] is structurally (!) the same as struct S. This is a property I've taken

Re: Tuple DIP

2018-01-15 Thread Walter Bright via Digitalmars-d
On 1/14/2018 10:17 AM, Timon Gehr wrote: It's inherited from C, where all struct instances have size at least 1. (Such that each of them has a distinct address.) There are some peculiarities with that, like with multiple inheritance sometimes the size really is zero :-)

Re: run.dlang.io can now display ASM + AST + IR

2018-01-15 Thread kinke via Digitalmars-d-announce
On Sunday, 14 January 2018 at 04:18:41 UTC, Seb wrote: 3) IR (LDC only) https://run.dlang.io/is/BOTNDf Thanks Seb. I particularly like this feature. After a quick glance, the debuginfos (-g) seem to be needlessly enforced, bloating the IR. A colored output would be a nice improvement;

Re: How to imporve D-translation of these Python list comprehensions ?

2018-01-15 Thread Timon Gehr via Digitalmars-d-learn
On 15.01.2018 20:05, xenon325 wrote: I think, most clear code would be with tripple `foreach`, so I'll go with that. But probably someone will come up with something better and range-ier. Suggestion are welcome! import std.stdio, std.algorithm, std.range, std.array, std.conv, std.json,

Re: How to imporve D-translation of these Python list comprehensions ?

2018-01-15 Thread Timon Gehr via Digitalmars-d-learn
On 15.01.2018 22:51, Timon Gehr wrote: auto aa(R)(R r){     typeof(r.front[1])[typeof(r.front[0])] a;     foreach(x;r) a[x[0]] = x[1];     return a; } Actually, better to use std.array.assocArray. import std.stdio, std.algorithm, std.range, std.array, std.conv, std.json, std.typecons;

Re: How to imporve D-translation of these Python list comprehensions ?

2018-01-15 Thread Biotronic via Digitalmars-d-learn
On Monday, 15 January 2018 at 19:05:52 UTC, xenon325 wrote: I think, most clear code would be with tripple `foreach`, so I'll go with that. But probably someone will come up with something better and range-ier. I will admit clarity has suffered, but I like the brevity: import std.json :

Re: Article: Fuzzing D code with LDC

2018-01-15 Thread H. S. Teoh via Digitalmars-d-announce
On Sat, Jan 13, 2018 at 11:59:52PM +, Johan Engelen via Digitalmars-d-announce wrote: > It's been a work-in-progress for half a year, but finished now: > > http://johanengelen.github.io/ldc/2018/01/14/Fuzzing-with-LDC.html [...] It would be good to program custom fuzzers for Phobos modules,

[Issue 18240] core.stdc.wchar_ wmemset, etc. should be pure

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18240 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/druntime https://github.com/dlang/druntime/commit/2bc68a917905faa89eb9b6458dc52b0cdf992ea4 Fix Issue 18240 - core.stdc.wchar_ wmemset, etc.

[Issue 17440] Nullable.nullify() resets referenced object

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 --- Comment #10 from hst...@quickfur.ath.cx --- P.S. Actually, Nullable does have another overload that takes a null value to be used in lieu of a boolean flag. So conceivably, you could use Nullable!(T, null) instead of Nullable!T and you will have

Re: How to imporve D-translation of these Python list comprehensions ?

2018-01-15 Thread lobo via Digitalmars-d-learn
On Monday, 15 January 2018 at 19:05:52 UTC, xenon325 wrote: A workmate has recently shown this piece of code to show how nice Python is (we are mostly C and growing C++ shop): [...] Well if that is what they can do in Python I'd hate to see their C++! They have done a great job making

Re: [theory] What is a type?

2018-01-15 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 15 January 2018 at 19:25:16 UTC, H. S. Teoh wrote: At the most abstract level, a type is just a set. The members of the set represent what values that type can have. Hm, yes, like representing an ordered pair (a,b) as {{a},{a,b}}. But I think typing is more commonly viewed as a

Re: [theory] What is a type?

2018-01-15 Thread Ali via Digitalmars-d
On Sunday, 10 October 2010 at 12:28:32 UTC, Justin Johansson wrote: Now having hopefully described that a type is something that might well have multiple orthogonal aspects to its identity, how would one go about implementing a dynamic language with such a complex type system in D? I realize

Re: [theory] What is a type?

2018-01-15 Thread Mark via Digitalmars-d
On Sunday, 10 October 2010 at 12:28:32 UTC, Justin Johansson wrote: Specifically I have a problem in trying to implement a functional language translator in D. My target language has a rather non-conventional type system, in which, superficially at least, types can be described as being

Re: How to imporve D-translation of these Python list comprehensions ?

2018-01-15 Thread Igor Shirkalin via Digitalmars-d-learn
On Monday, 15 January 2018 at 19:05:52 UTC, xenon325 wrote: A workmate has recently shown this piece of code to show how nice Python is (we are mostly C and growing C++ shop): dd = [dict(_name=k, **{a + str(i): aget(d, k, a) for a in aa for i, d in enumerate([srv1, srv2])}) for k in

[Issue 17440] Nullable.nullify() resets referenced object

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17440 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --- Comment

Re: Proposed Phobos equivalent of wcswidth()

2018-01-15 Thread H. S. Teoh via Digitalmars-d
On Sat, Jan 13, 2018 at 09:26:52AM -0800, H. S. Teoh via Digitalmars-d wrote: [...] > https://github.com/quickfur/strwidth [...] One thing I'm seeking help with, and this is mainly directed at Dmitry Olshansky but can be anyone here who knows the internal workings of std.uni well enough, is

Re: [theory] What is a type?

2018-01-15 Thread Jonathan Marler via Digitalmars-d
On Monday, 15 January 2018 at 19:34:23 UTC, Ali Çehreli wrote: On 01/15/2018 10:58 AM, Jonathan Marler wrote: > On Sunday, 10 October 2010 at 12:28:32 UTC, Justin Johansson wrote: > I'm getting "nostalgia" from all the math terminology :) Just the date of the post you're responding to is

Re: mysql-native: Prepared statements: Direction and future

2018-01-15 Thread H. S. Teoh via Digitalmars-d-announce
On Mon, Jan 15, 2018 at 01:30:42PM -0500, Nick Sabalausky (Abscissa) via Digitalmars-d-announce wrote: > I've posted (what basically amounts to an article) about my current > thoughts on addressing Prepared's current downsides in the next > release (v2.0.0), as well as a little bit of future

Re: core.sys.posix.setjmp unavailable for OS X?

2018-01-15 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Jan 15, 2018 at 07:06:42PM +, bpr via Digitalmars-d-learn wrote: > Is there a reason that it's unavailable on OS X when it works fine on > Linux? The functions exist on OS X, and it's easy enough to compile C > programs using setjmp there; but not D programs. I don't think I'm >

Re: [theory] What is a type?

2018-01-15 Thread H. S. Teoh via Digitalmars-d
On Mon, Jan 15, 2018 at 06:58:37PM +, Jonathan Marler via Digitalmars-d wrote: [...] > That being said, I don't think this model really get much closer to > answering the original question, "what is a type?". [...] At the most abstract level, a type is just a set. The members of the set

Re: [theory] What is a type?

2018-01-15 Thread Ali Çehreli via Digitalmars-d
On 01/15/2018 10:58 AM, Jonathan Marler wrote: > On Sunday, 10 October 2010 at 12:28:32 UTC, Justin Johansson wrote: > I'm getting "nostalgia" from all the math terminology :) Just the date of the post you're responding to is sufficient for "nostalgia". ;) Ali

gRPC in D good idea for GSOC 2018?

2018-01-15 Thread Ali Çehreli via Digitalmars-d
I know a project where D could benefit from gRPC in D, which is not among the supported languages: https://grpc.io/docs/ Do you think gRPC support is worth adding to GSOC 2018 ideas? https://wiki.dlang.org/GSOC_2018_Ideas Ali

[Issue 17462] Order of base interfaces affects compiler behavior

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17462 --- Comment #4 from Andrei Alexandrescu --- The following C++ equivalent does require the additional implementation (uncomment code to get it to compile): class Marker {}; class Foo { public: virtual void

core.sys.posix.setjmp unavailable for OS X?

2018-01-15 Thread bpr via Digitalmars-d-learn
Is there a reason that it's unavailable on OS X when it works fine on Linux? The functions exist on OS X, and it's easy enough to compile C programs using setjmp there; but not D programs. I don't think I'm getting a betterC experience on the Mac. I'd also ask why the there are no D docs for

How to imporve D-translation of these Python list comprehensions ?

2018-01-15 Thread xenon325 via Digitalmars-d-learn
A workmate has recently shown this piece of code to show how nice Python is (we are mostly C and growing C++ shop): import json from itertools import chain srv1 = {'acs': {'ver': '1.2.3', 'rev': '6f2260d'}, 'cms': {'ver': '4.5', 'rev': 'b17a67e'}, 'ots': {'ver': '6.7.80', 'rev':

[Issue 17462] Order of base interfaces affects compiler behavior

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17462 Rainer Schuetze changed: What|Removed |Added CC||r.sagita...@gmx.de

Re: [theory] What is a type?

2018-01-15 Thread Jonathan Marler via Digitalmars-d
On Sunday, 10 October 2010 at 12:28:32 UTC, Justin Johansson wrote: Specifically I have a problem in trying to implement a functional language translator in D. My target language has a rather non-conventional type system, in which, superficially at least, types can be described as being

[Issue 17462] Order of base interfaces affects compiler behavior

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17462 Andrei Alexandrescu changed: What|Removed |Added CC||and...@erdani.com

Re: Proposed Phobos equivalent of wcswidth()

2018-01-15 Thread Jonathan M Davis via Digitalmars-d
On Monday, January 15, 2018 10:37:14 H. S. Teoh via Digitalmars-d wrote: > On Mon, Jan 15, 2018 at 06:20:16PM +, Jack Stouffer via Digitalmars-d wrote: > > On Monday, 15 January 2018 at 17:32:40 UTC, H. S. Teoh wrote: > > > On Mon, Jan 15, 2018 at 02:14:56PM +, Simen Kjærås via > > >

[Issue 18240] New: core.stdc.wchar_ wmemset, etc. should be pure

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18240 Issue ID: 18240 Summary: core.stdc.wchar_ wmemset, etc. should be pure Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: minor

Re: Proposed Phobos equivalent of wcswidth()

2018-01-15 Thread H. S. Teoh via Digitalmars-d
On Mon, Jan 15, 2018 at 06:20:16PM +, Jack Stouffer via Digitalmars-d wrote: > On Monday, 15 January 2018 at 17:32:40 UTC, H. S. Teoh wrote: > > On Mon, Jan 15, 2018 at 02:14:56PM +, Simen Kjærås via Digitalmars-d > > wrote: > > > On Monday, 15 January 2018 at 13:34:09 UTC, Jack Stouffer

[Issue 18239] std.experimental.allocator fillWithMemcpy could use memset when T.sizeof==1

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18239 --- Comment #2 from Nathan S. --- (In reply to Nathan S. from comment #1) > Could also use wmemset when T.sizeof == wint_t.sizeof Unfortunately core.stdc.wchar_.wmemset isn't marked as pure so this would cause some tests

[Issue 18239] std.experimental.allocator fillWithMemcpy could use memset when T.sizeof==1

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18239 Nathan S. changed: What|Removed |Added Summary|std.experimental.allocator

[Issue 18239] std.experimental.allocator fillWithMemcpy could use memset/wmemset for T.sizeof==1 or wint_t.sizeof

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18239 --- Comment #1 from Nathan S. --- Could also use wmemset when T.sizeof == wint_t.sizeof --

[Issue 18239] std.experimental.allocator fillWithMemcpy could use memset/wmemset for T.sizeof==1 or wint_t.sizeof

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18239 Nathan S. changed: What|Removed |Added Summary|std.experimental.allocator

mysql-native: Prepared statements: Direction and future

2018-01-15 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
I've posted (what basically amounts to an article) about my current thoughts on addressing Prepared's current downsides in the next release (v2.0.0), as well as a little bit of future direction of the lib. Anyone interested in mysql-native's prepared statements (especially their interplay

Re: Proposed Phobos equivalent of wcswidth()

2018-01-15 Thread Jack Stouffer via Digitalmars-d
On Monday, 15 January 2018 at 17:32:40 UTC, H. S. Teoh wrote: On Mon, Jan 15, 2018 at 02:14:56PM +, Simen Kjærås via Digitalmars-d wrote: On Monday, 15 January 2018 at 13:34:09 UTC, Jack Stouffer wrote: > std.utf.displayWidth +1 [...] Why std.utf rather than std.uni, though? The way I

[Issue 18239] New: std.experimental.allocator fillWithMemcpy could use memset when T.sizeof==1

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18239 Issue ID: 18239 Summary: std.experimental.allocator fillWithMemcpy could use memset when T.sizeof==1 Product: D Version: D2 Hardware: All OS: All

Does it have an http2 server/client lib like in golang?

2018-01-15 Thread Cergoo via Digitalmars-d-learn
subj

Re: How to run vibe.d web app in XAMPP server ?

2018-01-15 Thread welkam via Digitalmars-d
On Monday, 15 January 2018 at 06:22:13 UTC, Jayam wrote: Is there any way how to deploy the vibe.d web app into XAMPP ? No you cant deploy vibe.d web app into XAMPP. What you can do is to install vibe.d to the same server and tell apache to proxy all requests to vibe.d. I dont know enough

Re: Proposed Phobos equivalent of wcswidth()

2018-01-15 Thread H. S. Teoh via Digitalmars-d
On Mon, Jan 15, 2018 at 02:14:56PM +, Simen Kjærås via Digitalmars-d wrote: > On Monday, 15 January 2018 at 13:34:09 UTC, Jack Stouffer wrote: > > std.utf.displayWidth > > +1 [...] Why std.utf rather than std.uni, though? T -- ASCII stupid question, getty stupid ANSI.

Re: Article: Fuzzing D code with LDC

2018-01-15 Thread Johan Engelen via Digitalmars-d-announce
On Monday, 15 January 2018 at 09:49:24 UTC, Temtaime wrote: // `Throwable`s thrown are not bugs (in contrast to `Errors`). They _can_ be bugs. class Error : Throwable class Exception : Throwable Good catch ( ;-) ) thanks. -Johan

Re: Cannot use local lambda as parameter to non-global template

2018-01-15 Thread Nordlöw via Digitalmars-d-learn
On Monday, 15 January 2018 at 15:27:23 UTC, Meta wrote: void main() { auto arr = [1, 2, 3]; arr.remove!(_ => _ == 1); writeln(arr); } Or was that code meant as an example? The problem occurs when the templated function is a member of the struct `arr`. I've moved the algorithm

Re: Cannot use local lambda as parameter to non-global template

2018-01-15 Thread Ali Çehreli via Digitalmars-d-learn
On 01/15/2018 07:27 AM, Meta wrote: On Monday, 15 January 2018 at 13:55:57 UTC, Nordlöw wrote: The function `remove` is a templated member of a struct instance `x`. Can you give a bit more context? The following code does not cause a compile error: import std.stdio; import std.algorithm;

Re: run.dlang.io can now display ASM + AST + IR

2018-01-15 Thread Martin Tschierschke via Digitalmars-d-announce
On Sunday, 14 January 2018 at 04:18:41 UTC, Seb wrote: It was bad weather in Munich on Saturday, so run.dlang.io got a couple of new cool features: 1) Assembly output ... 2) AST of DMD frontend (after semantic analysis) ... 3) IR (LDC only) ... 4) Permanent flags 5) Stores the latest

Re: Proposed Phobos equivalent of wcswidth()

2018-01-15 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Monday, 15 January 2018 at 15:08:24 UTC, Kagamin wrote: columnWidth as it only makes sense for column-oriented text display. I think displayWidth is better, because "width" is directly linked to hozizontal direction (else it would be called hight), and setting text in colums would still

Web Application Development

2018-01-15 Thread Viewport Tech via Digitalmars-d
We create web applications from the ground up, tailored to your specific needs and that of your business. Weather you need to digitise an existing paper-based form or you want to build a ground-breaking social network. We've got it covered. We use the latest languages, frameworks and

Re: String Type Usage. String vs DString vs WString

2018-01-15 Thread SimonN via Digitalmars-d-learn
On Monday, 15 January 2018 at 14:44:46 UTC, Adam D. Ruppe wrote: On Monday, 15 January 2018 at 06:18:27 UTC, SimonN wrote: D's foreach [...] will autodecode and silently iterate over dchar, not char, even when the input is string That's not true. foreach will only decode on demand: foreach(c;

Re: String Type Usage. String vs DString vs WString

2018-01-15 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, January 15, 2018 14:56:33 Kagamin via Digitalmars-d-learn wrote: > On Monday, 15 January 2018 at 06:18:27 UTC, SimonN wrote: > > D's foreach and D's ranges will autodecode and silently iterate > > over dchar, not char > > foreach doesn't do it silently, decoding must be requested from >

Re: What's equivalent to C#'s select?

2018-01-15 Thread Simen Kjærås via Digitalmars-d-learn
On Monday, 15 January 2018 at 15:24:50 UTC, Marc wrote: I just thought that filter() could be evaluated at compile time too, as others function that I've used so far. Sometimes I don't know if a native function can be evaluated at compile time until I do enum x = func(); Yeah, it takes some

Re: I want to transmit the class name and the member name in the method

2018-01-15 Thread Martin Nowak via Digitalmars-d-learn
On Friday, 5 January 2018 at 07:40:14 UTC, Brian wrote: auto db = new ORM; auto users = db.select(User).where(email.like("*@hotmail.com")).limit(10); Expression templates are a dead-end for any non-trivial queries. You have to embrace SQL to properly use RDMS, at the cost of beginners having

Re: Cannot use local lambda as parameter to non-global template

2018-01-15 Thread Meta via Digitalmars-d-learn
On Monday, 15 January 2018 at 13:55:57 UTC, Nordlöw wrote: Why do I get errors like template instance remove!((_) => _ == 1) cannot use local '__lambda5' as parameter to non-global template remove()(in K key) for x.remove!(_ => _ == 1); but not for x.remove!"a == 11"; ? How are

Re: What's equivalent to C#'s select?

2018-01-15 Thread Marc via Digitalmars-d-learn
On Monday, 15 January 2018 at 07:37:42 UTC, Simen Kjærås wrote: On Sunday, 14 January 2018 at 22:07:22 UTC, Marc wrote: thanks, can i use it at compile time as well? enum isMutableString(string field) = is(typeof(__traits(getMember, >C, field)) == string); static foreach(field;

Re: Cannot use local lambda as parameter to non-global template

2018-01-15 Thread Jacob Carlborg via Digitalmars-d-learn
On 2018-01-15 14:55, Nordlöw wrote: Why do I get errors like template instance remove!((_) => _ == 1) cannot use local '__lambda5' as parameter to non-global template remove()(in K key) for     x.remove!(_ => _ == 1); but not for     x.remove!"a == 11"; ? How are these two lambdas

Re: Proposed Phobos equivalent of wcswidth()

2018-01-15 Thread Kagamin via Digitalmars-d
columnWidth as it only makes sense for column-oriented text display.

Re: Using Postgres connection functions

2018-01-15 Thread Joe via Digitalmars-d-learn
On Monday, 15 January 2018 at 02:28:29 UTC, Matthias Klumpp wrote: In any case, please don't start another Postgres library and consider contributing to one of the existing ones, so that we maybe have one really awesome, 100% complete library at some point. If, on the other hand, your goal

Re: Cannot use local lambda as parameter to non-global template

2018-01-15 Thread Simen Kjærås via Digitalmars-d-learn
On Monday, 15 January 2018 at 13:55:57 UTC, Nordlöw wrote: Why do I get errors like template instance remove!((_) => _ == 1) cannot use local '__lambda5' as parameter to non-global template remove()(in K key) for x.remove!(_ => _ == 1); but not for x.remove!"a == 11"; ? How are

Re: String Type Usage. String vs DString vs WString

2018-01-15 Thread Kagamin via Digitalmars-d-learn
On Monday, 15 January 2018 at 06:18:27 UTC, SimonN wrote: D's foreach and D's ranges will autodecode and silently iterate over dchar, not char foreach doesn't do it silently, decoding must be requested from it by explicitly specifying element type, it can also encode this way.

Re: String Type Usage. String vs DString vs WString

2018-01-15 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 15 January 2018 at 06:18:27 UTC, SimonN wrote: D's foreach [...] will autodecode and silently iterate over dchar, not char, even when the input is string That's not true. foreach will only decode on demand: string s; foreach(c; s) { /* c is a char here, it goes over bytes */ }

Re: Proposed Phobos equivalent of wcswidth()

2018-01-15 Thread Simen Kjærås via Digitalmars-d
On Monday, 15 January 2018 at 13:34:09 UTC, Jack Stouffer wrote: std.utf.displayWidth +1 -- Simen

[Issue 18230] multiwayUnion sets wrong pred lambdas

2018-01-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18230 RazvanN changed: What|Removed |Added CC|

Cannot use local lambda as parameter to non-global template

2018-01-15 Thread Nordlöw via Digitalmars-d-learn
Why do I get errors like template instance remove!((_) => _ == 1) cannot use local '__lambda5' as parameter to non-global template remove()(in K key) for x.remove!(_ => _ == 1); but not for x.remove!"a == 11"; ? How are these two lambdas different? The function `remove` is a

Re: Bump the minimal version required to compile DMD to 2.076.1

2018-01-15 Thread Daniel Kozak via Digitalmars-d
Btw, ther is a gdc which stil uses c++ version of dfrontend, so on DragonFlyBSD you can build dmd using gdc. On Mon, Jan 15, 2018 at 2:25 PM, Daniel Kozak wrote: > So why not to use cross compilation? > > On Mon, Jan 15, 2018 at 2:10 PM, Joakim via Digitalmars-d < >

Re: String Type Usage. String vs DString vs WString

2018-01-15 Thread Patrick Schluter via Digitalmars-d-learn
On Monday, 15 January 2018 at 04:27:15 UTC, Jonathan M Davis wrote: On Monday, January 15, 2018 03:14:02 Tony via Digitalmars-d-learn wrote: On Monday, 15 January 2018 at 02:09:25 UTC, rikki cattermole wrote: > Unicode has three main variants, UTF-8, UTF-16 and UTF-32. > The size of a code

Re: Proposed Phobos equivalent of wcswidth()

2018-01-15 Thread Jack Stouffer via Digitalmars-d
On Saturday, 13 January 2018 at 17:26:52 UTC, H. S. Teoh wrote: ... Thanks for taking the time to do this. And now the obligatory bikeshed: what should the Phobos equivalent of wcswidth be called? std.utf.displayWidth

Re: Bump the minimal version required to compile DMD to 2.076.1

2018-01-15 Thread Daniel Kozak via Digitalmars-d
So why not to use cross compilation? On Mon, Jan 15, 2018 at 2:10 PM, Joakim via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Monday, 15 January 2018 at 12:15:27 UTC, Temtaime wrote: > >> And what builds C++ compiler from source ? :) >> > > The system C/C++ compiler is already built

Re: Bump the minimal version required to compile DMD to 2.076.1

2018-01-15 Thread Joakim via Digitalmars-d
On Monday, 15 January 2018 at 12:15:27 UTC, Temtaime wrote: And what builds C++ compiler from source ? :) The system C/C++ compiler is already built and there, obviously. Since nobody ships a D compiler with their OS, I'm not sure how you think that's relevant. On Monday, 15 January 2018

Re: Bump the minimal version required to compile DMD to 2.076.1

2018-01-15 Thread Daniel Kozak via Digitalmars-d
Exactly, there is no reason to build 2.067, 2.076, and 2.078, just build the latest one with the previos one. It is common (in case you do not have dlang compiler in your distribution) to start with downloading existing binary and compile lastest version as a package, then you can use this package

Re: Bump the minimal version required to compile DMD to 2.076.1

2018-01-15 Thread Temtaime via Digitalmars-d
And what builds C++ compiler from source ? :)

I didn't succeed in creating an empty project for a long time

2018-01-15 Thread Brian via Digitalmars-d
zoujiaqing@Brian-XPS MINGW64 /d/Projects $ dub init serializable -v Using dub registry url 'https://code.dlang.org/' Refreshing local packages (refresh existing: true)... Looking for local package map at C:\ProgramData\dub\packages\local-packages.json Looking for local package map at

  1   2   >