codecasting no longer works

i cannot seem to get the codecasting to work, no matter what i try.
putting the username in the url, latest, last and watch all give me an error.
i read the article on new short urls and followed along and used the share.
any suggestions?

is this on a local installation or on the live production website? I have the same behaviour on a local installation, but when I open two anonymous edits on the jsbin.com website it works fine.

This was fixed in this: https://github.com/jsbin/jsbin/commit/c2a781ebbac3515bee8a661066e01902bbd25463
@francoisp thanks for commenting on these issues, it's helping me close them up 👍

francois,
my question was about the live production site logged on with my pro
account (b2mgithub).
i was trying to use the urls like this link https://jsbin.com/blog/urls
or follow along with the youtube
https://www.youtube.com/watch?v=PHDThjUOJSc&list=PLXmT1r4krsTooRDWOrIu23P3SEZ3luIUq&index=12
none of it seems to work with my account.
i cant put my username in the url, watch, latest, auto codecast on edit,
none of it works.
i did get a support email that it was fixed, but not really.
i missed the deadline on my project, and had to use something else.
this issue has been closed, but still doesn't work for me at all.
just try to follow along with the youtube video.
ps after all this i managed to get a local version installed on windows
(older version).
added a little cors support, some parent window iframe messaging in the
runner, integrated some kendo ui, and store my project in sql server.
the end result is a super easy way to store and manage a bunch of codecast
items (with meaningful names) as an tree (outline) for teaching a course.
and zero time spent managing urls or versions.
bart
On Tue, Jul 19, 2016 at 4:12 PM, Francois Payette<EMAIL_ADDRESS>wrote:

is this on a local installation or on the live production website? I have
the same behaviour on a local installation, but when I open two anonymous
edits on the jsbin.com website it works fine.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jsbin/jsbin/issues/2800#issuecomment-233794155, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKWljbdJz-LTlApViDiusvb6qxQcKzx-ks5qXVnhgaJpZM4JB79S
.

Hello Bart,
sorry to hear that. I’ve just recently come across jsbin; really cool project, it’s awesome that it is MIT licensed, I can’t believe its been around for so long and I never looked at it before.
I’m planning on using parts of the code for something else. I ran in a similar issue, but it must not be the same. On the live production website, I can simply copy and paste the url of a recently created anonymous bin is a different browser (say ff and chrome) and updates from the first window “codecast”  to the second window, I believe this is spike.js code based EventSource.js that’s doing its trick.
On a local install, this does not work. Even worse, after creating a test bin in say chrome, then going to the same url in ff, updating the original in chrome, I see the new bin being posted to the db, but “browser refresh” does not even reload the change in the second browser.
best regards,
F

On Jul 20, 2016, at 6:23 PM, b2m<EMAIL_ADDRESS>wrote:
francois,
my question was about the live production site logged on with my pro
account (b2mgithub).
i was trying to use the urls like this link https://jsbin.com/blog/urls
or follow along with the youtube
https://www.youtube.com/watch?v=PHDThjUOJSc&list=PLXmT1r4krsTooRDWOrIu23P3SEZ3luIUq&index=12
none of it seems to work with my account.
i cant put my username in the url, watch, latest, auto codecast on edit,
none of it works.
i did get a support email that it was fixed, but not really.
i missed the deadline on my project, and had to use something else.
this issue has been closed, but still doesn't work for me at all.
just try to follow along with the youtube video.
ps after all this i managed to get a local version installed on windows
(older version).
added a little cors support, some parent window iframe messaging in the
runner, integrated some kendo ui, and store my project in sql server.
the end result is a super easy way to store and manage a bunch of codecast
items (with meaningful names) as an tree (outline) for teaching a course.
and zero time spent managing urls or versions.
bart
On Tue, Jul 19, 2016 at 4:12 PM, Francois Payette<EMAIL_ADDRESS>wrote:

is this on a local installation or on the live production website? I have
the same behaviour on a local installation, but when I open two anonymous
edits on the jsbin.com website it works fine.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jsbin/jsbin/issues/2800#issuecomment-233794155, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKWljbdJz-LTlApViDiusvb6qxQcKzx-ks5qXVnhgaJpZM4JB79S
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/jsbin/jsbin/issues/2800#issuecomment-234102339, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjgLotZ_vQkSYahz04F1RUnyO1wautgks5qXp_vgaJpZM4JB79S.

On the code casting, your issue said no matter what you try, and I was able to replicate at the time, identify the bug and fix it.
Here's a screencast of code casting I took this morning:

I'm casting from Chrome to Firefox over jsbin.com. Note that the gif is playing at 2x speed, but I also had a laggy connection at the time. Note that I create a new bin in Chrome, I copy the URL from the address bar. This is all that's required for codecasting.
To live render, I can repeat the same process, except I remove the /edit from the URL before loading in Firefox (note that this is unrelated to the issue you raised, but I've included it for completeness):

Regarding local installs – I'm running from a local install to do all my development (which is how I fixed the issue), but to be very clear: a) there is no support for local installs because it's constantly in flux, and b) the npm version is utterly out of date.
All of this has nothing to do with pro account features (just to clarify).
I think there's a hidden issue in what you've filed. I believe the issue is actually this:

Create a new bin with a logged in account
Open jsbin.com//last/
This loads the correct content, but I believe that the live rendering doesn't work

This is a separate issue that should be raised, but importantly can be easily worked around by sharing the real URL of the bin.
Let me know if this is correct and we can open a new issue with those details.

Remy,
I keep mentioning the pro account because I need to log in to save my
collection of finely tuned bins I want to use for codecasting.
You could make it work, but I could not, so I dug a little deeper and made
a chart of my findings.
[image: Inline image 1]
I attached a fast forward video called support.mp4 of the 6 tests matching
the chart above.
Obviously I was constantly trying the 4 that don't work for me, and not the
2 that do.
I now agree that it is fixed and you can close my support question.
On a side note, I did manage to get it to work locally.
After a few days of fiddling with cors and iframe parent messages from the
runner because I couldn't make it work on port 80 I came up with a solution
for using jsbin to teach a local coding for kids course in northern rural
canada.
I also attached a fast forward video called jsbin.mp4 that shows a
simplified version.
I would have made fancy gifs like you, but the file size and frame rate was
too high.
Regards,
Bart
On Thu, Jul 21, 2016 at 12:19 AM, Remy Sharp<EMAIL_ADDRESS>wrote:

On the code casting, your issue said no matter what you try, and I was
able to replicate at the time, identify the bug and fix it.
Here's a screencast of code casting I took this morning:
[image: codecast mp4]
https://cloud.githubusercontent.com/assets/13700/17014179/113ebd46-4f1b-11e6-94b5-80b1f18bf89a.gif
I'm casting from Chrome to Firefox over jsbin.com. Note that the gif is
playing at 2x speed, but I also had a laggy connection at the time. Note
that I create a new bin in Chrome, I copy the URL from the address bar.
This is all that's required for codecasting.
To live render, I can repeat the same process, except I remove the /edit
from the URL before loading in Firefox (note that this is unrelated to the
issue you raised, but I've included it for completeness):
[image: cast mp4]
https://cloud.githubusercontent.com/assets/13700/17014265/9b248734-4f1b-11e6-9a70-4c3f80475778.gif
Regarding local installs – I'm running from a local install to do all my
development (which is how I fixed the issue), but to be very clear: a)
there is no support for local installs because it's constantly in flux, and
b) the npm version is utterly out of date.
All of this has nothing to do with pro account features (just to clarify).
I think there's a hidden issue in what you've filed. I believe the
issue is actually this:

Create a new bin with a logged in account
Open jsbin.com//last/
This loads the correct content, but I believe that the live
rendering doesn't work

This is a separate issue that should be raised, but importantly can be
easily worked around by sharing the real URL of the bin.
Let me know if this is correct and we can open a new issue with those
details.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234176395, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKWljXa4gmS6mZf5IdtoBi_tCbkPZtITks5qXx2PgaJpZM4JB79S
.

Francois,
I have been back and forth a few times with remy on the codecasting issue.
The confusion was that i need to be logged in (have a pro account) to save
my fine tuned bins for codecasting during a coding for kids course in
northern rural bc canada.
Here is the results of my more careful testing.
[image: Inline image 1]
We are actually building a platform for the new bc school curriculum which
is based on signalr (ms version of sockets and long polling).
Sort of two way slack style messaging / codecasting the entire content
(including coding samples), with bots (as teaching assistants) and quizzes
(maybe gamification and web based dynamic ar in the future).
No attempt to solicit or stalk you, but attached a fast forward video of
how we are using jsbin.
Hope you get yours all working locally, it is a real puzzler.
Regards,
Bart
On Wed, Jul 20, 2016 at 3:44 PM, Francois Payette<EMAIL_ADDRESS>wrote:

Hello Bart,
sorry to hear that. I’ve just recently come across jsbin; really cool
project, it’s awesome that it is MIT licensed, I can’t believe its been
around for so long and I never looked at it before.
I’m planning on using parts of the code for something else. I ran in a
similar issue, but it must not be the same. On the live production website,
I can simply copy and paste the url of a recently created anonymous bin is
a different browser (say ff and chrome) and updates from the first window
“codecast” to the second window, I believe this is spike.js code based
EventSource.js that’s doing its trick.
On a local install, this does not work. Even worse, after creating a test
bin in say chrome, then going to the same url in ff, updating the original
in chrome, I see the new bin being posted to the db, but “browser refresh”
does not even reload the change in the second browser.
best regards,
F

On Jul 20, 2016, at 6:23 PM, b2m<EMAIL_ADDRESS>wrote:
francois,
my question was about the live production site logged on with my pro
account (b2mgithub).
i was trying to use the urls like this link https://jsbin.com/blog/urls
or follow along with the youtube

https://www.youtube.com/watch?v=PHDThjUOJSc&list=PLXmT1r4krsTooRDWOrIu23P3SEZ3luIUq&index=12

none of it seems to work with my account.
i cant put my username in the url, watch, latest, auto codecast on edit,
none of it works.
i did get a support email that it was fixed, but not really.
i missed the deadline on my project, and had to use something else.
this issue has been closed, but still doesn't work for me at all.
just try to follow along with the youtube video.
ps after all this i managed to get a local version installed on windows
(older version).
added a little cors support, some parent window iframe messaging in the
runner, integrated some kendo ui, and store my project in sql server.
the end result is a super easy way to store and manage a bunch of
codecast
items (with meaningful names) as an tree (outline) for teaching a course.
and zero time spent managing urls or versions.
bart
On Tue, Jul 19, 2016 at 4:12 PM, Francois Payette <
<EMAIL_ADDRESS>wrote:

is this on a local installation or on the live production website? I
have
the same behaviour on a local installation, but when I open two
anonymous
edits on the jsbin.com website it works fine.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jsbin/jsbin/issues/2800#issuecomment-233794155,
or mute
the thread
<
https://github.com/notifications/unsubscribe-auth/AKWljbdJz-LTlApViDiusvb6qxQcKzx-ks5qXVnhgaJpZM4JB79S

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234102339>, or
mute the thread <
https://github.com/notifications/unsubscribe-auth/AAjgLotZ_vQkSYahz04F1RUnyO1wautgks5qXp_vgaJpZM4JB79S
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234107087, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKWljetfiQxj3xHI4bZ35ETi3vqQKXUdks5qXqTrgaJpZM4JB79S
.

The images didn't attach (suspect github doesn't support then via emails). Can you upload them to the thread on github and I can take a closer look.
I don't doubt you're experiencing this problem, it's that since the fix referred to earlier, I can't replicate (which I'm keen to do - please be reassured that I don't intend to brush you away! ☺).
I'll take a look later today if you're able to upload your screenshots you took.
Cheers.

Remy,
I put the the videos in a sample folder on my server instead.
The links are...
chart
http://ppa.business2mobile.com/desktopmodules/PPALocal/App2/Northwind/videos/chart.png
support
http://ppa.business2mobile.com/desktopmodules/PPALocal/App2/Northwind/videos/support.mp4
jsbin
http://ppa.business2mobile.com/desktopmodules/PPALocal/App2/Northwind/videos/jsbin.png
concept
Bart
On Thu, Jul 21, 2016 at 3:45 AM, Remy Sharp<EMAIL_ADDRESS>wrote:

The images didn't attach (suspect github doesn't support then via emails).
Can you upload them to the thread on github and I can take a closer look.
I don't doubt you're experiencing this problem, it's that since the fix
referred to earlier, I can't replicate (which I'm keen to do - please be
reassured that I don't intend to brush you away! ☺).
I'll take a look later today if you're able to upload your screenshots you
took.
Cheers.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234219465, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKWljTBVBE21d8oeOTg1k1_xxK3TvYnnks5qX03SgaJpZM4JB79S
.

Francois,
The support part of jsbin does not allow attachments.
So here is the full links to the files discussed.
chart
http://ppa.business2mobile.com/desktopmodules/PPALocal/App2/Northwind/videos/chart.png
jsbin
http://ppa.business2mobile.com/desktopmodules/PPALocal/App2/Northwind/videos/jsbin.png
concept
Regards,
Bart
On Wed, Jul 20, 2016 at 3:44 PM, Francois Payette<EMAIL_ADDRESS>wrote:

Hello Bart,
sorry to hear that. I’ve just recently come across jsbin; really cool
project, it’s awesome that it is MIT licensed, I can’t believe its been
around for so long and I never looked at it before.
I’m planning on using parts of the code for something else. I ran in a
similar issue, but it must not be the same. On the live production website,
I can simply copy and paste the url of a recently created anonymous bin is
a different browser (say ff and chrome) and updates from the first window
“codecast” to the second window, I believe this is spike.js code based
EventSource.js that’s doing its trick.
On a local install, this does not work. Even worse, after creating a test
bin in say chrome, then going to the same url in ff, updating the original
in chrome, I see the new bin being posted to the db, but “browser refresh”
does not even reload the change in the second browser.
best regards,
F

On Jul 20, 2016, at 6:23 PM, b2m<EMAIL_ADDRESS>wrote:
francois,
my question was about the live production site logged on with my pro
account (b2mgithub).
i was trying to use the urls like this link https://jsbin.com/blog/urls
or follow along with the youtube

https://www.youtube.com/watch?v=PHDThjUOJSc&list=PLXmT1r4krsTooRDWOrIu23P3SEZ3luIUq&index=12

none of it seems to work with my account.
i cant put my username in the url, watch, latest, auto codecast on edit,
none of it works.
i did get a support email that it was fixed, but not really.
i missed the deadline on my project, and had to use something else.
this issue has been closed, but still doesn't work for me at all.
just try to follow along with the youtube video.
ps after all this i managed to get a local version installed on windows
(older version).
added a little cors support, some parent window iframe messaging in the
runner, integrated some kendo ui, and store my project in sql server.
the end result is a super easy way to store and manage a bunch of
codecast
items (with meaningful names) as an tree (outline) for teaching a course.
and zero time spent managing urls or versions.
bart
On Tue, Jul 19, 2016 at 4:12 PM, Francois Payette <
<EMAIL_ADDRESS>wrote:

is this on a local installation or on the live production website? I
have
the same behaviour on a local installation, but when I open two
anonymous
edits on the jsbin.com website it works fine.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jsbin/jsbin/issues/2800#issuecomment-233794155,
or mute
the thread
<
https://github.com/notifications/unsubscribe-auth/AKWljbdJz-LTlApViDiusvb6qxQcKzx-ks5qXVnhgaJpZM4JB79S

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234102339>, or
mute the thread <
https://github.com/notifications/unsubscribe-auth/AAjgLotZ_vQkSYahz04F1RUnyO1wautgks5qXp_vgaJpZM4JB79S
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234107087, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKWljetfiQxj3xHI4bZ35ETi3vqQKXUdks5qXqTrgaJpZM4JB79S
.

Hey Bart, fellow Canadian eh? :-) cheers!
I looked at your video, I had only tried a few of these configs, but none worked. Looking at the code I don't see that pro has a bearing, but the live var in feature.js has to be true, or else the casting code (spike.js) will not even be included, see partials/index.html at the bottom.
Cool project. Im planning on using this code base for something else, integrating a SQL playground as well, running in a dynamic unprivileged lxc container.
When I first came across this, a project in the dynamic teaching with samples --pre framed problems and unit tests for autonomous learning is the first idea that came to mind. I have 5 kids, the oldest being 10, which is the about the age I started to get into programming. The gaming world was a lot less interactive back then. I'm very keen on getting them to code asap, as least the 2 older ones, to show them there is world out there besides clashing clans and chasing pokemons. To spark their interest it has to be dynamic. Jsbin seems like a perfect tool for this.
I fixed the port of socket.io for iOS, a few years back, before they released the swift implementation. I might try to plug socket.io in place of the eventlistener.js locally, at first glance I think this is where this problem is.
Whats extra puzzling is that reloading the page after clearing the cache will not even reload the changes in the second browser!
Way way back (2011) when I still had stuff in csharp on iis I used signalr. I remember it scaled surprisingly well.
Cheers!
F
Sent from my iPhone

On Jul 21, 2016, at 05:23, b2m<EMAIL_ADDRESS>wrote:
Francois,
I have been back and forth a few times with remy on the codecasting issue.
The confusion was that i need to be logged in (have a pro account) to save
my fine tuned bins for codecasting during a coding for kids course in
northern rural bc canada.
Here is the results of my more careful testing.
[image: Inline image 1]
We are actually building a platform for the new bc school curriculum which
is based on signalr (ms version of sockets and long polling).
Sort of two way slack style messaging / codecasting the entire content
(including coding samples), with bots (as teaching assistants) and quizzes
(maybe gamification and web based dynamic ar in the future).
No attempt to solicit or stalk you, but attached a fast forward video of
how we are using jsbin.
Hope you get yours all working locally, it is a real puzzler.
Regards,
Bart
On Wed, Jul 20, 2016 at 3:44 PM, Francois Payette<EMAIL_ADDRESS>wrote:

Hello Bart,
sorry to hear that. I’ve just recently come across jsbin; really cool
project, it’s awesome that it is MIT licensed, I can’t believe its been
around for so long and I never looked at it before.
I’m planning on using parts of the code for something else. I ran in a
similar issue, but it must not be the same. On the live production website,
I can simply copy and paste the url of a recently created anonymous bin is
a different browser (say ff and chrome) and updates from the first window
“codecast” to the second window, I believe this is spike.js code based
EventSource.js that’s doing its trick.
On a local install, this does not work. Even worse, after creating a test
bin in say chrome, then going to the same url in ff, updating the original
in chrome, I see the new bin being posted to the db, but “browser refresh”
does not even reload the change in the second browser.
best regards,
F

On Jul 20, 2016, at 6:23 PM, b2m<EMAIL_ADDRESS>wrote:
francois,
my question was about the live production site logged on with my pro
account (b2mgithub).
i was trying to use the urls like this link https://jsbin.com/blog/urls
or follow along with the youtube

https://www.youtube.com/watch?v=PHDThjUOJSc&list=PLXmT1r4krsTooRDWOrIu23P3SEZ3luIUq&index=12

none of it seems to work with my account.
i cant put my username in the url, watch, latest, auto codecast on edit,
none of it works.
i did get a support email that it was fixed, but not really.
i missed the deadline on my project, and had to use something else.
this issue has been closed, but still doesn't work for me at all.
just try to follow along with the youtube video.
ps after all this i managed to get a local version installed on windows
(older version).
added a little cors support, some parent window iframe messaging in the
runner, integrated some kendo ui, and store my project in sql server.
the end result is a super easy way to store and manage a bunch of
codecast
items (with meaningful names) as an tree (outline) for teaching a course.
and zero time spent managing urls or versions.
bart
On Tue, Jul 19, 2016 at 4:12 PM, Francois Payette <
<EMAIL_ADDRESS>wrote:

is this on a local installation or on the live production website? I
have
the same behaviour on a local installation, but when I open two
anonymous
edits on the jsbin.com website it works fine.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jsbin/jsbin/issues/2800#issuecomment-233794155,
or mute
the thread
<
https://github.com/notifications/unsubscribe-auth/AKWljbdJz-LTlApViDiusvb6qxQcKzx-ks5qXVnhgaJpZM4JB79S

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234102339>, or
mute the thread <
https://github.com/notifications/unsubscribe-auth/AAjgLotZ_vQkSYahz04F1RUnyO1wautgks5qXp_vgaJpZM4JB79S
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234107087, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKWljetfiQxj3xHI4bZ35ETi3vqQKXUdks5qXqTrgaJpZM4JB79S
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

actually it’s in handlers/bin.js that the live flag is defined. If you look at lib/routes.js around 894 in the latest code on github, you’ll see that this get sets to true on the server side in the req obj if the url is ‘/watch’. So in the code I have, unless the second url is watch, spike.js is not included. BUT there’s a long poll request pending in the browser even when this file is not included. I wondered if there was another notification mechanism but looking at the production jsbin.com, I see that the /js/spike.js is loaded on the second browser that opens an anon bin, i believe its triggered in js/chrome/infocard.js, even if the url does not contain ‘/watch’, a behaviour that does not occur local. (spike.js get’s loaded on local only if you have ‘/watch’ in the url.) The dynamic presence of this code, and the doc that says codecast uses this spike mechanism leads me to believe this is still the way the message gets across.
spike loaded or not, it looks like there’s no event fired so the bin changes do not propagate; what’s more, clearing the cache and reloading on this second browser does not even get the up to date bin; I see a request go through in the db for the latest, but I still get the initial loaded bin rendered in this second browser. How this gets cached past the reload and cache clean is really a puzzle.
best,
F

On Jul 21, 2016, at 8:20 AM, Francois Payette<EMAIL_ADDRESS>wrote:
Hey Bart, fellow Canadian eh? :-) cheers!
I looked at your video, I had only tried a few of these configs, but none worked. Looking at the code I don't see that pro has a bearing, but the live var in feature.js has to be true, or else the casting code (spike.js) will not even be included, see partials/index.html at the bottom.
Cool project. Im planning on using this code base for something else, integrating a SQL playground as well, running in a dynamic unprivileged lxc container.
When I first came across this, a project in the dynamic teaching with samples --pre framed problems and unit tests for autonomous learning is the first idea that came to mind. I have 5 kids, the oldest being 10, which is the about the age I started to get into programming. The gaming world was a lot less interactive back then. I'm very keen on getting them to code asap, as least the 2 older ones, to show them there is world out there besides clashing clans and chasing pokemons. To spark their interest it has to be dynamic. Jsbin seems like a perfect tool for this.
I fixed the port of socket.io http://socket.io/ for iOS, a few years back, before they released the swift implementation. I might try to plug socket.io http://socket.io/ in place of the eventlistener.js locally, at first glance I think this is where this problem is.
Whats extra puzzling is that reloading the page after clearing the cache will not even reload the changes in the second browser!
Way way back (2011) when I still had stuff in csharp on iis I used signalr. I remember it scaled surprisingly well.
Cheers!
F
Sent from my iPhone
On Jul 21, 2016, at 05:23, b2m<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:

Francois,
I have been back and forth a few times with remy on the codecasting issue.
The confusion was that i need to be logged in (have a pro account) to save
my fine tuned bins for codecasting during a coding for kids course in
northern rural bc canada.
Here is the results of my more careful testing.
[image: Inline image 1]
We are actually building a platform for the new bc school curriculum which
is based on signalr (ms version of sockets and long polling).
Sort of two way slack style messaging / codecasting the entire content
(including coding samples), with bots (as teaching assistants) and quizzes
(maybe gamification and web based dynamic ar in the future).
No attempt to solicit or stalk you, but attached a fast forward video of
how we are using jsbin.
Hope you get yours all working locally, it is a real puzzler.
Regards,
Bart
On Wed, Jul 20, 2016 at 3:44 PM, Francois Payette<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:

Hello Bart,
sorry to hear that. I’ve just recently come across jsbin; really cool
project, it’s awesome that it is MIT licensed, I can’t believe its been
around for so long and I never looked at it before.
I’m planning on using parts of the code for something else. I ran in a
similar issue, but it must not be the same. On the live production website,
I can simply copy and paste the url of a recently created anonymous bin is
a different browser (say ff and chrome) and updates from the first window
“codecast” to the second window, I believe this is spike.js code based
EventSource.js that’s doing its trick.
On a local install, this does not work. Even worse, after creating a test
bin in say chrome, then going to the same url in ff, updating the original
in chrome, I see the new bin being posted to the db, but “browser refresh”
does not even reload the change in the second browser.
best regards,
F

On Jul 20, 2016, at 6:23 PM, b2m<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:
francois,
my question was about the live production site logged on with my pro
account (b2mgithub).
i was trying to use the urls like this link https://jsbin.com/blog/urls https://jsbin.com/blog/urls
or follow along with the youtube

https://www.youtube.com/watch?v=PHDThjUOJSc&list=PLXmT1r4krsTooRDWOrIu23P3SEZ3luIUq&index=12 https://www.youtube.com/watch?v=PHDThjUOJSc&list=PLXmT1r4krsTooRDWOrIu23P3SEZ3luIUq&index=12

none of it seems to work with my account.
i cant put my username in the url, watch, latest, auto codecast on edit,
none of it works.
i did get a support email that it was fixed, but not really.
i missed the deadline on my project, and had to use something else.
this issue has been closed, but still doesn't work for me at all.
just try to follow along with the youtube video.
ps after all this i managed to get a local version installed on windows
(older version).
added a little cors support, some parent window iframe messaging in the
runner, integrated some kendo ui, and store my project in sql server.
the end result is a super easy way to store and manage a bunch of
codecast
items (with meaningful names) as an tree (outline) for teaching a course.
and zero time spent managing urls or versions.
bart
On Tue, Jul 19, 2016 at 4:12 PM, Francois Payette <
<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:

is this on a local installation or on the live production website? I
have
the same behaviour on a local installation, but when I open two
anonymous
edits on the jsbin.com http://jsbin.com/ website it works fine.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/jsbin/jsbin/issues/2800#issuecomment-233794155 https://github.com/jsbin/jsbin/issues/2800#issuecomment-233794155>,
or mute
the thread
<
https://github.com/notifications/unsubscribe-auth/AKWljbdJz-LTlApViDiusvb6qxQcKzx-ks5qXVnhgaJpZM4JB79S https://github.com/notifications/unsubscribe-auth/AKWljbdJz-LTlApViDiusvb6qxQcKzx-ks5qXVnhgaJpZM4JB79S

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234102339 https://github.com/jsbin/jsbin/issues/2800#issuecomment-234102339>, or
mute the thread <
https://github.com/notifications/unsubscribe-auth/AAjgLotZ_vQkSYahz04F1RUnyO1wautgks5qXp_vgaJpZM4JB79S https://github.com/notifications/unsubscribe-auth/AAjgLotZ_vQkSYahz04F1RUnyO1wautgks5qXp_vgaJpZM4JB79S
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/jsbin/jsbin/issues/2800#issuecomment-234107087 https://github.com/jsbin/jsbin/issues/2800#issuecomment-234107087>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AKWljetfiQxj3xHI4bZ35ETi3vqQKXUdks5qXqTrgaJpZM4JB79S https://github.com/notifications/unsubscribe-auth/AKWljetfiQxj3xHI4bZ35ETi3vqQKXUdks5qXqTrgaJpZM4JB79S>
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/jsbin/jsbin/issues/2800#issuecomment-234201832, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjgLjJhSddNB-4M6Fp0p-JK69b29W3Lks5qXzp8gaJpZM4JB79S.

How this gets cached past the reload and cache clean is really a puzzle.

FYI, I found how this was occurring. In jsbin.js around 311 there’s code executed on unload. So when I reload the page this gets executed before reload, and the content is saved to the session then restored to the page. When I clean the cache, the session and the page gets trashed, but because the page is still open, the javascript is still in the v8 instance, in chrome. When I reload the url, this unload code get’s executed, bam, I get the old bin again. If I force jsbin.panels.saveOnExt to false, I then get the new bin. One less mystery. On to why the update event does not get fired across.
cheers,
F

On Jul 21, 2016, at 10:43 AM, Francois Payette<EMAIL_ADDRESS>wrote:
actually it’s in handlers/bin.js that the live flag is defined. If you look at lib/routes.js around 894 in the latest code on github, you’ll see that this get sets to true on the server side in the req obj if the url is ‘/watch’. So in the code I have, unless the second url is watch, spike.js is not included. BUT there’s a long poll request pending in the browser even when this file is not included. I wondered if there was another notification mechanism but looking at the production jsbin.com http://jsbin.com/, I see that the /js/spike.js is loaded on the second browser that opens an anon bin, i believe its triggered in js/chrome/infocard.js, even if the url does not contain ‘/watch’, a behaviour that does not occur local. (spike.js get’s loaded on local only if you have ‘/watch’ in the url.) The dynamic presence of this code, and the doc that says codecast uses this spike mechanism leads me to believe this is still the way the message gets across.
spike loaded or not, it looks like there’s no event fired so the bin changes do not propagate; what’s more, clearing the cache and reloading on this second browser does not even get the up to date bin; I see a request go through in the db for the latest, but I still get the initial loaded bin rendered in this second browser. How this gets cached past the reload and cache clean is really a puzzle.
best,
F

On Jul 21, 2016, at 8:20 AM, Francois Payette<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:
Hey Bart, fellow Canadian eh? :-) cheers!
I looked at your video, I had only tried a few of these configs, but none worked. Looking at the code I don't see that pro has a bearing, but the live var in feature.js has to be true, or else the casting code (spike.js) will not even be included, see partials/index.html at the bottom.
Cool project. Im planning on using this code base for something else, integrating a SQL playground as well, running in a dynamic unprivileged lxc container.
When I first came across this, a project in the dynamic teaching with samples --pre framed problems and unit tests for autonomous learning is the first idea that came to mind. I have 5 kids, the oldest being 10, which is the about the age I started to get into programming. The gaming world was a lot less interactive back then. I'm very keen on getting them to code asap, as least the 2 older ones, to show them there is world out there besides clashing clans and chasing pokemons. To spark their interest it has to be dynamic. Jsbin seems like a perfect tool for this.
I fixed the port of socket.io http://socket.io/ for iOS, a few years back, before they released the swift implementation. I might try to plug socket.io http://socket.io/ in place of the eventlistener.js locally, at first glance I think this is where this problem is.
Whats extra puzzling is that reloading the page after clearing the cache will not even reload the changes in the second browser!
Way way back (2011) when I still had stuff in csharp on iis I used signalr. I remember it scaled surprisingly well.
Cheers!
F
Sent from my iPhone
On Jul 21, 2016, at 05:23, b2m<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:

Francois,
I have been back and forth a few times with remy on the codecasting issue.
The confusion was that i need to be logged in (have a pro account) to save
my fine tuned bins for codecasting during a coding for kids course in
northern rural bc canada.
Here is the results of my more careful testing.
[image: Inline image 1]
We are actually building a platform for the new bc school curriculum which
is based on signalr (ms version of sockets and long polling).
Sort of two way slack style messaging / codecasting the entire content
(including coding samples), with bots (as teaching assistants) and quizzes
(maybe gamification and web based dynamic ar in the future).
No attempt to solicit or stalk you, but attached a fast forward video of
how we are using jsbin.
Hope you get yours all working locally, it is a real puzzler.
Regards,
Bart
On Wed, Jul 20, 2016 at 3:44 PM, Francois Payette<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:

