rabbitmq / erlando Goto Github PK
View Code? Open in Web Editor NEWErlando
Home Page: https://www.rabbitmq.com/
Erlando
Home Page: https://www.rabbitmq.com/
Clearly erlando relies on pmods. Are you intending to release an R16B - compatible version in future?
The docs indicates the parameterized modules functionality is required but
that has been removed from Erlang (I believe) so what does that mean?
Is erlando non-functional nowadays?
As per subject, if some tests are broken but you run 'eunit' wrapper (via rebar eunit
for instance) the result of the run still says
All 3 tests passed.
This seems to happen because test:test/2
wrapper catches all errors (including badmatch
) and converts them into error messages (or plain ok
if the test has passed), but 'eunit' treats any return from test function as test success.
It is can be easily fixed though: See the commit in my branch
However this stil not quite "eunit-ing": the first error aborts the entire test module run so if there are some other failures they won't be reported untill the first one is fixed. So here is another way to run the existing tests va 'eunit': another commit on another branch. This way all the tests (22 at the moment) are extracted and run with 'eunit' which will report all the failures.
I get parameterized modules are no longer supported
error while building with OTP 20. Is it fixable?
Hello All!
Is it time to tag a new release?
Any chance of this being published to hex.pm?
Because it's using lists:foldr/3, sequence/2 is evaluating Xs from right to left?
sequence(Monad, Xs) ->
lists:foldr(fun (X, Acc) ->
do([Monad || E <- X,
Es <- Acc,
return([E|Es])])
end, Monad:return([]), Xs).
How about a Readme at least, just so people know what erlando is?
thanks
Given how 'cut' works and the special cases for the syntactic nesting as mentioned in https://github.com/rabbitmq/erlando/blob/bug24025/README.md, it feels to me that the cut syntax should rather be wrapped in a special function call of the form cut(<Exp>)
as it is the case with many other parse transforms.
To explain, let's reuse your example:
list_to_binary([1, 2, math:pow(2, _)]).
This, as the text says, would yield
list_to_binary([1, 2, fun (X) -> math:pow(2, X) end]).
and not
fun (X) -> list_to_binary([1, 2, math:pow(2, X)]) end.
If instead the syntax was cut(Expression)
, you could easily choose between
list_to_binary([1, 2, cut(math:pow(2,_))])
and
cut(list_to_binary([1, 2, math:pow(2, _)])).
You could also increase the flexibility of patterns such as
F = [1, _, _, [_], 5, 6, [_], _]
[1, 2, 3, G, 5, 6, H, 8] = F(2, 3, 8),
Now possibly being
F = cut([1, _, _, [_], 5, 6, [_], _])
[1, 2, 3, [4], 5, 6, [7], 8] = F(2,3,4,7,8)
Which seems rather tedious to do with the current syntax.
Other advantages would include a better fit with currently existing parse transforms. The best example of this is for QLC, where instead of basing the parse transform on its context in order to do things, you simply wrap the list comprehension in a qlc:q(LC)
call, or ets' fun2ms where you do ets:fun2ms(Fun)
. In this last case, it also allows the code to have special cases for shell functions (whose internal structure is more like abstract code) to be able to turn them into match specifications transparently.
Given the advice of some Erlangers on IRC, wrapping things in a cut(Exp)
call also makes it easier to parse visually, denotes intent better, is more flexible and serves as a warning sign that magic is happening at this place (and it's not an error!). Without having too much experience with parse transform myself, I will make the audacious call that it might make things easier to parse in the first place for the parse transform, but I might well be wrong on that one, especially since the code has already been written.
Note that this view also aligns better with the Scheme implementation it is inspired by, given the scheme implementation uses a special (cut <exp>)
syntax to wrap its use.
The Makefile includes ../umbrella.mk
Unused variable compiler warnings
compile: warnings being treated as errors
test/src/test_do.erl:185: variable 'A' is unused
test/src/test_do.erl:186: variable 'A' is unused
test/src/test_do.erl:187: variable 'A' is unused
Please see the commit below for (one possible) a fix.
https://github.com/norton/erlando/commit/346b37e05e1347f11c98414554e95653a1d3be0a
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.