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
DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

LeftistMuslimObama posted:

lol


hell yeah i want it another way. i want option types and sensible behavior of logical operators. wtf, our internal training is 100% dedicated to ensuring you drink the koolaid on whatever we use.

you know javascript is bad when a mumps developer takes issue

Adbot
ADBOT LOVES YOU

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
there's something satisfying about writing trivial JavaScript code. maybe that's why it's so popular in

gonadic io
Feb 16, 2011

>>=

Powerful Two-Hander posted:

2. i sent the new dev off [...], two weeks later

this one is your fault to be fair

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Sapozhnik posted:

tiny bugs child

JawnV6
Jul 4, 2004

So hot ...

Bloody posted:

the always-brilliant dan luu wrote a bunch more about verilog weirdness here: http://danluu.com/why-hardware-development-is-hard/

so our languages are bad, and this is widely recognized. enter many people trying to solve that problem. unfortunately, inexplicably, (nearly?) everybody chooses to implement their new HDL as a DSL in something else. such nightmares include:
* tools that synthesize a subset of C++ (vivado HLS, among others)
* a python DSL (MyHDL)
* a scala DSL (Chisel)
* a million haskell DSLs (Lava, Hydra, CLaSH)

quote:

You can think of hardware as some state, with pure functions connecting the state elements. This makes it natural to think about modeling hardware in a functional programming language.
bluespec is great at writing a protocol checker in a HLL that you can run alongside an actual HW implementation to check for correctness

there's zero consideration for high end performance, like speed path/timing, and if you don't care about that why are we making hardware in the first place?

like you make hardware because you really, really care about how the state is arranged, connected, and computed and i don't understand how FP aligns with that goal

LordSaturn
Aug 12, 2007

sadly unfunny

it is truly, deeply incredible to me that the entire internet is built on Javascript

JawnV6
Jul 4, 2004

So hot ...

Sapozhnik posted:

dear god

so the de-facto hdl is a php-tier mess of gotchas within gotchas and the entire field is full of tiny bug childs who throw a tantrum at any attempts to make tools whose design isn't actively malevolent
the HW industry generally doesn't deal with that class of errors. i don't recall a bug surviving to production that was centered on a "gotcha" in the language. because the timelines are so long and mistakes so costly, teams have to come up with a robust process to do anything at all. it sucks for SO-level questions and there's a lot of those that the compiler is optimizing away to nothing, but no design team is waiting around 8 weeks to get blank silicon back

svtb&ovm really cleaned up a lot of the interface concerns, I quite liked working with them. of course, to move to a FPGA model, all your fancy arrays and structures had to be flattened out, so parts of the hierarchy disappear and you get signal names like frontend_icache_31_8_tag

Bloody
Mar 3, 2013

Sapozhnik posted:

dear god

so the de-facto hdl is a php-tier mess of gotchas within gotchas and the entire field is full of tiny bug childs who throw a tantrum at any attempts to make tools whose design isn't actively malevolent

bingo

Bloody
Mar 3, 2013

i just want a low-level hardware description language that is capable of even trivially basic abstractions. like embedded c vs assembly

Sapozhnik
Jan 2, 2005

Nap Ghost
Despite all that i really want to get into hw design because it looks fun

How do i get babby's first hw design (well, probably validation monkey) job

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

Sapozhnik posted:

Despite all that i really want to get into hw design because it looks fun

How do i get babby's first hw design (well, probably validation monkey) job
idk where you live but in the portland area my helpdesk/sysadmin resume keeps getting hits from headhunters for platform validation technicians. i even got one last week.

they're probably looking for intel people, or the job is at intel, but i've never cared enough about those sorts of jobs to ask them the basics, like, what is a platform validation technician (also because the headhunters do not know)

tef
May 30, 2004

-> some l-system crap ->

FamDav posted:

* don't rely on your database for pkey uniqueness
* keys are unique across tables, databases
* which makes it much simpler to shard across multiple databases
* you can layer (partial) sequencing on them if you really want to

also you don't get sequence id prediction attacks


if you do use autoincrement keys, encrypt them before passing them out to a user

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

dick traceroute posted:

Oracle doesn't have a boolean type either (well ok, it does, but only in Pl sql, you can't query with it or store it)


We use char(1) with a t or f

And our ceo used -999999 for 'null number' forever ago and we're stuck with it

lol loving oracle.txt right there

tef
May 30, 2004

-> some l-system crap ->

Deep Dish Fuckfest posted:

why? i'm genuinely curious and i can't recall hearing about that before. or think of any advantages uuids would have off the top of my head

autoincrement is bad for identity because people will use it for ordering

then you can't backfill past data, which you'll eventually need to do

autoincrement is bad because you can't do it when you need to shard, which you eventually will.

use a uuid, use a timestamp, by default.

if you don't know how autoincrement can fail, you shouldn't be using it

jesus WEP
Oct 17, 2004


Finster Dexter posted:

lol loving oracle.txt right there
nothing on the loving (+) operator

Sapozhnik
Jan 2, 2005

Nap Ghost
I use random 64-bit ints for PKs. Well, 63-bit really, because negative integer PKs are icky.

I mean, once upon a time the space of 64-bit integers was considered good enough for encryption key purposes, so it's probably fine, riiight? :ohdear:

JewKiller 3000
Nov 28, 2006

by Lowtax

dick traceroute posted:

Oracle doesn't have a boolean type either (well ok, it does, but only in Pl sql, you can't query with it or store it)


We use char(1) with a t or f

And our ceo used -999999 for 'null number' forever ago and we're stuck with it

yeah our old oracle poo poo did this too. the char(1) thing i understand because oracle has no boolean, but what's with the -999999? is NULL not NULL enough for oracle people???

HoboMan
Nov 4, 2010

Sapozhnik posted:

I use random 64-bit ints for PKs. Well, 63-bit really, because negative integer PKs are icky.

I mean, once upon a time the space of 64-bit integers was considered good enough for encryption key purposes, so it's probably fine, riiight? :ohdear:

how do you avoid collisions? cross your fingers?

HoboMan
Nov 4, 2010

JewKiller 3000 posted:

yeah our old oracle poo poo did this too. the char(1) thing i understand because oracle has no boolean, but what's with the -999999? is NULL not NULL enough for oracle people???

NULL = 0
is true iirc

HoboMan fucked around with this message at 19:48 on Oct 6, 2016

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.
One of my favorite SO posts of all time:

http://stackoverflow.com/questions/1705008/simple-proof-that-guid-is-not-unique

Sapozhnik
Jan 2, 2005

Nap Ghost

HoboMan posted:

how do you avoid collisions? cross your fingers?

2^-63 is a very small probability. You're going to have far more network errors than bounced requests due to random PK collisions unless your data store is truly gigantic.

None of my applications are going to get THAT big.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

CRIP EATIN BREAD posted:

im the guy fieri image in a text document

aka "an emoji"

NihilCredo
Jun 6, 2011

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

there's one table in our db that has a "priority" column. possible values are high, medium and low. so obviously it's a char(1) column holding "H", "M" and "L" values.

but okay, whatever. it's trivial enough at the database layer to code a function that converts it to a numerical enum. and indeed, we do have such a function.

code:
private function GetPriority(widget as DataRowView) as eWidgetPriority

    select case widget("Priority")
        case "H" : return eWidgetPriority.High
        case "M" : return eWidgetPriority.Medium
        case "L" : return eWidgetPriority.Low
     end case

end function

lmao

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

NihilCredo posted:

there's one table in our db that has a "priority" column. possible values are high, medium and low. so obviously it's a char(1) column holding "H", "M" and "L" values.

but okay, whatever. it's trivial enough at the database layer to code a function that converts it to a numerical enum. and indeed, we do have such a function.

code:
private function GetPriority(widget as DataRowView) as eWidgetPriority

    select case widget("Priority")
        case "H" : return eWidgetPriority.High
        case "M" : return eWidgetPriority.Medium
        case "L" : return eWidgetPriority.Low
     end case

end function
lmao

As long as that's encapsulated at the db layer, I don't see a problem? I've seen enums handled similarly before. I really am not a fan of storing enums as numbers in the db. Stringify it and then Enum.Parse it on the way back out, because it's way harder to know wtf is going on with a data problem in the db when you have nothing but int columns.

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal

tef posted:

autoincrement is bad for identity because people will use it for ordering

then you can't backfill past data, which you'll eventually need to do

that's not really autoincrement's fault, though? it just means you've got a poorly designed schema, and are exposing a poorly designed interface to your data. all other things being equal, sure, nipping this sort of mis-use in the bud is nice but it seems to me like it's a symptom of a bigger problem

tef posted:

autoincrement is bad because you can't do it when you need to shard, which you eventually will.

use a uuid, use a timestamp, by default.

this also seems kind of a weird reason to me. it's like saying "don't use transactions, they're not available in some nosql dbs which you'll want to use to scale up! and even if they are, distributed transactions can be slow!"

tef posted:

if you don't know how autoincrement can fail, you shouldn't be using it

well duh, that's true for basically everything

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Deep Dish Fuckfest posted:

what the gently caress? how can this be common enough to be deemed an antipattern? what possible reason would you have to do this when there's a boolean type and null is handled differently from every- ah gently caress it why am i trying to make sense of this

there was some project that had a composite unique constraint on some text and a boolean. the boolean was "deleted" or something. it was changed to nullable because turns out there can be several entities with the same code, but only one can be active at once.
so
code + false = currently active, not deleted.
code + null = a soft-deleted instance, no longer active
code + true (not used)

apparently unique constraints don't apply to null.

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal

Wheany posted:

code + false = currently active, not deleted.
code + null = a soft-deleted instance, no longer active
code + true (not used)

this is beautiful, they should have sent a poet

JewKiller 3000
Nov 28, 2006

by Lowtax

HoboMan posted:

NULL = 0
is true iirc

certainly not, null does not = anything. you are probably thinking of the oracle conflation of null and ''

code:
SQL> select case when null = 0 then 'completely broken' when 0 is null then 'still broken' when '' is null then 'oracle is retarded' else 'thanks larry' end from dual;

CASEWHENNULL=0THEN
------------------
oracle is retarded

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

