Re: The difference between the dates in years

2024-02-10 Thread Brad Roberts via Digitalmars-d-learn
On 2/10/2024 6:01 PM, matheus via Digitalmars-d-learn wrote: On Saturday, 10 February 2024 at 22:11:48 UTC, Brad Roberts wrote: Back when I was doing lots of software developer interviews, one of my frequent questions involved date math.  This wasn't because it's difficult fro

Re: The difference between the dates in years

2024-02-10 Thread Brad Roberts via Digitalmars-d-learn
Back when I was doing lots of software developer interviews, one of my frequent questions involved date math. This wasn't because it's difficult from a coding standpoint, but that it's NOT a coding problem. The key part of the question is realization that it's a requirements question. The thi

Re: malloc error when trying to assign the returned pointer to a struct field

2023-09-09 Thread Brad Roberts via Digitalmars-d-learn
On 9/8/2023 12:59 AM, rempas via Digitalmars-d-learn wrote: u64 _cap = 0; // Total amount of elements (not bytes) we can this._ptr = cast(T*)malloc(size); I'm pretty sure this is your problem. You're allocating size bytes which is only going to work where sizeof(T) == 1. Changing to ma

Re: purity question

2017-05-28 Thread Brad Roberts via Digitalmars-d-learn
On 5/28/2017 6:46 PM, Brad Roberts via Digitalmars-d-learn wrote: Here's the bug that I'm digging into today, a clear example of an api that _should_ be pure, but based on the implementation is rather difficult for the compiler to infer. https://issues.dlang.org/show_bug.cgi?id=17442

Re: purity question

2017-05-28 Thread Brad Roberts via Digitalmars-d-learn
On 5/28/2017 6:36 PM, Jonathan M Davis via Digitalmars-d-learn wrote: On Sunday, May 28, 2017 17:53:25 Brad Roberts via Digitalmars-d-learn wrote: On 5/28/2017 5:34 PM, Jonathan M Davis via Digitalmars-d-learn wrote: On Sunday, May 28, 2017 16:49:16 Brad Roberts via Digitalmars-d-learn wrote

Re: purity question

2017-05-28 Thread Brad Roberts via Digitalmars-d-learn
On 5/28/2017 6:27 PM, Jonathan M Davis via Digitalmars-d-learn wrote: On Monday, May 29, 2017 01:01:46 Stefan Koch via Digitalmars-d-learn wrote: On Monday, 29 May 2017 at 00:53:25 UTC, Brad Roberts wrote: On 5/28/2017 5:34 PM, Jonathan M Davis via Digitalmars-d-learn wrote: On Sunday, May

Re: purity question

2017-05-28 Thread Brad Roberts via Digitalmars-d-learn
On 5/28/2017 6:01 PM, Stefan Koch via Digitalmars-d-learn wrote: On Monday, 29 May 2017 at 00:53:25 UTC, Brad Roberts wrote: On 5/28/2017 5:34 PM, Jonathan M Davis via Digitalmars-d-learn wrote: On Sunday, May 28, 2017 16:49:16 Brad Roberts via Digitalmars-d-learn wrote: Is there a mechanism

Re: purity question

