You are not logged in.
Hello all
It has been some time since I've had Arch installed and now I'm back.
I'm currently learning Lua to be able to customize my Awesome desktop. In doing so I decided that the only way to learn was by doing so I chose
graysky's modprobe-db to clone in Lua (albeit not a full clone).
I was wondering if anybody would care to comment and let me know if they think it's ready for actual use or if it still needs more work.
I'm not a programmer and I'm not even all the way through Programming with Lua so I'm sure there are much better ways to do it than what I came up with
but it seems to work pretty good for me and it's fast.
All comment and criticisms welcome. I figure that too is important in learning.
Here are the main differences (some because I haven't learned how to do them in Lua yet):
This code creates a default config if you don't have one in .config when you run the program for the first time. It's hardcoded in.
modprobe-db's config file allow variables to be set for terminal colors, etc.. This code does not have that yet (I'm not sure the proper way to load a few variables from another file in Lua yet. So until I do color is harcoded in.)
This code grabs the files it needs from the user who ran it so I had to use Sudo in the recall option to keep the user's conf & db files intact but allow root privileges. When I tried to sudo the entire program it wound up creating conf & db files for root.
I actually fixed that but I figured if for some weird reason somebody wants to use this as root it would block the creation on the db and conf file so I removed it.
Thanks
P.S. I'm mainly been learning Lua 5.1 and Luajit and I'm not familiar with the changes to 5.2 yet but it still seems to run perfectly well so I dodged a bullet there.
Last edited by hNID (2015-01-22 20:48:22)
Offline