« first day (489 days earlier)      last day (4458 days later) » 

Ell
7:00 PM
ooh sorry guys
off to a party
 
sbi
@Abyx If I wanted a WTF?! moment on meta, I wouldn't have to wait. Meta is little else. :)
 
Have fun, get drunk
 
@Ell yeah, all IO can handle all* languages (*nobody actually handles all)
 
sbi
@Ell Character encoding, in essence, is an agreement upon which numerical value, or combination thereof, maps to which glyph in the output.
2
@Mahesh Ah, Ok. Did your TL refer you to my question or to my answer? And how did she/he come by it? What kind of guy is she/he? What kind of company are you working at?
 
facepalm. Apperently the OP wanted to translate the arabic to English letter by letter
 
7:03 PM
LOL
I would like to see those translation results.
 
lol, what question is this? I'm guessing the OP doesn't speak a second language?
 
My friend had purchased a lappy for $811 around 4 days earlier from local vendor, today I see it on a website for sale for $669. I'm eager to tell him that :P
 
sbi
@MooingDuck Actually, doesn't it only mean it supports Unicode encoding (the mapping of numeric values to glyphs) — no matter whether those are Arabic, Japanese, or Czech? Most Unicode-aware programs will know nothing about the languages the strings they deal with represent. /cc @Ell
 
@sbi sure
-1
Q: Processing Unicode characters in c++

Mike GI have a file that contains text in Unicode. What I would like to do is scan through a file containing Arabic characters (0600—06FF, 225 characters) and map each Unicode character to an ASCII character. So the new produced file will be made of purely ASCII characters. How do I go about doing this...

 
oh, lol. wasn't as bad as I thought... but still... lol
 
7:08 PM
Sometimes C++ error messages really bother me... I'm sure this is trivial
	vector<istream> streams;
	streams.push_back(cin);
What's wrong with that?
 
istream is not a concrete class
 
slicing
 
@robjb you can't copy istream object I guess
 
sbi
@robjb You cannot copy streams. And std::vector stores by value.
 
use unique_ptr<istream>
 
sbi
7:09 PM
@Abyx That leaves this comment hanging in the air quite uselessly.
 
lol
 
@Abyx that's wrong for std::cin though isn't it?
 
@sbi yep. fixed.
 
@Abyx, @sbi Thanks
 
@awoodland you can use null deleter
 
sbi
7:10 PM
@robjb You're welcome.
 
Why can't streams be copied? Just because of the logical issues that would result from having duplicates of the same stream?
 
@SethCarnegie That's for room owners.
 
sbi
What a mess I made...
 
@sbi I'd removed it
btw, how to strike-out text? <strike></strike> ?
 
sbi
@robjb Nobody sat down and come up with a proper explanation of what it means to copy a stream which was universally accepted. When you cannot find such a explanation, it's better to just forbid copying.
 
7:13 PM
@CatPlusPlus what is
 
sbi
@Abyx It's ---strike---, I think. Indeed
 
@robjb stackoverflow.com/questions/274626/… applies when you just store the base by value
 
here was text
oh! great!
 
@awoodland Interesting...
 
although streams have an internal streambuf which slightly complicates things in this instance
 
7:15 PM
<---strike--->strike</---strike--->
 
@sbi I don't remember the actual reason but some guy named nawaz had given good explanation why they shouldn't be copyable, lemme search SO
 
I knew that much... I wasn't aware the stream would be copied. Passing a reference by value invokes the copy constructor?
 
@robjb no
 
(Forgive my naivety)
 
naïveté
 
7:16 PM
I believe stringstream can be copied
 
sbi
@awoodland This only explains why it isn't a good idea to store streams in a base class by value. It doesn't explain why std::istream my_is = std::cin won't compile.
 
@sbi isn't operator= disabled in the stream base class because of that problem?
 
@MrAnubis Thanks, that's excellent :]
 
Why did they choose to make cin and cout seperate (istream and ostream) instead of naming it something like stdio (and making it an iostream)?
 
7:18 PM
@robjb you're welcome :)
 
