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
Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

Bloody posted:

c is a beautiful language

I sure hope I'll start appreciating C more in case I get this new job

Adbot
ADBOT LOVES YOU

gonadic io
Feb 16, 2011

>>=

Bloody posted:

c is a beautiful language

sure, in the same way that lightning is

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Symbolic Butt posted:

I sure hope I'll start appreciating C more in case I get this new job

it has a wonderful personality

Bloody
Mar 3, 2013

it's fantastic in the very narrow case of "i care a lot about exactly what the hardware is doing"

Bloody
Mar 3, 2013

if your using it in any context beyond that i must ask wtf you doin bruv

Hed
Mar 31, 2004

Fun Shoe
I actually never really got C until I learned assembly. it was like I needed to build up my abstraction all the way from semiconductor physics to software

Bloody
Mar 3, 2013

Hed posted:

I actually never really got C until I learned assembly. it was like I needed to build up my abstraction all the way from semiconductor physics to software

a lot of things made a lot more sense after we got deep into the weeds of just exactly how a mips core works

Jerry Bindle
May 16, 2003
thats not surprising, as one of the motivations for C was that systems programmers wouldn't have to use assembly any more

Luigi Thirty
Apr 30, 2006

Emergency confection port.

I think Marble Madness was the first game written in C instead of assembly

Notorious b.s.d.
Jan 25, 2003

by Reene

Barnyard Protein posted:

thats not surprising, as one of the motivations for C was that systems programmers wouldn't have to use assembly any more

pdp-11 assembly is surprisingly close to C

the indexing operator ([ ]), pointer dereferencing (*foo) and nested dereferencing (**) are all addressing modes in pdp-11 asm. as in, you can apply those operators to registers/memory locations for pretty much all instructions

C's null-terminated strings are an 11-ism, too. it was the native string format for the dec assembler's string literals + string-handling macros.

assembly was a lot less unpleasant to write in the age before risc. load/store registers? gently caress you i'll reference array elements directly in memory and have the cpu calculate the offsets on the fly :smug:

Notorious b.s.d. fucked around with this message at 02:31 on Feb 24, 2015

Jerry Bindle
May 16, 2003
i do a lot of dsPIC/PIC24 assembly work, it is quite enjoyable. comparing its ISA against the PDP-11 i'm left with the impression that the dsPIC core borrowed a lot from the PDP-11. it makes sense that C works well with PDP-11, as the wiki page tells me that C was developed on the PDP-11. XC16 for the dsPIC almost always does what you'd expect. it falls apart for 8-bit though, where the concept of a pointer is a single indirect register

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Barnyard Protein posted:

dsPIC/PIC24 assembly ISA PDP-11 dsPIC PDP-11. C PDP-11C PDP-11. XC16 dsPIC single indirect register

wrong thread buddy

pseudorandom name
May 6, 2007

Notorious b.s.d. posted:

assembly was a lot less unpleasant to write in the age before risc. load/store registers? gently caress you i'll reference array elements directly in memory and have the cpu calculate the offsets on the fly :smug:

still pretty good in this age after risc

Stringent
Dec 22, 2004


image text goes here

MALE SHOEGAZE posted:

wrong thread buddy

embedded stuff has lots of terrible programmers, no reason for web people to hog the whole thread

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
if you know assembly and post in this thread you're like a cismale posting in the women chatting thtreadi n gbs

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:

MALE SHOEGAZE posted:

if you know assembly and post in this thread you're like a cismale posting in the women chatting thtreadi n gbs

the very idea that knowing assembly means you aren't terrible. still, right thread

Notorious b.s.d.
Jan 25, 2003

by Reene

MALE SHOEGAZE posted:

if you know assembly and post in this thread you're like a cismale posting in the women chatting thtreadi n gbs

i didn't imply i was good at assembly

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Notorious b.s.d. posted:

i didn't imply i was good at assembly

oh so you're genderqueer


also jk everyone is free to post in this thread as long as you're nice to people.

fritz
Jul 26, 2003

Luigi Thirty posted:

I think Marble Madness was the first game written in C instead of assembly

that was a fun game

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Bloody posted:

c is a beautiful language

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Notorious b.s.d. posted:

assembly was a lot less unpleasant to write in the age before risc. load/store registers? gently caress you i'll reference array elements directly in memory and have the cpu calculate the offsets on the fly :smug:

still miss the 68K

if only IBM had used it instead of an Intel chip...

Luigi Thirty
Apr 30, 2006

Emergency confection port.

fritz posted:

that was a fun game

fun fact: the guy who wrote it later went on to be one of the founding members of Sega Technical Institute, their US studio that made Sonic 2 among other things, and after that he was at Universal and was on the staff for all 3 crash bandicoots

bucketmouse
Aug 16, 2004

we con-trol the ho-ri-zon-tal
we con-trol the verrr-ti-cal
marble madness 2 is a good game and i think my only possible claim to nerd fame is having beaten it on the only known existing machine

Bloody posted:

c is a beautiful language

and then you implement a dynamically-typed tableview in it and you stop having this delusion

Bhodi
Dec 9, 2007

Oh, it's just a cat.
Pillbug
This was last page but I just had a heated discussion with one my co-workers because he refused remove the ability to enter a --password in our "./program --user foo --password bar --thing blah". I already added in optional reading from ENV last week, which he "didn't see the point of" but he's solidly against anything that removes functionality and I'm pretty sure the boss agrees.

Fuuuuuuuck I didn't think this would be where my stand would be made

Bloody
Mar 3, 2013

bucketmouse posted:

and then you implement a dynamically-typed tableview in it and you stop having this delusion

just because you are struggling to chop down a tree with a hammer does not mean the hammer is faulty

Notorious b.s.d.
Jan 25, 2003

by Reene

Bhodi posted:

This was last page but I just had a heated discussion with one my co-workers because he refused remove the ability to enter a --password in our "./program --user foo --password bar --thing blah". I already added in optional reading from ENV last week, which he "didn't see the point of" but he's solidly against anything that removes functionality and I'm pretty sure the boss agrees.

Fuuuuuuuck I didn't think this would be where my stand would be made

gently caress programs that don't take a password flag. your boss and your coworker are right.

it's up to the user to know wtf

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:
to be fair the tree looks liek a nail

Bhodi
Dec 9, 2007

Oh, it's just a cat.
Pillbug

Notorious b.s.d. posted:

gently caress programs that don't take a password flag. your boss and your coworker are right.

it's up to the user to know wtf

I don't think we can be friends anymore. I want to strip it down to a flag so you have to type it in interactively or use the ENV, I think that's p. reasonable

Notorious b.s.d.
Jan 25, 2003

by Reene

Bhodi posted:

I don't think we can be friends anymore. I want to strip it down to a flag so you have to type it in interactively or use the ENV, I think that's p. reasonable

i think you're an rear end in a top hat who's going to make me use 'expect' to wrap your lovely script

you should also include the ENV and interactive switches, but removing --password is not the fuckin answer

Jerry Bindle
May 16, 2003
might i recommend you to use http://expect.sourceforge.net to automatically test your interactive program

Notorious b.s.d.
Jan 25, 2003

by Reene
don't forget to delete the password from the process table entry tho

Bhodi
Dec 9, 2007

Oh, it's just a cat.
Pillbug
And I think you're an rear end in a top hat who's going to get your password exposed the second someone runs ps on the box, this isn't a trivial script, it chugs and can be running for minutes at a time.

ha, beat me. I actually looked into that, I really have no clue how to do it on ruby but I might spend an hour on it tomorrow, maybe we can both be happy

Notorious b.s.d.
Jan 25, 2003

by Reene

Bhodi posted:

And I think you're an rear end in a top hat who's going to get your password exposed the second someone runs ps on the box, this isn't a trivial script, it chugs and can be running for minutes at a time.

yeah don't loving put the password in the process table entry. that part is all you, man

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:
hmm yase lets have my password displayed on screen when i type it in, and in my bash command history

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

otp yeah, you know me

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:

Bhodi posted:

I don't think we can be friends anymore. I want to strip it down to a flag so you have to type it in interactively or use the ENV, I think that's p. reasonable

agreed, but ur boss / coworker do have a case as you;re removing somethign that used to work, that might cost your customers or whoever if they have to change their ways.

then again if they are dumb it could force them to have better security.

Notorious b.s.d.
Jan 25, 2003

by Reene

bobbilljim posted:

hmm yase lets have my password displayed on screen when i type it in, and in my bash command history

those are much easier problems to work with. if you can read my tty or my bash command history, you've already escalated privileges.

process table entries are not like my command history. they are totally public. it would be really, really bad to leak pw data there.

Bhodi
Dec 9, 2007

Oh, it's just a cat.
Pillbug

Notorious b.s.d. posted:

yeah don't loving put the password in the process table entry. that part is all you, man
Just spent 10 minutes on google; simple answer: You can't. At least not trivially. The poo poo's splattered all over the system and stored in /proc and various other places, from what I can gather. Then again I am a terrible programmer so

We don't have a TON of users using this yet, it's basically in beta, which is why I want to make the change now before it gets wide adoption.

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:
im assuming you would have to fork with a less passwordy cmdline then kill ur original but that still lets it into the process table however briefly so i guess you're going to have to write a wrapper program in C or w/e that does some arcane bullshit to keep itself out of teh proc table gl with that

Adbot
ADBOT LOVES YOU

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

aren't all the /proc entries derived from the usually-mutable argv as mapped in the process' memory? lots of programs manage this feat.

  • Locked thread