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
Zlodo
Nov 25, 2006

Max Facetime posted:

quick, who of those discussing the slowness of exceptions has benchmarked exceptions recently?



well, no need to scamper to your compilers to whip up some microbenchmarks because I already did that, and the results are:

pre:
100_000_000 repeats of trivial work done, 50% errors:

method 1, boolean return          took  667 ms,  result was 3
method 4, reused flow exception   took  752 ms,  result was 3

a mere 10% slowdown for the privilege of using some dodgy flow control as part of the normal execution path

lol java programmers

also

quote:

method 3, option type wrapper took 910 ms, result was 3
there should be no reason for an option type to be significantly slower than returning a value + a bool indicating if its valid. java is awful

Adbot
ADBOT LOVES YOU

b0lt
Apr 29, 2005

Zlodo posted:

a mere 10% slowdown for the privilege of using some dodgy flow control as part of the normal execution path

lol java programmers

also

there should be no reason for an option type to be significantly slower than returning a value + a bool indicating if its valid. java is awful

memory allocation/deallocation is free and instantaneous

Zlodo
Nov 25, 2006

b0lt posted:

memory allocation/deallocation is free and instantaneous

allocating memory on the stack (which is how value types too large to fit into registers are returned in c++) pretty much is: it is literally nothing more than an addition

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug

Notorious b.s.d. posted:

i'm going to start calling osx a windows

decrepit internals
non-standard broken APIs
closed source
hostile vendor

i mean it's practically the same thing

Max Facetime
Apr 18, 2009

Zlodo posted:

there should be no reason for an option type to be significantly slower than returning a value + a bool indicating if its valid. java is awful

it makes sense though, option types you have to first allocate a new one, then check what it contains, when exceptions give you the second part for free

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off

gucci void main posted:

trailing white space is the worst white space

sincere question: why does anyone care about trailing whitespace? e.g., pylint is configured by default to warn about trailing whitespace, but: who cares?

e: the answer is 'autists', isn't it

Shaggar posted:

Linux is so bad that some distros even have paid text editors. incredible



also, for the record, I hate everyone arguing about exceptions

I hate all of you

every one

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off
except this guy

MononcQc posted:

...

"One true form of exception handling", to me, sounds as reductionist of an approach as "one true form of concurrency", "one true programming language paradigm", or whatever. This is to say, it's perfectly fine to be opinionated about it and kitchen sink languages might be terrible, but there will be areas where one or more of them is better than some single other.

...

Treating all error conditions / exceptions with the same mechanism will generally ensure that you pick similar stances on encapsulation vs. detection and identification for all error conditions / exceptions, unless you decide to be extra careful about all of that.

Using multiple mechanisms will allow you to pick, case by case, which one you feel is worth breaking depending on the nature of the fault and what your specific application or system requires.

Option types are pretty awesome, but they're not blanked replacements for other mechanisms IMO. Context is king.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Notorious b.s.d. posted:

lol closed source hobby project

have fun with those timebombs when the maintainer gets bored

yes, ides, actually usable open source text editors like notepad++, and guis are going to stop being a thing any day now and then everyone will go back to using a text editor made in the 70s.

MeruFM
Jul 27, 2010

Wheany posted:

yes, ides, actually usable open source text editors like notepad++, and guis are going to stop being a thing any day now and then everyone will go back to using a text editor made in the 70s.

people are gonna be pretty stoked by my sweet easy-to-use vim functions

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
here is what you need to know about vi:
press 'i' to make it a normal text editor, then you can use your cursor keys to move around and type the commit message
when you're done, press esc and then type ':wq' to save and quit

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
oh, if you gently caress up and don't actually want to save, press esc and then type ":q!" to quit without saving.

fritz
Jul 26, 2003

i got literally laughed at by a dude for using emacs a few months ago

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
i literally used ex within the last 10 minutes, suck it visuailures

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
you know what i wish i had right now? a decwriter, that's what

double sulk
Jul 2, 2010

the more i use git the more i hate it. it's some autistic bullshit.

FamDav
Mar 29, 2008

gucci void main posted:

some autistic bullshit.

dsyp

Nomnom Cookie
Aug 30, 2009



gucci void main posted:

the more i use git the more i hate it. it's some autistic bullshit.

another wrong opinion from sulk

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

gucci void main posted:

the more i use git the more i hate it. it's some autistic bullshit.

then why do you hate it?

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

gucci void main posted:

the more i use git the more i hate it. it's some autistic bullshit.

tell us, what version control system do you prefer

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
:siren: DANGER DANGER :siren:

Carthag Tuek
Oct 15, 2005

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



if you throw an exception you are garbage

