Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
P
parenscript
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • parenscript
  • parenscript
  • Issues
  • #3

Closed
Open
Opened Mar 15, 2019 by Vyacheslav@VyacheslavMik

Seems that I found a bug

Hello. Thanks for your great transpiler.

I think I found a bug related with transpiling loop macro. Here is the code that I try to use:

(ps:ps (loop for price in prices
		   with start = price.date
		   with value = (chain price value)
		   with end   = (@ price date)
		   unless (= value (@ price value))
		     collect (prog1
				 (create start start
					 end   prev
					 value value)
			       (setf start (@ price date)
				     value (@ price value)))
		   do (setf end (@ price date))))

Here is what I get:

(function () {
    var val1556;
    var _js1554 = prices.length;
    var start = price.date;
    var value = chain(price, value);
    var end = at(price, date);
    var collect1555 = [];
    for (var _js1553 = 0; _js1553 < _js1554; _js1553 += 1) {
        var price = prices[_js1553];
        if (value !== at(price, value)) {
            collect1555.push((val1556 = create(start, start, end, prev, value, value), ((start = at(price, date), value = at(price, value)), val1556)));
        };
        end = at(price, date);
    };
    return collect1555;
})();

May be I'm doing something wrong, but seems that @ and chain do not recognises inside loop.

Thanks in advance.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: parenscript/parenscript#3