New around here? Register your SA Forums Account here!

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 $10! We charge money because it costs us money per month for bills alone, and since we don't believe in shady internet advertising, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Nomnom Cookie
Aug 30, 2009



hackbunny posted:

well, it is. and it was just the easiest example that came to mind. what I was really thinking of was JNI, where an object reference can either be a local or global reference (extremely important difference) depending on where it comes from, and nothing about the type reflects this. with lightweight wrappers, you can make this "soft" property "hard" and eg avoid implicitly converting a global reference into a local reference. not to mention all the raii wrappers you can write, to dispose of references you no longer need (jvm is terribly miserly), or to represent the raw data of a java array or string. this is probably meaningless to you but you had to dickwave

ooh i like this example a lot better. an extra pointer deref every time you touch a jobject would hurt, maybe. its not an obvious waste of effort

quote:

this argument is so poorly thought out I could believe you were negging me. kernel code and state is, by definition, 100% overhead, that kernel writers try to keep as low as possible. look at it, so bloated that the whole thing fits on my lovely little screen, and almost all fields are perfectly self-explanatory

yeah my point was that 16 userspace bytes per open file aint gonna be what kills you. writing a bunch of code so it's 0 bytes instead of 16 isn't gonna make a big dent in the total

quote:

that said, enjoy your paid hobby of overriding virtual methods with one-liners that throw "unsupported operation"

sometimes i throw a changeup with NotImplementedException

quote:

I wonder what the db, http client, tls client, cryptographic framework, tcp stack and network driver are written in :thunk: probably nodejs idk

java or c. oh, except at work i get to interact with mongodb. that's c++

quote:

or maybe, I'm writing a cryptographic protocol in a real-time code path. or a filesystem activity monitor for rolling back ransomware damage. not everyone works the night shift at the turd shunting yard, you know

still better off with java or c

Adbot
ADBOT LOVES YOU

Nomnom Cookie
Aug 30, 2009



oh hey nodejs is c++ too. huh

maybe they don't use enough templates to have a good runtime. that's probably it

Captain Foo
May 11, 2004

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

carry on then posted:

love to read constant back one forth volleys consisting solely of “my kind of programming is the only real kind of programming”

When one party is hackbunny going full weedwacker I'm okay with it

eschaton
Mar 7, 2007

the knowledge knower. a wisdom imparter. irritatingly self-assertive. odorous.

The_Franz posted:

it's you

you're the reason why text editors take 30 seconds to start on machines massively more powerful than 30 years ago on which they took 30 milliseconds

no, I’m p sure Kevin Mitnick PE is not responsible for the asinine choice to use a system designed to run scripts in web pages combined with a web server as some sort of desktop and mobile UI abomination and then make a text editor in it

it’s OK to talk about request-response latency when talking about client-server software

a text editor, even with emacsclient, is generally not loving client-server software

Xarn
Jun 26, 2015

Kevin Mitnick P.E. posted:

ok. doesn't matter

:thunk:

Nomnom Cookie
Aug 30, 2009



it takes an hour and you say eh this is fine. two hours and it’s not. why aren’t both options poo poo and only 30 minutes acceptable

Chopstick Dystopia
Jun 16, 2010


lowest high and highest low loser of: WEED WEE
k
just catching up on the thread and

gonadic io posted:

haskell's standard string is a linked list
what the gently caress

Soricidus
Oct 20, 2010
freedom-hating statist shill

Kilometres Davis posted:

just catching up on the thread and

what the gently caress

the designers of haskell do not intend it to be useful for solving real-world problems. it is for cs academics doing cs research. its explicit goals include “avoid success at all costs.”

it is the most ivory of towers, by design.

redleader
Aug 18, 2005

Engage according to operational parameters
a laudable goal tbf

Carthag Tuek
Oct 15, 2005

altid pamo når du går
veje du burd' kende
overleved' barneår
lig' til livets ende

redleader posted:

a laudable goal tbf

Powerful Two-Hander
Mar 9, 2004

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



terrible programming: avoid success at all costs

Xarn
Jun 26, 2015
Because 1 hour is inside the 95% percentile SLA and 2 hours aren't. Have you ever written anything that had actual perf. requirements, or is everything you ever wrote a CRUD app?

Chopstick Dystopia
Jun 16, 2010


lowest high and highest low loser of: WEED WEE
k

Xarn posted:

Because 1 hour is inside the 95% percentile SLA and 2 hours aren't. Have you ever written anything that had actual perf. requirements, or is everything you ever wrote a CRUD app?

Hey now! My CRUD apps have perf requirements. If their lambdas go over 5 minutes runtime they terminate, who knows what's gonna drop. (loving soil temperature readings or something I think)

Xarn
Jun 26, 2015
I don't have trouble with the fact that some people didn't go from writing safety critical hard real time systems through writing safety critical soft real time systems to writing solver for NP-complete problems, but even job-2, where we were writing basically CRUD data pipelines on AWS, had a soft performance requirements in that wasting performance pointlessly meant you paid more in your AWS bill.

