[ prog / sol / mona ]

prog


Getting into programming with Emacs

1 2021-02-25 01:08

Hi anons, I'm diving down that digital cypherpunk rabbithole and I find that in this day and age, not knowing how to program is starting to get to me. I wrote an SQL injector from scratch in Python when I was in high school a few years ago and the only difficulty I faced in that really was just not knowing the syntax. I find that I can break complex tasks down into their basic components and abstract quite easily. Long story short, life's gotten in the way but I'm finally ready to dive down the rabbit hole that is learning how to program! and I have a few questions:

1. I've been looking into vim and emacs and while I appreciate vim's keyboard shortcuts, I am aware that emacs has a vim keys mode which I'll probably use if I end up disliking the default bindings. That said, I like how emacs can be used as a web browser to not just view the internet, but an I2P BBS such as this no less! Really, I find that super cool tbh and would love to learn LISP as my first lang alongside Perl & Rust if that would help me gain a better handle on emacs in general. The idea that I could have multiple emacs tabs in my terminal, one on a project, one surfing the web and another on an I2P BBS just seems so cool to me. With that said, where can I read up on how to setup emacs to use as not just a web browser, but one that works with I2P? And would that be a feasible task for a beginner?

2. What exactly is this "org mode" I've been hearing so much about? From what I've heard, it sounds as if emacs can be used as a word processor using org mode? How does that work? That sounds amazing!

3. I want to learn Perl because I prefer its syntax to Python, I'm aware that's weird but regardless it's my preference. Perl seems like a nice language to use and the only reason Python seems to be so popular is that Google popularized it so then more people made modules/libs for it and that further encouraged more people to use Python by way of convenience. I'd still like to learn Perl regardless because it just feels nice to me. I'd greatly appreciate any recommendations of some small novice or intermediate tier scripts/program ideas for perl that could be useful in the modern day to help me learn it, or if you know of any ongoing Perl programs on a git repo somewhere I could use to make my teeth on, scripts, tools, malware etc. Idm which, anything interesting and made with perl5 really. And same thing for Rust as well actually.

2 2021-02-25 12:56

Really, I find that super cool tbh and would love to learn LISP as my first lang alongside Perl & Rust if that would help me gain a better handle on emacs in general.

Perl and Rust won't probably help you a lot with (E)lisp, but it never hurts to know more languages. If you want to learn Elisp, try reading the Elisp manual, and feel free to ask questions here if you don't get something. Just remember that a lot of Lisp-related stuff is simpler than it seems at first.

The idea that I could have multiple emacs tabs in my terminal, one on a project, one surfing the web and another on an I2P BBS just seems so cool to me

You can do all of that in one Emacs instance, there is no need for tabs. It might be better to use the GUI version of Emacs, as you'll have more keys to your exposure.

What exactly is this "org mode" I've been hearing so much about?

Fundamentally, it is a markup format with various Emacs integrations. So you can create links to open files, run code, etc. It's not a proper word-process in the WYSIWYG-sense, but you can easily export websites or PDFs if that is what you need.

I'd greatly appreciate any recommendations of some small novice or intermediate tier scripts/program ideas for perl that could be useful in the modern day to help me learn it,

Haven't used Perl in a while, but you could just try re-implementing standard Unix utilities (cat, ls, time, etc.) or writing scripts that might help you. Of course, since this is a Lisp/Scheme-adjacent Forum, I might recommend checking out Gauche Scheme, that can do a lot of things that Perl does too, just with (imo) cleaner syntax.

3 2021-02-25 16:31

Of course, since this is a Lisp/Scheme-adjacent Forum

Oh my bad, I thought this board was for programming in general. Thanks for the helpful responses!

4 2021-02-25 21:26

I recommend reading Higher Ordel Perl, it is the best perl book out there, you don't need to be a perl expert to read it, but it'll show you a better way to write programs in general.

5 2021-02-26 00:25

>>1

With that said, where can I read up on how to setup emacs to use as not just a web browser, but one that works with I2P? And would that be a feasible task for a beginner?

Fairly easy. Assuming you're already running i2pd, add this line to your .emacs

(setq url-proxy-services '(("http" . "localhost:4444")))

Then launch eww (M-x eww) and go to http://bbs.i2p or any other eepsite.

Better yet, use the dedicated Emacs client: https://fossil.textboard.org/sbbs/tarball/sbbs.tar.gz
In sbbs.el replace the lines

'(("textboard.org" ("sol" "prog") t)
    ("bbs.jp.net" ("mona") t))

with

'(("bbs.i2p" ("sol" "prog" "mona") nil)

That's it, enjoy the (slow but safe) ride.

6 2021-02-26 10:52 *

>>3
It is.

7 2021-02-26 14:13 *

>>3
In some sense, yes, but the board leans towards the Lisp/Scheme heritage. There are a few weird guys (such at the one who claims C is "equivalent" or better than Lisp, and another one that just uses the site as his personal blog/VCS. They might even be the same people), but they are the exceptions. That being said, there is nothing stopping you from posting about other programming-topics, just stay civil.

8 2021-02-28 18:10

>>1

The idea that I could have multiple emacs tabs in my terminal, one on a project, one surfing the web and another on an I2P BBS just seems so cool to me.

You should read Mastering Emacs.

I'm using Linux. A library that Emacs uses to communicate with Intel hardware.

The purpose of a windowing system is to put some amusing fluff around your one almighty Emacs window.

9


VIP:

do not edit these