Search found 35 matches

by evölbug
Fri Apr 28, 2017 4:43 am
Forum: Libraries and Tools
Topic: Textured Polygons for All!
Replies: 125
Views: 15127

Re: Textured Polygons for All!

I highly doubt you'd get sued, the forum post itself strongly suggests that the user wants you to use their project. You can credit the user (because it's a nice thing to do). After hours of thinking and math, here's what everyone's been waiting for! ... I'm so excited to see what people will make w...
by evölbug
Tue Apr 25, 2017 7:06 pm
Forum: Libraries and Tools
Topic: clasp - tiny class library
Replies: 29
Views: 800

Re: clasp - 8 lines of class

oh, missed about the proto, fixed it and clumped the lines more, now it's 4

thanks for the tests!
by evölbug
Tue Apr 25, 2017 6:30 pm
Forum: Libraries and Tools
Topic: clasp - tiny class library
Replies: 29
Views: 800

Re: clasp - 8 lines of class

I posted it for both feedback and announcement, and really thanks for all the suggestions and inspiration. but as you're aware you haven't figured out how to "do it decently" yet, it would be good to let people know that it's not ready for actual use. Well, it was/is in theory ready for use, maybe s...
by evölbug
Mon Apr 24, 2017 6:31 am
Forum: Libraries and Tools
Topic: clasp - tiny class library
Replies: 29
Views: 800

Re: clasp - 8 lines of class

It's not so slow that I'd give up the readability of objects for a few nanoseconds of performance. Parsing the whole class structure and copying down everything on inheritance is not much better, even if it only happens once in declaration. Just 3 levels of inheritance creates an unreadable cyclic f...
by evölbug
Mon Apr 24, 2017 5:20 am
Forum: Libraries and Tools
Topic: clasp - tiny class library
Replies: 29
Views: 800

Re: clasp - 8 lines of class

I'm not that concerned about performance as it appears to be a bit faster than middleclass according to its performance test. Now, it isn't a real world scenario so I don't know if it's actually faster on heavily packed classes.
perf.png
perf.png (13.95 KiB) Viewed 411 times
by evölbug
Mon Apr 24, 2017 4:52 am
Forum: Libraries and Tools
Topic: clasp - tiny class library
Replies: 29
Views: 800

Re: clasp - 8 lines of class

Reading metamethods directly from class will break their inheritance on longer chains, because pairs() doesn't read the __index tree, which is mandatory for them to be inherited correctly. Of course I could manually check for each individual metamethod to trigger __index lookup, but that'd expand th...
by evölbug
Sun Apr 23, 2017 8:22 pm
Forum: Libraries and Tools
Topic: clasp - tiny class library
Replies: 29
Views: 800

Re: clasp - 13 lines of class

though your spread out approach inspired a more compact solution i have arrived at now
by evölbug
Sun Apr 23, 2017 8:17 pm
Forum: Libraries and Tools
Topic: clasp - tiny class library
Replies: 29
Views: 800

Re: clasp - 13 lines of class

well, it doesn't generate almost identical code, because you can't override individual methods without overriding whole __meta table, and also it generates fractals if you don't nil the table
by evölbug
Sun Apr 23, 2017 7:51 pm
Forum: Libraries and Tools
Topic: clasp - tiny class library
Replies: 29
Views: 800

Re: clasp - 13 lines of class

it's the same as my code just spread out, and it still makes fractals when removing self.__meta = nil on line 2
by evölbug
Sun Apr 23, 2017 7:45 pm
Forum: Libraries and Tools
Topic: clasp - tiny class library
Replies: 29
Views: 800

Re: clasp - 13 lines of class

i'm choosing ease of debugging versus whatever that fractal of headache is
fractal.png
fractal.png (52.05 KiB) Viewed 124 times