Fork me on GitHub
#babashka
<
2020-03-16
>
sogaiu03:03:59

i checked out the windows-graalvm20-jdk8 branch, copied the classes.clj file from the file-watcher branch to it and performed a build.

sogaiu03:03:15

the build was successful and the script worked.

sogaiu03:03:02

i saw the text "changed!" output when i made a change to a file and saved it.

jeroenvandijk05:03:13

I’m interested in the file watcher. I tried to compile a couple of JVM watchers to graalvm. I succeeded with dirwatcher https://github.com/juxt/dirwatch/pull/18 but this is using polling on OsX. The one that does use fsevents is using jna which doesn’t work with graalvm. Here is my pull request to fix the reflection warnings https://github.com/wkf/hawk/pull/27

porkostomus05:03:31

Sneak preview of the new Exercism babashka track: https://github.com/porkostomus/babashka All 76 exercises and tests ported over relatively easily.

sogaiu06:03:11

@porkostomus looks neat! happened to try the accumulate one and noticed:

(defn accumulate
  "Given a coll and a function to perform
   on each element of the coll, returns a new
   coll containing the result of applying f
   to each element of the input coll."
  [f xs]
may be the doc should reverse the arg order or the args should be swapped?

borkdude08:03:13

@sogaiu thanks for testing! @jeroenvandijk could you check if adding java.nio Watcher stuff to bb would be useful? it seems to work on Windows as well according to sogaiu

jeroenvandijk08:03:06

@borkdude I believe dirwatch by juxt is using the same java libraries https://github.com/juxt/dirwatch/blob/master/src/juxt/dirwatch.clj When I tested it felt like there was a long latency between changes, but I might have had a misconfiguration (or misunderstanding). Polling should be fine for smaller projects

borkdude08:03:13

that's what I am seeing too, takes a long time before you see an update, but indeed it might be something with config

jeroenvandijk09:03:07

Good find! For a prototype I eventually implemented basic polling in Clojure myself which was fast enough. So I can imagine with the right config it should work just fine

borkdude09:03:56

oh that Sensitivity thing is a private API from a sun package

mauricio.szabo19:03:10

Just saw today that bb added support for :clj reader conditional. So, I published a fix on Chlorine for Atom - now bb works again 🙂

👍 1
borkdude19:03:37

thanks 🙂

sogaiu10:03:14

tweaked it to work with .mp4s -- functions well :thumbsup: