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
pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
has anyone made the go 2 considered harmful joke on this page

Adbot
ADBOT LOVES YOU

gonadic io
Feb 16, 2011

>>=

https://twitter.com/daemon404/status/1068195760704012294

rust is a cult, says golang user

CPColin
Sep 9, 2003

Big ol' smile.

pokeyman posted:

has anyone made the go 2 considered harmful joke on this page

Don't think so

necrotic
Aug 2, 2005
I owe my brother big time for this!

Kevin Mitnick P.E. posted:

do you mean scale 7 or 7 significant digits

quote:

All numbers have a fixed 7 decimal places, and the maximum permitted value is +- 99999999999, or just under 100 billion.

necrotic
Aug 2, 2005
I owe my brother big time for this!
it also appears to use floats for any division of two "Fixed" numbers. nice

simble
May 11, 2004

yikes

edit: had to look because no way it works that way

code:
func (f Fixed) Div(f0 Fixed) Fixed {
	if f.IsNaN() || f0.IsNaN() {
		return NaN
	}
	return NewF(f.Float() / f0.Float())
}
loving lmbo what is even the point??

simble fucked around with this message at 23:17 on Nov 29, 2018

Volte
Oct 4, 2004

woosh woosh
code:
const MAX = float64(99999999999.9999999)

Volte
Oct 4, 2004

woosh woosh
code:
func (f Fixed) Add(f0 Fixed) Fixed {
	if f.IsNaN() || f0.IsNaN() {
		return NaN
	}
	return Fixed{fp: f.fp + f0.fp}
}
since NaN is just a particular bit pattern stored in 'fp', if you add the right combination of these pieces of poo poo together you'll eventually end up with NaN lmao

Asleep Style
Oct 20, 2010

So I want to learn C++. Does anyone have any book recommendations for modern C++? I'm worried if I just start googling and trying things that I'll end up writing C with classes and my code will be posted to this thread for eternity.

Nomnom Cookie
Aug 30, 2009



modern c++ is c with templates and an angry horde of nerds strangles you if you use a pointer or throw an exception

gonadic io
Feb 16, 2011

>>=

Asleep Style posted:

So I want to learn C++. Does anyone have any book recommendations for modern C++? I'm worried if I just start googling and trying things that I'll end up writing C with classes and my code will be posted to this thread for eternity.

Necronomicon, if you get the first edition it's bound in real human flesh

Asleep Style
Oct 20, 2010

Kevin Mitnick P.E. posted:

modern c++ is c with templates and an angry horde of nerds strangles you if you use a pointer or throw an exception

pointers kick rear end tho

Nomnom Cookie
Aug 30, 2009



Asleep Style posted:

pointers kick rear end tho

yeah i know but c++ programmers are dumb

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Asleep Style posted:

So I want to learn C++. Does anyone have any book recommendations for modern C++? I'm worried if I just start googling and trying things that I'll end up writing C with classes and my code will be posted to this thread for eternity.

there’s a book called “modern c++” that I think is good idk I never read it

once you have a basic command of the language read and follow these

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
in c++ you have references, which are pointers except you don't need to use ->

Asleep Style
Oct 20, 2010

Kevin Mitnick P.E. posted:

yeah i know but c++ programmers are dumb

Sounds like I'll fit right in.

Phobeste posted:

there’s a book called “modern c++” that I think is good idk I never read it

once you have a basic command of the language read and follow these

Word, thanks.

The_Franz
Aug 8, 2003

Kevin Mitnick P.E. posted:

modern c++ is c with templates and an angry horde of nerds strangles you if you use a pointer or throw an exception

and if you write "proper" modern c++ another angry hoard of nerds will strangle you because you're making an unreadable nested template nightmare or not using their preferred subset of features

there is no way to win at c++

fritz
Jul 26, 2003

The_Franz posted:

making an unreadable nested template nightmare

hi yes this is my current hell someone give me a new job

Nomnom Cookie
Aug 30, 2009



still waiting for c with typeclasses :/

akadajet
Sep 14, 2003

pokeyman posted:

has anyone made the go 2 considered harmful joke on this page

that's pretty good imo

Volte
Oct 4, 2004

woosh woosh
c++'s unique strength is writing parameterized programs that generate specific programs, which is something that most people don't want to do most of the time. they want to write the specific programs directly. it takes a ton of code and consideration of minutiae to write a "correct" C++ template that is suitable for inclusion in a library and people get salty over that fact because they just want to parameterize over the type of some operation and not worry about every potential interaction with other client code's reference types etc

luckily i haven't had to write c++ recently but any template that i'm writing that's not going into a library (which is all of them since i don't write libraries) is probably not going to cover every edge case wrt perfect forwarding and other poo poo that will end up getting compiled out or not even instantiated in the first place because im only instantiating it with ints. it's basically a case of premature optimization if you're working overtime to satisfy client constraints that you made up yourself for no reason

redleader
Aug 18, 2005

Engage according to operational parameters
yeah, but on the other hand, who cares if you vanish into your own rear end in a top hat perfecting your template code?

elite_garbage_man
Apr 3, 2010
I THINK THAT "PRIMA DONNA" IS "PRE-MADONNA". I MAY BE ILLITERATE.
c++ is too hard

elite_garbage_man fucked around with this message at 06:14 on Nov 30, 2018

gonadic io
Feb 16, 2011

>>=

Kevin Mitnick P.E. posted:

still waiting for c with typeclasses :/

It's called Rust friend

Chalks
Sep 30, 2009

Just reviewing some of our business logic and came across this

code:
                    switch (res.StatusCode)
                    {
                        case HttpStatusCode.NoContent:
                            //good
                            break;
                        case HttpStatusCode.BadRequest:
                            //bad request? missing something?
                            break;
                        case HttpStatusCode.Unauthorized:
                            //bad token
                            break;
                        case HttpStatusCode.PreconditionFailed:
                            //cant confirm quote in this state
                            break;
                        case HttpStatusCode.NotImplemented:
                            //not yet done, good
                            break;
                        case HttpStatusCode.InternalServerError:
                            //bad, something went wrong
                            break;
                        default:
                            //???
                            break;
                    }
I guess that's technically error handling

Asleep Style
Oct 20, 2010

Volte posted:

c++'s unique strength is writing parameterized programs that generate specific programs, which is something that most people don't want to do most of the time. they want to write the specific programs directly. it takes a ton of code and consideration of minutiae to write a "correct" C++ template that is suitable for inclusion in a library and people get salty over that fact because they just want to parameterize over the type of some operation and not worry about every potential interaction with other client code's reference types etc

luckily i haven't had to write c++ recently but any template that i'm writing that's not going into a library (which is all of them since i don't write libraries) is probably not going to cover every edge case wrt perfect forwarding and other poo poo that will end up getting compiled out or not even instantiated in the first place because im only instantiating it with ints. it's basically a case of premature optimization if you're working overtime to satisfy client constraints that you made up yourself for no reason

This is a really interesting post. Gonna have to think hard about if these are the type of problems I would like to have at my job.

Sagebrush
Feb 26, 2012

i'm working on a project that needs to be able to detect the presence of one specific object in a video stream. imagine like jian-yang's hot dog/not hot dog software, essentially, but maybe even simpler because i'm looking for literally the same object over and over again instead of a general category of hot dogs. however, the object has a fairly complex shape and i need to be able to detect it from any angle.

i feel like this can be done fairly reliably today on desktop hardware with a well-trained neural network, but I don't know anything about what software i should be looking into. anyone got any names?

elcannon
Jun 24, 2009

Sagebrush posted:

i'm working on a project that needs to be able to detect the presence of one specific object in a video stream. imagine like jian-yang's hot dog/not hot dog software, essentially, but maybe even simpler because i'm looking for literally the same object over and over again instead of a general category of hot dogs. however, the object has a fairly complex shape and i need to be able to detect it from any angle.

i feel like this can be done fairly reliably today on desktop hardware with a well-trained neural network, but I don't know anything about what software i should be looking into. anyone got any names?

I did something similar a while ago using tensorflow without too much headache. I followed whatever docs they had at the time which basically involved getting two sets of images, one with the object in it and one without. Then it was pretty much just passing the paths to those sets as args into 'train.py' and waiting. Searching for "tensorflow object detection training" looks like it gives some decent tutorials.

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

Volte posted:

c++'s unique strength is writing parameterized programs that generate specific programs, which is something that most people don't want to do most of the time. they want to write the specific programs directly. it takes a ton of code and consideration of minutiae to write a "correct" C++ template that is suitable for inclusion in a library and people get salty over that fact because they just want to parameterize over the type of some operation and not worry about every potential interaction with other client code's reference types etc

luckily i haven't had to write c++ recently but any template that i'm writing that's not going into a library (which is all of them since i don't write libraries) is probably not going to cover every edge case wrt perfect forwarding and other poo poo that will end up getting compiled out or not even instantiated in the first place because im only instantiating it with ints. it's basically a case of premature optimization if you're working overtime to satisfy client constraints that you made up yourself for no reason

Is this why game engines are written in c++? because they're literally programs that are generating specific game programs?

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

Finster Dexter posted:

Is this why game engines are written in c++? because they're literally programs that are generating specific game programs?

it’s mostly that c++ will be portable across multiple platforms and has the correct balance of performance and convenience for things like games

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


hellll yes, spent the entire afternoon documenting something I did months ago and remembered how clever it is :feelsgood:

otoh pretty sure nobody else reads our confluence site apart from me

gonadic io
Feb 16, 2011

>>=

Powerful Two-Hander posted:

hellll yes, spent the entire afternoon documenting something I did months ago and remembered how clever it is :feelsgood:

otoh pretty sure nobody else reads our confluence site apart from me

at least go to the bathroom to jo like that

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



gonadic jo denial

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


gonadic io posted:

at least go to the bathroom to jo like that

i can't charge my crystal if there's nobody else with me

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Powerful Two-Hander posted:

i can't charge my crystal if there's nobody else with me

so that is the two-handed technique. powerful. :hmmyes:

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

lmbo at the last four posts

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


Krankenstyle posted:

so that is the two-handed technique. powerful. :hmmyes:

:feelsgood:

edit: definitely compared to the German "broken" style

fritz
Jul 26, 2003

Sagebrush posted:

i'm working on a project that needs to be able to detect the presence of one specific object in a video stream. imagine like jian-yang's hot dog/not hot dog software, essentially, but maybe even simpler because i'm looking for literally the same object over and over again instead of a general category of hot dogs. however, the object has a fairly complex shape and i need to be able to detect it from any angle.

i feel like this can be done fairly reliably today on desktop hardware with a well-trained neural network, but I don't know anything about what software i should be looking into. anyone got any names?

are you trying to find the location of the object within the image or just whether or not the image has the object in it?

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Powerful Two-Hander posted:

:feelsgood:

edit: definitely compared to the German "broken" style

all man bracing

Adbot
ADBOT LOVES YOU

Nomnom Cookie
Aug 30, 2009



gonadic io posted:

It's called Rust friend

i said c with typeclasses not impl CompilerFucksYouForever for C

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