Live data from Hacker News

Table Oriented Programming (2002)

web.archive.org

71–80 of 91 posts

Re: Table Oriented Programming (2002)

#71
post #22

Earlier quoted context omitted.

Such tools existed and were popular in 1990s: DBase, Clipper, FoxPro. They worked pretty well in their domain: data entry and report generation, with lightweight transaction processing and general computation. Then happened the internet and client-server architectures, and these do not map as neatly onto local, single-user, single-transaction tables.

I have a ton of games, bought or downloaded from a variety of places, some even for different systems and some more than once (e.g. Steam or GOG or sometimes some Humble Bundle bundle giving a game i already had) and in some cases a different version. Most of them are on my external HDD. One thing i want to do is to make a database of all of them since they're easily more than a thousand and i want it on my PC. I wan…

I'd be curious to see with other options exist, but the one that I know is Filemaker Pro. I'm only familiar with the stand alone version, and while expensive, to me it sounds exactly like what you're talking about wanting.

Re: Table Oriented Programming (2002)

#72
post #5

I remember reading this essay when it first came out. To try and reword it using modern terms: The author wishes that programming languages had database persistence capabilities as 1st-class built-in syntax instead of cumbersome bolted-on API functions. Examples where database syntax (i.e. SQL syntax) is 1st-class without noisy syntax of function calls, without command strings in quotes, etc : - business languages li…

The "V" programming language has these features built in. https://github.com/vlang/v/blob/master/doc/docs.md#orm

Re: Table Oriented Programming (2002)

#73
post #60
post #59

Earlier quoted context omitted.

Why is it still used then? Are there just no good alternatives? Or legacy reasons?

On the things it does well - being a memory mapped column store, it hardly had any competition a few years ago (clickhouse might be getting there these days, perhaps) And if your fluent in K, one-of scripts and queries are significantly shorter and easier to get right. But it is not good as a general purpose language in a commercial setting - not because of the language itself which is fine if a bit spartan - but bec…

Yeah I personally really like array langs so I was just wondering why other people don't.

Re: Table Oriented Programming (2002)

#74
Just wondering about the meaning of the satements from the article "Arrays are evil! Arrays are the Goto of the collections world". Anyone know exactly what it means? Is it referring to the raw array with pointers in C/C++ or array in C++ collections?

Re: Table Oriented Programming (2002)

#75
post #5

I remember reading this essay when it first came out. To try and reword it using modern terms: The author wishes that programming languages had database persistence capabilities as 1st-class built-in syntax instead of cumbersome bolted-on API functions. Examples where database syntax (i.e. SQL syntax) is 1st-class without noisy syntax of function calls, without command strings in quotes, etc : - business languages li…

The "V" programming language has these features built in. https://github.com/vlang/v/blob/master/doc/docs.md#orm

Does this doc misuse present tense or is it actually implemented? V's author has done this a bunch, so it's tough to take a doc at face value.

Re: Table Oriented Programming (2002)

#76
post #68

Earlier quoted context omitted.

> At the very least with row polymorphism, a function can declare which subset of the type it actually care about instead of taking an unwanted dependency on the whole blob. This is the argument I no longer find convincing. Do you have an example where this is so much clearer than alternate, simpler ways of doing it? For instance, in principle you could easily rewrite a function that works on a record with 3 fields t…

Having it as a single parameter precludes the mistake of passing unrelated values, though.

The row typed function is also less reusable for that reason.

If you have two fields of compatible type such that you can confuse which one to pass as a parameter, then it's likely you're not making enough domain specific type distinctions that would disambiguate these fields.

If these fields were really compatible domain specific types, then it's more likely you would want to be able to use that function with both fields at some point. Row typing then either hinders this reuse (not good), or requires you to refactor to encapsulate both fields in a new record with compatible fields and pass that in (maybe good?). This is code you wouldn't have to write without row types.

But as I said, I would like a concrete example to discuss if anyone has one. Speaking in abstract like this isn't likely to be convincing either way.

Re: Table Oriented Programming (2002)

#77
I stopped reading shortly after:

"a = (b * c) + e + f"

Something like this would have been a better ex:

a = b(c+e) + f

This guy maybe hasn't heard of operator overloading as no one would do as he suggests in most 'OOP' languages:

"a = ((b.times(c)).plus(e)).plus(f) // sillier"

Re: Table Oriented Programming (2002)

#78

The proliferation of field types has made data more difficult to transfer or share data between different applications and generates confusion. ITOP has only two fundamental data types: numeric and character, and perhaps a byte type for conversion purposes. (I have been kicking around ideas for having only one type.) The pre- and post-validators give any special handling needed by the field. A format string can be pr…

The way to deal with dates is not by having separate fields. It's by having a single value represent the time (in Linux it's time_t). Every other format gets translated to time_t, all processing is done with time_t, and then the time_t gets translated to the desired output format. Any other scheme is doomed to working 99% of the time, and that last 1% will be impossible to fix.

> It's by having a single value represent the time

I have limited experience dealing with human originated time references, but from my encounters, the various idiosyncratic forms of date storage often seem to arise out of an aversion to commit to well defined intervals of uncertainty / margins of error. Coercing people of limited mental bandwidth or interest beyond immediate gratification to go through the pain of constricting their mental models to time_t levels of precision seems to basically be a non-starter.

Re: Table Oriented Programming (2002)

#79
post #71

Earlier quoted context omitted.

I have a ton of games, bought or downloaded from a variety of places, some even for different systems and some more than once (e.g. Steam or GOG or sometimes some Humble Bundle bundle giving a game i already had) and in some cases a different version. Most of them are on my external HDD. One thing i want to do is to make a database of all of them since they're easily more than a thousand and i want it on my PC. I wan…

I'd be curious to see with other options exist, but the one that I know is Filemaker Pro. I'm only familiar with the stand alone version, and while expensive, to me it sounds exactly like what you're talking about wanting.

I've never used it (and the fact that you need to fill a form to download a demo means that chances are i'll never use it :-P) but judging from the Wikipedia page it looks like it might have been close at some point but somewhere around late 90s/early 2000s it succumbed to the need to excuse its pricepoint and got too overbloated and enterprise-y (i mean, apparently even in 1997 it would act as an FTP server...? :-P).

What i have in mind is more like something between dBase and VB (VB3 at most), but with a fully integrated database that can understand graphics (ie. in addition to data types like text, number, etc it also has graphics), a more GUI driven workflow for basic stuff (e.g. instead of placing a button in a form and doubleclicking it to enter in a code editor where i type something like "form2.show" to show a second form, instead i have a dialog appear that provides some common tasks like "show a dialog, add/revert/delete/etc record, open external file, etc" with "runs script" being an option for when others wont do), being able to either infer table structure from form fields or automatically create forms from tables, etc.

Also completely self contained, no need to install separate "database drivers", or run any sort of server (even locally), just unzip some archive somewhere and run the program from there.

Re: Table Oriented Programming (2002)

#80
post #75

Earlier quoted context omitted.

The "V" programming language has these features built in. https://github.com/vlang/v/blob/master/doc/docs.md#orm

Does this doc misuse present tense or is it actually implemented? V's author has done this a bunch, so it's tough to take a doc at face value.

I just copy+pasted the example given, it compiles and runs
Post reply on HN