Notices tagged with lua
-
Today is actually #Lua and #PHP, but here’s a list of #Ocaml resources: https://ocamlverse.github.io/content/learning.html
-
#Roblox introduces #Luau, its near-JIT interpreter for #Lua. The interp requires the Roblox engine. The language differs a little from regular Lua. https://roblox.github.io/luau/
-
if filehandle ~= nil then
return filehandle
end
return false
This has been working okay, but I think
if filehandle ~= nil then
return filehandle, true
else
return nil, false
end
will more directly say what I mean. I need to read a little more to figure out which is more "idiomatic" for the language. (Or maybe ask @amic, who has used the language more than I have.)
#Lua
-
Serializing #Lua tables: https://www.lua.org/pil/12.1.1.html
This feels weird to me. Maybe because Lua is generally embedded inside of a game, where the script need not concern itself about saving its data to a file.
-
Sometimes, just using a web browser and search engine is better than hours of reading docs and tutorials. The answer is right there. #Lua
-
Good morning and #TZAG. Today is #Resurrection Sunday ("Easter"). He is risen!
Stayed up way too late messing around with #Lua last night, so I'm both late and tired. It is a warm, sunny day in #SoCal.
-
At a previous job, he had to script some equipment with a custom BASIC-like language and a little bit of #Lua.
-
Good morning and #TZAG. I’m almost finished with today’s #YoCo ( #yogurt and #coffee ). Plans today include job searching, working on my toy project (part of learning #Lua; I’m also going to do another version of it to revive my !TclTk knowledge and possibly a 3rd version in another language), and removing some of the weeds growing in the yard.
I also need to visit the stores to see whether TP supplies have come in.
-
Discovered #Lua’s io.lines() file iterator. That should clean this little toy project up a little.
-
Time to go to bed. Exploration with #Lua again tonight. It is still mind-bending, but getting somewhat easier to grok. I suspect that I’ll be able to apply this to learning languages like #Squirrel and #Wren, which take inspiration from Lua. As usual, if something seems to give unexpected results, look at the interaction with tables, which are dictionaries (associative array…
-
Now watching some #PHP videos on the former #Lynda.com site ( now called #LinkedIn / #LockedOut Learning ) before I go back to the #Lua videos. I had to take a time out from Lua because none of the (book and video) examples of "first class functions ... pass the function to that one" were working for me and I could not see why. The odd thing is that the weird issues with scopin…
-
Now wstching some #Lua videos now.
-
Finished with breakfast (my normal #YoCo [ #yogurt and #coffee ] ) and lunch. Time to get back to the job search and my efforts to learn #Lua.
-
“If possible, you should always use local variables over global variables, unless there’s a specific reason otherwise.” — https://developer.roblox.com/en-us/articles/Variables #Lua
Going to have to read about the language’s history. I’m sure Lua is young enough to have been created after we learned that global vars should be avoided, so why global by default instead of only when expressly requested?
-
I’m bumbling through “Lua Quick Start Guide” and a couple of online #Lua introductions / tutorials. Usually at the same time. So when I want to go on to the next one, I want to type the equivalent of #Tcl’s
set variables [info vars]
So I can iterate through them and delete them (or set them to nil in Lua parlance). But in the resources I’ve looked at so far, that seems not to be a thing in the Lua world.
-
I’ve been doing some very introductory tutorials for #Lua. It seems pretty interesting. I don’t think it will displace #Tcl and #Python as my favorite scripting languages, but it could become the third in the set. Seeing that tables (which are dictionaries—associative arrays—that can also act as regular arrays if numeric keys are used) are the only data structure, it …
-
Found another old prepaid VISA gift card, but it's been so long that I can't read the expiration date (and therefore, cannot check to see how much is available to spend, if any). I'll take it with me the next time I visit a store and try to pay some or all of the price with it. Now, I'm going to put away #Tcl, #Lua, and #Jsish, and go to bed. I took a couple of sips of sleep en…
-
Recently (not today, but close enough), I've been reading about #Lua and fiddling with "tables" which are dictionaries (other languages may use the terms "dict", "dictionary", "hash", "associative array" for similar concepts).
-
Considering a #JavaScript implementation for a couple of little things I'm working on. This one: https://jsish.org/fossil/jsi/doc/ckout/md/Home.md
(Also considering #Lua and !tcltk. Maybe I'll start with all three and see which one gets farther faster.)