if you catch it you are a garbage man

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Wheany posted:

here is what you need to know about vi:
press 'i' to make it a normal text editor, then you can use your cursor keys to move around and type the commit message
when you're done, press esc and then type ':wq' to save and quit

*note: you can't use the arrow keys to move after the last character in the line

fritz
Jul 26, 2003

gucci void main posted:

the more i use git the more i hate it. it's some autistic bullshit.

are you sure youre in the right profession

Brain Candy
May 18, 2006

guys, I think we urgently need to move this thread to brazil.

PleasingFungus
Oct 10, 2012
idiot asshole bitch who should fuck off

Nomnom Cookie posted:

another wrong opinion from sulk


Cocoa Crispies posted:

*note: you can't use the arrow keys to move after the last character in the line

yes you can ???????????

e: when you're in insert mode, which wheany told you to enter a moment beforehand, so

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

fritz posted:

i got literally laughed at by a dude for using emacs a few months ago

lol

PleasingFungus posted:

yes you can ???????????

e: when you're in insert mode, which wheany told you to enter a moment beforehand, so

I think he means like pressing the right arrow key in the end of the line to jump to the start of the next line.

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Symbolic Butt posted:


I think he means like pressing the right arrow key in the end of the line to jump to the start of the next line.

i tried just now and my arrow keys just typed letters wtf

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

fritz posted:

i got literally laughed at by a dude for using emacs a few months ago
In my previous job I did both development and (a lot of) field support. At any moment day or night during my support weeks, a page could come in and then I would have to:

- Power up my cheap company-provided Thinkpad with its pointing stick :stonk: and impossibly small display
- Jump onto the company VPN and connect to my Linux box at the office
- Query the on-site databases in SQLPlus, grep through tool logs, and review tool source code to find out what the hell might be breaking
- Draw on a library of scripts that I had created over time to speed up the process.
- Keep the entire session alive as I moved between home and the office.

Relying on an IDE under these constraints was just hopeless so I used screen + emacs. When I went interviewing for the next job and told people that I had been using emacs for development, none of them gave a poo poo whether I had used anything else in earlier jobs or there might be a practical reason behind it. It could only mean that I was a "hard-core hacker."

Police Academy III
Nov 4, 2011
how to actually use vim: hit ctrl-z and type in killall -9 vim; export EDITOR=nano

Extortionist
Aug 31, 2001

Leave the gun. Take the cannoli.
lol text editors

i edit all my text with echo, cat adn sed

double sulk
Jul 2, 2010

Extortionist posted:

lol text editors

i edit all my text with echo, cat adn sed

i hand write bespoke artisanal letters on the finest parchment, send it with my personally trained carrier pigeon flock to a man overseas who types everything in for me

Police Academy III
Nov 4, 2011
i use emacs

Posting Principle
Dec 10, 2011

by Ralp
vim is for computers that arent yours, and sublime text is for computers that are

FamDav
Mar 29, 2008

gucci void main posted:

i hand write bespoke artisanal letters on the finest parchment, send it with my personally trained carrier pigeon flock to a man overseas who types everything in for me

maybe this is why youre getting nowhere in life

Nomnom Cookie
Aug 30, 2009



i use intellij and also vim. sublime text is an underdocumented piece of poo poo. using it is literally poop from a butt

Posting Principle
Dec 10, 2011

by Ralp
post the yospossest .vimrc and .emacs file u got

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Nomnom Cookie posted:

i use intellij and also vim. sublime text is an underdocumented piece of poo poo. using it is literally poop from a butt

a correct post

Nomnom Cookie
Aug 30, 2009



silent! source ~/.vimrc.local

put your dotfiles in a git repo, store it in bitbucket. when you get a new machine clone the repo and symlink stuff to ~

i have .bash_profile.local and .gvimrc.local files too

MononcQc
May 29, 2007

Max Facetime posted:

does this ever turn into wildly cascading failures waves as each part tries to figure out which other parts they can trust to be working correctly while the whole system shifts and settles to a new consensus view of the world?

The gist of it is that if you know how to deal with a given other part failing, you do it and it won't cascade. Otherwise you may fail yourself. This can lead to cascading failures, but that's only a consequence of your program not knowing how to work with missing components. Do note that this cascading failure, in the worst case, stops all program execution the way a regular exception in a single-process program kills the entire flow of the system and shuts things down or forces a restart of part of the flow.

This leads to trying to develop more modular and loosely coupled components, each in their own process, because the bits you can live without, you design to be entirely separate -- their failure shouldn't affect your own process. How this succeeds or fails in practice is scientifically unproven, I guess. I personally like it.

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

it sounds pointlessly complex.

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