lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

It was thus said that the Great Ross Bencina once stated:
> On 14/02/2012 7:39 PM, Sean Conner wrote:
> >It was thus said that the Great Ross Bencina once stated:
> Should I laugh or cry?


> > So for my use case, it's important to be able to statically
> > compile modules into the program.  It's less important to
> > have a "base library" or "base object system" because what
> > Lua provides is enough (or rather, I have to supply quite a bit,
> > but it's all custom coding anyway).
> Do you think every line of what you supply needs to be custom? Are you 
> really using absolutely no standard utility functions? no reusable 
> abstractions? generic functions? If not, then colour me surprised. 

  I found only once instance where I use what could be considered a
"standard utility function" and that's a version of split() I wrote.  But
other than that, no real abstrations, no generic functions (what do you mean
by "generic" functions anyway?).

  Okay, granted, some code I wrote *could* be replaced with luasocket,
lposix and any number of syslog modules, but 

	a) luasocket does not support IPv6 (not an issue yet at work, but I
	wanted more experience with IPv6 anyway)

	b) there's some overlap between luasocket and lposix, in that both
	deal with file descriptors 

	c) I hated all the existing syslog modules

  Good thing I did write my own [1][2], as it wasn't that much of an issue
to build both shared and static versions of the C-based modules (even so,
the resulting executable of my "Kitchen Sink Lua" is around 3.5M on Linux).

> I had to write a bunch of abstractions just to get started. Sure, they
> were light weight and simple, but they were still necessary to make the
> code readable.

  I guess I just haven't had a need for much abstractions.  

  -spc (And all abstractions leak anyway ... )


[2]	I guess you could call this my "standard library" of code.