Hello Bart,
sorry to hear that. I’ve just recently come across jsbin; really cool
project, it’s awesome that it is MIT licensed, I can’t believe its been
around for so long and I never looked at it before.
I’m planning on using parts of the code for something else. I ran in a
similar issue, but it must not be the same. On the live production website,
I can simply copy and paste the url of a recently created anonymous bin is
a different browser (say ff and chrome) and updates from the first window
“codecast” to the second window, I believe this is spike.js code based
EventSource.js that’s doing its trick.
On a local install, this does not work. Even worse, after creating a test
bin in say chrome, then going to the same url in ff, updating the original
in chrome, I see the new bin being posted to the db, but “browser refresh”
does not even reload the change in the second browser.
best regards,
F

On Jul 20, 2016, at 6:23 PM, b2m<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:
francois,
my question was about the live production site logged on with my pro
account (b2mgithub).
i was trying to use the urls like this link https://jsbin.com/blog/urls https://jsbin.com/blog/urls
or follow along with the youtube

https://www.youtube.com/watch?v=PHDThjUOJSc&list=PLXmT1r4krsTooRDWOrIu23P3SEZ3luIUq&index=12 https://www.youtube.com/watch?v=PHDThjUOJSc&list=PLXmT1r4krsTooRDWOrIu23P3SEZ3luIUq&index=12

none of it seems to work with my account.
i cant put my username in the url, watch, latest, auto codecast on edit,
none of it works.
i did get a support email that it was fixed, but not really.
i missed the deadline on my project, and had to use something else.
this issue has been closed, but still doesn't work for me at all.
just try to follow along with the youtube video.
ps after all this i managed to get a local version installed on windows
(older version).
added a little cors support, some parent window iframe messaging in the
runner, integrated some kendo ui, and store my project in sql server.
the end result is a super easy way to store and manage a bunch of
codecast
items (with meaningful names) as an tree (outline) for teaching a course.
and zero time spent managing urls or versions.
bart
On Tue, Jul 19, 2016 at 4:12 PM, Francois Payette <
<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:

is this on a local installation or on the live production website? I
have
the same behaviour on a local installation, but when I open two
anonymous
edits on the jsbin.com http://jsbin.com/ website it works fine.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/jsbin/jsbin/issues/2800#issuecomment-233794155 https://github.com/jsbin/jsbin/issues/2800#issuecomment-233794155>,
or mute
the thread
<
https://github.com/notifications/unsubscribe-auth/AKWljbdJz-LTlApViDiusvb6qxQcKzx-ks5qXVnhgaJpZM4JB79S https://github.com/notifications/unsubscribe-auth/AKWljbdJz-LTlApViDiusvb6qxQcKzx-ks5qXVnhgaJpZM4JB79S

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234102339 https://github.com/jsbin/jsbin/issues/2800#issuecomment-234102339>, or
mute the thread <
https://github.com/notifications/unsubscribe-auth/AAjgLotZ_vQkSYahz04F1RUnyO1wautgks5qXp_vgaJpZM4JB79S https://github.com/notifications/unsubscribe-auth/AAjgLotZ_vQkSYahz04F1RUnyO1wautgks5qXp_vgaJpZM4JB79S
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/jsbin/jsbin/issues/2800#issuecomment-234107087 https://github.com/jsbin/jsbin/issues/2800#issuecomment-234107087>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AKWljetfiQxj3xHI4bZ35ETi3vqQKXUdks5qXqTrgaJpZM4JB79S https://github.com/notifications/unsubscribe-auth/AKWljetfiQxj3xHI4bZ35ETi3vqQKXUdks5qXqTrgaJpZM4JB79S>
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/jsbin/jsbin/issues/2800#issuecomment-234201832, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjgLjJhSddNB-4M6Fp0p-JK69b29W3Lks5qXzp8gaJpZM4JB79S.

I need both editor and viewer to be able to be included (one is an iframe,
on is embedded) in our larger project.
So the urls end in "/latest/edit" and "/latest/watch".
Really all you need is a nested tree navigation that knows the three letter
url, it will use the latest bin, and you can ignore revisions.
Here is the link to the simple jsbin manager
http://ppa.business2mobile.com/desktopmodules/PPALocal/App2/Francois/TestJSBins.html,
it should work in chrome.
Also we have built what we call the B2M Industrial Kendo SPA Generator
http://ppa.business2mobile.com/desktopmodules/PPALocal/App2/Francois/Demo.html
.

And yes there is some microsoft, but that is what sells to resource
companies in our region.
It is also fast forward and vague, but it is a big topic.
I would be thrilled if you would give it a quick look and send me your
thoughts.
Bart
On Thu, Jul 21, 2016 at 8:15 AM, Francois Payette<EMAIL_ADDRESS>wrote:

How this gets cached past the reload and cache clean is really a puzzle.

FYI, I found how this was occurring. In jsbin.js around 311 there’s code
executed on unload. So when I reload the page this gets executed before
reload, and the content is saved to the session then restored to the page.
When I clean the cache, the session and the page gets trashed, but because
the page is still open, the javascript is still in the v8 instance, in
chrome. When I reload the url, this unload code get’s executed, bam, I get
the old bin again. If I force jsbin.panels.saveOnExt to false, I then get
the new bin. One less mystery. On to why the update event does not get
fired across.
cheers,
F

On Jul 21, 2016, at 10:43 AM, Francois Payette <
<EMAIL_ADDRESS>wrote:
actually it’s in handlers/bin.js that the live flag is defined. If you
look at lib/routes.js around 894 in the latest code on github, you’ll see
that this get sets to true on the server side in the req obj if the url is
‘/watch’. So in the code I have, unless the second url is watch, spike.js
is not included. BUT there’s a long poll request pending in the browser
even when this file is not included. I wondered if there was another
notification mechanism but looking at the production jsbin.com <
http://jsbin.com/>, I see that the /js/spike.js is loaded on the second
browser that opens an anon bin, i believe its triggered in
js/chrome/infocard.js, even if the url does not contain ‘/watch’, a
behaviour that does not occur local. (spike.js get’s loaded on local only
if you have ‘/watch’ in the url.) The dynamic presence of this code, and
the doc that says codecast uses this spike mechanism leads me to believe
this is still the way the message gets across.
spike loaded or not, it looks like there’s no event fired so the bin
changes do not propagate; what’s more, clearing the cache and reloading on
this second browser does not even get the up to date bin; I see a request
go through in the db for the latest, but I still get the initial loaded bin
rendered in this second browser. How this gets cached past the reload and
cache clean is really a puzzle.
best,
F

On Jul 21, 2016, at 8:20 AM, Francois Payette <
<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:
Hey Bart, fellow Canadian eh? :-) cheers!
I looked at your video, I had only tried a few of these configs, but
none worked. Looking at the code I don't see that pro has a bearing, but
the live var in feature.js has to be true, or else the casting code
(spike.js) will not even be included, see partials/index.html at the bottom.
Cool project. Im planning on using this code base for something else,
integrating a SQL playground as well, running in a dynamic unprivileged lxc
container.
When I first came across this, a project in the dynamic teaching with
samples --pre framed problems and unit tests for autonomous learning is the
first idea that came to mind. I have 5 kids, the oldest being 10, which is
the about the age I started to get into programming. The gaming world was a
lot less interactive back then. I'm very keen on getting them to code asap,
as least the 2 older ones, to show them there is world out there besides
clashing clans and chasing pokemons. To spark their interest it has to be
dynamic. Jsbin seems like a perfect tool for this.
I fixed the port of socket.io http://socket.io/ for iOS, a few years
back, before they released the swift implementation. I might try to plug
socket.io http://socket.io/ in place of the eventlistener.js locally,
at first glance I think this is where this problem is.
Whats extra puzzling is that reloading the page after clearing the
cache will not even reload the changes in the second browser!
Way way back (2011) when I still had stuff in csharp on iis I used
signalr. I remember it scaled surprisingly well.
Cheers!
F
Sent from my iPhone
On Jul 21, 2016, at 05:23, b2m<EMAIL_ADDRESS><mailto:
<EMAIL_ADDRESS>wrote:

Francois,
I have been back and forth a few times with remy on the codecasting
issue.
The confusion was that i need to be logged in (have a pro account) to
save
my fine tuned bins for codecasting during a coding for kids course in
northern rural bc canada.
Here is the results of my more careful testing.
[image: Inline image 1]
We are actually building a platform for the new bc school curriculum
which
is based on signalr (ms version of sockets and long polling).
Sort of two way slack style messaging / codecasting the entire content
(including coding samples), with bots (as teaching assistants) and
quizzes
(maybe gamification and web based dynamic ar in the future).
No attempt to solicit or stalk you, but attached a fast forward video
of
how we are using jsbin.
Hope you get yours all working locally, it is a real puzzler.
Regards,
Bart
On Wed, Jul 20, 2016 at 3:44 PM, Francois Payette <
<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:

Hello Bart,
sorry to hear that. I’ve just recently come across jsbin; really cool
project, it’s awesome that it is MIT licensed, I can’t believe its
been
around for so long and I never looked at it before.
I’m planning on using parts of the code for something else. I ran in
a
similar issue, but it must not be the same. On the live production
website,
I can simply copy and paste the url of a recently created anonymous
bin is
a different browser (say ff and chrome) and updates from the first
window
“codecast” to the second window, I believe this is spike.js code
based
EventSource.js that’s doing its trick.
On a local install, this does not work. Even worse, after creating a
test
bin in say chrome, then going to the same url in ff, updating the
original
in chrome, I see the new bin being posted to the db, but “browser
refresh”
does not even reload the change in the second browser.
best regards,
F

On Jul 20, 2016, at 6:23 PM, b2m<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:
francois,
my question was about the live production site logged on with my
pro
account (b2mgithub).
i was trying to use the urls like this link
https://jsbin.com/blog/urls https://jsbin.com/blog/urls
or follow along with the youtube

https://www.youtube.com/watch?v=PHDThjUOJSc&list=PLXmT1r4krsTooRDWOrIu23P3SEZ3luIUq&index=12
<
https://www.youtube.com/watch?v=PHDThjUOJSc&list=PLXmT1r4krsTooRDWOrIu23P3SEZ3luIUq&index=12

none of it seems to work with my account.
i cant put my username in the url, watch, latest, auto codecast on
edit,
none of it works.
i did get a support email that it was fixed, but not really.
i missed the deadline on my project, and had to use something else.
this issue has been closed, but still doesn't work for me at all.
just try to follow along with the youtube video.
ps after all this i managed to get a local version installed on
windows
(older version).
added a little cors support, some parent window iframe messaging
in the
runner, integrated some kendo ui, and store my project in sql
server.
the end result is a super easy way to store and manage a bunch of
codecast
items (with meaningful names) as an tree (outline) for teaching a
course.
and zero time spent managing urls or versions.
bart
On Tue, Jul 19, 2016 at 4:12 PM, Francois Payette <
<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:

is this on a local installation or on the live production
website? I
have
the same behaviour on a local installation, but when I open two
anonymous
edits on the jsbin.com http://jsbin.com/ website it works
fine.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
https://github.com/jsbin/jsbin/issues/2800#issuecomment-233794155 <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-233794155>>,
or mute
the thread
<

https://github.com/notifications/unsubscribe-auth/AKWljbdJz-LTlApViDiusvb6qxQcKzx-ks5qXVnhgaJpZM4JB79S
<
https://github.com/notifications/unsubscribe-auth/AKWljbdJz-LTlApViDiusvb6qxQcKzx-ks5qXVnhgaJpZM4JB79S

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234102339 <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234102339>>, or
mute the thread <

https://github.com/notifications/unsubscribe-auth/AAjgLotZ_vQkSYahz04F1RUnyO1wautgks5qXp_vgaJpZM4JB79S
<
https://github.com/notifications/unsubscribe-auth/AAjgLotZ_vQkSYahz04F1RUnyO1wautgks5qXp_vgaJpZM4JB79S

.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/jsbin/jsbin/issues/2800#issuecomment-234107087 <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234107087>>, or
mute
the thread
<
https://github.com/notifications/unsubscribe-auth/AKWljetfiQxj3xHI4bZ35ETi3vqQKXUdks5qXqTrgaJpZM4JB79S
<
https://github.com/notifications/unsubscribe-auth/AKWljetfiQxj3xHI4bZ35ETi3vqQKXUdks5qXqTrgaJpZM4JB79S

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234201832>, or
mute the thread <
https://github.com/notifications/unsubscribe-auth/AAjgLjJhSddNB-4M6Fp0p-JK69b29W3Lks5qXzp8gaJpZM4JB79S
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234285778, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKWlja5S4E73rs1Dx1bEVEJlCOZ5mQ4gks5qX4z4gaJpZM4JB79S
.

interesting project, Bart.
Well it turns out my problem was two-fold, spike.js was not getting loaded in the code I fetched from github a few days ago, and the nginx proxy was blocking the event stream.
so even with a fresh pull it still was not working, which led me to think something else was amiss.
these ngnix proxy settings fixed it with the latest code (3.38.1)
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;

this hunt left me with a better understanding of how this works.
cheers,
F

On Jul 21, 2016, at 3:06 PM, b2m<EMAIL_ADDRESS>wrote:
Francois,
Since you were willing to watch my video and give a bit of feedback I am
sending you a live link to look at.
I need both editor and viewer to be able to be included (one is an iframe,
on is embedded) in our larger project.
So the urls end in "/latest/edit" and "/latest/watch".
Really all you need is a nested tree navigation that knows the three letter
url, it will use the latest bin, and you can ignore revisions.
Here is the link to the simple jsbin manager
http://ppa.business2mobile.com/desktopmodules/PPALocal/App2/Francois/TestJSBins.html,
it should work in chrome.
Also we have built what we call the B2M Industrial Kendo SPA Generator
http://ppa.business2mobile.com/desktopmodules/PPALocal/App2/Francois/Demo.html
.

And yes there is some microsoft, but that is what sells to resource
companies in our region.
It is also fast forward and vague, but it is a big topic.
I would be thrilled if you would give it a quick look and send me your
thoughts.
Bart
On Thu, Jul 21, 2016 at 8:15 AM, Francois Payette<EMAIL_ADDRESS>wrote:

How this gets cached past the reload and cache clean is really a puzzle.

FYI, I found how this was occurring. In jsbin.js around 311 there’s code
executed on unload. So when I reload the page this gets executed before
reload, and the content is saved to the session then restored to the page.
When I clean the cache, the session and the page gets trashed, but because
the page is still open, the javascript is still in the v8 instance, in
chrome. When I reload the url, this unload code get’s executed, bam, I get
the old bin again. If I force jsbin.panels.saveOnExt to false, I then get
the new bin. One less mystery. On to why the update event does not get
fired across.
cheers,
F

On Jul 21, 2016, at 10:43 AM, Francois Payette <
<EMAIL_ADDRESS>wrote:
actually it’s in handlers/bin.js that the live flag is defined. If you
look at lib/routes.js around 894 in the latest code on github, you’ll see
that this get sets to true on the server side in the req obj if the url is
‘/watch’. So in the code I have, unless the second url is watch, spike.js
is not included. BUT there’s a long poll request pending in the browser
even when this file is not included. I wondered if there was another
notification mechanism but looking at the production jsbin.com <
http://jsbin.com/>, I see that the /js/spike.js is loaded on the second
browser that opens an anon bin, i believe its triggered in
js/chrome/infocard.js, even if the url does not contain ‘/watch’, a
behaviour that does not occur local. (spike.js get’s loaded on local only
if you have ‘/watch’ in the url.) The dynamic presence of this code, and
the doc that says codecast uses this spike mechanism leads me to believe
this is still the way the message gets across.
spike loaded or not, it looks like there’s no event fired so the bin
changes do not propagate; what’s more, clearing the cache and reloading on
this second browser does not even get the up to date bin; I see a request
go through in the db for the latest, but I still get the initial loaded bin
rendered in this second browser. How this gets cached past the reload and
cache clean is really a puzzle.
best,
F

On Jul 21, 2016, at 8:20 AM, Francois Payette <
<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:
Hey Bart, fellow Canadian eh? :-) cheers!
I looked at your video, I had only tried a few of these configs, but
none worked. Looking at the code I don't see that pro has a bearing, but
the live var in feature.js has to be true, or else the casting code
(spike.js) will not even be included, see partials/index.html at the bottom.
Cool project. Im planning on using this code base for something else,
integrating a SQL playground as well, running in a dynamic unprivileged lxc
container.
When I first came across this, a project in the dynamic teaching with
samples --pre framed problems and unit tests for autonomous learning is the
first idea that came to mind. I have 5 kids, the oldest being 10, which is
the about the age I started to get into programming. The gaming world was a
lot less interactive back then. I'm very keen on getting them to code asap,
as least the 2 older ones, to show them there is world out there besides
clashing clans and chasing pokemons. To spark their interest it has to be
dynamic. Jsbin seems like a perfect tool for this.
I fixed the port of socket.io http://socket.io/ for iOS, a few years
back, before they released the swift implementation. I might try to plug
socket.io http://socket.io/ in place of the eventlistener.js locally,
at first glance I think this is where this problem is.
Whats extra puzzling is that reloading the page after clearing the
cache will not even reload the changes in the second browser!
Way way back (2011) when I still had stuff in csharp on iis I used
signalr. I remember it scaled surprisingly well.
Cheers!
F
Sent from my iPhone
On Jul 21, 2016, at 05:23, b2m<EMAIL_ADDRESS><mailto:
<EMAIL_ADDRESS>wrote:

Francois,
I have been back and forth a few times with remy on the codecasting
issue.
The confusion was that i need to be logged in (have a pro account) to
save
my fine tuned bins for codecasting during a coding for kids course in
northern rural bc canada.
Here is the results of my more careful testing.
[image: Inline image 1]
We are actually building a platform for the new bc school curriculum
which
is based on signalr (ms version of sockets and long polling).
Sort of two way slack style messaging / codecasting the entire content
(including coding samples), with bots (as teaching assistants) and
quizzes
(maybe gamification and web based dynamic ar in the future).
No attempt to solicit or stalk you, but attached a fast forward video
of
how we are using jsbin.
Hope you get yours all working locally, it is a real puzzler.
Regards,
Bart
On Wed, Jul 20, 2016 at 3:44 PM, Francois Payette <
<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:

Hello Bart,
sorry to hear that. I’ve just recently come across jsbin; really cool
project, it’s awesome that it is MIT licensed, I can’t believe its
been
around for so long and I never looked at it before.
I’m planning on using parts of the code for something else. I ran in
a
similar issue, but it must not be the same. On the live production
website,
I can simply copy and paste the url of a recently created anonymous
bin is
a different browser (say ff and chrome) and updates from the first
window
“codecast” to the second window, I believe this is spike.js code
based
EventSource.js that’s doing its trick.
On a local install, this does not work. Even worse, after creating a
test
bin in say chrome, then going to the same url in ff, updating the
original
in chrome, I see the new bin being posted to the db, but “browser
refresh”
does not even reload the change in the second browser.
best regards,
F

On Jul 20, 2016, at 6:23 PM, b2m<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:
francois,
my question was about the live production site logged on with my
pro
account (b2mgithub).
i was trying to use the urls like this link
https://jsbin.com/blog/urls https://jsbin.com/blog/urls
or follow along with the youtube

https://www.youtube.com/watch?v=PHDThjUOJSc&list=PLXmT1r4krsTooRDWOrIu23P3SEZ3luIUq&index=12
<
https://www.youtube.com/watch?v=PHDThjUOJSc&list=PLXmT1r4krsTooRDWOrIu23P3SEZ3luIUq&index=12

none of it seems to work with my account.
i cant put my username in the url, watch, latest, auto codecast on
edit,
none of it works.
i did get a support email that it was fixed, but not really.
i missed the deadline on my project, and had to use something else.
this issue has been closed, but still doesn't work for me at all.
just try to follow along with the youtube video.
ps after all this i managed to get a local version installed on
windows
(older version).
added a little cors support, some parent window iframe messaging
in the
runner, integrated some kendo ui, and store my project in sql
server.
the end result is a super easy way to store and manage a bunch of
codecast
items (with meaningful names) as an tree (outline) for teaching a
course.
and zero time spent managing urls or versions.
bart
On Tue, Jul 19, 2016 at 4:12 PM, Francois Payette <
<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:

is this on a local installation or on the live production
website? I
have
the same behaviour on a local installation, but when I open two
anonymous
edits on the jsbin.com http://jsbin.com/ website it works
fine.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
https://github.com/jsbin/jsbin/issues/2800#issuecomment-233794155 <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-233794155>>,
or mute
the thread
<

https://github.com/notifications/unsubscribe-auth/AKWljbdJz-LTlApViDiusvb6qxQcKzx-ks5qXVnhgaJpZM4JB79S
<
https://github.com/notifications/unsubscribe-auth/AKWljbdJz-LTlApViDiusvb6qxQcKzx-ks5qXVnhgaJpZM4JB79S

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234102339 <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234102339>>, or
mute the thread <