Also sup buddy who's had to deal with AWS Lambda

Powerful Two-Hander
Mar 9, 2004

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



gently caress I hate gitlab's graphs, how can a branch simultaneously be merged and exist separately yet be both ahead and behind the master what the gently caress. and why is the merge request simultaneously open and closed according to different parts of the interface?

am i the idiot here? maybe.

edit: it loving merged the branch but didn't close the merge request or squash the commits what the gently caress.

now it won't do the merge automatically and is telling me to use the command line.... but the changes are already merged so I guess I can just delete the branch.... jfc

Powerful Two-Hander fucked around with this message at 14:28 on Dec 6, 2018

Main Paineframe
Oct 27, 2010

that's how I felt dealing with git at all for the longest time, before I realized that it was just completely unsuitable for small projects and massively overcomplicates simple tasks

Shaggar
Apr 26, 2006

eschaton posted:

no, I’m p sure Kevin Mitnick PE is not responsible for the asinine choice to use a system designed to run scripts in web pages combined with a web server as some sort of desktop and mobile UI abomination and then make a text editor in it

it’s OK to talk about request-response latency when talking about client-server software

a text editor, even with emacsclient, is generally not loving client-server software

he and everyone who promoted failfox and chome are responsible for javascript.

Shaggar
Apr 26, 2006
"uigh, ie sucks because it doesn't support my javascript abomination" - every web "developer" in the 00s

Chalks
Sep 30, 2009

Shaggar posted:

"uigh, ie sucks because it doesn't support my javascript abomination" - every web "developer" in the 00s

Ie being garbage has very little to do with JavaScript - in fact, JavaScript was usually the solution for ie being poo poo which makes things even worse

necrotic
Aug 1, 2005
I owe my brother big time for this!
IE gave us the wonders of AJAX

Main Paineframe
Oct 27, 2010

ie gave us border-box sizing, css grid, and a bunch of other sensible css layout stuff long before the other browsers reluctantly adopted them

Sagebrush
Feb 26, 2012

professor flatulence pants, they call me
ie4 for mac was the best browser back in os 9

graph
Nov 22, 2006

aaag peanuts

Kilometres Davis posted:

what the gently caress

wait until you hear about c

FormatAmerica
Jun 3, 2005
Grimey Drawer

graph posted:

wait until you hear about c

what's weird about them besides the '\0' thing?

Good Sphere
Jun 16, 2018

my project in xcode using swift is taking several minutes to build, which is getting annoying. instead of making ui additions and changes by building each time to check, i added global debug variables that i set to 0, setup a breakpoint and pushed values with expr in lldb. when i got it right, i copied the values over. it's pretty effective and a nice way to get things right, if the playground doesn't easily translate getting these things right

i now have an added parameter in my build that keeps track of the build time it took for each function:
Build Settings >> set Other Swift Flags to -Xfrontend -debug-time-function-bodies

i found that my viewDidLoad in a view controller took over 85,000 milliseconds to build! i broke the viewDidLoad into extensions and found that setting a frame on some buttons were the culprit

code:
func setupChooseCameraBtnFrame(midPoint:CGFloat, btnWidth:CGFloat, buttonVOffset:CGFloat, photoBtnWidth:CGFloat)
{
	chooseCameraBtn.frame = CGRect(x:midPoint - (btnWidth/2),
	y:((view.frame.height - buttonVOffset) + (photoBtnWidth/2) - (btnWidth/2)) - SCVO,
	width:btnWidth,
	height:chooseCameraBtn.frame.height)
}
too much math for a swift build?? time to break that up and retest

UPDATE: now it only takes ~15 seconds for my app to build! (instead of ~10 minutes) lol

Good Sphere fucked around with this message at 17:26 on Dec 6, 2018

graph
Nov 22, 2006

aaag peanuts

FormatAmerica posted:

what's weird about them besides the '\0' thing?

er, c strings are arrays, not an actual data structure, nvm

Toady
Jan 12, 2009

Good Sphere posted:

my project in xcode using swift is taking several minutes to build, which is getting annoying. instead of making ui additions and changes by building each time to check, i added global debug variables that i set to 0, setup a breakpoint and pushed values with expr in lldb. when i got it right, i copied the values over. it's pretty effective and a nice way to get things right, if the playground doesn't easily translate getting these things right

i now have an added parameter in my build that keeps track of the build time it took for each function:
Build Settings >> set Other Swift Flags to -Xfrontend -debug-time-function-bodies

i found that my viewDidLoad in a view controller took over 85,000 milliseconds to build! i broke the viewDidLoad into extensions and found that setting a frame on some buttons were the culprit

code:
func setupChooseCameraBtnFrame(midPoint:CGFloat, btnWidth:CGFloat, buttonVOffset:CGFloat, photoBtnWidth:CGFloat)
{
	chooseCameraBtn.frame = CGRect(x:midPoint - (btnWidth/2),
	y:((view.frame.height - buttonVOffset) + (photoBtnWidth/2) - (btnWidth/2)) - SCVO,
	width:btnWidth,
	height:chooseCameraBtn.frame.height)
}
too much math for a swift build?? time to break that up and retest

