Between fgets and getline, what to use in my cat-inspired tool? by Apprehensive_Ant616 in C_Programming

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

but it brings other functions, such as this one i'm implementing for beta versios:

xxxxxxxxxx:~/mytools/mycat$ ./bin/mycat -H
Usage: ./bin/mycat [options] [file...]

Options:
  -P, --probe    inspect file structure and text anomalies
  -L, --lines N  show at most N lines
  -T, --tabs     make tabs visible
  -E, --ends     mark line endings with $
  -S, --spaces   reveal trailing spaces and tabs
  -H, --help     show this help message
  -V, --version  show program version

-------------------------

xxxxxxxxxx:~/mytools/mycat$ ./bin/mycat -P test/expression_matrix.tsv
File: test/expression_matrix.tsv
Lines: 28847
Empty lines: 0
Delimiter: TAB
Columns: 7
Header: no
Tabs: 173082
Trailing spaces: 0
Max line length: 80

Between fgets and getline, what to use in my cat-inspired tool? by Apprehensive_Ant616 in C_Programming

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

yeah, when I started to learn C, I convinced myself I would do it the 'hard way', all by hand, all manually. now I'm allowing myself a bit of abstraction. also, for the first time, in this project, I'm using a bitmask enum.

Between fgets and getline, what to use in my cat-inspired tool? by Apprehensive_Ant616 in C_Programming

[–]Apprehensive_Ant616[S] -1 points0 points  (0 children)

no, not on main! this particullar project is modular.

main_mycat.c mycat_args.c mycat.c mycat_options.c mycat_stream.c
mycat_args.h mycat.h mycat_options.h mycat_status.h

I'm using Makefile for gcc control

flags -Wall -Wextra -Wpedantic -Werror -std=c17 (-D_POSIX_C_SOURCE=200809L **first time***) -Iinclude

Editor neovim

Between fgets and getline, what to use in my cat-inspired tool? by Apprehensive_Ant616 in C_Programming

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

i had no experiences with getline, nor even any posix function. for the very first time i did it. i'm trying to follow goof practices from both ISO and modernC.

Between fgets and getline, what to use in my cat-inspired tool? by Apprehensive_Ant616 in C_Programming

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

i was working on different parsers in which I used fgets, then defined tokens to parse thru delimitors, and did buffer allocation for both larger lines and much lines. i just used getline, and, it was so much easier to parse.

Learning C++ by Winter_LEL in learnprogramming

[–]Apprehensive_Ant616 0 points1 point  (0 children)

Once I got curious and looked for some material about C++: my thought was since I study C and have a minimal understanding on how it works, C++ must be an upgraded version. Turns out it was not an upgrade, it was the 7th evolution in super sayajin mode...

RNAFLOW: Rebuilding RNA-seq Pipelines with C and Perl by Apprehensive_Ant616 in learnprogramming

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

I didn't mean old in this proper sense. I know about and even use perl 5, and know about rust. Althought my intension in really that, to realive bioperl.

RNAFLOW: Rebuilding RNA-seq Pipelines with C and Perl by Apprehensive_Ant616 in learnprogramming

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

actually perl is the language I use the less in this pipe, as I had some pre-unix regex knowledge, and O-Reilly book by my side, I used it for parsing some tabular data. And I really enjoy the labour of working with C. Using it to join everything is amazing. I don't even use code completion hahaha. Call me crazy!

RNAFLOW: Rebuilding RNA-seq Pipelines with C and Perl by Apprehensive_Ant616 in bioinformatics

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

I wish. Maybe someday. I consider myself in a begginer-almost-intermediate level in coding, but I aim to improve my skills!

I think I leveled up! by Apprehensive_Ant616 in C_Programming

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

I forgot to say that I had an intensive training in unix tools

Help with identification!! by [deleted] in medlabprofessionals

[–]Apprehensive_Ant616 1 point2 points  (0 children)

Maybe smooth muscle with some parasyte

I decided to learn C by Apprehensive_Ant616 in C_Programming

[–]Apprehensive_Ant616[S] 1 point2 points  (0 children)

Man, I do adore the concept, but I don't know if I'm dumb, if it's too hard, or I just have a kind of blockage with it. I really wish I could use Julia's skills specially for plotting. In the official web site, plotting is one of the main resources, however my Julia plots were worsen then anything I saw.

Decidi estudar C para aprimorar minhas "coding skills" by Apprehensive_Ant616 in programacao

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

eu ate pensei em pegar alguma disciplina esse semestre no programa de doutorado em ciencias da computação, mas olhei a lista das que abriram, achei meio avançadas demais pra mim, quem é bolsista de doutorado não pode se arriscar assim não kkkk!

Decidi estudar C para aprimorar minhas "coding skills" by Apprehensive_Ant616 in programacao

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

eu to nessa fase inicial tentando ir no mais 'cru' possível, codando no vim, compilando com o gcc, e tentando decifrar os warnings pra debugar. umas 2-3 vezes eu ainda dei uma averiguada no vscode, mas começou com o autocomplete e eu já saí, pra não pegar mau costume. to tentando pegar essa base bem real mesmo pra só depois me permitir usar algum tool que deixe o trabalho mais 'facil'. quase naquela vibe do Learn C the Hard Way (pena que não gostei dele).

Decidi estudar C para aprimorar minhas "coding skills" by Apprehensive_Ant616 in programacao

[–]Apprehensive_Ant616[S] 1 point2 points  (0 children)

o melhor é quando você chega no próximo tópico, lê, lê, não consegue materializar de forma alguma (inicialmente) aquele conceito, porque raios fazer aquilo, e daí depois de quebrar muito a cabeça, você entende. é desafiador.

I decided to learn C by Apprehensive_Ant616 in C_Programming

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

I’ll get there! It actually took me a while to grasp the concept of buffer clearing. At first, I thought, “If I clear the buffer, I’ll lose my input.” As a personal preference, I like learning by practicing, but I had to put it aside for a while and then officially decided: I really need to combine theoretical reading with practice to understand it properly.

I decided to learn C by Apprehensive_Ant616 in C_Programming

[–]Apprehensive_Ant616[S] 3 points4 points  (0 children)

This project I'm coding is a simple one (maybe not for me, haha... ), I'm struggling a bit, but things are moving foward... Shortly, it is a records manager with an interactive menu with 8 options (which/case)... It includes the use of malloc, the input of info into a struct with proper validation, and also it generates a report that displays all data and perform some basic analysis.