Fork me on GitHub
#boot
<
2016-12-08
>
grounded_sage00:12:12

I'm looking to dynamically add in some html and cljs files during the dev phase. Using this to run devcards just wondering what is the best way to add some files to the fileset on demand.

micha00:12:10

@grounded_sage you can make a temp dir, add files to it, then add the temp dir to the fileset

micha00:12:16

you'd do this in a task of course

grounded_sage00:12:52

Ah yes that's right. I just thought there was a simple thing like doing a sift or set-env!

grounded_sage00:12:48

Figured it out. Just had to conj the resource paths and return identity 🙂

alandipert04:12:06

@tmtwd i tried your demo project

alandipert04:12:25

it works, but you have to require with the :reload argument

alandipert04:12:20

ie after changing and saving epsilon.core, in omnicron i needed to run (require 'epsilon.core :reload). by default clj doesn't load & compile files that have already been loaded

alandipert04:12:33

there's also :reload-all which forces reload of the files that ns requires

alandipert04:12:50

does that solve the problem you had or did you have a different problem?

micha04:12:16

or the clojure.tools.namespace stuff i think?

alandipert04:12:38

maybe, i've never used it

alandipert04:12:46

i think even with it you need to call a function to doit

ba05:12:49

hey guys, checking out boot for the first time here

ba05:12:13

is there a way for me to invoke boot with a filename and have it run it similar to the shebang script method?

ba05:12:46

(trying to use it on windows)

micha05:12:51

@ba your best bet might be to make an uberjar

ba05:12:13

found this >Added -f, --file — evaluates the contents of a file just like with the shebang script, but easier to use on platforms like Windows that don't have great shebang support #465.

micha05:12:28

oh right! totally forgot about that

micha05:12:35

good find!

ba05:12:52

must not have a new enough version though, not working 😛

alandipert05:12:03

maybe also the new/experimental bash-on-windows thing? or cygwin

micha05:12:05

we need to make the 2.7.0 release

micha05:12:21

there are many improvements in there

alandipert05:12:04

changelog is lookin good

micha05:12:02

tomorrow?

alandipert05:12:41

i'm game now? i can test things etc

alandipert05:12:47

oh time diff

micha05:12:11

i think we need to double check the new exception changes

ba05:12:36

I've been coding clojure for almost a month now, I can take over for micha

micha05:12:34

hahah the pizza

micha05:12:54

out of control party pizza

tmtwd05:12:34

nah, that doesn’t work for some reason. I found a workaround though: I don’t use : boot watch pom -p tim/eplon -v 1.1 jar install and I do something like this:

alandipert05:12:52

what kinda system are you on btw?

alandipert05:12:45

oic, looks like mac

tmtwd05:12:30

I think my workaround is ok though, not sure

alandipert05:12:32

is your home directory mounted on a different disk?

alandipert05:12:27

hm another thing you can do is in omnicron, add (set-env! :resource-paths #(conj % "/path/to/epsilon/src")

alandipert05:12:40

and comment out the dependency

alandipert05:12:56

at least, that works if epsilon doesn't have dependencies you didn't already specify in omnicron

tmtwd05:12:59

yes, that’ll put the source of epsilon in the :resource-paths

tmtwd05:12:13

but will that put all of epsilon’s dependencies on the class path?

tmtwd05:12:50

so doing this: boot -c tim/epsilon:1.1 repl

tmtwd05:12:00

will put epsilon and epsilon’s deps on the classpath

tmtwd05:12:10

then I can just load any epsilons directly in the repl

tmtwd05:12:22

boot.user=> (clojure.core/load-file "/Users/timothy/programming/boot-presentation/2modules-sep/epsilon/src/epsilon/core.clj”)

tmtwd05:12:32

and interact with namespaces and fns like normal

tmtwd05:12:59

oh yes, and I can use (set-env! :resource-paths #(conj % "/path/to/epsilon/src”)

tmtwd05:12:06

so I don’t have to use the absolute path

alandipert05:12:11

but i still need your computer's address so i can send it a nasty letter for mysteriously not doing checkouts

tmtwd05:12:36

maybe it’s just not working the way I expect it to work?

alandipert05:12:48

lemme do a quick screencast here

tmtwd05:12:49

or some pebcak variation

alandipert05:12:50

to show you what i did

alandipert05:12:57

i have recently mastered this technology

tmtwd05:12:02

via slack?

alandipert05:12:17

i will make a recording and put on youtube, 1 sec

alandipert05:12:27

hm, shoulda made the fonts bigger, sorry

tmtwd05:12:48

no worries, can read fine

tmtwd05:12:49

will test

tmtwd05:12:49

Ah yep, it was pebcak

tmtwd05:12:32

I didn’t realize (require 'epsilon.core :reload) has to be called each time you want to reload the changes

tmtwd05:12:45

I though :reload meant it would reload automatically or something

alandipert05:12:58

ah, i can see that

alandipert05:12:05

yup just tickles clj into invalidating cache

tmtwd05:12:24

thanks for your help!

alandipert05:12:37

i'm sure there is fanciness to automatically reload things for you

alandipert05:12:42

but i don't use any of it

tmtwd05:12:22

this way works 🙂

christianromney19:12:24

@alandipert off-topic: what window manager are you using?

micha19:12:34

@christianromney i3 4 eva

christianromney19:12:05

never heard of it!

christianromney19:12:09

checking it out now

micha19:12:23

the first gui environment i've ever felt ok with

micha19:12:32

it's basically paredit for windows

christianromney19:12:44

you’re running linux or osx?

micha19:12:54

we also have chrome configured to open new tabs in separate windows

micha19:12:13

having each tab be a separate window is pretty great

micha19:12:23

cause i3 has a tabbed container mode

micha19:12:44

so i can manage tabs in the window manager which means only one set of keyboard shortcuts etc

micha19:12:56

but i can put a terminal tab in there too if i want

micha19:12:18

it works great with multiple monitors too

micha19:12:41

although it doesn't work with wayland

mattly19:12:49

...that sounds exactly like what I've wanted in a window manager

micha19:12:02

so you can't do scaling in a sane way, like on a laptop with a high resolution screen it's sketchy

micha19:12:30

yeah it's really the only window manager i have ever been satisfied with

mattly19:12:50

although lack of scaling support is a deal-breaker for me

mattly19:12:02

I'm 100% on HiDPI screens these days

micha19:12:16

there is a fork that is available

micha19:12:34

i haven't used it because my laptop has a usable resolution with regular x windows

micha19:12:11

i'd deal with it though, as there is no other alternative unless i was to write a window manager myself

micha19:12:32

it also handles floating windows in a pretty sane way

micha19:12:01

it also is highly scriptable (like shell scripts you can bind to keys)

micha19:12:10

alan has more of that than i do

micha19:12:30

oh and it has a modal interface if you want!

micha19:12:14

all around pretty great software

dnolen20:12:53

how do you get boot to actually write out the pom.xml?

dnolen21:12:05

boot pom doesn’t emit anything as far as I can tell

micha21:12:15

@dnolen boot pom target should do it

micha21:12:24

the default directory is ./target

dnolen21:12:06

it doesn’t emit pom.xml

micha21:12:24

for example:

micha21:12:30

barp $ BOOT_VERSION=2.6.0 boot -BP pom -p foo/bar -v 1.2.3 target
Writing pom.xml and pom.properties...
Writing target dir(s)...

barp $ tree target/
target/
└── META-INF
    └── maven
        └── foo
            └── bar
                ├── pom.properties
                └── pom.xml

4 directories, 2 files

micha21:12:38

the -BP options just disable loading profile.boot and build.boot

dnolen21:12:22

@micha sorry you’re right, I see it in META-INF

micha21:12:37

you can use the sift task to move things around

alandipert21:12:30

another handy thing in the 'where is it' situations, pop show -f or (show :fileset true) in your pipeline... prints out fileset

alandipert21:12:03

@christianromney yes i3, a+, strong recommend, deploy to prod immediately

alandipert21:12:40

i have been using it to manage tabs/buffers/windows for both emacs and chrome, which has changed the game

alandipert21:12:43

no more tab/buffer islands

alandipert21:12:21

micha showed me a trick with chrome, yuo can install a plugin that pops new tabs into new windows... so you can use your tiling WM for tabbing

alandipert21:12:36

or accordian, or whatever you want. then i have a script that i can use to search everything, tabs, emacs frames, etc

alandipert21:12:55

the perception of productivity is higher anyway lol

alandipert21:12:04

i feel amazing

christianromney21:12:09

ha. i was experimenting with amethyst for osx

christianromney21:12:38

mainly i’ve used things to sling windows around across monitors and resize them

alandipert21:12:04

oh cool. heard about it but never used. used a thing on mac called sizeup for similar purposes

christianromney21:12:18

e.g. size up, moom, but a full blown WM seems more robust

christianromney21:12:25

right i’ve used it

christianromney21:12:52

just got a new mac and am installing my usual suite of tools

christianromney21:12:03

but was experimenting with different tools

christianromney21:12:14

e.g. nix over brew (i gave that up)

christianromney21:12:25

now alternative WM options

alandipert21:12:04

cool. i landed on i3 after a similar period of reassessment

christianromney21:12:06

i slimmed my emacs config down and gained 3 seconds of my life every time i launch it

christianromney21:12:14

good term for it

christianromney21:12:32

does it run ok on OSX?

alandipert21:12:36

on your next walkabout, check out setting up emacs daemon

christianromney21:12:03

but it pisses me off when i switch projects

christianromney21:12:11

and I have to M-x cd inside emacs

christianromney21:12:25

i’m peculiar about such things

alandipert21:12:47

i had emacs set up at one point to use the i3 reflection commands

christianromney21:12:49

i should just write something in elisp to hook into projectile

alandipert21:12:58

to start the client frame in the same directory the adjacent gnome terminal's cwd

alandipert21:12:15

it didn't work really lol

christianromney21:12:24

hehe A for effort though

alandipert21:12:26

but i enjoy that about i3, accessible hooks

alandipert21:12:52

re: i3 on mac, i suppose it could work in the X.app thinger, but i never tried it. not sure how the keybindings would work in that situation either

christianromney21:12:51

hmm yeah. going to see what google thinks

christianromney22:12:17

man, ppl really dig i3. on reddit: "I tried i3 today and now I hate my Mac"

christianromney22:12:12

this looks interesting: https://github.com/kasper/phoenix can use cljs to script the window manager...

alandipert22:12:37

@micha was this the exception change you were talkinga bout last night? https://github.com/boot-clj/boot/pull/532

micha22:12:07

oh yeah that's one

micha22:12:27

there is also the hlship changes

alandipert22:12:41

@christianromney yeah, altho... i3 uses a set of cli things to interact with the wm while it's running, so yuo can use any language you want to collect info from them or run them w/ commands. the nice part about this is you can find and adapt many ppls' python/ruby/etc scripts

hlship22:12:51

I’d love to see my PR’s accepted.

alandipert22:12:00

@hlship going through and testing things

alandipert22:12:23

@hlship noticing that pretty output is now italicized, which doesn't look great on my setup, is there a way to configure that ?

alandipert22:12:46

err, some output is italicized. .getMessage looks like

hlship22:12:59

I guess it’s personal taste; the *fonts* var controls all that.

hlship22:12:31

Not sure when that changed exactly, and only some terminals will display italics.

alandipert22:12:02

that's cool, i can alter-root it in my profile.boot i think

alandipert22:12:18

i bet most people like it

hlship22:12:34

(def ^:dynamic *fonts*
  "ANSI fonts for different elements in the formatted exception report."
  {:exception     bold-red-font
   :reset         reset-font
   :message       italic-font
   :property      bold-font
   :source        green-font
   :function-name bold-yellow-font
   :clojure-frame yellow-font
   :java-frame    white-font
   :omitted-frame white-font})

hlship22:12:59

The thing I’m most concerned about is the order of the stack frames; that’s swapped from Java traditional order (deepest/latest to shallowest/earliest) to Pythonic order (shallowlet/earliest to deepest/latest). That too can be controlled.

(def ^{:dynamic true
       :added   "0.1.15"}
*traditional*
  "If bound to true, then exceptions will be formatted the traditional way (the only option prior to 0.1.15)."
  false)

alandipert22:12:38

personally i think that's ok, since the formatting of an exception is very much a UI

alandipert22:12:56

as opposed to an interchange format that people would expect to be able to program against

hlship22:12:26

It’s one of the reasons I’m really looking forward to a new official Boot release so I don’t have to go through the stage of “which end do I start from” when I see an exception.

alandipert22:12:53

hm it's not clear to me how to configure these as a user

alandipert22:12:15

oh, i guess i can eval-in the worker pod

alandipert22:12:17

that's the thing to do

alandipert22:12:56

ok nvm - this totally works, in my ~/.boot/profile.boot:

(alter-var-root
 #'boot.from.io.aviso.exception/*fonts*
 assoc :message boot.from.io.aviso.ansi/white-font)

alandipert22:12:25

i will try to flip the ex msg that way and if i can come up with a recipe, add to changelog

alandipert22:12:02

thinking (alter-var-root #'boot.from.io.aviso.exception/*traditional* (constantly true)) should do it

alandipert22:12:46

totes mc 🐐 s

alandipert22:12:48

@hlship what do you think about BOOT_? env var and flag to control exception order?

nux22:12:23

i have been using i3 wm for my laptop (have not moved my desktop to i3 yet, still in kde). i was using awesome wm before, now I cannot go back.

alandipert22:12:29

re: exception printouts being UI... it occurs to me that people might be piping output to a script or something, and it would be nice to control as env var. and maybe we don't change the default yet?

alandipert22:12:52

or maybe, this behavior is unforgivable and we forge ahead. @micha

nux22:12:00

do you guys have your i3 config files shared somewhere? may be i can pick a thing or two from there 🙂

nux22:12:53

@alandipert thanks I will check it out and see if i can add in my configs 🙂

richiardiandrea22:12:22

I cannot see nm-applet and co on here, so there might some problem in tray_output

alandipert22:12:16

on 2nd thought re: stack frame order, even ppl using boot non interactively who want the old behavior can still get it via profile.boot

nux22:12:16

@richiardiandrea in my case, i see the applets (even nm-applet), but after i close the lid and open again, even if the network is connected, i only see 'disconnected' icon there.. some thing must have gone wrong one of these days. it used to work good before

alandipert23:12:43

reminds me of node vs nodejs on ubuntu

alandipert23:12:58

the unix gods gave us the ability to rename files dudes

micha23:12:10

but not retroactively!

micha23:12:15

i think that is his real beef

alandipert23:12:10

oh man, he suckered you into apologizing

alandipert23:12:21

for giving him amazing and free software that wasn't name a particular string he enjoys

micha23:12:53

he did take the time to make an issue

richiardiandrea23:12:55

I personally use b lol

alandipert23:12:07

feel free to chime in lol

micha23:12:07

we could rename it to that

alandipert23:12:43

maybe we shouldn't even specify what it's called, anywhere

micha23:12:16

mv boot $(cat /dev/urandom)

richiardiandrea23:12:55

politically correct library tool $(cat /dev/urandom)

micha23:12:13

just don't try and use my favorite uuid

micha23:12:18

or i will take you to court

micha23:12:23

73ad7965-8a45-4cad-8400-572c247f5aca

micha23:12:40

i bought it on ebay

richiardiandrea23:12:50

oh that's exactly the one I always use!

micha23:12:58

they told me it was unique!

micha23:12:01

cheaters!

alandipert23:12:14

any thoughts on the pretty/exception stack frame flip? i've convinced myself that it's cool

alandipert23:12:26

also i've successfully brought back old behavior with profile.boot mods

micha23:12:27

if you like it then 100% full power

alandipert23:12:35

i personally am ambivalent

micha23:12:41

i am also

richiardiandrea23:12:43

I like it too (I think I also wrote it on the PR)

alandipert23:12:44

i'm just thinking about people who might be parsing these somehow, and if we care about them

alandipert23:12:59

or is it just too weird of an idea to think about covering down on

micha23:12:22

yeah i don't think anyone would be parsing stack traces as strings

richiardiandrea23:12:24

but as Rich was saying, we should maybe ask to b users

micha23:12:40

and -vv disables all the fanciness right?

richiardiandrea23:12:58

hopefully you are right Micha, it should not break anything

richiardiandrea23:12:14

(famous last words)

alandipert23:12:24

even if it does, people can still use the new version with a quick profile mod

micha23:12:44

that part is also better than what we currently have

alandipert23:12:48

if you're weird enough to parse stack traces

alandipert23:12:52

you should be ok with modifying your profile.boot

micha23:12:17

yeah or probably alter-var-root in there could work too

micha23:12:22

replace it with whatever you want

richiardiandrea23:12:30

the only use I would see is in Jenkins' jobs

richiardiandrea23:12:46

parse the stack, but ... who knows...

alandipert23:12:54

yeah, fortunately the msg is still in the same place

alandipert23:12:59

like the root .getMessage

alandipert23:12:19

which i imagine is what people would put in ther CI build-broken email subject or whatever

alandipert23:12:10

^^ pls to review

alandipert23:12:13

re: the omit-stacktrace businses, it looks like the trace will not get printed even when -vv

alandipert23:12:32

since the check is a cond and the check for the kw on the ex-info precedes the verbosity checks

alandipert23:12:23

which i think is ok - because the thrower is making a statement that the stack trace shouldn't really matter for any purpose

alandipert23:12:29

ie test fail, cljs error, etc

alandipert23:12:57

as in, it was thrown to short circuit the pipeline, is not an actual totally unexpected condition

alandipert23:12:11

@hlship ready to merge https://github.com/boot-clj/boot/pull/531 but there's a small conflict in CHANGES.md, would you mind fixing?

alandipert23:12:31

and reword to your liking. i just added a link to my discoveries around restoring old behavior

hlship23:12:56

Hopefully, won’t have to update the BOOT_COLOR fix PR too.