Do they belong to you? Claim these comments.
Unregistered
aliases
- commenter
- IM
- Illiterate
- Mine
- RobK
- zac hipster
- Ec
commenter
Is this you? Claim Profile »
4 months ago
in Buffalo Park System: Rehab and repair of park infrastructure: Martin Luther King Jr. Park, LaSalle Park, Riverside Park, Shoshone Park, Roosevelt Park, Cazenovia park, Delaware Park, Schill... on Stimulus Watch
I think this is worthwhile IF the money actually creates 1900 jobs. At tad skeptical about the management of said funds.
5 months ago
in The Universal Record Database The definitive site for human achievement, regardless of discipline or category on The Universal Record Database
Not even sure thats a cameltoe
1 reply
drollman
In an effort to come up with a term for 'depth of indentation between big toe and second toe', the record holder came up with "toe cameltoe." If that name doesn't work, what should we call this record?
6 months ago
in Windows 7 on an Eee PC 900 (with a Celeron processor) on Liliputing
lol yesah u tail him liek it teh truth is!!!
9 months ago
in Public Service Announcement - Miguel de Icaza on Miguel de Icaza's blog
That wasn't a spelling flame btw :)
I just wondered what you meant. Omitting 'private' consistently would be homogeneous too... I suppose. I don't think the word is applicable in either case.
I just wondered what you meant. Omitting 'private' consistently would be homogeneous too... I suppose. I don't think the word is applicable in either case.
9 months ago
in Public Service Announcement - Miguel de Icaza on Miguel de Icaza's blog
Sorry. I forgot to put another comment against class Foo: /*this class is garbage collected*/
Some people might not know that.
Some people might not know that.
9 months ago
in Public Service Announcement - Miguel de Icaza on Miguel de Icaza's blog
With knowledge of C#, we know that that cast isn't required. With knowledge of C#, we know that 'private' isn't required. Both make something explicit but are unnecessary for the compiler.
So, you do indeed appear to be confused.
So, you do indeed appear to be confused.
9 months ago
in Public Service Announcement - Miguel de Icaza on Miguel de Icaza's blog
Do you realise how absurd it is to guard against the possibility that Anders Hjelsberg might decide to change the default access on members in C#? :-)
If anyone is 'programming defensively' at that level of paranoia (agh - even the compiler writer is against me!) , then their code is going to be incomprehensible.
If anyone is 'programming defensively' at that level of paranoia (agh - even the compiler writer is against me!) , then their code is going to be incomprehensible.
9 months ago
in Public Service Announcement - Miguel de Icaza on Miguel de Icaza's blog
Yes. What Miguel said.
Adding 'private' is kind of like putting in an inline comment that states the obvious, since it has zero effect on what gets compiled.
NB: this assumes your code is being maintained by C# programmers (ie - people who know C#)
/*reference semantics*/ class Foo
{
string /*is return type*/ Bar(int a, int b, int c) /*method has 3 parameters*/
{ ... }
}
Adding 'private' is kind of like putting in an inline comment that states the obvious, since it has zero effect on what gets compiled.
NB: this assumes your code is being maintained by C# programmers (ie - people who know C#)
/*reference semantics*/ class Foo
{
string /*is return type*/ Bar(int a, int b, int c) /*method has 3 parameters*/
{ ... }
}
1 reply
commenter
Sorry. I forgot to put another comment against class Foo: /*this class is garbage collected*/
Some people might not know that.
Some people might not know that.
9 months ago
in Stream.CopyStream - Miguel de Icaza on Miguel de Icaza's blog
Hah. With all these wheels being re-invented everywhere, Mono.Rocks is definitely a good idea.
9 months ago
in Stream.CopyStream - Miguel de Icaza on Miguel de Icaza's blog
I called mine Decant, as in 'decant the data from one stream into another'.
9 months ago
in Stream.CopyStream - Miguel de Icaza on Miguel de Icaza's blog
Nope, I hadn't heard of that.
I checked the website and found that they've somehow managed to hack into my computer and steal my Int32.Times extension method, so I'll be contacting my lawyers forthwith.
I checked the website and found that they've somehow managed to hack into my computer and steal my Int32.Times extension method, so I'll be contacting my lawyers forthwith.
9 months ago
in Stream.CopyStream - Miguel de Icaza on Miguel de Icaza's blog
This was a good question.
It just goes to show that if you ask a question like this you will get lots of people trying to look clever by thinking up reasons why it can't be done.
I've implemented this function multiple times. If the framework can have File.WriteAllLines then it sure as hell should have a CopyStream method. If people have esoteric situations where a simple implementation wouldn't work.... well then, don't use the simple implementation!
PS: TextReader should implement a 'Lines' enumerator.
show all 3 replies
It just goes to show that if you ask a question like this you will get lots of people trying to look clever by thinking up reasons why it can't be done.
I've implemented this function multiple times. If the framework can have File.WriteAllLines then it sure as hell should have a CopyStream method. If people have esoteric situations where a simple implementation wouldn't work.... well then, don't use the simple implementation!
PS: TextReader should implement a 'Lines' enumerator.
3 replies
Alan
Well, if all you're looking for is:
stream2.Write(stream1), then that's trivial enough to implement. However if you want something more along the lines of giving you three identical copies of the same stream so you can independently read from the copies and progress the initial stream, then it's a lot harder.
byte[] bytes = GetData();
MemoryStream a = new MemoryStream(bytes);
MemoryStream b = new MemoryStream(bytes);
MemoryStream c = new MemoryStream(bytes);
If you want a CopyStream that essentially does the above except using a Stream as the base rather than a byte[] as the base, the task is very difficult.
stream2.Write(stream1), then that's trivial enough to implement. However if you want something more along the lines of giving you three identical copies of the same stream so you can independently read from the copies and progress the initial stream, then it's a lot harder.
byte[] bytes = GetData();
MemoryStream a = new MemoryStream(bytes);
MemoryStream b = new MemoryStream(bytes);
MemoryStream c = new MemoryStream(bytes);
If you want a CopyStream that essentially does the above except using a Stream as the base rather than a byte[] as the base, the task is very difficult.
migueldeicaza
That is a really good idea.
Are you aware of "Mono.Rocks"? It is a library of extension methods that some developers have been prototyping to add useful extension methods.
Are you aware of "Mono.Rocks"? It is a library of extension methods that some developers have been prototyping to add useful extension methods.
Jonathan Pryor
> PS: TextReader should implement a 'Lines' enumerator.
Indeed it should, which is why Mono.Rocks has a TextReader.Lines() extension method in rocks-playground. :-)
Indeed it should, which is why Mono.Rocks has a TextReader.Lines() extension method in rocks-playground. :-)