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.
 
  • Locked thread
Shaggar
Apr 26, 2006

hubris.height posted:

trying to firgure out how to use the bbusername/bbpassword cookie stuff to log in to the forums before pulling the site. i found this cool method:
code:
public HtmlAgilityPack.HtmlDocument Load(string url, string proxyHost, int proxyPort, string userId, string password)


that overloads htmldocument load to take all this bonus info. however, this poorly documented project leaves me with the question "is the userID and password actually a proxy user id / password?" am i correct in thinking this? can i use this for my purposes?

it looks like the proxy auth instead of the site auth. there may be another overload for basic auth, but the other way u can do it is use WebClient to authenticate and get the data as a string and then have htmlagilitypack parse that string.

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

try googling htmlagilitypack cookies

also shaggar was right about a bunch of poo poo. how is my poo poo on linux showing up under /media/some_retarded_label superior to drive letters? that's just stupid. and what happens when you run out of drive letters (lol if you can come up with a legitimate reason to do this?)? well you failover to the idiot method you're suggesting for the default - mounting to folders

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Notorious b.s.d. posted:

i've even written nagios checks

that your server couldn't cache? :haw:

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Bloody posted:

try googling htmlagilitypack cookies

also shaggar was right about a bunch of poo poo. how is my poo poo on linux showing up under /media/some_retarded_label superior to drive letters? that's just stupid. and what happens when you run out of drive letters (lol if you can come up with a legitimate reason to do this?)? well you failover to the idiot method you're suggesting for the default - mounting to folders

i have always found it easier/more comfortable to type slashes than backslashes -- i'm not even sure typewriters always had backslashes on them, since they're not part of normal writing :shrug:

:corsair:

Notorious b.s.d.
Jan 25, 2003

by Reene

prefect posted:

i have always found it easier/more comfortable to type slashes than backslashes -- i'm not even sure typewriters always had backslashes on them, since they're not part of normal writing :shrug:

:corsair:

weird

http://www.bobbemer.com/BACSLASH.HTM

the guy who made ascii says he created backslash in order to form algol operators like "/\" and "\/"

Bream
Feb 3, 2013

Farmer's Barket

Bloody posted:

try googling htmlagilitypack cookies

also shaggar was right about a bunch of poo poo. how is my poo poo on linux showing up under /media/some_retarded_label superior to drive letters? that's just stupid. and what happens when you run out of drive letters (lol if you can come up with a legitimate reason to do this?)? well you failover to the idiot method you're suggesting for the default - mounting to folders

How is having a path prepended by a letter and a colon more or less intuitive than having it prepended by /media/ ?

Bloody
Mar 3, 2013

Bream posted:

How is having a path prepended by a letter and a colon more or less intuitive than having it prepended by /media/ ?

if you are not a computer neckbeard you look at /media/ and think "oh, a place for my music".

Bream
Feb 3, 2013

Farmer's Barket

Bloody posted:

if you are not a computer neckbeard you look at /media/ and think "oh, a place for my music".

Well I will admit that sometimes it's hard to check your own perspective. I guess my point is more that a "drive letter" is, like, an implementation artifact that people shouldn't have to worry about.

MononcQc
May 29, 2007

Notorious b.s.d. posted:

common lisp's native file i/o is like this. it's really unpleasant. they were trying to abstract out the implementation details of mainframe/lispM/unix file io and ouch ouch ouch ouch ouch

I don't think it's nearly as bad for OS paths, but things like 'joining directory paths' and poo poo should be doable with a given function/method that handles it in a native way so all you have to worry about is providing individual directory names and poo poo, and not get mistery bugs when porting to other platforms.

For URIs, you're just asking for trouble if you don't do it.

hubris.height
Jan 6, 2005

Pork Pro
i think drive letter wins over mount locations simply because it accomplishes the same thing while using

1) less possible characters that need to be escaped (/media/hda1 being 2 escapes versus 1 in c:\)
2) less total characters used to accomplish the same thing
3) being the normative behavior of most consumer pcs

MononcQc
May 29, 2007

who escapes forward slashes outside of people using it as a regex delimiter and JSON libraries?

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

quote:

drive letter chat

double sulk
Jul 2, 2010

Shaggar
Apr 26, 2006

Bream posted:

How is having a path prepended by a letter and a colon more or less intuitive than having it prepended by /media/ ?

E:\ is the equivalent of /media/e/ (or /media/usbe), not /media/. c:\ is the equivalent of / in a Linux (and can also be referenced as /).

ultimately the problem is that attached drives can be remove and added arbitrarily by the user. the friendly name of the drive (label) can also be arbitrary, frequently changed, and not unique so its a bad way to tell programs where a file is. drive letters solve all the problems by providing something that's equally as arbitrary as how drives are added/removed, but is also consistent in its naming. the label is totally irrelevant to how the drive is accessed by the system and only exists for the user's benefit.

They could have done something like /c/ instead of c:\ but that doesn't really change anything. the partition is still mounted as a drive letter cause that's the best way to do it.

hubris.height
Jan 6, 2005

Pork Pro

MononcQc posted:

who escapes forward slashes outside of people using it as a regex delimiter and JSON libraries?

good point i owned myself

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i just escape poo poo randomly until whatever i'm doing works

Share Bear
Apr 27, 2004

yo im comin from plangs and i gotta learn java

what is a good book?

Notorious b.s.d.
Jan 25, 2003

by Reene

MononcQc posted:

I don't think it's nearly as bad for OS paths, but things like 'joining directory paths' and poo poo should be doable with a given function/method that handles it in a native way so all you have to worry about is providing individual directory names and poo poo, and not get mistery bugs when porting to other platforms.

For URIs, you're just asking for trouble if you don't do it.

lisp machines and mainframes don't necessarily have "os paths," so the standardized file io is much more like a URI, where the resource name would need to also reflect the method of access.

but they didn't have a simple URI-like concept, instead all file i/o involves complex data structures. and it is not much fun.

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Share Bear posted:

yo im comin from plangs and i gotta learn java

what is a good book?

1,001 hangman knots

Notorious b.s.d.
Jan 25, 2003

by Reene

Bream posted:

How is having a path prepended by a letter and a colon more or less intuitive than having it prepended by /media/ ?

drive letters came about because CP/M didn't have ANY directories at all. everything lived in the root directory. "a," "b," and "c" were the only paths on the system, period. MS-DOS 2.0? 3.0? added the colon syntax because it needed to retain compatibility with old DOS and CP/M apps while adding a hierarchical filesystem. heinous historical accident.

the only non-poo poo alternative to the unix unified tree starting at / is the way vms and mpe did it: each user/group is a filesystem root. so e.g. OS files are stored in the directory for the system user/group. your personal files are stored in BREAM:BREAM/foo/bar or whatever.

Elder Postsman
Aug 30, 2000


i used hot bot to search for "teens"

OBAMA BIN LinkedIn posted:

hi hello terrible programmers what terrible programs have you made recently? post em all here.

i wrote a qa tool for this telecom conversion project. the code is probably very bad (because it is python) but it works and it even creates point feature error flags and a log file and everything just like our grown-up qa tools do.

Shaggar
Apr 26, 2006

Share Bear posted:

yo im comin from plangs and i gotta learn java

what is a good book?

the javadocs. java is great and easy and you don't really need a book, just don't try to replicate what you did in those hosed up and lovely p-langs cause it was probably wrong.

Bream
Feb 3, 2013

Farmer's Barket

Notorious b.s.d. posted:

drive letters came about because CP/M didn't have ANY directories at all. everything lived in the root directory. "a," "b," and "c" were the only paths on the system, period. MS-DOS 2.0? 3.0? added the colon syntax because it needed to retain compatibility with old DOS and CP/M apps while adding a hierarchical filesystem. heinous historical accident.

the only non-poo poo alternative to the unix unified tree starting at / is the way vms and mpe did it: each user/group is a filesystem root. so e.g. OS files are stored in the directory for the system user/group. your personal files are stored in BREAM:BREAM/foo/bar or whatever.

That sounds like a perfectly reasonable way to do things that is founded on forethought and design and not some weird artifact that, as pointed out, makes no sense in a world where new computers don't have floppies and so your system drive is C: because of historical inertia and no other practical reason.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

OBAMA BIN LinkedIn posted:

hi hello terrible programmers what terrible programs have you made recently? post em all here.


whenever we ship a show the PAs have to send a report to the big generic music libraries listing all the songs we used, their duration, and their in and out timecode. for each track they'd have to take the filename and look it up on the publishers website to get the composer/real title/etc. it probably took them a couple hours to do a show.

a while ago I made a thing that just reads an EDL and then compiles the filenames/durations/timecodes, but they still had to look up composer/title/etc on the publishers website. i finally got around to hooking it up to a database on the web so every time they use a song it gets stored so they never have to look it up again. then i managed to dump the db from a few of the publishers so what was 2-3 hours of work is now 10 minutes tops. pretty rad.

Share Bear
Apr 27, 2004

Shaggar posted:

the javadocs. java is great and easy and you don't really need a book, just don't try to replicate what you did in those hosed up and lovely p-langs cause it was probably wrong.

I THOUGHT THIS WAS THE SERIOUS PROGRAMMING THREAD FOR lovely PROGRAMMERS NOT lovely PEOPLE

hubris.height
Jan 6, 2005

Pork Pro
gently caress yes i think i got it thanks to a browsersession class made by someone else on the internet

now i just gotta work up the balls to write my username/pw in plaintext in this program to be submitted to the forums and hope it doesn't autoban me or some poo poo
code:
            BrowserSession b = new BrowserSession();
            b.Get("http://forums.somethingawful.com/account.php?action=loginform#form");
            b.FormElements["username"] = "username";
            b.FormElements["password"] = "password";
            string response = b.Post("https://forums.somethingawful.com/account.php");
then it should be as simple as creating a loop that goes through each page of the music thread, and pulls the youtube URLs to a txt file which i can later use with something else to make a playlist

i was just about to give up before i found this though

edit: http://refactoringaspnet.blogspot.com/2010/04/using-htmlagilitypack-to-get-and-post.html

uG
Apr 23, 2003

by Ralp
protip: you dont have to login to scrape the 'pos

Shaggar
Apr 26, 2006
stuffing everything under / is idiotic and only makes sense to a moron w/ a Linux anime server under their bed

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Shaggar posted:

[SHAGGARING INTENSIFIES]

hubris.height
Jan 6, 2005

Pork Pro

uG posted:

protip: you dont have to login to scrape the 'pos

paywall is currently up, try going to a pos thread while not logged in, and enjoy this video http://v.somethingawful.com/misc/Boogeyman-494.mp4

uG
Apr 23, 2003

by Ralp

prefect posted:

[SHAGGARING INTENSIFIES]

uG
Apr 23, 2003

by Ralp

hubris.height posted:

paywall is currently up, try going to a pos thread while not logged in, and enjoy this video http://v.somethingawful.com/misc/Boogeyman-494.mp4

maybe send a valid useragent or something because it works fine with wget and also with regular browsing

uG
Apr 23, 2003

by Ralp
oh open a thread... even my bots dont read the threads

MeruFM
Jul 27, 2010

MononcQc posted:

URIs and file paths would totally benefit by not being flattened in a string and instead be some kind of actual data structure :v:

plz no

MeruFM
Jul 27, 2010
also drive letters make about 50000x more sense than /media/, /dev/, /volume/, /buttdrive/

It tells me that each of them are connected to a separate storage thingy on the computer.

uG
Apr 23, 2003

by Ralp
yes if you ask someone who doesnt use computers what a, b, and c are im sure they will say its very intuitive that they are connected to different storage things

uG
Apr 23, 2003

by Ralp
in other words: was windows 3.1 your first os?

Shaggar
Apr 26, 2006
no surprise that autistics cant understand why drive letters are the best solution

MeruFM
Jul 27, 2010
so C is my main computer?
D is my cd?
what happens when i put in my usb stick? Oh E okay


So where's my main computer stuff?
Well it's actually everywhere, bust mostly in home. Just use your user folder
Where's my cd?
it's in /dev/sr0
But you said that the main stuff is everywhere. Why is the cd now in the main stuff? did it get copied to my computer?
no, that folder hides after you take it out. Actually the main stuff is not everywhere, it's just in /dev/hda/.
Wait but you said to just use my user folder. Is my user folder a cd?
No, your user folder is also /dev/hda.

pfbbbbbbtttttttt

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

here's a beatufiul example i just came up with:

say your computer is set up with a few hard drives. right now my desktop has an SSD for important poo poo, a raid 0 array for really irrelevant poo poo (mlmp), and a big fat slow disk for other poo poo. say it had a linux on it. go to your home directory. make a new folder. put some poo poo in that folder. what drive is it on?

okay, let's do something else. let's put our anime collection on our big fat slow drive. how do you get there and make that? i bet its really obvious and intuitive.

  • Locked thread