Re: Announcement: Clarity Web Framework

2023-01-09 Thread Gregory Propf
Hi Sam, I'm afraid I'm a bit behind the times with some of the new "live" 
techniques but yes, that would be a nice thing to try. I'm afraid I'm job 
hunting now so I'm busy with that but I'll create a TODO list and add it to 
the top. I'll at least look at what I need to do to make that work since it 
would be a good thing to know in general. Thanks for your idea. - Greg

On Monday, January 9, 2023 at 5:42:41 AM UTC-8 s...@google.com wrote:

> Thanks Gregory!
>
> Have you considered publishing the sample apps to somewhere (e.g. github 
> pages) so that we can try them out live?
>
> cheers,
> sam
>
> On Fri, Jan 6, 2023 at 1:34 PM Gregory Propf  wrote:
>
>> Hello everyone. I thought I would make a formal announcement of something 
>> I've been developing on and off since May of last year. It's called Clarity 
>> (https://github.com/gpropf/clarity) and is a sort of lightweight 
>> reactive web framework written in C++ and using Emscripten to compile to 
>> webasm. It's somewhat along the lines of React or Vue but targeting C++ 
>> rather than JavaScript. It's not formally an FRP system (at least not yet) 
>> but I wrote it mainly to provide a simple way to connect program values 
>> with web fields and make interactive updates automatic. I'm planning a 
>> second version that will be more formally FRP with pure functions at the 
>> core but the existing library will remain and be developed as well. You can 
>> read about that in the preface in the README. I'm also developing a set of 
>> demo apps along with the library in a separate repo - 
>> https://github.com/gpropf/clarity-apps. These apps are rather rough and 
>> don't do very much yet. They're really intended as proof of concept and 
>> example code. I've added Clarity to the wiki as well - 
>> https://github.com/emscripten-core/emscripten/wiki/Porting-Examples-and-Demos#application-frameworks.
>>  
>> Questions and comments are welcome!
>>
>> --
>> Greg Propf: Software Engineer, Web Developer
>> http://gregorypropf.com/ | https://github.com/gpropf
>> https://www.youtube.com/@strangeloops23
>> https://www.linkedin.com/in/gregorypropf/
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to emscripten-disc...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/emscripten-discuss/0dfafeaa-3fd1-4c03-8da2-8ef79c26013en%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/emscripten-discuss/0dfafeaa-3fd1-4c03-8da2-8ef79c26013en%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/217f5503-9dce-46b1-98b1-502d3fc7afd6n%40googlegroups.com.


Announcement: Clarity Web Framework

2023-01-06 Thread Gregory Propf
Hello everyone. I thought I would make a formal announcement of something 
I've been developing on and off since May of last year. It's called Clarity 
(https://github.com/gpropf/clarity) and is a sort of lightweight reactive 
web framework written in C++ and using Emscripten to compile to webasm. 
It's somewhat along the lines of React or Vue but targeting C++ rather than 
JavaScript. It's not formally an FRP system (at least not yet) but I wrote 
it mainly to provide a simple way to connect program values with web fields 
and make interactive updates automatic. I'm planning a second version that 
will be more formally FRP with pure functions at the core but the existing 
library will remain and be developed as well. You can read about that in 
the preface in the README. I'm also developing a set of demo apps along 
with the library in a separate repo - 
https://github.com/gpropf/clarity-apps. These apps are rather rough and 
don't do very much yet. They're really intended as proof of concept and 
example code. I've added Clarity to the wiki as well - 
https://github.com/emscripten-core/emscripten/wiki/Porting-Examples-and-Demos#application-frameworks.
 
Questions and comments are welcome!

--
Greg Propf: Software Engineer, Web Developer
http://gregorypropf.com/ | https://github.com/gpropf
https://www.youtube.com/@strangeloops23
https://www.linkedin.com/in/gregorypropf/

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/0dfafeaa-3fd1-4c03-8da2-8ef79c26013en%40googlegroups.com.


Re: Debug info for 'this' pointer vanished from 3.1.24 to 3.1.26?

2022-12-16 Thread Gregory Propf
I just checked with version 3.1.28 and there's no 'this' pointer there 
either. I also tried 3.1.25 and it looks like 24 --> 25 is the point where 
the pointer died so to speak. So right now, 3.1.24 is the latest I can use. 
I'm using Ubuntu 22.04 on very recent Intel hardware.

On Thursday, December 15, 2022 at 2:14:35 PM UTC-8 Gregory Propf wrote:

> Hello Heejin, As far as a reproducer, you can clone my project 
> https://github.com/gpropf/clarity and do 'make showcase'. Set some 
> breakpoints around line 715 in the method setCppValFromJSVal() in the file 
> ClarityNode.hpp and then change some of the values in the text fields or 
> range controls on the page that the app generates. You should see that 
> 'this' is visible but there's nothing in it. Currently I just rolled back 
> to 3.1.24. I plan on trying some of the versions after 3.1.26 today or 
> tomorrow. - Greg
>
> On Thu, Dec 15, 2022 at 11:30 AM Heejin Ahn  wrote:
>
>> I think this is likely to be an LLVM upstream problem than wasm-specific 
>> problem. If you have a reproducer, that'd be helpful as well.
>>
>> On Wed, Dec 7, 2022 at 1:02 PM Gregory Propf  wrote:
>>
>>> Interesting. I didn't know about git bisect before so this is a good 
>>> tool to have. I mainly just wanted to let the devs and users know this was 
>>> happening. Like I said for now I can just use 3.1.24. It won't be a problem 
>>> unless it turns out I can never upgrade beyond that. Unfortunately I don't 
>>> think I'll have time to go through this right now since it sounds like a 
>>> pretty time consuming iterative process.
>>>
>>> On Tuesday, December 6, 2022 at 4:25:53 PM UTC-8 alon...@gmail.com 
>>> wrote:
>>>
>>>> Bisection might be useful here, as in theory any LLVM change could 
>>>> cause such a difference or a bug. It's pretty simple to bisect using the 
>>>> emsdk:
>>>>
>>>> https://emscripten.org/docs/contributing/developers_guide.html#bisecting
>>>>
>>>>
>>>> On Tue, Dec 6, 2022 at 4:22 PM Gregory Propf  wrote:
>>>>
>>>>> I just noticed something while debugging a program. A few days ago I 
>>>>> migrated from 3.1.24 to 3.1.26. It now seems that, in Chrome at least, I 
>>>>> only see the literal value of the 'this' pointer but can't see the 
>>>>> components of the object. My CFLAGS are still the same: -O0 -g 
>>>>> -std=c++17. 
>>>>> For now I'm fine just setting the toolchain back to 3.1.24 but I was 
>>>>> curious as to whether others had noticed this or if it's just that I need 
>>>>> some additional CFLAGS settings to get that level of debug detail now.
>>>>>
>>>>> - Greg
>>>>>
>>>>> -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Groups "emscripten-discuss" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send 
>>>>> an email to emscripten-disc...@googlegroups.com.
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/emscripten-discuss/4086b3e0-d720-464e-b93f-800adbd514a3n%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/emscripten-discuss/4086b3e0-d720-464e-b93f-800adbd514a3n%40googlegroups.com?utm_medium=email_source=footer>
>>>>> .
>>>>>
>>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "emscripten-discuss" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to emscripten-disc...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/emscripten-discuss/c5ddd312-87bf-4c53-ba43-c5030298d882n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/emscripten-discuss/c5ddd312-87bf-4c53-ba43-c5030298d882n%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to emscripten-disc...@googlegroups.com.
>>
> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/emscripten-discuss/CALJpS1PxEayjvjr0t9K2_pZua6Epsy0HAwUfyJNLQLpa4RyRiQ%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/emscripten-discuss/CALJpS1PxEayjvjr0t9K2_pZua6Epsy0HAwUfyJNLQLpa4RyRiQ%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/09c8be0b-dbc2-49c4-9d2d-d31dc98fccc4n%40googlegroups.com.


Re: Debug info for 'this' pointer vanished from 3.1.24 to 3.1.26?

2022-12-15 Thread Gregory Propf
Hello Heejin, As far as a reproducer, you can clone my project
https://github.com/gpropf/clarity and do 'make showcase'. Set some
breakpoints around line 715 in the method setCppValFromJSVal() in the file
ClarityNode.hpp and then change some of the values in the text fields or
range controls on the page that the app generates. You should see that
'this' is visible but there's nothing in it. Currently I just rolled back
to 3.1.24. I plan on trying some of the versions after 3.1.26 today or
tomorrow. - Greg

On Thu, Dec 15, 2022 at 11:30 AM Heejin Ahn  wrote:

> I think this is likely to be an LLVM upstream problem than wasm-specific
> problem. If you have a reproducer, that'd be helpful as well.
>
> On Wed, Dec 7, 2022 at 1:02 PM Gregory Propf  wrote:
>
>> Interesting. I didn't know about git bisect before so this is a good tool
>> to have. I mainly just wanted to let the devs and users know this was
>> happening. Like I said for now I can just use 3.1.24. It won't be a problem
>> unless it turns out I can never upgrade beyond that. Unfortunately I don't
>> think I'll have time to go through this right now since it sounds like a
>> pretty time consuming iterative process.
>>
>> On Tuesday, December 6, 2022 at 4:25:53 PM UTC-8 alon...@gmail.com wrote:
>>
>>> Bisection might be useful here, as in theory any LLVM change could cause
>>> such a difference or a bug. It's pretty simple to bisect using the emsdk:
>>>
>>> https://emscripten.org/docs/contributing/developers_guide.html#bisecting
>>>
>>>
>>> On Tue, Dec 6, 2022 at 4:22 PM Gregory Propf  wrote:
>>>
>>>> I just noticed something while debugging a program. A few days ago I
>>>> migrated from 3.1.24 to 3.1.26. It now seems that, in Chrome at least, I
>>>> only see the literal value of the 'this' pointer but can't see the
>>>> components of the object. My CFLAGS are still the same: -O0 -g -std=c++17.
>>>> For now I'm fine just setting the toolchain back to 3.1.24 but I was
>>>> curious as to whether others had noticed this or if it's just that I need
>>>> some additional CFLAGS settings to get that level of debug detail now.
>>>>
>>>> - Greg
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "emscripten-discuss" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to emscripten-disc...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/emscripten-discuss/4086b3e0-d720-464e-b93f-800adbd514a3n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/emscripten-discuss/4086b3e0-d720-464e-b93f-800adbd514a3n%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to emscripten-discuss+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/emscripten-discuss/c5ddd312-87bf-4c53-ba43-c5030298d882n%40googlegroups.com
>> <https://groups.google.com/d/msgid/emscripten-discuss/c5ddd312-87bf-4c53-ba43-c5030298d882n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to emscripten-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/CALJpS1PxEayjvjr0t9K2_pZua6Epsy0HAwUfyJNLQLpa4RyRiQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/emscripten-discuss/CALJpS1PxEayjvjr0t9K2_pZua6Epsy0HAwUfyJNLQLpa4RyRiQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAKdUWHPaqZHnvp4kgfot5X184%2Bn7xG2z0_VaJOrFUD1WSDAOug%40mail.gmail.com.


Re: Debug info for 'this' pointer vanished from 3.1.24 to 3.1.26?

2022-12-07 Thread Gregory Propf
Interesting. I didn't know about git bisect before so this is a good tool 
to have. I mainly just wanted to let the devs and users know this was 
happening. Like I said for now I can just use 3.1.24. It won't be a problem 
unless it turns out I can never upgrade beyond that. Unfortunately I don't 
think I'll have time to go through this right now since it sounds like a 
pretty time consuming iterative process.

On Tuesday, December 6, 2022 at 4:25:53 PM UTC-8 alon...@gmail.com wrote:

> Bisection might be useful here, as in theory any LLVM change could cause 
> such a difference or a bug. It's pretty simple to bisect using the emsdk:
>
> https://emscripten.org/docs/contributing/developers_guide.html#bisecting
>
>
> On Tue, Dec 6, 2022 at 4:22 PM Gregory Propf  wrote:
>
>> I just noticed something while debugging a program. A few days ago I 
>> migrated from 3.1.24 to 3.1.26. It now seems that, in Chrome at least, I 
>> only see the literal value of the 'this' pointer but can't see the 
>> components of the object. My CFLAGS are still the same: -O0 -g -std=c++17. 
>> For now I'm fine just setting the toolchain back to 3.1.24 but I was 
>> curious as to whether others had noticed this or if it's just that I need 
>> some additional CFLAGS settings to get that level of debug detail now.
>>
>> - Greg
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to emscripten-disc...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/emscripten-discuss/4086b3e0-d720-464e-b93f-800adbd514a3n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/emscripten-discuss/4086b3e0-d720-464e-b93f-800adbd514a3n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/c5ddd312-87bf-4c53-ba43-c5030298d882n%40googlegroups.com.


Debug info for 'this' pointer vanished from 3.1.24 to 3.1.26?

2022-12-06 Thread Gregory Propf
I just noticed something while debugging a program. A few days ago I 
migrated from 3.1.24 to 3.1.26. It now seems that, in Chrome at least, I 
only see the literal value of the 'this' pointer but can't see the 
components of the object. My CFLAGS are still the same: -O0 -g -std=c++17. 
For now I'm fine just setting the toolchain back to 3.1.24 but I was 
curious as to whether others had noticed this or if it's just that I need 
some additional CFLAGS settings to get that level of debug detail now.

- Greg

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/4086b3e0-d720-464e-b93f-800adbd514a3n%40googlegroups.com.


Re: Problems using objects created in main program from web worker or pthread

2022-11-30 Thread Gregory Propf
I'm just using and slightly modifying the example code here -
https://emscripten.org/docs/api_reference/wasm_workers.html?highlight=web%20workers,
the "run_in_worker()" stuff. So I suppose that's wasm workers. If it's not
a supported feature yet it's not that crucial. As for the pthreads DOM
situation, I suspected that might be the problem. I just wanted to make
sure it wasn't something I was doing wrong. I can get what I need from
setTimeout() calls for iterating my simulation. I suppose If I was really
determined I could have the thread or worker generate a JS event that would
result in the GUI updating in the main thread. Or would that not be
possible either?

On Wed, Nov 30, 2022 at 3:52 PM 'Sam Clegg' via emscripten-discuss <
emscripten-discuss@googlegroups.com> wrote:

>
>
> On Wed, Nov 30, 2022 at 2:52 PM Gregory Propf  wrote:
>
>> I'm experimenting with adding web workers and pthreads to my project.
>> I've got some simple test code that attempts to modify objects defined in
>> the global scope in a web worker or a pthread.
>>
>> When the code that modifies the object runs in the WW I get
>> "_emval_take_value has unknown type d". My run_in_worker() function, where
>> this error occurs, works fine as long as I call it directly. It's only when
>> I attempt to post it to the worker that the binding error manifests.
>>
>
> I susect that embind simply doesn't work in wasm workers.  wasm workers
> are still new/experimental (is it ok to say that @juj?) and you may find
> features that don't work in wasm workers.
>
> BTW you said web worker, but I think you mean wasm worker?  (An important
> difference).
>
>
>
>>
>> In the pthread version it seems that some JavaScript val objects
>> representing DOM elements for various html tags that are defined in the
>> main thread do not get defined in the pthread. So we get "Cannot read
>> properties of undefined (reading 'value')" when trying to modify them in
>> the pthread. There are also some oddities about printf, cout, and
>> console.log where some messages that have supposedly printed do not show up
>> in the console output. Anyone know what all this is about and how to fix it?
>>
>
> The DOM only exists on the main thread, so you can't access anything DOM
> related on workers/pthreads.
>
> Regarding standard output, I believe normal stdout (cout/printf) is
> proxied back to the main thread, so might not show up if your main thread
> is busy.   I believe that might also be true for console messages.  Under
> node we work around this by directly writing to stdout, but I don't know of
> any way to do that on the web platform.   Are you seeing messages
> completely disappear or just get delayed.
>
>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to emscripten-discuss+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/emscripten-discuss/84bff0a5-53c6-46ee-9d39-f03f0cbf98can%40googlegroups.com
>> <https://groups.google.com/d/msgid/emscripten-discuss/84bff0a5-53c6-46ee-9d39-f03f0cbf98can%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to emscripten-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/CAL_va28qcWzQPHj5TxPNRaB%3DHPYfSbnppySddEHD0U71o9h2Hg%40mail.gmail.com
> <https://groups.google.com/d/msgid/emscripten-discuss/CAL_va28qcWzQPHj5TxPNRaB%3DHPYfSbnppySddEHD0U71o9h2Hg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAKdUWHO7M8aadWQUOR_6yhorzOrJq6zHb3MJetK_AZNs1Xi4wQ%40mail.gmail.com.


Problems using objects created in main program from web worker or pthread

2022-11-30 Thread Gregory Propf
I'm experimenting with adding web workers and pthreads to my project. I've 
got some simple test code that attempts to modify objects defined in the 
global scope in a web worker or a pthread. 

When the code that modifies the object runs in the WW I get 
"_emval_take_value has unknown type d". My run_in_worker() function, where 
this error occurs, works fine as long as I call it directly. It's only when 
I attempt to post it to the worker that the binding error manifests.

In the pthread version it seems that some JavaScript val objects 
representing DOM elements for various html tags that are defined in the 
main thread do not get defined in the pthread. So we get "Cannot read 
properties of undefined (reading 'value')" when trying to modify them in 
the pthread. There are also some oddities about printf, cout, and 
console.log where some messages that have supposedly printed do not show up 
in the console output. Anyone know what all this is about and how to fix it?

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/84bff0a5-53c6-46ee-9d39-f03f0cbf98can%40googlegroups.com.


acorn-optimizer error with -O2 or higher

2022-11-28 Thread Gregory Propf
Anyone know what this is about? I'm trying out various optimization options
and discovered that if I use -O1 or -O0 the code compiles but -O2, -O3, -Os
gives this error. It doesn't seem like DEMANGLE_SUPPORT is the issue since
taking that out doesn't change anything. This is using 3.1.24 on Linux. It
looks like 3.1.26 is out. Would upgrading help?


DEMANGLE_SUPPORT=1 emcc speedtest.cpp -o speedtest.o -c -O2 -std=c++17 -D
USETF=1
DEMANGLE_SUPPORT=1 emcc ClarityNode.cpp -o ClarityNode.o -c -O2 -std=c++17
-D USETF=1
DEMANGLE_SUPPORT=1 emcc Selectables.cpp -o Selectables.o -c -O2 -std=c++17
-D USETF=1
DEMANGLE_SUPPORT=1 emcc clarity.cpp -o clarity.o -c -O2 -std=c++17 -D
USETF=1
emcc -lembind --pre-js js.d/speedtest.js speedtest.o ClarityNode.o
Selectables.o clarity.o -O2 -std=c++17 -o clarity_embind.js
/home/greg/repos/clarity/emsdk/upstream/emscripten/tools/acorn-optimizer.js:1863
  throw err;
  ^

SyntaxError: Unexpected token (61:22)
staticSpeedtester = null;
  ^

at Parser.pp$4.raise
(/home/greg/repos/clarity/emsdk/upstream/emscripten/node_modules/acorn/dist/acorn.js:3462:15)
at Parser.pp$9.unexpected
(/home/greg/repos/clarity/emsdk/upstream/emscripten/node_modules/acorn/dist/acorn.js:756:10)
at Parser.pp$9.expect
(/home/greg/repos/clarity/emsdk/upstream/emscripten/node_modules/acorn/dist/acorn.js:750:28)
at Parser.pp$5.parseMethod
(/home/greg/repos/clarity/emsdk/upstream/emscripten/node_modules/acorn/dist/acorn.js:3224:10)
at Parser.pp$8.parseClassMethod
(/home/greg/repos/clarity/emsdk/upstream/emscripten/node_modules/acorn/dist/acorn.js:1511:37)
at Parser.pp$8.parseClassElement
(/home/greg/repos/clarity/emsdk/upstream/emscripten/node_modules/acorn/dist/acorn.js:1469:12)
at Parser.pp$8.parseClass
(/home/greg/repos/clarity/emsdk/upstream/emscripten/node_modules/acorn/dist/acorn.js:1387:26)
at Parser.pp$8.parseStatement
(/home/greg/repos/clarity/emsdk/upstream/emscripten/node_modules/acorn/dist/acorn.js:902:19)
at Parser.pp$8.parseTopLevel
(/home/greg/repos/clarity/emsdk/upstream/emscripten/node_modules/acorn/dist/acorn.js:813:23)
at Parser.parse
(/home/greg/repos/clarity/emsdk/upstream/emscripten/node_modules/acorn/dist/acorn.js:585:17)
{
  pos: 1941,
  loc: Position { line: 61, column: 22 },
  raisedAt: 1942
}
emcc: error: '/home/greg/repos/clarity/emsdk/node/14.18.2_64bit/bin/node
/home/greg/repos/clarity/emsdk/upstream/emscripten/tools/acorn-optimizer.js
/tmp/emscripten_temp_i786_vs2/clarity_embind.js.pp.js JSDCE
minifyWhitespace -o
/tmp/emscripten_temp_i786_vs2/clarity_embind.js.pp.jso1.js' failed
(returned 1)
make: *** [Makefile:27: speedtest-prod] Error 1

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAKdUWHOskXRExLeutqdyxBZ3OffSzVAjLWaL2p%2BYa%2BETOfTnLA%40mail.gmail.com.


Re: Project announcement?

2022-10-27 Thread Gregory Propf
I just tested this with a second GH account and it seems you're right. It
didn't make a lot of sense that everything was just wide open like that but
some of what I read on the subject was a bit confusing. My initial test
commit was using my alternate GH account but I neglected the fact that I
was still logged into my Linux account that used the same ssh key
regardless. Trying to modify the repo with a different local account that
had a different GH ssh key gave me the "permission denied" that I was
hoping for.

- Greg Propf: http://gregorypropf.com/

On Thu, Oct 27, 2022 at 4:23 PM 'Sam Clegg' via emscripten-discuss <
emscripten-discuss@googlegroups.com> wrote:

>
>
> On Thu, Oct 27, 2022 at 12:54 PM Gregory Propf  wrote:
>
>> So basically just add my project info to that list in the wiki then? I've
>> been looking at other hosting options since it seems like Github really
>> doesn't have a way to limit people's access to public projects. What I
>> really want is for people to fork the project and make pull requests.
>>
>
> That sounds like exactly how public github projects work.  They are not
> publicly writable, and require folks to send you PRs if they want to
> propose changes.
>
>
>> Anyone have any suggestions about that? I've heard gitlab offers
>> read-only public access. I'm going to go through the wiki too and look at
>> what people are using in their projects. Thanks for the links, Shlomi.
>>
>> - Gregory Propf: http://gregorypropf.com/
>>
>> On Tue, Oct 25, 2022 at 8:54 PM Shlomi Fish 
>> wrote:
>>
>>> Hi Greg!
>>>
>>> On Tue, 25 Oct 2022 14:50:37 -0700
>>> Gregory Propf  wrote:
>>>
>>> > I've been working on an open source project using Emscripten that I
>>> would
>>> > like to make public. Is there a particular way to go about this here
>>> like a
>>> > special format or something? It's in github as a private repository
>>> right
>>> > now. As soon as I figure out how the github permissions work for public
>>> > projects I plan to make it publicly available.
>>> >
>>> > - Greg Propf: http://gregorypropf.com/
>>> >
>>>
>>> There is
>>>
>>> https://github.com/emscripten-core/emscripten/wiki/Porting-Examples-and-Demos
>>> and usenet / reddit / hackernews / twitter / facebook / freenode / etc.
>>>
>>> in addition see
>>>
>>> https://www.shlomifish.org/philosophy/philosophy/putting-cards-on-the-table-2019-2020/indiv-nodes/fear-is-path-to-dark-side.xhtml
>>> .
>>>
>>> --
>>>
>>> Shlomi Fish   https://www.shlomifish.org/
>>> Freecell Solver - https://fc-solve.shlomifish.org/
>>>
>>> Unix was not designed to stop you from doing stupid things, because that
>>> would
>>> also stop you from doing clever things.
>>> — Doug Gwyn ( https://en.wikiquote.org/wiki/Unix )
>>>
>>> Please reply to list if it's a mailing list post -
>>> https://shlom.in/reply .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to emscripten-discuss+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/emscripten-discuss/CAKdUWHMEJCp_EzeHMg1sUvHSn-dyjd1TVH-3h2X0cAsTLG%2BsaQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/emscripten-discuss/CAKdUWHMEJCp_EzeHMg1sUvHSn-dyjd1TVH-3h2X0cAsTLG%2BsaQ%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to emscripten-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2-ZFdabXEh1y0%2BF7_Y5p8P8fixgs9t1A5du3fWL7p4rYQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2-ZFdabXEh1y0%2BF7_Y5p8P8fixgs9t1A5du3fWL7p4rYQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAKdUWHOo-LjEPyotUh-cvZWeCCMZAS5sQVkpyKUSF7cO8mwn%3DQ%40mail.gmail.com.


Re: Project announcement?

2022-10-27 Thread Gregory Propf
So basically just add my project info to that list in the wiki then? I've
been looking at other hosting options since it seems like Github really
doesn't have a way to limit people's access to public projects. What I
really want is for people to fork the project and make pull requests.
Anyone have any suggestions about that? I've heard gitlab offers read-only
public access. I'm going to go through the wiki too and look at what people
are using in their projects. Thanks for the links, Shlomi.

- Gregory Propf: http://gregorypropf.com/

On Tue, Oct 25, 2022 at 8:54 PM Shlomi Fish  wrote:

> Hi Greg!
>
> On Tue, 25 Oct 2022 14:50:37 -0700
> Gregory Propf  wrote:
>
> > I've been working on an open source project using Emscripten that I would
> > like to make public. Is there a particular way to go about this here
> like a
> > special format or something? It's in github as a private repository right
> > now. As soon as I figure out how the github permissions work for public
> > projects I plan to make it publicly available.
> >
> > - Greg Propf: http://gregorypropf.com/
> >
>
> There is
>
> https://github.com/emscripten-core/emscripten/wiki/Porting-Examples-and-Demos
> and usenet / reddit / hackernews / twitter / facebook / freenode / etc.
>
> in addition see
>
> https://www.shlomifish.org/philosophy/philosophy/putting-cards-on-the-table-2019-2020/indiv-nodes/fear-is-path-to-dark-side.xhtml
> .
>
> --
>
> Shlomi Fish   https://www.shlomifish.org/
> Freecell Solver - https://fc-solve.shlomifish.org/
>
> Unix was not designed to stop you from doing stupid things, because that
> would
> also stop you from doing clever things.
> — Doug Gwyn ( https://en.wikiquote.org/wiki/Unix )
>
> Please reply to list if it's a mailing list post - https://shlom.in/reply
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAKdUWHMEJCp_EzeHMg1sUvHSn-dyjd1TVH-3h2X0cAsTLG%2BsaQ%40mail.gmail.com.


Project announcement?

2022-10-25 Thread Gregory Propf
I've been working on an open source project using Emscripten that I would
like to make public. Is there a particular way to go about this here like a
special format or something? It's in github as a private repository right
now. As soon as I figure out how the github permissions work for public
projects I plan to make it publicly available.

- Greg Propf: http://gregorypropf.com/

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAKdUWHPNoMFeAqe8FwGobRd9t6KWXAwk4gFjSQ2EF%2Bb8zMr1yA%40mail.gmail.com.


Re: Debugging emscripten C++ code in Chrome

2022-09-08 Thread Gregory Propf
Bit of a late follow-up here but.. IT WORKS! Even in vanilla Chrome running
on Ubuntu 22.04. This is what I've got in the Makefile for building my app:
CFLAGS = -O0 -g -std=c++17
(yes, I know the -std setting probably isn't relevant here)
Previously, I had this:
CFLAGS = -O0 -g -gsource-map --source-map-base=http://localhost:6931/
-std=c++17

It seems that the source map stuff actually interferes with the debugger.
No more crazy dollar sign vars! Thanks Floh!


On Thu, Aug 25, 2022 at 5:14 AM Floh  wrote:
>
> It should definitely work on Vanilla Chrome, but setting everything up
can be a bit finicky:
>
> - install the Debugging extension:
https://chrome.google.com/webstore/detail/cc%20%20-devtools-support-dwa/pdcpmagijalfljmkmjngeonclgbbannb
> - in the Dev Tools settings, search for 'WebAssembly Debugging' and check
that box
> - compile your code with '-O0 -g' (no optimization, and debug info
enabled'
> - IMPORTANT: in the Chrome debugger, there's a 'Filesystem' tab on the
left side which is very easy to miss. Here you need to navigate to your
project directory and allow Chrome to access that area of your filesystem.
>
> (I think/hope these are all steps)
>
> When you load your application you should see something like this on the
Dev Tools console:
>
> [C/C++ DevTools Support (DWARF)] Loading debug symbols for
http://localhost:8080/cube-sapp.wasm...
> [C/C++ DevTools Support (DWARF)] Loaded debug symbols for
http://localhost:8080/cube-sapp.wasm, found 91 source file(s)
>
> ...and if everything works it should look roughly like this in the
debugger:
>
>
> On Wednesday, 24 August 2022 at 01:56:12 UTC+2 gpr...@gmail.com wrote:
>>
>> It seems I missed something about the plugin that was important, which
is that it seems to be designed to run only on the Canary builds of Chrome.
I went to get the Canary build but it says right on the front page "Linux
is not supported." Anyone aware of any other way to debug emscripten
besides Chrome Canary? Anything like the Chrome plugin for Firefox or other
browsers? The plugin still works on the production version of Chrome except
for the fact that you can't see the identities of your variables which is a
pretty critical failing at this point. I can at least stop using printf
statements just to determine if a certain function or section of code is
running though.
>>
>>
>> On Fri, Aug 19, 2022 at 11:00 AM 'Sam Clegg' via emscripten-discuss <
emscripte...@googlegroups.com> wrote:
>> >
>> > Indeed, source-map only give you line level debugging (i.e. not
variables or parameter values), but work in all browsers.
>> >
>> > Full dwarf debugging (-g) requires the chrome extension.  I thought
that you must have that already installed since I'm not sure how you would
even set a breakpoint without that working.
>> >
>> > On Thu, Aug 18, 2022 at 11:36 PM Sebastian Theophil 
wrote:
>> >>
>> >> IIRC for source level breakpoints you need to enable the experimental
support for dwarf debugging in chrome
>> >>
>> >> https://developer.chrome.com/blog/wasm-debugging-2020/
>> >>
>> >> Von meinem iPhone gesendet
>> >>
>> >> Am 19.08.2022 um 06:28 schrieb Gregory Propf :
>> >>
>> >> 
>> >> I also tried it with "emcc debugtest.cpp -gsource-map
--source-map-base=http://localhost:6931/ -o debugtest.js"
>> >> In this case the breakpoints actually are being honored but the
variables are all just identified as $var1, $var2, etc... I've seen this
before when trying to debug ClojureScript and eventually abandoned the
effort because it wasn't that useful, particularly with complex data
structures where I really needed the names of the structure members.
>> >>
>> >> On Thu, Aug 18, 2022 at 5:02 PM 'Sam Clegg' via emscripten-discuss <
emscripte...@googlegroups.com> wrote:
>> >>>
>> >>> Can you make it work with a simple hello world program compiled
without optimizations?  If not it sounds like maybe a bug in either
toolchain or in the debugger plugin.
>> >>>
>> >>> If you can't set a breakpoint in a simple hello world program can
you open a bug, and please include the full command line and full program
you are using.
>> >>>
>> >>> cheers,
>> >>> sam
>> >>>
>> >>> On Thu, Aug 18, 2022 at 3:52 PM Gregory Propf 
wrote:
>> >>>>
>> >>>> Hello everyone, first post here and a simple (but aggravating)
problem - No matter what combination of -g flags or other command line
tricks I use I cannot seem to get Chrome to allow me to step through my C++
code. I can add the CPP files and even set breakpoints but the p

Re: Where/how to host

2022-09-08 Thread Gregory Propf
Love your pages Andre. I even played a bit of Doom! They reminded me of
when I was writing 6502 assembly for games on my Apple II as a kid. I
wasn't aware of the header issue in github as I use my own server but I
suppose this is something I'll need to configure eventually. One of the
things I've been meaning to try out is the threading support in emscripten.
I've been working on a small web framework library project in C++ lately
but I haven't yet seen a need for threads. I'm getting to the part where
I'm looking at the Canvas and SVG objects though and I can see how the
animation part could benefit from threads. - Greg

On Thu, Sep 8, 2022 at 1:15 AM Floh  wrote:

> Yes, you can web-host like a regular static webpage. The Emscripten
> compiler usually outputs three files: one .html, one .js and one .wasm. The
> .html file is basically your index.html which is loaded when visiting the
> URL. The .js and .wasm files are then loaded by the .html file, the only
> rule is that the .js and .wasm file must be in the same web server
> directory as the .html file.
>
> I'm just host my WASM stuff on GH Pages, for instance:
>
> - https://floooh.github.io/doom-sokol/
> - https://floooh.github.io/sokol-html5/
> - https://floooh.github.io/tiny8bit/
> - https://floooh.github.io/visual6502remix/
>
> The visual6502remix page hosting directory looks like this (just the
> output of emcc, with the .html file renamed to index.html):
>
> https://github.com/floooh/visual6502remix
>
> Be aware though that hosting on Github Pages means that some WASM features
> like multi-threading (or rather SharedArrayBuffer) are disabled, because
> the GH Pages web server can't be reconfigured to return the required
> response headers (there's a workaround with service workers which I haven't
> tried yet). Other web hosters allow this sort of configuration, so the
> choice of web hoster dictates what sort of WASM features you can use (which
> IMHO is a massive design wart, but whatever...)
>
> Cheers!
> On Thursday, 8 September 2022 at 07:34:02 UTC+2 soca...@gmail.com wrote:
>
>> Where can a website created using emscripten be hosted? How? Would most
>> any host work; would it be like a plain HTML website?
>>
>> I realize that if I learn more about emscripten then I will likely be
>> able to answer my question myself. I am just not sure I want to spend time
>> learning it. I am excited about using C++ for websites. I am however tired
>> of learning things and then wasting my time on something impractical for
>> me. I have tried to search for answers to my question and I did not find
>> answers. I hope the question is a reasonable question.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to emscripten-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/fe889199-5060-4157-91e1-c83d6cb6355an%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAKdUWHMVHWdKQ7N9Kc9%3DM1U23m7G5gtBm%2B5ovw4UKdK4LwHzSQ%40mail.gmail.com.


Re: Where/how to host

2022-09-08 Thread Gregory Propf
Well, emscripten is just a way to compile C++ to webasm or JavaScript. Both
of those run in the browser so the hosting provider really just hosts the
JS, WASM, and HTML files. I suppose you could write a server-side app in
C++ and compile to webasm or JS to run with one of the NodeJS server
frameworks too but in general anything running a webserver should work as a
server. - Greg

On Wed, Sep 7, 2022 at 10:34 PM Sam Hobbs  wrote:

> Where can a website created using emscripten be hosted? How? Would most
> any host work; would it be like a plain HTML website?
>
> I realize that if I learn more about emscripten then I will likely be able
> to answer my question myself. I am just not sure I want to spend time
> learning it. I am excited about using C++ for websites. I am however tired
> of learning things and then wasting my time on something impractical for
> me. I have tried to search for answers to my question and I did not find
> answers. I hope the question is a reasonable question.
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to emscripten-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/1061df54-d0fb-4d5d-976c-cdb24cfbd6b2n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAKdUWHMKu2s1H_q0d9%2Bbr6%2BwEH%2BudpzJmRJQ0vKmh0FZCHM4Aw%40mail.gmail.com.


Re: Debugging emscripten C++ code in Chrome

2022-08-23 Thread Gregory Propf
It seems I missed something about the plugin that was important, which is
that it seems to be designed to run only on the Canary builds of Chrome. I
went to get the Canary build but it says right on the front page "Linux is
not supported." Anyone aware of any other way to debug emscripten besides
Chrome Canary? Anything like the Chrome plugin for Firefox or other
browsers? The plugin still works on the production version of Chrome except
for the fact that you can't see the identities of your variables which is a
pretty critical failing at this point. I can at least stop using printf
statements just to determine if a certain function or section of code is
running though.

On Fri, Aug 19, 2022 at 11:00 AM 'Sam Clegg' via emscripten-discuss <
emscripten-discuss@googlegroups.com> wrote:
>
> Indeed, source-map only give you line level debugging (i.e. not variables
or parameter values), but work in all browsers.
>
> Full dwarf debugging (-g) requires the chrome extension.  I thought that
you must have that already installed since I'm not sure how you would even
set a breakpoint without that working.
>
> On Thu, Aug 18, 2022 at 11:36 PM Sebastian Theophil 
wrote:
>>
>> IIRC for source level breakpoints you need to enable the experimental
support for dwarf debugging in chrome
>>
>> https://developer.chrome.com/blog/wasm-debugging-2020/
>>
>> Von meinem iPhone gesendet
>>
>> Am 19.08.2022 um 06:28 schrieb Gregory Propf :
>>
>> 
>> I also tried it with "emcc debugtest.cpp -gsource-map --source-map-base=
http://localhost:6931/ -o debugtest.js"
>> In this case the breakpoints actually are being honored but the
variables are all just identified as $var1, $var2, etc... I've seen this
before when trying to debug ClojureScript and eventually abandoned the
effort because it wasn't that useful, particularly with complex data
structures where I really needed the names of the structure members.
>>
>> On Thu, Aug 18, 2022 at 5:02 PM 'Sam Clegg' via emscripten-discuss <
emscripten-discuss@googlegroups.com> wrote:
>>>
>>> Can you make it work with a simple hello world program compiled without
optimizations?  If not it sounds like maybe a bug in either toolchain or in
the debugger plugin.
>>>
>>> If you can't set a breakpoint in a simple hello world program can you
open a bug, and please include the full command line and full program you
are using.
>>>
>>> cheers,
>>> sam
>>>
>>> On Thu, Aug 18, 2022 at 3:52 PM Gregory Propf  wrote:
>>>>
>>>> Hello everyone, first post here and a simple (but aggravating) problem
- No matter what combination of -g flags or other command line tricks I use
I cannot seem to get Chrome to allow me to step through my C++ code. I can
add the CPP files and even set breakpoints but the program does not stop
for them. I'm doing this on Ubuntu 22.04 with the latest version of Chrome.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
Groups "emscripten-discuss" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
an email to emscripten-discuss+unsubscr...@googlegroups.com.
>>>> To view this discussion on the web visit
https://groups.google.com/d/msgid/emscripten-discuss/02e05a34-f383-4e39-b051-ff7bdb3ae1c9n%40googlegroups.com
.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
Groups "emscripten-discuss" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
an email to emscripten-discuss+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2_eNCJj_9qnzJfJrYpwkzzLQrVzd-kOnXT2GGB45Mi5Xg%40mail.gmail.com
.
>>
>> --
>> You received this message because you are subscribed to the Google
Groups "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send
an email to emscripten-discuss+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
https://groups.google.com/d/msgid/emscripten-discuss/CAKdUWHO3ahfPE-31Sj22WiRRuMuyy9E9UNvN93D%2B0dVmz-vkuQ%40mail.gmail.com
.
>>
>> --
>> You received this message because you are subscribed to the Google
Groups "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send
an email to emscripten-discuss+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
https://groups.google.com/d/msgid/emscripten-discuss/7AE81AD1-3532-47B4-B401-16164233AB25%40gmail.com
.
>
> --
> You received this message because you are s

Re: Debugging emscripten C++ code in Chrome

2022-08-20 Thread Gregory Propf
I've installed the plugin and have now gotten as far as getting the program
to stop at breakpoints. The actual variables are still just $var1,
$var2,... I'm serving the program with emrun but I've used 'python3 -m
http.server 8000' as well. Both produce the same result. It's probably
still worth using but the actual project I'm working on has a lot of
complex data structures that I assume will just show up as more of those
anonymous 32 bit integers. Has anyone had any success with getting a full
debugging environment working for emscripten whether in the browser or not?
I'm familiar with debugging regular C++ code in VSCode and I know Emacs can
be used for that as well. I'm only interested in things that work in a
Linux environment as well.

On Fri, Aug 19, 2022 at 11:00 AM 'Sam Clegg' via emscripten-discuss <
emscripten-discuss@googlegroups.com> wrote:

> Indeed, source-map only give you line level debugging (i.e. not variables
> or parameter values), but work in all browsers.
>
> Full dwarf debugging (-g) requires the chrome extension.  I thought that
> you must have that already installed since I'm not sure how you would even
> set a breakpoint without that working.
>
> On Thu, Aug 18, 2022 at 11:36 PM Sebastian Theophil 
> wrote:
>
>> IIRC for source level breakpoints you need to enable the experimental
>> support for dwarf debugging in chrome
>>
>> https://developer.chrome.com/blog/wasm-debugging-2020/
>>
>> Von meinem iPhone gesendet
>>
>> Am 19.08.2022 um 06:28 schrieb Gregory Propf :
>>
>> 
>> I also tried it with "emcc debugtest.cpp -gsource-map --source-map-base=
>> http://localhost:6931/ -o debugtest.js"
>> In this case the breakpoints actually are being honored but the variables
>> are all just identified as $var1, $var2, etc... I've seen this before when
>> trying to debug ClojureScript and eventually abandoned the effort because
>> it wasn't that useful, particularly with complex data structures where I
>> really needed the names of the structure members.
>>
>> On Thu, Aug 18, 2022 at 5:02 PM 'Sam Clegg' via emscripten-discuss <
>> emscripten-discuss@googlegroups.com> wrote:
>>
>>> Can you make it work with a simple hello world program compiled without
>>> optimizations?  If not it sounds like maybe a bug in either toolchain or in
>>> the debugger plugin.
>>>
>>> If you can't set a breakpoint in a simple hello world program can you
>>> open a bug, and please include the full command line and full program you
>>> are using.
>>>
>>> cheers,
>>> sam
>>>
>>> On Thu, Aug 18, 2022 at 3:52 PM Gregory Propf  wrote:
>>>
>>>> Hello everyone, first post here and a simple (but aggravating) problem
>>>> - No matter what combination of -g flags or other command line tricks I use
>>>> I cannot seem to get Chrome to allow me to step through my C++ code. I can
>>>> add the CPP files and even set breakpoints but the program does not stop
>>>> for them. I'm doing this on Ubuntu 22.04 with the latest version of Chrome.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "emscripten-discuss" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to emscripten-discuss+unsubscr...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/emscripten-discuss/02e05a34-f383-4e39-b051-ff7bdb3ae1c9n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/emscripten-discuss/02e05a34-f383-4e39-b051-ff7bdb3ae1c9n%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "emscripten-discuss" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to emscripten-discuss+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2_eNCJj_9qnzJfJrYpwkzzLQrVzd-kOnXT2GGB45Mi5Xg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2_eNCJj_9qnzJfJrYpwkzzLQrVzd-kOnXT2GGB45Mi5Xg%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>>

Re: Debugging emscripten C++ code in Chrome

2022-08-18 Thread Gregory Propf
I also tried it with "emcc debugtest.cpp -gsource-map --source-map-base=
http://localhost:6931/ -o debugtest.js"
In this case the breakpoints actually are being honored but the variables
are all just identified as $var1, $var2, etc... I've seen this before when
trying to debug ClojureScript and eventually abandoned the effort because
it wasn't that useful, particularly with complex data structures where I
really needed the names of the structure members.

On Thu, Aug 18, 2022 at 5:02 PM 'Sam Clegg' via emscripten-discuss <
emscripten-discuss@googlegroups.com> wrote:

> Can you make it work with a simple hello world program compiled without
> optimizations?  If not it sounds like maybe a bug in either toolchain or in
> the debugger plugin.
>
> If you can't set a breakpoint in a simple hello world program can you open
> a bug, and please include the full command line and full program you are
> using.
>
> cheers,
> sam
>
> On Thu, Aug 18, 2022 at 3:52 PM Gregory Propf  wrote:
>
>> Hello everyone, first post here and a simple (but aggravating) problem -
>> No matter what combination of -g flags or other command line tricks I use I
>> cannot seem to get Chrome to allow me to step through my C++ code. I can
>> add the CPP files and even set breakpoints but the program does not stop
>> for them. I'm doing this on Ubuntu 22.04 with the latest version of Chrome.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to emscripten-discuss+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/emscripten-discuss/02e05a34-f383-4e39-b051-ff7bdb3ae1c9n%40googlegroups.com
>> <https://groups.google.com/d/msgid/emscripten-discuss/02e05a34-f383-4e39-b051-ff7bdb3ae1c9n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to emscripten-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2_eNCJj_9qnzJfJrYpwkzzLQrVzd-kOnXT2GGB45Mi5Xg%40mail.gmail.com
> <https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2_eNCJj_9qnzJfJrYpwkzzLQrVzd-kOnXT2GGB45Mi5Xg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAKdUWHO3ahfPE-31Sj22WiRRuMuyy9E9UNvN93D%2B0dVmz-vkuQ%40mail.gmail.com.


Re: Debugging emscripten C++ code in Chrome

2022-08-18 Thread Gregory Propf
Well, I made this little program and called it debugtest.cpp:

#include 

using namespace std;

int main()
{
int n = 100;
for (int i = 0; i < n; i++)
{
cout << "Loop counter: " << i << "\n";
}
}

I then compiled with "emcc debugtest.cpp -g -o debugtest.js". I hit F5 to
reload the page and the code just runs again even with a breakpoint at the
line with the cout. I almost wonder if there's just something I need to
enable in Chrome or some special way to start in debug mode.


On Thu, Aug 18, 2022 at 5:02 PM 'Sam Clegg' via emscripten-discuss <
emscripten-discuss@googlegroups.com> wrote:

> Can you make it work with a simple hello world program compiled without
> optimizations?  If not it sounds like maybe a bug in either toolchain or in
> the debugger plugin.
>
> If you can't set a breakpoint in a simple hello world program can you open
> a bug, and please include the full command line and full program you are
> using.
>
> cheers,
> sam
>
> On Thu, Aug 18, 2022 at 3:52 PM Gregory Propf  wrote:
>
>> Hello everyone, first post here and a simple (but aggravating) problem -
>> No matter what combination of -g flags or other command line tricks I use I
>> cannot seem to get Chrome to allow me to step through my C++ code. I can
>> add the CPP files and even set breakpoints but the program does not stop
>> for them. I'm doing this on Ubuntu 22.04 with the latest version of Chrome.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "emscripten-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to emscripten-discuss+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/emscripten-discuss/02e05a34-f383-4e39-b051-ff7bdb3ae1c9n%40googlegroups.com
>> <https://groups.google.com/d/msgid/emscripten-discuss/02e05a34-f383-4e39-b051-ff7bdb3ae1c9n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to emscripten-discuss+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2_eNCJj_9qnzJfJrYpwkzzLQrVzd-kOnXT2GGB45Mi5Xg%40mail.gmail.com
> <https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2_eNCJj_9qnzJfJrYpwkzzLQrVzd-kOnXT2GGB45Mi5Xg%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAKdUWHNMmujfCCMPjDr_cCoPLTqs-5Ab7hAkn%2BmdCiq%2BV872CA%40mail.gmail.com.


Debugging emscripten C++ code in Chrome

2022-08-18 Thread Gregory Propf
Hello everyone, first post here and a simple (but aggravating) problem - No 
matter what combination of -g flags or other command line tricks I use I 
cannot seem to get Chrome to allow me to step through my C++ code. I can 
add the CPP files and even set breakpoints but the program does not stop 
for them. I'm doing this on Ubuntu 22.04 with the latest version of Chrome.

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/02e05a34-f383-4e39-b051-ff7bdb3ae1c9n%40googlegroups.com.