Re: [Proposal] Weak reference implementation for D

2013-10-15 Thread Dejan Lekic
On Tue, 15 Oct 2013 20:57:14 +0200, Sean Kelly wrote: Perhaps I missed it from skimming, but why are we using atomic operations here anyway? Has testing revealed that it's necessary? I believe it is the why make it easy when we can make it complicated? approach...

Re: Fastest way to learn D?

2013-10-15 Thread Chris
On Tuesday, 15 October 2013 at 18:36:19 UTC, John Colvin wrote: On Tuesday, 15 October 2013 at 18:32:59 UTC, Craig Dillabaugh wrote: On Tuesday, 15 October 2013 at 18:25:48 UTC, Dejan Lekic wrote: On Tue, 15 Oct 2013 20:13:45 +0200, ProgrammingGhost wrote: What is the fastest way for me to

Re: Fastest way to learn D?

2013-10-15 Thread John Colvin
On Tuesday, 15 October 2013 at 20:25:06 UTC, Chris wrote: On Tuesday, 15 October 2013 at 18:36:19 UTC, John Colvin wrote: On Tuesday, 15 October 2013 at 18:32:59 UTC, Craig Dillabaugh wrote: On Tuesday, 15 October 2013 at 18:25:48 UTC, Dejan Lekic wrote: On Tue, 15 Oct 2013 20:13:45 +0200,

Re: D bindings for OpenCV

2013-10-15 Thread Craig Dillabaugh
On Tuesday, 15 October 2013 at 19:20:10 UTC, TJSomething wrote: I know this has been asked a few times before, but that was a few years ago. Are there any reasonably complete and up to date OpenCV bindings for D? If not, are there any reasonably easy ways to generate them? I tried SWIG and

Re: D bindings for OpenCV

2013-10-15 Thread TJSomething
On Tuesday, 15 October 2013 at 20:33:59 UTC, Craig Dillabaugh wrote: I am a bit foggy on the diffence between openCL and openCV, but is this helpful: http://code.dlang.org/packages/derelict_extras-opencl OpenCL is more or less completely unrelated. OpenCV is about computer vision and OpenCL

Re: D bindings for OpenCV

2013-10-15 Thread Craig Dillabaugh
On Tuesday, 15 October 2013 at 20:41:58 UTC, TJSomething wrote: On Tuesday, 15 October 2013 at 20:33:59 UTC, Craig Dillabaugh wrote: I am a bit foggy on the diffence between openCL and openCV, but is this helpful: http://code.dlang.org/packages/derelict_extras-opencl OpenCL is more or less

Re: Fastest way to learn D?

2013-10-15 Thread Chris
On Tuesday, 15 October 2013 at 20:31:54 UTC, John Colvin wrote: On Tuesday, 15 October 2013 at 20:25:06 UTC, Chris wrote: On Tuesday, 15 October 2013 at 18:36:19 UTC, John Colvin wrote: On Tuesday, 15 October 2013 at 18:32:59 UTC, Craig Dillabaugh wrote: On Tuesday, 15 October 2013 at 18:25:48

Re: D bindings for OpenCV

2013-10-15 Thread Dejan Lekic
On Tue, 15 Oct 2013 21:20:09 +0200, TJSomething wrote: I know this has been asked a few times before, but that was a few years ago. Are there any reasonably complete and up to date OpenCV bindings for D? If not, are there any reasonably easy ways to generate them? I tried SWIG and it

Re: D bindings for OpenCV

2013-10-15 Thread Timothee Cour
I've done it using swig, and using C++ api (not C api), as well as for other libs (sfml etc). it requires a bit of tweaking the '.i' file but is doable. Much better than hand maintaining c wrappers. On Tue, Oct 15, 2013 at 2:08 PM, Dejan Lekic dejan.le...@gmail.com wrote: On Tue, 15 Oct 2013

Re: [Proposal] Weak reference implementation for D

2013-10-15 Thread Robert
So, here are your revised version: https://github.com/phobos-x/phobosx/blob/1f0016c84c2043da0b9d2dafe65f54fcf6b6b8fa/source/phobosx/signal.d Sorry, but you are making the same mistake again. Yeah, I made a mistake again. In my mind it was ok because o is read from a shared variable, but this