https://github.com/notifications/unsubscribe-auth/AAjgLotZ_vQkSYahz04F1RUnyO1wautgks5qXp_vgaJpZM4JB79S
<
https://github.com/notifications/unsubscribe-auth/AAjgLotZ_vQkSYahz04F1RUnyO1wautgks5qXp_vgaJpZM4JB79S

.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/jsbin/jsbin/issues/2800#issuecomment-234107087 <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234107087>>, or
mute
the thread
<
https://github.com/notifications/unsubscribe-auth/AKWljetfiQxj3xHI4bZ35ETi3vqQKXUdks5qXqTrgaJpZM4JB79S
<
https://github.com/notifications/unsubscribe-auth/AKWljetfiQxj3xHI4bZ35ETi3vqQKXUdks5qXqTrgaJpZM4JB79S

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234201832>, or
mute the thread <
https://github.com/notifications/unsubscribe-auth/AAjgLjJhSddNB-4M6Fp0p-JK69b29W3Lks5qXzp8gaJpZM4JB79S
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234285778, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKWlja5S4E73rs1Dx1bEVEJlCOZ5mQ4gks5qX4z4gaJpZM4JB79S
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/jsbin/jsbin/issues/2800#issuecomment-234352461, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjgLlyf26qFSznC5HMU62IMFTCMSWncks5qX8NGgaJpZM4JB79S.

Francois,
I never did get the proxy to work on my local copy.
I think you are supposed to set the url/host : website:80 (which conflicts
for me when running alongside iis)
Then when you start it up with a command prompt you send $port=8080 jsbin
(which overrides the config setting)?
My way around this was to have a page at :80, and an iframe to :8080 which
is cross domain.
To pass stuff to the parent page so I could update my sql project I used
window.addEventListener and added the following to runner.js
var state = runner.parent["source"]["jsbin"]["state"];
window.top.postMessage(JSON.stringify(state), '*');
This allows the jsbin iframe to send stuff to the parent page every time it
saves.
Then I added some 'Access-Control-Allow-Origin': '*' to the cors part of
middleware.js to allow the api to work.
If you get the nginx proxy to work on windows please tell me what you did.
Bart
On Thu, Jul 21, 2016 at 1:21 PM, Francois Payette<EMAIL_ADDRESS>wrote:

interesting project, Bart.
Well it turns out my problem was two-fold, spike.js was not getting loaded
in the code I fetched from github a few days ago, and the nginx proxy was
blocking the event stream.
so even with a fresh pull it still was not working, which led me to think
something else was amiss.
these ngnix proxy settings fixed it with the latest code (3.38.1)
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
this hunt left me with a better understanding of how this works.
cheers,
F

On Jul 21, 2016, at 3:06 PM, b2m<EMAIL_ADDRESS>wrote:
Francois,
Since you were willing to watch my video and give a bit of feedback I am
sending you a live link to look at.
I need both editor and viewer to be able to be included (one is an
iframe,
on is embedded) in our larger project.
So the urls end in "/latest/edit" and "/latest/watch".
Really all you need is a nested tree navigation that knows the three
letter
url, it will use the latest bin, and you can ignore revisions.
Here is the link to the simple jsbin manager
<
http://ppa.business2mobile.com/desktopmodules/PPALocal/App2/Francois/TestJSBins.html
,
it should work in chrome.
Also we have built what we call the B2M Industrial Kendo SPA Generator
<
http://ppa.business2mobile.com/desktopmodules/PPALocal/App2/Francois/Demo.html

.

And yes there is some microsoft, but that is what sells to resource
companies in our region.
It is also fast forward and vague, but it is a big topic.
I would be thrilled if you would give it a quick look and send me your
thoughts.
Bart
On Thu, Jul 21, 2016 at 8:15 AM, Francois Payette <
<EMAIL_ADDRESS>wrote:

How this gets cached past the reload and cache clean is really a
puzzle.

FYI, I found how this was occurring. In jsbin.js around 311 there’s
code
executed on unload. So when I reload the page this gets executed before
reload, and the content is saved to the session then restored to the
page.
When I clean the cache, the session and the page gets trashed, but
because
the page is still open, the javascript is still in the v8 instance, in
chrome. When I reload the url, this unload code get’s executed, bam, I
get
the old bin again. If I force jsbin.panels.saveOnExt to false, I then
get
the new bin. One less mystery. On to why the update event does not get
fired across.
cheers,
F

On Jul 21, 2016, at 10:43 AM, Francois Payette <
<EMAIL_ADDRESS>wrote:
actually it’s in handlers/bin.js that the live flag is defined. If
you
look at lib/routes.js around 894 in the latest code on github, you’ll
see
that this get sets to true on the server side in the req obj if the
url is
‘/watch’. So in the code I have, unless the second url is watch,
spike.js
is not included. BUT there’s a long poll request pending in the browser
even when this file is not included. I wondered if there was another
notification mechanism but looking at the production jsbin.com <
http://jsbin.com/>, I see that the /js/spike.js is loaded on the
second
browser that opens an anon bin, i believe its triggered in
js/chrome/infocard.js, even if the url does not contain ‘/watch’, a
behaviour that does not occur local. (spike.js get’s loaded on local
only
if you have ‘/watch’ in the url.) The dynamic presence of this code,
and
the doc that says codecast uses this spike mechanism leads me to
believe
this is still the way the message gets across.
spike loaded or not, it looks like there’s no event fired so the bin
changes do not propagate; what’s more, clearing the cache and
reloading on
this second browser does not even get the up to date bin; I see a
request
go through in the db for the latest, but I still get the initial
loaded bin
rendered in this second browser. How this gets cached past the reload
and
cache clean is really a puzzle.
best,
F

On Jul 21, 2016, at 8:20 AM, Francois Payette <
<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:
Hey Bart, fellow Canadian eh? :-) cheers!
I looked at your video, I had only tried a few of these configs, but
none worked. Looking at the code I don't see that pro has a bearing,
but
the live var in feature.js has to be true, or else the casting code
(spike.js) will not even be included, see partials/index.html at the
bottom.
Cool project. Im planning on using this code base for something
else,
integrating a SQL playground as well, running in a dynamic
unprivileged lxc
container.
When I first came across this, a project in the dynamic teaching
with
samples --pre framed problems and unit tests for autonomous learning
is the
first idea that came to mind. I have 5 kids, the oldest being 10,
which is
the about the age I started to get into programming. The gaming world
was a
lot less interactive back then. I'm very keen on getting them to code
asap,
as least the 2 older ones, to show them there is world out there
besides
clashing clans and chasing pokemons. To spark their interest it has to
be
dynamic. Jsbin seems like a perfect tool for this.
I fixed the port of socket.io http://socket.io/ for iOS, a few
years
back, before they released the swift implementation. I might try to
plug
socket.io http://socket.io/ in place of the eventlistener.js
locally,
at first glance I think this is where this problem is.
Whats extra puzzling is that reloading the page after clearing the
cache will not even reload the changes in the second browser!
Way way back (2011) when I still had stuff in csharp on iis I used
signalr. I remember it scaled surprisingly well.
Cheers!
F
Sent from my iPhone
On Jul 21, 2016, at 05:23, b2m<EMAIL_ADDRESS><mailto:
<EMAIL_ADDRESS>wrote:

Francois,
I have been back and forth a few times with remy on the codecasting
issue.
The confusion was that i need to be logged in (have a pro account)
to
save
my fine tuned bins for codecasting during a coding for kids course
in
northern rural bc canada.
Here is the results of my more careful testing.
[image: Inline image 1]
We are actually building a platform for the new bc school
curriculum
which
is based on signalr (ms version of sockets and long polling).
Sort of two way slack style messaging / codecasting the entire
content
(including coding samples), with bots (as teaching assistants) and
quizzes
(maybe gamification and web based dynamic ar in the future).
No attempt to solicit or stalk you, but attached a fast forward
video
of
how we are using jsbin.
Hope you get yours all working locally, it is a real puzzler.
Regards,
Bart
On Wed, Jul 20, 2016 at 3:44 PM, Francois Payette <
<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:

Hello Bart,
sorry to hear that. I’ve just recently come across jsbin; really
cool
project, it’s awesome that it is MIT licensed, I can’t believe
its
been
around for so long and I never looked at it before.
I’m planning on using parts of the code for something else. I
ran in
a
similar issue, but it must not be the same. On the live
production
website,
I can simply copy and paste the url of a recently created
anonymous
bin is
a different browser (say ff and chrome) and updates from the
first
window
“codecast” to the second window, I believe this is spike.js code
based
EventSource.js that’s doing its trick.
On a local install, this does not work. Even worse, after
creating a
test
bin in say chrome, then going to the same url in ff, updating the
original
in chrome, I see the new bin being posted to the db, but “browser
refresh”
does not even reload the change in the second browser.
best regards,
F

On Jul 20, 2016, at 6:23 PM, b2m<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:
francois,
my question was about the live production site logged on with
my
pro
account (b2mgithub).
i was trying to use the urls like this link
https://jsbin.com/blog/urls https://jsbin.com/blog/urls
or follow along with the youtube

https://www.youtube.com/watch?v=PHDThjUOJSc&list=PLXmT1r4krsTooRDWOrIu23P3SEZ3luIUq&index=12

<

https://www.youtube.com/watch?v=PHDThjUOJSc&list=PLXmT1r4krsTooRDWOrIu23P3SEZ3luIUq&index=12

none of it seems to work with my account.
i cant put my username in the url, watch, latest, auto
codecast on
edit,
none of it works.
i did get a support email that it was fixed, but not really.
i missed the deadline on my project, and had to use something
else.
this issue has been closed, but still doesn't work for me at
all.
just try to follow along with the youtube video.
ps after all this i managed to get a local version installed on
windows
(older version).
added a little cors support, some parent window iframe
messaging
in the
runner, integrated some kendo ui, and store my project in sql
server.
the end result is a super easy way to store and manage a bunch
of
codecast
items (with meaningful names) as an tree (outline) for
teaching a
course.
and zero time spent managing urls or versions.
bart
On Tue, Jul 19, 2016 at 4:12 PM, Francois Payette <
<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:

is this on a local installation or on the live production
website? I
have
the same behaviour on a local installation, but when I open
two
anonymous
edits on the jsbin.com http://jsbin.com/ website it works
fine.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
https://github.com/jsbin/jsbin/issues/2800#issuecomment-233794155 <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-233794155>>,
or mute
the thread
<

https://github.com/notifications/unsubscribe-auth/AKWljbdJz-LTlApViDiusvb6qxQcKzx-ks5qXVnhgaJpZM4JB79S

<

https://github.com/notifications/unsubscribe-auth/AKWljbdJz-LTlApViDiusvb6qxQcKzx-ks5qXVnhgaJpZM4JB79S

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <

https://github.com/jsbin/jsbin/issues/2800#issuecomment-234102339 <

https://github.com/jsbin/jsbin/issues/2800#issuecomment-234102339>>,
or

mute the thread <

https://github.com/notifications/unsubscribe-auth/AAjgLotZ_vQkSYahz04F1RUnyO1wautgks5qXp_vgaJpZM4JB79S

<

https://github.com/notifications/unsubscribe-auth/AAjgLotZ_vQkSYahz04F1RUnyO1wautgks5qXp_vgaJpZM4JB79S

.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234107087 <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234107087>>,
or
mute
the thread
<

https://github.com/notifications/unsubscribe-auth/AKWljetfiQxj3xHI4bZ35ETi3vqQKXUdks5qXqTrgaJpZM4JB79S

<

https://github.com/notifications/unsubscribe-auth/AKWljetfiQxj3xHI4bZ35ETi3vqQKXUdks5qXqTrgaJpZM4JB79S

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234201832>, or
mute the thread <

https://github.com/notifications/unsubscribe-auth/AAjgLjJhSddNB-4M6Fp0p-JK69b29W3Lks5qXzp8gaJpZM4JB79S

.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234285778,
or mute
the thread
<
https://github.com/notifications/unsubscribe-auth/AKWlja5S4E73rs1Dx1bEVEJlCOZ5mQ4gks5qX4z4gaJpZM4JB79S

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234352461>, or
mute the thread <
https://github.com/notifications/unsubscribe-auth/AAjgLlyf26qFSznC5HMU62IMFTCMSWncks5qX8NGgaJpZM4JB79S
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234371772, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKWljSobJuxGeIaQ8GyhnDY0OerTt6Uwks5qX9S9gaJpZM4JB79S
.

Bart,
I’m not on widows.
here are my nginx settings:
proxy_set_header Host            $host;
proxy_set_header X-Real-IP       $remote_addr;
#remove the next 2 if you are not over ssl
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
cheers,
F

On Jul 21, 2016, at 4:47 PM, b2m<EMAIL_ADDRESS>wrote:
Francois,
I never did get the proxy to work on my local copy.
I think you are supposed to set the url/host : website:80 (which conflicts
for me when running alongside iis)
Then when you start it up with a command prompt you send $port=8080 jsbin
(which overrides the config setting)?
My way around this was to have a page at :80, and an iframe to :8080 which
is cross domain.
To pass stuff to the parent page so I could update my sql project I used
window.addEventListener and added the following to runner.js
var state = runner.parent["source"]["jsbin"]["state"];
window.top.postMessage(JSON.stringify(state), '*');
This allows the jsbin iframe to send stuff to the parent page every time it
saves.
Then I added some 'Access-Control-Allow-Origin': '*' to the cors part of
middleware.js to allow the api to work.
If you get the nginx proxy to work on windows please tell me what you did.
Bart
On Thu, Jul 21, 2016 at 1:21 PM, Francois Payette<EMAIL_ADDRESS>wrote:

interesting project, Bart.
Well it turns out my problem was two-fold, spike.js was not getting loaded
in the code I fetched from github a few days ago, and the nginx proxy was
blocking the event stream.
so even with a fresh pull it still was not working, which led me to think
something else was amiss.
these ngnix proxy settings fixed it with the latest code (3.38.1)
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
this hunt left me with a better understanding of how this works.
cheers,
F

On Jul 21, 2016, at 3:06 PM, b2m<EMAIL_ADDRESS>wrote:
Francois,
Since you were willing to watch my video and give a bit of feedback I am
sending you a live link to look at.
I need both editor and viewer to be able to be included (one is an
iframe,
on is embedded) in our larger project.
So the urls end in "/latest/edit" and "/latest/watch".
Really all you need is a nested tree navigation that knows the three
letter
url, it will use the latest bin, and you can ignore revisions.
Here is the link to the simple jsbin manager
<
http://ppa.business2mobile.com/desktopmodules/PPALocal/App2/Francois/TestJSBins.html
,
it should work in chrome.
Also we have built what we call the B2M Industrial Kendo SPA Generator
<
http://ppa.business2mobile.com/desktopmodules/PPALocal/App2/Francois/Demo.html

.

And yes there is some microsoft, but that is what sells to resource
companies in our region.
It is also fast forward and vague, but it is a big topic.
I would be thrilled if you would give it a quick look and send me your
thoughts.
Bart
On Thu, Jul 21, 2016 at 8:15 AM, Francois Payette <
<EMAIL_ADDRESS>wrote:

How this gets cached past the reload and cache clean is really a
puzzle.

FYI, I found how this was occurring. In jsbin.js around 311 there’s
code
executed on unload. So when I reload the page this gets executed before
reload, and the content is saved to the session then restored to the
page.
When I clean the cache, the session and the page gets trashed, but
because
the page is still open, the javascript is still in the v8 instance, in
chrome. When I reload the url, this unload code get’s executed, bam, I
get
the old bin again. If I force jsbin.panels.saveOnExt to false, I then
get
the new bin. One less mystery. On to why the update event does not get
fired across.
cheers,
F

On Jul 21, 2016, at 10:43 AM, Francois Payette <
<EMAIL_ADDRESS>wrote:
actually it’s in handlers/bin.js that the live flag is defined. If
you
look at lib/routes.js around 894 in the latest code on github, you’ll
see
that this get sets to true on the server side in the req obj if the
url is
‘/watch’. So in the code I have, unless the second url is watch,
spike.js
is not included. BUT there’s a long poll request pending in the browser
even when this file is not included. I wondered if there was another
notification mechanism but looking at the production jsbin.com <
http://jsbin.com/>, I see that the /js/spike.js is loaded on the
second
browser that opens an anon bin, i believe its triggered in
js/chrome/infocard.js, even if the url does not contain ‘/watch’, a
behaviour that does not occur local. (spike.js get’s loaded on local
only
if you have ‘/watch’ in the url.) The dynamic presence of this code,
and
the doc that says codecast uses this spike mechanism leads me to
believe
this is still the way the message gets across.
spike loaded or not, it looks like there’s no event fired so the bin
changes do not propagate; what’s more, clearing the cache and
reloading on
this second browser does not even get the up to date bin; I see a
request
go through in the db for the latest, but I still get the initial
loaded bin
rendered in this second browser. How this gets cached past the reload
and
cache clean is really a puzzle.
best,
F

On Jul 21, 2016, at 8:20 AM, Francois Payette <
<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:
Hey Bart, fellow Canadian eh? :-) cheers!
I looked at your video, I had only tried a few of these configs, but
none worked. Looking at the code I don't see that pro has a bearing,
but
the live var in feature.js has to be true, or else the casting code
(spike.js) will not even be included, see partials/index.html at the
bottom.
Cool project. Im planning on using this code base for something
else,
integrating a SQL playground as well, running in a dynamic
unprivileged lxc
container.
When I first came across this, a project in the dynamic teaching
with
samples --pre framed problems and unit tests for autonomous learning
is the
first idea that came to mind. I have 5 kids, the oldest being 10,
which is
the about the age I started to get into programming. The gaming world
was a
lot less interactive back then. I'm very keen on getting them to code
asap,
as least the 2 older ones, to show them there is world out there
besides
clashing clans and chasing pokemons. To spark their interest it has to
be
dynamic. Jsbin seems like a perfect tool for this.
I fixed the port of socket.io http://socket.io/ for iOS, a few
years
back, before they released the swift implementation. I might try to
plug
socket.io http://socket.io/ in place of the eventlistener.js
locally,
at first glance I think this is where this problem is.
Whats extra puzzling is that reloading the page after clearing the
cache will not even reload the changes in the second browser!
Way way back (2011) when I still had stuff in csharp on iis I used
signalr. I remember it scaled surprisingly well.
Cheers!
F
Sent from my iPhone
On Jul 21, 2016, at 05:23, b2m<EMAIL_ADDRESS><mailto:
<EMAIL_ADDRESS>wrote:

Francois,
I have been back and forth a few times with remy on the codecasting
issue.
The confusion was that i need to be logged in (have a pro account)
to
save
my fine tuned bins for codecasting during a coding for kids course
in
northern rural bc canada.
Here is the results of my more careful testing.
[image: Inline image 1]
We are actually building a platform for the new bc school
curriculum
which
is based on signalr (ms version of sockets and long polling).
Sort of two way slack style messaging / codecasting the entire
content
(including coding samples), with bots (as teaching assistants) and
quizzes
(maybe gamification and web based dynamic ar in the future).
No attempt to solicit or stalk you, but attached a fast forward
video
of
how we are using jsbin.
Hope you get yours all working locally, it is a real puzzler.
Regards,
Bart
On Wed, Jul 20, 2016 at 3:44 PM, Francois Payette <
<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:

Hello Bart,
sorry to hear that. I’ve just recently come across jsbin; really
cool
project, it’s awesome that it is MIT licensed, I can’t believe
its
been
around for so long and I never looked at it before.
I’m planning on using parts of the code for something else. I
ran in
a
similar issue, but it must not be the same. On the live
production
website,
I can simply copy and paste the url of a recently created
anonymous
bin is
a different browser (say ff and chrome) and updates from the
first
window
“codecast” to the second window, I believe this is spike.js code
based
EventSource.js that’s doing its trick.
On a local install, this does not work. Even worse, after
creating a
test
bin in say chrome, then going to the same url in ff, updating the
original
in chrome, I see the new bin being posted to the db, but “browser
refresh”
does not even reload the change in the second browser.
best regards,
F

On Jul 20, 2016, at 6:23 PM, b2m<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:
francois,
my question was about the live production site logged on with
my
pro
account (b2mgithub).
i was trying to use the urls like this link
https://jsbin.com/blog/urls https://jsbin.com/blog/urls
or follow along with the youtube

https://www.youtube.com/watch?v=PHDThjUOJSc&list=PLXmT1r4krsTooRDWOrIu23P3SEZ3luIUq&index=12

<

https://www.youtube.com/watch?v=PHDThjUOJSc&list=PLXmT1r4krsTooRDWOrIu23P3SEZ3luIUq&index=12

none of it seems to work with my account.
i cant put my username in the url, watch, latest, auto
codecast on
edit,
none of it works.
i did get a support email that it was fixed, but not really.
i missed the deadline on my project, and had to use something
else.
this issue has been closed, but still doesn't work for me at
all.
just try to follow along with the youtube video.
ps after all this i managed to get a local version installed on
windows
(older version).
added a little cors support, some parent window iframe
messaging
in the
runner, integrated some kendo ui, and store my project in sql
server.
the end result is a super easy way to store and manage a bunch
of
codecast
items (with meaningful names) as an tree (outline) for
teaching a
course.
and zero time spent managing urls or versions.
bart
On Tue, Jul 19, 2016 at 4:12 PM, Francois Payette <
<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:

is this on a local installation or on the live production
website? I
have
the same behaviour on a local installation, but when I open
two
anonymous
edits on the jsbin.com http://jsbin.com/ website it works
fine.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
https://github.com/jsbin/jsbin/issues/2800#issuecomment-233794155 <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-233794155>>,
or mute
the thread
<

https://github.com/notifications/unsubscribe-auth/AKWljbdJz-LTlApViDiusvb6qxQcKzx-ks5qXVnhgaJpZM4JB79S

<

https://github.com/notifications/unsubscribe-auth/AKWljbdJz-LTlApViDiusvb6qxQcKzx-ks5qXVnhgaJpZM4JB79S

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <

https://github.com/jsbin/jsbin/issues/2800#issuecomment-234102339 <

https://github.com/jsbin/jsbin/issues/2800#issuecomment-234102339>>,
or

mute the thread <

https://github.com/notifications/unsubscribe-auth/AAjgLotZ_vQkSYahz04F1RUnyO1wautgks5qXp_vgaJpZM4JB79S

<

https://github.com/notifications/unsubscribe-auth/AAjgLotZ_vQkSYahz04F1RUnyO1wautgks5qXp_vgaJpZM4JB79S

.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234107087 <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234107087>>,
or
mute
the thread
<

https://github.com/notifications/unsubscribe-auth/AKWljetfiQxj3xHI4bZ35ETi3vqQKXUdks5qXqTrgaJpZM4JB79S

<

https://github.com/notifications/unsubscribe-auth/AKWljetfiQxj3xHI4bZ35ETi3vqQKXUdks5qXqTrgaJpZM4JB79S

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234201832>, or
mute the thread <

https://github.com/notifications/unsubscribe-auth/AAjgLjJhSddNB-4M6Fp0p-JK69b29W3Lks5qXzp8gaJpZM4JB79S

.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234285778,
or mute
the thread
<
https://github.com/notifications/unsubscribe-auth/AKWlja5S4E73rs1Dx1bEVEJlCOZ5mQ4gks5qX4z4gaJpZM4JB79S

.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234352461>, or
mute the thread <
https://github.com/notifications/unsubscribe-auth/AAjgLlyf26qFSznC5HMU62IMFTCMSWncks5qX8NGgaJpZM4JB79S
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234371772, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKWljSobJuxGeIaQ8GyhnDY0OerTt6Uwks5qX9S9gaJpZM4JB79S
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/jsbin/jsbin/issues/2800#issuecomment-234379205, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjgLkPpiERuQ6POPph67ruMslH08iL7ks5qX9r8gaJpZM4JB79S.

@francoisp as much as I appreciate the contributions, can you both discuss offline configuration on another thread. There's a bunch of conversation in here that I'm unclear whether is right or wrong and really I want to close off whether code casting is working or not. Cheers.
@b2mgithub I appreciate the video, but I can't actually tell what the situation is when code casting fails. Can you reupload but at normal speed? Or even better, isolate the failing example and show the process starting with an empty browser (don't skip the initial creation).
I also see you're trying to test code casting from the same window (where you make the change in one tab, then move to another tab). This isn't code casting, and the when the tab is hidden, the code casting turns off. If you want to test chrome to chrome (for instance) you need two windows, not two tabs (I can go into technical reasons why I don't cast to the out of focus tab if you want).
Final note, you mentioned "jsbin support doesn't…"—in case you weren't aware (and it's likely you are), this conversation is happening on github, not jsbin: https://github.com/jsbin/jsbin/issues/2800
Thanks. Looking forward to seeing the updated examples.
– Remy

Oh, one thing I picked up from your issue comments: you're using /watch on the URL. Don't. I've been meaning to remove this entirely. Code casting is built into the /edit URL (watch is legacy and will be removed, no functionality will be lost).

@remy terribly sorry, was unaware you and github were still in the loop. Code cast now works fine for me, local, behind a proxy over ssl. These 4 additional settings are required for the x-stream updates of EventSource.js to go through the nginx proxy:
proxy_set_header Connection '';
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;

Again, great project, thanks for releasing MIT. That other PR I pushed to github to store in a pgsql database got quite a few bug fixes along the way; I'll be using only that going forward,
cheers,
F

@remy,
also sorry to have continued with this thread, am done with the cross talk
again go ahead and close the issue, it now works the way you demonstrated.
the fast forward video shows the same results as the chart in fast forward.
you can actually see two windows (or tabs) and chrome vs firefox and logged
on/not.
just trying to show i tried all the combinations listed.
in the end i found a great solution to my usage case, which is teaching a
half dozen kids simple coding in an rural farming town in northern canada.
even though i am using an older local version and did not completely solve
the nginx proxy on windows to be able to use port 80.
with a few lines of cors and a parent window message from the cross domain
bin it works great.
i can have a nested outline style tree of named examples, and a simple link
to edit or watch the latest one.
and it doesn't matter if i use two tabs in the same chrome browser.
i use ms signalr to edit while they watch and live push the desired bin to
all the kids laptops while teaching.
there is no versions or snapshots visible, and they can modify their own
bin.
when the course is over, i can run an sqlite script to reset the course
content.
will shut up now and get back to work.
thanks again,
bart
On Thu, Jul 21, 2016 at 11:10 PM, Remy Sharp<EMAIL_ADDRESS>wrote:

Oh, one thing I picked up from your issue comments: you're using /watch
on the URL. Don't. I've been meaning to remove this entirely. Code casting
is built into the /edit URL (watch is legacy and will be removed, no
functionality will be lost).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234462602, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKWljU9Zmo30_otqpzz8WSKrh1h2Beqnks5qYF7sgaJpZM4JB79S
.

Ha. Good to hear on all fronts then! I was getting a bit confused there!
Thanks all.
On Fri, 22 Jul 2016, 08:38 b2m<EMAIL_ADDRESS>wrote:

@remy,
also sorry to have continued with this thread, am done with the cross talk
again go ahead and close the issue, it now works the way you demonstrated.
the fast forward video shows the same results as the chart in fast forward.
you can actually see two windows (or tabs) and chrome vs firefox and logged
on/not.
just trying to show i tried all the combinations listed.
in the end i found a great solution to my usage case, which is teaching a
half dozen kids simple coding in an rural farming town in northern canada.
even though i am using an older local version and did not completely solve
the nginx proxy on windows to be able to use port 80.
with a few lines of cors and a parent window message from the cross domain
bin it works great.
i can have a nested outline style tree of named examples, and a simple link
to edit or watch the latest one.
and it doesn't matter if i use two tabs in the same chrome browser.
i use ms signalr to edit while they watch and live push the desired bin to
all the kids laptops while teaching.
there is no versions or snapshots visible, and they can modify their own
bin.
when the course is over, i can run an sqlite script to reset the course
content.
will shut up now and get back to work.
thanks again,
bart
On Thu, Jul 21, 2016 at 11:10 PM, Remy Sharp<EMAIL_ADDRESS>wrote:

Oh, one thing I picked up from your issue comments: you're using /watch
on the URL. Don't. I've been meaning to remove this entirely. Code
casting
is built into the /edit URL (watch is legacy and will be removed, no
functionality will be lost).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234462602, or
mute
the thread
<
https://github.com/notifications/unsubscribe-auth/AKWljU9Zmo30_otqpzz8WSKrh1h2Beqnks5qYF7sgaJpZM4JB79S
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jsbin/jsbin/issues/2800#issuecomment-234475483, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAA1hHpe0mrRox1y83qE5myLvEmyRxabks5qYHNdgaJpZM4JB79S
.


chatqna-ui helm chart - nginx reverse proxy

Description
This PR adds an nginx reverse proxy to the ChatQnA UI helm chart which allows the path to the chatqna pod and the data-prep pod to be configured at deploy time. This also has the benefit that it removes CORS errors
Issues
#276
Type of change
List the type of change like below. Please delete options that are not relevant.

[X] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds new functionality)
[ ] Breaking change (fix or feature that would break existing design and interface)

Dependencies
List the newly introduced 3rd party dependency if exists.
Tests
Describe the tests that you ran to verify your changes.

@SeanCondon please fix the DCO failure. You may need to 'git commit -s' to add the sign-off-by line in your commit message

I think we also need to disable the 'helm test' for this case(i.e. delete the testpod definition). Since we can't have a backward dependency from ui to backend in this repo layout.

Regarding this, I saw @jaswanth8888 has fixed the issue https://github.com/opea-project/GenAIExamples/issues/493 on defining the urls during build. But it does not clean up the CORS issue. Maybe can @SeanCondon and @jaswanth8888 get aligned here? So that we would have same logic for the UI in both docker and kubernetes case?

I think we also need to disable the 'helm test' for this case(i.e. delete the testpod definition). Since we can't have a backward dependency from ui to backend in this repo layout.

This is correct - it is a side effect of the strict checking of downstream dependencies by nginx pod.

Thanks @SeanCondon for creating this PR. Regarding this, I saw @jaswanth8888 has fixed the issue opea-project/GenAIExamples#493 on defining the urls during build. But it does not clean up the CORS issue. Maybe can @SeanCondon and @jaswanth8888 get aligned here? So that we would have same logic for the UI in both docker and kubernetes case?

@Ruoyu-y I have created a PR in GenAIExamples/ChatQnA that addresses this in the docker-compose case. I will come back and adjust this PR is that one is merged.

@SeanCondon @Ruoyu-y has merged a PR #377 to add the nginx reverse proxy at chatqna e2e level. So I'm wondering if this PR is still needed or not?

@SeanCondon @Ruoyu-y has merged a PR #377 to add the nginx reverse proxy at chatqna e2e level. So I'm wondering if this PR is still needed or not?

Thanks for letting me know about #377 - I had not seen it. If the problem is solved then this change is not needed. Please feel free to reopen if needed.  cc @Ruoyu-y.
Please see https://github.com/opea-project/GenAIExamples/pull/616 where I address this for docker compose.