This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-31
Channels
- # announcements (1)
- # beginners (171)
- # cider (51)
- # clj-kondo (40)
- # cljsrn (5)
- # clojure (68)
- # clojure-dev (42)
- # clojure-europe (2)
- # clojure-italy (20)
- # clojure-spec (2)
- # clojure-uk (141)
- # clojurescript (19)
- # community-development (4)
- # core-async (17)
- # core-logic (3)
- # cursive (11)
- # data-science (1)
- # datomic (7)
- # defnpodcast (2)
- # figwheel (9)
- # figwheel-main (2)
- # fulcro (15)
- # graphql (21)
- # jackdaw (3)
- # joker (11)
- # juxt (1)
- # luminus (12)
- # off-topic (2)
- # pathom (73)
- # pedestal (2)
- # re-frame (41)
- # reagent (14)
- # reitit (4)
- # shadow-cljs (39)
- # tools-deps (4)
Hello o/
can someone remind me how Boris is going to solve the Irish Border issue? :rolling_on_the_floor_laughing: https://twitter.com/marksugruek/status/1155957402312663041
er muckga shurley
@rickmoynihan He’s not.
As it’s mainly propped up by crossborder EU funding and all island project partnerships.
Most arts and community funding was axed from 2016 so they’ve essentially closed up and it’s left the communities in a state. More than likely the rise in unrest that you don’t hear about in the mainstream news.
a really saddening state of affairs
Some parts of the border already have Gardi and Police checks on the border. I’ve not seen that in a long time.
Don’t encourage it @dharrigan
Anyone using Planck - the standalone ClojureScript REPL? It's really great tool. It's just been updated to use the new cljs_bean library for transforming to/from JS and Cljs https://twitter.com/ldnclj/status/1156540053587464192?s=19
I keep seeing the claim that Republic of Ireland has more wealth per person than Northern Ireland. Is that a reliable claim? do any of you have an opinion? I found https://sluggerotoole.com/2018/03/26/is-northern-ireland-dramatically-poorer-than-the-republic/
I appreciate that there's a bunch of multinataional HQs in dublin that distort the figures...
Anyone got any ideas on how I as a Java neophyte would start to go abut using this in Clojure? https://www.unidata.ucar.edu/software/decoders/grib/javadoc/ucar/grib/grib1/package-summary.html
i can try if u like @maleghast
You will probably need a GRIB file as well - I will find a small one to send to you...
public Grib1Record(java.lang.String hdr,
Grib1IndicatorSection aIs,
Grib1ProductDefinitionSection aPds,
Grib1GridDefinitionSection aGds,
long offset,
long recOffset)
(ns ucar.core
(:import
[ucar.grib.grib1 Grib1Record
Grib1IndicatorSection
Grib1ProductDefinitionSection
Grib1GridDefinitionSection]))
(def my-grib (Grib1Record. ""))
(defn foo
"I don't do a whole lot."
[x]
(println x "Hello, World!"))
Basically I am almost completely new to Java Interop and I was looking for some pointers as to how I would work out the Class / Classes I would need in order to read a Grib file and extract feature data from it.
Once i got my java interop working, i would basically wrap up the java stuff in functions
Is that what you meant @maleghast?
this is pretty decent as well https://clojure.org/reference/java_interop
Member access
(.instanceMember instance args*)
(.instanceMember Classname args*)
(.-instanceField instance)
(Classname/staticMethod args*)
Classname/staticField
and the examples
(.toUpperCase "fred")
-> "FRED"
(.getName String)
-> "java.lang.String"
(.-x (java.awt.Point. 1 2))
-> 1
(System/getProperty "java.vm.version")
-> "1.6.0_07-b06-57"
Math/PI
-> 3.141592653589793
As far as getting something working with lib, i think you will have to read the docs and make sure ur sending thee right stuff
The only bit I don't get, is that the constructor for that ^^ needs a unidata.RandomAccessFile or something like that...
Strictly speaking no. You can address a class on the classpath with its fully qualified name without an :import
. :import
s just allow you to alias the class to its name without needing to type its package/namespace.
At a REPL when experimenting you’re often best just using fully qualified names, then :import
ing them once you’ve proven it works.
The lein deps run grabbed edu/ucar/unidataCommon/4.2.20/unidataCommon-4.2.20.jar from central
so I assume I've got it
anyways hopefully that helps! @maleghast good luck 🙇
LIke this:
(:import
[ RandomAccessFile]
[ucar.grib.grib1 Grib1Record
Grib1IndicatorSection
Grib1ProductDefinitionSection
Grib1GridDefinitionSection])
(:import
( RandomAccessFile)
(ucar.grib.grib1 Grib1Record
Grib1IndicatorSection
Grib1ProductDefinitionSection
Grib1GridDefinitionSection))
I think would work tooBut really, if you have something working, thats the main thing. Then find out after if its []
or ()
The file seems to be written correctly as I can cider-jack-in, but when I try to use (RandomAccessFile. "~/Downloads/ExampleGRIBFILE.grib" "r")
I get:
Syntax error (IllegalArgumentException) compiling new at (ecmwf:localhost:43023(clj)*:43:13).
Unable to resolve classname: RandomAccessFile
Does anyone know if I need to evaluate the (ns ...)
in order to have the Class available?