Steven Schveighoffer writes:
> On 11/20/14 5:30 PM, Jerry Quinn wrote:
>> This works nicely for small types, but has gotchas. For example, if
>> you've got an AA of ints, what value indicates that this is a value
>> folded into the bucket entry vs actually being a poin
Steven Schveighoffer writes:
> On 11/18/14 9:46 PM, deadalnix wrote:
>>
>> After all, unless your hash table is very small, the first hit is
>> most likely a cache miss, meaning ~300 cycles. at this point the
>> cache line is in L1, with a 3 cycle access time. So accessing
>> several element in t
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
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
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
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
> > 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
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
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
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
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
Steven Schveighoffer Wrote:
> Do you know what causes the OS to regard that memory as read-only? Since
> fork() is a C system call, and D gets its heap memory the same as any
> other unix process (brk()), I can't see why it wouldn't work. As long as
> you do the same thing you do in C, I
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
Lars T. Kyllingstad Wrote:
> As mentioned in the "std.path.getName(): Screwy by design?" thread, I
> started working on a rewrite of std.path a long time ago, but I got
> sidetracked by other things. The recent discussion got me working on it
> again, and it turned out there wasn't that much l
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,
>
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/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:
> 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/9/11 4:51 PM, Andrei Alexandrescu wrote:
> > There's a lot of junk in std.string that should be gone. I'm trying to
> > motivate myself to port some functions to different string widths and...
> > it's not worth it.
> >
> > What functions do you think we should re
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
Steven Schveighoffer Wrote:
> On Fri, 03 Dec 2010 11:15:36 -0500, spir wrote:
>
> > On Thu, 02 Dec 2010 16:24:03 -0500
> > "Steven Schveighoffer" wrote:
> >
> >> Yes, it does seem odd, but then again, how often do you need the
> >> individual characters of a string? I wrote php code for about
> 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
Andrei Alexandrescu Wrote:
> On 05/25/2010 06:04 PM, Steven Schveighoffer wrote:
> > On Tue, 25 May 2010 18:27:32 -0400, Andrei Alexandrescu
> > wrote:
> >
> >> I've uploaded a work in progress on the container design here:
> >>
> >> http://erdani.com/d/phobos/std_container.html
> >>
> >> It's de
Andrei Alexandrescu Wrote:
> (Hi Jerry! Glad to see you're ramping up participation lately.) Yes,
> that's a bug. There are many other bugs related to jumps, including in
> switch statements.
http://d.puremagic.com/issues/show_bug.cgi?id=4101
cheers,
Jerry
In the spec it says that it's illegal to skip an initialization using goto.
Unless I'm mistaken, the code below does that for b, s, and c. However, it
compiles without complaint.
So, should the compiler be complaining, or is the text about goto really saying
that behavior is undefined. Obvio
Daniel Keep Wrote:
> > This generally raises the question of what should be the order of
> > evaluation for constructs like mixins, conditional compilation, and CTFE.
> > Each has the potential to modify the other.
> >
> > What should be the rule to break the ambiguity? Or do we leave it
>
What should happen when the following code is compiled?
mixin(vs);
version(v1) {
const string vs = "version = v2;";
pragma(msg, "yes");
}
else {
const string vs = "version = v1;";
pragma(msg, "no");
}
Currently, there's an error saying that vs must be a string. However, as far
as I ca
Andrei Alexandrescu Wrote:
> I decided to let no assumption unchallenged and got back to the
> question: do we really need a container _hierarchy_? How much joy and
> usefulness do people derive from dynamically changing an array with a
> list under the same interface? Or a rb-tree vs. a binary
Walter Bright Wrote:
> grauzone wrote:
> > How many man years would you assume writing a full D compiler takes?
> > (Frontend starting from scratch, using an existing backend.)
>
> But there's little reason to implement a D compiler from scratch. For
> open source uses, you can just go ahead an
Don Wrote:
> We seem to be approaching the point where char[], wchar[] and dchar[]
> are all arrays of dchar, but with different levels of compression.
> It makes me wonder if the char, wchar types actually make any sense.
> If char[] is actually a UTF string, then char[] ~ char should be
> permi
bearophile Wrote:
> myself). If this is true then a syntax like:
> auto immutable x = y * 2;
>
> can be seen as too much long and boring to write all the time, so the
> "immutable" keyword may need to be changed again :-) For example into "val"
> (also as "retard" has said), so it becomes short
Michel Fortin Wrote:
> My opinion is that immutable and shared immutable should be two
> different type modifiers. Contrary to other shared values, shared
> immutable values can be cast to non-shared immutable (and non-shared
> const) since they do not require memory barriers, but the reverse
Simen kjaeraas Wrote:
> On Mon, 07 Dec 2009 02:11:16 +0100, Jerry Quinn
> wrote:
> > Well, I could see the value of poviding a rotate operator.
> >
> > Since >>> is tainted, what about >>@ and <<@ for integral rotation?
>
> I was thinking
Walter Bright Wrote:
> dsimcha wrote:
> > == Quote from KennyTM~ (kenn...@gmail.com)'s article
> >> No, it will _silently_ break code that uses >>> as unsigned right shift.
> >
> > Well, we could get around this by making >>> an error for a few releases,
> > and then
> > only after everyone's re
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
OK, having thought a bit more about delegates, I now have another question.
The ABI shows a delegate as consisting of a context ptr and a function ptr.
The context ptr can be a class reference, ptr to struct, ptr to closure or ptr
to stack frame.
If you're passing one of these delegates into a
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)
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). So if we use a simple example below, what exactly is the delegate that
is passed to opApply
Walter Bright Wrote:
> When we first got into what to do with strings and
> const/immutable/mutable, I was definitely in the camp that strings
> should be mutable char[], or at worst const(char)[]. The thing is,
> Andrei pointed out to me, languages that are considered very good at
> dealing w
Andrei Alexandrescu Wrote:
> Steven Schveighoffer wrote:
> > I think what Burton is saying is by annointing immutable(char)[] as the
> > type "string," you are essentially sending a message to developers that
> > all strings should be immutable, and all *string parameters* should be
> > declare
Ellery Newcomer Wrote:
> jerry quinn wrote:
> > Ellery Newcomer Wrote:
> >>> Maybe I'm missing something. The grammar shown in
> >>> http://www.digitalmars.com/d/2.0/declaration.html has the following rules:
> >>>
> >>> BasicType2
Ellery Newcomer Wrote:
> > Maybe I'm missing something. The grammar shown in
> > http://www.digitalmars.com/d/2.0/declaration.html has the following rules:
> >
> > BasicType2:
> > *
> > [ ]
> > [ Expression ]
> > [ Expression .. Expression ]
> > [ Type ]
>
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
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
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 declaration statment like:
int x = 3;
we have (my best guess):
DeclarationStatement -> Declaration
Declaration -> Decl
Decl -> BasicTy
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.
> >
>
>
dsimcha Wrote:
> == Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
> > Walter and I have been discussing what the regime of statically-sized
> > arrays should be. In short, the behavior that's most consistent with
> > everything else is to treat them as values.
> > This a
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
Walter Bright Wrote:
> I've been working on improving the optimizer to take advantage of
> immutability and purity.
>
> http://www.reddit.com/r/reddit.com/comments/7l5x4/optimizing_immutable_and_purity/
>
> http://dobbscodetalk.com/index.php?option=com_myblog&show=Optimizing-Immutable-and-Purit
49 matches
Mail list logo