UPDATE: now it only takes ~15 seconds for my app to build! (instead of ~10 minutes) lol

shame about that non-conventional naming style, though

Nomnom Cookie
Aug 30, 2009



Xarn posted:

Because 1 hour is inside the 95% percentile SLA and 2 hours aren't. Have you ever written anything that had actual perf. requirements, or is everything you ever wrote a CRUD app?

ok imagine the sla is 2 hours and you're scoffing at me because i say 4 hours is fine

or imagine the sla is half an hour. are you going to be out of a job because it is literally impossible given the current state of technology to accomplish the work twice as fast as it's getting done now

or did you get to where it was good enough and then stop

and did the sla come before or after deciding it was good enough

these are important questions

Nomnom Cookie
Aug 30, 2009



Kilometres Davis posted:

Hey now! My CRUD apps have perf requirements. If their lambdas go over 5 minutes runtime they terminate, who knows what's gonna drop. (loving soil temperature readings or something I think)

its like half an hour now lol

Good Sphere
Jun 16, 2018

Toady posted:

shame about that non-conventional naming style, though

shame on a billion things that i'm not even aware that are bad, but which in particular are you referring to? just curious

Toady
Jan 12, 2009

Good Sphere posted:

shame on a billion things that i'm not even aware that are bad, but which in particular are you referring to? just curious

is it button or btn? and we don't use such abbreviations in civilized swift

Good Sphere
Jun 16, 2018

Toady posted:

is it button or btn? and we don't use such abbreviations in civilized swift

i don't see what else "btn" could be. i also use "pos" instead of "position"

i did get into habit of not abbreviating in objective-c. names of things read well in that language, and so does swift, but i have replaced a few words with abbreviation, and i don't think it messes with the readability

and then there's "SCVO". you have to be developing this to know what the SCVO is

Nomnom Cookie
Aug 30, 2009



SuperCat vagina opening, your product is a real doll for furries

Toady
Jan 12, 2009

Good Sphere posted:

i don't see what else "btn" could be. i also use "pos" instead of "position"

i did get into habit of not abbreviating in objective-c. names of things read well in that language, and so does swift, but i have replaced a few words with abbreviation, and i don't think it messes with the readability

and then there's "SCVO". you have to be developing this to know what the SCVO is

no no no no. civilized code is civilized thinking. avoid non-standard abbreviations. btn should be button. pos should be position. if you're using setup as a verb, it's setUp. SCVO should be spelled out. at the very least, lowercase it since it's not a type. we'll ignore for the moment that you're not using autolayout like a gentleman

code:
// Treating the parameters as a single abstraction of frame attributes, we won't use "atMidPoint".
func setUpChooseCameraButtonFrame(midPoint: CGFloat, width: CGFloat, verticalOffset: CGFloat, photoButtonWidth: CGFloat)

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 8 years!)

lmao and you thought you were going to get help instead of bikeshedded into oblivion

Good Sphere
Jun 16, 2018

Toady posted:

no no no no. civilized code is civilized thinking. avoid non-standard abbreviations. btn should be button. pos should be position. if you're using setup as a verb, it's setUp. SCVO should be spelled out. at the very least, lowercase it since it's not a type. we'll ignore for the moment that you're not using autolayout like a gentleman

code:
// Treating the parameters as a single abstraction of frame attributes, we won't use "atMidPoint".
func setUpChooseCameraButtonFrame(midPoint: CGFloat, width: CGFloat, verticalOffset: CGFloat, photoButtonWidth: CGFloat)

well you're definitely right about setUp vs setup. correct grammar isn't something i'm too good at, but i always like to get better. thank you. it was probably only 5 years ago i learned that "it" as a possessive is not "it's"

Soricidus
Oct 20, 2010
freedom-hating statist shill

FormatAmerica posted:

what's weird about them besides the '\0' thing?

just like haskell, c strings have O(n) length lookup, concatenation, etc. they also have O(n) indexing if you want to compare like-for-like and operate on unicode codepoints rather than bytes (assuming you're not using a utf-32 locale).

they're bad and you shouldn't use them.

Chopstick Dystopia
Jun 16, 2010


lowest high and highest low loser of: WEED WEE
k

Kevin Mitnick P.E. posted:

its like half an hour now lol

lol :smith:

Xarn
Jun 26, 2015
"Well, it takes 23 hours to run the weather simulation for the next day, and the granularity is continent-scale, but there is no point in optimizing it further"

-- Noted SA poster Kevin Mitnick P.E.

Adbot
ADBOT LOVES YOU

elite_garbage_man
Apr 3, 2010
I THINK THAT "PRIMA DONNA" IS "PRE-MADONNA". I MAY BE ILLITERATE.
Did someone say safety critical software? Aka re-inventing the wheel because the std lib or your gitbro's messaging lib violate 200 MISRA rules?

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