This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-11
Channels
- # beginners (70)
- # clojure (34)
- # clojure-europe (1)
- # clojure-nl (2)
- # clojure-uk (3)
- # clojurescript (140)
- # cursive (6)
- # data-science (1)
- # emacs (8)
- # exercism (1)
- # fulcro (2)
- # gratitude (1)
- # helix (4)
- # hyperfiddle (5)
- # meander (3)
- # missionary (2)
- # pathom (4)
- # polylith (17)
- # reagent (7)
- # reitit (6)
- # reveal (2)
- # shadow-cljs (3)
- # uncomplicate (6)
So I’m doing some java interop and I’m making my way through this example:
https://github.com/apache/commons-imaging/blob/master/src/test/java/org/apache/commons/imaging/examples/WriteExifMetadataExample.java
Now the problem I’m encountering, is my Clojure repl is saying there’s no add
method for the class TiffOutputDirectory
when clearly there is. Maybe I’m doing something wrong here?
(let [exifDirectory (.getOrCreateExifDirectory (TiffOutputSet.))]
#_(.removeField exifDirectory (TiffTagConstants/TIFF_TAG_IMAGE_DESCRIPTION))
(.add exifDirectory
(TiffTagConstants/TIFF_TAG_IMAGE_DESCRIPTION)
(java.lang.String. "dummy-desc")))
looks like that tag constant is a TagInfoAscii so you'd probably expecting it to match https://github.com/apache/commons-imaging/blob/0e3e26ff32fd23e8a4a2faf788c73667bc306b47/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffOutputDirectory.java#L123
that signature String... is a java varargs which is implemented in Java as a String[] and in Clojure you need to provide one of those explicitly
(let [exifDirectory (.getOrCreateExifDirectory (TiffOutputSet.))]
#_(.removeField exifDirectory (TiffTagConstants/TIFF_TAG_IMAGE_DESCRIPTION))
(.add exifDirectory
(TiffTagConstants/TIFF_TAG_IMAGE_DESCRIPTION)
(into-array String ["dummy-desc"])))
should work
I wonder if there's something wrong with apache.commons.imaging
upstream. I can't even read metadata on my jpeg, yet exiftool retrieves it just fine.
Good morning! I am testing if making a GitHub Template project out of Rich 4Clojure would make sense. Before I change that repo I am testing the concept here: https://github.com/PEZ/pirate-lang. If anyone want to help me with testing if it makes sense, that would be great. 🙏 ❤️ Context: This repository is a proof-of-concept of developing Clojure programs, even GUI apps, in the browser (without installing anything at all), with full Interactive Programming support (Calva).
It doesn’t make too much sense to copy this particular project. It’s better to fork it. But for Rich 4Clojure a copy might make sense? I’m undecided. Because maybe a regular clone makes most sense? And then people can pull in any changes we make. Hmmm…
WOW! Got this to work, this is by far the EASIEST way to get started with clojure :star-struck:
So basically if we include .gitpod.yml
and .gitpod.dockerfile
then we can turn any project into something like this? :thinking_face:
> But for Rich 4Clojure a copy might make sense? Yeah I think a fork makes most sense, people can keep merging from upstream and yet have their own commits in there somewhere. But how likely are complete beginners going to worry about getting the latest changes? :thinking_face:
Almost any project. I'm running into problems with shadow-cljs webapps currently, because CORS. And even if I if I use https for it, there is still something funny. I'll need to make a good test project that the Gitpod people can have a look at, because probably they will need to fix something.
From your excitement, @U013MQC5YKD , I wonder if maybe you have missed this thing? https://calva.io/get-started-with-clojure/
This is amazing!! :star-struck:
I tried it out, and it is nice in the sense of "zero install", so a beginner friendly way to start with Clojure The questions would be , what should be inside the "clj" files of the template project.
But I agree with @U0ETXRFEW, that maybe this should be maintained by the Calva community. As GitPod works best with Calva for starting with Clojure
But https://gitpod.io/#https://github.com/PEZ/get-started-with-clojure does not support "Swing" out of the box. So to add the VNC configuration to it, could be a good enhancement.
I created an issue to followup: https://github.com/PEZ/get-started-with-clojure/issues/1
Oh, yes, I haven’t thought about that. Let’s see if we can find a way to do it without causing distraction.
just did a PR
It does not "distract", IMHO. in the sense of the VNC "preview" gets opened, but stays "decent" in background
Thanks for the idea..🙂
Regarding ownage of template projects. There is an “official” template project that was created as a result of this Getting Started thing. I haven’t gotten around to update it. But I am planning to add deps-new, clj-new, babashka, nbb, and maybe some other tools to it. Along with instructions. I’m thinking of it as follow-up to getting started. When you are ready and eager to create your first project.
If it is you need to use the value that the template system is replacing {...} instead of the literal string
I am just using react interop.
Ahh, yes, this is the clojurescript question.