This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-13
Channels
- # admin-announcements (2)
- # beginners (27)
- # boot (85)
- # cider (24)
- # cljs-dev (20)
- # cljsrn (16)
- # clojure (73)
- # clojure-brasil (2)
- # clojure-czech (152)
- # clojure-dusseldorf (7)
- # clojure-france (3)
- # clojure-japan (1)
- # clojure-norway (1)
- # clojure-poland (7)
- # clojure-russia (140)
- # clojure-uk (7)
- # clojurescript (66)
- # cursive (20)
- # datomic (8)
- # emacs (7)
- # events (1)
- # hoplon (325)
- # jobs (2)
- # jobs-discuss (69)
- # leiningen (3)
- # off-topic (6)
- # om (48)
- # onyx (82)
- # parinfer (1)
- # planck (10)
- # re-frame (53)
- # reagent (8)
- # ring (103)
- # untangled (13)
- # yada (14)
Hello! I'd like to gid rid of this warning
Implicit target dir is deprecated, please use the target task instead.
Set BOOT_EMIT_TARGET=no to disable implicit target dir.
by creating a target task. I've tried to add (target :dir #{"target"})
in my dev
task but I still see the warning running boot dev
. Anyone? Thanks!!oh, I dont't know the dependency...
@leontalbot: you will still see that warning, you need to change your boot properties
for example….
thanks! I thought we had the choice between please use the target task instead.
and Set BOOT_EMIT_TARGET=no to disable implicit target dir.
@alandipert @flyboarder Could we think of adding BOOT_EMIT_TARGET=no
by default in the official lein boot template?
im sure a PR would be ok
oh I might see a problem. I don't see boot.properties in the source. It seems to be added dynamically or smth...
oh no ok, it's there
it only exists as an optional settings file
so it isnt required necessarily
Thanks @flyboarder! I just made a pull request. https://github.com/tailrecursion/hoplon-template/compare/master...leontalbot:master
let's see 😉
@jumblerg: I would be up for using hoplon/ui
for a new project. Do you plan deploying to clojar anytime soon?
I'd like to "port" a bootstrap template I bought to hoplon/ui and see how it goes.
@jumblerg: i would also be interested in hoplon/ui
@leontalbot, @flyboarder: it would be great if you gave it a try! i’m using it for a project right now that i’m trying to pull together by monday so the amount of support i’m able to provide over the next few days may be limited. on the other hand, while i continue to uncover occasional cases i didn’t account for, this is the fastest i’ve ever built a client side application. i’m pleasantly surprised by how well the three-div box wrapper seems to be working for layouts.
if you checkout
and build-jar
, then clone hoplon/ui
and boot build
or boot hoplon -m build-jar
, you should be able to start using it.
the biggest deficiencies right now are (1) the responsive layout logic leaks due to the fact i haven’t written the logic to detach the handlers, (2) responsive layouts initialize to the largest screen size, (3) the box model hasn’t been applied to the body element within the window element itself, so there has to be another elem within it to use certain attributes and (4) the component libraries themselves need to be built out.
help building out the individual component elements would also be much appreciated; i think the process is relatively straightforward at this point by emulating existing elements such as button
or image
.
hey, can i give a little feedback about Set BOOT_EMIT_TARGET=no to disable implicit target dir.
?
it doesn’t say where I set this in the warning 😉
@thedavidmeister: that env var should be set by default
yeah, i figured it out
but at first I was like “where do I set that?"
minor tweak
i’m still going to try and make a test for that weird bug with the inputs value
just want to wrap up this PR first
@alandipert: well it did work on version 39 of ff, but version 45 broke for me 😞
@alandipert: i just pushed a newer version of selenium to the boot file
try again?
@thedavidmeister: i shall
@thedavidmeister: worked great and this is an awesome PR, thank you! i squashed and edited the commit msg a little, let me know if you object to it
@alandipert: np, glad to help
i dub you: hero of hoplon
i’m definitely just picking some low hanging fruit 😛
hah, you’ve taught me plenty of cool things
@micha: is the thing we’re trying to avoid by not deleting and re-adding tags called “DOM churn”?
i’m working on sneaking it into work
making some team KPI reports in boot
then one day i’ll just magically make a dashboard 😉
ah we have a big Drupal CMS as our base system
it’s getting on 5+ years now
we got some custom Scala and Ruby stuff doing other stuff that plugs into it
and does various project management automation stuff
getting to the point where any large-ish new projects will probably be their “own thing"
and we’ll probably start splitting things out from the main system if they become maintenance issues
hoplon’s defelem
is like the one bit I do like about Drupal, but modernised, and without all the complexity/baggage that comes with CMS systems
nah, not that at all
more the way that defelem works, like nested templating
with attributes and children as data, etc.
i kind of see the cell stuff and the defelem stuff as really useful together, but not necessarily part of the same thing
i drew up a diagram of FRP based on my understanding, for the guys at work, and they were at different bits
/me shrugs
nah, my understanding is that’s only one bit
i’m going to see if i have a photo on my phone
so, the context is that we were comparing hoplon stack to similar libraries in Scala
and i was trying to think of all the “bits” you need
so we could evaluate how well each solution does each bit
and where dealbreakers and good things might be at each spot
this isn’t a diagram of hoplon
so, we have little docket printers that print out orders for our eCommerce stuff in restaurants
we’re looking at building an app so we can embed some touch screens
to talk to the existing scala stuff under the hood
it’s also a scrappy diagram
but basically, we ended up with things you would want:
- data store = cells in hoplon, but could be anything that can be used by formulas
- formulas = calculate stuff from data store (this bit rules out any raw JS solution for be because of type shenanigans)
- DOM sync = a way to deterministically build a DOM based on formulas, obviously defelem in hoplon
- events = a way to authorise changes
and it all has to be values, because objects that mutate and have internal state aren’t friendly to formulas
and the “backend” could just be persisting something to localStorage, it’s basically anything that falls outside this chart that you might push/pull to in order to get values from “over there"
i would think all of this is pretty obvious to someone who has used Hoplon
but say… I’m trying to talk to someone who hasn’t used it, and is asking about things like https://github.com/lihaoyi/scala.rx
i found it useful to outline what we’re actually looking for, and what we’re not looking for too
one exercise you can do is implement event streams atop behaviors
to show that formulas are the One Thing
if you have a primitive that does value-based propagation, then you can turn it into an event system by introducing unique values
e.g. a formula with a counter in it is an "event stream"
OK sure
this is in original FRP literature but i think mostly lost on the drones who implement Rx everywhere
i think maybe because what Rx people really want are queues since they want to coordinate IO, not values
i dunno, just my perspective on what i see people doing with Rx ideas. couldn't be sure if that way of looking at it is useful to your team/usecase
we’re not necessarily
honestly, we’re just exploring lots of options
I have someone say “why Hoplon, why not react? or this FRP Scala thing? or angular?"
and these guys all have experience that is highly focussed on REST APIs and big, complex CMS systems
the place where micha and i work, and where micha invented most of hoplon settled on angular after we left and it worked out really well for them
well, where we work, and also when i talk to other people i know in the industry locally
it’s like, the model itself is novel to many people
so, assessing what framework to use to achieve the model without figuring out what the model is, exactly, is kind of putting the cart before the horse
if it works out well for you without doing that base research, it’s kind of co-incidental, no?
hehe, in my experience people choose whatever the most blogged about framework is at that point in time
I tend to prototype for a couple weeks before deciding on anything
but i don’t really want to manage large projects… i want to have small-medium projects that work well together
because large projects end up being so big you can kind of do whatever and sheer effort will achieve pretty much anything
it’s also easier to make decisions that actually make a difference
but with large projects you really need to have a clear vision that goes beyond anything a framework can provide
i’ve found people to be very resourceful at wasting huge amounts of time to re-implement parts of frameworks in buggy ways, to avoid doing a much smaller amount of work to simply understand the framework better 😛
the framework just gets undermined on so many levels at some point that it just becomes more of a guide than anything else >.<
yeah i know
actually, there’s this guy at work we’re letting go tomorrow
it’s mind boggling how good he is at making things complicated
and then being smug about it
we really tried hard to make hoplon as lisp-can-do-it as possible, providing orthogonal pieces that can be understood in isolation
hey, this problem that i’m talking about is part of the reason i’m here
with the browser there are many unfortunate aspects of the platform that interfere with good factoring of code
ah look, i know what you mean
like parts that are separate concerns in most ways have some weird edge case coupling that comes from some weird thing in the platform
but at least i can choose to associate myself with people who see that there is a problem
yeah i think i saw you complaining about that somewhere a few weeks back
do you guys want more people using Hoplon on projects?
is that a goal of the project?
> “And anyway, the subject line presupposes that Lisp has not caught on. This is like saying that astrophysics or calculus or brain surgery has not caught on because in relative numbers, there might be more people doing other things. The success of Lisp is not measured in the number of people using it, it’s measured in the utility to those people who do use it. Turning it into C (or C++ or C#) to make it more popular would not be success. In the world’s menu of computer language options, we don’t need them all to be Taco Bell.”
not a huge kent pitman fan, but i appreciate this quote
hah, well
that aside
less is often more, i was talking to a scala dev the other day, his point was that there werent so many libs for Clojure as scala
btw @alandipert, https://github.com/lihaoyi/scala.rx solved the nested cell (Rx) leaking using contexts. They have an implicit ctx
running where the cells register themselves. Then a cell keeps a list of owned cells and kills them when recalculated. Although I think this means you can't get the nested cells out of the containing one.
@dm3: we've talked about a reference counting scheme like that for javelin
@dm3: but decided ultimately it would introduce constraints that would make the model more complex in the general case
@dm3: vs like it is now, potentially complex in particular and rare-ish cases where cell leakage is a concern
maybe some explicit context thing, like cell domains could be good, give you a function you can call to do GC manually on cells created within the dynamic context
yeah ok, so popularity is not really a goal at all then 😛
the goal is excellence
although, if it was incidental, nobody would say that’s a bad thing either
the more people appreciate excellence, the better 😄
to achieve that you need a platform that does a really good job of separting concerns and not breaking how lisp works
yeah cool
so design question… i’m thinking of building UI components which render server-side state. When the component is no longer visible in the client (scrolled out of view say) I want to release the server handle, any tricks hooks I could use in Hoplon?
just cells with the window range?
yep you can attach :scroll event handler to the element maybe and check if it's in view
i actually did this recently
then deleted the whole thing because i solved my problem a different way
a macro with dynamic vars could be a nice way to do this also if you might have different handlers that run in nested components
one thing though
do be careful of momentum scroll
like if some-component
and some-other-component
have the logic internally for what they do when they enter and leave the visible portion of the page
really i’d put the viewport top and bottom in a cell on scroll
whenever some-cell
changes to be truthy the page scrolls such that the element with :scroll-to
is at the top
if you can
then you can have a cell for the top and bottom of the element
and “is in viewport” just becomes a cell=
(cell= (if (and (< viewport-top element-top) (< element-bottom viewport-bottom)) true))
that would mean as soon as any part of the element leaves view, it’s “out of view"
you could juggle the bits to make it so the whole element has to be out of view first
but this stuff can be tricky
like, what if the layout changes
how do you know when element-top
changes?
unless you measure it on every scroll event
but then what if it’s just due to a resize?
what if your in-view ticker that received an update suddenly goes from spanning 5 lines to 3 lines and then the previously just-out-of-sight ticker is now visible?
i obviously don’t know what you’re working on, but i’m going to say it might be easier to get the server to send data for all tickers when it pushes than deal with scrolling behaviour directly
ooor, you could just have a looping timeout that keeps re-measuring your DOM positions every second
aight, i’m off
hello all. i am having a problem using boot. i did "lein new hoplon project-name" "cd project-name" and when i do "boot dev" i get Exception in thread "main" java.io.FileNotFoundException: https://github.com/boot-clj/boot/releases/download//boot.jar . any help please ? i think it used to work a few days ago.
(set-env! :dependencies '[[adzerk/boot-cljs ""] [adzerk/boot-reload ""] [hoplon/boot-hoplon "0.1.13"] [hoplon/hoplon "6.0.0-alpha13"] [org.clojure/clojure "1.7.0"] [org.clojure/clojurescript ""] [tailrecursion/boot-jetty "0.1.3"]] :source-paths #{"src"} :asset-paths #{"assets"}) (require '[adzerk.boot-cljs :refer [cljs]] '[adzerk.boot-reload :refer [reload]] '[hoplon.boot-hoplon :refer [hoplon prerender]] '[tailrecursion.boot-jetty :refer [serve]]) (deftask dev "Build frontend for local development." [] (comp (watch) (speak) (hoplon) (reload) (cljs) (serve :port 8000))) (deftask prod "Build frontend for production deployment." [] (comp (hoplon) (cljs :optimizations :advanced) (prerender)))
BOOT_CLOJURE_NAME=org.clojure/clojure BOOT_CLOJURE_VERSION=1.7.0 BOOT_VERSION=2.5.5 pc5:clojure Joues
then again, why not use boot to create the project instead of leiningen, if you are going to use it anyway?
I noticed some differences in your boot file, with the one leiningen generated for me: there are no version numbers for adzerk/boot-cljs
adzerk/boot-reload
org.clojure/clojurescript
mine looks like this:
:dependencies '[[adzerk/boot-cljs "1.7.228-1"]
[adzerk/boot-reload "0.4.7"]
[hoplon/boot-hoplon "0.1.13"]
[hoplon/hoplon "6.0.0-alpha13"]
[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.8.40"]
[tailrecursion/boot-jetty "0.1.3"]]
that's one of the things the template will do, is find the latest versions to put in the build.boot it generates
there are two problems, one is that the visibility is not correct the first time. so my cell is "false" but the div is visible. then I swap the cell, and the div remains visible but with some fading effect, then I swap again and not is fades to invisibility, as expected
second problem is my own I guess, it works in the simple case, but not in a complex case, and I can't see why 😡
I just figured out the second one, it's the same as the issue I just raised: when the cell state change comes within the dom subtree, it doesn't work
for my use case it would make sense to consider the initial state hidden, but it may not be everyone's case
not using the jQuery animations, or maybe wrapping them with some smarter logic, would fix this
the way lisp works is that when you apply a function to some arguments the arguments are evaluated first
when the div is applied as a function to the span the span is added as a child of the div
but the div itself isn't the child of anything until it is applied as an argument to some other element
we could set the "displat:none"
automatically, but then that would clobber your own settings, like if you had "display:table-cell"
or something on that element
you can modify the hoplon build.boot if you want to change the version number or something
god I hate html. I had a similar problem recently: had a div with some unusual css display property, then fading in and out ruined it