dharmik

@dharmik@linuxusers.in

mostly computers. student. linux. python. lisp.
bloghttps://dhrm1k.github.io
codeshit(lately)https://git.sr.ht/~dharmik/
codehttps://github.com/dhrm1k
matrix@spiderham:matrix.org
📌 0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

to reach me out,

- mail at dharmiik [at] proton [dot] me
- i occasionally post in long-form at: https://dhrm1k.github.io

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

happy diwali to those who celebrate.

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

to celebrate i am watching the batman trilogy.

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

TIL sublime has a package called vintage mode giving vi mode. ooh, why didn't i find it before.

https://www.sublimetext.com/docs/vintage.html

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

going to a particular line doesn't work by just :<line-number> but rather ctrl+G<line-number>. the latter is a functionality of sublime text and not the vintage package.

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

50₹ on my zomato order is GST. I want to leave this country asap.

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

I don’t know the exact number but the collective sum of the GST i would be paying in an entire year will be a good.

Otyugh »
@Otyugh@xn--4pv.arzinfo.eu.org

@grunfink@comam.es few suggestions as user of snac if you ever struggle for ideas :
* add the option to have threads closed instead of open as default (too much scrolling through each time !)
* add the option to only see the new threads of people you follow instead of the whole threads where they participated (default in mastodon) ; has the advantage to limit a lot the nuisance of hellthreads
* add the option to hide the "block" notification (I feel like it's less hurtful not to know when it happens, mobs use it as taunting strategy and it works so well I can't deny it T_T)
* allow to load a custom number of entries in the timeline (could be a get parameter ?entry=200 to get one page with 200 entries) - or to load a certain timestamp of entry like ?t=60 to load all entries sent 60min ago ?
* add a
or any kind of marker to where you last loaded (so as to know what you already read). (wat, html is interpreted literally :O)
* add a liberapay account with a Stripe account so people without credit card like me can give money more easily.

...
Older...

The Real Grunfink »
@grunfink@comam.es

Thank you very much for your suggestions. The first one (collapsed threads by default) has been already implemented, and will be part of the next stable release.

firefly »
@firefly@neon.nightbulb.net

@grunfink@comam.es

I concur with options 1 and 2. Reason: would enable vertical masonry layouts with flex or grid so that 3-6 colums of posts can be displayed, depending on screen size, vastly improving the scroll-through experience. See here for the direction I'm hinting at: https://neon.nightbulb.net/firefly?skip=33&show=33 ... and if you scroll a bit you'll see what I mean.

If the block content could be collapsed or truncated to certain length by default with a ... more ... link, one could quickly buzz through a weeks worth of posts.

The nice thing is that flexbox allows using calc to adjust the height of each cell so that vertical height of elements can vary and will get gaps smushed together with that uneven block size vertical masonry look.

Also, it would allow cool horizontal scroll arrangements using anchor tags to swipe. I remember many years ago how some websites were designed to scroll horiontally with buttons and links anchoring to sections. Maybe some expert theme designer would have fun cooking up a new rendition of that method ...

The Real Grunfink »
@grunfink@comam.es

add the option to hide the "block" notification (I feel like it's less hurtful not to know when it happens, mobs use it as taunting strategy and it works so well I can't deny it T_T)
Also, knowing about this makes me very sad; I had no idea this was a thing. In fact, being notified about blocks is very recent, just a few versions away. This is another example of how social networks are easily turned into toxic behaviour.

I'll add this option ASAP.

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

when i am boosting a post, i don't want to see threads by default. that's part of the plan?

CC: @grunfink@comam.es

Ворон »
@voron@snac.nya.pub

A new three-column theme for , called Pika.

Download

@grunfink@comam.es

...
Older...

The Real Grunfink »
@grunfink@comam.es

Oh my, this looks totally fantastic.

Thank you so much for making look cool.

1 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

just applied it. looks cool.

