« first day (835 days earlier)      last day (4129 days later) » 
00:00 - 18:0018:00 - 00:00

6:00 PM
@gertvdijk I haven't seen a mod around for a while
put binoculars to eyes, turns head
 
yeah just drop this Q here every now and then... it's not an urgent matter, but let's just get them bored seeing this Q over and over again ;)
 
exactly :D
 
just received the final documents (contracts) for my new project. gonna work at a IT security company in Holland for my graduation project. yey! :) Apparently the background check (one month!) on me turned out good. I had to hand in the whole 10-year of history of my life with info like employments, education, interviews with me and my previous employers, etc.
 
jrg
6:18 PM
i'll enjoy being brainwashed.
2
 
lol
 
@jrg you do stuff in Ruby right? also RoR?
 
jrg
@gertvdijk if you're looking for help with patching rails apps for that vuln, my rates are $18/hour, or if it's entirely open source, i just require a recommendation at the end of it.
@gertvdijk (so, yes. ;P)
 
@jrg not the direction I was going into
 
jrg
oh, ok.
sorry, people keep asking me to patch their apps. and i'm like "it's dead simple. pay my $20 and i'll do it, or you can just fiddle with it".
 
6:23 PM
I was just curious whether you had trouble patching/dealing with the latest CVE.
 
jrg
nope.
just make sure you only do bundle update rails
as opposed to bundle update.
 
some major sites in Holland were offline for a certain amount of time.
 
jrg
upgrading rails and it's dependencies as opposed to updating everything.
 
This is why I use php ;)
 
jrg
oh, so you're just riddled full of wholes, instead of just having a few ones. mkay. ;)
 
6:25 PM
Well, I guess that's not a fair comparison since rails is really just a framework.
 
jrg
right, i'm just badmouthing PHP for the fun of it.
 
jrg
so yes, rails had a problem. they fixed it, a few stupid people are updating it the wrong way, it's in metasploit now (ew), so any script kiddy can point it to things with a reverse shell payload.
and i've still got a list of open source projects to update that's a mile long. and growing.
 
mod alert!
3
Q: Can we merge the 'dev' and 'development' tags?

iSethI was re-tagging a question about developing applications when I noticed there was a dev tag. To me, both dev and development cover exactly the same thing. Can we merge the tags or make dev a synonym of development?

 
This is not an easy yes no question
 
6:32 PM
well, shoot me up
 
We've seen it, we'll get to it when we can figure out how to best handle it
 
I've come to see is might mean 'device'
 
it almost always means device, there are only a few overlaps with dev and development
It likely needs to be burned or made a synonym of device but there are a lot of questions to sift through to make sure
 
okay then.
 
for these 15 Qs involved... really... what's the big deal?
 
6:55 PM
We've already spent more time on talking about it than retagging the 15 bastards.
 
good point. shrug
 
You know, you can just retag them yourselves. You don't need a moderator to do that
 
I was waiting for the go ahead
 
^-- with him
but I guess this was it
 
there, no questions tagged
 
7:03 PM
Hurray!
 
4
Q: "What's up doc?" - Is Bugs Bunny impersonating someone?

CoomieIt turns out that Bugs Bunny was impersonating someone when he ate the carrot. Was he also impersonating a contemporary actor when he asked "What's up doc?" or is that a Bugs Bunny original?

that's soooo interesting
@gertvdijk hehe, I hogged the home page just for a couple of tags :P
 
I enjoy watching Movies and TV, but an SE site for it? O_o
there should be one about computer networking.
wanted to A51 it, but I think it would be overlapping SU and SF too much
 
yeah, it kinda overkill IMO as well, but hey, nice Q's somtimes
 
@gertvdijk there are sites that address all those desires
 
SU is 'officially' the home/beginner computer networking site, but people tend to post their networking basics on AU/UL/etc. SF is for professional setting only.
0
Q: Can't login in tty1

