Fork me on GitHub
#clojure
<
2019-09-08
>
ag06:09:56

trying to start REBL, seeing an exception:

Exception in thread "main" java.lang.ExceptionInInitializerError
....
Caused by: java.lang.ClassNotFoundException: netscape.javascript.JSObject
java -version
Picked up JAVA_TOOL_OPTIONS: -Dapple.awt.UIElement=true
openjdk version "1.8.0_192"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_192-b12)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.192-b12, mixed mode)
REBL-0.9.220 What am I missing?

seancorfield06:09:48

Adopt OpenJDK 8 does not include JavaFX. You either need the Azul (Zulu) OpenJDK 8 with JavaFX bundled or you need OpenJDK 11 -- and the additional dependencies on JavaFX.

seancorfield06:09:17

Although we use Adopt OpenJDK 8 on our servers, for development with REBL I stayed with Oracle JDK 8 until I was pointed at the Zulu OpenJDK 8 / JavaFX bundle @ag

ag06:09:13

Oh, I see. Thank you Sean

kwladyka14:09:43

Is anybody interested in to donate / contribute / other form of engagement to clojure.spec data models and operations for warehouse, bookkeeping and more in the future? The goal is to code clojure.spec data models which everybody can use in their own systems. No point to research wheel again by everybody and it will be great to achieve standard one day. So you are saying no point to do it? So now you have to figure out for example which countries are in European union to make an invoice. So:

(def eu-countries #{"AU" "BE" "BG" "CY" "CZ" "DE" "DK" "EE" "GR" "ES" "FI" "FR" "HR" "HU" "IE" "IT" "LT" "LU" "LV" "MT" "NL" "PL" "PT" "RO" "SE" "SI" "SK" "GB"})
But yeah shortcuts for invoices are different sometimes, than countries codes. Why not make people live harder by governments.
(def eu-vat-prefix
  (-> eu-countries
      ; Austria
      (disj "AU")
      (conj "AT")
      ; Grecja
      (disj "GR")
      (conj "EL")))
You have to figure out how to generate VAT-ID for each country. How to validate it. On the end common things like validate / generate URL / e-mail etc. I would like to add there also function like count stock, taxes for invoices etc. There is a lot of unknown under the hood about data modeling. I think I can handle it and make such a library. But only if there will be people who would like to use it / contribute to it, because I can鈥檛 know myself law and needs in all countries / donate. Does it make sense for you? Not even sure where to ask about it.

Karol W贸jcik06:09:47

Try to ask Alex.

kwladyka07:09:07

Which one Alex? 馃槈

Karol W贸jcik09:09:50

Alex Miller of course

fmnoise14:09:52

hi everyone! any recommendations for stripe api wrapper library?

kwladyka15:09:47

too general question

fmnoise15:09:25

yeah, sorry, I need to work with stripe so first I'm looking for ready battle-tested solutions with docs/tests and active friendly maintainer

fmnoise15:09:52

and seems like no luck 馃槥

kwladyka15:09:22

oh there is stripe api library, I didn鈥檛 know it is exact name of library

kwladyka15:09:51

I didn鈥檛 use it. I can鈥檛 help here.

fmnoise15:09:57

np, thanks

fmnoise15:09:53

seems like working with api through http calls is most battle-proven solution atm

valtteri15:09:55

You can use the official Java client via interop.

valtteri15:09:28

There seems to exist a couple of Clojure wrappers for the Java client that might provide a more clojurey experience but they might not be up-to-date. My go-to-choice would be to use the official java client via interop. You can look for examples in one of the wrapper libs https://github.com/clojurewerkz/elephant

馃挴 4
Toby Clemson15:09:05

My team wrote a wrapper for the Java API with support for the new payment intents stuff. There aren't many docs yet but it's available here: https://github.com/b-social/zebra

fmnoise16:09:45

hi @UDA9YHF8V, it's probably private repo

Toby Clemson16:09:59

Ah! Sorry, shouldn't be, let me take a look

Toby Clemson16:09:38

Ok, that's now public at https://github.com/b-social/zebra, with some (very initial) docs at https://b-social.github.io/zebra/

fmnoise17:09:03

thanks a lot!

ahungry19:09:49

Is there a way to catch a compilationexception that originates in an eval call?

ahungry19:09:23

Also, is there a way to do some kind of local eval that cant modify the global state?

Alex Miller (Clojure team)19:09:53

you can catch Compiler$CompilerException around a call to eval

Alex Miller (Clojure team)19:09:01

(try (eval `(def x 1 2 3)) (catch clojure.lang.Compiler$CompilerException e "Caught!"))

鉂わ笍 4
Alex Miller (Clojure team)19:09:43

can't really do any protected eval

dominicm20:09:55

Depends what global state is. Maybe you're just after a class loader?

kulminaator20:09:56

eval is the root of all evil 馃懠

sogaiu23:09:44

eval is the root of all evil => repl contains eval => ? 馃檪

alexbaranosky01:09:30

I have already accept my doomed fate. 馃懣

sogaiu01:09:34

acceptance :thumbsup:

馃槄 4
andy.fingerhut23:09:12

eval is the root of both evil and good, depending upon how you use it 馃檪

andy.fingerhut23:09:34

As are just about any functions and procedures one can imagine in programming, including +