CC: @grunfink@comam.es

dharmik boosted

Julia Evans »
@b0rk@social.jvns.ca

quitting in the terminal

panel 1: quitting a terminal program isn't always easy

person (thinking): "I pressed Ctrl-C 17 times and NOTHING HAPPENED"

panel 2: ways to quit

Ctrl-C - the default
Ctrl-D - if you're at a prompt in a REPL >>>
q  - if it's a full screen program
Ctrl-\ - sometimes works if Ctrl-C doesn't
kill -9 - the last resort

panel 3: how Ctrl-D works

programs that read input will usually have some code like this:

text = read_line()
if (text == EOF) {
    exit()
}

Ctrl-D is how you send an EOF to the program ("I'm done!")



important: Ctrl-D ONLY works if you press it on an empty line

panel 4: how Ctrl-C works *

* unless your program is in "raw mode", we'll talk about that later

person: "ctrl-C"

terminal emulator: "ok, C is the 3rd letter of the alphabet, I'll write 3 to the tty"

OS terminal driver: ah, a 3, that means I should send the SIGINT signal to the current program

program: ooh, a SIGINT, I will [shutdown gracefully, immediately exit, ignore it, stop a subtask, etc]

* unless your program is in "raw mode", we'll talk about that later

panel 5: some programs have weird quitting incantations

for example every text editor (vim, nano, emacs, etc) has its own completely unique way to quit

Alt...panel 1: quitting a terminal program isn't always easy person (thinking): "I pressed Ctrl-C 17 times and NOTHING HAPPENED" panel 2: ways to quit Ctrl-C - the default Ctrl-D - if you're at a prompt in a REPL >>> q - if it's a full screen program Ctrl-\ - sometimes works if Ctrl-C doesn't kill -9 - the last resort panel 3: how Ctrl-D works programs that read input will usually have some code like this: text = read_line() if (text == EOF) { exit() } Ctrl-D is how you send an EOF to the program ("I'm done!") important: Ctrl-D ONLY works if you press it on an empty line panel 4: how Ctrl-C works * * unless your program is in "raw mode", we'll talk about that later person: "ctrl-C" terminal emulator: "ok, C is the 3rd letter of the alphabet, I'll write 3 to the tty" OS terminal driver: ah, a 3, that means I should send the SIGINT signal to the current program program: ooh, a SIGINT, I will [shutdown gracefully, immediately exit, ignore it, stop a subtask, etc] * unless your program is in "raw mode", we'll talk about that later panel 5: some programs have weird quitting incantations for example every text editor (vim, nano, emacs, etc) has its own completely unique way to quit

...
Older...

Just van den Broecke »
@justb4@mapstodon.space

@b0rk and sometimes Ctrl-G helps if you find yourself stuck within Emacs...

Fabian ¯\_(ツ)_/¯ »
@BafDyce@chaos.social

@b0rk This obviously means that we need an editor which follows the standard and uses q as the quit key, since its a fullscreen application.

uzayran »
@uzayran@cyberplace.social

@b0rk @bagder though a very special yet common case, ENTER~. (enter tilde period) has proven a very useful sequence to exit hung SSH sessions

Anatol »
@dngrs@chaos.social

@b0rk TIL about the C→3→SIGINT mapping!

...

Zack Weinberg »
@zwol@hackers.town