JúniorIt's the first time this happened. On regular terminal my login works great, even as root. My user name is always the same (JĂșnior) and login in never was a problem. I even tried setting the root passwd but nothing helps. Any help? Ubuntu 12.04.1 64bit

where was I unclear about editing the Q?
 
7:11 PM
I don't see an edit by you @gertvdijk
 
no...
I didn't edit it... the OP should edit it
 
ah, I see...
 
we need that new quick start guide badly
 
hehe, if I subscribe to it says '1 follower' then if I hit the star too it says '2 followers'
 
wow. you just doubled the amount of subscriptions.
> The latest stable release of the kernel is 3.8.
that is not true.
 
7:17 PM
well, EDIT IT! :P
 
done
(peer review)
funny that the 'excerpt' is shorter than the complete description...
 
you have 5k rep, you shouldn't need peer review
 
Thanks for your edit!
This edit will be visible only to you until it is peer reviewed.
 
huh
 
@gertvdijk that's actually correct, the latest stable of the upstream kernel is 3.8
 
7:21 PM
 
shrug
 
> mainline: 3.8-rc3
 
ugh, I thought 3.8 was released. fuuu
 
rc3?
 
7:23 PM
@iSeth Release Candidate
 
@MarcoCeppi yeah, but I thought that Rc2 was a far as they went.
 
@iSeth typically yes, but I remember now that linus wasn't happy with something. So they went to RC3
 
ah, OK.
 
mainline is a bit confusing in its name. It just means that this branch is where Linus pulls into (typically from -next). Once .0 is released, it's up to the stable team to maintain it and Linus moves on to preparing the next RC from -next. (as far as I understand it from the last couple of years working with Linux)
 
8:06 PM
@gertvdijk Wow.
 
@iSeth what wow?
 
@gertvdijk that it made it to RC8
 
oh well... yeah that's what you get starting with the kernel people f*cking calling it RC to start with (rather than alpha -> beta -> RC)...
 
good point. it just confuses people.
 
8:24 PM
oh good grief. Answered a question to an Unregistered user by accident (promised myself not to do this anymore)... chances of looking at it are probably minimal...
what do you guys think about the use of footnotes in my answers? (if you've seen them) never seen anyone else doing that.
 
0
A: Why software center says "The package is of bad quality"?

gertvdijkUse Lintian. That's the tool checking. $ lintian -i packagename.deb W: packagename: package-name-doesnt-match-sonames packagename N: N: The package name of a library package should usually reflect the soname N: of the included library. The package name can determined from the N: librar...

that one?
 
@iSeth yup. answer is ok, right? my gut feeling says that he's not coming back. look at the OP's "homepage". It's a commercial software development company...
 
@gertvdijk looks fine to me :)
 
I don't see how people get these packages built in the first place. They must be hurting themselves putting the files together, rather than using debhelper scripts...
Okay, I'm relatively new to packaging, but it's very hard to screw up in a way that you do get a .deb yet SC will refuse to install.
 
shrug
 
8:44 PM
hmm do you guys get these blue numbered buttons too? About checking flagged messages in chat. In a room on an SE site I've never heard of....
 
@gertvdijk no, its a rep thing
 
more rep means more dirty jobs to do, right? I guess I'll be leaving soon then...
 
@gertvdijk yes it does.
Hey, if you leave, leave me some rep.
 
jrg
@gertvdijk let me put it this way: Patching applications is easy.
 
I LOVE DIRTY JOBS!!!!!
omnomnomnom
 
jrg
8:47 PM
patching them in such a way that they still work is more difficult.
 
> sudo apt-get install makeinfo textinfo texi2html remove the part makeinfo and try again
 
@iSeth ;)
 
one line answer, should I recommend deletion?
or should I leave some type of comment?
 
jrg
anyone have any tips for postgres management?
 
that explains it well
huh, from module import * seems pointless.
 
8:58 PM
@iSeth ah thanks
@iSeth nope. it's about namespace
 
@gertvdijk in what way?
heya @FEichinger!
 
Heya
 
@iSeth Wait, I'm typing an answer (that's allowed here, right?) (referring to meta)
 
@gertvdijk oh yeah.
haha, I turn the page and it says that its not a good idea
 
import package.lib
class iSeth (package.lib.SomeClass):
def __init__(...

vs

from package import *
class iSeth (lib.SomeClass):
def __init__(...
hate it that formatting sucks big time
 
9:01 PM
@gertvdijk click on edit and then fix font
 
I did
 
oh OK.
 
import package.lib
class iSeth (package.lib.SomeClass):
    def __init__(...

vs

from package import *
class iSeth (lib.SomeClass):
    def __init__(...
 
ah. missing the indents still
anyway, you're importing in the current 'namespace' using from bar import foo compared to import bar.fooimporting as bar.foo.baz
 
See, that's why I hate py :P
 
9:03 PM
ah OK.
@FEichinger Python is the best language of all the ones I've looked at...
though there could be a better one out there
 
@iSeth it's not about better/worse
it's about personal preference
 
true.
and support
 
Exactly.
Python is an awesome language. But I hate it.
 
or it's just because some lib is available for language X you really need
 
@FEichinger I guess that's true for PHP on my end :P
 
9:07 PM
I happen to like Python very much. already excited to work fulltime with it in February
 
jrg
:D
 
:D
 
unfortunately, it will be a commercial product. :(
 
@iSeth Well, PHP is awesome and I love it :D
 
@FEichinger I know (troll :P)
 
9:10 PM
0
Q: I have decided to stop spamming and trolling on this site

user1968159I have decided to stop spamming and trolling on this site. I would like to offer my sincerest apologies to anybody who was inconvenienced by my ridiculous troll outbreaks, I regret them. It was extremely immature of me to do such childish actions and I have preyed and hope for forgiveness from th...

good grief
 
I got soooo confused once because I used post_ not POST_
@gertvdijk he says that as he trolls
 
wow that went down FAST
 
@gertvdijk Banned on SF to 2023, On Maths til 2026.
 
jrg
so i'm tempted just to pull the trigger on the guy.
 
@jrg has he been here before?
 
jrg
9:12 PM
nope.
just everywhere else.
 
@jrg Do it. Post his IP then do it.
 
jrg
@tombull89 no, and yes.
 
worth a try :P
 
jrg
i just used the destroy button, no point in suspending him.
i mean... really? he was never a problem to us until he apologized. :P
2
 
Really?
 
9:13 PM
@iSeth It's _POST, if you're referring to PHP :P
 
@jrg Well, by destroying him, you let him come back and spam and trololoolol s'more.
 
jrg
why are all of you guys showing up here?
3
 
@jrg We're following that user.
 
jrg
@MichaelHampton oh, was that him?
 
9:15 PM
Yep, same guy.
 
@jrg We're being raided, obviously.
 
jrg
oh, you do realize that if you were just to tell a moderator, someone could uh, tell an SE employee?
 
You're being raided by Server Fault. Hope your life insurance policy is paid up.
 
jrg
do you have a link to his other profiles? i lost them.
 
Nah, if you want to be raided you need to flag something. Then you'd get every 10k-rep user and his dog in here.
 
jrg
9:16 PM
@MichaelHampton oh no, all the big companies IT people are here! I'll push the red button and watch the world crumble as all their IT departments die.
 
@jrg I'm sure I've flagged quite a few of his things for diamond attention. And we have our own mods as well.
 
jrg
@MichaelHampton so go yell at the right people. :P
 
(And yes I know about the Teachers Lounge)
 
doesn't it auto-something-something when a guy just posts a bunch of downvoted stuff?
 
9:17 PM
@tombull89 I pretty much thought that was what happened when you guys showed up.
 
like the "you suck at quality questions" filter or whatever?
 
jrg
@JorgeCastro auto flags yeah
 
0
Q: After installing Google earth , its found to be crashed due to bug in program

Natrajan Jaiswalhttps://dl.dropbox.com/u/95818612/Screenshot%20from%202013-01-12%2002%3A44%3A06.png following error is there in .txt file : Major Version 7 Minor Version 0 Build Number 0002 Build Date Dec 13 2012 Build Time 17:54:43 OS Type 3 OS Major Version 3 OS Minor Version 2 OS Build Version 0 OS Patch Ver...

lol
 
125 to vote down :/
 
I have 207 rep. What do you want voted down?
 
9:21 PM
I'm out of close votes for that one
but I was able to add the comment
 
@JorgeCastro Not enough rep. :(
 
FLAG TIME
@MarcoCeppi remember the one day when we were closing all those bug questions and we even ran out of moderator flags.
 
I wrote up this, lets not throw the project under the bus for a proposed feature, Asking for Ideas about how to make feature secure -
0
A: Ask Ubuntu Troubleshooter - Defining a Tool that New Users Will Use

mateo_saltaInclusion of URI scheme The basics of @GerogeEdison's idea from comment: ...create a URI scheme for launching the troubleshooter - allowing us to give a "link" to the OP that runs a diagnostic test on their machine. Now, I propose we edit in the security requirements needed to impleme...

 
-1
A: Application showing installed but still not showing up in dashboard

user1968159I have decided to stop spamming and trolling on this site. I would like to offer my sincerest apologies to anybody who was inconvenienced by my ridiculous troll outbreaks, I regret them. It was extremely immature of me to do such childish actions and I have preyed and hope for forgiveness from th...

@FEichinger Okay, okay :P
 
except that is still spamming....
 
9:25 PM
@iSeth Actually it's even $_POST, which is an array ... But I thought I shouldn't be that nitpicky. :P
 
He decided to stop, he just didn't say when.
 
on the plus side he's bumping questions I can fix. :p
2
 
after this one post, he will stop, maybe the next
 
jrg
after what I just did, he'll be spending the next 12 years pondering the mod message I sent him. :P
 
@FEichinger I knew there was more, I just wasn't writing the whole thing.
 
9:26 PM
@jrg Awwwwww :(
@iSeth Sure. :P
 
@jrg +1!
 
And I think I should really stop eating rum balls now ...
 
now we need to watch out for his second account i'm afraid
 
@iSeth It'l be pretty obvious if he tries that.
 
He's probably typing up his next copypastethingy right now.
 
9:33 PM
@MichaelHampton hopefully
 
9:45 PM
I'd like some advice on using the site, but I just want to get a general sense of what people think; I might not have to post on meta for this. This question has answers that argue that MD5 is OK as a general purpose hashing algorithm because generating a file with the same hash as an arbitrary file whose contents you don't control is at least prohibitively difficult.
I wish to present a reason why MD5 actually is unacceptably insecure for signing software. I can give an example scenario featuring deb packages and Ubuntu. Is it OK for me to post this as an answer rather than a comment?
 
Well, only arguing against MD5 doesn't answer the question (Which is also true for the answers in favor of MD5), so I'd go with "No."
However, answering the actual question with an elaborate note on the insecurity of MD5 would be appropriate.
 
@EliahKagan Since you haven't broken RSA and therefore can't forge a signature for the package, can you really exploit this?
 
@MichaelHampton The mistaken assumption that informs into the conclusion that MD5 is acceptable for verifying the authenticity of software is the assumption that the attacker has no control over the real package. It's potentially considerably easier to create a specially crafted package that doesn't appear to contain malicious code because it does not contain malicious code than it is to push malicious code into an official package (though that is also possible).
2
If the attacker has substantial control over the official file (but cannot prevent people from inspecting it and discovering any malicious code), they can create the official package and the fake package at the same time, then distribute the fake package as the real one.
It seems to me that this attack would be an acceptable risk of all hashing algorithms were weak against it. But of all the hashes we currently use, only MD5 is weak against it.
 
@EliahKagan GPG. Can't be fiddled with.
 
@FEichinger The question is well-answered by the accepted answer
@gertvdijk Agreed.
 
9:55 PM
or did I miss something very obvious?
 
jrg
@EliahKagan MD5 is perfectly ok for making sure my photos.zip is in-tact after i carry it around on my USB stick for a few months.
MD5 is not ok for hashing say, passwords.
 
@jrg Yes, most of the reasons we use hashes for verification have nothing to do with preventing malicious alterations. MD5 is still an important tool, for many purposes.
 
@EliahKagan My point is: The entire discussion is largely off-topic, imo, the way it currently is.
 
jrg
and ubuntu goes and checks for GPG signage.
@FEichinger it fits here as well as anywhere else.
i know security (probably) doesn't want it.
 
@gertvdijk No, GPG is fine. I'm saying all the other hashes we use don't have this problem.
 
9:58 PM
Hey, I can have -10 args? Awesome!
 
@jrg Yes, I am not saying we have a problem with the way officially packages are verified in Ubuntu. If I were to answer this it would be in part to explain why it is beneficial that Ubuntu's official archives are signed the way they are.
@jrg Maybe what I should actually do is find somewhere this attack has already been discussed (perhaps more rigorously than I am doing), and just comment on the question with a link to that related source.
 
oh, discussion going on
 
jrg
@EliahKagan ok, that'd work.
 
@jrg I'll see what I can find. This should also give me the opportunity to correct myself if somehow I am mistaken and no such attack is (for some reason I cannot think of now) possible.
 
jrg
there are attacks against MD5.
 
10:00 PM
@EliahKagan these hashes are just for integrity checking. APT uses the lists with the hashes and tests them against the package cache in /var/cache/apt/ somewhere
so, you'll end up needing root access for this to hack. and having root access in the first place makes it quite unnecessary.
what I'm more worried about is that debsums (the tool) checks only via MD5 for quite a lot of packages. catching changed binaries on your system (after it has been hacked) could be hash-collision vulnerable.
 
@gertvdijk They're not just for safeguarding against unintended corruption though. When you download updates over a network, on most systems (at least systems that are not production servers) you will sometimes do so under conditions where a man-in-the-middle attack is not difficult to perpetrate.
As I said, I am not objecting to current practices in the way official Ubuntu packages are signed. (If I was, I'd be on Launchpad now, filing a bug.) But for packages that are signed and verified just with MD5, this should be exploitable without any access to the target machine.
 
@gertvdijk don't add a useful link in a comment, add it to the answer
 
@EliahKagan yup. GPG protects the list of packages, which holds the hashes.
 
@jrg It doesn't address the question and is pretty controversial. That's not exactly fitting, no?
 
@EliahKagan Signed with MD5? frowns
 
10:05 PM
@gertvdijk Sorry. If an MD5 hash is the only way that the authenticity of a package is verified, then it's exploitable. This is not technically a signature, but it serves the same purpose.
@JorgeCastro Hmm...I should probably try to find a source (unconnected to me) to back it up first, though, since this is apparently controversial...
 
@RobieBasak "I don't believe that the apt repository format is properly specified or documented anywhere." Obviously this is not true. You just have to look for it. Debian Wiki: RepositoryFormatgertvdijk 13 mins ago
this one?
 
or add it as a supplemetary answer or something
robbie needs to add the other crap to his answer too, I'll ping him about it later
 
@EliahKagan yes, but you're missing out on one importing thing: authenticity is not integrity. en.wikipedia.org/wiki/Information_security#Basic_principles
GPG = authenticity check (is this from the person I think it is? side effect is integrity check due to the cryptographic nature). MD5 = integrity (has it changed or not?)
 
@gertvdijk Is the whole file signed? Or just the hash?
 
jrg
right
 
10:12 PM
@EliahKagan not sure about APT repositories in specific, but I think the list of the archive is signed and that this list holds the hashes for each package.
 
@gertvdijk In that case, in effect it is the hashes that are signed, and they are used to verify the authenticity of the packages (as well as their integrity). So (if the hashes are just provided in MD5, which is not the case for Ubuntu's official packages), the problem I've outlined should be exploitable, right?
To put it another way: Your criticism does not appear to apply differently to the situation I've described and an alternative hypothetical situation where anyone can trivially craft a file to have the correct hash. Are you saying that verifying authenticity would be unaffected in this hypothetical scenario too?
 
:7637568 not for you in particular. just posting a wise lesson there. was already writing before you sent the other
 
@gertvdijk Ah, I see. Yes.
Btw I think it was the right call for me to ask about this here instead of meta (because crypto discussion would have been OT there to, and then it either wouldn't have happened or would have happened and gotten in the way of meta working right).
@gertvdijk K.
 
@EliahKagan Hmm, second thought, is that MD5-only hashes are exploitable, yes. I think.
@EliahKagan I'd better do some research before saying more now, sorry. this is APT-repo-specific and I am not too familiar with it, just the basics.
 
@EliahKagan Doesn't matter (as long as the hash is secure). But MD5 isn't secure.
 
10:27 PM
@gertvdijk Yeah, I was thinking the same thing. I should read up on exactly what hashes like MD5 are and are not used for here, to be sure.
@Mechanicalsnail Yes, I agree that if the hash is secure, then it is not a problem. I am certainly not against the general practice of hashing files and signing the hashes to facilitate determining if the file you have is the same as the file you're supposed to have.
 
@EliahKagan it seems to me that everything is in the Debian Wiki: RepositoryFormat
@EliahKagan and that you can have perfectly fine MD5-only repository
 
@gertvdijk Perfectly fine in the sense that it's allowed? Or perfectly fine in the sense that it is not exploitable in the way I've suggested?
 
@EliahKagan in the sense that it's allowed. up to the standards.
only diff-indices seem to require sha-1
 
@gertvdijk Yes, besides that, the standard lets you have any of the supported hashes. You don't have to have any others. And the standard explicitly recommends that MD5 be one of them. I don't see an explicit recommendation that there be any other hash.
(Btw I meant to write "if all hashing algorithms" here, that has created a bit of confusion.)
 
10:46 PM
@EliahKagan Discussion is there on the wiki!
 
One of the guys says:
> apt has supported sha256 checksums since version 0.7.7, so these will be used in lenny and future releases
 
@gertvdijk In the discussion there, the possibility of someone creating a fake package that has the same MD5 sum as a pre-existing real package is raised. I'm not sure if that's possible. The exploit I've been suggesting is the idea that even if you cannot do that, MD5's weakness can be exploited to cause people to run malicious code (if MD5 is the hash that gets used -- fortunately, in Ubuntu and recent Debian it is not, for official packages).
 
@EliahKagan So there might be a security hole for PPAs, if MD5-hashed packages are accepted?
 
@Mechanicalsnail no, rather private repo's
you know, virtualbox, spotify, ...
if they fail to set up SHA* hashes, APT will fall back on MD5...
 
@gertvdijk As for SecureApt itself, (though I don't think your disputing this) the security improvements it documents are completely orthogonal to the scenario I've described. SecureApt is about making sure you have the right hashes. It doesn't address any problems of the right hashes being inadequate to ensure you have the right packages.
@gertvdijk Yeah, I don't think it's an issue for PPA's, but third party repositories. Also potentially for official repositories for unofficial Debian and Ubuntu derivatives if they have packages with just MD5 hashes.
The only change I'd recommend in APT is to warn the user when there's just an MD5 hash. (This could then be turned off by the user in APT's configuration, if they wanted.)
 
10:58 PM
@EliahKagan I have the feeling that this must have been discussed a lot earlier on by other people. as in, mailing list...
 
@Mechanicalsnail ok good. I was just giving examples of popular 3rd party repos
 
@gertvdijk Yeah, it seems like it must have. I won't post anything like an answer on AU before researching for other discussion of this. (OTOH if you happen to find previous discussion of this please let me know.)
 
@JorgeCastro before marking a Q dupe I've answered, could you please ping me first? I tend to do a search first if I have the feeling this might have been asked first. askubuntu.com/questions/240043/…
 
I flagged it for merging
 
11:05 PM
I'm full of problems reading a binary file with C++.. Someone could help me?
 
@JorgeCastro ok. well I think the title of the Q could be improved and it should be two different questions. one is like "I try to install this and get this error, what to do about it?" and the other is like "I'm packaging my software and I can't get the quality up"
@Lucio perhaps, yes, what is your q?
 
I have created a binary file with an int (just one) inside the file.
The file has created good (4 byte say nautilus).
But know i want to read it!
and I can't..
 
@Lucio How are you trying, and what happens when you try?
 
@Lucio so, what have you tried? show me code! :)
 
I'm uploading the code..
@gertvdijk @EliahKagan There you goes: paste.ubuntu.com/1521265
I must say that it write the integer int DATA = 5 without problems..
The problem appears when I try to read --> arc.read(memblock,sizeof(int));
 
11:16 PM
so your expecting this line to return 5, if I understand you correctly?

cout <<"Data received: "<<memblock<<"."<<endl; //This shows 0
 
Yes
you are right
it should shows 5, but it shows me 0
 
I must say I haven't seen this way of reading/writing in C++. what does hexdump archivo.bin (command line) say? to see the raw contents
 
I get this;
0000000 0005 0000
0000004
 
seems "okay". integer 5 with null character.
 
Yes, I didn't get any error while creating the file..
 
11:25 PM
you're reading into a char * (8 bits)... is that what you want?
 
not.. 4byte sizeof(int)
I say, yes.. that is what I want, read the 5 and put into the char* var..
 
I'm a bit lost, sorry. this is not my usual pattern of doing things in C++. try asking at SO with someone more awake than I am.. hehe
 
@gertvdijk no problem, thank you for your time!
I am not waiting that someone just show me the solution..
is helpful that someone criticize my code.. That is when the errors come to appear haha
 
@Lucio Why should it show 5 if you turn an int into a char without any way of notifying the code?
 
The only way that I know to read a binary file is puting the content of it into a char *..
So, doesn't matter if when I save it was an int, know is reading from the file
(is what I think)..
 
11:37 PM
No, my point is, what you write to the file is the binary encoding of 5.
What you get after turning it into a char, is the character at position 5, which should usually be ENQ, I believe.
 
Oh, right
 
Which in turn nullifies the string, thus prints 0.
So you'd have to cast the char to an int, then print the int.
 
is the character at position 5 - What do you mean with that?
 
As far as I can tell, you do: char a = 0b101; which is 'ENQ'. What you want to get is int a = 0b101; which is 5.
 
but I am printing the content of the char and it doesn't show any kind of content..
Do you mean that the content of this char* is not printable?
 
11:42 PM
Yes. Because the char currently has the value 5, not '5'.
 
mmmm.. interesting
 
when you read the binary, you get this: 101, and a bunch of 0s in front.
Or, at least you should.
 
I never imagined that a char* variable could be not printable..
 
Oh, it is printable. It's just not visible.
2
 
yeah, (the same for me) haha
 
11:45 PM
The character at position 5 in the encoding table is a system character, which has no displayed expression.
As I said, what you probably want to do is cast the value of the char to an int, then print the int.
Then you should get 5.
Or I could be all the way on the wrong track because I misinterpreted something ... But I don't think I have a cpp compiler here to try it. :/
 
I'm googling to find a conversion from char* to int..
 
Not conversion. Just a typecast.
An int 101 is 5. A char isn't '5'.
Okay, I think I'm confusing you now. hides in corner
2
 
hahaha
 
Hm?
 
@FEichinger I most tell you that (with your theory) this should work:
int aux;
arc.read((char*)&aux,sizeof(int));
 
11:55 PM
Way overcomplicated.
 
or I'm confusing your theory??
 
Yeh, you are. I'm just testing if I can confirm it, before I paste it here, sec.
Well, screw my PC.
 
00:00 - 18:0018:00 - 00:00

« first day (835 days earlier)      last day (4129 days later) »