Re: Why the hell doesn't foreach decode strings

2011-10-21 Thread Jerry
--i); > } > Or even simpler: foreach (dchar c; s) outp.put(c); foreach supports decoding built into the language. Jerry

Re: GSoC Mentor Summit Observations and D Marketing

2011-11-01 Thread Jerry
ly so as D becomes more popular. The AA ABI issue could be solved by defining all AA operations to map to a template class defined by druntime. That's what already happens, but defining it would plug this hole. Jerry

Re: Translation of C struct to D

2011-11-14 Thread Jerry
Michael Kremser writes: > Hi! > > I currently try to create a simple linux driver (for test purposes) > just like in [1] in D based on [2]. The main difficulty is to call > register_chrdev. It expects an argument "fops" of type file_operations > which can look like that in C: > > static struct fi

Re: Website message overhaul, pass 2

2011-11-25 Thread Jerry
enough equivalents from enough other languages, it might more directly highlight the strengths of D for newbies with those backgrounds. So in this case a perl comparison wouldn't be illuminating but a C++ one would. If all the various paradigms that D supports get illustrated that way it might give a broader feeling for how D will make things easier on many fronts. Jerry

Re: Discussion on D support in gdb

2011-11-25 Thread Jerry
"Martin Nowak" writes: > On Tue, 22 Nov 2011 04:18:47 +0100, Andrei Alexandrescu > wrote: > >> Maybe someone knowledgeable could chime in: >> >> http://sourceware.org/ml/gdb/2011-11/msg00066.html >> >> >> >> Andrei > > I think we should follow Tom Tromney's proposal to add the extensions > under

Re: Discussion on D support in gdb

2011-11-25 Thread Jerry
e the issues in bugzilla? Huh, I swore I had already filed a bug regarding the AA ABI. http://d.puremagic.com/issues/show_bug.cgi?id=7008 Jerry

Re: std.container and classes

2011-12-20 Thread Jerry
when you make it a member of a struct or class that will have lots of instances and therefore lots of tiny containers. In C++ at my work, we embed tiny vectors in objects all the time. If you have a situation where there's enough of the objects that the memory actually matters, and the vectors need to be resizeable but are often small, the container overhead matters. With a class, you've added a reference pointer, vtable, typeinfo on top of the storage for the container itself. Also, the extra dereference to get from the object to its member container is often going to be a cache miss, slowing things down further. So if you embed an Array class in an object, you pay for 2 pointer dereferences to get to the data rather than one. With a class you'll have to roll your own to avoid the costs. Jerry

Re: System programming in D

2012-01-05 Thread Jerry
oing to the debug build, I save a fair bit of time. I find that you get used to the weirdnesses that show up when stepping through optimized code. I'm probably able to find problems I'm looking for 60-70% of the time without resorting to using the debug build. Jerry

dmd 2.057 64bit produces broken binaries

2012-01-14 Thread Jerry
;ve filed a bug. Someone else posted saying it works fine, suggesting the problem is my setup. Any suggestions? Thanks Jerry

Limitation with current regex API

2012-01-16 Thread Jerry
need to be able to align the results of multiple transformations to the input text. Thanks Jerry

Re: Limitation with current regex API

2012-01-16 Thread Jerry
"Vladimir Panteleev" writes: > On Tuesday, 17 January 2012 at 01:44:37 UTC, Vladimir Panteleev wrote: >> On Monday, 16 January 2012 at 19:28:42 UTC, Jerry wrote: >>> As far as I can tell, the only way to do this would be to capture every >>> chunk of text,

Re: Limitation with current regex API

2012-01-16 Thread Jerry
Mail Mantis writes: > 2012/1/17 Vladimir Panteleev : >> On Tuesday, 17 January 2012 at 01:44:37 UTC, Vladimir Panteleev wrote: >>> >>> On Monday, 16 January 2012 at 19:28:42 UTC, Jerry wrote: >>>> >>>> As far as I can tell, the only way to d

Re: AA key conversion woes

2012-04-17 Thread Jerry
roll their own hashtables when working with large tables where the cost of duping all those keys actually matters. Also, I have found it useful on a number of occasions to key a hashtable with an object where the hash function is only computed on part of the object and the rest is mutable. Jerry

Re: too early for D2 and too late for D1

2011-05-03 Thread Jerry
jasonw writes: > Don't get me wrong, D is already much faster than many "toy" > languages. Faster than Java and C# in some applications. What's > relevant is that the C/C++/Fortran users will only switch if D > provides concrete performance improvements over their *existing* > toolchains. It has t

Re: D dropped in favour of C# for PSP emulator

2012-05-28 Thread Jerry
it > an "interesting" range, so I put it in std.range. The argument could go either > way. Now it's gone one way. Let's move on. This is posted long after the conversation, but a partial solution to the confusion could be handled in the docs. Add a section in std.algorithms referring to std.range, so that newcomers can find what they're looking for with less confusion. Jerry

Re: Exchange of possible interest :o)

2011-10-05 Thread Jerry
Sean Kelly writes: > So the next step is a manhunt for Dave F. Or a rewrite of the parts he > contributed? How difficult is it to identify and rewrite the parts he contributed?

Re: Formal Review of std.regex (FReD)

2011-10-11 Thread Jerry
I have 2 thoughts. 1) Minor doc typo: Long form for hex notation should be \U00YY. 2) Unicode set syntax If you're going to provide unicode set support, why not use ICU syntax rather than invent another one? Jerry

Re: std.allocator ready for some abuse

2013-11-04 Thread Jerry
Andrei Alexandrescu writes: > On 10/26/13 8:00 AM, Andrei Alexandrescu wrote: > > Just implemented AlignedMallocator and pushed. > > http://erdani.com/d/phobos-prerelease/std_allocator.html#.AlignedMallocator I'm having a vision of a perverse version called MalignedAllocator...

Re: std.allocator ready for some abuse

2013-11-04 Thread Jerry
ding: Since you have allocate() allocateAll() I would use allocateAligned() reallocateAligned() to be more consistent. Jerry

Re: Question/request/bug(?) re. floating-point in dmd

2013-11-07 Thread Jerry
pr, discarding any extra precision. > That's the best I've come up with so far. What about something like the following? double x; double y; with (strictprecision) { y = x; } The idea being that you can create a scope within which operations are executed with no extra precision. Jerry

Re: Phobos math expert wanted: Please help porting std.conv.parse to 64bit reals

2013-11-19 Thread Jerry
parse to systems with 64 bit reals > (real.mant_dig == 113) :-) > > https://github.com/D-Programming-Language/phobos/blob/master/std/conv.d#L2367 First step, please enter a bug so that the issue doesn't get lost. I may be able to look at it a little tonight. I'm not an expert, but I have some experience with floating point conversion. Jerry

Re: Vote for std.uni

2013-05-24 Thread Jerry
Yes. Titlecasing support is missing. I assume that can be added in? Thanks, Jerry

DMD 2.063 produces broken binaries

2013-06-04 Thread Jerry
help would be appreciated Thanks Jerry

Re: Slow performance compared to C++, ideas?

2013-06-04 Thread Jerry
+1

Re: Slow performance compared to C++, ideas?

2013-06-04 Thread Jerry
"Jonathan M Davis" writes: > On Tuesday, June 04, 2013 14:41:30 Jerry wrote: >> +1 > > Please always quote at least some of the post that you're replying to. Posts > don't always thread properly on all clients, so it's not always obvious who &

Re: DMD 2.063 produces broken binaries

2013-06-04 Thread Jerry
"Rob T" writes: > On Tuesday, 4 June 2013 at 18:03:53 UTC, Jerry wrote: >> Hi folks, >> >> I've downloaded the current dmd 2.063 zip and tried it out. This is >> Ubuntu 12.10 x86_64. Every program I compile segfaults when I try to >> run it.

Re: DMD 2.063 produces broken binaries

2013-06-04 Thread Jerry
"Gary Willoughby" writes: > On Tuesday, 4 June 2013 at 18:03:53 UTC, Jerry wrote: >> Hi folks, >> >> I've downloaded the current dmd 2.063 zip and tried it out. This is >> Ubuntu 12.10 x86_64. Every program I compile segfaults when I try to >> ru

Re: DMD 2.063 produces broken binaries

2013-06-09 Thread Jerry
"Andrei Alexandrescu" writes: > On Sunday, 9 June 2013 at 17:23:16 UTC, Andrei Alexandrescu wrote: >> On Sunday, 9 June 2013 at 17:22:36 UTC, Andrei Alexandrescu wrote: >>> On Wednesday, 5 June 2013 at 02:30:37 UTC, Jerry wrote: >>>> jlquinn@wyvern:~/re/

Re: DMD 2.063 produces broken binaries

2013-06-10 Thread Jerry
"John Colvin" writes: > On Monday, 10 June 2013 at 06:41:39 UTC, Jerry wrote: >> >> LD_LIBRARY_PATH is empty. I've now reproduced this segfault on a Debian >> testing machine as well as my Ubuntu one. I'm pretty confused. >> >> Jerry >

Re: DMD 2.063 produces broken binaries

2013-06-10 Thread Jerry
Andrei Alexandrescu writes: > On 6/10/13 2:41 AM, Jerry wrote: >> "Andrei Alexandrescu" writes: >> >>> On Sunday, 9 June 2013 at 17:23:16 UTC, Andrei Alexandrescu wrote: >>>> On Sunday, 9 June 2013 at 17:22:36 UTC, Andrei Alexandrescu wrote: &

Re: DMD 2.063 produces broken binaries

2013-06-10 Thread Jerry
Walter Bright writes: > On 6/10/2013 2:56 PM, Walter Bright wrote: >> On 6/10/2013 2:38 PM, nazriel wrote: >>> On Monday, 10 June 2013 at 21:33:20 UTC, Walter Bright wrote: On 6/10/2013 2:28 PM, nazriel wrote: >> program was compiled with dmd (2.063) using the following flags: -g >>

Re: DMD 2.063 produces broken binaries

2013-06-10 Thread Jerry
Walter Bright writes: > On 6/10/2013 9:52 AM, Jerry wrote: >>> 5. Does gdb reveal anything interesting? >> >> Unfortunately there's no debugging symbols in _d_dso_registry(). I >> assume the compiler is writing asm directly. > > Use the 'disasse

Re: DMD 2.063 produces broken binaries

