« first day (410 days earlier)      last day (1153 days later) » 

12:16 AM

C++ Questions and Answers

Solve problems and approach solutions. Just ask and lurkers wi...
 
 
1 hour later…
1:21 AM
My long work days are over for a while. The last day of the event is tomorrow, and I'm not working. I finally get to relax and watch the event as a spectator instead of a worker.
 
@zondo :) Have Fun Zondo
what should i call you?
Can i call you zon?
zonder land idk lel
 
1:39 AM
Wow.
@Rishav morning
 
@Dsafds You can call me whatever you want. As long as I see the message and I know to whom you are referring, I'll answer to it.
 
 
5 hours later…
6:58 AM
I actually got 2486 errors after updating Xcode
 
 
2 hours later…
user4710450
8:49 AM
Hi guys
 
user4710450
Amazing you haven't been so active since the time I went
 
user4710450
I've been working on a tiny assembler the two days I lfet you.
 
user4710450
If you are interested in these kind of stuff please contribute :)
 
user4710450
I know the code is very clumsy but its readable :D
 
9:02 AM
Hello
 
user4710450
Hi @Rishav
 
Hey man, I can't stay today, I have an exam tomorrow.
 
user4710450
Thanks :)
 
But yeah, nice assembler.
 
user4710450
I'm having a bit trouble with dividing AX to AH,AL.
 
user4710450
9:05 AM
@Rishav Thanks. It's not working yet but will work in an hour with mov instruction only
 
I don't know any assembler tbh.
What instruction set are you targeting?
 
user4710450
8086 I guess
 
user4710450
for now
 
Cool
 
user4710450
but I will add 64-bit instructions and registers soon
 
9:07 AM
Yesterday, Dsadfs told me there are 20 versions of Assembly, lol.
 
user4710450
Whole the idea came up after creating a Virtual Machine
 
user4710450
I thought if I can create a byte code why can't I create an assembler1?
 
user4710450
@Rishav Wow
 
user4710450
@Rishav Study hard for it. C u later :P
 
Yeah...
I have loooads to study.
I'll start at 3.
 
user4710450
9:17 AM
Did you know that structs in C can't have functions?
 
user4710450
4
Q: 'declared as a function' in C

user3575963#include <stdio.h> #include <stdlib.h> #include <string.h> #define LIMIT 100 /* Stack structure */ typedef struct stack { char x[LIMIT][10]; int top; void push(char *s); char *pop(); void init(); bool is_empty(); } stack; /* Reset stack's top */ void stack init() { this->top = 0...

 
Yes?
In fact when I read your sentence for the first time, I didn't see the "can't" and I thought "What? structs in C can have functions?". :P
 
user4710450
lol
 
structs in C++ are more like classes.
 
user4710450
Exactly the same
 
user4710450
9:23 AM
except not having private
 
You can have constructors and overload operators.
 
 
2 hours later…
11:48 AM
@Rishav: You have inspired me: data.typeracer.com/pit/profile?user=zondo
 
user4710450
What is the problem do you think?
 
12:26 PM
@Ehsan: What is it supposed to do, and what is it doing wrong?
 
user4710450
Actually mov is not working
 
user4710450
My debugger is broken
 
user4710450
let me download a new one, then I will tell you whats going on?
 
user4710450
@zondo How does the code look like?
 
Hello @AldoGinting.
 
user4710450
12:28 PM
The base ( Parser, Tokenizer ) is written and now defining other instructions is remained
 
user4710450
The next step would be creating a AST and then compiling to machine code and my assembler would be ready
 
@Ehsan I'm not a C guy, and I'm a little tired right now, so I don't really feel like looking at it closely. If you can tell me what exactly it is doing wrong, and where, I can look more closely.
@AldoGinting: Please, grace us with your first chat message. Join in the conversation.
 
user4710450
The getToken reads the source line by line
 
user4710450
if it encounters an instruction then it gets the parameters and passes to the instruction function
 
user4710450
12:31 PM
for example
 
user4710450
mov eax,2
 
@Ehsan , sorry i just discover this section of stackoverflow
i have no idea
 
user4710450
It should pass eax and 2 to mov function
 
user4710450
and then putting 2 in eax register in mov function
 
@AldoGinting You came to a great first chat room. We're pretty relaxed here.
 
user4710450
12:33 PM
@AldoGinting, good to see you here :)
 
thanks
 
user4710450
@zondo, Haven't you written in your profile you write code in C?
 
user4710450
Or you're only a Python guy?
 
I write a little bit in C. I'm learning it, but I'm not proficient in it.
 
user4710450
It's a great language
 
user4710450
12:34 PM
I realized it yesterday!
 
It's so strict compared to Python. Python is incredibly easy.
 
user4710450
Yup. But Python is rubbish compared to C
 
user4710450
The awful thing about it is
 
user4710450
You have to have the interpreter to run Python programs
 
There is such thing as Py2exe and PyInstaller.
 
user4710450
12:36 PM
Java is fine with JVM
 
user4710450
Because it's quite portable
 
user4710450
@zondo They just embed the interpreter to the program
 
user4710450
But Python unfortunately is neither portable nor native.
 
Not portable?
 
user4710450
No
 
user4710450
12:37 PM
At least compared to Java
 
user4710450
My washing machine is even running Java!
 
user4710450
In my opinion worthy languages to learn in this era are :
 
user4710450
C++, Java, JavaScript,CSS,HTML
 
user4710450
and Ruby if you don't like Node.JS like me or just stick to that JavaScript
 
user4710450
But this is my opinion, yours maybe different ;)
 
12:42 PM
That all depends on the line of work you are expecting to go into. For Android applications, Java is definitely the best language to learn. For web development, HTML, JavaScript, and CSS are vital, but they aren't good for everything.
 
user4710450
Yup, thats the reason I'm saying one should use Node.JS or RoR for web development.
 
user4710450
or PHP
 
My brother uses PHP.
Drupal
 
user4710450
@zondo Java is much wider than Android
 
user4710450
@zondo Cool. I used to work with Wordpress
 
12:45 PM
@Ehsan That was an example. I'm not saying that it isn't good for anything else, just not everything else.
Well, I need to go. See you later, @Ehsan.
 
user4710450
Of course
 
user4710450
@zondo Catch up with you later :D
 
user4710450
I downloaded DDD debuger
 
user4710450
And its even harder to work with than the GDB :(
 
user4710450
There is only one thing about C# I admire
 
user4710450
12:51 PM
and thats the Visual Studio debugger for C#
 
user4710450
I haven't still found an alternative for it :| I'm really missing it
 
user4710450
1:01 PM
Cool , mov is working :D
 
user4710450
The problem was that I was referencing the first parameter with params[1]
 
user4710450
Which I should used params[0] instead
 
user4710450
This assembler was the first programming language I wrote without aid of tools like flex,bison,javacc,...
 
1:49 PM
I am getting rekt.
 
2:02 PM
Good Morning :)
@Rishav Nothing too different :)
 
user4710450
Hi
 
@Ehsan Demeneq ante?
 
user4710450
!?
 
Speaking Ahmaric :D
 
user4710450
lol :)
 
2:07 PM
It means How are you doing lel
 
user4710450
Not bad
 
Assembler?
 
user4710450
Way too busy with my assembler
 
What??! Last time i heard of you hated osdev
 
user4710450
I'm just adding interrupts support
 
2:08 PM
and low level projects .
 
user4710450
@Dsafds Its different from OSDEV
 
Now what happened?
@Ehsan Yes but i thought you didnt like low level development in general :/
 
user4710450
I have always been interested in Compiler,Interpreter Design
 
@Ehsan Ahh okay
 
user4710450
Don't worry, I may come back to OSDEV
 
user4710450
2:08 PM
if I find a good tutorial
 
user4710450
I'm tired of the tutorials in osdev.org
 
user4710450
Especially because it uses MakeFile
 
user4710450
I don't know why can't these dino-aged OS developers can't turn to something easier like CMake
 
user4710450
to do the configuration
 
user4710450
2:10 PM
@littlepootis Incomplete
 
Well, all of them are :D
 
@Ehsan Dude!
Im about to follow a tutorial about osdev that is brokenthe tutorial
But when i finish doing what i am already doing :/
 
user4710450
So you mean I can't find a good tutorial on it?
 
user4710450
@Dsafds, why don't you start writing your own OSDEV tutorial!? ;)
 
@Ehsan There are many good tutorials on osdev .. the wiki isnt really good for begginer
 
user4710450
2:12 PM
:|
 
@Ehsan Ehh , i am not a good teacher
 
