postspectacular Github contribution chart
postspectacular Github Stats
postspectacular Most Used Languages

Activity

29 Sep 2022

Postspectacular

feat(examples): major update commit-heatmap gen

Pushed On 29 Sep 2022 at 12:53:13

Postspectacular

build: update deps

Pushed On 29 Sep 2022 at 10:17:19

Postspectacular

feat(examples): update webgl-channel-mixer

  • add exposure controls
  • update shader
  • refactor channelControls()
  • update allowed MIME types

Pushed On 28 Sep 2022 at 09:07:16

Postspectacular

feat(examples): add webgl-channel-mixer preset handling

Pushed On 28 Sep 2022 at 09:07:16

Postspectacular

docs: update main readme

Pushed On 27 Sep 2022 at 04:29:17

Postspectacular

Publish

Pushed On 27 Sep 2022 at 04:29:17

Postspectacular

docs(math): add docstrings

Pushed On 27 Sep 2022 at 04:23:23

Postspectacular

fix(tools): update exclusions in search index

Pushed On 27 Sep 2022 at 04:23:23

Postspectacular

format(tools): update indentation

Pushed On 27 Sep 2022 at 04:23:23

Postspectacular

refactor(porter-duff): add BlendFn types

Pushed On 27 Sep 2022 at 04:23:23

Postspectacular

feat(rasterize): add defBlendF/I shader fns, update Shader2D

BREAKING CHANGE: update Shader2D args

  • add thi.ng/porter-duff dependency
  • update Shader2D args, pass target buffer as new initial arg
  • add defBlendF()/defBlendI() shader fns for PD blend ops

Pushed On 27 Sep 2022 at 04:23:23

Postspectacular

feat(pixel): update .blitCanvas(), .toImageData()

BREAKING CHANGE: add BlitCanvasOpts for optional .blitCanvas() args

  • update .blitCanvas() impls
  • update .toImageData() impls to accept pre-existing ImageData instance
  • add ensureImageData() check

Pushed On 27 Sep 2022 at 04:23:23

Postspectacular

perf(shader-ast-js): pre-cache ImageData in canvasRenderer()

Pushed On 27 Sep 2022 at 04:23:23

Postspectacular

feat(examples): add rasterize-blend demo

Pushed On 27 Sep 2022 at 04:23:23

Postspectacular

fix(examples): minor update pixel-basics

Pushed On 27 Sep 2022 at 04:23:23

Postspectacular

docs: update/regen readmes

Pushed On 27 Sep 2022 at 04:23:23

Postspectacular

build: update make-example script

Pushed On 27 Sep 2022 at 04:23:23

Postspectacular

docs: update main readme

Pushed On 27 Sep 2022 at 04:23:23

Postspectacular

Publish

Pushed On 27 Sep 2022 at 04:23:23

Postspectacular

docs: update/regen readmes

Pushed On 27 Sep 2022 at 04:04:58

Postspectacular

build: update make-example script

Pushed On 27 Sep 2022 at 04:04:58

Postspectacular

fix(tools): update exclusions in search index

Pushed On 27 Sep 2022 at 04:00:40

Postspectacular

format(tools): update indentation

Pushed On 27 Sep 2022 at 04:00:40

Postspectacular

refactor(porter-duff): add BlendFn types

Pushed On 27 Sep 2022 at 04:00:40

Postspectacular

feat(rasterize): add defBlendF/I shader fns, update Shader2D

BREAKING CHANGE: update Shader2D args

  • add thi.ng/porter-duff dependency
  • update Shader2D args, pass target buffer as new initial arg
  • add defBlendF()/defBlendI() shader fns for PD blend ops

Pushed On 27 Sep 2022 at 04:00:40

Postspectacular

feat(pixel): update .blitCanvas(), .toImageData()

BREAKING CHANGE: add BlitCanvasOpts for optional .blitCanvas() args

  • update .blitCanvas() impls
  • update .toImageData() impls to accept pre-existing ImageData instance
  • add ensureImageData() check

Pushed On 27 Sep 2022 at 04:00:40

Postspectacular

perf(shader-ast-js): pre-cache ImageData in canvasRenderer()

Pushed On 27 Sep 2022 at 04:00:40

Postspectacular

feat(examples): add rasterize-blend demo

Pushed On 27 Sep 2022 at 04:00:40

Postspectacular

fix(examples): minor update pixel-basics

Pushed On 27 Sep 2022 at 04:00:40

Postspectacular

docs(math): add docstrings

Pushed On 23 Sep 2022 at 04:34:35

Postspectacular

build: update deps

Pushed On 22 Sep 2022 at 02:10:55

Postspectacular

fix(tangle): in-memory rel path handling

  • update test fixtures

Pushed On 22 Sep 2022 at 10:09:42

Postspectacular

docs(tangle): add docstrings, update readme

Pushed On 22 Sep 2022 at 10:09:42

Postspectacular

Publish

Pushed On 22 Sep 2022 at 10:09:42
Create Branch
Postspectacular In thi-ng/umbrella Create Branch@thi.ng/tangle@0.1.1

