Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
covener
Jan 10, 2004

You know, for kids!

apropos man posted:

If I try and copy a scrap file into /opt on my laptop it won't allow me without sudo, so why was scp allowed to do it?

Likely different permissions on /opt on your server vs. a difference in scp.

Adbot
ADBOT LOVES YOU

Docjowles
Apr 9, 2009

apropos man posted:

Bingo! Although I haven't got a clue how the syntax works here. When I see a regex I want to use I usually copy and paste and think "I dunno how it works, but it works". Cheers!

The regex is whatever is between the / marks, which in this case is just the string "magnet". So not much of a regex :). Then the d at the end means "Delete whatever lines matched this".

GobiasIndustries
Dec 14, 2007

Lipstick Apathy

evol262 posted:

Sure. Set up a docker container with whatever base image you want, add on dependencies (ruby/Python/whatever). Check out the git repo. Install nginx. Start the webserver and export the port.

Wanna host it on a server? Dockerfile. New laptop? Dockerfile.

Vagrant is sweet if you need a "real" VM for some reason. Webdev really doesn't

Great! If I can avoid using up the space a full vm would need then I'm all for it.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
There's suddenly a lot of bash frameworks floating around. How do they compare to oh-my-zsh or prezto? I really like both of those zsh options, but the performance on each one sucks in a different way.

xzzy
Mar 5, 2009

drat that's eye opening. I had no idea that universe existed.

And I'm not sure I like it. I mean I can see the value of making scripting easier, but a major benefit of shell scripts is they have no dependencies. Making a framework a dependency for basic server administration seems like it could be risky.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

xzzy posted:

drat that's eye opening. I had no idea that universe existed.

And I'm not sure I like it. I mean I can see the value of making scripting easier, but a major benefit of shell scripts is they have no dependencies. Making a framework a dependency for basic server administration seems like it could be risky.
To clarify, I'm interested in the ones for interactive shells, not for scripting, which I agree is really weird.

ToxicFrog
Apr 26, 2008


Vulture Culture posted:

There's suddenly a lot of bash frameworks floating around. How do they compare to oh-my-zsh or prezto? I really like both of those zsh options, but the performance on each one sucks in a different way.

You could always try something like Antigen or ZGen. There's no shortage of zsh configuration managers designed to provide the benefits of OMZ without the performance hit. Although depending on what you use, some performance degradation may be unavoidable; syntax hilighting, for example, is going to noticeably slow things down (especially pasting large amounts of code into the terminal) no matter what you use to load it.

VikingofRock
Aug 24, 2008




Vulture Culture posted:

There's suddenly a lot of bash frameworks floating around. How do they compare to oh-my-zsh or prezto? I really like both of those zsh options, but the performance on each one sucks in a different way.

People seem to really love fish shell. Try that out and then come back here with a trip report!

Robo Reagan
Feb 12, 2012

by Fluffdaddy
What actually is emacs and is it worth learning? Every time I do some digging all I find is basic editing features and org mode todo lists, but some people talk about it like it's an OS in the OS or some crazy poo poo like that.

RFC2324
Jun 7, 2012

http 418

Robo Reagan posted:

What actually is emacs and is it worth learning? Every time I do some digging all I find is basic editing features and org mode todo lists, but some people talk about it like it's an OS in the OS or some crazy poo poo like that.

You should learn vi instead.

xzzy
Mar 5, 2009

emacs is a text editor where some programmer decided it should be able to to everything and spent 40 years hacking features into it.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
spacemacs is pretty bananas but I ended up with vim and 240 distinct plugins instead

ExcessBLarg!
Sep 1, 2001

Robo Reagan posted:

What actually is emacs and is it worth learning?
Emacs is a screen-based text editor (from back when screen-based editors were still a relatively new thing) with extensive scripting capabilities. Because of its extensions it has a reputation for being a large program with an excessive number of features. In the 80s it was sufficiently functional to serve as a complete "desktop environment", so long as you were using a VDT and didn't care about graphics. Since then most other programs have gotten much larger in size, so these days Emacs is a medium-size program with a lot of dated, but cherished features.

