Retlang
There are 9 entries for the tag Retlang

I once took advantage of the published source code of the Microsoft Enterprise Library Data Access Block to make some firm-specific modifications.  One of those changes that only really makes sense in the target environment, nothing particularly general.  The Data Access Block, for those of you who aren’t familiar with it, is basically an improved version of the ADO.NET API, with some pretty useful support for stored procedures.  It’s not NHibernate, but it’s better than coding the API in the raw. While I was there, I decided to rip out the stuff we didn’t use.  That turned out to...

Let's see if you can spot the difference.  Your manager comes up to you and says We need to get invoices from our order system into our treasury system.  What we were thinking was: we'll get the order system to export its orders onto the file system, and the treasury system can read in the files and delete them when it's finished.  How long should that take? We need you to write a robust queuing solution.  How long should that take? The answer is, of course, that there's no...

Previously, I talked about patterns where you were unlikely to implement them yourself, since they are now considered part of the infrastructure that goes with a modern language.  The publish/subscribe model isn't quite ready to be described as infrastructure, but it's getting close.  So, here are two patterns I don't honestly think it's worth knowing.  Here, it's not so much that the patterns are bad, just that you're better off understanding and using the publish/subscribe model.  Here's how the pub/sub model works: Participants are called services. They do not communicate directly with one another, but through messages/events raised...

Retlang 0.4 has been out for quite a while, but I've never written about it.  Worse, my example code doesn't work in it, which has garnered complaints (in my defence, the Retlang wiki is out of date as well).  The version is again a restructuring that you shouldn't apply to your own code without a bit of thought, but it's added a killer feature: the ability to interact with WinForms.  Or WPF if you're that way inclined. Anyway, I've drawn up a new version of the spider, but it differs quite a bit from the previous versions: It now...

I've been watching some very excited tweets go past about concurrency improvements in .NET 4.0.  I've got to say, I'm quite looking forward to hearing about this once the NDAs drop away (not an MVP, nor am I likely to be).  Retlang is pretty much the only game in town for concurrency right now, and it's quite hard explaining to people the problem it's trying to solve.  The standard question is "what's wrong with using Threads"?  The work the Maestro team is doing looks exciting as well, although I'm a bit dubious about the benefits of a language rather than...

I've converted over my Retlang spider example over to IronPython in order to get a feel for the differences.  Here's some notes: Python list comprehensions can do the same as LINQ for simple cases, but LINQ is much more powerful, and it supports deferred execution, while list comprehensions are evaluated greedily.  UPDATE: Thanks to Mark for pointing out that generators support deferred execution.  There's still no syntax for grouping or ordering, but these are relatively rare cases. Every description of the python syntax I ever see emphasizes the fact you don't...

I've lost count of the number of times I've seen a technology that looked great in the sample, but didn't hold up when I took it for a proper test drive.  Mike Rettig, on the other hand, has really thought through the use cases.  So when you try to take a sample program and hit the real world, you discover he's been there before you.  Here's some highlights: Everything implements interfaces.  You can mock or stub pretty much everything.  (You might want to create your own abstract factory, though.) Not only does...

The Retlang wiki is a bit short on the sort of messy examples that I find useful when learning a product, so I thought I'd write one of my own.  The following is a 200-line web spider.  I'll go through it and explain how it works and why you'd build it like this.  I recently used techniques similar to this to get a FIX processor to run 30 times faster.  Seriously.  Retlang's that good. Five minute introduction to Retlang Here's how Retlang works: A Context is a Thread/Queue pair.  That is to say, a thread with an associated queue. ...

Well, in the words of Scott Hanselman "We'll see how long this lasts.".  Anyway, I should start as I mean to go on by providing some code that's actually useful. I've been using Mike Rettig's Retlang library a fair bit recently, and have nothing but praise for it.  I'll go into more detail about why it's great at a later date, but here I'll just detail a problem that I encountered and how to solve it. Let's say that you've got a system that writes to the database and you need to bring the database down.  You need to stop...