Postspectacular

⛱ Broadly scoped ecosystem & mono-repository of 168+ TypeScript projects for functional, data driven development

On 22 Sep 2022 at 10:09:27

Postspectacular

fix(tangle): in-memory rel path handling

  • update test fixtures

Pushed On 22 Sep 2022 at 10:09:27

Postspectacular

docs(tangle): add docstrings, update readme

Pushed On 22 Sep 2022 at 10:09:27

Postspectacular

Publish

Pushed On 22 Sep 2022 at 10:09:27
Issue Comment

Postspectacular

[all] Request support to run on javascript platforms that don't allow dynamic code

  1. https://miniprogram.alipay.com/
  2. https://developers.weixin.qq.com/miniprogram/en/dev/

In the above two platforms, they provide a simplified javascript runtime environment.

including some private javascript runtime environments, the use of javascript capabilities is basically prohibited for security.

  1. Executing JS code with eval is not supported
  2. Creating functions with new Function is not supported Except new Function('return this')

https://github.com/thi-ng/umbrella/blob/develop/packages/vectors/src/compile/emit.ts#L160 https://github.com/thi-ng/umbrella/blob/develop/packages/pixel/src/convolve.ts#L244 https://github.com/thi-ng/umbrella/blob/develop/packages/pixel/src/internal/codegen.ts#L21 https://github.com/thi-ng/umbrella/blob/develop/packages/shader-ast-js/src/target.ts#L269

There are some codes in the current code repository that use these disallowed features. Are there any plans to support these platforms in the future?

Forked On 22 Sep 2022 at 09:30:32

Postspectacular

