Daemonize v0.1 - simple way to create cross-platform daemons

2014-08-31 Thread NCrashed via Digitalmars-d-announce
Finally I've finished library for wrapping applications into daemons or services (Windows). The library hides platform-specific boilerplate behind compile-time API: ``` // First you need to describe your daemon via template alias daemon = Daemon!( DaemonizeExample1, // unique name //

Re: Daemonize v0.1 - simple way to create cross-platform daemons

2014-08-31 Thread ketmar via Digitalmars-d-announce
On Sun, 31 Aug 2014 11:27:41 + NCrashed via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: looks very interesting, thank you. signature.asc Description: PGP signature

Re: Daemonize v0.1 - simple way to create cross-platform daemons

2014-08-31 Thread Philippe Sigaud via Digitalmars-d-announce
Nice! I have a few questions/remarks, mainly to simplify the API somewhat. Please bear with me :-) // First you need to describe your daemon via template alias daemon = Daemon!( DaemonizeExample1, // unique name Does the user sees/uses this name in any way afterwards? Because I think you

Re: Daemonize v0.1 - simple way to create cross-platform daemons

2014-08-31 Thread NCrashed via Digitalmars-d-announce
Thanks a lot for the respond! Does the user sees/uses this name in any way afterwards? Because I think you could also produce a unique string at compile-time (by using __FILE__ and __LINE__, unless someone has a better idea), if the user does not provide one. Maybe he just wants an anonymous

Re: Daemonize v0.1 - simple way to create cross-platform daemons

2014-08-31 Thread Philippe Sigaud via Digitalmars-d-announce
Does the user sees/uses this name in any way afterwards? Because I think you could also produce a unique string at compile-time (by using __FILE__ and __LINE__, unless someone has a better idea), if the user does not provide one. Maybe he just wants an anonymous daemon, or doesn't care,

Re: Daemonize v0.1 - simple way to create cross-platform daemons

2014-08-31 Thread NCrashed via Digitalmars-d-announce
IIRC, I read in your code that composed signals means the next delegate must have the (logger, signal) {...} form. Why? I can (not must) have the form, the delegate params are tested independently from signal composition. Is that the standard behavior for daemons in OSes? Most signals are

Re: Daemonize v0.1 - simple way to create cross-platform daemons

2014-08-31 Thread Meta via Digitalmars-d-announce
On Sunday, 31 August 2014 at 16:01:10 UTC, Philippe Sigaud via Digitalmars-d-announce wrote: * Custom signals enum Signal : string { ... } @nogc Signal customSignal(string name) @safe pure nothrow { return cast(Signal)name; } I didn't know you could have an enum and extend it with a cast

Re: Daemonize v0.1 - simple way to create cross-platform daemons

2014-08-31 Thread Philippe Sigaud via Digitalmars-d-announce
On Sun, Aug 31, 2014 at 11:36 PM, Meta via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: I didn't know you could have an enum and extend it with a cast like this. This is not a good thing. Enums are supposed to denote a *closed*, enumerated set of items. I agree. It's

Re: Daemonize v0.1 - simple way to create cross-platform daemons

2014-08-31 Thread Philippe Sigaud via Digitalmars-d-announce
I can (not must) have the form, the delegate params are tested independently from signal composition. OK, good. Is that the standard behavior for daemons in OSes? Most signals are simply ignored (except termination ones). I see. Some signals could be sent without any reason: sighup or

Re: Looking to hire: 2-3 programmers, candidates will likely need to learn D.

2014-08-31 Thread Vladimir Panteleev via Digitalmars-d
On Saturday, 30 August 2014 at 09:52:51 UTC, Andrei Alexandrescu wrote: On 8/30/14, 2:35 AM, Jonathan M Davis wrote: On Friday, 29 August 2014 at 18:57:14 UTC, Andrei Alexandrescu wrote: On 8/29/14, 12:40 AM, Dejan Lekic wrote: Vic, I posted the job to the D Developer Network at LinkedIn:

Clojure transducers

2014-08-31 Thread Puming via Digitalmars-d
Clojure is introducing a new way of composing functions (reducers this time), called transducers. It looks similar to composition/binding of functions, but somehow different. My functional-fu is not that deep to understand the statement transducers are as fundamental as function composition

Re: Voting: std.logger

