Ok, thanks a lot..
About dynamic arrays: I haven't found any information about
internal representation of the D structures. E.g. do dynamic
arrays have reference counter?
Nevermind, I'm gonna use Type2[0] syntax.
btw,
short a,b,c;
a = b + c; //error: cannot implicitly convert expression of type
'int' to 'short'
Guys!! Tell me that I have an old slutty version of the
compiler...
On Tuesday, 29 April 2014 at 06:13:52 UTC, Andrey wrote:
Ok, thanks a lot..
About dynamic arrays: I haven't found any information about
internal representation of the D structures. E.g. do dynamic
arrays have reference counter?
Nevermind, I'm gonna use Type2[0] syntax.
D dynamic arrays
On Tuesday, 29 April 2014 at 07:43:55 UTC, Andrey wrote:
btw,
short a,b,c;
a = b + c; //error: cannot implicitly convert expression of
type 'int' to 'short'
Guys!! Tell me that I have an old slutty version of the
compiler...
No, it's correct. `b + c` is not guaranteed to fit into `a`,
On Monday, 28 April 2014 at 15:57:16 UTC, anonymous wrote:
`zmod.symbol` works, too.
no, it's not. at least on latest GDC.
I don't think so. The point of the renamed import is that you
have to use the new name.
but i renamed only my.module, not others. nothing hints me that
renaming is SO
ketmar:
so it's broken beyond any repair. so sad.
The current implementation of the module system has some
problems, that are being worked on. If you think some part of the
module system design is not good enough, then try to ask for an
enhancement :-) No need to be sad.
Bye,
bearophile
On Tuesday, 29 April 2014 at 04:44:39 UTC, Jesse Phillips wrote:
On Monday, 28 April 2014 at 10:40:49 UTC, Chris wrote:
Person!(string) *pptr;
Just wanted to point out, the above is C style and not
recommended.
Person!(string)* pptr, pptr2, pptr3;
In D the pointer is part of the type
On 04/29/14 11:57, ketmar via Digitalmars-d-learn wrote:
On Monday, 28 April 2014 at 15:57:16 UTC, anonymous wrote:
`zmod.symbol` works, too.
no, it's not. at least on latest GDC.
It certainly works here; if it didn't it would be a frontend problem.
I don't think so. The point of the renamed
Artur Skawina:
The D module system has a lot of problems and certainly needs
to be completely redesigned from scratch,
I don't think it will be redesigned from scratch (and if that
happens I see no proof that the redesign will be better than the
original design). So better to fix its major
On Tuesday, 29 April 2014 at 09:57:08 UTC, ketmar wrote:
On Monday, 28 April 2014 at 15:57:16 UTC, anonymous wrote:
`zmod.symbol` works, too.
no, it's not. at least on latest GDC.
Works for me with Ubuntu's gdc 4.8.2-1ubuntu6. My little test
case:
my/module_.d:
---
module my.module_;
On Tuesday, 29 April 2014 at 10:57:13 UTC, Artur Skawina via
Digitalmars-d-learn wrote:
The D module system has a lot of problems and certainly needs
to be completely redesigned from scratch
i don't see any real flaws in it. it's just little
inconsistencies that can be easily fixed.
On Tuesday, 29 April 2014 at 10:44:44 UTC, bearophile wrote:
The current implementation of the module system has some
problems, that are being worked on. If you think some part of
the module system design is not good enough, then try to ask
for an enhancement :-) No need to be sad.
ah, i can't
On Tuesday, 29 April 2014 at 11:10:06 UTC, anonymous wrote:
Works for me with Ubuntu's gdc 4.8.2-1ubuntu6.
ah, don't you believe that i *really tested* it before posting,
with latest GDC from git (which i builds routinely on dayly
basis)?
Personally, I think the current behaviour is fine.
On Tuesday, 29 April 2014 at 11:10:06 UTC, anonymous wrote:
specifically, it was derelict sdl bindings. that module itself
does public imports, so issue is more complicated. sorry for me
being rude.
ketmar:
ah, i can't clearly express myself even in this case, i don't
think i can make clear request. it's easier to write code, not
words. ;-)
i'm sad not about D or module issues, i'm sad about myself.
One of the most important skills of a programmer (and of course a
technical/literary
On Tuesday, 29 April 2014 at 11:23:56 UTC, ketmar wrote:
ah, don't you believe that i *really tested* it before posting,
with latest GDC from git (which i builds routinely on dayly
basis)?
You may have made mistakes when testing, or maybe I have. That's
why I provided my testcase. Does it
On Tuesday, 29 April 2014 at 11:28:23 UTC, bearophile wrote:
One of the most important skills of a programmer (and of course
a technical/literary writer) is the ability to express ideas in
written text.
the thing is that English neither my native language nor i
learned it in school (not really
ketmar:
the thing is that English neither my native language
Nor mine, as you can see :-) And I am bad with natural languages
in general. But you can learn to write acceptable English if
you do exercises for some years :-)
Bye,
bearophile
On Tuesday, 29 April 2014 at 11:47:07 UTC, anonymous wrote:
You may have made mistakes when testing, or maybe I have.
sorry again for being rude. i was really upset and
unintentionally made it to you.
That's why I provided my testcase. Does it work in your setup?
your sample is ok. but
On Tue, 29 Apr 2014 03:43:54 -0400, Andrey n...@none.no wrote:
btw,
short a,b,c;
a = b + c; //error: cannot implicitly convert expression of type 'int'
to 'short'
Guys!! Tell me that I have an old slutty version of the compiler...
No. It's due to integer promotion. All operations are
On 4/29/2014 8:25 PM, ketmar wrote:
On Tuesday, 29 April 2014 at 11:10:06 UTC, anonymous wrote:
specifically, it was derelict sdl bindings. that module itself does
public imports, so issue is more complicated. sorry for me being rude.
What, exactly, is the problem you are having with public
//blah1.d
class A
{
private this(){}
}
//blah2.d
import blah1;
class B : A {}
$ dmd blah1.d blah2.d -lib
Error: constructor blah1.A.this is not accessible from module
blah2
Can someone explain why this can't/doesn't work? Thanks.
On Tuesday, 29 April 2014 at 13:53:58 UTC, Mike Parker wrote:
What, exactly, is the problem you are having with public
imports in Derelict?
it's not derelict issue, sorry is i made you to think that. issue
is with the renamed public imports, and dereclit was one that
triggered it. nothing bad
On Tuesday, 29 April 2014 at 13:59:30 UTC, John Colvin wrote:
//blah1.d
class A
{
private this(){}
}
//blah2.d
import blah1;
class B : A {}
$ dmd blah1.d blah2.d -lib
Error: constructor blah1.A.this is not accessible from module
blah2
Can someone explain why this can't/doesn't
On Tuesday, 29 April 2014 at 13:53:58 UTC, Mike Parker wrote:
ah. besides that i was once unable to build derelict sdl due to
undefined symbols like 'ipad' or so, can't really remember. but
it's the thing you got when goind bleeding edge, i think.
http://dlang.org/class.html#constructors
If no call to constructors via this or super appear in a
constructor, and the base class has a constructor, a call to
super() is inserted at the beginning of the constructor.
The fact that call to base constructor is not inserted into
templated
On 4/29/14, Dicebot via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
The fact that call to base constructor is not inserted into
templated this()() looks like a bug to me.
Just found this, and it might be related:
https://issues.dlang.org/show_bug.cgi?id=5770
On 04/29/2014 01:36 AM, John Colvin wrote:
D dynamic arrays (better referred to as slices) can be thought of as
implmented like
struct Array(T)
{
T* ptr;
size_t length;
}
They do not track ownership or have any reference counting. If they've
been allocated with new then the
On Tuesday, 29 April 2014 at 16:52:27 UTC, Ali Çehreli wrote:
That may be misleading because there is no need to allocate
with an explicit new. For example, the slice below is owned by
the GC as well:
int[] foo()
{
int[] a;
a ~= 42;// on memory owned by the GC
return a;
}
I
Hi guys,
I've the following snipped:
TcpSocket oSocket = new TcpSocket(AddressFamily.INET);
oSocket.bind(new InternetAddress(127.0.0.1, 12345));
oSocket.blocking(false);
oSocket.listen(0);
while(true)
{
try
{
Socket oRequestSocket = oSocket.accept();
On Tuesday, 29 April 2014 at 17:16:33 UTC, Tim wrote:
Is there anything I'm doing wrong?
You should be using a blocking socket. With them, the operating
system will put your thread on hold until a new connection comes
in. Without them, it will endlessly loop doing absolutely nothing
except
On Tuesday, 29 April 2014 at 17:19:41 UTC, Adam D. Ruppe wrote:
On Tuesday, 29 April 2014 at 17:16:33 UTC, Tim wrote:
Is there anything I'm doing wrong?
You should be using a blocking socket. With them, the operating
system will put your thread on hold until a new connection
comes in.
On Tuesday, 29 April 2014 at 17:35:08 UTC, Tim wrote:
On Tuesday, 29 April 2014 at 17:19:41 UTC, Adam D. Ruppe wrote:
On Tuesday, 29 April 2014 at 17:16:33 UTC, Tim wrote:
Is there anything I'm doing wrong?
You should be using a blocking socket. With them, the
operating system will put your
On Tue, 29 Apr 2014 17:16:32 +, Tim wrote:
Hi guys,
I've the following snipped:
TcpSocket oSocket = new TcpSocket(AddressFamily.INET); oSocket.bind(new
InternetAddress(127.0.0.1, 12345)); oSocket.blocking(false);
oSocket.listen(0);
while(true)
{
try {
Socket
On 04/29/2014 10:01 AM, Meta wrote:
On Tuesday, 29 April 2014 at 16:52:27 UTC, Ali Çehreli wrote:
That may be misleading because there is no need to allocate with an
explicit new. For example, the slice below is owned by the GC as well:
int[] foo()
{
int[] a;
a is an empty slice,
On Tue, 29 Apr 2014 13:59:28 +
John Colvin via Digitalmars-d-learn digitalmars-d-learn@puremagic.com
wrote:
Can someone explain why this can't/doesn't work? Thanks.
hm. why it should? there is no 'default' constructors in D, and you
specifially made explicit one private (i.e. not visible
On Tuesday, 29 April 2014 at 18:51:15 UTC, ketmar via
Digitalmars-d-learn wrote:
On Tue, 29 Apr 2014 13:59:28 +
John Colvin via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com
wrote:
Can someone explain why this can't/doesn't work? Thanks.
hm. why it should? there is no 'default'
btw, please ignore my completely broken English in the title.
Apparently I had a moment.
On Tuesday, 29 April 2014 at 20:55:01 UTC, K.K. wrote:
Hi! I've kinda got a few noob questions...
I've been trying to learn D for the last few months, and I've
got a pretty good grasp of the syntax, but I've been having
trouble figuring out how to use libraries(excluding the
standard lib).
fuck. nobody approves my posts in mailing list. if i want to spam
this forum — i can do it here. shit.
On Tuesday, 29 April 2014 at 21:16:38 UTC, John Colvin wrote:
I would recommend using dub for managing dependencies and
building libraries etc. http://code.dlang.org/about
Oh wow this looks awesome! I'll start messing around with it now
- Thanks!
On Tuesday, 29 April 2014 at 21:21:10 UTC, ketmar wrote:
bye. will never write here again.
Platform: Windows 8.1 Update 1
After running the all-in-one Windows setup: dmd-2.065.0.exe, and
creating a new D Console Application in VS 2010 then trying to
build the application, the build fails with the below written to
the buildlog.html.
I can confirm writing the Tutorial's Hello World
On 4/29/2014 10:01 AM, Meta wrote:
On Tuesday, 29 April 2014 at 16:52:27 UTC, Ali Çehreli wrote:
[...]
int[] foo()
{
int[] a;
a ~= 42;// on memory owned by the GC
return a;
}
I didn't realize this was possible... I figured it was equivalent to
`null ~= 42` which I realize now
44 matches
Mail list logo