Re: Why exceptions for error handling is so important

2015-01-13 Thread via Digitalmars-d
On Tuesday, 13 January 2015 at 23:58:53 UTC, deadalnix wrote: http://dlang.org/phobos/core_thread.html#.Thread.join I don't see the problem. I'm suggesting value semantics, it can be copied. When you are in the catch, you are not unwinding anymore. You could indeed loose chaining to be

Re: Why exceptions for error handling is so important

2015-01-13 Thread Meta via Digitalmars-d
On Wednesday, 14 January 2015 at 00:38:21 UTC, Walter Bright wrote: On 1/11/2015 2:48 AM, Walter Bright wrote: However, if exceptions are thrown for errors instead, the programmer has to deliberately add code if he wishes to ignore the error. Interesting that this article just appeared:

Re: The ANSI character set is very important for operating MSSQL,if no conversion,will attract more C# users

2015-01-13 Thread Mike Parker via Digitalmars-d
On 1/14/2015 1:47 AM, FrankLike wrote: The ANSI character set is very important for operating MSSQL, if no conversion, will expand the scope of D users, that can attract more C# users. Not likely. Now, the data comming from MsSql must convert by 'fromMBS' or 'toMBSz',it's not convenient to

Re: Anyone interested in embedding a JVM in their D app?

2015-01-13 Thread Rikki Cattermole via Digitalmars-d-announce
On 14/01/2015 3:00 p.m., james wrote: I've been playing with jni.h and D. I think I've got a fully working jni.d and I have the start of a nicer D wrapper around it with djvm.d. https://github.com/jamesmahler/djvm There is an example usage in the README.md. There's also why I'd do such a

Re: Common makefile (gasp) stuff

2015-01-13 Thread Walter Bright via Digitalmars-d
On 1/13/2015 3:20 PM, Andrei Alexandrescu wrote: Over the time a number of stuff has become quite duplicated across our makefiles for dmd, druntime, and phobos. These include fetching OS and model but (newer) general-purpose macros for e.g. rebasing repos, see

Re: This Week in D, issue 1

2015-01-13 Thread Zach the Mystic via Digitalmars-d-announce
On Tuesday, 13 January 2015 at 14:08:58 UTC, Adam D. Ruppe wrote: I've started writing a weekly D newsletter. Here's the first issue, any feedback welcome! http://arsdnet.net/this-week-in-d/jan-12.html In the future, I intend to have it written by Saturday for a weekend release, so if you

Re: What is the D plan's to become a used language?

2015-01-13 Thread Joakim via Digitalmars-d
On Tuesday, 13 January 2015 at 23:34:40 UTC, brian wrote: I know this thread is a little old now, and I'm not the most experienced programmer by a long shot, but I'll post my 2 cents from the n00b persepctive. A question first: ... what do people actually have working in D? I find very few

Re: GSOC - Holiday Edition

2015-01-13 Thread Craig Dillabaugh via Digitalmars-d
On Tuesday, 13 January 2015 at 12:23:16 UTC, Bruno Medeiros wrote: On 31/12/2014 03:25, Craig Dillabaugh wrote: 7) Bruno Medeiros - you suggested a DDT project. I've added it. Can you provide me with a few more details, and a bio. Also, under what license is DDT released, I couldn't access

Re: NaCl/Emscripten

2015-01-13 Thread Janus via Digitalmars-d
On Sunday, 11 January 2015 at 01:33:25 UTC, Ola Fosheim Grøstad wrote: On Sunday, 11 January 2015 at 01:05:59 UTC, Manu via Digitalmars-d wrote: With asm.js you are also stuck with a fixed size heap The heap can grow now, see

Re: Common makefile (gasp) stuff

2015-01-13 Thread Daniel Murphy via Digitalmars-d
Andrei Alexandrescu wrote in message news:m9497d$1pv2$1...@digitalmars.com... Over the time a number of stuff has become quite duplicated across our makefiles for dmd, druntime, and phobos. These include fetching OS and model but (newer) general-purpose macros for e.g. rebasing repos, see

Heady House Hunting with D

2015-01-13 Thread Philpax via Digitalmars-d-announce
Hey everyone, I recently wrote a blog post about how I used D/vibe.d to help find a new house. I haven't publicized it anywhere else yet, so I'm looking forward to what the D community has to say! You can check it out here: http://philpax.me/blog/heady-house-hunting-with-d D made it easy

Re: Heady House Hunting with D

2015-01-13 Thread Rikki Cattermole via Digitalmars-d-announce
On 14/01/2015 4:46 p.m., Philpax wrote: Hey everyone, I recently wrote a blog post about how I used D/vibe.d to help find a new house. I haven't publicized it anywhere else yet, so I'm looking forward to what the D community has to say! You can check it out here:

Re: Heady House Hunting with D

