On 2012-05-28 07:45, Andrei Alexandrescu wrote:
Thanks. Means something is messed up with Thunderbird - I can't see it
even after repairing the index.
Andrei
Showed up for me using Thunderbird.
--
/Jacob Carlborg
On Sunday, 27 May 2012 at 20:56:22 UTC, David Nadlinger wrote:
http://klickverbot.at/blog/2012/05/purity-in-d/
The article is now on Reddit and Hacker News as well:
http://www.reddit.com/r/programming/comments/u84fc/purity_in_d/
http://news.ycombinator.com/item?id=4032248
David
On Sunday, 27 May 2012 at 21:43:44 UTC, Jakob Ovrum wrote:
I also feel this could fill a big void in the list of articles
on dlang.org.
If it is deemed suitable, I'll gladly submit a pull request.
David
On Mon, 28 May 2012 00:45:25 -0500
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote:
Thanks. Means something is messed up with Thunderbird - I can't see
it even after repairing the index.
/me recommends Claws-mail. ;)
Sincerely,
Gour
--
Thus the wise living entity's pure
On 5/28/12 2:08 AM, Jacob Carlborg wrote:
On 2012-05-28 07:45, Andrei Alexandrescu wrote:
Thanks. Means something is messed up with Thunderbird - I can't see it
even after repairing the index.
Andrei
Showed up for me using Thunderbird.
Yah, I meant Thunderbird's index repair ability (as
David Nadlinger:
http://www.reddit.com/r/programming/comments/u84fc/purity_in_d/
On Reddit yogthos has said:
http://www.reddit.com/r/programming/comments/u84fc/purity_in_d/c4t8czg
they're called persistent data structures, and wikipedia has a
nice article showing how they work. These are
On Sunday, May 27, 2012 21:45:22 bearophile wrote:
In some code I have created a small bug that can be reduced to
something like this, that the D compiler has not caught at
compile-time:
enum E1 { A, B }
enum E2 { C, D }
void main() {
E1[2] a;
with (E2)
assert(a[0]
On 2012-05-27 22:15, F i L wrote:
I'm not sure I follow all the details of what Andrei's suggesting and
what's being talked about here, this parser/lexer stuff is still very
new to me, so this may be a bit off-topic. However, I thought I'd weigh
in on something I was very impressed with about
On 5/27/2012 10:41 PM, Denis Shelomovskij wrote:
Filled Issue 8156 - Very slow compilation with string-imported file ~100 MiB
http://d.puremagic.com/issues/show_bug.cgi?id=8156
Thanks!
On Saturday, 26 May 2012 at 17:59:46 UTC, F i L wrote:
Chad J wrote:
I think my only complaints were the bus-factor and the
apparent lack of array slices (the kind that doesn't cause
copying). Still, very promising.
It actually does have slices as a construct in the system lib
(included by
On 24 May 2012 21:08, Sean Kelly s...@invisibleduck.org wrote:
On May 22, 2012, at 9:17 AM, Manu wrote:
On 21 May 2012 19:16, David Nadlinger s...@klickverbot.at wrote:
On Monday, 21 May 2012 at 15:04:56 UTC, Manu wrote:
How far did you get using Fibers on Windows in the end?
I'm using
On Saturday, 26 May 2012 at 11:49:47 UTC, Chad J wrote:
On 05/24/2012 07:21 PM, Araq wrote:
On Thursday, 24 May 2012 at 22:56:52 UTC, Kevin Cox wrote:
On May 24, 2012 6:53 PM, Froglegs lug...@yahoo.com wrote:
Nimrod is full of constructs that have inlining semantics and
as such
declaration
Nimrod's builtin slices copy. It's possible to implement more
D-like slices in Nimrod, but a bit tricky. However, if you
don't copy slicing a large string (or array) keeps the whole
string in memory so it's questionable whether it's a good idea.
In that case you can still explicitly copy a
D implements slices as (ptr, length) pairs which causes issues for a GC
as that invites lots of interior pointers and GCs tend to have problems
with those, causing at least some overhead in the GC/memory system.
The site says Nimrod allows for soft-realtime. Could you talk more about
the
27.05.2012 23:45, bearophile написал:
In some code I have created a small bug that can be reduced to something
like this, that the D compiler has not caught at compile-time:
enum E1 { A, B }
enum E2 { C, D }
void main() {
E1[2] a;
with (E2)
assert(a[0] == D);
}
Why isn't D able to statically
On 28.05.2012 12:58, Denis Shelomovskij wrote:
27.05.2012 23:45, bearophile написал:
In some code I have created a small bug that can be reduced to something
like this, that the D compiler has not caught at compile-time:
enum E1 { A, B }
enum E2 { C, D }
void main() {
E1[2] a;
with (E2)
Denis Shelomovskij:
Enumerations are in very poor state in D now.
...
By the way, current enums can be modified to correspond list
enumeration and flags can be added as library component.
I think D enums need to become a bit more strict (so you can't
equal elements of different enums).
Pascal got type safe enums and sets of enums (aka flags) right
in the 60ies. Too bad not even Ada copied this nice feature.
Fortunately, Nimrod does.
The site says Nimrod allows for soft-realtime. Could you talk
more about the GC.
It didn't make it into 0.8.14 and afaik hasn't been used within a
game engine yet. But it has been tested with the compiler itself
with very good results: A 2ms max pause time was met in all cases
(on modern
On Sun, May 27, 2012 at 11:13 PM, John Belmonte j...@neggie.net wrote:
I'm wondering if people have seen LPeg. It's a Lua library, but the design
is interesting in that patterns are first class objects which can be
composed with operator overloading.
http://www.inf.puc-rio.br/~roberto/lpeg/
Am Sat, 26 May 2012 16:30:58 +0200
schrieb Robik szad...@gmail.com:
I would like to share with my new library written in D. As name
may suggest (or not) it adds color to your console output, it
works on both Linux and Windows platforms. I haven't seen any
similar library for D language, so
On Monday, 28 May 2012 at 08:58:29 UTC, Denis Shelomovskij wrote:
27.05.2012 23:45, bearophile написал:
In some code I have created a small bug that can be reduced to
something
like this, that the D compiler has not caught at compile-time:
enum E1 { A, B }
enum E2 { C, D }
void main() {
On Monday, 28 May 2012 at 13:08:27 UTC, Marco Leise wrote:
Am Sat, 26 May 2012 16:30:58 +0200
schrieb Robik szad...@gmail.com:
I would like to share with my new library written in D. As
name may suggest (or not) it adds color to your console
output, it works on both Linux and Windows
On 5/28/12 8:19 AM, foobar wrote:
I have to loudly object to this definition. Given a typical enumeration
such as:
enum color {Blue, Green, Red};
Who's to say that Blue must equal 0? This is conceptually plain *wrong*.
A conceptually correct enumeration must NOT expose such implementation
Andrei Alexandrescu:
I do agree that it's wrong to _conflate_ the enumerated value
with it ordinal, so in this program neither comparison should
compile without an explicit cast:
enum E1 { A, B }
enum E2 { C, D }
void main() {
E1 a;
assert(a == 0);
assert(a == E2.C);
}
The
The package on the download page warns that This package is
intended for Mac OS X Leopard (10.5) only. Is this one safe to
use on Lion? Is executable in the all platforms zip file
better or do I need to build it from source?
On May 28, 2012, at 8:36 AM, Patrick Down patrick.d...@gmail.com wrote:
The package on the download page warns that This package is intended for Mac
OS X Leopard (10.5) only. Is this one safe to use on Lion? Is executable
in the all platforms zip file better or do I need to build it from
On Monday, 28 May 2012 at 15:44:37 UTC, Sean Kelly wrote:
On May 28, 2012, at 8:36 AM, Patrick Down
patrick.d...@gmail.com wrote:
The package on the download page warns that This package is
intended for Mac OS X Leopard (10.5) only. Is this one safe
to use on Lion? Is executable in the
On Monday, 28 May 2012 at 13:30:44 UTC, Robik wrote:
On Monday, 28 May 2012 at 13:08:27 UTC, Marco Leise wrote:
Am Sat, 26 May 2012 16:30:58 +0200
schrieb Robik szad...@gmail.com:
I would like to share with my new library written in D. As
name may suggest (or not) it adds color to your
On May 28, 2012, at 1:19 AM, Manu turkey...@gmail.com wrote:
On 24 May 2012 21:08, Sean Kelly s...@invisibleduck.org wrote:
On May 22, 2012, at 9:17 AM, Manu wrote:
On 21 May 2012 19:16, David Nadlinger s...@klickverbot.at wrote:
On Monday, 21 May 2012 at 15:04:56 UTC, Manu wrote:
How
On Mon, 28 May 2012 11:55:24 -0500, Damian Ziemba s...@dzfl.pl wrote:
On Monday, 28 May 2012 at 13:30:44 UTC, Robik wrote:
On Monday, 28 May 2012 at 13:08:27 UTC, Marco Leise wrote:
Am Sat, 26 May 2012 16:30:58 +0200
schrieb Robik szad...@gmail.com:
I would like to share with my new library
On 5/21/12, Gour g...@atmarama.net wrote:
just wonder if there are any news in regard to wxD bindings project?
I was busy doing another rewrite of my codebase since it was getting
rather large and too specific for wxwidgets (lots and lots of doxygen
workarounds). Doxygen files for handwritten
On Monday, 28 May 2012 at 13:47:47 UTC, Andrei Alexandrescu wrote:
On 5/28/12 8:19 AM, foobar wrote:
I have to loudly object to this definition. Given a typical
enumeration
such as:
enum color {Blue, Green, Red};
Who's to say that Blue must equal 0? This is conceptually
plain *wrong*.
A
On Monday, 28 May 2012 at 17:21:25 UTC, 1100110 wrote:
On Mon, 28 May 2012 11:55:24 -0500, Damian Ziemba
s...@dzfl.pl wrote:
On Monday, 28 May 2012 at 13:30:44 UTC, Robik wrote:
On Monday, 28 May 2012 at 13:08:27 UTC, Marco Leise wrote:
Am Sat, 26 May 2012 16:30:58 +0200
schrieb Robik
Am Mon, 28 May 2012 13:48:23 +0200
schrieb Araq rump...@web.de:
Pascal got type safe enums and sets of enums (aka flags) right
in the 60ies. Too bad not even Ada copied this nice feature.
Fortunately, Nimrod does.
Yes, I really like Pascal for that feature. Actually it is a mix of features
On 5/28/12 1:07 PM, foobar wrote:
It depends on what exactly the general concept is, is this a predefined
set of values or is it an ordered list. I'd argue that the set is more
general and we shouldn't force an ordering when one isn't strictly
required. Of course, the programmer should be able
On Monday, May 28, 2012 14:21:14 Andrei Alexandrescu wrote:
On 5/28/12 1:07 PM, foobar wrote:
It depends on what exactly the general concept is, is this a predefined
set of values or is it an ordered list. I'd argue that the set is more
general and we shouldn't force an ordering when one
On 5/28/12 2:37 PM, Jonathan M Davis wrote:
enum does need some work, but I think that the fact that it can be both built-
in types such as int as well as user-defined structs is great. It essentially
gives us the best of both worlds (basic enums such as in C/C++ and more
complex types as in
Andrei Alexandrescu:
I do agree that it's wrong to _conflate_ the enumerated value
with it ordinal,
I agree it is possible to fix enum.
Thank you for your answers Andrei. I have filed an enhancement
request:
http://d.puremagic.com/issues/show_bug.cgi?id=8157
Issue 8157 is a subset of
On Monday, 28 May 2012 at 12:27:09 UTC, Philippe Sigaud wrote:
I played with this idea with my own Pegged
(https://github.com/PhilippeSigaud/Pegged), but I wasn't quite
convinced by the result, exactly for the reason above. Also,
when
looking at real-world Spirit examples, I was a bit
Hi,
I've seen several occurrences of synchronized (this) and synchronized
(this.classinfo) in both druntime and phobos by now. I propose that we
officially ban these patterns with extreme prejudice.
1) Locking on the object instance is a HORRIBLE IDEA. Anyone who happens
to use the object
On Tuesday, May 29, 2012 00:36:13 Alex Rønne Petersen wrote:
Hi,
I've seen several occurrences of synchronized (this) and synchronized
(this.classinfo) in both druntime and phobos by now. I propose that we
officially ban these patterns with extreme prejudice.
1) Locking on the object
Am Fri, 25 May 2012 18:25:10 +0400
schrieb Dmitry Olshansky dmitry.o...@gmail.com:
I tried Mono-D. No dice, it uses about 1.5Gb of RAM on my 2 file project.
That's odd. I have a few open projects and 180 MB memory use after loading the
IDE. That's on 64-bit Linux. I've never had OOM issues
On 29-05-2012 00:42, Jonathan M Davis wrote:
On Tuesday, May 29, 2012 00:36:13 Alex Rønne Petersen wrote:
Hi,
I've seen several occurrences of synchronized (this) and synchronized
(this.classinfo) in both druntime and phobos by now. I propose that we
officially ban these patterns with extreme
On Tuesday, May 29, 2012 01:11:49 Alex Rønne Petersen wrote:
I have no idea how synchronized classes work; they are not a documented
feature of the language. We have synchronized functions which
synchronize on the this reference. Perhaps synchronized classes just
make all functions in a class
On Tuesday, May 29, 2012 01:11:49 Alex Rønne Petersen wrote:
I have no idea how synchronized classes work; they are not a documented
feature of the language. We have synchronized functions which
synchronize on the this reference. Perhaps synchronized classes just
make all functions in a class
On 29-05-2012 01:24, Jonathan M Davis wrote:
On Tuesday, May 29, 2012 01:11:49 Alex Rønne Petersen wrote:
I have no idea how synchronized classes work; they are not a documented
feature of the language. We have synchronized functions which
synchronize on the this reference. Perhaps synchronized
On Tuesday, May 29, 2012 01:35:23 Alex Rønne Petersen wrote:
I don't think arguing about them makes sense at this point. Way too much
code would break if we changed the semantics. I'd consider it a mistake
and a lesson learned, rather.
But I take it you agree that synchronized (this) and
On 29-05-2012 01:35, Alex Rønne Petersen wrote:
On 29-05-2012 01:24, Jonathan M Davis wrote:
On Tuesday, May 29, 2012 01:11:49 Alex Rønne Petersen wrote:
I have no idea how synchronized classes work; they are not a documented
feature of the language. We have synchronized functions which
On Tuesday, May 29, 2012 01:38:25 Alex Rønne Petersen wrote:
I should probably add that Java learned it long ago, and yet we adopted
it anyway... blergh.
The lesson learned from Java that TDPL enumerates is the mistake of having
synchronized on functions rather than entire classes, but clearly
On 29-05-2012 01:46, Jonathan M Davis wrote:
On Tuesday, May 29, 2012 01:38:25 Alex Rønne Petersen wrote:
I should probably add that Java learned it long ago, and yet we adopted
it anyway... blergh.
The lesson learned from Java that TDPL enumerates is the mistake of having
synchronized on
On 29-05-2012 01:41, Jonathan M Davis wrote:
On Tuesday, May 29, 2012 01:35:23 Alex Rønne Petersen wrote:
I don't think arguing about them makes sense at this point. Way too much
code would break if we changed the semantics. I'd consider it a mistake
and a lesson learned, rather.
But I take it
On Tuesday, May 29, 2012 01:54:59 Alex Rønne Petersen wrote:
On 29-05-2012 01:41, Jonathan M Davis wrote:
On Tuesday, May 29, 2012 01:35:23 Alex Rønne Petersen wrote:
I don't think arguing about them makes sense at this point. Way too much
code would break if we changed the semantics. I'd
On 05/28/2012 04:21 AM, Araq wrote:
On Saturday, 26 May 2012 at 11:49:47 UTC, Chad J wrote:
On 05/24/2012 07:21 PM, Araq wrote:
On Thursday, 24 May 2012 at 22:56:52 UTC, Kevin Cox wrote:
On May 24, 2012 6:53 PM, Froglegs lug...@yahoo.com wrote:
Nimrod is full of constructs that have
Andrei Alexandrescu seewebsiteforem...@erdani.org writes:
On 5/18/12 4:36 PM, Mehrdad wrote:
On Friday, 18 May 2012 at 21:28:45 UTC, Andrei Alexandrescu wrote:
I guess it is now :o).
Andrei
lol
One more thing that's also annoying about this is that it's not in
std.algorithms, but
On Monday, 28 May 2012 at 23:55:04 UTC, Alex Rønne Petersen
wrote:
On 29-05-2012 01:46, Jonathan M Davis wrote:
On Tuesday, May 29, 2012 01:38:25 Alex Rønne Petersen wrote:
I should probably add that Java learned it long ago, and yet
we adopted
it anyway... blergh.
The lesson learned from
I tried using 6k+-1 for all primes and for some reason it performed
slower. I think I have something completely inefficient somewhere,
can't figure out where though.
I think it has something to do with me increasing k and then
multiplying with k while I could have simply added 6 to K...
and I
I tried using 6k+-1 for all primes and for some reason it
performed
slower. I think I have something completely inefficient
somewhere,
can't figure out where though.
You aren't, by any chance, using divisions or remainders? those
are much slower than, say, multiplications (unless the divisor
I didn't use divisions or remainders, only multiplications. I've
changed it so it only uses addition and now it still doesn't
outperform a version that only checks odd's. it's not as fast as your
version where every index corresponds to i*2+1 because I fill every
even number with false...
Hi
I have a project on github,
https://github.com/jarlah/d2-simple-socket-server, where I have
added very custom logger library. In this logger library I have
an enum LogLevel that looks like enum LogLevel { ALL, INFO,
WARNING etc }
Questions:
1. Is there a way to convert from string INFO
On Sunday, 27 May 2012 at 18:25:38 UTC, Jonathan M Davis wrote:
AFAIK, there are no plans to get rid of it due to the bool
packing in std.container.Array, so if there's anything that you
can do to improve it, go right ahead. Help is welcome.
Well so far the biggest problem I have is trying
On 29.05.2012 1:39, Era Scarecrow wrote:
On Sunday, 27 May 2012 at 18:25:38 UTC, Jonathan M Davis wrote:
AFAIK, there are no plans to get rid of it due to the bool packing in
std.container.Array, so if there's anything that you can do to improve
it, go right ahead. Help is welcome.
Well so
On Monday, 28 May 2012 at 21:59:36 UTC, Dmitry Olshansky wrote:
Check your math. Xor != sub.
1 ^ 0 == 1, 0 ^ 1 == 1;
Compare with
1 sub 0 == 1, 0 sub 1 == 0.
That is, for one thing, sub is asymmetric :)
Hmm well subs would all happen at the 1 bit level. So let's
compare.
xor
0 ^ 0 = 0
0
That is, for one thing, sub is asymmetric :)
Hmm well subs would all happen at the 1 bit level. So let's
compare.
xor
0 ^ 0 = 0
0 ^ 1 = 1
1 ^ 0 = 1
1 ^ 1 = 0
sub
0 - 0 = 0
0 - 1 = -1 (or non-zero/true, truncates to 1)
1 - 0 = 1
1 - 1 = 0
Sorry, seems the same unless we are going with
On Sunday, 27 May 2012 at 18:25:38 UTC, Jonathan M Davis wrote:
AFAIK, there are no plans to get rid of it due to the bool
packing in std.container.Array, so if there's anything that you
can do to improve it, go right ahead. Help is welcome.
Annoying, twice I've tried to branch/fork to post
On Tuesday, May 29, 2012 04:09:48 Era Scarecrow wrote:
On Sunday, 27 May 2012 at 18:25:38 UTC, Jonathan M Davis wrote:
AFAIK, there are no plans to get rid of it due to the bool
packing in std.container.Array, so if there's anything that you
can do to improve it, go right ahead. Help is
http://d.puremagic.com/issues/show_bug.cgi?id=7097
d...@dawgfoto.de changed:
What|Removed |Added
CC||d...@dawgfoto.de
--- Comment #1
http://d.puremagic.com/issues/show_bug.cgi?id=7610
Justin C Calvarese technocr...@gmail.com changed:
What|Removed |Added
Keywords||pull
http://d.puremagic.com/issues/show_bug.cgi?id=7898
Kenji Hara k.hara...@gmail.com changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=7348
--- Comment #14 from github-bugzi...@puremagic.com 2012-05-28 11:18:06 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos
http://d.puremagic.com/issues/show_bug.cgi?id=8112
Guillaume Chatelet chatelet.guilla...@gmail.com changed:
What|Removed |Added
Status|NEW
http://d.puremagic.com/issues/show_bug.cgi?id=8015
--- Comment #2 from github-bugzi...@puremagic.com 2012-05-28 12:06:23 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos
http://d.puremagic.com/issues/show_bug.cgi?id=3999
--- Comment #9 from bearophile_h...@eml.cc 2012-05-28 13:58:33 PDT ---
See also Issue 8157 , that essentially is a subset of this issue.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving
http://d.puremagic.com/issues/show_bug.cgi?id=8157
Summary: Disallow (dis)equality among two different enums
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
http://d.puremagic.com/issues/show_bug.cgi?id=5089
Lars T. Kyllingstad bugzi...@kyllingen.net changed:
What|Removed |Added
Status|NEW |RESOLVED
http://d.puremagic.com/issues/show_bug.cgi?id=7022
--- Comment #5 from github-bugzi...@puremagic.com 2012-05-28 14:19:34 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos
http://d.puremagic.com/issues/show_bug.cgi?id=7515
--- Comment #11 from Jonathan M Davis jmdavisp...@gmx.com 2012-05-28 15:41:22
PDT ---
Okay. After some rethinking the issue, I've closed the old pull request and
created a new one:
https://github.com/D-Programming-Language/phobos/pull/609
It
http://d.puremagic.com/issues/show_bug.cgi?id=7515
--- Comment #12 from bearophile_h...@eml.cc 2012-05-28 17:13:48 PDT ---
(In reply to comment #11)
It retains the ability to handle 256 code units rather than the 128 that ASCII
actually uses.
Thank you :-)
Please take also a look at Issue
http://d.puremagic.com/issues/show_bug.cgi?id=8141
Jonathan M Davis jmdavisp...@gmx.com changed:
What|Removed |Added
CC|
http://d.puremagic.com/issues/show_bug.cgi?id=5849
--- Comment #5 from bearophile_h...@eml.cc 2012-05-28 19:19:55 PDT ---
See also:
https://github.com/D-Programming-Language/phobos/pull/553
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving
80 matches
Mail list logo