JewKiller 3000 posted:

certainly not, null does not = anything. you are probably thinking of the oracle conflation of null and ''

code:
SQL> select case when null = 0 then 'completely broken' when 0 is null then 'still broken' when '' is null then 'oracle is retarded' else 'thanks larry' end from dual;

CASEWHENNULL=0THEN
------------------
oracle is retarded

holy poo poo oracle is the p-lang of RDBMS! I will now call it poracle

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Finster Dexter posted:

holy poo poo oracle is the p-lang of RDBMS! I will now call it poracle

why do you think it's called pl/sql

JawnV6
Jul 4, 2004

So hot ...

anthonypants posted:

they're probably looking for intel people, or the job is at intel, but i've never cared enough about those sorts of jobs to ask them the basics, like, what is a platform validation technician (also because the headhunters do not know)
i'd expect that role is doing post-silicon support, like sysadmin duties for new hardware. keeping BIOSes current, building specific images when requested for engineering customers. a good technician is worth their weight in gold, but it would be kinda far from HDL work. i do know a guy who's made that transition & is now an engineering manager though

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

St Evan Echoes posted:

nothing on the loving (+) operator
oracle made the loving operator a plus sign???

JawnV6
Jul 4, 2004

So hot ...

Bloody posted:

i just want a low-level hardware description language that is capable of even trivially basic abstractions. like embedded c vs assembly

i want to go back to GUI HDL's

Sapozhnik
Jan 2, 2005

Nap Ghost

JawnV6 posted:

i'd expect that role is doing post-silicon support, like sysadmin duties for new hardware. keeping BIOSes current, building specific images when requested for engineering customers. a good technician is worth their weight in gold, but it would be kinda far from HDL work. i do know a guy who's made that transition & is now an engineering manager though

i can work openembedded (sort of), does that count lol

anthonypants
May 6, 2007

by Nyc_Tattoo
Dinosaur Gum

JawnV6 posted:

i'd expect that role is doing post-silicon support, like sysadmin duties for new hardware. keeping BIOSes current, building specific images when requested for engineering customers. a good technician is worth their weight in gold, but it would be kinda far from HDL work. i do know a guy who's made that transition & is now an engineering manager though
poo poo, that sounds like something i would be really interested in. oh well

leftist heap
Feb 28, 2013

Fun Shoe

Sapozhnik posted:

intellij gets some really fancy stuff right and a whole bunch of extremely basic stuff completely wrong. i bought a license because i wanted to support the developers and i regret doing so.

want to add an extra level of indentation to wrapped lines? gently caress you. there's a bunch of niggles that i ran into and couldn't fix but that's the main one that sticks out. this combined with the fact that it likes to gratuitously reformat my code every time i do a refactor or C&P is a dealbreaker.

maven integration? kinda rudimentary. a dude working with me on a side project complained that he had to spend a while kicking intellij before it realized my code was java 8 and not java 6 (despite the pom saying that it's java 8).

jpa integration? very flashy, and does not appear to work at all. like i can't get it to connect to my data source and it just highlights everything as an error

oddly enough NetBeans seems to get the basic stuff right in a way that the other Java IDEs do not, and yet I think I'm the last person outside of Oracle who still uses it. Add a compiler plugin to your POM, for instance: it integrates into the error highlighting and generates whatever source code it needs to generate in the background in real time as you edit. Imports are cleaned up automatically on save. Autocompletion is not lightning fast but quite adequate in the responsiveness dept.

"want to add an extra level of indentation to wrapped lines?" what does this even mean? indenting when you line break an expression? intellij does that for me. none of the rest of that poo poo seems to be a problem for me either. except maybe the compiler plugin poo poo, but gently caress using compiler plugins for the most part. usually a miserable idea.

maven integration is fantastic, especially compared to the poo poo show that is still Eclipse maven integration.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer
so if i can access object properties like this: obj[1]=10,obj["gently caress you"]=420
and arrays can also have subscripts like obj["gently caress you"]

what the gently caress is the point of an array in javascript? just a length property that becomes worthless if you put in string properties?

JawnV6
Jul 4, 2004

So hot ...
it's not difficult from a technical chops perspective, most of the toolchains will be there already. it's dealing with the shithead engineers, troubleshooting hardware problems that may exist outside your scope entirely, etc. idk if that role would include reworks or if you'd just be responsible for tracking that work was getting done

i was debug lead on a team with ~3 technicians supporting like 100 systems? with early silicon it's easy for 1 system to be responsible for a non-trivial percentage of your test content running

NihilCredo
Jun 6, 2011

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

Finster Dexter posted:

As long as that's encapsulated at the db layer, I don't see a problem?

check the function's signature

Adbot
ADBOT LOVES YOU

dick traceroute
Feb 24, 2010

Open the pod bay doors, Hal.
Grimey Drawer

JewKiller 3000 posted:

yeah our old oracle poo poo did this too. the char(1) thing i understand because oracle has no boolean, but what's with the -999999? is NULL not NULL enough for oracle people???

I have pondered this one quite a bit. Best explanation we've been able to come up with is he didn't know about nullable columns at the time.

  • Locked thread