Walter Bright Wrote:
http://www.digitalmars.com/d/2.0/changelog.html
http://ftp.digitalmars.com/dmd.2.036.zip
I've noticed that the dmd2/src/druntime/doc/ folder that was on 035 is now
gone! is that an expected deletion?
Walter, thanks again!
Pablo Ripolles wrote:
Walter Bright Wrote:
http://www.digitalmars.com/d/2.0/changelog.html
http://ftp.digitalmars.com/dmd.2.036.zip
I've noticed that the dmd2/src/druntime/doc/ folder that was on 035
is now gone! is that an expected deletion?
Hmm, probably not! But it can easily be
Stewart Gordon wrote:
Andrei Alexandrescu wrote:
Matti Niemenmaa wrote:
Haskell has three exponentiation operators in the standard library:
^, ^^, and **. They are for non-negative integral exponents, integral
exponents, and floating-point exponents respectively.
I wonder whether that's an
Long ago in the days before D, I was used to commenting out code with one of
two idioms:
#if false
.. this code is not compiled
#endif
or
if (false) {
.. this code is compiled but not executed
}
and to turn stuff back on again:
#if true
.. this code is back on now
#endif
or
if (true) {
..
On 11/8/09 11:46, Justin Johansson wrote:
Long ago in the days before D, I was used to commenting out code with one of
two idioms:
#if false
.. this code is not compiled
#endif
or
if (false) {
.. this code is compiled but not executed
}
and to turn stuff back on again:
#if true
.. this code
Jesse Phillips wrote:
On Fri, 06 Nov 2009 23:57:24 -0600, AJ wrote:
Steven Schveighoffer wrote:
Oh, and BTW, invariant is deprecated, use immutable instead.
I assume you are referring to the use of 'invariant' in the
documentation? If so, you should report it as a bug.
auto var = hairilyAllocatedObject();
scope(exit) cleanupObject(var);
sock.send(htmlhead/headbody);
scope(exit) sock.send(/body/html);
logln(Digraph D {);
scope(exit) logln(});
SDL_LockSurface(display.surface);
scope(exit) SDL_UnlockSurface(display.surface);
auto dg = {
On Nov 8, 09 18:46, Justin Johansson wrote:
Long ago in the days before D, I was used to commenting out code with one of
two idioms:
#if false
.. this code is not compiled
#endif
or
if (false) {
.. this code is compiled but not executed
}
and to turn stuff back on again:
#if true
.. this
Justin Johansson wrote:
but in the D world beware the Ides of Scopes because if your curly
brace block with the true/false conditional contains a scope(exit)
you will get explainable but unexpected behaviour if this code
is enabled inside an if(true) block.
Elaboration?
downs wrote:
...
http://stackoverflow.com/questions/1247778/is-ds-scope-failure-success-exit-necessary/1248484#1248484
On Sat, Nov 7, 2009 at 2:43 AM, Don nos...@nospam.com wrote:
Walter Bright wrote:
Don wrote:
A little while ago I said I'd create a patch for ^^ as an exponentiation.
A couple of people had requested that I make a post to the ng so they'd know
when it happens. Here it is.
This is opPow(),
Hey, I never programmed at all seriously in C++ before coming to D and I somehow
figured out scope(exit). I'm not even sure you'd be able to pry scope(exit) out
of my cold, dead hands. I might super-glue it to my hands on my death bed.
Example of where you could do stuff with scope statements
Matti Niemenmaa wrote:
snip
It's essentially because Haskell has separate type classes (knda
like D interfaces... I won't go into that topic) for integers,
fractional numbers, and floating-point numbers. In D the types of those
three operators could be something like:
anyinteger
What are the chances that D gets auto tuple unpacking for foreach loops before
D2 goes gold? In other words, it would be nice to write:
uint[] foo = [1,2,3,4,5];
uint[] bar = [6,7,8,9,10];
foreach(a, b; zip(foo, bar)) {
// Does what you think it does.
}
Also, how about foreach over ranges
On Sun, Nov 8, 2009 at 8:12 AM, dsimcha dsim...@yahoo.com wrote:
Hey, I never programmed at all seriously in C++ before coming to D and I
somehow
figured out scope(exit). I'm not even sure you'd be able to pry scope(exit)
out
of my cold, dead hands. I might super-glue it to my hands on my
Andrei Alexandrescu Wrote:
Ali Cehreli wrote:
I don't think that this is easy to explain to a learner; and I think that
is a good indicator that there is a problem with these semantics.
The ball is in your court to define better semantics.
Andrei
I thought I passed the ball back to
Bill Baxter wrote:
Well, in C++ you'd probably wrap up myRegionAllocator in a struct and
put the .destroy call in its destructor. For use you'd put an
instance of the struct on the stack. But scope(exit) is much more
convenient than having to put all your cleanup code into a struct.
Justin Johansson wrote:
Long ago in the days before D, I was used to commenting out code with one of
two idioms:
#if false
.. this code is not compiled
#endif
or
if (false) {
.. this code is compiled but not executed
}
and to turn stuff back on again:
#if true
.. this code is back on now
Ellery Newcomer Wrote:
Justin Johansson wrote:
but in the D world beware the Ides of Scopes because if your curly
brace block with the true/false conditional contains a scope(exit)
you will get explainable but unexpected behaviour if this code
is enabled inside an if(true) block.
Stewart Gordon wrote:
Matti Niemenmaa wrote:
snip
It's essentially because Haskell has separate type classes (knda
like D interfaces... I won't go into that topic) for integers,
fractional numbers, and floating-point numbers. In D the types of
those three operators could be something
Walter Bright Wrote:
Justin Johansson wrote:
Long ago in the days before D, I was used to commenting out code with one of
two idioms:
#if false
.. this code is not compiled
#endif
or
if (false) {
.. this code is compiled but not executed
}
and to turn stuff back
Walter Bright wrote:
Justin Johansson wrote:
Long ago in the days before D, I was used to commenting out code with
one of
two idioms:
#if false
.. this code is not compiled
#endif
or
if (false) {
.. this code is compiled but not executed
}
and to turn stuff back on again:
#if true
.. this
downs Wrote:
auto var = hairilyAllocatedObject();
scope(exit) cleanupObject(var);
sock.send(htmlhead/headbody);
scope(exit) sock.send(/body/html);
logln(Digraph D {);
scope(exit) logln(});
SDL_LockSurface(display.surface);
scope(exit) SDL_UnlockSurface(display.surface);
auto dg =
On Sun, Nov 8, 2009 at 10:44 AM, Justin Johansson n...@spam.com wrote:
Can you understand my frustration?
Yes, I can certainly understand that it's difficult to use scope()
constructs when you haven't understood what a scope is. But that's
not much of an argument against them.
The same rant
dsimcha Wrote:
Hey, I never programmed at all seriously in C++ before coming to D and I
somehow
figured out scope(exit). I'm not even sure you'd be able to pry scope(exit)
out
of my cold, dead hands. I might super-glue it to my hands on my death bed.
Example of where you could do
Bill Baxter Wrote:
On Sun, Nov 8, 2009 at 10:44 AM, Justin Johansson n...@spam.com wrote:
Can you understand my frustration?
Yes, I can certainly understand that it's difficult to use scope()
constructs when you haven't understood what a scope is. But that's
not much of an argument
On Sun, Nov 8, 2009 at 9:10 AM, dsimcha dsim...@yahoo.com wrote:
What are the chances that D gets auto tuple unpacking for foreach loops before
D2 goes gold? In other words, it would be nice to write:
uint[] foo = [1,2,3,4,5];
uint[] bar = [6,7,8,9,10];
foreach(a, b; zip(foo, bar)) {
== Quote from Bill Baxter (wbax...@gmail.com)'s article
On Sun, Nov 8, 2009 at 9:10 AM, dsimcha dsim...@yahoo.com wrote:
What are the chances that D gets auto tuple unpacking for foreach loops b
efore
D2 goes gold? In other words, it would be nice to write:
uint[] foo = [1,2,3,4,5];
Justin Johansson wrote:
which was my desired behaviour.
I guess I don't understand what the gotcha is, then. Can you be explicit?
Justin Johansson wrote:
Acknowledge this is what happens with D's scope(exit)
as well though to me it doesn't seem as intuitive as
its C++ counterpart.
It does say scope exit, not function exit. I think it is intuitive.
Justin Johansson wrote:
C++ constructors/destructors and stack-unwinding mechanism
are considered FREAKING AWESOME.
Ok, good. Now write (using C++ RAII) the following where both
transactions must succeed or neither:
void foo()
{
A();
scope (failure) undo_A();
B();
scope
On Sun, Nov 8, 2009 at 21:14, dsimcha wrote:
function like in python. Which does something like
zip(iota(1,bar.length),bar).
I think the index variant would better be done as an enumerate()
Enumerate is a great idea. It's probably much better than requiring every
range
struct to mix
On Sat, Nov 7, 2009 at 17:33, Pelle Månsson pelle.mans...@gmail.com wrote:
I am all in favor of adding convenience functions sum and product to
phobos. I use them both often enough.
vote++
And also min (on a range), max (on a range). Those are simple one-liners,
though they can create some
On Sat, Nov 7, 2009 at 20:22, dsimcha dsim...@yahoo.com wrote:
== Quote from Robert Jacques (sandf...@jhu.edu)'s article
I'd recommend rolling that into a basic statistics struct containing
common single pass metrics: i.e. sum, mean, variance, min, max, etc.
I've been wondering for a while
Justin Johansson wrote:
downs Wrote:
auto var = hairilyAllocatedObject();
scope(exit) cleanupObject(var);
sock.send(htmlhead/headbody);
scope(exit) sock.send(/body/html);
logln(Digraph D {);
scope(exit) logln(});
SDL_LockSurface(display.surface);
scope(exit)
Justin Johansson wrote:
dsimcha Wrote:
Hey, I never programmed at all seriously in C++ before coming to D and I somehow
figured out scope(exit). I'm not even sure you'd be able to pry scope(exit) out
of my cold, dead hands. I might super-glue it to my hands on my death bed.
Example of where
== Quote from Philippe Sigaud (philippe.sig...@gmail.com)'s article
dsimcha wrote:
Makes me wonder why noone thought of this until now, or maybe someone did
and I
forgot. How's:
foreach(fooElem, barElem; unpack(zip(foo, bar))) {}, or:
foreach(i, elem; enumerate(chain(foo, bar)))
Justin Johansson wrote:
...
If scope(exit) is meant to be some mechanism for saving try/finally
boiler-plate code, it is a can of worms, otherwise it is a can of
i-dont-know-what-it's-good-for.
It is that, but also used where you could otherwise use RAII a la C++.
To my way of thinking,
Walter Bright Wrote:
Justin Johansson wrote:
C++ constructors/destructors and stack-unwinding mechanism
are considered FREAKING AWESOME.
Ok, good. Now write (using C++ RAII) the following where both
transactions must succeed or neither:
void foo()
{
A();
scope (failure)
Mike Farnsworth wrote:
...
Of course, there are some operations that the available SSE intrinsics
cover that the compiler can't expose via the typical operators, so those
still need to be supported somehow. Does anyone know if ldc or dmd has
those, or if they'll optimize away SSE loads and
Justin Johansson wrote:
...
So what does toString mean to you?
Whatever you got, give it to me as a string for my printf debugging while my
debugger is broken.
Justin Johansson wrote:
I assert that the semantics of toString or similarly named/purposed
methods/functions in many PL's (including and not limited to D) is
ill-defined.
To put this statement into perspective, I would be most appreciative of D
NG readers responding with their own idea(s)
Hello Justin,
Your examples look fine if one assumes scope(exit) as relating to
function scope.
If you expect scope(exit) to trigger on exiting the function you will be
in error. It's called /scope/ exit because it triggers on exit from ANY scope.
Bill Baxter:
Or I suppose it could
be a special syntax in foreach for now.
D has an already very large amount of for now inside. Let's start designing
things correctly tidy from the start instead, for a change (and let's
generalize some of the already present things).
Bye,
bearophile
On Sun, Nov 8, 2009 at 1:43 PM, dsimcha dsim...@yahoo.com wrote:
== Quote from Philippe Sigaud (philippe.sig...@gmail.com)'s article
dsimcha wrote:
Makes me wonder why noone thought of this until now, or maybe someone did
and I
forgot. How's:
foreach(fooElem, barElem; unpack(zip(foo,
Walter Bright wrote:
Andrei Alexandrescu wrote:
In order for everyone to air an informed opinion, a related question
is: will loop fusion be allowed with function calls?
Loop fusion currently only works with operators, and adding ^^ would
allow:
a[] = b[] ^^ 3;
But with pow you can't do
== Quote from Bill Baxter (wbax...@gmail.com)'s article
On Sun, Nov 8, 2009 at 1:43 PM, dsimcha dsim...@yahoo.com wrote:
== Quote from Philippe Sigaud (philippe.sig...@gmail.com)'s article
dsimcha wrote:
Makes me wonder why noone thought of this until now, or maybe someone
did
and I
What is the definition that this community is succeeding / making progress ?
I would like to propose there is _only_ one. That the community is
growing from year to year.
From ten years ago when Walter, started the D project it certainly has
grown, but compared to one year ago, has it grown
On Sun, 08 Nov 2009 17:47:31 -0500, Lutger lutger.blijdest...@gmail.com
wrote:
Mike Farnsworth wrote:
...
Of course, there are some operations that the available SSE intrinsics
cover that the compiler can't expose via the typical operators, so those
still need to be supported somehow.
Nick B wrote:
What is the definition that this community is succeeding / making
progress ?
I would like to propose there is _only_ one. That the community is
growing from year to year.
From ten years ago when Walter, started the D project it certainly has
grown, but compared to one year
Nick B, el 9 de noviembre a las 15:19 me escribiste:
What is the definition that this community is succeeding / making progress ?
I would like to propose there is _only_ one. That the community is
growing from year to year.
From ten years ago when Walter, started the D project it
Lutger Wrote:
Justin Johansson wrote:
I assert that the semantics of toString or similarly named/purposed
methods/functions in many PL's (including and not limited to D) is
ill-defined.
To put this statement into perspective, I would be most appreciative of D
NG readers responding
Leandro Lucarella wrote:
Nick B, el 9 de noviembre a las 15:19 me escribiste:
What is the definition that this community is succeeding / making progress ?
Git does a very nice and useful survey each year:
http://git.or.cz/gitwiki/GitSurvey2009
An DVCS is not the same as a language, but
On 11/08/2009 06:35 PM, Robert Jacques wrote:
On Sun, 08 Nov 2009 17:47:31 -0500, Lutger
lutger.blijdest...@gmail.com wrote:
Mike Farnsworth wrote:
...
Of course, there are some operations that the available SSE intrinsics
cover that the compiler can't expose via the typical operators, so
On Mon, 09 Nov 2009 01:53:11 -0500, Michael Farnsworth
mike.farnswo...@gmail.com wrote:
On 11/08/2009 06:35 PM, Robert Jacques wrote:
On Sun, 08 Nov 2009 17:47:31 -0500, Lutger
lutger.blijdest...@gmail.com wrote:
Mike Farnsworth wrote:
...
Of course, there are some operations that the
On Sat, Nov 7, 2009 at 10:40 PM, Don nos...@nospam.com wrote:
You can create them without templates. std.metastrings was created before
CTFE existed, it's rather outdated. It's intended for use with template
metaprogramming, not for use with CTFE.
I posted about this the other day, wouldn't
Don Wrote:
You can do stuff like:
struct Foo {
int x;
}
enum Foo b = Foo(56);
strange. you can do that only if there is no constructor.
Also trying with templates, i got a segfault, i dont know if it is already
reported.
Why this segfaults?. At least it should print a error
g wrote:
Don Wrote:
You can do stuff like:
struct Foo {
int x;
}
enum Foo b = Foo(56);
strange. you can do that only if there is no constructor.
It also works with opCall. ctor calls don't yet work in CTFE calls from
module scope (works OK inside a function) -- structural problem
nomad wrote:
I would like to use the following Win32 function in D:
GpStatus WINGDIPAPI GdipEnumerateMetafileSrcRectDestPointI(
GpGraphics * graphics,
GDIPCONST GpMetafile * metafile,
GDIPCONST Point destPoint,
GDIPCONST Rect srcRect,
Unit srcUnit,
http://d.puremagic.com/issues/show_bug.cgi?id=3483
Stewart Gordon s...@iname.com changed:
What|Removed |Added
CC||s...@iname.com
---
http://d.puremagic.com/issues/show_bug.cgi?id=3481
--- Comment #7 from Stewart Gordon s...@iname.com 2009-11-08 06:55:47 PST ---
(In reply to comment #6)
Logical xor is already in the language, its symbol is !=.
Not quite. For example, 1 != 2 evaluates to true, whereas if ^^ is defined as
a
http://d.puremagic.com/issues/show_bug.cgi?id=3488
Summary: Segfault(expression.c): enum declared with struct
initializer in template
Product: D
Version: 2.036
Platform: Other
OS/Version: Windows
Status: NEW
http://d.puremagic.com/issues/show_bug.cgi?id=3489
Summary: Address family not supported by protocol family on
freebsd
Product: D
Version: unspecified
Platform: x86
OS/Version: FreeBSD
Status: NEW
http://d.puremagic.com/issues/show_bug.cgi?id=2000
changlon chang...@gmail.com changed:
What|Removed |Added
CC||chang...@gmail.com
---
http://d.puremagic.com/issues/show_bug.cgi?id=3489
--- Comment #1 from changlon chang...@gmail.com 2009-11-08 09:24:08 PST ---
import
std.stdio,
std.socket,
std.socketstream,
std.stream;
void main(){
auto Socket sock = new TcpSocket(new
http://d.puremagic.com/issues/show_bug.cgi?id=3488
g sockpupp...@hotmail.com changed:
What|Removed |Added
CC||sockpupp...@hotmail.com
http://d.puremagic.com/issues/show_bug.cgi?id=3488
Don clugd...@yahoo.com.au changed:
What|Removed |Added
Summary|Segfault(expression.c): |Segfault(expression.c):
http://d.puremagic.com/issues/show_bug.cgi?id=3489
--- Comment #2 from changlon chang...@gmail.com 2009-11-08 19:22:21 PST ---
freebsd 7.1 release have the same error.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because:
http://d.puremagic.com/issues/show_bug.cgi?id=3489
--- Comment #3 from changlon chang...@gmail.com 2009-11-08 20:46:08 PST ---
the follow code can raise the same error :
import std.socket;
void main(){
auto sock = new TcpSocket(new InternetAddress(127.0.0.1, 80));
}
--
69 matches
Mail list logo