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
Bloody
Mar 3, 2013

did you know? you cannot represent all digits of pi in base ten, owned mathailures

Adbot
ADBOT LOVES YOU

Notorious b.s.d.
Jan 25, 2003

by Reene

Jeffrey of YOSPOS posted:

I'm glad that x86 has special instructions to, after adding two numbers, "clean up" the result as if those numbers had actually been BCD.

for extra credit, are these instructions actually faster than doing it in software?

JawnV6
Jul 4, 2004

So hot ...

Notorious b.s.d. posted:

for extra credit, are these instructions actually faster than doing it in software?

no

Jerry Bindle
May 16, 2003
why do they exist?

tef
May 30, 2004

-> some l-system crap ->
someone with a lot of money needed them

Notorious b.s.d.
Jan 25, 2003

by Reene
it probably made sense in the 1980s when the 386 isa was defined

nothing in x86 ever seems to get removed, just more added

Jerry Bindle
May 16, 2003
i tried to read a 586 architecture book once. i actually understood some of the words in it and i got the sense that x86 is legacy_support.txt

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Notorious b.s.d. posted:

nothing in x86 ever seems to get removed, just more added

Your new processor still needs to be able to execute all your old software that you still want to use with it. If you break software compatibility it isn't really x86 any more, it's a new dialect that just happens to resemble it...

JawnV6
Jul 4, 2004

So hot ...

JawnV6 posted:

whats a parser and why do I want one
given the inflection i was assuming a lengthy explanation describing what i've already written but in a way that snidely mocked me, whos slacking off

Notorious b.s.d. posted:

nothing in x86 ever seems to get removed, just more added
not true, x86/64 has some opcodes removed/redefined

Jabor posted:

Your new processor still needs to be able to execute all your old software that you still want to use with it. If you break software compatibility it isn't really x86 any more, it's a new dialect that just happens to resemble it...
if y'all think the ISA is saddled with a bunch of legacy garbage, the larger platform is much much worse. mrc, vga,

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
don't forget to toggle your A20 gate every startup

VikingofRock
Aug 24, 2008




So tonight my first official contribution to open source got merged! It was removing an outdated lint in the Rust compiler. I feel pretty cool! Thanks to this thread for getting me inspired to actually go out and contribute. :cheers:

edit: specifically it was this post that got me to do it:

fart simpson posted:

do it. there's a lot of cool open source projects out there that have stuff that needs doing but nobody to do it

VikingofRock fucked around with this message at 08:35 on Nov 18, 2015

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

:tipshat:

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

tef posted:

did you get fishmeched on facebook

worse, I fishmeched someone on facebook and then shitposted when it got hopeless I just hope I didn't alienate a potential future employer :newlol:

well at least I was reminded of this remarkable little library

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
shitposting wasn't very fishmech of me and I apologize

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

hackbunny posted:

just got into an incredibly stupid discussion on facebook (!)

guy demonstrates floating point loss of precision with excel, subtracting 0.01 a hundred times from 1, result is not exactly zero. he's all insufferable nerd like "free ice cream to the first non-computer guy who can explain why in 10 words or less :smug:", finally "ends the contest" all disappointed with his fb friends, explaining floating point, how 1/10 can't be represented exactly in base 2, etc. and some incredible poo poo on how BCD is the only way to get an exact result. what the gently caress, right? I make an effortpost on rationals and fixed point and arbitrary precision, and he uh, just does not understand what rationals are. I mean he does in a purely theoretical way but it's clear he's never used them in software like ever. seems to confuse the textual representation of 1/3 (literally infinite) with the in-memory representation (literally a 1 followed by a 3 for a total of 3 bits before rounding/overhead). he immediately moves the goalposts to a matter of orders of magnitude, who the gently caress cares though? you want approximate results but more precision than a 64 bit IEEE float, you use arbitrary precision floating point, there are plenty of libraries, nobody forces you to use the hardware-provided floats. I specifically included arbitrary precision floating point and a disclaimer about space/time complexity because you're dealing with nerds, you rules-lawyer up. also did you know that to do exact calculations with numbers like 0.1 you need a symbolic mathematics engine??? literal argument made by him, the solution to the rounding issue besides BCD (!!!)

also smug about not using windows when I told him that the windows calculator can add and subtract 0.1, 0.01, etc. just fine (of loving course it uses rationals internally, except for irrationals which are stored as decimal fixed point with IIRC 64 decimal places), so I told him, try it with bc, in fact script it with bc and see if the result isn't 100% exact every single time, must be magic or some sci-fi-level symbolic calculator poo poo and not basically 9th grade arithmetic. but no it doesn't scale and can't calculate the fisher test for a large population in useful time so it must be some toy that's never used anywhere by anyone and not say a hugely popular software package old enough to drive, vote and drink

BCD, loving seriously? he's an old so it's somewhat excusable but does he really think the world never moved on from there?

this is one of my favorite posts itt

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

jony neuemonic posted:

sql is a good dsl for working with data and using orms discourages you from learning and using it.
can you explain how you handle (without any orm) dynamically building up a query, e.g. when you have a bunch of search fields that may or may not be filled in?

jesus WEP
Oct 17, 2004


use a stored proc with optional parameters, then theres a bit of boilerplate in your sql to null check

Stringent
Dec 22, 2004


image text goes here
just, whatever you do, don't do it through string concatenation

jesus WEP
Oct 17, 2004


yeah dont be tempted to write dynamic sql in ur proc, that way trouble lies

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
drat, trap remains unsprung

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Sagacity posted:

can you explain how you handle (without any orm) dynamically building up a query, e.g. when you have a bunch of search fields that may or may not be filled in?

use something like arel

Bloody
Mar 3, 2013

string query = "SELECT " + select + " FROM " +table; // TODO: improve this somehow?

The Leck
Feb 27, 2001

Bloody posted:

string query = "SELECT " + select + " FROM " +table; // TODO: improve this somehow?
string query = String.Format("SELECT {0} FROM {1}", select, table); // FIXED

Bloody
Mar 3, 2013

var query = $"SELECT {select} FROM {table}"; // updated for new features

Luigi Thirty
Apr 30, 2006

Emergency confection port.

mysql_real_escape_string(query) :twisted:

travelling wave
Nov 25, 2013

Barnyard Protein posted:

why do they exist?

tef posted:

someone with a lot of money needed them

one of the early markets for microprocessors was desktop and handheld calculators. it makes sense to use bcd as the number format there since the output would have been seven segment displays for each digit and you would need to convert it to something bcd-like anyway

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Luigi Thirty posted:

mysql_real_escape_string(query) :twisted:

i love this function

Captain Foo
May 11, 2004

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

i set up intellij for erlang and let me tell you having a sweet IDE doesn't mean you have any idea at all what you're doing

Captain Foo
May 11, 2004

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

it looks a lot nicer than notepad++ tho

jesus WEP
Oct 17, 2004


Captain Foo posted:

i set up intellij for erlang and let me tell you having a sweet IDE doesn't mean you have any idea at all what you're doing
it means you look the part tho and in a work environment thats 90% of the battle

jesus WEP
Oct 17, 2004


being able to whizz around an ide is almost guaranteed to impress your manager more than being able to write good code

they aren't listening to a god damned word you say anyway

Captain Foo
May 11, 2004

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

this is a side project that has 0 to do with my job but i am doing for fun in downtime

Jerry Bindle
May 16, 2003
is there a C source code style guide for accessibility?

i remember reading somewhere a while back that screen readers could handle some syntax better than others. like, putting a space between 'if' and '(', so if (, not if(

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

St Evan Echoes posted:

being able to whizz around an ide is almost guaranteed to impress your manager more than being able to write good code

they aren't listening to a god damned word you say anyway

all of our managers are programmers, all the way to the top. even the ceo and pres were programmers before they became money golems. there is no fooling anybody about your coding skills around here.

Jerry Bindle
May 16, 2003

LeftistMuslimObama posted:

became money golems.
lmbo, my life goal

Jeffrey of YOSPOS
Dec 22, 2005

GET LOSE, YOU CAN'T COMPARE WITH MY POWERS

LeftistMuslimObama posted:

all of our managers are programmers, all the way to the top. even the ceo and pres were programmers before they became money golems. there is no fooling anybody about your coding skills around here.
you will grow and learn in your career, and develop the tools to fool even the experts into thinking you write code at work

jesus WEP
Oct 17, 2004


LeftistMuslimObama posted:

all of our managers are programmers, all the way to the top. even the ceo and pres were programmers before they became money golems. there is no fooling anybody about your coding skills around here.
that sounds good

Valeyard
Mar 30, 2012


Grimey Drawer

St Evan Echoes posted:

being able to whizz around an ide is almost guaranteed to impress your manager more than being able to write good code

they aren't listening to a god damned word you say anyway

Hell yeah, people lol at me for using Eclipse and blindly say "lol use intellij :smuggo:" but if they could see me actually using Eclipse they would have no idea what I'm doing or how I'm doing it

Meanwhile I get a message on lync with someone asking me how they can do a complete source code search in intellij

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Valeyard posted:

Hell yeah, people lol at me for using Eclipse and blindly say "lol use intellij :smuggo:" but if they could see me actually using Eclipse they would have no idea what I'm doing or how I'm doing it

Meanwhile I get a message on lync with someone asking me how they can do a complete source code search in intellij

open the terminal, type ag 'foo'

Adbot
ADBOT LOVES YOU

MeruFM
Jul 27, 2010

Valeyard posted:

Hell yeah, people lol at me for using Eclipse and blindly say "lol use intellij :smuggo:" but if they could see me actually using Eclipse they would have no idea what I'm doing or how I'm doing it

Meanwhile I get a message on lync with someone asking me how they can do a complete source code search in intellij

most people here haven't used an IDE since college

my manager makes fun of people who have their vim way too pimped out

  • Locked thread