Fork me on GitHub
#boot
<
2016-05-20
>
alandipert03:05:39

@richiardiandrea: ha, i'm glad you enjoy not using beanstalk

alandipert03:05:56

it's funny, the idea of suggestions about what tech not to use

alandipert03:05:02

the adzerk tech unradar

alandipert03:05:17

"we recommend not using or doing the following things"

richiardiandrea03:05:10

Ahah @alandipert let's make it real, it is actually as useful as a radar

pesterhazy07:05:27

Yes please! We need an unradar

pesterhazy07:05:01

Elastic beanstalk clearly belongs on that list

alandipert12:05:06

@pesterhazy: what do you use instead, if anything?

pesterhazy12:05:39

I refuse stubbornly to jump on the docker bandwaggon

pesterhazy12:05:05

a Jar is already a pretty good container (for an app), and so is an EC2 AMI (for everything else)

alandipert12:05:11

i have concluded this as well

alandipert12:05:24

although i think docker is useful for local dev environments

alandipert12:05:19

at least, for the use cases i'm presented with at my current job

alandipert12:05:40

i think if i was at google or whatever and had tens of thousands of VMs, i can imagine making things to optimize and orchestrate that operate at sub-VM

alandipert12:05:03

like mesos. i need to learn more about it though

alandipert12:05:35

there's just so much mileage you can get out of unix VMs without sub-virtualizing

pesterhazy12:05:28

still think that good old vagrant with an ubuntu image is best for dev environments

pesterhazy12:05:47

(maybe docker's new OSX version without virtualbox will change this balance soon though)

alandipert12:05:48

have you experimented with docker-compose? this is the tool in particular i've found useful

alandipert12:05:15

ah, the OS X thing i don't care as much about, being on linux

alandipert12:05:24

as i realized a few years ago i need to dev like i deploy

pesterhazy12:05:38

no, haven't tried docker-compose (or any of the dozens of other docker tools)

pesterhazy12:05:00

I'd use linux as well but, alas!, developing for iOS now 😞

alandipert12:05:05

i've only tried docker-compose, first a couple years ago when it was called fig

alandipert12:05:39

yeah the docker OS X thing looks promising, for teams that use OS X

pesterhazy12:05:10

also worth looking into nix, which fixes many of the same issues (like lack of isolation) that docker targets

pesterhazy12:05:28

but of course nix/nixos is still pretty uncommon, so I'd be cautious about using it in a team, or at a company where someone else might need to take over at some point

alandipert12:05:42

it also seems like solving the problem at the wrong layer to me

Petrus Theron12:05:53

I’m running boot watch speak test, which recompiles on file changes and takes 11s to run my few tests. However, I can run these tests immediately from a REPL that reloads changes when I save my files. How can I get my automated, watched tests to run faster, by running on ns reload?

richiardiandrea14:05:22

By the way personally I went for ECS, deploying a docker Alpine image that just executes my uberjar. A bit still too clunky especially the part where you have to create a task revision for the new docker to be read into the ec2 instance, but ok...bearable for now

Petrus Theron14:05:57

Thanks, @alandipert. Looks like the solution. How do I install this? It’s a boot plugin right?

alandipert14:05:47

yeah it will required edits to your build.boot... bring it in as dependency, require its tasks, etc

alandipert14:05:38

looks like bring in [metosin/boot-alt-test "0.1.0-SNAPSHOT"] and then in our build.boot (require '[metosin.boot-alt-test :refer [alt-test]])

mobileink15:05:15

what's the best way to filter a fileset so the output fs contains only changed file? I see how to get the list of changed files but not how to turn them into a fs.

micha15:05:56

@mobileink: the result of fileset-diff is itself a fileset

micha15:05:12

so it's ready for you out of the box 🙂

micha15:05:23

it's a fileset containing only changed files, basically

micha15:05:27

or new files, of course

mobileink15:05:10

oy. that's way too simple and obvious.

micha15:05:20

if you need to know about removed files there isa function for that too

micha15:05:35

separate from fileset-diff

mobileink15:05:06

I swear I read the docs! just not the part about "returns a fileset".

mobileink15:05:20

sorry for noise

ikitommi15:05:32

hi. how can I define order for resource-paths, as it’s presented as a set in boot?

micha15:05:01

there is no order, as they are overlayed as a single filesystem internally (and in the classpath)

ikitommi15:05:43

hmm.. but if I have same file (log configuration) in multiple resource-paths with same name, I would like to set which one is loaded.

micha15:05:55

there really isn't a sane way to do that, just like if you load 5 jars with the same file in it, which one do you get when you do (io/resource ...) on it?

micha15:05:03

the best way to handle that is to make a task that selects the correct one and adds it to the fileset, instead of having overlapping paths in your resource dirs

ikitommi15:05:58

ok. have to figure out how to do it. resources are all shared, but just the log-conf should be different.

ikitommi15:05:24

with maven, resource-paths is a list, and first match is used.

ikitommi15:05:12

with leiningen, you can set the order with :resource-paths ^:replace ["dev-resources” "resources"]

micha15:05:01

yes but leiningen doesn't do any realtime updates

micha15:05:22

with boot things can be changed dynamically at runtime while boot is running

micha15:05:27

like from the repl for instance

micha15:05:37

or when you use the watch task for incremental compilation

micha15:05:54

how should boot handle changes to these different files?

micha15:05:27

it's just a lot of complication that doesn't really provide benefit

micha15:05:59

i suspect that whenever you have this situation it's an indication that you can refactor to get a much better solution than overlapping files in the classpath

micha15:05:21

like environment variables, for instance

ikitommi15:05:35

thanks, I’ll try to handle the overlap somehow.

micha15:05:18

you should be able to refactor it to use env vars, which will simplify things greatly, no?

micha15:05:45

especially for things like logging, that's completely environment dependent

ikitommi15:05:37

think so. Default way with Java has been to have a separate log-conf for tests, but so many ways to do this. ENV is one.

richiardiandrea15:05:05

@micha given that you are here, I am working on a cider issue: https://github.com/clojure-emacs/cider/pull/1751 Would you be open to a patch for adding executable forms in boot.user from the command line

micha16:05:27

@richiardiandrea: one sec getting lunch from Kings

gtrak17:05:48

I'm having trouble getting the repl task to serve on 0.0.0.0 and a predictable port, does anyone have a working example somewhere?

gtrak17:05:58

the port part's working

micha17:05:52

@gtrak: the --bind option sets the interface the repl server will bind to and listen on

gtrak17:05:18

ah, i was using host

micha17:05:22

that's different from the --host option that sets the host the repl client will connect to

gtrak17:05:39

thank you

micha17:05:40

the --port is the same for either

micha17:05:52

i thin khaving two separate options was unnecessary, in hindsight

micha17:05:16

i was confused about how 0.0.0.0 address worked

gtrak17:05:54

ah: H host HOST str "The host client connects to."

gtrak17:05:17

I read that as the host another client process connects to

gtrak17:05:51

seems like the server could be split from the client, but lein repl works that way, too.

micha17:05:09

yeah that's how you would create a "headless" repl server:

micha17:05:15

boot repl -s wait

micha17:05:05

(the repl task will not block the pipeline without the wait task if the client isn't waiting around for input)

gtrak17:05:26

ah, right

gtrak17:05:05

in my case, the watch task is doing the same thing for me

micha17:05:41

exactly, that's the reason for not blocking the pipeline in the repl task

mobileink21:05:53

I hope this does not count as abuse of slack, but damn the torpedoes: I'm one of 5 finalists in Intel Ultimate Coder Challenge for IoT. (twitter: #UltimateCoder). Starts Monday, 8 weeks, $20K grand prize. Part of my proposal was to use Clojure where plausible, specifically on Edison and Intel IoT gateways. That also means boot where possible. If interested, search on "Iotivity" and "Zephyrproject". Warning: may be insane.

mobileink21:05:12

sorry, probably shouldn't have done that, Friday afternoon at the bar. But then I ask myself, what would the Donald do?

mobileink21:05:53

boot relevance: cross-compilation and embedded systems

micha21:05:45

i would very much like to learn about that area of computing

richiardiandrea22:05:27

I also have to say that this is one of best Slack channels I have been part of

mobileink22:05:41

@richiardiandrea: it’s the only slack chan i’ve every participated in, i’m pretty sure it’s the best.

mobileink22:05:51

@micha really dunno how or even if boot is relevant to embedded computing, IoT, etc. but i’m about to find out. in any case, given the massive $$ being poured into IoT i think we can say it will only increase in importance. at least until the machines take over.

micha22:05:20

yeah i think so too

mobileink22:05:23

FWIW, for anybody interested, the intel Edison is pretty inexpensive (~ $50) and officially supports Java.

micha22:05:14

i would like to do some lower-level programming too

micha22:05:54

thta world appeals to me because there are fewer frameworks, it seems

micha22:05:30

just a manual for the hardware, then you program

micha22:05:39

i think i would enjoy that

micha22:05:34

@mobileink: i dream of working with somethign like this maybe: http://www.holonforth.com/

mobileink22:05:22

@micha: checkout https://www.zephyrproject.org/ . that’s the RTOS that will (eventually) be the OS for the Intel Curie, which is incredibly cool. I just wish I could program it in Clojure, probably not in the cards anytime soon. But I’ll settle for Clojure on the gateway and the Edison and C/C++ on the sensor device.

micha22:05:52

i want to make a real project in forth one day 🙂

micha22:05:24

C is also nice ,though

micha22:05:59

that holon forth ide is pretty impressive i think

richiardiandrea22:05:51

Not to mention Rust 🙂

micha22:05:02

zephyr looks super interesting

richiardiandrea22:05:04

wonder if the footprint is small enough...but if Java can run there...

mobileink22:05:09

forget forth; take a look at http://factorcode.org/ Awesome. Really dunno why this kind of language never took off.

micha22:05:27

factor looks cool, but i'd like to get off the JVM for a while

mobileink22:05:03

factor was JVM, but not any more, I think

micha22:05:18

interesting

micha22:05:38

i remember watching the google demo, pretty sweet

mobileink22:05:41

you might find John Light’s talk about embedded programming interesting, see link on my blog http://blog.mobileink.com/ .

richiardiandrea22:05:42

wow Zephir is very cool, everything that has fibers in it is cool (like Quasar/Pulsar) 😄

mobileink22:05:43

Yeah, Zephyr looks very cool, which makes sense since it comes from Wind River. Google Wind River, Rocket, Zephyr. Intel bought Wind River; they opensourced the Rocket kernel as part of Zephyr in Feb; Zephyr will be the RTOS for the Intel Curie (http://www.intel.com/content/www/us/en/wearables/wearable-soc.html)

mobileink22:05:01

Sorry, Google “bought” Wind River...

mobileink22:05:41

of course they’re all backwards, they still use “make”, HAH!

richiardiandrea22:05:23

like someone here 😄

mobileink22:05:26

I almost never see Forth or similar languages even mentioned in discussions about embedded systems. It seems a no-brainer; why on earth would you want node.js (pretty common for IoT doo-dads) when you can have Forthish stuff? Must be sociological.

micha22:05:09

maybe there is a lot of work but not as much talk?

micha22:05:40

i imagine people quietly making awesome things in forth all the time

micha22:05:06

but without all the stuff, no left-pad npm modules, no build tools, nothing

mobileink22:05:09

possible, but you’d think things would leak. if you were doing great things in some Forthish, lang, wouldn’t you brag about it?

mobileink22:05:43

maybe not. maybe dj trump is a forth programmer.

micha22:05:08

maybe the place to look is in newsgroups and like that

micha22:05:32

my last little C project was a ton of fun to do

micha22:05:43

i still want to reimplement it in forth and compare

micha22:05:55

the program itself ended up being a kind of bogo forth anyway lol

mobileink23:05:07

well I’m glad you mentioned Forth. the Intel Gateways support C/C++, Java, and Lua out of the box. Why not Forth? Seems a no-brainer, except that your average programmer probably can’t deal with stack-based programming.

mobileink23:05:41

if i have time (it’s only 8 weeks) it would be pretty cool to implement some stuff in Forth.

micha23:05:36

yeah i really like how cleanly it lets you access some very low level stuff, but at the same time can provide some higher level abstractions too