[Mono-list] Monkeyguide errata

2003-02-10 Thread David
Section 4.2 - Windows installation
Building Mono under Windows

Step 2.  Web IS required for wget.
Step 7.  ACLOCAL_FLAGS should be "-I /usr/share/aclocal"

The build still fails with duplicated macro errors...

Dave
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list



RE: [Mono-list] Mono windows genmdesc crash

2004-08-04 Thread david
Me, too. I'm stuck at the same point.

I wanted to try to add reference counting so that
finalizers can be called deterministically. This
wouldn't work for cycles. The GC would still have to
call finalizers in that case. Also, the GC would still
be responsible for managing memory. I'd just like to
know that, in the absence of cycles, my finalizers will
be called as soon as the last reference is released.

I'd still like to try to do that research (especially
the performance impacts). I'd rather not have to build
a linux box just to build mono. If you get an answer,
please post it. I would also appreciate getting an
answer, too.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Monodevelop 0.7-1pre2 and mono1.1.8.1-0pre1 in debian sid

2005-06-25 Thread david
Hi,
I have an error in begin to Monodevelop

# monodevelop

(MonoDevelop:9788): GnomeUI-WARNING **: While connecting to session
manager:
Authentication Rejected, reason : None of the authentication protocols
specified are supported and host-based authentication failed.
2005-06-26 00:52:17,913 [-1210297696] INFO
MonoDevelop.Services.ILoggingService [(null)] -
Reading 
/root/.config/MonoDevelop/CodeCompletionData/mscorlib_1.0.5000.0_b77a5c561934e089.pidb
2005-06-26 00:52:18,089 [-1210297696] INFO
MonoDevelop.Services.ILoggingService [(null)] - WARNING Could not find
stock Icons.16x16.FindPrevIcon
2005-06-26 00:52:18,151 [-1210297696] INFO
MonoDevelop.Services.ILoggingService [(null)] - WARNING Could not find
stock gtk-stop
2005-06-26 00:52:18,220 [-1210297696] INFO
MonoDevelop.Services.ILoggingService [(null)] - Creating
DefaultWorkbench
Socket already in use

Here is beginin.
An shut application.

Unhandled Exception: System.ObjectDisposedException: The object was used
after being disposed.
in <0x00054> System.Threading.WaitHandle:CheckDisposed ()
in (wrapper remoting-invoke-with-check)
System.Threading.WaitHandle:CheckDisposed ()
in <0x00010> System.Threading.ManualResetEvent:Reset ()
in (wrapper remoting-invoke-with-check)
System.Threading.ManualResetEvent:Reset ()
in <0x0007a> System.Threading.Timer+Runner:Start ()
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void ()

I don't understand, I have not editor and gtksouceview.

Excuse, with my english is very bad.


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Alternate Mailing List Archive

2003-01-25 Thread David Jeske
Hello. A few months back I posted about an alternate Mono mailing list
archive available at:

  http://archive.neotonic.com/archive/mono-list

We quickly incorporated some feedback we received and fixed a few bugs
which cropped up. There is always more we can do, but the archive has
been very useful for me over the last few months. The archive has a
full-text index of all the messages, and it properly handles rendering
MIME and html messages. If you've not already seen it, take a look and
let me know what you think.

FYI: I normally set the preferences to Iframes, uncheck the multiple
messages in frame, and use the bymonth total numbers to bring up the
recent posts for this month.

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [EMAIL PROTECTED]
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list



[Mono-list] Mono

2003-02-16 Thread David Timmins
Hello Miguel,

My name is David. I am a longtime fan of Linux, and have finally assembled a 
dedicated Linux box at home. Learning this OS has been interesting at the 
very least, yet very satisfying.

I am also a beginning programmer. I'm not trying to knock MS, because I 
think that they do release some great ideas and products. But the licensing 
issues! They can be difficult.

I'll be taking VB.Net in the fall. My college has nothing but MS boxes, 
which is fine for them, but I want to be able to work on my Linux box at 
home.

I was looking at go-mono.com. What software do I need to do this? Where do I 
get it? Did I miss something on the site? It looked more like a collection 
of reports than anything else.

Any help is appreciated.

Thank you,

David Timmins

_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] lies and microbenmarks (Was: Mono 0.23 windows installer)

2003-03-09 Thread David Jeske
On Sat, Mar 08, 2003 at 07:28:08PM -0500, Duncan Mak wrote:
> I'm going on go have dinner now, but I just uploaded Johannes' new
> windows installer for Mono 0.23, it's available here:
> 
> http://primates.ximian.com/~duncan/mono-0.23-win32-1.exe

Wow, that was easy to install. Mono has come a long way.

I know that if there are two things in the world not to trust, they
are lies and microbenmarks. However, here are some mono vs. MS
microbenmarks for the Windows installer above.

Summary Observations:
  - mint failed to run the test
  - CSC speeds up MS more than Mono (somewhat expected)
  - mono is slower than MS
  - while many of the mono slowdowns seem related to JIT
optimizations (which the new JIT will change and improve),
the 2x slowdown in index_string_test points to a string,
hashing, memory allocation, or other hashtable inefficiency
  - the mono 40% slowdown in object_test is interesting, both
because the performance of method calls is very important,
and because the CSC output makes the slowdown even worse
by making MS faster and Mono slower.

* Compiled with MCS:

  (times are in seconds, lower is better)

testiterations   Win-MS   Win-Mono   Mono-speedup
-
loop_test   50   0.03  0.02   33%
index_test 100   1.292 1.993  -   54%
index_string_test  100   0.341 1.081  -  217%
nested_int_test 23   0.01  0.02   -   50%
nested_test 23   0.02  0.331  - 1555%
return_test500   0 0.01  n/a
object_test500   0.05  0.07   -   40%


* Compiled with CSC:

  (times are in seconds, lower is better)
  (percentages are speedup of CSC output over MCS output)

testiterations  Win-MS  Win-Mono 
--
loop_test   50   0.02  (+33%)   0.02(  0%)
index_test 100   1.172 (+ 9%)   2.003   (- 0.5%)
index_string_test  100   0.33  (+ 3%)   1.091   (- 1%)
nested_int_test 23   0.01  (  0%)   0.02(  0%)
nested_test 23   0.01  (+50%)   0.12(+63%)
return_test500   0.01   n/a 0.01(  0%)
object_test500   0.03  (+40%)   0.081   (-15%)

* Details

  Machine: Win2k, P4-1.8M, 768M (thinkpad A31)
  Win-MS: Microsoft .NET Framework v1.0.3705
  Win-Mono: mono-0.23 from duncan's installer
  Microbenchmark SW: http://mozart.chat.net/~jeske/Projects/ScriptPerf/
 (C# version attached)

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [EMAIL PROTECTED]
// Allow easy reference to classes in the System namespace
using System;
using System.Collections;


// This is the test class

class testObject {
  public virtual int dothis(int iter) {
return iter;
  }
}

// This "class" exists only to house the application's entry-point function
class MainApp {

public delegate void test_function(int INDEX);

// loop_test

public static void loop_test(int INDEX) {
  for(int x=0;x

[Mono-list] mono under Debian : unresolved type ...

2003-03-10 Thread David Marsal
Hello !

I try to compile the following hello.cs with mcs :

using System;
public class HelloWorld {
  static void Main() {
Console.WriteLine("Hello World!");
  }
}


but when I launch mcs I get :

unresolved type: [mscorlib]System.Reflection.MemberFilter
unresolved type:
[mscorlib]System.Diagnostics.SymbolStore.ISymbolDocumentWriter
unresolved type:
[mscorlib]System.Diagnostics.SymbolStore.SymLanguageType
unresolved type:
[mscorlib]System.Diagnostics.SymbolStore.SymLanguageVendor
unresolved type:
[mscorlib]System.Diagnostics.SymbolStore.SymDocumentType
unresolved type: [mscorlib]System.Diagnostics.SymbolStore.ISymbolWriter
/usr/bin/mcs: unresolved external references

The computer is running debian unstable with a sources.list :

deb http://www.debianplanet.org/mono unstable main
deb-src http://www.debianplanet.org/mono unstable main

As a newbie, I can't understand a single word. What I missed ?

thanks a lot for your help 


___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] lies and microbenmarks (Was: Mono 0.23 windows installer)

2003-03-13 Thread David Jeske
On Wed, Mar 12, 2003 at 08:24:46AM -0800, Brian Deacon wrote:
> I ducked my head in fear when I saw this thread start up... but
> apparently this is not a verbotten subject.  What is the distinction
> between this discussion and the benchmarking that is apparently
> forbidden in the license from MS and explicitly discouraged by Miguel on
> go-mono?

I'll let you know if any lawyers contact me. For now I'll bank that
they are unlikely to want me to unpublish results which say that the
MS .NET Runtime is between 50% and 1500% faster than another runtime.

There are many more C# benchmarks here:

 http://dada.perl.it/shootout/

I can see how the anti-benchmarking clause was important to the MS
lawyers, because if an article was published showing a brand new .NET
runtime slower than the 5 year old JVM technology, readers would not
respect the newness of .NET. In reality, the legal people should have
talked to the technical people and realized that nearly all MS.NET
vs. Java benchmarks ALREADY come out with .NET on top and required
that every user publish at least one benchmark figure. :)

I can't wait for Generic IL.

(Although I've seen a few threading benchmarks where the JVM is
faster)

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [EMAIL PROTECTED]
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] lies and microbenmarks (Was: Mono 0.23 windows installer)

2003-03-28 Thread David Jeske
On Fri, Mar 14, 2003 at 12:55:18PM +1100, Fergus Henderson wrote:
> On 13-Mar-2003, David Jeske <[EMAIL PROTECTED]> wrote:
> > I can see how the anti-benchmarking clause was important to the MS
> > lawyers, because if an article was published showing a brand new .NET
> > runtime slower than the 5 year old JVM technology, readers would not
> > respect the newness of .NET. In reality, the legal people should have
> > talked to the technical people and realized that nearly all MS.NET
> > vs. Java benchmarks ALREADY come out with .NET on top
> 
> All the benchmarks you've seen, you mean?

I mean the few benchmarks I've written and plenty of the benchmarks in
The Win32 version of Doug's Language Shootout.

My paragraph was tongue-and-cheek. I'm joking about how MS should have
required people to publish benchmark numbers because they actually did
a good job. Laugh Laugh. Ha Ha. I'm expecting a cease and desist in
the mail any day now.

> Don't you think it is possible that the benchmark results that
> you have seen are skewed, because of the .NET license condition?

Anything is possible, but no, I don't think that is the case. Check
out the tests, the source is available. My micro-benchmarks agreed
with the kind of skew seen here:

  http://dada.perl.it/shootout/

Java was faster at 3 of the tests, csharp was faster at the other 18.

> Also, Java is not the only competition.  In performance comparisons with
> native code, .NET is going to come off worse.  The question is how much
> worse.  Furthermore, the answer may be different for different
> programming styles or different programming languages.

This is a good point, and in the shootout above, you can certainly see
C# getting waxed by C/C++ and ML to name a few. I'm anxious to see how
much C# can close that gap with CIL v2.0 and Generics. They/we should
be able to get close to C++, and when that happens, I'll be thrilled.

My original post served two purposes: (a) to show that 1-2 year old C#
implementations are doing well relative to much older Java
implementations already. (b) Highlight the areas where Mono's
performance was orders of magnitude worse than MS so someone would
have the chance to recognize a design flaw or implemenation limitation
early enough should there be one.

My goal wasn't to poke fights about performance. I really could care
less. Today I spend most of my time programming in Python which is
certainly no speed daemon.

> One of .NET's big selling points is that it supports multiple
> programming languages.  However, if you get a 1000-times slow down
> for non-C#-like languages, that claim is a bit of a sham, isn't it?
> It's all very well to say that you can use other languages, but if
> the performance of .NET for those other languages is prohibitively
> bad, people will prefer to compile those other languages to native
> code.

I'm not sure how this multi-language discussion got in here, but I'm
happy to respond:

IMO, the multi-language thing itself is mostly hype. JVM still
supports more languages than .NET. Neither of them support "different"
languages very well.

However, from what I've seen, MSIL simply has better performance
characteristics. Today it is because of things like structs and
references (i.e. safe pointers). Tommorow it will be because of CIL
support for Generics. Which means those "workarounds" for non-C#/Java
languages will probably run faster. Here are some references:

  http://www.dcs.ed.ac.uk/home/stg/MRG/comparison/slides.pdf
  http://www.citi.qut.edu.au/research/plas/projects/cp_files/virtual_machines.pdf

That first paper talks about an approach where they extended their VM
to read JVM bytecodes instead of trying to force ML/SML into
JVM/CIL. In some ways this seems more sensible and just as useful.

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [EMAIL PROTECTED]
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] C#/.NET Generics update and summary

2003-03-28 Thread David Jeske
Since I'm very interested in C# Generics, in particular it's ability
to improving typing and help close the performance gap with C/C++, I
figured I'd post a summary of recent Generics information for anyone
who is interested:

1) What is C# Generics?

  Generics for C# and .NET is a set of changes to CIL and C# which
  implement parametric types. Conceptually C# Generics fill roughly
  similar needs as C++ templates or Generic Java (GJC). Currently the
  performance of collections in .NET (or JVM) is similar to that of
  Python, Perl, or Smalltalk because collections involve runtime
  dynamic type casting. Generics for .NET support runtime
  specialization into static code, eliminating the extra typechecks,
  and bringing the performance of collections closer to that of C/C++.

   http://research.microsoft.com/projects/clrgen/generics.pdf

2) What implementation work has taken place with C# Generics?
   
   Microsoft Research has released an implementation known as Gyro in
   the form of patches to be applied to the Microsoft Shared Source
   CLI.

http://research.microsoft.com/projects/clrgen/

   Some preliminary work has been done in Portable.NET to support
   Generic C#/CIL. (it dosn't work yet)

http://dotgnu.org/pipermail/developers/2003-February/009918.html

   Microsoft has submitted preliminary documents to the ECMA which
   have not yet been released.

3) When will Microsoft release Generics?

   Microsoft announced at OOPSLA 2002 their intent to provide several
   new C# language features including Generics, anonymous methods,
   iterators, and partial types. This provided much confusion as some
   thought that this meant the .NET v1.1 or VS.NET 2003 releases would
   contain Generics. This is not the case.

http://www.gotdotnet.com/team/csharp/conferences/OOPSLA%202002%20CSharp.ppt
http://www.microsoft.com/presspass/press/2002/Nov02/11-08OOPSLAPR.asp

   Generics is slated for .NET v2.0, known as "Whidbey", with the
   VS.NET for "Yukon". The word is late 2003 or early 2004.

4) When will C# Generics be standardized?

   There are no official dates, however, in an interview last week
   (March 21,2003) Anders confirmed that this work is already
   underway:

  "In fact, we have already submitted specifications for Generics,
  Iterators, and Partial Classes to ECMA, and we're on schedule to
  submit the remaining specifications within the next several
  months. We remain very committed to C# standardization."

   http://msdn.microsoft.com/chats/vstudio/vstudio_032103.asp

5) How is C# Generics different from Generic Java?

   Generic Java has been in process for a few years. The first
   research implementations existed before C# was release. Sun has
   released a reference compiler (GJC) which implements the JCP
   elected standard. Generic Java does not change the JVM, and thus it
   does not close the performance gap with C/C++. However, it has the
   benefit that it provides the additional typesafety in a very
   backward compatible manner. Existing compiled libraries can be
   "retrofit" with parametric type-specifications. Generic Java is
   rumored to be slated for the next Java release (1.5?) for which no
   date is set.

http://www.jcp.org/aboutJava/communityprocess/review/jsr014/index.html

   C# Generics is similar to Generic Java in many respects. However,
   CIL v2.0 includes specific support for Generics which closes the
   performance gap with C/C++ by specializing code and eliminating
   run-time casts. Gyro, a reference implementation of Generic C#/CIL,
   is available as a patch to the Microsoft Shared Source CLI.

http://research.microsoft.com/projects/clrgen/

6) Where can I find more information?

"Future Directions for Visual C#"
http://msdn.microsoft.com/chats/vstudio/vstudio_032103.asp

"Interview with Anders Hejlsberg"
http://windows.oreilly.com/news/hejlsberg_0800.html

"New C# Language Features"
http://www.gotdotnet.com/team/csharp/learn/Future/default.aspx


"Gates Offers Glimpse of VS Update, Everett"
http://www.eweek.com/article2/0,3959,714015,00.asp

"ECMA C# and Common Language Infrastructure Standards"
http://msdn.microsoft.com/net/ECMA/

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [EMAIL PROTECTED]
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] C#/.NET Generics update and summary

2003-03-29 Thread David Jeske
is there a measurable 
> performance improvement?

Yes it has CLI changes. It's not clear if it's exactly the same as
what will be standardized. You can see their performance results in
thei paper. The benefits are as you would expect, removing of the
boxing allocations speeds up value type hashtables.

  http://research.microsoft.com/projects/clrgen/generics.pdf

A JIT could specialize further, by inlining a type test and the
"gethashcode()" call for the expected base type, resorting to the
normal methods when the type tests fail. This would bring the
hashtable performance even closer to the C/C++ "theoretical max".

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [EMAIL PROTECTED]
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] J2EE/.NET/WDNA De-mystified

2003-03-29 Thread David Jeske
  and reload it later. Java Beans does this. A "bean" is a
  "component".  Replace every occurance of "Bean" with "Component" and
  their documents will probably make more sense.
 
  C# enables component programming with Properties, Attributes, and
  Serialization. System.EnterpriseServices is a backward compatible
  layer for having C# components play nice in the world of COM+
  components.

  Enterprise Java Beans extends the capabilities of Java Beans. It
  makes the serialization of Bean state part of a database backed
  transaction environment -- plus a bunch more stuff. 

  C#/.NET handles the transaction part of this with MTS. The gap is
  the binding of a component to the transaction services.


JTA - Java Transaction Architecture

  This allows several transaction oriented systems to coordinate. If
  you want to commit a change to three application servers and an
  oracle database, you do it with JTA.

  .NET uses Microsoft Transaction Services to do the same thing.

JMS - Java Messaging Service

  Often you need to send messages out from one component, to be
  received by another component, without knowing where these
  components live. You do this with JMS. JMS could be implemented with
  a Java standard like RMI, or with an open standard like Jabber.

  Microsoft has "Microsoft Message Queueing". I don't know how this
  works.

JNDI - Java Naming and Directory Interface

  A means to store and retrieve configuration information. The JNDI
  provider can have a backing store in any number of places. JNDI is
  often used as an interface to access the Windows Registry.

  On Windows, applications access the windows registry directly, using
  a custom API. It's possible that the Active-Directory APIs are
  closer to JNDI. I'm not sure.

--

Phew, we're done... I hope that was useful.


-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [EMAIL PROTECTED]




___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] limited checked exceptions proposal discussion

2003-03-30 Thread David Jeske
On Sun, Mar 30, 2003 at 07:08:54PM +0200, Stefan Matthias Aust wrote:
> Basically you say, add "throws" only to public methods as these are
> probably the interface methods other users might care about and where
> they should and their compilers know about about possible exceptions.

It's not because "these are probably the interface methods other users
might care about".

I add throws only to public methods because I'm trying to annotate the
minimum set of methods and still have checked exceptions. I admit
there are some tricky issues with protected methods in subclasses, but
no first draft proposal is perfect.

> Let's say you want to create an iterator that implements the
> java.util.Iterator interface class. Let's say that itertor should
> iterate some database stuff.  Every database operator might throw an SQL
> exception (a checked exception). But the Iterator interface doesn't
> allow you to throw exceptions, as potential users of iterators might not
> deal with them.  So you have to  wrap your checked exceptions with
> uncheckt runtime exceptions, working around the too strict default
> mechanism.  That's annoying.

That's a really good example. 

My problems with checked exceptions mostly have to do with them
getting in my way for a temporary period of time while I'm starting
development on some new code. Your example is actually a case where
checked exceptions break language behavior. I'll add that issue to my
proposal.

> I wouldn't mind if I don't have to add declarations to non-public
> methods though.

Ahh, so you see the point now. :)

> However, as especially protected methods are meant to be overwritten
> by other users in their subclasses, these methods might also need a
> throws declaration.

This certainly is an interesting case to handle. I'll add it to my
proposal.

> I agree with you, that the whole matter could need some thought.  Do
> you know Bruce Eckel's position paper on not using checked
> exceptions already?

Yes, of course. However, I don't agree with him. I agree that Java's
"thorough checked exceptions" system is overkill and
annoying. However, I find throws declarations in public class methods
to be extremely helpful when writing Java code. I just find it
annoying to have to add declarations for my code when the compiler
could do a fine job. Inferring thrown exceptions is not hard like
ML-style type inference -- It's trivial.


> [snip...] higher performacne isn't something I really care about. 

Then I won't bother with any of the performance
conversation. Obviously it's important to me. It's also important to a
few other people I'm sure.

> > C# is faster at (a) and (b) by using C++ style static vtable lookups
> > for methods. "really fancy" Smalltalk runtimes like the SELF/Smalltalk
> > runtime which eventually became hotspot can sometimes optimize out
> > this overhead at runtime if a single type appears in the
> > hashtable.
> 
> What you call "really fancy" is actually the norm - not considering
> simple interpreter like Squeak or Dolphin Smalltalk.

The SELF runtime basically invented polymorphic inline caches. Their
Smalltalk->SELF emulation environment for Smalltalk was about 4x
faster than Digitalk Smalltalk (from memory). It also took a buttload
of memory. Sun's Java Hotspot VM was one of the first commercial
runtimes to include polymorphic inline caches. If you have a
documented reference to a non-SELF, non-Hotspot VM which does this,
I'd like to see it.

> Intel's research implemententation uses PICs.

Do you have a documented reference you can point me to?

AFAIK, non-Hotspot runtimes are limited to simple inlining, they don't
really do type-specific, multi-method call "polymorphic inline caches"
like SELF does. I've talked with David Ungar about some of the
challenges converting SELF's PICs into Hotspot, and it really wasn't a
no-brainer. It also isn't a clear win, as Java VMs without it do
better in some cases.

> Another problem with simple vtables occur with interfaces

The C++ multiple inheritence vtable dispatch mechanism is pretty damn
fast compared to Java/Smalltalk/Objective-C style dispatch. It's
perfectly capable of doing Interfaces. Obviously enough inlining
(aside from memory usage, complexity, and compiler pauses) can
optimize all of these into something simpler.

> Actually, using inlining the SELF way, you'd get the same advantage
> without generics and everywhere, not only in collections.  Some help
> form the user can however of course simplify and speed up the JIT
> compiler.

I've run the SELF environment and written SELF code and IMO, we are a
LONG way from SELF being anywhere near the performance of

[Mono-list] Help with ADO.NET Oracle client

2003-04-01 Thread David Pickens
Let me say first that I'm new to mono, and relatively new to C# (moving 
from C++), so the following problems could be a result of my 
inexperience, but I can't seem to get the sample code from go-mono.org 
to work, nor does my attempt in my own code to open the database 
connection work.  (However, using sqlsharp, /Provider Oracle, and a 
valid connection string *does* work on the system, and I do have oracle 
installed and working correctly on the system in question.)

I've corrected the missing casting to strings in the demo code, but when 
it does compile successfully, and the connection string is valid I get:

Unhandled Exception: System.NullReferenceException: A null value was 
found where an object instance was required
in <0x00018> 00 System.Data.OracleClient.Oci.OciServerHandle:Attach ()
in <0x00470> 00 System.Data.OracleClient.Oci.OciGlue:CreateConnection 
(System.Data.OracleClient.OracleConnectionInfo)
in <0x0008e> 00 System.Data.OracleClient.OracleConnection:Open ()
in <0x00095> 00 .Test:Main (string[])

My own connection code, in an ASP.NET page used by mod_mono/apache2 returns:

System.MissingMethodException: A missing method exception has occurred.
in <0x00046> 06 
System.Data.OracleClient.Oci.OciEnvironmentHandle:OCIEnvCreate 
(intptr&,System.Data.OracleClient.Oci.OciEnvironmentMode,intptr,intptr,intptr,intptr,int,intptr)
in <0x00063> 00 System.Data.OracleClient.Oci.OciEnvironmentHandle:.ctor 
(System.Data.OracleClient.Oci.OciEnvironmentMode)
in <0x0002c> 00 System.Data.OracleClient.Oci.OciGlue:CreateConnection 
(System.Data.OracleClient.OracleConnectionInfo)
in <0x0008e> 00 System.Data.OracleClient.OracleConnection:Open ()
in <0x00080> 00 GSNB.GSNBDataAccess:.ctor ()

The version of mono is 0.23 (debs).

Any help will be appreciated!

Thanks,

David

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] [OT?] qt#

2003-06-02 Thread David Sorokin

I think this is the serious omission. So, it seems that Qt as a 
part of KDE is very popular in the Europe as well as in Russia.

It would be just fine to have the fully-functional Qt# but not 
only gtk#.

By the way, is it possible possible to design something common, 
which can be implemented both in Gtk and Qt? I have in mind 
something like to changeable themes for Swing in Java.

Thank you 

David


> On 06/01/03 Dan Trevino wrote:
> > Very little mention is ever made of qt#.  The website has
> > quite a bit of info on gtk#, but 0 mention of Qt#.  Is this
> > a throwback to the GNOME vs KDE arguments?  Just an
> > oversight?  What gives?
>
> It gives that no one of the Qt# users bothered to post a patch
> to add info about it to our website (the website content is in
> mono/doc/).
>
> lupus

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Help with ADO.NET Oracle client

2003-04-06 Thread David Pickens
Tim,

Thanks for the response.  After some more confusion, I decided to dig 
around in sqlsharp to see what it was doing (that I wasn't) to get the 
oracle client to work.  I discovered that it connects using something 
like the following:

   conn.ConnectionString = connectionString;
   try {
   conn.Open();
   if(conn.State == ConnectionState.Open)
   Console.WriteLine("Open was 
successfull\.");
   }

Whereas the sample code from the website (go-mono.org) does:

  IDbConnection dbcon;
  dbcon = new OracleConnection (connectionString);
  dbcon.Open ();
As far as I can tell (which is to say, on my system) the above does not 
work, but changing it so that it sets dbcon.ConnectionString = 
connectionString *does* work.  I don't know if the website or the 
OracleConnection constructor is to blame (or if it's something on my 
system).

One problem down, now on to mod_mono:

You suggested missing environment variables may be to blame, so I 
whipped up an ASP.NET page to print the environment variables mod_mono 
sees from the System.Environment class, and snipping only the relevant 
lines, it shows the following:

PATH= 
/home/oracle/product/8.1.7/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/X11:/usr/local/sbin:/usr/local/bin

ORACLE_HOME= /home/oracle/product/8.1.7

ORACLE_BASE= /home/oracle

LD_LIBRARY_PATH= /home/oracle/product/8.1.7/lib

ORACLE_SID= oracle

The environment seems OK.  I'm hoping that Tim or someone with mod_mono 
experience can tell me why it would have problems loading the oracle 
libraries in mod_mono, but not in a standalone app, given the above.  A 
parital stack trace follows...

System.MissingMethodException: A missing method exception has occurred.
in <0x00046> 06 System.Data.OracleClient.Oci.OciEnvironmentHandle:OCIEnvCreate 
(intptr&,System.Data.OracleClient.Oci.OciEnvironmentMode,intptr,intptr,intptr,intptr,int,intptr)
in <0x00063> 00 System.Data.OracleClient.Oci.OciEnvironmentHandle:.ctor 
(System.Data.OracleClient.Oci.OciEnvironmentMode)
in <0x0002c> 00 System.Data.OracleClient.Oci.OciGlue:CreateConnection 
(System.Data.OracleClient.OracleConnectionInfo)
in <0x0008e> 00 System.Data.OracleClient.OracleConnection:Open ()
Thanks!

David

Tim Coleman wrote:

On Tue, 2003-04-01 at 23:59, David Pickens wrote: 
 

Let me say first that I'm new to mono, and relatively new to C# (moving 
from C++), so the following problems could be a result of my 
inexperience, but I can't seem to get the sample code from go-mono.org 
to work, nor does my attempt in my own code to open the database 
connection work.  (However, using sqlsharp, /Provider Oracle, and a 
valid connection string *does* work on the system, and I do have oracle 
installed and working correctly on the system in question.)

I've corrected the missing casting to strings in the demo code, but when 
it does compile successfully, and the connection string is valid I get:

Unhandled Exception: System.NullReferenceException: A null value was 
found where an object instance was required
in <0x00018> 00 System.Data.OracleClient.Oci.OciServerHandle:Attach ()
in <0x00470> 00 System.Data.OracleClient.Oci.OciGlue:CreateConnection 
(System.Data.OracleClient.OracleConnectionInfo)
in <0x0008e> 00 System.Data.OracleClient.OracleConnection:Open ()
in <0x00095> 00 .Test:Main (string[])

My own connection code, in an ASP.NET page used by mod_mono/apache2 returns:

System.MissingMethodException: A missing method exception has occurred.
in <0x00046> 06 
System.Data.OracleClient.Oci.OciEnvironmentHandle:OCIEnvCreate 
(intptr&,System.Data.OracleClient.Oci.OciEnvironmentMode,intptr,intptr,intptr,intptr,int,intptr)
in <0x00063> 00 System.Data.OracleClient.Oci.OciEnvironmentHandle:.ctor 
(System.Data.OracleClient.Oci.OciEnvironmentMode)
in <0x0002c> 00 System.Data.OracleClient.Oci.OciGlue:CreateConnection 
(System.Data.OracleClient.OracleConnectionInfo)
in <0x0008e> 00 System.Data.OracleClient.OracleConnection:Open ()
in <0x00080> 00 GSNB.GSNBDataAccess:.ctor ()

The version of mono is 0.23 (debs).

Any help will be appreciated!
   

David,

Since the Oracle provider *does* work for you with SQL#, and it seems in
the first example that the error is occuring in
OciServerHandle.Attach(), I think that there may be a problem with your
connection string.  If you could send me the details, perhaps I could
check it out.
In the second example, it almost seems that it can't find the Oracle
client libraries that you have installed.  Not knowing much about
mod_mono, I can't really say why that may be, but you might want to
check out the LD_LIBRARY_PATH or somesuch for the apache user.
Cheers,



 

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Re: Mono 0.25 and MonoDoc 0.5 released.

2003-06-27 Thread David Jeske
On Thu, Jun 26, 2003 at 09:09:55PM -0400, Miguel de Icaza wrote:
>A new release of the Mono runtime and SDK is available for UNIX and
>Windows. Packages for various distributions are also available from our
>download page.

The progress on Mono is amazing.

15 rpms for three redhat distros, 5 for Mandrake, 9 debian packages --
29 in all. One Windows setup wizard with a relocatable install that
runs on Windows releases pre-dating all of them (and most of Linux).

 
I hope someday Linux can figure out how to do this. Ximian, please
help us developers find a way to independently build and distribute
one binary, which is distributed in a single installer, and which
yeilds a relocatable package, that can be installed on a large
percentage of Linux machines, that remains compatible for a couple
years.


Sorry, I can wish can't I?

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [EMAIL PROTECTED]
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Re: Mono 0.25 and MonoDoc 0.5 released.

2003-06-30 Thread David Jeske
On Sat, Jun 28, 2003 at 11:23:35PM -0400, Miguel de Icaza wrote:
> This is the very same wish I have.

Miguel -

I have always hoped that either Gnome or KDE would adopt a system like
Nextstep/MacOSX app-wrappers. This would solve application
installation at least for GUI apps, because then all graphical
applications would have "xcopy" installation semantics just like .NET
apps. This worked so well in the Nextstep world that they started
adopting this scheme for non-GUI apps. All of MacOS X is now based on
this scheme. Nothing sold the scheme to me as much as the old
"X.app". It was an X11 server port that you could literally copy onto
a machine, double click, and go. Compared to installing X on any other
UNIX, this was amazing.

If you don't know the nitty gritty details of the Nextstep system, you
should dig in and take a look. There is alot to learn from it. I have
an unfinished proposal for what I call "OpenBundles" here that you can
look at:

  http://mozart.chat.net/~jeske/Projects/OpenBundle/

The key point is to cut the installer out of the equation for making
the application actually work. Applications are stored in ".app"
directories with app-info.xml description files. The filemanager would
search and passively discover applications to launch. Applications are
required to be relocatable, and passively export mimetypes and
icons. Gnome and KDE like desktop systems can pull icons, mimetypes,
and other exported information out of the app-wrapper itself, instead
of requiring these items to be "grafted" into the /usr/gnome or
/usr/kde trees.

In this model, if debian or redhat wants to put the app-wrapper inside
a package, they can, but it's not necessary. Furthermore, the wrapper
is the same for all systems, because there are no hard-coded install
locations, or system specific install procedures.

> It seems to me that Linux still needs to mature on this area.  Today
> most distrbution players focus on delivering the best value for their
> users, but they are all competing for market share, there is little
> incentive to standarize on a core distribution.

I don't expect Linux will ever standardize on a core distribution. The
thing I like so much about the Nextstep wrapper scheme is that it
created a world of "GUI app encapsulation and xcopy installation" on
top of whatever UNIX you ran underneath. They ran the portable
"Openstep" on Soliaris and Windows as well, and the app copy scheme
was exactly the same. It was the same, because it was more of a
'non-installation' scheme. Underneath it all, old-school command-line
apps were installed using whatever tools were standard on the
platform, but most GUI apps did not depend on them.

If Gnome moved to bundling apps this way, I could distribute a
".tar.gz" of my app binary that would "just work" (much better than
today anyhow) on any Gnome system, as long as Gnome always included
backward compatible versions of libraries when it was installed.

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [EMAIL PROTECTED]
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] coverage analysis tool - again

2003-07-01 Thread David Jeske
On Mon, Jun 30, 2003 at 02:17:11PM +0200, Varga Zoltan wrote:
>   I have resurrected my coverage analysis tool for .NET. The new
> version is available at:
> 
> www.nexus.hu/vargaz

This link to the source seems to be broken:

  http://www.nexus.hu/vargaz/monocov-06-Jan-03.tar.gz

However, I took a look at the output snapshot. This is a fantastic
tool! Anyone who has not taken a look yet should:

> http://www.nexus.hu/vargaz/corlib-tests.tar.gz


-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [EMAIL PROTECTED]
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] getting and compiling mod_mono

2003-07-05 Thread David Wright
I want to use mono to run web apps hosted in apache 2 using mod_mono. 
Where do I get the mod_mono source? (If I go to 
http://freshmeat.net/projects/mod_mono/, it looks like nothing has 
happened since February and the download link is dead.)

Once I have the source, I assume I can use apxs2 to create a mod_mono.so 
compatable with my pre-compiled apache2 installation (using debian sid). 
Will this be a problem?

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Re: getting and compiling mod_mono

2003-07-05 Thread David Wright
> No problem with this. I compiled and installed mod_mono on debian
> sid too.
Thanks. I got mod_mono from CVS, but the compiling is turning out to not 
be so simple.

First, the INSTALL instructions say to ./configure, but there is no 
configure file in mod_mono/. (There is a non-executable configure.in, 
but if I try to make it executable and use it, it returns a syntax error.)

