DISQUS

DISQUS Hello!  The comments on this profile are unclaimed and thus are unverified.

Do they belong to you? Claim these comments.

Ayende Rahien's picture

Unregistered

Feeds

aliases

  • Ayende Rahien

Ayende Rahien

2 months ago

in Continuations in Mono: Embrace and Extending.NET, Part 3 - Miguel de Icaza on Miguel de Icaza's blog
That is great!
Is this useful for the .NET CLR as well?
1 reply
Jonathan Pryor No. As miguel said:

Mono.Tasklets requires changes to the VM that are not portable to other ISO CLI implementations.

In short, This isn't pure C#, it requires runtime support.

8 months ago

in Virtual member call in constructor and NHibernate on Tigraine
You set the field in the ctor, not touching the property, and that will work
1 reply
Tigraine's picture
Tigraine public virtual ISet<OrderItem> OrderItems
{
get { return orderItems_; }
set { orderItems_ = value; }
}

private ISet<OrderItem> orderItems_;

public Order()
{
orderItems_ = new HashedSet<OrderItem>();
}

I know it should work that way, but it doesn't.
Can't say why. But it doesn't work.

Maybe I should have added that the problem is occuring during my Repository unit tests. If I run the tests one by one it works, but if they get executed all together I get the exception.

I think I'll dedicate some more time to the problem tomorrow. But debugging concurrency issues sucks.

8 months ago

in Virtual member call in constructor and NHibernate on Tigraine
The solution to this is init the collection via the property, but to initialize the field.
1 reply
Tigraine's picture
Tigraine That didn't work.. I tried having a private field that gets accessed through the property and that gets set by the ctor..
I also tried to set the field on demand from the property, but both times I got the "Illegal attempt to associate a collection with two open sessions".

Thanks anyway, I guess initializing the collection isn't all that difficult after all :)

8 months ago

in Crazy Talk: Reducing ORM Friction : Rob Conery on Rob Conery
Oh, and your comments doesn't work in Safari
1 reply
robconery's picture
robconery Weird cause they work on Chrome - which uses Webkit

8 months ago

in Crazy Talk: Reducing ORM Friction : Rob Conery on Rob Conery
Rob,
One big problem is that for most applications, trying to change OODB to RDBMS would not work without a LOT of work.
2 replies
robconery's picture
robconery Hi Oren - if you implemented IRepository<T> as I've done here, how would this not work? Can you be specific in terms of "a lot of work" and what that means?
Justin Rudd yes and no. I built out a prototype in 2001 using POET. I was able to port over the OLTP portions in a few days because of good abstractions (and this was with C++). Now the OLAP stuff took weeks. Primarily because all the OLAP tools we built around POET had to be thrown away and rewritten from scratch. If I had to do it over again, I'd have a secondary system that would go through the POET DB every once and awhile and convert directly to a RDBMS data warehouse. But I was young and knew no better.

9 months ago

in C# Eval: An Embeddable Compiler - Miguel de Icaza on Miguel de Icaza's blog
If it is just a set of statements, LCG is still possible, but a lot of the time that isn't the case.
Consider code such as this:

ThreadPool.QuqueWorkItem(
delegate
{
// do something
});

This requires a second method, and a class to hold it, etc.

I don't think it would be possible for anything really interesting. I just wanted to make sure that the assembly leak limitation is understood.

9 months ago

in C# Eval: An Embeddable Compiler - Miguel de Icaza on Miguel de Icaza's blog
Something that you haven't mentioned, but is important.
Are you emitting new assemblies, or using LCG? The first will cause problems with assembly leakage.
1 reply
migueldeicaza's picture
migueldeicaza Currently I emit new assemblies, doing LCG is on the to-do list;

Additionally, some folks have pointed out that getting a delegate back pointing to the generated code is useful, to avoid compiling the same code over and over (Ed Ropple), so that will also be done.

10 months ago

in Simple Expression Evaluator project now on CodePlex on The Freak Parade
Great reason to write it, mind you.
I wanted to know that you are aware of the other options.

10 months ago

in Simple Expression Evaluator project now on CodePlex on The Freak Parade
Doest it have a purpose?
Because I would solve this issue with BooParser.ParseString()
1 reply
nstults's picture
nstults Ahh Mr. Rahien, I do love how you sugarcoat everything you say. One day you'll walk into a blog and say just what you mean and shock everyone out of their boots.

I wasn't actually aware of BooParser.ParseString until just this moment. It looks to me, though, like the method gives you an AST tree, which you could then optionally compile and run. This is fine, but I'd still either need to compile the AST tree to my own object model or do a good bit of mucking around with the Boo AST to make sure custom variables were expanded properly, custom functions, etc. I am not sure it would have been any less work at the end of the day, and probably a bit more opaque.

That being said, I'm *not* sure Simple Expression Evaluator has a strong value proposition when compared to the two already existing Expression Evaluators on CodePlex, FLEE (uses dynamic code generation) and LazyParser (uses reflection). Both probably would work as well as mine, and existed before I wrote this. But I wanted a good excuse to try out Irony.net, and I selfishly wanted full control of the API. And, of course, I like this crap, and enjoy the tinkering (something I'm sure you could never understand :) ) Whether or not it provides anybody with a new and better expression eval library (probably not) it can serve as a pretty textbook example of one common approach to turning an AST into an object model and evaluating it.

11 months ago

in A cry for help with NHibernate … on Huddled Masses
First issue, you want to implement IEnumerable, not List

Second issue, you need a set of many to many.
You can ask a specific question in teh mailing list

11 months ago

in So you want to learn NHibernate? (or, NHibernate Hyperlink Acupuncture) on The Freak Parade
NHibernate Query Generator is a way to get some strongly typed queries in the .NET 2.0 world.
Linq to NHibernate supersede that, and I plan to retire the project when Linq for NH reach 2.0 status.

1 year ago

in Sins of .NET API Developers on Andrey Shchekin's Blog
Try IKernel.ResolveAll(), it has non generic version
Returning? Login