Sorry, all of the features provided by these listed packages are explicitly relying on code generation and I can't see how one would even work around that in principle. E.g. for the vector & pixel operations there's combinatorial explosion of possibilities and without code generation the number of resulting permutations would be simply unmaintainable and the filesize of these packages would grow exponentially. The shader-ast-js package is designed as an AST-to-JS code generator, so there simply is no alternative static approach at all (other than writing an interpreter, but that's so infeasible as to be pointless, also in performance...)

So I'm sorry to say, but the answer to your question will have to be a strict "no". Hope you understand!

Commented On 22 Sep 2022 at 09:30:32

Postspectacular

docs: update main readme (pkg lists)

Pushed On 21 Sep 2022 at 09:46:29

Postspectacular

Publish

Pushed On 21 Sep 2022 at 09:46:29

Postspectacular

docs: update readmes

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

docs(ramp): update pkg meta & readme

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

feat(geom-splines): add quadraticFromCubic() conversion

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

feat(logger): update MemoryLogger

  • add .clear() & .messages() methods
  • update pkg meta

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

feat(hex): add U64BIG

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

feat(wasm-api): update core API & bindings

  • add _panic(), timer(), epoch() core API fns
  • update printI/U64() fns to accept bigint
  • update C & Zig bindings
  • update tests
  • add clang-format

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

feat(wasm-api): add WasmString wrappers

  • still unused (to be added to TS codegen)

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

test(wasm-api): update custom.wasm

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

feat(wasm-api): WasmString codegen integration

  • update TS codegen to wrap strings using new WasmString or WasmStringPtr
  • update global codegen options handling, now passed to each codegen
  • update TSOpts & ZigOpts to include custom pre/post

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

feat(wasm-api): major update codegens, string & pointer handling

  • update/fix string wrappers (WasmStringSlice/Ptr)
  • add generic Pointer wrapper
  • add const field type support
  • add applyIndents() formatter fn, simplify all codegens
  • major update TS & Zig codegens

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

feat(testament): add CLI support for path exclusions

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

feat(wasm-api): update CodeGenOpts

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

feat(wasm-api): update TS codegen (array pointers)

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

test(wasm-api): add codegen tests & fixtures

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

fix(examples): minor updates webgl-channel-mixer

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

feat(wasm-api): add C11 support, update codegens & config

  • add preliminary C11 codegen
  • add optional tag field for structs (extern/packed)
  • add support for auto-labeled padding fields
    • i.e. defined via unnamed fields with pad value
  • move debug config option to global CodeGenOpts

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

feat(wasm-api): update codegen CLI

  • add C11 support
  • add support for padding fields (in validateTypeRefs())
  • add CLI arg for forcing string type impl
  • update deps

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

test(wasm-api): update tests, minor update zig codegen (whitespace only)

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

docs(wasm-api): update zig docstrings

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

feat(examples): add svg-resample example

Pushed On 21 Sep 2022 at 09:38:07

Postspectacular

feat(color): add WCAG2 contrast() fn

Pushed On 21 Sep 2022 at 09:21:01

Postspectacular

docs(wasm-api): restructure readme

Pushed On 21 Sep 2022 at 09:21:01

Postspectacular

feat(testament): add default file exclusions (/test/fixtures)

Pushed On 21 Sep 2022 at 04:39:10

Postspectacular

feat(errors): add I/O error types & factories

  • add IOError
  • add FileNotFoundError

Pushed On 21 Sep 2022 at 04:39:10

Postspectacular

build: update dev deps (TS4.8.3), minor refactoring

  • update Object.keys() related call sites / generics

Pushed On 21 Sep 2022 at 04:39:10

Postspectacular

minor(tools): update banner path in config

Pushed On 21 Sep 2022 at 04:39:10

Postspectacular

feat(tangle): update/fix tangle logic, filesys context, CLI

  • add block concatenation if multiple blocks w/ same target
  • fix block boundary regex
  • add absolute path checks for outputs
  • refactor TangleCtx, extract FileSys, update in-memory impl
  • expose CLI in package.json

Pushed On 21 Sep 2022 at 04:39:10

Postspectacular

docs: update all readmes

Pushed On 21 Sep 2022 at 04:39:10

Postspectacular

minor(tools): update package readme partials

Pushed On 21 Sep 2022 at 04:39:10

Postspectacular

docs(tangle): update readme

Pushed On 21 Sep 2022 at 04:39:10
Issue Comment

Postspectacular

JOGL examples not working

Trying to run any of the JOGL examples results in an error, it seems that jogamp for whatever reason cannot be loaded into the namespace

stack trace upon trying to load examples/jogl/stl_mesh.clj

CompilerException java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/b7/8gchdr29163fj3sl6cjqn0_m0000gn/T/jogamp_0000/file_cache/jln13507248069143319711/jln4324653017614860419/natives/macosx-universal/libgluegen-rt.jnilib, compiling:(core.clj:81:1) 
ERROR: Unhandled REPL handler exception processing message {:nrepl.middleware.print/stream? 1, :nrepl.middleware.print/print cider.nrepl.pprint/pprint, :nrepl.middleware.print/quota 1048576, :nrepl.middleware.print/buffer-size 4096, :nrepl.middleware.print/options {:right-margin 70}, :op stacktrace, :session 223e9410-21f4-4482-8d59-a107ef924db1, :id 8}
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class com.jogamp.common.os.Platform
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
	at clojure.core$deref_future.invokeStatic(core.clj:2292)
	at clojure.core$future_call$reify__8097.deref(core.clj:6894)
	at clojure.core$deref.invokeStatic(core.clj:2312)
	at clojure.core$pmap$step__8110$fn__8114.invoke(core.clj:6945)
	at clojure.lang.LazySeq.sval(LazySeq.java:40)
	at clojure.lang.LazySeq.seq(LazySeq.java:49)
	at clojure.lang.RT.seq(RT.java:528)
	at clojure.core$seq__5124.invokeStatic(core.clj:137)
	at clojure.core$map$fn__5591.invoke(core.clj:2749)
	at clojure.lang.LazySeq.sval(LazySeq.java:40)
	at clojure.lang.LazySeq.seq(LazySeq.java:49)
	at clojure.lang.Cons.next(Cons.java:39)
	at clojure.lang.RT.next(RT.java:706)
	at clojure.core$next__5108.invokeStatic(core.clj:64)
	at clojure.core.protocols$fn__7852.invokeStatic(protocols.clj:169)
	at clojure.core.protocols$fn__7852.invoke(protocols.clj:124)
	at clojure.core.protocols$fn__7807$G__7802__7816.invoke(protocols.clj:19)
	at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
	at clojure.core.protocols$fn__7835.invokeStatic(protocols.clj:75)
	at clojure.core.protocols$fn__7835.invoke(protocols.clj:75)
	at clojure.core.protocols$fn__7781$G__7776__7794.invoke(protocols.clj:13)
	at clojure.core$reduce.invokeStatic(core.clj:6748)
	at clojure.core$into.invokeStatic(core.clj:6815)
	at clojure.core$mapv.invokeStatic(core.clj:6823)
	at clojure.core$mapv.invoke(core.clj:6823)
	at cider.nrepl.middleware.stacktrace$flag_duplicates.invokeStatic(stacktrace.clj:205)
	at cider.nrepl.middleware.stacktrace$flag_duplicates.invoke(stacktrace.clj:194)
	at cider.nrepl.middleware.stacktrace$analyze_stacktrace.invokeStatic(stacktrace.clj:219)
	at cider.nrepl.middleware.stacktrace$analyze_stacktrace.invoke(stacktrace.clj:213)
	at cider.nrepl.middleware.stacktrace$analyze_cause.invokeStatic(stacktrace.clj:323)
	at cider.nrepl.middleware.stacktrace$analyze_cause.invoke(stacktrace.clj:314)
	at cider.nrepl.middleware.stacktrace$analyze_causes$fn__4401.invoke(stacktrace.clj:348)
	at clojure.core$map$fn__5583$fn__5584.invoke(core.clj:2734)
	at clojure.core$take_while$fn__5634$fn__5635.invoke(core.clj:2893)
	at clojure.lang.Iterate.reduce(Iterate.java:79)
	at clojure.core$transduce.invokeStatic(core.clj:6803)
	at clojure.core$into.invokeStatic(core.clj:6819)
	at clojure.core$into.invoke(core.clj:6807)
	at cider.nrepl.middleware.stacktrace$analyze_causes.invokeStatic(stacktrace.clj:347)
	at cider.nrepl.middleware.stacktrace$analyze_causes.invoke(stacktrace.clj:339)
	at cider.nrepl.middleware.stacktrace$handle_stacktrace.invokeStatic(stacktrace.clj:356)
	at cider.nrepl.middleware.stacktrace$handle_stacktrace.invoke(stacktrace.clj:353)
	at clojure.lang.Var.invoke(Var.java:385)
	at cider.nrepl$wrap_stacktrace$fn__2462.invoke(nrepl.clj:432)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at nrepl.middleware.interruptible_eval$interruptible_eval$fn__1284.invoke(interruptible_eval.clj:154)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at nrepl.middleware.load_file$wrap_load_file$fn__1824.invoke(load_file.clj:81)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_out$fn__2422.invoke(nrepl.clj:334)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_content_type$fn__2322.invoke(nrepl.clj:107)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at nrepl.middleware.session$add_stdin$fn__1401.invoke(session.clj:379)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at nrepl.middleware.sideloader$wrap_sideloader$fn__1905.invoke(sideloader.clj:108)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_complete$fn__2354.invoke(nrepl.clj:143)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_format$fn__2380.invoke(nrepl.clj:194)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_profile$fn__2430.invoke(nrepl.clj:343)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_apropos$fn__2338.invoke(nrepl.clj:129)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_trace$fn__2478.invoke(nrepl.clj:464)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_inspect$fn__2398.invoke(nrepl.clj:227)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at nrepl.middleware.lookup$wrap_lookup$fn__1868.invoke(lookup.clj:52)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_spec$fn__2454.invoke(nrepl.clj:416)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_macroexpand$fn__2406.invoke(nrepl.clj:287)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_version$fn__2504.invoke(nrepl.clj:504)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_debug$fn__2364.invoke(nrepl.clj:163)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_enlighten$fn__2372.invoke(nrepl.clj:190)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at nrepl.middleware.caught$wrap_caught$fn__1217.invoke(caught.clj:97)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_refresh$fn__2438.invoke(nrepl.clj:380)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at nrepl.middleware.print$wrap_print$fn__1184.invoke(print.clj:234)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_tracker$fn__2486.invoke(nrepl.clj:482)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at nrepl.middleware.session$session$fn__1386.invoke(session.clj:325)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at nrepl.server$default_handler$fn__1953.invoke(server.clj:141)
	at nrepl.server$handle_STAR_.invokeStatic(server.clj:24)
	at nrepl.server$handle_STAR_.invoke(server.clj:21)
	at nrepl.server$handle$fn__1921.invoke(server.clj:41)
	at clojure.core$binding_conveyor_fn$fn__5476.invoke(core.clj:2022)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.jogamp.common.os.Platform
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:467)
	at clojure.lang.RT.classForName(RT.java:2204)
	at clojure.lang.RT.classForName(RT.java:2213)
	at clojure.lang.Compiler.maybeResolveIn(Compiler.java:7322)
	at clojure.core$ns_resolve.invokeStatic(core.clj:4336)
	at clojure.core$ns_resolve.invokeStatic(core.clj:4325)
	at clojure.core$ns_resolve.invoke(core.clj:4325)
	at cider.nrepl.inlined_deps.orchard.v0v9v1.orchard.java$resolve_class$fn__3888.invoke(java.clj:306)
	at cider.nrepl.inlined_deps.orchard.v0v9v1.orchard.java$resolve_class.invokeStatic(java.clj:306)
	at cider.nrepl.inlined_deps.orchard.v0v9v1.orchard.java$resolve_class.invoke(java.clj:300)
	at cider.nrepl.inlined_deps.orchard.v0v9v1.orchard.java$resolve_symbol.invokeStatic(java.clj:340)
	at cider.nrepl.inlined_deps.orchard.v0v9v1.orchard.java$resolve_symbol.invoke(java.clj:326)
	at cider.nrepl.middleware.stacktrace$analyze_fn.invokeStatic(stacktrace.clj:82)
	at cider.nrepl.middleware.stacktrace$analyze_fn.invoke(stacktrace.clj:61)
	at clojure.core$comp$fn__ 

Following the program's execution, it seems as if the namespace thi.ng.geom.gl.jogl.core isn't loading because it can't properly run the lines

(import [com.jogamp.opengl
    GL GL2 GL3 GL4 GLProfile GLCapabilities GLAutoDrawable GLEventListener])

(def ^:private gl-profiles
  {:gl2 GLProfile/GL2
   :gl3 GLProfile/GL3
   :gl4 GLProfile/GL4}) 

I don't know enough about java or how java dependencies work to be able to further debug this issue, but I am using the latest version as I have just cloned this repo. I have run into other threads (for java) where the same error is caused by not having JOGL on the java classpath when run. It is my understanding that lein is supposed to handle this behavior automatically.

I am also using

% lein --version
Leiningen 2.9.10 on Java 17.0.2 Java HotSpot(TM) 64-Bit Server VM

% java --version
java 17.0.2 2022-01-18 LTS
Java(TM) SE Runtime Environment (build 17.0.2+8-LTS-86)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.2+8-LTS-86, mixed mode, sharing) 

I tried running this with different versions of java by using the :java-cmd option in project.clj, and ran into errors as well. With java 11, I ran into the same error (if memory serves right) With java 8, a window opened and then immediately crashed. I do not remember the error and am unable to recreate it right now.

I have run lein deps, so my dependencies are fully updated. If I modify the project.clj file to explicitly use

