logs archiveBotHelp.net / Freenode / #ada / 2015 / July / 23 / 1
Shark8
(Action) dies of excitement.
There's just too much activity in #Ada to keep up with.
darkestkhan
sh*t, storm coming ...
and yet the forecast says: 1mm of rain
Shark8
... 1mm?
Isn't that essentially "it sprinkled"?
darkestkhan
yeha
*yeah
after entire day of unbearable heat with humid air...
Shark8
Bleh.
I hate humidity.
wtp
shark8: Really? You think there is too much activity??? I think there hardly is enough, especially considering how many people are signed on.
Shark8
wtp: It was sarcasm.
wtp
oops. :D
Shark8
LOL -- It's ok.
It's not like I can say "use the SARCASM font in IRC.
wtp
well, you could put a :) after what you said earlier
Shark8
:)
Happy mow?
wtp
:( ... :)
nerdboy
no, i need a vacation...
Visaoni
Hey Shark8, noticed you in the reddit thread about SQL stuff. What do you think about a new string type that's escaped (predicates are the easy way, unless you want to get into something like immutable types that can only be made via factory) and an overloaded concatenation operator?
Shark8
I kinda would like to do it with type-constructors and strong typing... though such a facility almost demands an IDL approach to DB- and Ada-interface.
^-- to ensure queries are always well-formed.
But, yeah, predicates are a quick-and-dirty way to do it.
Visaoni
yeah, if you want to also get into the business of making sure queries are well-formed it's a whole new world of issues
Shark8
Visaoni: *nod* -- That's true, but I really, really dislike embedding another language into the current one, using strings, because there's very little you can do to ensure that the string is well-formed, and it's REALLY easy to screw up.
Visaoni
oh absolutely
Shark8
So...
Visaoni
how much of a dramatic pause do you need? :)
jk4_
no
you're both wrong
SQL should never be manipulated at runtime
the database should provide an API consisting of functions written in the database's query language
then you only access the database through those functions
you can build your programming language's access through that
have readable, writable transaction types
Visaoni
that almost sounds like that would force every language to be part database
jk4_
it's sort of a binding in a way
obviously the db functions are sql calls
but you're not allowed to formulate your own query. you may only use the exact api as specified.
then Ada, for example, calls the, say SQL API only.
Visaoni
unless you want every application to write it's own API, you're going to end up with the API just being a query itself
jk4_
it is
that's what SQL does..
Visaoni
well
I should phrase that better
obviously undernearth it's going to be a query, what I mean is the API is going to end up general enough that it may as well be writing your own query in all it's stringy glory
jk4_
hardly
it'd look just like your Ada package most likely
if you need to determine whether a user is valid, you could call isUserValid(user,pass) sort of deal
i'm not sure if putting this into prepared statements will offer more benefit..
Visaoni
well, if you want to do that sort of thing then you are talking about having each application write it's own API
jk4_
indeed, as it should imo
in addition, i think this separation of powers will work better for both individuals and a team
Visaoni
ah, alright
jk4_
and well
erm
if the api is modularized correctly, you can just include the necessary Ada package in whatever project uses said functionality
Visaoni
is that not what people do anyway? my natural inclination would be to slap all the SQL stuff off somewhere, and then just call it as needed from elsewhere
it's still stringy, but still contained into an API or sorts
*of
(I don't actually know. it's just how I'd be inclined to do things)
jk4_
if you're creating this stuff outside of prepared statements and functions, you gain no advantage and everyone can still molest your database ad nauseum
Shark8
Visaoni: jk4_: I'd actually rather have some way to describe types, compile the description, and let public/Ada-facing module have nice types. Unfortionately, something like this would require something like IDL or perhaps ASN.1 in its internals/generation.
jk4_
imo no one is allowed to touch the database outside of the well defined api offered by the db
and SQL itself doesn't qualify as an API
Shark8
jk4_: (re: SQL itself doesn't qualify as an API) -- Agreed.
Visaoni
I don't see how you'd be able to modularize it like that without resorting to either assuming some kind of database structure or taking the appropriate query as a parameter anyway, bringing us back to the original problem
jk4_
Shark8: so you create a transaction factory that produces a transaction type that has the API for that package and a commit() subprogram
obviously everything is roll'dback if commit isn't called
Ada user -> Ada package spec API -> Ada package wrapping the "binding" to SQL API -> calls SQL API
obviously you're using transactions
Shark8
Visaoni: Well, there's two reasons that DBs are used: one is for persistence, possibly w/ validity-constraints, and two is for the querying ability.
^-- (two: something akin to Prolog.)
Visaoni
jk4_: that sounds like it could get messy fast, unless you find some way to deal with scoping
jk4_
where'd my tail come from damn it
Shark8
(Action) resiste urge to make Dragonball joke.
*resists
Guest95723
even wrose!
Shark8
...I'd think jk4 is eaiser to type/remember than Guest95723.
(Looks like a nicserv problem.)
Visaoni
maybe we can start a fad
jk4
resolved
Visaoni
everybody can be Guestxxxx
we can play guessing games about who we're talking to
jk4
names are overrated
Shark8
(Action) is now known as GuestShark8.
Like that? ;)
jk4
that's 6 x's
Shark8
heh
Visaoni
when 3 just isn't enough :)
jk4
you listed 4
Visaoni
well... 4 is still more than 3 so... ha
Shark8
The name had 5,
jk4
(Action) goes back to algebra
i had to interrupt because it sounded like someone on the internet was wrong
heh
of the set of keyboard layouts for english K, has either of of you tried k in K where k != QWERTY and k != Dvorak?
Visaoni
I played around with Colemak
« prev 1 2 next »