Okay, so I'll try it by hand. I enter
  apxs2 -c src/mod_mono.c
and find out that it can't find some header files it wants from the mono 
directory.

Okay, so I have to get mono from CVS too (I use the compiled binaries 
from http://www.debianplanet.org/mono, so I didn't have it already). Do 
that, enter
  apxs2 -I ~/mono -c src/mod_mono.c
Now it finds the header files it wants, but it gives a flood of errors, 
starting with:
  /home/ichbin/mono/mono/io-layer/types.h:19: error:
  syntax error before "guint32"
I look in that file, and the construction there is indeed strange (a 
struct inside a union), but I can't see anything wrong with it.

I'm stuck. Is this a mono bug, a gcc bug, or a me bug?

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] need some help with PInvoke..

2003-07-09 Thread David Jeske
I'm trying to write a PInvoke wrapper and I'm having trouble doing
something pretty basic. Perhaps someone can help me.

The C-function I'm trying to call has this prototype:

  NEOERR* hdf_init (HDF **hdf);

As far as C# is concerned, HDF and NEOERR are just opaque
data-structures. 

When hdf_init runs, it allocates some datastructures, and passes back
the pointer through the externally allocated hdf pointer. I just want
to print the address of this structure so I can see that something is
working. Here is a C-program that does what I want..

#include 

int main() {
  HDF *hdf;
  NEOERR *err;

  err = hdf_init(&hdf);

  if (err) {
  printf("error: %s\n", err->desc);
  return 1;
   }

   printf("success: 0x%X\n", hdf);
}

I can't seem to get this to work through C# and PInvoke with
mono.. (All of this is with Linux. I can't try with csc right now
because I don't have the dll built for windows) My attempt is here:

using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential)] public class HDF {}
[StructLayout(LayoutKind.Sequential)] public class LPHDF {
  //[MarshalAs(UnmanagedType.LPStruct)]
  //public HDF hdf;
  public int hdf;
}

public class Hdf {
  // NEOERR* hdf_init (_HDF **hdf);

  [DllImport("libneo.so", EntryPoint="hdf_init")]
  [return: MarshalAs(UnmanagedType.LPStruct)]
  private static extern void hdf_init(
   [ MarshalAs(UnmanagedType.LPStruct)]
 LPHDF hdf);

public static int Main(string[] argv) {
   Console.WriteLine("start test");

LPHDF lphdf = new LPHDF();
hdf_init(lphdf);
Console.WriteLine(lphdf.hdf);
   

   return 0;
 }

};

Whenever I run this, it just prints out "0" as the alleged value of
lphdf.hdf. This is no good. Any suggestions?

If you want to poke at the real stuff, you can download libneo.so here:

  http://mozart.chat.net/~jeske/_drop/pinvoke/

libneo is built out of the clearsilver package from here:
 
  http://www.clearsilver.net/

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [EMAIL PROTECTED]
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] need some help with PInvoke..

2003-07-10 Thread David Jeske
On Wed, Jul 09, 2003 at 02:15:09PM -0400, Jonathan Pryor wrote:
> The first way is similar to what's done in Gtk# -- use System.IntPtr
> instead of "void*" and use the IntPtr exclusively as a pointer into
> managed memory:

For opaque stuff, I like the IntPtr concept. However, I want specific
types of IntPtrs. I have a bunch of different opaque types and turning
everything into an IntPtr is too dangerous.

You'd think they would have wanted to have a more specific type than
IntPtr on all those HWND elements. I can easily crash the world with
supposedly "safe" code just by handing an IntPtr of the wrong type
somewhere.

However, unless I'm totally misunderstanding something, it seems like
I can do what I want with unsafe code. 

> However, what you posted doesn't exactly match the above.  You have a
> "mostly opaque" data structure (given that your C code directly
> references the `desc' member of the NOERR class).
> 
> There's a problem with this.  The .NET/mono runtime systems make two
> assumptions: structs are located on the stack, and classes are allocated
> in garbage-collected, .NET-controlled, memory.  Non-stack, non-garbage
> collected memory doesn't enter the picture AT ALL.

That's fine. What I want to do shouldn't conflict with this
concept. For non-opaque types (C-structs), I just want .NET to keep a
pointer in managed memory, but I want it to point to unmanaged data
(which it can clearly already handle). Then want the ability to use a
C-style struct definition to get at elements in the unmanaged struct
memory. I'm fine if I have to do this inside unsafe code blocks.

I used unsafe structs and it seems to do exactly what I
want. Accessing structure members in the unmanaged memory works
correctly. There is no object machinery around structs, so the offsets
match the unmanaged data just fine. The only question is, does the GC
ignore a struct pointer or an unsafe struct pointer? 

For example, given this code:

  unsafe struct DATA {};

  unsafe class Foo {
unsafe DATA *bar;
  }

Will the GC have any problems if bar points to unmanaged memory?

I can see why it would want to take a look at the location bar is
pointing to, because there are cases where you are allowed to have
pointers which point to the interior of managed objects. However, it
can't go walking the bar pointer, because there is no object machinery
on the other end. Because of this, I can't see why it would crash the
GC if this pointed to unmanaged memory.

Can anyone more in the know confirm what happens here?

I've attached my most recent test code which uses unsafe structs and
seems to do the right thing. (i.e. it can correctly access internal
structure members of the data sitting in unmanaged memory)

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [EMAIL PROTECTED]

using System;
using System.Runtime.InteropServices;


[StructLayout(LayoutKind.Sequential)]
public unsafe struct HDF {
  public int link;
  public int alloc_value;
  public char *name;
  public int name_len;
  public char *value;
  // ...
};

[StructLayout(LayoutKind.Sequential)]
unsafe struct NEOERR {
};

unsafe public class Hdf {

  [DllImport("libneo.so", EntryPoint="hdf_init")]
  private static extern unsafe void hdf_init(HDF **foo);

  // NEOERR* hdf_set_value (HDF *hdf, char *name, char *value);

  [DllImport("libneo.so", EntryPoint="hdf_set_value")]
  private static unsafe extern void hdf_set_value(
 HDF *hdf,
   [MarshalAs(UnmanagedType.LPStr)] 
 string name,
   [MarshalAs(UnmanagedType.LPStr)]
 string value
   );

  // NEOERR* hdf_dump (HDF *hdf, char *prefix);

  [DllImport("libneo.so", EntryPoint="hdf_dump")]
  private static extern void hdf_dump(
   HDF *hdf,
   [MarshalAs(UnmanagedType.LPStr)]
 string prefix);

  // HDF* hdf_get_obj (HDF *hdf, char *name)

  [DllImport("libneo.so", EntryPoint="hdf_get_obj")]
  private static extern HDF* hdf_get_obj(
 HDF *hdf, 
   [MarshalAs(UnmanagedType.LPStr)]
 string name);


public unsafe HDF *p;

public static unsafe int Main(string[] argv) {
  Hdf h = new Hdf();
   return 0;
}
public Hdf() {

Console.WriteLine("start test2");

hdf_init(&p);
Console.WriteLine((int)p);

hdf_set_value(p,"b","1");
//hdf_read_file(p,"test.hdf");
//Console.WriteLine("b ", hdf_get_value(_hdf,"b","5"));


hdf_dump(p,null);

HDF *n = hdf_get_obj(p,"b");
Console.WriteLine("object name {0}", 
  Marshal.PtrToStringAnsi((IntPtr)n->name));

 }

};


Re: [Mono-list] need some help with PInvoke..

2003-07-10 Thread David Jeske
On Thu, Jul 10, 2003 at 01:22:55AM -0700, David Jeske wrote:
> For example, given this code:
> 
>   unsafe struct DATA {};
> 
>   unsafe class Foo {
> unsafe DATA *bar;
>   }
> 
> Will the GC have any problems if bar points to unmanaged memory?

BTW, I just found an MSDN page which seems to clarify this issue. (The
text is probably from somewhere in the CLR reference)

  
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csspec/html/vclrfcsharpspec_A_2.asp

  "Unlike references (values of reference types), pointers are not
  tracked by the garbage collector -- the garbage collector has no
  knowledge of pointers and the data to which they point. For this
  reason a pointer is not permitted to point to a reference or to a
  struct that contains references, and the referent type of a pointer
  must be an unmanaged-type."

Seems clear that a pointer type will be ignored by the garbage
collector.


  "An unmanaged-type is any type that isn't a reference-type and
  doesn't contain reference-type fields at any level of nesting..."

"Any user-defined struct-type that contains fields of
unmanaged-types only."

Seems clear that an unsafe struct of only unmanaged types is an
unmanaged type. 

If I'm reading all that correctly, my "DATA*" struct pointer which
points at the unmanaged heap is just fine and dandy.

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [EMAIL PROTECTED]
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] need some help with PInvoke..

2003-07-10 Thread David Jeske
Thanks for the help Jonathan, it's just what I needed!

On Thu, Jul 10, 2003 at 10:58:16AM -0400, Jonathan Pryor wrote:
> First of all, IntPtrs, shouldn't be exposed to client code, if at all
> possible.  Granted, this isn't always possible (S.W.F exposes them
> everywhere so you can manually call Win32 functions, and the Gtk#
> wrapper also exposes them), but ideally you could provide a complete
> wrapper around a type, and not need to expose an IntPtr.

We can all see that the reality is that they need to be exposed in
many places. 

IMHO, DllImport should always be "unsafe", and HWND handles should be
unsafe struct pointers. That way any code that wanted to load some new
function and call it directly would have had to be marked unsafe to
use both the struct pointer and DllImport. That seems to mirror the
real world since that code will in fact be pretty unsafe.

I'm not sure what benefit we get by letting "safe" code mess around
with IntPtr, or call DllImported functions with "allegedly correct"
marshaling options.

It seems like currently the unsafe definition means "may violate the
type system", which makes it pretty odd that IntPtrs can be touched by
"safe" code. If I had my way (fat chance), I would change that
definition to "safe code should never cause a segfault". Anywhere that
DllImport is being used can easily cause a segfault, and anywhere
IntPtrs are passed to the wrong place can also cause a segfault
(although it will occur elsewhere), thus they are pretty "unsafe" in
my book. :)

However, we're not redesigning .NET here, so none of that matters too
much. Back to the regularly scheduled programming...

> Alternatively, creating a new struct that just has an IntPtr member
> should be an equivalent, which would allow some type safety.  I'm
> surprised I don't see this more often.

That's what I tried to do initially in my code, but since all the
marshal examples I had used classes, I was making the mistake of using
classes also. My take away is this:

 - If I want to copy the data into managed memory by marshaling, I use
   a class.

 - If I want to reference the data in-place in unmanaged memory, I use
   an unsafe struct and a struct pointer.

 - Since an IntPtr is basically a void*, I don't see why I would ever
   use it, unless the external call actually takes a void*.

> The `char' type is an unsigned 16-bit type.  Your other functions
> specify that string marshaling should be done as LPStrs (an 8 bit
> type).  Which means there's a mismatch between your structure and method
> signatures.

Actually, I used:

  Marshal.PtrToStringAnsi((IntPtr)p->name);

Which did exactly the right thing even though you are correct about my
mis-use of char *. I'll change it to "byte*". 

> You can convert it into a System.String by using the
> System.String.String(sbyte*) constructor

Oohh! That's exactly what I was looking for. My strings are actually
in UTF, so I can do:

  string name = new String.String(p->name,0,strlen(p->name),UTF8Encoding);

I was worried that I was going to have to marshal the byte* into a
managed byte[], use convert to go from UTF8 to UCS2 in a byte[], and
then convert to a String. Too many copies. Using String.String() is
much better, thanks! (although the underlying implemenation might
still do the copies, it theoretically can be optimized someday)

> Going from System.String to a sbyte* would likely require that you
> P/Invoke to malloc/free (or whatever memory management functions your C
> code uses), allocate unmanaged memory, and do the copy yourself (or use
> System.Runtime.InteropServices.Marshal.Copy(byte[], int, IntPtr, int)). 
> You'll have to convert the System.String to a byte[] first, though,
> which will likely require using the System.Text.Encoding class (making
> sure that you use the same encoding as your C code does).

It looks like I can write a Custom Marshaler which handles UTF8:

 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemruntimeinteropservicesicustommarshalerclasstopic.asp

However, based on what I can find in Convert, it looks like I'll have
to do the copying I talked about above (in reverse). My strings are
pretty small, so this shouldn't be too big a deal. However, I'm going
to be pushing strings out alot more often than I'm pulling strings
back in, so this is unfortunate.

If anyone knows of a way to marshal a .NET string into a UTF8 encoded
sbyte* in a single copy, speak up. :)


Anyhow, thanks for the help, my code seems to be doing what I need it
to do now. Go Mono!

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [EMAIL PROTECTED]
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] IntPtr safety (was: need some help with PInvoke..)

2003-07-10 Thread David Jeske
Looks like my PInvoke and Marshaling lesson is done. Thanks again for
the great help! This post is just a few general discussion comments on
IntPtr wrt VB and Security.

On Thu, Jul 10, 2003 at 02:13:33PM -0400, Jonathan Pryor wrote:
> Well, to speak on .NET's behalf, .NET has a highly flexible security
> system.  You can't invoke DllImported functions unless your app has the
> appropriate security rights -- generally, that the app is running on the
> local machine.  If you're running it from a network share, or from a web
> site (similar to Java Applets), then your app will get a
> SecurityException.

Is there a way to disallow an assembly from calling any function which
takes an IntPtr paramater or void* paramater? It seems to me that this
would be required to stop sandboxed code from segfaulting the
system. Otherwise I can just hand an HWND IntPtr I get from "secure
ok" S.W.F code, and hand it to "secure ok" Gtk code, and poof. :)


> >  - If I want to reference the data in-place in unmanaged memory, I use
> >an unsafe struct and a struct pointer.
> > 
> >  - Since an IntPtr is basically a void*, I don't see why I would ever
> >use it, unless the external call actually takes a void*.
> 
> You would use it if you need to expose the member to languages other
> than C#/C++.  For example, Visual Basic has no syntax for "unsafe" code,
> and thus you couldn't use Visual Basic to perform your 2nd option.  If
> you want your code to be usable by other languages, you'll need to
> provide an appropriate wrapper.

I guess this is my confusion. HWND* is _safer_ than IntPtr, because it
is a pointer to a specific type. It's the operations on HWND* that are
unsafe. It seems like it would be better if VB (and other languages
without unsafe) had the ability to express HWND*, and simply not
operate on it.

Certainly this:
.field  public   valuetype HDF* p

Is better than this:
.field  public   native int p

Ohh well... maybe it'll get in the queue for .NET 2.0. although I'm
much more excited about parametric types than I am worried about this.

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [EMAIL PROTECTED]
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] IntPtr safety (was: need some help with PInvoke..)

2003-07-11 Thread David Jeske
On Fri, Jul 11, 2003 at 09:54:39AM +0200, Hervé Poussineau wrote:
> >I guess this is my confusion. HWND* is _safer_ than IntPtr, because it
> >is a pointer to a specific type. It's the operations on HWND* that are
> >unsafe. It seems like it would be better if VB (and other languages
> >without unsafe) had the ability to express HWND*, and simply not
> >operate on it.
> >
> >Certainly this:
> >.field  public   valuetype HDF* p
> >
> >Is better than this:
> >.field  public   native int p
> 
> Why don't you write a struct that contains only a HWND* ? So, you can simply
> express your HWND* in safe code. Moreover, you can mark certain methods as
> "internal" for more security

I think you may be confused because of how I mixed up a few
comments. Let me clarify:

1) I'm plenty happy making my own struct which has no elements and
   using it as a strongly typed pointer. My code looks like this, and
   I'm happy with it:

unsafe struct NEOERR { 
  // this one has members, non-opaque
};
unsafe struct HDF { }; // opaque
unsafe struct CSP { }; // opaque
// more opaque types

[Dllimport("libneo.dll")] extern static NEOERR *hdf_init(HDF **);


2) I find it really dangerous that S.W.F exposes HWND* structures as
   IntPtr. Any method in an assembly that is accessable that takes an
   IntPtr as a paramater or which lets you access an IntPtr as a
   public field can be used to crash the runtime by sticking the
   wrong type of IntPtr there. This seems "really bad". 

   It seems like this might have been done to support VB's common use
   of "ByRef HWND as Long" since it dosn't have pointer types. Ohh
   well.

In response to your comment. I already have a managed type which wraps
the HDF*. The thing is, I have a few different components of my
wrapper which need access to the raw HDF*. Wrapping a void*
(i.e. IntPtr) in another level of managed type seems needless and
performance-sapping when the unsafe HDF* does exactly what I want, not
to mention un-type-safe.

I'm plenty happy with how this works now.. (although I have run into
some other interesting issues.. more later)

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [EMAIL PROTECTED]
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] unmanaged type limitations -- no unmanaged arrays?

2003-07-12 Thread David Jeske
This time I have some PInvoke information to share, so that when
someone else runs into this issue they can see what I've done.

In my ClearSilver (www.clearsilver.net, an HTML template system) C#
wrapper, I wanted to access this C-struct:

typedef struct _neo_err
{
  int error;
  int err_stack;
  int flags;
  char desc[256];
  const char *file;
  const char *func;
  int lineno;
  /* internal use only */
  struct _neo_err *next;
} NEOERR;

My philosophy of using unsafe struct pointers, and just accessing the
struct out in unmanaged memory is great, and it's exactly what I want
to do. However, handling "char dest[256]" is not straightforward.

In C# arrays are reference types. Using one makes the struct a managed
type, and I can't put the array size in. The following is conceptually
what I want to do, however, it's obviously invalid:

[StructLayout(LayoutKind.Sequential)]
unsafe struct NEOERR {
  public int error;
  public int err_stack;
  public int flags;
  public byte[256] desc;  // this is invalid, can't contain size
  public const byte *file; 
  public const byte *func; 
  public int lineno;

