But why it doesn't convert uint to int correctly?
On Tuesday, 4 September 2012 at 07:32:47 UTC, Zhenya wrote:
But why it doesn't convert uint to int correctly?
I dont know, small positive uint and int must have the same
binary representation, and no need to conversion. Strangely...
O! May be problem is here:
On Tuesday, 4 September 2012 at 16:17:30 UTC, Ivan Agafonov wrote:
On Tuesday, 4 September 2012 at 07:32:47 UTC, Zhenya wrote:
But why it doesn't convert uint to int correctly?
I dont know, small positive uint and int must have the same
binary representation, and no need to conversion.
On Monday, 3 September 2012 at 09:10:49 UTC, Kagamin wrote:
The diagnostic message can definitely be better.
Any idea what's causing the error messages? Why aren't the types
matching?
On 08/31/2012 12:48 PM, mist wrote:
On Friday, 31 August 2012 at 19:15:14 UTC, Jacob Carlborg wrote:
On 2012-08-31 16:24, mist wrote:
Subject.
Is that possible? I see only parameter type tuple stuff out there. I'm
looking into iterating over own parameter name list inside of function.
Here:
immutable char[] texture = import(Chrysanthemum.jpg);
fails with message: unrecognized type jpg
but why?
On 9/4/12, Zhenya zh...@list.ru wrote:
immutable char[] texture = import(Chrysanthemum.jpg);
Works for me on win32 DMD2.060 and with -J. switch. Which
system/compiler are you using?
On Tuesday, 4 September 2012 at 19:04:33 UTC, Zhenya wrote:
On Tuesday, 4 September 2012 at 19:03:03 UTC, Andrej Mitrovic
wrote:
On 9/4/12, Zhenya zh...@list.ru wrote:
immutable char[] texture = import(Chrysanthemum.jpg);
Works for me on win32 DMD2.060 and with -J. switch. Which
On Tuesday, 4 September 2012 at 19:03:03 UTC, Andrej Mitrovic
wrote:
On 9/4/12, Zhenya zh...@list.ru wrote:
immutable char[] texture = import(Chrysanthemum.jpg);
Works for me on win32 DMD2.060 and with -J. switch. Which
system/compiler are you using?
DMD 2.060 Win32
with -J switch too
On 2012-09-04 20:28, Ellery Newcomer wrote:
Have fun discovering it isn't implemented. Then use
It isn't? Then why is it in the docs.
std.traits.ParameterIdentifierTuple
And why is this not in the docs.
--
/Jacob Carlborg
On 09/04/2012 12:09 PM, Jacob Carlborg wrote:
On 2012-09-04 20:28, Ellery Newcomer wrote:
Have fun discovering it isn't implemented. Then use
It isn't? Then why is it in the docs.
no idea.
std.traits.ParameterIdentifierTuple
And why is this not in the docs.
dlang.org docs seem to
anybody know a neat trick to get the module name that a function is
being called in a la
void foobar(size_t line = __LINE__) {
}
std.traits.moduleName looks like it almost does it, but it needs a
symbol from the module.
On 9/4/12, Zhenya zh...@list.ru wrote:
-J Chrysanthemium.jpg
That's the issue. -J needs to be followed by a path, e.g. -J. (notice
the dot), or -JC:\some\folder, and no spaces so don't use -J
C:\some\folder. Remember that you're putting a directory path, not a
file path with -J.
__FILE__?
On 9/4/12, Ellery Newcomer ellery-newco...@utulsa.edu wrote:
anybody know a neat trick to get the module name that a function is
being called in a la
void foobar(size_t line = __LINE__) {
}
std.traits.moduleName looks like it almost does it, but it needs a
symbol from the
I think the __traits thing was a half-completed pull request.
Or a complete one that got half-reverted.
In any case it was a mistake to put it in the docs, since it
isn't in the dmd source code.
On Tuesday, 4 September 2012 at 19:38:08 UTC, Andrej Mitrovic
wrote:
On 9/4/12, Zhenya zh...@list.ru wrote:
-J Chrysanthemium.jpg
That's the issue. -J needs to be followed by a path, e.g. -J.
(notice
the dot), or -JC:\some\folder, and no spaces so don't use -J
C:\some\folder. Remember that
On 09/04/2012 12:41 PM, Andrej Mitrovic wrote:
__FILE__?
It doesn't necessarily have the exact package hierarchy. e.g:
// wonka.d
module willy.wonka;
pragma(msg, __FILE__);
// end wonka.d
dmd wonka.d
gives
wonka.d
but
dmd willy/wonka.d
gives
willy/wonka.d
9/4/12, Ellery Newcomer ellery-newco...@utulsa.edu wrote:
On 09/04/2012 12:41 PM, Andrej Mitrovic wrote:
__FILE__?
It doesn't necessarily have the exact package hierarchy.
We could really use __MODULE__ then. I think it's been asked before
but I didn't see any enhancement request in
On Tuesday, September 04, 2012 21:41:24 Andrej Mitrovic wrote:
__FILE__?
That'll mostly work, but it's perfectly possible to give a module a name which
is completely different from the file name.
But it looks like we now have std.traits.moduleName, so presumably that will
do the trick.
-
On 9/4/12, Jonathan M Davis jmdavisp...@gmx.com wrote:
But it looks like we now have std.traits.moduleName, so presumably that will
do the trick.
How will that do the trick if you don't have the reference to the
invoking module?
On 09/04/2012 01:16 PM, Jonathan M Davis wrote:
On Tuesday, September 04, 2012 21:41:24 Andrej Mitrovic wrote:
__FILE__?
That'll mostly work, but it's perfectly possible to give a module a name which
is completely different from the file name.
But it looks like we now have
On Tuesday, September 04, 2012 22:40:19 Andrej Mitrovic wrote:
On 9/4/12, Jonathan M Davis jmdavisp...@gmx.com wrote:
But it looks like we now have std.traits.moduleName, so presumably that
will do the trick.
How will that do the trick if you don't have the reference to the
invoking
I have my library module:
module mylib.vector;
// alias Vector!(float, 4) Vector4f;
struct Vector(T, uint size)
{
T[size] array = 0;
...
}
And I have client module:
On Tue, Sep 4, 2012 at 2:00 PM, Jonathan M Davis jmdavisp...@gmx.comwrote:
On Tuesday, September 04, 2012 22:40:19 Andrej Mitrovic wrote:
On 9/4/12, Jonathan M Davis jmdavisp...@gmx.com wrote:
But it looks like we now have std.traits.moduleName, so presumably that
will do the trick.
On Tue, Sep 4, 2012 at 1:36 PM, Andrej Mitrovic
andrej.mitrov...@gmail.comwrote:
9/4/12, Ellery Newcomer ellery-newco...@utulsa.edu wrote:
On 09/04/2012 12:41 PM, Andrej Mitrovic wrote:
__FILE__?
It doesn't necessarily have the exact package hierarchy.
We could really use __MODULE__
Ivan Agafonov:
(otherwise I'll get link errors for some vector functions),
What errors and in what cases?
Bye,
bearophile
Hello.
I am trying to work out if there is existing support for strongly
typed numerical values for example degrees west and kilograms
such that they cannot be accidentally mixed in an expression. I
have vague recollection of seeing a presentation by Walter
talking about this but I cannot
Nicholas Londey:
for example degrees west and kilograms such that they cannot be
accidentally mixed in an expression.
Using the static typing to avoid similar bugs is the smart thing
to do :-)
I have vague recollection of seeing a presentation
by Walter talking about this but I cannot
On Wednesday, 5 September 2012 at 00:55:12 UTC, Nicholas Londey
wrote:
Hello.
I am trying to work out if there is existing support for
strongly typed numerical values for example degrees west and
kilograms such that they cannot be accidentally mixed in an
expression. I have vague recollection
On 09/04/2012 05:55 PM, Nicholas Londey wrote:
I could easily implement my own as I have done in C++ in the
past but assume there is a standard implementation which I would prefer.
Any help or links to examples much appreciated.
UFCS enables some interesting syntax:
struct Grams
{
On 9/5/2012 7:46 AM, Ivan Agafonov wrote:
I have my library module:
module mylib.vector;
// alias Vector!(float, 4) Vector4f;
struct Vector(T, uint size)
{
T[size] array = 0;
...
}
On 9/5/2012 10:50 AM, Mike Parker wrote:
compiler says, ok, this is no problem. It goes about its job and creates
baz.obj and passes it off to the linker. The linker looks through
baz.obj, finds a reference to foobar, which, given the name mangling
(_D3foo6foobarS3foo3Bar), should exist in an
Using this:
struct Grams
{
size_t amount;
}
@property Grams grams(size_t amount)
{
return Grams(amount);
}
void main()
{
auto weight = 5.grams;
weight = weight + 10.grams;
}
How would you use it? I thought the point of this sort of strong
typing was to be able to carry out
On Wednesday, 5 September 2012 at 01:49:50 UTC, Mike Parker wrote:
On 9/5/2012 7:46 AM, Ivan Agafonov wrote:
I have my library module:
module mylib.vector;
// alias Vector!(float, 4) Vector4f;
struct Vector(T, uint size)
{
T[size]
On Tuesday, 4 September 2012 at 23:51:49 UTC, bearophile wrote:
Ivan Agafonov:
(otherwise I'll get link errors for some vector functions),
What errors and in what cases?
Error 42: Symbol Undefined
_D4time4math6vector16__T6VectorTfVi4Z6Vector8toStringMFZAya
hello.obj(hello)
Error 42:
On 09/04/2012 08:11 PM, ixid wrote:
Using this:
struct Grams
{
size_t amount;
}
@property Grams grams(size_t amount)
{
return Grams(amount);
}
void main()
{
auto weight = 5.grams;
weight = weight + 10.grams;
}
How would you use it? I thought the point of this sort of strong
On Wed, 05 Sep 2012 02:55:45 +0200, Nicholas Londey lon...@gmail.com
wrote:
Hello.
I am trying to work out if there is existing support for strongly typed
numerical values for example degrees west and kilograms such that they
cannot be accidentally mixed in an expression. I have vague
On Wednesday, 5 September 2012 at 05:03:38 UTC, Simen Kjaeraas
wrote:
Not mine, but this is the implementation I use:
https://github.com/klickverbot/phobos/tree/units/std
Files are units.d and si.d.
Documentation:
http://klickverbot.at/code/units/std_units.html
38 matches
Mail list logo