Re: D bindings for OpenCV

2013-10-15 Thread TJSomething
Could you post those? On Tuesday, 15 October 2013 at 21:51:06 UTC, Timothee Cour wrote: I've done it using swig, and using C++ api (not C api), as well as for other libs (sfml etc). it requires a bit of tweaking the '.i' file but is doable. Much better than hand maintaining c wrappers. On

Re: [Proposal] Weak reference implementation for D

2013-10-15 Thread Robert
Well sure, but why not use a Mutex? What does trying to sort out a correct lock-free algorithm gain us here? It is not about concurrency for general purpose (phobosx.signal is no more thread safe than std.signals), but for the GC. A reference is hidden from the GC, when making it visible

Re: [Proposal] Weak reference implementation for D

2013-10-15 Thread Robert
See also: http://d.puremagic.com/issues/show_bug.cgi?id=4150 Best regards, Robert

Eloquently sums up my feelings about the disadvantages of dynamic typing

2013-10-15 Thread Walter Bright
http://www.reddit.com/r/programming/comments/1oi8wd/ruby_is_a_dying_language/ccs8yr8

Re: Eloquently sums up my feelings about the disadvantages of dynamic typing

2013-10-15 Thread Paulo Pinto
Am 16.10.2013 00:15, schrieb Walter Bright: http://www.reddit.com/r/programming/comments/1oi8wd/ruby_is_a_dying_language/ccs8yr8 Agree. While I do like dynamic languages for prototyping and small applications, I came to the conclusion they don't scale in the enterprise. Plus with type

Re: GDC vs dmd speed

