Hello, everyone. Recently had strange issue with macro requirement. Basically macros can’t be loaded if it is at least one level above source-file. E.g.
• put macro in src/macros.cljs dir
• nest sourcefile in src/my-ns/somefile.cljs
• try to require (:require-macros ["../macros.mjs" :refer [foo]])
I’ve got following error:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/<path-to-project>/cherry-hn/node_modules/cherry-cljs/macro/macros.mjs' imported from /<path-to-project>/cherry-hn/node_modules/cherry-cljs/lib/cli.js
...
Not sure is this a real issue or I’m doing something wrong.Yes, macros in cherry are currently implemented in a very basic way. This will change (both here and in #squint): to be able to run the compiler in both JVM/bb/JS SCI will probably be used so you can directly refer to a .cljc namespace to load macros
hacker news reader made with cherry: https://github.com/armed/cherry-hn-reader - deployed https://armed.github.io/cherry-hn-reader/
Completely agree, HN API is just very convenient to play with.
Nice, but a site like that should not use JS in my opinion 😛