Fork me on GitHub
#boot
<
2017-05-20
>
mobileink09:05:04

why does boot insist on loading the snapshot in clojars instead of the one in the local repo???

juhoteperi09:05:34

@mobileink It doesn't. Show the dependency vector and directory listing of the corresponding folder in ~/.m2

qqq09:05:33

(deftask run-socket-server []
  (let []
    (fn middleware [next-handler]
      (fn handler [fileset]
        (clojure.core.server/start-server
         {:port          5555
          :name          "repl" 
          :accept        'clojure.core.server/repl
          :server-daemon true
          :client-daemon true})
        (next-handler fileset)))))


how do I tell boot to start this taxk, then just wait (not running anything, and not exiting)

mobileink10:05:10

@juhoteperi thx. problem was a dependency dependency, once I put all the relevant libs in :checkouts and ran watch for each everything worked.

qqq10:05:50

@juhoteperi : precisely what I needed; thanks!

matan12:05:58

switching some maps to records adhering to a defrecord definition: can I still instantiate with map syntax (keys and vals) rather than only tersely providing the positional arguments to match the record's arity?

juhoteperi12:05:51

@matan map->TypeName, as mentioned in defrecord docstring

matan12:05:26

@juhoteperi oops thanks and sorry for the wrong channel!

mobileink16:05:57

hi folks. how can I ensure that task b does not start until task a is complete? task b depends on a clojure namespace that is generated by task a. if I order them in sequence they seem to run in parallel, and I get FileNotFound for that namespace.

richiardiandrea17:05:01

@mobileink tasks are run serially always, BUT some library author sometimes put them in a future and that makes them run in parallel...What I mean is that it really dependends on the task

richiardiandrea17:05:49

(this is true unless you use boot.parallel explicitely)

mobileink17:05:31

thanks, that's what i thought. i stepped away so i can't check, but i suspect operator error - i'll bet i put the generated files in :assets instead of resources.

danielsz18:05:45

What are the recommended ways to prompt for user input in a Boot task? I can't find any built-in tasks, which surprised me a little bit. Is this a slippery slope?

danielsz19:05:28

I want to write a task that will display a TOS to the user which he needs to accept or reject.

mobileink19:05:41

hmm, interesting. ditto for stuff like privacy policies, etc. what do you have in mind? given the need for security i would imagine something similar to what one needs to do with deployment creds.

danielsz19:05:04

Maybe a simple (read-line) will do.

danielsz19:05:30

I would start from there.

mobileink19:05:00

i think you'd need to securely download the TOS. otherwise how to guarantee that what the user accepted was your TOS and not sth else?

mobileink19:05:21

prompting a user for input should be easy, methinks. but security, reliability etc. is another story.

mobileink19:05:48

(assuming TOS = Terms Of Service)

danielsz19:05:34

Absolutely, TOS = Terms Of Service 🙂

mobileink19:05:13

a secure TOS task might be useful. but then you run into liability. i think i'd write my own tos function and call it from a task. not that i have any experience in this sort of stuff. 😉

mobileink19:05:58

what would the lawyers say?

qqq20:05:36

They would probably not be happy with being automated away.

mobileink20:05:21

f**k 'em. it'll happen to us, why not them? 😉

mobileink20:05:04

better call saul.

qqq20:05:09

@mobileink : you know what computers are not very good at doing right now? writing documentation for webcomponents

qqq20:05:46

a cs/law friend once described the legal profession asfollows:

qqq20:05:03

take a bunch of programmers who have mastered the art of writing obfuscated code

qqq20:05:06

now, let them unionize

mobileink20:05:42

docs: buleeve me i know. i give the polymer folks an e for effort, but still.

mobileink20:05:29

on the bright side: the defpage stuff seems to work, yay! defcomponent, well soon. https://github.com/miraj-project/demos/tree/master/hello-world

mobileink20:05:50

oops, this is the boot channel. well, there's https://github.com/miraj-project/boot-miraj