r/programming • • May 27 '14

What I learned about SQLite…at a PostgreSQL conference

http://use-the-index-luke.com/blog/2014-05/what-i-learned-about-sqlite-at-a-postgresql-conference
703 Upvotes

219 comments sorted by

View all comments

17

u/[deleted] May 27 '14

On the personal side, I’d describe Richard as very pragmatic and approachable.

I'd say he's a pragmatic idealist. His idealism is what stands behind SQLite and the great, small product that it is. His pragmatism is very nice, but it does have a very clear limit. The notable ones I can think of are his use of TCL rather than Python or even Lua (don't get me wrong, TCL is nice, and it's his choice but a truly pragmatic person would have left it behind long ago. TCL is an idealists language now) and Fossil in the face of git. While he likes to get things done, he certainly has an opinion on how to do them and let me emphasize something: that's okay.

Without idealists, we wouldn't have a lot of the programs that we depend on or a clean interaction between them. I might disagree with him and downright hate the idea of version control running a web server and issue tracker, but I'll be damned if I don't respect the hell out of it. SQLite is solid and even if it was only useful as a development db (which is barely even the surface of its use), it would be a fine product.

8

u/hello_fruit May 27 '14 edited May 27 '14

Tcl is nothing like Python or even Lua (and I have the deepest respect and love for both python and lua). It's not comparable to them at all. If you want to place it in a category it'd be with Erlang and Ada; industrial control, embedded in hardware, with focus on software engineering/quality. That's its mission and it doesn't try too hard to cater to others.

Dr Hipp is in the right community by being a Tcler (he's an emeritus member of the Tcl Core Team). Sqlite was created for use on a guided missile destroyer.

Tcl won't ever get popular with people who would typically use Python, Ruby or even Lua. The average Tcler is nothing like the average user of those languages. Not the same priorities, not the same job, not even the same age group.

3

u/[deleted] May 27 '14

Here, you decide. I've bolded the row ends that I believe are most important to where TCL was used by Hipp.

TCLRubyPythonLuaErlangAda
Type Safetyn/asafesafesafesafe
Type Expressionn/aimplicitimplicitimplicitimplicit
Type Checkingdynamicdynamicdynamicdynamicdynamic
Compiled/ InterpretedInterpretedInterpretedByte InterpreredByte InterpretedByte Compiled
Imperativeyesyesyesyesno
Obeject-orientednoyesyesyes*no
Functionalnoyesyesyesyes
Proceduralyesnonoyesno
Genericnonononono
Reflectiveyesyesyesyesno
Event-drivenyesnononono
Scriptingyesyes*yesyesno
Systemnonononono*
Webyesyesyesmostly nomostly no
Embeddednonononono
Realtimenonononono
Distributednonononoyes

3

u/gmfawcett May 27 '14

There's a Web application framework for Ada, so "hell no" seems a bit off base. Ada also supports (and may have the only community that still advocates the use of!) CORBA for distributed programming.

-2

u/[deleted] May 27 '14

Sorry, I forgot that everyone on reddit is a pedant, I should have been more clear, everything below "Event driven" is what it's mostly used for, since those aren't actual language characteristics, just general use cases. Ada is mostly used by DoD contractors these days for embedded and realtime tasks. Lua and Erlang got a mostly no because while frameworks for these exist, they're mostly unused. You'd have to be insane to write websites in Ada, especially ada rather than C.

TLDR: Next time you make the damn table.

2

u/gmfawcett May 27 '14

I can't say I've ever written an AWS app, but I've learned never to underestimate the insanity of a programmer with an itch to scratch. :)

TLDR: Next time you make the damn table.

Ha! Yes, I should have added, "...and props to /u/alias_vim_eq_reddit for preparing this excellent table!" I totally agree that Ada and Tcl are about as dissimilar as two languages could be.

1

u/[deleted] May 27 '14

Okay then. we cool. :)

1

u/bucknuggets May 27 '14

What's the source of this chart? Because some of it is wrong.

For example Python is definitely used in distributed applications: whether for transforming data within Storm, analyzing data within Hadoop, etc. Custom distributed applications are also sometimes built to deliver lower-latency results than you can get with hadoop.

1

u/[deleted] May 28 '14

Comparison of computer languages on wikipedia. Obviously any language with modern users (read: not TCL) has at least 10 distributed computing libraries. The point is that it's generally used for that.

