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
Jerry Bindle
May 16, 2003
we often call something a language when what we really mean is the core of the language and the language's environment. e.g. when am at work talking about "C" i am talking about the core syntax of the C language, stdlib.h, stdint.h, stdio.h, and a device specific header because thats basically all we use. "C" to someone writing linux device drivers is probably totally different, right? so you probably won't benefit from learning the way a C library does something if C++ uses something different, but i don't see how you wouldn't benefit as a C++ programmer from knowing the core of the c language.

Adbot
ADBOT LOVES YOU

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
knowing C will help you learn c++ but good c and good c++ are very different because the libraries are different, the tools you use to solve problems are vastly different both at the obvious function level (printf vs iostream) and the abstraction level (templates, smart pointers, classes, iterators vs structs, arrays, free functions)

like in C you can get away with just passing raw pointers to null terminated character arrays around and calling strncmp on them but if you're writing c++ those things should feel gross without at least one layer of abstraction on top of them (std::string, unique_ptr, etc) and you don't have to know the "c way" at all in that sense

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Soricidus posted:

pet peeve time: please stop talking about "c/c++" as though it's some kind of single entity. they're two different languages.

there's a substantial intersection, yes, but good c and good c++ are so different that expertise in one doesn't guarantee any kind of competence in the other, and lumping them together is of very little value.

i'm going to send you a cv that says that i'm really good at both c/c++ and java/javascript

Ralith
Jan 12, 2011

I see a ship in the harbor
I can and shall obey
But if it wasn't for your misfortune
I'd be a heavenly person today

pepito sanchez posted:

i'd like to learn more c/c++ but i never could think of a decent little weekend project i could come up with that wouldn't bore me out of my mind, and help me get a better understanding.

also just found out about boost libraries. not like it's a new thing. so with my very limited c++ knowledge is this a good thing for hackbunny's hash grievance?
Boost is a lot less relevant if you're using modern C++ (i.e. C++11, 14, or 17). It's also huge and ugly (due in large parts to supporting non-modern C++) and drags your compile times into the ground.

A raytracer is a good classic weekend project sort of thing. Gives you a good excuse to play around with performance optimization.

Soricidus
Oct 21, 2010
freedom-hating statist shill

sarehu posted:

I disagree completely. If you're bad at C you have to be bad at C++. You could not know C at all, but once somebody shows you malloc and free, any problems you have using C are going to map to serious deficiencies in your ability to use C++. Going in the other direction, you have to take a C programmer and tell them not to gently caress around with exception safety, but once you do that a good C programmer will be a good C++ programmer.

I guess you could have some mentally ill developer where the illness only reveals itself once the opportunity to make inheritance hierarchies shows itself. But realistically you'll usually find some hosed up reckless poo poo in their C code.

all you're really saying there is that someone who is good at one of the languages can learn the other quickly, which isn't saying anything at all since a good programmer can learn any language quickly if it's similar to something they already know.

Xarn
Jun 26, 2015

Wheany posted:

i'm going to send you a cv that says that i'm really good at both c/c++ and java/javascript

:commissar:

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Wheany posted:

i'm going to send you a cv that says that i'm really good at both c/c++ and java/javascript

in 2012, when we were trying to transition from using contractors to write our mobile apps to doing it in house, the person we hired to manage the app development team had "7 years of experience in linux/android"

the talent deficit
Dec 20, 2003

self-deprecation is a very british trait, and problems can arise when the british attempt to do so with a foreign culture





fart simpson posted:

in 2012, when we were trying to transition from using contractors to write our mobile apps to doing it in house, the person we hired to manage the app development team had "7 years of experience in linux/android"

i have 62 years experience in java/erlang/elixir/otp/javascript/linux/c/c++/scala/clojure/rust

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
i have five years experience in html/css/javascript, but im a 10x rockstar so its really more like 20 years

Soricidus
Oct 21, 2010
freedom-hating statist shill

Suspicious Dish posted:

i have five years experience in html/css/javascript, but im a 10x rockstar so its really more like 20 years

5 * 10 = 20?

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

Soricidus posted:

5 * 10 = 20?

Web developers don't get paid a deece 6.5 for basic math

sarehu
Apr 20, 2007

(call/cc call/cc)

Soricidus posted:

all you're really saying there is that someone who is good at one of the languages can learn the other quickly, which isn't saying anything at all since a good programmer can learn any language quickly if it's similar to something they already know.

That's not what I said at all.

Soricidus
Oct 21, 2010
freedom-hating statist shill

sarehu posted:

That's not what I said at all.

i was trying to read between the lines, because i was reluctant to believe you were actually asserting that someone who knows c but has never learned c++ only has to learn about exception safety in order to become a good c++ programmer, or that someone who is an expert on high-level programming with classes and typesafe generics only has to learn the names of memory management functions in order to become a good c programmer.

sarehu
Apr 20, 2007

(call/cc call/cc)

Soricidus posted:

i was trying to read between the lines, because i was reluctant to believe you were actually asserting that someone who knows c but has never learned c++ only has to learn about exception safety in order to become a good c++ programmer, or that someone who is an expert on high-level programming with classes and typesafe generics only has to learn the names of memory management functions in order to become a good c programmer.

I would definitely say that someone who is an expert on high-level programming with classes and type-safe generics in a non-garbage collected language, and the other aspects of C++ that you need to be aware of (that it often has in common with C like integer promotions), only has to learn the names of memory management functions in order to become a good C programmer. And maybe, if you want to be sure, spend a few days programming. Yes.

Going in the other direction, the one part of C++ that'll gently caress over a good C programmer is exception safety. Once you learn that, a good C programmer will be able to use C++ well. However, there are approximately zero good C programmers that haven't used some other language with generics or classes and the like before. If not, well, the good C programmer would still need to think in those terms, and the teaching of C++ is just revelation of the concepts (datatypes! constructors and destructors!) that already must exist in good C programmers' minds.

Dessert Rose posted:

like in C you can get away with just passing raw pointers to null terminated character arrays around and calling strncmp on them but if you're writing c++ those things should feel gross without at least one layer of abstraction on top of them (std::string, unique_ptr, etc) and you don't have to know the "c way" at all in that sense

For example, no true good C programmer would try to get away with that at all.

Edit: no true

sarehu fucked around with this message at 01:13 on Oct 25, 2015

suffix
Jul 27, 2013

Wheeee!
there are a lot of ways to write c++ and the ways in the "c with classes" corner are pretty close to c

really writing jutst "c++" is probably less informative than "c/c++"

Sapozhnik
Jan 2, 2005

Nap Ghost
this is one of the things that makes c++ and javascript and perl and i guess probably ruby Bad Languages though

you don't program in any of them directly as such, you invent your own personal dialect and program in that, and if you have to integrate somebody else's code then all of a sudden your patterns no longer apply in their world. i've never programmed in lisp but i'm guessing lisp takes this to an extreme. like i worked on a code base that had a mix of three c++ "dialects" in it and it was a pain in the dick.

whereas there's only really one way to write say Java or Python and I mean you could deviate from it but nobody is going to condone your bullshit.

Volte
Oct 4, 2004

woosh woosh
C++ is an exoskeleton that C has to wear in order to get any real work done. If you really want to you can ignore the exoskeleton and just use your flimsy little baby arms to do stuff.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Volte posted:

C++ is an exoskeleton that C has to wear in order to get any real work done. If you really want to you can ignore the exoskeleton and just use your flimsy little baby arms to do stuff.

heheye

Sapozhnik
Jan 2, 2005

Nap Ghost

Volte posted:

C++ is an exoskeleton that C has to wear in order to get any real work done. If you really want to you can ignore the exoskeleton and just use your flimsy little baby arms to do stuff.

if C++ were an exoskeleton then it would be some sort of post apocalyptic improvised metal battle armor except half of the sharp edges are on the inside

Jerry Bindle
May 16, 2003
i had these fever dreams about adding a bunch of crap to C, like java style annotations, after learning how easy it is to process source code with antlr. what stopped me was that our IDE won't do the nice syntax coloring and auto-indenting for unsupported languages. and i didn't know how to add support to the IDE for a new language.... until now :getin:

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

Barnyard Protein posted:

i had these fever dreams about adding a bunch of crap to C, like java style annotations, after learning how easy it is to process source code with antlr. what stopped me was that our IDE won't do the nice syntax coloring and auto-indenting for unsupported languages. and i didn't know how to add support to the IDE for a new language.... until now :getin:

there's something about the cpp that I just like to abuse it to do poo poo like annotations too

I should look up antlr to get up on the big boys parsing train :science:



(yes I do these shenanigans only for my own stuff)

Jerry Bindle
May 16, 2003
most of the useful antlr documentation is in the book the author of antlr wrote, but its well worth the money. you can go from zero to dangerous really quickly with the book and https://github.com/antlr/grammars-v4

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Barnyard Protein posted:

most of the useful antlr documentation is in the book the author of antlr wrote, but its well worth the money. you can go from zero to dangerous really quickly with the book and https://github.com/antlr/grammars-v4

it's basically required reading for antlr but it's worth it

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
i'm always turned off by projects that require me to buy a book to be able to use

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
i only ever read like the first three chapters before getting bored and just starting to make terrible code

Bloody
Mar 3, 2013

tell me more of this antlr thing

it would be very useful for a linter like tool i wanna make

Cybernetic Vermin
Apr 18, 2005

antlr manages to be the best parser generator tool despite being pretty terrible, illustrating the lack of progress in that area of software. notably good it can produce ASTs instead of making you write general code at random points of the parse process, and it discards the exceedingly stupid lexing/parsing subdivide that became law for the usual unix nerd reasons

it is a LL(*) parser generator, using regular lookaheads in a top-down parser, but modified and tweaked in ways not very well understood in theory. there are some very involved choices of prediction techniques and ambiguity detection which literally no person is entirely qualified to make. it gives very good results in typical cases however, and it is nice and friendly to work with

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
I always liked the semantics of PEGs like OMeta better than things like ANTLR. Easier to understand, in my opinion.

crazypenguin
Mar 9, 2005
nothing witty here, move along
i still worship at the alter of the LR gods

...admittedly parser generators pretty much universally suck though.

I could fix that, but I don't know who'd pay me to do it so :effort:

Cybernetic Vermin
Apr 18, 2005

Suspicious Dish posted:

I always liked the semantics of PEGs like OMeta better than things like ANTLR. Easier to understand, in my opinion.

Yep, I entirely agree. They are even less well understood outside of the straight parsing problem, but not in the rather troublesome ambiguity sense of the random context-free subsets used by "classic" parser generators.

They are rather different though, if one goes into the project expecting BNF.

pepito sanchez
Apr 3, 2004
I'm not mexican
Those interested in Haskell:

http://www.seas.upenn.edu/~cis194/spring13/lectures.html

seriously great course so far. through week 4 but i'm having a lot of fun with this. like i said in another thread, it's the first time i've ever had fun with a repl, and getting it all up and running right on emacs is... another learning experience. found here after i saw dude's youtube video searching "haskell emacs" when i was trying to get some kind of decent haskell-mode help. i'll get that poo poo down another day.

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip
blurg the ee on this project has an absurd boner for nickel and diming me on the loving micro, "fifty cents is too expensive" when our bom looks like $60 and our cost including labor is like $85 (we are spending $12 on the drat connector cable and nobody bats an eye)

it's an application where peak current is way more important than average current, and when i pointed out that the fifteen cent micro he's enamored with draws a vastly higher current than the forty cent piece of poo poo we're currently looking at he said we could just run it down to 10 khz and be fine. i've been slumming it running 64mhz micros at 6mhz for years, i've accepted that i'll probably be working with something running at 1mhz for this project, but somebody can suck the fattest part of my rear end in a top hat if they want me to work with something running at two-digit kilohertz

i am going to light the building on fire overnight before i throttle somebody

Jerry Bindle
May 16, 2003

Blotto Skorzany posted:

i am going to light the building on fire overnight before i throttle somebody

same

Jerry Bindle
May 16, 2003
the cost of each part on our BOM ends up being at least multiplied 3x to the customer's price because reasons, so you want to put out a demo board at cost to hype a new part? no gently caress you, someone will have to pay $30 for 1sq" of pcb

JawnV6
Jul 4, 2004

So hot ...
we got new boards in yesterday, im an unshaven mess of anger in a sea of broken promises

due to where im usually typing I'm a bit of an rear end in a top hat in text so im having to triple-check every email to the FAE to make sure im not inadvertently lighting him up

YOU CALL THAT A #DEFINE MOTHERFU

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

Barnyard Protein posted:

the cost of each part on our BOM ends up being at least multiplied 3x to the customer's price because reasons, so you want to put out a demo board at cost to hype a new part? no gently caress you, someone will have to pay $30 for 1sq" of pcb

your marketing people must read the same trade literature as ours

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip

JawnV6 posted:

we got new boards in yesterday, im an unshaven mess of anger in a sea of broken promises

due to where im usually typing I'm a bit of an rear end in a top hat in text so im having to triple-check every email to the FAE to make sure im not inadvertently lighting him up

YOU CALL THAT A #DEFINE MOTHERFU

how bad was the wait between tape-out and the arrival of first articles back at intel btw?

JawnV6
Jul 4, 2004

So hot ...

Blotto Skorzany posted:

how bad was the wait between tape-out and the arrival of first articles back at intel btw?

most folks honestly didn't care. not like CE where you do both design & bringup, it's wholly different teams. pre-si celebrates A0 tapeout and 3/4 of the team is finally allowed to go on vacation, post-si doesn't care because si arrival is still 8 weeks out. there's another stepping built into the schedule, so A0 generally had more and more known-broken stuff

there's a slim group of folks who were similar to me who cared about both, and there are some last-minute checks that happen after. one time i spent a week proving our debug hooks could intercept reset and avoid powering a shorted rail or w/e

powerons were the shittiest weekends ever. 50 folks standing around with nothing to do while 1~2 people who knew what the current breakage was (hint: dance dance revolution) tearing their hair out

wish i'd been at the p4 tho. DOA.

Jerry Bindle
May 16, 2003
i would like to work at intel for a year or longer to get some context for why the intel drop-outs we have act so shell shocked and to learn how another Si company operates. i know my place's process is super broken, but idk in what ways, i have no reference point.

Adbot
ADBOT LOVES YOU

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
we're bringing up our boards for a product that won't launch until 2017, so we decided to get ahead of the game and pick something that would still be early in its lifespan then. welp that means it was publicly announced like a couple months ago and the software support packages came out last week and they're not complete because ti made some fairly baffling choices and now we have this soc that we're figuring out at the same time as ti and goddammit the payoff better be worth it (it will be and i'm also the one who pushed for this so i should shut the gently caress up and do my job)

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