Comments (5)
With the UPDATE syntax can even change colors according to other color, even position:
UPDATE colors SET r = (x / 100) % 255, g = (y / 50) % 255;
I bet the output is particularly ugly, but I made my point ^-^
from pixql.
I've answered this in another thread here (and on reddit, HN, etc...), but the gist is "more sql-ish" isn't really a goal for me. I find some of the practices within SQL to not really be ideal (ie, setting a value before picking out what you're setting...). Further, the idea to separate "colors" into the equivalent of a table functions to map this better to traditional SQL, but has no other purpose. There isn't a ton of use to consider colors as its own table. And for your latter post, you can already do that!
OPERATE SET r = (col / 100) % 255; OPERATE SET g = (row / 50) % 255;
I am however looking for more terse ways to express multiple operates (the comma syntax like within your latter query looks promising...).
All that said, thanks for the suggestions! Like I said, you're not the only one to suggest this, so it's definitely got some more brewing time in my head before I figure out how to move forward...
Thanks!
from pixql.
I see a lot of possibilities to use a table name, here are some tables examples:
- EXIF
- XMP
- IPTC
- JFIF
- You got it...
- info (Containing width, height, name, size, compression_mode, format, color_space, bit_depth, chroma_subsampling, ... you got it)
- Why not exposing each color representation: colors_RGB, colors_RGBA, colors_YUV, colors_YIQ, colors_YDbDr, etc .... ?
- I'm sure in the future we'll have ideas to index an image with other metrics than X, Y, so other tables to hit them may be usefull.
As a matter of fact, I don't like the OPERATE
keyword, and don't understand where is the gain of inventing a new keyword instead of using the already existing UPDATE
.
I mean, everyone know, understand, and can fluently write UPDATE statements, but they'll have to read your documentation to learn the OPERATE statement, why ?
from pixql.
I guess I should keep this thread open to centralize discussion on this, as it seems there is more discussion to be had.
With your request to add "tables" as essentially organizational namespaces, I'm still hesitant. I'd like to push hard to keep things simple- if the interface to this gets complex as photoshop, you really ought just be using photoshop. I'd ideally like a quick skim to be able to pick up two or three "truths" about this language ("ok, so semicolon separated statements, an optional init, n procedures which consists of n selects and n operates, ok got it") and you really know everything there is to know. Any further functionality (eg, "how do I blur") is on the user. Who knows. Maybe that philosophy still has room to evolve.
And with switching OPERATE to UPDATE, I'm not super against it. OPERATE makes it clear that the syntax is different (rather than "Why doesn't UPDATE SET r = 255 WHERE row = 100
work?!?!"). But again, still up for discussion.
Thanks again for your input!
from pixql.
I also dislike the OPERATE syntax, but I don't think UPDATE is the right solution. I see two perspectives on this.
- If you filter with a WHERE clause, it still includes the filtered out pixels, it just doesn't operate on them; similar to an UPDATE statement in SQL.
- But if you have an output target, you're not really modifying/UPDATE-ing the original, so "update" is misleading. (And it would be unhelpful to force the syntax to describe where the output is going; this should remain a command argument.)
Neither select nor update fit pixQL's model perfectly from a SQL background, but in my opinion #2 is a stronger argument and select should stay, with some modifications. I want to propose an alternate syntax for SELECT; I suppose I'll do that on a different issue.
from pixql.
Related Issues (8)
- Consider tiling to query images efficiently HOT 1
- Changing the way SQL works HOT 1
- Cannot compile - variably modified ‘query_operation_tokens_of_oo_lvl’ at file scope HOT 1
- reserved identifier violation HOT 7
- Completion of error handling HOT 4
- Addition of a build system generator HOT 1
- What is the license which applies to this repository? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pixql.