Fork me on GitHub
#boot
<
2017-02-07
>
alandipert00:02:31

It's an emacs 'swap file' @qqq

qqq00:02:07

@alandipert : thanks! (re swap file)

qqq00:02:34

boot.user=> (start-repl)
java.lang.IllegalStateException: Can't change/establish root binding of: *cljs-repl-env* with set
^^ what am I doing wrong?

chooie03:02:56

Curious what everyone else’s boot time is. When I run: time boot -h I get: boot -h 11.62s user 0.61s system 135% cpu 9.039 total Is this normal?

chooie03:02:02

I think not - in this video https://youtu.be/TcnzB2tB-8Q?t=5m49s, the command is virtually instantaneous

alandipert04:02:31

On my 4 yo laptop it takes like 3-6 seconds

chooie04:02:57

Thanks for the idea, Alan. Unfortunately, I’m seeing similar results: boot -h 12.82s user 0.93s system 110% cpu 12.452 total

alandipert04:02:10

what kind of machine are you on?

Alex Miller (Clojure team)04:02:19

I think I’ve seen that with some weirdness related to ipv6 in /etc/hosts ?

chooie05:02:45

Hardware:
Model Name:	MacBook Pro
Model Identifier:	MacBookPro11,1
Processor Name:	Intel Core i5
Processor Speed:	2.4 GHz
Number of Processors:	1
Total Number of Cores:	2
L2 Cache (per Core):	256 KB
L3 Cache:	3 MB
Memory:	8 GB

Software:
System Version:	macOS 10.12.2 (16C67)
Kernel Version: Darwin 16.3.0

chooie05:02:13

/etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost
255.255.255.255	broadcasthost
::1             localhost
fe80::1%lo0	localhost

127.0.0.1   localhost mbpro.local
::1         localhost mbpro.local

alandipert05:02:15

weird, roughly same vintage as my thinkpad

chooie05:02:08

I’ll have to do some more digging. I’ve always had long startup times with leiningen and boot

alandipert05:02:31

thanks in advance for reporting what you find, or adding to wiki

alandipert05:02:39

i'm sure whatever you discover is afflicting many other mac users

qqq05:02:43

for anyone else running into the similar error I got -- it was fized by swapping reload /cljs-repl

qqq05:02:53

i.e. the correct order needs to be: watch, reload, cljs-repl, cljs

pesterhazy10:02:37

@chooie, it takes a long time for me as well: boot -h 48.40s user 2.70s system 249% cpu 20.516 total

pesterhazy10:02:20

note that it matters where you run boot even for -h, i.e. it reads your build.boot, resolves the deps etc.

pesterhazy10:02:16

in an empty directory (no build.boot) I get boot -h 22.19s user 1.01s system 270% cpu 8.565 total

pesterhazy10:02:46

(also on macOS, mid-2012 macbook air)

pesterhazy10:02:21

is it true that it's much faster on other people's machines? I'd love to see numbers on other systems

pesterhazy10:02:36

ah, adding -B and -P brings it down a bit: boot -BPh 12.00s user 0.51s system 304% cpu 4.107 total

pesterhazy10:02:57

I think boot -BPh is better for comparing numbers

pithyless11:02:42

time BOOT_JVM_OPTIONS="" boot -BPh
8.12s user 0.36s system 339% cpu 2.496 total

time BOOT_JVM_OPTIONS="-client -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xmx2g -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Xverify:none" boot -BPh
2.44s user 0.22s system 190% cpu 1.392 total

pesterhazy11:02:58

that bring it down to 2.6 s for me

pesterhazy11:02:20

yours is still twice as fast @pithyless

ska14:02:55

Has anyone here any experience with running a ring/cljs app with boot-cljs, boot-reload and friends behind a proxy? I am trying to make my app relocatable so that a proxy can serve it to the outside world as (e.g.) /myapp. Mix in ring contexts, redirect responses, buddy authentication and interactive CLJS development for fun.

bhagany14:02:21