sbi
@robjb Passing by reference and passing by value are two different ways to pass things. Hence, speaking about "passing a reference by value" doesn't make sense. I suppose you come from a language like Java or C#, where (almost) everything is handed around per references?
 
@SethCarnegie they do completely different things. Why would they be joined?
@SethCarnegie They're also connected to completely different sources/sinks
 
@SethCarnegie it's still stdin and stdout which are different file descriptors in C
 
@sbi Yes, when it comes to native code, I'm more comfortable with C and naked pointers -- but I most often write C# here at work
 
or do you mean "why are they different file descriptors?"
 
7:20 PM
@MooingDuck what do you mean? For instance, connecting them makes sense like you'd be opening an fstream instead of an ifstream and an ofstream
 
sbi
@awoodland Because of what problem? If I have two streams of the same class and want to copy one into the other, slicing isn't an issue. Follow the link @MrAnubis posted. Nawaz analogy with the hose is fucking brilliant.
 
@SethCarnegie there is cerr also, FYI
 
@Abyx that would make sense to be seperate
 
The stream could be bidirectional, but probably internally iostreams are too primitive to do that.
 
@SethCarnegie by default, one reads from a keyboard, and the other puts garbage on the screen. How more different could they be?
 
7:21 PM
@sbi lol "Nawaz analogy with the hose is fucking brilliant."
 
You need two different sinks and two different buffers for that.
 
@SethCarnegie the concept is reading from one file, and sending to a second file. They're different files, thus different objects
 
@MooingDuck that doesn't change the fact that it is standard input and standard output
conceptually they are related
 
@SethCarnegie no more than standard error, but you didn't mention that
 
IOstream design sucks, nothing new.
 
7:22 PM
@SethCarnegie and whatever that other stream is
 
@MooingDuck the only reason that would be separate is because there's only >> and <<
So you could do
 
@SethCarnegie and because they do completely different things, in completely different ways
 
stdio >> var;
stdio << "hi";
Doesn't that make perfect sense?
 
@SethCarnegie stdlog is the other standard stream
 
If you redirect them to a file via shell, they do the same thing fstream would do.
 
7:23 PM
@SethCarnegie no. What if I want to redirect output to my printer?
 
clog is the same as cerr, but buffered for some inexplicable reason.
 
@sbi I think of references as const pointers. In that sense, "passing a reference by value" would be equivalent to passing an address (in my mind) -- is that way off base?
 
@MooingDuck then >> prints and << reads from the console (or whatever stdin is)
 
sbi
@robjb If you know C, you know the difference between objects and references. A pointer is just a resettable reference. (That's the idea of "reference", not C++' syntactical construct.) C++ references (syntactical constructs), basically, semantically behave like pointers and syntactically behave like objects. They must be assigned an object immediately, cannot be reset, and can never be NULL. (I think they were mainly introduced to allow operator overloading.)
 
@MooingDuck That's lower-level concern.
 
7:23 PM
@CatPlusPlus never knew that
 
sbi
@robjb No, semantically that's exactly what happens.
 
@SethCarnegie no, >> reads from it's source, which is sometimes a console
 
If you had object io with two sinks for two directions, redirecting input or output wouldn't be a problem.
 
@MooingDuck hence the "or whatever stdin is"
 
@SethCarnegie if they're completely different, involving completely different files, why would we want to represent them with the same object in code? That's just confusing.
 
7:25 PM
@MooingDuck stdout being a printer and stdin being the console (or whatever, the point is that they're different) is an implementation detail
 
@sbi Makes sense, thanks again for clarifying
 
>> is "read from stdin", << is "write to stdout"
I don't see why that's confusing
 
@SethCarnegie because not all streams have an IO-inverse like that.
 
and I don't see why having cin and cout is less confusing
 
@SethCarnegie because they're different
 
7:26 PM
@MooingDuck I'm only talking about cin and cout, not "all streams"
 
How many beginners try to do cout >> x?
 
@CatPlusPlus many
 
It's really not less confusing.
 
Thank you
 
@SethCarnegie cin is just another input stream like any other.
 
7:26 PM
@CatPlusPlus but it's definitely not more confusing
@MooingDuck and?
 
@MooingDuck That's not the point.
 
Oh btw, putting stuff in std is illegal in C++ right?
 
@SethCarnegie usually
 
ok thanks
@MooingDuck when is it not
 
7:28 PM
@SethCarnegie because if cin is a istream like any other, and writing to an input stream makes no sense, then why should I be able to write to cin?
@SethCarnegie you can specialize some templates. A few. A very few.
 
@MooingDuck that's why you rename them both to stdio or io
 
@SethCarnegie so you want standard input and output to not be basic_streams and to be completely different than all of the other streams?
 
@MooingDuck how is it different than all other streams
 
@SethCarnegie also, again, what If I want to rebind the output?
 
Then rebind it?
 
7:30 PM
@SethCarnegie you can't write to an input stream.
@SethCarnegie what happens to the input then?
 
@MooingDuck it's like fstream
 
@SethCarnegie apperently not, since your io object would have both a rebindable input and a rebindable output
 
@MooingDuck yes?
 
completely unlike fstream
 
@MooingDuck what does fstream do
 
7:31 PM
@SethCarnegie I'mma write some code to show you, give me five minutes
 
@MooingDuck ok thanks
You know how you can make a variable of a class like class C { } c;
how do you do that with templates
template<class T> class C { } c<int>; doesn't work
 
@SethCarnegie I never declare variables that way, it's just confusing. Do it on it's own line
 
@MooingDuck I didn't mean it was a carbon copy of fstream in every way, I just meant you would read from and write to the same object like fstream
 
>.< Remember that unicode question earlier? The accepted answer is basically $ perl -CSAD -Mutf8 -pe 'tr[ابتثجحخد][abttjhhd]' < input.utf8 > output.ascii
@SethCarnegie an fstream is a basic_stream. Any members that a basic_stream has, fstream also has.
@SethCarnegie so, for your code, cin and cout would could no longer be basic_streams. They'd have to be different
As they'd need two of most of the members, inheritance wouldn't make sense
meaning we'd have to duplicate of all of our input and output operators for the new io type
also, conceptually, It's still two completely different streams.
 
@MooingDuck I don't see what difference that makes
And I don't know about the design of basic_stream and all that so I can't opine
 
7:46 PM
@SethCarnegie Actually, if io is a container that contains two streams...
 
@MooingDuck that's all I mean anyways
 
I just built a prime number generator
But what's the largest factor of x that doesn't pair with a number below it?
 
Bob
I have made a class for an Event. The event has an property which contains the duration of the event in the format: ##h ##m ##s where # is a number between 0 and 99
Would you have this property as of type String?
Or are there better ways of storing the duration?
Example: An event can take 1h 45m 23s
Make a class named Duration with integer fields?.
 
sbi
8:11 PM
@Bob If you make it a string, you will have to parse that string whenever you need to process the actual numbers. Parsing is costly. When you make it three integers, can print them comparatively cheaply whenever you need a string.
 
Bob
So making a simple class named Duration is better right?
 
sbi
@Bob Storing three integers is better, unless you will process the values as string most of the time anyway. Otherwise, if you need the numerical values, whether it's better to fully encapsulate this in a class, or just to throw it together in a struct or std::tuple, depends on how they are to be used.
You haven't told this.
 
Bob
I will use them to display the average, sum etc so I will go with a struct
thanks
 
sbi
8:27 PM
@user1131997 I did, and I found her. Now what?
 
9:02 PM
good night, nubcakes
 
9:17 PM
A guy on SO is implying that I can increase the speed of my std::lower_bound with some SSE instructions that he thinks might exist. Anyone believe this or know what he's referring to?
 
9:43 PM
@MooingDuck I can't comment apart from agreeing with this: stackoverflow.com/questions/4770282/… --> I don't know of any obvious means for parallelizing a lower bound function with SIMD
 
@sbi have you been stalking that girl for that guy? :P
 
sbi
@MrAnubis Haha, no. It's a joke on him. (Google for that name if you don't get it. Erm. Google images, that is.)
 
@sbi My TL is a nice guy. But he prefers C over C++. Other day, when I used std::find, he told he would prefer a for loop and iterate over it.
And I work at a security services related company.
 
