Giter Club home page Giter Club logo

stroika's People

Contributors

jpringle13 avatar kjax avatar lewispringle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stroika's Issues

Major rework of exceptions support/exceptions classes

SPEND A LITTLE TIME THINKING ABOUT EXCEPTION STUFF
>> first read BS (stroustprup) book
 And probably next make StringException subclass from std::exception
 And make sure all my excpetions (or most) subclass of StringException
o (maybe rename StringExcpetion to just Exception)

 ExceptionPropagateHelper must be redone using new C++11 features

code to review

Why
template
inline Sequence::Sequence (Sequence&& s)
: inherited (static_cast < inherited&& > (s))
{
_AssertRepValidType ();
}

DON’T UNDERSTAND WHY static_cast<inherited&&> needed on windows ??? sometimes – instead of move<inhierted>

Review Boost

Experiment with and review Boost. Consider if/how to harmonize/integrate with Stroika

valgrind/Linux issue with threads - probably real bug

clang++ / valgrind issue

CLANG+++++

[](17 seconds) [34] Foundation::Execution::Threads (../Builds/DefaultConfiguration/Test34)
[Succeeded](0 seconds) [35] Foundation::Execution::Other (../Builds/DefaultConfiguration/Test35)

(tresting – thjis may only fail with enable-trace-to-file and if so – it maybe an issue with trace messages (to file) durinag  a thread abort callback (signal)

valgrind -q --track-origins=yes --tool=memcheck --leak-check=full --suppressions=DefaultValgrindSuppressions.supp ../Builds/DefaultConfiguration/Test34

issue seems to be iterating through contianers from signal handler – maybe use stl directly for this?

PathName class

Make PathName a class with String CTOR (no explicit). Then make various public functions in that module methods.

Do DEPRECATED for exiingt public functions there.

block allocation docs

write docs on block allocation versus blockallocated versus blocaklocator

add todo to amke my blockaklocator work wtih stl.

doc advnates s of using blocka;locatored macorso etc

Mapping [] syntax leads to confusing bugs

SYNTAX
Mapping<String, VariantValue> tunersObjMap = topLevelObjMap[L"Tuners"].As<Mapping<String, VariantValue>> ();
Mapping<String, VariantValue> newTunersObjMap;
for (KeyValuePair<String, VariantValue> ti : tunersObjMap) {
Mapping<String, VariantValue> thisTunerMap = ti.fValue.As<Mapping<String, VariantValue>> ();
thisTunerMap[L"TECCurrentUpperBound"] = 6.0; //???
newTunersObjMap.Add (ti.fKey, thisTunerMap);
}
topLevelObjMap[L"Tuners"] = newTunersObjMap;

compiles but does wron thing.
Maybe have topLeve[] return const ref? advantage is then above cont compile. Deistangave is wrong semantics for threads…

Possible thread safety / cleanup/performance change (containers)

 New TEMPLATED optional params to CONCRETE container likes like Mapping_Array<> LOCKER.
o One value will be
 Std::mutex
 Execution::SpinLock
 ExternallySynchonized
• (but no lock SIMILAR to SpinLock except in RELASE mode does nothing, but in DEBUG mode sets falg on log but asserts not already set, and unlock unsets falg
• So caller can create an EXNTERALLYSYNCHONZIED (UNLOCKED) container instance, and get in debug mode checking that its threadsafe, but in real runtmode (release mode) runs as fast as possible (no locking)

DOCUMENT/IteratorOwner

>>> REDOCUMENT WHY WE HAVE THIS – AND PROBABLY DON’T LOSE BUT DOCUMENT ONE WAY OR OTHER OTHER WHERE WE DECLARE ITERATOROWNER!!!

“ITERATOR CONCEPTUALLY ITERATING OVER ITERABLE. THING ITERATING OVER NOT LOGICAL TO LOSE. BUT magic with reps is HIDDEN. Sharedptr stuff is just to do that hidden rep sharedptr magic”

PROBBALY LOSE ITERATOROWNER SUTFF /*
* NB - the suggestedOwnerID argument to MakeIterator() may be used, or ignored by particular subtypes
* of iterator/iterable. There is no gaurantee about the resulting GetOwner() result from the
* iterator returned.
*
* \em Design Note
* It might have been better design to make the argument to Iterable::Rep::MakeIterator ()
* be owner instead of suggestedOwner, and then require that it get tracked. But that would
* have imposed a memory (and copying) overhead on each iterator, and the current
* use cases for iterators dont warrant that.
*
* I think its good enough that particular subtypes - where tracking an owner makes sense and
* is useful, we be done. And when not useful, it can be optimized away.
*/
virtual Iterator MakeIterator (IteratorOwnerID suggestedOwner) const = 0;

• But thinkout carefully, and probably do one single remove in one commit so easier to REVERT if I decide I was wrong…

make skel

BUILD SKEL ½ working. Since in the middle of it, nicet o really get working.

Consider adding IDM (identity management) Framework

Consider IDM (identity management) Framework
 Identity Objects
o GUIDS(opaue)
 Permission Objects
o Opaue
 Integrate with third party systems to find identities (LDAP, RADIUS, OpenID, SSL-ClientClient)
 Integrate with third party systems to store permissions
 See general enough to replace HFWS impl
 Consider needs of Block – and see if what I can come up with is sufficient for them (and maybe suggest they use this)
 Provide private impl of ID->Permissions mapping (simple table) and lookup to gen permissions tokens (objects0
 Framework for validation of permissions (given identities)
 Integrate with web-framework

SafeSequence<> - maybe approach to thread safety

 maybe “SafeSequence<
“SafeSequence<> “ : Sequence<> - and that mimics each API and assignemt. For ALL – its thressafe rep. But SafeSequence (and SafeXXX for each subclass) – does envelope threasasafety. A bit like my experimental Contianer::Optional<> code.
o Then – ASSIGNEMNTs all work for data mebers (they are all safe) – but the args to functions aren’t and don’t pay costs!!!

Bijection read validator

 Make sure bijection has ‘validator’ used in reading in data so it doesn’t crash if given bad data but throws.

_SafeReadWriteRepAccessor optimized so doesn’t do needless copy

 Make sure _SafeReadWriteRepAccessor optimized so doesn’t do needless copy back
(really already done but must do optimziatio so don’t copy of refcount != 1 , but if !=2 and oldrep= newrep (ro close)…

>>> GETREP STRING COUNT 1 VERSUS 2 THING.
    I THINK SAFE IF WE SAVE
    Cnt = getRefCnt()
    If (cnt > 2 or (cnt == 2 and filterable->get() != facessor.get ()) {
        Breakreferences\    
    }
    // only risk is before entry to code – refcount WAS 2 (two real diff owners and we need to clone)
    // and our envelope gets overwritten before we do this check (very small window) – but we check count  and THEN check if ptrs diff then we must breakref. Reason != test Ok is no way to have frep.get () go back to pointing to us cuz only refptr is hidden in accessor (til end).

Container CTOR optimization

Container CTORs that call AddAll() CAN do variant that optimizes – doesn’t do LOCKING – since one ref in CTOR. That can make a number of important use cases much better!

ProcessRunner String arguments...

ProcessRunner requires args of SDKString. Probably a mistake. At least add overload taking string. Then maybe deprecate the SDKString version.

Sequence<>InsertAt/Insert

Review SequenceAPI – DOCUMENT that Insert() is basically InsertAt ();
Sequnce::Insert (should have overload taking an iterator to insert at that point refered to by iterator). Like Insert (it.CurrnetIndex()); But even more uimportant ehre cuz we don’t (yet) have it.CurrentIndex()

Consider/cleanup qStroika_Foundation_Traveral_IterableUsesStroikaSharedPtr

 qStroika_Foundation_Traveral_IterableUsesStroikaSharedPtr
o ….
o Add define for Iterables_Support-Threadsafe-Copy
o Add tempalted wrapper on any SHAREDPTR to support threadsafe copy (using threadlocks and uniuu_lco, two locks, and the lock function.
o Test with defined one way or the other (define for theradsafe) and compare performance numbers. Then decicde what todo.

CheckedConverter_ValueInRange exception cleanup

        typename RANGE_TYPE::ElementType  CheckedConverter_ValueInRange (typename RANGE_TYPE::ElementType val, const RANGE_TYPE& r)
        {
            typename    RANGE_TYPE::ElementType useVal    =   Private_::CheckedConverter_Range_Helper_Pinner_ (val, RANGE_TYPE::TraitsType::kLowerBound, RANGE_TYPE::TraitsType::kUpperBound);
            if (not (RANGE_TYPE::TraitsType::kLowerBound <= useVal)) {
                Execution::DoThrow (BadFormatException ());
            }
            if (not (useVal <= RANGE_TYPE::TraitsType::kUpperBound)) {
                Execution::DoThrow (BadFormatException ());
            }

…. Throw more informative exception saying value n outside range a..b.

_SafeReadWriteRepAccessor DTOR makeiterator reace?

Document race with _SafeReadWriteRepAccessor DTOR and makeIteraotr

NOTE – conflict between SafeReadWriteAccessorRep and MkaeIterator() – race – no interlock – so you can get replaced rep object which loses iterator rep!!! tracking!!!

IterablefromIterator<> cleanup

I THINK IterableFromIteraotr<> now documented enough to make this clear.

1>  I can use IterableFromIteartor<> tdirectly – and use its CONTEXT_FOR_EACH_ITERATOR feature – passing in the base iterator – or even the base iterable (mapping) to call make iterator on (probab;ly better).

 And/Or I can fix Creategeneraotr so that COULLD be used if I want.
It needs its API changed to function<function<…optkna>>> and hten the context object ??? Maybe I don’t have enuf. Maybe need a code hook? Or mayben the virtual (void/void variant where I call Make my own iterator) is good enuf.

CLEANUP CODE>…

WaitableEvent::TryWait

Maybe add TryWait() on waitable event – like Wait() – but returns bool instead of throw, and then redo that TryWait as base, and do Waits() that throw is simple inline wrappers.

Further improve valgrind testing/usage

Make it easier to run regtest for mem leaks, building a no-block-allocation build or adding knowlege of our block allocation system to valgrind (there are extension points for this).

Mapping<>::Image

Add method Iterable Image () - returns a set (maybe say return set not iterable?) of items

  •          which are the 'target' of this mapping (all the VALUES collected in a set). Note in docs - range
    
  •          is the containing set of plusaible possible values, but image is the set of actual values
    

DOCUMENT RATIONALE FOR ITERATOR OWNER

DOCUMENT RATIONALE FOR ITERATOR OWNER:

Iterators iterate over something (if not in reality, at least conceptually

 When you iterate over an interable, its illegal to deletet that iterable. However, the underlying REP may be deleted/unreferenced (dealt with how??? – assigned in other threads while iterating – tahts what new XXX #define is for)
 But remains ILLEGAL to delete the iterator container until all objects iterating over it
 We LOGICALLY are iterating of an iterable container, but in fact, behind the scenes – are itearing over iterep rep shared_pointes. The reason the sematncs of owners are important, ius becasuse when we do shared_rep cloning (break references) – we have to be able to re-assocatied running iterators with the RIGHHT iterable rep.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.