  /* internal use only */
  private NEOERR *next;
};

This dosn't work either:

  [ MarshalAs( UnmanagedType.LPStr, SizeConst=256 )] 
public string desc; 

Because in this case, I don't want to marshal the data. I just want to
talk to it in place. The solution I could come up with is this:

[StructLayout(LayoutKind.Explicit)]
unsafe struct NEOERR {
  [FieldOffset(0)] public int error;
  [FieldOffset(4)] public int err_stack;
  [FieldOffset(8)] public int flags;
  // public byte[256] dest;  // not representable
  [FieldOffset(12)] public byte dest_first_char; // use this as an address??
  [FieldOffset(268)] public byte *file; // const
  [FieldOffset(272)] public byte *func; // const
  [FieldOffset(276)] public int lineno;
};

UGH! First, this is obviously annoying. Second, the only way I can
figure to get access to "char dest[256]" is to use "char* dest =
&nerr->dest_first_char;" and then just use dest as a pointer to the
string. I've dug through the documentation, and I can't find any
better solution.

Obviously it would be ideal if there were a way to represent a
value-type array. I wonder how Managed C++ handles "char foo[256];" in
a struct.

Anyhow, I'm not expecting a reply to this message, as I don't think
there is any great solution to this. I just figured it might be
interesting to someone else.

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [EMAIL PROTECTED]
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] DllImportMap support in mono?

2003-07-13 Thread David Jeske
I was looking at using the "pnetcurses" library which maps ncurses
into C#. Portable.NET uses an attribute called DllImportMap to handle
mapping function imports to different shared library names based on
the platform. 

Miguel seemed to think it was a neat idea way back when:

 http://archive.neotonic.com/archive/mono-list/msg/2153

However, this hasn't show up in Mono. I'm wondering if this is
something that nobody has implemented, or if Mono has just chosen to
solve this a different way. 

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + [EMAIL PROTECTED]
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Unable to get mono-wine working

2003-08-14 Thread David Douglas
I have installed redhat 9.0, wine, and the packages on the mono website 
for redhat 9.0.  I am getting the following error message when I tried 
to run an application that brings up an empty window.

[EMAIL PROTECTED] david]$ SWF=1 mono hello.exe
 
** (hello.exe:5885): WARNING **: Failed to load function PROCESS_InitWine from libntdll.dll.so
 
** (hello.exe:5885): WARNING **: Failed to load function PROCESS_InitWine from libntdll.dll.so
MonoWin32: Initializing WineLib
 
Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.Control ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.Win32 ---> System.MissingMethodException: A missing method exception has occurred.
in <0x00042> 06 System.Windows.Forms.Win32:PROCESS_InitWine (int,string[])
in <0x00083> 00 System.Windows.Forms.Win32:.cctor ()
--- End of inner exception stack trace ---
 
--- End of inner exception stack trace ---
 
in (unmanaged) 00 System.Windows.Forms.Control:.ctor ()
in <0xe> 00 System.Windows.Forms.ScrollableControl:.ctor ()
in <0x00014> 00 System.Windows.Forms.ContainerControl:.ctor ()
in <0x0001b> 00 System.Windows.Forms.Form:.ctor ()
in <0xa> 00 .hello:.ctor ()
in <0x00054> 08 .hello:.ctor ()
in <0x0001e> 00 .hello:Main ()
I am not sure what I may be doing wrong here.  The source for my 
hello.exe file is :

using System;
using System.Windows.Forms;
 
class hello : System.Windows.Forms.Form
{
public static void Main()
{
Application.Run(new hello());
    }
}
I would appreciate any suggestions.

Thanks,
David
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Fwd: Fwd: Re: [Mono-list] Unable to get mono-wine working]

2003-08-14 Thread David Douglas
Hi, Aleksey

Yes and No ;-)

I did install the packages from that page and I did run the mono-setup 
script. However, at the time I did not have WINE installed. I have since 
installed :

wine-20030508-1rh9winehq.i386.rpm

Before I had installed this I was getting a lot of other error messages. 
These messages stated that libntdll.dll.so could not be found. This was, 
of course, because WINE was not installed. I suppose that because of 
this round-about install I may have messed something up.

Any ideas?

David
--- Begin Message ---

Delivered-To: [EMAIL PROTECTED]
From: Aleksey Ryabchuk <[EMAIL PROTECTED]>
Subject: Re: [Mono-list] Unable to get mono-wine working
To: [EMAIL PROTECTED]
X-Spam-Status: No, hits=-9.4 required=5.0
tests=EMAIL_ATTRIBUTION,IN_REP_TO,MAILTO_TO_SPAM_ADDR
version=2.53
X-Spam-Level:
X-Spam-Checker-Version: SpamAssassin 2.53 (1.174.2.15-2003-03-30-exp)
Sender: [EMAIL PROTECTED]
X-BeenThere: [EMAIL PROTECTED]
X-Mailman-Version: 2.0.13
List-Help: <mailto:[EMAIL PROTECTED]>
List-Post: <mailto:[EMAIL PROTECTED]>
List-Subscribe: <http://lists.ximian.com/mailman/listinfo/mono-list>,
<mailto:[EMAIL PROTECTED]>
List-Id: Mono Developer Discussion List 
List-Unsubscribe: <http://lists.ximian.com/mailman/listinfo/mono-list>,
<mailto:[EMAIL PROTECTED]>
List-Archive: <http://lists.ximian.com/archives/public/mono-list/>
Date: Tue, 12 Aug 2003 03:42:34 -0700 (PDT)
Hello David,

Did you follow all instructions from this page ?
http://www.nullenvoid.com/mono/wiki/index.php/MonoWinePackages
Regards
Aleksey
--- David Douglas <[EMAIL PROTECTED]> wrote:
> I have installed redhat 9.0, wine, and the packages
> on the mono website
> for redhat 9.0.  I am getting the following error
> message when I tried
> to run an application that brings up an empty
> window.
>
> > [EMAIL PROTECTED] david]$ SWF=1 mono hello.exe
> >
> > ** (hello.exe:5885): WARNING **: Failed to load
> function PROCESS_InitWine from libntdll.dll.so
> >
> > ** (hello.exe:5885): WARNING **: Failed to load
> function PROCESS_InitWine from libntdll.dll.so
> > MonoWin32: Initializing WineLib
> >
> > Unhandled Exception:
> System.TypeInitializationException: An exception was
> thrown by the type initializer for
> System.Windows.Forms.Control --->
> System.TypeInitializationException: An exception was
> thrown by the type initializer for
> System.Windows.Forms.Win32 --->
> System.MissingMethodException: A missing method
> exception has occurred.
> > in <0x00042> 06
> System.Windows.Forms.Win32:PROCESS_InitWine
> (int,string[])
> > in <0x00083> 00 System.Windows.Forms.Win32:.cctor
> ()
> > --- End of inner exception stack trace ---
> >
> > --- End of inner exception stack trace ---
> >
> > in (unmanaged) 00
> System.Windows.Forms.Control:.ctor ()
> > in <0xe> 00
> System.Windows.Forms.ScrollableControl:.ctor ()
> > in <0x00014> 00
> System.Windows.Forms.ContainerControl:.ctor ()
> > in <0x0001b> 00 System.Windows.Forms.Form:.ctor ()
> > in <0xa> 00 .hello:.ctor ()
> > in <0x00054> 08 .hello:.ctor ()
> > in <0x0001e> 00 .hello:Main ()
>
> I am not sure what I may be doing wrong here.  The
> source for my
> hello.exe file is :
>
> > using System;
> > using System.Windows.Forms;
> >
> > class hello : System.Windows.Forms.Form
> > {
> > public static void Main()
> > {
> > Application.Run(new hello());
> > }
> > }
>
> I would appreciate any suggestions.
>
> Thanks,
> David
>
> ___
> Mono-list maillist  -  [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list
__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list



--- End Message ---


[Mono-list] CS0159 bug?

2003-08-28 Thread David Kvarnberg
Hi,
I'm trying to compile a project that works fine on Windows (MS .NET) but
fails to compile with Mono (latest release and latest CVS as of 3 days
back).
I keep getting a lot of CS0159 errors:

Parser.cs(596) error CS0159: No such label `Foundunique' in this scope
Parser.cs(1307) error CS0159: No such label `User' in this scope
Parser.cs(1345) error CS0159: No such label `Conf' in this scope
Parser.cs(3210) error CS0159: No such label `Next' in this scope
Parser.cs(3365) error CS0159: No such label `Treeview' in this scope
Parser.cs(7766) error CS0159: No such label `Documentstatus' in this
scope
Parser.cs(7784) error CS0159: No such label `Userstatus' in this scope

And so on. I have tried narrowing the code down to the parts that won't
compile, but have not succeeded. It simply compiles fine when I reduce
the code down to what in my eyes seem to be the offending parts.

I find it kind of hard to nail down the bug since most files in the
projects depends on other files. Altogether around 30K lines of code.

Any ideas?

David


___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] RE: [Mono-devel-list] Surveys: Mono 1.0 and Mono Conference.

2003-10-11 Thread Sandor, David
I have not contributed much to the Mono effort as a whole, however I have
some very real uses (as I am sure many others on this list have as well) for
the Mono release.  I can tell you that in order to adopt mono in my shop and
begin a more focused push to Linux with Mono I need (at a minimum) the
following:

* A solid C# compiler
* WebServices (SOAP) (at least) interacting with the .NET implementations.
* All the ancillary code to support the 2 items above.

With that I could begin using Linux/Mono and begin it's acceptance into my
(and many other) organizations.

As far as bug fixes go, as long as bugs are documented and that
documentation is readily available to developers that should suffice.
Additionally, regular updates that address these bugs would make acceptance
a lot easier.

Ideally I would like to see a Windows.Forms implementation in Mono that
makes a near transparent solution for Microsoft centric developers.  This
would help drive the acceptance of Mono onto the desktop which in turn would
provide added value to the Linux to the Desktop push.

My 2 cents..
David Sandor
 

 
-Original Message-
From: Miguel de Icaza [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 08, 2003 10:25 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Importance: Low

Hey guys,

   I want to query the community, and find out about two things:

* What should Mono 1.0 be?

* When and where should we do a Mono developer summit.

* Mono 1.0

Mono is rapidly approaching maturity in various of its class
libraries, the question in everyone's minds is: is it worth
waiting for the full .net framework implementation to be ready
to publish 1.0, or is a subset fine?

Mono 1.0 so far is going to be a subset, and my current thinking
is `.NET 1.0 minus two major pieces: EnterpriseServices and
Windows.Forms'.

But today some people suggested that we might want to have a
Mono 1.0 release earlier by committing to less than that,
something like: 

Mono 1.0: 
C# compiler
Toolchain (ilasm, ildasm, al, etc)
corlib, System, System.XML, System.Security.
ADO.NET (System.Data and providers)
ASP.NET (System.Web.Services and System.Web)

Anything else that is robust by the time the other components
are deemed "stable" would also make it.  So if for example
"System.Wasabinator" is of 1.0 quality by the time the rest is
done, we can also include it. 

We would later publish the other components in upcoming
releases:

JScript, VB.NET (compiler and runtimes)
System.DirectoryServices
System.EnterpriseServices
System.Windows.Forms

* Mono Conference (Code name: Mono Summit of Love).

Gnome has been fairly successful at running yearly conferences
for users and developers.   And these face to face meetings are
fantastic to improve the collaboration between the various parts
of the project, and help to go over development bumps rather
quickly.

Also, it is great to put faces and voices to nicknames and email
addresses. 

So am thinking that we need to have a such a summit.  There are
two questions: what is the audience for this summit and where
should we base it.

Audience:

We can certainly make this a hacker-only conference, but
given the amount of projects, companies and developers
using Mono, it might make sense to have something with a
larger scope.

In one extreme we have the `big room with internet
access, printers and laptops' and in the other we have
something more formal including presentations on
specific technologies, tutorials and workshops. 

I know active Mono developers would like to come (and am
working on getting the funding to pay for airfares and
hotels for those who can not afford a trip to the other
end of the world).

Location:

I suggested Cancun during summer break, but Nat quickly
pointed out that if you are working for a company, there
was no way your boss would authorize such a thing.

So here are the parameters:

* If we are getting many latin-americans/asians,
  we should do it in a country that does not
  require VISAs, so that rules out the US and
  Brasil.

[Mono-list] RE: [DotGNU]Re: Collaboration on alternatives to the US-patent-en dangered APIs?

2003-10-11 Thread Dawkins, David
> According to the FSF patent lawyer, this design activity needs to be
> done outside of the US, and the person who does the design should not
> take it into the US with him.

I'm curious. What is the legally recognised tangible form of such a 
design?  

Is it a printed document?  A computer document? (If so, how about
copies of either type of document?)

Is it a laptop containing implementations of that design? How about
the author of the design itself?

Dave D
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Gcc version

2003-11-17 Thread David Sheldon

Is there a minimum version of gcc that mono is expected to compile on?
It appears to compile fine on my work machine with 

$ gcc --version
gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

but on my home machine with 

$ gcc --version
2.95.4

I get the output below.

Is this related to the version? Should I expect it to work with gcc
2.95.4? 

David


gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../mono
-I../../libgc/include -
pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/glib-
2.0 -I/usr/lib/glib-2.0/include -DMONO_ASSEMBLIES=\"/usr/local/lib\"
-DMONO_CFG_
DIR=\"/usr/local/etc\" -DGC_LINUX_THREADS -DMONO_USE_EXC_TABLES
-D_GNU_SOURCE -D
_REENTRANT -fexceptions -D_FILE_OFFSET_BITS=64 -g -O2 -g -Wall -Wunused
-Wmissin
g-prototypes -Wmissing-declarations -Wstrict-prototypes
-Wmissing-prototypes -Wn
ested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align
-Wwrite-strings -c ica
ll.c -Wp,-MD,.deps/icall.TPlo  -fPIC -DPIC -o .libs/icall.lo
icall.c: In function `mono_double_ParseImpl':
icall.c:64: warning: `result' might be used uninitialized in this
function
icall.c: In function `ves_icall_System_Array_SetValueImpl':
icall.c:159: warning: `u64' might be used uninitialized in this function
icall.c:160: warning: `i64' might be used uninitialized in this function
icall.c:161: warning: `r64' might be used uninitialized in this function
icall.c: In function `ves_icall_MonoField_GetValueInternal':
icall.c:: warning: `vtable' might be used uninitialized in this
function
icall.c: In function
`ves_icall_System_Reflection_Assembly_InternalGetAssemblyNa
me':
icall.c:2993: parse error before `*'
icall.c:2994: `exc' undeclared (first use in this function)
icall.c:2994: (Each undeclared identifier is reported only once
icall.c:2994: for each function it appears in.)
make[4]: *** [icall.lo] Error 1
make[4]: Leaving directory
`/home/sheldon/files/mono-0.28.99.20031117/mono/metad
ata'



-- 
I hope you don't screw like you type.
  -- Kate, "Hackers"
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Profiling

2003-12-09 Thread David Sheldon

Hi,

I see several mentions of a mono profiler. Is this just mint --profile,
or is there an interface to it/something that tells you where all the
objects have been created?

David

-- 
"The world isn't run by weapons anymore, or energy, or money. It's run by
little ones and zeros, little bits of data. It's all just electrons."
-- 'Sneakers'
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Profiling

2003-12-09 Thread David Sheldon
On Tue, Dec 09, 2003 at 02:24:30PM -0500, Miguel de Icaza wrote:
> Hello,
> 
> > I see several mentions of a mono profiler. Is this just mint --profile,
> > or is there an interface to it/something that tells you where all the
> > objects have been created?
> 
> If you are using `mint', you are missing on all the performance.  That
> is a very slow interpreter, you should be using `mono', which is our
> super-cool, high-performance JIT compiler.
> 
> But yes, the profiler is --profile.

I had missed the --profile option on the mono help. Anyway, I think I am
trying to use the profiler for the wrong sort of thing. The test code I
ran was so short that it was faster in mint than mono anyway (about
170ms rather than 260ms). When I actually care about performance I might
look into how one should go about it.

Incidently is there a list of stupid things that you shouldn't do for
performance? Or some rules for which operations are expensive? How does 
"is" compare in speed to actually calling a virtual method on the type
for example, or should I go and experiment for myself? Basically I don't
want to be writing big slow code just because I don't understand C# as
much as I do C or similar.

David
-- 
Hanlon's Razor:
Never attribute to malice that which is adequately explained
by stupidity.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] wsdl (mono version) does not generate code

2003-12-28 Thread David Sheldon
On Sun, Dec 28, 2003 at 12:39:11PM -0600, Pablo Fischer wrote:
> Hi!
> 
> Yep, I know that in .NET Framework I can generate the proxy code, but
> I'm not using Windows, I'm using Mono in Linux, and in Mono the wsdl.exe
> can't generate the proxy code.

If you save the wsdl to a file, then run wsdl on that file it appears to
generate correct code. Unfortunately I don't have time to work on this
at the moment, but it does look like a bug in reading XML from a network
stream.

Coincidently, the close-tag that is failing is the same one that the IP
packet spilts, but I can't see how that would break it. 

David
-- 
"You can't hand-over-hand up monomolecular wire; your fingers fall off."
  -- Beauvoir, 'Count Zero'
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Issues in XmlSchema.XmlSchemaElement

2004-01-06 Thread David Sheldon
On Tue, Jan 06, 2004 at 03:59:37PM -0600, Tom Cabanski wrote:
> In general, it would appear the Mono compile is doing some extra
> checks that, although logical, may not be in line with the W3C
> standards; they are certainly not in line with the Microsoft and
> Xerces implementations.  One that represents the issue takes place in
> XmlSchemaElement.ValidateUniqueParticleAttribution.  This routine
> fails on the CIP4 JDF schema with the error "Ambiguous element label
> which is contained by -any- particle was detected". 

Hi, 

I have been looking at the XML Schema code recently, though I am mainly
looking at facet validation at the moment. I am interested in helping
you find problems with our implementation.

Are these the files available at http://www.cip4.org/open_source/intro.php?

If so I can't see anything wrong with them at a quick glance as both the
anys are in the ##other namespace, so shouldn't be ambiguous.
Unfortunately I have not had time for a good look at them, and need to
go to bed. 

In the mean-time, have you run IBM's Schema Quality Checker against
them? I find it is a good way of finding things that are against the
spec, even though processors don't detect them. It is available at 
  http://www.alphaworks.ibm.com/tech/xmlsqc

It tends to take a long time on any complicated schema, so don't give up
unless you have given it a few hours.

Let me know if I can help.

David
-- 
   Computing is like sex because...
 When you do it professionally it's not as much fun.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] xml bug?

2004-01-19 Thread David Sheldon
On Mon, Jan 19, 2004 at 09:06:16PM +0100, Daniel Pecos wrote:
> Hi!
> 
> I have found an issue that I don't know if it's an error or it is ok:
> when I add an attribute named "xmlns" to an XmlElement, then all
> childs that were appended to it or those that will be, all have
> the same attribute but without content, and RemoveAttribute ("xmlns")
> does not work.


We should have rejected your XML, as you are trying to add more than one
top-level element (document element) to your document. The fact that we
don't do so is a bug. 

Now, as for the xmlns, xmlns is a special attribute, setting 
the xmlns attribute doesn't really do anything for the infoset, and the
b2 element is created in the null namespace. This is why the serialiser 
puts the xmlns="" on b2, that is so that b2 is in the namespace it was
created in. 

The correct way would be to create the b and b2 elements in the probe
namespace. This way the document you serialise is what you wanted, and
you have done it correctly.

using System;
using System.Xml;

namespace p {
   public class m {
  public static void Main (string [] args) {

 XmlDocument x = new XmlDocument ();
 XmlElement a = x.CreateElement ("a");
 XmlElement b = x.CreateElement ("b", "probe");
 x.AppendChild (a);
 a.AppendChild (b);
 XmlElement b2 = x.CreateElement ("b2", "probe");   
 b.AppendChild (b2);

 Console.WriteLine (x.InnerXml);
  }
   }
}

Interestingly, your code works under MS .NET. I only need to make the
change "a.AppendChild (b);" instead of "x.AppendChild (b);".

Eno, what do you think we should do about this?

David



-- 
And it should be the law: If you use the word `paradigm' without knowing
what the dictionary says it means, you go to jail.  No exceptions.
-- David Jones
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] xml bug?

2004-01-20 Thread David Sheldon
On Tue, Jan 20, 2004 at 03:54:52PM +0900, Atsushi Eno wrote:
> a) supply no xmlns for default namespace
> This looks more de facto standard way. I wrote similar code with jdk 1.5 
> and got the same result as MS.NET.

Will this be differentiated from the null-namespace? If I did

 b = x.CreateElement("b", "namespace");
 b2 = x.CreateElement("b2", "");
 b.AppendChild(b2);

Where I would expect b2 to have the xmlns="" attribute.

David
-- 
"If I can differentiate that, anyone can."
Professor Batty, Maths Lecture
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] NullRefException compiling with mcs

2004-01-30 Thread David Sheldon
On Thu, Jan 29, 2004 at 02:23:47PM -0500, Stuart Ballard wrote:
>  Is this a known bug in mono --debug's reporting of line numbers?

Yes, it always reports the line number of the next statement.

http://bugs.ximian.com/show_bug.cgi?id=45730

David
-- 
If a 6600 used paper tape instead of core memory, it would use up tape
at about 30 miles/second.
-- Grishman, Assembly Language Programming
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] FileInfo.Exists() returns false after calling FileInfo.Create()

2004-01-31 Thread David Sheldon
On Thu, Jan 29, 2004 at 07:22:07AM -0700, Rathna N wrote:
> Hi, 
> FileInfo.Exists() returns false in the below scenario.
>  
> 1. FileInfo info = new FileInfo (path);
> 2. AssertEquals ("test#01", false, info.Exists); //--> returns "false"
> 3. info.Create();
> 4.  AssertEquals ("Exits - test#02", true, info.Exists); //--> returns
> "false"
> 
>  
> is this the expected behavior ?

It is. If I run your code on MS.NET, then I get the behaviour that
you describe.

David
-- 
"0 tends to simplify things a bit when you multiply by it..."
-- Bill McColl
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] ByteFX.Data.MySqlClient : no instance, a null value instead

2004-02-01 Thread David Marsal
Running mono from cvs, I wrote the following test.cs
(from the go-mono site) :
===

using System;
using System.Data;
using ByteFX.Data.MySqlClient;
public class Test
{
   public static void Main(string[] args)
   {
  string connectionString =
 "Server=localhost;" +
 "Database=monotest;" +
 "User ID=monotest;" +
 "Password=monotest;";
  IDbConnection dbcon;
  dbcon = new MySqlConnection(connectionString);
  dbcon.Open();
  IDbCommand dbcmd = dbcon.CreateCommand();
  // requires a table to be created named employee
  // with columns firstname and lastname
  // such as,
  //CREATE TABLE employee (
  //   firstname varchar(32),
  //   lastname varchar(32));
  string sql =
  "SELECT person, email" +
  "FROM test";
  dbcmd.CommandText = sql;
  IDataReader reader = dbcmd.ExecuteReader();
  while(reader.Read()) {
   string FirstName = (string) reader["firstname"];
   string LastName = (string) reader["lastname"];
   Console.WriteLine("Name: " +
 FirstName + " " + LastName);
  }
  // clean up
  reader.Close();
  reader = null;
  dbcmd.Dispose();
  dbcmd = null;
  dbcon.Close();
  dbcon = null;
   }
}
My aim is to use a similar script with xsp
but one problem at a time...
===

compilation is all right :

mcs test.cs -r System.Data.dll  -r ByteFX.Data.dll
Compilation succeeded
===

But running failed :

mono test.exe

Unhandled Exception: System.NullReferenceException: A null value was 
found where an object instance was required
in <0x00061> ByteFX.Data.MySqlClient.MySqlStream:get_DataAvailable ()
in <0x00058> ByteFX.Data.Common.MultiHostStream:Read (byte[],int,int)
in <0x00040> ByteFX.Data.MySqlClient.MySqlStream:ReadInt24 ()
in <0x00050> (wrapper remoting-invoke-with-check) 
ByteFX.Data.MySqlClient.MySqlStream:ReadInt24 ()
in <0x00062> ByteFX.Data.MySqlClient.Driver:ReadRawPacket ()
in <0x0005c> ByteFX.Data.MySqlClient.Driver:ReadPacket ()
in <0x00094> ByteFX.Data.MySqlClient.Driver:Open 
(ByteFX.Data.MySqlClient.MySqlConnectionString)
in <0x0003f> ByteFX.Data.MySqlClient.MySqlInternalConnection:Open ()
in <0x000fa> ByteFX.Data.MySqlClient.MySqlPool:CreateNewPooledConnection ()
in <0x00235> ByteFX.Data.MySqlClient.MySqlPool:GetPooledConnection ()
in <0x0005d> ByteFX.Data.MySqlClient.MySqlPool:GetConnection ()
in <0x0011b> ByteFX.Data.MySqlClient.MySqlPoolManager:GetConnection 
(ByteFX.Data.MySqlClient.MySqlConnectionString)
in <0x00077> ByteFX.Data.MySqlClient.MySqlConnection:Open ()
in <0x00071> .Test:Main (string[])

which is not so clear for me...
I just believe to understand that the instance ByteFX.Data.MySqlClient 
instance doesn't exists
but why ?

===

Then I use sqlsharp :

SQL# \Provider MySqlNET
The default Provider is LOADEXTPROVIDER
 Assembly: ByteFX.Data
 Connection Class: ByteFX.Data.MySQLClient.MySQLConnection
SQL# \ConnectionString Server=localhost;Database=monotest;User 
ID=monotest;Password=monotest;

SQL# \Open
Attempt to open connection...
Loading external provider...
Error: unable to load the assembly of the provider: ByteFX.Data : 
Argument cannot be null
Parameter name: type

same problem ?

===

Then I use mysql :

mysql -u monotest -p

Enter password: ( monotest)

mysql> use monotest;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed

SELECT * FROM test;
++-+
| person | email   |
++-+
| moi| [EMAIL PROTECTED] |
++-+
1 row in set (0.00 sec)
Ok !
===
I just check that
/usr/local/mono/lib/ByteFX.Data.dll exists and is up to date
I succeeded in compiling GnomeDbClient.cs and client.cs
but failed to access my databases
Many many thanks for your help.



___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Simple code - differences in output between mono & .Net

2004-03-03 Thread David Sheldon
On Wed, Mar 03, 2004 at 10:11:28AM -0500, Nick Berardi wrote:
> I guess logical drives in Linux is just the root.  But I would think that
> they would include the mount points in here?  Don't you think?  Because
> basically that is all that a Windows Drive is.  A mounted partition.
> 
>  
> 
> Anybody on the list disagree?

I disagree. The call is get*Logical*Drives. Linux only has a single
logical drive, though it is made up of several physical drives mounted
into it. If you enumerate /, /cdrom, /floppy, /mnt/moredisk,
/mnt/moredisk/someNFSserver then you will end up with applications
double counting files and generally recursing over more then they need
to in order to find a file.

David
-- 
"OK. Enter system password, out of ttys, can't fork process, Panic Double
Panic, can't open socket, bad magic number, NO ROUTE TO HOST, hme is down,
stale file handle, /var is full, and it's January 1970."
- sing, sing, halt
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Simple code - differences in output between mono & .Net

2004-03-03 Thread David Sheldon
On Wed, Mar 03, 2004 at 05:01:50PM -, [EMAIL PROTECTED] wrote:
> But surely the aforementioned functionality should be exposed to the
> developer in a similar manner as he/she would expect - whereby all physical
> drives should be available through the call as they are in Windows and .Net.
> 
> I am merely thinking of portability between the two platforms, and why have a
> method which tells you what you already know - you have a "/"...

If you are writing something that is portable between the two platforms
then you _Do not_ know that you have a "/". You might have a "C:\" and
an "A:\", you might have a "/", or you might have something else if you
are running on something weird like VMS or RiscOS. 

Think about an app that was written without knowing about Unix, to find
a file, you would enumerate the drives, then enumerate the content of
each. On windows that will work fine, on Unix it would take N times
longer, as the file system is searched many times.

That said, I can see that you might want to expose the set of mount
points to the developer but I think that should be somewhere else in the
API not here.

David
-- 
 There's no money, there's no weed. It's all
   been replaced by a fucking big pile of corpses.
-- Lock, Stock and Two Smoking Barrels
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Simple code - differences in output between mono & .Net

2004-03-03 Thread David Sheldon
On Wed, Mar 03, 2004 at 12:31:16PM -0500, Nick Berardi wrote:
> To add one more thing.  With NTFS just like in Linux, you can mount drives
> at various points in the OS.  Say I wanted to mount partition 2 in partition
> 1.  So I have the C:\ as partition 1 and I can then put partition 2 at
> C:\Data\.  So the OS's aren't much different in the concept of mounting.

In that case would getLogicalDrives return "C:\" or { "C:\", "C:\Data"}
?

David
-- 
I wish my keyboard had a SMITE key
-- J-P Stacey
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Debugger problem

2004-03-04 Thread David Mitchell
I'm trying to run some code through the debugger but I'm having trouble 
setting breakpoints.

I can set a breakpoint using:

break "Sandbox.cs" : 6

But this is on a very simple project. When I try breaking on a file in 
the XSP project (specifically XSPApplicationHost.cs:303) I get this error:

$ break "XSPApplicationHost.cs" : 303
No method contains the specified file/line.
Has anyone had much luck with debugging Mono apps, or how do other 
people do it?

Cheers
--
David Mitchell
Software Engineer
Telogis
NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] ByteFXData and mysql under linux

2004-03-07 Thread David Marsal
I run Debian with a fresh mono cvs installation

sqlsharp.exe give me the following :

===

Welcome to SQL#. The interactive SQL command-line client
for Mono.Data.  See http://www.go-mono.com/ for more details.
   
   
Type:  \Q to quit
   \ConnectionString to set the ConnectionString
   \Provider to set the Provider:
 {OleDb,SqlClient,MySql,MySqlNet,Odbc,DB2,
  Oracle,PostgreSql,Npgsql,Sqlite,Sybase,Tds)
   \Open to open the connection
   \Close to close the connection
   \e to execute SQL query (SELECT)
   \h to show help (all commands).
   \defaults to show default variables.
   
   
   
   
Provider is not set.
   
   
ConnectionString is not set.
   
   
SQL# \Provider MySqlNET
The default Provider is LOADEXTPROVIDER
  Assembly: ByteFX.Data
  Connection Class: ByteFX.Data.MySQLClient.MySQLConnection
 
SQL# \ConnectionString Server=localhost;
Database=monotest;User ID=monotest;Password=monotest;Pooling=false;
 
SQL# \Open
Attempt to open connection...
Loading external provider...
Error: unable to load the assembly of the provider: ByteFX.Data :
Argument cannot be null
Parameter name: type
 
SQL#

===

and still no success to see ByteFX/Mysql running on the web with xsp
I have trid to use the CVS of ByteFX the make process must be adapted
and I have no good enough skills 


___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] MonoDevelop freezes

2004-03-07 Thread David Mitchell
I've just downloaded and built the mono-develop 0.1 release but after 
using it for a few minutes it will freeze. I don't have to do anything 
to reproduce this, it is unpredictable but tends to happen after using 
it for a short period of time. I have built against:

gnome-vfs: 2.2.2
gtk-sharp: 0.17
gtksourceview: 0.8
gtksourceview-sharp: 0.1
mono: 0.30.2
Help?
--
David Mitchell
Software Engineer
Telogis
NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Debugging mono apps

2004-03-07 Thread David Mitchell
I'm having difficulty debugging an ASP.Net application. I'm running on 
Xsp on Mono 0.30.2. How should I go about debugging this? I've tried 
using mdb but I can't set break points using this. I've also tried using 
gdb but I am unsure of how to get gdb to break on my code.

How do others debug their asp.net applications? Or, for that matter, 
their plain .net applications running on mono?

--
David Mitchell
Software Engineer
Telogis
NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] What debuggers people use

2004-03-08 Thread David Mitchell
What do other people use to debug their mono apps? Obviously there is 
the option of using Trace and Debug commands, but what about other 
tools? How do you use gdb to debug a mono app? I can't figure out how to 
get into my managed code (the website is light on documentation for this 
technique).

I can't manage to set breakpoints using mdb either.

Help!
--
David Mitchell
Software Engineer
Telogis
NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Problems building from CVS

2004-03-11 Thread David Mitchell
I just downloaded the latest CVS of mcs and mono and did the following:

mono$ ./autogen.sh
mono$ make fullbuild
And I got this error:

System.Security.Cryptography/HMACSHA1.cs(110) error CS0246: Cannot find 
type `HMAC'

I found this error previously on the list and people mention that the 
HMAC class only exists in NET_1_2 so I did the following (which seems to 
have worked)

mono$ makke PROFILE=default fullbuild

Will this have broken or crippled my mono installation in any way?

--
David Mitchell
Software Engineer
Telogis
NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] formatter.Serialize

2004-03-14 Thread David Sheldon
On Sat, Mar 13, 2004 at 11:10:36PM -0500, Warren Matthews wrote:
> Hi
> 
> I'm stuck trying to serialize a hash table. I found an example at
> [snip] 
> But I get
> $ mono Test.exe
> 
> Unhandled Exception: System.ArgumentException: Cannot use prefix with  
> an empty namespace.

This is fixed in latest CVS:

2004-02-19  Jean-Marc Andre <[EMAIL PROTECTED]>
  * SoapWriter.cs, SoapCommon.cs:
Bug fixed: XmlTextWriter.WriteAttributeString() was used
with its "namespace" parameter set to null whereas it shouldn't.

David

-- 
So remember when you're feeling very small and insecure
How amazingly unlikely is your birth,
And pray that there's intelligent life somewhere up in space,
'Cause there's bugger-all down here on Earth. (Monty Python)
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] formatter.Serialize

2004-03-14 Thread David Sheldon
On Sat, Mar 13, 2004 at 11:10:36PM -0500, Warren Matthews wrote:
> Hi
> 
> I'm stuck trying to serialize a hash table. I found an example at
> 
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/ 
> html/ 
> frlrfsystemruntimeserializationformatterssoapsoapformatterclassserialize 
> topic.asp

As part of having a look at this, I looked at the serialised form of
this hashtable in both mono and MS.NET. They are quite significantly
different. Mono cannot deserialise the MS version, and MS cannot
deserialise the Mono version. 

Is this something that is important to fix at the moment? If so, where
should I go looking for the code that does this?

I attach the MS and Mono versions of the serialised hashtable.

David

-- 
"OK. Enter system password, out of ttys, can't fork process, Panic Double
Panic, can't open socket, bad magic number, NO ROUTE TO HOST, hme is down,
stale file handle, /var is full, and it's January 1970."
- sing, sing, halt


DataFile.soap-MS.gz
Description: Binary data


DataFile.soap-Mono.gz
Description: Binary data


[Mono-list] XSP stops responding

2004-03-14 Thread David Mitchell
I'm running an ASP.Net application through XSP on the CVS version of 
mono. XSP has a habit of simply stopping after a few pages have been 
requested from it. I can still close it with Ctrl-C. Basically it just 
serves a few pages and then all managed code stops executing. Has anyone 
else experienced similar problems or have any suggestions?

Regards
--
David Mitchell
Software Engineer
Telogis
NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] XSP stops responding

2004-03-14 Thread David Mitchell
More on this, after running this under different environments (Windows 
w/ .Net) and trying various apps I've discovered this only happens when 
running on mono and running a codebehind page. Even the codebehind test 
page in the xsp package has this freezing problem. This fails on 
mod_mono too. I suspect this is a problem in the Mono Class Libraries 
for codebehind (Gonzalo?).

Help would be appreciated.

--
David Mitchell
Software Engineer
Telogis
NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] XSP stops responding

2004-03-14 Thread David Mitchell
I've discovered this only happens when 
running on mono and running a codebehind page.
Ok, I'm wrong. This isn't limited to codebehind and this happens on any 
of the xsp tests. Try opening any of the xsp tests in your browser 
(through xsp of course). Say server-side-object.aspx, but it doesn't 
matter. Hit refresh repeatedly (it doesn't have to be fast) and 
eventually you'll have your browser waiting for the page to load and a 
frozen xsp.

This isn't just my setup as I have two other boxes with different 
configurations and they both have this problem too.

--
David Mitchell
Software Engineer
Telogis
NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] XSP stops responding

2004-03-15 Thread David Mitchell
We are aware of this problem (not only codebehind). I think there's
already a bug report for it.
Is this problem being actively chased? We cannot use XSP or mod_mono for 
 any serious work because it hangs after 10 or so requests (it varies). 
This is often not even enough to load a whole page. Do other people use 
xsp much?

Also, Gonzalo, what do you use for debugging?

Finally, if you have an idea of where this bug is occuring, then let me 
know. I am happy to have a crack at fixing it.

--
David Mitchell
Software Engineer
Telogis
NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] XSP stops responding

2004-03-15 Thread David Mitchell
I don't know if this will have anything to do with it, but all the 
machines we are running here use RedHat 9.

--
David Mitchell
Software Engineer
Telogis
NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] XSP stops responding

2004-03-15 Thread David Mitchell
Juraj Skripsky wrote:
Hi David,

What version of glibc do you have? Try updating to the latest version
(2.3.2-27.9.7).
I've had similar problems with mono on several machines which were all
running freshly installed RH9. XSP was hanging sometimes.
The same application ran perfectly on two other machines running Fedora
Core 1 and RH9 with XD-unstable and lots of updated packages. After
installing the latest glibc-rpms on the virgin RH9 box, everything worked
flawlessly (I also installed the latest "glib2"-rpms from XD unstable, but
those probably don't matter.)
Maybe this helps, good luck!

- Juraj



Thanks, I will give that a crack.
--
David Mitchell
Software Engineer
Telogis
NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] XSP Stops responnding

2004-03-15 Thread David Mitchell
Another symptom I noticed is that putting a broken one in the back 
ground and then bring it back to the foreground results in:

sem_wait in handler failed
Aborted
Putting a non broken one in the background and then bring it back works 
with no problem.
Following the advice given by Juraj Skripsky:

> What version of glibc do you have? Try updating to the latest version
> (2.3.2-27.9.7).
>
> I've had similar problems with mono on several machines which were all
> running freshly installed RH9. XSP was hanging sometimes.
The background/foreground problem Ralph mentioned was fixed. Also, now 
XSP is much more stable.

--
David Mitchell
Software Engineer
Telogis
NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Image.FromStream Patch

2004-03-18 Thread David Mitchell
I have written a patch to add the Image.FromStream method to Mono.

Index: Image.cs
===
RCS file: /mono/mcs/class/System.Drawing/System.Drawing/Image.cs,v
retrieving revision 1.31
diff -r1.31 Image.cs
65a66,75
>   public static Image FromStream (Stream stream)
>   {
>   return new Bitmap (stream);
>   }
>
>   public static Image FromStream (Stream stream, bool useECM)
>   {
>   return new Bitmap (stream, useECM);
>   }
>
--
David Mitchell
Software Engineer
Telogis
NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] formatter.Serialize

2004-03-18 Thread David Sheldon
On Sun, Mar 14, 2004 at 12:04:20PM +, David Sheldon wrote:
> As part of having a look at this, I looked at the serialised form of
> this hashtable in both mono and MS.NET. They are quite significantly
> different. Mono cannot deserialise the MS version, and MS cannot
> deserialise the Mono version. 

I have now committed patches that serialise Hashtables in the same way as
MS.NET. Attached is the same data serialised by my new code.

David
-- 
   "Throwing it all away refers to the activity of coming along and
 fiddling with your program, making it less efficient and incorrect."
  -- Carroll Morgan


DataFile.soap.gz
Description: Binary data


[Mono-list] Linux - Mono - ByteFX - Mysql on a personal web site

2004-03-19 Thread David Marsal
Hi,

I would like to know if, currently, anybody is successfully using ByteFX 
with mono to build a personal web site base on asp.net/mysql under linux ?
If yes, could I get his configuration, the mono and Bytefx versions 
used, and the sources of his site in order to try to run it on my own PC.

Thanks a lot for your help.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Windows.Forms on Debian

2004-04-08 Thread David Wright
I know that WinForms issues have been dealt with on this list before, 
but I was unable to find this one addressed.

I am using the Debian packages of Mono 0.31; the libwine package is also 
installed. mcs has no problem compiling a simple WinForms app that uses 
MessageBox.Show.

When I first ran the resulting .exe, it complained about not finding 
libuser32.dll.so and libwinnt.dll.so. I could fix the first problem by 
creating a simlink
   /usr/lib/libuser32.dll.so -> /usr/lib/wine/user32.dll.so
But there is no winnt.dll.so in libwine or any other Debian package. If 
I map libwindt.dll.so to some random .dll.so, mono complains about 
failing to load the function PROCESS_InitWine, so apparently it's 
looking for whatever DLL contains that function. Can anyone here help?

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono 0.31 segfault

2004-04-13 Thread David Sheldon
I think that this is bug 55253.

http://bugzilla.ximian.com/show_bug.cgi?id=55253

Are the debian packages compiled with the  --with-sigaltstack=no 
option? 

Hmm, I wonder if this works for anyone else. It definitely doesn't work
on debian for me if I don't use that option.

David

On Tue, Apr 13, 2004 at 10:29:10PM +0400, Vadim B. Guzev wrote:
> This code also hangs on Linux 2.4.25 without throwing any exceptions or
> segfaults!
> 
> Best regards,
> Vadim B. Guzev
> http://u.pereslavl.ru/~vadim/MCSharp/
> 
> - Original Message - 
> From: "Stuart Ballard" <[EMAIL PROTECTED]>
> To: "mono-list" <[EMAIL PROTECTED]>
> Sent: Tuesday, April 13, 2004 10:19 PM
> Subject: [Mono-list] Mono 0.31 segfault
> 
> 
> > Running mono 0.31 from debian packages. The following simple test 
> > program crashes mono with a segmentation fault:
> > 
> > public class MainClass {
> > public static void Main() {
> > object o = null;
> > Console.WriteLine(o.ToString());
> > }
> > }

-- 
"If you used a linear search on a telephone book, you
   probably wouldn't be sitting here..." -- Carroll Morgan
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Master Pages

2004-04-13 Thread David Wright

What is the status of Whidbey APIs in mono? There has been at least one
semi-public release of Whidbey bits, at PDC. More will be coming, in the
form of Whidbey betas. When people implement the new APIs for mono, will
they be accepted directly into the appropriate System.* namespaces, or
will they go into a "holding pen" (Mono.Whidbey.Ssystem.*?) until after
v1.0?

For example, is there any plan to include the master page and site map
controls in mono v1.0? These represent some of very usefulest new stuff
for ASP.NET.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] GNU Readline style input for mono

2004-05-18 Thread David Mitchell
Is there currently any easy way to have readline style input in a .Net 
console application under mono? So things like being able to press the 
up key to recall history and inline editing.

Thanks
--
David Mitchell
Software Engineer
Telogis
NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] RE: Is it Mono safe?

2004-05-20 Thread David Waite
In the end, the 'Microsoft may attempt to screw Linux users over' is 
not the real issue, but a distraction point to help carry FUD of this 
sort. Patent issues are not restricted to a particular vendor or 
product; there are several other open-source and free-software projects 
which may very well infringe on patents.

Some projects, such as the Linux kernel, have taken a reactive view of 
patents - knowing that a patent exists just means they are liable for 
punitive damages, so patent issues should just be worked through as 
they come up case-by-case.  Due to this fear of Microsoft and the 
opportunity of mono to become fundamental infrastructure over the 
coming years, a more proactive approach is being taken - a legal review 
leading up to 1.0.

So perhaps the correct response is not to counter Microsoft behavioral 
maybes with counter-conjecture, but instead to say that there is active 
work to identify legal issues. Indeed, a 1.0 release of mono might very 
well be "safer" w.r.t. to patents than most other free software.

-David Waite
On May 20, 2004, at 1:30 PM, Mark Easton wrote:
Look over here:
http://www.gnome.org/~seth/blog/mono
and here:
http://www.osnews.com/comment.php?news_id=3D7094

This is bad news :(
The first link is not news but rather random blog musings and the 
second
link is more akin to personal opinion than news.

How do you convince somebody to programming in Mono if he already read
that
news?
While there's a strong urge for Linuxites to dislike any technology
that's related to MS, real developers should be without technical
prejudice and the benefits of Mono pretty much speaks for themselves.
Sure there's a chance that MS might do some patent slapping at some
point, but is it really going to be worth their while?  After all, Mono
makes it a lot easier to integrate Windows solutions with 
cross-platform
software and it makes .NET much more attractive for organisations 
who're
afraid of vendor entrenchment or have reams of legacy software running
on assorted boxes.

I personally feel that MS is going to be over the moon when Mono
stabilises as it will help MS to push their products onto non-Windows
platforms and it will help MS push .NET to organisations that might
otherwise consider Java and OSS.
If you'll forgive the blasphemy, perhaps what's required for Linux to
finally 'succeed' on the desktop is for MS to release .NET versions of
their product lines - Imagine the joy of Windows Media Player on Linux!
Mark
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] New web site up

2004-06-10 Thread David Waite
On Jun 10, 2004, at 4:25 PM, Ben Maurer wrote:
On Thu, 2004-06-10 at 16:59, Erik Dasque wrote:
As some of you may know, we're moving to a new site (the old one will
be phased out eventually) and to new content and design. We'd love
feedback on it before we push it out officially :
First, I love this. It looks *GREAT*. Even if none of these comments 
are
acted upon, it will still be great.
I agree!
Now, for comments:
I agree! ;-)
I'll add a few additional comments, take them with as many grains of 
salt as you like.

The navigation is not confusing, but is a bit overwelming. There are 
the main sections at the top, the navigation bar on the left, and also 
buttons at the the top right. None of these are 'authorative' - the 
download button for example goes to the 'about mono' tab look, but is 
not navigatable via the about bar on the left.

Also, the submenus on some items are hidden, which makes it confusing 
to find the 'licensing and patents' section for instance, without 
knowing it appears under the 'faq' section. The look of submenu items 
was not sufficient for me to realize (at first) that I was actually 
looking at a menu with embedded items. Also, clicking on the 'faq' link 
(without page content changing to show I was on a new link) was 
confusing to me, although I have used the internet for long enough to 
quickly figure it out.

Some links in the navigation system and buttons at the top send you to 
an external site; there is no visual indicator that this will happen.

The 'about' navigation bar could be flattened if:
The FAQ was moved to 'using mono', with the general section refactored 
into some sort of 'relationships' page (with novell, gnome, ecma, and 
microsoft)

Resources were moved to 'using mono', leaving 'The Mono Team' and 
'Contact Us'. Actually, 'resources' is not the best categorization, 
since the whole site is a meta-resource for four types of people.

Ok, I'll stop now, before I suggest changing it to four main categories 
(targeting each of 'person discovering more about mono', 'user of mono 
for end-user applications', 'developer using mono', and 'mono 
contributors')

-David Waite
- The orange developers section looks way too bright. Todd commented on
IRC that the using section green had once been bright but was changed. 
I
think a similar change for the orange would be good.

- On the home page, the XML button does not match the blue color theme.
- Without JavaScript, there seems to be no way to navigate the menu
system.
- On the `Contact Us' button at the top, I expected to see IRC contact
information, and a link for bugzilla. Also, a link to the mailing list
page would be nice.
- http://www.mono-project.com/about/mailing-lists.html:
  - mono-list is missing
  - Could we cut down on the size of the mono-devel-list description. 
It
makes lots of stuff go below the fold

- http://www.mono-project.com/downloads/index.html
  * We should have an `older releases' page that has everything
before, say, beta 1.
  * It might make sense to group like:
Source
...
Red Hat
Red Hat Linux 9
Fedora Core 1
SUSE
...
Windows
...
Mac OS
...
I think that would create less visual clutter.
  * Does Fedora have its own logo? Should we use it rather than Red
Hat's.
  * Does anyone need a (tm)?
- The team page does not look as professional as everything else. Could
we have a redesign of that to match the rest. Also, on this page the
`tab' thingy at the top has a large gap below it.
- In the menu system, there needs to be a sort of `you are here'
indicator. For example, the current page could be in bold, and would 
not
be a hyperlink, or it could be a different color etc.

- http://www.mono-project.com/using/emacs.html is a dead link
- Where did the whitepaper miguel and I wrote about performance go?
- http://www.mono-project.com/using/mcs.html is out of place in the
`using' section. It contains almost nothing about using mcs. IMHO, the
first few paragraphs of text should stay, and we should insert links to
reference articles.
- In the menu system, you are inconsistantly using Title Caps and
Sentence caps. For example:
  * Mono and Gtk# tutorials
  * The Mono Runtime
  * CVS Write access (this one has BOTH methods!)