I"d recommend learning Vim. If you're going to put in the time to learn an antiquated and unintuitive text editor, Vim ends up being much more productive in the end.

hifi
Jul 25, 2012

Robo Reagan posted:

What actually is emacs and is it worth learning? Every time I do some digging all I find is basic editing features and org mode todo lists, but some people talk about it like it's an OS in the OS or some crazy poo poo like that.

it's a text editor. what are you trying to do? sure you can do email/irc/tetris with it but there's zero reason to pick it up with the intent of using it for something other than editing text

I'd say open each one up (emacs is a gui application, do not open it in the terminal unless your computer is a terminal), figure out how to move around by single characters then words then chunks of text, split windows and navigate between them, open up the built in help, and one of them should grab your fancy by then. anyone mentioning program size or how things were in the 80s or graphics is just repeating what they read on wikipedia/reddit

Saukkis
May 16, 2003

Unless I'm on the inside curve pointing straight at oncoming traffic the high beams stay on and I laugh at your puny protest flashes.
I am Most Important Man. Most Important Man in the World.

Robo Reagan posted:

What actually is emacs and is it worth learning? Every time I do some digging all I find is basic editing features and org mode todo lists, but some people talk about it like it's an OS in the OS or some crazy poo poo like that.

My second programming course in university used Scheme language with emacs. As my final exercise of the course I created a Core Wars game with GUI that ran inside emacs. So I guess it is an operating system. It used some XDRAW extension for the graphics that I haven't found any information about and I have no idea what it would require to make it work anymore.

thebigcow
Jan 3, 2001

Bully!
http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00515.html

Truga
May 4, 2014
Lipstick Apathy

quote:

I think LibreOffice is a pretty good model for WYSIWYG, apart from not being Emacs.

:allears:

:rms2: owns

mwdan
Feb 7, 2004

Webbed Blobs
I'm looking at getting a new laptop. Is there anything I need to consider as far as installing linux is concerned? I haven't looked at hardware since I got this in 2011, so I don't know if there are any bad combos of things that would make problems for linux.

I apologize if this is the wrong place to ask, but the Laptop megathread seems to be geared toward windows.

Tigren
Oct 3, 2003

mwdan posted:

I'm looking at getting a new laptop. Is there anything I need to consider as far as installing linux is concerned? I haven't looked at hardware since I got this in 2011, so I don't know if there are any bad combos of things that would make problems for linux.

I apologize if this is the wrong place to ask, but the Laptop megathread seems to be geared toward windows.

Buy something with as many Intel components as possible. HiDPI support still isn't perfect on any hardware, but it's decent. All the major big players make Linux compatible laptops. You can even buy a Dell XPS13 with Linux pre-installed.

mwdan
Feb 7, 2004

Webbed Blobs
I'll have to check out manufacturer's websites then, I didn't see anything that said "Designed for Linux" or had it as an OS option on sites like Amazon or Best Buy.
Thanks !

im on the net me boys
Feb 19, 2017

Hhhhhhhhhhhhhhhjjhhhhhhhhhhhhhhhhhhhhhhhhhhhhjhhhhhhjhhhhhhhhhjjjhhhhhhhhhhhhhhhh cannabis

mwdan posted:

I'm looking at getting a new laptop. Is there anything I need to consider as far as installing linux is concerned? I haven't looked at hardware since I got this in 2011, so I don't know if there are any bad combos of things that would make problems for linux.

I apologize if this is the wrong place to ask, but the Laptop megathread seems to be geared toward windows.

I speak from experience when I say absolutely do not get one with AMD switchable graphics if you're planning on actually using the discrete card with Linux.

other people
Jun 27, 2004
Associate Christ
There is a specific common wifi vendor with lovely linux support, isn't there? If your laptop doesn't have intel wifi...

im on the net me boys
Feb 19, 2017

Hhhhhhhhhhhhhhhjjhhhhhhhhhhhhhhhhhhhhhhhhhhhhjhhhhhhjhhhhhhhhhjjjhhhhhhhhhhhhhhhh cannabis

other people posted:

There is a specific common wifi vendor with lovely linux support, isn't there? If your laptop doesn't have intel wifi...

You're right, and that vendor is Broadcom. Usually if the driver you need isn't built in with your kernel you can usually grab it from their site and compile it but it's still super annoying.

RFC2324
Jun 7, 2012

http 418

whomupclicklike posted:

You're right, and that vendor is Broadcom. Usually if the driver you need isn't built in with your kernel you can usually grab it from their site and compile it but it's still super annoying.

And Broadcom is super common.

im on the net me boys
Feb 19, 2017

Hhhhhhhhhhhhhhhjjhhhhhhhhhhhhhhhhhhhhhhhhhhhhjhhhhhhjhhhhhhhhhjjjhhhhhhhhhhhhhhhh cannabis

RFC2324 posted:

And Broadcom is super common.

Broadcommon, if you will.

Boris Galerkin
Dec 17, 2011

I don't understand why I can't harass people online. Seriously, somebody please explain why I shouldn't be allowed to stalk others on social media!
This might be a silly question but here goes: one of the computers I'm using has gcc v4.8 with appropriate openmpi and blas libraries. I now need gcc v4.9 to build a newer version of the library I'm using. Do I need to build a new version of openmpi and blas with the new version of gcc or can I just use the existing ones?

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Boris Galerkin posted:

This might be a silly question but here goes: one of the computers I'm using has gcc v4.8 with appropriate openmpi and blas libraries. I now need gcc v4.9 to build a newer version of the library I'm using. Do I need to build a new version of openmpi and blas with the new version of gcc or can I just use the existing ones?
There's a lot of room for things to go wrong in the details, but between 4.8 and 4.9 it should work fine.

Hughmoris
Apr 21, 2007
Let's go to the abyss!
I'm going to try my hand at using Linux again, as a hobbyist. I'd like to build a solid foundation of knowledge this time, instead of blindly pasting commands into the terminal.

How is the http://www.linuxfromscratch.org regarded? Is it worthwhile reading the book and walking through the steps?

jre
Sep 2, 2011

To the cloud ?



Hughmoris posted:

I'm going to try my hand at using Linux again, as a hobbyist. I'd like to build a solid foundation of knowledge this time, instead of blindly pasting commands into the terminal.

How is the http://www.linuxfromscratch.org regarded? Is it worthwhile reading the book and walking through the steps?

You'll learn very little practical knowledge from doing this. You're much better to pick a project and try and implement it.

E.g. work out how to build a simple lamp stack and setup wordpress, set up a file server, learn about virtualisation, provision a stack using configuration management .....

xzzy
Mar 5, 2009

No one builds software anymore, it's all software config these days. If you really insist on getting your hands dirty do one of the more bare installs like arch or slackware or something. Otherwise just pick one of the big ones like Ubuntu or one of the RedHat versions.

evol262
Nov 30, 2010
#!/usr/bin/perl
Blindly copying things from the LFS/Gentoo documentation or Arch wiki won't really teach you anything either.

Do real things, as above. 99% of people have no real need to know the "guts" of Linux to do productive things with it in 2017, including development.

Otherwise, install whatever, set up KVM, and put a BSD on (which have great "core" documentation and absolutely no info about how to do much else) a VM, and almost all of it is broadly applicable to the way the "guts" of Linux work. Except you're forced to learn it to do anything.

jaegerx
Sep 10, 2012

Maybe this post will get me on your ignore list!


Learn what's in /bin and /sbin. You'll be good to go for every basic Linux job.

evol262
Nov 30, 2010
#!/usr/bin/perl
Nothing? :shobon:

Hughmoris
Apr 21, 2007
Let's go to the abyss!
Thanks for the advice. I installed Virtualbox and then Ubuntu, so I'm fiddling with that now. I have my first rookie question...
I dabble in Perl, and want to install Perlbrew. The website says to run this command to install:
code:
\curl -L https://install.perlbrew.pl | bash
I started reaching the man pages on cURL, and googling, since I've never used it. Googling around, people are saying its bad form to pipe cURL to bash. If that's the case, should I do something like
code:
\curl -L https://install.perlbrew.pl | perlbrewinstall.sh
then execute that new sh file afterwards?

