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
Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



eschaton posted:

hope it wasn't in some structure written to disk or copied all over memory en masse

I legit know of one product whose serialization was to just blast an object[] array to disk with fwrite(). to pull it back in, they'd do an fread() and then walk the object[] array fixing up vtables as they went—assuming quite a lot about the in-memory layout of their classes, of course.

the people who did this? they were proud of it.

Your Object Serialization is a Piece of poo poo

Adbot
ADBOT LOVES YOU

bucketmouse
Aug 16, 2004

we con-trol the ho-ri-zon-tal
we con-trol the verrr-ti-cal

eschaton posted:

hope it wasn't in some structure written to disk or copied all over memory en masse

I've seen that before (in production!) but never with classes :psyduck:

the worst io crown still goes to the online catalog generated entirely through a FileMaker script which pooped out html by concatenating record fields and had a view solely for the 30+ fields in each record that contained html bits (or didn't) depending on the record

this codebase just reads/writes json and is generally sane but it obviously was not at some point given some of the vestigial crap in it

bucketmouse fucked around with this message at 13:58 on Apr 24, 2015

CPColin
Sep 9, 2003

Big ol' smile.
The cooler one developer thinks a chunk of code is, the more the rest of the team hates that developer for it.

There's going to be some stories about me after I'm gone.

Share Bear
Apr 27, 2004

MononcQc posted:

bits of this keynote might be relevant to people calling themselves terrible in here and believing it 100%:

https://www.youtube.com/watch?v=hIJdFxYlEKE

this was cool thanks

The Leck
Feb 27, 2001

CPColin posted:

The cooler one developer thinks a chunk of code is, the more the rest of the team hates that developer for it.

There's going to be some stories about me after I'm gone.
i take solace in the fact that i think it's cool to replace the bizarre hand-written xml parser with library calls that may actually behave consistently. whoever messes with this next may even be able to understand it, since it's no longer a multi-hundred line function parsing xml character by character.

gonadic io
Feb 16, 2011

>>=
step 1 of IRC client in F#: complete

gonadic io
Feb 16, 2011

>>=
things that I miss that haskell has:
- record types with multiple constructors
- the same syntax for the types and values - consider () : unit and (3,"") : int * string
- a compiler that has more than one loving pass ahhhhh i shouldn't have to reorder my functions to get it to compile this isn't 1970
- a standard library that i know inside out
- lazy evaluation (by default)

things that are cool that haskell doesn't have:
- trivial access to .net
- strict evaluation (by default)

gonadic io fucked around with this message at 18:14 on Apr 24, 2015

Valeyard
Mar 30, 2012


Grimey Drawer
shelved the haskell studying but do intend to reply to those answers from before

got an email from my project supervisor re the dissertation: "It came up really nicely. You did a very good job in pulling it all together. You should be very proud" :hellyeah:

gonadic io
Feb 16, 2011

>>=
also wtf is with
x : int list
compared to every other lang's ordering of higher-kinded types
x :: List Int
x : seq<int>
seq<int> x;

JewKiller 3000
Nov 28, 2006

by Lowtax
they stole it from OCaml, just like most of the rest of F#

vive la france

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

ive never used ocaml but ive seen enogh of it to know it has weird type signatures

AWWNAW
Dec 30, 2008

gonadic io posted:

also wtf is with
x : int list
compared to every other lang's ordering of higher-kinded types
x :: List Int
x : seq<int>
seq<int> x;

pretty sure you can also do
x : List<int>
x : seq<int>
if you're talking about type annotation

gonadic io
Feb 16, 2011

>>=

AWWNAW posted:

pretty sure you can also do
x : List<int>
x : seq<int>
if you're talking about type annotation

ah I can, and it works with Option<int> too. no other changes needed. great!

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


Sorry but no the worst io ever is the dev i worked with that ityool 2014 wrote his own c# xml parser using regular expressions

oh no blimp issue
Feb 23, 2011

didnt even bother to see that c# has a built in xml parsing library

oh no blimp issue
Feb 23, 2011

"i cant be bothered to do a 2 second google so lemme just choose the stupidest solution!"

Valeyard
Mar 30, 2012


Grimey Drawer
someone buy him an account and point him to this thread

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Awia posted:

"i cant be bothered to do a 2 second google so lemme just choose the stupidest solution!"

im the opposite

if i cant find a library welp im just not gonna bother at all

BattleMaster
Aug 14, 2000

bucketmouse posted:

I've seen that before (in production!) but never with classes :psyduck:

as an experiment when I was still learning C++ I found you could serialize a class just by typecasting a pointer to it as a const char* and iterating through it with a for loop to i < sizeof class and saving it like any character string

obviously it's a terrible idea because it doesn't respect different endianness, will break if the non-function members of the class are changed, may break between compiles, may break between compilers, pointers will no longer be valid, and all sorts of other things

but it makes me wonder how much software out there does such a terrible thing under the hood

Shaggar
Apr 26, 2006
well yes i could write caseinsensitivemap in like 5 lines but its easier for me to just include commons-collections

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

gonadic io posted:

- a compiler that has more than one loving pass ahhhhh i shouldn't have to reorder my functions to get it to compile this isn't 1970


this is true of most lisps too and it's probably my #1 biggest irritation

the amount of time i spend in clojure jockeying function defs and namespace dependencies around is ridiculous

i imagine after a while i'll get used to it though, and it simplifies my mental model of how the compiler/interpreter is dealing with my code - it's just a list of forms, evaluated in order, rather than a file that the compiler is making multiple passes over and doing different things each time

gonadic io
Feb 16, 2011

>>=

Dessert Rose posted:

i imagine after a while i'll get used to it though, and it simplifies my mental model of how the compiler/interpreter is dealing with my code - it's just a list of forms, evaluated in order, rather than a file that the compiler is making multiple passes over and doing different things each time

that's stockholm syndrome talking, you shouldn't need to consider how the compiler parses your code when programming. it's particularly badly for me because haskell cultivates a top-down approach:

"hmm a message has three parts"

code:
parseMessage = do
    parseFirstPart
    parseSecondPart
    parseThirdPart
"now I press enter a few times and write 'parseFirstPart = ' and oh wait no, that won't work. gently caress."

The Leck
Feb 27, 2001

Powerful Two-Hander posted:

Sorry but no the worst io ever is the dev i worked with that ityool 2014 wrote his own c# xml parser using regular expressions
mine was a vba xml parser that didn't even use regexes, just a bunch of replaces to take out certain characters and "if the leftmost 17 characters of the line are '<item blah blah' then read the next 14 characters and do something" kind of stuff. magic numbers all over the place too. turns out that using a library was something like 10% of the length and worked way better!

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



i wrote an id3 tag parser in realbasic lmao

i think it was actually the first one to be able to read id3v2.4 or however much it was at the time

still have it, wonder if i can extract the code and see how awful it is

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



yessss

Build 009 - nov 16 2000
- id3 tag reader (will ONLY read v2.3.0 tags. you can convert with soundjam.)
- NilObjectExceptions on sliders, slider in effect on songstart.
- grey out buttons
- STOP LAG (semi)
- took out timer temporarily

Build 010 - nov 19 2000
- trim id3 spaces
- "snap" speed slider
- reads ID3v2.4.0 tags (is probably one of the first players to do so. i havent seen any editors yet)
- reads ID3v2.2.0 tags

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


It was amazing.

I am not even a terrible programmer because i just copy poo poo off google when i need it and forget it 10 seconds later (except sql for which i am pro tier) but even I know that you can deserialise xml to a class with literally no effort at all in c#.

All i can think is that he was trying to be part of the whole ~~roll my own~~ bleeding edge. Or he was truly terrible.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...

gonadic io posted:

that's stockholm syndrome talking, you shouldn't need to consider how the compiler parses your code when programming. it's particularly badly for me because haskell cultivates a top-down approach:

"hmm a message has three parts"

code:
parseMessage = do
    parseFirstPart
    parseSecondPart
    parseThirdPart
"now I press enter a few times and write 'parseFirstPart = ' and oh wait no, that won't work. gently caress."

maybe it is stockholm syndrome, but i feel a little different about it because i understand what lisp machines do.

and lisp makes it really easy to reformat your code. just grab that form and move up to the first blank space above the fn you're writing, write (defn parse-first-part [x]) and slap it in.

or write the (fn [x] (...)) right there and then move it later.

"press enter a couple of times" doesn't mean anything to me because i'm writing sexps, so i use paredit, which means i think about code way differently in clojure. it's one of the reasons i love it so much.

f# is a lot more like haskell, though, which puts me in the mental state that you describe, and I find it more frustrating there

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
not gonna pretend i don't wish i could just barf code into the file in any order tho.

Soricidus
Oct 21, 2010
freedom-hating statist shill

gonadic io posted:

also wtf is with
x : int list
compared to every other lang's ordering of higher-kinded types
x :: List Int
x : seq<int>
seq<int> x;

it's logical

same way this is a poo poo post, not this :: post<poo poo>

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:

Soricidus posted:

it's logical

same way this is a poo poo post, not this :: post<poo poo>

this post is poo poo

oh hey it works look

Soricidus
Oct 21, 2010
freedom-hating statist shill

bobbilljim posted:

this post is poo poo

oh hey it works look

sure you can say things both ways but one is more natural

you don't go to the store of liquor, you go to the liquor store

now, it's true to say that what you buy there is bottles of liquor, not liquor bottles. but that identifies an interesting subtlety, namely that "container of thing" implies that the container actually contains thing, while "thing container" merely states that the container is intended to be used for that purpose

a bottle of liquor is what you get when you put liquor into a liquor bottle

therefore, int list is better than list [of] int if the list might be empty

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Soricidus posted:

sure you can say things both ways but one is more natural

you don't go to the store of liquor, you go to the liquor store

now, it's true to say that what you buy there is bottles of liquor, not liquor bottles. but that identifies an interesting subtlety, namely that "container of thing" implies that the container actually contains thing, while "thing container" merely states that the container is intended to be used for that purpose

a bottle of liquor is what you get when you put liquor into a liquor bottle

therefore, int list is better than list [of] int if the list might be empty

idgaf if they got booze

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?

Soricidus posted:

sure you can say things both ways but one is more natural

you don't go to the store of liquor, you go to the liquor store

now, it's true to say that what you buy there is bottles of liquor, not liquor bottles. but that identifies an interesting subtlety, namely that "container of thing" implies that the container actually contains thing, while "thing container" merely states that the container is intended to be used for that purpose

a bottle of liquor is what you get when you put liquor into a liquor bottle

therefore, int list is better than list [of] int if the list might be empty

perhaps all of this could have a standard representation as a predicate, for example (container-of bottle liquor) and (seller-of bottle liquor) and (container-of list int) and so on.

then a general system could be made to work with these relations and reason about them, maybe even represented itself in this same form

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



eschaton posted:

perhaps all of this could have a standard representation as a predicate, for example (container-of bottle liquor) and (seller-of bottle liquor) and (container-of list int) and so on.

then a general system could be made to work with these relations and reason about them, maybe even represented itself in this same form

you want it to be one way

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:
lmao

Asshole Masonanie
Oct 27, 2009

by vyelkin
is there a SQL designer app for osx that isn't a piece of poo poo? i want ERD and also to be able to manage the db right in the app and it has to support postgre

jesus WEP
Oct 17, 2004


Power Ambient posted:

is there a SQL designer app for osx that isn't a piece of poo poo? i want ERD and also to be able to manage the db right in the app and it has to support postgre

http://www.toadworld.com/products/toad-mac-edition/default.aspx prolly what youre looking for

Asshole Masonanie
Oct 27, 2009

by vyelkin

looks good, i'm gonna try it out. i found a ton of different apps but there's so many and a lot of them look like poo poo, except maybe razorsql and navicat, but they cost money

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
is there a mysql gui for osx that is a) decent and b) lets me like, bookmark a bunch of tables because we have like 960 tables in our DB and i'm only interested in about 80 of them and having to scroll between them all the time is annoying

i know the answer is 'get good at a command line sql tool' but i'm not a database developer and i mostly just need access to the schema quickly and easily

Adbot
ADBOT LOVES YOU

bucketmouse
Aug 16, 2004

we con-trol the ho-ri-zon-tal
we con-trol the verrr-ti-cal
it's reddit but jfc this is proclick for probably the dumbest fuckup I've seen in ages

https://np.reddit.com/comments/33u8vq//cqofrit

MALE SHOEGAZE posted:

is there a mysql gui for osx that is a) decent

no

  • Locked thread