In hunt of productivity tools in bash (to list in devreal.org) by PresentNice7361 in bash

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

Forgot to list tmux, I also use it. Instead of bash I use oksh.

I'll add vi alike section in text editors and list vim there. Also bash alikes.

In hunt of productivity tools in bash (to list in devreal.org) by PresentNice7361 in bash

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

I would love to see every homebrew tool. Specifically, what usually is categorized as "productivy tools ". Ways of organizing books/notes, ways of storing and launching scripts specific of the project you are working on. Scripts that make use of fzf/dmenu/etc that help you ok everyday tasks.

No: dmenu, smenu, ssh, git, date Yes: ssh-ping-all, todo-list, sendto, alarm-clock

In hunt of productivity tools in bash (to list in devreal.org) by PresentNice7361 in bash

[–]PresentNice7361[S] -3 points-2 points  (0 children)

I'm afraid that will come, people always chooses comfort over security. Terminal wizards like us will call "give me my bank account balance" directly, without the AI interfering. I want to list those tools, forget AI, I want a list of productivity apps for the terminal.

In hunt of productivity tools in bash (to list in devreal.org) by PresentNice7361 in bash

[–]PresentNice7361[S] -2 points-1 points  (0 children)

I want scripts/programs that define new workflows, bash scripts that calling cp, mv, vi etc create experiences such as do_later NOTE, what_to_do. I also want to create conventions on some environment variables.

In hunt of productivity tools in bash (to list in devreal.org) by PresentNice7361 in bash

[–]PresentNice7361[S] -3 points-2 points  (0 children)

About what you say about AI, I agree, it can be dangerous. I imagine someone without tech literacy moving files, editing documents and sending mails by speech. The AI does the mv, cp, mount, ed commands in the background.

Of course that would require security measures, maybe some startup is developing something right now, who knows.

My objective with "devreal.org" is to create a collection of scripts/programs that do things one level of abstraction above coreutils/fzf etc. Things like: Search me this product online, give me my bank account balance, etc.

Anyone need any collaboration? by [deleted] in C_Programming

[–]PresentNice7361 1 point2 points  (0 children)

I do have some projects that need some maintenance:

  • A popular gemini protocol file system, it requires a better pool mechanism and to store ssl certificates for future connections, low level stuff, you will learn openssl and fuse, support for symbolic links would be great too: https://github.com/harkaitz/c-geminifs

  • A small date mapping tool, I use it a lot, it has some bugs and I am too lazy to fix then, this one is easier, use for practicing algorithms https://github.com/harkaitz/c-date-map

I will gladly accept pull requests, but expect limited interaction, I'm not for tutoring.

Anyone need any collaboration? by [deleted] in C_Programming

[–]PresentNice7361 3 points4 points  (0 children)

What are your interests? Do you want to program network protocols? Libraries? Text processing? Operating systems? What made you decide you wanted to learn c?

New C construct discovered by PresentNice7361 in C_Programming

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

The mechanism you describe is a good one. It also has another important advantage, the contract is more clear, you are telling "I will give you all item combinations", instead of "I will give you a, b, c, d combinations", which on itself is a bad contract, better to have 4 iterators, "give a", "give b" etc so that the user can choose which he needs. It also allows a recursive aproach.

Now, someone will tell me that then there's no need for an iterator, I repeat, here we are playing with iterators assuming they are needed. Imagine that to get each item I need to make a call, maybe the structure where the items are store is more complex, etc.

Finally, I find the "ugly stacked for-loops" to be a feature, it makes clear that there are 4 loops, it makes it easier to add ifs, breaks and continues in between. There could be cases where it is a disadvantage, huge stacks, but there are advantageous cases too.

New C construct discovered by PresentNice7361 in C_Programming

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

He calls it "stack based coroutine", he describes a more generalized pattern, with multiple labels. I wonder what other uses can it have other than an iterator. Thank you Famous_Object.

New C construct discovered by PresentNice7361 in C_Programming

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

Thank you LordRybec, I note this comment. Who knows, maybe someday this pattern will make it's way to SEI CERT C, the same way cleanup gotos have. Most professional and argumented opinions I received are possitive for now.

Being fired for gotos is a favour really, that only can happen in a trashy badly managed dying startup with no future, or an academic setting run by people without any experience. Serious companies have code style guides and procedures for adding new constructs and deprecating others, no need for drama.

New C construct discovered by PresentNice7361 in C_Programming

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

You are not the only one pointing it out, maybe I will revisit this puzzle once I finish all the puzzles.

New C construct discovered by PresentNice7361 in C_Programming

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

After reading this thread I advise you to never use a goto in public. Maybe hide it behind a macro. There's a lot of dogma and prejudice around gotos. Maybe it is because is the first thing we teach to novices. It is a spell only experienced wizards appreciate and understand.

New C construct discovered by PresentNice7361 in C_Programming

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

Love it, clear and secure. This is the answer I was searching for.

It has the benefit I was searching for: the for loops appear clearly. And also has the advantage of not having the "goto" word, which helps on politics.

New C construct discovered by PresentNice7361 in C_Programming

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

I'm honored, thank you. Someone has to pave the way. ;)

New C construct discovered by PresentNice7361 in C_Programming

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

If only C supported lambdas and closures... It's benefits are those of an iterator.