Re: Mobile is the new PC and AArch64 is the new x64

2018-09-16 Thread Patrick Schluter via Digitalmars-d
On Saturday, 15 September 2018 at 15:25:55 UTC, Joakim wrote: You've probably heard of the possibly apocryphal story of how Blackberry and Nokia engineers disassembled the first iPhone and dismissed it because it only got a day of battery life, while their devices lasted much longer. They

DCD 0.9.13 and D-Scanner 0.5.11

2018-09-16 Thread Basile B. via Digitalmars-d-announce
See detailed changelog and pre-compiled binaries: https://github.com/dlang-community/DCD/releases/tag/v0.9.13 https://github.com/dlang-community/D-Scanner/releases/tag/v0.5.11 DCD update highly recommended if you're still on v0.9.11 or older.

Is it possible to translate this API's C headers?

2018-09-16 Thread spikespaz via Digitalmars-d-learn
There is a project that I wish to use from D (https://ultralig.ht). It's Electron, but with forked WebKit and the samples are very, very fast. This is a great compromise between wanting to have a very custom interface and not wanting to use the slow Electron/Sciter/Awesomium/WebView. I

Re: DMD32 compiling gtkd out of memory on 32bit Windows 7 machine

2018-09-16 Thread dangbinghoo via Digitalmars-d-learn
On Friday, 14 September 2018 at 17:34:59 UTC, Mike Wey wrote: You will also have to pass `--build=plain` to dub because of a optlink bug. https://issues.dlang.org/show_bug.cgi?id=15418 thanks Mike, I tried using `--build-plain`, optlink didn't report out of memory, but it hangs ! ```

Re: DIP 1015--removal of integer & character literal conversion to bool--Final Review

2018-09-16 Thread Nicholas Wilson via Digitalmars-d
On Sunday, 16 September 2018 at 23:59:18 UTC, aliak wrote: What about: enum E: bool { no, yes } void main() { E e = cast(E)(0); } Would be illegal I assume? You have an explicit cast, so no, it would be fine.

Re: Mobile is the new PC and AArch64 is the new x64

2018-09-16 Thread Dave Jones via Digitalmars-d
On Sunday, 16 September 2018 at 15:11:42 UTC, Joakim wrote: On Sunday, 16 September 2018 at 10:25:30 UTC, Dave Jones wrote: Some analysts have predicted that PC sales will plateau at some point and if that's where we're at now then 30% drop in shipments is not death of the market. I see no

Re: DIP 1015--removal of integer & character literal conversion to bool--Final Review

2018-09-16 Thread aliak via Digitalmars-d
On Sunday, 16 September 2018 at 01:29:38 UTC, Mike Franklin wrote: On Saturday, 15 September 2018 at 20:07:06 UTC, Steven Schveighoffer wrote: Looks pretty good to me. The only question I have is on this part: enum YesNo : bool { no, yes } // Existing implementation: OK

Re: A facebook group for D programmers

2018-09-16 Thread Steven Schveighoffer via Digitalmars-d-announce
On 9/16/18 2:51 PM, Peter Alexander wrote: On Sunday, 16 September 2018 at 20:19:32 UTC, Murilo wrote: Hello everyone, I was so amazed with the D language that I created a facebook group for us all to be connected and share information. It is called "Programming in D", it has already 55

Re: int/longRe: DIP 1015--removal of integer & character literal conversion to bool--Final Review

2018-09-16 Thread Neia Neutuladh via Digitalmars-d
On Sunday, 16 September 2018 at 17:33:27 UTC, Steven Schveighoffer wrote: As precedent, we do have -transition=intpromote, which disables the requirement for casting smaller integers to int first. And -dip1000. Maybe it would be nice to have a generic -future=[changeid] flag. I'd like it if

Re: phobo's std.file is completely broke!

2018-09-16 Thread Vladimir Panteleev via Digitalmars-d
To elaborate: On Sunday, 16 September 2018 at 22:40:45 UTC, Vladimir Panteleev wrote: If *YOU* are OK with the consequences of complexity, implement this in YOUR code, but do not enforce it upon others. This is much better done in user code anyway, because you only need to expand /

Re: phobo's std.file is completely broke!

2018-09-16 Thread Vladimir Panteleev via Digitalmars-d
On Sunday, 16 September 2018 at 16:17:21 UTC, tide wrote: Nothing is "locked behind management". If you feel that some issue important to you is stalled, you can create a forum thread, or email Walter/Andrei to ask for a resolution. Funny the other guy was saying to create a bugzilla issue.

Re: Mobile is the new PC and AArch64 is the new x64

2018-09-16 Thread Gambler via Digitalmars-d
On 9/12/2018 11:38 AM, Joakim wrote:> On Wednesday, 12 September 2018 at 06:41:38 UTC, Gambler wrote: >> On 9/10/2018 9:43 AM, Joakim wrote: >>> Yes, I know, these devices won't replace your quad-core Xeon >>> workstation with 32-64 GBs of RAM anytime soon, but most people don't >>> need anywhere

Re: A facebook group for D programmers

2018-09-16 Thread Peter Alexander via Digitalmars-d-announce
On Sunday, 16 September 2018 at 20:19:32 UTC, Murilo wrote: Hello everyone, I was so amazed with the D language that I created a facebook group for us all to be connected and share information. It is called "Programming in D", it has already 55 members. Please join the group and invite

A facebook group for D programmers

2018-09-16 Thread Murilo via Digitalmars-d-announce
Hello everyone, I was so amazed with the D language that I created a facebook group for us all to be connected and share information. It is called "Programming in D", it has already 55 members. Please join the group and invite everyone else to join it. That way we can show the world how

Re: More fun with autodecoding

2018-09-16 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 09/15/2018 04:29 PM, Jonathan M Davis wrote: Adding any sort of Concepts feature to D would be very much at odds with DbI. I'm not very familiar with C++'s attempted approaches to concepts, so maybe we're thinking of two different things by "concepts", but I don't see why it would be at

[Issue 15512] extern(C++, ns) should consider taking a string

2018-09-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15512 Manu changed: What|Removed |Added Keywords||C++ --

[Issue 18906] Template specialisations should not be stripped if they're not called

2018-09-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18906 Manu changed: What|Removed |Added Keywords||C++, industry Severity|normal

[Issue 18999] MSCRT selection specifies _ITERATOR_DEBUG_LEVEL and produces a `version`

2018-09-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18999 Manu changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: Bug in VD

2018-09-16 Thread Rainer Schuetze via Digitalmars-d-debugger
This works for me with dmd 2.081 for -m64 and -m32mscoff void foo() { string[] x = ["1"]; foreach(string a; x) { auto b = a; } string[] y = ["2"]; foreach(string a; y) { auto b = a; } } Please show a full example

Re: Fast linear search for non-null key in slice of Nullable(T, T.max)

2018-09-16 Thread Per Nordlöw via Digitalmars-d-learn
On Sunday, 16 September 2018 at 16:50:32 UTC, Neia Neutuladh wrote: On Sunday, 16 September 2018 at 16:28:20 UTC, Per Nordlöw wrote: If I have alias N = Nullable!(T, T nullValue) fed as template parameter to another template how can I at compile-time get the `nullValue` ? import

[Issue 18851] std.net.curl.post cannot be used with !ubyte

2018-09-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18851 wolframw changed: What|Removed |Added CC||wolfr...@protonmail.com

Re: extern(C++, ns) is wrong

2018-09-16 Thread Steven Schveighoffer via Digitalmars-d
On 9/14/18 6:41 PM, Neia Neutuladh wrote: Specifically, Walter wants this to compile: module whatever; extern(C++, foo) void doStuff(); extern(C++, bar) void doStuff(); And he's not too concerned that you might have to use doubly fully qualified names to refer to C++ symbols, like: import

Re: int/longRe: DIP 1015--removal of integer & character literal conversion to bool--Final Review

2018-09-16 Thread Steven Schveighoffer via Digitalmars-d
On 9/15/18 8:36 PM, Nicholas Wilson wrote: Without it, I get a (possibly quite a lot of) deprecation warnings and I have to insert a cast to the corresponding type, e.g. f(cast(int)E.a)/g(cast(long)(a - b)), to verify the behaviour under the new system and silence the deprecation warning

Re: Fast linear search for non-null key in slice of Nullable(T, T.max)

2018-09-16 Thread Neia Neutuladh via Digitalmars-d-learn
On Sunday, 16 September 2018 at 16:28:20 UTC, Per Nordlöw wrote: If I have alias N = Nullable!(T, T nullValue) fed as template parameter to another template how can I at compile-time get the `nullValue` ? import std.traits; enum nullValue = TemplateArgsOf!(N)[1];

Re: Cannot use UFCS in lambda?

2018-09-16 Thread Paul Backus via Digitalmars-d-learn
On Sunday, 16 September 2018 at 10:55:43 UTC, berni wrote: The problem is more general: you can only use top-level symbols in UFCS. You can use an identity alias template to bypass this: https://blog.thecybershadow.net/2015/04/28/the-amazing-template-that-does-nothing/ (search for UFCS in the

Re: phobo's std.file is completely broke!

2018-09-16 Thread tide via Digitalmars-d
On Sunday, 16 September 2018 at 03:19:12 UTC, Vladimir Panteleev wrote: On Sunday, 16 September 2018 at 02:58:30 UTC, tide wrote: There are a lot of issues that aren't simple bugs that just anyone can fix. They are issues that are locked behind management. One's that are 4 years old for

Fast linear search for non-null key in slice of Nullable(T, T.max)

2018-09-16 Thread Per Nordlöw via Digitalmars-d-learn
If I have alias N = Nullable!(T, T nullValue) fed as template parameter to another template how can I at compile-time get the `nullValue` ? I need this to implement fast linear search over a slice of type Nullable!(ulong, ulong.max)[] searching for a non-null key without needing to

Re: phobo's std.file is completely broke!

2018-09-16 Thread tide via Digitalmars-d
On Sunday, 16 September 2018 at 03:19:12 UTC, Vladimir Panteleev wrote: On Sunday, 16 September 2018 at 02:58:30 UTC, tide wrote: There are a lot of issues that aren't simple bugs that just anyone can fix. They are issues that are locked behind management. One's that are 4 years old for

Re: phobo's std.file is completely broke!

2018-09-16 Thread tide via Digitalmars-d
On Sunday, 16 September 2018 at 03:19:12 UTC, Vladimir Panteleev wrote: On Sunday, 16 September 2018 at 02:58:30 UTC, tide wrote: There are a lot of issues that aren't simple bugs that just anyone can fix. They are issues that are locked behind management. One's that are 4 years old for

Re: Mobile is the new PC and AArch64 is the new x64

2018-09-16 Thread tide via Digitalmars-d
On Sunday, 16 September 2018 at 15:56:25 UTC, Neia Neutuladh wrote: Better network connectivity and cloud-based gaming would erode another segment of powerful personal computers. I wish companies actually cared for providing better networks. But the truth is they are fine charging for their

Re: Mobile is the new PC and AArch64 is the new x64

2018-09-16 Thread Neia Neutuladh via Digitalmars-d
On Sunday, 16 September 2018 at 10:25:30 UTC, Dave Jones wrote: Because for about £300 you can get an intel NUC system with 120GB SSD, which is more powerful and more upgradeable than your £700 mobile device. And some people still want that. For the typical person, it's more likely that

Re: Mobile is the new PC and AArch64 is the new x64

2018-09-16 Thread tide via Digitalmars-d
That is, it is not just the performance that affects the sales of phones. There's a lot of factors that lead to there being new phones sales. Know someone that's gone through 3 phones in comparison to just the one I have. Treadmills eat phones for breakfast.

Re: Mobile is the new PC and AArch64 is the new x64

2018-09-16 Thread tide via Digitalmars-d
On Sunday, 16 September 2018 at 15:11:42 UTC, Joakim wrote: I say that almost 30% drop in PC sales over the last 7 years is mostly due to the rise of mobile. I think a large part of it is that PCs got fast enough for most people about 7-10 years ago. So it was a combination of mobile, and

Re: Mobile is the new PC and AArch64 is the new x64

2018-09-16 Thread Joakim via Digitalmars-d
On Sunday, 16 September 2018 at 10:25:30 UTC, Dave Jones wrote: On Sunday, 16 September 2018 at 04:47:11 UTC, Joakim wrote: On Sunday, 16 September 2018 at 01:03:27 UTC, Dave Jones wrote: I know a lot of people who did, which explains the 28% drop in PC sales since they peaked in 2011, the

Re: Manual delegates

2018-09-16 Thread Vladimir Panteleev via Digitalmars-d-learn
On Sunday, 16 September 2018 at 14:12:27 UTC, Guillaume Piolat wrote: Anyone has any information about the ABI of delegates? In particular how to call them with a particular "this"/frame pointer? To solve a hairy problem I need a delegate with a synthesized frame pointer.

Re: Manual delegates

2018-09-16 Thread Guillaume Piolat via Digitalmars-d-learn
On Sunday, 16 September 2018 at 14:12:27 UTC, Guillaume Piolat wrote: In particular how to call them with a particular "this"/frame pointer? Related thread: https://forum.dlang.org/post/wjbhpztovxratexao...@forum.dlang.org

Manual delegates

2018-09-16 Thread Guillaume Piolat via Digitalmars-d-learn
Anyone has any information about the ABI of delegates? In particular how to call them with a particular "this"/frame pointer? To solve a hairy problem I need a delegate with a synthesized frame pointer. https://dpaste.dzfl.pl/cf44417c98f9 The problem is that delegate forwarding seems to

Re: DIP 1015--removal of integer & character literal conversion to bool--Final Review

2018-09-16 Thread Steven Schveighoffer via Digitalmars-d
On 9/15/18 6:29 PM, Mike Franklin wrote: On Saturday, 15 September 2018 at 20:07:06 UTC, Steven Schveighoffer wrote: Looks pretty good to me. The only question I have is on this part: enum YesNo : bool { no, yes } // Existing implementation: OK   // After stage 1:

Re: try find the fastest way to convert a group string into index?

2018-09-16 Thread learnfirst1 via Digitalmars-d-learn
On Sunday, 16 September 2018 at 11:51:24 UTC, learnfirst1 wrote: On Sunday, 16 September 2018 at 11:30:11 UTC, learnfirst1 wrote: On Sunday, 16 September 2018 at 10:14:24 UTC, Vladimir Panteleev wrote: I will test pcre solution vs mpfc for benchmark. the pcre is easy to deal with low/up

[Issue 18957] extern(C++) doesn't mangle 'std' correctly on posix systems

2018-09-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18957 Илья Ярошенко changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|---

[Issue 19248] Wrong mangle for C++ const STL classes/structs

2018-09-16 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19248 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/9cb46f842778b3b7d3cb4efe698c32765fd72220 fix Issue 19248

[Issue 19248] Wrong mangle for C++ const STL classes/structs

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

Re: try find the fastest way to convert a group string into index?

2018-09-16 Thread learnfirst1 via Digitalmars-d-learn
On Sunday, 16 September 2018 at 11:30:11 UTC, learnfirst1 wrote: On Sunday, 16 September 2018 at 10:14:24 UTC, Vladimir Panteleev wrote: It has to be case Case Insensitive, so before I run mpfh for each new request headers, I need to convert the keys into low or up case. this value can be

Re: try find the fastest way to convert a group string into index?

2018-09-16 Thread learnfirst1 via Digitalmars-d-learn
On Sunday, 16 September 2018 at 10:14:24 UTC, Vladimir Panteleev wrote: On Sunday, 16 September 2018 at 10:04:09 UTC, learnfirst1 wrote: how to make this more fast like with one loop and get the results. thanks for reply, minimal perfect hashing seems good for this task, I will do more test

Re: Cannot use UFCS in lambda?

2018-09-16 Thread berni via Digitalmars-d-learn
The problem is more general: you can only use top-level symbols in UFCS. You can use an identity alias template to bypass this: https://blog.thecybershadow.net/2015/04/28/the-amazing-template-that-does-nothing/ (search for UFCS in the page). Good to know. :-)

Re: try find the fastest way to convert a group string into index?

2018-09-16 Thread Diederik de Groot via Digitalmars-d-learn
Homework ? I think it would also be better to only walk/match the Header.data and header_keys only once (using the generated switch statement that Vladimir suggested). So your Headers struct should have a parse() function, which will match all of the headers to the keys and store them

Re: Mobile is the new PC and AArch64 is the new x64

2018-09-16 Thread Dave Jones via Digitalmars-d
On Sunday, 16 September 2018 at 04:47:11 UTC, Joakim wrote: On Sunday, 16 September 2018 at 01:03:27 UTC, Dave Jones wrote: I know a lot of people who did, which explains the 28% drop in PC sales since they peaked in 2011, the year after the iPad came out. Many of those people who used to buy

Re: try find the fastest way to convert a group string into index?

2018-09-16 Thread Vladimir Panteleev via Digitalmars-d-learn
On Sunday, 16 September 2018 at 10:04:09 UTC, learnfirst1 wrote: how to make this more fast like with one loop and get the results. This is a more general problem than any specific programming language; you may want to look into perfect hashing:

try find the fastest way to convert a group string into index?

2018-09-16 Thread learnfirst1 via Digitalmars-d-learn
The use case is translate http header key into enum. this is the current code : https://run.dlang.io/is/lpw29w In this fake code I only list a few headers, it should be more. but less then 128 and only include the a few codes. how to make this more fast like with one loop and get the

Re: Cannot use UFCS in lambda?

2018-09-16 Thread Vladimir Panteleev via Digitalmars-d-learn
On Sunday, 16 September 2018 at 09:46:15 UTC, berni wrote: Where is my mistake? Lambdas are not the issue here. The problem is more general: you can only use top-level symbols in UFCS. You can use an identity alias template to bypass this:

Cannot use UFCS in lambda?

2018-09-16 Thread berni via Digitalmars-d-learn
The following program does not compile: import std.stdio; import std.algorithm; struct A { struct S { int x; } const bool foo(in S s, in int k) { return s.xa.foo(3)).writeln; } } void main() { A().bar(); } I get (using rdmd): test.d(18): Error: no

Re: array to string functional?

2018-09-16 Thread Vladimir Panteleev via Digitalmars-d-learn
On Friday, 14 September 2018 at 20:43:45 UTC, SrMordred wrote: On Friday, 14 September 2018 at 19:44:37 UTC, berni wrote: a) I've got an int[] which contains only 0 und 1. And I want to end with a string, containing 0 and 1. So [1,1,0,1,0,1] should become "110101". Of course I can do this with