adding another datapoint: boot -BPh 8.12s user 0.38s system 379% cpu 2.241 total on an early 2016 MBP running Sierra

pesterhazy14:02:23

wow. here I was thinking of upgrading to a new MBP!

pesterhazy14:02:47

and it's actually not much faster than my 2012 MBA

bhagany14:02:07

yeah, I just upgraded from a 2010 model, and I wasn't blown away or anything

pesterhazy14:02:24

you just saved me 2500 bucks

bhagany14:02:49

my commission is 10% 🙂

pesterhazy14:02:03

boot startup time is (one of) my main hardware purchase criteria

bhagany14:02:25

correcting my earlier statement, this is technically a mid-2015 model, which was bought in early 2016

bhagany14:02:01

applying the /etc/hosts fix that @alandipert linked above didn't appreciably improve my startup time

bhagany14:02:57

the JVM options from @pithyless bring my startup time to just over 2 seconds, though

pesterhazy15:02:55

not bad, highscore I guess @ska?

alandipert15:02:11

worth noting, limiting tiered compilation makes longer-lived things noticeably slower

alandipert15:02:39

seems like a good idea for shebangs tho

ska15:02:56

@pesterhazy Dell Latitude, dual core w/ hyperthreading (could not get a real quadcore w/o nvidia card sigh), 16GB RAM, SSD fully encrypted... Works pretty well. 😄

pesterhazy15:02:30

ya your choice is much better (and performance too) if you can use Linux

ska15:02:39

Working in companies since 1999, always on Linux. happy, happy, joy, joy. (OK, a Windows VM comes in handy from time to time)

ska15:02:51

sorry, pretty off-topic

juhoteperi16:02:58

My results are almost identical to @ska

juhoteperi16:02:47

Hmm, I have tiered compilation enabled, but I often keep apps running for several days

alandipert17:02:57

tiered compilation is on by default in java 8, the sticker is XX:TieredStopAtLevel

alandipert17:02:15

there is a tower of JIT compilers, C1-C4, restricting to 1 limits optimization potential

richiardiandrea17:02:26

> While Leiningen continues to be ubiquitous, boot made significant advances this year, moving from 13% usage to 22% usage.

richiardiandrea17:02:42

survey results are out ^ 😉

richiardiandrea17:02:28

> there is a big jump in the number of ClojureScript developers using boot (from 15 to 23%).

alandipert18:02:25

extrapolating, we can expect 100% boot by 2025 😁

alandipert18:02:43

possibly 110% in 2026

pesterhazy18:02:00

Congrats cobblers, 22% is an amazing achievement

sineer19:02:48

I switched to boot a week ago and I'm liking it a lot so far, feels even better than leiningen! Congrats and thank you very much to all the devs!!

sineer19:02:09

boot-cljs-devtools really made my week 🙂

mobileink20:02:14

i wonder how many use both? i've gone completely over to boot but i'll bet there are a lot of experimenters.

seancorfield20:02:45

mobileink: I still use Leiningen for FOSS projects that started out that way, but anything new I create using Boot now.

mobileink20:02:04

i'm guessing that's pretty common. fortunately for me all my lein stuff is pretty simple. btw your message is shaded yellow, i guess that means you replied to me but did not "also send to boot"? any idea if that makes it private?

seancorfield23:02:35

Not private, no, just threaded. The yellow shading is most likely because my reply had your username in it.

mobileink23:02:51

thx. getting the hang of it.

geoffs20:02:47

I've got a project right now that's in a hybrid state 🙂

geoffs20:02:18

not super happy with it, but transitioning certain things is challenging.

micha20:02:11

haha "cobblers", +1

richiardiandrea20:02:54

Sometimes you have to use both, especially if your co-workers use Cursive

mobileink20:02:23

i've got some legacy leiningen stuff. after months of boot-only it just confuses me. simple_smile

mobileink20:02:09

getting better at converting, anyway.

kenbier20:02:50

