Scriptlike v0.8.0

2015-06-13 Thread Nick Sabalausky via Digitalmars-d-announce
A bunch of new updates to Scriptlike: A library to aid in writing script-like programs in D. Home: https://github.com/Abscissa/scriptlike Dub: http://code.dlang.org/packages/scriptlike Full changelog: https://github.com/Abscissa/scriptlike/blob/master/CHANGELOG.md Highlights (more info at full

Re: appender!(dchar[]) put fail

2015-06-13 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/13/15 6:45 AM, kerdemdemir wrote: I have two strings(stringB,stringC) which I need to repeat(bCount times, cCountTimes) and then chain. auto charAppender = appender!(dchar[]); auto totalStr = stringB.repeat(bCount).chain(stringC.repeat(cCount)); This compiles and works ok, But when I try

Re: 64-bit DMD .exe for windows?

2015-06-13 Thread Etienne Cimon via Digitalmars-d
On Sunday, 14 June 2015 at 04:09:56 UTC, E.S. Quinn wrote: I've got a project that, due to extensive use of LuaD conversions, templates with a lot of parameters, and CTFE, has managed to require 4gb of ram to compile. Which means that, for the moment, I can't build on windows as the dmd

Re: What is D's minimum requirements on Mac?

2015-06-13 Thread Rikki Cattermole via Digitalmars-d-learn
On 14/06/2015 12:32 p.m., Adam D. Ruppe wrote: On Friday, 12 June 2015 at 07:17:44 UTC, Jacob Carlborg wrote: I'm running a OS X 10.7 on Macbook from 2006, it's working perfectly fine. Although the whole computer it's quite slow, it only has 2 GB of RAM. Thanks everyone. A coworker says he

how come is this legal? 'void fun(int){ }' ?

2015-06-13 Thread Timothee Cour via Digitalmars-d-learn
I understand this is legal for declaration wo definition (void fun(int);) but why allow this: void test(int){} ?

[Issue 14696] destructor for temporary called before statement is complete with ternary operator and alias this

2015-06-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14696 --- Comment #1 from Ketmar Dark ket...@ketmar.no-ip.org --- the same bug on HEAD without an alias: //alias get this; ... foo(args.length ? makes().get : null); --

Re: Question about garbage collection specification

2015-06-13 Thread ketmar via Digitalmars-d
On Sat, 13 Jun 2015 22:09:52 +, deadalnix wrote: I haven't read something that ridiculous in a while. you're welcome. signature.asc Description: PGP signature

Re: DIP80: phobos additions

2015-06-13 Thread ketmar via Digitalmars-d
On Sat, 13 Jun 2015 21:57:42 -0400, Steven Schveighoffer wrote: A rather cool usage of QR code I saw was a sticker on a device that was a link to the PDF of the manual. it's k001, but i'll take a printed URL for it in any time. the old good URL that i can read with my eyes. signature.asc

Re: how come is this legal? 'void fun(int){ }' ?

2015-06-13 Thread ketmar via Digitalmars-d-learn
On Sun, 14 Jun 2015 05:11:17 +, Maxim Fomin wrote: On Sunday, 14 June 2015 at 01:20:39 UTC, Timothee Cour wrote: I understand this is legal for declaration wo definition (void fun(int);) but why allow this: void test(int){} ? Actually it is void test(int _param_0) { } You can test by

Re: Phobos addition formal review: std.experimental.allocator

2015-06-13 Thread Andrei Alexandrescu via Digitalmars-d
On 6/13/15 4:16 PM, ZombineDev wrote: On Saturday, 13 June 2015 at 15:48:31 UTC, Andrei Alexandrescu wrote: On 6/13/15 3:14 AM, Dicebot wrote: Andrei, have you considered creating additional std.allocator.impl package and moving actual allocators there? Or, probably, the other way around with

64-bit DMD .exe for windows?

2015-06-13 Thread E.S. Quinn via Digitalmars-d
I've got a project that, due to extensive use of LuaD conversions, templates with a lot of parameters, and CTFE, has managed to require 4gb of ram to compile. Which means that, for the moment, I can't build on windows as the dmd compiler is a 32-bit executable and throws an out of memory

Are stack+heap classes possible in D?

2015-06-13 Thread FujiBar via Digitalmars-d-learn
I have read that in D structs are always allocated on the stack while classes are always allocated on the heap. Well, I often have classes where I want some instances on the stack, some on the heap. So.. what to do?

Re: Are stack+heap classes possible in D?

2015-06-13 Thread FujiBar via Digitalmars-d-learn
On Sunday, 14 June 2015 at 01:31:25 UTC, Adam D. Ruppe wrote: On Sunday, 14 June 2015 at 00:52:20 UTC, FujiBar wrote: I have read that in D structs are always allocated on the stack while classes are always allocated on the heap. That's not true; it is a really common misconception. Putting

[Issue 14696] New: destructor for temporary called before statement is complete with ternary operator and alias this

2015-06-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14696 Issue ID: 14696 Summary: destructor for temporary called before statement is complete with ternary operator and alias this Product: D Version: D2 Hardware: All

gen-package-version v0.9.0: New: Auto-generate version/timestamp info

2015-06-13 Thread Nick Sabalausky via Digitalmars-d-announce
This was kind of taken from a cool trick I saw in dub's buildscript, but I figured it would be useful to have generalized in a convenient package, no messing with shell scripts or anything. https://github.com/Abscissa/gen-package-version gen-package-version: Automatically generate a D module

Re: appender!(dchar[]) put fail

2015-06-13 Thread Ali Çehreli via Digitalmars-d-learn
On 06/13/2015 04:23 AM, Quentin Ladeveze wrote: The problem is that your appender is a char appender, and you try to put a dstring into it. Replace : charAppender.put(totalStr); by : foreach(elem; totalStr){ charAppender.put(elem); } elem will be a dchar, so it will work. To

Re: Phobos addition formal review: std.experimental.allocator

2015-06-13 Thread ZombineDev via Digitalmars-d
On Saturday, 13 June 2015 at 15:48:31 UTC, Andrei Alexandrescu wrote: On 6/13/15 3:14 AM, Dicebot wrote: Andrei, have you considered creating additional std.allocator.impl package and moving actual allocators there? Or, probably, the other way around with std.allocator.core Existing flat

[Issue 14693] @property return type not generated in .di file

2015-06-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14693 Temtaime temta...@gmail.com changed: What|Removed |Added CC||temta...@gmail.com --- Comment

Re: DIP80: phobos additions

2015-06-13 Thread jmh530 via Digitalmars-d
On Saturday, 13 June 2015 at 11:18:54 UTC, Ola Fosheim Grøstad wrote: I think linear algebra should have the same syntax for small and large matrices and switch representation behind the scenes. Switching representations behind the scenes? Sounds complicated. I would think that if you were

Re: how come is this legal? 'void fun(int){ }' ?

2015-06-13 Thread Maxim Fomin via Digitalmars-d-learn
On Sunday, 14 June 2015 at 01:20:39 UTC, Timothee Cour wrote: I understand this is legal for declaration wo definition (void fun(int);) but why allow this: void test(int){} ? Actually it is void test(int _param_0) { } You can test by compiling void test(int) { _param_0 = 0; } Nameless

Re: how come is this legal? 'void fun(int){ }' ?

2015-06-13 Thread Adam D. Ruppe via Digitalmars-d-learn
Sometimes you have empty functions and/or unused parameters just to fulfill some interface but you don't actually care about the arguments passed. No need to name them if you aren't going to use them.

Re: Are stack+heap classes possible in D?

2015-06-13 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 14 June 2015 at 00:52:20 UTC, FujiBar wrote: I have read that in D structs are always allocated on the stack while classes are always allocated on the heap. That's not true; it is a really common misconception. Putting a struct on the heap is trivial and built into the language:

Re: version: multiple conditions

2015-06-13 Thread Steven Schveighoffer via Digitalmars-d
On 6/13/15 4:57 PM, bitwise wrote: What is the rationale for not allowing multiple version conditions? Example: version(iOS || Android) { pthread_create(...) } else version(Win32) { CreateThread(...) } I wasn't able to find the conversations on this. I heard rumors in DLearn that

Re: Phobos addition formal review: std.experimental.allocator

2015-06-13 Thread weaselcat via Digitalmars-d
On Sunday, 14 June 2015 at 00:24:51 UTC, Andrei Alexandrescu wrote: On 6/13/15 4:16 PM, ZombineDev wrote: On Saturday, 13 June 2015 at 15:48:31 UTC, Andrei Alexandrescu wrote: On 6/13/15 3:14 AM, Dicebot wrote: Andrei, have you considered creating additional std.allocator.impl package and

Re: version: multiple conditions

2015-06-13 Thread Etienne Cimon via Digitalmars-d
On Saturday, 13 June 2015 at 21:51:43 UTC, bitwise wrote: I shouldn't have to add another version just for that last dlopen block. It's not finegrained control, it's cruft. Bit It works with constants definition files.

Re: Adding pclmulqdq assembly instruction to dlang asm.

2015-06-13 Thread Etienne Cimon via Digitalmars-d
On Saturday, 13 June 2015 at 19:48:07 UTC, \u2603 wrote: pclmulqdq is an assembly instruction on Intel CPUs that has been introduced together with the AES instructions. pclmulqdq provides multiplication on binary fields and is very usefull for implementing fast and timing attack resistant

Re: __traits getMember is context sensetive?

2015-06-13 Thread JDemler via Digitalmars-d-learn
I have another one :) module test; struct S{ string member1; int member2; } string test(string[] a) { const S s = { member1:It is also important to go to Mars!}; const string y = a[0]; return y; } void main() { enum e = [member1,member2]; pragma(msg, e[0]); pragma(msg,

Re: DIP80: phobos additions

2015-06-13 Thread Steven Schveighoffer via Digitalmars-d
On 6/13/15 11:46 AM, Nick Sabalausky wrote: On 06/08/2015 03:55 AM, ezneh wrote: - Create / read QR codes, maybe ? It seems we see more and more QR Codes here and there, so it could potentially be worth it I see them everywhere, but does anyone ever actually use them? Usually it's just an

Re: __traits getMember is context sensetive?

2015-06-13 Thread ketmar via Digitalmars-d-learn
oh, seems that i managed to make everything even less understandable... signature.asc Description: PGP signature

Re: __traits getMember is context sensetive?

2015-06-13 Thread ketmar via Digitalmars-d-learn
On Sat, 13 Jun 2015 23:55:53 +, JDemler wrote: After a bit of rethinking: I guess the compiler goes through 2 loops: the first resolves __traits, the second does ctfe. That would explain this behavior. a is not present to the compiler while it tries to resolve my __traits call, but

Re: appender!(dchar[]) put fail

2015-06-13 Thread kerdemdemir via Digitalmars-d-learn
On Saturday, 13 June 2015 at 13:09:20 UTC, Dennis Ritchie wrote: auto stringB = readln.chomp.map!(to!dchar).array; auto stringC = readln.chomp.map!(to!dchar).array; auto charAppender = appender!(dchar[][]); auto totalStr = stringB.repeat(3).chain(stringC.repeat(5));

Re: appender!(dchar[]) put fail

2015-06-13 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 13 June 2015 at 13:32:19 UTC, kerdemdemir wrote: One more question I am asking those kind of questions to understand and not ask same stuff over and over, : auto totalStr = chain(stringB.replicate(bCount), stringC.replicate(cCount)); writeln(typeof(totalStr.array()).stringof);

Re: appender!(dchar[]) put fail

2015-06-13 Thread Quentin Ladeveze via Digitalmars-d-learn
On Saturday, 13 June 2015 at 12:02:10 UTC, kerdemdemir wrote: The problem is that your appender is a char appender, and you try to put a dstring into it. Replace : charAppender.put(totalStr); by : foreach(elem; totalStr){ charAppender.put(elem); } elem will be a dchar, so it will work.

Re: Question about garbage collection specification

2015-06-13 Thread via Digitalmars-d
On Saturday, 13 June 2015 at 12:28:15 UTC, rsw0x wrote: There's not even a warning on them that they're violating the garbage collector specification, don't you think that's a little important? https://github.com/D-Programming-Language/phobos/pull/3411

Re: appender!(dchar[]) put fail

2015-06-13 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 13 June 2015 at 13:01:29 UTC, kerdemdemir wrote: Sorry to making the discussion longer and wasting your times. But I am looking for a way without for loops. Also looping every element one by one does not seems very efficient to me. Any advices for that? Maybe it fit? auto

Re: DIP80: phobos additions

2015-06-13 Thread Timon Gehr via Digitalmars-d
On 06/13/2015 12:35 PM, Tofu Ninja wrote: On Saturday, 13 June 2015 at 08:45:20 UTC, John Colvin wrote: The tiny subset of numerical linear algebra that is relevant for graphics (mostly very basic operations, 2,3 or 4 dimensions) is not at all representative of the whole. The algorithms are

Re: appender!(dchar[]) put fail

2015-06-13 Thread kerdemdemir via Digitalmars-d-learn
It is the same, but totalStr is not a dchar[]. It's a Result (a type internal to the chain function ) which is a range. The foreach loop iterates over Result, which returns dchar[]. So if you try to do something like that : charAppender.put(totalStr.array), it won't work because

Re: Question about garbage collection specification

2015-06-13 Thread ketmar via Digitalmars-d
On Sat, 13 Jun 2015 12:28:13 +, rsw0x wrote: There's not even a warning on them that they're violating the garbage collector specification, don't you think that's a little important? i believe that if one needs to do such things, he is knowledgeable enough to foresee the possible

Re: appender!(dchar[]) put fail

2015-06-13 Thread Quentin Ladeveze via Digitalmars-d-learn
On Saturday, 13 June 2015 at 13:32:19 UTC, kerdemdemir wrote: Thanks lot that is really good. One more question I am asking those kind of questions to understand and not ask same stuff over and over, : Don't worry, there is learn in D.learn auto totalStr =

Re: Conditional Compilation Multiple Versions

2015-06-13 Thread anonymous via Digitalmars-d-learn
On Saturday, 13 June 2015 at 00:47:37 UTC, Mike Parker wrote: // config.d version(One) enum One = true; else enum One = false; version(Two) enum Two = true; else enum Two = false; // other.d import config; static if(One || Two) { ... } Taking it one step further: template Version(string

Announcing dplug, a toolkit for making audio plugins with D

2015-06-13 Thread ponce via Digitalmars-d-announce
dplug is a library for audio plugin development. https://github.com/p0nce/dplug http://code.dlang.org/packages/dplug It's aim is to be a lean alternative to JUCE and IPlug, the most used C++ libraries in this space. It is currently less useful since supporting only VST 2.x on Windows. The

Re: std.(experimental.)logger voting manager wanted

2015-06-13 Thread Adrian Matoga via Digitalmars-d
On Saturday, 13 June 2015 at 08:17:24 UTC, extrawurst wrote: I found one issue using it the last day: It does not seem to be formatting arguments in the XYZf() methods quite the same as writefln. for example an exception object ist not automatically converted to call its .toString() when

Re: New D tool releases

2015-06-13 Thread Hans-Albert Maritz via Digitalmars-d-announce
On Monday, 8 June 2015 at 19:18:03 UTC, Brian Schott wrote: Dfix 0.2.2: https://github.com/Hackerpilot/dfix/releases/tag/v0.2.2 * Fixed a bug that caused the string concatenation fix to be applied inside of deprecated attributes. I plan to revert this fix if dmd starts accepting

[Issue 14560] [REG2.058] Strange -inline behavior

2015-06-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14560 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull, wrong-code

[Issue 2775] private ignored for templates

2015-06-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=2775 Adrian Matoga e...@atari8.info changed: What|Removed |Added CC||e...@atari8.info --- Comment

Re: std.(experimental.)logger voting manager wanted

2015-06-13 Thread extrawurst via Digitalmars-d
On Friday, 12 June 2015 at 12:58:46 UTC, Robert burner Schadek wrote: std.(experimental.)logger has been in phobos for one release. The idea was to mature stuff in experimental for one release and then have a vote on inclusion into phobos as std.logger. I would like to see this vote happen

Re: std.(experimental.)logger voting manager wanted

2015-06-13 Thread Andrei Alexandrescu via Digitalmars-d
On 6/12/15 5:58 AM, Robert burner Schadek wrote: std.(experimental.)logger has been in phobos for one release. The idea was to mature stuff in experimental for one release and then have a vote on inclusion into phobos as std.logger. I would like to see this vote happen before 2.068.

Re: DIP80: phobos additions

2015-06-13 Thread weaselcat via Digitalmars-d
On Saturday, 13 June 2015 at 16:53:22 UTC, Nick Sabalausky wrote: On 06/07/2015 02:27 PM, Robert burner Schadek wrote: Phobos is awesome, the libs of go, python and rust only have better marketing. As discussed on dconf, phobos needs to become big and blow the rest out of the sky.

Re: Qualified destructors / immutable objects

2015-06-13 Thread Daniel Kozak via Digitalmars-d-learn
On Friday, 12 June 2015 at 15:36:22 UTC, anonymous wrote: no need for ~this() to modify immutable data: class C { int a; this(int a) { this.a = a; } } struct S { C elem = new C(42); } void main() { import std.stdio; immutable(S) s1;

Re: Phobos addition formal review: std.experimental.allocator

2015-06-13 Thread Andrei Alexandrescu via Digitalmars-d
On 6/13/15 3:14 AM, Dicebot wrote: Andrei, have you considered creating additional std.allocator.impl package and moving actual allocators there? Or, probably, the other way around with std.allocator.core Existing flat hierarchy does not hint about internal structure in any way. It's good

Re: char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread anonymous via Digitalmars-d-learn
On Saturday, 13 June 2015 at 15:21:19 UTC, Dennis Ritchie wrote: Hello, everyone! I like to work with arrays of strings like `string[] strArray`, but unfortunately, they are immutable. I do not like to work with arrays of strings such as `char[][] strArray`, because it is necessary to apply

Re: DIP80: phobos additions

2015-06-13 Thread Nick Sabalausky via Digitalmars-d
On 06/08/2015 03:55 AM, ezneh wrote: - Create / read QR codes, maybe ? It seems we see more and more QR Codes here and there, so it could potentially be worth it I see them everywhere, but does anyone ever actually use them? Usually it's just an obvious link to some company's

Serialization array of structure

2015-06-13 Thread Suliman via Digitalmars-d-learn
Look like I am doing serialization wrong way: struct DBFields { Date date; string tag; int popularity; } DBFields [] dbfields; DBFields dbfield; . dbfields ~= dbfield; writeln(serializeToJson(dbfields)); As result I am getting only first string.

Re: char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 13 June 2015 at 15:45:34 UTC, anonymous wrote: Please show an example of .dup you'd like to avoid. For example, if you need to create a five-dimensional array of strings :)

Re: DIP80: phobos additions

2015-06-13 Thread ketmar via Digitalmars-d
On Sat, 13 Jun 2015 11:46:41 -0400, Nick Sabalausky wrote: Maybe I'm just not seeing it, but I suspect QR is more someone that companies *want* people to care about, rather than something anyone actually uses. same for me. signature.asc Description: PGP signature

Re: Serialization array of structure

2015-06-13 Thread Suliman via Digitalmars-d-learn
Oh, sorry, the error was in another place.

Re: char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 13 June 2015 at 16:20:46 UTC, anonymous wrote: Do you like to write? char[][] strArray = [foo.dup, bar.dup, baz.dup]; Ok. That's all you're on about? Basically you'd like this: char[] s = foo; and this: char[][] a = [[foo]]; etc. Yes. That's right, and not otherwise :)

Re: Announcing dplug, a toolkit for making audio plugins with D

2015-06-13 Thread ponce via Digitalmars-d-announce
On Saturday, 13 June 2015 at 15:28:09 UTC, tired_eyes wrote: On Saturday, 13 June 2015 at 14:18:31 UTC, ponce wrote: dplug is a library for audio plugin development. https://github.com/p0nce/dplug http://code.dlang.org/packages/dplug It's aim is to be a lean alternative to JUCE and IPlug, the

Re: char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread anonymous via Digitalmars-d-learn
On Saturday, 13 June 2015 at 17:02:06 UTC, Dennis Ritchie wrote: On Saturday, 13 June 2015 at 16:20:46 UTC, anonymous wrote: [...] Yeah, that would be neat. But typing out .dup isn't that bad, and converting a `string[]` to a `char[][]` is simple: import std.conv: to; auto a =

Re: char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread Kagamin via Digitalmars-d-learn
Type is probably possible, though conversion method will be simpler. You can even try to write a specialization of `to` for multidimentional arrays if it doesn't work.

char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread Dennis Ritchie via Digitalmars-d-learn
Hello, everyone! I like to work with arrays of strings like `string[] strArray`, but unfortunately, they are immutable. I do not like to work with arrays of strings such as `char[][] strArray`, because it is necessary to apply the method .dup each substring to make them work :) I

Re: Building the docs with own changes

2015-06-13 Thread Andrei Alexandrescu via Digitalmars-d
On 6/13/15 1:10 AM, Joseph Rushton Wakeling via Digitalmars-d wrote: Adding LATEST=2.067.1 to the command indeed allows clean to run, but then -- joy! -- I can no longer rebuild anything, because the cached DMD 2.067 is deleted and I need internet connectivity to get it back. I don't think

Re: char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 13 June 2015 at 15:45:34 UTC, anonymous wrote: Before jumping to a solution, please elaborate on the perceived problem. I have a feeling that there is none. Do you like to write? char[][] strArray = [foo.dup, bar.dup, baz.dup]; I suggest that such an option: str[] strArray =

Re: Conditional Compilation Multiple Versions

2015-06-13 Thread bitwise via Digitalmars-d-learn
On Sat, 13 Jun 2015 08:21:50 -0400, ketmar ket...@ketmar.no-ip.org wrote: On Fri, 12 Jun 2015 20:41:59 -0400, bitwise wrote: Is there a way to compile for multiple conditions? Tried all these: version(One | Two){ } version(One || Two){ } version(One Two){ } version(One) | version(Two){ }

Re: ReturnType and overloaded functions

2015-06-13 Thread ketmar via Digitalmars-d
On Fri, 12 Jun 2015 17:28:56 -0700, Ali Çehreli wrote: void main() { static assert(is (ReturnType!(() = foo(long.init)) == int)); static assert(is (ReturnType!(() = foo(byte.init)) == short)); } Ali or without importing `std.traits`: static

Re: char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 13 June 2015 at 15:45:34 UTC, anonymous wrote: Huh? You mean with string literals? That would be a rather silly reason to avoid `char[]`. Please show an example of .dup you'd like to avoid. Yes, string literals. I understand that the type of `string[]` to D is a simple data

Re: std.(experimental.)logger voting manager wanted

2015-06-13 Thread weaselcat via Digitalmars-d
On Saturday, 13 June 2015 at 15:43:58 UTC, Andrei Alexandrescu wrote: On 6/12/15 5:58 AM, Robert burner Schadek wrote: std.(experimental.)logger has been in phobos for one release. The idea was to mature stuff in experimental for one release and then have a vote on inclusion into phobos as

Re: Conditional Compilation Multiple Versions

2015-06-13 Thread ketmar via Digitalmars-d-learn
On Sat, 13 Jun 2015 13:49:49 +, anonymous wrote: Taking it one step further: template Version(string name) { mixin( version(~name~) enum Version = true; else enum Version = false; ); } static if(Version!One || Version!Two) { ... } very

Re: char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread anonymous via Digitalmars-d-learn
On Saturday, 13 June 2015 at 15:58:44 UTC, Dennis Ritchie wrote: On Saturday, 13 June 2015 at 15:45:34 UTC, anonymous wrote: Before jumping to a solution, please elaborate on the perceived problem. I have a feeling that there is none. Do you like to write? char[][] strArray = [foo.dup,

Re: char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread anonymous via Digitalmars-d-learn
On Saturday, 13 June 2015 at 16:09:58 UTC, Dennis Ritchie wrote: On Saturday, 13 June 2015 at 15:45:34 UTC, anonymous wrote: [...] Are you saying that `string[]` is simpler than `char[][]`? That's not true: `string` is an alias for `immutable(char)[]`, so `string[]` is the same as

Re: Conditional Compilation Multiple Versions

2015-06-13 Thread ketmar via Digitalmars-d-learn
On Sat, 13 Jun 2015 12:01:29 -0400, bitwise wrote: nope. Walter is against that, so we'll not have it, despite the triviality of the patch. Any idea what the rationale was for not allowing it? i don't remember. that murmuring about it makes the code harder to read goes beyond me, so it's

Re: Conditional Compilation Multiple Versions

2015-06-13 Thread bitwise via Digitalmars-d-learn
On Sat, 13 Jun 2015 12:20:40 -0400, ketmar ket...@ketmar.no-ip.org wrote: On Sat, 13 Jun 2015 13:49:49 +, anonymous wrote: Taking it one step further: template Version(string name) { mixin( version(~name~) enum Version = true; else enum Version = false; ); }

Re: DIP80: phobos additions

2015-06-13 Thread Nick Sabalausky via Digitalmars-d
On 06/07/2015 02:27 PM, Robert burner Schadek wrote: Phobos is awesome, the libs of go, python and rust only have better marketing. As discussed on dconf, phobos needs to become big and blow the rest out of the sky. http://wiki.dlang.org/DIP80 lets get OT, please discuss What are the

Re: Phobos addition formal review: std.experimental.allocator

2015-06-13 Thread Dicebot via Digitalmars-d
On Saturday, 13 June 2015 at 15:48:31 UTC, Andrei Alexandrescu wrote: On 6/13/15 3:14 AM, Dicebot wrote: Andrei, have you considered creating additional std.allocator.impl package and moving actual allocators there? Or, probably, the other way around with std.allocator.core Existing flat

Re: std.(experimental.)logger voting manager wanted

2015-06-13 Thread Dennis Ritchie via Digitalmars-d
On Saturday, 13 June 2015 at 16:22:15 UTC, weaselcat wrote: proper reference counting would be trivial to implement with a real macro system. I have a suggestion. If so afraid of incorporating macros in D (macros can ruin almost any language, even very good), why not try to release a test

Re: std.(experimental.)logger voting manager wanted

2015-06-13 Thread Andrei Alexandrescu via Digitalmars-d
On 6/13/15 9:22 AM, weaselcat wrote: On Saturday, 13 June 2015 at 15:43:58 UTC, Andrei Alexandrescu wrote: On 6/12/15 5:58 AM, Robert burner Schadek wrote: std.(experimental.)logger has been in phobos for one release. The idea was to mature stuff in experimental for one release and then have a

Re: Phobos addition formal review: std.experimental.allocator

2015-06-13 Thread Andrei Alexandrescu via Digitalmars-d
On 6/13/15 10:24 AM, Dicebot wrote: On Saturday, 13 June 2015 at 15:48:31 UTC, Andrei Alexandrescu wrote: On 6/13/15 3:14 AM, Dicebot wrote: Andrei, have you considered creating additional std.allocator.impl package and moving actual allocators there? Or, probably, the other way around with

Re: char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 13 June 2015 at 15:21:19 UTC, Dennis Ritchie wrote: I wish to propose the creation of new types of data D: str, wstr, dstr, which will be the analogs of C++ `std::vectorstd::string`. Ie str, wstr, dstr be mutable counterparts immutable strings respectively str (mutable(char[])),

Re: std.(experimental.)logger voting manager wanted

2015-06-13 Thread weaselcat via Digitalmars-d
On Saturday, 13 June 2015 at 16:22:15 UTC, weaselcat wrote: proper reference counting would be trivial to implement with a real macro system. BTW, its been 8 years since the dconf macro talk ;) http://s3.amazonaws.com/dconf2007/WalterAndrei.pdf

[Issue 10376] Glaring hole in const system

2015-06-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10376 secondaryacco...@web.de changed: What|Removed |Added CC||secondaryacco...@web.de ---

Re: std.(experimental.)logger voting manager wanted

2015-06-13 Thread Mike via Digitalmars-d
On Friday, 12 June 2015 at 12:58:46 UTC, Robert burner Schadek wrote: std.(experimental.)logger has been in phobos for one release. The idea was to mature stuff in experimental for one release and then have a vote on inclusion into phobos as std.logger. I would like to see this vote happen

Re: New D tool releases

2015-06-13 Thread Brian Schott via Digitalmars-d-announce
On Saturday, 13 June 2015 at 07:19:45 UTC, Hans-Albert Maritz wrote: I'm integrating the dscanner analysis tools now, but for scanning an entire project it would be awesome to use DCD's existing cache. I'm relatively new to D but I think a possible solution would be to implement a plugin

Re: ReturnType and overloaded functions

2015-06-13 Thread Yuxuan Shui via Digitalmars-d
On Saturday, 13 June 2015 at 05:14:00 UTC, Kenji Hara wrote: 2015-06-13 9:29 GMT+09:00 Idan Arye via Digitalmars-d digitalmars-d@puremagic.com: On Friday, 12 June 2015 at 23:26:00 UTC, Yuxuan Shui wrote: When there are multiple overloaded functions, whose return type will I get when I use

Re: DIP80: phobos additions

2015-06-13 Thread rsw0x via Digitalmars-d
On Sunday, 7 June 2015 at 18:27:16 UTC, Robert burner Schadek wrote: Phobos is awesome, the libs of go, python and rust only have better marketing. As discussed on dconf, phobos needs to become big and blow the rest out of the sky. http://wiki.dlang.org/DIP80 lets get OT, please discuss

__traits getMember is context sensetive?

2015-06-13 Thread JDemler via Digitalmars-d-learn
Hey, i am trying to wrap my head around __traits. One thing i just do not understand is following: struct S{ string member1; int member2; } void main(string[] args) { foreach(typeStr; __traits(allMembers, S)) { auto tp = __traits(getMember, S, typeStr); static if

Re: Building the docs with own changes

2015-06-13 Thread Joseph Rushton Wakeling via Digitalmars-d
On 08/06/15 21:53, Joseph Rushton Wakeling via Digitalmars-d wrote: On 08/06/15 19:06, Joseph Rushton Wakeling via Digitalmars-d wrote: Well, just for one, I tried building phobos docs a couple of days ago while disconnected from the internet; the whole thing failed because the clones of stable

Re: Phobos addition formal review: std.experimental.allocator

2015-06-13 Thread Dicebot via Digitalmars-d
Andrei, have you considered creating additional std.allocator.impl package and moving actual allocators there? Or, probably, the other way around with std.allocator.core Existing flat hierarchy does not hint about internal structure in any way.

Re: std.(experimental.)logger voting manager wanted

2015-06-13 Thread extrawurst via Digitalmars-d
On Saturday, 13 June 2015 at 10:07:22 UTC, Dicebot wrote: I personally consider replacing vibe.d native logger a crucial blocker for accepting std.experimental.logger into main namespace. that was my question, what keeps vibe.d from switching to std.exp.logger ? -- Stephan

Re: appender!(dchar[]) put fail

2015-06-13 Thread kerdemdemir via Digitalmars-d-learn
The problem is that your appender is a char appender, and you try to put a dstring into it. Replace : charAppender.put(totalStr); by : foreach(elem; totalStr){ charAppender.put(elem); } elem will be a dchar, so it will work. But I can see in the example of

Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?

2015-06-13 Thread Mike Parker via Digitalmars-d
On 6/13/2015 10:26 AM, Tofu Ninja wrote: Actually I think it matters more if the person you are talking to knows the gender of the person you are talking about, in the shop sentence the gender of the friend is unknown to the person you are talking to so they still works. So then, use the

Re: Question about garbage collection specification

2015-06-13 Thread ketmar via Digitalmars-d
On Sat, 13 Jun 2015 11:32:18 +, rsw0x wrote: http://dlang.org/garbage.html Do not take advantage of alignment of pointers to store bit flags in the low order bits: p = cast(void*)(cast(int)p | 1); // error: undefined behavior if this restriction is actually imposed - why does

Re: DIP80: phobos additions

2015-06-13 Thread John Colvin via Digitalmars-d
On Friday, 12 June 2015 at 17:56:53 UTC, Tofu Ninja wrote: On Friday, 12 June 2015 at 17:10:08 UTC, jmh530 wrote: On Friday, 12 June 2015 at 03:35:31 UTC, Rikki Cattermole wrote: Humm, work on getting gl3n into phobos or work on my ODBC driver manager. Tough choice. I can only speak for

Re: What's the ETA for 2.068?

2015-06-13 Thread Vladimir Panteleev via Digitalmars-d
On Saturday, 13 June 2015 at 00:13:23 UTC, Marco Leise wrote: Am Thu, 11 Jun 2015 06:26:29 + schrieb weaselcat weasel...@gmail.com: last I read was after dconf, DMD 2.068 will have been released September 8th, 2015. In other words: in 87 days. Where is this number from?

Re: std.(experimental.)logger voting manager wanted

2015-06-13 Thread Mike via Digitalmars-d
On Saturday, 13 June 2015 at 08:37:57 UTC, Mike wrote: I would like to see this vote happen before 2.068. Unfortunately, Dicebot is not longer the review manager. Who wants to count yes/no/(my logger is better) votes in a forum thread? Is that really all there is to it (counting votes in a

Re: A Vision on Improved DMD Template Instantiation Diagonostics

2015-06-13 Thread Atila Neves via Digitalmars-d
On Friday, 12 June 2015 at 17:13:51 UTC, Andrei Alexandrescu wrote: On 6/12/15 5:20 AM, Per =?UTF-8?B?Tm9yZGzDtnci?= per.nord...@gmail.com wrote: After having seen Andrei's Walter's talks on DConf 2015 it's time reveal a dream of mine. It resolves around of feature that I believe is one of

Re: DIP80: phobos additions

2015-06-13 Thread via Digitalmars-d
On Saturday, 13 June 2015 at 11:05:19 UTC, John Colvin wrote: Linear algebra for graphics is the specialised case, not the other way around. As a possible name for something like gl3n in phobos, I like std.math.geometry A geometry library is different, it should be type safe when it comes to

Re: Conditional Compilation Multiple Versions

2015-06-13 Thread ketmar via Digitalmars-d-learn
On Fri, 12 Jun 2015 20:41:59 -0400, bitwise wrote: Is there a way to compile for multiple conditions? Tried all these: version(One | Two){ } version(One || Two){ } version(One Two){ } version(One) | version(Two){ } version(One) || version(Two){ } version(One) version(Two){ }

Re: __traits getMember is context sensetive?

2015-06-13 Thread JDemler via Digitalmars-d-learn
On Saturday, 13 June 2015 at 10:26:06 UTC, Marc Schütz wrote: On Saturday, 13 June 2015 at 10:01:45 UTC, JDemler wrote: Hey, i am trying to wrap my head around __traits. One thing i just do not understand is following: struct S{ string member1; int member2; } void main(string[] args) {

Re: DIP80: phobos additions

2015-06-13 Thread Rikki Cattermole via Digitalmars-d
On 13/06/2015 10:35 p.m., Tofu Ninja wrote: On Saturday, 13 June 2015 at 08:45:20 UTC, John Colvin wrote: The tiny subset of numerical linear algebra that is relevant for graphics (mostly very basic operations, 2,3 or 4 dimensions) is not at all representative of the whole. The algorithms are

Re: std.(experimental.)logger voting manager wanted

2015-06-13 Thread Mike via Digitalmars-d
On Saturday, 13 June 2015 at 10:07:22 UTC, Dicebot wrote: The tricky part about being review manager is exactly that there are no strict rules. In the end it is all about ensuring Phobos quality and stability and sometimes arbitrary calls had to be made. Well, I'll be forthcoming and say

  1   2   >