Fork me on GitHub

Hello simple_smile Does anyone have any experience with Re-Frame? I'm trying to learn it because I dig Reagent and think Re-Frame sounds like a neat way to structure a larger Reagent web-app. After having read some criticism of Angular becoming unwieldy when an app reaches a certain level of complexity, I'm wondering if there are any hidden drawbacks to Re-Frame's way of doing things. For example, I really like the prospect of a single source of truth (one atom that holds the frontend's in-memory "app-db) in respect to debugging, saving and recreating states and such, but I'm wondering if having a single source of truth means that there will be contention if you have many concurrent processes trying to reach the app-db. Not that I plan to do that, just wondering if there are drawbacks and that's the only possible example I could think of simple_smile


@reefersleep: I’ve just started using Re-frame myself, so I guess I’m not qualified to answer. You should head over to the #C073DKH9P channel and ask there


@reefersleep: Since (for now) javascript runs in a single threaded scenario you don't have to worry so much about contention. Also, when and if does I'm sure the other clojure reference idioms (agents, refs etc..) will be ported to clojurescript.


@hkjels cheers, I'll go there simple_smile


@bobby.harris: I'm actually not used to thinking about threading explicitly in applications, so I forgot to think of JavaScript that way.


@bobby.harris: what is the "when and if" you are referring to?


@hkjels: What's your experience like so far? simple_smile


Well, there is the web workers part of html 5. Not sure how well supported it is.


I've written one reagent app for internal use. I'm planning on porting it to re-framed, which shouldn't be too much effort. Best practice for reagent includes having a single source of truth atom.... which i'm using.


Is there a known issue regarding #js literals in go blocks? I'm getting a strange warning. Here's a minimal reproduction:


Removing the go block and raising the let to the top level results in no warnings


I should probably put that in the readme


@reefersleep: Re-frame is great. I’m pretty sure it scales quite well also. In the wiki, there’s a post about how you could layout a larger app.


btw. Sorry for the late answer


@hkjels: No problem simple_smile I'll have to have a look at that.


@bhagany: The known issue with go is that it is a macro that does a lot of magical rewriting of the code within the block. So you want to keep the code that is within the go block to the bare minimum, specifically to avoid weird errors, which might be the case here.


@bobby.harris: I've done a single reagent app so far using only one atom, which worked great. Now I'm trying out another app, where I've felt compelled to use 3 so far. I'm going to "port" it to re-frame, and I don't think it'll be a problem to switch to one atom... But we shall see simple_smile


what is the common name for a "web stack": like the libraries/technologies you use in every tier from front end to database. Web stack doesn't seem to cover it


sometimes they say: full stack developer and then a list of libraries follow that you're supposed to know. What is the common name of a collection of such libs/tech


end-to-end maybe? Dunno - I don’t think there is standard terminology for this is there?


@meow: I understand that go is complicated. Using #js in a go block seems like a pretty common case though. That reproduction is just a minimal case - the code that I'm actually interested in takes from a channel and does some js interop with the value it gets, so "take that out of the go block" doesn't work


To be clear, I can work around this with clj->js, which does work. I just want to know if I should expect #js not to work, or if this is a legit bug.


@bhagany: there’s lot of bugs like this in cljs.core.async due to it not using a standard analyzer and instead using a handrolled thing


there’s also already several issues open which are all basically the same thing


@dnolen: Okay, thanks. My googling turned up nothing.


@bhagany: you’ll want to look at JIRA. It’s probably worth opening an issue just so it’s verified when analysis is fixed. It’s unclear when that will be, the people that would normally work on it (like myself or Timothy Baldrige) are pretty tied up with other things.


definitely a place where someone could really do some significant contribution


@dnolen: Okay. I really should get in the habit of looking at JIRA. I'll search for dupes and file a ticket if I don't find any.


bhauman: Awesome Strange Loop talk! I’m loving devcards more and more. I’m looking forward to using it a lot more. I’ve been experimenting with it and it’s amazing how empowering the lab space is especially for new programmers; this idea that they can’t mess stuff up seems to be very powerful to help them feel confident enough to experiment


bhauman: tl;dr thank you ❤️


@bhagany: one alternative is to take your channel value and pass it to a function where you do the js interop stuff on it. The go macro won't mess with the code in a called function. So that becomes your safety zone, so to speak.


I've learned to keep go blocks minimal and shallow.


@meow: Yes, hardly seems worth it in this case though, when clj->js works


Not sure if shallow is the right word, but I think you know what I mean.


@bhagany: right, but for other cases - I've given that advice to others...


I think so. It's a 4-line go block as it is simple_smile


I guess I was assuming that your real use-case might be bigger and that you wanted to not have to use clj->js


nah, it's very small. I'm calling clj->js on a 3-pair map.


I’m trying to send FormData by using cljs-ajax as described in the README ( but I can’t figure out what I’m doing wrong! The request is never sent as a multipart/form-data. Anyone done this before?


@tskardal: I've tried it once, but then I discovered that the customer wanted to support IE9 also, so I just went for closure's iFrameIo and haven't really continued trying


@borkdude: thanks, I’ll have a look at that. I’m just messing around so IE support doesn’t matter


@dnolen: Is there a place where I could get more info on the core.async analyzer issue? I’m interested in taking a look at it, but couldn’t find that particular issue in JIRA.


@potetm: there isn’t anymore information than what I described. You will need to just read the core.async sources


@potetm: if you have more specific questions I would email Timothy Baldridge.


Cool. I can do that. simple_smile


Will do. Thanks.


@log thanks!! Really good to hear!


@borkdude: It's a stack, isn't it?


As "our stack is react, clojure and postgres" or something.


@potetm: Here's the core.async issue. It had already been filed:


Not a ton of info on the ticket, though


Also, I can confirm it's still an issue for recent versions of clojurescript and core.async