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
Infinotize
Sep 5, 2003

i am going to learn go

Adbot
ADBOT LOVES YOU

HoboMan
Nov 4, 2010

YeOldeButchere posted:

congrats on experiencing the rarest event in the history of the universe i guess

thanks!

database complained about a duplicate primary key being inserted by a stored proc that adds new records using NEWID()

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

HoboMan posted:

also i'm pretty sure i just had a guid collision

i would put money on this being caused by you generating guids incorrectly

statistically, that's many orders of magnitude more likely than you doing it correctly and getting unlucky

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

hobbesmaster posted:

the problem is that programmers that appear to have never heard of composition ruin oop

Exactly. I think OOP is fine as long as you "favor composition over inheritance" as they say.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

YeOldeButchere posted:

congrats on experiencing the rarest event in the history of the universe i guess

my team when i win at dota

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

HoboMan posted:

thanks!

database complained about a duplicate primary key being inserted by a stored proc that adds new records using NEWID()

Is the NEWID() being copied into a variable or temp table or something that persists outside the scope of the proc execution? That seems a heckuva lot more likely.

Mao Zedong Thot
Oct 16, 2008


HoboMan posted:

is oop actually bad? i personally hate it but i'm a terrible programmer

oop is not innately bad, it's just like one of several tools you may consider using to organize and design things with your brain

bad programmers seizing on oop as the be all end all of software design is pretty bad tho -- and then doubling down by solving any problems they encounter with heavier and heavier oop abstractions

Bloody
Mar 3, 2013

testing neual networks on an atom processor is kind of lol

HoboMan
Nov 4, 2010

also yes i am aware i am probably missing something but i want to belive

VikingofRock
Aug 24, 2008




HoboMan posted:

also i'm pretty sure i just had a guid collision

Well are you generating 1.25 * 2^64 GUIDs?

Sapozhnik
Jan 2, 2005

Nap Ghost

HoboMan posted:

is oop actually bad? i personally hate it but i'm a terrible programmer

"Object oriented programming is a term that encompasses many ideas. Half of them are obvious. The other half are mistakes."

I think that was from Alan Kay?

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i think the thing people really like about object oriented programming is using the dot operator

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.
I can't lie, I really loving love using the dot operator. That's why I prefer the function chain LINQ to the lovely query notation.

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal

Bloody posted:

testing neual networks on an atom processor is kind of lol

why? training them on one would be a waste of time for anything bigger than a toy model, but i can see one that's already been trained being used there, so you'd want to see how it performs

HoboMan
Nov 4, 2010

MALE SHOEGAZE posted:

i think the thing people really like about object oriented programming is using the dot operator

i'd like to just dot operator chain every step in my entire program please

hobbesmaster
Jan 28, 2008

i'm sure boost spirit can make that happen

AWWNAW
Dec 30, 2008

Finster Dexter posted:

I can't lie, I really loving love using the dot operator. That's why I prefer the function chain LINQ to the lovely query notation.

if you do query notation right and squint, it's just like F#

HoboMan
Nov 4, 2010

Finster Dexter posted:

I can't lie, I really loving love using the dot operator. That's why I prefer the function chain LINQ to the lovely query notation.

there's a function in my codebase that is entirely comprised of a 30 line linq statement using the query syntax that i just refuse to even try to read

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
that reminds me of the notorious 12 lines statement composed entirely of ternary operators (multiple per line) in a 16,000 lines .cpp file that was computing the value of a global state enum used in hundreds if not thousands of places i've seen in a past project. you'd be debugging something and anxiety would slowly build up as you moved up the callstack and got closer and closer to login.cpp because you knew that if you tracked down the issue to that file, your options were to gently caress with it and break a million things or apply some band-aid solution somewhere below in the callstack

anyone with half a brain chose the latter option because loving with that kind of poo poo is the first step to getting blamed when things go south

jesus WEP
Oct 17, 2004


linq query notation is bad because it just looks like a sql markov chain. embrace the dot

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

hobbesmaster posted:

i'm sure boost spirit can make that happen

can't overload the dot operator in c++. stroustrup wants to make it happen but like with unified call syntax, even he can't come up with an unambiguous specification

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
i've always figured that the problem with overloading the . operator in c++ is that sooner or later you're gonna have to mess with whatever member variables you have in your class. and that's going to be done through either this->_butt or (*this)._butt, but either way you'll end up with some infinite recursion somewhere

Condiv
May 7, 2008

Sorry to undo the effort of paying a domestic abuser $10 to own this poster, but I am going to lose my dang mind if I keep seeing multiple posters who appear to be Baloogan.

With love,
a mod


AWWNAW posted:

three times in as many months an internal recruiter has invited me to interview and then backed off when figuring out i dropped out of college for a job

i like my job and not even looking right now but getting negged by invitation is starting to piss me off. i kinda want to go back to school anyway but i have like 16 yrs exp (level 99 code mage) and i'm having trouble rationalizing it

signed,
a terrible programmar

i'm kinda worried about this too. i dropped out of my final year of my cs program to get a job in france, and though i have a masters degree now i never actually got a bachelors

Lutha Mahtin
Oct 10, 2010

Your brokebrain sin is absolved...go and shitpost no more!

Shaman Linavi posted:

my algorithms class was taught by a dude that used kinesthetic learning
this meant we would all stand up in class while he or another student would physically sort us or whatever

and let me tell you, it sure as hell worked because i dont think ill ever forget how to quicksort

our networking professor taught protocol by passing out sheets of paper to each student that said (a) you are number N, (b) you have messages A, B, C, and (c) you must deliver these messages to X, Y, Z. then after everyone read their sheet, he said "go!"

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

YeOldeButchere posted:

i've always figured that the problem with overloading the . operator in c++ is that sooner or later you're gonna have to mess with whatever member variables you have in your class. and that's going to be done through either this->_butt or (*this)._butt, but either way you'll end up with some infinite recursion somewhere

no that's not a problem, this is always a raw pointer and this->butt_ (underscore in front is resevred, ugh) never calls any user defined code

hobbesmaster
Jan 28, 2008

Condiv posted:

i'm kinda worried about this too. i dropped out of my final year of my cs program to get a job in france, and though i have a masters degree now i never actually got a bachelors

if a background check came back confirming a master's but not confirming the bachelor's HR would probably blame the background check company

comedyblissoption
Mar 15, 2006

so loving future posted:

oop is not innately bad, it's just like one of several tools you may consider using to organize and design things with your brain

bad programmers seizing on oop as the be all end all of software design is pretty bad tho -- and then doubling down by solving any problems they encounter with heavier and heavier oop abstractions
a popular hypothesis is that most programs should mostly be structured fundamentally as a bunch of state that is transformed into new state by a bunch of pure, stateless functions if you care about scaling the complexity of a program

mainstream OOP languages heavily discourage you from structuring your programs like the above so OOP might be fundamentally bad

comedyblissoption
Mar 15, 2006

Mr Dog posted:

This also doesn't make much sense to me, I'm afraid.

The whole point of using a linked list is to be able to insert and remove things from the middle of the list quickly. Backing your linked list with a slab allocator will speed up rapid allocations and deallocations but it won't do anything to help your cache usage, because the order in which your nodes gets traversed will get jumbled very quickly on account of all those insertions and removals in the middle. Having all the nodes be located in vaguely the same area of memory doesn't change that.

If you only need to insert and remove things at the start and end, and you also need to optimize for traversal performance, then the data structure you're looking for is a ring buffer, not a linked list.
https://www.youtube.com/watch?v=YQs6IC-vgmo
linked lists are ridiculously bad for performance due to poor use of the CPU cache

your default container should be a vector

Bloody
Mar 3, 2013

YeOldeButchere posted:

why? training them on one would be a waste of time for anything bigger than a toy model, but i can see one that's already been trained being used there, so you'd want to see how it performs

it is a toy model

Bloody
Mar 3, 2013

i have been going through a learn about neural networks phase. it is cool. my computer can identify mnist handwriting digits p deecently

comedyblissoption
Mar 15, 2006

here's a good article about why you should heavily prefer vectors over linked lists

https://kjellkod.wordpress.com/2012/02/25/why-you-should-never-ever-ever-use-linked-list-in-your-code-again/

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
that's a lot of words for "hardware engineers are lazy idiot fuckers that prefer to copy and paste existing designs and add layers of cache instead of giving us processors that actually fit the ram+register model described in reference material"

why haven't you morons cranked up cpu frequency to 100GHz yet????

Bloody
Mar 3, 2013

sometimes it fucks up


but sometimes it works well

:3:

tbf i think that 9 looks like a 4 so i will take this subpar performance and call it good and continue iterating on new and/or different poo poo

Bloody
Mar 3, 2013

also math.net numerics is good and performant

Zaxxon
Feb 14, 2004

Wir Tanzen Mekanik

Bloody posted:

i have been going through a learn about neural networks phase. it is cool. my computer can identify mnist handwriting digits p deecently

what's that neural network tutorial page that starts with that?

Bloody
Mar 3, 2013

i would tell you but its at best not very good so

Zaxxon
Feb 14, 2004

Wir Tanzen Mekanik

Bloody posted:

i would tell you but its at best not very good so

oh word, got any better ones?

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
mnist is like the hello world of nn these days. i'm pretty sure this is what the tensorflow tutorial does, for example, but it's been a while since i've looked at that

Shaggar
Apr 26, 2006

fritz posted:

ive barely touched a maven but given a choice between xml and makefile syntax

xml ftw

Adbot
ADBOT LOVES YOU

VikingofRock
Aug 24, 2008




hackbunny posted:

can't overload the dot operator in c++. stroustrup wants to make it happen but like with unified call syntax, even he can't come up with an unambiguous specification

This is probably going to be fairly strong evidence that I belong in this thread, but I came up with a use for operator.() the other day that wasn't a smart reference or whatever. I was thinking it would be neat to make a Cached<T> template that would overload operator.() to access a cache of values for that function. So like you could do this:

C++ code:
Cached<Foo> foo; //this would call Foo's default constructor
std::cout << foo.bar(3) << std::endl; // this would calculate bar(3) for the Foo stored in foo and store the result in a cache
std::cout << foo.bar(3) << std::endl; // this would just use the cached result from above
Anyways that's probably an awful idea and I'm not totally sure how it would work but I'm pretty sure it'd be possible and that's my story.

  • Locked thread