Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 20 21:20

    axkr on master

    Fix JUnit test on master: TestP… (compare)

  • Jan 20 21:14
    gitpod-io[bot] commented #406
  • Jan 20 21:14
    axkr opened #406
  • Jan 20 21:12

    axkr on issue405

    #405 FindMinimum and FindMaximu… (compare)

  • Jan 20 21:10

    axkr on master

    #405 FindMinimum and FindMaximum (compare)

  • Jan 20 21:07
    axkr edited #405
  • Jan 20 21:06
    axkr edited #405
  • Jan 20 21:05
    axkr labeled #405
  • Jan 20 21:05
    axkr opened #405
  • Jan 20 07:57

    dependabot[bot] on maven

    (compare)

  • Jan 20 07:57

    axkr on master

    Bump jib-maven-plugin from 3.1.… (compare)

  • Jan 20 07:57
    axkr closed #404
  • Jan 20 04:18
    gitpod-io[bot] commented #404
  • Jan 20 04:18
    dependabot[bot] labeled #404
  • Jan 20 04:18
    dependabot[bot] labeled #404
  • Jan 20 04:18
    dependabot[bot] opened #404
  • Jan 20 04:18

    dependabot[bot] on maven

    Bump jib-maven-plugin from 3.1.… (compare)

  • Jan 18 17:03

    TiagoCavalcante on improve-ListLinePlot3D

    (compare)

  • Jan 18 17:03

    TiagoCavalcante on master

    Fix wrong scale with multiple l… (compare)

  • Jan 18 17:03
    TiagoCavalcante closed #403
TiMauzi
@TiMauzi
Since it's implicitly created by ExprEvaluator
Axel Kramer
@axkr
Oh, I'd thought you already used a modified Symja version?
TiMauzi
@TiMauzi
No, not at all
Axel Kramer
@axkr
Ok then lets add in your code this test:
ApfloatContext ctx = ApfloatContext.getContext();
      ctx.setNumberOfProcessors(1);
      ctx.setCleanupAtExit(false);
TiMauzi
@TiMauzi
Alright, I'll be back in a moment
Axel Kramer
@axkr
if possible after the initialization of ExprEvaluator
TiMauzi
@TiMauzi
Okay, at the moment I'm trying it before the ExprEvaluator. I'll try the other version after that
Axel Kramer
@axkr
I'll be away for some minutes
TiMauzi
@TiMauzi
Take your time :)
First result after placing the test before the ExprEvaluator initialization:
[2021-05-14T18:23:42,388][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [TIM] fatal error in thread [elasticsearch[TIM][search][T#1]], exiting
java.lang.ExceptionInInitializerError: null
        at org.elasticsearch.index.search.CommutingQuantumScorer$1.run(CommutingQuantumScorer.java:93) ~[?:?]
        at java.security.AccessController.doPrivileged(AccessController.java:312) ~[?:?]
        at org.elasticsearch.index.search.CommutingQuantumScorer.score(CommutingQuantumScorer.java:90) ~[?:?]
...
Caused by: org.apfloat.ApfloatConfigurationException: Error setting property "cleanupAtExit" to value "true"
        at org.apfloat.ApfloatContext.setProperty(ApfloatContext.java:1025) ~[?:?]
        at org.apfloat.ApfloatContext.setProperties(ApfloatContext.java:1270) ~[?:?]
        at org.apfloat.ApfloatContext.<init>(ApfloatContext.java:331) ~[?:?]
        at org.apfloat.ApfloatContext.<clinit>(ApfloatContext.java:1388) ~[?:?]
        ... 26 more
Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "shutdownHooks")
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:?]
        at java.security.AccessController.checkPermission(AccessController.java:1036) ~[?:?]
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:408) ~[?:?]
        at java.lang.Runtime.addShutdownHook(Runtime.java:212) ~[?:?]
        at org.apfloat.ApfloatContext.setCleanupAtExit(ApfloatContext.java:901) ~[?:?]
        at org.apfloat.ApfloatContext.setProperty(ApfloatContext.java:1016) ~[?:?]
        at org.apfloat.ApfloatContext.setProperties(ApfloatContext.java:1270) ~[?:?]
        at org.apfloat.ApfloatContext.<init>(ApfloatContext.java:331) ~[?:?]
        at org.apfloat.ApfloatContext.<clinit>(ApfloatContext.java:1388) ~[?:?]
        ... 26 more