unruly
May 12, 2002

YES!!!

Hughmoris posted:

Thanks for the advice. I installed Virtualbox and then Ubuntu, so I'm fiddling with that now. I have my first rookie question...
I dabble in Perl, and want to install Perlbrew. The website says to run this command to install:
code:
\curl -L [url]https://install.perlbrew.pl[/url] | bash
I started reaching the man pages on cURL, and googling, since I've never used it. Googling around, people are saying its bad form to pipe cURL to bash. If that's the case, should I do something like
code:
\curl -L [url]https://install.perlbrew.pl[/url] | perlbrewinstall.sh
then execute that new sh file afterwards?
It is bad to curl pipe to bash... without reading what it's going to do, first. Generally, if you just want to download the .sh file, then just curl -O the file and inspect it, then run it like bash perlbrewinstall.sh or whatever.

Mao Zedong Thot
Oct 16, 2008


curl | bash is also fine if 1) https 2) you trust the source

It's literally no worse than installing a package you download, people like to :spergin: out about it, as if it's some revelation that you're running code you Downloaded! From The Internet! (!!!)

Hughmoris posted:

Thanks for the advice. I installed Virtualbox and then Ubuntu, so I'm fiddling with that now. I have my first rookie question...
I dabble in Perl, and want to install Perlbrew. The website says to run this command to install:
code:
\curl -L [url]https://install.perlbrew.pl[/url] | bash
I started reaching the man pages on cURL, and googling, since I've never used it. Googling around, people are saying its bad form to pipe cURL to bash. If that's the case, should I do something like
code:
\curl -L [url]https://install.perlbrew.pl[/url] | perlbrewinstall.sh
then execute that new sh file afterwards?

specifically to redirect the output to a file, you want to redirect the output, not pipe it

so: curl https://url > file

not: curl https://url | file (this would try to execute 'file', and I mean that literally, not generally)

Mao Zedong Thot fucked around with this message at 07:54 on Feb 24, 2017

Boris Galerkin
Dec 17, 2011

I don't understand why I can't harass people online. Seriously, somebody please explain why I shouldn't be allowed to stalk others on social media!

Vulture Culture posted:

There's a lot of room for things to go wrong in the details, but between 4.8 and 4.9 it should work fine.

If I understand versioning numbers right... in theory 4.9 should be fully compatible with 4.8 but might have new features that 4.8 doesn't, right?

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

VOTE YES ON 69 posted:

curl | bash is also fine if 1) https 2) you trust the source
It's not.

Mr. Fix It
Oct 26, 2000

💀ayyy💀



Theoretically, a source you trust wouldn't do that. Just like you wouldn't expect redhat or debian to put malicious stuff in their signed packages. They could, but you trust them not to. Same goes for a file on a website. As long as you don't have some sort of man-in-the-middle thing going on.

Adbot
ADBOT LOVES YOU

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Boris Galerkin posted:

If I understand versioning numbers right... in theory 4.9 should be fully compatible with 4.8 but might have new features that 4.8 doesn't, right?
There should be no ABI changes in the libraries that cause breaking changes, assuming you build everything the same way. (Even in breaking upgrades, like GCC 4->5, you can override the ABI version with some flags, but some build systems don't permit you to do this easily and it gets complicated fast.)

Mr. Fix It posted:

Theoretically, a source you trust wouldn't do that. Just like you wouldn't expect redhat or debian to put malicious stuff in their signed packages. They could, but you trust them not to. Same goes for a file on a website. As long as you don't have some sort of man-in-the-middle thing going on.
Signing is really the key difference we're talking about -- bash doesn't check signatures. This may or may not be relevant depending on your specific level of paranoia, but large OSS organizations have had their servers compromised to push out malicious binaries before. But it's important to note that a package being signed or not signed tells you nothing about the private key hygiene of the repository maintainer either; it could be stored one directory up from the web root of the packages, for all you know.

The more pressing, realer problem is when you copy and paste that information, because it's very easy to inject hidden text into what you're copying into your clipboard even if you've reviewed the visible text character by character.

Vulture Culture fucked around with this message at 15:25 on Feb 24, 2017

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply