Re: [sqlite] Grammar police

2019-07-12 Thread Don V Nielsen
Not to be argumentative with Keith, as I'm have the sinking feeling that
slitting my own throat would be a more pleasurable experience. But, here it
goes:

A *lexicon* is a list of words that belong to a particular language.

Sometimes, *lexicon* is used as another word for *thesaurus* (see below)

A *dictionary* is a list of words and phrases that are (or were) in common
usage, *together with their definitions* - so a dictionary is different
from a lexicon because a lexicon is a simple list and doesn't define the
words.

A *thesaurus* is a dictionary of synonyms (different words and phrases that
have the same or similar meaning).

Finally, for completeness, a *vocabulary* is a list of words that an
individual knows or uses regularly. Vocabulary is different from lexicon
because vocabulary is about what an individual or group of people know,
whereas lexicon is about the language itself.

On Fri, Jul 12, 2019 at 1:52 PM Keith Medcalf  wrote:

>
> >> I can highly recommend the book “Word by Word: The Secret Life of
> >> Dictionaries,” written by one of the editors at Merriam-Webster.
> >> The author spends much of her book illustrating why prescriptivist
> >> approaches to language are doomed to failure.
>
> Merriam-Webster does not publish a Dictionary.  The thing that most 'tards
> refer to as a "Dictionary" is actually a Lexicon, not a Dictionary.
>
> Now back to our regularly scheduled programming ...
>
> --
> The fact that there's a Highway to Hell but only a Stairway to Heaven says
> a lot about anticipated traffic volume.
>
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Grammar police

2019-07-12 Thread Keith Medcalf

>> I can highly recommend the book “Word by Word: The Secret Life of
>> Dictionaries,” written by one of the editors at Merriam-Webster.
>> The author spends much of her book illustrating why prescriptivist
>> approaches to language are doomed to failure.

Merriam-Webster does not publish a Dictionary.  The thing that most 'tards 
refer to as a "Dictionary" is actually a Lexicon, not a Dictionary.

Now back to our regularly scheduled programming ...

-- 
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.




___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] BLOB and TEXT comparisons

2019-07-12 Thread Clemens Ladisch
Charles Leifer wrote:
> SELECT SUBSTR(?, 1, 3) == ?
>
> However, if I mix the types, e.g. sqlite3_bind_text("abcde") and
> sqlite3_bind_blob("abc") then the comparison returns False.
>
> Fom a byte-to-byte perspective, this comparison should always return True.
>
> What's going on?

Apparently, not only a byte-to-byte comparison.

Withou affinity, only integer and real values can compare equal:

sqlite> select 1=1.0, 1='1', '1'=x'31';
1|0|0

See .


Regards,
Clemens
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Grammar police

2019-07-12 Thread Jose Isaias Cabrera

Warren Young, on Friday, July 12, 2019 12:53 PM, wrote...
>
> On Jul 12, 2019, at 10:16 AM, Jose Isaias Cabrera, on

> > "an historical oversight" is the correct English syntax, by the way. ;-)
>
> I can highly recommend the book “Word by Word: The Secret Life of
> Dictionaries,” written by one of the editors at Merriam-Webster.  The
> author spends much of her book illustrating why prescriptivist approaches
> to language are doomed to failure.

I wouldn't read that. Anything that tells me that doing the right thing is 
going to make me fail in life, is not worth reading. ;-)  Can you imagine if we 
started sending any command to the SQLite3 tool? For example,

HEY SQL TOOL, GIVE ME THE LIST OF ALL THE LAST NAME THAT START WITH C; NOW!;

That wouldn't get you anywhere. There is an old proverb that goes something 
like, "Do no remove the ancient landmarks that your fathers have set."  When we 
start doing we what want, we lose our point of reference. :-)  Sorry. Back to 
coding...

josé
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Grammar police

2019-07-12 Thread Simon Slavin
Folks, lets return to charter, please.  DRH is writing the document.  He gets 
to pick the language to be used.  You want something else, write your own.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Grammar police

2019-07-12 Thread Carl Edquist
Note here "AN H", not "A H", because when saying "H", it starts with a 
vowel sound



Re: Aitch vs. Haitch:

https://www.theguardian.com/science/shortcuts/2013/nov/04/letter-h-contentious-alphabet-history-alphabetical-rosen


On Fri, 12 Jul 2019, Stephen Chrzanowski wrote:


"an historical oversight" feels dirty to me, mostly because it's an
incomplete sentence and can be understood in different ways.  It's a
"point", or answer to a question.

In my verbage, "historical" begins with an H (Note here "AN H", not "A H",
because when saying "H", it starts with a vowel sound).  Its the same as
you wouldn't say "I hear an hissing noise", or "I just learned an History
Lesson".  Words prefixed with the sound "HISS" should be prefixed with "A"
in my mind, unless the H is silent, like Honor or Honest.

However, that said, it'd also probably depend on what the sentence is going
to be describing.  "I went to a historical event" leaves a bad taste in my
mouth, while "I went to an historical event" feels better, because I think
the E in Event carries over to the "AN", or, it could be a past vs present
meaning of the sentence.  But if I say "I've just learned a historical
lesson", the "L" sound in Lesson doesn't carry over correctly to "AN".

Let me be clear I'm not saying you're wrong or right, just that, in my head
and my syntax when I write sentences, anything that begins with H would end
up having an "A" prefix.  I don't use the word Historical or History all
that often, so I can't say how I've written it out in the past.

That said, the point of the sentence is presented whether "AN" or "A" is
used, in my opinion.  This is going down the lines of (Dare I say) is it
ESS-QUE-EL or "SEEK-WIL".

In my case, if I were to read that entire paragraph, I probably wouldn't
even blink on "... an historical oversight ..." or "... a historical
oversight ...".


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Grammar police

2019-07-12 Thread Stephen Chrzanowski
"an historical oversight" feels dirty to me, mostly because it's an
incomplete sentence and can be understood in different ways.  It's a
"point", or answer to a question.

In my verbage, "historical" begins with an H (Note here "AN H", not "A H",
because when saying "H", it starts with a vowel sound).  Its the same as
you wouldn't say "I hear an hissing noise", or "I just learned an History
Lesson".  Words prefixed with the sound "HISS" should be prefixed with "A"
in my mind, unless the H is silent, like Honor or Honest.

However, that said, it'd also probably depend on what the sentence is going
to be describing.  "I went to a historical event" leaves a bad taste in my
mouth, while "I went to an historical event" feels better, because I think
the E in Event carries over to the "AN", or, it could be a past vs present
meaning of the sentence.  But if I say "I've just learned a historical
lesson", the "L" sound in Lesson doesn't carry over correctly to "AN".

Let me be clear I'm not saying you're wrong or right, just that, in my head
and my syntax when I write sentences, anything that begins with H would end
up having an "A" prefix.  I don't use the word Historical or History all
that often, so I can't say how I've written it out in the past.

That said, the point of the sentence is presented whether "AN" or "A" is
used, in my opinion.  This is going down the lines of (Dare I say) is it
ESS-QUE-EL or "SEEK-WIL".

In my case, if I were to read that entire paragraph, I probably wouldn't
even blink on "... an historical oversight ..." or "... a historical
oversight ...".

On Fri, Jul 12, 2019 at 12:16 PM Jose Isaias Cabrera 
wrote:

>
> Warren Young, on Thursday, July 11, 2019 03:13 PM, wrote...
> >
> > On Jul 11, 2019, at 10:41 AM, Richard Hipp, on
> > >
> > > Here in the Southeastern US (specifically in Charlotte, NC) we really
> > > do say "an historical oversight".  If you said "a historical
> > > oversight", people would look at you funny.
>
> "an historical oversight" is the correct English syntax, by the way. ;-)
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Grammar police

2019-07-12 Thread Warren Young
On Jul 12, 2019, at 10:16 AM, Jose Isaias Cabrera  wrote:
> 
>>> Here in the Southeastern US (specifically in Charlotte, NC) we really
>>> do say "an historical oversight".  If you said "a historical
>>> oversight", people would look at you funny.
> 
> "an historical oversight" is the correct English syntax, by the way. ;-)