fatal error in thread [elasticsearch[TIM][search][T#1]], exiting
...
TiMauzi
@TiMauzi
And a similar error if I place it after ExprEvaluator calcEvaluator = new ExprEvaluator(false, (short) 100);:
[2021-05-14T18:30:37,109][WARN ][stderr                   ] [TIM] java.lang.ExceptionInInitializerError
[2021-05-14T18:30:37,109][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.expression.F.<clinit>(F.java:599)
[2021-05-14T18:30:37,110][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.eval.ExprEvaluator.<clinit>(ExprEvaluator.java:133)
...
[2021-05-14T18:30:37,120][WARN ][stderr                   ] [TIM] Caused by: org.apfloat.ApfloatConfigurationException: Error setting property "cleanupAtExit" to value "true"
[2021-05-14T18:30:37,120][WARN ][stderr                   ] [TIM]       at org.apfloat.ApfloatContext.setProperty(ApfloatContext.java:1025)
...
[2021-05-14T18:30:37,122][WARN ][stderr                   ] [TIM] Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "shutdownHooks")
...
[2021-05-14T18:30:37,124][WARN ][stderr                   ] [TIM]       ... 31 more
[2021-05-14T18:30:37,133][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [TIM] fatal error in thread [elasticsearch[TIM][search][T#1]], exiting
java.lang.NoClassDefFoundError: Could not initialize class org.apfloat.ApfloatContext
        at org.elasticsearch.index.search.CommutingQuantumScorer$1.run(CommutingQuantumScorer.java:95) ~[?:?]
        at java.security.AccessController.doPrivileged(AccessController.java:312) ~[?:?]
...
@axkr So there is not much of a difference whether I place the ApfloatContext test before or after ExprEvaluator
Axel Kramer
@axkr
This seems to come from the apfloat library:
Can you open an issue where and ask how to set the properties to avoid that error, because I don't find a properties file in the apfloat's JAR itself.
TiMauzi
@TiMauzi
@axkr Although I'd like to take your advice and creating a modification of Symja meanwhile... Though, it would be more elegant of course if I could use an original version at some point :)
Axel Kramer
@axkr
Yes of course. You can contribute your changes back with a pull request to Symja if you create a fork on github.
TiMauzi
@TiMauzi
Mhm that might be a good idea... Although I usually use my university's gitlab, I can of course create my symja fork on github :)
TiMauzi
@TiMauzi
@axkr Added you to my fork :)
TiMauzi
@TiMauzi
@axkr The creator of apfloat answered btw :)
TiMauzi
@TiMauzi
@axkr I tried his 4th option, adding the line implementation "org.apfloat:apfloat-applet:1.9.1" to my build.gradle. I think it changed something, but I got a new Symja-related error:
[2021-05-15T01:57:51,755][WARN ][stderr                   ] [TIM] java.lang.NoClassDefFoundError: org/codehaus/commons/compiler/CompileException
[2021-05-15T01:57:51,755][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.builtin.CompilerFunctions$Initializer.init(CompilerFunctions.java:76)
[2021-05-15T01:57:51,756][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.builtin.CompilerFunctions$Initializer.access$200(CompilerFunctions.java:72)
[2021-05-15T01:57:51,756][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.builtin.CompilerFunctions.initialize(CompilerFunctions.java:84)
[2021-05-15T01:57:51,757][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.expression.F.<clinit>(F.java:910)
[2021-05-15T01:57:51,757][WARN ][stderr                   ] [TIM]       at org.matheclipse.core.eval.ExprEvaluator.<clinit>(ExprEvaluator.java:133)
...
[2021-05-15T01:57:51,769][WARN ][stderr                   ] [TIM] Caused by: java.lang.ClassNotFoundException: org.codehaus.commons.compiler.CompileException
...
TiMauzi
@TiMauzi
But I'm checking the class imports at the moment, because I'm feeling suspicious that it has something to do with that
that is part of the Janino compiler
TiMauzi
@TiMauzi
Yes, I found that out, too. Funny thing: Janino is imported perfectly. It's just the "commons" part that doesn't work. I'm at the moment trying if it works when I add this particular artifact
I think it's an Elasticsearch thing with transitive imports again, that just the parent library is importet but not the libraries called by the parent
TiMauzi
@TiMauzi
Yes baby!
[2021-05-15T02:35:13,743][INFO ][stdout                   ] [TIM] doToQuery()
[2021-05-15T02:35:13,745][INFO ][stdout                   ] [TIM] transcribe()
[2021-05-15T02:35:13,745][INFO ][stdout                   ] [TIM] transcribe()
[2021-05-15T02:35:13,746][INFO ][stdout                   ] [TIM] (matchquery$$fuchs&&(matchquery$$schaf||(!matchquery$$schaf&&matchquery$$huhn)))||(!matchquery$$matchquery$$fuchs&&matchquery$$schaf&&matchquery$$wolf)
[2021-05-15T02:35:13,776][INFO ][stdout                   ] [TIM] CommutingQuantumQuery
[2021-05-15T02:35:13,788][INFO ][stdout                   ] [TIM] CommutingQuantumWeight
[2021-05-15T02:35:13,790][INFO ][stdout                   ] [TIM] CommutingQuantumScorer
[2021-05-15T02:35:13,791][INFO ][stdout                   ] [TIM] score()
... no class errors here anymore! :tada:
[2021-05-15T02:35:14,733][INFO ][stdout                   ] [TIM] Index 1 out of bounds for length 1
[2021-05-15T02:35:14,742][WARN ][r.suppressed             ] [TIM] path: /fables/_search, params: {index=fables}
org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed
        at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseFailure(AbstractSearchAsyncAction.java:661) [elasticsearch-8.0.0-SNAPSHOT.jar:8.0.0-SNAPSHOT]
...
Caused by: java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Float (java.lang.Integer and java.lang.Float are in module java.base of loader 'bootstrap')
        at org.elasticsearch.index.search.CommutingQuantumScorer.score(CommutingQuantumScorer.java:91) ~[?:?]
...
Just my own programming mistakes for now
And yes, using the janino commons-compiler artifact worked :)
@axkr So that means, that I actually can use your original Symja (if nothing unexpected happens anymore) :)
Axel Kramer
@axkr
@TiMauzi go ahead ;-)
Axel Kramer
@axkr
@TiMauzi bumped version to 2.0.0-SNAPSHOT because of other Maven module partition:
https://github.com/axkr/symja_android_library#license
TiMauzi
@TiMauzi
@axkr There might be a problem with the new version. I upgraded it in my build.gradle and suddenly, the following doesn't evaluate anymore:
Variables(termquery$$fuchs*(termquery$$huhn*(1-termquery$$schaf)+termquery$$schaf)+(1-termquery$$fuchs)*termquery$$schaf*termquery$$wolf)
Of course, it should output {termquery$$fuchs,termquery$$huhn,termquery$$schaf,termquery$$wolf} which works here: http://matheclipse.org/
TiMauzi
@TiMauzi
I had to go back to 1.0.0-SNAPSHOT for now, because there everything works flawlessly
While in 1.0.0-SNAPSHOT, the line IExpr varsExpr = calcEvaluator.eval("Variables(" + calc + ")"); evaluates to {termquery$$fuchs,termquery$$huhn,termquery$$schaf,termquery$$wolf}, the same code in 2.0.0-SNAPSHOT evaluates to just Variables(termquery$$fuchs*(termquery$$huhn*(1-termquery$$schaf)+termquery$$schaf)+(1-termquery$$fuchs)*termquery$$schaf*termquery$$wolf)
(calc is of course my test string "termquery$$fuchs*(termquery$$huhn*(1-termquery$$schaf)+termquery$$schaf)+(1-termquery$$fuchs)*termquery$$schaf*termquery$$wolf" in the examples above)
Axel Kramer
@axkr
@TiMauzi in this JUnit test I cannot reproduce the problem:
Can you create a minimal example which reproduces the error?
And set Config.DEBUG=true at the beginning?
TiMauzi
@TiMauzi
I saw that a class named "org/unbescape/html/HtmlEscape" is missing for me. In which part of Symja is this implemented?
TiMauzi
@TiMauzi
@axkr Okay, turns out the problem was, as often happens, that Elasticsearch didn't load the new transitive dependencies from Symja 2.0.0-SNAPSHOT, it was just a bit less visible this time. Sorry for taking away your time!
Xipeng Shen
@xipengshen

Hi, Is. there a plan to support Matrix Calculus in Symja, where, a matrix or vector can be manipulated as a whole? Such a support exists in Sympy, as illustrated as follows:

X = MatrixSymbol('X', 3, 3)
Y = MatrixSymbol('Y', 3, 3)
(X.TX).IY. would give 𝑋^(−1) (𝑋^𝑇)^(−1) 𝑌 // where, X.T is transpose(X); X.I is inverse(X)

What would be even better is to support the formulae in Matrix Calculus for differentiations of Matrix expressions (https://en.wikipedia.org/wiki/Matrix_calculus), such as

        D(transpose(a)*X*b, X) 

would produce
b*transpose(a)
where a and b are two vectors and X is a matrix of compatible shapes.
Such a support would make Symja very useful in Differentiable Programming of tensor-based programs.

For symbolic manipulation you can load packages with transformation rules or do you mean standard predefined "automatic" transformation rules?