Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
evgskv
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
evgskv
2y ago
Ah, yes, you're right! Please do: # ... Q(your_column) :- example_db.YourTable(your_column:); You can query multiple columns of course. Feel free to start threads in Discussions of the repo with whatever questions you have!
2.
▲
by
evgskv
2y ago
In my opinion any analytical query is easier to read in logic language than in SQL. But it's most obvious for recrusive querries. E.g. distance in graph defined by predicate (aka table) G written in Logica looke like: D(a, b) Min=
3.
▲
by
evgskv
2y ago
To connect to a database file use: @AttachDatabase("db_prefix", "your_file.db"); # Then you can query from it: Q(..r) :- db_prefix.YourTable(..r);
4.
▲
by
evgskv
2y ago
There is a standard method of optimization - breaking predicate into smaller ones and saving intermediates into database. Typically program runs efficiently, but when optimization is needed - you can do it by breaking up the predicate.
5.
▲
by
evgskv
2y ago
Yeah, we need better tutorials. To use SQLite use @Engine("sqlite") imperative. And you can then connect to you database file with @AttachDatabase imperative. For example if you have example.db file with Fruit table which has col0
6.
▲
by
evgskv
2y ago
yes.
7.
▲
by
evgskv
2y ago
I think of Prolog as a general purpose logic programming language and Datalog to be logic programming more focused on data analysis. Data analysis is a very large area, so boundary might get blurry at times. If your data is in a relational
8.
▲
New welcome page for Logica language
(logica.dev)
2 points
by
evgskv
3y ago
|
1 comments
9.
▲
by
evgskv
3y ago
I have update Logica homepage. Hope it helps to get a sense of what the language is about.
10.
▲
by
evgskv
4y ago
Looks like Mangle differs from Prolog when it needs to express aggregation. I am curious what prolog dialect/library you think has good(or best?) aggregation syntax?
11.
▲
by
evgskv
4y ago
That's right. And btw Logica is also open source: https://github.com/evgskv/logica