Quantcast
Channel: ClearScript
Viewing all 2297 articles
Browse latest View live

New Post: Global window object

$
0
0
Hi AndersBillLinden,

I meant DOM implementation that uses clearscript.

We aren't aware of one, but we would hope that any existing .NET implementation of the DOM would be easy to expose via ClearScript.

But that is what browsers do, I presume. How can it be more expensive than exposing host methods?

When support for HostItemFlags.GlobalMembers is enabled (as it is by default), V8 calls back to the host for all global property access, such as when a script reads or writes a global variable, or retrieves a JavaScript built-in such as Math, String, Function, etc.

When V8ScriptEngineFlags.DisableGlobalMembers is in effect, this doesn't happen. Global properties are read and written without the host's involvement. Obviously if the global property is a host object, then accessing its members still involves the host, but retrieving a reference to the host object itself does not.

With recent efforts to make JavaScript code more modular and less reliant on global data, the impact may be reduced, but ClearScriptBenchmarks clearly shows that disabling support for HostItemFlags.GlobalMembers makes a huge difference for SunSpider performance.

Good luck!

New Post: Problem dealing with arrays in VBScript

$
0
0
Thanks for the quick reply!

A global option for array marshaling would be perfect, if it'd be possible to add it at some point. And thanks for the suggestion of a translation layer - I'm not sure why I didn't think of that before. That may well solve most of the problems we've currently got.

Cheers,

Owen

New Post: You guys should totally make this work with NuGet

$
0
0
Just a suggestion. I've had to switch to a different project (Jurassic) because I had way too much trouble with ClearScript, which I'd kind of wanted to use. The problems I had were:
  • The NuGet package ClearScript.V8 didn't actually come with the native V8 dependencies which it requires to do anything useful with V8, and you don't offer a binary build on CodeProject which can be easily downloaded and added to a project without having to try and build myself.
  • Following your instructions and the provided V8 build script I was unable to build V8 myself due to some kind of V8 build error (gyp?)
  • Eventually I managed to extract a working build from another NuGet project, ClearScript.Manager which worked great on my local machine, but after all that, it doesn't work on my server, which is Windows Server 2012, 64 bit. I think I read somewhere in your discussions that this is a known issue?
Anyway, would love to see a bit more progress on this front. You have a great project but the challenges presented are currently insurmountable for my purposes.

New Post: You guys should totally make this work with NuGet

$
0
0
Greetings!

Sorry to hear about the problems you had with ClearScript. As you mentioned, we don't distribute binaries and can't help with the NuGet package issues you encountered. We do however want to make it as easy as possible to build ClearScript and would love to know more about what went wrong there.

Cheers!

Created Unassigned: Error trying to build ClearScript [52]

$
0
0
Hi people. First of all, ClearScript is great, thank you.

Now, i'm trying to build it from the scrath and i think that is something wrong with build events in some vcxproj files like j2c and postmortem-metadata: It's giving me errors like this:

1> generate
3> gen-postmortem-metadata
1> bash: cygpath: command not found
3> bash: cygpath: command not found
1> bash: python: command not found
3> bash: python: command not found

Those scripts are calling cygpath and python inside bash (cygwin?), but cygpath and python are installed as windows common binaries in my PATH.

Can someone help me? Thanks a lot :) (And sorry for my awful english)

Commented Unassigned: Error trying to build ClearScript [52]

$
0
0
Hi people. First of all, ClearScript is great, thank you.

Now, i'm trying to build it from the scrath and i think that is something wrong with build events in some vcxproj files like j2c and postmortem-metadata: It's giving me errors like this:

1> generate
3> gen-postmortem-metadata
1> bash: cygpath: command not found
3> bash: cygpath: command not found
1> bash: python: command not found
3> bash: python: command not found

Those scripts are calling cygpath and python inside bash (cygwin?), but cygpath and python are installed as windows common binaries in my PATH.

