Fork me on GitHub
#off-topic
<
2017-04-15
>
tbaldridge13:04:07

@qqq there isn't really a standard list, constraints are just validation functions with a context. A unique constraint takes the rest of the table as a context. The FK constraint takes another table, etc. So you could model it as "a arbitrary function with context". For that matter some DBs have programmable triggers and the like. And awhile back MS SQL server allows you to use custom C# dlls from inside the SQL server. So you can write constraints how ever you want.

tbaldridge13:04:29

@qqq that being said, I think you'll find that Clojure maps really closely to the tarpit paper as is. About the only thing Clojure doesn't implement is logic rules. But most of the rest of the semantics described in that paper are already in Clojure.

qqq13:04:06

@tbaldridge : unique key constraints / foreign key constraints can be efficeintly checked in terms of the transaction -- without having to check over the entire db; I suspect there is a nice set of functions that can be easily checked over 'diff of databse', without having to be rerun over entire db

qqq13:04:04

@tbaldridge : (on tarpit paper) -- I'd have to disagree; I don't think Clojure maps is a good replacement of a "relational store"; there's already core.logic -- but even using core.logic, I feel like something is missing -- i.e. this in memory relational store

tbaldridge13:04:32

@qqq maybe? But I haven't seen that in reality. Most constraints I use in Datomic (which is transactional level checks) have to look up something in the DB).

tbaldridge13:04:09

@qqq for relational store, that's where Datomic comes in šŸ˜› But seriously, I remember what Rich said once about my comments on the paper: "the Tarpit paper includes a lot of nice ideas...implementing them is really hard". And I think he's right. Even the paper itself admits that some things like relational logic may have to be removed from an implementation to get acceptable performance. And that's what Clojure did. Fun fact: Clojure almost had a variant of Prolog back before Clojure 1.0. I don't think the code still exists, but it was never "fast enough" to be production ready.

bronsa15:04:30

uh? you talking about clojure-contrib's datalog or something in core?

tbaldridge13:04:39

Although IMO some of the pattern matching/unification stuff is rising again in the form of spec.

qqq13:04:00

@tbaldridge : (re constraints): yeah, for foreignkey/uniqueness, we definitely have to look at the db; but we only have to look at the db on the eav triplets we touch, and not have to recheck everything else

qqq13:04:04

@tbaldridge: yeah, I'm not implementing logic programming ; I just want to pass around "typed relational datastores" šŸ™‚

sveri15:04:53

When I started out with clojure was the time I also read the tarpit paper and a few related and time and time again I could see which of these papers Rich Hickey had read and implented (partially) in clojure. Really a nice experience all at all.

tbaldridge15:04:46

Yeah, my only complaint with the tarpit paper is it's almost completely vaporware, not even giving clues as to how any of it would map to modern machines.

sveri15:04:45

I never have these expectations for papers. If a paper provides a working implementation / solution I am all up for it, but if it does not, I am fine with that too. One takeaway I remember is that deriving values is one part of the problem of todays software. But we are just not able to survive without caches, replication, etc. For me the only solution I see are quantum computers or at least a completey new generation of computing power and storage.

souenzzo16:04:18

@tbaldridge I just saw your video about pixie, and the video from @nasser about mage/magic Why not/Is possible/Is a good idea implement pixie in clojure?

tagore18:04:00

@sveri I agree about the expectations part. Sometimes it's worth cursing the darkness even if you don't have a candle at the ready. It's very easy to get so accustomed to fumbling around in the dark that you forget you're doing so.

tagore18:04:53

I will say that I am a bit more hopeful than you about things getting better. A lot of small incremental improvements over time can eventually lead to an order of magnitude improvement.

tagore18:04:45

And I think we've kind of seen that already. Even Brooks, who pointed out that there was no silver bullet on the horizon, has since acknowledged that we have gotten quite a lot better at software since he pointed that out, enough so that it would like a silver bullet to programmers of the time. Just in the time I've been seriously writing software (about 20 years now) it has gotten a lot easier.

tagore18:04:07

*look like

tagore18:04:41

Still hard though, and of course as we get better at it we take on harder problems, so...

tagore18:04:38

Of all the improvements in that time, I think that having Internet access, and so much information easily searchable might be the biggest improvement. I wrote a fair amount of code before I had internet access, and trying to learn how to do it from a few manuals was... well, you'd get stuck on something simple and spend hours working it out. A lot of that kind of thing can now be solved in a few minutes with a Google search.

