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
quiggy
Aug 7, 2010

[in Russian] Oof.


piratepilates posted:

the evil fartbutt industrial complex

hillary clinton takes donations from Big Butt

Adbot
ADBOT LOVES YOU

quiggy
Aug 7, 2010

[in Russian] Oof.




:suicide:

triple sulk
Sep 17, 2014




lol if u think this is as bad as it can get

quiggy
Aug 7, 2010

[in Russian] Oof.


triple sulk posted:

lol if u think this is as bad as it can get

oh no i know it can get worse than this, but this is a chain of ifs with a single line that it actually executes embedded into a switch statement embedded in a for loop in a function

literally kill me

Eleeleth
Jun 21, 2009

Damn, that is one suave eel.
what's a good book if i wanna get less-terrible at database design?

homercles
Feb 14, 2010

LeftistMuslimObama posted:

is ipc inter-process communication? i didnt have to do that, but we did implement fork as well. this is everything i did for that course:
*implement fork and exec
*implement a bunch of other syscalls that escape me
*implement a ticket-based process scheduler
*implement a basic shell (really basic, really really basic, i wasn't allowed to use a parser library :()
*implement a slab allocator
*change the virtual memory layout (the kernel we were using put the stack in the middle by default, we moved it to the top of the memory range and put the heap in the middle)
*implement spinlocks and semaphores
*implement an fsck tool for a super basic filesystem
*implement a few basic programs like cat and grep against a different filesystem
*implement multithreading

i was working full time throughout all my cs courses too, since epic was paying for them. i think i got like 2 hours of sleep a day max during that os course.
Did you have to implement all that stuff at the same time while leaping over alligators and fighting pirates? This is some super intense compsci undergrad course.

Shaggar
Apr 26, 2006

Eleeleth posted:

what's a good book if i wanna get less-terrible at database design?

Just do it. If the design is good you will feel it.

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

Shaggar posted:

Just do it. If the design is good you will feel it.

lol ok

brap
Aug 23, 2004

Grimey Drawer
yeah we're artists after all

quiggy
Aug 7, 2010

[in Russian] Oof.


fleshweasel posted:

yeah we're artists after all

bachelors of software art

more like dICK
Feb 15, 2010

This is inevitable.
software fartistry

HoboMan
Nov 4, 2010

more like dICK posted:

software fartistry

Shaggar
Apr 26, 2006

when design is bad your autism will flare up and when it is good it will be soothed. you can get great pleasure from examining good data design.

Shaggar
Apr 26, 2006
if you don't have atleast some autism you should not be in the database

HoboMan
Nov 4, 2010

yeah we're autists after all

HoboMan
Nov 4, 2010

Eleeleth posted:

what's a good book if i wanna get less-terrible at database design?

seriouspost: look up what 1st, 2nd, and 3rd normal form are. just knowing this you will be better than most "DBA"s out there

VikingofRock
Aug 24, 2008




Bloody posted:

lmao it turns out i am incredibly stupid. all i had to do to get current parser position is add a location <- getPosition line to my do blocks
now i have to refactor all of my data types to carry around their location i guess?

So what exactly are you trying to do here? It sounds to me like you are making things more difficult than they have to be.

Jerry Bindle
May 16, 2003

Shaggar posted:

when design is bad your autism will flare up and when it is good it will be soothed. you can get great pleasure from examining good data design.

yeah agreed, play with sqlite for a while, its good. Tcl is a lovely language in many regards but its OK for experimenting and messing around with sqlite.

if you know how to connect sqlite to mybatis in java, do that instead, then tell me how to do it because i can't get it to work with spring.

also i recommend the book "Using SQLite 3", its gives a good but high level view of database design and how to do selects and joins etc, it also is a good SQL reference.

Jerry Bindle fucked around with this message at 18:54 on Apr 15, 2016

more like dICK
Feb 15, 2010

This is inevitable.
Designing a good data model is great and writing allthe code to deal with it sucks imo

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Shaggar posted:

when design is bad your autism will flare up and when it is good it will be soothed. you can get great pleasure from examining good data design.

I'm super autismal and this is basically correct

it's Friday and I don't feel like doing any work. I'm going to download Haskell and figure out how to use it to delete my old git branches instead

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Luigi Thirty posted:

it's Friday and I don't feel like doing any work. I'm going to

http://pastebin.com/fMkY15z9

(i combined the two scipts i posted in the microsoft thread :regd08: )

Bloody
Mar 3, 2013

i want to parse my source file into useful bits of data so that i can have things like "all of the variable declarations in this file" and then i want to look at that parsed output and say okay, you're actually redeclaring this identifier in two spots, here they are, or you declared this identifier on line 537 but never referenced it anywhere, or stuff like that. either the parsed objects know where they came from or i do multiple passes over the source

i don't want the parser to straight up fail the second time it encounters a declaration with a given identifier or anything i'd rather just parse as much as possible as permissively as possible then say "hey check out this stuff"

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

homercles posted:

Did you have to implement all that stuff at the same time while leaping over alligators and fighting pirates? This is some super intense compsci undergrad course.

nah, but university of wisconsin prides itself on the difficulty of its comp sci curriculum, apparently. i learned a bunch of stuff that a lot of my coworkers apparently dont know anything about.

JawnV6
Jul 4, 2004

So hot ...

Bloody posted:

imagine you wanted to do some sort of series of operations in a sequential manner

here's some code snippets for doing that in verilog:

code:
integer current_state;
localparam state_idle = 0, state_fart = 1, state_butt = 2, state_fartbutt = 3, state_yospost = 4;

always @(posedge clock) begin // lol if you ever negedge clock
	case(currentstate)
	state_idle:
		// do nothing until we have some reason to
		if(do_a_thing == 1) current_state <= state_fart;
	end

	state_fart:
		do_a_fart <= 1; 
		butt_counter <= 13'd69; // verilog numeric literals are really good actually
		current_state <= state_butt;
	end

	state_butt:
		if (butt_counter == 0) begin
			current_state <= state_fartbutt;
		end else begin
			butt_counter <= butt_counter - 1;
		end
	end

	state_fartbutt:
		do_a_fart <= 0; // finally clear the fart-doing because are counter expired
		current_state <= state_idle;
	end
	endcase
end
c'mon, fsm's aren't as scary as you're saying

and you should have a next_state register

Shaggar
Apr 26, 2006

Barnyard Protein posted:

yeah agreed, play with sqlite for a while, its good. Tcl is a lovely language in many regards but its OK for experimenting and messing around with sqlite.

if you know how to connect sqlite to mybatis in java, do that instead, then tell me how to do it because i can't get it to work with spring.

also i recommend the book "Using SQLite 3", its gives a good but high level view of database design and how to do selects and joins etc, it also is a good SQL reference.

spring-mybatis is hot as gently caress. its magical and I love it

AWWNAW
Dec 30, 2008

Bloody posted:

i want to parse my source file into useful bits of data so that i can have things like "all of the variable declarations in this file" and then i want to look at that parsed output and say okay, you're actually redeclaring this identifier in two spots, here they are, or you declared this identifier on line 537 but never referenced it anywhere, or stuff like that. either the parsed objects know where they came from or i do multiple passes over the source

i don't want the parser to straight up fail the second time it encounters a declaration with a given identifier or anything i'd rather just parse as much as possible as permissively as possible then say "hey check out this stuff"

sounds like static analysis and maybe something that'd be best done completely ~after~ parsing so i guess ur on the right track

Luigi Thirty
Apr 30, 2006

Emergency confection port.

apparently my ticket numbers for the month are "awesome" despite me always arriving late leaving early and taking long lunches

JawnV6
Jul 4, 2004

So hot ...
you're too good, time to move on

wanna break intel chips? they're mad fun on the insides

VikingofRock
Aug 24, 2008




Bloody posted:

i want to parse my source file into useful bits of data so that i can have things like "all of the variable declarations in this file" and then i want to look at that parsed output and say okay, you're actually redeclaring this identifier in two spots, here they are, or you declared this identifier on line 537 but never referenced it anywhere, or stuff like that. either the parsed objects know where they came from or i do multiple passes over the source

i don't want the parser to straight up fail the second time it encounters a declaration with a given identifier or anything i'd rather just parse as much as possible as permissively as possible then say "hey check out this stuff"

Okay in that case what you are doing is completely reasonable. Carry on! Also post the code when you are done because this sounds neat.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

JawnV6 posted:

you're too good, time to move on

wanna break intel chips? they're mad fun on the insides

hlel yase

Clockwerk
Apr 6, 2005


HoboMan posted:

seriouspost: look up what 1st, 2nd, and 3rd normal form are. just knowing this you will be better than most "DBA"s out there

hoboman giving good advice

Bloody
Mar 3, 2013

JawnV6 posted:

c'mon, fsm's aren't as scary as you're saying

and you should have a next_state register

they aren't scary but they are pointlessly verbose and the typical syntax for them is a cumbersome version of GOTO

Bloody
Mar 3, 2013

VikingofRock posted:

Okay in that case what you are doing is completely reasonable. Carry on! Also post the code when you are done because this sounds neat.

https://github.com/akindle/hdlint
it is definitely not good but that is where it lives

homercles
Feb 14, 2010

normalise 'till it hurts, denormalise 'till it works

Bloody
Mar 3, 2013

denormalize yourself and face to bloodshed

JawnV6
Jul 4, 2004

So hot ...

Bloody posted:

they aren't scary but they are pointlessly verbose and the typical syntax for them is a cumbersome version of GOTO
the verbosity is mostly around specifying the timing information in a way that most software is totally blind to. hw is giving you more freedom, like i can't even imagine what a MCP would be in pure software (but its probably something boring like futures or promises)

and you're making "switch()" sound really scary, casex/casez are much worse in that regard

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal

Bloody posted:

denormalize yourself and face nosql

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

Bloody posted:

denormalize yourself and face to bloodshed

3spooky5me

HoboMan
Nov 4, 2010

i am very glad i don't work for the startup that was gonna give me buckets of money because they used mongo for their back-end and no amount of money is worth dealing with that. i can imagine the special snowflake dba/co-founder coiling a giant dependency turd on the database and not even being able to complain about it.
i guess it could have been a good learning experience to reimplement all the features of sql in the codebase in the process of getting a reliable system going

Adbot
ADBOT LOVES YOU

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
yah, sometimes you get awkward discussions like why did you make all this information refer to users by username, non semantic keys is like Data Design 101 yet when people jump into nosql they sometimes lose their minds.

  • Locked thread