Can someone help me? Thanks a lot :) (And sorry for my awful english)
Comments: Greetings! How are you building ClearScript? Are you following the instructions in the [ReadMe](https://clearscript.codeplex.com/SourceControl/latest#ReadMe.txt) and using the V8Update script? Are you using the default, tested version of V8? Thanks!

Commented Unassigned: Error trying to build ClearScript [52]

$
0
0
Hi people. First of all, ClearScript is great, thank you.

Now, i'm trying to build it from the scrath and i think that is something wrong with build events in some vcxproj files like j2c and postmortem-metadata: It's giving me errors like this:

1> generate
3> gen-postmortem-metadata
1> bash: cygpath: command not found
3> bash: cygpath: command not found
1> bash: python: command not found
3> bash: python: command not found

Those scripts are calling cygpath and python inside bash (cygwin?), but cygpath and python are installed as windows common binaries in my PATH.

Can someone help me? Thanks a lot :) (And sorry for my awful english)
Comments: Hi! Yes, i'm following all the instructions. I had run the V8Update.cmd (and retried with /N Debug) and it downloaded python, gyp and cygwin. It stopped at "Building 32-bit V8 ... *** THE PREVIOUS STEP FAILED ***". Looking at build.log I saw this: CustomBuild: js2c, and also js2c_experimental bash: cygpath: command not found bash: python: command not found CustomBuild: generate bash: cygpath: command not found bash: python: command not found js2c.vcxproj really have this calls as bash arguments. It's the correct behaviour? <Command>call call &quot;$(ProjectDir)..\..\third_party\cygwin\setup_env.bat&quot; &amp;&amp; set CYGWIN=nontsec&amp;&amp; set OUTDIR=$(OutDir)&amp;&amp; __bash -c &quot;\&quot;python\&quot; \&quot;../../tools/js2c.py\&quot; \&quot;`cygpath -m \\\&quot;${OUTDIR}\\\&quot;`obj/global_intermediate/libraries.cc\&quot; \&quot;CORE\&quot; \&quot;off\&quot; \&quot;../../src/runtime.js\&quot; \&quot;../../src/v8natives.js\&quot; \&quot;../../src/array.js\&quot; \&quot;../../src/string.js\&quot; \&quot;../../src/uri.js\&quot; \&quot;../../src/math.js\&quot; \&quot;../../src/messages.js\&quot; \&quot;../../src/apinatives.js\&quot; \&quot;../../src/debug-debugger.js\&quot; \&quot;../../src/mirror-debugger.js\&quot; \&quot;../../src/liveedit-debugger.js\&quot; \&quot;../../src/date.js\&quot; \&quot;../../src/json.js\&quot; \&quot;../../src/regexp.js\&quot; \&quot;../../src/arraybuffer.js\&quot; \&quot;../../src/typedarray.js\&quot; \&quot;../../src/macros.py\&quot;&quot;&#xD;&#xA;if %errorlevel% neq 0 exit /b %errorlevel%&#xD;&#xA;call set CYGWIN=nontsec&amp;&amp; set OUTDIR=$(OutDir)&amp;&amp; bash -c &quot;\&quot;python\&quot; \&quot;../../tools/js2c.py\&quot; \&quot;`cygpath -m \\\&quot;${OUTDIR}\\\&quot;`obj/global_intermediate/experimental-libraries.cc\&quot; \&quot;EXPERIMENTAL\&quot; \&quot;off\&quot; \&quot;../../src/macros.py\&quot; \&quot;../../src/symbol.js\&quot; \&quot;../../src/proxy.js\&quot; \&quot;../../src/collection.js\&quot; \&quot;../../src/object-observe.js\&quot; \&quot;../../src/promise.js\&quot; \&quot;../../src/generator.js\&quot; \&quot;../../src/array-iterator.js\&quot; \&quot;../../src/harmony-string.js\&quot; \&quot;../../src/harmony-array.js\&quot; \&quot;../../src/harmony-math.js\&quot;&quot;__</Command>

Commented Unassigned: Error trying to build ClearScript [52]

$
0
0
Hi people. First of all, ClearScript is great, thank you.

Now, i'm trying to build it from the scrath and i think that is something wrong with build events in some vcxproj files like j2c and postmortem-metadata: It's giving me errors like this:

1> generate
3> gen-postmortem-metadata
1> bash: cygpath: command not found
3> bash: cygpath: command not found
1> bash: python: command not found
3> bash: python: command not found

Those scripts are calling cygpath and python inside bash (cygwin?), but cygpath and python are installed as windows common binaries in my PATH.

Can someone help me? Thanks a lot :) (And sorry for my awful english)
Comments: It looks like something on your system is derailing your V8 build. Would you be able to attach your build.log file? Relative to your ClearScript root directory, it should be in ClearScript\V8\V8\build\v8-ia32. Some other questions: * How did you get the ClearScript source code? Did you clone the repository? Did you download zipped source? Do you know exactly which version you have? * You mentioned that you have Cygwin and Python installed on your system. Can you tell us where you got those packages, and which versions are installed? Thanks!

Commented Unassigned: Error trying to build ClearScript [52]

$
0
0
Hi people. First of all, ClearScript is great, thank you.

Now, i'm trying to build it from the scrath and i think that is something wrong with build events in some vcxproj files like j2c and postmortem-metadata: It's giving me errors like this:

1> generate
3> gen-postmortem-metadata
1> bash: cygpath: command not found
3> bash: cygpath: command not found
1> bash: python: command not found
3> bash: python: command not found

Those scripts are calling cygpath and python inside bash (cygwin?), but cygpath and python are installed as windows common binaries in my PATH.

Can someone help me? Thanks a lot :) (And sorry for my awful english)
Comments: I downloaded the zip file here in codeplex via https://clearscript.codeplex.com/SourceControl/latest. The version (according to Version.tt) is 5.3.11. Both Cygwin and Python were downloaded via V8Update.cmd script. Python ver is 2.6.2 and Cygwin is 1.5.25. My system is running in brazilian portuguese but most part of log is in english :) Thanks again.

Commented Unassigned: Error trying to build ClearScript [52]

$
0
0
Hi people. First of all, ClearScript is great, thank you.

Now, i'm trying to build it from the scrath and i think that is something wrong with build events in some vcxproj files like j2c and postmortem-metadata: It's giving me errors like this:

1> generate
3> gen-postmortem-metadata
1> bash: cygpath: command not found
3> bash: cygpath: command not found
1> bash: python: command not found
3> bash: python: command not found

Those scripts are calling cygpath and python inside bash (cygwin?), but cygpath and python are installed as windows common binaries in my PATH.

Can someone help me? Thanks a lot :) (And sorry for my awful english)
Comments: You said above that cygpath and python are in your PATH. Does that mean that you have Cygwin and/or Python installed elsewhere on your system (outside of ClearScript)? We can see the complex custom build steps in the js2c project, but they've worked perfectly on every system we've tried so far. By the way, you're using Visual Studio 2012, right?

Commented Unassigned: Error trying to build ClearScript [52]

$
0
0
Hi people. First of all, ClearScript is great, thank you.

Now, i'm trying to build it from the scrath and i think that is something wrong with build events in some vcxproj files like j2c and postmortem-metadata: It's giving me errors like this:

1> generate
3> gen-postmortem-metadata
1> bash: cygpath: command not found
3> bash: cygpath: command not found
1> bash: python: command not found
3> bash: python: command not found

Those scripts are calling cygpath and python inside bash (cygwin?), but cygpath and python are installed as windows common binaries in my PATH.

Can someone help me? Thanks a lot :) (And sorry for my awful english)
Comments: Actually, I think that i added it trying to get the thing to work until I see that cygwin and python being called through bash. I removed them from PATH and downloaded it all again but still not working ;/ I was pointing it to the downloaded cygwin and python in V8 directory: C:\Users\MarcusVinicius\Desktop\Çumemo\clearscript-e9b6e92a0036fb2c033b6ecd14dc953bc36c2474\ClearScript\V8\V8\build\v8\third_party\cygwin\bin; C:\Users\MarcusVinicius\Desktop\Çumemo\clearscript-e9b6e92a0036fb2c033b6ecd14dc953bc36c2474\ClearScript\V8\V8\build\v8-ia32\third_party\python_26 And yes, I'm running VS2012. I need python running under cygwin?

Commented Unassigned: Error trying to build ClearScript [52]

$
0
0
Hi people. First of all, ClearScript is great, thank you.

Now, i'm trying to build it from the scrath and i think that is something wrong with build events in some vcxproj files like j2c and postmortem-metadata: It's giving me errors like this:

1> generate
3> gen-postmortem-metadata
1> bash: cygpath: command not found
3> bash: cygpath: command not found
1> bash: python: command not found
3> bash: python: command not found

Those scripts are calling cygpath and python inside bash (cygwin?), but cygpath and python are installed as windows common binaries in my PATH.

Can someone help me? Thanks a lot :) (And sorry for my awful english)
Comments: Hi again, The V8Update script requires only Visual Studio and Subversion. It downloads Cygwin and Python only because V8's build system requires them. It doesn't install these packages for general use on your system, but only within the V8 build area in the ClearScript directory.

Commented Unassigned: Error trying to build ClearScript [52]

$
0
0
Hi people. First of all, ClearScript is great, thank you.

Now, i'm trying to build it from the scrath and i think that is something wrong with build events in some vcxproj files like j2c and postmortem-metadata: It's giving me errors like this:

1> generate
3> gen-postmortem-metadata
1> bash: cygpath: command not found
3> bash: cygpath: command not found
1> bash: python: command not found
3> bash: python: command not found

Those scripts are calling cygpath and python inside bash (cygwin?), but cygpath and python are installed as windows common binaries in my PATH.

Can someone help me? Thanks a lot :) (And sorry for my awful english)
Comments: The V8Update script requires only Visual Studio and Subversion. It downloads Cygwin and Python only because V8's build system requires them. It doesn't install these packages for general use on your system, but only within the V8 build area in the ClearScript directory. Anyway, V8Update appears to work on your system until it gets to the custom build step you posted above. The first thing that step does is run setup_env.bat to add Cygwin and Python to the path. Apparently this fails for some reason, resulting in the "command not found" errors you see in the log. What happens if you try this manually? In a Visual Studio developer command prompt, go to [ClearScript]\ClearScript\V8\V8\build\v8-ia32\third_party\cygwin and run setup_env.bat. Does it work? Are Cygwin's and Python's binary directories now in your path? Can you run cygpath from the command line?

Commented Unassigned: Error trying to build ClearScript [52]

$
0
0
Hi people. First of all, ClearScript is great, thank you.

Now, i'm trying to build it from the scrath and i think that is something wrong with build events in some vcxproj files like j2c and postmortem-metadata: It's giving me errors like this:

1> generate
3> gen-postmortem-metadata
1> bash: cygpath: command not found
3> bash: cygpath: command not found
1> bash: python: command not found
3> bash: python: command not found

Those scripts are calling cygpath and python inside bash (cygwin?), but cygpath and python are installed as windows common binaries in my PATH.

Can someone help me? Thanks a lot :) (And sorry for my awful english)
Comments: Yes, it works if I call cygpath or python directly, but gives me bash: cygpath: command not found if I call bash -c cygpath, like in the custom build script.

Commented Unassigned: Error trying to build ClearScript [52]

$
0
0
Hi people. First of all, ClearScript is great, thank you.

Now, i'm trying to build it from the scrath and i think that is something wrong with build events in some vcxproj files like j2c and postmortem-metadata: It's giving me errors like this:

1> generate
3> gen-postmortem-metadata
1> bash: cygpath: command not found
3> bash: cygpath: command not found
1> bash: python: command not found
3> bash: python: command not found

Those scripts are calling cygpath and python inside bash (cygwin?), but cygpath and python are installed as windows common binaries in my PATH.

Can someone help me? Thanks a lot :) (And sorry for my awful english)
Comments: Please try moving your entire ClearScript directory so that its path no longer includes non-ASCII characters such as the 'Ç' in "Çumemo". It looks like Cygwin may have problems with such characters.

Commented Unassigned: Error trying to build ClearScript [52]

$
0
0
Hi people. First of all, ClearScript is great, thank you.

Now, i'm trying to build it from the scrath and i think that is something wrong with build events in some vcxproj files like j2c and postmortem-metadata: It's giving me errors like this:

1> generate
3> gen-postmortem-metadata
1> bash: cygpath: command not found
3> bash: cygpath: command not found
1> bash: python: command not found
3> bash: python: command not found

Those scripts are calling cygpath and python inside bash (cygwin?), but cygpath and python are installed as windows common binaries in my PATH.

Can someone help me? Thanks a lot :) (And sorry for my awful english)
Comments: It works! Thank you, man! Can you please add a note in the ReadMe.txt about this? Thanks again.

Created Unassigned: Exporting array of Number from V8. [53]

$
0
0
Hi again, guys.

There is some way to export a array of Number ([1,2]) from JS evaluation to C# array of integer?

The JS code is:
```
(function (data){ return new RuleExecutionResult(data.BodyFat > 2 && data.Weight > 85, new CLRArray(1,2)) })(data)
```

RuleExecutionResult constructor is:

```
public WorkoutTemplateAssociatedData(bool isValid, int[] associatedObjectiveIds)
```

But ClearScript can't find it because "associatedObjectiveIds" is being binded to a dynamic (as you can see in the attached file), while isValid is correcly binded as true.



Edited Unassigned: [FIXED]Error trying to build ClearScript [52]

$
0
0
Hi people. First of all, ClearScript is great, thank you.

Now, i'm trying to build it from the scrath and i think that is something wrong with build events in some vcxproj files like j2c and postmortem-metadata: It's giving me errors like this:

1> generate
3> gen-postmortem-metadata
1> bash: cygpath: command not found
3> bash: cygpath: command not found
1> bash: python: command not found
3> bash: python: command not found

Those scripts are calling cygpath and python inside bash (cygwin?), but cygpath and python are installed as windows common binaries in my PATH.

Can someone help me? Thanks a lot :) (And sorry for my awful english)

Edited Issue: Error trying to build ClearScript [52]

$
0
0
Hi people. First of all, ClearScript is great, thank you.

Now, i'm trying to build it from the scrath and i think that is something wrong with build events in some vcxproj files like j2c and postmortem-metadata: It's giving me errors like this:

1> generate
3> gen-postmortem-metadata
1> bash: cygpath: command not found
3> bash: cygpath: command not found
1> bash: python: command not found
3> bash: python: command not found

Those scripts are calling cygpath and python inside bash (cygwin?), but cygpath and python are installed as windows common binaries in my PATH.

Can someone help me? Thanks a lot :) (And sorry for my awful english)

Commented Issue: Error trying to build ClearScript [52]

$
0
0
Hi people. First of all, ClearScript is great, thank you.

Now, i'm trying to build it from the scrath and i think that is something wrong with build events in some vcxproj files like j2c and postmortem-metadata: It's giving me errors like this:

1> generate
3> gen-postmortem-metadata
1> bash: cygpath: command not found
3> bash: cygpath: command not found
1> bash: python: command not found
3> bash: python: command not found

Those scripts are calling cygpath and python inside bash (cygwin?), but cygpath and python are installed as windows common binaries in my PATH.

Can someone help me? Thanks a lot :) (And sorry for my awful english)
Comments: Thank you for helping us debug this! We'll add a note.
Viewing all 2297 articles
Browse latest View live




Latest Images