2015-01-13 Thread Nick Sabalausky via Digitalmars-d-announce
On 01/13/2015 10:56 PM, Rikki Cattermole wrote: On 14/01/2015 4:46 p.m., Philpax wrote: Hey everyone, I recently wrote a blog post about how I used D/vibe.d to help find a new house. I haven't publicized it anywhere else yet, so I'm looking forward to what the D community has to say! You can

Re: Common makefile (gasp) stuff

2015-01-13 Thread Paul O'Neil via Digitalmars-d
On 01/13/2015 09:35 PM, Andrei Alexandrescu wrote: snip 1) These interdependencies are currently expressed by hard-coded filesystem paths, which presumes a specific directory layout for checking out dmd, dlang.org, phobos, druntime. This means the build will break if somebody doesn't know the

Re: Why exceptions for error handling is so important

2015-01-13 Thread deadalnix via Digitalmars-d
On Wednesday, 14 January 2015 at 02:40:20 UTC, Jeremy Powers via Digitalmars-d wrote: http://www.artima.com/intv/handcuffs.html The best sum up of checked exception you'll find. False. Unless you mean 'the best sum up of the problems people have with checked exceptions' - it gives a good

Re: Common makefile (gasp) stuff

2015-01-13 Thread Andrei Alexandrescu via Digitalmars-d
On 1/13/15 7:44 PM, Daniel Murphy wrote: Andrei Alexandrescu wrote in message news:m9497d$1pv2$1...@digitalmars.com... Over the time a number of stuff has become quite duplicated across our makefiles for dmd, druntime, and phobos. These include fetching OS and model but (newer)

Re: Common makefile (gasp) stuff

2015-01-13 Thread Andrei Alexandrescu via Digitalmars-d
On 1/13/15 8:29 PM, Paul O'Neil wrote: On 01/13/2015 09:35 PM, Andrei Alexandrescu wrote: snip 1) These interdependencies are currently expressed by hard-coded filesystem paths, which presumes a specific directory layout for checking out dmd, dlang.org, phobos, druntime. This means the build

Re: Common makefile (gasp) stuff

2015-01-13 Thread Andrei Alexandrescu via Digitalmars-d
On 1/13/15 8:49 PM, Walter Bright wrote: It's a few lines of duplication, as opposed to adding another point of failure to the build process, i.e. common.mak isn't found or the wrong one is found, etc. I'd have difficulty agreeing with this. If dmd is found then whatever is there is found.

Re: This Week in D, issue 1

2015-01-13 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 1/13/15 8:57 PM, Zach the Mystic wrote: That being the case, there will inevitably be weeks, or even longer where no issue of This Week in... appears. We're aiming for a clockwork weekly schedule. Sure, some weeks will be more interesting than others but there will be an update every week.

More recent work on GC

2015-01-13 Thread Andrei Alexandrescu via Digitalmars-d
On my reading list: http://research.microsoft.com/pubs/230708/conservative-gc-oopsla-2014.pdf http://users.cecs.anu.edu.au/~steveb/downloads/pdf/immix-pldi-2008.pdf (this has been mentioned before) Andrei

Re: This Week in D, issue 1

2015-01-13 Thread Zach the Mystic via Digitalmars-d-announce
On Wednesday, 14 January 2015 at 06:17:35 UTC, Zach the Mystic wrote: Great to know this is a collaborative effort. Suggestion, though: Every month, call it This Month in D, and summarize the big picture. Putting this out every week without summarizing larger amounts of thought and energy will

Re: This Week in D, issue 1

2015-01-13 Thread Zach the Mystic via Digitalmars-d-announce
On Wednesday, 14 January 2015 at 05:52:45 UTC, Andrei Alexandrescu wrote: On 1/13/15 8:57 PM, Zach the Mystic wrote: That being the case, there will inevitably be weeks, or even longer where no issue of This Week in... appears. We're aiming for a clockwork weekly schedule. Sure, some weeks

Re: This Week in D, issue 1

2015-01-13 Thread Adam D. Ruppe via Digitalmars-d-announce
On Tuesday, 13 January 2015 at 16:12:50 UTC, Andrei Alexandrescu wrote: Idea: put everything in a subdir on dlang.org on our github repo. The newsletter becomes part of the website. -- Andrei Yeah, that's a good idea. I think I might make a github with the drafts and helper tools, then do a

Re: This Week in D, issue 1

2015-01-13 Thread Adam D. Ruppe via Digitalmars-d-announce
First draft of the rss feed: http://arsdnet.net/this-week-in-d/twid.rss

Re: This Week in D, issue 1

2015-01-13 Thread Leandro Lucarella via Digitalmars-d-announce
Michal Minich, el 13 de January a las 14:29 me escribiste: Though RSS/Atom would be really necessary! +1, this is a must! Thanks for the effort, great wrap up! -- Leandro Lucarella (AKA luca) http://llucax.com.ar/

Re: This Week in D, issue 1

