1 2013-08-26 19:00:13 vjeux testing the irc bot ircloggr-react
2 2013-08-26 19:01:05 vjeux http://vjeux.com:50169/#browse/irc.freenode.net/reactjs
3 2013-08-26 19:01:06 vjeux cool
4 2013-08-26 19:01:22 chenglou vjeux: =D!
5 2013-08-26 19:01:51 mg-work nice
6 2013-08-26 19:01:55 petehunt vjeux: yo, can you include something like prototype in there
7 2013-08-26 19:02:06 petehunt i want a bot that randomly throws out sassy comments
8 2013-08-26 19:02:17 chenglou lol
9 2013-08-26 19:02:39 mg-work it doesnt monitor the log and append updates! :(
10 2013-08-26 19:02:56 chenglou mg-work: it does
11 2013-08-26 19:03:02 chenglou mg-work: refresh
12 2013-08-26 19:03:06 mg-work perhaps it stalled
13 2013-08-26 19:03:18 mg-work doesnt work for me
14 2013-08-26 19:03:20 vjeux it does update for me
15 2013-08-26 19:03:34 mg-work 404 in js console
16 2013-08-26 19:03:39 mg-work ...nm thats an image
17 2013-08-26 19:03:49 vjeux Igot that 404 too
18 2013-08-26 19:04:09 petehunt vjeux: not feeling the lack of data-reactid attributes on your dom nodes :P
19 2013-08-26 19:04:10 chenglou same
20 2013-08-26 19:04:10 vjeux it's the github banner at the top right :p
21 2013-08-26 19:04:11 mg-work yeah its the top right image haha
22 2013-08-26 19:04:16 jwalke lyaunzbe: You can file a task to get levelup working.
23 2013-08-26 19:04:29 mg-work still, no live updates somehow
24 2013-08-26 19:04:29 jwalke lyaunzbe: (or a github issue)
25 2013-08-26 19:04:29 vjeux mg-work: yeah it doesn't seem to have live updates
26 2013-08-26 19:05:01 mg-work thats what I meant earlier, I guess I didnt use the right words
27 2013-08-26 19:05:02 vjeux ok, I need to launch it using forever and we should be good to go
28 2013-08-26 19:05:10 lyaunzbe jwalke: No problem, will do!
29 2013-08-26 19:05:14 mg-work otherwise its neat!
30 2013-08-26 19:05:16 vjeux https://github.com/lloyd/ircloggr
31 2013-08-26 19:05:16 vjeux I'm using this one
32 2013-08-26 19:05:17 vjeux if you know a better one, feel free to tell me :p
33 2013-08-26 19:06:18 jwalke petehunt: you just totally busted vjeux
34 2013-08-26 19:06:20 mg-work the one I had tried wasn't actually an out of the box logger, it was closer to the protocol, but just close enough as to not bother with protocol implementation
35 2013-08-26 19:06:21 mg-work basically it just emitted for every type of event, and you could call every type of action
36 2013-08-26 19:06:25 jwalke I guess we shouldn't fault vjeux for not rewriting an entire irc logger in react
37 2013-08-26 19:06:35 mg-work jwalke : indeed
38 2013-08-26 19:06:35 vjeux yeah, I just want something that logs and that's already built :p
39 2013-08-26 19:06:37 ammit How about using socket and React ?
40 2013-08-26 19:06:43 ammit for irclogger
41 2013-08-26 19:06:50 mg-work fork away!
42 2013-08-26 19:06:51 vjeux if you guys want to make one awesome logger using react, feel free :p
43 2013-08-26 19:07:16 jwalke yeah - that would be awesome.
44 2013-08-26 19:07:40 vjeux this one is in nodejs, so it's already in js :)
45 2013-08-26 19:09:18 vjeux mg-work: yeah the project i'm using has this as a dependency :)
46 2013-08-26 19:12:09 ammit lol :P
47 2013-08-26 19:15:11 jwalke I'm guessing you could simply render the irc log pretty easily in react and keep everything else using the existing backend
48 2013-08-26 19:15:23 ammit yeh,
49 2013-08-26 19:15:58 jwalke here's the UI part:
50 2013-08-26 19:15:58 jwalke https://github.com/lloyd/ircloggr/blob/master/static/js/main.js
51 2013-08-26 19:16:07 jwalke Could definitely stand to be reactified :)
52 2013-08-26 19:16:52 jwalke also - zpao is it appropriate that we require xcode for contextify? That just feels so wrong.
53 2013-08-26 19:17:24 jwalke ammit/zpao: We could detect if they have contextify installed - if so, use it - else run the server code in *UNSAFE* eval mode.
54 2013-08-26 19:17:50 jwalke ammit: Can you file an issue for that (and either you, me or someone can get around to doing that)?
55 2013-08-26 19:18:12 jwalke Everyone: Thanks a ton for all the help finding the little points of friction in react-page!
56 2013-08-26 19:18:25 jwalke Early adopters are much appreciated troopers for sure!
57 2013-08-26 19:18:41 ammit jwalke: yes, I'll
58 2013-08-26 19:19:27 jwalke vjeux: the logger up?
59 2013-08-26 19:19:48 vjeux jwalke
60 2013-08-26 19:19:49 vjeux yeah
61 2013-08-26 19:20:01 vjeux jwalke: forever is awesome
62 2013-08-26 19:20:01 vjeux http://blog.nodejitsu.com/keep-a-nodejs-server-up-with-forever
63 2013-08-26 19:20:24 lyaunzbe Np jwalke, reactapp and react-page have been super nice to work with so far
64 2013-08-26 19:20:28 mg-work jwalke : are there any plans to have the React backend push the packages (I think you called them?) through a socket or something?
65 2013-08-26 19:20:47 jwalke mg-work oh yeah.
66 2013-08-26 19:20:57 mg-work jwalke : that would be quite something :)
67 2013-08-26 19:21:08 mg-work yeah forever is really nice
68 2013-08-26 19:21:13 jwalke So petehunt and I were thinking - we can do *fine grained* react module reloading.
69 2013-08-26 19:21:22 petehunt jwalke: i have a project that does it actually
70 2013-08-26 19:21:36 jwalke mg-work: Imagine if you are editing a deep component - it should reload just that changed module
71 2013-08-26 19:21:36 petehunt it serializes the state of the app and reloads the code on demand :)
72 2013-08-26 19:21:40 jwalke and retain all the state everywhere else
73 2013-08-26 19:21:48 mg-work :D
74 2013-08-26 19:21:50 jwalke petehunt: but we need the module reloading part
75 2013-08-26 19:21:53 chenglou vjeux: https://news.ycombinator.com/item?id=5945420
76 2013-08-26 19:22:01 petehunt jwalke: just refresh the page
77 2013-08-26 19:22:16 petehunt if the whole state is serialized it will return to that state
78 2013-08-26 19:22:26 petehunt simple websocket push that says "reload the world"
79 2013-08-26 19:22:30 jwalke petehunt: are you talking about the freezer?
80 2013-08-26 19:22:34 petehunt ya
81 2013-08-26 19:22:40 petehunt i used it to implement this
82 2013-08-26 19:22:43 jwalke hmmm - there might be some edge cases around focus.
83 2013-08-26 19:22:47 vjeux chenglou: nice
84 2013-08-26 19:23:07 jwalke petehunt: But maybe it's good enough to create the Mother Of All Demos?
85 2013-08-26 19:23:29 petehunt jwalke: we need a week to do it i think, maybe with maykel
86 2013-08-26 19:23:54 petehunt i really want a hot code reloaded full-react 3d game that runs on mobile
87 2013-08-26 19:24:06 petehunt :P
88 2013-08-26 19:24:17 jwalke petehunt: So the statefreezer mixin - that should work no?
89 2013-08-26 19:24:22 jwalke If you include it by default
90 2013-08-26 19:24:27 jwalke monkey patch it on top of the base classes
91 2013-08-26 19:24:47 petehunt jwalke: i built it so you need to explicitly implement like getFreezableState() or smoething, but it could just as easily have a more aggressive default
92 2013-08-26 19:25:06 petehunt however -- this is the stuff i'm going to focus on this month i think
93 2013-08-26 19:26:15 jwalke mg-work: However we get there - the end result should be a demo where we have our editor on one side of the screen, an animating game (or 3d scene) on the other side of the screen, and as you type - the UI updates dynamically.
94 2013-08-26 19:26:29 vjeux react: I need some eyes for the new community post: http://fooo.fr:4000/react/blog/2013/08/26/community-roundup-7.html
95 2013-08-26 19:26:31 jwalke If you change the physics of some scene or character, it automatically adjusts
96 2013-08-26 19:26:40 mg-work jwalke : like Brent Victor's "Inventing on principle" demo?
97 2013-08-26 19:27:02 jwalke A lot like that - but it's not *just* a demo.
98 2013-08-26 19:27:08 jwalke It's a *real* way to build apps.
99 2013-08-26 19:27:12 jwalke like - every day.
100 2013-08-26 19:27:16 mg-work :>
101 2013-08-26 19:27:23 petehunt jwalke: probably the coolest thing would be a pure-react instagram clone
102 2013-08-26 19:27:42 jwalke I know a guy who built the Instagram site. I can hook you up.
103 2013-08-26 19:27:50 jwalke :)
104 2013-08-26 19:27:52 petehunt cloning that instagram main feed in the browser == hardest problem in in frontend web dev today, imo
105 2013-08-26 19:28:00 jwalke mobile?
106 2013-08-26 19:28:02 jwalke or desktop?
107 2013-08-26 19:28:03 petehunt es
108 2013-08-26 19:28:06 petehunt mobile
109 2013-08-26 19:28:13 petehunt desktop is super easy
110 2013-08-26 19:31:03 chenglou vjeux: looking good
111 2013-08-26 19:31:54 petehunt jwalke: i think i am gonna open source the zynga scroller, rAF queue, image decoding and IO daemon stuff
112 2013-08-26 19:32:06 vjeux petehunt: like-stamp
113 2013-08-26 19:32:29 petehunt let's just agree on a way to package static assets in commonjs
114 2013-08-26 19:32:34 petehunt and then we can run with it
115 2013-08-26 19:32:38 chenglou petehunt: so you DO have treasures hidden
116 2013-08-26 19:32:48 petehunt chenglou: those aren't instagram!
117 2013-08-26 19:32:52 chenglou hold on lemme open source my Facebook clone done entirely in React
118 2013-08-26 19:33:02 petehunt chenglou: it's like react-animations, but way more hardcore
119 2013-08-26 19:33:18 chenglou gosh so much to try in so little time
120 2013-08-26 19:33:50 vjeux chenglou: we have something under our belt that looks like what you are describing, but even more awesome :p
121 2013-08-26 19:34:18 chenglou vjeux: for Facebook?
122 2013-08-26 19:34:23 vjeux yeah
123 2013-08-26 19:34:52 chenglou vjeux: my dream would be for Facebook _mobile_ to be entirely made of react, and then one day when the performance gets good enough you guys just creep up and swap it out
124 2013-08-26 19:35:05 chenglou bam, infinite PR
125 2013-08-26 19:35:08 vjeux :)
126 2013-08-26 19:35:21 balpert at Khan Academy our CS environment allows live code changes like the Bret Victor demo: https://www.khanacademy.org/cs/super-spiral/823021393
127 2013-08-26 19:35:49 balpert try changing a number by clicking and dragging the slider
128 2013-08-26 19:36:14 chenglou balpert: holy that's cool
129 2013-08-26 19:37:13 mg-work yeah I actually said Brent earlier... my bad
130 2013-08-26 19:37:30 balpert chenglou: :)
131 2013-08-26 19:37:35 mg-work did you know that demo was shot in Montreal? :)
132 2013-08-26 19:37:38 balpert mostly a John Resig production
133 2013-08-26 19:37:52 chenglou balpert: how's it like working with him?
134 2013-08-26 19:38:03 jwalke love it!
135 2013-08-26 19:38:06 jwalke great demo
136 2013-08-26 19:38:15 jwalke I want that for my regular day-to-day programming
137 2013-08-26 19:39:26 vjeux jwalke: https://github.com/facebook/react-page/issues/5
138 2013-08-26 19:39:36 jwalke vjeux: Yes I saw that.
139 2013-08-26 19:39:38 jwalke thanks
140 2013-08-26 19:47:38 mg-work I wish {condition ? result} would be valid
141 2013-08-26 19:49:13 vjeux mg-work: {condition && result} is
142 2013-08-26 19:49:17 chenglou mg-work:
143 2013-08-26 19:49:32 chenglou yeah what vjeux said lol
144 2013-08-26 19:49:36 mg-work TIL
145 2013-08-26 19:49:43 mg-work it makes sense
146 2013-08-26 19:49:49 mg-work thanks
147 2013-08-26 20:12:47 zpao vjeux: but then you have "false"
148 2013-08-26 20:12:49 vjeux zpao: don't we have a special case to not show anything when we return false?
149 2013-08-26 20:12:52 zpao "return"?
150 2013-08-26 20:13:02 zpao i guess it depends on where {false} is
151 2013-08-26 20:13:05 vjeux zpao: http://jsfiddle.net/vjeux/8jMmQ/
152 2013-08-26 20:13:06 vjeux only 0 is being used, false and null are discarded
153 2013-08-26 20:13:08 mg-work don't you always want to show something for either true or false? else why would you put it there?
154 2013-08-26 20:13:10 zpao mg-work: http://jsfiddle.net/zpao/pMAas/
155 2013-08-26 20:13:11 zpao err, vjeux^^
156 2013-08-26 20:13:13 chenglou function c(cond, exp) {return cond ? exp : ''}
157 2013-08-26 20:13:49 chenglou there you go, c(condition, result)
158 2013-08-26 20:13:49 chenglou lol
159 2013-08-26 20:13:50 mg-work argg
160 2013-08-26 20:13:50 vjeux zpao: I see
161 2013-08-26 21:01:30 mg-work any of you uses a pretty way to escape multi-line js without using escaping?
162 2013-08-26 21:01:45 balpert mg-work: what do you mean?
163 2013-08-26 21:02:19 zpao mg-work: no, just line up quotes :/
164 2013-08-26 21:02:24 zpao balpert: i think he mean multiline strings
165 2013-08-26 21:02:31 mg-work yeah sorry
166 2013-08-26 21:02:38 balpert ah
167 2013-08-26 21:02:43 balpert you can do backslash continuations right?
168 2013-08-26 21:02:48 mg-work yeah, except that
169 2013-08-26 21:02:51 mg-work its ugly..
170 2013-08-26 21:02:53 balpert yes
171 2013-08-26 21:03:10 mg-work there's that, but its super hacky: http://tomasz.janczuk.org/2013/05/multi-line-strings-in-javascript-and.html
172 2013-08-26 21:03:18 mg-work also, its not actually a comment
173 2013-08-26 21:03:21 balpert ew, yes
174 2013-08-26 21:03:42 chenglou mg-work: use +
175 2013-08-26 21:04:06 chenglou oh never mind
176 2013-08-26 21:04:09 chenglou misread
177 2013-08-26 21:04:16 mg-work chenglou : + would be as cumbersome as \\ anyway
178 2013-08-26 21:04:25 mg-work I was just wondering if there was any other way
179 2013-08-26 21:04:27 chenglou yeah sorry, though you wanted something else
180 2013-08-26 21:04:45 chenglou you could… go to coffeescript's page, write the string then copy paste the result lol
181 2013-08-26 21:04:45 mg-work im in node, perhaps there is a util
182 2013-08-26 21:04:55 chenglou jk
183 2013-08-26 21:05:14 zpao vjeux: do you have a screenshot of what that looks like? i'll get it out with the same site update
184 2013-08-26 21:05:36 vjeux zpao: let me switch back to that branch
185 2013-08-26 21:05:56 mg-work apparently es6 will allow backticks to make multi-line strings: yipee!
186 2013-08-26 21:06:14 vjeux zpao: http://fooo.fr:4000/react/blog/2013/08/26/community-roundup-7.html
187 2013-08-26 21:06:34 zpao mg-work: one day in the future your problem will be solved... the perpertual problem of JS
188 2013-08-26 21:06:55 mg-work zpao : hehe
189 2013-08-26 21:07:05 zpao vjeux: no, the tooling update
190 2013-08-26 21:07:08 vjeux oh
191 2013-08-26 21:07:18 mg-work pretty funny: http://stackoverflow.com/questions/805107/creating-multiline-strings-in-javascript all more hacky than the other
192 2013-08-26 21:07:24 vjeux http://fooo.fr:4000/react/docs/tooling-integration.html
193 2013-08-26 21:07:27 vjeux zpao
194 2013-08-26 21:07:44 balpert vjeux: for the blog post, nit: GitHub not Github
195 2013-08-26 21:07:49 petehunt jwalke__: any reason why we don't let mixins have state other than the fact that it would take work to implement?
196 2013-08-26 21:07:55 balpert also all three of those things are FB people ;)
197 2013-08-26 21:08:31 vjeux balpert: well, they are outside of their day job :p
198 2013-08-26 21:08:37 zpao petehunt: i think they should have state (or rather, they should be able to mixin to the rest of this.state just like they can access it)
199 2013-08-26 21:08:43 zpao (and ditto for props)
200 2013-08-26 21:08:45 vjeux balpert: so technically it's still community stuff :p
201 2013-08-26 21:09:23 andreypopp I thought of Mixin.getInitialState — that would be cool
202 2013-08-26 21:09:47 andreypopp also defining event handlers (we already have an issue on gh)
203 2013-08-26 21:09:55 petehunt zpao: i think the best interface would probably for them to have their own isolated state
204 2013-08-26 21:10:06 petehunt but i'm not sure how we'd implement that
205 2013-08-26 21:10:08 petehunt (in an efficient way)
206 2013-08-26 21:10:24 zpao andreypopp: i havent tested, but *if* the mixin defines getInitialState but the component doesn't... what happens?
207 2013-08-26 21:11:02 zpao i know what happens with getDefaultProps but i don't like to talk about the problems we introduce there
208 2013-08-26 21:11:12 zpao ACTION should file an issue on GH in case anybody wants to fix it
209 2013-08-26 21:11:37 vjeux zpao: ok, just installed a chrome extension that lets me capture screenshot of the page
210 2013-08-26 21:11:41 andreypopp zpao: don't know, I want getInitialState from several mixing to be merged
211 2013-08-26 21:11:49 vjeux going to add screenshots from now on :)
212 2013-08-26 21:11:50 zpao vjeux: open firefox dev console, type screenshot
213 2013-08-26 21:12:15 balpert [14:12:19.663] ReferenceError: screenshot is not defined
214 2013-08-26 21:12:32 zpao *developer toolbar
215 2013-08-26 21:13:05 balpert zpao: oh, how do you get to that?
216 2013-08-26 21:13:05 zpao and you actually want screenshot --fullpage
217 2013-08-26 21:13:05 balpert never mind, found it
218 2013-08-26 21:13:14 balpert that is so fancy
219 2013-08-26 21:13:53 zpao yea, it's really nice. i wish i had more uses for it besides taking screenshots (but it's good at that so... worth it)
220 2013-08-26 21:14:05 vjeux https://chrome.google.com/webstore/detail/screen-capture-by-google/cpngackimfmofbokmjmljamhdncknpmg
221 2013-08-26 21:14:06 vjeux for chrome
222 2013-08-26 21:14:09 balpert I normally use http://derailer.org/paparazzi/
223 2013-08-26 21:15:05 balpert sometimes also https://github.com/paulhammond/webkit2png)
224 2013-08-26 21:15:22 zpao balpert: screenshots from 10.3 o_O i guess if it works it works.
225 2013-08-26 21:15:50 balpert zpao: indeed. still works great though!
226 2013-08-26 21:17:01 zpao i bet you could wrap phantom in something pretty easily too
227 2013-08-26 21:17:18 balpert oh yeah! that too.
228 2013-08-26 21:17:18 balpert https://github.com/ariya/phantomjs/wiki/Screen-Capture
229 2013-08-26 21:17:24 balpert its font rendering is worse in my experience though
230 2013-08-26 21:18:35 zpao oh neat
231 2013-08-26 21:18:49 petehunt webdriver has screenshot functionality also, no idea how it works though
232 2013-08-26 21:19:23 zpao tl;dr: it's a solved problem many times over
233 2013-08-26 21:35:17 petehunt alright, time to shave this yak
234 2013-08-26 21:36:55 petehunt zpao: how about i fix propTypes too?
235 2013-08-26 21:37:38 zpao petehunt: oh that's actually what i meant was broken. i haven't actually even looked at getDefaultProps
236 2013-08-26 21:37:47 petehunt zpao: they're marked as DEFINE_ONCE
237 2013-08-26 21:39:55 ammit how to get `
` in React ?
238 2013-08-26 21:40:25 zpao ammit: should just work
239 2013-08-26 21:43:07 zpao ammit: http://jsfiddle.net/zpao/B24s4/3/ is working for me
240 2013-08-26 21:44:13 ammit Ok then, How to create
241 2013-08-26 21:45:32 zpao we don't support charset right now... should probably add that with content in https://github.com/facebook/react/pull/293
242 2013-08-26 21:45:44 balpert weren't we getting an awesome new React website sometime?
243 2013-08-26 21:45:48 balpert what happened to that?
244 2013-08-26 21:45:53 zpao sometime
245 2013-08-26 21:45:58 zpao react-page happened because of it
246 2013-08-26 21:47:44 petehunt i <3 electric blue
247 2013-08-26 21:49:47 balpert so as someone who has not made any effort to try react-page, I am still not sure what it is
248 2013-08-26 21:49:53 balpert is it like a jekyll competitor?
249 2013-08-26 21:50:00 balpert does it interface with databases?
250 2013-08-26 21:50:09 zpao it's react front-to-back
251 2013-08-26 21:50:22 zpao you can use it for dynamic pages
252 2013-08-26 21:50:37 petehunt balpert: no dbs
253 2013-08-26 21:50:38 zpao ACTION also hasn't tried it
254 2013-08-26 21:50:50 zpao petehunt: is there anythign actually stopping that from happening?
255 2013-08-26 21:51:03 balpert I am mostly commenting that the readme does a bad job of explaining this :)
256 2013-08-26 21:51:10 petehunt zpao: other than the fact that it is a ginormous can of worms? not really, you can use whatever you want
257 2013-08-26 21:51:34 zpao balpert: heh. jwalke is your man about that. it's mostly his
258 2013-08-26 21:51:49 chenglou balpert: jwalke is still working on the readme, the one for react-page-middleware too
259 2013-08-26 21:51:53 zpao it's pretty experimental at this point
260 2013-08-26 21:52:02 balpert ACTION nods
261 2013-08-26 21:52:10 petehunt balpert: did you see my commonjs asset spec?
262 2013-08-26 21:52:17 petehunt figured it would be up your alley
263 2013-08-26 21:52:19 balpert petehunt: I skimmed it
264 2013-08-26 21:52:49 balpert everything seemed to make sense
265 2013-08-26 21:53:12 petehunt would you use it at khan? or is it too commonjs-y
266 2013-08-26 21:53:51 balpert perhaps
267 2013-08-26 21:53:57 balpert I need to get our JS packaging sorted out first
268 2013-08-26 21:54:53 balpert probably going to write my own packager with commonjs syntax
269 2013-08-26 21:55:00 balpert just so we can more easily transition from what we have now
270 2013-08-26 21:55:09 balpert though I agree that there are too many JS packaging things :(
271 2013-08-26 21:55:34 petehunt balpert: sadly that is what i did too
272 2013-08-26 21:55:37 jwalke balpert: react-page is an effort to solve that exact problem
273 2013-08-26 21:55:47 jwalke + fast development
274 2013-08-26 21:55:51 balpert jwalke: sorry, which exact problem?
275 2013-08-26 21:56:09 jwalke So my observation was that a lot of people build packaging/jsx transforming/commonJS-browser-modules and the tooling is all very slow.
276 2013-08-26 21:56:20 zpao balpert: coughcough node-haste coughcough
277 2013-08-26 21:56:26 jwalke And we don't have anything that exists today that you can just "npm install" and have a fully working development environment.
278 2013-08-26 21:56:32 balpert zpao: I was looking at it...
279 2013-08-26 21:56:44 jwalke zpao: The only difference is that as far as I can tell, node-haste is fast
280 2013-08-26 21:57:03 jwalke and understands all the facebook-isms
281 2013-08-26 21:57:13 petehunt i wish we could kill @providesModule :/
282 2013-08-26 21:57:14 zpao jwalke: does it understand our css?
283 2013-08-26 21:57:21 balpert node-haste is also badly documented but I decided that was because you weren't planning on advertising it by itself
284 2013-08-26 21:57:34 zpao balpert: right. at least for now
285 2013-08-26 21:59:09 jwalke balpert: We're not suggesting people use it currently.
286 2013-08-26 21:59:13 jwalke right.
287 2013-08-26 21:59:16 balpert cool
288 2013-08-26 22:00:35 jwalke balpert: You should try react-page and tell me what you think I should put for the readme. But at the end of the day, I noticed we had nothing that actually lets you use React for real projects (that means commonJS, JSX).
289 2013-08-26 22:00:37 jwalke So I built this thing and then took some opinionated liberties to do some novel features - new ways to build real apps: like full page rendering, and server rendering.
290 2013-08-26 22:00:38 balpert jwalke: planning on trying it out as soon as I have time
291 2013-08-26 22:00:41 balpert and as soon as I figure out what it is ;)
292 2013-08-26 22:00:50 jwalke And by "nothing that actually lets you use React for real projects
293 2013-08-26 22:01:02 jwalke " I mean nothing that works fast.
294 2013-08-26 22:01:40 jwalke This serves your page in about 30ms and you never need to wait for a watcher - it builds on the fly and is always up to date - 0% chance of getting served a stale page.
295 2013-08-26 22:01:50 jwalke Someone should let me know how to describe this thing in the README :)
296 2013-08-26 22:02:17 jwalke The truth is: It's everything I wanted in a toolchain to develop and render React applications.
297 2013-08-26 22:02:27 jwalke It the things that I personally need to be productive and satisfied :)
298 2013-08-26 22:02:37 jwalke But that really makes for a horrible README title! :P
299 2013-08-26 22:03:18 balpert still haven't figured out -- can I talk to a db using it?
300 2013-08-26 22:05:48 balpert I've been encouraged not to do dependency graph traversal in a packager as it makes it too easy to make large packages accidentally
301 2013-08-26 22:06:10 petehunt balpert: whats the alternative
302 2013-08-26 22:06:20 balpert petehunt: including everything in a list
303 2013-08-26 22:06:39 petehunt balpert: you could whitelist dependency traversal
304 2013-08-26 22:06:57 petehunt the IG packager i made lets you do ['path/to/whatever', 'glob:path/to/*', 'deps:path/to/whatever']
305 2013-08-26 22:07:08 jwalke balpert: I had a whitelist
306 2013-08-26 22:07:11 jwalke then I removed it.
307 2013-08-26 22:07:17 jwalke because it was confusing people.
308 2013-08-26 22:07:33 jwalke So I log timing metrics and packaging metrics when you run the page
309 2013-08-26 22:07:34 petehunt what you really want is like a genetic algorithm to package your jonx
310 2013-08-26 22:07:40 jwalke it prints out colored graphs telling you when you've gone red
311 2013-08-26 22:07:56 jwalke balpert: Currently, you could connect to a DB
312 2013-08-26 22:08:03 jwalke though I'm not advertising support for that.
313 2013-08-26 22:08:05 balpert petehunt: I hear some people do that...
314 2013-08-26 22:08:32 balpert jwalke: so most websites using this are static from the server's perspective
315 2013-08-26 22:08:45 balpert jwalke: which means that the wget thing is very reasonable
316 2013-08-26 22:09:49 petehunt jwalke: would be pretty cool to figure out how to do state transitions on the server.
317 2013-08-26 22:09:58 petehunt so i could do data fetching
318 2013-08-26 22:09:59 jwalke balpert: Currently - that's how I'm using it. But you could use a db - and then realize at that point wget doesn't make sense.
319 2013-08-26 22:10:52 petehunt jwalke: can you though? i don't think you can do server-rendered markup with this today.
320 2013-08-26 22:11:00 petehunt you'd have to do your fetching outside of react.
321 2013-08-26 22:11:01 jwalke petehunt: What do you mean?
322 2013-08-26 22:11:17 petehunt jwalke: we don't know how to init a component, do a transition, and get static html out
323 2013-08-26 22:11:24 jwalke petehunt: Technically, you can customize the router
324 2013-08-26 22:11:35 petehunt jwalke: right, thats what youd have to do, pass the data fetch in as props
325 2013-08-26 22:11:40 jwalke So your router can do all the fetching it needs - then when it's done pass those off as additional props
326 2013-08-26 22:11:41 petehunt not the end of the world but not exactly intuitive
327 2013-08-26 22:12:13 jwalke petehunt: Yes, it's not the incremental data fetching grand solution - but react-page is meant to be a place for you to *prototype* that grand solution rapidly.
328 2013-08-26 22:12:13 jwalke :)
329 2013-08-26 22:12:16 lyaunzbe Or, you can have no routes, single page, and fetch what you need from the components on the client
330 2013-08-26 22:12:26 jwalke lyaunzbe: Yes you can do that too.
331 2013-08-26 22:12:35 jwalke But at the same time get that first rendering done on the server
332 2013-08-26 22:12:41 jwalke before you've fetched any data
333 2013-08-26 22:12:46 jwalke so the "chrome" of your site loads very fast
334 2013-08-26 22:13:00 jwalke without any content - but that chrome fast loading is critical to a website's perceived speed.
335 2013-08-26 22:13:39 petehunt jwalke: wait is someone prototyping the grand data fetchign solution? :P
336 2013-08-26 22:13:52 jwalke I don't know - you tell me :P
337 2013-08-26 22:14:27 petehunt jwalke: trying to finish up my outstanding diffs first :)
338 2013-08-26 22:14:41 petehunt oh speaking of
339 2013-08-26 22:19:17 balpert so, I can almost guarantee that someone will shoot me for this suggestion
340 2013-08-26 22:19:32 balpert but the many try/catch/finally blocks are frustrating in Chrome
341 2013-08-26 22:19:44 balpert and we could do try/finally everywhere except that IE8 doesn't like it
342 2013-08-26 22:20:07 balpert so we can use JScript conditional compilation to add it in IE8 only, riight?
343 2013-08-26 22:23:35 jwalke balpert: That's a good thought - but we might need a utility like tryFinally(f1, f2) anyways - as try/catch ends up doing horrible things to even modern VMs.
344 2013-08-26 22:24:09 petehunt lol we were just talking about that
345 2013-08-26 22:24:12 balpert if we extract it out to a util then we can just branch in normal JS which seems much more reasonable
346 2013-08-26 22:24:22 balpert I don't know if the function-call overhead is noticeable
347 2013-08-26 22:30:36 balpert now I'm confused
348 2013-08-26 22:30:44 balpert I'm testing in IE8 and it seems to like try/finally just fine
349 2013-08-26 22:34:29 zpao real ie8 or ie9/10/11 with ie8 compat?
350 2013-08-26 22:37:32 balpert I tried both
351 2013-08-26 22:55:53 balpert zpao: hmm, I think of charset as one word
352 2013-08-26 22:56:03 zpao balpert: i knoooooooowwwww
353 2013-08-26 22:56:06 zpao i was torn
354 2013-08-26 22:56:49 balpert well if there is a vote, I vote for lowercase charset
355 2013-08-26 22:57:24 zpao i also think of autocomplete as 1 word (autofocus, autoplay)
356 2013-08-26 22:57:40 zpao ditto for spellcheck
357 2013-08-26 22:57:45 balpert me too but I can at least imagine that it's one
358 2013-08-26 22:57:48 balpert charset, less so
359 2013-08-26 22:57:51 balpert s/one/two
360 2013-08-26 22:58:35 jwalke zpao: you rock
361 2013-08-26 22:58:47 jwalke So irritating that content= wasn't supported in react-page :)
362 2013-08-26 22:59:11 zpao i wouldn't have know if jkassens hadn't filed it :)
363 2013-08-26 23:49:53 chenglou alright! let's see what I missed
364 2013-08-26 23:52:01 chenglou jwalke: saw your comment about readme in the brand new irc log ™
365 2013-08-26 23:52:21 chenglou if you want, I can write a readme (after I use react-page correctly that is)
366 2013-08-26 23:52:22 vjeux the log is godlike :p
367 2013-08-26 23:54:09 balpert wait, where is the log?
368 2013-08-26 23:54:46 vjeux balpert: look at the title of the irc
369 2013-08-26 23:54:52 vjeux | http://vjeux.com:8001/ for IRC Logs
370 2013-08-26 23:54:55 balpert ah, I see
371 2013-08-26 23:55:05 balpert sweet
372 2013-08-26 23:55:13 balpert I went to http://irclog.gr/#browse/irc.freenode.net/reactjs but that was unhelpful
373 2013-08-26 23:55:48 vjeux the ui is not optimal but it gets the job done :p
374 2013-08-26 23:59:27 jwalke vjeux: are you the only source of irc logs?
375 2013-08-26 23:59:33 vjeux jwalke: i'm not really sure by what you mean by that :p
376 2013-08-26 23:59:35 jwalke are they logged anywhere else besides yours?
377 2013-08-26 23:59:36 mg-work vjeux : only you is allowed to talk in here! :P
378 2013-08-26 23:59:37 vjeux jwalke: nop, the bot is ran by my server and only logs to my database
379 2013-08-26 23:59:42 vjeux ircloggr-react: <---
380 2013-08-26 23:59:58 chenglou oh silly funny robot
381 2013-08-27 00:00:00 vjeux omg it can talk!
382 2013-08-27 00:00:17 jwalke ircloggr-react: talk about vjeux
383 2013-08-27 00:00:22 jwalke :(
384 2013-08-27 00:00:28 zpao it's not prototype
385 2013-08-27 00:00:41 chenglou hey ircloggr-react, what is the best javascript framework of all time?
386 2013-08-27 00:01:07 chenglou lol
387 2013-08-27 00:01:16 zpao i was going to use hubot and build something that logged and then build a react front end for it
388 2013-08-27 00:01:47 zpao and then it would be pretty easy to plug in other commands (and there are already a lot of scripts for it)
389 2013-08-27 00:03:07 jwalke chenglou: I guess it has no comment? :)
390 2013-08-27 00:03:33 chenglou was probably too obvious so it didn't bother to answer
391 2013-08-27 00:03:49 petehunt jwalke: hey i'm having an issue with react-page, i just opened an issue
392 2013-08-27 00:04:20 petehunt jwalke: i ran jsx transform on my code manually and it all worked.
393 2013-08-27 00:18:21 vjeux I'm looking for demos to put on the website that show what you can do with react. Right now I have in mind. * Instagram website, * The formula editor of Khan Academy, * Wolfenstein demo, * fb ads charts (once ART is open sourced)
394 2013-08-27 00:18:26 vjeux do you have other ideas?
395 2013-08-27 00:19:40 balpert mm, ART
396 2013-08-27 00:20:12 balpert vjeux: like the backbone examples thing?
397 2013-08-27 00:22:29 vjeux balpert: http://fooo.fr/~vjeux/fb/art.png
398 2013-08-27 00:22:39 vjeux those charts are done in react
399 2013-08-27 00:22:43 balpert I know
400 2013-08-27 00:22:48 balpert I've been bugging sebmarkbage to open-source the bindings
401 2013-08-27 00:22:52 vjeux :)
402 2013-08-27 00:22:54 balpert ART itself is open source already
403 2013-08-27 00:22:59 vjeux yeah
404 2013-08-27 00:23:37 vjeux what I'm looking for is non trivial real world usage of react
405 2013-08-27 00:23:51 vjeux to show what you can build with react
406 2013-08-27 00:24:05 vjeux I don't really care if there isn't any source code available
407 2013-08-27 00:24:20 vjeux I want to give some inspiration
408 2013-08-27 00:24:36 balpert so, like the backbone examples thing then
409 2013-08-27 00:25:09 vjeux balpert: link?
410 2013-08-27 00:25:10 mg-work vjeux : I would have been really close to have something
411 2013-08-27 00:25:18 balpert http://backbonejs.org/#examples
412 2013-08-27 00:26:10 vjeux balpert: yeah! something like this, thanks for the link
413 2013-08-27 00:26:12 balpert np
414 2013-08-27 00:26:20 vjeux mg-work: what are you working on? :)
415 2013-08-27 00:28:06 mg-work vjeux: live auctioning system in an embeddable widget, it's coming along pretty nicely actually!
416 2013-08-27 00:28:29 vjeux mg-work: auctioning for what?
417 2013-08-27 00:28:46 mg-work vjeux : in general!
418 2013-08-27 00:29:14 vjeux mg-work: is there a website yet?
419 2013-08-27 00:29:17 vjeux for that?
420 2013-08-27 00:29:19 vjeux I'm curious
421 2013-08-27 00:30:00 chenglou vjeux smells potential community round-up material? =)
422 2013-08-27 00:31:18 vjeux yeah always :)
423 2013-08-27 00:47:09 balpert vjeux: this is not super exciting, but here's another KA thing using React -- if you go to https://www.khanacademy.org/coach/demo and click Access Demo
424 2013-08-27 00:47:19 balpert then the By Student report on the left is all React
425 2013-08-27 00:47:34 balpert note how the table rows load incrementally
426 2013-08-27 00:48:18 balpert and you can sort the table
427 2013-08-27 00:48:54 balpert and you can change the date range
428 2013-08-27 00:49:00 balpert and then you can filter for certain topics or exercises
429 2013-08-27 00:49:12 vjeux balpert: this is sweet
430 2013-08-27 00:49:17 mg-work balpert : good runner-up! :P
431 2013-08-27 00:49:48 mg-work TIL: KH loves Bens
432 2013-08-27 00:49:51 vjeux balpert: go make a 3min video about it :)
433 2013-08-27 00:50:02 balpert vjeux: about what?
434 2013-08-27 00:50:14 balpert mg-work: mm?
435 2013-08-27 00:50:24 chenglou vjeux: did you see that post on groups, workflowy is considering using react!
436 2013-08-27 00:50:31 chenglou vjeux: PR PR pR
437 2013-08-27 00:50:35 chenglou P*8
438 2013-08-27 00:50:37 mg-work balpert : I see 4 bens in that table, two I know are KH employees, I just assumed for the rest..
439 2013-08-27 00:50:37 chenglou P*
440 2013-08-27 00:50:42 balpert ah yes
441 2013-08-27 00:50:45 vjeux balpert: showing the student reports, animation when it expands, instant filtering
442 2013-08-27 00:50:58 mg-work balpert : runner-up was referring to your score in the same table
443 2013-08-27 00:51:20 balpert mg-work: you'll note I have more proficiencies
444 2013-08-27 00:51:21 mg-work KH... KA*
445 2013-08-27 00:51:35 vjeux chenglou: link? Can't see it
446 2013-08-27 00:51:48 balpert vjeux: sorry, which animation?
447 2013-08-27 00:51:50 vjeux https://groups.google.com/forum/#!searchin/reactjs/workflowy/reactjs/e3bYersyd64/56m-cwwuP_YJ
448 2013-08-27 00:51:52 balpert maybe I'm just being dense
449 2013-08-27 00:51:52 vjeux oh this one
450 2013-08-27 00:52:07 vjeux balpert: when you click on the stack of numbers
451 2013-08-27 00:52:15 chenglou vjeux: yup
452 2013-08-27 00:54:11 balpert vjeux: oh! you missed a crucial part of my instructions
453 2013-08-27 00:54:15 balpert click on "By Student"
454 2013-08-27 00:54:26 balpert the "By Exercise" report is also React now but has a tiny bit of jQuery
455 2013-08-27 00:54:56 vjeux balpert: oh sweet :)
456 2013-08-27 00:55:03 vjeux well, that works too!
457 2013-08-27 00:55:07 vjeux screencast both of them!
458 2013-08-27 01:42:25 balpert chenglou: any reason you closed https://github.com/facebook/react/issues/174?
459 2013-08-27 01:44:24 chenglou balpert: oh damn, I thought your commit got merged, sorry reopening
460 2013-08-27 01:44:35 balpert np, just wanted to check
461 2013-08-27 02:34:43 jwalke balpert: Not digging the fact that those functions touch the DOM even if they don't need to
462 2013-08-27 02:35:07 jwalke But I guess I'd say the same thing about componentDidMount too.
463 2013-08-27 02:36:11 chenglou jwalke: then why not just, not pass any. I opened the issue but I'm fine with both
464 2013-08-27 02:36:27 chenglou one less thing to remember. Not as if it was a super duper shortcut or anything
465 2013-08-27 02:36:33 jwalke we already have a bunch of people relying on it
466 2013-08-27 02:36:39 chenglou including me lol
467 2013-08-27 02:36:44 chenglou alright then
468 2013-08-27 02:36:51 jwalke me too - I don't think we're going to get to remove it unless there's a resounding consensus.
469 2013-08-27 02:39:10 balpert jwalke: yeah, that's one of the reasons I mentioned removing them
470 2013-08-27 02:39:18 jwalke did you mention that?
471 2013-08-27 02:39:23 jwalke must have missed the discussion
472 2013-08-27 02:39:50 jwalke Oh I see
473 2013-08-27 02:44:28 jwalke g2g replied on the issue
474 2013-08-27 03:20:08 balpert jwalke: React isn't 1.0 yet so it's okay to make breaking changes, right? :)
475 2013-08-27 03:21:27 jwalke balpert: I suppose so.
476 2013-08-27 03:21:42 jwalke We need to give people the command line scripts that codemode existing code bases when possible.
477 2013-08-27 03:22:10 balpert ACTION nods
478 2013-08-27 03:30:10 petehunt jwalke: another request: would be cool to be able to require('elements/whatever') rather than have to do relative paths everywhere in react-page
479 2013-08-27 03:30:29 jwalke petehunt: I believe that is not commonJS compliant
480 2013-08-27 03:30:32 jwalke I really want that too
481 2013-08-27 03:30:41 petehunt jwalke: if you auto install it to node_modules it is
482 2013-08-27 03:30:43 jwalke why *can't* a commonJS module require itself, or other resources in it.
483 2013-08-27 03:30:51 jwalke "auto install"?
484 2013-08-27 03:30:55 petehunt jwalke: i believe that's what `npm develop` does
485 2013-08-27 03:31:46 jwalke petehunt: I've never heard of that.
486 2013-08-27 03:32:03 petehunt er
487 2013-08-27 03:32:07 petehunt jwalke: `npm link`
488 2013-08-27 03:32:13 petehunt jwalke: in python it's setup.py develop :P
489 2013-08-27 03:32:32 jwalke but how can it require its own internals?
490 2013-08-27 03:32:36 jwalke npm link myself?
491 2013-08-27 03:33:58 petehunt jwalke: yes
492 2013-08-27 03:34:05 petehunt i think if you npm link the app it would work
493 2013-08-27 03:34:16 jwalke But how can you make it so no one has to link?
494 2013-08-27 03:34:17 petehunt jwalke: also i totally suck at the node toolchain soooo… :/
495 2013-08-27 03:34:28 jwalke npm link is a development thing
496 2013-08-27 03:34:28 petehunt jwalke: one second, let me try something.
497 2013-08-27 03:34:43 petehunt jwalke: shouldnt we think of the app as just another npm package?
498 2013-08-27 03:34:56 jwalke petehunt: that's what react-page is
499 2013-08-27 03:35:04 petehunt so why not npm link? :D
500 2013-08-27 03:35:06 jwalke I think server.js should even be put into react-page-middleware eventually
501 2013-08-27 03:35:20 jwalke npm link is a development time thing
502 2013-08-27 03:35:28 petehunt yeah actually
503 2013-08-27 03:35:31 jwalke someone should be able to npm install yourApp and have everything setup
504 2013-08-27 03:35:57 jwalke And even if npm link lets you get around it - if there's no way to specify it with package.json then it's not compliant IIRC.
505 2013-08-27 03:36:03 jwalke I *wish* so badly there was a way though
506 2013-08-27 03:36:13 jwalke it's quite horrible to have to do relative paths.
507 2013-08-27 03:36:14 petehunt jwalke: yeah there is :P
508 2013-08-27 03:36:18 petehunt NODE_PATH=src node server.js
509 2013-08-27 03:36:21 jwalke :/
510 2013-08-27 03:36:43 jwalke If we had a way to do it - I think we would not use @providesModule at fb
511 2013-08-27 03:37:10 petehunt jwalke: NODE_PATH does it
512 2013-08-27 03:37:30 balpert iirc NODE_PATH is deprecated/removed in recent versions of node
513 2013-08-27 03:37:57 petehunt balpert: isn't that require.paths?
514 2013-08-27 03:38:12 balpert petehunt: ah, you're right
515 2013-08-27 03:39:00 balpert one weird thing with that is that npm modules will be preferred over local files so you have to watch out for name collisons
516 2013-08-27 03:39:04 balpert I think
517 2013-08-27 03:39:42 jwalke petehunt: You could break all of them up into sub npm modules
518 2013-08-27 03:45:34 jwalke petehunt: You know you can use @providesModule with react-page right?
519 2013-08-27 03:45:42 jwalke Not so good for open source examples though.
520 2013-08-27 07:17:46 petehunt jwalke_: i'm very productive with react-page, nice work. getting the css/image asset stuff going, plus integrating seamless client/server-side routing would be my final asks
521 2013-08-27 07:18:10 jwalke_ I'm pretty far with the css/image stuff
522 2013-08-27 07:18:20 jwalke_ what about the client routing?
523 2013-08-27 07:18:52 petehunt jwalke_: it would be great if i could get quickling for free
524 2013-08-27 07:19:19 jwalke_ well it's a good platform to try building that.
525 2013-08-27 07:19:23 jwalke_ Using the same module loader as fb
526 2013-08-27 07:19:30 jwalke_ __d etc
527 2013-08-27 08:00:16 jwalke_ petehunt: how easily 15 mins turns into three hours :)
528 2013-08-27 08:00:30 petehunt jwalke: it's cool man, i've been crazy productive with react-page
529 2013-08-27 08:00:45 petehunt jwalke: however i have a big "global.css" file :)
530 2013-08-27 08:00:55 petehunt jwalke: can you support arbitrary browserify transform modules please please please
531 2013-08-27 08:01:07 petehunt then i can use sass etc
532 2013-08-27 08:03:30 jwalke_ oh petehunt: it's connect middleware so for at least now, you can just plug in a sass connect plugin
533 2013-08-27 08:03:51 jwalke_ right in server.js - see where I inject the connect "static" file server plugin
534 2013-08-27 08:03:54 jwalke_ just add one more for sass
535 2013-08-27 08:04:00 petehunt jwalke_: you sure? if you're implementing my spec, i'll want to compile the sass before it hits your packager.
536 2013-08-27 08:04:14 jwalke_ oh yeah - I'm just saying to unblock you in the mean time
537 2013-08-27 08:04:18 petehunt oh
538 2013-08-27 08:04:27 petehunt i don't really use any sass features except variables, so i'm fine
539 2013-08-27 08:04:32 jwalke_ but that step is totally done in react-page-middleware so it will be easy for you to build exactly what you want
540 2013-08-27 08:04:35 petehunt i can put commas in my selectors until then
541 2013-08-27 08:04:50 petehunt jwalke_: but if you could support browserify transforms out of the box, that would be really, really excellent.
542 2013-08-27 08:04:59 petehunt i am convinced that is a truly good interface
543 2013-08-27 08:05:05 jwalke_ what's the api again?
544 2013-08-27 08:06:32 petehunt jwalke_: https://github.com/substack/module-deps#transforms
545 2013-08-27 08:06:46 petehunt trust me, it will make *everyones* lives much easier.
546 2013-08-27 08:06:55 petehunt i.e. free coffeescript
547 2013-08-27 08:07:04 petehunt free less/sass
548 2013-08-27 08:10:20 jwalke_ petehunt: That example is not helpful
549 2013-08-27 08:10:36 petehunt jwalke_: ok sec
550 2013-08-27 08:11:47 petehunt jwalke_: this is a browserify transform module: https://github.com/petehunt/staticify/blob/master/index.js
551 2013-08-27 08:13:00 jwalke_ wth is through?
552 2013-08-27 08:13:12 petehunt jwalke_: some streams thing
553 2013-08-27 08:13:29 petehunt that you have to use
554 2013-08-27 08:13:30 petehunt or ont
555 2013-08-27 08:13:32 petehunt not*
556 2013-08-27 08:13:37 petehunt i dont know, browserify really likes streams.
557 2013-08-27 08:13:53 petehunt jwalke_: but please please please make that api usable in react-page
558 2013-08-27 08:14:02 petehunt it will save us integration work down the line
559 2013-08-27 08:14:03 jwalke_ why is that so important?
560 2013-08-27 08:14:24 petehunt jwalke_: well, if you just made that available, then i could just plug in staticify and be done
561 2013-08-27 08:14:44 petehunt jwalke_: but lets say i want to use the spec and coffeescript
562 2013-08-27 08:14:51 petehunt i can just plug in staticify AND i can plug in coffeescript
563 2013-08-27 08:14:52 petehunt and itll work
564 2013-08-27 08:16:12 jwalke_ petehunt: How does one of these plugins define how to replace/transform the actual require() call?
565 2013-08-27 08:16:36 petehunt jwalke_: they don't, they're just syntax transforms.
566 2013-08-27 08:17:16 jwalke_ how do they define what is returned from require()?
567 2013-08-27 08:17:31 balpert given a file name, it produces a r/w stream that the file contents is piped through
568 2013-08-27 08:18:33 petehunt jwalke_: just look at my code. you need to turn it into js source code
569 2013-08-27 08:18:38 petehunt they use a stream interface because… i don't know.
570 2013-08-27 08:18:53 balpert so one of these plugins is like function(filename) { if (/\\.jsx$/.test(filename)) { return JSXTransformer.transform; } }
571 2013-08-27 08:18:56 balpert but with more streams
572 2013-08-27 08:19:07 petehunt Non Blocking I/O Is Better
573 2013-08-27 08:20:21 jwalke_ petehunt: So, I wanted to accumulate all the require('x.css') calls and not generate javascript
574 2013-08-27 08:20:28 jwalke_ rather, bundle a css package.
575 2013-08-27 08:21:04 petehunt jwalke_: if you just give me the browserify transform api, we can plug in staticify easily to get it working, then make it more optimal later
576 2013-08-27 08:21:22 petehunt if you want to do something like that, youll need to hack haste, the transform api won't work for that
577 2013-08-27 08:21:51 jwalke_ petehunt: I was suggesting that the API we use be powerful to allow this bundling.
578 2013-08-27 08:22:56 petehunt jwalke_: well, if somewhere we could plug in browserify syntax transforms that would be helpful
579 2013-08-27 08:23:03 petehunt unless you want to personally make coffeescript and sass work.
580 2013-08-27 08:28:08 jwalke_ petehunt: Do you think images could be handled at the router level?
581 2013-08-27 08:28:16 jwalke_ localhost:8080/myProject/image.png
582 2013-08-27 08:28:26 jwalke_ would route to whichever package.json defined myProject
583 2013-08-27 08:28:31 jwalke_ possibly in node_modules
584 2013-08-27 08:28:42 petehunt jwalke_: as far as the spec goes? sounds interesting, think it would work
585 2013-08-27 08:29:07 jwalke_ only thing is that we would also need to rewrite require('../some.png')
586 2013-08-27 08:29:08 jwalke_ statically
587 2013-08-27 08:29:24 jwalke_ to require('whieverProjectItIs/path/some.png')
588 2013-08-27 08:29:39 petehunt jwalke_: i do not know node-haste at all.
589 2013-08-27 08:29:43 petehunt sorry :/
590 2013-08-27 08:29:52 jwalke_ does that matter?
591 2013-08-27 08:30:00 jwalke_ But I think the spec should not specify how this is accomplished.
592 2013-08-27 08:30:19 petehunt it doesnt, right?
593 2013-08-27 08:30:20 jwalke_ It should just specify that however it has to happen, that needs to resolve to the correct string that produces that image being required
594 2013-08-27 08:30:26 petehunt not a string
595 2013-08-27 08:30:34 petehunt a "something that can be used to render the final image"
596 2013-08-27 08:30:36 jwalke_ it has to be a string
597 2013-08-27 08:30:45 petehunt oh, the param passed to require()
598 2013-08-27 08:30:46 petehunt right
599 2013-08-27 08:30:48 jwalke_ img src={require('../x.png')}
600 2013-08-27 08:30:50 jwalke_ no
601 2013-08-27 08:30:54 jwalke_ the result of the require
602 2013-08-27 08:31:03 petehunt it depends on your environment
603 2013-08-27 08:31:13 petehunt you could imagine an environment where your img component takes a sprite
604 2013-08-27 08:31:18 jwalke_ "By the time runtime happens - that require statement better resolve to the right string")
605 2013-08-27 08:31:27 petehunt which needs to have a box and an asset url
606 2013-08-27 08:37:35 jwalke_ petehunt: couple of questions. It says it's already character encoded
607 2013-08-27 08:37:40 jwalke_ so you have to read the file again
608 2013-08-27 08:37:44 petehunt jwalke_: yes
609 2013-08-27 08:37:48 jwalke_ We shouldn't do that.
610 2013-08-27 08:37:52 petehunt fortunately you have a reliable path
611 2013-08-27 08:38:04 petehunt you are talking about browserify transform, right?
612 2013-08-27 08:38:10 jwalke_ yeah
613 2013-08-27 08:38:16 petehunt i know, i wasted a ton of time on that
614 2013-08-27 08:38:35 jwalke_ In my implementation, I probably don't want to character encode right?
615 2013-08-27 08:38:58 petehunt jwalke_: i would have preferred that it give me a buffer.
616 2013-08-27 08:42:15 balpert jwalke_: does this look familiar to you? https://gist.github.com/spicyj/186f5e1ee7e1c759af2f
617 2013-08-27 08:43:14 jwalke_ balpert: Hmmm
618 2013-08-27 08:43:15 jwalke_ no
619 2013-08-27 08:43:19 jwalke_ did it just start happening?
620 2013-08-27 08:43:41 balpert I just cloned react-page for the first time
621 2013-08-27 08:43:49 jwalke_ npm installed of course?
622 2013-08-27 08:43:53 jwalke_ no errors on npm install?
623 2013-08-27 08:43:58 jwalke_ and what version of node do you have
624 2013-08-27 08:43:58 balpert yup, no errors
625 2013-08-27 08:44:02 jwalke_ and do you have xcode installed
626 2013-08-27 08:44:14 balpert 0.8.16, too old?
627 2013-08-27 08:44:19 jwalke_ oh wow
628 2013-08-27 08:44:21 jwalke_ yeah
629 2013-08-27 08:44:30 jwalke_ we should be failing fast telling you it's too old
630 2013-08-27 08:44:54 jwalke_ It has issues with pointing package.json's to github repos - which turns out to be the most awesome feature ever.
631 2013-08-27 08:44:59 jwalke_ can you update?
632 2013-08-27 08:45:15 balpert yup, doing so
633 2013-08-27 08:46:50 balpert okay, now at 0.10.13 and it works
634 2013-08-27 08:47:09 balpert had to rm -rf node_modules and reinstall
635 2013-08-27 08:52:49 balpert jwalke_: that spinning logo is awesome
636 2013-08-27 08:53:05 jwalke_ :)
637 2013-08-27 08:53:07 jwalke_ click it!
638 2013-08-27 08:53:14 balpert I did!
639 2013-08-27 08:53:21 balpert then after reading the source I found I could click it a lot
640 2013-08-27 08:53:49 jwalke_ haha - actually a nice little demo of reactive animations
641 2013-08-27 08:54:00 jwalke_ tiny amount of friction
642 2013-08-27 08:57:43 jwalke_ petehunt: can you chain those transforms
643 2013-08-27 08:57:49 petehunt jwalke_: yes
644 2013-08-27 08:57:54 jwalke_ without accumulating the buffer for filetypes you don't care about
645 2013-08-27 08:58:10 petehunt jwalke_: yes you can just stream it through if you aren't interested in it
646 2013-08-27 08:58:23 jwalke_ how do you just stream it through?
647 2013-08-27 08:58:27 jwalke_ without accumulating?
648 2013-08-27 09:07:57 jwalke_ petehunt: I'm going to have to continue this throughout the week.
649 2013-08-27 09:08:06 jwalke_ Here's the react-page-middleware changes so far:
650 2013-08-27 09:08:07 jwalke_ https://github.com/facebook/react-page-middleware/commit/10a427bb74381d500628efb7f43784b0799ea425
651 2013-08-27 09:08:43 jwalke_ And here's the node-haste changes required to support image/css deps of JS modules
652 2013-08-27 09:08:44 jwalke_ https://github.com/jordwalke/node-haste/commit/6c37e76e7cebafd0059ab025daad9fafcde76dc6
653 2013-08-27 09:09:16 jwalke_ If all is working well, the only thing left to do, is integrate the browserify streams API into the packager part - where we transform the modules
654 2013-08-27 09:09:21 balpert jwalke_: what's ?
655 2013-08-27 09:09:32 jwalke_ you can feel free to take a stab at it - it's 95% done.
656 2013-08-27 09:09:56 jwalke_ balpert: haha - that was a hack I had in place.
657 2013-08-27 09:10:10 jwalke_ So, we secretly inject the that downloads your js
658 2013-08-27 09:10:31 jwalke_ that sets up all the event handlers0
659 2013-08-27 09:10:54 jwalke_ And so initially, I just looked for