This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-11
Channels
- # admin-announcements (8)
- # announcements (1)
- # boot (343)
- # braid-chat (23)
- # cider (20)
- # clara (5)
- # cljsrn (48)
- # clojars (5)
- # clojure (90)
- # clojure-canada (3)
- # clojure-czech (1)
- # clojure-russia (107)
- # clojure-sg (2)
- # clojurebridge (2)
- # clojured (10)
- # clojurescript (70)
- # community-development (73)
- # cursive (106)
- # datavis (40)
- # datomic (40)
- # docs (4)
- # editors (1)
- # emacs (1)
- # events (4)
- # funcool (2)
- # hoplon (46)
- # jobs (2)
- # ldnclj (11)
- # mount (8)
- # om (214)
- # onyx (12)
- # re-frame (35)
- # reagent (31)
- # spacemacs (12)
- # yada (18)
then i check the docker images
log and see that the command is /usr/bin/boot /usr/...
{
"AWSEBDockerrunVersion": "1",
"Ports": [
{
"ContainerPort": "3000"
}
],
"Volumes": [],
"Logging": "/var/log/nginx"
}
local image works...
Current system: #'edubot.systems/prod-system
03:31:38.601 INFO [org.projectodd.wunderboss.web.Web] (clojure-agent-send-off-pool-0) Registered web context /
Autostarting the system: :started
Reloading namespaces (edubot.pages.signup edubot.systems edubot.pages.partials edubot.slack edubot.core edubot.handler edubot.pages.errors edubot.pages.index)
:reloading ()
03:31:39.054 INFO [org.projectodd.wunderboss.web.Web] (clojure-agent-send-off-pool-0) Registered web context /
Public announcement: the latest system
snapshot supports abstractions derived from Duct: endpoints and handlers. Discussion around the upcoming changes is here: https://github.com/danielsz/system/issues/48
@micha: I cloned https://github.com/danielsz/holygrail and am trying to deploy it to EB
Dockerfile:
FROM adzerk/boot-clj:latest
RUN /usr/bin/boot web -s doesnt/exist repl -e '(System/exit 0)' && rm -rf target
# Application
WORKDIR /app
EXPOSE 8008
CMD ["prod-run"]
Dockerrun.aws.json:
{
"AWSEBDockerrunVersion": "1",
"Ports": [
{
"ContainerPort": "8008"
}
],
"Volumes": [],
"Logging": "/var/log/nginx"
}
I thought the boot-clj image made the ENTRYPOINT /usr/bin/boot
so the CMD ["prod-run"]
would run /usr/bin/boot prod-run
still get that
clojure.lang.ExceptionInfo: java.lang.IllegalArgumentException: No such task (prod-run)
data: {:file "/tmp/boot.user2351824110130883549.clj", :line 7}
$ boot asdfasdf
clojure.lang.ExceptionInfo: java.lang.IllegalArgumentException: No such task (asdfasdf)
something looks amiss with show of late:
alan@cheezit:~$ BOOT_VERSION=2.4.2 boot -d javax.servlet/servlet-api:2.5 uber -j show -f
Adding uberjar entries...
servlet-api-2.5.jar
alan@cheezit:~$ BOOT_VERSION=2.5.5 boot -d javax.servlet/servlet-api:2.5 uber -j show -f
Adding uberjar entries...
69ca51af4e9a67a1027a7f95b52c3e8f-servlet-api-2.5.jar
mm, yeah
servlet-api-2.5.jar
vs 69ca51af4e9a67a1027a7f95b52c3e8f-servlet-api-2.5.jar
oh this is an uber improvement i missed?
and yeah i think this is pre-`-d` update
because if you have a bunch of jars in WEB-INF/lib/ there might be two with the same name
no i just didn't expect to see it
thought it might be a toString regression on tmpfile or something
but now i abide it
mystery solved
hm, I tried to upgrade to boot-reload 0.4.3 and it flunks with:
clojure.lang.ExceptionInfo: Could not locate adzerk/boot_reload__init.class or adzerk/boot_reload.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
Changing 0.4.3 back to 0.4.2 works.Sorry, bad release
hi. i’m trying to figure out how to exclude boot/core and adzerk/bootlaces dependencies from POMs generated by build-jar (from bootlaces). no luck so far. any hints?
@michal: is it important to you that they're not loaded as transitive deps or is it really about not leaving any trace in Pom.xml?
well, the latter would be preferable, but if it’s a problem it would be enough just to not enforce downloading these deps
I can't tell you how to do the latter right now but if you add :scope "test"
to a dependencies vector it will not be registered as a transitive dependency
does the need of keeping :source-paths
and :resource-paths
separated has to do with scenarios in which you don’t want your source code be included in the jar or there are other use cases in which keeping them separated is recommended?
i would rather say that resource-paths
are directories bundled to resulting jar from where you can read your files (resources) in runtime and source-paths
are used by boot just to locate source files to compile
Also always helpful to look at the fileset roles documentation in the wiki
@martinklepsch: and re-reading more times
@magomimmo: in a cljs project you might build a zip at the end in which you don't want to include your sources
@martinklepsch: yes I know. I was listing in my head all the different scenarios. and the one cited by you is one of them
@ragge: out of curiousity do you have any opinion on nix vs guix?
@alandipert: I've never used guix and have only read briefly about it so can't say much
@alandipert: but nix is great
@jethroksy: @micha: looks like there is a lot of problem w docker, no?
has anyone tried to run clojure apps using http://osv.io/amazon-ec2/ ?
i think @alandipert has experimented with this?
i haven't tried that
hi @cloudroutine welcome 👋
i'm an interloper here to lurk and steal ideas 😉
I found out about boot
for the first time today. I've been tasked to create a new build system for F#, so I'm surveying other languages to see what might be useful
look no further hahaha
& welcome 😉
middleware-factories
are a bit 😕
@dm3: should be enough. merge-env!
might be better if you don't want to list all existing dependencies as well
@cloudroutine: maybe middleware factories
doesn't sound like much fun but middleware factories is not something users/devs think about much. I think it's just an attempt at describing what tasks are. You could also say they're higher order functions
@cloudroutine: middleware factories are a key part of how boot can be efficient up against Make-style dependency-directed things
they provide a closure in which instances of a task can store mutable state - primarily, a cache
although i can imagine other systems for providing instances of tasks places to store caches... the nice thing about generating a function is it (and the place it uses) are anonymous
it seems like they're not particularly... well defined
haha yea "here's the part where who knows what'll happen" 😀
it's such a jargony name I wasn't sure if I was missing something about it
@cloudroutine: would be curious what other interesting tools you stumble upon btw
do you know FAKE
?
it's not as strongly typed as i'd like
I can kind of do what I need with it, but what I'm working now is going to end up being its sibling
make and boot are definitely opposite ends of the spectrum.. but both the same in that they are systems for linearizing effects
the boot way is, linearization happens like with any programming language - application via reducible expressions that can evaluate to a FileSet
vs. make which is an algebra for describing the order things should happen to an implicit file system value
in that sense FAKE is closer to boot than make
in that case it sounds awesome, i'll check it out
thrown off by the name hehe
what's currently holding it back is how strongly tied it is to the msbuild system
so i'm tearing that out
so people on osx and linux can finally get a decent non-ide experience with F#
it's fairy dust
it simply provides the bootstrapping necessary to run clojure on the jvm and install maven dependencies that that code needs
and it provides libraries of its own that have useful functions for doing some common tasks with building clojure projects
this looks a lot like a build system to me https://camo.githubusercontent.com/63ec05f0e3f44b29cfbc5a7d631fdd08a3a76de3/68747470733a2f2f64726976652e676f6f676c652e636f6d2f75633f6578706f72743d646f776e6c6f61642669643d3042336a39584f57436c7375594e585278535531566156686c614441
involving resource, source, and asset paths as a part of a virtual file system
@jaen I guess it's just fancy plumbing 😄
the real thing that boot does is get your code running, without an IDE or other tooling
there is a lot of stuff that has to happen before clojure can run, especially around setting up the classpath
> the real thing that boot does is get your code running, without an IDE or other tooling ^ this is what I think of when I think of build system, maybe we're thinking of different things
I know zero about maven
I haven't come across anything in boot so far that I couldn't implement in F#
there is nothing complicated about boot, i would be surprised if there was anything that couldn't be done in f#
i'm not sure if I want to do something like the pods or not
it might be useful to have that kind of isolation mechanism, but I don't think it'd need to be a strickly enforced since F# package manager is pretty good at resolving dependencies
like when you actually need a different version of a dependency in one part of the program and a different one in the other
I haven't programmed in java for over 10 years, it has binding redirects right?
> when you actually need a different version of a dependency in one part of the program and a different one in the other ^ when this happens you say 'no I want you to use the other one instead'
and you are then going to have to fix all the code that is now broken in any dependencies that need the other version
hmm this seems like a much more of a java specific issue
this is a common problem in clojure, where you have dependencies that are only needed at build time, but not at runtime, like the cljs compiler for example, which depends on some rally huge google project, which depends on a huge apache project, which depends on an old version of some http client
and there isn't a great way to do transitive dependency resolution?
so in boot if you make a task, you're expected to load all your dependencies into a pod
yea so they're in separate dependency chains
you couldn't load both 0.1 and 5.7 into the same domain?
you can do that in .net
you extern
alias it
don't think about how to merge conflicting dependency graphs, just isolate them in pods
which seems like a nice thing about pods, I'm wondering if I could do something similar with compilation units for a more modular approach to assembly construction
which i guess would fall somewhere in between the boot and cargo approach
What is the package manager for f#? Paket?
From readme I understand that it works like Maven, it always selects a single version of dependency to load if there are multiple dependencies to it
> Even more importantly: If two packages reference conflicting versions of a package, NuGet will silently take the latest version (read more). You have no control over this process. > Paket on the other hand maintains this information on a consistent and stable basis within the paket.lock file in the solution root. This file, together with the paket.dependencies file enables you to determine exactly what's happening with your dependencies.
Groups look maybe a bit like Maven scopes
At least in a sense that they can be used to separate build and test deps
and dependencies that often aren't involved in the compilation process at all
like FSharp.Formatting
and FAKE
So two groups can have different versions of a dependency, but I'm not sure when or how groups are used. Can one use both versions in one program?
Or well, that's probably not necessary anyway.
there's no way to fully escape from a project
style system in F# since the compiler needs that to do proper type resolution and constraint analysis
In JVM it's not possible to remove stuff from classpath once they have been added there, so Boot tasks don't usually depend on anything and instead load their dependencies into pods. This way task dependencies don't leak into project classpath.
Looks like groups allow having separate dependency graph for build dependencies so there is no the same problem with Paket.
yea i had no idea this was such an issue in jvm land
rust takes the total opposite approach, just give us all the source and we'll recompile everything
which doesn't seem sustainable long term
Well all Clojure and ClojureScript libraries are distributed in sourcecode
can't escape those .jars
though 😄
But that doesn't help at all if one library has breaking changes and some parts require the new version and some old
But at least it prevents Scala like dependency hell where libs have to compiled to every Scala version
ugh Scala
.... X_X
but with nodejs and ruby i'm always getting broken builds when some new version of a transitive dep comes out
it's miserable
The Scala's problems are not caused by JVM.
they're primarily of it's own making
it's an odd type system
When 2.10 came out we had to wait like 4 months before Slick was updated for it 😄
And Slick library is maintained by Typesafe.
it's hard to put a lot of faith in them based on prior decisions
but at least they seem to be improving
Well, they want to unify subtyping with parametric polymorphism, which IIRC is ugly even from the theoretical standpoint, so not surprising they have problems : V
as Simon Peyton Jones likes to put it, they're stuck in the swamp
Yeah, most of my knowledge regarding that comes from https://www.youtube.com/watch?v=6COvD8oynmI P ;
FStar has by far my favorite type system https://www.fstar-lang.org/tutorial/tutorial.html#sec-access-control
but with a lot less fussing than idris
I'm always like "whoa you can type quicksort such that it will verify it sorts" but then I'm like "that's way over my head" and I just kinda made a stop at Clojure on my road to Haskell and beyond ; d
i wish ClojureCLR wasn't so terrible 😞
what's bad about it?
slow, buggy, and not well supported
sounds full of potential
it'd actually be a lot simpler to implement the clojure compiler in F# than the C# approach they took using the Dynamic Language Runtime
it's my 2nd favorite LISP after sweet-racket
homoiconic without the cruft 😉
@cloudroutine: as you are looking at build tools - I have never heard of this until today : https://buckbuild.com/ - Facebook’s tool - supports multiple languages / ios / android. One of the cljs + native mobile guys is looking at using it.
Some potentially interesting ideas there for boot - but assume all you #C053K90BR devs have seen it before.
which ideas do you find the most interesting?
They have worked hard on speed - don’t like that it is declarative - where boot embraces code. Lots of caching - first order dependencies. Some sophisticated stuff for mobile like Android Dex merging. Haven’t looked in depth yet - but some mobile devs are looking closer.
imagine how much more perf we'd have if we added anouther 10x of boilerplate and spaghetti code!
Yeah - well we are using gradle a good bit @ LGS - VERY SLOW. This blog indicates much faster builds : http://zserge.com/blog/buck-build-system.html
Especially for native - where there is not as much active live reload going on - makes a big difference.
hi all, I just published the 20th tutorial of the modern-cljs series. It guides step by step in publishing a library to clojars by using boot
: https://github.com/magomimmo/modern-cljs/blob/master/doc/second-edition/tutorial-20.md
I have a webdav folder I uploading hoplon web pages to. Boot seems to update file-date(modified) on most of the files and folders in the target folder. Even unchanged image files! I guess re-copying most of the fileset.
How can I upload and merge only files that were explicitly changed since last time?
My upload time, with all the updated .html-out
folders and updated assests is 20 min each push!
I am using the target task, and tried with and without BOOT_EMIT_TARGET=no
, and (task-options! target {:no-clean 'true})
I have my static assets under :resource-paths
. Is that an issue?
I seem to remember having a problem using :asset-paths
I'm on Win 8.1 and things seem to be working fine otherwise!
Should I use BOOT_EMIT_TARGET=no
in the general case ....?
@chromalchemy: yes i think you should
is there a way to have optional options or default values to boot tasks?
@richiardiandrea: you can use task-options!
@magomimmo: that's awesome!
@richiardiandrea: take a look here: https://github.com/magomimmo/modern-cljs/blob/a23708a39ca8b3c6d17e5757ae2e4c08163561d5/doc/second-edition/tutorial-16.md I talked on default too...
@magomimmo @micha : awesome thanks!
@magomimmo: I searched for task-options!
but it looks it is not in the tutorial
haha @richiardiandrea i'm reading the task options section right now
lol great, I just tried a classic CTRL-F4
@micha I must be blind but can you point me to where it talks about optional task options? 😖
Sorry, optional or with a default value, like in a task for git
fetching that I am working on I pass the url but the branch
I want it to be optional, if not there, it defaults to master
(deftask foo
[b branch NAME str "The git branch."]
(let [branch (or branch "master")
...
ok great, yes it is what I am doing 😄
ok guys thanks to both!