Lua Carousel: a programming environment for computers and mobile devices

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Kartik Agaram
Prole
Posts: 34
Joined: Fri Apr 01, 2022 4:46 am

Re: Lua Carousel: a programming environment for computers and mobile devices

Post by Kartik Agaram »

Here's a test program. For me with LÖVE 11.4, pretty much any chord involving modifiers triggers the `textinput` event.

Code: Select all

function love.keypressed(key)
  print('keypressed', key)
end

function love.textinput(t)
  print('textinput', t)
end
User avatar
Kartik Agaram
Prole
Posts: 34
Joined: Fri Apr 01, 2022 4:46 am

Re: Lua Carousel: a programming environment for computers and mobile devices

Post by Kartik Agaram »

If the above test behaves the same way for you as it does for me, could you please give this program the once-over? Does it print the correct textinput events for all the printable keys on your keyboard?

Code: Select all

Keys_down = {}

function love.keypressed(key)
  Keys_down[key] = true
end

function love.textinput(t)
  if any_modifiers_down() and Keys_down[t] then
    return
  end
  print('textinput', t)
end

function love.keyreleased(key)
  Keys_down[key] = nil
end

function any_modifiers_down()
  return Keys_down.lctrl or Keys_down.rctrl or
        Keys_down.lalt or Keys_down.ralt or
        Keys_down.lshift or Keys_down.rshift or
        Keys_down.lgui or Keys_down.rgui
end
Basically if a textinput fires with the exact same value as a keypressed, we suppress it if any modifiers are active (assuming they were handled as necessary by keypressed)
User avatar
rabbitboots
Prole
Posts: 6
Joined: Tue Jul 26, 2016 11:12 pm

Re: Lua Carousel: a programming environment for computers and mobile devices

Post by rabbitboots »

This is very cool. I came to report the freeze on window resize, but I see it has been noted already. (In my case, it freezes when making the window very narrow.)

This error occurs when the window height is short enough that no lines of text in the editor widget are displayed:

Code: Select all

Error: compute_scrollbar:6: attempt to index a nil value
stack traceback:
	compute_scrollbar:6: in function 'compute_scrollbar'
	draw_scrollbar:6: in function 'draw_scrollbar'
	on.draw:11: in function 'draw'
	main.lua:164: in function 'draw'
	app.lua:183: in function <app.lua:165>
	[C]: in function 'xpcall'
	app.lua:193: in function <app.lua:192>
	[C]: in function 'xpcall'
	[love "boot.lua"]:370: in function <[love "boot.lua"]:337>
OS: Fedora 38 and Windows 10
LÖVE ver: 11.4
Carousel build: bd0c4c44
User avatar
Kartik Agaram
Prole
Posts: 34
Joined: Fri Apr 01, 2022 4:46 am

Re: Lua Carousel: a programming environment for computers and mobile devices

Post by Kartik Agaram »

Ooh, thank you!!
User avatar
Kartik Agaram
Prole
Posts: 34
Joined: Fri Apr 01, 2022 4:46 am

Re: Lua Carousel: a programming environment for computers and mobile devices

Post by Kartik Agaram »

BrogsagtMist and rabbitboots, please try the latest version now: https://akkartik.itch.io/carousel

I've hopefully fixed the freeze on both window resize and font changes. Hopefully a small window was the only cause of the issues you were seeing. Please let me know if you see it again.

You might still see the error screen if the window is too small. But these errors are recoverable. If you grow the window larger and then press a key, Carousel will reattempt to get going.
User avatar
rabbitboots
Prole
Posts: 6
Joined: Tue Jul 26, 2016 11:12 pm

Re: Lua Carousel: a programming environment for computers and mobile devices

Post by rabbitboots »

Thanks, there is no more freezing on my end.
User avatar
milon
Party member
Posts: 472
Joined: Thu Jan 18, 2018 9:14 pm

Re: Lua Carousel: a programming environment for computers and mobile devices

Post by milon »

Kartik Agaram wrote: Fri Nov 24, 2023 6:02 am The space on the right is available for your programs, as my examples show :)
I assume it's a list of projects or files or something, but it's all empty space in your images here & on your itch page. Am I missing something?

EDIT - I was thinking of using this in place of Geany, but I miss the "creature comforts" of an IDE (mouse wheel to scroll, auto complete, etc). But it's really cool that it can be used on mobile to code on the go!
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
User avatar
Kartik Agaram
Prole
Posts: 34
Joined: Fri Apr 01, 2022 4:46 am

Re: Lua Carousel: a programming environment for computers and mobile devices

Post by Kartik Agaram »

milon wrote: Mon Nov 27, 2023 7:19 pm
Kartik Agaram wrote: Fri Nov 24, 2023 6:02 am The space on the right is available for your programs, as my examples show :)
I assume it's a list of projects or files or something, but it's all empty space in your images here & on your itch page. Am I missing something?

EDIT - I was thinking of using this in place of Geany, but I miss the "creature comforts" of an IDE (mouse wheel to scroll, auto complete, etc). But it's really cool that it can be used on mobile to code on the go!
Thank you! Yes, I'm not a good enough programmer (yet) to compete with a mature IDE :) But oh, the mouse wheel is an obvious omission. Some of my other apps have it, so it's easy to bring in. Please check out the version I just uploaded:

https://akkartik.itch.io/carousel/devlo ... el-support

I'm particularly curious about usability issues. Is it too fast, too slow, etc. I don't have much experience supporting the mouse wheel.

Regarding what I mean by "available for your programs", here's a screenshot of one of the apps mentioned in the above link, running on a large monitor. Does that help?
lua-carousel-tree-large.png
lua-carousel-tree-large.png (105.64 KiB) Viewed 29247 times
User avatar
Kartik Agaram
Prole
Posts: 34
Joined: Fri Apr 01, 2022 4:46 am

Re: Lua Carousel: a programming environment for computers and mobile devices

Post by Kartik Agaram »

Actually I take that back, anybody using Lua Carousel please download the current version. I've fixed a number of embarrassing bugs over the past week, and have reached a milestone of sorts where I'm not aware of any open bugs. (Remaining issues require larger redesign.)

https://akkartik.itch.io/carousel
User avatar
milon
Party member
Posts: 472
Joined: Thu Jan 18, 2018 9:14 pm

Re: Lua Carousel: a programming environment for computers and mobile devices

Post by milon »

Thanks for clarifying. :)
Kartik Agaram wrote: Sat Dec 02, 2023 9:10 pm I'm particularly curious about usability issues. Is it too fast, too slow, etc. I don't have much experience supporting the mouse wheel.
Mouse wheel works great! It's exactly the right speed (at least for me), and works so well that I actually forgot at first that I was supposed to pay attention to it! :)

The scroll bars are pretty great too! I like being able to scroll past the end and see some whitespace down there. (I know I'm weird, lol!)

Other little things I noticed:
* When you click the ">>" menu, it should close again after selecting New or Delete
* Ctrl+Home and Ctrl+End to jump to the start/end of the file would be helpful (for me, anyway)
* Hover tooltips might be nice for the GUI buttons - just be mindful how translations might work going forward
* Undo/Redo would be nice if that's not out of the scope of the project
* Some kind of "page count" would be helpful -- it's less useful for me to know that I'm on page/example/file number 8 than it is to know that I'm on 8/12, for example
* Related to the previous, it might be nice to have a menu or listing of the various files/examples currently open (maybe with a title listed?)

I think that's it for now. :3
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest