Page 2 of 3

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

Posted: Fri Nov 24, 2023 7:58 pm
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

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

Posted: Fri Nov 24, 2023 8:24 pm
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)

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

Posted: Fri Nov 24, 2023 10:05 pm
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

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

Posted: Fri Nov 24, 2023 11:11 pm
by Kartik Agaram
Ooh, thank you!!

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

Posted: Sat Nov 25, 2023 2:52 am
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.

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

Posted: Sat Nov 25, 2023 6:13 am
by rabbitboots
Thanks, there is no more freezing on my end.

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

Posted: Mon Nov 27, 2023 7:19 pm
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!

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

Posted: Sat Dec 02, 2023 9:10 pm
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 29249 times

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

Posted: Sun Dec 03, 2023 2:00 am
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

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

Posted: Mon Dec 04, 2023 8:08 pm
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