Discussion:
Tasks
Matheus Salvia
2012-02-27 20:21:14 UTC
Permalink
Hello,

So, recently I've finished lots of stuff i had to do (nothing related
to Cosmos), and I know have a pretty good amount of free time to work
on onther stuff, such as Cosmos.
The thing is: I've never really done much here, I remember I had
implemented a System.Math plug, but never commited it, and a
Dictionary<,> but also never commited it.
I'm just looking for something to do, maybe related to compilers
(maybe MOSA people want help?), I have reasonable experience with
those.
So, where do you need help, and what can I do to help? :)

Regards,
Matheus Salvia
Phil Garcia
2012-02-27 22:17:02 UTC
Permalink
Post by Matheus Salvia
Hello,
So, recently I've finished lots of stuff i had to do (nothing related
to Cosmos), and I know have a pretty good amount of free time to work
on onther stuff, such as Cosmos.
The thing is: I've never really done much here, I remember I had
implemented a System.Math plug, but never commited it, and a
Dictionary<,> but also never commited it.
I'm just looking for something to do, maybe related to compilers
(maybe MOSA people want help?), I have reasonable experience with
those.
So, where do you need help, and what can I do to help? :)
Generic collections like List<T> and Dictionary<T,S> are very difficult to
support for both MOSA and COSMOS projects as those collections classes
require extensive working support for interface, delegate, nested types,
and generics! Neither of which the MOSA or COSMOS project can do right now.
MOSA is pretty close. So in the mean time, MOSA uses a custom LinkedList<T>
class until the standard generic collections are compilable and working.
The class provides the basic List<T> functionality and compiles with the
MOSA compiler (probably not with COSMOS).
Adam Shumann
2012-02-27 22:36:16 UTC
Permalink
I would be happy with 'fixed' non-generic classes that I could copy and
modify for specific types.
The only thing keeping me from doing that right now is I have no idea how
to make a resizable collection.

Adam
Post by Phil Garcia
**
Post by Matheus Salvia
Hello,
So, recently I've finished lots of stuff i had to do (nothing related
to Cosmos), and I know have a pretty good amount of free time to work
on onther stuff, such as Cosmos.
The thing is: I've never really done much here, I remember I had
implemented a System.Math plug, but never commited it, and a
Dictionary<,> but also never commited it.
I'm just looking for something to do, maybe related to compilers
(maybe MOSA people want help?), I have reasonable experience with
those.
So, where do you need help, and what can I do to help? :)
Generic collections like List<T> and Dictionary<T,S> are very difficult to
support for both MOSA and COSMOS projects as those collections classes
require extensive working support for interface, delegate, nested types,
and generics! Neither of which the MOSA or COSMOS project can do right now.
MOSA is pretty close. So in the mean time, MOSA uses a custom LinkedList<T>
class until the standard generic collections are compilable and working.
The class provides the basic List<T> functionality and compiles with the
MOSA compiler (probably not with COSMOS).
Chad Z. Hower aka Kudzu
2012-02-27 22:55:40 UTC
Permalink
Post by Matheus Salvia
So, recently I've finished lots of stuff i had to do (nothing related
to Cosmos), and I know have a pretty good amount of free time to work
on onther stuff, such as Cosmos.
The thing is: I've never really done much here, I remember I had
implemented a System.Math plug, but never commited it, and a
Dictionary<,> but also never commited it.
I'm just looking for something to do, maybe related to compilers
(maybe MOSA people want help?), I have reasonable experience with
those.
So, where do you need help, and what can I do to help? :)
Debugger? :)

Also look at the html file in the Breakpointsos project.. that one is
far more current for todo items.
Matheus Salvia
2012-02-28 02:14:37 UTC
Permalink
Chad: Sure, I will take a look as soon as I download everything again (I'm
pretty sure what I have is massively outdated)

Adam and Phil:
I'll work in a List<> implementation that does not use unsupported
features, and change my Dictionary<> to use it.
Adam Shumann
2012-02-28 03:05:32 UTC
Permalink
Ok, thanks :)
Post by Matheus Salvia
**
Chad: Sure, I will take a look as soon as I download everything again (I'm
pretty sure what I have is massively outdated)
I'll work in a List<> implementation that does not use unsupported
features, and change my Dictionary<> to use it.
Phil Garcia
2012-02-28 03:51:59 UTC
Permalink
Mat -

Here's some code for a simple LinkedList<T>:

http://www.mosa-project.org/projects/mosa/repository/revisions/master/entry/Source/Mosa.ClassLib/LinkedList.cs
Post by Matheus Salvia
Chad: Sure, I will take a look as soon as I download everything again (I'm
pretty sure what I have is massively outdated)
I'll work in a List<> implementation that does not use unsupported
features, and change my Dictionary<> to use it.
Matthijs ter Woord
2012-02-28 08:31:33 UTC
Permalink
Keep in mind that Generics are fully supported on Cosmos. It's the
interfaces that's causing issues..
Post by Phil Garcia
Mat -
http://www.mosa-project.org/projects/mosa/repository/revisions/master/entry/Source/Mosa.ClassLib/LinkedList.cs
Post by Matheus Salvia
Chad: Sure, I will take a look as soon as I download everything again
(I'm pretty sure what I have is massively outdated)
I'll work in a List<> implementation that does not use unsupported
features, and change my Dictionary<> to use it.
Matheus Salvia
2012-02-28 18:20:52 UTC
Permalink
Matthijs: How's that? You mean the only thing keeping generics from working
is the lack of interfaces? Or you mean we already have a working Generics
implementation?
Chad Hower aka Kudzu
2012-02-28 18:26:20 UTC
Permalink
Post by Matheus Salvia
Matthijs: How's that? You mean the only thing keeping generics from
working is the lack of interfaces? Or you mean we already have a working
Generics implementation?
Generics work. Interfaces dont.
Matheus Salvia
2012-02-28 19:02:12 UTC
Permalink
Adam and Phil: so what do you need me to do? Chad said generics are working.
Adam Shumann
2012-02-28 19:39:33 UTC
Permalink
Well, unless I'm missing something, .IndexOf(Value) isnt implemented at all
in List<> and Dictionary<>, which means that .Contains(Value) doesnt work
either. And I dont think .Remove(Value/Key) works without IndexOf either.
Seems like several functions all use it...
Post by Matheus Salvia
**
Adam and Phil: so what do you need me to do? Chad said generics are working.
Matheus Salvia
2012-02-28 20:09:25 UTC
Permalink
Hmm, I could implement those missing functions. Does anyone knows where the
generics plugs are?
Matthijs ter Woord
2012-02-28 20:54:25 UTC
Permalink
generics is not a plug question. the IndexOf (etc) things use (iirc)
object.equals or hashing, which somewhere down below in the inner core of
.net uses reflection or floats which we don't support (reflection) or
doesn't work fully.

other possibility (not on my dev pc now) is that IndexOf/Contains are linq
extension methods, which are relying on interfaces.

regarding generics: to the compiler IList<int> is just an interface like
IList is....
Post by Matheus Salvia
Hmm, I could implement those missing functions. Does anyone knows where
the generics plugs are?
Orvid King
2012-02-28 21:00:46 UTC
Permalink
Object.Equals can be implemented by simple comparing the pointers, and
Object.GetHashCode can be implemented by getting the hash-code of the
pointer itself. Also, .IndexOf, and .Contains aren't extension methods, so
they're most likely implemented in a base class somewhere.

On Tue, 28 Feb 2012 14:54:25 -0600, Matthijs ter Woord
Post by Matthijs ter Woord
generics is not a plug question. the IndexOf (etc) things use (iirc)
object.equals or hashing, which somewhere down below in the inner core of
.net uses reflection or floats which we don't support (reflection) or
doesn't work fully.
other possibility (not on my dev pc now) is that IndexOf/Contains are linq
extension methods, which are relying on interfaces.
regarding generics: to the compiler IList<int> is just an interface like
IList is....
On Tue, Feb 28, 2012 at 9:09 PM, Matheus Salvia
Post by Matheus Salvia
Hmm, I could implement those missing functions. Does anyone knows where
the generics plugs are?
------------------------------------

--------------------------------------------------
More things to join for Cosmos!

1) Cosmos chat room:
http://tinyurl.com/pc7bds

2) Please add yourself to the map:
http://tinyurl.com/qhttde

3) Help publicity and join our Facebook page:
http://tinyurl.com/plrloa

--------------------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Cosmos-Dev/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/Cosmos-Dev/join
(Yahoo! ID required)