what does add-cached-resource do? there is no docstring for it 😕

micha20:02:22

boot.user=> (doc add-cached-resource)
-------------------------
boot.core/add-cached-resource
([fileset cache-key cache-fn & {:keys [mergers include exclude meta], :as opts}])
  Like add-resource, but takes a cache-key (string) and cache-fn instead of
  a directory. If the cache-key is not found in Boot's fileset cache then the
  cache-fn is invoked with a single argument -- a directory in which to write
  the files that Boot should add to the cache -- and the contents of this
  directory are then added to the cache. In either case the cached files are
  then added to the fileset.
  The opts options are the same as those documented for boot.core/add-resource.

micha20:02:29

it's in 2.7.1 version

micha20:02:16

it's doing kind of a lot of stuff so if the docstring isn't clear feel free to ask 🙂

micha20:02:05

one example use case is in boot's built-in uber task

micha20:02:43

the uber task unzips your depdendency jars and adds the jar entries to the fileset

micha20:02:57

this can be quite a lot of work and I/O

micha20:02:26

but we can cache the exploded jars

micha20:02:42

it uses the md5 checksum of the jar file as the cache key

sineer21:02:05

Is it possible to change the voice for (speak) ?

kenbier21:02:11

@micha i see, so its just meant to use as a cache to not add extra things to the fileset?

kenbier21:02:35

the files still get added to the same location as if they were called with add-resource ?

micha21:02:52

but it's faster because of caching

micha21:02:43

it can amortize the work of transforming the set of files into the stuff the fileset needs

kenbier21:02:00

ok cool! thats totally not what i need, but nice to know its there. 😆

kenbier21:02:24

@micha another question for you

kenbier21:02:15

how do you interactively develop a custom task? is there some breakpoint functionality that you use? ideally id like to have a repl while the fileset is being transformed

micha21:02:16

probably easiest thing is to edit build.boot and do (load-file "build.boot") to reload

micha21:02:21

inthe repl that is

micha21:02:47

you can also of course make a namespace and do (require 'my-task.namespace :reload) in the repl

kenbier21:02:12

would that let me run one of my tasks? id imagine i’d want a way to interactively play around with the fileset that one of the handlers is processing

kenbier21:02:22

run some boot commands against it, see what works and what doesn’t

kenbier21:02:19

id like to run some commands in the repl at the "; work is done here” part

micha21:02:01

i don't think there is anything that does exactly that

richiardiandrea22:02:21

yeah running a task against some fileset is something I would be interested in too...there a new-fileset feature and probably this can be used to get some degree of mocking

dominicm22:02:54

@micha do cached resources survive across multiple boot runs? Could cljs take advantage of this feature to not take 5m of the start time?

micha22:02:27

@dominicm yes that's right, they are cached forever currently

micha22:02:20

i don't know if that would help the cljs compiler though

micha22:02:39

there are also per-project caches

kenbier22:02:24

@richiardiandrea that seems nice! i’ll have to try that

richiardiandrea22:02:49

is there a way to set system properties when initializing a pod?

richiardiandrea22:02:23

I get a -Dmaven.multiModuleProjectDirectory in boot-mvn

micha22:02:43

system properties are JVM global though

micha22:02:55

you can do System/setProperty

micha22:02:03

i don't know how thread-safe that is

richiardiandrea22:02:41

ah it looks like the property is there, but does not match the version in the pod

richiardiandrea22:02:29

weird, as it is calling org.apache.maven.cli.MavenCli....anyways thanks for the hint 👍

richiardiandrea22:02:13

this is weird:

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T08:41:47-08:00)
Maven home: <unknown Maven home>

kenbier23:02:17

does anyone use bootlaces to push releases to clojars? im having trouble with the gpg signing

kenbier23:02:41

i have a gpg.edn file in ~/.boot/gpg.edn but it doesnt seem to be using it

kenbier23:02:52

> gpg.edn can be global, sourced fom your home directory, or local to your project. Local gpg.edn takes precedence over global one.