Howdy, Stranger!

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

Codea 2.3.2 Beta

245

Comments

  • Posts: 2,020

    @Simeon

    Mat4 * vec4 now seems to work as expected.

    Deleting a text asset with savetext nil now works with files ending in .txt, but it doesn't do anything for files ending in .yaml that you pick in the asset picker (doesn't give the error it used to though, just doesn't delete the file), unless you type in the .yaml extension yourself. This is an inconsistency, in that generally, the asset managing commands readImage, saveImage, readText, saveText, accept filenames withou the extension, and the asset-picker truncates file extensions. To be honest, I think this extension-truncating behaviour is problematic, as it creates ambiguity if you have 2 files with the same root name but different extensions, eg an OBJ model might have myModel.obj and myModel.mtl (if you are adding support for these extensions). Perhaps the asset picker should return the file name with the extension intact (but have the commands themselves still be able to make an educated guess as to which file is being indicated if the extension is absent, in order to maintain backwards compatibility) ?

  • SimeonSimeon Admin Mod
    Posts: 5,364

    @SkyTheCoder did you update to iOS 9?

    @erickyamato if you create a new project, does it show up in Spotlight when you search for it?

  • dave1707dave1707 Mod
    Posts: 8,396

    I don't want to sound dumb, but what is spotlight search.

  • Posts: 2,020

    @dave1707 swipe down on the iPad homescreen, or swipe to the leftmost panel of the homescreen and you see a search box. Starting with iOS 9, this search box now has an API that developers can use. Type in part of the name of one of your projects, and you should see relevant Codea projects returned in the results. I guess it doubles the functionality of the project search bar in the Codea project screen. I suppose it could be good when people have installed Codea on their iPad, but haven't really used it yet (I remember I had Codea on my iPad for a few months before I used it), to act as a "nudge".

  • dave1707dave1707 Mod
    Posts: 8,396

    @yojimbo2000 Thanks. If I swipe to the leftmost screen, I see the search bar and my Codea projects show when I do a search. I never used that for anything, so I guess that's why I didn't know about it. I also have my projects set for alphabetical order, so I don't even use the search option at the Codea home page.

  • Posts: 1,255

    On latest build, I can't access the += row above the = button.

  • SimeonSimeon Admin Mod
    edited October 2015 Posts: 5,364

    @Mark those are only enabled when there is a valid token somewhere to the left of the caret.

    E.g., if you type:

    local someVar |

    And the | is where the cursor is, then the option to += that token will be available.

    (Edit: the reason behind this is because Lua doesn't have a native +=, so it's a shortcut to replace someName with someName = someName + x)

  • Posts: 2,042

    New project doesn't show either

  • Posts: 1,255

    @Simeon Yes, but it seems to be having trouble picking up variables this time around.

    Also, I'm crashing out of the app much more frequently than previously on the same code. I'm sure I'm just seeing memory overruns, and likely ones caused by some obscure circular reference... Are they showing up in your reports? I don't suppose you can see what's leaking?

  • dave1707dave1707 Mod
    edited October 2015 Posts: 8,396

    @Simeon Getting back to the cut,copy,paste,re-indent,lookup popup not showing, here's what makes it stop working. After pressing one of the keys in the top row that has the dot in the upper right corner to show the extra keys, the popup won't show anymore after that. It works again after closing Codea and getting back in.

    P.S. You don't have to select one of the extra keys, you just need to show them.

  • Posts: 1,976

    @Simeon Oh, sorry, when you said spotlight search I thought you meant the search in Codea. I'm still on iOS 8.

  • SimeonSimeon Admin Mod
    edited October 2015 Posts: 5,364

    @dave1707 thank you! That's really helpful in tracking this down. I think I know what causes this in iOS 9.

    @SkyTheCoder no problem

    @Mark is it a specific sequence that it fails to work with? If it's consistent then it should be quite easy to fix.

    I wish I could see the crash logs. I get them all, but they are not symbolicated and are impossible to read. When TestFlight was not owned by Apple things were a lot more reliable. Edit: looks like Crashlytics supports bitcode now. I will switch to that over the built-in crash reporting for future builds.

  • Posts: 2,020

    @dave1707 damn, you're right. I've been trying to work out what made the pop up disappear since iOS 9 came out. Can't believe I never spotted that.

  • IgnatzIgnatz Mod
    Posts: 5,396

    I get the pop up back by pressing either the search or reference buttons

  • Posts: 2,020

    @Ignatz wow, who needs bug fixes when you have workarounds! For me, that only works if I type something into the search field at the top of the reference. Great to know though, I was getting bored of having to force quit all the time.

  • Posts: 1,724

    Hi Guys,

    Just a quick check - I have been trying to set up yojimbo2000's 3D modeller, without success. Every time I try to sync Dropbox it drops out of Codea, so transfer of models isn't possible. I'm looking into why I have the problem. Could be my Dropbox size - I have hundreds of files in the Codea.app folder.

    Please confirm this is not a feature of 9.02 or 2.3.2(xx).

    Thanks,

    Bri_G

  • dave1707dave1707 Mod
    Posts: 8,396

    @Bri_G I have over 400 Codea projects and I don't have any problems syncing with Dropbox. The largest file that I sync with Dropbox is 1.2 MB.

  • dave1707dave1707 Mod
    Posts: 8,396

    Neither the search or reference gets the popups back for me. Going all the way down in the reference to a specific function or going to a found variable in search has no effect. So far only exiting Codea works for me.

  • dave1707dave1707 Mod
    Posts: 8,396

    @Simeon Not sure what I did to get this.



    Codea keyboard photo image_zpsgkxiwu26.png

  • edited October 2015 Posts: 1,724

    Hi @dave1707,

    Thanks for the feedback, what iOS are you using. Also are your 400 files set up as Sprite/asset packs.

    Thanks,

    Bri_G

  • dave1707dave1707 Mod
    Posts: 8,396

    @Bri_G I'm on iOS 9.0.2 . My 400+ files are Codea projects, not sprites. Maybe that's why I'm not having problems.

  • dave1707dave1707 Mod
    Posts: 8,396

    @Simeon For the problem I show above with the keyboard, here's a program to show how it happens. Hold the iPad in portrait orientation and execute the below program. It will be in landscape orientation, but don't rotate the iPad. Close the program and tap the screen to show the keyboard. It should be messed up.

    supportedOrientations(LANDSCAPE_ANY)
    
    function setup()   
    end
    
    function draw()    
    end
    
  • Posts: 2,020

    @Bri_G I don't seem to be having any issues syncing dropbox. 189 files, 40mb, about half jpegs and pngs, half text files (obj/ mtl files). Codea 2.3.2 build 51, iOS 9.0.2

  • Posts: 2,020

    @dave1707

    Neither the search or reference gets the popups back for me.

    Interesting how you, Ignatz and I get subtly different behaviour. Have you tried pulling down on the slide-out reference to get the search box at the top, and typing something in there? That's what i have to do.

  • dave1707dave1707 Mod
    Posts: 8,396

    @yojimbo2000 Doing a search from the reference screen gets the popup back. A lot easier than closing Codea and getting back in.

  • SimeonSimeon Admin Mod
    Posts: 5,364

    @dave1707 it looks like the cut/copy/paste menu is an iOS 9.0.x bug relating to showing popups. iOS 9.1 appears to fix it.

    That rotated keyboard looks crazy, I'll try to reproduce.

  • edited October 2015 Posts: 1,255

    I believe the memory leak is still there in mesh definition. After blocking a bit of code at a time, it looks like memory wasn't recovering if the draw method redefined a set of meshes.

    Just run this little snippet...

    function draw()
        local m = mesh()
        print(collectgarbage("count")*1024)
    end
    

    And you can see that garbage collection seems to work at first, then stops.

  • SimeonSimeon Admin Mod
    Posts: 5,364

    @Mark so the memory leak comes from mesh()? I recall fixing one related to meshes, will look into it.

  • Posts: 2,020

    @Simeon iOS 9.1 does seem to fix the disappearing cut-copy-paste pop-up bug!

  • SimeonSimeon Admin Mod
    edited October 2015 Posts: 5,364

    @Mark thanks for the snippet. I'm not sure there's a memory leak? If I modify your snippet to collect garbage then all the unreferenced mesh instances get collected (in your example they get collected every now and then, and the memory use drops down)

    function draw()
        local m = mesh()
        collectgarbage()
        print(collectgarbage("count")*1024)
    end
    

    Perhaps the memory leak is happening outside of Lua's interpreter. I'll check that. Edit: the memory profile remains stable in the above example.

  • SimeonSimeon Admin Mod
    edited October 2015 Posts: 5,364

    @dave1707 that keyboard bug seems to be yet another bug with iOS. It still exists in 9.1. But iOS is in complete control over positioning Codea's keyboard input bar and should position it properly. I'll see whether there is a way I can force it to adopt the correct orientation.

  • SimeonSimeon Admin Mod
    Posts: 5,364

    @dave1707 should have the keyboard bug fixed in the next build

  • Posts: 1,255

    @Simeon What I'm seeing is that the memory builds up 20K or so... then it gets collected. Then it builds up 20K or so... and it gets collected. Then it builds up, and up, and up... and the app crashes.

  • Posts: 2,020

    Just downloaded build 52 to try out the new export feature, seems to work really well!

    It just exports your tabs, the icon.png, the info.plist file and I believe (not tested this yet though) assets in the project folder, in a zipped file. ie compared to the regular export xcode option it doesn't have the full Xcode structure, Codea runtime etc, so it's a very compact file.

    It's for backing-up and doing version control on your projects, by sending the file to any app that accepts zip files.

    Working Copy handles zip files very well, you can import the zip file as a repository, or unzip it as a folder within a repo.

  • dave1707dave1707 Mod
    Posts: 8,396

    @Simeon The keyboard problem doesn't appear to be fixed. Using my example program above, I still get the problem that I show with the one row of keys.

  • SimeonSimeon Admin Mod
    Posts: 5,364

    @Mark I see, so it fails to trigger a collect after some time?

    @dave1707 odd! It was fixed in my testing. I'll try some more.

  • edited October 2015 Posts: 1,255

    @Simeon Yep, that's the behavior I'm seeing... and oddly enough, only around mesh. Assigning other local variables, even tables and vectors, gets cleaned up. But Mesh... it cleans it up once, maybe twice, but there's somewhere it's escaping the janitors, and after a bit it just runs away with the resources.

    Oh, and I should note that now that I know where the problem is, I can pretty much avoid it. What was killing me was that I had a bank of "dials" on the screen, and the only way I could figure out to make them work was to employ and arc shader.

  • SimeonSimeon Admin Mod
    Posts: 5,364

    @dave1707 strange, for some reason I had commented out the keyboard fix before sending off build 52. Next build will definitely have the fix in it. Must have been a late night.

    @Mark I'll start running your code on my device

  • Posts: 489

    In the following, there are gaps between the squares. I wouldn't expect that.

        translate(210,100)
        fill(255)
        rect(0,0,200,100)
        for k=1,10 do
            for l=1,20 do
                fill(255-25*k, 12*l, 25*k, 255)
                rect((l-1)*10,(k-1)*10,10,10)
            end
        end
    
  • Posts: 2,020

    @LoopSpace there are no gaps if you add noSmooth() to setup, so it seems to be something to do with antialiasing. Tbh the antialiasing is rather inconsistent across the Codea primitives, making pixel perfect drawing hard. I'm thinking of writing some primitive shaders using the standard derivative GLES addon to see if I can get more consistent stroke and aliasing.

  • Posts: 489

    @yojimbo2000 D'oh! I should have thought of that.

  • edited October 2015 Posts: 489

    ...

  • dave1707dave1707 Mod
    Posts: 8,396

    @Loopspace I mentioned that at the start of this discussion and also when the previous release was being tested. Typing print and then pressing the () and "" keys will result in print"". Other top keys are also a problem. This isn't a problem caused by this release but the last one. This has been causing me typos for a very long time. After typing something, I have to remember to pause before pressing something in the top row.

  • dave1707dave1707 Mod
    Posts: 8,396

    @Loopspace Here's the discussion. See my post dated April 14th.

    http://codea.io/talk/discussion/6476/codea-beta-2-3-1-47/p1
    
  • Posts: 2,020

    @dave1707 reading that old 231 beta thread reminded me: some of the math functions don't report the tab name or line number in the error when you give them bad values. Eg:

        local a,b = 5
        print(math.max(a,b)) --error: attempt to compare number with nil
        print(math.min(a,b)) --error: attempt to compare number with nil
    
  • Posts: 2,020

    @Simeon is it best to make tickets for issues like this and the keyboard row unresponsiveness thing rather than reporting them here?

  • SimeonSimeon Admin Mod
    Posts: 5,364

    @yojimbo2000 the issue tracker is a good place because it means they won't get lost. Raise the issues here to discuss them and to get confirmation from others.

    The keyboard issue is a tricky one. I have a strong suspicion that keyboard performance dropped around the time Apple introduced custom keyboards / keyboard extensions. I'll profile it and see what's going on.

    @yojimbo2000 most of the Codea primitives are just shaders, and the AA code is probably pretty lacking. If you have any ideas about improving them I'm very open to replacing the current primitive shaders.

  • edited October 2015 Posts: 1,976

    Alright, I finally freed up some space and updated to iOS 9.1. Everything seems to be working fine, same as before. Edit: spotlight search is working

  • SimeonSimeon Admin Mod
    Posts: 5,364

    @dave1707 I've looked into the keyboard touch issue. iOS seems to ignore the touches sent to the keyboard accessory bar when you touch it quickly after typing.

    I've spent the afternoon optimising the code editor where possible in an attempt to alleviate the issue, though I don't think it has made much difference. Let me know when the next build is out.

Sign In or Register to comment.