I can highly recommend the book “Word by Word: The Secret Life of 
Dictionaries,” written by one of the editors at Merriam-Webster.  The author 
spends much of her book illustrating why prescriptivist approaches to language 
are doomed to failure.

https://amzn.to/2xJW65R
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Grammar police

2019-07-12 Thread Jose Isaias Cabrera

Warren Young, on Thursday, July 11, 2019 03:13 PM, wrote...
>
> On Jul 11, 2019, at 10:41 AM, Richard Hipp, on
> >
> > Here in the Southeastern US (specifically in Charlotte, NC) we really
> > do say "an historical oversight".  If you said "a historical
> > oversight", people would look at you funny.

"an historical oversight" is the correct English syntax, by the way. ;-)
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] BLOB and TEXT comparisons

2019-07-12 Thread Charles Leifer
I ran into a somewhat surprising result and wanted to just get a little
clarification.

I'll use the following statement as an example:

SELECT SUBSTR(?, 1, 3) == ?

And the parameters will be:

* "abcde"
* "abc"

If I bind both parameters using the same type, the comparison returns True:

* sqlite3_bind_text
* sqlite3_bind_blob

However, if I mix the types, e.g. sqlite3_bind_text("abcde") and
sqlite3_bind_blob("abc") then the comparison returns False.

Fom a byte-to-byte perspective, this comparison should always return True.

What's going on?

Thanks!
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite3_close() drops wal and shm files despite of other processes holding DB open

2019-07-12 Thread Dan Kennedy


On 11/7/62 23:07, Andreas Kretzer wrote:

I'm using SQLITE3 (V3.29.0) on an arm embedded linux (2.6.39) on an ext3
filesystem.

Several processes hold the DB open and the "-wal" and "-shm" files exist.
if I use 'lsof | fgrep ' I can see all processes having all
three
files open. At least one of the processes uses threads, but every process
has just one single DB connection active which is shared among all threads.

The compilation of sqlite3 is done with multithreading in mind:

 sqlite> pragma compile_options;
 COMPILER=gcc-6.2.0
 ENABLE_DBSTAT_VTAB
 ENABLE_FTS4
 ENABLE_JSON1
 ENABLE_RTREE
 ENABLE_STAT3
 ENABLE_STMTVTAB
 ENABLE_UNKNOWN_SQL_FUNCTION
 ENABLE_UPDATE_DELETE_LIMIT
 HAVE_ISNAN
 THREADSAFE=1

I can check, that the database is threadsafe (mode == 1) and is switched
to WAL-mode.

So far I never noticed any problems dealing with concurrent updates or so.
The only thing (tested in depth with V3.15.2 and V3.29.0) is when one
process stops and closes the database using sqlite3_close(). This may even
be the sqlite3 CLI. That process closes DB (lsof shows that this process has
closed its filedescriptors and is not in the listing anymore). Right at the
next write access to the DB in the still running process (at least I
think that
this is exactly the point) the "-wal" and "-shm" files are removed.
The sqlite3_exec() function still returns SQLITE3_OK on all following
actions,
but 'lsof' reports, that this process has opened the "-wal" and "-shm"
files,
but marked as "deleted". And they are really deleted and none of the
upcoming
DB changes will ever reach the real DB.

What is wrong? I already checked, that my kernel supports POSIX file locking
(CONFIG_FILE_LOCKING=yes). What else can I check? Two or more sqlite3 CLI
processes started in parallel don't exhibit this behavior.



Does lsof show that your app has a read-lock on the database file (not 
the *-wal or *-shm files) just before this happens?


Are you executing any PRAGMA statements in the app? "PRAGMA 
locking_mode=none" for example?


Or are you opening/closing the database file directly at all (separate 
from SQLite), causing SQLite's locks to be dropped by this POSIX quirk?


https://sqlite.org/howtocorrupt.html#_posix_advisory_locks_canceled_by_a_separate_thread_doing_close_

Dan.


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users