{"action":"created","issue":{"url":"https://api.github.com/repos/trinketapp/skulpt/issues/56","repository_url":"https://api.github.com/repos/trinketapp/skulpt","labels_url":"https://api.github.com/repos/trinketapp/skulpt/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/trinketapp/skulpt/issues/56/comments","events_url":"https://api.github.com/repos/trinketapp/skulpt/issues/56/events","html_url":"https://github.com/trinketapp/skulpt/pull/56","id":356112184,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyNDg1MjMy","number":56,"title":"Feat/function call fixes","user":{"login":"albertjan","id":301791,"node_id":"MDQ6VXNlcjMwMTc5MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/301791?v=4","gravatar_id":"","url":"https://api.github.com/users/albertjan","html_url":"https://github.com/albertjan","followers_url":"https://api.github.com/users/albertjan/followers","following_url":"https://api.github.com/users/albertjan/following{/other_user}","gists_url":"https://api.github.com/users/albertjan/gists{/gist_id}","starred_url":"https://api.github.com/users/albertjan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertjan/subscriptions","organizations_url":"https://api.github.com/users/albertjan/orgs","repos_url":"https://api.github.com/users/albertjan/repos","events_url":"https://api.github.com/users/albertjan/events{/privacy}","received_events_url":"https://api.github.com/users/albertjan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-31T20:19:07Z","updated_at":"2018-09-04T12:37:24Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/trinketapp/skulpt/pulls/56","html_url":"https://github.com/trinketapp/skulpt/pull/56","diff_url":"https://github.com/trinketapp/skulpt/pull/56.diff","patch_url":"https://github.com/trinketapp/skulpt/pull/56.patch"},"body":"this does two things:\r\n\r\n- it handles `**kwargs` for javascript functions like this \r\n```\r\nSk. object.__init__ = function __init__() {\r\n    // arguments will contain *args and as last element the dict with **kwargs\r\n};\r\nSk.object.__init__.co_kwargs = 1;\r\n```\r\n\r\n- it moves all external functions, stuff called from skulpt, to builtin to the end of the compile so we have access to function\r\n- it adds internal.js with all the functions that are called from javascript\r\n\r\nThis fixes datetime.py and reassigning `abs` @prescod "},"comment":{"url":"https://api.github.com/repos/trinketapp/skulpt/issues/comments/418350956","html_url":"https://github.com/trinketapp/skulpt/pull/56#issuecomment-418350956","issue_url":"https://api.github.com/repos/trinketapp/skulpt/issues/56","id":418350956,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODM1MDk1Ng==","user":{"login":"eah13","id":1702745,"node_id":"MDQ6VXNlcjE3MDI3NDU=","avatar_url":"https://avatars3.githubusercontent.com/u/1702745?v=4","gravatar_id":"","url":"https://api.github.com/users/eah13","html_url":"https://github.com/eah13","followers_url":"https://api.github.com/users/eah13/followers","following_url":"https://api.github.com/users/eah13/following{/other_user}","gists_url":"https://api.github.com/users/eah13/gists{/gist_id}","starred_url":"https://api.github.com/users/eah13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eah13/subscriptions","organizations_url":"https://api.github.com/users/eah13/orgs","repos_url":"https://api.github.com/users/eah13/repos","events_url":"https://api.github.com/users/eah13/events{/privacy}","received_events_url":"https://api.github.com/users/eah13/received_events","type":"User","site_admin":false},"created_at":"2018-09-04T12:37:24Z","updated_at":"2018-09-04T12:37:24Z","author_association":"MEMBER","body":"This fixes bugs as advertised.\r\n\r\n*but* changing `Sk.builtins` to `Sk.internal` is a major API change that breaks some custom modules, including our tests/checks suite, which apparently calls things like `Sk.builtins.asnum$` directly:\r\nhttp://elliott-dev.trinket.io/library/trinkets/da6cfde875\r\n\r\nWe could of course change our module and ship, provided other third party modules we use like numpy, pygame.events, or sense_hat don't have hidden direct calls.  But an unknown amount of third party module breakage would be a major impediment to getting this upstream, and with something this big I think we need it upstream if we're going to be able to accept future PRs to builtins, etc.  And I don't think it's time for Skulpt 2.0.\r\n\r\nSo at first glance I believe the solution would be to give `Sk.builtins` aliases to relevant parts of `Sk.internals` for backwards compatibility?  Or perhaps there's a benefit to leaving the `Sk.builtins` API intact and going with something like `Sk.builtin_exports` for the new and improved stuff?  You probably have some better ideas.  \r\n\r\nButterfly effects at every turn this far down. 🦋 "}}
{"actor":{"display_login":"eah13"}}