Air Code

SimeonSimeon Admin Mod
edited June 2013 in General Posts: 5,054

Looks like it was approved. Codea 1.5.3 should be up on the App Store soon.

Here's the web site for the feature:

http://twolivesleft.com/Codea/AirCode/

Tagged:
«1

Comments

  • Posts: 1,595

    It's out now, I'm just grabbing my laptop to try it out, looks brilliant thanks!

  • Posts: 8

    Thanks for the Air Code! Indeed looks brilliant.
    This works on Windows Safari 5.1 and Chrome 27.0, but not Internet Explorer 8.0. Is that by design or am I doing something wrong?

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @Olaf I only tested Safari and Chrome. Sorry about IE, I don't have access to it.

  • BriarfoxBriarfox Mod
    Posts: 1,542

    @Simeon very cool, Can you build us an iphone app now :) Aircode would make it usable!

  • Posts: 2,042

    +1 for iPhone version!

  • dave1707dave1707 Mod
    Posts: 7,923

    Air Code works with Windows 7 and IE 10. Will I use Air Code, probably not. I do all my coding on the iPad, so I'm not going to have a laptop and iPad in my lap just playing around. But it's good to know that I can if I want to.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @dave1707 I am the same - I tend to code most on my iPad. But I developed Air Code because sometimes I found I was coding on my iPad at my desk, right next to my large display. Air Code was for those times.

  • Posts: 7

    Thanks so much for adding Air Code to Codea, it will be used often.

  • Posts: 36

    So now Codea has a web server built in. It already had a client. So now we are that far (holds up two fingers very close together) from being able to write two player games. Maybe version 1.5.4 eh?

  • edited June 2013 Posts: 76

    I have three questions about the Air Code.
    Can we add another tab with the Air Code?
    Can we export the code with the Air Code?
    How can I change the background color in the Air Code?

  • Posts: 2,820

    @Simeon - I was looking into making Ace mobile freindly. I ran across the "ipad" branch of Ace on GitHub. Is there any chance you could include that into the editor? Thanks!

  • Posts: 140

    Air Code is amazing. Thanks!!

  • Posts: 6

    Hey! Codea is AMAZING! However, I can't get the air code to work. I get the messag "There was an error creating the server, Please ensure you are connected to a Wifi Network." -I'm connected to my wifi network, internet in all other apps works fine.. I'm not sure what to check next, Firewall or something? If anyone has an idea I'd appreciate it, otherwise keep up the good work on these updates! They are stellar!

  • edited June 2013 Posts: 80

    This is frgging great. I also have been coding next to my computer for a few hours at a time. But nothing beats coding on a Sunday morning, at my favorite crapes breakfast spot...On my Ipad with a bluetooth keyboard.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @jman4414 It could be your firewall. Air Code creates a server running on port 42000, so if you can add an exception for that port and try again that would be great. Let me know how it goes.

    @Thwapp glad you like it! Also crêpes on Sunday morning are the best.

  • Posts: 2,820

    @Thwapp - There's my favorite food right there. That and my favorite app... Unbeatable.

  • Posts: 6

    I like the Idea of AirCode, however always when I try to type something in Safari 6.0.4 Codea crashes.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @niki are you working in an existing project? Does Air Code work on a newly created project? What device are you using?

    If the crash is happening with a specific project, please send me the code that is causing the crash.

  • Posts: 371

    @Simeon, I'm really enjoying Air Code, but it does seem to be a bit buggy:
    1. When I press the restart button it freezes
    2. I can't return back to the project browser once coding on my computer
    3. On Safari (7.0 (9537.46.5)) text input is a bit weird. When I am typing my caret distances itself from the text as I go further into the line. This also causes me not to be able to position the caret. On Chrome it works fine.
    4. Every now and then it freezes and I have to quit Codea (my typed changes are not saved from after the freeze, it can be a bit annoying).

    But apart from that, its working great :)

  • SimeonSimeon Admin Mod
    edited June 2013 Posts: 5,054

    @Jordan I don't have Safari 7.0 — is that the current release? Mine is 6.0.5.

    If Safari 7.0 is from OS X Mavericks then it might be a beta issue with Safari and the Ace code editor.

    Sorry about the occasional freeze. I'll look into making it a bit smoother to work with. Regarding not being able to go back to the project browser, does the back button disappear or stop working?

  • Posts: 371

    @Simeon, It's the beta version. I just thought you might want to know. It doesn't matter to me much, because I use Chrome. :)
    Whenever it freezes the draw loop doesn't update, none of the buttons work, and it won't do anything until I restart Codea twice. It might just be an iOS 7 issue though :)

  • IgnatzIgnatz Mod
    Posts: 5,396

    current Firefox version on Win7 seems to work well, I don't really like the light text on black colours though, I find the code much harder to read than on the iPad

  • edited June 2013 Posts: 6

    @Simeon Yes, I am working at an existing project using an iPad4.

    In the meantime I managed to narrow down the problem but I still could not solve it. Here I attach a much reduced version of my code that still produces the error. I am working on am interactive 3D scene that updates the "modelMatrix" based on the "RotationRate" vector (i.e. acceleration data).
    Editing the program using AirCode results in a crash of Codea. No crash occurred if the "RotationRate" vector is replaced by a constant vector or if

    tot_rot_mat=tot_rot_mat:rotate(phi*180/ math.pi,rot_unit_vect.z, rot_unit_vect.x,rot_unit_vect.y)
    

    is replaced by

    tot_rot_mat=tot_rot_mat:rotate(phi*180/ math.pi,1,1,1)
    

    Also no crash occurs when I simply display the "RotationRate" vector (without updating "tot_rot_mat"), i.e. if it is not used to update the "modelMatrix".

    ----------------------------------------------
    --# Main
    -- Cube
    function setup()
    
    tot_rot_mat=matrix()
    cube = mesh()
    local vertices = {
        vec3(-0.5, -0.5,  0.5), -- Left  bottom front
        vec3( 0.5, -0.5,  0.5), -- Right bottom front
        vec3( 0.5,  0.5,  0.5), -- Right top    front
        vec3(-0.5,  0.5,  0.5), -- Left  top    front
        vec3(-0.5, -0.5, -0.5), -- Left  bottom back
        vec3( 0.5, -0.5, -0.5), -- Right bottom back
        vec3( 0.5,  0.5, -0.5), -- Right top    back
        vec3(-0.5,  0.5, -0.5), -- Left  top    back
      }
      cube.vertices = {
        -- Front
        vertices[1], vertices[2], vertices[3],
        vertices[1], vertices[3], vertices[4],
        -- Right
        vertices[2], vertices[6], vertices[7],
        vertices[2], vertices[7], vertices[3],
        -- Back
        vertices[6], vertices[5], vertices[8],
        vertices[6], vertices[8], vertices[7],
        -- Left
        vertices[5], vertices[1], vertices[4],
        vertices[5], vertices[4], vertices[8],
        -- Top
        vertices[4], vertices[3], vertices[7],
        vertices[4], vertices[7], vertices[8],
        -- Bottom
        vertices[5], vertices[6], vertices[2],
        vertices[5], vertices[2], vertices[1],
      }
      cube:setColors(color(234,0,2,255))
    end 
    
    function draw()
      background(0, 0, 0)
      camera(0,0,-3,0,0,0)
      perspective()
      pushMatrix()
       phi_vect=DeltaTime*RotationRate
       phi=math.sqrt(phi_vect.x^2+phi_vect.y^2+phi_vect.z^2)
       rot_unit_vect=(1/phi)*phi_vect
    ------ >>>>
    tot_rot_mat=tot_rot_mat:rotate(phi*180/ math.pi,rot_unit_vect.z, rot_unit_vect.x,rot_unit_vect.y)
    ------ <<<<
    modelMatrix(tot_rot_mat)
      cube:draw()
      popMatrix()
    end
    
  • SimeonSimeon Admin Mod
    Posts: 5,054

    Thank you @niki, I'll try to reproduce your error.

  • Posts: 37

    Thanks for Air Code! It is a wonderful concept! I tried it out and loved it at first, but when I tried to end my session and check to see if all the code had been transferred to my ipad, only half of the code I had written was transferred. The rest was lost. How often does Air Code update? Maybe if we could have the ability to see the code on the macbook and ipad at the same time, we could visually verify that all the code was transferred before closing the session? Or a way to manually update the ipad before closing the macbook session? I hop this makes sense... I really hope we can make the Air Code work!!

  • Posts: 37

    ic [hope]

  • Posts: 1,976

    @Kempoman That never happened to me, but I think you have to stop coding and wait for a moment for the changes to sync.

  • Posts: 37

    Does it matter which I close first - the browser or the iPad file? I was really surprised that it failed to update about 20 lines of code before I exited the iPad file. Maybe an update status bar would work?

  • Posts: 1,976

    I don't think it matters, but I would close the browser first.

  • Posts: 32

    Totally loving Air Code. Thanks for a brilliant update ;-)

  • Posts: 372

    The updates awesome!! Is there any way to have the predictions in the browser, that'll be even more awesome!!

  • That was really great ! (Update suggestion : button for sync Dropbox) ;)

  • Posts: 2,042

    The new tabbed browser is super helpful! Nice work

  • Posts: 6

    @simeon Still getting the "There was an error creating the server, Please ensure you are connected to a Wifi Network." error message. The only thing that works is to restart my ipad and it'll work for one session. But once I close a session and try again it won't work. Firewall is off on my router (currently) internet and all other wifi needs seem to work fine in other apps on my mac and ipad. Any ideas? I know it's not your problem because I seem to be the only one with this issue.. But any insight into why that message is popping up and what I could do differently would be appreciated. Loving Codea regardless!! Thanks!

  • Posts: 2

    Love the Air Code, but I'd love if you could create new classes via Air Code!

  • Posts: 372

    I have more tabs than the screen can show and now I'm stuck cause i cant find a way to scroll through the tabs. How should I do it?

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @Saurabh you should be able to scroll the tabs — I have been using the two finger scroll on trackpad to scroll them.

  • Posts: 1,976

    Some mice (including mine) have horizontal scrolling. Maybe yours does? You can kind of nudge the mouse wheel from side to side.

  • edited August 2013 Posts: 372

    I have a desktop. And I don't have a horizontal scrolling mouse. Neither can i find any way to scroll to the side. Maybe the next update will fix it.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    Sorry @Saurabh, I use a trackpad at my desktop as well, so that's why I overlooked this. How do you normally scroll horizontally?

  • edited August 2013 Posts: 372

    @Simeon, I usually use the scroll bars at the bottom of the page. Or if the application allows i click the middle mouse button which brings a scroller and then drag the mouse.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    Ah, I see. So I guess the middle mouse button trick does not work on the tab bar?

    Also, if you click the rightmost tab that you can click, does it scroll for you? It should cause the tab you clicked on to be brought to the middle, allowing you to access more tabs. It's a poor workaround, I know, but it's something you can do for now.

    I'll have to think about how to fix it. I didn't really want to have a scroll bar visible on the tab bar.

  • Posts: 372

    No need for a scroll bar found a solution out here: http://www.macworld.com/article/1132933/oldmicescroll.html.
    Just press shift and scroll (why did'nt i try that combination? God knows!!)

  • SimeonSimeon Admin Mod
    Posts: 5,054

    Excellent! Glad there was a simple solution. Thanks for sharing it.

  • Posts: 666

    Has anyone tried to use Air Code with an existing project that has references? I can't seem to either find a way to add references, nor compile a reference-based project.

  • SimeonSimeon Admin Mod
    Posts: 5,054

    @aciolino I use it on projects with dependencies quite a lot. You are right that you can't add new dependencies from Air Code, but existing ones should work.

  • edited August 2013 Posts: 372

    Seems like a bug. Special characters like ã,á,ß etc change into something like this à etc

  • Posts: 2,820

    While Codea crashed a lot during the process, this feature just saved me about 30 minutes to an hour. I haven't really gotten the importance of this feature until now.
    Super great job!
    Thanks!

  • Just installed Codea on my iPad2. Air Code doesn't work. I Allways get the error "There was an error creating the server, Please ensure you are connected to a Wifi Network.". I'm definitely connect to WLAN. Even after a complete fresh restart, I still get this error.
    PLEASE HELP

  • Posts: 502

    anyone experiences a caret glitch in mavericks? mine is off-set to the right by ca. 3 characters... So I dont see where I will be writing the next character.

Sign In or Register to comment.