[org.jogamp.gluegen/gluegen-rt "2.3.2" :classifier "natives-macosx-universal"]
[org.jogamp.jogl/jogl-all "2.3.2" :classifier "natives-macosx-universal"] 

in the dependencies, I run into a slightly more human-readable error

1. Caused by java.lang.ClassNotFoundException
   com.jogamp.opengl.GL3

       URLClassLoader.java:  445  java.net.URLClassLoader/findClass
   DynamicClassLoader.java:   69  clojure.lang.DynamicClassLoader/findClass
          ClassLoader.java:  587  java.lang.ClassLoader/loadClass
   DynamicClassLoader.java:   77  clojure.lang.DynamicClassLoader/loadClass
          ClassLoader.java:  520  java.lang.ClassLoader/loadClass
                Class.java:   -2  java.lang.Class/forName0
                Class.java:  467  java.lang.Class/forName
                   RT.java: 2209  clojure.lang.RT/classForName
                   RT.java: 2222  clojure.lang.RT/classForNameNonLoading
         textured_cube.clj:    1  thi.ng.geom.examples.jogl.textured-cube/eval6002/loading--auto--
         textured_cube.clj:    1  thi.ng.geom.examples.jogl.textured-cube/eval6002
         textured_cube.clj:    1  thi.ng.geom.examples.jogl.textured-cube/eval6002
             Compiler.java: 7194  clojure.lang.Compiler/eval
             Compiler.java: 7183  clojure.lang.Compiler/eval
             Compiler.java: 7653  clojure.lang.Compiler/load
                      REPL:    1  user/eval5998
                      REPL:    1  user/eval5998
             Compiler.java: 7194  clojure.lang.Compiler/eval
             Compiler.java: 7149  clojure.lang.Compiler/eval
                  core.clj: 3215  clojure.core/eval
                  core.clj: 3211  clojure.core/eval
    interruptible_eval.clj:   87  nrepl.middleware.interruptible-eval/evaluate/fn/fn
                  AFn.java:  152  clojure.lang.AFn/applyToHelper
                  AFn.java:  144  clojure.lang.AFn/applyTo
                  core.clj:  667  clojure.core/apply
                  core.clj: 1990  clojure.core/with-bindings*
                  core.clj: 1990  clojure.core/with-bindings*
               RestFn.java:  425  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   87  nrepl.middleware.interruptible-eval/evaluate/fn
                  main.clj:  437  clojure.main/repl/read-eval-print/fn
                  main.clj:  437  clojure.main/repl/read-eval-print
                  main.clj:  458  clojure.main/repl/fn
                  main.clj:  458  clojure.main/repl
                  main.clj:  368  clojure.main/repl
               RestFn.java: 1523  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   84  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:   56  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:  152  nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
                  AFn.java:   22  clojure.lang.AFn/run
               session.clj:  218  nrepl.middleware.session/session-exec/main-loop/fn
               session.clj:  217  nrepl.middleware.session/session-exec/main-loop
                  AFn.java:   22  clojure.lang.AFn/run
               Thread.java:  833  java.lang.Thread/run 

I am currently running on mac, but I also ran into the same problem when running on my Ubuntu machine.

Forked On 21 Sep 2022 at 10:00:01

Postspectacular

FWIW all the non-JOGL related parts will (should) work also in WebGL (via CLJS), e.g. see here:

https://github.com/thi-ng/geom/blob/feature/no-org/org/examples/gl/webgl.org

Commented On 21 Sep 2022 at 10:00:01
Issue Comment

Postspectacular

JOGL examples not working

Trying to run any of the JOGL examples results in an error, it seems that jogamp for whatever reason cannot be loaded into the namespace

stack trace upon trying to load examples/jogl/stl_mesh.clj

