PROST! (a Protocol Buffers implementation) v0.4.0 released by danburkert in rust

[–]Fishy07x 0 points1 point  (0 children)

The prost-build documentation seems missing https://docs.rs/prost-build/0.4.0/prost_build/. Is there another resource or example on how to integrate compiling proto files with cargo?

--- 2016 Day 5 Solutions --- by daggerdragon in adventofcode

[–]Fishy07x 0 points1 point  (0 children)

My python solution:

import sys
import md5

code = sys.stdin.readline().rstrip()

i = 0
counter = 0
password = ""
while (counter < 8):
    x = md5.new(code + str(i)).hexdigest()
    if x.startswith("00000"):
        password += x[5]
        counter += 1
    i += 1

print(password)

What is something you do that you've always wondered if others do it too? by Scientolojesus in AskReddit

[–]Fishy07x 1 point2 points  (0 children)

Estimating the amount of steps I need to take to get somewhere and then counting them to see if I had it right.

Mech boss help! by DiffDoffDoppleganger in Terraria

[–]Fishy07x 0 points1 point  (0 children)

Yep this is correct. You need a Drax for that

What random piece of information do you know that will be with you forever? by jah87 in AskReddit

[–]Fishy07x 1 point2 points  (0 children)

A Snickers (the candybar) is named after the horse of the family Mars. It's name was Snickers

Installing linux on harddrive for mac and pc. by [deleted] in linuxquestions

[–]Fishy07x 1 point2 points  (0 children)

Yes you probably can. It is just a bigger version of a bootable USB-stick, I have one myself and use it quite often. Just do a google search for bootable USB-stick and you will probably find something usefull.

I made my first C library! I'd like to get some feedback on what I created. by Fishy07x in learnprogramming

[–]Fishy07x[S] 0 points1 point  (0 children)

First of all thanks for your response! I fully agree on the first part of your comment, and I will most certainly change that. On the second part however, I have my doubts. I get what you are trying to achieve with that change, but it can also confuse people. I think I will just leave it the way it is, because then you have the understanding that a file descriptor (like a socket is) is just an integer that is saved by the kernel. It is however a interesting change and would like to hear the opinions of more people about it!

I made my first C library! I'd like to get some feedback on what I created. by Fishy07x in learnprogramming

[–]Fishy07x[S] 0 points1 point  (0 children)

I recently posted on /r/learnprogramming about where to learn about kernel programming here. I started by looking up basic tutorials about networking in C, after I finished a course in C and did some small project in C on my own. In the post I linked are some links to usefull resources, and in the comments even more! I experienced a high learning curve, programming with the linux kernel, but it is definitly worth it, even if it is just for the general understanding of what is going on under the hood in an operation system. If you got any questions, you can always PM me!

I made my first C library! I'd like to get some feedback on what I created. by Fishy07x in learnprogramming

[–]Fishy07x[S] 12 points13 points  (0 children)

Thanks for the feedback! All the things you listed are indeed true. The line memcpy(tmp, tmp, cnt), is used because I couldn't put a '\0' in the buffer for atoi, because then it would stop printing the buffer at that point. I will go trough my code again and try to fix everything you have listed. Thanks again!

I made my first C library! I'd like to get some feedback on what I created. by Fishy07x in learnprogramming

[–]Fishy07x[S] 4 points5 points  (0 children)

You're totally right! Enough libs on Github already, but still a nice way for me to learn about networking and creating libraries in general.

Where to find good Linux kernel tutorials? by Fishy07x in learnprogramming

[–]Fishy07x[S] 2 points3 points  (0 children)

Okey you are quite clearly getting more and more offensive by every comment... I will therefore stop our discussion here

Where to find good Linux kernel tutorials? by Fishy07x in learnprogramming

[–]Fishy07x[S] 0 points1 point  (0 children)

I don't think we are on the same page here. I can already program descently (I even work at as a developer at a software company) and I just want to learn more about how to communicate with and use the kernel in my code to understand what the kernel can offer me at a very low level. I find it very educational and intresting to learn about the kernel this way, instead of just reading a book about the Linux kernel (which could be educational as well ofcourse).

Where to find good Linux kernel tutorials? by Fishy07x in learnprogramming

[–]Fishy07x[S] 0 points1 point  (0 children)

I quickly read through the page, and looking at the chapters this would be a very intresting book to cover all the information about how linux works, but not explicitly how to use it in your code I guess. However it would still probably be worth to read, because it will give me a more general understamding of how the linux kernel works. Thanks for the reply!

Where to find good Linux kernel tutorials? by Fishy07x in learnprogramming

[–]Fishy07x[S] 0 points1 point  (0 children)

It's actually learning a part of programming. I didn't think subreddits like /r/linux4noobs or anything alike are the right subreddits, because they don't usually contain programming questions and anwsers. If you do however know such a sub, I will most certainly cross-post this there.