tagore19:04:03

Hmm- I kind of like "a merge of programmers." "a merge-conflict of programmers" does not roll off the tongue quit as easily, even if it is more accurate.

tagore19:04:23

Names are hard though, even outside of software. Have spent a lot of the morning talking to some associates about what to name a corporation we're forming. The availability of domain names is a concern.

tagore19:04:41

Not that we were considering this, but I was quite surprised to learn that "http://stenchblossom.com" is available.

tagore19:04:07

"http://perfectlycromulent.com" is, unfortunately and not surprisingly, taken.

mobileink20:04:24

hmm. personally i prefer "an exception of programmers".

mobileink20:04:29

or, going back to my mainframe days, "an abend of programmers".

tagore20:04:42

Well, we don't want too much truth here šŸ˜‰

tagore20:04:06

I do kind of like "an abend" though

mobileink20:04:48

"abend" has the advantage of obscurity. if you never did mainframe, you've prolly never heard of it.

tagore20:04:15

Hmm- I never did mainframe, but... I suppose I'm old enough to have worked with some people who did.

tagore20:04:36

Im aware of it at least.

mobileink20:04:00

kinda like the HCF instruction ("Halt and Catch Fire"). hmm, maybe "an HCF of programmers"?

mobileink20:04:31

it's kinduv a shame "abend" did not make it into the hacker vocab.

tagore20:04:56

I don't think I'd like a "pear-shaped" of programmers as a general term, but I might be convinced to like "a pear of programmers" when referring to just two, especially when they pair program.

mobileink20:04:52

weeell, a little on the cute side, no? howsabout "pod"? most programmers are aliens, after all.

mobileink20:04:48

"peer" might work for pairs?

mobileink20:04:19

i rather like "a recursion of functional programmers". not to be confused with "a co-recursion of oo programmers". :)

tagore20:04:14

Pod is already taken, I think, for whales...

mobileink20:04:16

oh, right. don't wanna confuse the masses. simple_smile

tagore20:04:59

I do sort of like the names that suggest that programmers create a bit of havoc, and ones that nod at our history, thus the "pear-shaped"...

mobileink20:04:06

of course, we have "a decomplex of clojure programmers".

mobileink20:04:45

a havoc of programmers is sounding pretty goid!

tagore20:04:01

so other programmers would be called a "complex?" I think that's a bit too opinionated šŸ˜‰

tagore20:04:56

Though I actually do sort of like "a complexity of programmers"

tagore20:04:52

Or... perhaps simply "a problem"

tagore20:04:05

As Homer Simpson might have said...

mobileink20:04:12

no, "a complectitude of programmers". clojurists are a "decomplectitude". since they so awesomely decomplectitudinous. somebody stop me, please.

tagore20:04:29

"Ah, programmers... the source of, and the solution to, all of life's problems."

tagore20:04:08

I think I'd go with that, tbh. "A problem of programmers."

mobileink20:04:55

no, you're mixing up clients and/or managers and programmers.

mobileink20:04:22

an annoyance of managers?

mobileink20:04:57

a solution of marketers?

mobileink20:04:18

an impediment of customers?

tagore20:04:28

Hmm- I think not. I mean what do we do? Two thing, really. We solve problems. And in the process we create more problems that need solving. We're like lawyers in that respect.

tagore20:04:15

There is a ertain degree of moral hazard involved, of course šŸ˜‰

mobileink20:04:23

a recursion of programmers. once you're in, you're screwed, heh.

mobileink20:04:53

job security of programmers?

mobileink20:04:55

a moral hazard of programmers also sounds pretty good.

tagore20:04:27

I'm inclined to think that measure words should be one word. "A hazard of programmers" seems reasonable, but again a bit too accurate for my tastes.

mobileink20:04:42

yeah. plus i think it's used for some kind of animal, can't remember which. owls?

tagore20:04:34

I so, it's obscure,

tagore20:04:08

A simple Google search does not turn it up

mobileink20:04:36

"clowder of cats"? who knew?

tagore20:04:39

Dunno though- I'm going to stick with liking "A problem of programmers" both on alliterative grounds, and on the grounds that is a grammatically versatile phrase.

tagore20:04:25

Perhaps a bit too versatile šŸ˜‰