2017-05-28 Thread Brad Roberts via Digitalmars-d-learn
On 5/28/2017 5:34 PM, Jonathan M Davis via Digitalmars-d-learn wrote: On Sunday, May 28, 2017 16:49:16 Brad Roberts via Digitalmars-d-learn wrote: Is there a mechanism for declaring something pure when it's built from parts which individually aren't? string foo(string s) {

purity question

2017-05-28 Thread Brad Roberts via Digitalmars-d-learn
Is there a mechanism for declaring something pure when it's built from parts which individually aren't? string foo(string s) { // do something arbitrarily complex with s that doesn't touch globals or change global state except possibly state of the heap or gc return s; }

Re: spam in bugzilla

2016-11-23 Thread Brad Roberts via Digitalmars-d-learn
I've been marking the accounts as spam and moving the bugs to a specific spam product/category. The last few days have been unusual. If it keeps up, I'll investigate ways of potentially dealing with it better, but I really don't want to add friction to the signup process. It's hard enough to

Re: Is memory-safe IO possible?

2016-01-22 Thread Brad Roberts via Digitalmars-d-learn
On 1/22/2016 9:10 AM, Chris Wright via Digitalmars-d-learn wrote: On Fri, 22 Jan 2016 08:36:14 +, Kagamin wrote: Should be possible. Why not? Because almost no IO routines in Phobos are marked @safe, which implies that it's difficult in practice or that people simply haven't done it. I ch

Re: Calling D from C, C++, Python…

2015-09-12 Thread Brad Roberts via Digitalmars-d-learn
On 9/12/15 9:20 AM, Adam D. Ruppe via Digitalmars-d-learn wrote: On Saturday, 12 September 2015 at 09:47:55 UTC, Jacob Carlborg wrote: Well, if your D function doesn't use anything of the runtime I guess it's not necessary. Right. If you don't call into the threading system in the druntime, y

Re: Startup files for STM32F4xx

2015-04-25 Thread Brad Roberts via Digitalmars-d-learn
On 4/25/2015 10:02 PM, Timo Sintonen via Digitalmars-d-learn wrote: -Import mess. Phobos files import several other files. Some of them cannot be used. Work is going on to remove unnecessary imports and use scoped imports. It is important that imports for unittests are only in unittest blocks. -

Re: Valgrind

2015-04-20 Thread Brad Roberts via Digitalmars-d-learn
Valgrind has a mechanism for teaching it how to ignore certain patterns. A long time ago I setup suppressions for the gc, but the code has changed out from under that version so the work would need to be redone. On 4/20/2015 7:23 PM, Martin Nowak via Digitalmars-d-learn wrote: On Monday, 20 A

Re: std.conv.to purity

2015-02-14 Thread Brad Roberts via Digitalmars-d-learn
While snprintf might be one thing that provides to be an interesting obstacle, the better answer to why std.conv.to isnt pure is that no one has invested the time to work through issues like that to make it so. It _should_ be pure. On 2/14/2015 12:32 PM, ketmar via Digitalmars-d-learn wrote:

Re: Getting libcurl for 64 bit Windows

2014-06-26 Thread Brad Roberts via Digitalmars-d-learn
The one that the win64 auto-tester uses is here: http://downloads.dlang.org/other/ curl-7.28.1-devel-rainer.win64.zip There's a newer one available there, but I can't vouch for it. On 6/26/14, 11:49 AM, Andrei Alexandrescu via Digitalmars-d-learn wrote: On 6/26/14, 11:11 AM, Mark

Re: Can I circumvent nothrow?

2014-04-26 Thread Brad Roberts via Digitalmars-d-learn
On 4/26/14, 6:39 PM, Damian Day via Digitalmars-d-learn wrote: So I have this procedure: extern (C) void signal_proc(int sn) @system nothrow Which can call this: shutdown_system() @system nothrow Problem I have is inside "shutdown_system()" I have code that can't possibly be @nothrow because the

Re: list in spam blacklist? [OT]

2014-04-04 Thread Brad Roberts
Once every few years spamhaus 'cleans up' their white lists with no notifications. I've already initiated the re-removal. Sigh. I hate spamhaus, they're a pain in every mail sender's backside. On 4/4/14, 10:25 AM, Hugo Florentino wrote: Hi, IP 173.45.241.208 (slice-1.puremagic.com) seems to

Re: Why CTFE is context-sensitive?

2014-01-27 Thread Brad Roberts
On 1/27/14 10:40 AM, Pierre Talbot wrote: On Monday, 27 January 2014 at 01:39:47 UTC, Simen Kjærås wrote: On 2014-01-26 09:59, Pierre Talbot wrote:> Hi, > > I was wondering why CTFE is context sensitive, why don't we check > every expressions and run the CTFE if it applies? Mostly because it's

Re: Profiling

2014-01-24 Thread Brad Roberts
Please file a bug on this. The docs should be on dlang.org. On 1/24/14 11:15 AM, Dmitry Olshansky wrote: 24-Jan-2014 20:31, Philippe Sigaud пишет: I'm trying to use the `-profile` flag for DMD and, without any documentation, I can't really understand the resulting log files: * They contain on

Re: A little of coordination for Rosettacode

2014-01-15 Thread Brad Roberts
On 1/15/14 4:42 PM, bearophile wrote: Brad Roberts: I think this is a mistake. They should compile with a released compiler. Why? And why do you think that outweighs the several advantages of having entries compilable only with the latest beta compiler? (Currently there are 40-50 entries

Re: A little of coordination for Rosettacode

2014-01-15 Thread Brad Roberts
On 1/15/14 4:18 PM, bearophile wrote: What version of the D compiler are you using? I am assuming Rosettacode to be compilable with the latest "bleeding edge" compiler. So if you use the latest released compiler some of the entries will not compile. Such entries should not be "fixed" at all.

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 be

Re: Linker error: Symbol Undefined

2013-10-11 Thread Brad Roberts
It's due to having the destructor versioned out when building foo and visible when building bar. When brought together, you've created an incompatible whole. There's no destructor actually included in foo's .o file that you told it it could expect to find. There's no bug in the compiler or lin

Re: Auto-testing of GitHub pull requests

2013-09-25 Thread Brad Roberts
On 9/25/13 2:58 PM, Joseph Rushton Wakeling wrote: On 24/09/13 18:25, Brad Roberts wrote: I'd use a standard tool (or would have, silly to switch when this one does the job) but none of them support the combination of features used. Primarily: github, testing on multiple platforms, te

Re: Auto-testing of GitHub pull requests

2013-09-24 Thread Brad Roberts
On 9/24/13 4:29 AM, Joseph Rushton Wakeling wrote: On 24/09/13 13:01, Jacob Carlborg wrote: It's custom. I would guess it either uses a git hook or it uses some API provided by Github. Ahh, OK. I was wondering if it used some standard tool to manage starting the test jobs and reporting back

Re: Unable to use tradional tools to find memory leaks

2013-09-21 Thread Brad Roberts
On 9/21/13 9:01 AM, Maxim Fomin wrote: On Saturday, 21 September 2013 at 14:30:19 UTC, Flamaros wrote: I tried to used Valgrind (Linux) and Dr Memory (Windows) without success to find a big leak I have in my application. But both tools can't launch my application without make it crash. Is app

Re: Why is the rex.w prefix not generated for certain instructions in inline assembler blocks?

2013-09-11 Thread Brad Roberts
On 9/11/13 9:59 AM, Joseph Cassman wrote: On Monday, 9 September 2013 at 20:37:47 UTC, Joseph Cassman wrote: So I'm out of ideas on where the error is coming from. Anyone got any ideas on what's going on here? Still not sure what is going on but I found a work-around that somebody else might

Re: scoped imports

2013-08-20 Thread Brad Roberts
On 8/17/13 5:20 PM, H. S. Teoh wrote: On Sun, Aug 18, 2013 at 01:24:12AM +0200, bearophile wrote: H. S. Teoh: Most of your answer posts break threads. I suggest you to try to find ways to avoid that. [...] Unfortunately, it's not within my control. It's the mailing list to NNTP gateway that h

Re: for loop parens

2013-07-12 Thread Brad Roberts
On 7/12/13 1:46 PM, ixid wrote: They are not issues in Go, but Walter is strongly against optional semicolons, as bearophile said. Me and others (like you) like optional semicolons, but since Walter doesn't and it's his language, that will not change. I personally understand much better the co

Re: What xml libraries are people using?

2013-03-03 Thread Brad Roberts
On Sat, 2 Mar 2013, Jesse Phillips wrote: > On Saturday, 2 March 2013 at 08:03:08 UTC, simendsjo wrote: > > Everyone says "Don't use std.xml", and there are several other libraries. > > Which can you recommend? (I haven't looked closely at any of them, just some > > links found by googling) > > >

Re: Inlining a "pure" ASM function

2013-02-28 Thread Brad Roberts
On Thu, 28 Feb 2013, Simen Kj?r?s wrote: > On Thu, 28 Feb 2013 16:22:49 +0100, D-ratiseur > wrote: > > > Hello, Is it possible for an ASM function to be inlined in D? > > Nope. To be a little more accurate: it's possible in the technical sense. No D compiler today does it automatically. Th

Re: Importing problems

2013-02-13 Thread Brad Roberts
On Wed, 13 Feb 2013, jerro wrote: > I created self-contained sample.d, ran it with rdmd, then moved class A to > sample_a.d and tried to run it with rdmd again. I could reproduce the issue > that way. It seems that rdmd caches the dependency list. Using --chatty flag > confirms that rdmd does not

Re: How to read fastly files ( I/O operation)

2013-02-04 Thread Brad Roberts
On Mon, 4 Feb 2013, monarch_dodra wrote: > AFAIK, he is reading text data that needs to be parsed line by line, so > byChunk may not be the best approach. Or at least, not the easiest approach. > > I'm just wondering if maybe the reason the D code is slow is not just because > of: > - unicode. >

Re: Pull 1019

2013-01-18 Thread Brad Roberts
On Fri, 18 Jan 2013, monarch_dodra wrote: > On Friday, 18 January 2013 at 18:35:47 UTC, Namespace wrote: > > Ok, thanks. > > But nobody can tell me when and if the "pull" is merged, right? > > I think many users here would be pleased if someone could say something to > > this pull. > > Not sure w

Re: Inner function overload bug?

2013-01-10 Thread Brad Roberts
On 1/10/2013 5:49 PM, Timon Gehr wrote: > On 01/08/2013 10:12 PM, Philippe Sigaud wrote: >> It's conform to the spec >> >> http://dlang.org/function.html >> >> Last line of the 'nested functions' subsection: >> >> "Nested functions cannot be overloaded." >> Nested functions cannot be overloaded. >

Re: Marking bug entires as fixed/closed on bugzilla

2012-12-14 Thread Brad Roberts
On 12/14/2012 3:47 AM, monarch_dodra wrote: > I have a whole list of bugs/issues that have since been corrected in > 2.060alpha. > > I was wondering when and how these were to be closed? > > Am I supposed to wait for an official 2.061 first? > > Do I have to prove it was fixed, or just a simple

Re: static init cycle detection problem

2012-09-20 Thread Brad Roberts
On Thu, 20 Sep 2012, Jonathan M Davis wrote: > On Thursday, September 20, 2012 20:49:32 ?ivind wrote: > > Thanks for the explination. The trick you talk about has worked > > for me before, but now I really need static init of modules that > > depend on eachother. Only solution I can think of is to

Re: D and SCons [ was Re: bigint <-> python long ]

2012-09-09 Thread Brad Roberts
On 9/9/2012 1:15 AM, Johannes Pfau wrote: > Am Sat, 08 Sep 2012 16:25:49 +0100 > schrieb Russel Winder : > >> On Sat, 2012-09-08 at 07:20 -0700, Ellery Newcomer wrote: >> […] >>> Okay, here: >>> https://bitbucket.org/ariovistus/deimos-elfutils/overview >>> >>> I have some code with a working makef

Re: float[] → Vertex[] – decreases performance by 1000%

2012-08-28 Thread Brad Roberts
On Wed, 29 Aug 2012, Timon Gehr wrote: > On 08/29/2012 01:26 AM, David wrote: > > > Use this to create a minimal test case with minimal user interaction: > > > https://github.com/CyberShadow/DustMite > > > > Doesn't help if dmd doesn't crash, or? > > > > It doesn't help a lot if compilation suc

Re: Tiny/Small C++ libraries

2012-08-05 Thread Brad Roberts
On 8/5/2012 7:09 PM, Jonathan M Davis wrote: > On Sunday, August 05, 2012 18:57:07 Brad Roberts wrote: >> On 8/5/2012 5:19 PM, Jonathan M Davis wrote: >>> Last I heard, it never releases _any_ memory, and the one attempt to fix >>> that via a garbage collector tanked per

Re: Tiny/Small C++ libraries

2012-08-05 Thread Brad Roberts
On 8/5/2012 5:19 PM, Jonathan M Davis wrote: > Last I heard, it never releases _any_ memory, and the one attempt to fix that > via a garbage collector tanked performance. It _is_ something that needs to > be > sorted out one of these days though. It's often said, and never true. It's patently

Re: ufcs and integer params

2012-07-18 Thread Brad Roberts
On 7/18/2012 5:30 AM, Adam D. Ruppe wrote: > On Wednesday, 18 July 2012 at 11:37:43 UTC, David Nadlinger wrote: >> Arguments! Yay! > > I've gone over this a dozen times on the group and on > bugzilla, and I'm kinda sick of repeating it. > > -property breaks craploads of code. That's a huge negati

Re: Is this actually supposed to be legal?

2012-07-16 Thread Brad Roberts
http://en.wikipedia.org/wiki/Curiously_recurring_template_pattern On 7/16/2012 10:24 PM, Jonathan M Davis wrote: > This code strikes me as being a bug: > > > class MyBase(T) > {} > > class MySubA : MyBase!MySubA > {} > > class MySubB : MyBase!MySubB > {} > > void main() > {} > ---

Re: Wrapping c variadic functions

2012-02-23 Thread Brad Roberts
On Thu, 23 Feb 2012, H. S. Teoh wrote: > On Thu, Feb 23, 2012 at 08:53:00PM +0100, Artur Skawina wrote: > > On 02/23/12 20:37, simendsjo wrote: > > > Hmm. Didn't my previous post make it to the newsgroup? Is visible at > > > my end. > > > > The mailing list gets stuck sometimes and does not forwa

Re: D and Programming Theory (Suggestions?)

2011-10-12 Thread Brad Roberts
One really good book I read ages ago that takes the magic away from c++ and talks about how it's translated into an underlying implementation is "Inside the C++ Object Model" by Stanley Lippman. While it's written with c++ in mind, it's details can be abstracted to just about any object orient

Re: const main args?

2011-08-15 Thread Brad Roberts
On Mon, 15 Aug 2011, Timon Gehr wrote: > On 08/15/2011 03:47 PM, Steven Schveighoffer wrote: > > On Fri, 12 Aug 2011 17:51:50 -0400, bearophile > > wrote: > > > > > Steven Schveighoffer: > > > > > > > > int main(in string[] args); > > > > > > > > What would be the purpose of this? > > > > > >

Re: Writing .di files duplicate storage

2011-08-08 Thread Brad Roberts
On Monday, August 08, 2011 12:54:00 AM, simendsjo wrote: > On 08.08.2011 09:47, Jonathan M Davis wrote: >> http://d.puremagic.com/issues/show_bug.cgi?id=6360 > > Thanks. The annoying thing is that I have to manually modify the import > library :| Could spend the time fixing dmd instead of workin

Re: (int << ulong) == int ?

2011-08-07 Thread Brad Roberts
Which has nothing to do with the question about integral promotion. On Aug 7, 2011, at 3:07 PM, bearophile wrote: > Dmitry Olshansky: > >> Sorry for the noise. > > It's not noise, and you don't need to be sorry, in my opinion it's a D/DMD > design fault. Clang gives an error on code like th

Re: Versioned extern?

2011-07-23 Thread Brad Roberts
On Saturday, July 23, 2011 8:35:39 PM, Nick Sabalausky wrote: > Is there a way to have a section of code be extern(C) on one OS and > extern(Windows) on another OS, without resorting making the code in question > a mixin? > > These doesn't appear to work: > > -- > ve

Re: Infinite loop not working DMD2

2011-06-02 Thread Brad Roberts
On 6/2/2011 8:43 AM, Guillermo Estrada wrote: > Hi, been developing in D a lot but first time in news groups, I > thought this might be the place. > > I'm trying to make a fork bomb in D (of course no fork cause target > its windows platform) but anyway. I did one a while ago using D1 and > Tango

Re: Helping the compiler with assumptions while using exceptions

2011-05-30 Thread Brad Roberts
On 5/30/2011 2:55 PM, Jonathan M Davis wrote: > I'd be very surprised to see the compiler ever optimize code based on assert > or enforce statement. It's unlikely to do so based on assert simply because > the assertion is going to be compiled out. I think that there's a high chance > that optim

Re: version(all) block in src/phobos/unittest.d unnecessary?

2011-05-28 Thread Brad Roberts
On 5/28/2011 9:03 AM, Dmitry Olshansky wrote: > On 28.05.2011 19:54, Andrej Mitrovic wrote: >> What the heck, I've just opened the linux makefile and it's beautiful >> compared to the windows one. The windows one is 3x the size. Is this >> because Linux uses GNU's make perhaps? > Don't think so, th

Re: How to run DMD's tests?

2011-04-07 Thread Brad Roberts
On 4/7/2011 10:17 PM, Nick Sabalausky wrote: > Like the subject says. I try to use the makefile, but I keep getting this: > > Error on line 76: expecting target : dependencies > It requires gnu make to run. You can look at the scripts used by the auto-tester here: https://github.com/braddr/

Re: How do I limit the number of active threads (queuing spawn calls)

2011-03-26 Thread Brad Roberts
On 3/26/2011 7:00 PM, Andrej Mitrovic wrote: > Edit: It looks like I did almost the same as Jonathan advised. > > I'm looking forward to std.parallelism though. I'm thinking I'd > probably use some kind of parallel foreach loop that iterates over 4 > files at once, and letting it do its work by sp

Re: Access 'this' in inline assembly

2011-03-07 Thread Brad Roberts
On Mon, 7 Mar 2011, bearophile wrote: > Emil Madsen: > > > > Is this just a fact of the current state of dmd, or is it by design? - and > > if thats the case, why? > > It's by design, but it's a bad/wrong design. The LDC compiler has two > different ways to inline asm. It's a necessary feature

Re: github syntax hilighting

2011-01-26 Thread Brad Roberts
On 1/26/2011 7:13 AM, Steven Schveighoffer wrote: > Anyone have any clue why this file is properly syntax-aware: > > https://github.com/D-Programming-Language/druntime/blob/master/src/rt/lifetime.d > > but this file isn't > > https://github.com/D-Programming-Language/druntime/blob/master/src/cor

Re: Trouble with OPTLINK

2010-11-13 Thread Brad Roberts
On 11/13/2010 1:14 PM, bearophile wrote: > Aardvark Soup: > >> I've already tried cleaning up all build files and adding the current >> directory to the system PATH, both to no avail. This does not happen >> while I compile single-file programs that import from the standard >> library. Does any

Re: Generic collection/element function signatures in D2 versus D1

2010-09-11 Thread Brad Roberts
On 9/11/2010 9:32 PM, Nick Sabalausky wrote: > "Jacob Carlborg" wrote in message > news:i5t61q$2j7...@digitalmars.com... >> >> If you're not going to modify the content of the array I think this will >> work: >> >> void foo (T) (const(T)[] collection, T elem) {} >> >> This will allow both mutabl

Re: Exception stack traces on Phobos2? (Win or Lin)

2010-09-04 Thread Brad Roberts
On 9/4/2010 3:14 PM, Nick Sabalausky wrote: > "Nick Sabalausky" wrote in message > news:i5ufqs$1v2...@digitalmars.com... >> Is there a way to get stack traces for exceptions on Phobos2? For either >> Windows (preferably), or for Linux. >> > > Oops, sorry, I completely forgot I asked the exact s

Re: I don't understand a const

2010-09-02 Thread Brad Roberts
On 9/2/2010 5:59 AM, Simen kjaeraas wrote: > bearophile wrote: > >> This program doesn't compile, dmd prints the errors: >> test.d(4): Error: template test.foo(T) does not match any function template >> declaration >> test.d(4): Error: template test.foo(T) cannot deduce template function from >>

Re: itfi limitation or bug on my part?

2010-08-07 Thread Brad Roberts
On 8/7/2010 12:42 PM, Don wrote: > Brad Roberts wrote: >> module test; >> >> void main() >> { >> int[] foos; >> func1(foos); >> } >> >> void func1(T)(const T[] foos) >> { >> T afoo; >> func2(foos, afoo); &g

itfi limitation or bug on my part?

2010-08-07 Thread Brad Roberts
module test; void main() { int[] foos; func1(foos); } void func1(T)(const T[] foos) { T afoo; func2(foos, afoo); } void func2(T)(const T[] foos, out T afoo) { } $ dmd -c test.d test.d(12): Error: template test.func2(T) does not match any function template declaration test.d(12):

Re: Loop optimization

2010-05-16 Thread Brad Roberts
On 5/16/2010 4:15 PM, Walter Bright wrote: > bearophile wrote: >> DMD compiler doesn't perform many optimizations, > > This is simply false. DMD does an excellent job with integer and pointer > operations. It does a so-so job with floating point. > > There are probably over a thousand optimizatio

Re: Latest GDB version problems

2010-05-10 Thread Brad Roberts
On Mon, 10 May 2010, Robert Clipsham wrote: > On 10/05/10 19:48, Piotrek wrote: > > (gdb) info locals > > i = 1 > > s = 578159222890430469 > > f = 9.55146781e-38 > > (gdb) show language > > The current source language is "auto; currently d". > > You are not using a version of gdb with D support i

Re: Memory leak with dynamic array

2010-04-12 Thread Brad Roberts
On Mon, 12 Apr 2010, Joseph Wakeling wrote: > Curious question: how come with a registered email address my messages > have to be moderated, whereas via the http interface I can post straight > away? :-P > > Best wishes, > > -- Joe All new subscribers to the lists start off moderated until

Re: DMD on x86_64

2010-02-16 Thread Brad Roberts
On 2/16/2010 10:05 PM, Jesse Phillips wrote: > Robert Clipsham wrote: > >> On 16/02/10 15:20, Jesse Phillips wrote: >>> Robert Clipsham wrote: >>> I don't use ubuntu, so those instructions don't apply to me. >>> >>> I don't either, but the instructions still apply to me. What distro are >>> y

Re: Traced static assert ?

2009-12-04 Thread Brad Roberts
Don wrote: > Jacob Carlborg wrote: >> Is it possible to somehow trace a static assert, just like a backtrace >> for exceptions ? > > http://d.puremagic.com/issues/show_bug.cgi?id=2816 > > Unfortunately Walter rejected it, but gave no clue as to why. Walter, if Don was to update the patch to matc

Re: implicit ubyte casting

2009-10-01 Thread Brad Roberts
On Thu, 1 Oct 2009, Saaa wrote: > I think is very bug-prone, isn't it obvious iub should be -5? > > ubyte ub = 5; > int iub = -ub; // iub now is 251 > > What is the reasoning to do it this way? The inclusion of the 'int' part obscures what I think the real problem is.. Does it make sense

Re: XML D2.x parsing &

2009-07-21 Thread Brad Roberts
Jarrett Billingsley wrote: > On Tue, Jul 21, 2009 at 11:53 PM, Brad Roberts wrote: >> Jesse Phillips wrote: >>> On Wed, 22 Jul 2009 01:37:38 +0100, Stewart Gordon wrote: >>> >>>> Jesse Phillips wrote: >>>>> According to the documentation having

Re: XML D2.x parsing &

2009-07-21 Thread Brad Roberts
Jesse Phillips wrote: > On Wed, 22 Jul 2009 01:37:38 +0100, Stewart Gordon wrote: > >> Jesse Phillips wrote: >>> According to the documentation having & in a tag will be turned to >>> & >>> >>> http://digitalmars.com/d/2.0/phobos/std_xml.html#text >>> >>> I observe that this is not the case. And i

Re: Valgrind && D

2009-04-22 Thread Brad Roberts
Sean Kelly wrote: > Stefan Rohe wrote: >> Hi, >> >> has anybody experience with the usage of valgrind and D? >> We are here using DMD (dmd 1.033/tango 0.997 but also some older >> versions) >> and got problems using valgrind on this. >> It seems that the _d_newarrayT routine or something under it j

Re: enum to string

2009-03-12 Thread Brad Roberts
On Thu, 12 Mar 2009, BCS wrote: > Reply to Lionello, > > > cr*p, I've pasted too little. Try this one instead.. > > > > I'll use a proper diff tool next time.. > > > > you client is messing with you, paste-bin the sucker or add it to a bugzilla > item Just to be sure the two don't get combine

Re: casting int[] to bool[]

2009-01-28 Thread Brad Roberts
Bill Baxter wrote: > On Thu, Jan 29, 2009 at 12:04 PM, Jarrett Billingsley > wrote: >> On Wed, Jan 28, 2009 at 9:57 PM, Bill Baxter wrote: >>> It's just that casting is a very blunt tool and should be avoided >>> whenever possible, because the compiler won't tell you if you're doing >>> something

Re: should I use 1.0 or 2.0?

2008-10-28 Thread Brad Roberts
akcom wrote: > For production applications, should I be using D 1.0 or D 2.0? An awfully broad a question, the answer might well be neither depending on your needs for production. What are your requirements? What's your definition of production? Based on the original question, you'll primarily