@dngrs @b0rk A tiny technical caveat: control-C sends a byte with value 0x03 on purpose; this is designed into ASCII; the control key maps A through Z to control codes 1 through 26 in alphabetical order; yes, this is why control-[ is another way to type the ESC key.

But the "character code 0x03 means send SIGINT" rule is adjustable (with the `stty` command) and SIGINT itself is usually *not* signal number 3 (there's no official rule for which signals have which numbers, but SIGINT is almost always number 2).

...

dandels »
@dandels@infosec.exchange

@zwol @dngrs @b0rk I'd like to link this [1] here since it does a great job of explaining the relation between keys and codes, for whomever is curious about this. (It also claims that Ctrl+C has no relation to ETX which would explain why SIGINT isn't signal number 3)

[1] catb.org/~esr/faqs/things-ever

...

Zack Weinberg »
@zwol@hackers.town

@dandels @dngrs @b0rk ugh, please don't ever link people to references written by Eric Raymond. They are consistently only about 2/3 accurate, plus 1/3 *egregiously wrong*, with the wrong bits tangled up with the accurate bits so thoroughly that it's hopeless to try to sort them out

...

Julia Evans »
@b0rk@social.jvns.ca

@zwol do you know of any accurate reference? one thing I noticed with that one is that (on my machine) Ctrl+H is not backspace but it wasn't obvious why not, since I think I've been on other machines where Ctrl+H was backspace

...

Zack Weinberg »
@zwol@hackers.town

@b0rk Unfortunately, not for the stuff covered by that one. I have occasionally been tempted to write my own version but it would be so much tedious fact-checking that I probably won't ever do it unless someone wants to pay me to do it.

The backspace key nowadays almost always sends ^? to the software running in the terminal (ASCII DEL, 0x7F). However, a long time ago (I remember this being a Thing in the 1990s), depending on which terminal (emulator) you had and how it was connected to the computer (actual serial line, ssh, rlogin, telnet, local pseudoterminal pair, etc) there was a good chance backspace would send ^H (ASCII BS, 0x08) instead. I never knew how to predict which I'd get.

(On terminals that used ^H for backspace, the delete key, if there was one, would usually send ^?. Nowadays, with ^? being used for backspace, the delete key sends ESC [ 3 ~ instead (no spaces).)

...

Julia Evans »
@b0rk@social.jvns.ca

@zwol i started trying to make my own this morning but it's really a mess and has a million mistakes, and who handles what seems to depend on so many things (raw vs cooked, stty, probably more)

Samuel »
@samuel@social.meenzen.net

@b0rk I love how simple this is. Perfect explanation.

Jérôme Mainaud »
@jxerome@framapiaf.org

@b0rk I recently met someone who used Ctrl-q instead of q to quit full screen program. It seemed natural for him, and I can't blame him for this. But he piled up a list of stopped processes in his session. 😞

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

working on cool things.

1 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

now i also want to set up my own homelab. maybe not now, but certainly someday when i have more savings.

https://computer.rip/2023-02-13-my-homelab.html

...

Golumolu »
@Golumolu@mastodon.social

@dharmik Ahhann, intresting thing😃

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

dharmik boosted

the strongest bocchi (evil) »
@FloatingGhost@ihatebeinga.live

1 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

working on a platformer game using pygame.

...
0 ★ 1 ↺
Tech Cyborg boosted

dharmik »
@dharmik@linuxusers.in

learning how to use docstring to test a function.

...
1 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

i am planning to wake up early morning tomorrow (well, depends on what i work on later though) and start jogging.

...

Golumolu »
@Golumolu@mastodon.social

@dharmik great buddy. Jogging karo par itna nai ki had pinjar bahar kudke aa jaye lol.But nice decision ✨🤩

ZogG »
@0xZogG@hachyderm.io

As I have some free time, which one of those I should try out: , or ? And why?

...

mocom »
@mocom@mastodon.social

@0xZogG Zig because your username is Zog. That is all.

...
1 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

any beginner friendly resources for zig you'd like to point out? i am new to the systems programming language thingy.

CC: @0xZogG@hachyderm.io

...

mocom »
@mocom@mastodon.social

@dharmik @0xZogG People seem to enjoy ziglings.org/

And hop on ziggit.dev/ for community

But brace yourself, simple things will feel unnecessarily complicated because doesn't hide implementation details of memory management like most other systems. If you get over that part, you will appreciate what you've learned and can apply it anywhere

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

didn't know winget is installed by default on windows 11. cool.

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

i am trying to install on my machine and it's been extracting the archive since the past 25 mins.

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

from the time it took, i didn't expect it to succeed.

i'd love to know if it takes this much time usually or there's something wrong with my internet connection or my machine config!

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

there's no debian package or wsl would have been my choice. one of the other piece of software that doesn't have a debian package is raylib. i need to understand that.

...

mocom »
@mocom@mastodon.social

@dharmik I use zig on Debian with wsl no problems, and extract doesn't take that long. My guess is your windows anti-virus is checking every file. You can configure it to ignore your dev directories if you like.

dharmik boosted

λzyd »
@zyd@sup.zyd.lol

I've been using Linux since I was 13 (I'm 27 now) and I still don't know how to use top(1).

...

λzyd »
@zyd@sup.zyd.lol

The manual for top starts off by saying:

When operating top, the two most important keys are the help (h or ?) key and quit (q) key. Alternatively, you could simply use the traditional interrupt key (^C) when you're done.

They are clearly aware that the primary usage of top is accidental (you quit and install htop instead).

...
λzyd boosted

spnw »
@spnw@gts.plexwave.org

@zyd I never use htop, because top is there. No, I don't know how to use top either.

visuwesh »
@viz@mastinsaan.in

@zyd how do you use htop anyway? Since the only thing that made a difference was the bars for mem and CPU usage at the top in htop, I've been using top since they're both inscrutable.
[ The units of mem usage can be changed in top so even less reason to install htop, as o learnt yesterday. ]

Nowadays I mostly use proced since searching for a process isn't a PITA.

...

λzyd »
@zyd@sup.zyd.lol

@viz I largely use M-x proced as well. On remote servers I use htop. Its much easier than top: press F6 and choose your sorting method. How I primarily use it.

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

upgraded my instance to 2.61.

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

@knt@streams.knthost.com after the upgrade i have two dirs in apps. snac-data and snac-data.2.60. is it how it should be?

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

i love to play games let it be mobile or web. i am sucker of good games, but i come from those who won’t buy extra hardware to play games.

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

i surely think there will be many like me. i have spent my high school playing platformers on cartoon-network dot com. i want those good games back.

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

i know pygame. let me try to build a platformer that reminisces memories of those good old days.

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

learning that not all processes can run concurrently. some are meant to terminate.

0 ★ 1 ↺
dharmik boosted

dharmik »
@dharmik@linuxusers.in

🥪

0 ★ 1 ↺
dharmik boosted

dharmik »
@dharmik@linuxusers.in

it’s 2024 and development for ios is still locked in inside the apple ecosystem. how are we ok with it?

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

posting from the mona mobile app.

dharmik boosted

dharmik »
@dharmik@fosstodon.org

client for posting from my instance?

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

wooh, wait, wut is this device. this is the holy grail.

https://flipperzero.one/

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

for anyone else hosting a instance like i am, here’s more information about formatting text on your instance:

https://manpages.debian.org/testing/snac2/snac.5.en.html

1 ★ 1 ↺
dharmik boosted

dharmik »
@dharmik@linuxusers.in

to copy text from your vim clipboard to your local machine clipboard, try "+y after selecting the text with visual.

📌 0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

to reach me out,

- mail at dharmiik [at] proton [dot] me
- i occasionally post in long-form at: https://dhrm1k.github.io

1 ★ 1 ↺
Tech Cyborg boosted

dharmik »
@dharmik@linuxusers.in

welcome to my instance. it feels amazing to ssh and change things with vim! the thrill of getting everything up and running—absolutely priceless! to answer the question, why did i host my own instance? because i hate rules set up by already existing instances, irrespective of whether or not i break them.

1 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

i paid 100₹ tax (GST) on buying this domain. let that sink in.

3 ★ 5 ↺

dharmik »
@dharmik@linuxusers.in

hello world!

History