Noob here. I want to write something meaningful in C. I know how to implement linked lists - sort of...

Noob here. I want to write something meaningful in C. I know how to implement linked lists - sort of. But don't really know what to move onto next. I guess other datastructures... But to what end? What do you guys write in C? What's the next dang step here?

Attached: 1551352805737.png (867x812, 1.22M)

Other urls found in this thread:

github.com/enfiskutensykkel/ssd-gpu-dma
dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/
github.com/timmykill/sbopkg_c
github.com/EvilPudding/candle
twitter.com/SFWRedditVideos

>What do you guys write in C
I've made this: github.com/enfiskutensykkel/ssd-gpu-dma

You should probably check out the daily programming thread:

But fish wouldnt know how to use a bike anyway, they dont have legs or arms

That's the joke (which was funny when I made the handle, not so funny now).

Ive used c for years and stil have no idea what implementing a linked list even means.why would you ever need to do that

Circular linked lists for zero cost memory abstractions etc. meme

t. professional fizzbuzzer

why is the red room purple in this stupid image?

how dare you

Write gentoo

You're a straight-up monster as far as I'm concerned man. Thanks for the inspiration.

lock-less concurrent data structures

dreamincode.net/forums/topic/78802-martyr2s-mega-project-ideas-list/

Thanks

How can you not know what a list is. How else will you dynamically add to some structure?

In the world of employment you can't just declare like some undergrad tier code like: MY_DERP_STRUCT myDerp[1024];


MY_DERP_STRUCT* pMyDerp; //correct
Now say I want to loop over all `myDerp` to read data. How do I know how many `myDerp` have been filled in? Well I could create a counter, and go down the path of creating lots of vars for little things.

Or you could be a professional and use a singly linked list on myDerp and loop on each myDerp->Next until you find a NULL struct, hence the end.

Attached: chin.png (436x77, 42K)

Use what you got and build something within your capabilities.

Maybe you could write a basic text line-editor... Make lines a certain maximum length, and when done editing that line realloc() and strcpy() into the list of lines.

Insert new lines and remove deleted lines too of course.

Another idea: Impliment an autocompleter. Just a command line program that takes two args, a text file with complete lines and a word or phrase to seek completions for.

Use the autocomplete technique of... I can't remember the name, but the one with nodes in a list of letter to next letter. Not a trie, the other method.

Another idea: Make a hash table with each bucket being a head of a linked list, with resizing possible (don't resize automatically, make that a function).

Use regular strings as data and return true/false if present, keep it simple (you would usually have a string as key and one or more values in a key : value pair).

Use hash function "djb2" (just a linear congruence hash, famous for a silly pointless argument).

Note: you can't use hash for autocomplete above because you hash complete strings.

To resize a hash table, create a new hash table of the new size and traverse the old one, rehashing the entries for the new table. Dealloc all the old data after the transfer process is complete.

>github.com/enfiskutensykkel/ssd-gpu-dma

Pretty neat user. Congrats on the hard work. Hope it works out for you

Help me make a slackbuilds helper:
github.com/timmykill/sbopkg_c
Its the first time I use C for anything different than uni exercises plz help.
I will translate all the comments from pasta to english for you.

How does one learn to make these kinds of things?
I'm no stranger to working close to the hardware, but modern computers and operating systems are so complex I don't even know where to begin.

In an internship I wrote drivers for Intel monitoring technologies like Cache Management Technology and Uncore Process Monitors, but that was as simple as setting a few configuration registers and then periodically reading back from another handful of registers.

bump

>I want to write something meaningful
never gonna make it

I'll bump with you. I tried looking into writing a Linux driver once for a SPI device, realized I know nothing. I just want to know how one would even bit-bang on an arbitrary bus in Linux.

What if I wanted to write a SPI driver for an off-the-shelf temperature sensor or something? No clue; tried researching and nothing made sense.

Uhh... what?

Don't waste time on C lmao. Go with something more mainstream or modern like C# or Python. Unless you plan on working on archaic machines from the 90s, you will not benefit from learning C over the relevant modern languages. It would be downside and waste of time.

>C#
shitlang
>Python
shitlang

Writing at least one project in C will make you a better programmer.

You know that most Python Libraries are written in C, right?
Python is nice for tying programs together, but on it's own it's pretty slow and useless.

Attached: 1549738107445.jpg (487x495, 52K)

I already know python quite well. I'm considering biting the bullet and learning C#. C is uninspiring to say the least.

Learn proper memory management and optimization.
So yeah data structures, kinda.

C is still widely used for embedded systems. Not many code monkeys want to go to the trouble of learning it anymore. It's almost guaranteed employment.

So unless you're developing FOR python, as in a python developer hired by python, it's a waste of time to learn C.

Python is there for prototyping and functional program. Its easy, simple and has the most widely used tools to do just about everything you want VERY easy to work with. Sure you may suffer some speed disadvantage due to the ease of use, but that speed is irrelevant to human perception. As in, its only measurable in nanoseconds.

If NASA and SpaceX and Google can make use of Python for their critical missions, why can't a standard dev? In fact, I'd say everyone should be mastering Python for doing things. Everyone can then learn and master a secondary language to optimize your python into something like Golang(for google), C++ for SpaceX, C or ASM or something else for critical key aspect. The secondary language is only for optimization route, not functional. Python gets you to 99.9999999% of the goal. The rest is just optimization and takes a 99.999999% of the time to get it right.

>If NASA and SpaceX and Google can make use of Python for their critical missions, why can't a standard dev?
Except they dont?

You just repeating what the person you're responding to wrote. He didn't say python is bad, he just said "don't waste time on c lmao" is dumb

wow an actual decent post on Jow Forums
i must've crossed into an alternate fucked up timeline without even being aware of it

Attached: 1551409567478.jpg (639x480, 32K)

>but that speed is irrelevant to human perception. As in, its only measurable in nanoseconds.
Holy shit, no. Maybe for a "Hello World" program, but Python is retardedly slow compared to C.
It doesn't matter that much if you're just using it as a glorified scripting language, but actually doing any calculations in Python is absurdly slow.

If you plan on doing any level of back-end development, then it's a pretty good idea to learn C.

Bump

Thanks

>How does one learn to make these kinds of things?
I just wondered if something like this was possible. I was already familiar with GPUDirect, and I originally thought it was possible to use NVMe drives as memory. I just developed as I went and followed the NVMe spec and it evolved into an API rather than a test program (hence the weird repo name).

>github.com/enfiskutensykkel/ssd-gpu-dma
I expected to see some professional fizzbuzzing or some meme Python extensions, but this is legit. Nice work.

For real? I'm planning on going into embedded (I have a paid internship lined up) but I dunno what my prospects will be like afterwards.

How about you check the project that image came from? github.com/EvilPudding/candle