2013-10-15 Thread Spacen Jasset
On 14/10/2013 22:06, bearophile wrote: Spacen Jasset: const float pi = 3.14159265f; float dx = cast(float)(Clock.currSystemTick.length % (TickDuration.ticksPerSec * 10)) / (TickDuration.ticksPerSec * 10); float xRot = sin(dx * pi * 2) * 0.4f + pi / 2; float yRot = cos(dx * pi

Re: GDC vs dmd speed

2013-10-15 Thread Spacen Jasset
On 14/10/2013 22:22, Walter Bright wrote: On 10/14/2013 12:24 PM, Spacen Jasset wrote: dmd32 v2.063.2 with flags: [-O, -release, -noboundscheck, -inline] gdc 4.6 (0.29.1-4.6.4-1ubuntu4) Which I assume might be v2.020? with flags: [-O2] dmd uses the x87 for 32 bit code for floating point,

Re: D bindings for OpenCV

2013-10-15 Thread ponce
On Tuesday, 15 October 2013 at 19:20:10 UTC, TJSomething wrote: I know this has been asked a few times before, but that was a few years ago. Are there any reasonably complete and up to date OpenCV bindings for D? If not, are there any reasonably easy ways to generate them? I tried SWIG and

Re: [Proposal] Weak reference implementation for D

2013-10-15 Thread Walter Bright
On 10/13/2013 11:24 PM, Denis Shelomovskij wrote: 13.10.2013 22:19, Walter Bright пишет: On 10/13/2013 12:47 AM, Denis Shelomovskij wrote: --- Proposal --- Please post as a DIP: http://wiki.dlang.org/DIPs The trouble with it as a n.g. posting is they tend to scroll off and be forgotten.

Re: [Proposal] Weak reference implementation for D

2013-10-15 Thread Sean Kelly
On Tuesday, 15 October 2013 at 22:09:17 UTC, Robert wrote: The problem is that destructors and thus the registered hooks for the dispose events are called when threads are already resumed. If this wasn't the case there would actually be no problems. Gotcha. Looking at the code... I think

Re: [Proposal] Weak reference implementation for D

2013-10-15 Thread inout
On Tuesday, 15 October 2013 at 23:20:39 UTC, Sean Kelly wrote: On Tuesday, 15 October 2013 at 22:09:17 UTC, Robert wrote: The problem is that destructors and thus the registered hooks for the dispose events are called when threads are already resumed. If this wasn't the case there would

Re: Early review of std.logger

2013-10-15 Thread Jeremy Powers
On Tue, Oct 15, 2013 at 8:17 AM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: One note - log4j, log4cxx, and log4cpp are not part of the respective languages' standards. That doesn't mean much (in fact it may be a competitive advantage to integrating log4d in std) but it is one

Re: Eloquently sums up my feelings about the disadvantages of dynamic typing

2013-10-15 Thread H. S. Teoh
On Tue, Oct 15, 2013 at 03:15:45PM -0700, Walter Bright wrote: http://www.reddit.com/r/programming/comments/1oi8wd/ruby_is_a_dying_language/ccs8yr8 It's interesting how compile times seem to always crop up in discussions about static vs. dynamic typing, even though it's really an orthogonal

Re: Eloquently sums up my feelings about the disadvantages of dynamic typing

2013-10-15 Thread brad clawsie
an excellent post, thanks for linking it Walter the relative weakness of dynamic-typed tools is compounded by the fact that they tend to be used to build monolithic applications, typical of what might emerge from rails, php etc. you take the whole ball of mud or nothing. with no types to

Re: Eloquently sums up my feelings about the disadvantages of dynamic typing

2013-10-15 Thread Nick Sabalausky
On Tue, 15 Oct 2013 15:15:45 -0700 Walter Bright newshou...@digitalmars.com wrote: http://www.reddit.com/r/programming/comments/1oi8wd/ruby_is_a_dying_language/ccs8yr8 Totally agree. 90+% of the argument for dynamic languages is getting shit done, and yet they ultimately *create* work: More

Re: Eloquently sums up my feelings about the disadvantages of dynamic typing

2013-10-15 Thread Adam Wilson
On Tue, 15 Oct 2013 15:15:45 -0700, Walter Bright newshou...@digitalmars.com wrote: http://www.reddit.com/r/programming/comments/1oi8wd/ruby_is_a_dying_language/ccs8yr8 +1 This is why I claw my eyes out every time I have to work with JavaScript. This is why I find statically typed

Re: Eloquently sums up my feelings about the disadvantages of dynamic typing

2013-10-15 Thread Nick Sabalausky
On Tue, 15 Oct 2013 15:15:45 -0700 Walter Bright newshou...@digitalmars.com wrote: http://www.reddit.com/r/programming/comments/1oi8wd/ruby_is_a_dying_language/ccs8yr8 OMG, I just noticed that's a reddit for a comment on hacker news. I can't wait to see a comment in that reddit get it's

Re: Help needed testing automatic win64 configuration

2013-10-15 Thread Brad Anderson
On Tuesday, 15 October 2013 at 02:17:39 UTC, Brad Anderson wrote: There are some pending pull requests[1][2] to get automatic win64 configuration during installation working. I've prepared a dmd 2.064-beta installer which includes these unmerged changes which you can download here:

Re: Help needed testing automatic win64 configuration

2013-10-15 Thread Brad Anderson
On Tuesday, 15 October 2013 at 06:38:30 UTC, dnewbie wrote: VS 2010 Express/Windows SDK 7.0: dmd -m64 hello.d Can't run 'c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\link.exe', check PATH with dmd-2.064-beta-new-sc.ini-2.exe I believe you need the 7.1 SDK. 7.0 does not

Funny pictures

2013-10-15 Thread Nick Sabalausky
I hate when people link to pictures on imgur because then I end up compiling a list like this: http://imgur.com/r/funny/mm4jGWk http://imgur.com/r/funny/wyZHrhB http://imgur.com/r/funny/JvIHGND http://imgur.com/r/funny/QfEN2K3 http://imgur.com/r/funny/wxyY7Yr (He really does say this in an

Re: Funny pictures

2013-10-15 Thread Nick Sabalausky
On Tue, 15 Oct 2013 21:50:05 -0400 Nick Sabalausky seewebsitetocontac...@semitwist.com wrote: [...] Ok, that's it, I don't know if that garbage got though in the first place, but fuck Claws Mail, clearly I need to find an email/ng client that isn't retarded enough to take Compose email - to:

!!NUKE THIS THREAD!!

2013-10-15 Thread Nick Sabalausky

Re: Help needed testing automatic win64 configuration

2013-10-15 Thread Manu
I just tried your '-3' version. It has problems. 1: VisualD installer still asks where you installed DMD; it should be able to know this since it's being invoked by the DMD installer. I think that should be fixed. 2: gcstub64.obj and phobos64.lib are still in D/dmd2/windows/lib. They should be

Re: draft proposal for ref counting in D

2013-10-15 Thread Michel Fortin
On 2013-10-15 18:32:01 +, deadalnix deadal...@gmail.com said: No, that is the beauty of it :D Consider you have pointer from Tl - shared - immutable and TL - immutable. I'm not covering TL collection here (It seem to be obvious that it doesn't require to stop the world). So the starting