2015-01-13 Thread Leandro Lucarella via Digitalmars-d-announce
bearophile, el 13 de January a las 14:28 me escribiste: Adam D. Ruppe: I've started writing a weekly D newsletter. Here's the first issue, any feedback welcome! http://arsdnet.net/this-week-in-d/jan-12.html Seems good. Major Changes = They are weekly, so perhaps Changes is enough.

Re: GSOC - Holiday Edition

2015-01-13 Thread CraigDillabaugh via Digitalmars-d
On Tuesday, 13 January 2015 at 12:23:16 UTC, Bruno Medeiros wrote: On 31/12/2014 03:25, Craig Dillabaugh wrote: 7) Bruno Medeiros - you suggested a DDT project. I've added it. Can you provide me with a few more details, and a bio. Also, under what license is DDT released, I couldn't access

Re: D Beginner Trying Manual Memory Management

2015-01-13 Thread Laeeth Isharc via Digitalmars-d-learn
I see, thanks! :) I've started liking structs more and more recently as well and been pondering on how to convert a class-based code that looks like this (only the base class has any data): it's hard to tell by brief description. but having multiple inheritance immediately rings an

reinterpret array

2015-01-13 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
Does the following construct hold water? version(LittleEndian) { /// interpret an array of one type as an array of a different type. /// if the array has odd length, the highest elements are /// not accessible, at worst an empty slice is returned inout ref T[] arrayOf(T, V:

Re: Why exceptions for error handling is so important

2015-01-13 Thread via Digitalmars-d
On Monday, 12 January 2015 at 20:07:17 UTC, deadalnix wrote: On Sunday, 11 January 2015 at 13:06:27 UTC, Dicebot wrote: What is your opinion of approach advertised by various functional languages and now also Rust? Where you return error code packed with actual data and can't access data

Re: D Beginner Trying Manual Memory Management

2015-01-13 Thread ketmar via Digitalmars-d-learn
On Tue, 13 Jan 2015 17:08:37 + Laeeth Isharc via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I just finished reading aldanor's blog, so I know he is slightly allergic to naked functions and prefers classes ;) that's due to absense of modules in C/C++. and namespaces aren't

Re: A naive attempt at a refcounted class proxy

2015-01-13 Thread ketmar via Digitalmars-d-learn
On Tue, 13 Jan 2015 18:12:44 + aldanor via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Tuesday, 13 January 2015 at 16:43:09 UTC, ketmar via Digitalmars-d-learn wrote: On Tue, 13 Jan 2015 16:17:51 + aldanor via Digitalmars-d-learn

Re: idiomatic D: what to use instead of pointers in constructing a tree data structure?

2015-01-13 Thread Laeeth Isharc via Digitalmars-d-learn
On Wednesday, 7 January 2015 at 14:59:58 UTC, H. S. Teoh via Digitalmars-d-learn wrote: On Wed, Jan 07, 2015 at 02:52:51PM +, Laeeth Isharc via Digitalmars-d-learn wrote: Another schoolboy question. Suppose I am constructing a tree (in this case it is an AST). In C I would have a pointer

Re: reinterpret array

2015-01-13 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Tuesday, 13 January 2015 at 17:12:42 UTC, Adam D. Ruppe wrote: On Tuesday, 13 January 2015 at 17:09:32 UTC, Dominikus Dittes Scherkl wrote: I assume taking a slice of a pointer uses the GC, so this cannot be @nogc, am I right? Nope, slicing never allocates, it just takes an address and

Re: reinterpret array

2015-01-13 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 13 January 2015 at 17:09:32 UTC, Dominikus Dittes Scherkl wrote: I assume taking a slice of a pointer uses the GC, so this cannot be @nogc, am I right? Nope, slicing never allocates, it just takes an address and length. If you append to a slice or increase the length though, the

Re: idiomatic D: what to use instead of pointers in constructing a tree data structure?

2015-01-13 Thread Tobias Pankrath via Digitalmars-d-learn
On Tuesday, 13 January 2015 at 17:19:42 UTC, Laeeth Isharc wrote: The GC is allowed to move structs around, as I undestand it. Under what circumstances do I get into trouble having a pointer to them? None, a GC that moves structs around must update every pointer afterwards and as far as I

Re: A naive attempt at a refcounted class proxy

2015-01-13 Thread aldanor via Digitalmars-d-learn
On Tuesday, 13 January 2015 at 16:43:09 UTC, ketmar via Digitalmars-d-learn wrote: On Tue, 13 Jan 2015 16:17:51 + aldanor via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: This discussion: http://forum.dlang.org/thread/bqtcdpsopxmnfbjyr...@forum.dlang.org -- led me

Re: A naive attempt at a refcounted class proxy

2015-01-13 Thread aldanor via Digitalmars-d-learn
On Tuesday, 13 January 2015 at 18:12:45 UTC, aldanor wrote: On Tuesday, 13 January 2015 at 16:43:09 UTC, ketmar via Digitalmars-d-learn wrote: On Tue, 13 Jan 2015 16:17:51 + aldanor via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: This discussion:

Re: This Week in D, issue 1

2015-01-13 Thread weaselcat via Digitalmars-d-announce
On Tuesday, 13 January 2015 at 14:08:58 UTC, Adam D. Ruppe wrote: I've started writing a weekly D newsletter. Here's the first issue, any feedback welcome! http://arsdnet.net/this-week-in-d/jan-12.html In the future, I intend to have it written by Saturday for a weekend release, so if you

Re: A naive attempt at a refcounted class proxy

2015-01-13 Thread ketmar via Digitalmars-d-learn
On Tue, 13 Jan 2015 18:14:40 + aldanor via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: // thanks ketmar for answering another one of my stupid questions on n.g. :) ah, 'cmon, your questions aren't stupid at all! ;-) signature.asc Description: PGP signature

Re: reinterpret array

2015-01-13 Thread ketmar via Digitalmars-d-learn
On Tue, 13 Jan 2015 17:09:31 + Dominikus Dittes Scherkl via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: /// interpret an array of one type as an array of a different type. may i point you to this? import std.stdio; void main () { ubyte[] a = [42,0,0,0,

Re: Visual D 0.3.40 released

2015-01-13 Thread Rainer Schuetze via Digitalmars-d-announce
On 09.01.2015 10:34, Daniel N wrote: On Thursday, 1 January 2015 at 22:00:03 UTC, Rainer Schuetze wrote: Happy new year! Just the right time for a new release of Visual D! This version features Awesome! In order to make it easier for new users, the documentation could mention that Visual

Re: The ANSI character set is very important for operating MSSQL, if no conversion,will attract more C# users

2015-01-13 Thread FrankLike via Digitalmars-d
On Wednesday, 14 January 2015 at 02:08:21 UTC, Brad Anderson wrote: On Tuesday, 13 January 2015 at 16:47:33 UTC, FrankLike wrote: The ANSI character set is very important for operating MSSQL, if no conversion, will expand the scope of D users, that can attract more C# users. Now, the data

Re: This Week in D, issue 1

2015-01-13 Thread Mike via Digitalmars-d-announce
On Tuesday, 13 January 2015 at 14:08:58 UTC, Adam D. Ruppe wrote: I've started writing a weekly D newsletter. Here's the first issue, any feedback welcome! Nice work, Adam! (as usual). I'm already looking forward to the next one :) Mike

Re: Binutils 2.25 Released - New D demangling support

2015-01-13 Thread Jacob Carlborg via Digitalmars-d-announce
On 2015-01-13 22:31, Iain Buclaw wrote: Hi, I'm not sure when it was announced, but binutils 2.25 has been released! There's a small reason for excitement as it is the first to come with D demangling support in the GNU toolchain. Is this something what will work on OS X? I'm not sure how

Re: D Meetup in Berlin

2015-01-13 Thread Walter Bright via Digitalmars-d
On 1/13/2015 8:31 AM, Ben wrote: So we have a venue and a time for the meetup. We will be meeting at 17:00 at a place called the Melbourne Canteen (http://www.melbournecanteen.com/) on Pannierstrasse in Neukolln. The venue provides free Wifi, is smoke-free, and they have kindly offered us the

Re: Why exceptions for error handling is so important

2015-01-13 Thread via Digitalmars-d
On Wednesday, 14 January 2015 at 01:37:46 UTC, deadalnix wrote: On Wednesday, 14 January 2015 at 00:24:41 UTC, Ola Fosheim Grøstad wrote: I don't see the problem. I'm suggesting value semantics, it can be copied. Then you can't catch by super class. This is not going to fly. I said value.

no size yet for forward reference for nested structures

2015-01-13 Thread qqiang via Digitalmars-d
The following code: ```D template PowerHeap(T) { import std.container : SList; private alias PowerForest = SList!PowerNode; private final class PowerNode { ... } final class PowerHead { ... } } unittest { PowerHeap!int h; } ``` failed to compile

Re: A naive attempt at a refcounted class proxy

2015-01-13 Thread ketmar via Digitalmars-d-learn
On Tue, 13 Jan 2015 18:36:15 + aldanor via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Tuesday, 13 January 2015 at 18:19:42 UTC, ketmar via Digitalmars-d-learn wrote: and then you can go with structures in the first place, i think. remember that you have that k00l

Re: Why exceptions for error handling is so important

2015-01-13 Thread via Digitalmars-d
On Tuesday, 13 January 2015 at 00:05:31 UTC, Walter Bright wrote: On 1/12/2015 3:17 PM, deadalnix wrote: On Monday, 12 January 2015 at 22:17:57 UTC, Walter Bright wrote: Yes, it does. Returning an int in EAX now becomes returning a pair [EAX,EDX]. It is not that big of a deal, EDX is a trash

Re: D Beginner Trying Manual Memory Management

2015-01-13 Thread ketmar via Digitalmars-d-learn
On Tue, 13 Jan 2015 18:35:15 + aldanor via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I guess two of my gripes with UFCS is (a) you really have to use public imports in the modules where the target types are defined so you bring all the symbols in whether you want it or

Re: Why exceptions for error handling is so important

2015-01-13 Thread via Digitalmars-d
On Monday, 12 January 2015 at 23:01:53 UTC, Ola Fosheim Grøstad wrote: On Monday, 12 January 2015 at 22:06:32 UTC, deadalnix wrote: No, Exception are a bail out mechanism. It is the, I have no idea what to do about this mechanism. The way it is done in C++, yes. If you put aside performance

Re: reinterpret array

2015-01-13 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Tuesday, 13 January 2015 at 18:25:38 UTC, ketmar via Digitalmars-d-learn wrote: On Tue, 13 Jan 2015 17:09:31 + Dominikus Dittes Scherkl via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: /// interpret an array of one type as an array of a different type. may i point

Re: D Beginner Trying Manual Memory Management

2015-01-13 Thread aldanor via Digitalmars-d-learn
On Tuesday, 13 January 2015 at 17:08:38 UTC, Laeeth Isharc wrote: I see, thanks! :) I've started liking structs more and more recently as well and been pondering on how to convert a class-based code that looks like this (only the base class has any data): it's hard to tell by brief

Re: A naive attempt at a refcounted class proxy

2015-01-13 Thread aldanor via Digitalmars-d-learn
On Tuesday, 13 January 2015 at 18:19:42 UTC, ketmar via Digitalmars-d-learn wrote: and then you can go with structures in the first place, i think. remember that you have that k00l `alias this` trick for them! Which doesn't always help in case of multiple inheritance :( e.g. the blasted hdf c++

Re: This Week in D, issue 1

2015-01-13 Thread ketmar via Digitalmars-d-announce
On Tue, 13 Jan 2015 17:30:52 + Adam D. Ruppe via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: First draft of the rss feed: http://arsdnet.net/this-week-in-d/twid.rss looking nice. and seems to work too. ;-) signature.asc Description: PGP signature

Re: reinterpret array

2015-01-13 Thread anonymous via Digitalmars-d-learn
On Tuesday, 13 January 2015 at 20:00:57 UTC, Dominikus Dittes Scherkl wrote: So if I have a function that allowes to do this: uint a; a.bit[16] = true; writeln(a); // 65536 Is it also already available? a |= 1 16;

Re: Why exceptions for error handling is so important

2015-01-13 Thread deadalnix via Digitalmars-d
On Wednesday, 14 January 2015 at 00:24:41 UTC, Ola Fosheim Grøstad wrote: I don't see the problem. I'm suggesting value semantics, it can be copied. Then you can't catch by super class. This is not going to fly. When you are in the catch, you are not unwinding anymore. You could indeed

Re: Why exceptions for error handling is so important

2015-01-13 Thread deadalnix via Digitalmars-d
On Wednesday, 14 January 2015 at 00:40:10 UTC, Meta wrote: On Wednesday, 14 January 2015 at 00:38:21 UTC, Walter Bright wrote: On 1/11/2015 2:48 AM, Walter Bright wrote: However, if exceptions are thrown for errors instead, the programmer has to deliberately add code if he wishes to ignore

Re: Pointers and offsets

2015-01-13 Thread Mike Parker via Digitalmars-d-learn
On 1/14/2015 10:17 AM, Bauss wrote: On Wednesday, 14 January 2015 at 01:16:54 UTC, Bauss wrote: Is it possible to access a pointer by its offsets. Ex. write a 32bit integer to a byte pointer at ex. offset 4. To give an example in C# you can do this: fixed (byte* Packet = Buffer) // Buffer

Re: What is the D plan's to become a used language?

2015-01-13 Thread Rikki Cattermole via Digitalmars-d
On 14/01/2015 12:34 p.m., brian wrote: I know this thread is a little old now, and I'm not the most experienced programmer by a long shot, but I'll post my 2 cents from the n00b persepctive. A question first: ... what do people actually have working in D? I find very few working examples of

Re: The ANSI character set is very important for operating MSSQL, if no conversion,will attract more C# users

2015-01-13 Thread Brad Anderson via Digitalmars-d
On Tuesday, 13 January 2015 at 16:47:33 UTC, FrankLike wrote: The ANSI character set is very important for operating MSSQL, if no conversion, will expand the scope of D users, that can attract more C# users. Now, the data comming from MsSql must convert by 'fromMBS' or 'toMBSz',it's not

Re: Common makefile (gasp) stuff

2015-01-13 Thread Andrei Alexandrescu via Digitalmars-d
On 1/13/15 3:55 PM, H. S. Teoh via Digitalmars-d wrote: On Tue, Jan 13, 2015 at 03:20:12PM -0800, Andrei Alexandrescu via Digitalmars-d wrote: Hey folks, Over the time a number of stuff has become quite duplicated across our makefiles for dmd, druntime, and phobos. These include fetching OS

Re: Map Lambda with Side-Effects

2015-01-13 Thread Tobias Pankrath via Digitalmars-d-learn
Is it possible to - detect that a lambda is has-side-effects and that - the map hasn't been used? Thing is: I'm regularly doing that on purpose. Actually, isn't your closure even weakly pure in your example, because arr is part of the closure and thus an argument to it.

Re: Pointers and offsets

2015-01-13 Thread Bauss via Digitalmars-d-learn
On Wednesday, 14 January 2015 at 01:16:54 UTC, Bauss wrote: Is it possible to access a pointer by its offsets. Ex. write a 32bit integer to a byte pointer at ex. offset 4. To give an example in C# you can do this: fixed (byte* Packet = Buffer) // Buffer would be a byte array And then to set

Pointers and offsets

2015-01-13 Thread Bauss via Digitalmars-d-learn
Is it possible to access a pointer by its offsets. Ex. write a 32bit integer to a byte pointer at ex. offset 4. To give an example in C# you can do this: fixed (byte* Packet = Buffer) // Buffer would be a byte array And then to set the value of a specific offset *((TYPE*)(Packet + OFFSET))

rdmd Broken

2015-01-13 Thread Chuck Allison via Digitalmars-d
Hi all, I have no idea what happened, but rdmd gives me the strangest error: /usr/local/bin/dmd: failed to launch executable at /Library/Compilers/dmd2/osx/bin/dmd.Failed: I uninstalled dmd (using Jacob Carlsberg's uninstall shell script) and reinstalled 2.066 on Mac os x (yosemite) and

Re: D port of the Dynamic Window Manager (DWM)

2015-01-13 Thread stewarth via Digitalmars-d-announce
On Sunday, 11 January 2015 at 14:08:26 UTC, Dicebot wrote: On Monday, 5 January 2015 at 06:17:03 UTC, stewart h wrote: Hi, I've ported DWM to D as a learning exercise and thought I'd share it. The repository can be found here: https://bitbucket.org/growlercab/ddwm (Beware, I've only tested

Re: This Week in D, issue 1

2015-01-13 Thread Joseph Cassman via Digitalmars-d-announce
On Tuesday, 13 January 2015 at 14:08:58 UTC, Adam D. Ruppe wrote: I've started writing a weekly D newsletter. Here's the first issue, any feedback welcome! http://arsdnet.net/this-week-in-d/jan-12.html In the future, I intend to have it written by Saturday for a weekend release, so if you

Anyone interested in embedding a JVM in their D app?

2015-01-13 Thread james via Digitalmars-d-announce
I've been playing with jni.h and D. I think I've got a fully working jni.d and I have the start of a nicer D wrapper around it with djvm.d. https://github.com/jamesmahler/djvm There is an example usage in the README.md. There's also why I'd do such a thing in there. I'm not sure if anyone

Re: Why exceptions for error handling is so important

2015-01-13 Thread Walter Bright via Digitalmars-d
On 1/11/2015 2:48 AM, Walter Bright wrote: However, if exceptions are thrown for errors instead, the programmer has to deliberately add code if he wishes to ignore the error. Interesting that this article just appeared: https://blog.golang.org/errors-are-values by Rob Pike on error

Re: D Beginner Trying Manual Memory Management

2015-01-13 Thread ketmar via Digitalmars-d-learn
On Mon, 12 Jan 2015 22:07:13 + aldanor via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I see, thanks! :) I've started liking structs more and more recently as well and been pondering on how to convert a class-based code that looks like this (only the base class has any

Re: What happened to dmd usage pages?

2015-01-13 Thread Joakim via Digitalmars-d
On Monday, 12 January 2015 at 20:55:42 UTC, Steven Schveighoffer wrote: e.g. http://dlang.org/dmd-osx.html I can get to this page by searching google, but the menu on the left has eliminated it. See here: http://dlang.org/download.html Why? It looks like the SUBNAV_DOWNLOAD is not being

Re: Why exceptions for error handling is so important

2015-01-13 Thread Jacob Carlborg via Digitalmars-d
On 2015-01-12 19:28, H. S. Teoh via Digitalmars-d wrote: While I agree with the general sentiment, I think the current convention of using a class hierarchy to implement exceptions is suboptimal. The problem with using a class hierarchy is that, like anything put into a hierarchy, some things

Re: Thoughts on replacement languages (Reddit + D)

2015-01-13 Thread Nemanja Boric via Digitalmars-d
It's also on /r/rust http://www.reddit.com/r/rust/comments/2s7bnt/thoughts_about_rust_from_d_programmer/ On Monday, 12 January 2015 at 19:25:28 UTC, Andrei Alexandrescu wrote: On 1/12/15 11:01 AM, Dicebot wrote: On Monday, 12 January 2015 at 18:55:49 UTC, John Colvin wrote: The import

Re: D Beginner Trying Manual Memory Management

2015-01-13 Thread ketmar via Digitalmars-d-learn
On Mon, 12 Jan 2015 23:06:16 + jmh530 via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I had seen some stuff on alias thing, but I hadn't bothered to try to understand it until now. If I'm understanding the first example a href=http://dlang.org/class.html#AliasThis;here/a,

Re: D Beginner Trying Manual Memory Management

2015-01-13 Thread ketmar via Digitalmars-d-learn
On Mon, 12 Jan 2015 22:07:13 + aldanor via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I see, thanks! :) I've started liking structs more and more recently as well and been pondering on how to convert a class-based code that looks like this (only the base class has any

Re: Why exceptions for error handling is so important

2015-01-13 Thread Paulo Pinto via Digitalmars-d
On Monday, 12 January 2015 at 23:18:52 UTC, bearophile wrote: Ola Fosheim Grøstad: (Most of std::C++ is optional, templated and inefficient... There is no consistent culture. Though they got some thing right with unique_ptr and new language features recently.) I don't agree. The basic ideas

Re: Endless static this call when used a thread in it

2015-01-13 Thread Daniel Kozák via Digitalmars-d-learn
V Tue, 13 Jan 2015 13:53:09 + tcak via Digitalmars-d-learn digitalmars-d-learn@puremagic.com napsáno: I have written the following code: test.d == import core.thread; import std.stdio; void threadFunc(){ writeln(Thread func); } public static

Re: This Week in D, issue 1

2015-01-13 Thread ketmar via Digitalmars-d-announce
On Tue, 13 Jan 2015 14:08:57 + Adam D. Ruppe via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: I've started writing a weekly D newsletter. Here's the first issue, any feedback welcome! http://arsdnet.net/this-week-in-d/jan-12.html In the future, I intend to have

Re: This Week in D, issue 1

2015-01-13 Thread Michal Minich via Digitalmars-d-announce
On Tuesday, 13 January 2015 at 14:08:58 UTC, Adam D. Ruppe wrote: I've started writing a weekly D newsletter. Here's the first issue, any feedback welcome! http://arsdnet.net/this-week-in-d/jan-12.html This is great! I was really hoping for this weekly or by-weekly summary of D ecosystem.

