by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 22:42
    rhuanjl synchronize #5885
  • Jan 31 2019 22:39
    MikeHolman synchronize #5923
  • Jan 31 2019 22:28
    MikeHolman synchronize #5923
  • Jan 31 2019 19:48
    MikeHolman synchronize #5923
  • Jan 31 2019 19:03
    penzn synchronize #5903
  • Jan 31 2019 17:15
    penzn synchronize #5903
  • Jan 30 2019 22:33
    wyrichte opened #5927
  • Jan 30 2019 22:33

    wyrichte on ADO_test

    Update ChakraCoreStatic.cpp (compare)

  • Jan 30 2019 22:32
    wyrichte closed #5916
  • Jan 30 2019 20:20
    MikeHolman synchronize #5923
  • Jan 30 2019 19:56
    MikeHolman synchronize #5923
  • Jan 30 2019 19:53
    MikeHolman synchronize #5923
  • Jan 30 2019 19:35

    wyrichte on Test-PR-webhook---don't-merge

    Update ChakraCoreStatic.cpp (compare)

  • Jan 30 2019 19:35
    wyrichte synchronize #5916
  • Jan 30 2019 19:07
    wyrichte synchronize #5925
  • Jan 30 2019 18:54

    wyrichte on Test-PR-webhook---don't-merge

    Update ChakraCoreStatic.cpp (compare)

  • Jan 30 2019 18:54
    wyrichte synchronize #5916
  • Jan 30 2019 18:12
    wyrichte closed #5926
  • Jan 30 2019 18:12
    wyrichte opened #5926
  • Jan 30 2019 01:43
    wyrichte synchronize #5925
Andrew Bastien
@volundmush
Hey guys. I am trying to add JS as an embedded scripting language to a C# app. I started with Lua via MoonSharp but feel JS is more my style. Ideally it would be like Node and have require() support or i could code said thing...
I am trying to use net core 3.x
This far only chakea and niljs seem to be maybe possibilities as stuff like Clearscript.v8 is for framework 4.5
Sorry typing mobike
Mobile. Could use some advice.
Richard
@rhuanjl
What specific advise do you need? It is entirely possible to embed ChakraCore in a C# app to provide JS scripting support . There's a sample you can look at here that should show you the basics of what you're trying to do: https://github.com/microsoft/Chakra-Samples/tree/master/ChakraCore%20Samples/JSRT%20Hosting%20Samples/C%23
Bruce Pascoe
@fatcerberus
How would I go about using source maps with the debugger? ChakraCore itself doesn't seem to have any hooks in the API to support them
Steve
@hez2010
I tried to use node-ChakraCore and replace chakracore.dll to the latest version, however it's 500% slower than original node while building angular projects.....
Victor Queiroz
@VictorQueiroz
Hi. How exactly does ChakraCore encode/decode floating-point precision integers for float32array? For example: If I convert Float32Array to Uint8Array, I'll get float LE each 4 bytes of Uint8Array
Michael Holman
@MikeHolman
@VictorQueiroz It's pretty straightforward. We just cast the input value to float (from double) and store the float at the appropriate location in the typed array. When we read the float back out we just cast it to double.
Victor Queiroz
@VictorQueiroz
@MikeHolman I'm actually looking for a machine-independent implementation and was hoping you guys were also using one. For example, endianness seems to be a big issue for me.
Victor Queiroz
@VictorQueiroz
@MikeHolman I mean, when you for example, assign a value to a Float32Array property and then try to visualize it in Uint8Array, I don't think it is going to be machine-dependent. It is probably going to be serialized into little-endian. The same will happen on other architectures, which means that must've a serialization standard to work on all machines in the same way
Michael Holman
@MikeHolman
@VictorQueiroz I'm not sure I completely understand. Is it that you want the bytes to be serialized the same on LE and BE hardware?
Michael Holman
@MikeHolman
Bruce Pascoe
@fatcerberus
MDN even specifically says it’s in platform order and you should use DataView if you need to control endianness: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array
The Float32Array typed array represents an array of 32-bit floating point numbers (corresponding to the C float data type) in the platform byte order. If control over byte order is needed, use DataView instead.
zeroswan
@weditor
how can i get the length of an array ?
Richard
@rhuanjl
@weditor I assume you mean how to get the length of an array from C using JSRT?

// assuming Array is already a JsValueRef for the array in question
// then do the following

JsPropertyIdRef lengthPropId;
JsValueRef arrayLengthObj;
int arrayLength = 0;

CreatePropertyIdFromString("length", &lengthPropId);
JsGetProperty(Array, lengthPropId, &arrayLengthObj);
JsNumberToInt(arrayLengthObj, &arrayLength);

note, technically you should check each of those APIs for failure codes - though the only ways they're failing are if a) you're out of memory OR b) the Array isn't a proper array/somehow doesn't have a length
zeroswan
@weditor
@rhuanjl Thanks for your reply。I tried it yesterday。but it always return 0. I don't know why。finally, I find an api JsHasIndexedProperty(myArray, index, &isExist), and try every index 0/1/2/3... , then return the first index does not exists.
The array is created by JsGetOwnPropertyNames(someObj, &allPropsArray).
Richard
@rhuanjl
@weditor I've just noticed one error above it should be JsCreatePropertyIdFromString, I'd missed the Js. Aside from that all the methods will return JsNoError which I think is 0 BUT arrayLength should hold the length as an int after the above calls
Without seeing more of your code I can't know what's wrong, JsGetOwnPropertyNames on its own will not create an array so I'm not sure what you're doing exactly
zeroswan
@weditor
@rhuanjl I just realized I made a mistake. I thought the length property was a function, so i use JsCallFunction(length, {myArray}, &result) after get the length property,and i have't check if it was failed! what a fool.
Richard
@rhuanjl
Ah... the length property on an array is specified like a getter method but once accessed the result is just an int and indeed not callable - you need to use the JsGetProperty API on the array you actually want the length of not on something else
Иван Сердюк
@oceanfish81_twitter
Hi there
I wonder who is maintaining Webassembly runtime implementation
I have some technical questions
Tibor Tóth
@tibitoth
Hi Guys, Is there any documentation about how to run ChakraCore on Raspberry Pi 3? I did not find anything.
Richard
@rhuanjl
Hi @tibitoth I don't think running on Raspberry Pi is officially supported; however it should be possible with a bit of effort, there was an issue discussing it here microsoft/ChakraCore#2262
Michael Holman
@MikeHolman
@oceanfish81_twitter I wrote a lot of our wasm implementation, so I should be able to answer your questions
Иван Сердюк
@oceanfish81_twitter
Goutam
@goutamdh
hi I want to use webusb api for pan drive . Can anyone explain me
How to use ?
Иван Сердюк
@oceanfish81_twitter

hi I want to use webusb api for pan drive . Can anyone explain me

I had the same question, but for Logitech C100 web cam

Goutam
@goutamdh
@oceanfish81_twitter did you figureout
Theoyuandawang
@theoyuandawang
hello
does anyone know why i have failed when i want to build ChakraCore
Prompt me "chakra.runtime.debug.lib is not a valid win32 application "
please help me if you know how to solve it , i will thank you forever
the build type is debug x64
Jaime Bernardo
@jaimecbernardo
Looks like you're trying to run a library instead of an application. Don't know the details of the build project, but you need to have an application use the library in order to use ChakraCore. There might be a test application in the project that does this, not sure.
Theoyuandawang
@theoyuandawang
thank you for your answer
i just want to build a independent ch.exe ,not for a project
i don't change the original build file
just follow the doc's words about windows building
Theoyuandawang
@theoyuandawang
sorry about wasting your time , it's my problem , i forget to add my working director.。
my bad
Иван Сердюк
@oceanfish81_twitter

@oceanfish81_twitter did you figureout

@goutamdh , on sure where to start. I thought that it makes sense to reproduce something from http://qce-ga.sourceforge.net/ , https://www.linuxtv.org/wiki/index.php/Webcam_devices , https://help.ubuntu.com/community/UVC and http://www.ideasonboard.org/uvc/