On 3/7/2011 7:07 AM, Adam D. Ruppe wrote:
A better solution would be to store it in the filename. Might
want more detail than one byte could allow too, so perhaps allowing
three or four bytes would be a good answer.
With the type in the filename, you can determine it easily from
a directory lis
On Mon, Mar 7, 2011 at 2:03 PM, filgood wrote:
> Btw, what is the status of the D2 LLVM compiler?
>
Here are my impressions. I might title this short collection of thoughts,
"LDC2 - one user's early experience."
With alot of caveats, my experience as a user of D2 LLVM (which has been
only over
On Tue, 08 Mar 2011 00:15:54 -0600, Caligo wrote:
> On Mon, Mar 7, 2011 at 11:34 PM, Bernard Helyer
> wrote:
>
>> On Mon, 07 Mar 2011 20:41:39 -0600, Caligo wrote:
>> > Do we really need another D compiler that doesn't work?
>>
>> Name me a working D2 compiler that doesn't have a front-end based
On Mon, Mar 7, 2011 at 11:34 PM, Bernard Helyer wrote:
> On Mon, 07 Mar 2011 20:41:39 -0600, Caligo wrote:
> > Do we really need another D compiler that doesn't work?
>
> Name me a working D2 compiler that doesn't have a front-end based based
> on DMD. Furthermore, name me an in progress independ
On Mon, 07 Mar 2011 20:41:39 -0600, Caligo wrote:
> Do we really need another D compiler that doesn't work?
Name me a working D2 compiler that doesn't have a front-end based based
on DMD. Furthermore, name me an in progress independent implementation
further along than SDC. The only candidate is
On 3/7/2011 2:30 PM, Nick Sabalausky wrote:
--
{almost everything else}
--
Implies:
1. The ANSI/ASCII APIs should just simply *never* be used.
This right here is something that I think needs to b
On Mon, Mar 7, 2011 at 7:54 PM, Bernard Helyer wrote:
> On Mon, 07 Mar 2011 20:03:36 +, filgood wrote:
>
> > as described here:
> >
> > http://nondot.org/sabre/LLVMNotes/TypeSystemRewrite.txt
> >
> > Btw, what is the status of the D2 LLVM compiler?
>
> You're probably wondering about LDC2, bu
On Mon, 07 Mar 2011 20:03:36 +, filgood wrote:
> as described here:
>
> http://nondot.org/sabre/LLVMNotes/TypeSystemRewrite.txt
>
> Btw, what is the status of the D2 LLVM compiler?
You're probably wondering about LDC2, but I'll chip in with SDC's
( https://github.com/bhelyer/SDC ) status h
"Jonathan M Davis" wrote in message
news:mailman.2328.1299539399.4748.digitalmar...@puremagic.com...
> On Monday, March 07, 2011 12:43:00 Nick Sabalausky wrote:
>> "Jonathan M Davis" wrote in message
>> news:mailman.2297.1299478837.4748.digitalmar...@puremagic.com...
>>
>> > On Sunday 06 March 2
On Monday, March 07, 2011 15:43:27 kenji hara wrote:
> Necessary to realize useful UFCS is appropriate annotations. 'named
> this first parameter' is low cost, cachy, and doesn't need ugly
> annotation syntax like @UFCS.
Using an attribute (whatever it would be) would be far more in keeping with h
Additional point in my opinion:
Calling UFCS-able annotated function by normal function call syntax is
still vaild.
But not annotatied function shouldn't be allowed with member-like call syntax.
void f(T)(T this, int n){...} // UFCS annotated
void g(T)(T x, int n){...}// do not UFCS annotated
2011/3/8 Steven Schveighoffer :
> I'll give you an example. This assumes that the compiler silently prefers
> member functions over free ones.
>
> Say you are using a struct from a library you didn't write like this:
>
> struct Foo
> {
> int x;
> }
>
> And you want to read data into it.
>
> So y
Caligo napisał:
> With C++, for example, Eigen uses expression templates. How does one do
> expression templates in D? Could someone rewrite this
> http://en.wikipedia.org/wiki/Expression_templates this D?
You may look at my approach for QuantLibD.
http://dsource.org/projects/quantlibd/browser/
"Adam D. Ruppe" wrote in message
news:il2sce$11lv$1...@digitalmars.com...
> spir wrote:
>> I would definitely love an inter-OS standard for storing the
>> MIME-type in every file's first byte.
>
> A better solution would be to store it in the filename. Might
> want more detail than one byte could
"Jonathan M Davis" wrote in message
news:mailman.2298.1299479088.4748.digitalmar...@puremagic.com...
> On Sunday 06 March 2011 22:09:22 Nick Sabalausky wrote:
>> "Jonathan M Davis" wrote in message
>> news:mailman.2280.1299459971.4748.digitalmar...@puremagic.com...
>>
>> > This reminds me. I sho
On Monday, March 07, 2011 12:43:00 Nick Sabalausky wrote:
> "Jonathan M Davis" wrote in message
> news:mailman.2297.1299478837.4748.digitalmar...@puremagic.com...
>
> > On Sunday 06 March 2011 21:57:30 Nick Sabalausky wrote:
> >> "Jonathan M Davis" wrote in message
> >> news:mailman.2293.1299467
Jonathan M Davis napisał:
> > As a feature of its own, it's just sugar. But if introducing infix
> > operators were contingent on banishing classic operator overloading, then
> > it is worthwhile.
>
> LOL. And _what_ benefit would banishing classic operator overloading have?
I've worked on a f
"Lars T. Kyllingstad" wrote in message
news:il2hsp$89d$2...@digitalmars.com...
> On Mon, 07 Mar 2011 10:25:21 +, Regan Heath wrote:
>
>> On Sun, 06 Mar 2011 08:37:15 -, Rainer Schuetze
>> wrote:
>>
>>> Looks good overall. I have a few comments and nitpicks though:
>>>
>>> > basename("
On Monday, March 07, 2011 12:10:07 spir wrote:
> On 03/07/2011 05:40 PM, Jesse Phillips wrote:
> > KennyTM~ Wrote:
> >> On Mar 7, 11 18:33, Eugene wrote:
> >>> Hi!
> >>>
> >>> What I want to do is pretty simple. I need to subtract a ubyte from a
> >>> ubyte and store the result in a ubyte. The p
"Lars T. Kyllingstad" wrote in message
news:il28cm$2phc$1...@digitalmars.com...
> On Sun, 06 Mar 2011 16:49:59 -0500, Nick Sabalausky wrote:
>
>> "Lars T. Kyllingstad" wrote in message
>> news:il09fp$2h5d$1...@digitalmars.com...
>>> On Sun, 06 Mar 2011 15:54:19 +0100, spir wrote:
What
"Bekenn" wrote in message
news:il1h39$19p5$2...@digitalmars.com...
> On 3/6/2011 4:11 AM, Lars T. Kyllingstad wrote:
>>
>> Interestingly, it seems drive names are actually restricted to one
>> letter. See the last paragraph of this section:
>>
>> http://en.wikipedia.org/wiki/Drive_letter#Common_
On 2011-03-07 22:13, Andrei Alexandrescu wrote:
On 3/7/11 5:05 AM, Jacob Carlborg wrote:
On 2011-03-07 01:10, Jonathan M Davis wrote:
On Sunday 06 March 2011 10:03:05 Tomek Sowiński wrote:
bearophile bearophile napisał:
Haskell is full of function calls, so the Haskell designers have
used/inv
On 07/03/2011 20:09, David Nadlinger wrote:
On 3/7/11 9:03 PM, filgood wrote:
as described here:
http://nondot.org/sabre/LLVMNotes/TypeSystemRewrite.txt
Naming the thread »LLVM 3.0 type system changes« is slightly misleading
– the above document by Chris Lattner is merely a working draft…
Da
On Mar 8, 11 05:13, Andrei Alexandrescu wrote:
How about precedence?
They're not changeable[1] AFAIK.
OTOH, Haskell have the infix[rl]? declarations to allow users to
customize the precedence (within a limited range of levels) and
associativity of an operator.
Ref:
[1]
http://stackoverfl
On 3/7/11 5:05 AM, Jacob Carlborg wrote:
On 2011-03-07 01:10, Jonathan M Davis wrote:
On Sunday 06 March 2011 10:03:05 Tomek Sowiński wrote:
bearophile bearophile napisał:
Haskell is full of function calls, so the Haskell designers have
used/invented several different ways to avoid some parent
"Jonathan M Davis" wrote in message
news:mailman.2297.1299478837.4748.digitalmar...@puremagic.com...
> On Sunday 06 March 2011 21:57:30 Nick Sabalausky wrote:
>> "Jonathan M Davis" wrote in message
>> news:mailman.2293.1299467610.4748.digitalmar...@puremagic.com...
>>
>> > I _was_ thinking of pu
On 03/07/2011 02:36 PM, Jacob Carlborg wrote:
On 2011-03-07 13:55, spir wrote:
On 03/07/2011 07:20 AM, Jonathan M Davis wrote:
On Sunday 06 March 2011 21:57:30 Nick Sabalausky wrote:
"Jonathan M Davis" wrote in message
news:mailman.2293.1299467610.4748.digitalmar...@puremagic.com...
On Sunda
On 03/07/2011 05:40 PM, Jesse Phillips wrote:
KennyTM~ Wrote:
On Mar 7, 11 18:33, Eugene wrote:
Hi!
What I want to do is pretty simple. I need to subtract a ubyte from a
ubyte and store the result in a ubyte. The problem is that DMD
implicitly wants to convert the ubytes into an integer, so
On 3/7/11 9:03 PM, filgood wrote:
as described here:
http://nondot.org/sabre/LLVMNotes/TypeSystemRewrite.txt
Naming the thread »LLVM 3.0 type system changes« is slightly misleading
– the above document by Chris Lattner is merely a working draft…
David
as described here:
http://nondot.org/sabre/LLVMNotes/TypeSystemRewrite.txt
Btw, what is the status of the D2 LLVM compiler?
thx, fil
On Mon, 07 Mar 2011 13:28:26 -0500, kenji hara wrote:
The problem is when there is a conflict between an actual member
funtion,
and a free function which takes the type as its first argument.
Who wins? The obvious choice is the member function. But let's say the
member function is added to
As it turns out Visual D doesn't seem to allow me to define a custom
build rule per-file. It appears I can only define a rule per-project.
Report it ;)
> The problem is when there is a conflict between an actual member funtion,
> and a free function which takes the type as its first argument.
>
> Who wins? The obvious choice is the member function. But let's say the
> member function is added to the type long after the external function
> exists
Stewart Gordon Wrote:
> If overflow of a ubyte matters, surely so does overflow of an int or long?
>
> In the OP's case, the only possible overflow is a negative result. As such,
> if overflow
> matters, one will do something like
>
> if (u2 < u1) {
> // ...
> } else {
>
bearophile wrote:
Simen kjaeraas:
This is basically already possible in D:
I suggest you to stop using the single underscore as identifier.
And I suggest you stop being bothered about example code that's
meant to illustrate a point rather than be production-ready.
--
Simen
No problem. Make sure you follow the latest one because there's
another patch you have to use to make stdio work (I've posted this on
SO already). I've also added some info on where to get GDB and its
manuals. Using GDB works great, the symbols get loaded from the
executable when compiled with 'GDC
On 07/03/2011 16:40, Jesse Phillips wrote:
KennyTM~ Wrote:
On Mar 7, 11 18:33, Eugene wrote:
Hi!
What I want to do is pretty simple. I need to subtract a ubyte from a
ubyte and store the result in a ubyte. The problem is that DMD
implicitly wants to convert the ubytes into an integer, so it
On Mon, 07 Mar 2011 16:45:52 -, Jonathan M Davis
wrote:
Andrei decided that it was not reasonable to require that -D _have_ to
be done
in a separate build for your average program, so druntime and Phobos
will be
switching to using version(StdDoc) to version the documentation (using -
ve
On Monday 07 March 2011 02:03:15 Regan Heath wrote:
> On Sat, 05 Mar 2011 21:40:47 -, Jonathan M Davis
>
> wrote:
> > So, for the current release, it's not a good idea to use -D when
> > compiling
> > actual code (and if you ever use version(D_Ddoc) yourself, it won't be a
> > good
> > idea e
KennyTM~ Wrote:
> On Mar 7, 11 18:33, Eugene wrote:
> > Hi!
> >
> > What I want to do is pretty simple. I need to subtract a ubyte from a
> > ubyte and store the result in a ubyte. The problem is that DMD
> > implicitly wants to convert the ubytes into an integer, so it fails
> > when attempting
On Mon, 07 Mar 2011 15:07:59 -, Adam D. Ruppe
wrote:
spir wrote:
I would definitely love an inter-OS standard for storing the
MIME-type in every file's first byte.
A better solution would be to store it in the filename. Might
want more detail than one byte could allow too, so perhaps a
spir wrote:
> I would definitely love an inter-OS standard for storing the
> MIME-type in every file's first byte.
A better solution would be to store it in the filename. Might
want more detail than one byte could allow too, so perhaps allowing
three or four bytes would be a good answer.
With the
On Mar 7, 11 21:44, spir wrote:
On 03/07/2011 02:05 PM, Jacob Carlborg wrote:
You could implement operator overloading without any special
cases/support in
the language, like Scala does. In Scala
3 + 4
Is syntax sugar for:
3.+(4)
It's possible because of the following three reasons:
* Every
On Mar 7, 11 18:33, Eugene wrote:
Hi!
What I want to do is pretty simple. I need to subtract a ubyte from a
ubyte and store the result in a ubyte. The problem is that DMD
implicitly wants to convert the ubytes into an integer, so it fails
when attempting to store the result into a ubyte. (Int
On Sat, 05 Mar 2011 19:15:17 -0500, kenji hara wrote:
2011/3/4 Steven Schveighoffer :
Also, keep in mind that I think UFCS should be restricted to builtins
only
(i.e. primitives + arrays, not AA's, since they map to a struct that
can be
customized in druntime). To provide multiple ways for
On 03/07/2011 02:05 PM, Jacob Carlborg wrote:
You could implement operator overloading without any special cases/support in
the language, like Scala does. In Scala
3 + 4
Is syntax sugar for:
3.+(4)
It's possible because of the following three reasons:
* Everything is an object
* Method names
On 2011-03-07 13:55, spir wrote:
On 03/07/2011 07:20 AM, Jonathan M Davis wrote:
On Sunday 06 March 2011 21:57:30 Nick Sabalausky wrote:
"Jonathan M Davis" wrote in message
news:mailman.2293.1299467610.4748.digitalmar...@puremagic.com...
On Sunday 06 March 2011 18:08:49 Andrei Alexandrescu wr
On 03/07/2011 01:08 PM, Lars T. Kyllingstad wrote:
Alternately, we could ignore the distinction between file and directory
> - as we're essentially just parsing strings here - and have two
> functions:
>
> lastComponent("dir/subdir/") -> "subdir" lastComponent("dir/subdir")
> -> "subdir"
>
On 2011-03-07 01:13, Jonathan M Davis wrote:
On Sunday 06 March 2011 06:03:31 Russel Winder wrote:
OK, this one surprised me, all that remains is for me to find out why it
shouldn't have done:
reduce ! ( ( a , b ) { return a + b ; } ) ( 0.0 , outputData )
works just fine, but:
I don't understand why so many here are obsessed with constantly trying to
"improve" D and/or find things that are wrong with the language just so they
can come up with a solution. We've had feature freeze, have we not?
For someone who is relatively new to D, seeing all these discussions on
topic
On 2011-03-07 01:10, Jonathan M Davis wrote:
On Sunday 06 March 2011 10:03:05 Tomek Sowiński wrote:
bearophile bearophile napisał:
Haskell is full of function calls, so the Haskell designers have
used/invented several different ways to avoid some parenthesys in the
code.
From what I've seen i
On 03/07/2011 09:19 AM, Johannes Pfau wrote:
Jonathan M Davis wrote:
On Sunday 06 March 2011 22:51:55 Christopher Nicholson-Sauls wrote:
On 03/07/11 00:24, Jonathan M Davis wrote:
On Sunday 06 March 2011 22:09:22 Nick Sabalausky wrote:
"Jonathan M Davis" wrote in message
news:mailman.2280.12
On 03/07/2011 07:20 AM, Jonathan M Davis wrote:
On Sunday 06 March 2011 21:57:30 Nick Sabalausky wrote:
"Jonathan M Davis" wrote in message
news:mailman.2293.1299467610.4748.digitalmar...@puremagic.com...
On Sunday 06 March 2011 18:08:49 Andrei Alexandrescu wrote:
Yah, thing is people work o
On 03/07/2011 12:28 PM, bearophile wrote:
I like Python but I have found some Haskell code on web pages, that I copy and
try to run. I am having many problems caused by tabs present in the original
code that vanish in HTML and break haskell indentations, creating bugs. So be
careful what you w
On 03/07/2011 09:26 AM, Russel Winder wrote:
On Sun, 2011-03-06 at 20:23 -0500, bearophile wrote:
[ . . . ]
I wonder if you may have misunderstood the reason for the where clause
in functional languages such as Haskell and ML (usually OCaml). In
these languages the body of a function must be a
On 2011-03-07 01:20:25 -0500, Jonathan M Davis said:
On Sunday 06 March 2011 21:57:30 Nick Sabalausky wrote:
Speaking of which: Now that assertPred has been rejected on the grounds of
an improved assert that doesn't yet exist, what is the current status of
the improved assert?
There's an enh
On Mon, 07 Mar 2011 10:25:21 +, Regan Heath wrote:
> On Sun, 06 Mar 2011 08:37:15 -, Rainer Schuetze
> wrote:
>
>> Looks good overall. I have a few comments and nitpicks though:
>>
>> > basename("dir/subdir/") --> "subdir"
>> > directory("dir/subdir/") --> "dir"
On 03/07/2011 02:23 AM, bearophile wrote:
The "where" allows to write an expression where some parts of it are defined
below it. In the where you are allowed to put one or more variables (immutable values in
Haskell) and functions (values again).
So first of all some usage examples from random
Russel Winder:
>I wonder if you may have misunderstood the reason for the where clause in
>functional languages such as Haskell and ML (usually OCaml). In these
>languages the body of a function must be a single value-returning expression.
>This means there has to be a separate clause for all
On Mon, 07 Mar 2011 10:33:28 +, Eugene wrote:
> Hi!
>
> What I want to do is pretty simple. I need to subtract a ubyte from a
> ubyte and store the result in a ubyte. The problem is that DMD
> implicitly wants to convert the ubytes into an integer, so it fails when
> attempting to store the
Hi!
What I want to do is pretty simple. I need to subtract a ubyte from a
ubyte and store the result in a ubyte. The problem is that DMD
implicitly wants to convert the ubytes into an integer, so it fails
when attempting to store the result into a ubyte. (Int cannot be
converted to ubyte?)
The
On Sun, 06 Mar 2011 08:37:15 -, Rainer Schuetze
wrote:
Looks good overall. I have a few comments and nitpicks though:
> basename("dir/subdir/") --> "subdir"
> directory("dir/subdir/") --> "dir"
Is this what everybody expects? I'm not sure, but another possibilit
On Sun, 2011-03-06 at 17:41 -0800, Jonathan M Davis wrote:
[ . . . ]
> If anything, I'd argue to simply remove .. from foreach and have iota be the
> way
> to do it. The only other inconsistency is with case statements, but making
> them
> have an open right end would likely be problematic (not
On Sat, 05 Mar 2011 16:32:55 -, Lars T. Kyllingstad
wrote:
The only disagreement seems to be about the naming, so let's have a round
of voting. Here are a few alternatives for each function. Please say
which ones you prefer.
* dirSeparator, dirSep, sep
* currentDirSymbol, currentDirSym
Lars T. Kyllingstad Wrote:
> On Sun, 06 Mar 2011 16:49:59 -0500, Nick Sabalausky wrote:
>
> > "Lars T. Kyllingstad" wrote in message
> > news:il09fp$2h5d$1...@digitalmars.com...
> >> On Sun, 06 Mar 2011 15:54:19 +0100, spir wrote:
> >>>
> >>> What about extending the notion of 'device' (see othe
dirSep
curDirSymbol
baseName
directory
drive
ext
stripExt
I would actually prefer getDir, getDrive and getExt if there was a
corresponding getName (instead of baseName).
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
On Sat, 05 Mar 2011 21:40:47 -, Jonathan M Davis
wrote:
So, for the current release, it's not a good idea to use -D when
compiling
actual code (and if you ever use version(D_Ddoc) yourself, it won't be a
good
idea ever), but that will be fixed by the next release. In the meantime,
yo
On Mon, 07 Mar 2011 09:36:11 +, %u wrote:
>> The general naming convention as far as variable names go is camelcased
>> with the name starting with a lower case letter - this includes
>> constants. Most of Phobos follows this, and the parts that
> haven't been have been moving towards it. Ther
> The general naming convention as far as variable names go is camelcased with
> the name starting with a lower case letter - this includes constants. Most of
> Phobos follows this, and the parts that
haven't been have been moving towards it. There are likely to be a few
exceptions, but on the w
On Sun, 06 Mar 2011 16:49:59 -0500, Nick Sabalausky wrote:
> "Lars T. Kyllingstad" wrote in message
> news:il09fp$2h5d$1...@digitalmars.com...
>> On Sun, 06 Mar 2011 15:54:19 +0100, spir wrote:
>>>
>>> What about extending the notion of 'device' (see other post) to cover
>>> 'http://' and "ftp://
On 06/03/11 18.50, Jim wrote:
Jonathan M Davis Wrote:
On Sunday 06 March 2011 02:59:25 Jim wrote:
Okay, so there's a discussion about identifier names in the proposed
std.path replacement -- should they be abbreviated or not? Should we
perhaps seek to have a consistent naming convention for al
Jonathan M Davis wrote:
> On Sunday 06 March 2011 22:51:55 Christopher Nicholson-Sauls wrote:
>> On 03/07/11 00:24, Jonathan M Davis wrote:
>> > On Sunday 06 March 2011 22:09:22 Nick Sabalausky wrote:
>> >> "Jonathan M Davis" wrote in message
>> >> news:mailman.2280.1299459971.4748.digitalmar...@
On Sun, 2011-03-06 at 20:23 -0500, bearophile wrote:
[ . . . ]
I wonder if you may have misunderstood the reason for the where clause
in functional languages such as Haskell and ML (usually OCaml). In
these languages the body of a function must be a single value-returning
expression. This means
Jonathan M Davis wrote:
>On Sunday 06 March 2011 22:51:55 Christopher Nicholson-Sauls wrote:
>> On 03/07/11 00:24, Jonathan M Davis wrote:
>> > On Sunday 06 March 2011 22:09:22 Nick Sabalausky wrote:
>> >> "Jonathan M Davis" wrote in message
>> >> news:mailman.2280.1299459971.4748.digitalmar...@pu
74 matches
Mail list logo