Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Codea 3.2.10 (253)

dave1707dave1707 Mod
edited February 28 in Beta Posts: 9,241

@Simeon I noticed that the commands unpack and loadstring are gone in this release. Also, a new command warn is included.

PS. loadstring can be replaced with load .

PS. unpack is replaced with table.unpack .
PS. There is also a string.unpack .

«1

Comments

  • Posts: 631

    @Simeon the missing 'unpack' leads to an error in my app, but the error is not located in my code and i don't have any dependencies! See the attached image- I guess it must be some behind the scenes code- Does it ring a bell?

  • dave1707dave1707 Mod
    Posts: 9,241

    @piinthesky See my above post for unpack.

  • Posts: 631

    @dave1707 using your prescription i fixed the unpacks in my code, but this in not in my code but elsewhere.

  • dave1707dave1707 Mod
    Posts: 9,241

    @piinthesky Where or what is the code you’re using that you can’t fix.

  • edited February 28 Posts: 631

    @dave1707 i don't know! Can it be the Codea code itself? As you can see in the image of the error message, the name of the class in which the error occurs is missing. Seems to be something connected to tweens.

    If the error is in a dependency-will the class/function where the error is located be written in the error message? Anyway i don't have any dependencies.

  • dave1707dave1707 Mod
    Posts: 9,241

    @piinthesky I tried running all my tween examples and finally ran into one that gives the same error that you show. I’ll try to narrow it down and see what’s happening and get an example for @Simeon .

  • SimeonSimeon Admin Mod
    Posts: 5,613
    Thank you for discovering this. I'll update the tween library
  • dave1707dave1707 Mod
    Posts: 9,241

    I had a small example, but I guess I don’t need it now.

  • SimeonSimeon Admin Mod
    Posts: 5,613

    @dave1707 did it happen with tweens which have a callback on completion? That's where I can see the old code

    Also in Lua 5.4 there are some new variable types.

    Const variables:

    local x <const> = 10
    
    x = 20  -- this line will be an error
    

    And to-be-closed variables

    local x <close> = someTable
    
    -- Where someTable has a __close metamethod, which gets called when x goes out of scope, or on any error
    
  • dave1707dave1707 Mod
    Posts: 9,241

    @Simeon Yes, it was caused by the callback. When I removed the callback it didn’t crash.

  • Posts: 631

    @Simeon thanks look forward to the fix.
    I read Lua 5.4 is faster. Did you notice any speed up?

  • dave1707dave1707 Mod
    Posts: 9,241

    @piinthesky I'll have to reload the previous Codea version and run a speed test to see if there’s a difference.

  • dave1707dave1707 Mod
    Posts: 9,241

    @piinthesky Here’s a speed test I did on the current and previous Codea versions. I used my pi program to calculate various digits of pi. Here’s the results in seconds. The new version is first. Looks like it’s about 1.7 times faster.

    digits

    5,000       .16612     .246
    10,000     .504384     .835966
    20,000    1.86999     3.203656
    25,000    2.89718     4.98
    50,000   11.42018    19.85396
    
  • SimeonSimeon Admin Mod
    Posts: 5,613

    That's an impressive performance boost

  • dave1707dave1707 Mod
    Posts: 9,241

    Codea ver 255. Tween crash fixed.

  • Posts: 631

    @Simeon tween works good for me now.

  • dave1707dave1707 Mod
    Posts: 9,241

    @Simeon I did speed tests on some other programs I have and on one there wasn’t any increase. On another there was a slight increase. So I guess the speed increase depends on what commands are being used. The pi program does a lot of calculations and table manipulation before it outputs an answer. The other programs just do simple calculations and screen displays throughout the run. So I would say there won’t be a speed increase for the average user doing graphic type output.

  • Posts: 2,218
    @Simeon - had a funny when installing latest version. Seemed to install OK but zwhen I ran it it fired up the project screen and froze with a whit dialogue box including the word Cancel present in it. Had to switch of iPad and re-run to get it to work OK. Also, then didn't get a crash on running first project. Wonder if it's associated with the latter but changes in your code has changed the response when first run?

    Seems to run fine now, editing seems a little slicker and more robust. Thanks for the update now looking into changes you made.
  • Posts: 1,045

    are there supposed to be editor options? i just see format on paste.

  • Posts: 1,045

    codeaunit crashes looking for loadstring??

  • Posts: 1,045

    now "load". and table.unpack, grr :)

  • dave1707dave1707 Mod
    Posts: 9,241

    @RonJeffries There’s just the one option so far. I guess there will be more in the future. loadstring should be replaced with load. Replace unpack with either string.unpack or table.unpack.

  • Posts: 1,045

    curiously, but perhaps not surprisingly, myVec:unpack() works.

  • edited March 3 Posts: 1,045

    Wrong, my bad

  • Posts: 1,045

    I'm seeing what appear to be crashes, sometimes. I'll be in Codea, in the editor, slide to a new app, typically Scrivener or Working Copy, then slide back and Codea is starting up and I have to re-select the program I'm working on. I don't think it's losing edits.

    I have no solid reproduction: it just happens sometimes.

  • Posts: 139

    @RonJeffries that is most likely a memory management issue in your iPad, do you have background app refresh on and do you have many apps open at once when this does happen?

  • edited March 6 Posts: 1,045

    a few but i also have a huge ipad memory. it rarely if ever happened on the previous version

  • SimeonSimeon Admin Mod
    Posts: 5,613

    @RonJeffries thanks for the report, that is odd. You're on the release version?

    When asked to share analytics with developers (I believe it's a question when you set up your iPad initially) did you choose to share? If so, I may have access to the crash logs

    (I don't include any other crash logging in Codea due to wanting to maintain user privacy and ensure consent before collecting analytics, and what Apple collects on my behalf, with user consent, is very basic and completely anonymised so I feel comfortable using the data to improve the product)

  • Posts: 1,045

    Yes, I have Share with App Developers turned on.

  • Posts: 2,218
    Could anyone tell me where I can check for share on analytics because I can't remember seeing it when I got my latest iPad?
  • dave1707dave1707 Mod
    Posts: 9,241

    @Bri_G Go into Settings, about 3 groups down look for Privacy. There’s different analytics there.

  • SimeonSimeon Admin Mod
    Posts: 5,613

    @RonJeffries I've attempted a fix for these crashes in 3.2.12

  • Posts: 2,218

    @dave1707 - found privacy and list of apps that have requested analytics but Codea is not present.

  • SimeonSimeon Admin Mod
    Posts: 5,613

    @Bri_G possibly because you are on the beta version — I get your crash logs through TestFlight

  • Posts: 2,218
    @Simeon - thanks for that. Just wanted to make sure.
  • Posts: 1,045

    @Simeon thanks!

  • Posts: 1,045

    lines with self._foo references do not highlight the _foo but self.foo does highlight.

  • SimeonSimeon Admin Mod
    Posts: 5,613

    @RonJeffries thanks for the report, I've been doing a lot of code editor updates so this is timely. I've also released 3.2.12 with an attempt to fix the crashes I think you are experiencing

  • dave1707dave1707 Mod
    Posts: 9,241

    @Simeon Since you’re updating the editor, here’s something to fix. If you try to place the cursor at the end of a line 2 lines above the keyboard, the code moves up and the cursor is one line down left justified. If you try to place the cursor at the end of a line just above the keyboard, the code moves up and the cursor is two lines down left justified.

  • SimeonSimeon Admin Mod
    Posts: 5,613

    @dave1707 is this a new bug in 3.2.12?

  • SimeonSimeon Admin Mod
    Posts: 5,613

    @dave1707 I see what you mean though, I'll see what I can do

  • dave1707dave1707 Mod
    Posts: 9,241

    @Simeon Thats was an existing bug for awhile. I just kept forgetting about it until you mentioned you were working on the editor.

  • Posts: 2,218
    @Simeon @fave1707 - this was an issue raised a while ago, amongst a number of issues. In addition I noticed when you paste code into a blank tab the corsor ends up in the middle of the last end statement. Also when trying to place the cursor at the end of the code is difficult the cursor seems to jump up a line. This makes pressing to get the exit menu difficult.

    Also may be associated is placement of code in indented code - if you want to add extra code to the indented code it goes in without indentation so you have to tab out again.

    It's almost like some formatting has been deleted from the code affecting cursor position. There should be blank lines after the bottom of any code tab.
  • Posts: 2,218

    @Simeon - on the subject of editor issues I have a problem sometimes with selection of code.

    Example - in landscape I often want to select some functions which when selected reaches the bottom of the tab. The keyboard is usually present taking up half the screen. Scrooling the selection area from top to bottom when you reach the bottom the selection menu appears. Taking your finger off the selection handle the selection menu disappears. Trying to get it back by touching the bottom selection handle, more often than not results in deselection. May be tied to the problems at the bottom of the code - no blank lines, mentioned above.

  • edited March 13 Posts: 1,045

    exported apps seem not to be exported with the icon (corrected). we can test that by loading the program on another tablet.

  • SimeonSimeon Admin Mod
    Posts: 5,613

    @RonJeffries do you mean your projects don't carry across when you install Codea on another device?

  • Posts: 1,045

    no, i mean that the saved project icon does not come over when i load a project on another ipad via a zip file.

  • SimeonSimeon Admin Mod
    Posts: 5,613

    Oh that's odd, I'll give it a try

  • edited March 13 Posts: 1,045

    Global Replace should be renamed to Global Destroy This Program. I makes random changes in random locations, reorders lines, something something impossible to predict or explain. Aside from that, if you want to destroy your program, it's great.

    To duplicate: in a multi-tab program, open a Find, set up and execute some global replace. Change what's in the find, what's in the replacement, do another. Repeat a few times. Observe program is scrambled. I'll see if I can create a better example after I thank God for Working Copy and Git.

  • SimeonSimeon Admin Mod
    Posts: 5,613

    @RonJeffries sorry about that, it sounds frustrating and I'm glad you had everything in Git. I've added it to my list to audit the feature and see what the problem is

Sign In or Register to comment.