Re: making a dll, pt2

new topic     » goto parent     » topic index » view thread      » older message » newer message
mattlewis said...
useless_ said...

This has been an exercise in narrowing the definition of Dynamic Link Library (as far as Euphoria is concerned) to be a new DLL.extension (.eul? .etl?) which is not repeating executeable code held in all the other DLLs that have been, or might be, loaded.

I've had similar thoughts. Take a look at RoadmapBeyond. There's a bit there about "Compile a euphoria include as a dll."

It's somewhat similar, I think to what you're thinking about.

Matt


You can compile an include as a dll already, it's just you cannot debug-step thru it, and calling the routines is a lill different and takes some more effort.

I mean -binding and -linking, so a Eu source file like http://openeuphoria.org/pastey/152.wc (once you remove the 3 includes and the sleep statement) would "euc -dll -bind -include" as a 1Kbyte file, not a 1Megabyte file. All that would be added would be the code to accept the first (and hidden from user) call to establish where the rid table is in the GotEverything.dll.

As a dll instead of an include, the dll can be unloaded or kept, as desired. And another one or 50 loaded, as needed. Regardless of my app or Greg's app for this, if Eu is ported to the Ras Pi, Arduino, or any of the other micro machines, there's a definite lack of memory space on those, and this ability could be a great benefit there.

My point was sorta that Eu dlls, which as Eu programmers we can call strictly from Eu apps, are bound to and include all the same executeable code as every other dll we link to, and every include we use. This sorta defeats the purpose of a dll, to make code available *once* for each and every app loaded afterwards to use. Granted, the translator (euc) can't make a guess as to what will be available at runtime when it's loaded, and it likely will not be in the bound app that called it, so the translator throws in and binds everything called, including the kitchen sink, to the dll. If i load 20 dlls essentially like pastey 152.wc, i've used 20 megabytes for less than 1K of code, and 19.99 megabytes of it is all copies of the same code, which isn't in the spirit of the DLL philosophy.

I have not thought so far ahead to this maybe this kind of dynamic linking making these "special Eu dlls" more amenable to tasking.

useless

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu