Berkeley CSUA MOTD:Entry 34329
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/07/08 [General] UID:1000 Activity:popular
7/8     

2004/10/25-26 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Security] UID:34329 Activity:low
10/25   I have a problem in C++.  I have a bunch of autogenerated classes
        that I need to be able to convert between.  I made a templeted
        cast function in a common header file, but it needs to access a
        protected function in the generated classes.  Is there any way to
        make a templeted friend function shared between all those
        auto-generated classes?  I tried, but I got an error that the
        function hadn't been defined.  From the first auto-gen'd class.
        \_ My head hurts.
           \_ Hahahaha, you made my day!
        \_ is there some reason you can't make better use of polymorphism
           and virtual functions instead of all this conversion crap?
           \_ Yes.  http://www.llnl.gov/CASC/components/babel.html
              \_ Could you explain the relevance of this URL to why
                 you can make better use of polymorphism and v-fncs? -npp
        \_ Any reason not to use a public accessor?
           \_ This is what I've done for now, but I would prefer not to.
              \_ Thing is, friend templates are a mess with current compiler
                 implementations.  I'd hesitate to depend on that feature if
                 you want any kind of portability.  Another possibility would
                 be a template member which does the conversion for you from/to
                 an intermediate type.
        \_ are you allowed to modify the autogened files at all? you could
           convert the private members to protected. then use explicit
           naming to access the protected members from your casting function.
           \_ I'm not sure what you mean by this.  Can I access protected
              data with a non-member function through some kind of
              explicit naming?
ERROR, url_link recursive (eces.Colorado.EDU/secure/mindterm2) 2025/07/08 [General] UID:1000 Activity:popular
7/8     

You may also be interested in these entries...
2013/5/6 [Transportation/Car, Computer/HW/Printer] UID:54672 Activity:nil
5/6     http://h20565.www2.hp.com/portal/site/hpsc/template.PAGE/public/kb/docDisplay/?spf_p.tpst=kbDocDisplay&spf_p.prp_kbDocDisplay=wsrp-navigationalState%3DdocId%253Demr_na-c03747345-1%257CdocLocale%253D%257CcalledBy%253D&javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken
        \_ seems like I get these every 6 months or so from HP.  Do all drives
           have these kind of issues and I only see the ones from HP because
           they are diligent about reporting/fixing these issues?  Or do they
           suck?   (It's not actually their drives so...)  Also, do I really
           need to bring down my production infrastructure and fix all this
	...
2012/7/19-11/7 [Computer/SW/Languages/C_Cplusplus] UID:54439 Activity:nil
7/19    In C or C++, how do I write the code of a function with variable
        number of parameters in order to pass the variable parameters to
        another function that also has variable number of parameters?  Thanks.
        \_ The usual way (works on gcc 3.0+, Visual Studio 2005+):
               #define foo(fmt, ...) printf(fmt, ##__VA_ARGS__)
           The cool new way (works on gcc 4.3+):
	...
2010/8/8-9/7 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Languages/Web] UID:53914 Activity:nil
8/8     Trying to make a list of interesting features languages have
        touted as this whole PL field comes around, trying to see if they
        have basis in the culture of the time: feel free to add some/dispute
        1970 C, "portability"
        1980 C++, classes, oop, iterators, streams, functors, templates
             expert systems
	...
2008/6/24-27 [Computer/Companies/Google, Computer/Companies/Yahoo] UID:50360 Activity:nil Cat_by:auto
6/24    Yahoo vs. Google vs. Bear Sterns employee attrition. Yahoo may be
        dying but it's nothing compared to Bear. Google still rocks, so
        hold on to their stocks! And if you're leaving Yahoo, there's
        a resignation-letter template to use.
        http://seekingalpha.com/article/82514-yahoo-google-bear-sterns-the-employee-turnover-perspective?source=yahoo
	...
2013/10/24-11/21 [Computer/Companies/Apple] UID:54747 Activity:nil
9/19    "No, A Severed Finger Will Not Be Able to Access a Stolen iPhone 5S"
        http://mashable.com/2013/09/15/severed-finger-iphone-5s
        I'm sure the Apple QA department has tested extensively that a severed
        finger will not be able to access a stolen iPhone 5S.
        \_ It doesn't matter whether or not a severed finger can be used.  It
           matters whether or not a robber thinks that a severed finger can be
	...
2013/6/6-7/31 [Politics/Foreign/Asia/China, Computer/SW/Security] UID:54690 Activity:nil
6/6     Wow, NSA rocks. Who would have thought they had access to major
        data exchangers? I have much more respect for government workers,
        crypto experts, mathematicans now than ever.
        \_ flea to Hong Kong --> best dim-sum in the world
           \_ "flee"
        \_ The dumb ones work for DMV, the smart ones for the NSA. If you
	...
2012/8/29-11/7 [Computer/SW/Security] UID:54467 Activity:nil
8/29    There was once a CSUA web page which runs an SSH client for logging
        on to soda.  Does that page still exist?  Can someone remind me of the
        URL please?  Thx.
        \_ what do you mean? instruction on how to ssh into soda?
           \_ No I think he means the ssh applet, which, iirc, was an applet
              that implemented an ssh v1 client.  I think this page went away
	...
2012/8/7-10/17 [Computer/SW/Security] UID:54455 Activity:nil
8/6     Amazon and Apple have lame security policies:
        http://www.wired.com/gadgetlab/2012/08/apple-amazon-mat-honan-hacking/all
        "First you call Amazon and tell them you are the account holder, and
         want to add a credit card number to the account. All you need is the
         name on the account, an associated e-mail address, and the billing
         address. "
	...
2011/5/19-7/30 [Computer/SW/Security] UID:54110 Activity:nil
5/19    Uh, is anyone still using this? Please mark here if you post and
        haven't added this yet. I'll start:
        \_ person k
        \_ ausman, I check in about once a week.
        \_ erikred, twice a week or so.
        \_ mehlhaff, I login when I actually own my home directory instead of
	...
2011/2/14-4/20 [Computer/SW/Unix] UID:54039 Activity:nil
2/14    You sure soda isn't running windows in disguise?  It would explain the
        uptimes.
        \_ hardly, My winbox stays up longer.
        \_ Nobody cares about uptime anymore brother, that's what web2.0 has
           taught us.  Everything is "stateless".
           \_ You;d think gamers would care more about uptime.
	...
2010/8/12-9/7 [Computer/SW/Languages/Perl] UID:53922 Activity:nil
8/12    Ruby coders, do you mostly DIY your stuff or use the ruby libs out
        there?   How is their quality compared to other libs you have used
        for other langs?  Thx.
        \_ I use Ruby for hobby stuff, etc.  I use libraries for system stuff
           (web access, process, etc.) but that's about it.  Perl libraries are
           much better/more complete.  I assume because of the maturity and
	...
2010/2/22-3/12 [Computer/HW] UID:53723 Activity:nil
2/20    There was a failure validating the SSL/TLS certificate for the server
                                          <DEAD>mail.csua.berkeley.edu<DEAD>
        The reason for the failure was
                          self signed certificate in certificate chain (details)
        We have not verified the identity of your server. If you ignore this certificate validation
        problem and continue, you could end up connecting to an imposter server.
	...
Cache (3512 bytes)
www.llnl.gov/CASC/components/babel.html
Gauntlet Babel Motivation Computational scientists developing large simulation codes often face difficulties due to language incompatibilities among various software libraries. Scientific software libraries are written in a variety of programming languages, including Fortran, C, C++, or a scripting language such as Python. Language differences often force software developers to generate mediating glue code by hand. In the worst case, computational scientists may need to re-write a particular library from scratch or not use it at all. We have developed a tool called Babel that addresses language interoperability and re-use for high-performance parallel scientific software. Its purpose is to enable the creation, description, and distribution of language independent software libraries. Approach Babel (pronounced babble) addresses the language interoperability problem using Interface Definition Language (IDL) techniques. An IDL describes the calling interface (but not the implementation) of a particular software library. IDL tools such as Babel use this interface description to generate glue code that allows a software library implemented in one supported language to be called from any other supported language. We have designed a Scientific Interface Definition Language (SIDL) that addresses the unique needs of parallel scientific computing. SIDL supports complex numbers and dynamic multi-dimensional arrays as well as parallel communication directives that are required for parallel distributed components. SIDL also provides other common features that are generally useful for software engineering, such as enumerated types, symbol versioning, name space management, and an object-oriented inheritance model similar to Java. XML interface descriptions are stored either in a local file repository or on the web using Alexandria. The vision is that a scientist downloading a particular software library from the component repository will receive not only that library but also the required language bindings generated automatically by the Babel tools. The Babel code generator reads SIDL XML descriptions and automatically generates glue code for the specified software library. This glue code mediates differences among calling languages and supports efficient inter-language calls within the same memory address space and, eventually, across memory spaces for distributed objects. The code generators create four different types of files: stubs, skeletons, Babel internal representation, and implementation prototypes. The internal object representation is essentially a table of function pointers, one for each method in an object's interface, along with other information such as internal object state data, parent classes and interfaces, and Babel data structures. Stub and skeleton code translates between the calling conventions of a particular language and the internal Babel representation. The code generators also create implementation files that contain function prototypes to be filled in by the library developers. To simplify the task of library writers, we have added automatic Makefile generation as well as a code splicing capability that preserves old edits during the regeneration of implementation files after modifications to the SIDL source. Finally, the run-time library provides general services such as reference counting and dynamic type identification. In the future, we expect to support dynamic loading of objects, reflection, and a dynamic invocation interface.