Re: This Week in D, issue 1

2015-01-13 Thread Michal Minich via Digitalmars-d-announce
On Tuesday, 13 January 2015 at 14:28:56 UTC, aldanor wrote: Great stuff :) Are you planning to make the content open-source so others could suggest edits more easily? Will there be an archive? use D wiki for it?

Re: Endless static this call when used a thread in it

2015-01-13 Thread tcak via Digitalmars-d-learn
On Tuesday, 13 January 2015 at 13:53:11 UTC, tcak wrote: I have written the following code: test.d == import core.thread; import std.stdio; void threadFunc(){ writeln(Thread func); } public static this(){ auto t = new Thread( threadFunc );

Re: Endless static this call when used a thread in it

2015-01-13 Thread ketmar via Digitalmars-d-learn
On Tue, 13 Jan 2015 13:56:05 + tcak via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: it works normal now. But it doesn't explain above issue. What's the relation between a new thread and a module's initialiser? yes. signature.asc Description: PGP signature

Re: Endless static this call when used a thread in it

2015-01-13 Thread Daniel Kozák via Digitalmars-d-learn
V Tue, 13 Jan 2015 13:56:05 + tcak via Digitalmars-d-learn digitalmars-d-learn@puremagic.com napsáno: On Tuesday, 13 January 2015 at 13:53:11 UTC, tcak wrote: I have written the following code: test.d == import core.thread; import std.stdio; void

Re: This Week in D, issue 1

2015-01-13 Thread ketmar via Digitalmars-d-announce
On Tue, 13 Jan 2015 14:08:57 + Adam D. Ruppe via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: I've started writing a weekly D newsletter. Here's the first issue, any feedback welcome! http://arsdnet.net/this-week-in-d/jan-12.html In the future, I intend to have

Re: DConf 2015 Call for Submissions is now open

2015-01-13 Thread Iain Buclaw via Digitalmars-d-announce
On 13 January 2015 at 10:51, Joakim via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: On Tuesday, 13 January 2015 at 07:30:22 UTC, Brad Anderson wrote: On Tuesday, 13 January 2015 at 00:22:33 UTC, Mike wrote: I have a suggestion for any compiler implementers: How about a

Re: Endless static this call when used a thread in it

2015-01-13 Thread Daniel Kozak via Digitalmars-d-learn
On Tuesday, 13 January 2015 at 14:02:45 UTC, Daniel Kozák via Digitalmars-d-learn wrote: V Tue, 13 Jan 2015 13:56:05 + tcak via Digitalmars-d-learn digitalmars-d-learn@puremagic.com napsáno: On Tuesday, 13 January 2015 at 13:53:11 UTC, tcak wrote: I have written the following code:

This Week in D, issue 1

2015-01-13 Thread Adam D. Ruppe via Digitalmars-d-announce
I've started writing a weekly D newsletter. Here's the first issue, any feedback welcome! http://arsdnet.net/this-week-in-d/jan-12.html In the future, I intend to have it written by Saturday for a weekend release, so if you want something to appear this week, please try to get it to by

Re: Why exceptions for error handling is so important

2015-01-13 Thread Paulo Pinto via Digitalmars-d
On Tuesday, 13 January 2015 at 13:28:04 UTC, Ola Fosheim Grøstad wrote: On Tuesday, 13 January 2015 at 12:53:15 UTC, Paulo Pinto wrote: As long as it is only used for scripting nothing. But when people remember to use it for writing applications, then it is just plain slow and I don't see

Re: Read from stdin without blocking

2015-01-13 Thread Adam D. Ruppe via Digitalmars-d-learn
The operating system does line buffering, so you'll need to turn that off. The function is tcssetattr() on Posix and SetConsoleMode on Windows. My terminal.d does this in struct ctors and dtors: https://github.com/adamdruppe/arsd/blob/master/terminal.d example usage:

Re: This Week in D, issue 1

2015-01-13 Thread aldanor via Digitalmars-d-announce
On Tuesday, 13 January 2015 at 14:08:58 UTC, Adam D. Ruppe wrote: I've started writing a weekly D newsletter. Here's the first issue, any feedback welcome! http://arsdnet.net/this-week-in-d/jan-12.html In the future, I intend to have it written by Saturday for a weekend release, so if you

Re: This Week in D, issue 1

2015-01-13 Thread bearophile via Digitalmars-d-announce
Adam D. Ruppe: I've started writing a weekly D newsletter. Here's the first issue, any feedback welcome! http://arsdnet.net/this-week-in-d/jan-12.html Seems good. Major Changes = They are weekly, so perhaps Changes is enough. If you can, add two or three little images to the page, like

Re: This Week in D, issue 1

2015-01-13 Thread Dicebot via Digitalmars-d-announce
Cool stuff :) Out if curiosity - how much of your effort/time did it take to make it?

