[-] some@programming.dev 3 points 14 hours ago

Thanks! Searching for this led me to this extremely charming website where in addition to robust folding, the author argues in favor of proportional width fonts and tabstops (not spaces) in coding. Unconventional. It's nice to know someone who processes text in a similar way to me can be a successful programmer. Even if they had to write their own tools. https://tibleiz.net/code-browser/elastic-tabstops.html

[-] some@programming.dev 2 points 14 hours ago

It makes sense it's a Vim thing since it's used in kitty config. When I search for marker based folding as someone else said it's called above, almost everything I get is for Vim. It's always confused me why gui-based text editors seem to not have a lot of visually-based features like this compared to terminal-based editors. I guess it's harder to create a system for user customization in a GUI application.

At least Kate has some support. Now that I know what it's called I will look into what else is available there.

[-] some@programming.dev 1 points 14 hours ago

I am probably a bit over the top with this tbh. I put everything in functions, even single-use activities like declaring initial variables at the beginning. I just do it to enable the code folding. Even though everything I do is small time and I'm sure it's not excessively burdensome on the system, it seems wasteful to me to have the computer hold a the function in memory when it's never going to get used again. So I was thinking this might be more efficient in such cases.

22

I noticed that the developer of kitty terminal uses this style of comments I have rarely if ever seen elsewhere:

outside
#: section {{{
inside
#: }}}

Kate text editor recognize sections for purposes of highlighting, folding etc. It's really nice for me because I sometimes I have a difficult time navigating large text files. And it lets you nest them.

  • what is this called?
  • are there other ways to do it?
  • is it standard among text editors? I believe Kovid the dev for kitty is a vim guy so presumably there is support there also.
  • why don't more people use it? are there problems?

Screenshot that shows the code folding.

  • Cursor is at the end of line 7 so the whole section line 7-22 is highlighted
  • lines 12-16 are folded in a 3rd level comment
  • I also included tab indents just to make it easier to see what's going on (Kate treats it the same way regardless of indents)
  • Highlighting/Mode > Scripts > Bash

I also like his style of distinguishing between narrative comments (starting with #:) and commented-out code (starting with #). Although in my example, Kate doesn't treat them differently. Is there a term for this? Any conventions, support etc?

plain text used for screenshot


#: Comment level 1 {{{
	#: Comment level 2 {{{
		#: configure something
		key value
	#: }}}
	#: Another Comment level 2 {{{
		#: Comment level 3 {{{
			#: Helpful explanatory comment
			file location
		#: }}}
		#: Comment level 3 with hidden text {{{
			you_cant see_this
			hidden_emoji "๐Ÿ‘๏ธ"
			hidden_emoji2 " ๐Ÿ‘๏ธ"
			hidden_emoji3 "   ๐Ÿ‘๏ธ"
		#: }}}
		#: let's set some things up
		# setting yes
		# other_setting no
		different_setting maybe
	#: }}}
	# regular comment
#: }}}

# regular comment outside anything


For a real world example, see sample kitty.conf file provided on project website.

[-] some@programming.dev 2 points 3 months ago

I am not a big fan pf matrix but I think SchlidiChat was the one I used most successfully on android.

From what I have seen a main issue with Matrix is that the protocol can be implemented in bits and pieces. Which is perfectly fair but it leads to an inconsistent user experience. The default web clients you first use to try it out will be using strong encryption settings by default but then a lot of the mobile or native desktop clients don't support encryption. So it's difficult to get going finding cross platform apps that have all the desired functionality consistently between them.

In terms of the apps, I don't think comparing matrix to lemmy is exactly fair for this reason.

[-] some@programming.dev 3 points 3 months ago

Itโ€™s not really something developers want to think about very much so they often just use the default.

Do you think it was intentional ideological decision by the Rust developers or some other contributors/interests to make permissive the default? Or a random decision that has ended up being consequential because of the popularity of Rust?

I have noticed for a long time that github promotes MIT license. It lets you use any, of course, but puts a real positive shine on MIT. My perception is that this is a purposeful intervention by MS into FLOSS to promote MIT.

[-] some@programming.dev 2 points 3 months ago

I do not program. So maybe trying to understand all this is over my head. wikipedia describes

A static library or statically linked library contains functions and data that can be included in a consuming computer program at build-time such that the library does not need to be accessible in a separate file at run-time.

I thought that was the idea of binaries in general. In the Arch repos there are many packages appended with -bin. (The Arch repos also contain items of various licenses including proprietary.) Lots of FLOSS packages make a binary available by direct download from their website. Without too much detail, is there something special about Rust? Or maybe I misunderstand the concept of a binary release.

library code licensed under it must be able to be replaced.

Does this mean you need to be able to make a reproducible build? Or need to be able to swap code for something else? Wouldn't that inherently break a program?

[-] some@programming.dev 3 points 3 months ago

Yes you are correct I mis-used the term. I mean copyleft. So I fixed the post. :)

[-] some@programming.dev 7 points 3 months ago

soo you are saying people are tricked into it?

48
submitted 3 months ago* (last edited 3 months ago) by some@programming.dev to c/opensource@lemmy.ml

I often see Rust mentioned at the same time as MIT-type licenses.

Is it just a cultural thing that people who write Rust dislike ~~Libre~~ copyleft licenses? Or is it baked in to the language somehow?

Edit: It has been pointed out that I meant to say "copyleft", not "libre", so edited the title and body likewise.

[-] some@programming.dev 3 points 3 months ago

Over the years, forums did not really get smaller, so much as the rest of the internet just got bigger.

[-] some@programming.dev 10 points 3 months ago

There are so many niche forums.

Here's one I found a while ago when I was looking at repairing an old electric fan I found: Antique Fan Collector's Forum.

In the way that people would always add "reddit" to their searches, try just adding "forum".

[-] some@programming.dev 3 points 3 months ago

mumble is already the name of FLOSS voip software so they're probably better off with the existing name. Which I don't love on first glance but there's probably some rationale for it.

[-] some@programming.dev 2 points 3 months ago

thanks I was wondering about that but forgot to specifically ask :)

31
submitted 3 months ago by some@programming.dev to c/opensource@lemmy.ml

I'm a FLOSS/linux enthusiast. Over the years I have learned some scripting, and can get around in git. Occasionally I fork someone else's project to suit it to myself. Shell scripts, webapps, browser extensions etc. The kind of thing you can work in the source of without actual programming knowledge by just looking at text files.

Recently I modified a C program to have more legible/useful (to me) terminal output. I gave it a slightly different name and for compatibility have both versions running on my system. For my use-case it is a huge improvement over the original so I want to have it publicly available where I can install it from any system. And to share in case anyone else would enjoy it.

I don't think my changes would be appreciated by the original maintainer. For one thing, no changes have been made to the code in >10 years. The dev is still active so I guess the program is considered complete. For another, my changes are breaking and specifically disrupt the "linux philosophy" aspect of the program. I think having both version co-exist is the best way.

  • I don't want to confuse anyone who is trying to find the repo of the original program.
    • The original is hosted on github whereas I use codeberg; so the "forked from" relationship is not as clear as if I stayed on github
  • I ?do? want to update documentation such as README in the repo to describe my changes and relationship to the original
  • I ?do? want to update and --help/man in the terminal to reflect the fork's name and possibly clarify how it works
  • Should I make some sort of courtesy PR or repo issue offering my changes even though I think it would be (even should be) rejected/ignored? It seems kind of time wasting.
  • In the case where the original upstream was being updated, how do I integrate those with my changes? I've had some luck so far with doing my best to guess about the git process, I think using branch, sync, merge. But I couldn't tell you more than that. Any insight on how this is supposed to go? I have spent lots of time wading through git's documentation but still find the main ideas kind of confusing.
  • Anything else to consider?

Since I'm just dabbling, I try to stay away from more complicated workflows, or those which require specific system set up, when possible. My experience is that when I come back to it in a few months, a year or two years, I will have forgotten a lot; it might be a different system environment. I need to be able to re-learn everything at a later time. Simple solutions that are widely-compatible, and do not rely on my memory are preferred.

I don't mind doing a bit more work than is strictly required to learn about the FLOSS process. I've done it a few times before and it is useful to me to understand things.

view more: next โ€บ

some

joined 4 months ago