sbi
@Mahesh Oh, dang. <insert std joke about contacting your headhunter>
 
@sbi Its being difficult to convince these guys who has 10 + years of exp.
 
sbi
9:50 PM
But why would he advice you to use C++ rules for parameter passing ("Man, you can't even see when you're passing something by reference, so this must surely be shit!") if he prefers hand-rolled loops?
 
@sbi Their argument is just to use std::find why do you want to include <algorithm>. Prefer a hand written loop.
 
sbi
@Mahesh The first time I got paid for programming was in 1994.
 
The problem is it is a legacy code. Its combination of C and C++
 
sbi
@Mahesh In this industry, unless you work with a startup that's been dreamed up two years ago by some college dropouts, you always have to deal with legacy code. That's no argument to keep programming in K&R style. (They did switch to C++, after all.)
 
@sbi For built in types, I was receiving by reference. So, he was quoting your answer for that.
 
9:53 PM
@jalf Experienced a little problem with your STM library. The given sample code looks right, yet doesn't build. It took me a while to realize that it is caused by using nested stm::shared objects.
 
@sbi A set method in return calling another set method with the same parameter. So, in the second set method I received it by reference.
And he was quoting your suggestion. Since it was your suggestion, I heeded to his advice :)
 
sbi
@Mahesh Well, just copy your std lib implementation's std::find(), beautify it a bit (all those __param thingies are ugly), store it somewhere, and whenever you need to find something, copy that into an unnamed namespace at the top of the .cpp file and call it. That way, you will use something called find() (no std::, though), so everybody knows what you're doing and everybody knows what the parameters are for. Later, these can easily be replaced.
@Mahesh Tell him I said hi. Whenever he comes to Berlin, he owes me a beer. :)
Oh, and what's his username here on SO? If you dare reveal that.
 
He is not SO user.
 
sbi
@Mahesh So what's he doing on that question??
 
A google hit gave the post and he sent me the link.
 
sbi
9:59 PM
@Mahesh Interesting. I didn't know google would find my stuff.
 
@sbi This was his IM. "you like stackoverflow right?" "just check this out when you have the time: 11:10 AM
http://stackoverflow.com/questions/2139224/how-to-pass-objects-to-functions-in-c "
 
sbi
@Mahesh LOL!
Thank you for pointing this out to me, @Mahesh! It's nice to hear that, when I put time and effort into this place, it might, somewhere, sometimes, make a tiny bit of difference.
 
@sbi I am making many silly mistakes. Writing unnecessary code. Hope my TL isn't angry on me.
I am a recent college graduate.
When he says I feel what I wrote is ridiculous :(
But I am slowly learning.
 
sbi
@Mahesh If they hired a junior programmer, they'll get a junior programmer. If they didn't want someone who still has to learn stuff, they should have hired a senior programmer.
@Mahesh I'm sure you're learning fast. It's just that there's so much for you to catch up with.
 
@sbi The code base is so huge and is being difficult to follow.
 
10:04 PM
I think Python has one thing almost right, that a "character" is a general string. Unfortunately they didn't even get that 100%. But generally, it needs to be string.
 
@sbi You said of going to London. Any plans to USA ?
 
sbi
@Mahesh I am visiting someone in London, that's why I go there for a week. I have been to the US twice. (My first paid job was being a Trainee in Portland, OR.) I don't know whether I'll ever have the chance to go again. Right now, I have way too many kids to take care of.
 
@sbi Sorry to ask, and don't offend, but I am interested how many kids do you have? :)
 
@DzekTrek He is a grumpy old man. So, he should have many :)
 
5-6?
 
sbi
10:08 PM
@DzekTrek I have admitted that I would not have said I have "many" if it only were three of them. I have not said how many I have. (And, might I point out, I might have said it just to throw you guys off.)
 
So, we can only guess. :)
It's OK not to tell, I was curious, because I like to have so many kids too. :)
 
@sbi Many of the good coders I met during schooling are from Germany. Does the schools at Germany have a very good CS academics or is just my coincidence that hard core programmers happen to be at Germany ?
 
sbi
@Mahesh What?
 
