This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-09-05
Channels
- # announcements (2)
- # babashka (19)
- # beginners (14)
- # biff (10)
- # calva (23)
- # clojure (49)
- # clojure-europe (15)
- # clojure-nl (3)
- # clojure-norway (25)
- # clojure-seattle (1)
- # clojure-uk (4)
- # clojurescript (7)
- # data-science (6)
- # datahike (3)
- # datomic (1)
- # emacs (13)
- # events (2)
- # fulcro (3)
- # graalvm (13)
- # hyperfiddle (32)
- # leiningen (4)
- # lsp (38)
- # malli (1)
- # missionary (34)
- # nbb (28)
- # off-topic (42)
- # other-languages (5)
- # portal (8)
- # practicalli (1)
- # re-frame (3)
- # releases (1)
- # ring (7)
- # shadow-cljs (13)
- # sql (3)
Hi, is that possible use libpython-clj in graalvm? I tried but I got after this error:
(ns simple.search
(:require [libpython-clj2.python :refer [py. call-attr] :as py])
(:gen-class))
(println "Initializing...")
(require '[libpython-clj2.require :refer [require-python]])
Error message (not full)
INFO: Reference thread starting
Initializing libraries
Initializing test
Warning: RecomputeFieldValue.FieldOffset automatic substitution failed. The automatic substitution registration was attempted because a call to jdk.internal.misc.Unsafe.objectFieldOffset(Field) was detected in the static initializer of tech.v3.datatype.UnsafeUtil. Detailed failure reason(s): Could not determine the field where the value produced by the call to jdk.internal.misc.Unsafe.objectFieldOffset(Field) for the field offset computation is stored. The call is not directly followed by a field store or by a sign extend node followed directly by a field store.
[2/7] Performing analysis... [**********] (100,5s @ 3,61GB)
16 016 (92,00%) of 17 408 classes reachable
18 997 (30,45%) of 62 382 fields reachable
61 021 (61,65%) of 98 985 methods reachable
306 classes, 559 fields, and 1 089 methods registered for reflection
68 classes, 88 fields, and 56 methods registered for JNI access
6 native libraries: -framework CoreServices, -framework Foundation, dl, pthread, stdc++, z
------------------------------------------------------------------------------------------------------------------------
6,9s (5,8% of total time) in 27 GCs | Peak RSS: 5,72GB | CPU load: 4,23
========================================================================================================================
Failed generating './target/cli4clj-sample-project' after Error: Unsupported features in 6 methods
Detailed message:
Error: Detected a started Thread in the image heap. Threads running in the image generator are no longer running at image runtime. To see how this object got instantiated use --trace-object-instantiation=java.lang.Thread. The object was probably created by a class initializer and is reachable from a static field. You can request class initialization at image runtime by using the option --initialize-at-run-time=<class-name>. Or you can write your own initialization methods and call them explicitly from your main entry point.
Trace: Object was reached by
reading field java.util.concurrent.ThreadPoolExecutor$Worker.thread of constant
java.util.concurrent.ThreadPoolExecutor$Worker@4af7ac25: java.util.concurrent.ThreadPoolExecutor$Worker@4af7ac25[State = 0, empty queue]
Yes, this is third option, just I need inject into Python a Clojure function. I didnt do similar with Polygot
I filter in one Python indexed db with Clojure logic (rules). I will share with you on the ~ next week. Vector search engine like ChromaDB. ((I can share because the investor is out.. core of this, written in Clojure))