--i);
> }
>
Or even simpler:
foreach (dchar c; s)
outp.put(c);
foreach supports decoding built into the language.
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
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
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
"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
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
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
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
;ve filed a bug. Someone else posted saying it works fine, suggesting
the problem is my setup.
Any suggestions?
Thanks
Jerry
need to be able to align the results of multiple
transformations to the input text.
Thanks
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,
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
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
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
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
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?
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
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...
ding:
Since you have
allocate()
allocateAll()
I would use
allocateAligned()
reallocateAligned()
to be more consistent.
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
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
Yes.
Titlecasing support is missing. I assume that can be added in?
Thanks,
Jerry
help would be appreciated
Thanks
Jerry
+1
"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
&
"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.
"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
"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/
"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
>
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:
&
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
>>
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
"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
? Is this bad style?
Thanks
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
"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
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,
>
e moment.
I'm wondering if this problem is the same kind of thing.
Jerry
it'd be awesome if you could help
> reviewing it once I opened the pull request.
Sure I'd be happy to.
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
"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
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
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
ling with head gives me a working binary for this test.
Thanks
Jerry
return 0;
> }
This seems less useful to me. What was the example where you found it
useful?
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
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.
t$
> __Class -> classinfo$
> __vtbl -> vtable$
> __interface -> interfaceinfo$
> __ModuleInfo -> moduleinfo$
I like this approach. Do we need the "info" in classinfo$,
interfaceinfo$, and moduleinfo$?
Jerry
cycled without paying for the vector reallocations.
This is definitely a useful pattern to not have to rewrite.
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
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
s to try to address the problems you raise:
http://researcher.watson.ibm.com/researcher/view_project_subpage.php?id=175
Any thoughts?
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
"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:
>>
>>
"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
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
"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
"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?
>>
>>
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
at may get created, but
you can limit how much work gets done.
Comments? Slams?
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
"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
"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
"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
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
"Remo" writes:
>> Looks like it's a bug.
> How to report this bug ?
https://d.puremagic.com/issues/
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
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() 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
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
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
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
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
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
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';
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
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,
>
make sense to combine them?
string[2] splitDrive(path)
string[2] splitExtension(path)
Just a thought.
Jerry
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
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
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
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
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
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
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
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
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
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
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
> 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
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); }
}
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)
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
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
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
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
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.
> >
>
>
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
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
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 - 100 of 223 matches
Mail list logo