Thanks for replies, will use protected.
cat - test.d <<< "--eval=" | xargs -0 rdmd
I've only tried this on Linux.
As a person who's still only half-way a Linux guy, I have to
ask: What
the hell is going on in that command?
The minus on the cat command line means standard input and
somecommand <<< "somestring"
Sends "somestring"
On Mon, 13 Aug 2012 14:13:19 +0200
"Era Scarecrow" wrote:
> On Sunday, 12 August 2012 at 23:56:02 UTC, bearophile wrote:
> > This not at the top of my enhancement request list, but having
> > something like this shared by all D compilers seems a step
> > forward for D:
> >
> > http://blog.coldf
On Mon, 13 Aug 2012 17:36:13 +0200
"jerro" wrote:
> > I probably should make it so it automatically wraps the code in
> > a main function for even easier and more script like usage.
>
> Rdmd already has this functionality with the --eval flag. You are
> supposed to pass the code as a command l
On Monday, 13 August 2012 at 10:11:06 UTC, Don Clugston wrote:
... I have come to believe that there are very few algorithms
originally designed for integers, which also work correctly for
floating point.
Integer code nearly always assumes things like, x + 1 != x, x
== x,
(x + y) - y == x.
On Tuesday, August 14, 2012 01:57:17 deadalnix wrote:
> I do see the lack of actual practical use case, (it doesn't mean none
> exists, but few exists) but what does excluding that case brings us ?
I don't know if it's useful one way or the other as far as making it illegal
goes, but it's certain
Le 12/08/2012 15:28, Andrei Alexandrescu a écrit :
On 8/12/12 9:11 AM, Simen Kjaeraas wrote:
On Sun, 12 Aug 2012 06:11:48 +0200, Jonathan M Davis
wrote:
Can anyone think of any situation where an infinite bidirectional
range would make any sense at all?
std.range.repeat(1);
I would be very
On Monday, August 13, 2012 20:48:07 Maxim Fomin wrote:
> So, is this a bug or my NVI misunderstanding is wrong and what is
> D design policy in this issue?
Currently, only public and protected functions are ever virtual:
http://d.puremagic.com/issues/show_bug.cgi?id=4542
This may or may not chan
On 8/12/2012 5:00 AM, Araq wrote:
A concrete example would really be nice here ...
Inappropriate use of Outbuffer's internal data.
On 13/08/12 20:04, Walter Bright wrote:
That's called "rounding". But rounding always implies some, small, error that
can accumulate into being a very large error.
Well, yes. I was just remarking on the choice of rounding and the motivation
behind it.
After all, you _could_ round it instead
On 8/12/2012 6:38 PM, F i L wrote:
Also, and I'm not sure this isn't just me, but I ran a DMD (v2.057 T think)
vector test (no simd) against Mono C# a few moths back where DMD got only ~10 ms
improvement over C# (~79ms vs ~88ms). Now a similar test compiled with DMD 2.060
runs at ~22ms vs C#'s 80
On Monday, 13 August 2012 at 19:09:04 UTC, Minas Mina wrote:
Is it a bug with auto or something else?
It's not really a bug. You're using insert before its return type
has been inferred. Hence, it says "forward reference to inferred
return type".
However, in this case, it should be possible
On Mon, 13 Aug 2012 20:48:07 +0200, Maxim Fomin
wrote:
Hello.
Please, put attention to following non-runnable due to linker errors
sample http://dpaste.dzfl.pl/cad4b558.
As Era pointed out, private functions in D are implicitly final, i.e.
not overridable. Change all instances of 'private
I'm writing an insert() function for a binary tree in D:
Note: Node is a value type (struct)
Node!(T)* insert(T) (Node!(T)* root, T val)
{
if( root is null )
{
root = new Node!T();
root.value = val;
root.left = root.right = null;
On Mon, Aug 13, 2012 at 12:51 AM, Russel Winder wrote:
> On Mon, 2012-08-13 at 07:53 +0200, Era Scarecrow wrote:
> > On Monday, 13 August 2012 at 04:25:19 UTC, Marco Leise wrote:
> > > Am Mon, 13 Aug 2012 05:38:01 +0200
> > > schrieb Andrej Mitrovic :
> > >
> > >> On 8/13/12, bearophile wrote:
>
On 8/13/2012 5:38 AM, Joseph Rushton Wakeling wrote:
Looks like some sort of cheat in place to
make sure that the successive division and multiplication will revert to the
original number.
That's called "rounding". But rounding always implies some, small, error that
can accumulate into being a
On Monday, 13 August 2012 at 18:48:09 UTC, Maxim Fomin wrote:
Hello.
Please, put attention to following non-runnable due to linker
errors sample http://dpaste.dzfl.pl/cad4b558.
[quote]
interface I
{
private:
void bar();
void baz();
final void foo()
[/quote]
Isn't it i
Am Mon, 13 Aug 2012 20:17:12 +0200
schrieb "Nathan M. Swan" :
> On Monday, 13 August 2012 at 10:02:23 UTC, Marco Leise wrote:
> > Thoughts ?
>
> I like this idea - you can use checked exceptions, but you aren't
> forced.
>
> Though I think private and free functions should by default just
> us
Hello.
Please, put attention to following non-runnable due to linker
errors sample http://dpaste.dzfl.pl/cad4b558.
I suspect that that NVI support is broken, because (my guess)
linker assumes that interface should implement functions and
doesn't look to class definition.
After reading relev
Am Mon, 13 Aug 2012 19:54:47 +0400
schrieb Dmitry Olshansky :
> On 13-Aug-12 19:50, Timon Gehr wrote:
> > On 08/13/2012 05:32 PM, Dmitry Olshansky wrote:
> >>
> >> I think the true cryptonite that melts "checked exceptions" to a pile of
> >> green goo is templated code:
> >>
> >> So (*yawn*) tell
On Monday, 13 August 2012 at 10:02:23 UTC, Marco Leise wrote:
Thoughts ?
I like this idea - you can use checked exceptions, but you aren't
forced.
Though I think private and free functions should by default just
use @throws(Exception). Not using @throws is like saying "I don't
pay attentio
I seriously consider writing a simple postprocessor for dmd's output.
Once dmd became able to recover from errors and crawl on it started to
produce horrific amounts of redundant text on failure.
Observe for instance that there are only 6 + 2 = 8 lines of interest:
uni.d(3699): Error: template
On 08/13/2012 05:54 PM, Dmitry Olshansky wrote:
On 13-Aug-12 19:50, Timon Gehr wrote:
On 08/13/2012 05:32 PM, Dmitry Olshansky wrote:
I think the true cryptonite that melts "checked exceptions" to a pile of
green goo is templated code:
So (*yawn*) tell what kind of exception specification the
On 13-Aug-12 19:50, Timon Gehr wrote:
On 08/13/2012 05:32 PM, Dmitry Olshansky wrote:
I think the true cryptonite that melts "checked exceptions" to a pile of
green goo is templated code:
So (*yawn*) tell what kind of exception specification the following
function should have:
auto joiner(RoR
On 08/13/2012 05:32 PM, Dmitry Olshansky wrote:
I think the true cryptonite that melts "checked exceptions" to a pile of
green goo is templated code:
So (*yawn*) tell what kind of exception specification the following
function should have:
auto joiner(RoR, Separator)(RoR r, Separator sep);
Ho
I probably should make it so it automatically wraps the code in
a main function for even easier and more script like usage.
Rdmd already has this functionality with the --eval flag. You are
supposed to pass the code as a command line parameter, but you
can use it with files like this:
cat -
On 12-Aug-12 07:02, Marco Leise wrote:
I just got a bit frustrated and wanted to say that I like working with
Exceptions in Java a lot more.
That has to do first but not foremost with the declaration:
---Java->>
class MyException extends Exception {
public MyException(String msg) {
s
On 13-Aug-12 07:38, Andrej Mitrovic wrote:
On 8/13/12, bearophile wrote:
http://blog.coldflake.com/posts/2012-08-09-On-the-fly-C%2B%2B.html
http://dlang.org/rdmd.html
Also check the --eval and --loop thingy ;)
--
Dmitry Olshansky
On 8/13/12, Jacob Carlborg wrote:
> On 2012-08-13 16:03, Jacob Carlborg wrote:
>
>> I'm using TextMate (Mac OS X) and rdmd. I just create a new document,
>> type the code and run it from within TextMate. I don't even have to save
>> the document. I probably should make it so it automatically wraps
On 8/13/12, Marco Leise wrote:
> Am Mon, 13 Aug 2012 05:38:01 +0200
> schrieb Andrej Mitrovic :
>
>> On 8/13/12, bearophile wrote:
>> > http://blog.coldflake.com/posts/2012-08-09-On-the-fly-C%2B%2B.html
>>
>> http://dlang.org/rdmd.html
>
> Aw come on, that is not a shell
That C++ blog post begin
On 2012-08-13 16:03, Jacob Carlborg wrote:
I'm using TextMate (Mac OS X) and rdmd. I just create a new document,
type the code and run it from within TextMate. I don't even have to save
the document. I probably should make it so it automatically wraps the
code in a main function for even easier
On 2012-08-13 08:51, Russel Winder wrote:
Shells such as Python, Scala, etc. are good for some one-off experiments
and tasks, but I think in general they are over-rated in general
usefulness. Much better for non-trivial experimentation is to have a
super-lightweight editor/execution. Groovy has
On 2012-08-13 12:31, Regan Heath wrote:
I wonder if it might be possible to make an intellisense style GUI/IDE
tool/plugin which could determine all exceptions thrown either by direct
code inspection or ddoc inspection (when source is unavailable) such
that it could actually build a complete lis
Don Clugston:
I have come to believe that there are very few algorithms
originally designed for integers, which also work correctly for
floating point.
And JavaScript programs that use integers?
Bye,
bearophile
On 13/08/12 11:11, Don Clugston wrote:
Exactly. I have come to believe that there are very few algorithms originally
designed for integers, which also work correctly for floating point.
import std.stdio;
void main()
{
real x = 1.0/9.0;
writefln("
On Sunday, 12 August 2012 at 23:56:02 UTC, bearophile wrote:
This not at the top of my enhancement request list, but having
something like this shared by all D compilers seems a step
forward for D:
http://blog.coldflake.com/posts/2012-08-09-On-the-fly-C%2B%2B.html
There's also CInt, but I'v
On Sun, 12 Aug 2012 22:01:49 +0100, Jonathan M Davis
wrote:
On Sunday, August 12, 2012 16:33:39 Adam D. Ruppe wrote:
Perhaps a workable compromise is to make ddoc able to
automatically output the throws list.
That way, we don't have the hassle of checks, but we do have a
maintained list at
On 08/13/2012 04:42 AM, bearophile wrote:
Russel Winder:
Shells such as Python, Scala, etc. are good for some one-off experiments
and tasks, but I think in general they are over-rated in general
usefulness.
To me they seem underrated, go figure :-) In Python I use it all the
time. Maybe in D
On 12/08/12 01:31, Walter Bright wrote:
On 8/11/2012 3:01 PM, F i L wrote:
Walter Bright wrote:
I'd rather have a 100 easy to find bugs than 1 unnoticed one that
went out in
the field.
That's just the thing, bugs are arguably easier to hunt down when
things default
to a consistent, usable val
I think I should clarify some things up front.
o First of all, to be able to add @throws to a function at any point,
means that the compiler would internally replace the flag 'isnothrow'
with a list of thrown exceptions. That is not much different from what
there is now and would be part of
Am Mon, 13 Aug 2012 10:50:47 +0200
schrieb Marco Leise :
> I don't know how many there are who think like me. Your @throws proposal for
> example could be used to tell the compiler that I want Java style checked
> exceptions for this function and have the compiler check that I listed them
> all
Am Mon, 13 Aug 2012 10:00:31 +0200
schrieb "Nathan M. Swan" :
> On Sunday, 12 August 2012 at 03:02:50 UTC, Marco Leise wrote:
> > I just got a bit frustrated and wanted to say that I like
> > working with Exceptions in Java a lot more.
>
> I don't. When writing a simple command line program, whe
Russel Winder:
Shells such as Python, Scala, etc. are good for some one-off
experiments
and tasks, but I think in general they are over-rated in
general usefulness.
To me they seem underrated, go figure :-) In Python I use it all
the time. Maybe in D it will be a little less useful.
Bye,
b
On Sunday, 12 August 2012 at 03:02:50 UTC, Marco Leise wrote:
I just got a bit frustrated and wanted to say that I like
working with Exceptions in Java a lot more.
I don't. When writing a simple command line program, when there's
an error, it usually means the user messed up and I can't
recov
44 matches
Mail list logo