« first day (174 days earlier)      last day (3682 days later) » 

01:25
Hello
Does anyone have any compiler books they would recommend?
looking to implement my own toy language/virtual machine
just for FUN and educational purposes
01:38
@self way to go, that's quite a fun! Will check what I have, but as I recall, most of the material from relevant curse in my university wasn't in English... -.-
@self for starters quite a list of more or less esoteric ideas: esolangs.org/wiki/Main_Page xD
I guess Piet would be my favourite...
 
3 hours later…
ASR
ASR
04:35
@Kamiccolo good morning
@DrorK. hi gm
user2620028
04:46
Hello
helloc all;
heya @HatterisMad
user2620028
whats up peter
user2620028
i am in need of someone who can explain why c is doing something i am not expecting (usually write in other languages)
I just started my daily routine, so I guess not much, really ;) How's life there?
user2620028
Tired haha. Its dark out too early
user2620028
04:50
What part of the world are you in?
yeah, same here (5:50 in the morning)
user2620028
Oh geez..... like gmt+2?
'm from hungary!
anyway, what is the problem you are facing with?
(I'm not promising I could help, but I will try ;))
user2620028
trying to print to file in and outside of a for loop and the only thing i am finding in the file is the last run of the loop
user2620028
let me go find somewhere to host the code hangon
user2620028
04:52
sorry i dont mean to be to business, i am never in the c chat, always the javascript chat
that's okay ;)
if it is not that long, you can post it here
just make sure, you format (indent) it
user2620028
it is the whole method, maybe 30 lines
user2620028
   else if (strcmp(input, str2) == 0) {
      FILE *f = fopen("cpu.output", "w"); /* Create a file to write to, make it
      fprintf(f,"output for current job %d \n", current_print_job);
      for ( i =1; i <= pcbs[current_print_job + 2].num_instructions; i++)
      {
	 printf("a");
         fprintf(f,"%c %d %d %d \n", memory[memory_to_print].operation,
                   memory[memory_to_print].operand1,
                   memory[memory_to_print].operand2,
                   memory[memory_to_print].result );
user2620028
that is half of it... atleast the half that is not working
user2620028
I expect that to print like 15 statements (estimating) and it prints 4
user2620028
04:55
what it is outputting

output for current job 0
+ 1 2 3
- 3 4 -1
* 4 5 20
user2620028
is there something i am doing wrong with the fprintf
user2620028
And i noticed what i just sent to you i have a missing close comment
one sec (I'm helping in another room right now :P)
user2620028
no problem
umm.. okay..
so before I get into the problem
if this is inside a for-loop, I would definitely not open the file, every time
user2620028
05:00
it is not
user2620028
where should i post the whole method?
gist.github.com -- if you have a github account
@HatterisMad but I don't think you have to post the whole
it is just too early in the morning -- but okay, I see the structure now
it just took me some time :P
user2620028
there is the whole method
okay, so if you print out the pcbs[current_print_job + 2].num_instructions what is the output?
user2620028
05:03
the top if is print the data to the console, the else statement is supposed to print it to file
user2620028
my output for the else statement is

output for current job 0
+ 1 2 3
- 3 4 -1
* 4 5 20
okay, but what is the value of pcbs[current_print_job + 2].num_instructions ?
user2620028
one sec
user2620028
i tried to output it and it froze the program
05:07
(I just noticed you sneaked in ;))
@HatterisMad hmm.. like printf("num-inst: %d\n", pcbs[current_print_job + 2].num_instructions);
and it freezes the program?
user2620028
ehhh i do not know what the first argument to printf does and i did not include it
user2620028
so i suppose that is probably why
user2620028
ls
the first argument? you mean the format string?
user2620028
yes
05:10
that's the thing that tells the program, how much arguments to look at
user2620028
num-inst: 3
(later on take a look at variable arguments (va_list) in C -- then can be useful sometimes ;))
@HatterisMad then the output is valid, the program is working just as it should
if you expect 15 printed lines
user2620028
15 was an estimate
then you probably have too look at that pcbs[current_print_job + 2].num_instructions member yo see where it gets its value
and why isn't it 15 instead of 3
user2620028
actually 20 lines
05:12
so the problem is there not in this for-loop
user2620028
hang on
helloc @AmolBavannavar;
user2620028
my output when i run the if part of that print method
user2620028
Do you want to print the output to screen or file:
screen
output for current job 0
num-inst: 3
+ 1 2 3
- 3 4 -1
* 4 5 20


output for current job 1
num-inst: 2
+ 1 3 4
- 9 8 1


output for current job 0
num-inst: 3
+ 2 3 5
/ 4 2 2
% 5 2 1


output for current job 1
num-inst: 4
- 9 8 1
+ 8 9 17
* 2 3 6
- 4 8 -4


output for current job 0
num-inst: 3
+ 1 2 3
- 3 4 -1
* 4 5 20
it looks okay to me..
user2620028
05:14
that is proper
user2620028
but when i run the else part of the method
user2620028
which is just intending to print to file instead of screen
user2620028
i get this in the file
user2620028
output for current job 0
+ 1 2 3
- 3 4 -1
* 4 5 20
user2620028
is it overwriting the file every time it writes to it?
05:15
no it doesn't => as you can see the data written out is not the last one, but the first
user2620028
well it matches the first and the last as they are identical
@HatterisMad in this case they are not identical
user2620028
they are not?
(btw, I'm truly sorry, but I have to run now => I have to walk my dog, buy something for breakfast and then run to work ;))
user2620028
thanks for your help, have a good day!
05:17
@HatterisMad for me they are not
I will be back later probably
if you are still here, I can help you more
although probably later on others will do as well
anyway goto work;
06:07
goto exit
 
2 hours later…
07:41
helloc all
08:13
sorry for not being here for a several days. My 6-years-old notebook died (didn't want to charge) but yesterday it became alive :) Though I'm sure this may last for not a long time.

I have a question: what do you think about writing a blog? on IT subject, not cooking)
08:44
goto classes_at_the_university
 
3 hours later…
11:30
helloc all;
@YulianKhlevnoy Resurrection? :)
I am trying out FF dev ed. and it looks good so far
 
2 hours later…
13:23
Hello Peter Varo :)
user3079266
14:03
helloc all;
user3079266
@YulianKhlevnoy if you have enough free time and interesting ideas, a blog's a great thing! =)
user924016
Helloc all;
helloc all;
14:53
hi
What's a good or the best book about lean software development ?
@Bart Hello and welcome!
@Bart Could you be more specific? I'm assuming you're interested in C?
@DrorK. err actually i guess I entered the wrong channel, im more into c#
Then you better off asking the relevant channel :)
(I assume that such channel exists)
yeah, my bad. sorry
thank oyu
you
15:40
@Apoorv, sorry, but I have no idea of what FF is. I assume that it is Final Fantasy, as Google answers on "FF" :)
user3079266
@YulianKhlevnoy I think he meant Mozilla FireFox =)
He should've used the formal abbreviation! Although, most probably it wouldn't make a difference
15:56
@Mints97, (my thoughts) the reason is to keep all my work (what I did, and what i'll do in far future). But why not to share it with other people?
I had quite an interesting lab on programming in the first year at university, it was about WAVE audio file: reading it, processing (normalizating, if possible) and making output. Only I managed to finish it, but it didn't save me from reEntering the next year) That was a faculty of electronics, but now i'm on applied math, that's much closer for me. Uh, one-year mistake. Though, it wasn't fully a waste of time)
that post with WAVE will serve as a start point.
@Mints97, aaah, with "mozilla" it became clear now)
16:11
helloc all
i think WAVE audio is a good for start because I like working with files. I liked this audio and going to understand the structure of, for example, TIFF (not sure, but as i know at the moment, it is much easier than JPEG).
The next year going to buy STM32Discovery or something like that and dive into embedded programming :)
The plans have a tendency to change, but all that is what I like :)
Everybody advise to learn C++ and Java, and tell me Assembler is a full sh*t.
I feel so lonely here, at the university (in this respect)...
Assembler is a bitch but I appreciate it
hahah, that is ) But it really opens mind in some sense and gives an understanding of how programs work. I just started learning it.
what flavor? x64?
16:32
@self, x86, i8086\8088 (16-bit, i think)
16:50
at my uni. we learn IBM 360 for the assembly class
17:04
that is, i suppose. I have a book "IBM PC Assembly Language and Programming (5th Edition)", but it's cover differs a little.. maybe because that is translation, not original (EN). And it is said about 8086 as if the book is bout it:

> "Процессор 8086, 80286 и 80386 действуют более эффективно,
> eсли в программе обеспечиваются доступ к словам, расположен
> ным по четным адресам."
"8086, 80286 and 80386 are more effective,
If there is provided access to words, that are situated at even addresses."
rehelloc all;
@DrorK. Is there a formal abbreviation ?
hello too
helloc @mi5t4n;
@Apoorv : hello you too :) (little drunk)
ah it's friday afterall :)
17:13
we won the national robotics competition so having a party
that's great! what did you make?
a robot which is controlled by an android app
the robot needs to complete a task
here is the official site
we gotta run the robot in the arena
what task did it complete ?
open the 2nd lin
*link
it has to run in that arena
oh you meant "run" as in moving around :P
17:20
@mi5t4n, wow, congratulations!
@Apoorv : thankks a lot :)
@Apoorv
@Apoorv : you can say that :D
@YulianKhlevnoy : thanks a lot :)
goto afk; // bbs
free @Apoorv
18:23
helloc all;
@PeterVaro similar to the modem sound slowed down 8 times: https://www.youtube.com/watch?v=izne0lfYAyA
creepy and unpleasant
 
2 hours later…
20:01
helloc all;
20:12
helloc @Mike
whassup @self?

« first day (174 days earlier)      last day (3682 days later) »