- Journals on C++ - 4 Updates
- C++ for industrial automation - 1 Update
- On-line Clang compiler - 7 Updates
- On-line Clang compiler - 2 Updates
- convert int to hex - 5 Updates
- Access Violation on a thread - 4 Updates
- What do you think of this style for getter-putters? - 2 Updates
Andrey Karpov <karpov2007@gmail.com>: Jan 29 09:41AM -0800 If the article is in Russian it can be published on http://habrahabr.ru/. We might be able to publish it on http://www.viva64.com/. However, that depends on the article topic. I would suggest that you e-mail me: karpov [@] viva64.com. I will try to help and advise. |
Vlad from Moscow <vlad.moscow@mail.ru>: Jan 29 10:44AM -0800 On Thursday, January 29, 2015 at 8:41:58 PM UTC+3, Andrey Karpov wrote: > If the article is in Russian it can be published on http://habrahabr.ru/. We might be able to publish it on http://www.viva64.com/. However, that depends on the article topic. I would suggest that you e-mail me: karpov [@] viva64.com. I will try to help and advise. The article is written in bad Englich.:) Because the article contains at least three proposals to the C++ Standard I would prefer a journal with a large auditoria that it could be discussed more detailly. |
Andrey Karpov <karpov2007@gmail.com>: Jan 29 11:49AM -0800 > The article is written in bad Englich.:) Because the article contains at least three proposals to the C++ Standard I would prefer a journal with a large auditoria that it could be discussed more detailly. We can help translate the article. Then post it on the site viva64.com. After that, you can post a link on site isocpp.org. Perhaps article will interest readers and there will be a discussion. Proposes move communication to e-mail. |
jacob navia <jacob@spamsink.net>: Jan 29 10:59PM +0100 Le 27/01/2015 19:04, Lynn McGuire a écrit : > Dr. Dobbs has gone virtual at: > http://www.drdobbs.com/cpp ~ $ ping www.drdobbs.com PING www.drdobbs.com (192.155.48.108): 56 data bytes Request timeout for icmp_seq 0 Request timeout for icmp_seq 1 Request timeout for icmp_seq 2 Request timeout for icmp_seq 3 Request timeout for icmp_seq 4 Request timeout for icmp_seq 5 Request timeout for icmp_seq 6 Request timeout for icmp_seq 7 Request timeout for icmp_seq 8 Request timeout for icmp_seq 9 Request timeout for icmp_seq 10 Request timeout for icmp_seq 11 ^C --- www.drdobbs.com ping statistics --- 13 packets transmitted, 0 packets received, 100.0% packet loss ~ $ How sad is all this. I remember the first numbers of that magazine, the sense of wonder at the small BASIC listings, the assembler stuff, and the flames section in the last page... Modern programmers do not read this kind of stuff. No hacking around now, no assembler, there is no more exciting stuff, just a job from nine to five pushing some buttons in the last IDE. Not even nostalgia is what it used to be... :-) |
Jorgen Grahn <grahn+nntp@snipabacken.se>: Jan 29 09:57PM >> Lot of it is written in C++. > I'm sorry... but your brief reply is incredible on so many levels, > that I don't know what to say. To me it just seems like an obviously true statement. Not very interesting perhaps, but credible rather than incredible. ... > before. > But the use of C++ for such embedded projects will be quite > different from a "normal desktop program". I think it's the same old problem we run into over and over again. There seems to be two groups of people who think about "embedded" in one of two ways: A. Mostly tiny, very limited systems, and often hard real-time requirements. (A few systems are big and general.) B. Mostly as big and as full-featured as servers. Mostly run Linux. (A few systems are tiny and specialized.) I'm in group B, and you seem to be in group A. I have no idea which group is "right", but I know hundreds of people who work in (B) and one or two who work in (A). But the Raspberry Pi, Beaglebone and so on that you mention -- those are really on the "big and general-purpose" end of the scale. The smartest way to use them IMO is to write Linux drivers for your peripherals, and then do the application logic as normal Unix programming. Then plain, standard C++ is a good candidate language, and there won't be a lot that's "embedded-specific" about the code you write. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
Vlad from Moscow <vlad.moscow@mail.ru>: Jan 29 08:12AM -0800 Is any on-line Clang compiler? |
"Öö Tiib" <ootiib@hot.ee>: Jan 29 10:35AM -0800 On Thursday, 29 January 2015 18:12:18 UTC+2, Vlad from Moscow wrote: > Is any on-line Clang compiler? http://gcc.godbolt.org/ generates x86 assembler with clang 3.4.1 |
Vlad from Moscow <vlad.moscow@mail.ru>: Jan 29 10:40AM -0800 On Thursday, January 29, 2015 at 9:35:26 PM UTC+3, Öö Tiib wrote: > On Thursday, 29 January 2015 18:12:18 UTC+2, Vlad from Moscow wrote: > > Is any on-line Clang compiler? > http://gcc.godbolt.org/ generates x86 assembler with clang 3.4.1 Thnaks but I would prefer an on-line compiler that allows to run a program. Investigating an assembler code is time consuming. |
"Öö Tiib" <ootiib@hot.ee>: Jan 29 11:02AM -0800 On Thursday, 29 January 2015 20:41:02 UTC+2, Vlad from Moscow wrote: > > > Is any on-line Clang compiler? > > http://gcc.godbolt.org/ generates x86 assembler with clang 3.4.1 > Thnaks but I would prefer an on-line compiler that allows to run a program. Investigating an assembler code is time consuming. http://melpon.org/wandbox/ attempts to run it |
Vlad from Moscow <vlad.moscow@mail.ru>: Jan 29 11:54AM -0800 On Thursday, January 29, 2015 at 10:03:10 PM UTC+3, Öö Tiib wrote: > > > http://gcc.godbolt.org/ generates x86 assembler with clang 3.4.1 > > Thnaks but I would prefer an on-line compiler that allows to run a program. Investigating an assembler code is time consuming. > http://melpon.org/wandbox/ attempts to run it Thanks. It helped. |
"Öö Tiib" <ootiib@hot.ee>: Jan 29 12:09PM -0800 On Thursday, 29 January 2015 21:14:34 UTC+2, Stefan Ram wrote: > So what the questioner is looking for might be > a Clang-based /implementation/ rather than > a Clang compiler. Perhaps go teach ISO C++ guys first ... they are sort of authority about C++. However on https://isocpp.org/get-started they list http://melpon.org/wandbox/ among "online compiler pages" not among "online implementation pages" like you seem to suggest. |
Heinz Müller <Heinz.Mueller@mailinator.com>: Jan 29 09:39PM +0100 Stefan Ram wrote: > So what the questioner is looking for might be > a Clang-based /implementation/ rather than > a Clang compiler. You're talented in giving useless comments. |
ram@zedat.fu-berlin.de (Stefan Ram): Jan 29 07:14PM >>>On Thursday, 29 January 2015 18:12:18 UTC+2, Vlad from Moscow wrote: >>>>Is any on-line Clang compiler? >>Thnaks but I would prefer an on-line compiler that allows to run a program. (...) >attempts to run it A C++ compiler does not execute a C++ program. A C++ compiler /translates/ a C++ program. A C++ /implementation/ executes a C++ program. So what the questioner is looking for might be a Clang-based /implementation/ rather than a Clang compiler. |
ram@zedat.fu-berlin.de (Stefan Ram): Jan 29 08:23PM >about C++. However on https://isocpp.org/get-started they >list http://melpon.org/wandbox/ among "online compiler pages" >not among "online implementation pages" like you seem to suggest. An implementation usually contains a compiler, so it is not that false to list an implementation as a compiler. A compiler, however, is not an implementation, nor does it contain an implementation. So it would usually be false to list a compiler as an implementation. |
Rosario193 <Rosario@invalid.invalid>: Jan 29 08:51AM +0100 On Tue, 27 Jan 2015 13:55:13 -0800 (PST), ghada glissa wrote: >Dear all, >Is there any predefined function that convert in to hex or octet string in c++. >Regards. #include <stdio.h> #define u8 unsigned char // return one pointer to pointer to arrays // one array is 8 bit partition of the argument a [swapped] // one as 4 bit partition of the argument a [swapped] // and conversion to digits they rapresent u8** intToHexChar(int a) {static u8 r0[ sizeof(int)+4]; static u8 r1[2*sizeof(int)+4]; static u8 *r[2]={r0, r1}; static u8 hexStr[]="0123456789ABCDEF"; unsigned i, aa; aa=a; for( i=sizeof(int)-1; ; --i ) {r0[i]=aa&0xFF; aa>>=8; if(i==0) break; } aa=a; for( i=2*sizeof(int)-1; ; --i ) {r1[i]=hexStr[aa&0xF]; aa>>=4; if(i==0) break; } return r; } int main(void) {int m=0x12f5e188, i; u8 **r; unsigned x; r=intToHexChar(m); printf("As Hex: "); for(i=0; i<sizeof(int) ; ++i) {x=r[0][i]; printf("%x#", x); } printf("As Chars: "); for(i=0; i<2*sizeof(int); ++i) printf("%c#", r[1][i]); printf("\n"); return 0; } As Hex: 12#f5#e1#88#As Chars: 1#2#F#5#E#1#8#8# |
Ian Collins <ian-news@hotmail.com>: Jan 29 09:22PM +1300 Rosario193 wrote: >> Regards. > #include <stdio.h> > #define u8 unsigned char No! -- Ian Collins |
jak <please@nospam.tnx>: Jan 29 02:48PM +0100 Il 27/01/2015 23:42, ghada glissa ha scritto: > res[2]=e1 > res[3]=88 > Regards. Forgive me but I did not understand clearly what you want but you can take a look at this example. Maybe something can be worthwhile: #include <stdio> #include <string> #include <vector> #include <iostream> using namespace std; string BaseConv(int, void *, int); // BaseConv parameters: // 1) Byte offset from base address // 2) Base address // 3) Conversion base: 2 to 16 int main(int argc, char *argv[]) { long Value = 0x12f5e188; int CBase; vector <string> Cnv; unsigned int i; for (CBase = 2; CBase <= 16; CBase++) { cout << endl << "Base " << CBase << ": " << endl; Cnv.clear(); for (i = 0; i < sizeof Value; i++) Cnv.push_back(BaseConv(i, &Value, CBase)); for (i = 0; i < Cnv.size(); i++) cout << i + 1 << ") " << Cnv[i] << endl; cout << endl; system("pause"); } return 0; } string BaseConv(int BytePos, void *Data, int Base) { unsigned char Byte = ((unsigned char *)Data)[BytePos]; string Res = ""; const char LT[] = "0123456789ABCDEF"; if (Base > 1 && Base <= 16) for (; Byte > 0; Byte /= Base) Res = LT[Byte % Base] + Res; return Res; } |
Christopher Pisz <nospam@notanaddress.com>: Jan 29 10:06AM -0600 On 1/29/2015 1:51 AM, Rosario193 wrote: > return 0; > } > As Hex: 12#f5#e1#88#As Chars: 1#2#F#5#E#1#8#8# You win the ugly code of the week award. What's wrong with #include <cstdio> ? Defining your own types as primitive types accomplishes what? One more search someone has to do when looking at your code. Naming all variables with a single or double letter rather than a meaningful name. (void) parameters instead of (), for what purpose? I thought you were trying to save keystrokes. more than one statement on the same line Statements sometimes on same line with brackets, sometimes not, sometimes no brackets at all. At least be consistent with ugly style. |
"Öö Tiib" <ootiib@hot.ee>: Jan 29 10:26AM -0800 On Thursday, 29 January 2015 18:06:16 UTC+2, Christopher Pisz wrote: > What's wrong with #include <cstdio> ? Does '#include <cstdio>' guarantee that we can use 'printf' or only 'std::printf' (that Rosario193 will likely never write)? AFAIK there are no guarantee despite in practice both are usually defined after '#include <cstdio>'. |
Christopher Pisz <nospam@notanaddress.com>: Jan 28 05:46PM -0600 On 1/28/2015 2:05 AM, Martijn Lievaart wrote: > Goed luck! > M4 I downloaded the latest GSoap and tried to do a separate test scenario with it and couldn't get the simplest of communication to compile and complete. In production code it is used in some manner that doesn't look like any example I've ever seen online. The docs for it just stink. Results are not what they say they are. I am at the point where I am collecting evidence to support dropping it and using something else. I've always went the route of "if it takes longer to figure out then to write it over, hit delete" |
jacob navia <jacob@spamsink.net>: Jan 29 02:11PM +0100 Le 29/01/2015 00:46, Christopher Pisz wrote: > collecting evidence to support dropping it and using something else. > I've always went the route of "if it takes longer to figure out then to > write it over, hit delete" Did you READ this? GSOAP License: WARRANTY YOU ACKNOWLEDGE THAT THE SOFTWARE IS PROVIDED "AS IS" AND THAT GENIVIA INC. DO NOT WARRANT THE SOFTWARE WILL RUN UNINTERRUPTED OR ERROR FREE. LIMITED LIABILITY: THE ENTIRE RISK AS TO RESULTS AND PERFORMANCE OF THE SOFTWARE IS ASSUMED BY YOU. So stop wasting your time here and call your support representative. What? You didn't buy support? Well then... YOU GET WHAT YOU PAY FOR! |
Christopher Pisz <nospam@notanaddress.com>: Jan 29 09:56AM -0600 On 1/29/2015 7:11 AM, jacob navia wrote: > You didn't buy support? > Well then... > YOU GET WHAT YOU PAY FOR! I'm not asking anyone here to tell me what's wrong with Gsoap. I already know what's wrong with it....It's garbage. Any library that doesn't even have a reference where I can look up each individual function, class, and method, is garbage. All it has is a long document with examples that don't work and concept explanations. I am asking about the behavior to expect with an access violation on another thread, since it surprised me to see an access violation occur repeatedly without the process crashing. |
Paavo Helde <myfirstname@osa.pri.ee>: Jan 29 11:05AM -0600 Christopher Pisz <nospam@notanaddress.com> wrote in > about the behavior to expect with an access violation on another > thread, since it surprised me to see an access violation occur > repeatedly without the process crashing. If this seems to come from some Windows system DLL (from e.g. RPC/OLE/COM code) and appears to cause no harm, then this is probably "by design" and there is nothing you can do about it (except installing another OS of course). Cheers Paavo |
Jorgen Grahn <grahn+nntp@snipabacken.se>: Jan 29 11:34AM On Sun, 2015-01-25, Greg Martin wrote: >>> We are not part of the Java culture, but of the C culture. >> I am a part of software engineering culture. I do not think I will ever >> identify myself as "XYZ language programmer". But you have to adapt to the people you're working with, and it's a fact that cultures are different. (Not that there is a single C++ culture.) > of GOF and others, is this strange adherence to priciples that are > questionable. It's worth noting that much of that work came out of > Smalltalk, a language that by and large collapsed under its own weight ... I don't know the status of Smalltalk (I've never seen it). But I know it's quite different from C and C++, and I think it shines through, in that things like GOF design patterns sometimes seem a bit out of place. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
Jorgen Grahn <grahn+nntp@snipabacken.se>: Jan 29 02:25PM On Sun, 2015-01-25, Pavel wrote: > Jorgen Grahn wrote: >> On Sun, 2015-01-25, Pavel wrote: ... (Late reply -- sorry.) >> - What are its arguments? >> - What is its return type? > Don't you sometimes also want to know what the function does? :-) Sure, that's what we're both talking about: how to give clues in the code to help people remember what the function does, while keeping the code as a whole readable. > poorly named function (unless you get a good comment with the prototype > but this is probably outside of scope of this discussion). And if you > are doing bug-searching etc, such names would not hurt, at the very least. Here we disagree. I am not arguing for /badly named/ functions: I'm arguing that the name is just a piece of the function's signature, and needs to be seen in that context. But yes, if you take one of my signatures and strip off everything but the function name, you'll end up with a not very useful name! > You can easily confuse these if the name use is not calling the member > but passing its address as an argument to another function call or uses > it as a part of an initializer. I don't think the risk is normally very high -- and I'm prepared to make exceptions for special cases. /Jorgen -- // Jorgen Grahn <grahn@ Oo o. . . \X/ snipabacken.se> O o . |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment