Comments (2)
My bad, I found my errors!
from lux.
Hi, @Arjuna144
I am still using luxc3.1.jar since I am getting the following error with luxc.3.2.jar and the following
There were some important changes to Lux as a language in v0.3.2 that cause the v0.3.1 stdlib to not compile (which was probably the error you got, since I see the _lux_def
form you showed there lacks meta-data, which was a v0.3.2 addition).
I'm waiting until I'm done with v0.3.3 to document those changes, since some stuff requires a bit more polishing (I fixed a bug with tuples and I'm working on fixing one with variants, both of which were introduced in a major change during v0.3.2).
I've also abstained from talking about JVM interop because I'm still adding a bit more features on that front, plus polishing what's already there, since it's usable, but not terribly comfortable as of v0.3.2 (importing them is great, but defining new classes is still somewhat of a hassle).
Anyway... regarding the infinite loop!
You didn't post the error, so I can only speculate, but I'm aware of a stack-overflow error that sometimes happens in the type-checking phase that gets solved by just adding a bit more type annotations.
I imagine you got that one and fixed it in that way.
By the way, when you define this:
(def (echo)
(IO (,))
(>>= IO/Monad read-line tellWhat))
You don't need to put echo
in parentheses. You can, if you want, but it's not mandatory.
The parentheses syntax on def
is just there as a convenience to save people from having to add an extra lambda
form.
Consider this:
(def (>>= m ma f)
(All [m a b]
(-> (Monad m) (m a) (-> a (m b)) (m b)))
(using m
(join (map f ma))))
Versus this:
(def >>=
(All [m a b]
(-> (Monad m) (m a) (-> a (m b)) (m b)))
(lambda [m ma f]
(using m
(join (map f ma)))))
Oh... and remember that to run a program you need a (program args ...)
form, which is basically your "main" method.
from lux.
Related Issues (20)
- `lein lux build` doesn't work (JDK9) HOT 1
- Proposal to simlify module imports HOT 12
- Add integration with dev tools HOT 4
- Exception when trying to build HOT 2
- Exception when trying to launch repl HOT 5
- Lux and GraalVM ? HOT 2
- Start Up Time HOT 2
- Questions about syntax HOT 3
- Clarify URL for "The Lux Programming Language" HOT 2
- Specify known good versions of JDK and Leiningen in documentation HOT 3
- Commercial License? HOT 2
- Integrate ideas from unison HOT 1
- Gitbook link does not work HOT 1
- Exception when trying to run program built with Lux HOT 7
- Aedifex doesn't run in headless JVMs HOT 1
- There needs to be a features matrix for each backend HOT 3
- Document use of sigils in standard library HOT 1
- JS build fails for hello world example HOT 3
- how to manual install ? HOT 3
- Build failure on 0.8.0 for Hello World example from book HOT 11
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 lux.