CompilerException java.lang.UnsatisfiedLinkError: Can't load library: /var/folders/b7/8gchdr29163fj3sl6cjqn0_m0000gn/T/jogamp_0000/file_cache/jln13507248069143319711/jln4324653017614860419/natives/macosx-universal/libgluegen-rt.jnilib, compiling:(core.clj:81:1) 
ERROR: Unhandled REPL handler exception processing message {:nrepl.middleware.print/stream? 1, :nrepl.middleware.print/print cider.nrepl.pprint/pprint, :nrepl.middleware.print/quota 1048576, :nrepl.middleware.print/buffer-size 4096, :nrepl.middleware.print/options {:right-margin 70}, :op stacktrace, :session 223e9410-21f4-4482-8d59-a107ef924db1, :id 8}
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class com.jogamp.common.os.Platform
	at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
	at clojure.core$deref_future.invokeStatic(core.clj:2292)
	at clojure.core$future_call$reify__8097.deref(core.clj:6894)
	at clojure.core$deref.invokeStatic(core.clj:2312)
	at clojure.core$pmap$step__8110$fn__8114.invoke(core.clj:6945)
	at clojure.lang.LazySeq.sval(LazySeq.java:40)
	at clojure.lang.LazySeq.seq(LazySeq.java:49)
	at clojure.lang.RT.seq(RT.java:528)
	at clojure.core$seq__5124.invokeStatic(core.clj:137)
	at clojure.core$map$fn__5591.invoke(core.clj:2749)
	at clojure.lang.LazySeq.sval(LazySeq.java:40)
	at clojure.lang.LazySeq.seq(LazySeq.java:49)
	at clojure.lang.Cons.next(Cons.java:39)
	at clojure.lang.RT.next(RT.java:706)
	at clojure.core$next__5108.invokeStatic(core.clj:64)
	at clojure.core.protocols$fn__7852.invokeStatic(protocols.clj:169)
	at clojure.core.protocols$fn__7852.invoke(protocols.clj:124)
	at clojure.core.protocols$fn__7807$G__7802__7816.invoke(protocols.clj:19)
	at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
	at clojure.core.protocols$fn__7835.invokeStatic(protocols.clj:75)
	at clojure.core.protocols$fn__7835.invoke(protocols.clj:75)
	at clojure.core.protocols$fn__7781$G__7776__7794.invoke(protocols.clj:13)
	at clojure.core$reduce.invokeStatic(core.clj:6748)
	at clojure.core$into.invokeStatic(core.clj:6815)
	at clojure.core$mapv.invokeStatic(core.clj:6823)
	at clojure.core$mapv.invoke(core.clj:6823)
	at cider.nrepl.middleware.stacktrace$flag_duplicates.invokeStatic(stacktrace.clj:205)
	at cider.nrepl.middleware.stacktrace$flag_duplicates.invoke(stacktrace.clj:194)
	at cider.nrepl.middleware.stacktrace$analyze_stacktrace.invokeStatic(stacktrace.clj:219)
	at cider.nrepl.middleware.stacktrace$analyze_stacktrace.invoke(stacktrace.clj:213)
	at cider.nrepl.middleware.stacktrace$analyze_cause.invokeStatic(stacktrace.clj:323)
	at cider.nrepl.middleware.stacktrace$analyze_cause.invoke(stacktrace.clj:314)
	at cider.nrepl.middleware.stacktrace$analyze_causes$fn__4401.invoke(stacktrace.clj:348)
	at clojure.core$map$fn__5583$fn__5584.invoke(core.clj:2734)
	at clojure.core$take_while$fn__5634$fn__5635.invoke(core.clj:2893)
	at clojure.lang.Iterate.reduce(Iterate.java:79)
	at clojure.core$transduce.invokeStatic(core.clj:6803)
	at clojure.core$into.invokeStatic(core.clj:6819)
	at clojure.core$into.invoke(core.clj:6807)
	at cider.nrepl.middleware.stacktrace$analyze_causes.invokeStatic(stacktrace.clj:347)
	at cider.nrepl.middleware.stacktrace$analyze_causes.invoke(stacktrace.clj:339)
	at cider.nrepl.middleware.stacktrace$handle_stacktrace.invokeStatic(stacktrace.clj:356)
	at cider.nrepl.middleware.stacktrace$handle_stacktrace.invoke(stacktrace.clj:353)
	at clojure.lang.Var.invoke(Var.java:385)
	at cider.nrepl$wrap_stacktrace$fn__2462.invoke(nrepl.clj:432)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at nrepl.middleware.interruptible_eval$interruptible_eval$fn__1284.invoke(interruptible_eval.clj:154)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at nrepl.middleware.load_file$wrap_load_file$fn__1824.invoke(load_file.clj:81)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_out$fn__2422.invoke(nrepl.clj:334)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_content_type$fn__2322.invoke(nrepl.clj:107)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at nrepl.middleware.session$add_stdin$fn__1401.invoke(session.clj:379)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at nrepl.middleware.sideloader$wrap_sideloader$fn__1905.invoke(sideloader.clj:108)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_complete$fn__2354.invoke(nrepl.clj:143)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_format$fn__2380.invoke(nrepl.clj:194)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_profile$fn__2430.invoke(nrepl.clj:343)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_apropos$fn__2338.invoke(nrepl.clj:129)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_trace$fn__2478.invoke(nrepl.clj:464)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_inspect$fn__2398.invoke(nrepl.clj:227)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at nrepl.middleware.lookup$wrap_lookup$fn__1868.invoke(lookup.clj:52)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_spec$fn__2454.invoke(nrepl.clj:416)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_macroexpand$fn__2406.invoke(nrepl.clj:287)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_version$fn__2504.invoke(nrepl.clj:504)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_debug$fn__2364.invoke(nrepl.clj:163)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_enlighten$fn__2372.invoke(nrepl.clj:190)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at nrepl.middleware.caught$wrap_caught$fn__1217.invoke(caught.clj:97)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_refresh$fn__2438.invoke(nrepl.clj:380)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at nrepl.middleware.print$wrap_print$fn__1184.invoke(print.clj:234)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at cider.nrepl$wrap_tracker$fn__2486.invoke(nrepl.clj:482)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at nrepl.middleware.session$session$fn__1386.invoke(session.clj:325)
	at nrepl.middleware$wrap_conj_descriptor$fn__949.invoke(middleware.clj:16)
	at nrepl.server$default_handler$fn__1953.invoke(server.clj:141)
	at nrepl.server$handle_STAR_.invokeStatic(server.clj:24)
	at nrepl.server$handle_STAR_.invoke(server.clj:21)
	at nrepl.server$handle$fn__1921.invoke(server.clj:41)
	at clojure.core$binding_conveyor_fn$fn__5476.invoke(core.clj:2022)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.jogamp.common.os.Platform
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:467)
	at clojure.lang.RT.classForName(RT.java:2204)
	at clojure.lang.RT.classForName(RT.java:2213)
	at clojure.lang.Compiler.maybeResolveIn(Compiler.java:7322)
	at clojure.core$ns_resolve.invokeStatic(core.clj:4336)
	at clojure.core$ns_resolve.invokeStatic(core.clj:4325)
	at clojure.core$ns_resolve.invoke(core.clj:4325)
	at cider.nrepl.inlined_deps.orchard.v0v9v1.orchard.java$resolve_class$fn__3888.invoke(java.clj:306)
	at cider.nrepl.inlined_deps.orchard.v0v9v1.orchard.java$resolve_class.invokeStatic(java.clj:306)
	at cider.nrepl.inlined_deps.orchard.v0v9v1.orchard.java$resolve_class.invoke(java.clj:300)
	at cider.nrepl.inlined_deps.orchard.v0v9v1.orchard.java$resolve_symbol.invokeStatic(java.clj:340)
	at cider.nrepl.inlined_deps.orchard.v0v9v1.orchard.java$resolve_symbol.invoke(java.clj:326)
	at cider.nrepl.middleware.stacktrace$analyze_fn.invokeStatic(stacktrace.clj:82)
	at cider.nrepl.middleware.stacktrace$analyze_fn.invoke(stacktrace.clj:61)
	at clojure.core$comp$fn__ 

