Questions tagged [io]
In computing, input/output, or I/O, refers to the communication between an information processing system (such as a computer) and the outside world (possibly a display, an information storage system, or another information processing system).
501 questions
5votes
4answers
1kviews
Custom Iterator for Processing Large Files
I frequently work with large files and implemented a custom iterator to process these files efficiently while minimizing memory usage. The iterator reads each line from a file, parses it into a ...
7votes
1answer
223views
A generic function that reads a line of numeric values from a file
I'm writing a library of IO functions for my physics laboratory class. In the meanwhile, I'm hoping to learn more about generic programming and C++20 concepts. Some context I usually came home from ...
5votes
2answers
196views
Extracting Album Art from mp3
I've created a C# function to extract album art from an mp3 file which seems to work well. Is there a better solution? This is the function that extracts the album art and returns a Bitmap of the ...
3votes
0answers
85views
My First Zig Library: SuperZIG IO 🚀 (Input/Output Handling Library)
I’ve recently completed my very first library in Zig, SuperZIG IO, designed to simplify input and output handling. The library provides utilities for console input/output, event listening (like key ...
7votes
2answers
841views
Basic C++ implementation of linux wc command
I am working on the Build Your Own wc Tool coding challenge in C++. I have a working implementation that seems to match the output of the wc command for different ...
3votes
3answers
355views
Append Buffer for Buffering Small write(2) Calls
The purpose of this is written in the comment below (it is meant to be used in a text editor): abuf.h: ...
2votes
2answers
163views
A small header-only input output library
The library (inspired by stb libraries) attempts to provide some commonly used functions (reading a file into memory, determining the size of a file) that are missing from the C standard library ...
3votes
1answer
126views
Read a line from a stream
Since the standard fgets() does not suffice for my use cases, as it doesn't automatically enlarge the target buffer if needed, and ...
6votes
2answers
661views
C- Reading and Parsing textfile
I'm relatively new to C programming and currently tackling exercises on Advent of Code. The challenge I'm working on involves calculating the sum of integers within each group from a file and ...
4votes
2answers
589views
Simple GPIO design module in SystemVerilog
I am designing a very crude general-purpose input/output (GPIO) module to provide IO pin control to a RISC-V (like) architecture microprocessor I am currently playing with. This is the code so far: <...
1vote
1answer
388views
Multithreaded O_DIRECT file read-and-process program
Here is my code. It reads a file and returns the sum of all the bytes in the file: ...
4votes
2answers
452views
Detecting when a user stops typing
I wanted to detect when a user stops typing. I encountered this answer from SO (Not the selected answer, but the second one which seem to be better): https://stackoverflow.com/a/5926782/17746636 But I ...
1vote
3answers
179views
C++ getline implementation for custom stdlib
I'm writing my own "standard library". It relies on nothing but syscalls, so I've had to make my own implementations of everything, including getline (...
8votes
5answers
2kviews
Python code using *args to print warnings in color
I have this code, which works for the simple tasks I want. But I have questions. ...
6votes
1answer
663views
Crossword puzzle app
I was hoping someone could give me any tips or advice on this program I wrote for my high school class. The point of the program is to create a workable crossword puzzle in the console. If it works ...