2013-06-11 Thread Jerry
"nazriel" writes: > On Tuesday, 11 June 2013 at 06:00:01 UTC, Andrei Alexandrescu wrote: >> On 6/11/13 12:22 AM, Andrei Alexandrescu wrote: >>> On 6/10/13 6:10 PM, Jerry wrote: >>>> [pid 23169] >>>> open("/home/jlquinn/dmd2/linux/bi

Hopefully not-too-obvious observation

2013-07-17 Thread Jerry
? Is this bad style? Thanks Jerry

Is this a bug?

2013-11-26 Thread Jerry
If I read correctly, the following is legal code. If you comment out one of the case statements, it does the expected thing. With 4 or more, it crashes. This is with dmd 2.064.2 on Debian. If it's a bug, I'll file a report. Thanks! class BB {} class DD : CC {} class CC : BB { static CC crea

Re: Is this a bug?

2013-11-26 Thread Jerry
"H. S. Teoh" writes: > On Tue, Nov 26, 2013 at 06:33:28PM -0500, Jerry wrote: >> If I read correctly, the following is legal code. If you comment out >> one of the case statements, it does the expected thing. With 4 or more, >> it crashes. This is with dmd 2.06

Re: Is this a bug?

2013-11-26 Thread Jerry
Jerry writes: > "H. S. Teoh" writes: > >> On Tue, Nov 26, 2013 at 06:33:28PM -0500, Jerry wrote: >>> If I read correctly, the following is legal code. If you comment out >>> one of the case statements, it does the expected thing. With 4 or more, >

Re: Is this a bug?

2013-11-26 Thread Jerry
e moment. I'm wondering if this problem is the same kind of thing. Jerry

Re: Phobos math expert wanted: Please help porting std.conv.parse to 64bit reals

2013-11-27 Thread Jerry
it'd be awesome if you could help > reviewing it once I opened the pull request. Sure I'd be happy to. Jerry

Re: Is this a bug?

2013-11-27 Thread Jerry
"deadalnix" writes: > On Wednesday, 27 November 2013 at 07:09:17 UTC, Jerry wrote: >> Philippe Sigaud writes: >> >>> No crash on Linux (Kubuntu) 32bits, DMD 2.064.2. >>> >>> Works with 5 or 6 case's also. >> >> This is actuall

Re: GDB - lets make D support awesome

2013-11-27 Thread Jerry
"Iain Buclaw" writes: > Hi, > > I've created a gdb fork on github and will be giving d-lang support some love > - with the intention of pushing patches back to gdb development as soon as > possible. The bulk of the work will be done over the next fortnight, but for > some other work (see buglink

Re: GDB - lets make D support awesome

2013-11-27 Thread Jerry
Iain Buclaw writes: > On 27 November 2013 20:17, Jerry wrote: >> Hi Ian, Here's a first bug. >> >> I'm on Ubuntu 12.10 x86_64. Debugging isn't stepping through the code. >> Here's a simple example. This is with dmd 2.064.2 and a fresh clon

Re: GDB - lets make D support awesome

2013-12-02 Thread Jerry
Iain Buclaw writes: > On 27 November 2013 23:15, Brad Roberts wrote: >> On 11/27/13 1:56 PM, Iain Buclaw wrote: >>> >>> On 27 November 2013 20:17, Jerry wrote: >>>> Hi Ian, Here's a first bug. >>>> >>>> I'm on Ubunt

Re: Is this a bug?

2013-12-02 Thread Jerry
ling with head gives me a working binary for this test. Thanks Jerry

Re: between and among: worth Phobosization?

2013-12-17 Thread Jerry
return 0; > } This seems less useful to me. What was the example where you found it useful? Jerry

Re: GuitarHero/RockBand fans... side project anyone?

2013-12-17 Thread Jerry
ch from the pipes, perhaps 100 feet away from some pipes, leading to extremely large delays. I read one account where low notes had a 300ms delay from pressing the pedal. Jerry

Re: between and among: worth Phobosization?

2013-12-17 Thread Jerry
Jerry writes: > Andrei Alexandrescu writes: > >> uint among(T, Us...)(T v, Us vals) >> { >> foreach (i, U; Us) >> { >> if (v == vals[i]) return i + 1; >> } >> return 0; >> } > > This seems less useful to me.

Re: Accessing vtable, initialiser, etc symbols from debug (gdb)

2014-01-02 Thread Jerry
t$ > __Class -> classinfo$ > __vtbl -> vtable$ > __interface -> interfaceinfo$ > __ModuleInfo -> moduleinfo$ I like this approach. Do we need the "info" in classinfo$, interfaceinfo$, and moduleinfo$? Jerry

Re: Microsoft working on new systems language

2014-01-03 Thread Jerry
cycled without paying for the vector reallocations. This is definitely a useful pattern to not have to rewrite. Jerry

Re: Should this work?

2014-01-09 Thread Jerry
I is currently more complex to understand than I'd like. However, it's significantly easier to use than what's in standard C++ for anything beyond ascii. Jerry

Re: Should this work?

2014-01-17 Thread Jerry
do though. This looks much nicer as a summary. I would personally prefer to have the details all on the same page below, rather than having to jump to a new page for each different function. Still, thumbs up! Jerry

Re: Smart pointers instead of GC?

2014-02-03 Thread Jerry
s to try to address the problems you raise: http://researcher.watson.ibm.com/researcher/view_project_subpage.php?id=175 Any thoughts? Jerry

Re: Testing some singleton implementations

2014-02-04 Thread Jerry
"Stanislav Blinov" writes: > On Tuesday, 4 February 2014 at 09:44:04 UTC, Andrej Mitrovic wrote: > >> I've finally managed to build LDC2 on Windows (MinGW version), here >> are the timings between DMD and LDC2: >> >> $ dmd -release -inline -O -noboundscheck -unittest singleton_2.d >> -oftest.exe

Re: Testing some singleton implementations

2014-02-05 Thread Jerry
"Stanislav Blinov" writes: > On Wednesday, 5 February 2014 at 00:11:58 UTC, Jerry wrote: > >> Here's the best and worst times I get on my linux laptop. These are >> with 2.064.2 dmd and gdc 4.9 with 2.064.2 >> >> On Ubuntu x86_64: >> >>

Re: Testing some singleton implementations

2014-02-06 Thread Jerry
"Stanislav Blinov" writes: > On Wednesday, 5 February 2014 at 21:47:40 UTC, Jerry wrote: > >> I downloaded the test program yesterday. > > Here's my latest revision: http://dpaste.dzfl.pl/5b54df1c7004 > > Andrej, I hope you don't mind me fiddling w

Re: List of Phobos functions that allocate memory?

2014-02-07 Thread Jerry
Walter Bright writes: > On 2/6/2014 6:19 PM, Andrei Alexandrescu wrote: >> On 2/6/14, 5:23 PM, Walter Bright wrote: >>> I'm tempted to say that the throw expression can call 'new' even if the >>> function is marked as @nogc. >> >> That's extreme. A better possibility is to allocate exceptions fro

Re: Phobos for Review: std.buffer.scopebuffer

2014-02-07 Thread Jerry
"Lars T. Kyllingstad" writes: > On Friday, 7 February 2014 at 10:29:07 UTC, Walter Bright wrote: > Ah, now I understand. I misunderstood you -- I thought you meant that using > ScopeBuffer to build the return array inside buildPath(), while retaining the > function's API, would somehow improve i

Re: Testing some singleton implementations

2014-02-11 Thread Jerry
"Andrej Mitrovic" writes: > On Tuesday, 11 February 2014 at 03:43:35 UTC, Daniel Murphy wrote: >> "Dejan Lekic" wrote in message news:nvakemdpugwupoqct...@forum.dlang.org... >>> > Don't forget that __gshared static and static __gshared do > different >>> things! >>> >>> Care to elaborate? >> >>

Re: D as A Better C?

2014-02-13 Thread Jerry
ies. I still want that. And I would like to see the gc be as performant as possible, and be relatively easy to avoid in bottlenecks. I don't work on real time systems, but throughput and not hammering the memory bus matters a lot. Jerry

Thought on limiting scope of GC

2014-02-13 Thread Jerry
at may get created, but you can limit how much work gets done. Comments? Slams? Jerry

Re: Thought on limiting scope of GC

2014-02-14 Thread Jerry
Andrei Alexandrescu writes: > On 2/13/14, 8:41 PM, Jerry wrote: >> Hi all, >> >> I just had the following thought on limiting the gc in regions. I don't >> know if this would address some of Manu's concerns, but here goes: >> >> My thought is to

Re: Thought on limiting scope of GC

2014-02-14 Thread Jerry
"Paulo Pinto" writes: > On Friday, 14 February 2014 at 04:41:43 UTC, Jerry wrote: >> My thought is to have something like the following: >> >> GC.track(); >> auto obj = allocateStuff(); >> GC.cleanup(obj); >> >> The idea here is that trac

Re: Thought on limiting scope of GC

2014-02-14 Thread Jerry
"tcak" writes: > Many people wants to disable GC to improve performance (if there are other > reasons, it is not included here.). If after adding new codes, memory problems > start, just disable the GC-disabled-code-parts (as I exampled with that 10,000 > item array). This way, errors will disapp

Re: Thought on limiting scope of GC

2014-02-14 Thread Jerry
"thedeemon" writes: > On Friday, 14 February 2014 at 04:41:43 UTC, Jerry wrote: >> My thought is to have something like the following: >> >> GC.track(); >> auto obj = allocateStuff(); >> GC.cleanup(obj); >> >> The idea here is that track() t

Re: Thought on limiting scope of GC

2014-02-14 Thread Jerry
Andrei Alexandrescu writes: > On 2/14/14, 3:28 AM, Jerry wrote: >> Track says keep track of objects allocated after the track call, and >> cleanup only looks at those objects that were recently allocated, >> ignoring the rest of the heap. >> >> If you're s

Re: Return by 'ref' problems...

2014-02-19 Thread Jerry
"Remo" writes: >> Looks like it's a bug. > How to report this bug ? https://d.puremagic.com/issues/

Re: DIP56 Provide pragma to control function inlining

2014-02-24 Thread Jerry
Andrei Alexandrescu writes: > On 2/23/14, 8:26 PM, Vladimir Panteleev wrote: >> Thus, I think there should be "try to inline" (same as -inline) and >> "always inline" (failure stops compilation). > > Sounds fair enough. pragma(inline, false); pragma(inline, true); pragma(inline, force); // inli

Re: Final by default?

2014-03-13 Thread Jerry
ix down the road. I'd *much* rather these maintenance headaches not be virtual. I also second the point that a controlled deprecation cycle is vastly different from accidental breakage. It can be planned for as long as the communication happens. It might be very useful to have a roadmap page that lists every deprecation cycle that is planned or ongoing. Jerry

toString ugliness

2008-12-06 Thread Jerry
toString() doesn't work inside a class member function. import std.string; class A { void f() { string s = toString(5); } } This errors with junk.d(19): function object.Object.toString () does not match parameter types (int) This is a nuisance and a wart (though not a bug per-se). If t

Re: toString ugliness

2008-12-06 Thread Jerry
Jarrett Billingsley Wrote: > On Sat, Dec 6, 2008 at 11:21 AM, Jerry <[EMAIL PROTECTED]> wrote: > > toString() doesn't work inside a class member function. > > > > import std.string; > > class A { > > void f() { > >string s = toString(5

Re: [review] new string type

2010-12-03 Thread Jerry Quinn
we use them a lot. Probably the right thing to do in this case is just pay for the cost of using dchar everywhere, but if you're working with large enough quantities of data, storage efficiency matters. Jerry

Re: [review] new string type

2010-12-03 Thread Jerry Quinn
Steven Schveighoffer Wrote: > On Fri, 03 Dec 2010 14:40:30 -0500, Jerry Quinn > wrote: > > > I tend to do a lot of transforming strings, but I need to track offsets > > back to the original text to maintain alignment between the results and > > the input. For

Re: eliminate junk from std.string?

2011-01-11 Thread Jerry Quinn
case? That might be a bit too magical. Rather than zfill, what about modifying ljustify, rjustify, and center to take an optional fill character? One set of functions I'd like to see are startsWith() and endsWith(). I find them frequently useful in Java and an irritating lack in the C++ standard library. Jerry

Re: eliminate junk from std.string?

2011-01-11 Thread Jerry Quinn
Jerry Quinn Wrote: > One set of functions I'd like to see are startsWith() and endsWith(). I find > them frequently useful in Java and an irritating lack in the C++ standard > library. Just adding that these functions are useful because they're more efficient than doing

Re: eliminate junk from std.string?

2011-01-11 Thread Jerry Quinn
Andrei Alexandrescu Wrote: > On 1/11/11 1:45 PM, Jerry Quinn wrote: > > Unclear if iswhite() refers to ASCII whitespace or Unicode. If Unicode, > > which version of the standard? > > Not sure. > > enum dchar LS = '\u2028';

Re: eliminate junk from std.string?

2011-01-11 Thread Jerry Quinn
Jerry Quinn Wrote: > > > Same comment for icmp(). Also, in the Unicode standard, case folding can > > > depend on the specific language. > > > > That uses toUniLower. Not sure how that works. > > And doesn't mention details about the Unicode standard

Re: xxxInPlace or xxxCopy?

2011-01-19 Thread Jerry Quinn
Andrei Alexandrescu Wrote: > On 1/19/11 6:53 PM, Jonathan M Davis wrote: > > On Wednesday, January 19, 2011 15:33:16 Andrei Alexandrescu wrote: > >> I'm consolidating some routines from std.string into std.array. They are > >> specialized for operating on arrays, and include the likes of insert, >

Re: Proposal for std.path replacement

2011-03-03 Thread Jerry Quinn
make sense to combine them? string[2] splitDrive(path) string[2] splitExtension(path) Just a thought. Jerry

Question about D, garbage collection and fork()

2011-03-09 Thread Jerry Quinn
Where I work, we find it very useful to start a process, load data, then fork() to parallelize. Our data is large, such that we'd run out of memory trying to run a complete copy on each core. Once the process is loaded, we don't need that much writable memory, so fork is appealing to share th

Re: Question about D, garbage collection and fork()

2011-03-10 Thread Jerry Quinn
use the pages to be copied and unshared. So my question is really probably whether the garbage collector will tend to dirty shared pages or not. Jerry

Google +1 button for dpl.org?

2011-07-13 Thread Jerry Quinn
Hi folks, This seemed like the right place to toss this out... What do folks think of adding a google +1 button to d-programming-language.org? I just created a google+ account and discovered it. Jerry

Support for feeding data to engine threads?

2011-09-12 Thread Jerry Quinn
I'm looking at porting an app that maintains a work queue to be processed by one of N engines and written out in order. At first glance, std.parallelism already provides the queue, but the Task concept appears to assume that there's no startup cost per thread. Am I missing something or do I ne

Re: Support for feeding data to engine threads?

2011-09-12 Thread Jerry Quinn
Timon Gehr Wrote: > On 09/12/2011 07:23 PM, Jerry Quinn wrote: > > I'm looking at porting an app that maintains a work queue to be processed > > by one of N engines and written out in order. At first glance, > > std.parallelism already provides the queue, but t

Re: Support for feeding data to engine threads?

2011-09-12 Thread Jerry Quinn
Timon Gehr Wrote: > On 09/12/2011 08:01 PM, Jerry Quinn wrote: > > Timon Gehr Wrote: > > > >> On 09/12/2011 07:23 PM, Jerry Quinn wrote: > >>> I'm looking at porting an app that maintains a work queue to be processed > >>> by one of

Re: Support for feeding data to engine threads?

2011-09-12 Thread Jerry Quinn
dsimcha Wrote: > == Quote from Jerry Quinn (jlqu...@optonline.net)'s article > > I'm looking at porting an app that maintains a work queue to be processed > > by one > of N engines and written out in order. At first glance, std.parallelism > already > provid

Re: Support for feeding data to engine threads?

2011-09-12 Thread Jerry Quinn
dsimcha Wrote: > == Quote from Jerry Quinn (jlqu...@optonline.net)'s article > > Timon Gehr Wrote: > > > On 09/12/2011 07:23 PM, Jerry Quinn wrote: > > > > I'm looking at porting an app that maintains a work queue to be > > > > processed by &g

Re: Support for feeding data to engine threads?

2011-09-12 Thread Jerry Quinn
dsimcha Wrote: > == Quote from Jerry Quinn (jlqu...@optonline.net)'s article > > dsimcha Wrote: > > > == Quote from Jerry Quinn (jlqu...@optonline.net)'s article > > > > I'm looking at porting an app that maintains a work queue to be > > > &g

Re: Why do we have transitive const, again?

2011-09-23 Thread Jerry Quinn
Adam D. Ruppe Wrote: > IMO immutable has taken a step *backward* a few releases ago, > and that's about all I've thought about it. > > immutable string a = "lol"; > > auto b = replace(a, "lol", "rofl"); // used to work, now doesn't. This works for me in 2.055. Jerry

Re: std.benchmark is in reviewable state

2011-09-26 Thread Jerry Quinn
Walter Bright Wrote: > We already have std.perf: > > http://www.d-programming-language.org/phobos/std_perf.html > > A review should compare the two. std.perf doesn't show up in the nav bar to the left. I didn't know it existed until your post :-) Jerry

Re: FloatLiteral 1f

2010-07-28 Thread Jerry Quinn
> On 27/07/2010 21:46, Philip Trettner wrote: > > Hello. > > > > When I came across the lexical definition of a FloatLiteral I wondered > > how '1f' gets recognized. > > > > The definition says: > > FloatLiteral: > > Float > > Float Suffix > > Integer ImaginarySuffix > > Integer Flo

question about foreach, opApply, and delegates

2009-06-08 Thread Jerry Quinn
silently created and passed in? Thanks, Jerry class C { uint[] a; int opApply(int delegate(ref uint) dg) { int result = 0; for (size_t i=0; i < a.length; i++) { result = dg(a[i]); if (result) break; } return result; } } void foo() { C c = new C; foreach (uint v; c) { writefln(v); } }

Re: question about foreach, opApply, and delegates

2009-06-08 Thread Jerry Quinn
downs Wrote: > Jerry Quinn wrote: > > Hi, all. I find myself a little confused about how foreach, opApply, and > > delegates interact according to the docs. > > > > Foreach on an aggregate will use the opApply call (assuming ranges aren't > > being used)

Follow-on question about delegates

2009-06-09 Thread Jerry Quinn
into another function, how does the receiving function figure out what kind of context it's looking at? Each of these things will look different in memory. Also, structs at least don't have a header that can be used to disambiguate the situation. Thanks, Jerry

Re: Array, AA Implementations

2009-10-19 Thread Jerry Quinn
dsimcha Wrote: > If anyone can think of any more, please let me know. Also, just thought of > this > now: I wonder if it would make sense to use some polymorphism tricks (AA > operations are slow enough that an extra pointer dereference or virtual > function > call isn't going to make or break

Re: random cover of a range

2009-02-14 Thread Jerry Quinn
Andrei Alexandrescu Wrote: > Bill Baxter wrote: > > On Sat, Feb 14, 2009 at 1:03 PM, Andrei Alexandrescu > > mailto:seewebsiteforem...@erdani.org>> > > wrote: > > > > bearophile wrote: > > > > Andrei Alexandrescu: > > > > Say at some point there are k available (not ta

Re: ref?

2009-02-15 Thread Jerry Quinn
nce semantics in D largely solves this issue, doesn't it? Use a class when you have things that make sense to share, and use structs for when it makes more sense to have distinct copies. Jerry

Re: ref?

2009-02-15 Thread Jerry Quinn
Nick Sabalausky Wrote: > "Jerry Quinn" wrote in message > news:gn9i7n$2uj...@digitalmars.com... > > > > Use a class when you have things that make sense to share, and use structs > > for when it makes more sense to have distinct copies. > > > >

problem with declaration grammar?

2009-02-18 Thread jerry quinn
ation -> Decl Decl -> BasicType Declarators ; BasicType -> int Declarators -> DeclaratorInitializer DeclaratorInitializer -> Declarator = Initializer Declarator -> BasicType2 Identifier BasicType2 -> I'm thinking that BasicType2 is optional here, rather than required as the grammar shows. Is that correct? Thanks Jerry

Re: problem with declaration grammar?

2009-02-18 Thread jerry quinn
Christopher Wright Wrote: > jerry quinn wrote: > > Hi there, > > > > I'm not sure if I'm missing something, but I'm having trouble seeing that a > > simple declaration will parse correctly with the D grammar. > > > > If we take a declarati

Re: problem with declaration grammar?

2009-02-19 Thread jerry quinn
Sergey Gromov Wrote: > Thu, 19 Feb 2009 01:30:36 -0500, jerry quinn wrote: > > > Christopher Wright Wrote: > > > >> jerry quinn wrote: > >>> Hi there, > >>> > >>> I'm not sure if I'm missing something, but I'm having

  1   2   3   >