Following the program's execution, it seems as if the namespace thi.ng.geom.gl.jogl.core isn't loading because it can't properly run the lines

(import [com.jogamp.opengl
    GL GL2 GL3 GL4 GLProfile GLCapabilities GLAutoDrawable GLEventListener])

(def ^:private gl-profiles
  {:gl2 GLProfile/GL2
   :gl3 GLProfile/GL3
   :gl4 GLProfile/GL4}) 

I don't know enough about java or how java dependencies work to be able to further debug this issue, but I am using the latest version as I have just cloned this repo. I have run into other threads (for java) where the same error is caused by not having JOGL on the java classpath when run. It is my understanding that lein is supposed to handle this behavior automatically.

I am also using

% lein --version
Leiningen 2.9.10 on Java 17.0.2 Java HotSpot(TM) 64-Bit Server VM

% java --version
java 17.0.2 2022-01-18 LTS
Java(TM) SE Runtime Environment (build 17.0.2+8-LTS-86)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.2+8-LTS-86, mixed mode, sharing) 

I tried running this with different versions of java by using the :java-cmd option in project.clj, and ran into errors as well. With java 11, I ran into the same error (if memory serves right) With java 8, a window opened and then immediately crashed. I do not remember the error and am unable to recreate it right now.

I have run lein deps, so my dependencies are fully updated. If I modify the project.clj file to explicitly use

[org.jogamp.gluegen/gluegen-rt "2.3.2" :classifier "natives-macosx-universal"]
[org.jogamp.jogl/jogl-all "2.3.2" :classifier "natives-macosx-universal"] 

in the dependencies, I run into a slightly more human-readable error

1. Caused by java.lang.ClassNotFoundException
   com.jogamp.opengl.GL3

       URLClassLoader.java:  445  java.net.URLClassLoader/findClass
   DynamicClassLoader.java:   69  clojure.lang.DynamicClassLoader/findClass
          ClassLoader.java:  587  java.lang.ClassLoader/loadClass
   DynamicClassLoader.java:   77  clojure.lang.DynamicClassLoader/loadClass
          ClassLoader.java:  520  java.lang.ClassLoader/loadClass
                Class.java:   -2  java.lang.Class/forName0
                Class.java:  467  java.lang.Class/forName
                   RT.java: 2209  clojure.lang.RT/classForName
                   RT.java: 2222  clojure.lang.RT/classForNameNonLoading
         textured_cube.clj:    1  thi.ng.geom.examples.jogl.textured-cube/eval6002/loading--auto--
         textured_cube.clj:    1  thi.ng.geom.examples.jogl.textured-cube/eval6002
         textured_cube.clj:    1  thi.ng.geom.examples.jogl.textured-cube/eval6002
             Compiler.java: 7194  clojure.lang.Compiler/eval
             Compiler.java: 7183  clojure.lang.Compiler/eval
             Compiler.java: 7653  clojure.lang.Compiler/load
                      REPL:    1  user/eval5998
                      REPL:    1  user/eval5998
             Compiler.java: 7194  clojure.lang.Compiler/eval
             Compiler.java: 7149  clojure.lang.Compiler/eval
                  core.clj: 3215  clojure.core/eval
                  core.clj: 3211  clojure.core/eval
    interruptible_eval.clj:   87  nrepl.middleware.interruptible-eval/evaluate/fn/fn
                  AFn.java:  152  clojure.lang.AFn/applyToHelper
                  AFn.java:  144  clojure.lang.AFn/applyTo
                  core.clj:  667  clojure.core/apply
                  core.clj: 1990  clojure.core/with-bindings*
                  core.clj: 1990  clojure.core/with-bindings*
               RestFn.java:  425  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   87  nrepl.middleware.interruptible-eval/evaluate/fn
                  main.clj:  437  clojure.main/repl/read-eval-print/fn
                  main.clj:  437  clojure.main/repl/read-eval-print
                  main.clj:  458  clojure.main/repl/fn
                  main.clj:  458  clojure.main/repl
                  main.clj:  368  clojure.main/repl
               RestFn.java: 1523  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   84  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:   56  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:  152  nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
                  AFn.java:   22  clojure.lang.AFn/run
               session.clj:  218  nrepl.middleware.session/session-exec/main-loop/fn
               session.clj:  217  nrepl.middleware.session/session-exec/main-loop
                  AFn.java:   22  clojure.lang.AFn/run
               Thread.java:  833  java.lang.Thread/run 

I am currently running on mac, but I also ran into the same problem when running on my Ubuntu machine.

Forked On 21 Sep 2022 at 09:47:17

Postspectacular

Can't check this anytime soon, but think this might just be an age thing by now. I.e. these GL bindings are from 2015/16 and I know are unsupported for macos-arm64 (M1 & above). There's also not much which can be done, since the whole JOGL bindings project seems dead and this whole aspect of thi.ng/geom would need to be refactored to use LWGL or other(?) native GL wrapper libs... sorry!

Commented On 21 Sep 2022 at 09:47:17

Postspectacular

feat(testament): add file fixture helpers, update pkg meta

Pushed On 20 Sep 2022 at 08:34:39

Postspectacular

build: update gitignore & global tsconfig (fixtures)

Pushed On 20 Sep 2022 at 08:34:39

Postspectacular

test(wasm-api): refactor fixture handling

Pushed On 20 Sep 2022 at 08:34:39

Postspectacular

feat(tangle): import as new package

Pushed On 20 Sep 2022 at 08:34:39

Postspectacular

started

Started On 18 Sep 2022 at 03:06:49

Postspectacular

build: update deps & switch to vite

Pushed On 18 Sep 2022 at 09:26:41

Postspectacular

Merge

Pushed On 18 Sep 2022 at 09:26:41

Postspectacular

feat: update deps, dark mode banners

Pushed On 14 Sep 2022 at 03:41:44

Postspectacular

docs: regenerate all readmes (SVG cache busters)

Pushed On 14 Sep 2022 at 12:51:29

Postspectacular

feat(wasm-api): refactor CodeGenOpts, update CLI config handling

  • extract CodeGenOptsBase interface for common pre/post config
  • update CLI config loading to support loading pre/post contents from separate files (if value given as @path/to-file.ext)

Pushed On 14 Sep 2022 at 12:13:47

Postspectacular

docs(geom-api): update SamplingOpts docstrings

Pushed On 14 Sep 2022 at 12:13:47

Postspectacular

docs: regenerate all readmes (SVG cache busters)

Pushed On 14 Sep 2022 at 12:13:47

Postspectacular

format: update pkg formatting

Pushed On 14 Sep 2022 at 12:13:47

Postspectacular

build: update make-module script

Pushed On 14 Sep 2022 at 12:13:47

Postspectacular

started

Started On 10 Sep 2022 at 04:16:00

Postspectacular

feat(wasm-api): update/fix codegens & config

  • add global CodeGenOpts.uppercaseEnums option (migrate from TSOpts)
  • set i32 as enum default tag (for C compatibility)
  • update C11 codegen, add typePrefix option
  • fix C11 enum codegen (use typedef enum)
  • add internal enumName() helper
  • minor updates Zig codegen

Pushed On 09 Sep 2022 at 10:58:22

Postspectacular

test(wasm-api): add/update codegen tests & fixtures

Pushed On 09 Sep 2022 at 10:58:22

Postspectacular

docs(wasm-api): update zig docstrings

Pushed On 08 Sep 2022 at 09:26:08

Postspectacular

feat(examples): add svg-resample example

Pushed On 08 Sep 2022 at 09:26:08

Postspectacular

started

Started On 07 Sep 2022 at 09:43:26