<*> To change settings via email:
Cosmos-Dev-digest-***@public.gmane.org
Cosmos-Dev-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
Cosmos-Dev-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Adam Shumann
2012-02-28 21:05:46 UTC
Permalink
Object.Equals isn;'t implemented at the moment. When porting the color
class, I had to use its ToARGB() function to compare them as just trying to
compare the two classes threw Plug needed exceptions
Post by Orvid King
Object.Equals can be implemented by simple comparing the pointers, and
Object.GetHashCode can be implemented by getting the hash-code of the
pointer itself. Also, .IndexOf, and .Contains aren't extension methods, so
they're most likely implemented in a base class somewhere.
On Tue, 28 Feb 2012 14:54:25 -0600, Matthijs ter Woord
Post by Matthijs ter Woord
generics is not a plug question. the IndexOf (etc) things use (iirc)
object.equals or hashing, which somewhere down below in the inner core of
.net uses reflection or floats which we don't support (reflection) or
doesn't work fully.
other possibility (not on my dev pc now) is that IndexOf/Contains are linq
extension methods, which are relying on interfaces.
regarding generics: to the compiler IList<int> is just an interface like
IList is....
On Tue, Feb 28, 2012 at 9:09 PM, Matheus Salvia
Post by Matheus Salvia
Hmm, I could implement those missing functions. Does anyone knows where
the generics plugs are?
------------------------------------
--------------------------------------------------
More things to join for Cosmos!
http://tinyurl.com/pc7bds
http://tinyurl.com/qhttde
http://tinyurl.com/plrloa
--------------------------------------------------
Yahoo! Groups Links
Matheus Salvia
2012-02-28 21:09:14 UTC
Permalink
So the best is to write a simple Generics plug, at least by the moment.
When the compiler supports interfaces/reflection we just move on to the
mscorlib's generics.
Matthijs ter Woord
2012-02-28 21:27:35 UTC
Permalink
it's not 1 plug to make it all work: it's case by case..

Object.Equals is NOT just comparing pointers: it's content equality.
.ReferenceEquals is pointer comparison.
Post by Matheus Salvia
So the best is to write a simple Generics plug, at least by the moment.
When the compiler supports interfaces/reflection we just move on to the
mscorlib's generics.
Trivalik Trivalik
2012-02-28 21:31:41 UTC
Permalink
This is only for ValueTypes true.
Post by Matthijs ter Woord
it's not 1 plug to make it all work: it's case by case..
Object.Equals is NOT just comparing pointers: it's content equality.
.ReferenceEquals is pointer comparison.
Post by Matheus Salvia
So the best is to write a simple Generics plug, at least by the moment.
When the compiler supports interfaces/reflection we just move on to the
mscorlib's generics.
Trivalik Trivalik
2012-02-28 21:48:55 UTC
Permalink
This is only for ValueTypes true.

The thing is in Color, it is a ValueType which does not use the Equal in object. Our Compiler do emit the object.equals because it is virtual. In Color it is never used since the override does not use the base.
Post by Matthijs ter Woord
it's not 1 plug to make it all work: it's case by case..
Object.Equals is NOT just comparing pointers: it's content equality.
.ReferenceEquals is pointer comparison.
Post by Matheus Salvia
So the best is to write a simple Generics plug, at least by the moment.
When the compiler supports interfaces/reflection we just move on to the
mscorlib's generics.
Matheus Salvia
2012-02-29 02:07:27 UTC
Permalink
I dont think I'll need pointers for a basic full .NET compliant List<>, it
maybe ineficient without pointers, but it will be a nice implementation
until we have interfaces and reflection.

Trivalik Trivalik
2012-02-28 21:26:42 UTC
Permalink
This equal testing is only possible with assembler instructions (because from object we could not get a pointer in C#, except with inefficient GCHandle, which is also needed to plug in assembler)
If this is ok. :-)
Post by Orvid King
Object.Equals can be implemented by simple comparing the pointers, and
Object.GetHashCode can be implemented by getting the hash-code of the
pointer itself. Also, .IndexOf, and .Contains aren't extension methods, so
they're most likely implemented in a base class somewhere.
On Tue, 28 Feb 2012 14:54:25 -0600, Matthijs ter Woord
Post by Matthijs ter Woord
generics is not a plug question. the IndexOf (etc) things use (iirc)
object.equals or hashing, which somewhere down below in the inner core of
.net uses reflection or floats which we don't support (reflection) or
doesn't work fully.
other possibility (not on my dev pc now) is that IndexOf/Contains are linq
extension methods, which are relying on interfaces.
regarding generics: to the compiler IList<int> is just an interface like
IList is....
On Tue, Feb 28, 2012 at 9:09 PM, Matheus Salvia
Post by Matheus Salvia
Hmm, I could implement those missing functions. Does anyone knows where
the generics plugs are?
Loading...