2014-08-31 Thread Marco Leise via Digitalmars-d
Am Sun, 31 Aug 2014 01:09:32 + schrieb Ola Fosheim Grøstad ola.fosheim.grostad+dl...@gmail.com: I've got some questions: How does logging interact with pure? You need to be able to log in pure functions. How do you come to that conclusion? Purity is a synonym for _not_ having side

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread ketmar via Digitalmars-d
On Sun, 31 Aug 2014 01:53:07 -0400 Nick Sabalausky via Digitalmars-d digitalmars-d@puremagic.com wrote: I know FSF prefers free over the open I've been using. But really, everybody knows what open and open source mean may i ask you: is DMD open and open source? and why the heck i can't fork it

Re: gdmd

2014-08-31 Thread ketmar via Digitalmars-d
On Sun, 31 Aug 2014 00:20:04 +0100 Iain Buclaw via Digitalmars-d digitalmars-d@puremagic.com wrote: That isn't the opposite. That's what gdmd does. Unless you mean translate gdc args to dmd. :) sorry, i must sleep more. ;-) sure, gdc-dmd conversion, to build my projects with dmd (i'm not

Re: Clojure transducers

2014-08-31 Thread Philippe Sigaud via Digitalmars-d
What is D's attitude toward this concept? Hickey's original announcement is also interesting to read. Elegant, as always. It seems to me that ranges and range algorithms in D already permit this composition of actions, without the creation of intermediate structures: import std.algorithm;

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread Era Scarecrow via Digitalmars-d
On Sunday, 31 August 2014 at 05:53:39 UTC, Nick Sabalausky wrote: Well, that page was an article written and posted by Stallman, not a TV sound bite. Would you really be able to sift though possibly a 10-100 page description that you can't properly decipher unless you were a lawyer?

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread ketmar via Digitalmars-d
On Sun, 31 Aug 2014 06:59:34 + Era Scarecrow via Digitalmars-d digitalmars-d@puremagic.com wrote: 'Open' can merely means you can see the source, nothing else. Really comes down to the license it's attached to. that's why i'm using the term Free and Open Source Software instead of Open

Re: [OT] EU patents [was Microsoft filled patent applications for scoped and immutable types]

2014-08-31 Thread Marco Leise via Digitalmars-d
Am Thu, 28 Aug 2014 11:08:29 +0100 schrieb Russel Winder via Digitalmars-d digitalmars-d@puremagic.com: Jérôme, On Thu, 2014-08-28 at 11:53 +0200, Jérôme M. Berger via Digitalmars-d wrote: […] PPS: IANAL but I have had lots of contacts with patent lawyers and I have taken part in

Re: Voting: std.logger

2014-08-31 Thread Vladimir Panteleev via Digitalmars-d
On Tuesday, 29 July 2014 at 06:09:25 UTC, Andrei Alexandrescu wrote: 4. Replace defaultLogger with theLog. Logger is a word, but one that means lumberjack so it doesn't have the appropriate semantics. The use is generally acceptable as a nice play on words and as a disambiguator between the

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread Marco Leise via Digitalmars-d
Am Thu, 28 Aug 2014 12:12:14 +0200 schrieb Daniel Kozak via Digitalmars-d digitalmars-d@puremagic.com: V Thu, 28 Aug 2014 11:53:35 +0200 Jérôme M. Berger via Digitalmars-d digitalmars-d@puremagic.com napsáno: I should have said that in D it is used when declaring an instance (i.e.

Re: One Stop Shop?

2014-08-31 Thread Joakim via Digitalmars-d
On Saturday, 30 August 2014 at 19:19:48 UTC, Sativa wrote: I think it would be helpful to have the d lang site host tutorials/lessons on various aspects of D. D is hard to use for certain things like gui's, graphics(ogl, dx, etc), etc... not necessarily because D can't do these things but

Re: Voting: std.logger

2014-08-31 Thread via Digitalmars-d
On Sunday, 31 August 2014 at 06:11:56 UTC, Marco Leise wrote: Am Sun, 31 Aug 2014 01:09:32 + schrieb Ola Fosheim Grøstad ola.fosheim.grostad+dl...@gmail.com: How does logging interact with pure? You need to be able to log in pure functions. How do you come to that conclusion? Purity is

rdmd - No output when run on WebFaction

2014-08-31 Thread David Chin via Digitalmars-d
Hi all, On WebFaction, my Linux shared hosting server, I created a simple Hello, World! script in a file named hello.d. Attempting to run the script with rdmd hello.d yielded no error messages, and strangely, no output. However, the following works, and I see the output: (1) dmd hello.d

Re: [OT] EU patents [was Microsoft filled patent applications for scoped and immutable types]

2014-08-31 Thread Russel Winder via Digitalmars-d
On Sun, 2014-08-31 at 09:35 +0200, Marco Leise via Digitalmars-d wrote: […] Haha :*). Don't worry, we EU citizens are more concerned about the issues of privacy, food regulations and corporate entities suing states for changing laws that cause them profit losses. This is certainly the major

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread Joakim via Digitalmars-d
On Sunday, 31 August 2014 at 04:25:11 UTC, Nick Sabalausky wrote: And I *do* appreciate that GPL, unlike BSD, can *realistically* be cross-licensed with a commercial license in a meaningful way and used on paid commercial software (at least, I *think* so, based on what little anyone actually

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread Nick Sabalausky via Digitalmars-d
On 8/31/2014 2:59 AM, Era Scarecrow wrote: On Sunday, 31 August 2014 at 05:53:39 UTC, Nick Sabalausky wrote: Well, that page was an article written and posted by Stallman, not a TV sound bite. Would you really be able to sift though possibly a 10-100 page description that you can't properly

Re: Voting: std.logger

2014-08-31 Thread Marco Leise via Digitalmars-d
Am Sun, 31 Aug 2014 08:52:58 + schrieb Ola Fosheim Grøstad ola.fosheim.grostad+dl...@gmail.com: On Sunday, 31 August 2014 at 06:11:56 UTC, Marco Leise wrote: Am Sun, 31 Aug 2014 01:09:32 + schrieb Ola Fosheim Grøstad ola.fosheim.grostad+dl...@gmail.com: How does logging

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread ketmar via Digitalmars-d
On Sun, 31 Aug 2014 09:23:24 + Joakim via Digitalmars-d digitalmars-d@puremagic.com wrote: As such, his GPL, which doesn't allow such pragmatic mixing of open and closed source, is ...a great thing to stop invasion of proprietary software. hey, i'm not *renting* my smartphone, i'm *buying*

Re: Voting: std.logger

2014-08-31 Thread eles via Digitalmars-d
On Sunday, 31 August 2014 at 09:34:51 UTC, Marco Leise wrote: Am Sun, 31 Aug 2014 08:52:58 + schrieb Ola Fosheim Grøstad ola.fosheim.grostad+dl...@gmail.com: On Sunday, 31 August 2014 at 06:11:56 UTC, Marco Leise wrote: Am Sun, 31 Aug 2014 01:09:32 + schrieb Ola Fosheim Grøstad

Re: rdmd - No output when run on WebFaction

2014-08-31 Thread Marco Leise via Digitalmars-d
Am Sun, 31 Aug 2014 09:01:23 + schrieb David Chin dlc...@me.com: Hi all, On WebFaction, my Linux shared hosting server, I created a simple Hello, World! script in a file named hello.d. Attempting to run the script with rdmd hello.d yielded no error messages, and strangely, no

Re: Voting: std.logger

2014-08-31 Thread via Digitalmars-d
On Sunday, 31 August 2014 at 09:34:51 UTC, Marco Leise wrote: Ok, here is the current state: Logging is not a first-class language feature with special semantics. Drop your pure keywords on those 90% of functions or only log in debug. Then maybe the language lacks features that allow you to

Re: rdmd - No output when run on WebFaction

2014-08-31 Thread via Digitalmars-d
On Sunday, 31 August 2014 at 09:51:13 UTC, Marco Leise wrote: Am Sun, 31 Aug 2014 09:01:23 + schrieb David Chin dlc...@me.com: Hi all, On WebFaction, my Linux shared hosting server, I created a simple Hello, World! script in a file named hello.d. Attempting to run the script with rdmd

Re: One Stop Shop?

2014-08-31 Thread via Digitalmars-d
On Sunday, 31 August 2014 at 08:44:39 UTC, Joakim wrote: Sorry to say, but this is how a community-backed language works. D does not have a giant corporate sponsor like C#, who can pay for reams of documentation and tutorials. You're expected to like D enough to learn the language on your

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread Joakim via Digitalmars-d
On Sunday, 31 August 2014 at 09:37:35 UTC, ketmar via Digitalmars-d wrote: On Sun, 31 Aug 2014 09:23:24 + Joakim via Digitalmars-d digitalmars-d@puremagic.com wrote: As such, his GPL, which doesn't allow such pragmatic mixing of open and closed source, is ...a great thing to stop invasion

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread ketmar via Digitalmars-d
On Sun, 31 Aug 2014 10:23:42 + Joakim via Digitalmars-d digitalmars-d@puremagic.com wrote: Good luck with that, let me know when you find a GPLv3 smartphone to buy. I'll predict when that'll happen: never. keep tolerate permissive licenses, this will greatly help me to find such

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread Nick Sabalausky via Digitalmars-d
On 8/31/2014 5:23 AM, Joakim wrote: On Sunday, 31 August 2014 at 04:25:11 UTC, Nick Sabalausky wrote: And I *do* appreciate that GPL, unlike BSD, can *realistically* be cross-licensed with a commercial license in a meaningful way and used on paid commercial software (at least, I *think* so,

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread Era Scarecrow via Digitalmars-d
On Sunday, 31 August 2014 at 09:23:28 UTC, Nick Sabalausky wrote: I have a hard time believing there's no middle ground there. Shoot, even theoretical physics has simplified explanations (A Brief History of Time). No doubt this could be summarized too without resorting to MS try be bad. GPLv3

Re: One Stop Shop?

2014-08-31 Thread Joakim via Digitalmars-d
On Sunday, 31 August 2014 at 10:14:05 UTC, Marc Schütz wrote: And last but not least, the Wiki has lots of tutorials, though again it's IMO not discoverable enough: http://wiki.dlang.org/Articles http://wiki.dlang.org/Tutorials You're moving the goal posts. He specifically asked about D

Re: gdmd

2014-08-31 Thread Joseph Rushton Wakeling via Digitalmars-d
On 30/08/14 21:34, Russel Winder via Digitalmars-d wrote: On Sat, 2014-08-30 at 20:48 +0300, ketmar via Digitalmars-d wrote: […] maybe i should write gdmd too, just for completeness sake. ;-) Two alternatives I think: 1. Rewrite it in something other than Perl, D or Python mayhap. 2. Let it

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread Nick Sabalausky via Digitalmars-d
On 8/31/2014 5:37 AM, ketmar via Digitalmars-d wrote: On Sun, 31 Aug 2014 09:23:24 + Joakim via Digitalmars-d digitalmars-d@puremagic.com wrote: As such, his GPL, which doesn't allow such pragmatic mixing of open and closed source, is ...a great thing to stop invasion of proprietary

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread ketmar via Digitalmars-d
On Sun, 31 Aug 2014 06:46:15 -0400 Nick Sabalausky via Digitalmars-d digitalmars-d@puremagic.com wrote: So what do they do? Not use the GPL software in the first place. So we end up with second-rate crap (like Bionic) or worse - closed source proprietary - just because GPL scared them away.

Re: One Stop Shop?

2014-08-31 Thread bachmeier via Digitalmars-d
On Saturday, 30 August 2014 at 19:19:48 UTC, Sativa wrote: I think it would be helpful to have the d lang site host tutorials/lessons on various aspects of D. D is hard to use for certain things like gui's, graphics(ogl, dx, etc), etc... not necessarily because D can't do these things but

Re: One Stop Shop?

2014-08-31 Thread via Digitalmars-d
On Sunday, 31 August 2014 at 10:36:52 UTC, Joakim wrote: On Sunday, 31 August 2014 at 10:14:05 UTC, Marc Schütz wrote: And last but not least, the Wiki has lots of tutorials, though again it's IMO not discoverable enough: http://wiki.dlang.org/Articles http://wiki.dlang.org/Tutorials You're

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread Joakim via Digitalmars-d
On Sunday, 31 August 2014 at 10:30:24 UTC, Nick Sabalausky wrote: There is some precedent for a commercial software package to be released like this: This is available under either a commercial license or GPL. You can freely download and use the software and its source code, at no cost,

Encapsulating trust

2014-08-31 Thread Dmitry Olshansky via Digitalmars-d
Quite recently a lot of work has been done to make most of Phobos usable in @safe code. While a very welcome effort, it caused a number of doubts in particular due to the boilerplate required to isolate a small amount of unsafe operations and slap @trusted over it. See e.g. Denis argument:

Re: code cleanup in druntime and phobos

2014-08-31 Thread Iain Buclaw via Digitalmars-d
On 30 August 2014 16:27, Joseph Rushton Wakeling via Digitalmars-d digitalmars-d@puremagic.com wrote: On 30/08/14 16:38, Daniel Murphy via Digitalmars-d wrote: It's a shame that your dislike of github is stronger than your desire to contribute code. I'm sorry, that won't wash. It's a

Re: One Stop Shop?

2014-08-31 Thread Israel via Digitalmars-d
On Saturday, 30 August 2014 at 19:19:48 UTC, Sativa wrote: I think it would be helpful to have the d lang site host tutorials/lessons on various aspects of D. D is hard to use for certain things like gui's, graphics(ogl, dx, etc), etc... not necessarily because D can't do these things but

Re: DIP(?) Warning to facilitate porting to other archs

2014-08-31 Thread Marco Leise via Digitalmars-d
Am Fri, 02 May 2014 01:56:49 + schrieb bearophile bearophileh...@lycos.com: Temtaime: I think it's need to have -w64(or other name, offers ?) flag that warns if code may not compile on other archs. It's a problem and I'd like some way to compiler help solving such problems. I

Re: code cleanup in druntime and phobos

2014-08-31 Thread monarch_dodra via Digitalmars-d
On Sunday, 31 August 2014 at 15:33:45 UTC, Iain Buclaw via Digitalmars-d wrote: The only change I have noticed as being part of github is a steady stream of monthly emails and phone calls (voice messages, I never answer them), be it universities conducting a study, or recruiters looking to

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread Nick Sabalausky via Digitalmars-d
On 8/31/2014 7:57 AM, Joakim wrote: On Sunday, 31 August 2014 at 10:30:24 UTC, Nick Sabalausky wrote: There is some precedent for a commercial software package to be released like this: This is available under either a commercial license or GPL. You can freely download and use the software and

Re: code cleanup in druntime and phobos

2014-08-31 Thread Walter Bright via Digitalmars-d
On 8/30/2014 8:56 AM, Iain Buclaw via Digitalmars-d wrote: 'Thanks for your contribution and for helping make D better'. This is what our attitude must be.

Fixing Issue 1829

2014-08-31 Thread Orvid King via Digitalmars-d
A little over 4 months ago, I submitted a PR (https://github.com/D-Programming-Language/dmd/pull/3483) to DMD to fix this very old issue, which did at first have minor issues with it that were promptly fixed. The PR itself has never actually been reviewed, even though I've tried on a couple of

Re: code cleanup in druntime and phobos

2014-08-31 Thread Walter Bright via Digitalmars-d
On 8/30/2014 7:37 AM, Daniel Murphy wrote: Ola Fosheim Grøstad wrote in message news:pmrjlrkkaaiguefnq...@forum.dlang.org... Here is a good reason: «I have no interest in learning github, and I personally don't care if you accept this patch, but here you have it in case you want to improve

Re: Looking to hire: 2-3 programmers, candidates will likely need to learn D.

2014-08-31 Thread Andrei Alexandrescu via Digitalmars-d
On 8/31/14, 8:55 AM, Vladimir Panteleev wrote: How's it lookin' now? Awes, thanks! -- Andrei

Re: Encapsulating trust

2014-08-31 Thread monarch_dodra via Digitalmars-d
On Sunday, 31 August 2014 at 13:47:42 UTC, Dmitry Olshansky wrote: What do you guys think? I'd say add trusted to those function names: trustedCall trustedAddrOf Because: - call could mean a lot of things. It's not imidiatly obvious that it is meant for being trusted. - addrOf is *also* used

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread Joakim via Digitalmars-d
On Sunday, 31 August 2014 at 19:58:03 UTC, Nick Sabalausky wrote: Could be. That is a fairly convincing article, at least for the time limit version of mixed closed/open. Glad to hear that. :) Nobody has really tried my time-limited version, which I believe is the final step. But in any

Re: DIP(?) Warning to facilitate porting to other archs

2014-08-31 Thread Marco Leise via Digitalmars-d
Am Sat, 03 May 2014 03:17:23 +0200 schrieb Jonathan M Davis via Digitalmars-d digitalmars-d@puremagic.com: […] Putting warnings in the compiler always seems to result in forcing people to change their code to make the compiler shut up about something that is perfectly fine. - Jonathan M

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread Iain Buclaw via Digitalmars-d
On 31 August 2014 05:24, Nick Sabalausky via Digitalmars-d digitalmars-d@puremagic.com wrote: On 8/30/2014 9:49 PM, Era Scarecrow wrote: Although M$ doing this seems more like a move in order to muscle their way in for other things. Take the actions of their actions regarding Novell.

Slightly OT - Survey

2014-08-31 Thread Rikki Cattermole via Digitalmars-d
As part of my Degree in ICT at CPIT, I do a largish project at the end. Called Industry project. My own is in house, which I proposed. Essentially its a web service to aid learning. It would really help me if anyone who falls under either, student, educator or corporate (admin) to fill in my

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread Iain Buclaw via Digitalmars-d
On 31 August 2014 06:53, Nick Sabalausky via Digitalmars-d digitalmars-d@puremagic.com wrote: I know FSF prefers free over the open I've been using. But really, everybody knows what open and open source mean, and it's *not* confusing and ambiguous. So the whole free obsession is just semantic

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread Nick Sabalausky via Digitalmars-d
On 8/31/2014 4:43 PM, Joakim wrote: On Sunday, 31 August 2014 at 19:58:03 UTC, Nick Sabalausky wrote: Could be. That is a fairly convincing article, at least for the time limit version of mixed closed/open. Glad to hear that. :) Nobody has really tried my time-limited version, which I believe

why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-08-31 Thread Abe via Digitalmars-d
Dear all, Me: a very experienced computer programmer, a newbie to D. The test program: import std.stdio; void main() { writeln(hello world!); } The result: ls -l foo -rwxr-xr-x 1 Abe wheel 502064 Aug 31 18:47 foo file foo foo: Mach-O 64-bit executable

Oh, and I almost forgot: does this problem exist on any other platforms too? …

2014-08-31 Thread Abe via Digitalmars-d
… that is, the problem whereby DMD produces _huge_ executables for tiny programs.

line counts of outputs of nm from the object and executable from the above source code

2014-08-31 Thread Abe via Digitalmars-d
nm foo.o | wc -l 176 nm foo | wc -l 2162

Re: why does DMD compile hello world to about 500 _kilobytes_ on Mac OS X [x86_64]?!?

2014-08-31 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 31 August 2014 at 23:51:41 UTC, Abe wrote: writeln(hello world!); The std.stdio package imports most the standard library, so using it means a lot of library code is linked into your executable too. About 200kb is the D runtime code and the rest is standard library code.

Re: The std.stdio package imports most the standard library etc.

2014-08-31 Thread Abe via Digitalmars-d
Thanks, Adam. Is this roughly the same on all relevant platforms for DMD? I was thinking [hoping?] that maybe this was a problem vis-a-vis the Mac OS X linker, i.e. a situation such that the linker isn`t dropping anything from the referenced libraries, even when the majority of the stuff in

Re: The std.stdio package imports most the standard library etc.

2014-08-31 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 1 September 2014 at 00:10:25 UTC, Abe wrote: Is this roughly the same on all relevant platforms for DMD? Yeah. If you used printf instead of writeln, the size gets down to about 250K (on my linux anyway), which can then be stripped down to 160K, showing that the rest of the size

Re: The std.stdio package imports most the standard library etc.

2014-08-31 Thread Abe via Digitalmars-d
Compared to them, D programs are small. The big difference is Java, .net, ruby, python, etc. are already popular enough to have their libraries/support code pre-installed on the user's computer. D programs, on the other hand, carry all their support code with them in each executable (they're

statically linked vs. Mac OS X

2014-08-31 Thread Abe via Digitalmars-d
BTW: FYI: at least on recent-enough versions of Mac OS X, from what I have read, Apple has effectively forbidden _true_ static linking, i.e. executables with no dynamic-library dependencies whatsoever. Here`s the relevant result from the D-based hello world executable: otool -L foo

Re: If you used printf instead of writeln

2014-08-31 Thread Abe via Digitalmars-d
On Monday, 1 September 2014 at 01:02:27 UTC, Abe wrote: BTW: FYI: at least on recent-enough versions of Mac OS X, from what I have read, Apple has effectively forbidden _true_ static linking, i.e. executables with no dynamic-library dependencies whatsoever. Here`s the relevant result from

Re: The std.stdio package imports most the standard library etc.

2014-08-31 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 1 September 2014 at 00:56:35 UTC, Abe wrote: It would be nice to have an option to use a systemwide library file and dynamically link it; that way, as a silly example, You can do it on Linux with dmd right now (use dmd -defaultlib=libphobos2.so when building), but I don't know

Re: If you used printf instead of writeln […] [ignore previous post]

2014-08-31 Thread Abe via Digitalmars-d
Sorry: accidentally hit something on the keyboard that the Mac and/or Chromium interpreted as post it right now. :-( This msg. is to confirm that If you used printf instead of writeln […], from an above msg. from Adam, is also correct on Mac OS X [64-bit Intel]. Given this source code:

Re: -defaultlib=libphobos2

2014-08-31 Thread Abe via Digitalmars-d
You can do it on Linux with dmd right now (use dmd -defaultlib=libphobos2.so when building), but I don't know about the Mac, and not sure about Windows either. Well, it doesn`t look feasible with the current DMD for Mac OS X: cd /opt/Digital_Mars_D_2.066.0 find . -iname '*dylib'

Re: printf-based D code

2014-08-31 Thread Abe via Digitalmars-d
Also: the same printf-based D code as I gave in my previous post results in the following [still Mac OS X 64-bit Intel]. nm bar.o | wc -l 22 strip bar nm bar | wc -l 915 — Abe

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread Kajal Sinha via Digitalmars-d
On Wednesday, 27 August 2014 at 21:19:47 UTC, Walter Bright wrote: On 8/27/2014 1:02 PM, Jérôme M. Berger wrote: So for patent number 20140196015, the application number is 13/734762 and for patent number 20140196008, the application number is 13/734750. Jerome

Re: Voting: std.logger

2014-08-31 Thread Kevin Lamonte via Digitalmars-d
On Sunday, 31 August 2014 at 09:56:29 UTC, Ola Fosheim Grøstad wrote: The logger I am most interested in writes to a circular buffer and uploads the log to a database on a crash so that the source of the crash can be identified. I am only interested in in logging execution, not preserved state

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread Walter Bright via Digitalmars-d
On 8/31/2014 8:26 PM, Kajal Sinha wrote: Walter, will it really become a threat for D? I have no idea.

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread Russel Winder via Digitalmars-d
On Sun, 2014-08-31 at 22:01 -0700, Walter Bright via Digitalmars-d wrote: On 8/31/2014 8:26 PM, Kajal Sinha wrote: Walter, will it really become a threat for D? I have no idea. There is a patent on multiply linked lists (cf. http://www.google.co.uk/patents/US7028023) but I am fairly sure it

Re: [OT] Microsoft filled patent applications for scoped and immutable types

2014-08-31 Thread Joakim via Digitalmars-d
On Sunday, 31 August 2014 at 22:06:09 UTC, Iain Buclaw via Digitalmars-d wrote: GPL can be summarised in four simple freedoms. Nothing complicated there. The problems come up when you get into the details of how to write those freedoms into legalese, for example, the whole dynamic linking

Re: I can ask questions about dmd on windows here in this forum?

2014-08-31 Thread Ali Çehreli via Digitalmars-d-learn
On 08/30/2014 10:37 PM, Cassio Butrico wrote: I was having trouble setting on my terminal in windows, I'm still trying to solve. In addition to what Vladimir Panteleev said, you should also select a Unicode font for your terminal like Lucida Console. Basically: 1) Set the code page to

Re: I can ask questions about dmd on windows here in this forum?

2014-08-31 Thread Cassio Butrico via Digitalmars-d-learn
On Sunday, 31 August 2014 at 06:08:46 UTC, Ali Çehreli wrote: On 08/30/2014 10:37 PM, Cassio Butrico wrote: I was having trouble setting on my terminal in windows, I'm still trying to solve. In addition to what Vladimir Panteleev said, you should also select a Unicode font for your

Re: I can ask questions about dmd on windows here in this forum?

2014-08-31 Thread bearophile via Digitalmars-d-learn
Ali Çehreli: Unless there is a specific reason not to, use 'string'. When you really need random access to characters, then use 'dstring'. So are the use cases for wstring limited? Bye, bearophile

Re: I can ask questions about dmd on windows here in this forum?

2014-08-31 Thread Ali Çehreli via Digitalmars-d-learn
On 08/31/2014 12:37 AM, bearophile wrote: Ali Çehreli: Unless there is a specific reason not to, use 'string'. When you really need random access to characters, then use 'dstring'. So are the use cases for wstring limited? Bye, bearophile Yes, without real experience, I am under that

Re: I can ask questions about dmd on windows here in this forum?

2014-08-31 Thread Jonathan M Davis via Digitalmars-d-learn
On Sun, 31 Aug 2014 01:11:02 -0700 Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On 08/31/2014 12:37 AM, bearophile wrote: Ali Çehreli: Unless there is a specific reason not to, use 'string'. When you really need random access to characters, then use

Re: D daemon GC?

2014-08-31 Thread JD via Digitalmars-d-learn
Last snippet works for me, dots get printed to the logfile as expected. Ok, it works now. Using the recommended _Exit() function with DMD 2.066 on Linux. Thanks you all for your help! Best regards, Jeroen

Re: D1: Error: duplicate union initialization for size

2014-08-31 Thread Jacob Carlborg via Digitalmars-d-learn
On 2014-08-31 04:53, Ali Çehreli wrote: On 08/30/2014 06:05 PM, jicman wrote: Really is or how one can fix it? This is the only time that I have found myself without answers with D. Strange. Maybe folks are not that into D1, but D1 was before D2. Any thoughts would be greatly

A significant performance difference

2014-08-31 Thread bearophile via Digitalmars-d-learn
This is C++ code that solves one Euler problem: -- #include stdio.h #include map const unsigned int H = 9, W = 12; const int g[6][3] = {{7, 0, H - 3}, {1 + (1 H) + (1 (2 * H)), 0, H - 1}, {3 + (1 H), 0, H - 2}, {3 +

Re: How to build dlang.org dd files

2014-08-31 Thread Mike via Digitalmars-d-learn
On Sunday, 31 August 2014 at 05:41:58 UTC, Mike wrote: I've been trying to update some documentation on dlang.org. The instructions at https://github.com/D-Programming-Language/dlang.org/blob/master/CONTRIBUTING.md say I should be able to do make -f posix.make file.html This doesn't seem

alias and mixin

2014-08-31 Thread evilrat via Digitalmars-d-learn
what the problem with this? alias myint = mixin(int); // - basic type expected blah blah blah... mixin alias unusable now, it blocks various cool templates and really frustrating(such things make D feels like some cheap limited language), is there any way to tell compiler explicitly use

Re: alias and mixin

2014-08-31 Thread ketmar via Digitalmars-d-learn
On Sun, 31 Aug 2014 11:26:47 + evilrat via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: alias myint = mixin(int); // - basic type expected blah blah mixin(alias myint = ~int~;); ? signature.asc Description: PGP signature

Re: alias and mixin

2014-08-31 Thread evilrat via Digitalmars-d-learn
On Sunday, 31 August 2014 at 11:43:03 UTC, ketmar via Digitalmars-d-learn wrote: On Sun, 31 Aug 2014 11:26:47 + evilrat via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: alias myint = mixin(int); // - basic type expected blah blah mixin(alias myint = ~int~;); ? wow,

Re: How to build dlang.org dd files

2014-08-31 Thread Philippe Sigaud via Digitalmars-d-learn
dmd -c -o- macros.ddoc doc.ddoc -Df{ddoc_filename}.html {ddoc_filename}.dd If someone knows of a more official syntax, please let me know. I don't know of another syntax, but could you please put this somewhere on the wiki? Maybe in the cookbook section: http://wiki.dlang.org/Cookbook

Re: D daemon GC?

2014-08-31 Thread Gary Willoughby via Digitalmars-d-learn
On Sunday, 31 August 2014 at 09:02:55 UTC, JD wrote: Last snippet works for me, dots get printed to the logfile as expected. Ok, it works now. Using the recommended _Exit() function with DMD 2.066 on Linux. Thanks you all for your help! Best regards, Jeroen On a side note, i've created

Tango Problems..

2014-08-31 Thread seany via Digitalmars-d-learn
I have several files, which I am trying to import as modules to a central file. However, whyile trying to complie with dmd -L-ltango-dmd list of files space separated However, I am getting this error : /usr/lib/libtango-dmd.a(tango-io-Stdout-release.o): In function

Re: alias and mixin

2014-08-31 Thread Dicebot via Digitalmars-d-learn
On Sunday, 31 August 2014 at 12:01:43 UTC, evilrat wrote: On Sunday, 31 August 2014 at 11:43:03 UTC, ketmar via Digitalmars-d-learn wrote: On Sun, 31 Aug 2014 11:26:47 + evilrat via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: alias myint = mixin(int); // - basic type

Re: alias and mixin

2014-08-31 Thread Philippe Sigaud via Digitalmars-d-learn
It is basically just an annoying grammar limitation that does not allow to use mixin / __traits as an identifier. The usual helper template: ``` alias helper(alias a) = a; ``` helps for aliasing __traits and anonymous function templates (x = x+1), but I don't see an easy solution for

Re: Tango Problems..

2014-08-31 Thread seany via Digitalmars-d-learn
Oh, I am using netrunner linux with arch/manjaro core.

Re: alias and mixin

2014-08-31 Thread Dicebot via Digitalmars-d-learn
On Sunday, 31 August 2014 at 14:46:00 UTC, Philippe Sigaud via Digitalmars-d-learn wrote: It is basically just an annoying grammar limitation that does not allow to use mixin / __traits as an identifier. The usual helper template: ``` alias helper(alias a) = a; ``` helps for aliasing

Re: Tango Problems..

2014-08-31 Thread Rémy Mouëza via Digitalmars-d-learn
From what I understand in the error message, the linker cannot find a druntime function: void core.stdc.stdarg.va_end(void*). I would advise to check that the druntime lib is in the import path. In your the dmd repository, you should have a dmd.conf file containing something like:

Re: Tango Problems..

2014-08-31 Thread seany via Digitalmars-d-learn
On Sunday, 31 August 2014 at 15:40:04 UTC, Rémy Mouëza wrote: From what I understand in the error message, the linker cannot find a druntime function: void core.stdc.stdarg.va_end(void*). I would advise to check that the druntime lib is in the import path. In your the dmd repository, you

  1   2   >