Re: D-Day for DMD is today!

2015-09-04 Thread Jesse Phillips via Digitalmars-d-announce

On Sunday, 23 August 2015 at 05:17:33 UTC, Walter Bright wrote:

https://github.com/D-Programming-Language/dmd/pull/4923

We have made the switch from C++ DMD to D DMD!

Many, many thanks to Daniel Murphy for slaving away for 2.5 
years to make this happen. More thanks to Martin Nowak for 
helping shepherd it through the final stages, and to several 
others who have pitched in on this.


This is a HUGE milestone for us.

Much work remains to be done, such as rebasing existing dmd 
pull requests. Thanks in advance for the submitters who'll be 
doing that. I hope you aren't too unhappy about the extra work 
- it's in a good cause!


Should we be looking to put out a DMD 2.069 beta to get more 
hands on testing it early?




Re: 1st Ever Artificial Consciousness to be Written in D Language

2015-09-04 Thread via Digitalmars-d-announce

On Wednesday, 2 September 2015 at 14:41:20 UTC, GrandAxe wrote:
This is to inform the D Language community that the first 
viable general artificial algorithm is being written in D. It 
is called Organic Big data intelligence (OBI); the website is 
at www.okeuvo.com.


Some of its capabilities are:

1. Ability to learn
2. Ability to analyse
3. Problem solving
4. Moral judgement
5. Ability to feel emotions
6. Free will
7. Consciousness
8. Self awareness

D Language was chosen for its versatility. It is a language 
with high level syntax and low capabilities, as well as 
excellent performance and being open source.


Unnetworked personal mobile devices are the target platform for 
the standard implementation of OBI. A demonstration release is 
scheduled for the end of this month (September 2015). The 
demonstration release will comprehend English prose only, later 
releases will be able to process input from other languages, as 
well as sensory input.

OBI will be a mixture of open and closed source modules.

To God be the Glory.

Asame Obiomah


It seems to me that at least 5, 6 are counter-productive, and go 
against the goals stated in your website. Nevermind how 
difficulty it would be to implement them, it seems like you 
haven't thought this through carefully enough.


On the other hand, I'm curious to know why you chose D to make 
this announcement?


Re: 1st Ever Artificial Consciousness to be Written in D Language

2015-09-04 Thread torhu via Digitalmars-d-announce

On 02.09.2015 16:41, GrandAxe wrote:

This is to inform the D Language community that the first viable
general artificial algorithm is being written in D. It is called
Organic Big data intelligence (OBI); the website is at
www.okeuvo.com.

Some of its capabilities are:

1. Ability to learn
2. Ability to analyse
3. Problem solving
4. Moral judgement
5. Ability to feel emotions
6. Free will
7. Consciousness
8. Self awareness


Looks like the perfect controller software for my cold fusion powered 
housekeeper/cook android.


Re: Beta D 2.068.1-b2

2015-09-04 Thread Kapps via Digitalmars-d-announce

On Friday, 4 September 2015 at 11:44:44 UTC, BBasile wrote:


What's so different with C# 'new' that not to call 'super' in a 
D overriden method ? (even if C# has itself 'base' instead of 
'super')


C#
---
public class BaseC
{
public int x;
public void Invoke() { }
}
public class DerivedC : BaseC
{
new public void Invoke() { }
}
---

D
---
class BaseC
{
int x;
void Invoke() { }
}
class DerivedC : BaseC
{
override void Invoke() { /*super.Invoke() not called*/ }
}
---

apart from a compiler warning 
(https://msdn.microsoft.com/en-us/library/ms173153.aspx=


It is just a warning, because it's ultimately there to warn you 
of something you may not have noticed.

For example:

abstract class BaseA {
abstract void foo();
}

class A : BaseA {
override void foo() { }
virtual void foobar() { }
}

All is well.
But then BaseA (which may be in a different library), suddenly 
becomes:


abstract class BaseA {
abstract void foo();
virtual void foobar() { dostuff(); }
}

Now you have A, which has foobar, but isn't actually related to 
BaseA.foobar. You probably didn't mean to override foobar, but 
it's still confusing for anything expecting BaseA.foobar to be 
related to A.foobar. You might not even know BaseA.foobar was 
added if it was part of a different library. Or, even worse:


class B : A {
override void foobar() {
dootherstuff();
}
}

It definitely gets a bit odd, and new is there just to prevent 
confusion / clarify intentions, as well as let you know when a 
new method is added with the same name. The whole situation is 
messy, like what happens when A.foobar is removed and you 
suddenly start overriding BaseA.foobar instead. Or what if you 
were intending to override BaseA.foobar, but now you're suddenly 
overriding A.foobar once A adds the method? I'd actually prefer 
to specifically have to write 'override void A.foobar()' if 
A.foobar is marked as 'new' for this reason and make it an error 
to not include new or override when dealing with the same name. D 
could probably benefit from this approach as well, for the same 
reasons.


Re: Beta D 2.068.1-b2

2015-09-04 Thread Jacob Carlborg via Digitalmars-d-announce

On 2015-09-04 14:04, Martin Nowak wrote:


The problem is that you're hiding a method that is still reachable
through the vtable.
Rather than throwing a runtime error this was changed to a compiler error.

https://github.com/D-Programming-Language/dmd/pull/4606

You should not turn off deprecations btw ;).


I haven't turned off deprecations. This is in Tango and it seems no one 
has cared to fix those.



The simple solution in you case is to override the inherited `string
toString()` with an implementation that forwards to your `toString()`.

class UniText
{
 override string toString() { return toString(null).idup; }
 abstract const char[] toString (char[]  dst = null);
 abstract const wchar[] toString16 (wchar[] dst = null);
 abstract const dchar[] toString32 (dchar[] dst = null);
}

Also see at
https://github.com/D-Programming-Language/druntime/blob/4e799b75ebcb6d00ccefbcfd763a1f5d158357a1/src/object.d#L1598
for an example of an alternative overridable toString method.
Maybe you should use the delegate based toString as well, it's already
supported by a some phobos formatting.


Again, this is in Tango, I just want it to compile :)

--
/Jacob Carlborg


Re: 1st Ever Artificial Consciousness to be Written in D Language

2015-09-04 Thread tired_eyes via Digitalmars-d-announce

Not really. A tabloid reader can be modeled like this:



Sounds like a plan. Going to make a website about it. Is this 
code patent-protected btw?


Re: Beta D 2.068.1-b2

2015-09-04 Thread Steven Schveighoffer via Digitalmars-d-announce

On 9/4/15 8:14 AM, Steven Schveighoffer wrote:


Why did this compile/pass tests then? I wasn't aware of this restriction.

https://github.com/D-Programming-Language/phobos/pull/3572


OK, I dug into it further.

It seems that under some level of detection of whether a function that 
could be called on the base is really called on the derived, then the 
derived function is not allowed to mask the base function.


HOWEVER, if the call would result in an error instead, then the override 
is totally fine, and calling the function on a base reference actually 
calls the masked function. This seems incorrect, when you mask a 
function, I would consider that to be hidden also.


So technically, the error is that the toString masking could be called 
in the same way the base could be called (given the default parameter).


This sure seems arbitrary to me. I remember the whole thing about 
function hijacking, but this hidden function "feature" doesn't make a 
lot of sense. In one case, you can hide it, but still access it from the 
base, in another, the compiler was rewriting the vtable to not allow you 
to access it from the base, on what seems to be an arbitrary concern. 
And that now is a compiler error.


I wonder how this will affect multiple alias this, since you could 
potentially have a type that converts to two disjoint types, but 
wouldn't be known to the compiler if a base and derived class accepted 
the disjoint types.


-Steve


Re: D-Day for DMD is today!

2015-09-04 Thread Daniel Murphy via Digitalmars-d-announce

On 1/09/2015 11:57 PM, Rory McGuire via Digitalmars-d-announce wrote:

Surely this is a code coverage issue then?
Are there any unit tests  in ddmd?


There is an enormous test suite, but there are also plenty of parts with 
zero coverage.


Re: D-Day for DMD is today!

2015-09-04 Thread Daniel Murphy via Digitalmars-d-announce

On 2/09/2015 11:23 PM, Rory McGuire via Digitalmars-d-announce wrote:

Surely if the dog food is so bad no one should be eating?


It's not that phobos is bad, it's that we're following the same 
development pattern we had with C++.  We're using a conservative subset 
of D features and libraries, and slowly expanding what's acceptable. 
For example, DMD now uses foreach and delegates in a few places, and I 
expect we'll see a lot of use of D strings in the near future.


Re: Beta D 2.068.1-b2

2015-09-04 Thread Steven Schveighoffer via Digitalmars-d-announce

On 9/4/15 8:20 AM, Steven Schveighoffer wrote:

On 9/1/15 3:13 PM, Jacob Carlborg wrote:

On 2015-09-01 15:40, Steven Schveighoffer wrote:


I'm not 100% sure, but that does seem like a bug.


I see now that there's a deprecation message when compiling with
2.067.0. So it looks like it's intended.



Really? I don't see any deprecation message for your exact code posted
when compiled on 2.067.


I take it back, the message occurs if you make the function concrete.

-Steve



Re: Beta D 2.068.1-b2

2015-09-04 Thread Steven Schveighoffer via Digitalmars-d-announce

On 9/1/15 3:13 PM, Jacob Carlborg wrote:

On 2015-09-01 15:40, Steven Schveighoffer wrote:


I'm not 100% sure, but that does seem like a bug.


I see now that there's a deprecation message when compiling with
2.067.0. So it looks like it's intended.



Really? I don't see any deprecation message for your exact code posted 
when compiled on 2.067.


-Steve


Re: Beta D 2.068.1-b2

2015-09-04 Thread Steven Schveighoffer via Digitalmars-d-announce

On 9/4/15 8:04 AM, Martin Nowak wrote:

On Tuesday, 1 September 2015 at 06:33:30 UTC, Jacob Carlborg wrote:

I suspect this is intended?


The problem is that you're hiding a method that is still reachable
through the vtable.
Rather than throwing a runtime error this was changed to a compiler error.

https://github.com/D-Programming-Language/dmd/pull/4606

You should not turn off deprecations btw ;).

The simple solution in you case is to override the inherited `string
toString()` with an implementation that forwards to your `toString()`.

class UniText
{
 override string toString() { return toString(null).idup; }
 abstract const char[] toString (char[]  dst = null);
 abstract const wchar[] toString16 (wchar[] dst = null);
 abstract const dchar[] toString32 (dchar[] dst = null);
}

Also see at
https://github.com/D-Programming-Language/druntime/blob/4e799b75ebcb6d00ccefbcfd763a1f5d158357a1/src/object.d#L1598
for an example of an alternative overridable toString method.
Maybe you should use the delegate based toString as well, it's already
supported by a some phobos formatting.


Why did this compile/pass tests then? I wasn't aware of this restriction.

https://github.com/D-Programming-Language/phobos/pull/3572

-Steve


Re: Beta D 2.068.1-b2

2015-09-04 Thread Martin Nowak via Digitalmars-d-announce
On Tuesday, 1 September 2015 at 06:33:30 UTC, Jacob Carlborg 
wrote:

I suspect this is intended?


The problem is that you're hiding a method that is still 
reachable through the vtable.
Rather than throwing a runtime error this was changed to a 
compiler error.


https://github.com/D-Programming-Language/dmd/pull/4606

You should not turn off deprecations btw ;).

The simple solution in you case is to override the inherited 
`string toString()` with an implementation that forwards to your 
`toString()`.


class UniText
{
override string toString() { return toString(null).idup; }
abstract const char[] toString (char[]  dst = null);
abstract const wchar[] toString16 (wchar[] dst = null);
abstract const dchar[] toString32 (dchar[] dst = null);
}

Also see at 
https://github.com/D-Programming-Language/druntime/blob/4e799b75ebcb6d00ccefbcfd763a1f5d158357a1/src/object.d#L1598 for an example of an alternative overridable toString method.
Maybe you should use the delegate based toString as well, it's 
already supported by a some phobos formatting.


Re: Beta D 2.068.1-b2

2015-09-04 Thread BBasile via Digitalmars-d-announce

On Friday, 4 September 2015 at 11:44:44 UTC, BBasile wrote:
On Wednesday, 2 September 2015 at 18:20:49 UTC, Jacob Carlborg 
wrote:

[...]


apart from a compiler warning 
(https://msdn.microsoft.com/en-us/library/ms173153.aspx=


correct link:

https://msdn.microsoft.com/en-us/library/ms173153.aspx


Re: Beta D 2.068.1-b2

2015-09-04 Thread BBasile via Digitalmars-d-announce
On Wednesday, 2 September 2015 at 18:20:49 UTC, Jacob Carlborg 
wrote:

On 2015-09-02 17:51, Meta wrote:


Isn't that what `override` is for?


No. Think of it like you want to have a new method with the 
same name as a method in the base class. It's for hiding a 
method in the base class, not overriding it. See the C# 
documentation [1].


[1] https://msdn.microsoft.com/en-us/library/435f1dw2.aspx


What's so different with C# 'new' that not to call 'super' in a D 
overriden method ? (even if C# has itself 'base' instead of 
'super')


C#
---
public class BaseC
{
public int x;
public void Invoke() { }
}
public class DerivedC : BaseC
{
new public void Invoke() { }
}
---

D
---
class BaseC
{
int x;
void Invoke() { }
}
class DerivedC : BaseC
{
override void Invoke() { /*super.Invoke() not called*/ }
}
---

apart from a compiler warning 
(https://msdn.microsoft.com/en-us/library/ms173153.aspx=


Re: 1st Ever Artificial Consciousness to be Written in D Language

2015-09-04 Thread Chris via Digitalmars-d-announce
On Friday, 4 September 2015 at 10:43:32 UTC, Ola Fosheim Grøstad 
wrote:

On Friday, 4 September 2015 at 10:11:18 UTC, Chris wrote:
Maybe he'll come up with something that is more intelligent 
than your average tabloid reader :)))


You should file a business-patent! That would be goldmine.


Not really. A tabloid reader can be modeled like this:

immutable TabloidReader tr =
[
  hate:fear,
  fear:hate
];

immutable Opinion ifYouAskMe(gibberish statement) @safe
{
  in
  {
assert(statement == bullsh*t);
  }
  out(result)
  {
assert(result == AbsoluteBullsh*t);
  }
  body
  {
return "I'm not racist, but " ~ statement;
  }
}

So you just need something that is a bit more sophisticated ;)


Re: 1st Ever Artificial Consciousness to be Written in D Language

2015-09-04 Thread via Digitalmars-d-announce

On Friday, 4 September 2015 at 10:28:07 UTC, Guy Gervais wrote:
It's about time TempleOS got a bit of competition. The 
"consciously self-aware, morally judging OBI" VS. "the OS that 
talks with God". One of them might even cry (using the Emotions 
0.91d module and the optional lawn sprinkler attachment).


Beware! The Holy Limit for TempleOS is 100.000 lines of code. I'm 
not exactly sure what happens when that limit is crossed, but 
I've heard that DMD is close.




Re: 1st Ever Artificial Consciousness to be Written in D Language

2015-09-04 Thread via Digitalmars-d-announce

On Friday, 4 September 2015 at 10:11:18 UTC, Chris wrote:
Maybe he'll come up with something that is more intelligent 
than your average tabloid reader :)))


You should file a business-patent! That would be goldmine.


Re: 1st Ever Artificial Consciousness to be Written in D Language

2015-09-04 Thread Guy Gervais via Digitalmars-d-announce

On Wednesday, 2 September 2015 at 14:41:20 UTC, GrandAxe wrote:
This is to inform the D Language community that the first 
viable general artificial algorithm is being written in D. It 
is called Organic Big data intelligence (OBI); the website is 
at www.okeuvo.com.


Some of its capabilities are:

1. Ability to learn
2. Ability to analyse
3. Problem solving
4. Moral judgement
5. Ability to feel emotions
6. Free will
7. Consciousness
8. Self awareness

D Language was chosen for its versatility. It is a language 
with high level syntax and low capabilities, as well as 
excellent performance and being open source.


Unnetworked personal mobile devices are the target platform for 
the standard implementation of OBI. A demonstration release is 
scheduled for the end of this month (September 2015). The 
demonstration release will comprehend English prose only, later 
releases will be able to process input from other languages, as 
well as sensory input.

OBI will be a mixture of open and closed source modules.

To God be the Glory.

Asame Obiomah


It's about time TempleOS got a bit of competition. The 
"consciously self-aware, morally judging OBI" VS. "the OS that 
talks with God". One of them might even cry (using the Emotions 
0.91d module and the optional lawn sprinkler attachment).





Re: 1st Ever Artificial Consciousness to be Written in D Language

2015-09-04 Thread Chris via Digitalmars-d-announce
On Friday, 4 September 2015 at 09:15:16 UTC, Ola Fosheim Grøstad 
wrote:
On Thursday, 3 September 2015 at 15:20:27 UTC, Nick Sabalausky 
wrote:
based on one hell of a gigantic assumption: That consciousness 
is a natural consequence of a sufficiently large neural net. 
It's a fine and interesting idea, but PURELY speculative, with 
zero evidence and not even any way of testing for evidence 
since, like you say, we can't even figure out the first thing 
about consciousness as it relates to ourselves and each other, 
let alone to machines.


Given a large enough table one could encode perceived human 
behaviour with a lookup-table... So all we need is a computer 
program that itself claims to possess consciousness. Would that 
be a scam? Maybe Asame Obiomah is a computer program claiming 
to be a man writing a computer program. Would that make it 
intelligent? Hm.


Maybe he'll come up with something that is more intelligent than 
your average tabloid reader :)))


Re: 1st Ever Artificial Consciousness to be Written in D Language

2015-09-04 Thread via Digitalmars-d-announce
On Thursday, 3 September 2015 at 15:20:27 UTC, Nick Sabalausky 
wrote:
based on one hell of a gigantic assumption: That consciousness 
is a natural consequence of a sufficiently large neural net. 
It's a fine and interesting idea, but PURELY speculative, with 
zero evidence and not even any way of testing for evidence 
since, like you say, we can't even figure out the first thing 
about consciousness as it relates to ourselves and each other, 
let alone to machines.


Given a large enough table one could encode perceived human 
behaviour with a lookup-table... So all we need is a computer 
program that itself claims to possess consciousness. Would that 
be a scam? Maybe Asame Obiomah is a computer program claiming to 
be a man writing a computer program. Would that make it 
intelligent? Hm.