Riccardo GUIDA
2018-07-13 14:50:00 UTC
Hi
2 problems:
1) I can't understand why the function randomGraph defined in drawPoints2.input is not find in the same file. Same behavior with drawPoints.input which has a more functional style in the use of $.
2) Trying to debugging I've met a system error that might interest the developers...
Thanks in advance for any hint!
ric
(1) -> )read drawPoints2.input
randomGraph: () -> GraphImage
Type: Void
randomGraph() ==
nHues ==> 27 -- hardcoded in FriCAS :(
nPoints ==> 100
randomX == ((uniform(0,1)$RandomFloatDistributions)())::DoubleFloat
randomY == ((uniform(0,1)$RandomFloatDistributions)())::DoubleFloat
randomPoint == point([randomX, randomY])$Point DoubleFloat
randomPointColor == dark ( color(1 + (random(nHues)$Integer))$Color )
randomLineColor == dark ( color(1 + (random(nHues)$Integer))$Color )
randomPointSize == (1 + random(30)$Integer)::PositiveInteger
gim := graphImage()$GraphImage
for i in 1..nPoints repeat
component(gim, randomPoint, randomPointColor, randomLineColor, randomPointSize)$GraphImage
return gim
Type: Void
gi1:GraphImage := randomGraph()
Compiled code for randomGraph has been cleared.
Compiling body of rule randomX to compute value of type DoubleFloat
Compiling body of rule randomY to compute value of type DoubleFloat
Compiling body of rule randomPoint to compute value of type Point(
DoubleFloat)
Compiling body of rule randomPointColor to compute value of type
Palette
Compiling body of rule randomLineColor to compute value of type
Palette
Compiling body of rule randomPointSize to compute value of type
PositiveInteger
Compiling function randomGraph with type () -> GraphImage
There are no library operations named randomGraph
Use HyperDoc Browse or issue
)what op randomGraph
to learn if there is any operation containing " randomGraph " in
its name.
Cannot find a no-argument definition or library operation named
randomGraph .
(3) -> )display properties
Properties of % :
Value (has type Void): "()"
Properties of %e :
This is a system-defined macro.
macro %e () == exp(1)
Properties of %i :
This is a system-defined macro.
macro %i () == complex(0,1)
Properties of %infinity :
This is a system-defined macro.
macro %infinity () == infinity()
Properties of %minusInfinity :
This is a system-defined macro.
macro %minusInfinity () == minusInfinity()
Properties of %pi :
This is a system-defined macro.
macro %pi () == pi()
Properties of %plusInfinity :
This is a system-defined macro.
macro %plusInfinity () == plusInfinity()
Properties of SF :
This is a system-defined macro.
macro SF () == DoubleFloat()
Properties of gi1 :
Declared type or mode: GraphImage
Properties of randomGraph :
Declared type or mode: (() -> GraphImage)
This is an interpreter function.
This depends on the following functions or rules:
$elt GraphImage component randomPoint randomPointColor randomLineColor randomPointSize graphImage PositiveInteger random Integer color Color dark randomY randomX point DoubleFloat Point uniform RandomFloatDistributions /throwAway
The value |RandomFloatDistributions| is not of type SEQUENCE.
(3) -> )clear completely
All user variables and function definitions have been cleared.
All )browse facility databases have been cleared.
Internally cached functions and constructors have been cleared.
)clear completely is finished.
(1) -> )read drawPoints.input
randomGraph: () -> GraphImage
Type: Void
randomGraph() ==
nHues ==> 27 -- hardcoded in FriCAS :(
nPoints ==> 100
randomX == ((uniform$RandomFloatDistributions)(0,1)())::DoubleFloat
randomY == ((uniform$RandomFloatDistributions)(0,1)())::DoubleFloat
randomPoint == (point$Point DoubleFloat)([randomX, randomY])
randomPointColor == dark ((color$Color)(1 + (random$Integer)(nHues)))
randomLineColor == dark ((color$Color)(1 + (random$Integer)(nHues)))
randomPointSize == (1 + (random$Integer)(30))::PositiveInteger
gim := (graphImage$GraphImage)()
for i in 1..nPoints repeat
(component$GraphImage)(gim, randomPoint, randomPointColor, randomLineColor, randomPointSize)
return gim
Type: Void
gi1:GraphImage := randomGraph()
Compiled code for randomGraph has been cleared.
Compiling body of rule randomX to compute value of type DoubleFloat
Compiling body of rule randomY to compute value of type DoubleFloat
Compiling body of rule randomPoint to compute value of type Point(
DoubleFloat)
Compiling body of rule randomPointColor to compute value of type
Palette
Compiling body of rule randomLineColor to compute value of type
Palette
Compiling body of rule randomPointSize to compute value of type
PositiveInteger
Compiling function randomGraph with type () -> GraphImage
There are no library operations named randomGraph
Use HyperDoc Browse or issue
)what op randomGraph
to learn if there is any operation containing " randomGraph " in
its name.
Cannot find a no-argument definition or library operation named
randomGraph .
(3) -> )display properties
Properties of % :
Value (has type Void): "()"
Properties of %e :
This is a system-defined macro.
macro %e () == exp(1)
Properties of %i :
This is a system-defined macro.
macro %i () == complex(0,1)
Properties of %infinity :
This is a system-defined macro.
macro %infinity () == infinity()
Properties of %minusInfinity :
This is a system-defined macro.
macro %minusInfinity () == minusInfinity()
Properties of %pi :
This is a system-defined macro.
macro %pi () == pi()
Properties of %plusInfinity :
This is a system-defined macro.
macro %plusInfinity () == plusInfinity()
Properties of SF :
This is a system-defined macro.
macro SF () == DoubleFloat()
Properties of gi1 :
Declared type or mode: GraphImage
Properties of randomGraph :
Declared type or mode: (() -> GraphImage)
This is an interpreter function.
This depends on the following functions or rules:
$elt GraphImage component randomPoint randomPointColor randomLineColor randomPointSize graphImage PositiveInteger random Integer color Color dark randomY randomX point DoubleFloat Point uniform RandomFloatDistributions /throwAway
The value |RandomFloatDistributions| is not of type SEQUENCE.
2 problems:
1) I can't understand why the function randomGraph defined in drawPoints2.input is not find in the same file. Same behavior with drawPoints.input which has a more functional style in the use of $.
2) Trying to debugging I've met a system error that might interest the developers...
Thanks in advance for any hint!
ric
(1) -> )read drawPoints2.input
randomGraph: () -> GraphImage
Type: Void
randomGraph() ==
nHues ==> 27 -- hardcoded in FriCAS :(
nPoints ==> 100
randomX == ((uniform(0,1)$RandomFloatDistributions)())::DoubleFloat
randomY == ((uniform(0,1)$RandomFloatDistributions)())::DoubleFloat
randomPoint == point([randomX, randomY])$Point DoubleFloat
randomPointColor == dark ( color(1 + (random(nHues)$Integer))$Color )
randomLineColor == dark ( color(1 + (random(nHues)$Integer))$Color )
randomPointSize == (1 + random(30)$Integer)::PositiveInteger
gim := graphImage()$GraphImage
for i in 1..nPoints repeat
component(gim, randomPoint, randomPointColor, randomLineColor, randomPointSize)$GraphImage
return gim
Type: Void
gi1:GraphImage := randomGraph()
Compiled code for randomGraph has been cleared.
Compiling body of rule randomX to compute value of type DoubleFloat
Compiling body of rule randomY to compute value of type DoubleFloat
Compiling body of rule randomPoint to compute value of type Point(
DoubleFloat)
Compiling body of rule randomPointColor to compute value of type
Palette
Compiling body of rule randomLineColor to compute value of type
Palette
Compiling body of rule randomPointSize to compute value of type
PositiveInteger
Compiling function randomGraph with type () -> GraphImage
There are no library operations named randomGraph
Use HyperDoc Browse or issue
)what op randomGraph
to learn if there is any operation containing " randomGraph " in
its name.
Cannot find a no-argument definition or library operation named
randomGraph .
(3) -> )display properties
Properties of % :
Value (has type Void): "()"
Properties of %e :
This is a system-defined macro.
macro %e () == exp(1)
Properties of %i :
This is a system-defined macro.
macro %i () == complex(0,1)
Properties of %infinity :
This is a system-defined macro.
macro %infinity () == infinity()
Properties of %minusInfinity :
This is a system-defined macro.
macro %minusInfinity () == minusInfinity()
Properties of %pi :
This is a system-defined macro.
macro %pi () == pi()
Properties of %plusInfinity :
This is a system-defined macro.
macro %plusInfinity () == plusInfinity()
Properties of SF :
This is a system-defined macro.
macro SF () == DoubleFloat()
Properties of gi1 :
Declared type or mode: GraphImage
Properties of randomGraph :
Declared type or mode: (() -> GraphImage)
This is an interpreter function.
This depends on the following functions or rules:
$elt GraphImage component randomPoint randomPointColor randomLineColor randomPointSize graphImage PositiveInteger random Integer color Color dark randomY randomX point DoubleFloat Point uniform RandomFloatDistributions /throwAway
The value |RandomFloatDistributions| is not of type SEQUENCE.
(3) -> )clear completely
All user variables and function definitions have been cleared.
All )browse facility databases have been cleared.
Internally cached functions and constructors have been cleared.
)clear completely is finished.
(1) -> )read drawPoints.input
randomGraph: () -> GraphImage
Type: Void
randomGraph() ==
nHues ==> 27 -- hardcoded in FriCAS :(
nPoints ==> 100
randomX == ((uniform$RandomFloatDistributions)(0,1)())::DoubleFloat
randomY == ((uniform$RandomFloatDistributions)(0,1)())::DoubleFloat
randomPoint == (point$Point DoubleFloat)([randomX, randomY])
randomPointColor == dark ((color$Color)(1 + (random$Integer)(nHues)))
randomLineColor == dark ((color$Color)(1 + (random$Integer)(nHues)))
randomPointSize == (1 + (random$Integer)(30))::PositiveInteger
gim := (graphImage$GraphImage)()
for i in 1..nPoints repeat
(component$GraphImage)(gim, randomPoint, randomPointColor, randomLineColor, randomPointSize)
return gim
Type: Void
gi1:GraphImage := randomGraph()
Compiled code for randomGraph has been cleared.
Compiling body of rule randomX to compute value of type DoubleFloat
Compiling body of rule randomY to compute value of type DoubleFloat
Compiling body of rule randomPoint to compute value of type Point(
DoubleFloat)
Compiling body of rule randomPointColor to compute value of type
Palette
Compiling body of rule randomLineColor to compute value of type
Palette
Compiling body of rule randomPointSize to compute value of type
PositiveInteger
Compiling function randomGraph with type () -> GraphImage
There are no library operations named randomGraph
Use HyperDoc Browse or issue
)what op randomGraph
to learn if there is any operation containing " randomGraph " in
its name.
Cannot find a no-argument definition or library operation named
randomGraph .
(3) -> )display properties
Properties of % :
Value (has type Void): "()"
Properties of %e :
This is a system-defined macro.
macro %e () == exp(1)
Properties of %i :
This is a system-defined macro.
macro %i () == complex(0,1)
Properties of %infinity :
This is a system-defined macro.
macro %infinity () == infinity()
Properties of %minusInfinity :
This is a system-defined macro.
macro %minusInfinity () == minusInfinity()
Properties of %pi :
This is a system-defined macro.
macro %pi () == pi()
Properties of %plusInfinity :
This is a system-defined macro.
macro %plusInfinity () == plusInfinity()
Properties of SF :
This is a system-defined macro.
macro SF () == DoubleFloat()
Properties of gi1 :
Declared type or mode: GraphImage
Properties of randomGraph :
Declared type or mode: (() -> GraphImage)
This is an interpreter function.
This depends on the following functions or rules:
$elt GraphImage component randomPoint randomPointColor randomLineColor randomPointSize graphImage PositiveInteger random Integer color Color dark randomY randomX point DoubleFloat Point uniform RandomFloatDistributions /throwAway
The value |RandomFloatDistributions| is not of type SEQUENCE.
--
You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel+***@googlegroups.com.
To post to this group, send email to fricas-***@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.