mobileink20:04:28

me, i'm lookin for sth a little nuttier. thing is "a problem of programmers" sounds like a description of a problem that programmers face. the beauty of "exaltation of larks" is that there is no apparent connection between the two terms.

tagore20:04:44

Hmm- I'm inclined to think that there is a connection there, though it is a bit of a stretch.

tagore20:04:38

Note that 'on a lark' is also an English phrase, and one not entirely unlike 'exaltation'

mobileink20:04:13

following "a boil of hawks": howsabout "a carbuncle of orogrammers"? i like that one!

tagore20:04:29

It seems that people have associated the lark with a sort of exalted freedom for a very long time.

mobileink20:04:10

yeah, same for "charm of finches", i suppose. but the venery terms are very old, and the conbection is lost on most of us. a "business of ferrets?"

tagore20:04:02

Hmm, that makes sense to me, on some atavistic level.

tagore20:04:31

I mean- weasels, in general, are take-charge sorts. Not the nicest mammals you know, but the sort you want at least one of on your board šŸ˜‰.

tagore20:04:49

They are some do not GAF animals.

mobileink20:04:55

yeah if you squint hard you can make sense of a lot of them. i'm also not convinced they're all genuine. has anybody ever said "gee, i think we have a wisdom of wombats to deal with"?

tagore20:04:56

I'm pretty sure wombats was added well after these sort of measure words fell out of common parlance.

tagore20:04:42

Since Western Europe has a very small number of wombats.

tagore20:04:03

And had less, historically.

mobileink20:04:21

australian, no?

tagore20:04:26

Aside from a few actually useful measure words they are mostly for fun now.

tagore20:04:46

Yes, Australian.

noisesmith20:04:26

"i'm also not convinced they're all genuine" - every convention starts somewhere, most of the collective nouns date to the late 19th century

noisesmith20:04:32

they are old, but not ancient

noisesmith20:04:48

and they started as a jokular, whimsical thing, but stuck around enough to be "official"

tagore20:04:01

We still use a few measure word for animals indispensably in English- hard to do without the word 'flock,' for instance.

noisesmith20:04:34

right, but all the whimsical ones were a late victorian fad

tagore20:04:54

And a fun one.

tagore20:04:03

But a not indispensable one.

mobileink20:04:17

venery terms are very old, but i'm guessing you're right, many were invented more recently.

tagore20:04:19

Measure words in general are... well a thing that comes and goes in various languages in various ways.

noisesmith20:04:29

venery: "archaic: sexual indulgence"

mobileink20:04:55

it's a fascinating linguistic topic, similar to grammatical complexity. small, isolated communities tend to have much more complex grammar than big cosmopolitan societies.

tagore20:04:22

Japanese and hinese, despite being very dfferent languages, both have lots of them that are grammatically required in many cases.

tagore20:04:11

But the trend, in both languages, has been toward less categories, recently.

tagore20:04:23

Still, it's something that as a foreign speaker I tend to get wrong...

mobileink20:04:30

like count words in japanese. very complicated.

tagore20:04:31

Well- I think this is pretty much synonomous with "count words"

tagore21:04:59

Or at least a subset of them.

mobileink21:04:10

not at all. there's no counting in "gaggle of geese". count words are a whole different animal.

tagore21:04:37

Hmm, perhaps I should rephrase then..

mobileink21:04:35

venery terms are more like mass nouns, i think.

tagore21:04:40

For instance in Japanese, you can say 'yi-pikki' where yi means one, and pikki is a measure word that refers to small animals.

tagore21:04:36

Or rather, a counting word.

tagore21:04:22

But you can also say 'nan-pikki,' whih means some number of the referent.

mobileink21:04:26

p.s. they are not "measure" terms. they're about categorization rather than measurement. number is not involved, except for "few, many, many many", etc.

mobileink21:04:48

right, but i don't think you say "a pikki of rabbits".

tagore21:04:31

You an say such when using indeterminate counting words.

mobileink21:04:51

ippon, one book. nihon, 2 books. but also pencils, rivers, etc.

mobileink21:04:33

but that's very different than venery terms.

tagore21:04:24

I think it is very similar, taking into account basi grammatical differences in the languages involved.

tagore21:04:00

A flock of crow maps very naturally to a pikki of small animals.

mobileink21:04:04

i don't know how they say "hutch of rabbits", but i'll bet it has little to do with "-hiki"

tagore21:04:34

But perhaps it should be a murder for crows šŸ˜‰

tagore21:04:20

I'd say that while we use these sorts of words mainly for animals, and we only retain a few of our archaic terms (like flock and herd)

tagore21:04:52

Japanese and Chinese both use terms like this for lots of day-to-day objects.

tagore21:04:45

English has plenty of counting words, but not quite as many as Chinese or Japanese.

tagore21:04:06

And English grammar no longer requires them...

tagore21:04:23

You can say 'a book' in English

tagore21:04:36

Without using 'volume' in the phrase,

mobileink21:04:22

actually i think we still use lots of them, like "litter of kittens". but count words are entirely orthogonal. we're talking about 2 different ways of categorizing. japanese ippon, nihon, etc. categorizes by shape, not by e.g. membership in "pencil".

tagore21:04:27

Sure- that the "pon" thing is just a matter of how you categorize things.

tagore21:04:30

But the grammar is a different issue...

mobileink21:04:53

e.g. you can say "5 head of cattle" and you can say "herd of cattle". there is no linguistic connection between "head" and "herd".

tagore21:04:15

As a very simple example, I can say "A book" in English.

tagore21:04:46

But in, say, Japanese, I must include a measure word for that to be grammatical.

tagore21:04:14

Same, pretty much, in Chinese.

tagore21:04:28

Now, in Chinese, more and more things are "yi-ge"

tagore21:04:50

But the measure word is still necessary.

mobileink21:04:52

similarly you can say ippiki referring to a sparrow, that's completely separate from saying "flock of sparrows" in japanese (sorry cannot remember the word).

mobileink21:04:51

yes, but my point is that is completely separate from mass noun terms like venery terms.

tagore21:04:40

Hm- I'm not sure I see your point... the vernary words are, as a matter of grammar, just measure/counting words, right?

mobileink21:04:16

NO. heh. they have nothing to do with measurement or counting! they just categorize.

tagore21:04:48

But counting words in Japanese and Chinese also categorize..

mobileink21:04:06

there is no counting involved in seeing a muder of crows.

mobileink21:04:48

yes, counting words always categorize, but it's a different categorization.

tagore21:04:00

Well, I suppose it's the case that these vernary terms are always collective.

tagore21:04:50

They still seem very similar to me.

mobileink21:04:17

yeah, or mass, dunno what the linguists would call it. but it does not involve measurement or counting.

tagore21:04:15

Collective is what linguists would call it.

mobileink21:04:47

except of course in the extreme case when you want to ask the philosophical question: how many grains of sand does it take to make a pile?

tagore21:04:59

And I think you're right when you say that we don;t use terms like this for counting, but wrong hen you say we don't use them for measurement.

tagore21:04:17

We almost never say "I'd like to sell you three murders of crows" but we often say "I'd like to sell you three pounds of sand."

mobileink21:04:55

btw it's a balmy 80 degrees in chicago and i'm enjoying this little chat, dork that i am.

tagore21:04:33

Hmm- it is colder here, but supposed to be in the 80s tomorrow.

mobileink21:04:12

ah, but sand is already a mass noun. you don't say "i hate that damn sand" meaning one sand.

mobileink21:04:00

iow "pound of sand" is not analogous to "murder of crows". the give-away is in the plural "crows"

tagore21:04:35

Ah, but, as a matter of grammar, it is in many languages, which is what I am getting at.

mobileink21:04:26

ah, well far be it from me to argue in favor of language universals. but i'm only talking about English: venery terms are not measure/count terms, as far as i can see

tagore21:04:45

Well they're, in English, just mass nouns right?

tagore21:04:06

A pound of sand, a murder of crows, etc.

tagore21:04:52

You're rightthat in English they are not counting nouns.

john22:04:40

what are some methods people use to come up with library names?

mobileink18:04:47

john: 1st Rule of Naming: do not use common, generic terms. Calling a component library "Component" is like naming your dog "Dog".

john01:04:47

Good point

seancorfield23:04:13

Naming is hard. Have you read Zach Tellmanā€™s ā€œElements of Clojureā€?

seancorfield23:04:30

(itā€™s a work in progress book right now)

mobileink18:04:47

john: 1st Rule of Naming: do not use common, generic terms. Calling a component library "Component" is like naming your dog "Dog".