{"action":"created","issue":{"url":"https://api.github.com/repos/jamesladd/stc/issues/10","repository_url":"https://api.github.com/repos/jamesladd/stc","labels_url":"https://api.github.com/repos/jamesladd/stc/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/jamesladd/stc/issues/10/comments","events_url":"https://api.github.com/repos/jamesladd/stc/issues/10/events","html_url":"https://github.com/jamesladd/stc/issues/10","id":262056100,"number":10,"title":"Playing with the JVM Reciever","user":{"login":"mattys101","id":30459857,"avatar_url":"https://avatars2.githubusercontent.com/u/30459857?v=4","gravatar_id":"","url":"https://api.github.com/users/mattys101","html_url":"https://github.com/mattys101","followers_url":"https://api.github.com/users/mattys101/followers","following_url":"https://api.github.com/users/mattys101/following{/other_user}","gists_url":"https://api.github.com/users/mattys101/gists{/gist_id}","starred_url":"https://api.github.com/users/mattys101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattys101/subscriptions","organizations_url":"https://api.github.com/users/mattys101/orgs","repos_url":"https://api.github.com/users/mattys101/repos","events_url":"https://api.github.com/users/mattys101/events{/privacy}","received_events_url":"https://api.github.com/users/mattys101/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-10-02T11:31:43Z","updated_at":"2017-10-06T13:43:21Z","closed_at":null,"author_association":"NONE","body":"I've been playing with the concept of the JVM receiver a little  \r\n[JVMReceiver-Example.zip](https://github.com/jamesladd/stc/files/1348719/JVMReceiver-Example.zip)\r\n\r\nYou might not want to look at the code files, they are a bit hacky and woefully incomplete, but the smalltalk file might give you an idea of what I am thinking.\r\n\r\n    | tempVar |\r\n    tempVar := 3.\r\n    JVM invoke: 'println' on: 'java.lang.System.out' with: 'TestingJVM'.\r\n    JVM invoke: 'print' on: 'java.lang.System.out' with: 1.\r\n    JVM invoke: 'println' on: 'java.lang.System.out'.\r\n    JVM invoke: 'println' on: 'java.lang.System.out' with: 2 ofType: 'int'.\r\n    JVM invoke: 'println' on: 'java.lang.System.out' with: tempVar ofType: 'int'.\r\n\r\nThe core of it is to the JVM pseudo variable a suite of 'methods' like\r\n\r\n    invoke:on:\r\n    invoke:on:with:\r\n    invoke:on:with:ofType:\r\n\r\nthat can be used in different situations and have varying degrees of inference depending on whether the values given are literals or variables. That sort of thing.\r\n\r\nBasically, I think if we can give the JVM reciever a nicer interface and some smarts, we can make it a little more natural to mix adaptor code with Smalltalk code. For example, we could perform calculations, call other methods, etc. using standard Smalltalk and use the result in the code output by the JVM receiver. I think your original one was much more limited, unless I am mistaken, and basically required you to write methods as if you were writing the byte code directly?\r\n\r\nThe other thing about giving it some smarts is that you can potentially detect some issues at (smalltalk) compile time, not when the code is executed, which I think was a bit of a problem before?\r\n\r\nWhat do you think?\r\n\r\nMatt\r\n"},"comment":{"url":"https://api.github.com/repos/jamesladd/stc/issues/comments/334758618","html_url":"https://github.com/jamesladd/stc/issues/10#issuecomment-334758618","issue_url":"https://api.github.com/repos/jamesladd/stc/issues/10","id":334758618,"user":{"login":"mattys101","id":30459857,"avatar_url":"https://avatars2.githubusercontent.com/u/30459857?v=4","gravatar_id":"","url":"https://api.github.com/users/mattys101","html_url":"https://github.com/mattys101","followers_url":"https://api.github.com/users/mattys101/followers","following_url":"https://api.github.com/users/mattys101/following{/other_user}","gists_url":"https://api.github.com/users/mattys101/gists{/gist_id}","starred_url":"https://api.github.com/users/mattys101/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattys101/subscriptions","organizations_url":"https://api.github.com/users/mattys101/orgs","repos_url":"https://api.github.com/users/mattys101/repos","events_url":"https://api.github.com/users/mattys101/events{/privacy}","received_events_url":"https://api.github.com/users/mattys101/received_events","type":"User","site_admin":false},"created_at":"2017-10-06T13:43:21Z","updated_at":"2017-10-06T13:43:21Z","author_association":"NONE","body":"Sounds like a plan. I was thinking too much about how it might be in the end, not what can be done short term to get something going. Would probably do the pair of classes, though, i.e., the `Java` and `JavaStatic` classes.\r\n\r\nI think we need to work out a better convention to talk about the classes rather than the Java Smalltalk class and the Java Java class though ;-)\r\n\r\nWRT fields, I don't see why we couldn't include them though. I think they are almost a must for statics, in which case we'd pretty much have the code anyway. I might have to think about it a little more though."}}
{"actor":{"display_login":"mattys101"}}