Shop OBEX P1 Docs P2 Docs Learn Events
Program your Prop with Blockly in Internet Explorer! (testing) — Parallax Forums

Program your Prop with Blockly in Internet Explorer! (testing)

RaymanRayman Posts: 14,659
edited 2014-04-17 18:08 in Propeller 1
I'm testing out Prop programming using ActiveX.

I think it's working, but only on Windows and possibly only with IE.

Basically, I've just embedded Propellent into an ActiveX control...

Right now, I just have it find the Propeller, but that's enough to know it's working.

When I get it fully running, I'll get it "signed" so that it won't give as many security warnings.

If you trust me completely and are very brave, you can try it here:
http://www.rayslogic.com/Propeller/Programming/Blockly/ActiveX/FindMyProp.htm

Until I get it signed, I don't think Win8 will let it run at all, but seems to work on WIn7, for me at least.

Update: See post #42 in this thread for latest test page.
«1

Comments

  • Heater.Heater. Posts: 21,230
    edited 2014-04-04 15:27
    Rayman,

    Why are you tempting us with this?

    In this modern web centric world there is no place for things that only work on legacy operating systems.

    If you really want to program a Prop from a browser check out what is happening here http://forums.parallax.com/showthread.php/152711-A-Propeller-WebTool-Framework-for-Compiled-Languages/page27

  • jazzedjazzed Posts: 11,803
    edited 2014-04-04 15:59
    Heater. wrote: »
    In this modern web centric world there is no place for things that only work on legacy operating systems.
    I may get blasted for this, but isn't CPM (run on Z80) a legacy operating system? Seems a bit ironic.

    As far as the subject goes, I'm guessing using I.E. is just a stepping stone although it's the only ActiveX supporter.

    I've recently been doing some "competitive analysis" ... The mbed system is pretty nice and friendly too. The only problem(s) I found with it really is that (for the device I was testing at least) the compiled image must be downloaded from the server to work and the compiler seems to run on the server (not scalable). Downloading a binary to the client is not very phone or tablet friendly as far as I can tell. Just something to think about.
  • Heater.Heater. Posts: 21,230
    edited 2014-04-04 16:55
    Jazzed,

    I may get blasted for this, but isn't CPM (run on Z80) a legacy operating system? Seems a bit ironic.
    Yes of course, CP/M is about as legacy as you can get.

    Nobody is suggesting we base the tools we need today on CP/M.

    Point is that those of us who have lived through the plethora of now obsolete operating systems don't want to do it any more. And we advise the young generation not to fall for it either.

    mbed is a pile of .NET nonsense if I remember correctly.

    I bet that for your "competitive analysis" the Espruino would work out better.
  • jazzedjazzed Posts: 11,803
    edited 2014-04-04 17:00
    Wishing I had an Osborne ;-)
    Heater. wrote: »
    I bet that for your "competitive analysis" the Espruino would work out better.
    Didn't know that anyone was giving that away at EELive!

    So far mbed has been a joy to use.
  • Heater.Heater. Posts: 21,230
    edited 2014-04-04 17:13
    Jazzed,

    Of course not. There is nothing interesting going on at EELive. Unless Intel is giving away their Raspberry Pi competitor board.

    Or unless you bump into my boss there.

    mbed may well be orgasmic. No idea. As far as I know it's a one horse solution.
  • Roy ElthamRoy Eltham Posts: 3,000
    edited 2014-04-04 17:34
    Rayman,
    I couldn't run this with IE 10 default settings on my Win7 64bit machine. I tell it to install, and then it says it prevented the software from running because it has an unknown publisher.
    Adding your site as a trusted site makes no difference. I had to change my security settings to enable/prompt to both allow installing and running unsigned activeX controls.

    Once I changed my settings, I was able to install the control and get the button, and clicking the button found my Activity board Prop on com42.

    Roy
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2014-04-04 17:37
    The mbed system is pretty nice and friendly too

    I've had great luck with the mbed system, It worked well for me.

    RE:activex

    Yuk! :)
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2014-04-04 17:42
    re: http://www.rayslogic.com

    Some versions of IE may only let you add a https site. To do that it would have to be set up on the server first.
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2014-04-04 17:46
    ActiveX.png


    This is all I get and I did try to add the site.
    743 x 428 - 33K
  • RaymanRayman Posts: 14,659
    edited 2014-04-04 17:53
    Roy, Bob, you are both very nice to try this for me, thanks!

    Bob, when you get to the "Trusted Sites" place in internet settings, look down for a checkbox for "HTTPS only" and uncheck it and then you can add my site to the trusted list.

    Now that I know it will work, I can work on getting it certified, blessed, trusted and whatever else it takes to make it work.
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2014-04-04 18:06
    Prop_Found)ActiveX_2.png

    Roy, Bob, you are both very nice to try this for me, thanks!

    Anytime! Thankyou for all the creative things you do. :cool:

    re:Trusted Sites" place in internet settings, look down for a checkbox for "HTTPS only" and uncheck it

    Yes, that works, however some of us have reasons that we can't use that setting on a day to day basic however, for a test I did it it and if I really wanted to use propellant I could enable and disable as required.

    It found the prop.
    708 x 484 - 26K
  • frank freedmanfrank freedman Posts: 1,983
    edited 2014-04-04 23:57
    IE11
    Win8.1
    SurfaePro

    After recommendations on security, loads and tries to run when button pressed

    result is a dialog box titled MFCActiveXControl2. showing the message: DLL failed to load.
    No further details reported.
  • RaymanRayman Posts: 14,659
    edited 2014-04-05 03:54
    Thanks Frank. It didn't work on my Win8 box either.
    I hope that it is only because it isn't signed and everything yet...
  • frank freedmanfrank freedman Posts: 1,983
    edited 2014-04-05 11:40
    any clue which DLL is the one it can not find? I'm guessing it is specific to the windows side rather than the browser.

    f
  • RaymanRayman Posts: 14,659
    edited 2014-04-05 11:56
    Actually, I was just reading that IE in Win8 runs in "Protected" mode and the way I'm creating the Propellant.dll file now won't work...
    But, I found some instructions on CodeGuru on how to fix it...
  • David BetzDavid Betz Posts: 14,516
    edited 2014-04-05 12:11
    jazzed wrote: »
    The only problem(s) I found with it really is that (for the device I was testing at least) the compiled image must be downloaded from the server to work and the compiler seems to run on the server (not scalable).
    Why do you say it's not scalable? There are plenty of web sites that serve zillions of people. The technology exists for doing cloud-based processing. It *is* scalable.
  • Heater.Heater. Posts: 21,230
    edited 2014-04-05 12:19
    Clearly if all the work in you web IDE happens in the browser then it has already automatically scaled to the number of users you have.
    If the compilation happens on the server then someone has to take care of that infrastructure and pay for it. For millions of users they may be a significant task/cost.
    So, there is scalable and there is scalable.
  • David BetzDavid Betz Posts: 14,516
    edited 2014-04-05 21:40
    Heater. wrote: »
    Clearly if all the work in you web IDE happens in the browser then it has already automatically scaled to the number of users you have.
    If the compilation happens on the server then someone has to take care of that infrastructure and pay for it. For millions of users they may be a significant task/cost.
    So, there is scalable and there is scalable.
    True there is a cost to scaling but it isn't impossible. Also, if you have a local server in a classroom then that scales pretty well I think.
  • msrobotsmsrobots Posts: 3,709
    edited 2014-04-05 23:18
    @RAY,

    I am happy to test this with my Online Editor. No Problem to support more then one loader. But I run mostly Win 8.1 ...

    It is Windows only, but - well - just @Heater can't test it therefore ...

    BTW @Heater - can you integrate a loader in you node server? I installed node on windows to check out emscripten and it was quite painless to install...

    Enjoy!

    Mike
  • Heater.Heater. Posts: 21,230
    edited 2014-04-05 23:57
    msrobots,

    ...can you integrate a loader in you node server?
    The thought had crossed my mind. Let's see...
  • RaymanRayman Posts: 14,659
    edited 2014-04-06 04:10
    That would be neat. I'm planning to just expose all the Propellent.dll functions so that they can be called from Javascript (or whatever).
    Just need some time to finish it up, hopefully this week...


    msrobots wrote: »
    @RAY,

    I am happy to test this with my Online Editor. No Problem to support more then one loader. But I run mostly Win 8.1 ...

    It is Windows only, but - well - just @Heater can't test it therefore ...

    BTW @Heater - can you integrate a loader in you node server? I installed node on windows to check out emscripten and it was quite painless to install...

    Enjoy!

    Mike
  • Heater.Heater. Posts: 21,230
    edited 2014-04-06 04:19
    Ray,

    Exposing the functions of a dll does not really help JavaScript. At least not JS run under node.js. Not unless someone wants to write a node.js module to interface the JS to the C/C++ dll.

    It's easier to just invoke a compiler / loader commands from a script. JS or Python or whatever. The compile/load commands could be using propellent but then why not just use openspin and the loader from propgcc?

    Of course what I'm planning on doing is compiling the propgcc propeller loader with Emscripten so that we get a JavaScript loader than can just called from a node.js program. That can be bolted into the node.js webserver very easily.
  • RaymanRayman Posts: 14,659
    edited 2014-04-06 04:31
    Well, my plan is to use this for Blockly, so that kids can program a Propeller without seeing any code...

    It could be used by other things though. You could just have a text window with Spin code and a program button, for example...

    Or, you could have a web page full of buttons where each one programmed a different demo into the Prop..
  • Heater.Heater. Posts: 21,230
    edited 2014-04-06 05:10
    Isn't Blocky written in JavaScript that runs in a browser?

    We already have a text window with Spin code and a compile button. See msrobots openspin.js based web IDE: http://the.linuxd.org:3000/editor17/editor17.html

    I'm hoping the "Program" button can be made as easily.
  • RaymanRayman Posts: 14,659
    edited 2014-04-06 06:42
    There may be a problem using this for a web IDE... The problem is with object files.

    For Blockly, I think I'm going to have to embed things like "fullduplexserial.spin" in the ActiveX and then extract it to a temporary folder for Propellent to compile with.
    For a handful of standard library files, that should be too much trouble.

    But, I'm not sure how to handle custom objects right now...
  • Heater.Heater. Posts: 21,230
    edited 2014-04-06 08:11
    I'm not sure what the problem is. Are you saying Propellent needs a file system to fetch source files from and right binaries to?

    This is an issue with openspin compiled to JavaScript. Luckily the Emscripten compiler also include a file system API (files are actually in RAM or course). In this way openspin needs no changes to the original C code to work in the browser. We just fetch the source files from a server or local file system upload, write them to the Emscripten files system and then start the openspin compiler. When it's done just read the binaries from the Emscripten files system. Files can also be embedded into the javascript that the browser loads. That might be useful for library objects but we have not used that.

    I have no idea about ActiveX, perhaps it has some similar "pseudo" file system mechanisms available.
  • RaymanRayman Posts: 14,659
    edited 2014-04-06 08:34
    It's not a limitation of ActiveX, it's the propellent dll. It wants real files...
  • Heater.Heater. Posts: 21,230
    edited 2014-04-06 08:39
    Yeah. Of course a browser should not allow ActiveX access to real files. That's a big security hole.
  • RaymanRayman Posts: 14,659
    edited 2014-04-06 12:08
    On Windows7 ActiveX can access your files. That's why you should be very careful about what ActiveX files you allow to run and why Windows gives you so many warnings...

    WIndows8 only lets ActiveX have direct access to files in certain temporary directories. Actually, you can enable this on WIn7 in IE11 too by checking the "protected mode" box in Internet Options.
  • msrobotsmsrobots Posts: 3,709
    edited 2014-04-07 16:21
    Ray,
    Rayman wrote: »
    Actually, I was just reading that IE in Win8 runs in "Protected" mode and the way I'm creating the Propellant.dll file now won't work...
    But, I found some instructions on CodeGuru on how to fix it...

    Do not get stopped by @Heater.. He just hates windows. Besides of that issue he is a very helpful guy and I do really enjoy the journey with him using JavaScript, emscripten and html5.

    So please continue your effort to get it running on Windows ate. As more loaders I can support in the editor as better.

    Enjoy!

    Mike
Sign In or Register to comment.