Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Methods in types
#6
(01-25-2025, 04:36 PM)James D Jarvis Wrote: Put a string in the user defined type.
Store code in that string.
Write an interpreter that can run the code in that string. 
Make sure to check that code with your main program and have the results of any code it executes be responded to.
Tada ...you have methods.

this would work fabulously iff one is also "fluent" with julia, lua, python or other scripting language.  although it adds a layer of complication having to provide dynamic library and/or link with static library.

one thing i was supposed to be doing is to employ lua 5.4 as workhorse.  especially for math and for regular expressions.  take advantage also of the tables.  while i was forced to use only 32-bit linux.  i wrote a few functions in c that required linking with liblua.a, to come up with a "suffix-so" file.  one is a replication of _files$ in qb64 phoenix now.  another was a wave file loader, to do it much faster than by interpreted means.  i worked an awful lot with wave files using lua.  because i couldn't have qb64 or any other "real" programming system other than gcc.  i didn't have internet at that time and the computer i was using was failing.  this was until 2017 and the disaster that wasn't in texas.
Reply


Messages In This Thread
Methods in types - by bobalooie - 01-17-2025, 01:02 AM
RE: Methods in types - by mcalkins - 01-22-2025, 05:38 AM
RE: Methods in types - by bobalooie - Yesterday, 07:45 PM
RE: Methods in types - by hsiangch_ong - 01-22-2025, 05:50 AM
RE: Methods in types - by James D Jarvis - 01-25-2025, 04:36 PM
RE: Methods in types - by hsiangch_ong - 01-26-2025, 12:26 AM
RE: Methods in types - by bplus - 01-26-2025, 12:08 AM
RE: Methods in types - by Pete - Yesterday, 08:00 PM



Users browsing this thread: 4 Guest(s)