As I pointed out yesterday, with FastMM available, memory management is so much of a solved problem that it’s a non-problem. So dropping a performance-killing pseudo-GC “solution” on us is patronizing and insulting in the extreme, not to mention a massive waste of effort that could have been spent actually improving the language and/or standard libraries. But I did notice one very interesting thing from its implementation: the introduction of the [Weak] attribute, and a few other related attributes, are something fundamentally new in the Delphi language. Continue reading ‘How to simplify memory management the right way’ »
There’s been a lot of talk recently about immutable strings in the iOS compiler, which, as Marco pointed out, is not actually implemented (yet) but is just something that’s under consideration. And it appears that he’s uncomfortable with the removal of AnsiStrings. That’s a good thing, IMO. I think they should be put back, particularly for UTF-8 strings. Continue reading ‘NextGen: Delphi’s “Visual Fred” moment?’ »
When I started writing dwsLinq, I never intended it to just be an integrated SQL query builder. I did that first because it was both useful and easy to implement, but that was never the end goal.
Over the last few days I’ve taken a big step towards the real goal: developing a general-purpose data querying system. I factored out all of the SQL-specific stuff into its own unit and created an interface called IQueryBuilder that responds to the various query operators to build an expression tree that can be evaluated by DWS. You create a recognizer and register it with dwsLinq, that checks the value of your FROM expression and returns an IQueryBuilder if it can create an expression for it. And once I had that working, I created a second unit with a new implementation of IQueryBuilder, for querying JSON data. Continue reading ‘More dwsLinq improvements: query sources and JSON’ »
I just checked in an update to dwsLinq that covers a big step in its progress: the INTO clause.
This is not quite the same thing as INTO in C#’s version of LINQ. INTO there basically acts as a naming operator, taking a query expression and giving it a name so that you can use it as a sub-expression in further query work.
I did something different with this. INTO in dwsLinq takes a function pointer as its argument. The function has to have a single parameter of type Dataset, and return some value, and the INTO clause changes the output of the entire query expression. Continue reading ‘dwsLinq update: INTO’ »
I’ve always enjoyed the concept behind LINQ: write SQL-esque queries directly in your code, with the compiler able to provide syntactical and type checks, and automatically generate the correct code to do what you wanted.
Unfortunately, there’s nothing like that available for Delphi. There could be, if the team would shift their focus to augmenting the language with actual useful features borrowed from managed languages, such as a proper extension method implementation, rather that burdening it with useless, counterproductive crap like pseudo-garbage collection and new String models. But for the time being, we’re out of luck.
But a while ago, an idea struck me. In .NET, LINQ uses anonymous methods to support expression class evaluation at runtime. But DWS is already an interpreted scripting system that operates on an expression tree! And since DWS has a language extension mechanism in place, I decided to poke around and see what was possible. Continue reading ‘Work in progress: dwsLinq extension for DWS’ »
One of the awesome things about FastMM is FullDebugMode. Its features pretty much make memory leaks trivial to track down… usually. But if you’ve got the classic problem of code creating objects and placing them in a container somewhere and then abandoning them, you can have a huge memory leak in your program without it ever being detected, just as long as the container gets properly cleaned up before the program shuts down.
Seems to me that it should be possible to detect this with a bit of instrumenting, though. Here’s the basic idea. Continue reading ‘Wanted: live leak detection for FastMM’ »
If you’ve been paying attention to copyright and the myriad ways it gets abused by publishing interests, you’ve probably heard of the Kirtsaeng case. For those just tuning in, here’s quick recap:
John Wiley & Sons is a publishing company, involved in one of the most despicable fields within the publishing industry: the publication of academic textbooks. Anyone who’s ever been to college and had to pay the exorbitant rates they charge every semester, just because they can, will need no explanation as to why these guys are scum.
The interesting thing is, while they charge whatever they can, “whatever they can” means different things in different contexts. Some parts of the world are wealthier than others, and in some countries there’s just less blood available to be squeezed from that particular stone, and so they have to set the prices lower so as not to be unaffordable.
Anyone with a basic knowledge of economics, when presented with these facts, should recognize that an opportunity for arbitrage exists here: buying goods in a low-priced market and reselling them at a profit, where the prices are high. And that’s exactly what this Thai guy called Supap Kirtsaeng did. Continue reading ‘The US Supreme Court just ruled that publishers have no right to differential pricing’ »
A few years back, when I posted an analysis of how TValue is very slow, it prompted a lot of response from the community. Various people ran their own benchmarks, and started working on building or optimizing their own meta-value types. Some people are even still working on that today. But one of the most interesting things was Robert Love’s response. He looked at the TValue code and found a way that it could be optimized for the common case to speed things up. Continue reading ‘The next RTTI bottleneck’ »
Jim McKeeth, the RemObjects evangelist who runs delphi.org, was a coworker of mine before he left for RO. Another coworker just pointed me to a couple articles that mention his name.
Apparently the patent office essentially just ruled that the infamous “slide to unlock” patent that Apple has been beating Samsung and other companies that make Android devices over the head with is actually invalid, because another company, Micron PC, invented it several years before Apple did. And the name associated with Micron’s patent is Jim McKeeth.
Of course, when something like this happens, you wonder if it’s the same guy or not. Sometimes people have the same name, you know. But I did some checking, and it appears that he did used to work at Micron.
So, does Apple owe Jim McKeeth money for this bogus “innovation” that they’ve been extorting money from all sorts of smartphone companies over? It would be deliciously ironic if they did.
Jim, if you’re reading this, would you mind leaving a comment on the subject?