user4710450
Is this the place I should start?
 
Im basically trying to make my own File System ... By Encoding a char to a File.. and this dude tells me its broken since i am returning an pointer of a local address..
I guess when i tested it and it worked , i was blind :/
 
user4710450
I'm going to take a look at it again .... and if I realize that awkward MakeFile in BareBones I may come to OSDV
 
2:14 PM

C++ Questions and Answers

Solve problems and approach solutions. Just ask and lurkers wi...
@Ehsan Ok so
 
user4710450
Um, by the way
 
Do you want a
 
user4710450
I'm not also familiar with BootStap Assembly
 
Tutorial which gives you a tonnn of info.. And he works in Microsoft
in Visual Studio*
 
user4710450
Is it possible to write whole the OS in NASM?
 
2:15 PM
Or do you want a tutorial which goes straight to the point
 
user4710450
Also I don't know how to write ld files
 
@Ehsan Yeah i write mine in nasm
@Ehsan you will soon
Ok let me ask you one question. What do you work in? Windows or Linux?
 
user4710450
Linux : Ubuntu
 
user4710450
and Kali
 
user4710450
@Dsafds, Can you explain me this tutorial
 
user4710450
 
user4710450
@Dsafds I have always hated Windows, Visual Studio since the time I abandoned C#.
 
Ok then
This tutorial is excellent for you
 
user4710450
Meaty Skeleton is the place I'm stuck
 
Learn from here ^^
Dont learn from wiki.osdev.org .. just go there if you want additonal information
 
user4710450
Thank you man!
 
user4710450
2:17 PM
@Dsafds Really?
 
@Ehsan osdever is really for begginers
explain you as you never ever programmed.
 
user4710450
I started with wiki.osdev.org and I got a bad feeling about OSDEV
 
hold on .. in a fight with a bee
 
user4710450
Also one more question :
 
user4710450
Is there any video tutorial on OSDEV?
 
user4710450
2:19 PM
I tend to learn more from video tutorials rather than text-based tutorials
 
That bee got demolished.. ok so
@Ehsan Yes .. it did give me that too.. But i stuck with it
 
user4710450
lol was it honey-bee?
 
yes .. came in my room.. Had to rekt it with a blanket
I hate flying bugs.. hate em
or bugs in general
@Ehsan Yes there is!!!
 
user4710450
I hate insects in general!
 
user4710450
@Dsafds Wow
 
2:21 PM
I actually started from an excellent Viedo tutorial
He is freacking awesome.. But then we went our seperate ways when he finished teaching about interupts at episode 6
He has 27 viedos now.. and he is not stoping!
And he posts his code here : github.com/AlgorithMan-de/wyoos
 
user4710450
WOW
 
user4710450
27 episodes on OSDEV
 
user4710450
It's fu**ing amazing!
 
Yes , he is not stopping.. He will continue.. He is great to chat with to :)
suscribe to him lel! So he does more viedos to
 
user4710450
Sure
 
2:23 PM
Holy SHET .. He went over freaking TCP
 
user4710450
I will make donations to him if he has Paypal.
 
LOL he starts
by saying Oh Boi.. what have i gotten my self.
When he starts the TCP Tutorial lel : youtube.com/…
 
user4710450
I will start his tutorials as soon I finish my tiny assembler
 
user4710450
I'm planning to distribute it for Android,Linux,Windows
 
user4710450
I think I can distribute it for Android with C4Droid
 
user4710450
2:26 PM
Without writing all these in Java
 
@Ehsan Java is a desease
 
user4710450
The problem is I don't like to migrate all these code to Java
 
user4710450
@Dsafds I love Java!
 
@Ehsan keep in mind , he does lot of tutorial on Networking .
Networking is preety complicated .
He should have went over user mode before that lel
 
user4710450
Thanks. I'm really falling in love with this guy :)
 
2:28 PM
@Ehsan Seriously?
Wow first of all this is the first time i heard someone say that
 
user4710450
Ya, Is that strange?
 
"Yes i was darring enough to go to an Android Chatroom , and say Java sucks (i thought i was in a javascript room)"
 
user4710450
Yes I know everyone hates Java but I want to be different
 
@littlepootis can i make a Stackexchange bot in C or C++ (I can convert C To C++ So no problemo)
@Ehsan Lol
 
user4710450
Also almost everyone hates Assembly
 
user4710450
2:30 PM
But without Assembly where would have we been now?
 
user4710450
We had to write this :
 
user4710450
10000101
 
@Ehsan that is ASCII
 
user4710450
Ordinary folk tend to hate difficult stuff
 
user4710450
@littlepootis Its a byte
 
2:32 PM
It's just pixels
 
user4710450
Nope
 
user4710450
It's a byte
 
user4710450
And you had to fill PC memory with it
 
user4710450
and then call an interrupt
 
user4710450
Thats what I have heard
 
2:33 PM
@Dsafds Sure, but you'd have to deal with things like WebSockets, headless execution and stuff in C or C++, which is....... hard and not worth it.
 
user4710450
I haven't seen it myself :|
 
@Ehsan No one hates assembly.. really
I Love Assembly.
 
user4710450
Most of people don't understand Assembly
 
@littlepootis :(
 
user4710450
And thus tend to hate it
 
2:34 PM
@Ehsan Yes . But Assembly is the father of all lanaguges
 
user4710450
But I myself also love Assebly( NASM variation )
 

Halt and Catch Fire - Assembly

ASM & Machine Language coders. The Father of all langauges
 
For my bot I'm using the deprecated DOM Mutation Events API (for listening to new messages) should change it to use Mutation Observers) and simple HTTP post.
 
@Ehsan Ehh , ive worked with FASM NASM and GAS
 
user4710450
lol
 
2:34 PM
Some others listen to a websocket. I decided not to bother with it.
 
But i like NASM The most
 
user4710450
Have you tried MASM?
 
Why would you do that
 
user4710450
MASM was also a good reason to hate Windows for me
 
@littlepootis Http Post.. where is the Stackexchange JSON Of Chat?
 
2:35 PM
@Dsafds There is none.
 
THe new messages of chats.. because if thats the case i just need to Http Post
 
user4710450

Halt and Catch Fire - Assembly

ASM & Machine Language coders. The Father of all langauges
 
user4710450
This room it empty
 
user4710450
Its only the three of us
 
@Ehsan yea. @HamZa , me and @littlepootis are normally there
@PeterCordes use to be there often
Haha wow.. good ole days when @Kamicolo was there to
 
2:37 PM
@Dsafds For sending a new message, all you need to do is:
 
user4710450
Wow I love this album :D
 
  3  $.ajax({
  4       "type": "POST",
  5       "url": "http://chat.stackoverflow.com/chats/1/messages/new",
  6       "data": fkey({
  7         "text": msg
  8       }),
  9       "dataType": "json",
 10       "error": console.log
 11     });
sorry for the vim line numbers :P
I don't know what fkey is but it's in this site.
But in the SO bot making community, it's known as the f***ing key.
 
user4710450
Also his Satisfaction album is popular
 
@Ehsan lol google
@littlepootis Yea so there is a JSON
 
2:39 PM
For sending a message
There's a socket for listening to new messages.. but I've never used it.
 
@littlepootis Is there like a Hello World for creating a bot in C or C++?
 
No, there isn't.
 
user4710450
I'm always dreaming of a programming language
which compiles to both native and Virtual Machine code
Runs on all platforms : Windows, Linux, Android ,...
And be something like a mixture of JavaScript, Java, Ruby and C++.
I know this is very ambitious but its possible :)
Um one more feature : supports both Dynamic-Typed (e.g. Ruby) and Static-typed ( e.g. Java )
 
For Stackexchange
 
@Ehsan Haxe
 
user4710450
2:40 PM
Also I was thinking to add the support of libraries written in JVM,Python,Ruby,JavaScript(Node.JS) to my programming language
 
Haxe does everything
 
user4710450
Take a look at my dreams :|
 
@Ehsan You forgot something..
 
Try to thing of what you forgotten
think*
 
2:41 PM
OS Development?
 
user4710450
Wow haxe.org looks good but lacks many things
 
BoneOS man...
 
You can, with a bit of effort, write an OS in Haxe.
 
Windows,Linux,BoneOS,Android
 
user4710450
Can I use JVM-based libraries in Haxe?
 
user4710450
2:41 PM
@Dsafds lol
 
xD im probably annoying now lel
 
@Ehsan probably
 
user4710450
Since I'm a JavaAholic I need something that supports JVM libraries too :|
 
That is bad. You should get rid of it asap.
I wouldn't recommend Haxe, though. Try some other JVM language.
 
user4710450
No , Actually I want to invent my language
 
user4710450
2:44 PM
even if its duplicate
 
user4710450
or someone has done it better than me
 
user4710450
And I want to call it Ginger
 
user4710450
It would be much like Ruby and Java
 
user4710450
The two languages I love most
 
@Ehsan Ruby and Java.... Thats the two langauges i hate the most.
 
user4710450
2:46 PM
lol
 
Its Ruby vs C#..
 
user4710450
People have different tastes
 
Idk which one i hate more.. hard
@Ehsan yea ik
 
user4710450
The language I hate most is Python
 
Its just that in school we are forced to learn Freacking Java
 
user4710450
2:47 PM
It looks like sh*t to me
 
and i feel like ripping my heart out.
every time i write java code
 
user4710450
lol
 
user4710450
School is too bad for you :(
 
im obviously not going to thier dumb championship ... Java competion? Are you kidding me?
 
user4710450
Quit it as soon as possible :|
 
2:48 PM
Ill rather jump of a cliff
 
user4710450
lol
 
@Ehsan Why?
 
user4710450
Thats because they haven't taught it well to you
 
@Ehsan I wish.. but my parents are really telling i need to get degree.. :/
 
user4710450
@littlepootis It's just an ugly version of Ruby
 
2:48 PM
@littlepootis Lets face it.. School will never help me
 
user4710450
Without Ruby's magic
 
@Ehsan Ruby is.. ugly and slow imo.
 
The only way they can help me.. is improve my social skills.. which i dont relaly have :/
 
user4710450
@littlepootis Nope its magicful
 
user4710450
2:49 PM
because of something like this :
 
user4710450
3.times do |i|
  puts i
end
 
user4710450
also
 
user4710450
3.days.from_now
 
user4710450
It's much like human language
 
user4710450
I think these 2 sample codes are enough for me to love Ruby
 
2:50 PM
@littlepootis Preach
 
user4710450
The second language I hate most it PHP.
 
@Ehsan Preach
 
user4710450
It's a sh** duplicate of C in Web
 
@Ehsan You can simulate something akin to it in languages that support it
The second example too.
 
user4710450
And Python does not support that
 
2:51 PM
i use python for my scripts.. nothing else
 
user4710450
It doesn't allow to run methods on Numbers
 
That's not a reason to hate it though :P
 
user4710450
I have my own reasons to hate it
 
Running methods on numbers is the weirdest thing ever
 
user4710450
Also you may have good reasons to hate Java ;)
 
2:52 PM
haha yes
 
user4710450
@littlepootis Yup and Ruby is wierd
 
user4710450
Thats what I love about it
 
user4710450
It isn't what we generally expect
 
user4710450
Has everyone here ever tried SmallTalk?
 
user4710450
I've heard it has the most complex OOP structure.
 
2:55 PM
@Dsafds you just pinged the whole cavalry ...
Did you succeed with your math question btw?
 
@Ehsan I did.
 
@Ehsan yep :D
@HamZa Yea thanks :)
 
In a sense you could hate every programming language. None is perfect.
@Dsafds So how do you solve it?
 
@Ehsan OOP Cant be complex.
@HamZa it was 3 days ago... i think i forgot.
 
user4710450
@littlepootis How was it?
 
2:57 PM
I like ROP :_)
 
I tried Pharo. SmallTalk isn't really a language, it's a programming environment. I quit because the environment was too confusing for me.
 
I just learn math for my tests.. Idgaf about math
 
@Dsafds haha, ok
 
user4710450
Hey man just wait one year more
 
user4710450
and you'll be free of HighSchool
 
2:58 PM
@Dsafds math is quite important if you want to follow CS in university
 
School really suceeds to make me hate maths
@HamZa Haha sure
 
@Ehsan It's not like uni's going to be any better.
 
user4710450
@Dsafds, F*** your teachers
 
i would have loved math if school didnt make me hate it
 
user4710450
They have been very cruel to you
 
2:58 PM
@Ehsan I would recommend against it.
 
@littlepootis LOL
 
user4710450
@Dsafds, hating Math is the worst thing you can do
 
user4710450
I'm sure the teachers are the reason for your hatred.
 
user4710450
Because Math for a person interested in CS would/should be very interesting
 

« first day (410 days earlier)      last day (1153 days later) »