dharmik

@dharmik@linuxusers.in

admin @ linuxusers.in
student. mostly computers.

matrix@spiderham:matrix.org
codeshithttps://github.com/dhrm1k
bloghttps://dhrm1k.github.io

46 following 17 followers

📌 0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

📌 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

day-1 problem-1 of advent of code conquered 🎉. now i have digital electronics exams to conquer (or to battle at least, i don't know if i will be able to conquer it.)

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

i wanted to use C/Zig, but when i saw the question, all i could think was python. i'd try later to do it in C as well.

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

I just completed "Historian Hysteria" - Day 1 - Advent of Code 2024 https://adventofcode.com/2024/day/1

dharmik boosted

🟨 »
@radhitya@fedi.radhitya.org

All you need are #python and #c

...
1 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

when i was in primary school, 'decimal' meant numbers like 4.5643. now, in programming, a 'decimal integer' just means a whole number in base 10. the definitions didn’t change—i just stepped into a world where words multitask.

screenshot from c programming language manual.

Alt...screenshot from c programming language manual.

...

screwlisp »
@screwtape@mastodon.sdf.org

@dharmik yeah, people in school are often confused about this. Decimal refering to a number being in base ten cf octal being in base 8, not in having a decimal point. Obviously the natural base being octal

...

screwlisp »
@screwtape@mastodon.sdf.org

@dharmik though I'm now wondering how straight I can keep my face while saying octalion point

das-g »
@das_g@chaos.social

@dharmik Abbreviations often lead to confusion, especially when one isn't even aware something was abbreviated. The use of "decimal" in primary school was just short for "decimal fraction". See en.wikipedia.org/wiki/Decimal & en.wikipedia.org/wiki/Decimal#

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

all set for advent of code 2024. we are going to make it. 🚀 what are you doing?

dharmik boosted

Andrew Kelley »
@andrewrk@mastodon.social

If you are planning to learn Zig via Advent of Code this year, I highly recommend the tips from @kristoff 's blog post:

kristoff.it/blog/advent-of-cod

0 ★ 1 ↺
dharmik boosted

admin »
@admin@linuxusers.in

the instance homepage at https://linuxusers.in/ looks very pretty now.

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

this is a great list. looking forward to exploring it.

https://100r.co/site/resources.html

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

found it on @thedaemon@bsd.network 's homepage: http://thedaemon.space/links.html . check it out as well.

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

review of cloud gaming services by @solene@bsd.network

https://dataswamp.org/~solene/2024-07-13-cloud-gaming-xbox-luna.html

the current state of cloud gaming isn’t quite where i’d like it to be. as games become increasingly resource-intensive and accessible primarily to those with powerful hardware, i hope to see a future where games are truly available to everyone.

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

what's the first thing to do when you get a new idea? and yes the correct answer is buying a new domain.

Joe Brockmeier (@jzb) »
@jzb@mastodon.social

Pondering a move to a different instance or perhaps even self-hosting* — for folks who’ve migrated, how’s that gone for you, which host(s) would you recommend, and any tips?

*via Masto.host or similar.

...

Michael Lucas »
@mwl@io.mwl.io

@jzb

Been self-hosting for years now, through spacebear.

A firm prerequisite: friendly admins you respect, who are willing to share their blocklists with you. I don't want alt-right trolls, 4chan, etc, so I imported those lists before I even started posting. They'll also keep you updated on new problem instances.

Other than that, I recommend it.

The fedi is unique in that we can keep the social network we build--so long as we don't trash it ourselves.

1 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

try . i use it. it's a lightweight and minimal activitypub instance written in C.

https://codeberg.org/grunfink/snac2

dharmik boosted

DJ Sundog »
@djsundog@toot-lab.reclaim.technology

just read an article about some terminal emulator called warp that was headlined as great for power users.

It's in rust, the article tells me. Good power user start.

Then the article tells about all the helpful AI and subscription features.

Now convinced the author has never actually met a terminal power user.

...

Digital Mark λ ☕️ 🕹 🙄 »
@mdhughes@appdot.net

@djsundog I'm still mad and looking for a replacement for iTerm2 because of the AI fiasco. The author put the AI shit in a plugin which is not preinstalled, but I no longer trust him long-term.

But every other term I try is lame. Nobody else has "move/select to last prompt", nobody has automatic dir actions/themes, which I use a *lot*. cd CodeBasic and I get a black-white terminal with Atari font (since it'll probably do some ANSI), but CodeScheme can be reddish with code ligature font.

...

Digital Mark λ ☕️ 🕹 🙄 »
@mdhughes@appdot.net

@djsundog And then 90% of techie terminals only have settings in a 5000-line JSON file you edit by hand. Can you NOT‽

I don't want flashy graphics. I like iTerm2's pixel art thing, I use imgls sometimes instead of Finder. But like, fast rendering of text and right-clicking URLs is about all I *have* to have.

It reminds me a lot of Linux window managers. Enlightenment was fun but so stupid in use. Good WM/DE are clean and programmable, but that's not sexy for screenshots.

...

Digital Mark λ ☕️ 🕹 🙄 »
@mdhughes@appdot.net

@djsundog WTAF I'm having '90s enterprise software flashbacks. Does Oracle publish this‽

Find a plan to fit your team
Free $0 Up to 100 AI, 3 Notebooks, 10 Workflows
Pro $15/user/mo
Team $22/user/mo
Enterprise Custom pricing

Alt...Find a plan to fit your team Free $0 Up to 100 AI, 3 Notebooks, 10 Workflows Pro $15/user/mo Team $22/user/mo Enterprise Custom pricing

...
2 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

subscription for a terminal?? who on earth are his users???? "power users???"

CC: @djsundog@toot-lab.reclaim.technology

...

Digital Mark λ ☕️ 🕹 🙄 »
@mdhughes@appdot.net

@dharmik @djsundog It's got "A.I." inside®! It's burning down a rain forest for every git command you autocomplete!

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

i have wsl2 installed, but have never tried installing linux gui apps. tried to install gnome but i get a weird session bus error.

(gnome-text-editor:956): Gtk-WARNING **: 18:03:25.241: Unable to acquire session bus: Failed to execute child process “dbus-launch” (No such file or directory)

https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps#install-gnome-text-editor

...

Drew »
@crmsnbleyd@hachyderm.io

@dharmik sudo apt install dbus-x11 ?

...
1 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

in the process, i installed it, but still got the same error.

after your reply, i installed it again and then,

GTK_A11Y=none gnome-text-editor.

voila, now it works.

picture of gnome text editor on wsl2.

Alt...picture of gnome text editor on wsl2.

notptr »
@notptr@mastodon.sdf.org

@dharmik i don't have access to wsl anymore.

In wsl2 with it being the most updated I was able to use firefox and gui emacs.

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

went to saladific for the first time. it’s much better than i had expected. their veggie garden sub is cheaper and better than what subway offers.

Brian »
@brianb@fosstodon.org

Spent more time last night writing tests for my project. I need to do some reading on how to write tests for wrapper functions. I also have a couple routes that were really difficult to write tests for, which probably means they need to be refactored somewhat.

That's said, nearly everything is covered now. I'll poke at those last two spots, but I think it's time to move on to adding some charts/graphs into the admin panel for comparing data between class sections.

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

what are you building?

...

Brian »
@brianb@fosstodon.org

@dharmik it's a feedback/performance tracker for my chemistry students. Each assignment is linked to a skill and they have to show growth & proficiency on that skill. They have a dashboard showing everything we've done this year and which skills they still need to show they can do.

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

one of the most important things about starting a business in any sector is knowing how things work. for example, i could never do what shopify does, even if i focused only on one country like india. i don’t really know what a store owner needs or what i, as a developer, would have to figure out to help someone sell on multiple channels like amazon, ebay, and more. and even if i somehow figured it out, there’s no way i’d be able to do it in a way that actually works out well for the owner.

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

to start anything, i need to be well-experienced with it myself. now i get paul graham's quote: "make things that you need." there's no point in doing it if i don't understand the loopholes or delicacies of the thing.

1 ★ 2 ↺

dharmik »
@dharmik@linuxusers.in

do any of you own e-reader that is not kindle or kobo?

...

Stefan Böhringer »
@datenschauer@mastodon.social

@dharmik I own a Boox Note Air 3 (there‘s also a „C“-/color Version) for a year now. It’s absolutely fabulous! But much much more than „just“ an ereader. 🤗

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

@datenschauer@mastodon.social ah, that is a good one. I am looking for the cheapest kindle, but that too is available on amazon.in and doesn’t ship to india. :( all other options are too expensive.

4 ★ 4 ↺

dharmik »
@dharmik@linuxusers.in

TIL how to use $(command) to capture the output of one command and use it in another!

you can get the date as folder name (in format month abbreviate-date-year) with

mkdir "$(date +"%b%d%Y")"

- $(...) is used to execute the date command and substitute its output.

...
dharmik boosted

screwlisp »
@screwtape@mastodon.sdf.org

@dharmik
In the spirit of sharing
CL-USER>
(ensure-directories-exist
(format nil "~[mon~;tue~;wed~;thu~;fri~;sat~;sun~]/"
(nth-value 6 (get-decoded-time))))
"thu/"
T
CL-USER> (probe-file "thu/")
"/home/screwtape/thu/"

tl;dr a lisp form to create an abbreviated current-day-of-the-week-shortname directory by decoding the current universal-time.

...
1 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

In the spirit of sharing

the spirit of sharing is always appreciated. :)

dharmik boosted

Reid »
@Reiddragon@fedi.reimu.info

@dharmik fun fact: you can also use <(command) to take the output of command and feed it as a file argument to another command

eg. vimdiff <(command1) <(command2) (for all vim cares, those are read-only files passed as arguments)

...

Mikoto 98 SE »
@mikoto@akko.wtf

@Reiddragon @dharmik combined with tee, you could make a complex pipe network in bash

...

Reid »
@Reiddragon@fedi.reimu.info

@mikoto @dharmik shell + tee isn’t exactly my first choice for fancy pipes (anything fancier than a straight line), but yeah, you can absolutely do that

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

i saw a product that says it uses AI to do text-to-video. i have no idea, what they mean. it could easily be done with FFmpeg.

Ian Douglas Scott »
@ids1024@fosstodon.org

A safe neighborhood is one where kids can walk to school without being killed by heavy machinery.

...
1 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

completely 💯. i read this article long ago saying the same: a safe neighborhood is one where you don’t have to worry about where your kids are playing.

dharmik boosted

luna, only carbon now »
@luna@pony.social

A lot of people don’t know this one weird trick — much like JavaScript, C also lets you perform arithmetic with mixed types:

Screenshot of a terminal showing a simple C program and its output.
The code prints the result of the expression `"-0.5" + 1`
The displayed output is 0.5

Alt...Screenshot of a terminal showing a simple C program and its output. The code prints the result of the expression `"-0.5" + 1` The displayed output is 0.5

1 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

I have my exam tomorrow, and I can't stop myself from watching "The Physics of Light and Rendering - A Talk by John Carmack"

0 ★ 0 ↺

dhanashree »
@dhanashree@linuxusers.in

Can you see it?

...
dharmik boosted

Tomáš »
@prahou@merveilles.town

starter pack

unix_surrealist starter pack

Fuck Computers, stanley lieber
book of C
Bell System
100% mothra-compatible
hackers.town cyber mantis
intelcore2duo
uxn
export TERM=vt220
ALL LLMS ARE BASTARDS
irc
greetings from RIO postcard, qrstuv
OpenBSD
snac - a simple minimalistic activitypub instance
9front
techno-mage
Nadja, Andre Breton
cat -v
links2 browser
plain text
RFC1436
book of kornshell

Alt...unix_surrealist starter pack Fuck Computers, stanley lieber book of C Bell System 100% mothra-compatible hackers.town cyber mantis intelcore2duo uxn export TERM=vt220 ALL LLMS ARE BASTARDS irc greetings from RIO postcard, qrstuv OpenBSD snac - a simple minimalistic activitypub instance 9front techno-mage Nadja, Andre Breton cat -v links2 browser plain text RFC1436 book of kornshell

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

in case you didn't know, textfiles.com is a goldmine of early internet culture: bbs lists, hacker zines, ascii art, old-school humor, and more. dive into the wild, text-based world of the '80s and '90s! 📜✨

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

in a world where i hadn’t found out about snac, i was ready to create a way for everyone to host their personal txt file and build a social network around it. something like twtxt but more focused on my friends and regular people who could use it easily.

2 ★ 3 ↺

dharmik »
@dharmik@linuxusers.in

using list comprehension and ternary operator to print even numbers from 1 to 10. 🤯

[print(x) for x in range(1, 11) if x % 2 == 0]

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

i had no idea list comprehension existed,

thisislist = ["apple", "banana", "cherry", "kiwi", "mango"]

new_list = [i for i in thisislist if "a" in i]

print(new_list)


...

Drew »
@crmsnbleyd@hachyderm.io

@dharmik welcome to one of the funnest part of python

...

Drew »
@crmsnbleyd@hachyderm.io

@dharmik there's set and dict comprehensions as well

arialdo »
@arialdo@mastodon.online

@dharmik wait to realize that list comprehensions are syntactic sugar for monads…

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

@arialdo@mastodon.online the aha moment.

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

i found this fascinating txt file from 1990 titled "my favourite unix commands". it's a captivating read for anyone interested in unix history and hacking culture!

it is possible to create files which simply cannot be deleted
from the standard shell. to do this, you will have to physically
create the file using a c program or script file, and you will
have to use a sequence of control characters which cannot be
typed from the shell.

dharmik boosted

mhd »
@mhd@tilde.zone

I sometimes see people trying to do everything in a terminal for a while, either for anti-distraction issues or for retro-/"perma"-computing reasons.

These days I wonder whether it would be interesting to not completely focus on the terminal, but do everything you do in there just with VT100 capabilities (or hook up a real one, if you got one).

I bet for some developers it would be much harder to do the things they already do in the terminal without colors and emojis than just fit in a few things they usually do with webapps.

...

Digital Mark λ ☕️ 🕹 🙄 »
@mdhughes@appdot.net

@mhd VT100 has color, or depending on the specific terminal at least underline, bold, dim, blink. Box drawing chars go back 40+ years. The majority of what I do can be done there, and I know that because I often work on server stuff on a headless FreeBSD server. My Vim setup is all terminal-friendly.

But since I make GUI front ends usually, I eventually do need to get off the terminal.

dharmik boosted

arialdo »
@arialdo@mastodon.online

When we read books, in real life, we turn pages. Indeed, scrolling book would be so inconvenient, most likely a miserable experience.

Why we do scroll so much when we read on PC screens is a mystery to me.

We also scroll like there's no tomorrow when we code.

and get this right (respectively with `C-l (recenter-top-bottom)` and `zz`, `zt`, `zb`)

0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

i’m a sucker for good cashback deals wherever i can get them. i mean, why not? i’m a student, and i spend good, so a little savings here and there won’t hurt. i tried this new upi app called super.money and got ₹5 cashback on a ₹110 spend on tea and snacks.

...
2 ★ 0 ↺

rahul »
@rahul@linuxusers.in

i spend good, so a little savings
the best way to save would be to not spend 😄

dharmik boosted

Em »
@Em0nM4stodon@infosec.exchange

To everyone when they see horrible privacy news about Microsoft replying with:

"I don't care, I use Linux"

Sure, you do. But does your medical clinic do? Does your therapist do? Does your family member typing a personal email to you in Word before sending it do too?

This is a systemic problem.

You cannot protect your own data only by using Linux yourself. You must also demand stronger regulations and enforcement to obligate organizations around to protect your data as well.

12 ★ 5 ↺

dharmik »
@dharmik@linuxusers.in

linux is freedom. no ads, no tracking, just your computer doing what you want it to do. it’s not just for developers—anyone can try it. pick a distro, dive in, and see how it feels. .

...

Tertle950 »
@Tertle950@mastodon.social

@dharmik Ubuntu doesn't count, as per usual

...

Prem Kumar Aparanji 👶🤖🐘 »
@prem_k@mastodon.social

@dharmik except for the "no ads, no tracking" rest of your post sounds exactly like what we used to say in 2004. After Ubuntu launched. 😊

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

you seem to be have been in it for a long time... would love to hear you more.

...

Prem Kumar Aparanji 👶🤖🐘 »
@prem_k@mastodon.social

@dharmik roughly since '97/98 ... Back when lugs were a thing.

...
0 ★ 0 ↺

dharmik »
@dharmik@linuxusers.in

that must be good times. you been in india all this time?

...

Prem Kumar Aparanji 👶🤖🐘 »
@prem_k@mastodon.social

@dharmik mostly, yes ... Except for ~2-3 years in total over the decades

17 ★ 10 ↺

dharmik »
@dharmik@linuxusers.in

the reason i encourage people to use linux is because it teaches you to tinker. you do not have to settle for what you are given. you learn, explore, and make things your own. that is the idea.

...
dharmik boosted

Prem Kumar Aparanji 👶🤖🐘 »
@prem_k@mastodon.social

@dharmik right to tinker needs to be inalienable ...

History

Back to top - More...