This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-26
Channels
- # architecture (2)
- # beginners (83)
- # boot (472)
- # cider (10)
- # cljsrn (4)
- # clojure (80)
- # clojure-russia (7)
- # clojure-spec (34)
- # clojure-taiwan (1)
- # clojure-uk (7)
- # clojurescript (19)
- # core-async (5)
- # emacs (7)
- # figwheel (1)
- # hoplon (52)
- # jobs (1)
- # luminus (14)
- # om (1)
- # om-next (3)
- # perun (69)
- # proton (2)
- # protorepl (4)
- # re-frame (28)
- # reagent (6)
- # remote-jobs (1)
boot has this thing called X.cljs.edn which is a map that contains keys like :require and :compiler-options
can someone explain to me what forced boot's design to be such that I have to manually add or remove any new or old namespaces to the :require key's value (which is a vector of namespaces)
i'm just throwing this out there, but if the point of all this is to compile into a single js file, wouldn't a pipeline oriented approach be more suitable?
a true pipeline is one in which a thing goes into a machine and comes out the other end, altered
what i mean is i would prefer that boot tasks just took a directory of stuff as input and produced a new directory of stuff as output
because if you don't do that then you have to ask questions about "what stuff looks like"
you would expect the composition of b and c to be a pure function if b and c are pure
i mean other than the normal lisp dependency graph of functions that call other functions
i would prefer if the output of the last boot task executed were the thing i requested
to put it another way, are boot tasks returning values that can be altered, or are they returning immutable values?
if they just change the directory they are invoked from (or classpath or whatever) then you can't really make guarantees about immutability
i prefer to isolate myself from the particulars of whatever virtual machine is being used, if one is being used
like if you do (require 'foo)
there needs to be a foo.clj
file on the classpath or clojure can't compile the namespace
it boggles my mind how people can be clever enough to invent a language like clojure and still blind to the fact that organizing code into essentially arbitrary files (containers) of code that "seems useful together" obviously creates more problems than it solves
what i'm saying is that having a foo.clj file and a bar.clj file is not the right way to think about programs
or having to deal with the inane menial task of coordinating a tree of dependencies is not the right way to think about programs
i don't have time to make sure that every edge case is compatible when someone uses an older function with a newer one
if they required your make-foo function (maybe :as make-foo) and later determined that they wanted to "upgrade" because you fixed some issue with it to make-foo2 (:as make-foo so they don't have to refactor code), then something broke, that is on them
of all the versions of all the functions, which one is used where, who passes what to whom
i'm just saying that if a function is immutable, if you provide someone a function and guarantee that it cannot change out from under them, then thats it
great, but that doesn't make any guarantee that that thing at that location cannot change
what i'm basically saying is that instead of having people duplicate half their library over and over under different names
you could have people distribute "libraries" which really are just a list of function requires
the fact that the clojure evaluator will try to evaluate the list when it runs into one, doesn't mean it isn't a list
i guess if i were to just put it briefly: i want to think of software as a collection of functions. whether the functions are invoked on code (as macros) or on data is irrelevant, I just want to think of it as a bunch of functions. I want these functions to be distributed to me independently. I don't want them to change out from under me, they should be immutable. A repository should be tantamount to a map from function names to lists that start with the symbol "defn". To cut down on administrative nonsense I should be able to import a bunch of functions ala carte by requiring each from a set of remote function requirements (thats how I want to think of libraries). I should be able to process those sets, and think at a higher level of abstraction than I do currently.
the clojure logic library should be a set of function names (elements in the map from name to lists that start with the symbol "defn")
i really strongly believe in this approach primarily because if functions are your smallest unit then you can run queries for specific functions
for instance, maybe a programmer could run a query for a function in a very large repository that fits a specific spec
the point is that if you try to be honest with yourself about the periodic table of programming, the elements are functions, not files
and then we are thankful for the things we did that aren't that great but could be worse
i feel like i'm the only person who can see in the dark and everyone is bumping into eachother
i work for a company that serves ads on the internet, i am happy if i can help my coworkers have good jobs and feed their kids
all i mean is that we put up with a lot of garbage "because we can" not because we should
stink in the jvm, and stink in the way we think about things that we feel are "too old / established to change"
the artisanal programming genius won't make a solid xml parser because xml is a terrible way to encode information
and they don't want to waste even a little bit of their time doing something they won't enjoy
the things i enjoy are getting things done that bring us the money we need to live a better life
i just enjoy discovering things about the way I think that I didn't previously know
and the only places in the earth that haven't been explored are extraordinarily dangerous
an explorer can not expect the rest of the world to accept their stories of far off lands they have not seen
the news that the universe obeyed certain laws universally (gravitation) caused people to question the principles laid down by tradition
and eventually people began to believe that everyone should be treated equally under the law
maybe a few hundred years from now, when we start populating other celestial bodies
i like to think thats because the fleet was primarily a military endeavor, because throughout most of recorded history humans have had to compete with other humans
although that doesn't imply that humans have always been so great in number that they have had to compete with eachother
there was certainly a time in humanity's history during which they competed far more with nature than with eachother
i got an associates degree in physics and decided i liked physics but didn't like the lifestyle physicsts had, so i swapped majors to software engineering
@micha we're working on the new push task, to deploy on maven central
I'll update you once we have something 😃
hey y’all I’m running this: boot watch notify -v test
and getting this when the tests run: No value supplied for key: null
has anyone else run into that?
there’s a bug in the way that notify
shells out specifically on Mac’s. I have a PR up for it. Was about to look at the feedback on it actually 🙂
if it wasn’t clear, the -t
option is for notify
. So your example should be boot watch notify -v -t Boot test
that works! i’m not getting that anymore, but I’m also not seeing any visual notifications
i think that’s from my system prefs though
do you have any tips for getting tests to run faster?
sorry 🙂 with watch, it takes 12s every time I make a change for my 10 tests to run
I think test run in a new pod every time?
another option would be to only run tests for namespaces affected by a change
hmm, that’s strange. AFAIK pods shouldn’t have that kind of overhead. These are just clojure.test
tests?
focusing tests is definitely useful. Unfortunately watch
is kind of a coarse tool in that regard. From what I understand you’d have to focus the tests when you invoke the boot pipeline.
Maybe you’d be better server running boot tasks from the repl instead of the command line if that’s the route you want to go. Don’t have to wait for clojure to load when you want to switch which sets of tests you’re running.
My only other suggestion is to make sure you’re not doing anything super slow in the tests or setup or something (like a network call).
that’s a good point
Sorry I don’t have anything more concrete to offer. I typically run tests through CIDER in emacs so I run one namespace at a time pretty much always.
yeah that makes sense, that’s usually what I do too
thanks for your help!
Getting Classpath conflict: org.clojure/clojure version 1.8.0 already loaded, NOT loading version 1.9.0-alpha14
on all my boot tasks where I'm using the 1.9.0 alpha. Feel like this is a simple fix but haven't been able to get this working to play with spec.
If you put the clojure version you want in a boot.properties
file it should enforce getting that version. Like so:
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_CLOJURE_VERSION=1.9.0-alpha14
BOOT_VERSION=2.7.1
@devo @geoffs boot will use whatever is in the ~/.boot/boot.properties file, or ./boot.properties
that warning is telling you that boot wasn't able to use the version you specified in your :dependencies because it was already using a different version