@sbi You said you are from Berlin. Isn't that capital of Germany ?
 
sbi
@Mahesh Yeah. But I wouldn't know good programmers come from Germany. What schooling are you talking about? Why were there Germans in the first place?
 
10:14 PM
@sbi Carsten Neuman, Jan Springer, Dirk Reiners were 3 guys which my research lab had. They all are from Germany and they are very good at programming.
And most people here on SO are either from Germany or other European countries.
 
sbi
@Mahesh Well, you might be surprised, but I've never heard those names. (There's 80 millions of us Germans, you know.)
@Mahesh Which school would that be?
 
@sbi I don't know which part are they from. I did my schooling at University of Louisiana at Lafayette, USA
By schooling I meant Masters.
 
sbi
Ah, Ok.
 
That was our lab.
 
sbi
:2672043 If you like your online privacy, consider deleting this. I've just seen your real name.
 
10:20 PM
@sbi My real name is there on SO itself.
 
sbi
@Mahesh Thanks. Interesting! And, indeed, four Germans there!
 
@sbi That was why I had a conclusion that Germany has good coders.
 
@sbi paranoia..
 
sbi
@Mahesh Ah, Ok. Well, I wanted to point it out, just in case.
 
So, these are very nice projects indeed.@Mahesh
 
10:22 PM
@DzekTrek Yes. But I graduated a year back and I amn't sure what is their current status.
 
:) are you involved in conducting any project?
 
@MooingDuck You guys are tracking me down.
 
@Mahesh always be careful mixing real names with the internet
 
@Mahesh he didn't track you down, he just saw the picture of yours on the site. ;)
 
sbi
10:24 PM
@DzekTrek You know, there was a time when I would enter my name into google, and when I got started with my last name, google would suggest the remainder. (And I am not any kind of celebrity, mind you!) For my name, google will find you, besides lots of stuff about C++, my address, the number of my kids, how I raise them, some dirty laundry regarding a divorce, what books I prefer... That was the point where I decided to go beneath the radar.
 
@DzekTrek that's his facebook profile
 
@sbi the number of kids, how I raise them ... lol ... sorry if that offended you.
 
sbi
@Mahesh If what offended me?
 
@sbi Nice. :) @MooingDuck hacker... :)
 
@sbi I couldn't stop my laughter with the way you expressed your grief.
 
Bob
10:26 PM
Anyone who have knowledge of DDD?
 
@Bob ?
 
sbi
@Bob The biggest girl I ever had had DD.
SCNR
 
What is DDD ?
 
Bob
lol
Domain Driven Development
 
@Bob Tell us what is DDD, and we might help you.
 
Bob
10:27 PM
Domain**
 
Well, majority of us here have heard of it, yes.
Tell us what is your biggest concern?
 
Domain-driven design (DDD) is an approach to developing software for complex needs by deeply connecting the implementation to an evolving model of the core business concepts. The premise of domain-driven design is the following: * Placing the project's primary focus on the core domain and domain logic * Basing complex designs on a model * Initiating a creative collaboration between technical and domain experts to iteratively cut ever closer to the conceptual heart of the problem. Domain-driven design is not a technology or a methodology. DDD provides a structure of practices and termino...
 
Bob
I will explain
 
Wikipedia has heard of it
 
Don't explain, just tell us what is the problem. We know something about it. @Bob
 
Bob
10:28 PM
yes, explain my problem
 
I see.
 
evening
 
well, proceed.
 
what's going on here?
 
@sbi Atleast give us a hint. Are you on the list of C++ MVP ?
 
10:29 PM
It's midday here. @TonyTheLion
 
Bob
I have a DrivingLog class that has a list of DrivingRecords
 
@TonyTheLion we're pretending it's conversation, but mostly we're just telling each other that we're talking
 
@sbi I believe you must be.
 
Bob
the DrivingRecord class has fields such as duration, distance, environment and condition
 
@Bob extortion?
 
10:30 PM
@sbi I love your SO webpage link by the way :D Mine was just a direct link to google
 
sbi
@Mahesh Nope. While I was very active in the MS C++ newsgroups, I once was mailed by some MS guy. Apparently I was nominated. But I guess I was too dumb. I like to think I was too critical, though. :)
 
Bob
Ah, never mind. I see whats wrong with what I have done
 
@Bob There you go, yes... :)
 
sbi
@MooingDuck Ah, that. Uh. I had forgotten about it, actually. :-}
 
10:32 PM
 
Bob
lol
never heard about that before
 
@Bob some companies use a cardboard cutout, but same concept
@sbi good lockdown, I can't find out any personal info that you haven't freely provided. I have several internet aliases, but it doesn't take a lot of work to link them, eventually getting to personal information
 
sbi
@MooingDuck I have, though, just not directly. I have dropped enough clues, so @RMartinho claims to have found out about my identity.
 
@sbi the problem is there's lots of other sbi on the internet. It makes it a lot harder to find that information. "MooingDuck" on the other hand...
 
sbi
@MooingDuck Yeah, that particular bank, huh? I checked that before I signed up here. :)
 
10:40 PM
hi guys!
 
@sbi also several other organizations
 
does exist some C compiler, which generates native x86 code in output?
 
sbi
@MooingDuck Yep. TLAs are good for that.
 
@user1131997 assembly source code?
 
sbi
@user1131997 The first one was Zortech's (Walter Bright), back in the 80s.
 
10:42 PM
@sbi Google suggested "The C++ IO streams' base class std::basic_ios defines operator void*() to return a safe bool indicating !fail() and operator!() to ret." as a match
 
anyway, any compile do it
 
@user1131997 don't they all do that?
 
@sbi State Bank of India. Its famour in India.
 
sbi
@MooingDuck No, compilers for other platforms notoriously do not output native x86 code.
 
@sbi eh, you know what I mean :D
 
10:44 PM
basically...
 
sbi
@MooingDuck What's that got to do with it?
 
@MooingDuck generates native code for x86 ?
which acn be launched without OS ?
 
@user1131997 all compilers that target x86 processors
@user1131997 ooooh you didn't say that
 
@MooingDuck and what do you mean under word "native" ?
@MooingDuck I have used this world from 1st message...
 
sbi
@user1131997 You just need to not to use any OS APIs and avoid the C and C++ std libs (because many of them use the OS APIs). That's it. (Well, it's hard, though.)
 
10:45 PM
@user1131997 All C++ code is compiled to native x86 instructions. Just because it requires an OS doesn't mean it's not native code.
 
sbi
@user1131997 You are way too young, and this world's first message is way too long ago.
 
@sbi I think there's a seperate flag in most compilers to provide a freestanding implementation.
 
sbi
@MooingDuck Oh, might be. I have never fiddled with that.
 
3
Q: How do you create a freestanding C++ program?

Bob DylanI'm just wondering how you create a freestanding program in C++? Edit: By freestanding I mean a program that doesn't run in a hosted envrioment (eg. OS). I want my program to be the first program the computer loads, instead of the OS.

@sbi neither have I, that gets into crazy hard stuff really fast.
 
@MooingDuck it may use native instruction, but they don't create native image in output
 
10:48 PM
@user1131997 one of us has the wrong definition of "native image"
 
@MooingDuck native for PC is bit sequnce of 1 & 0
 
@user1131997 I'm aware of that. Everything in a computer is a sequence of 1 and 0, native or no
@user1131997 if you mean machine code, then hosted implementations use that too
@user1131997 C++ doesn't use a bytecode, it uses native machine code
 
sbi
On twitter I have just been followed by some dude who followed me, and then more than a dozen tweeters that obviously are all copied from the list of accounts I follow. That's scary.
 
native can be used in different meanings, for Win32 native image is a file with MZh, for ring2 in Windows and its Native API with their other format, linix programs is ELF format for example

I mean for each execution layer in OS has its native capabilities
@MooingDuck and what is byte code? not a sequence of 8 bits?
@MooingDuck all programs in PC are 1 & 0 at least even php-script
 
@user1131997 byte code is data that gets interpreted or JIT compiled before it is executed.
@user1131997 PHP is not normally compiled to native executable code, it's normally interpreted. (AFAIK)
 
10:53 PM
@MooingDuck and what's byte? of what consints of byte code
@MooingDuck every file finally even simple text is 1 & 0 in memory of PC , image, php-script etc... , cause PC is able to gold data only in this format in its memory
 
@user1131997 alright, when I say "native code" I mean "data that I could send directly to the CPU as executable code and it will do what I want". A text file for instance, could be executed by the CPU, but nothing useful would happen.
PHP also cannot be directly executed by a CPU, but must be translated to "native machine instructions" first, or simply interpreted by another program.
 
sbi
@user1131997 While this might be a true statement, it's also meaningless . Everything ever written in English, be it Shakespeare, Asimov, or your puny little messages here, all boil down to letters, in the end. So? Are they therefore the same?
 
@sbi your example is unclear to me, probably lost on him
 
@sbi trying to compare English and strong PC logic , which based on 1 & 0 is bad example
 
@user1131997 I agree with that
 
10:57 PM
@MooingDuck does text file in your OS isn't a bit sequence in memory , even if you read it? memory holds it for reading and etc..
 
@user1131997 yes, a text file is in memory as 1s and 0s just like everything else.
 
@MooingDuck some native code for PC is a bit sequnce, which reads CPU, and its registers , which are 1-byte ( 8 ), 2-byte ( 16 ), 4-byte ( 32 , eax, ebx etc ) getting data in exactly bit sequence, and with the many triggers-logic making operations
as for me, "native" is polymorphic word, if you work under ring3 in Windows, native program is a program with MZh-header without any metadata like .net-metadata...

for *nix is program with ELF-header

for ring2 is the proper and etc
 
@user1131997 alright, when I said "native code" this definition is what I meant. C++ code is compiled to this. Usually, this is inside an image loadable by the operating system, such as ELF or PE for windows. (I've never heard of ring3 or MZh, but that's probably just showing my ignorance)
ah, google says MZ is the format for DOS.
I can't figure out what Ring3 is from google
 
@MooingDuck MZh is a header in any windows program even now, open any executable program in Win
 
11:13 PM
en.wikipedia.org/wiki/EXE says you are right, PE is an extension of MZ
 
ring3 is for user-mode, ring0 for kernel

windows family also has ring2 where works its Native API, KDMF ( lower mode, than Win32 ), some *.sys drivers
*nix often uses only 2 rings ( 0 && 3 )
 
@user1131997 [sidenote]Also, according to en.wikipedia.org/wiki/DOS_MZ_executable and other sources, It's just "MZ", not "MZh" [/sidenode]
@user1131997 alright, I found information about that sort of ring, I must have misunderstood how you used it before
 
@MooingDuck you can try by your own, open any executable windows program in hex-editor
you will see: MZђ in first
MZh = Mark Zbikowski header, but the last symbol is with special style ђ
 
@user1131997 Nothing I see mentions that third letter. Notepad is displaying "MZ" (there is a third symbol there)
 
11:20 PM
@user1131997 (1) I believe you that it's a funny h. (2) Nothing on the internet mentions that h, especially as being part of the name. (3) Nobody cares which of us is right here and it affects nothing.
 
@MooingDuck I have read it in Windows Essentials book
 
@user1131997 I haven't
 
@MooingDuck MZ was for DOS/9x, MZђ from 2k ( NT ) -> now
 
@user1131997 the name doesn't seem to have changed, even if the bytes did
 
@MooingDuck I have read about this from Microsoft book :) Only the way to get correct info is to get some dos/9x program and look at its content :)
 
11:23 PM
(1) google.com/search?q=MZ+executable first page is about the file format (2) google.com/search?q=MZh+executable is about malware, flashdrives, and MHz (only one page refers to executables)
@user1131997 that is the incorrect way to get the name of a file format. For instance, ASCII text files do not have any reference to the file type in the file format. (UTF sometimes does, but the references have no connection to the name "unicode")
@user1131997 Java programs have CAFEBABE in them too, doesn't mean thats the name of the format.
@user1131997 I have to go now, later
wait, I'm half an hour early yet, nevermind
 
@MooingDuck good night
 

« first day (489 days earlier)      last day (4458 days later) »