Re: My javascript mistake

2018-01-20 Thread Edward K. Ream
On Sat, Jan 20, 2018 at 7:04 AM, Edward K. Ream wrote: - I have just created #655: The js importer could remove @others when a > node has only one child > . This is a > separate, relatively low priority item. It would

Re: My javascript mistake

2018-01-20 Thread Edward K. Ream
On Wednesday, January 17, 2018 at 5:30:17 AM UTC-6, vitalije wrote: > > Well, obviously we don't agree on what "reasonably" imported code look > like. > I have just closed #653 , relating to the jqterm.js. Notes: - I did not detect any

Re: My javascript mistake

2018-01-18 Thread Edward K. Ream
On Thu, Jan 18, 2018 at 5:13 AM, Edward K. Ream wrote: > On Wed, Jan 17, 2018 at 5:30 AM, vitalije wrote: > Attached to this message are two files one Leo file trying to import the >> other js file. Put them in the same folder and try import. It fails,

Re: My javascript mistake

2018-01-18 Thread Edward K. Ream
On Wed, Jan 17, 2018 at 6:09 AM, vitalije wrote: In the file from the previous post, there few special regex patterns that > make js importer fail. > ​Please file a separate issue for this. Problems here can almost certainly be fixed in js_i.scan_line and its helper,

Re: My javascript mistake

2018-01-18 Thread Edward K. Ream
On Wed, Jan 17, 2018 at 5:30 AM, vitalije wrote: Well, obviously we don't agree on what "reasonably" imported code look > like. I have had encountered dozens of js files that *are* imported > correctly in terms that they can be written again with the file content >

Re: My javascript mistake

2018-01-17 Thread Terry Brown
On Wed, 17 Jan 2018 01:50:37 -0800 (PST) rengel wrote: > On Wednesday, January 17, 2018 at 9:56:27 AM UTC+1, Edward K. Ream > wrote: > > > > On Tue, Jan 16, 2018 at 6:08 PM, Terry Brown > > wrote: > > > > Probably want to support JSX as well

Re: My javascript mistake

2018-01-17 Thread vitalije
In the file from the previous post, there few special regex patterns that make js importer fail. If you delete those lines 2595-2613 from jquery.terminal.js, importer will successfully import the file. Looking in generated tree here are few example nodes: //headline:if (typeof define ===

Re: My javascript mistake

2018-01-17 Thread vitalije
Well, obviously we don't agree on what "reasonably" imported code look like. I have had encountered dozens of js files that *are* imported correctly in terms that they can be written again with the file content unchanged, but they all suffered from creating too many or too few nodes and I had

Re: My javascript mistake

2018-01-17 Thread Edward K. Ream
On Wednesday, January 17, 2018 at 4:41:30 AM UTC-6, Edward K. Ream wrote: On Wed, Jan 17, 2018 at 3:54 AM, vitalije wrote: > > Regarding js importing, after some research about the topic, I concluded >> it is not possible/practical to make perfect js importer that can fully

Re: My javascript mistake

2018-01-17 Thread Edward K. Ream
On Wed, Jan 17, 2018 at 4:41 AM, Edward K. Ream wrote: The other part of the puzzle is the J > ​​ > S_ScanState class. It keeps track of context and counts of parents and > curly brackets. > ​Oops. ​The ​JS_ScanState class keeps track of counts of *parens* and curly

Re: My javascript mistake

2018-01-17 Thread Edward K. Ream
On Wed, Jan 17, 2018 at 3:54 AM, vitalije wrote: Regarding js importing, after some research about the topic, I concluded it > is not possible/practical to make perfect js importer that can fully import > javascript code on its own. > ​I have reached the opposite

Re: My javascript mistake

2018-01-17 Thread vitalije
Regarding js importing, after some research about the topic, I concluded it is not possible/practical to make perfect js importer that can fully import javascript code on its own. Doing it right would require building complete AI for this problem space and perhaps dealing with neural networks

Re: My javascript mistake

2018-01-17 Thread Edward K. Ream
On Tue, Jan 16, 2018 at 6:08 PM, Terry Brown wrote: Probably want to support JSX as well :-) > ​Which jsx do you mean? - https://jsx.github.io/ - https://facebook.github.io/jsx/ - https://reactjs.org/docs/jsx-in-depth.html​ Edward -- You received this message because

Re: My javascript mistake

2018-01-16 Thread Terry Brown
Probably want to support JSX as well :-) Cheers - Terry On January 16, 2018 5:20:15 PM CST, "Edward K. Ream" wrote: >On Tuesday, January 16, 2018 at 7:00:43 AM UTC-6, Edward K. Ream wrote: > >> Packages such as node.js, vue.js, react, etc. establish their own >"coding

Re: My javascript mistake

2018-01-16 Thread Edward K. Ream
On Tuesday, January 16, 2018 at 7:00:43 AM UTC-6, Edward K. Ream wrote: > Packages such as node.js, vue.js, react, etc. establish their own "coding conventions" that set de facto standards and minimize the problems and deficiencies of "bare" javascript. babel.js is a

Re: My javascript mistake

2018-01-16 Thread Edward K. Ream
On Tuesday, January 16, 2018 at 7:00:43 AM UTC-6, Edward K. Ream wrote: > > P. S. A node of caution. If I were designing a hothouse for malware, I > would choose something like the npm package warehouse. A search for "npm > malware" yields this page >

My javascript mistake

2018-01-16 Thread Edward K. Ream
This post documents the biggest mistake I have made in the last decade or so. This mistake is akin to my initial misunderstanding of emacs. I didn't realize that tab completion makes it unnecessary to remember or type full emacs command names. I would seen my error had I seen an emacs user