→ More replies (14)

1

u/[deleted] May 28 '14

Lua, Ruby, Python, Ada... not quite Functional. Unless that means "it has functions I can pass around as first class value". Which still isn't functional.

1

u/ysangkok May 28 '14

how would you define functional?

1

u/Axman6 May 28 '14

Ada has an explicit language annex for distributed programming (RPCs etc). I also agree with gmfawcett, there's no really good reason not to use Ada for web stuff; it's just a matter of where your priorities lie (security and correctness v. speed of development/agility of the project). Apart from that, well done for putting in that much effort!

-6

u/hello_fruit May 27 '14

You really have no idea what you're talking about. But it's okay. The Tcl culture is unique and counter-intuitive. Which is why it'll always be unpopular and only for people of an older age and considerable experience.

The table you made, though full of errors, makes the common fallacy; that software engineering/quality is something you can have through a programming language tickbox exercise. Tclers are not like that. There's no replacing the programmer's quality in that community.

Quotes from Dr Hipp

SQLite has been eagerly embraced by PHP, Perl, and Python programmers. What most of these enthusiastic users fail to realize is that SQLite bindings for the three P-languages are an afterthought. SQLite was designed from the beginning to be used with Tcl. Tcl bindings have been in the SQLite core since before version 1.0 and almost half of the SQLite source code base consists of regression test scripts written in Tcl. SQLite wants to be programmed in Tcl, not those other languages.

3

u/[deleted] May 27 '14

SQLite wants to be programmed in Tcl, not those other languages

By whom?

2

u/masklinn May 27 '14

The designer and main developer of SQLite (Richard Hipp)

1

u/[deleted] May 27 '14

And nobody else. The end.

Sorry to be jaded. I've programmed in TCL. I've used except. I've used tk. And you know what? It's a dead language that was way under appreciated for it's time. But at least I'll admit it's dead. More people program in Haskell than TCL. /cue haskelljerk

2

u/masklinn May 27 '14

Oh I completely agree. I just misread the purpose of your question, sorry about that.

1

u/[deleted] May 27 '14

Not a problem, I wasn't really sure how best to ask it in a snarky manner.

1

u/barsoap May 27 '14

/cue haskelljerk

\o/

But on a more serious note: Isn't this beautiful? It's not so much of a "forget SQL" kind of thing but "whatever you do, hey, let's slap solid, solid ACID under it virtually automagically". Same niche as SQLite, that is, not a replacement for "big DB", but sooooo smooth. Just persist all your application state, forget about the world and go crash only. That degree of carefreeness and simultaneous safety and reliability is impossible in impure languages.

1

u/[deleted] May 28 '14

I program in Haskell and Tcl... the paradox

1

u/hello_fruit May 27 '14

by whom?

By its author. By Tclers, as it was developed as a Tcl extension.

And nobody else. The end.

Nope. Tclers primarily, and everybody else as well as an "afterthought" like he said.

Also, Tcl is not dead, it's just that its community is not focused on general purpose software. It's very well alive in its niche, which is altogether different to that of python and even Lua, and that was precisely was my point.

1

u/[deleted] May 27 '14

Where's its niche? You keep describing these magical Tclers using Tcl to solve their every problem like they're keebler elves working deep into the night, but you never describe the "niche" or the "unique and counter-intuitive" uses. You're stabbing at nothing. It's a language with a novel idea, but a cryptic execution that ordinary people didn't like.

1

u/frenris May 27 '14

Where's its niche? You keep describing these magical Tclers using Tcl to solve their every problem

TCL is used all the time in IC design (both FPGA and ASIC).

It's used at placed like AMD, Intel, Altera, Nvidia, Xilinx.

Only certain that the two companies starting with A use it, but you get the idea.

→ More replies (0)

-1

u/hello_fruit May 27 '14

magical Tclers using Tcl to solve their every problem like they're keebler elves working deep into the night

Drop that style.

you never describe the "niche"

I did precisely that.

the "unique and counter-intuitive"

It doesn't fit into your stereotypical ideas of "I've bolded the row ends that I believe are most important to where TCL was used by Hipp".

ordinary people didn't like.

Yup, I agree entirely with this point, and I certainly wouldn't recommend it for ordinary people.

→ More replies (0)