Re: This Week in D, issue 1

2015-01-13 Thread Dicebot via Digitalmars-d-announce
On Tuesday, 13 January 2015 at 14:46:51 UTC, Adam D. Ruppe wrote: On Tuesday, 13 January 2015 at 14:17:18 UTC, ketmar via Digitalmars-d-announce wrote: can we haz a cheeseburger^w rss for it? please! ;-) Ah, I'll have to write one. Andrei mentioned that'd be one benefit of using something

Re: This Week in D, issue 1

2015-01-13 Thread Adam D. Ruppe via Digitalmars-d-announce
On Tuesday, 13 January 2015 at 14:36:54 UTC, Daniel Kozak wrote: Some of links in Significant Forum Discussions section doesn`t work Ooooh there's $1 and $2 in the links and ddoc thinks those are arguments instead of literal dollar signs. Joy. Fixed now if you want to refresh the page.

Re: Map Lambda with Side-Effects

2015-01-13 Thread John Colvin via Digitalmars-d-learn
On Tuesday, 13 January 2015 at 10:21:12 UTC, Tobias Pankrath wrote: On Tuesday, 13 January 2015 at 10:06:26 UTC, bearophile wrote: Nordlöw: Has there been any discussions on making map require pure functions now that we have each? Perhaps I'd like Phobos map and filter to be annotated with

Re: Why exceptions for error handling is so important

2015-01-13 Thread Russel Winder via Digitalmars-d
On Mon, 2015-01-12 at 13:04 -0800, Walter Bright via Digitalmars-d wrote: On 1/12/2015 11:27 AM, Russel Winder via Digitalmars-d wrote: Unless you are writing Python code. Nobody would be in this forum if we preferred Python :-) Why does one have to prefer a language to the exclusion of

Re: Why exceptions for error handling is so important

2015-01-13 Thread John Colvin via Digitalmars-d
On Tuesday, 13 January 2015 at 10:51:33 UTC, Russel Winder via Digitalmars-d wrote: On Mon, 2015-01-12 at 13:04 -0800, Walter Bright via Digitalmars-d wrote: On 1/12/2015 11:27 AM, Russel Winder via Digitalmars-d wrote: Unless you are writing Python code. Nobody would be in this forum if

Re: Accessing class with module name as Java's

2015-01-13 Thread tcak via Digitalmars-d-learn
Ah, I just re-read your OP. Your already at this point :) Since everybody has understood the problem, and nobody could have come up with a solution yet, my idea is that: HttpSocketConnectionRequest.d = module net.http.HttpSocketConnectionRequest; module

  1   2   3   >