Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Matthew Lutze
@mlutze
What about "pax" for packager name? PAckage + fliX
Plus, it's Latin for "peace", so nice connotations
I guess the name is in use though: https://en.wikipedia.org/wiki/Pax_(command)
Magnus Madsen
@magnus-madsen
Not too bad
Someone also suggested "flip"
But in either case, the plan is to invoke the package manager from flix, e.g. flix build
so the name is mostly for internal use.
zetashift
@zetashift
I like Pax!
Magnus Madsen
@magnus-madsen
I am going to be away for a few days on vacation. Happy holidays everyone!
zetashift
@zetashift
Happy Holidays! Enjoy your vacation :D
v217
@v217

Hi all,
I am a physics student interested in programming languages. So not being too familiar with type theory, my questions might sound confusing or just don't make sense.

Just from browsing the docs isn't there some sort of duplication of the same expressive power:

Eg.: Recursive algebraic data types and datalog relations?
Couldn't we model part of the algebraic datatypes as datalog as well, this way avoiding different syntax, providing the same functionality.

What do you think of this paper by Aaron Stump:

Stump, Aaron, Benjamin Delaware, and Christopher Jenkins. "Relational Type Theory (All Proofs)." arXiv preprint arXiv:2101.09655 (2021).

Thanks

Is there a way to interact with sql databases?
Magnus Madsen
@magnus-madsen
Hello @v217, and thanks for your question.
For sure you can use algebraic data types to model sets and maps (we already do that)
With sets and maps you can express the same things as in Datalog
But Datalog is much more concise and has the potential to be much more efficient, unless you spent significant time optimizing your code.
For interacting with sql databases, you will need a java library
v217
@v217

Hi @magnus-madsen
Thank you for your fast response!
I first got interested in logic programming by reading this blog post by Bill Wadge about 'extensional higher order prolog' (hopes).
There is also a higher order datalog.

With sets and maps you can express the same things as in Datalog
But Datalog is much more concise and has the potential to be much more efficient, ...

So why not economize on syntax and implement algebraic datatypes as datalog rules with special restrictions as well. Note I am just starting to learn flix, so I am sorry, if that question does not make sense.

v217
@v217
If I am not mistaken this is the idea (make algebraic data types more powerful by additionally allowing datalog rules) in the paper by Aaron Stump.
Magnus Madsen
@magnus-madsen
There is a wide variety of logic programming languages out there. We have made some design choices (see our paper on first-class constraints).
Stephen Tetley
@stephentetley

Hi @v217 - I have a Flix database (JDBC) access library here - https://github.com/stephentetley/flix-basicdb

It's intended to connect with a database and send "SQL as strings" to it and decode resulting resultsets. Any higher level representation than "SQL as strings" would be built as a library on top of it.

I also have a project FactIO - https://github.com/stephentetley/factio - to read and write Flix Datalog facts as CSV and database rows (through JDBC). Recently, however, I've been thinking that standalone libraries for CSV and database access would be better than FactIO. flix-basicdb is almost capable for storing facts in a database, but I would need to start a new project for CSV with the existing code from FactIO.

v217
@v217

Thank you @magnus-madsen and @stephentetley
This will be the first library I install.
I've seen the supplemental video to "Fixpoints for the masses: programming with first-class Datalog constraints" - very impressed. I always write that I am a beginner, so that there is no confusion that a question is a critique but rather a "why question, I like to find an answer to"

Quite amazing what happens in this area in the last months not only in academia.
There also appeared:
https://github.com/erezsh/Preql
and
https://logica.dev/

Magnus Madsen
@magnus-madsen
You may want to use a nightly release- a lot has happened in master recently: https://flix.dev/nightly/
We are planning a big stable release for the summer. Our task currently is working a lot of smaller issues and then getting all the documentation up to date.
v217
@v217
@magnus-madsen Great! Thank you!
Magnus Madsen
@magnus-madsen
If you use VSCode just drop the jar in the project folder and it will use that instead
Aidan Goldfarb
@AidanGoldfarb
Hi all, I am attempting to integrate flix into crossbeam's test suite (https://github.com/crossbeam-rs/crossbeam-channel/tree/master/benchmarks) and wondering how to run flix via command line. I have the VSCode extension installed and working, but I was wondering how to access the flix compiler by itself. Any help would be greatly appreciated.
Aidan
Magnus Madsen
@magnus-madsen
Something like java -jar flix.jar your_program.flix
or java -jar flix.jar your_program.flix --args "your args here"
Magnus Madsen
@magnus-madsen
Hello everyone, I have added support for "get shareable link" to https://play.flix.dev/
These links are not intended to be stable over time, but could be useful for sharing a piece of code.
Note that nothing is stored server side, the program is encoded in the query param.
(note also that play.flix.dev uses the latest release which is pretty far behind by now)
Justin Fargnoli
@justinfargnoli
Urgent @magnus-madsen @mhyee @mlutze
Some previous commits (21ae918 until 0bea660) to this flix/flix#1904 exposed a bug in the code I wrote that causes the CI to never finish. I don't think I have the ability to cancel these workflows, so I think that you will need to do this.
Magnus Madsen
@magnus-madsen
I have updated the documentation at: https://doc.flix.dev/
Alot still needs to be done (including type classes and proof reading), but it should be much better aligned with the current master.
Matthew Lutze
@mlutze
I still seem to see the old documentation.
Magnus Madsen
@magnus-madsen
Its a caching issue, hit ctrl r
Magnus Madsen
@magnus-madsen
We have quietly released a new stable version with experimental support for type classes and a new Datalog backend.
The Flix website has also been updated.
zetashift
@zetashift
Oh keeping it low-key! Loving the progress
Magnus Madsen
@magnus-madsen
Thanks! We have more exciting stuff coming :)
Nathan BeDell
@Sintrastes
Hey all. I just learned about Flix recently. Love the logic programming aspect of it. I use a lot of Kotlin at work, which often disappoints me in the realm of type inference, and whereas Scala (especially recent versions) does not have great Android support. Flix seems promising as a proper ML on the JVM
I was wondering if Flix would be usable on Android, or if anyone has tried that out yet. Does the compiler target a particular JVM bytecode version, or is this flexible?
Magnus Madsen
@magnus-madsen

Hey all. I just learned about Flix recently. Love the logic programming aspect of it. I use a lot of Kotlin at work, which often disappoints me in the realm of type inference, and whereas Scala (especially recent versions) does not have great Android support. Flix seems promising as a proper ML on the JVM

Great to hear! We agree with the type inference issues of other languages.

I was wondering if Flix would be usable on Android, or if anyone has tried that out yet. Does the compiler target a particular JVM bytecode version, or is this flexible?

We current target 1.8 (I think- forgot what the internal version is called).

I don't think anyone has tried Android yet.
If/when Project Loom becomes a reality we do plan to target that (which may cause problems for Android).