Just pick one and stay with it.
- http://www.mono-project.com/contributing/compiling.html does not have
`make bootstrap' documented
- http://www.mono-project.com/about/applications.html should be 
updated.
For example, MonoDevelop is not on there. Also, obsolete programs (eg,
the debug

[Mono-list] Presentation ideas

2004-06-20 Thread David Sheldon

Hi,

I will be giving a presentation to my local LUG introducing them to
Mono. Does anyone else have a set of slides and/or demos that will show
off features that mono can do that MS.NET doesn't, or good visual
features of mono?

I plan on writing an ASP app "live" and showing it running on a linux
machine, running a GTK# app on both Linux and Windows, and maybe risking
writing a simple winforms app and ruinning that on Linux. Is all of this
likely to work as demos? 

David
-- 
DISCLAIMER:
Use of this advanced computing technology does not imply an endorsement
of Western industrial civilization.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] XSP - Experiences?

2004-06-23 Thread David Mitchell
Short answer. No.
Long answer. Not yet. We started using XSP a few months ago, in that 
time it has come a very long way very quickly. Now it is pretty solid. I 
haven't seen it in a high traffic situation yet but frankly I'm not to 
confident that it's ready. Time will tell of course and I think it will 
definitely get there, I don't feel it is there quite yet but I don't 
think it will be long.

--
David Mitchell
Software Engineer
Telogis
NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] libgdiplus not found

2004-06-30 Thread David Mitchell
I've installed mono, libgdiplus and xsp. When I try to run my web app, 
when it gets to a place where it uses libgdiplus I get a dllNotFound 
exception : gdiplus.dll

Libgdiplus is definitely installed. Am I missing something? It used to 
work, but now I'm using mono 1.0.

--
David Mitchell
Software Engineer
Telogis
NOTICE:
This message (including any attachments) contains CONFIDENTIAL
INFORMATION intended for a specific individual and purpose, and
is protected by law.  If you are not the intended recipient,
you should delete this message and are hereby notified that any
disclosure, copying, or distribution of this message, or the
taking of any action based on it, is strictly prohibited.
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Mono: Post 1.0 plans and development update.

2004-07-16 Thread David Waite
I have always run into pretty fundamental problems while trying to
port my ASP.NET apps over to run on xsp. Much to the credit of
gonzalo, these issues have usually been fixed very quickly (and I've
supplied a patch or two as well), but I've always run out of time
before I could get my app functioning under xsp.

Solid ASP.NET support is very important to me within mono, ASP.NET 2.0
support is also going to be important to me soon.  Is this work for an
improved xsp/mod_mono taking place in the 'xsp' module, or in a
separate module? Is there a road map for xsp? Has there been any work,
or are there any plans, to support the ASP.NET 2.0 features?

How can someone like myself (who unfortunately is very spotty in terms
of time he has to contribute to mono) make xsp/mod_mono better? Are
there bite-sized improvements I could tackle?

-David Waite

On Fri, 16 Jul 2004 11:12:58 -0400, Miguel de Icaza <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> > I use mono essencially to make WebApplications,  and  i can't seen new
> > good features in that area. For example the XSP sucks. We cannot use
> > this kind of server in a production environment
> >  and i think this component should  evolute for this server work as
> > iqual as IIS.
> 
> We have been working on an improved version of XSP/mod_mono, but if you
> are using it and experiencing problems, we need to know about them.
> 
> If we do not know about them, it is very hard for us to fix the
> problem.  We have a test suite and various programs that we run against
> it, but it is not enough.
> 
> 
> 
> Miguel
> ___
> Mono-list maillist  -  [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list
>
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Problem with XmlTextReader

2004-07-21 Thread David Waite
On Thu, 22 Jul 2004 03:14:37 +0900, Atsushi Eno <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> Assuming you also wanted to reply to the list...
> 
Oops :)

> David Waite wrote:
> 
> > I might be misunderstanding the problem, but...
> >
> > It seems like the stream could simply be Read() from; if there is no
> > data, the read will block, if there is data it can go into an internal
> > buffer. That buffer gets examined to see if there is enough
> > information to identify and represent the next event in the pull
> > parser; if not, you call Read() again, which may block again. MoveTo*
> > and Read* methods will just keep reading until the conditions
> > specified by the method are satisfied.
> 
> What I've written in the previous post is "how Read() events do not
> match with the *required* text stream consumption for one Read() call".
> The TextReader (stream) is likely to be set as empty (not set any
> contents) and thus it easily freezes. In such case are those stream
> developers aware of how XmlTextReader consumes the stream at any time?

My misunderstanding - I thought you were saying in your previous
message that reading from the stream only when a Read() or Next*() was
called was impossible; it is possible, because you are doing it
already in your code :) What is infeasable is reading byte-by-byte,
just enough to determine the node type.
 
Yes, a Stream Read(byte[], int, int) is not meant to block until the
length is met. You may read more into an internal buffer than is
needed to represent the next event, but you will not block waiting for
more than needed.

> (BTW MoveTo*() never consumes the stream. Those methods must be
> available for iterating attributes.)

Sorry, yes, only MoveToContent() performs reading.



-David Waite
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] C# Functionality

2004-07-22 Thread David Waite
C# has operator overloading, although some care must be taken as these
operators are different functions with different rules than things
like IComparer and Object.Equals().

C# does not have friend functions; it instead has the idea of an
'internal' access, where just the executable or library being built
has access, allowing you to still restrict third parties from
accessing certain features of your objects.

-David Waite

- Original Message -
From: Rohit K Gupta <[EMAIL PROTECTED]>
Date: Fri, 23 Jul 2004 09:44:43 +0530
Subject: [Mono-list] C# Functionality
To: MONO <[EMAIL PROTECTED]>


Hi to all,
 
i was wondering about the fact that 
as C++ provides for Operator Overloading and Friend Functions
,does C# Provide such functionality?
Operator overloading is as its name implies
we can define operator functionalities for user defined classes
 
and friend functions are those which can be defined outside the class
but declared friend to the user defined class so that it can access
private memebers of the class.
 
now  by friend where i am confused  is 
in C# we can define friend classes, members and  functions but those
are part of class and can be accessed in same assembly only by making
the instace of the class
whereas  the c++ friend function can be called without instace of
object but just by passing it in arguments
 
 
this blurs my c++ concepts
am i thinking right or worng?
just help me
 
Thanks & Regards
Rohit
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] MS ASP .NET Bug

2004-07-23 Thread David Waite
This is not a bug; the  just takes precidence over code
structure; the contents of the script block is interpreted by a
separate engine. Without knowing the grammar of the language you are
using for the script block, the parser has no way of knowing if

 sql += @"

is a valid statement or not.

As someone said, you should divide up the script close tag in your
code. Something like a CDATA block will not work, at least not with
the MS implementation (which appears to be regexp-based rather than
having a real grammar). Another option would be to separate your code
from the page.

-David Waite

On Fri, 23 Jul 2004 11:36:18 -0600, Andrew Arnott <[EMAIL PROTECTED]> wrote:
> Answer below.
> 
> > so I wonder if it would happen in Mono too. The bug is simple, supose we
> > have the following in an aspx:
> > 
> >void ProcessClick( object sender, EventArgs args )
> >{
> >   string sql = @"<script language='javascript'>";
> >   sql += @"alert('";
> >   sql += nome.Value;
> >   sql += "');";
> >   sql += @""; // Here is the PROBLEM!
> >   this.RegisterClientScriptBlock( "JJ", sql );
> > }
> > 
> > The parser  will only "copy" to the class definition the code from  > runat=server> to <script>. The problem is that he thinks that the
> > "" literal is the tag end... So in the class definition we will
> > have only:
> >
> >   void ProcessClick( object sender, EventArgs args )
> >{
> >   string sql = @"";
> >   sql += @"alert('";
> >   sql += nome.Value;
> >   sql += "');";
> >   sql += @"
> >
> > Witch produces a compiler error. Would this happen in Mono? If not, should
> > it happen?
> 
> I can't answer the "will it happen in Mono question", but a solution to the
> problem is to just divide your  tag up:
> 
> sql += @""; // Here is the SOLUTION!
> 
> That will work in any implementation that has the bug.
> 
> 
>
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Cross-platform GUI.

2004-07-26 Thread David Burnett
On Mon, Jul 26, 2004 at 11:02:36AM -0400, Dan Winship wrote:
> > Amazing.  I didn't that Gtk itself was ported to Mac OS X.
>
> To clarify, The Gtk X11 backend works under X11 on OS X. There is no
> port that uses CoreGraphics.
And that's going to be a major problem with regards to the OSX community 
accepting Mono/GTK# apps in IMHO.

The Mac favouring Mono hackers would be doing us a great favour if they 
could commit some resources to a 'native' OSX GTK port. The current 
ports are pretty stalled. GTK-OSX is nearly there but is only GTK 1.2,
GTK-Quartz didn't get very far at all.

The problem is that porting GTK needs some experienced GTK / X11 hackers 
to help out. People who know exactly what events should be fired and when.

Dave
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Cross-platform GUI.

2004-07-26 Thread David Burnett
Dan Winship wrote:
On Mon, 2004-07-26 at 19:57 +0100, David Burnett wrote:
On Mon, Jul 26, 2004 at 11:02:36AM -0400, Dan Winship wrote:
> > Amazing.  I didn't that Gtk itself was ported to Mac OS X.
>
> To clarify, The Gtk X11 backend works under X11 on OS X. There is no
> port that uses CoreGraphics.
And that's going to be a major problem with regards to the OSX community 
accepting Mono/GTK# apps in IMHO.

'native' here would mean "uses Mac-specific API calls to draw Gtk
widgets according to the current Gtk theme". 
Yes
The resulting app would
look *exactly* the same using the native Gtk port as it would using the
X11 Gtk port, it just wouldn't require X11 to be running. I don't think
this would really be any more palatable to mac users than the straight
X11 version.
We'll have to disagree on that point. I think that the look and feel 
problem is secondary to the requires X11 problem.
Look and Feel can be worked around to a large degree with a decent port
and an aqua-ish theme. GTK-OSX used native components in a couple of 
area's (buttons and checkboxes) which helps a great deal.

With X11 GTK# you're going to have to explain what
Gtk-WARNING **: cannot open display:
means to a million OSX users and why OSX users need to run
open-x11 mono myapp.exe {I get -bash: open-x11: command not found ??}
or start X11.app (where's that ? / Oh I didn't install that) first
and then run mono myotherapp.exe
That's going to annoy OSX user's that are used to things 'just working',
and put off OSX developers.

(Alternatively, you could use one of those widget toolkits that
implements a native UI on any platform. But Gtk isn't one of those.)
Which is my point, if Ximian / Novell are serious about pushing GTK#
as a primary alternative to the .NET framework with regards to Macs
as well as Linux and Windows then its needs to be 'one of those'.
Dave
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Cross-platform GUI.

2004-07-26 Thread David Burnett
Erik Dasque wrote:
The Mono favoring Mac hackers would be doing us a great favor if they 
could commit some resources to a 'native' OSX GTK port. The current 
ports are pretty stalled.

Or actually, Apple could/should.
It would be nice wouldn't it, but unlikely unless you know something
the rest of us do not, like Apple have been taking an interest in Mono.
I would guess that Apple would more likely be interested in the cocoa# 
end of things, although their Swing port was above and beyond the call 
of duty :-).

I just think that any Mac coding Mono hackers whether they be Ximian 
employees or the Mono community hackers have the CoreGraphics / X11 / 
GTK knowledge needed to successfully complete a GTK+ port.

Dave

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Cross-platform GUI.

2004-07-27 Thread David Burnett
Fabian Fagerholm wrote:
>You may want to take a look at the following:
>http://www.apple.com/macosx/features/x11/
>http://www.apple.com/macosx/features/x11/download/
I know about them thank you.

Unfortunately double clicking of the gimp executable I got from 
darwinports still does not lunch X11.app or gimp. Neither does running 
it from the Terminal.

I get an error that says
Gtk-WARNING **: cannot open display:
does that help ?

And that's the situation I want GTK# apps running on OSX
to avoid.
I mean where talking about users who do not know what
to do with a Java app if double clicking on the jar file
does not run the program (not a problem on OSX but still
a problem in Linux and some Windows versions). Any one
who releases a GTK# app will be get exactly what I got
for planetGenesis* only from OSX users who have no idea
about the command line, *nix and X11
*
http://www.3dcommune.com/3d/forum.mv?Terragen+read+8910740664
start at comment 4 to see exactly what fun releasing a Java app
can be. Believe me this is not a isolated incident.
Dave

___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Cross-platform GUI.

2004-07-28 Thread David Burnett
Miguel de Icaza wrote:
Hello,

Which is my point, if Ximian / Novell are serious about pushing GTK#
as a primary alternative to the .NET framework with regards to Macs
as well as Linux and Windows then its needs to be 'one of those'.

We will;   Give us some time, we are on the case ;-)
Brilliant, and  I look forward to it.
Dave
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Cross-platform GUI.

2004-07-28 Thread David Burnett
Dan Winship wrote:
>They allegedly have cross-platform widgets, but
>Thunderbird and FireFox just suck on OS X
In your opinion they suck not mine. Yes, I'm posting this
from Thunderbird because all the NNTP clients I've tried that follow
the Apple HIG are a load of rubbish, so I use Thunderbird for that
and its only natural I use it for email too.
Before Thunderbird came along I was using PAN with all the problems of 
using an X11 app on OSX, starting up X11,lack of drag and drop 
interaction, fonts with no aliasing (bad GTK compile), limited clipboard 
etc, rather than using the other apps. After using Thunderbird for five 
minutes I did not even notice where it didn't follow Apples HIG.

In the end it comes down to one simple decision, would you
rather use
i)a piece of software with out perfect adherence to Apples HIG
(GTK# native)
or
ii)a piece of software with out perfect adherence to Apples HIG and 
limited clipboard, no drag and drop etc (GTK# via X11)
or
iii)no app at all ? .

I would go for i) every time, and lets face it not many non Mac 
developers are ever going to try Cocoa# unless the GNUStep guys take an 
interest :-)

Dave
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Cross-platform GUI.

2004-07-28 Thread David Waite
As a developer, I would go for i), and if the UI bothers me, attempt
to change it, possibly going to cocoa#.

(Puts on FUD Hat)
Java has a very bad reputation because of the poor quality of UI ports
to the mac - I've seen many cases where tools are marked as having mac
versions as soon as a user reports that the software runs on the mac.
As result, most of the mac users I have spoken to avoid downloading
applications with the word 'Java' on their homepage. The java apps
which get downlaoded and used on the mac are ones which do not
advertise the fact.

I know gtk# will have some option for drawing natively on OS X. We all
know 90% of GTK apps will ignore Apple HIG (even more than they ignore
Gnome's HIG).

And I unfortunately know that users will avoid my apps if I advertise
'mono' anywhere near their pages, because in user's minds Mono will
equal inconsistent, broken UI.

-David Waite

On Wed, 28 Jul 2004 21:58:33 +0100, David Burnett <[EMAIL PROTECTED]> wrote:
> Dan Winship wrote:
>  >They allegedly have cross-platform widgets, but
>  >Thunderbird and FireFox just suck on OS X
> 
> In your opinion they suck not mine. Yes, I'm posting this
> from Thunderbird because all the NNTP clients I've tried that follow
> the Apple HIG are a load of rubbish, so I use Thunderbird for that
> and its only natural I use it for email too.
> Before Thunderbird came along I was using PAN with all the problems of
> using an X11 app on OSX, starting up X11,lack of drag and drop
> interaction, fonts with no aliasing (bad GTK compile), limited clipboard
> etc, rather than using the other apps. After using Thunderbird for five
> minutes I did not even notice where it didn't follow Apples HIG.
> 
> In the end it comes down to one simple decision, would you
> rather use
> 
> i)a piece of software with out perfect adherence to Apples HIG
> (GTK# native)
> or
> ii)a piece of software with out perfect adherence to Apples HIG and
> limited clipboard, no drag and drop etc (GTK# via X11)
> or
> iii)no app at all ? .
> 
> I would go for i) every time, and lets face it not many non Mac
> developers are ever going to try Cocoa# unless the GNUStep guys take an
> interest :-)
> 
> Dave
> ___
> Mono-list maillist  -  [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list
>
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] about Convert class

2004-08-23 Thread David Waite
This sure looks like you are having an IndexOutOfBoundsException on
dr.GetValue(0), and not the Convert.

On Mon, 23 Aug 2004 15:12:49 +, lamyae Benabdeljalil
<[EMAIL PROTECTED]> wrote:
> I am using mono 1.0, and i have a problem with a lethod of the
> System.Convert class. My statement is :
> Hashkey=System.Convert.FromBase64String(dr.GetValue(0).ToString());
> i get the following error:
> Unhandled Exception: System.IndexOutOfRangeException: Array index is out
> of range.
> in <0x00098> System.Data.Odbc.OdbcDataReader:GetValue (int)
> in <0x00054> (wrapper remoting-invoke-with-check)
> System.Data.Odbc.OdbcDataReader:GetValue (int)
> in <0x003d6> Test:checkkeys ()
> in <0x000cb> Test:Main ()
> 
> Please, can you help me?
> *
> ___
> Mono-list maillist  -  [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list
>
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] Blogging with mono

2004-09-07 Thread David Wright
Can anyone point me to a modified dasBlog that runs under mod_mono? When
I download the current release (1.6.4121.1) and point my browser to it's
default.aspx, I get a NotImplementedException for a Windows registry API
call on top of a deep stack trace. I have, however, seen several
mentions on the web of people running modified versions of dasBlog under
mono.

Alternatively, can someone suggest another .NET blogging app that runs
under mono? The only requirement is that it not require a DB backend --
I want to do everything with flat files.


___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] RE: using Statement in c# and garbage collection

2004-10-13 Thread David Wright

> using (MyResource myObject = new MyClass())
> 
> {
> 
> myObject.DoSomething();
> 
> --   throw SomeException(" Exception thrown."; // assume an exception is
> thrown explicity. 
> 
> }
> What would happen now? Would the myObject get disposed ? Or would it stay ?
> What does the IL code look like in this situation ?? 

I am confused at your confusion. As you yourself pointed out, this is
equivalent to:

MyResource myObject = new MyClass();
try {
myObject.DoSomething();
throw SomeException("Exception thrown.");
} finally {
myObject.Dispose();
}

whether an exception is thrown explicitly or by an invoked method makes
absolutely no difference. The exception gets passed up the call stack,
executing finally blocks along the way.

So to be painfully explicit: yes, myObject gets disposed.

If you really want to see the IL, write compilable code and view it with
ilDasm.



___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Re: Ask Microsoft: Mono support

2004-10-28 Thread David Waite
On Thu, 28 Oct 2004 10:45:40 -0400, Ed Burnette <[EMAIL PROTECTED]> wrote:
> > -Original Message-
> > From: Paolo Molaro <[EMAIL PROTECTED]>
> > IMHO, if they decide to attack Mono, as detailed in the FAQ, if they
> > have patents that can stand in court, we'll remove the features or
> > work around the patents. This may break compatibility, but we have our
> > own code and we'll adapt it.
> 
> I read that in the FAQ. Why not do it now and make mono completely unencumbered? You 
> say that compatibility isn't the primary concern. An IP-free implementation would 
> eliminate any legal doubt that is slowing down commercial adoption. More adoption 
> means more users and developers and a better environment, right?

Thats not really how it works. If there were four active patents
total, and they were all by Microsoft about things within the .Net
Framework - then sure, it would make sense to avoid it. But patents
are a horrible reality of the software engineering environment today.
You really cannot tie your own shoes without violating someone's
patent anymore - and at that point, it really becomes a business and
legal problem.

In addition. the penalties for patent infringement skyrocket if you
knowingly violate a patent. It is far better to just not look, play
ignorant to the whole issue, and be reactionary.

Or to summarize, in response to the 'why not switch now' question, my
follow-on question would be 'to what?' What is there in any software
engineering vertical which is not potentially patent-encombered in the
US? _Every_ open-source project has an equal potential for patent
infringement. Mono just gets a much larger amount of FUD over it
because villifying Microsoft is so easy and fashionable.

> 
> I think you underestimate the paranoia of lawyers, especially at big companies. 
> Although you and I can recognize FUD for what it is, lawyers take more convincing.

When there are enforced patents on ideas like 'plugins' and 'having
one program help another', lawyers really need to change their outlook
on what is the best outlook on patents.

-David Waite
___
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Visual Studio.net 2005 Enterprise Beta 1

2005-02-03 Thread David Waite
I believe Microsoft ties their versions of Visual Studio to particular
releases of .Net. After a final release is available, you may be
motivated to upgrade so that you are using the final versions of the
.Net 2.0 assemblies (and the correct APIs).


On Fri, 04 Feb 2005 09:49:08 -0600, SigmaX <[EMAIL PROTECTED]> wrote:
> Sijmen Mulder wrote:
> 
> >Hi,
> >
> >
> >
> >>obviously that has a limited time license and will expire later on
> >>
> >>* why not download the Personal Edition beta which is (and will remain from
> >>what I understand) for free:
> >>
> >>http://lab.msdn.microsoft.com/express
> >>
> >>
> >
> >If I recall correctly, doesn't the express edition expire, too?
> >
> >
> >
> >
> I've looked everywhere and I can't find that they expire (Not to say
> they don't).  Microsoft's "trial editions" always expire after six
> months, give or take, but do their Betas?  Their so-called "CTP's"
> (Monthly snapshots of dev) are replaced a month later by the next CTP
> and so on, and the Beta is just a more tested and mature version.  Their
> dev model is looking more and more open-source-ish... though I'm certain
> they'll never actually release the code, though they'll be happy for
> heavy developors to file bug reports in the CTP's :-P.
>Can anybody give me a link where it actually says that the
> Enterprise Beta expires after a period?  Or maybe something that says
> you can't use it in production (Read: for-profit) environments?  I've
> got VS 2002 academic, which is only good for educational and
> open-source-ish stuff by the license.  Mono is great, but I'm holding
> out for Winforms before I'm a complete convert :-P.
>Anywho, that's me 2c,
>  SigmaX
> 
> --
> Registered Linux Freak #: 366,862
> 
> "My ISP won't talk to me after lodging a support call for helping gettting 
> ADSL hooked up to a WinXP install running under VMWare under Linux on my 
> XBox."
>'Anonymous Coward,' in a post on slashdot.org
> 
> "For the eyes of the Lord range throughout the earth to strengthen those 
> whose hearts are fully commited to him."
>2 Chronicles 16:9a
> 
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] OSX. Mono 1.1.4 and swf

2005-02-18 Thread David Burnett
I've been waiting to play with the winforms in OSX, and finally had my 
chance after downloading the 1.1.4 binary package. It worked not quite 
as expected, but it ran. Just a few quick observations based on
compiling swf-buttons.cs.

Is SWF on OSX supposed to use X, I thought there was Carbon driver, is 
that just not ready for release yet, is there a magic command line
option I missed?

I had to set DYLD_LIBRARY_PATH to pick up libMonoPosixHelper.0.dylib.
I've compiled the button example code swf-buttons.cs, it runs,
displays the buttons however the font styles are occasionally
wrong, they are not bold or italic etc where they are supposed to be.
Colour wise there's nothing wrong and font size is okay for that button.
Only the buttons up to button17 (TextAlign=TopCentre) are drawn.
button17 is drawn on top of what appears to be the Dock=Bottom
button. The other buttons that should be drawn below button17
are not drawn, unless the form is resized, and that causes other
drawing problems.
Anyway, I wasn't expecting it all to work.
Great work so far I can't wait to see SWF on Carbon.
Dave

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Serializing a Graph ..

2005-02-20 Thread David Waite
the normal serialization is a bag of unique objects with references
between them; formatting with Xml implies a parent/child relationship.
The xml serializer as it exists does not make allowances to directly
create or use ID/IDREF relationships, which is what you really need
for your cyclic data structure.

-David Waite

On Mon, 21 Feb 2005 00:05:00 +, Phillip Neumann <[EMAIL PROTECTED]> wrote:
> 
> 
> Ive just made the same with  BinaryFormatetr, instead of XmlSerialize
> 
> Why does it work? Why does XmlSerilize not work?
> 
> 
> Phillip Neumann wrote:
> 
> > Hello all...
> >
> > Im doing some work with Graph, so create some clases:
> >
> > Node
> > Arc
> > Graph.
> >
> > (A Graph is a list of Nodes)
> >
> > I like the idea about been able to save/load a graph to/from disk.
> > Im trying to XmlSerialize my graph.
> >
> > I have define my graph so, that this cannot be made, becouse:
> > 1.- Node = { X, Y, ListOfOutgoingArcs }
> > 2.- Arc= { StartNode, StopNode, Weight}
> >
> > This definition is circular
> >
> > What do u think is the best to modify, for let the graph been saved to
> > disk?
> >
> >
> > When i run this, i get this:
> > 
> > System.InvalidOperationException: A cirtular reference was detected
> > while serializing an object of type Node
> > 
> >
> >
> > thanks in advance,
> >
> >
> >
> >
> >using System;
> >using System.Xml;
> >using System.Xml.Serialization;
> >using System.Collections;
> >
> >[Serializable, XmlInclude(typeof(Arc))]
> >public class Node{
> >
> >   public ArrayList OutGoingArcs = new ArrayList();
> >   public int X;
> >   public int Y;
> >   public Node(){}
> >   public Node(int x,int y){
> >   X=x;
> >   Y=y;
> >
> >   }
> >
> >}
> >
> >public class Arc{
> >   public int Weight;
> >   public Node StartAt;
> >   public Node EndAt;
> >   public Arc(){}
> >   public Arc(Node n1, Node n2){
> >   StartAt=n1;
> >   EndAt = n2;
> >   n1.OutGoingArcs.Add(this);
> >   }
> >
> >}
> >
> >[Serializable, XmlInclude(typeof(Node))]
> >public class Graf{
> >   public ArrayList Nodes;
> >
> >   public Graf (){
> >   Nodes = new ArrayList();
> >   }
> >
> >   public void Add(Node n){
> >   Nodes.Add(n);
> >   }
> >}
> >
> >public class M{
> >
> >   public static void Main(){
> >
> >   Graf g = new Graf();
> >
> >   Node n1 = new Node(1,1);
> >   Node n2 = new Node(2,2);
> >
> >   Arc a1=new Arc(n1,n2);
> >
> >
> >   g.Add(n1);
> >   g.Add(n2);
> >
> >   XmlSerializer seria = new XmlSerializer(typeof(Graf));
> >   seria.Serialize(Console.Out,g);
> >
> >
> >   }
> >
> >
> >}
> >
> >
> 
> --
> 
> _
> Phillip Neumann
> [EMAIL PROTECTED]
> www.sofsis.cl
> 
> 
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Web Services and patents

2005-05-31 Thread David Waite
There is no application of knowledge on a computer (including writing
a "Hello, World" application) which is completely safe from US patent
lawsuit. There is nothing to prevent someone from having a patent
against the concept of SOAP, or for that matter the concept of XML, or
network-based data interchange. Whether or not these patents could be
struck down in court is another matter.

I suggest you worry less about patents and more about innovation.
Otherwise you will spend so much time learning international patent
law and researching patents that you will never produce anything.
There is no guaranteed safe ground, no matter what programming
language you write your implementation in, or which vendor designed
the API you use. The only sanity comes from not letting the problems
stop you from meeting your potential, and fighting tooth and nail the
problems in the system every chance you get.

-David Waite

On 5/31/05, Pedro Santos Gómez <[EMAIL PROTECTED]> wrote:
> Hi all,
> 
> We're going to start a project which we want to
> develop using Mono. The question is that we are going
> to use Web Services.
> 
> Now, I have mainly 3 doubts about Web Services and
> patents:
> 
> 1st) In the same way I understand that Mono implements
> Windows Forms just for compatibility with .NET, but
> that we can use other gui toolkits (such as GTK# or
> wxNET), or implements ADO.NET for compatibility, but
> we can use GdaSharp, Is there any alternative to the
> .NET stack of Web Services? I mean, an implementation
> of a free library of Web Services (SOAP, not xml-rpc)
> that could substitute System.Web.Services.
> 
> I've read about gnome soup, but in:
> http://cvs.gnome.org/viewcvs/soup/
> I find that las entry is from April 2003, so I'm not
> sure about its current state.
> 
> 2nd) In case there's no mono "alternative", how
> dangerous might be using System.Web.Services in long
> term? I don't need any compatibility with .NET, I just
> want to develop an application which uses Web Services
> in Mono. As far as I understand in:
> http://www.mono-project.com/FAQ:_Licensing
> the Web Services part is not as easy to defend as the
> rest of Mono, and it *could* happen to "remove the
> pieces of code that were covered by those patents",
> keeping Mono as a  great development platform. But how
> could I develop WS?
> 
> 3rd) What would be the worst case in Web Services? All
> I read in FAQs and interviews etc. is that the first
> thing to do in case of problems with patents is
> finding previous art. Being Web Services a standard,
> is it easier to find this? Apache Axis could be an
> example? Or what would be patented are the namespaces
> or something like that?. If this is not possible, I've
> read the next step is to try to change the
> implementation. What does this exactly mean? Different
> API doing the same thing? Or it would be changed just
> inside?
> 
> thank you so much for reading and of course for
> answering, and sorry if my english is not as good as
> could 0:-),
> Pedro
> 
> P.S: I've already read this thread:
> http://galactus.ximian.com/pipermail/mono-list/2003-February/012111.html
> but I'm not sure I get a clear answer, and at that
> time maybe the implementation of web services was not
> as complete as now.
> P.S.2: I don't pretend to create any kind of flame
> with patent issues or something like that, I just
> think that *maybe* patent issues might be even
> smoother with Web Services and I just would like
> anybody to confirm or deny this. Thank you again.
> 
> 
> 
> 
> 
> __
> Renovamos el Correo Yahoo!
> Nuevos servicios, más seguridad
> http://correo.yahoo.es
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] System.Drawing.GDIPlus is it a common problem?

2005-06-02 Thread David Broome
Hello,

I am new to MONO and MDID2 (a Mono app) but I wonder if it have stumbled on a
common problem.

I have a working MONO 1.17 / Mod-mono 1.0.9 / MDID2 0.5.0 server with one
problem.

The problem is the MDID2 "Print View" and "Flash Cards" fails with a:

System.TypeInitializationException: An exception was thrown by the type
initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException:
libgdiplus.so

But yes I have libdgiplus.so in the /usr/local/lib directory (my target was
/usr/local/)

I see from the installwatch that both mono 1.1.7 and the libgdiplus 1.1.7 each
installed it.

I found a few old references to this on the mono list and followed the
suggestion to add it to the mono config as such:



But no luck..   Is this an unresolved issue or do people have suggestions?

The system is ubuntu linux 5 'hoary'.

Dave,
--
David Broome   Programmer_Analyst.FineArts.UVic.CA  /BSc /CNA /MCP
250.721-6307   [EMAIL PROTECTED]FIA 221
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] System.Drawing.GDIPlus is it a common problem?

2005-06-02 Thread David Broome
Quoting Peter Dennis Bartok <[EMAIL PROTECTED]>:

> Did you run 'ldconfig' since installing, just to be safe?

Yes, and thanks for the reply, and it is listed when I do a 'ldconfig -p'

libgdiplus.so.0 (libc6) => /usr/local/lib/libgdiplus.so.0
libgdiplus.so (libc6) => /usr/local/lib/libgdiplus.so

and (odviously) my /etc/ld.so.conf includes /usr/local/lib

but I still get this:

System.TypeInitializationException: An exception was thrown by the type
initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException:
/usr/local/lib/libgdiplus.so
in (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup
(ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
in <0x000bb> System.Drawing.GDIPlus:.cctor ()--- End of inner exception stack
trace ---



Quoting Peter Dennis Bartok <[EMAIL PROTECTED]>:

> Did you run 'ldconfig' since installing, just to be safe?
>
> Peter
>
> -Original Message-
> From: "David Broome" <[EMAIL PROTECTED]>
> To: 
> Date: 02 June, 2005 11:47
> Subject: [Mono-list] System.Drawing.GDIPlus is it a common problem?


--
David Broome   Programmer_Analyst.FineArts.UVic.CA  /BSc /CNA /MCP
250.721-6307   [EMAIL PROTECTED]FIA 221
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] System.Drawing.GDIPlus is it a common problem?

2005-06-02 Thread David Broome
Peter,

Thanks for the clue... it is always the little things.

ldd /usr/local/lib/libgdiplus.so.0 showed " libtiff.so.3 => not found".

I had libtiff4 installed but I refered to the debian site to check which package
 was needed and it showed "libtiff3g" after it was installed all is fine.

Dave,

Quoting Peter Dennis Bartok <[EMAIL PROTECTED]>:

> Make sure that ldd /usr/local/lib/libgdiplus.so.0 doesn't give you any
> unresolved dependencies.
>
> When try running the app after setting the following env vars:
> export MONO_LOG_LEVEL=debug
> export MONO_LOG_MASK=dll
>
>
> Then check the output. It should tell you why it claims it can't find it.
>
> Cheers,
>   Peter
>
> -Original Message-
> From: "David Broome" <[EMAIL PROTECTED]>
> To: "Peter Dennis Bartok" <[EMAIL PROTECTED]>
> Cc: 
> Date: 02 June, 2005 13:21
> Subject: Re: [Mono-list] System.Drawing.GDIPlus is it a common problem?
>
>
> >Quoting Peter Dennis Bartok <[EMAIL PROTECTED]>:
> >
> >> Did you run 'ldconfig' since installing, just to be safe?
> >
> >Yes, and thanks for the reply, and it is listed when I do a 'ldconfig -p'
> >
> >libgdiplus.so.0 (libc6) => /usr/local/lib/libgdiplus.so.0
> >libgdiplus.so (libc6) => /usr/local/lib/libgdiplus.so
> >
> >and (odviously) my /etc/ld.so.conf includes /usr/local/lib
> >
> >but I still get this:
> >
> >System.TypeInitializationException: An exception was thrown by the type
> >initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException:
> >/usr/local/lib/libgdiplus.so
> >in (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup
>
>(ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
> >in <0x000bb> System.Drawing.GDIPlus:.cctor ()--- End of inner exception
> >stack
> >trace ---
> >
> >
> >
> >Quoting Peter Dennis Bartok <[EMAIL PROTECTED]>:
> >
> >> Did you run 'ldconfig' since installing, just to be safe?
> >>
> >> Peter
> >>
> >> -Original Message-
> >> From: "David Broome" <[EMAIL PROTECTED]>
> >> To: 
> >> Date: 02 June, 2005 11:47
> >> Subject: [Mono-list] System.Drawing.GDIPlus is it a common problem?
> >
> >
> >--
> >David Broome   Programmer_Analyst.FineArts.UVic.CA  /BSc /CNA /MCP
> >250.721-6307   [EMAIL PROTECTED]FIA 221
> >
> >
>
>


--
David Broome   Programmer_Analyst.FineArts.UVic.CA  /BSc /CNA /MCP
250.721-6307   [EMAIL PROTECTED]FIA 221
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] Accessing Mono SVN via http

2005-06-09 Thread David Waite
You can of course use http for subversion, it is the default
mechanism, but is not used for the mono project. There is a bit of
extra infrastructure needed to support it, as it uses WebDAV and
relies on Apache 2.

-David Waite

On 6/9/05, Peter Dennis Bartok <[EMAIL PROTECTED]> wrote:
> You don't use http with the svn command. If you want http to download, just
> just use your browser, and use the viewcvs interface to download a tarball.
> For example, this link
> http://svn.myrealbox.com/viewcvs/trunk/MonoDevelop.tar.gz?root=monodevelop&view=tar
> should give you a tarball of the latest monodevelop sources.
> 
> Svn uses it's own protocol, and the urls for svn start with svn:// or
> svn+ssh://
> 
> Cheers,
>   Peter
> 
> -Original Message-
> From: "Aleksandar Dezelin" <[EMAIL PROTECTED]>
> To: "mono-list" 
> Date: 09 June, 2005 05:09
> Subject: [Mono-list] Accessing Mono SVN via http
> 
> 
> When I try to get the latest MonoDevelop source from the svn repository by
> issuing command :
> 
> svn co http://svn.myrealbox.com/monodevelop/trunk/MonoDevelop/
> 
> I get the following result :
> 
> svn: REPORT request failed on '/monodevelop/!svn/vcc/default'
> svn: REPORT of '/monodevelop/!svn/vcc/default': 400 Bad Request (
> http://svn.myrealbox.com)
> 
> How can I download the latest source from the svn repository via http? (I
> must use http - I'm behind a proxy)
> 
> cheers,
> Aleksandar Dezelin
> 
> 
> 
> --
> Linux is like wighwam, no windows no gates and apache inside...
> 
> ___
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] mod_mono in a shared hosting envionment

2005-11-23 Thread David Darville

I am working on integrating mod_mono in our shared hosting environment,
but I have noticed that it is possible for a script to access and modify
the files of all other users, which sounds like a security nightmare to
me.

So I wonder if there is any way to limit which files mod-mono-server.exe
can access, mabye something similar to php's open_basedir configuration
option.

---

David Darville
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] mod_mono in a shared hosting envionment

2005-11-28 Thread &#x27;David Darville'
On Wed, Nov 23, 2005 at 12:32:16PM -0800, Jesse Pasichnyk wrote:
> Hi David,
> 
> There have been several posts about this sort of thing in the past (from me
> and others), and I think the consensus is its probably better to run
> standalone xsp servers per site.  That way you can chroot the xsp (optional
> of course) as well as run it as the user who owns the site.  This would
> limit the problem of bad users or exploited sites doing too much damage.  I
> believe people also argue against mod_mono because that would tie the GC
> instance to the apache server in some sorts (I'm not aware of how that works
> though, someone else may be able to provide more reasoning behind it).  If
> you do choose to run separate xsp instances you could use mod_proxy to setup
> forward and reverse proxies to the xsp instance.  This could be initially
> just setup running xsp instances on ports of 127.0.0.1, but could be in the
> future scaled out to multiple application servers.

Currently I am working on a proxy to put between mod_mono and
mod-mono-server.exe, which executes the mod-mono-server.exe instances for
each customer, using seperate uid's for each domain, which does limit how much
one customer can access the files all other customers, but we still have
alot of customers who does not set proper permissions on their files, and
therefore there are still plenty of files beloging to other files which are
accessible.
And to eliminate that problem we need to be able to limit which files a
mono/mod-mono-server.exe instance can access, before we can implement it in
our production environment. And therefore I am now asking about the
possibility of souch a functionality getting implementes in
mono/mod-mono-server.exe.

---

David Darville
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


[Mono-list] WebParts?

2005-12-14 Thread David Brain

Hi,

Anyone have any insight as to the status of WepParts in ASP.Net 2.0 in 
mono.  I looked on the website but couldn't see any info about this.


I ask as we working on a CMS app, and the WebParts feature would be very 
useful.


Thanks,

David.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


  1   2   3   4   5   >