Re: Eloquently sums up my feelings about the disadvantages of dynamic typing

2013-10-15 Thread PauloPinto
On Tuesday, 15 October 2013 at 23:53:06 UTC, H. S. Teoh wrote: On Tue, Oct 15, 2013 at 03:15:45PM -0700, Walter Bright wrote: http://www.reddit.com/r/programming/comments/1oi8wd/ruby_is_a_dying_language/ccs8yr8 It's interesting how compile times seem to always crop up in discussions about

Re: copying const struct

2013-10-15 Thread Jack Applegame
On Monday, 14 October 2013 at 18:36:00 UTC, Maxim Fomin wrote: Funniest thing happen in cases like this when he reports the bug himself and soon fixes it, later bug is hit by someone else but during reporting it is realized that bug is already fixed, pull is pushed to master and everyone

Re: howto dispatch to derived classes?

2013-10-15 Thread Manfred Nowak
=?UTF-8?B?QWxpIMOHZWhyZWxp?= wrote: a virtual function like accept() can do the trick This would require changes in the whole class hierarchy. But because of The actual type of the object is implicitly stored in the vtbl of each type. and in addition, because the statement | writeln(

Is this a bug, if so, how would you summarize it?

2013-10-15 Thread safety0ff
See this code: http://dpaste.dzfl.pl/b3ae1667 On DMD it gives the error message if version=bug, but not if version=bug AND version=workaround1 (through 6). On LDC it segfaults at run time if version=bug, but not if version=bug AND version=workaround1 (through 6). Workaround1 - workaround4

Problem: Cannot create class out of nothing using witchcraft

2013-10-15 Thread DoctorCaptain
dmd v2.063.2 Hi there! I'm terribly hopeful that you're more interested in the problem at hand than my choice of title. I've been using D for a while as my language of choice for various projects here and there, and I've recently discovered that template programming is magic. This is good. As

Re: Array copy warning

2013-10-15 Thread bearophile
Benjamin Thaut: I'm just in the progress of upgrading to dmd 2.063 and I now get the following warnings in my code: Warning: explicit element-wise assignment I am having problems with code like this, that used to work: import std.algorithm: reduce; struct Foo { int x, y; } void main() {

Re: Starting D with a project in mind.

2013-10-15 Thread Andrew
I've successfully built Pegged and I'm now trying to build vibe.d which requires dub so ... andrew@islay:~$ cd dub-0.9.18/ andrew@islay:~/dub-0.9.18$ ls binbuild-files.txt CHANGELOG.md examples LICENSE_DE.txt package.json source build.cmd build.sh curl.lib installer

Re: Starting D with a project in mind.

2013-10-15 Thread Dicebot
On Tuesday, 15 October 2013 at 12:31:49 UTC, Andrew wrote: Any ideas what I'm doing wrong ? Thanks for all of the hand-holding BTW. What is your GDC version? Looks like one with pre-2.063 front-end as it does not support `alias X = ...` syntax. vibe.d developers do try to support latest two

Re: Problem: Cannot create class out of nothing using witchcraft

2013-10-15 Thread Benjamin Thaut
Am 15.10.2013 10:03, schrieb DoctorCaptain: dmd v2.063.2 Hi there! I'm terribly hopeful that you're more interested in the problem at hand than my choice of title. I've been using D for a while as my language of choice for various projects here and there, and I've recently discovered that

Re: Problem: Cannot create class out of nothing using witchcraft

2013-10-15 Thread Benjamin Thaut
Your going way to complicated by actually passing the variadic arguments to the generator function. If you don't pass the variadic arguments to the generator function its way simpler and also works ;-) http://dpaste.dzfl.pl/59e2547b

Re: objects as AA keys

2013-10-15 Thread Daniel Davidson
On Tuesday, 15 October 2013 at 05:44:25 UTC, captaindet wrote: hi, i am a bit confused. the official language ref ( http://dlang.org/hash-map.html ) states: Classes can be used as the KeyType. For this to work, the class definition must override the following member functions of class

Re: Problem: Cannot create class out of nothing using witchcraft

2013-10-15 Thread Artur Skawina
On 10/15/13 10:03, DoctorCaptain wrote: If what I am asking is unclear, I will be more than happy to explain in a different way. I tried to be simultaneously as succinct and as comprehensive as possible with what the issue is. I'm not sure what exactly you're trying to do, but... The issue

should chain be pure

2013-10-15 Thread Daniel Davidson
I would like to correctly annotate my functions with pure. I've hit a function that is calling chain which breaks purity. Is chain really not pure? The relevant section of code is: ... auto sortedRage = assumeSorted!(a.when b.when)(opSlice()); auto trisection =

Re: should chain be pure

2013-10-15 Thread bearophile
Daniel Davidson: I would like to correctly annotate my functions with pure. I've hit a function that is calling chain which breaks purity. Is chain really not pure? Phobos is slowly being annotated with pure/nothrow (and @safe) but not all functions are already tagged. You could fix the

Re: should chain be pure

2013-10-15 Thread Daniel Davidson
On Tuesday, 15 October 2013 at 13:43:55 UTC, bearophile wrote: Daniel Davidson: I would like to correctly annotate my functions with pure. I've hit a function that is calling chain which breaks purity. Is chain really not pure? Phobos is slowly being annotated with pure/nothrow (and @safe)

Re: should chain be pure

2013-10-15 Thread bearophile
Daniel Davidson: If you are agreeing that chain should be pure and it is just following all the calls and making all of them pure, until that happens by the professionals - is there a casting solution so I can fake a pure and move on? chain is a template, and in Phobos often templates are

Re: Starting D with a project in mind.

2013-10-15 Thread Andrew
What is your GDC version? Looks like one with pre-2.063 front-end as it does not support `alias X = ...` syntax. vibe.d developers do try to support latest two released front-end versions but it is not as easy as it sounds (I hope situation will improve a lot once CI is finally up and

Re: Starting D with a project in mind.

2013-10-15 Thread Dicebot
On Tuesday, 15 October 2013 at 14:38:32 UTC, Andrew wrote: I think it's the latest version of GDC :- https://github.com/jpf91/GDC/tree/arm which apparently supports 2.062. Ugh, don't know about ARM build but GDC itself currently supports 2.063.2 version for both 4.8 and 4.9 branch. In the

Re: Starting D with a project in mind.

2013-10-15 Thread Stefan Frijters
On Tuesday, 15 October 2013 at 14:56:06 UTC, Dicebot wrote: On Tuesday, 15 October 2013 at 14:38:32 UTC, Andrew wrote: Is this something I can update easily ? If rebuilding GDC from sources so that it will catch 2.063.2 frontend version is an option - it may help. Looking at

Re: Starting D with a project in mind.

2013-10-15 Thread Andrew
Looking at https://github.com/jpf91/GDC/commits/arm , 2.063.2 support is also included in the ARM branch, cf. commit 1aa5755 from June 30, so you should have it already I think. Where did you get the 2.062 info from? 2.062 was mentioned on the GDC website as the latest supported D2. So I'm

Re: Starting D with a project in mind.

2013-10-15 Thread Dicebot
On Tuesday, 15 October 2013 at 18:41:50 UTC, Andrew wrote: Looking at https://github.com/jpf91/GDC/commits/arm , 2.063.2 support is also included in the ARM branch, cf. commit 1aa5755 from June 30, so you should have it already I think. Where did you get the 2.062 info from? 2.062 was

Re: Starting D with a project in mind.

2013-10-15 Thread H. S. Teoh
On Tue, Oct 15, 2013 at 09:19:56PM +0200, Andrew wrote: pragma(msg, __VERSION__); ``` 2060L - seems I'm further advanced than everybody else :-) Wow that's pretty old. The current language version supported by GDC is 2063L. You should probably consider upgrading GDC to at least 2.0.62

Re: Starting D with a project in mind.

2013-10-15 Thread Andrew
2060L - seems I'm further advanced than everybody else :-) Sorry, I thought it was 2.052, but now I see it's well behind since it should be 2.063. I'm rebuilding again from the master.

Re: Starting D with a project in mind.

2013-10-15 Thread Andrew
pragma(msg, __VERSION__); ``` 2060L - seems I'm further advanced than everybody else :-)

Re: Starting D with a project in mind.

2013-10-15 Thread Stefan Frijters
On Tuesday, 15 October 2013 at 19:23:13 UTC, Andrew wrote: 2060L - seems I'm further advanced than everybody else :-) Sorry, I thought it was 2.052, but now I see it's well behind since it should be 2.063. I'm rebuilding again from the master. Aha, oops, I have the same 2060L, but that is

Re: objects as AA keys

2013-10-15 Thread captaindet
On 2013-10-15 08:32, Daniel Davidson wrote: On Tuesday, 15 October 2013 at 05:44:25 UTC, captaindet wrote: hi, i am a bit confused. the official language ref ( http://dlang.org/hash-map.html ) states: Classes can be used as the KeyType. For this to work, the class definition must override

Re: objects as AA keys

2013-10-15 Thread Ali Çehreli
On 10/14/2013 10:44 PM, captaindet wrote: Classes can be used as the KeyType. For this to work, the class definition must override the following member functions of class Object: hash_t toHash() bool opEquals(Object) int opCmp(Object) ... it seems to work out of the box - without

Re: Problem: Cannot create class out of nothing using witchcraft

2013-10-15 Thread DoctorCaptain
Fixing links: If the template I am trying to instantiate IS NOT variadic, and I pass in an alias of an instantiated template, then the receiving template has all of the type information it needs. Example: dpaste.dzfl.pl/6d618af9 http://dpaste.dzfl.pl/6d618af9 If the template I am trying to

Re: Problem: Cannot create class out of nothing using witchcraft

2013-10-15 Thread DoctorCaptain
On Tuesday, 15 October 2013 at 13:14:46 UTC, Benjamin Thaut wrote: Your going way to complicated by actually passing the variadic arguments to the generator function. If you don't pass the variadic arguments to the generator function its way simpler and also works ;-)

cannot call impure function ~this

2013-10-15 Thread Namespace
I get this error: /d701/f223.d(11): Error: pure function 'f223.getA' cannot call impure function 'f223.A.~this' with this code: import std.stdio; struct A { public: ~this() { writeln(DTor); } } A getA() pure nothrow { return A(); } void

Re: how to handle memory ownership when interfacing with C/C++ via internal pointers

2013-10-15 Thread timotheecour
On Thursday, 10 October 2013 at 23:02:29 UTC, Timothee Cour wrote: Short version: I have a struct A* aptr allocated in C/C++ with an internal pointer aptr-ptr (say a double*) I want to store a reference x (say double[]) in D to aptr only through aptr-ptr, not through aptr directly as it's

Re: Problem: Cannot create class out of nothing using witchcraft

2013-10-15 Thread DoctorCaptain
I missed an extremely critical point. The working example with the single arbitrary template instantiation as a data member of the generated class, http://dpaste.dzfl.pl/6d618af9 , has the template instantiation aliases inside of main, meaning the alias is NOT within the scope of GrabBagT, but

Re: Starting D with a project in mind.

2013-10-15 Thread Andrew
Aha, oops, I have the same 2060L, but that is presumably because I forgot to 'git checkout arm', and the master branch on Johannes' fork is not up-to-date. The reason why this works while normal GDC doesn't is that this is so old it doesn't include some explicit architecture static ifs that

Re: Starting D with a project in mind.

2013-10-15 Thread Dicebot
On Tuesday, 15 October 2013 at 22:28:59 UTC, Andrew wrote: I don't really understand why there are so many .d files that just seem to wrap standard os stuff - why not just use the standard installed C headers and avoid all of this overhead that needs maintaining ? Those .d files are

Re: Starting D with a project in mind.

2013-10-15 Thread Dicebot
P.S. I'd recommend to try to contact Johannes Pfau and ask if he has any plans for updating his ARM Phobos fork to recent version. Such changes should be probably integrated Phobos upstream eventually.

Re: Starting D with a project in mind.

2013-10-15 Thread Andrew
After roughly hacking all of the 'static assert unimplemented' lines in libphobos to just do whatever X86 does, I got it to build and install. Now I'm on 2063L and now hello world builds to 8MB instead of 2MB (although it strips to 760k - twice the previous version). So now I resume my quest

Re: Starting D with a project in mind.

2013-10-15 Thread Andrew
Unfortunately, this is an area where difference in developer count is really notable. It is a dead end - support for more exotic platforms like ARM is lacking because there too few people who need it and new bypassers are scared from further investigation because of lacking support. There is

Re: [Font] Getting font folder on all platforms

2013-10-15 Thread Flamaros
On Friday, 6 September 2013 at 20:54:53 UTC, Flamaros wrote: On Friday, 6 September 2013 at 16:05:43 UTC, Tourist wrote: On Thursday, 5 September 2013 at 19:48:07 UTC, Flamaros wrote: I am searching the right way to find fonts folder for each platforms (Windows, linux, macOS X) On Windows

Re: Starting D with a project in mind.

2013-10-15 Thread Brad Roberts
On 10/15/13 3:38 PM, Dicebot wrote: Unfortunately, this is an area where difference in developer count is really notable. It is a dead end - support for more exotic platforms like ARM is lacking because there too few people who need it and new bypassers are scared from further investigation

how to pass multiple arguments via a mixin

2013-10-15 Thread Timothee Cour
is there a general solution to pass multiple arguments to a function via a mixin? see below for a partial solution using Alias, which fails for the last case below: void main(){ import std.stdio; string a=A; string b=B; writeln(a,b);// OK (prints AB) writeln(a,b);//OK (prints both

Re: how to pass multiple arguments via a mixin

2013-10-15 Thread Dicebot
On Wednesday, 16 October 2013 at 00:36:46 UTC, Timothee Cour wrote: ... Have you tried run-time tuple? ``` import std.typecons; writeln(mixin(tuple(a,b).expand)); ```

Re: Problem: Cannot create class out of nothing using witchcraft

2013-10-15 Thread DoctorCaptain
I've gotten extremely close. The DPaste link that follows demonstrates three different templates: The first template is capable of generating the string for and mixing in the definition of a class that has a single arbitrary argument. An object of that class is instantiated, and its

Re: how to pass multiple arguments via a mixin

2013-10-15 Thread Timothee Cour
doesn't work with ref args: void fun(ref int a,ref int b){ a=1; } void main(){ int a,b; import std.typecons; fun(mixin(tuple(a,b).expand)); assert(a==1);//fails } and we can't do a logic such as: if there's ref args use Alias, otherwise use tuple().expand because there could be a mix

how to get a (ref) tuple from a static array ?

2013-10-15 Thread Timothee Cour
how to write a expand function that satisfies the following? void fun(ref int a,ref int b){ a=1; } void main(){ int[2]c; fun(c.expand); assert(c[0]==1); }

Re: Syntax for heap allocated void initialized arrays

2013-10-15 Thread Timothee Cour
On Sat, Sep 21, 2013 at 7:23 AM, bearophile bearophileh...@lycos.comwrote: simendsjo: I'm setting every element in the array, and every field of the element, so I should be safe, right? I think that's sufficiently safe. If the GC run before you have initialized those fields, and some of

Return a const structure by reference.

2013-10-15 Thread Agustin
I'm having trouble trying to return a const reference of a structure. public struct Structure { } public class A { private Structure structure; this(Structure structure) { this.structure = structure; } public ref const Structure getStructure() const {

Re: Return a const structure by reference.

2013-10-15 Thread Ali Çehreli
On 10/15/2013 09:28 PM, Agustin wrote: I'm having trouble trying to return a const reference of a structure. public struct Structure { } public class A { private Structure structure; this(Structure structure) { this.structure = structure; } public

[Issue 11241] DIP 37 causes problems

2013-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11241 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 11243] [REG2.064beta] dmd -of fails

2013-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11243 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 11266] Ship new sc.ini with expanded support for more versions of Visual Studio/Windows SDK

2013-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11266 Rainer Schuetze r.sagita...@gmx.de changed: What|Removed |Added CC||r.sagita...@gmx.de

[Issue 11266] Ship new sc.ini with expanded support for more versions of Visual Studio/Windows SDK

2013-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11266 --- Comment #6 from Brad Anderson e...@gnuk.net 2013-10-15 00:02:48 PDT --- (In reply to comment #5) I've suggested a slightly more elaborate version of sc.ini here:

[Issue 11267] New: Resulting executable sizes varies a lot

2013-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11267 Summary: Resulting executable sizes varies a lot Product: D Version: D2 Platform: All OS/Version: Linux Status: NEW Severity: regression Priority: P2

[Issue 11268] New: [REG 2.064beta] cannot use non-constant CTFE pointer in an initializer

2013-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11268 Summary: [REG 2.064beta] cannot use non-constant CTFE pointer in an initializer Product: D Version: D2 Platform: All OS/Version: All Status: NEW

[Issue 11266] Ship new sc.ini with expanded support for more versions of Visual Studio/Windows SDK

2013-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11266 --- Comment #7 from Rainer Schuetze r.sagita...@gmx.de 2013-10-15 00:50:04 PDT --- (In reply to comment #6) The VS{2010,2012,2013}{LINKCMD,PATH} business is because the way the installer does things is by simple find and replace so that'd

[Issue 11261] Can't infer types without explicit slice in foreach

2013-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11261 --- Comment #4 from github-bugzi...@puremagic.com 2013-10-15 00:58:43 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 11261] Can't infer types without explicit slice in foreach

2013-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11261 --- Comment #5 from github-bugzi...@puremagic.com 2013-10-15 00:59:36 PDT --- Commit pushed to 2.064 at https://github.com/D-Programming-Language/dmd

[Issue 11261] Can't infer types without explicit slice in foreach

2013-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11261 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 11243] [REG2.064beta] dmd -of fails

2013-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11243 --- Comment #6 from Ivan Kazmenko ga...@mail.ru 2013-10-15 01:16:52 PDT --- (In reply to comment #5) (In reply to comment #4) It turns out that it can be reproduced exactly when you have directory object in the directory where you are

[Issue 11267] Resulting executable sizes varies a lot

2013-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11267 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC|

[Issue 11267] Resulting executable sizes varies a lot

2013-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11267 --- Comment #2 from Walter Bright bugzi...@digitalmars.com 2013-10-15 01:34:28 PDT --- Jordi, did you run strip on those executables? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving

[Issue 11251] Not able to link (Previous Definition Different)

2013-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11251 --- Comment #2 from Michal Minich michal.min...@gmail.com 2013-10-15 01:54:27 PDT --- (In reply to comment #1) Need a small test case. https://mega.co.nz/#!T5ojET6S!OSP3ezBAvRkbxTtXop7a5lpOgZo1a4MMZgVxJ4fpWko I was not able to build

[Issue 11269] New: [REG 2.064beta1] Union initialization on 64-bit plattforms

2013-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11269 Summary: [REG 2.064beta1] Union initialization on 64-bit plattforms Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords:

[Issue 11270] New: [REG 2.064] Initialization of struct in constructor

2013-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11270 Summary: [REG 2.064] Initialization of struct in constructor Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2

[Issue 11267] Resulting executable sizes varies a lot

2013-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11267 --- Comment #3 from Jordi Sayol g.sa...@yahoo.es 2013-10-15 02:28:35 PDT --- (In reply to comment #2) Jordi, did you run strip on those executables? No. Here I attach the results of $ strip --strip-unneeded hello.d: DMD v2.063.2 (32-bit)

[Issue 11271] New: [REG 2.063] auto ref opAssign + destructor + struct literal fails

2013-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11271 Summary: [REG 2.063] auto ref opAssign + destructor + struct literal fails Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords:

[Issue 11272] New: Postblit is called on a nested struct instead on opAssign

2013-10-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=11272 Summary: Postblit is called on a nested struct instead on opAssign Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal

<    1   2   3   >