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
Malcolm XML
Aug 8, 2009

I always knew it would end like this.
paging hackbunny

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

pseudorandom name posted:

its kind of dumb -- the conceptual design is good, but the nitty gritty details of how the API actually works are a little bit crap.

the file handle, buffer address, buffer size, and APC function pointer are passed directly as parameters to e.g. ReadFileEx, but the file offset and notification event handle are packaged up in an OVERLAPPED struct with some internal data members for no apparent reason.

and then you have the CreateIoCompletionPort function, which can create an IOCP, associate a file handle with an existing IOCP, or simultaneously create an IOCP and associate a file handle with it, because it sure makes sense to cram all three things into one function called Create.

i was extremely baffled by it when i tried to use it for some USB device via c# the docs were just like "pass in an overlapped struct pointer or not" and i was like wtf??? so i just used their lovely half-broken blocking call instead. the whole thing was a little half baked and i assume that the usb device vendor is entirely at fault

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
A programmer needed to process data faster than his hardware could support. "I know," he said, "I'll use threads." Now he has ten problems.

MononcQc
May 29, 2007

Gazpacho posted:

A programmer needed to process data faster than his hardware could support. "I know," he said, "I'll use threads." Nwlepr h eohn tas es.obm

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)


here's what happens if you run every iteration of fizzbuzz on its own thread with no synchronization

code:
12F14BBFF2728FFBB21FF2121FF3131FF3BB4FF3434F44F4BF55FB5F55F66F6BF66FB7F77F77F7BF88FB8F88FF9
9F9BF99FB
i9
uuiui23iu6i89i12i4ui78iu1i34i67i9ui23iu6i8912i4uii8iu
zzzzz

zz
z

z

z
zz

zz
z

z

z
zz
2
zz
z




z
zzzz
zzzzzzzzzzz3zzzzzzzzzz
zzzzzzzzzz


i





B



i


B
u

u








6
zuzuzz
zzzzzz
1z
z

ii8394ii1627ii4uu1ii7384i67i9ii7zz
zz
zz



z

z
zz
zzzzzzzzzz







BBuuzzzz




zzzz





zzBuzz
zzBuzz


Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
that's not the output I got

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
How do you tell a co-worker to write a loop instead of copypasting a block 20 times without sounding rude

MononcQc
May 29, 2007

curl + xargs is cool

ultravoices
May 10, 2004

You are about to embark on a great journey. Are you ready, my friend?

Gazpacho posted:

How do you tell a co-worker to write a loop instead of copypasting a block 20 times without sounding rude

your failure to use iteration deeply upsets the wa

Sweeper
Nov 29, 2007
The Joe Buck of Posting
Dinosaur Gum

Gazpacho posted:

How do you tell a co-worker to write a loop instead of copypasting a block 20 times without sounding rude

highlight the first one and write "loop?"

Hollow Talk
Feb 2, 2014

Sweeper posted:

highlight each one and write "loop?" underneath each

ComradeCosmobot
Dec 4, 2004

USPOL July

Sweeper posted:

highlight each one and write "loop?" underneath each

if you don't do this they will almost certainly miss fixing at least one of them

Fergus Mac Roich
Nov 5, 2008

Soiled Meat

Gazpacho posted:

How do you tell a co-worker to write a loop instead of copypasting a block 20 times without sounding rude

code review

CPColin
Sep 9, 2003

Big ol' smile.

Sweeper posted:

highlight the entire block and write "poop?"

Workaday Wizard
Oct 23, 2009

by Pragmatica

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Gazpacho posted:

How do you tell a co-worker to write a loop instead of copypasting a block 20 times without sounding rude

Every morning before he gets to work remove the Ctrl, C, and V keys from his keyboard. Keep doing this until he gets the hint.

AWWNAW
Dec 30, 2008

Gazpacho posted:

How do you tell a co-worker to write a loop instead of copypasting a block 20 times without sounding rude

perhaps it is you that is the idiot here. through extensive profiling they may have found unrolling the loop by hand is trés performant

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
more like noobfiling

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

AWWNAW posted:

perhaps it is you that is the idiot here. through extensive profiling they may have found unrolling the loop by hand is trés performant

through extensive profiling I have discovered that you used the wrong accent in très

AWWNAW
Dec 30, 2008

I am not owned

JawnV6
Jul 4, 2004

So hot ...

AWWNAW posted:

I am not owned

SPIN_LOCK_ALREADY_OWNED

VikingofRock
Aug 24, 2008




JawnV6 posted:

SPIN_LOCK_ALREADY_OWNED

Bloody
Mar 3, 2013

JawnV6 posted:

SPIN_LOCK_ALREADY_OWNED

Soricidus
Oct 21, 2010
freedom-hating statist shill

JawnV6 posted:

SPIN_LOCK_ALREADY_OWNED

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

JawnV6 posted:

SPIN_LOCK_ALREADY_OWNED

AggressivelyStupid
Jan 9, 2012

JawnV6 posted:

SPIN_LOCK_ALREADY_OWNED

DrPossum
May 15, 2004

i am not a surgeon

JawnV6 posted:

SPIN_LOCK_ALREADY_OWNED

compuserved
Mar 20, 2006

Nap Ghost

JawnV6 posted:

SPIN_LOCK_ALREADY_OWNED

ThePeavstenator
Dec 18, 2012

:burger::burger::burger::burger::burger:

Establish the Buns

:burger::burger::burger::burger::burger:

JawnV6 posted:

SPIN_LOCK_ALREADY_OWNED

Beldantazar
Sep 10, 2011

JawnV6 posted:

SPIN_LOCK_ALREADY_OWNED

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

JawnV6 posted:

SPIN_LOCK_ALREADY_OWNED

AWWNAW
Dec 30, 2008

gently caress me the ownage is reentrant

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
a very yospos page indeed.

Max Facetime
Apr 18, 2009

https://en.wikipedia.org/wiki/Deductive_lambda_calculus posted:

Alonzo Church invented the lambda calculus in the 1930s, originally to provide a new and simpler basis for mathematics.[1][2] However soon after inventing it major logic problems were identified with the definition of the lambda abstraction: The Kleene–Rosser paradox is an implementation of Richard's paradox in the lambda calculus.[3] Haskell Curry found that the key step in this paradox could be used to implement the simpler Curry's paradox. The existence of these paradoxes meant that the lambda calculus could not be both consistent and complete as a deductive system.[4]

Haskell Curry studied of illative (deductive) combinatory logic in 1941.[5] Combinatory logic is closely related to lambda calculus, and the same paradoxes exist in each.

Later the lambda calculus was resurrected as a definition of a programming language.

seems kinda ironic that the PLs most inspired contaminated by the lambda calculus are also used by the more "mathematically orientated" programmers :thumbsup:

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
welcome to 20th century mathematics, where no advanced logics at all are both consistent and complete

you can view the static/dynamic split in pl design as the two branching paths here if you like, it's not completely misleading

tef
May 30, 2004

-> some l-system crap ->

rjmccall posted:

welcome to 20th century mathematics, where no advanced logics at all are both consistent and complete

you can view the static/dynamic split in pl design as the two branching paths here if you like, it's not completely misleading

i get this but it's more like we aren't making a useful division between static/dynamic

Sapozhnik
Jan 2, 2005

Nap Ghost
use a lang with structural typing and type inference

best of both worlds

tef
May 30, 2004

-> some l-system crap ->
i feel like the dynamic vs static thing is a holdover from how we've slowly been implementing languages


early defs were about runtime:

it ran in an interpreter (hello early lisps, and maybe pascals)

vs created a binary


defs were about type conversion too, but weak/strong seems to have come along

implicit casts (hello tcl everything is a string, also scala)

vs explicit casts (hello not being able to promote an int to a float)


although sometimes people use it to mean:

structural typing (does it have these attributes, cf row polymorphism, golang, duck-typing)

nominative typing (does it have right name, gigantic subclass heirarchies)


throw in weird languages like Strongtalk, which had an optional static type checker ignored by the runtime, it all gets a little odd

The Collector
Aug 9, 2011

I've seen things you people wouldn't believe.
Rats raining down in the night during the Stanley Cup finals.
All those moments will be lost in time, like tears in rain.
Pillbug
i want boring corporate money. Java or C#?

Adbot
ADBOT LOVES YOU

MrMoo
Sep 14, 2000

App servers or desktop apps? I think Java + app server is probably more widespread.

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