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

JawnV6 posted:

if you're saying it out loud, you're doing something wrong

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

how do you do code generation well

like without having massive strings of boilerplate that you concatenate magic words into

how do adults solve this

Bloody
Mar 3, 2013

animist posted:

my current project is a webassembly -> verilog compiler in rust

this is almost certainly a terrible idea

what the gently caress

Bloody
Mar 3, 2013

is this on github

I must see this

Bloody
Mar 3, 2013

animist posted:

(re: why the hell i'm writing a webassembly -> verilog compiler, from a few pages back)

mainly i just want to be able to write my high-level DSP cores in rust. i don't want to actually write a rust / llvm compiler backend tho, i find llvm IR kinda exhausting, so i figure i'll just work with webassembly instead, which rust can target. it's a reasonably lightweight IR format.

more broadly, i think most languages are going to end up with webassembly backends in the near future. all the JVM languages, haskell, and typescript have wasm targets in progress right now, and i figure other people are gonna follow suit, to try to get a slice of that sweet sweet frontend pie. so, i support a bunch of languages pretty easily.

and maybe, in the future, once there's an FPGA on every cpu die, Joe Doesn't Understand Hardware can write his code in TypeScript or whatever, and use my tool to accelerate parts of it on the FPGA.

or, y'know, not. but it's a fun side project.

post the github

Bloody
Mar 3, 2013

what is serverless and why does it still require servers

Bloody
Mar 3, 2013

huh, that is mildly interesting. are there any provisions to just schedule them to run every X time? ive run into some annoying cloud use cases like that in the past when i had an app deployed to azure and i wanted to just run some code every 5 minutes that'd do some loving around that involved my database

Bloody
Mar 3, 2013

trying to teach people how to use vcs tools is basically my least favorite thing and i just wont do it any more its just too frustrating. fuckers out here checking in copy of copy of backup final spreadsheet(1).xlsx right next to spreadsheet.xlsx like its totally fine and i just cant

Bloody
Mar 3, 2013

Fiedler posted:

docker is orthogonal to golang.

.net core, for example, runs just fine in containers.

ya i built a webapi thing and got it running in a docker on a rancher with absolutely zero understanding of what i was doing in like 20 minutes

Bloody
Mar 3, 2013

calculator.app gets it right

Bloody
Mar 3, 2013

Zlodo posted:

floats are ok as long as you keep in mind that pretty much every single thing you do with them can go horribly wrong

NaNs are really fun too

we had a bug once where a nan caused by an edge case when projecting a collision point onto a vehicle's tire would propagate NaNs into to the vehicle's matrix, then into the camera's matrix (since it was trying to position itself relatively to the vehicle) and then into the render view matrix resulting in an instant white screen of death

whats super exciting are compilers that don't understand ieee 754 very well and think that these are equivalent for floats:

a > b

!(a <= b)

NaN ruins everything

and most excitingly, they generate functional or broken assembly as a fascinating function of optimizer flags. like, given a > b, replaces with !(a <= b) with no optimizations enabled; with optimizations turned on, leaves alone as a > b :iiam:

Bloody
Mar 3, 2013

unrelatedly, i am trying to solve a problem that may not be a problem or may be very stupid.

I have a rust project in gitlab. every release is just a tag on master. master is protected. every merge request to master should appropriately increment the version in the cargo.toml and tag the commit on master with a tag that matches the version in the cargo.toml. idk how to do this, basically.

like i found some poo poo on crates.io (https://crates.io/crates/cargo-release and https://crates.io/crates/rusty-release) but cargo-release doesn't work with a cryptic error and rusty-release doesn't seem to do what i wanna do.

also, i dunno how to get it to actually integrate with gitlab. i want the merge commit to do this poo poo but idk how to hook that into gitlab? idk maybe through jenkins or gitlab ci???

or maybe i should just be less stupid and not gently caress up the version number in every commit and just do this poo poo manually???

Bloody
Mar 3, 2013

ya weve got the project building and deploying to our internal package repository via jenkins and a docker job so i think i can just update the jenkins job to do some extra release-y crap in response to commits to master? maybe i'll have it tag master with the current version then create a branch and commit an updated cargo.toml with the next version or something. idk. we don't actually follow anything resembling semver so i suppose it could work

Bloody
Mar 3, 2013

gonadic io posted:

ctps:
code:
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

:stonk:

Bloody
Mar 3, 2013

white sauce posted:

Hi, I'm a fng learning Java and I need help with my first set of Homework for my programming class :downs: It's very basic stuff but I have 0 experience with this and the assignment is pretty difficult.

I'll be willing to paypal or venmo you $ for the time spent helping me. Feel free to send a PM if it interests you.

Also, feel free to own me for being such an idiot and posting this in this thread. Thanks!

i will do your homework for you. my rate is $300/hr, minimum 2 hours

Bloody
Mar 3, 2013

white sauce posted:

paying hundreds of thousands of dollars for an education in a place where the material's aren't proofread

feels good man :frogbon:

welcome to the real world where nothing is proofread

Bloody
Mar 3, 2013

cinci zoo sniper posted:

lol no it’s not more, often less, than 30 usd per month for the enterprise editions, should you need it, with rolling permanent licence left in wake of 12 months of subscription

yeah i had a personal license of everything of theirs for a while and it was very reasonably priced

Bloody
Mar 3, 2013

no

Bloody
Mar 3, 2013

AggressivelyStupid posted:

hm yes let me just find the most recent version of source code on this piece of hardware they want me to debug

hmm it's Part Number 6482-3556-846 revision b

wait what the gently caress

oh no


steps to find the source for a build:
Go to PLM, search for a loving part number

If you find it, you go to the attached files, there's sometimes (but not always!!!) a file helpfully named SourceCodeLocation.txt

Inside this text file (which may or may not exist) is the server, depot, stream, and snapshot for the source code in accurev

how do I make them stop doing this holy gently caress

hahahahaha what the fuuuuuuck

Bloody
Mar 3, 2013

gonadic io posted:

Yeah. V good rust support.

CRIP EATIN BREAD posted:

yeah intellij does a good job in most languages.

it's go support and rust support are great. even supports terraform (with jumping to definitions) and all sorts of other poo poo you wouldn't expect.

plus its a real ide, and not some electron-based text editor nightmare

very good and great are both huge stretches imo. it's better than RLS but not by that much. it's just slightly less buggy, slightly less slow, and slightly more featured. it appears incapable of doing anything useful with the output of tools like clippy and idk if it's an intellij thing or a rust plug-in thing but its handling of compiler errors is basically useless

Bloody
Mar 3, 2013

like on a scale from notepad to visual studio it's definitely on the notepad end

Bloody
Mar 3, 2013

------------------8<------------------
no more text editor chat thanks in advance

in other news i wrote a really ugly, stupid line of rust:
code:
return serde_json::from_str::<T>(&serde_json::to_string(&Empty{}).expect("???").to_string()).chain_err(|| ErrorKind::Deserialize)
because serde_json throws errors on deserializing empty strings (because empty strings are not valid json) and because all of the deserialization was happening inside of a function that's generic on T that looked really gnarly and equated "can deserialize content" with "is a valid response" so i special-cased 204 responses (because at least the API is not ridiculous in this one instance) to forcibly serialize-and-then-deserialize an empty struct and wo betide any caller that doesn't expect the response type to Empty

i'd consider refactoring deeper but this is an open source library so gently caress it im sticking to their style, pages of clippy lint warnings be damned

Bloody
Mar 3, 2013

actually visual studio is the best thing microsoft has ever made and they're still making it, so

Bloody
Mar 3, 2013

ironpython just begs the question of why aren't you using a real dot net language

Bloody
Mar 3, 2013

I have used com (probably) to automate some outlook stuff before and it was needs suiting

Bloody
Mar 3, 2013

prisoner of waffles posted:

wrote production MATLAB

goondolences

Bloody
Mar 3, 2013

pseudorandom name posted:

companies try to shove their apps down your throat because Apple was clever enough to put ad blocker support in Mobile Safari

plus web pages can't demand access to your contacts and sit in the background monitoring your location history and run facial recognition and extract location data from your photo library and listen to your music choices on your microphone and do all the other things that are the hallmarks of the modern app experience

modern app experience on Android*

Bloody
Mar 3, 2013

i dont know what kafka and avro are and im pretty sure i am not really missing out on anything as a result

Bloody
Mar 3, 2013

how is that different from protobufs

Bloody
Mar 3, 2013

what kind of streams is it good for processing

Bloody
Mar 3, 2013

load the schema in a database and use schemaspy

Bloody
Mar 3, 2013

writing rust macros is completely inscrutable. there's like four libraries you're supposed to use and all of the documentation is worthless

Bloody
Mar 3, 2013

gonadic io posted:

assuming you mean proc macros, once you have those 4 libraries set up (syn, quote, proc-macro2, ??? proc-macro-hack?) i haven't found it too bad.

if you're rearranging valid rust syntax, then it's p direct. use quote, and then you manipulate the ast directly.

if you are making custom syntax, then you deal one big ast type stemming from a token stream, i.e. an iter of https://docs.rs/proc-macro2/0.4.27/proc_macro2/enum.TokenTree.html

the most complicated thing i've done with it is when instead of being ad-hoc when looking at tokens you actually make new syntax by providing an alternate Parse instance and then reusing the rest of the existing infrastructure.

is there anything specific you are stuck with? previous horrors i've done with proc macros are:
type level binary trees: https://github.com/djmcgill/future-union
named argument functions: https://github.com/djmcgill/named_args

and then old macros i did this goddamn monstrosity to avoid copy pasting (and copy pasting drift): https://github.com/atsamd-rs/atsamd/blob/master/hal/src/gpio.rs#L424

synstructure, syn, quote, and proc_macro

i have these structs, and for all of them i keep writing this long mess of extremely boilerplate code, and i want to not do that, but i don't know what i'm doing, so it's going very poorly

Bloody
Mar 3, 2013

I'm a log10(x) programmer

Bloody
Mar 3, 2013

bob dobbs is dead posted:

Wait, log figgies is log log of the actual money

effort hardly ever changes. this checks out

Bloody
Mar 3, 2013

i have always assumed that whichever microsoft framework im using just magically handles it all for me

Bloody
Mar 3, 2013

Space Whale posted:

I'm also still just in awe that we have, in production, try/catch/gotos.

you sure youre not workin on flight software

Bloody
Mar 3, 2013

is your poo poo governed by DO-178C and/or should it be

Bloody
Mar 3, 2013

Space Whale posted:

So, I want to share something:

https://www.youtube.com/watch?v=0gyvq2G1Tcg This.

That video is an example of the kind of stuff pilots do, and need to know to do what they do; flight planning/flight performance type calculations provide that information. Figuring out runway stop distances for dry and wet runways, v_1 and v_2 speeds, blah blah blah. Not super complicated, but loving this up can be, at best, expensive.

$JOB does this with opaque black box dlls written in Fortran, Embarcadaro (wat?) old C, and who knows what else - linked to with old VB.net, newer C#, and more "WHAT", conversions going back and forth, sometimes the wrong way, NO INTERFACES, or interfaces done wrong so it takes a man year to add feature like "allow metric or imperial units", the threadshit I shared earlier, the try catch goto I shared earlier, and of course random math happening in various layers with basically no architecture at all.

:q:

Right now I'm helping someone who self taught to program and left comments so I know it was they who copied and pasted instead of making a method and calling it "fixing a fix" done by an acutal professional programmer. Helping said person with "git" which is apparently arcane, or something.

What the gently caress.

I like trains now.

name the company so that my anonymous tip to the faa is easier to follow

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

lol if you don't have a 20-deep inheritance tree stuffed full of 3000-line abstract classes

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