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
Xarn
Jun 26, 2015

Kevin Mitnick P.E. posted:

what got me started though, is when you were pearl clutching about an fd wrapper having a vtable and how it was so much better to write and maintain code to avoid that

i really like the fd example because no matter how skinny you make it in userspace the kernel still has a struct file, which, aside from being vomit-inducingly bloated by c++ standards, includes a vtable pointer

Agreed, the fact that there is a part that is slow means we can make every part slow.

Have you heard the good word of Electron yet?


--------------
gently caress that's a terrible start of new page

Xarn fucked around with this message at 13:30 on Dec 5, 2018

Adbot
ADBOT LOVES YOU

Chalks
Sep 30, 2009

Powerful Two-Hander posted:

same on all of this except for


what the gently caress, Aaron A Aardvark strikes again!

edit: our equivalent is "my changes override everyone else's" but also the management of conflicts is literally "make sure we're not touching the same db functionality in two simultaneous jiras"

In an ideal world we would actually co-ordinate updates to the same areas of code but lol as if we have any idea what parts of the code the sprints will be touching with their seemingly unrelated bug fixes.

We just accept it and catch the issues in QA. Probably.

AggressivelyStupid
Jan 9, 2012

echinopsis posted:

ok so this web app idea I have I have decided im using heroku, using python and postgresql

thats fine.

but its one of these situations where I am going to have to learn a lot of things before I can do any one thing. thats fine

and something made me realise, well, guess I should make the python web app just work on my pc at home alone first. amiright?

i mean not finished, but focus on that first.

a) get a page working with python driving it

b) use postgres to put some data in or around it

c) heroku that mother fucker so its on the web and works



anyway imma go down that path. someone tell me if I am wrong

Django is very rad

Stringent
Dec 22, 2004


image text goes here

AggressivelyStupid posted:

Django is very rad

if you mean the guitarist or the movie character i agree, the web framework is just a web framework

feedmegin
Jul 30, 2008

TheFluff posted:

no, but arm can at least in theory be run as either endianness. not sure if anyone actually does that tho.

Lots of embedddd RISCs can do this but it's all little endian these days. Your primary source of big endian computers in 2018 is probably old SPARC Solaris boxes.

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
we still have a solaris server on a rack specifically because it is big endian and relatively fast. we used it on a codebase that was written with big endian in mind, and nothing was abstracted so porting it to a little-endian arch was impossible. well it was possible, but it was 1+ million lines of C and it was just easier to find an old solaris machine to run the job it needed to every 4 months.

fritz
Jul 26, 2003

Spime Wrangler posted:

ctps: so i'm writing a program in kotlin that does a lot of graph manipulation and needs a really solid hierarchical layout algorithm for visualization. i'm drawing things using tornadofx/javafx and mostly need a system for putting Node A at position (x1, y1) and Node B at position (x2, y2) etc. in a pretty way.

so far i've found five options:

1. outsource it to graphviz & dot. afaict without something like pygraphviz that wraps a c interface to graphviz all I'll get is PNG output, so it's a no-go.

2. rewrite the dot layout algorithm based on the graphviz team's published academic papers. not too crazy, but at a minimum involves solving the network simplex problem for the node ranking step and probably a few other hairy bits I'm not aware of yet. there has to be a reason there are basically zero graph libraries that offer this functionality natively.

3. use a version of graphviz cross-compiled to javascript and run on nashorn or v8. A dude has a java repository that uses this backend, but apparently only generates PNG output like (1) so it's out.

4. use a pure js library like dagre, which appears to have reimplemented the dot layout algorithm, but requires embedding javascript in my application.

5. pay >$10,000 for something like yfiles


there's what claims to be an igraph java interface but it's also old as hell, you might be able to hack apart whichever igraph layout thing works best, also maybe prefuse: http://prefuse.org/doc/api/overview-summary.html or graphstream : http://graphstream-project.org

also digging around, what part of things are only allowing png output? my reading of graphviz suggests it supports stuff like svg

Shaggar
Apr 26, 2006

Spime Wrangler posted:

ctps: so i'm writing a program in kotlin that does a lot of graph manipulation and needs a really solid hierarchical layout algorithm for visualization. i'm drawing things using tornadofx/javafx and mostly need a system for putting Node A at position (x1, y1) and Node B at position (x2, y2) etc. in a pretty way.

so far i've found five options:

1. outsource it to graphviz & dot. afaict without something like pygraphviz that wraps a c interface to graphviz all I'll get is PNG output, so it's a no-go.

2. rewrite the dot layout algorithm based on the graphviz team's published academic papers. not too crazy, but at a minimum involves solving the network simplex problem for the node ranking step and probably a few other hairy bits I'm not aware of yet. there has to be a reason there are basically zero graph libraries that offer this functionality natively.

3. use a version of graphviz cross-compiled to javascript and run on nashorn or v8. A dude has a java repository that uses this backend, but apparently only generates PNG output like (1) so it's out.

4. use a pure js library like dagre, which appears to have reimplemented the dot layout algorithm, but requires embedding javascript in my application.

5. pay >$10,000 for something like yfiles


I think i'm going to do (2) instead of (4) because it might be fun and because god dammit why is the only free off-the-shelf solution to use js??

is there some other tool i'm missing in this space or does literally everything but the JS library require low-level integration with graphviz?

the last time I did a graph thing I did a litterrall command line call to graphviz. it was really stupid but it worked and I could get whatever format I wanted.

Powerful Two-Hander
Mar 10, 2004

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


if you can use javascript then https://d3js.org/ can do all sorts of crazy visualisations and can either auto generate node positions based on a hierarchy or take them as specific coordinates and then wire them up for you

or just do boring bar graphs

Spime Wrangler
Feb 23, 2003

Because we can.

Soricidus posted:

you don’t mention jgraphx. it might meet your needs. ignore all the mentions of swing, you can use the layout code by itself in a javafx gui. (or just embed a swing widget if you want to use their rendering)

idk how good its hierarchical layout algorithm is compared to graphviz but it is, at least, a native jvm implementation of hierarchical graph layout with a permissive open source license

(if you do 2 please post the code because I want to use it too if it’s better than jgraphx)

I have no intention of touching swing so I didn't look too closely at that option. looks like they have a decent algo so I might give that a shot before going hog wild.


fritz posted:

there's what claims to be an igraph java interface but it's also old as hell, you might be able to hack apart whichever igraph layout thing works best, also maybe prefuse: http://prefuse.org/doc/api/overview-summary.html or graphstream : http://graphstream-project.org

also digging around, what part of things are only allowing png output? my reading of graphviz suggests it supports stuff like svg

well by PNG i'm more referring to image formats in general. doing a command-line call to graphviz, saving a svg, loading an svg, parsing it for node locations, and then converting all that into my coordinate system for every redraw in a completely separate visualization seemed a little too hacky.


Powerful Two-Hander posted:

if you can use javascript then https://d3js.org/ can do all sorts of crazy visualisations and can either auto generate node positions based on a hierarchy or take them as specific coordinates and then wire them up for you

or just do boring bar graphs

trying to avoid javascript for now. I have a javascript heavy project or two that I have to jump into soon enough so I'm trying to keep this one clean for when I need a palate cleanser

gonadic io posted:

instead of rewriting the whole thing, what about forking graphviz and hikacking the bit where it turns whatever internal representation into a png

pretty sure I'm more likely to reimplement the algorithm from scratch than spool up on the toolchain and surgery necessary to make this happen. I sure as heck aint posting in the good programmer thread!

Nomnom Cookie
Aug 30, 2009



Xarn posted:

Agreed, the fact that there is a part that is slow means we can make every part slow.

Have you heard the good word of Electron yet?


--------------
gently caress that's a terrible start of new page

please, tell me more about your elegant avoidance of extraneous copies by way of move constructors

Nomnom Cookie
Aug 30, 2009



c++ is the programming language for masochists who memorized digits of pi for fun as a child and now want to combine their love of trivia with their love of self-harm and get paid for it to boot

Star War Sex Parrot
Oct 2, 2003

Kevin Mitnick P.E. posted:

c++ is the programming language for masochists who memorized digits of pi for fun as a child and now want to combine their love of trivia with their love of self-harm and get paid for it to boot
same except I'm not even paid to do it

Sapozhnik
Jan 2, 2005

Nap Ghost
C++ has the worst goddamn standard library, hopefully we can at least agree on that

Love to have a string type and text formatting routines that are completely and utterly worthless

gonadic io
Feb 16, 2011

>>=

Kevin Mitnick P.E. posted:

c++ is the programming language for masochists who memorized digits of pi for fun as a child and now want to combine their love of trivia with their love of self-harm and get paid for it to boot

Ooh, maybe I should put more effort into learning it

Sapozhnik posted:

Love to have a string type and text formatting routines that are completely and utterly worthless

Same, haskell's standard string is a linked list and it's formatting is 1) usually done with manual ++ing, or 2) there is a lesser known library based on printf contorted into haskell's type system

Xarn
Jun 26, 2015
C++ standard library is good :colbert:

As long as you avoid std::string, formatting via streams, any attempts at i18n and other things I am forgetting right now. :v:

Sapozhnik
Jan 2, 2005

Nap Ghost
People don't though, that's the problem

Some are even perverted enough to use boost

Xarn
Jun 26, 2015
Real talk, I actually use Python a lot for scripting and when I don't care for efficiency, and I am completely ok with the fact that my scripts need orders of magnitude more cycles than a proper code would.

At the same time, I make my living by writing software that needs high-throughput and already needs 70+ gigs of ram when using strongly typed ints that need only 4 bytes of memory, so yes, I am kinda sceptical of the "just 16 bytes overhead, who cares" approach.

Nomnom Cookie
Aug 30, 2009



Kevin Mitnick P.E. posted:

please, tell me more about your elegant avoidance of extraneous copies by way of move constructors

just for fun heres a serious answer too

yeah it doesn't really matter how fast your code is. do something simple and correct in a decent language like java and your code will never be the bottleneck in a "query db, make http requests, repeat" loop. oh no everything is only half as fast as if i subjected myself to c++--idgaf. i guess it will just have to take 10 unnecessary microseconds between my 1ms db call and my 50ms http call

"but my code is very important and does things with bytes and it really really matters how fast i shuffle records from disk to ram and back. a factor of 2x is competitive advantage". nope, you're just ignoring the opportunity cost of using c++, the algorithmic and architectural improvements you could have made but didn't while preemptively optimizing every line you touch. i'm sure it's very satisfying to know that every byte is doing the work of a word and you've bled every bubble out of the pipeline, but it doesn't matter and it's not worth it

p.s. now if you are doing realtime and can't afford STW ever, or can afford young gen collections but not STW full collections, java will give you a problem. use C, or if you really can't live without whips and chains, rust

Lime
Jul 20, 2004

Spime Wrangler posted:

well by PNG i'm more referring to image formats in general. doing a command-line call to graphviz, saving a svg, loading an svg, parsing it for node locations, and then converting all that into my coordinate system for every redraw in a completely separate visualization seemed a little too hacky.

graphviz has a plain text out format that is literally just a list of nodes and edges though, that seems by far the simplest option. you could even just capture stdout without having to save / load a file

Nomnom Cookie
Aug 30, 2009



Xarn posted:

Real talk, I actually use Python a lot for scripting and when I don't care for efficiency, and I am completely ok with the fact that my scripts need orders of magnitude more cycles than a proper code would.

At the same time, I make my living by writing software that needs high-throughput and already needs 70+ gigs of ram when using strongly typed ints that need only 4 bytes of memory, so yes, I am kinda sceptical of the "just 16 bytes overhead, who cares" approach.

dude i once spent a day rewriting nested n-dimensional arrays to a flat array with indexes calculated by hand, cause that's what you have to do if you're using java and don't want to alloc a million little blocks of memory when the profiler shows that poo poo matters. you know what didnt matter, the vtable pointer in the handler class

Xarn
Jun 26, 2015

Kevin Mitnick P.E. posted:


"but my code is very important and does things with bytes and it really really matters how fast i shuffle records from disk to ram and back. a factor of 2x is competitive advantage". nope, you're just ignoring the opportunity cost of using c++, the algorithmic and architectural improvements you could have made but didn't while preemptively optimizing every line you touch. i'm sure it's very satisfying to know that every byte is doing the work of a word and you've bled every bubble out of the pipeline, but it doesn't matter and it's not worth it


Slowing down our code so that it takes twice as long in computation is literally adding an hour of runtime....

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

Xarn posted:

Real talk, I actually use Python a lot for scripting and when I don't care for efficiency, and I am completely ok with the fact that my scripts need orders of magnitude more cycles than a proper code would.

At the same time, I make my living by writing software that needs high-throughput and already needs 70+ gigs of ram when using strongly typed ints that need only 4 bytes of memory, so yes, I am kinda sceptical of the "just 16 bytes overhead, who cares" approach.

Performance is nice. Until you enter into an environment where sending off your bits and bytes takes magnitudes longer than any code ever would.

Sapozhnik
Jan 2, 2005

Nap Ghost
A problem I am running into with Java is that I have an orm running in every one of my service processes and when that takes up 300mb of memory for each instance and you are running on an under powered server that starts to add up fast. Especially if it is a tiny http thing that just know how to handle a handful of requests but it has to know about the entirety of my sprawling schema.

(Yeah I am defective enough to use java for hobby projects)

Python is nice for quick throwaway stuff, node is alluring as well esp with typescript, but it has a pathological obsession with DO NOT BLOCK EVER FOR ANY REASON EVERYTHING MUST BE CONTINUATION PASSING STYLE which is just like, I just want a goddamn one off file transformation ok

(Yes async await is a thing but the core node io stuff does not use promises and async await had its own issues, like gfy if you want a useful stack trace for example)

Spime Wrangler
Feb 23, 2003

Because we can.

Lime posted:

graphviz has a plain text out format that is literally just a list of nodes and edges though, that seems by far the simplest option. you could even just capture stdout without having to save / load a file

lmao you're right. thanks for catching my oversight of that option, i'd never seen that in years of bouncing off graphviz (mostly via networkx in python). we'll see how that works (probably really good)

Spime Wrangler fucked around with this message at 21:01 on Dec 5, 2018

FlapYoJacks
Feb 12, 2009
Fun fact: OpenSSL has support for Big-Endian X86 :v:

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

Sapozhnik posted:

C++ has the worst goddamn standard library, hopefully we can at least agree on that

Love to have a string type and text formatting routines that are completely and utterly worthless

Do you even php, bro?

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slćgt skal fřlge slćgters gang



lmao try doing string manipulation in latex

youd thnnk that it would have some stuff built in, but not really. the best you get is like car/cdr and some lexical ordering that can be cobbled together for more userfriendly functions

or you could use any of a number of packages that may or may not break if used with other packages, who knows! :shrug:

Carthag Tuek fucked around with this message at 22:10 on Dec 5, 2018

The_Franz
Aug 8, 2003

Kevin Mitnick P.E. posted:

just for fun heres a serious answer too

yeah it doesn't really matter how fast your code is. do something simple and correct in a decent language like java and your code will never be the bottleneck in a "query db, make http requests, repeat" loop. oh no everything is only half as fast as if i subjected myself to c++--idgaf. i guess it will just have to take 10 unnecessary microseconds between my 1ms db call and my 50ms http call

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

Xarn
Jun 26, 2015

Krankenstyle posted:

lmao try doing string manipulation in latex

youd thnnk that it would have some stuff built in, but not really. the best you get is like car/cdr and some lexical ordering that can be cobbled together for more userfriendly functions

or you could use any of a number of packages that may or may not break if used with other packages, who knows! :shrug:

I just had flashback to writing my thesis, make it stop.

ulmont
Sep 15, 2010

IF I EVER MISS VOTING IN AN ELECTION (EVEN AMERICAN IDOL) ,OR HAVE UNPAID PARKING TICKETS, PLEASE TAKE AWAY MY FRANCHISE

ratbert90 posted:

Fun fact: OpenSSL has support for Big-Endian X86 :v:

Removed 4 years ago, and was less support for Big-Endian X86 and more support for a particular virtual operating system.

http://opensslrampage.org/post/83031733755/remove-support-for-big-endian-i386-and
https://en.wikipedia.org/wiki/Stratus_VOS#Programming_for_VOS

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

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

some people* take the whole premature optimization is the root of all evil to mean never think about performance at all

* web devs

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
compiling my entire java backend application is still faster than whatever insanity webpack needs to do to compile half a dozen js files

FlapYoJacks
Feb 12, 2009

ulmont posted:

Removed 4 years ago, and was less support for Big-Endian X86 and more support for a particular virtual operating system.

http://opensslrampage.org/post/83031733755/remove-support-for-big-endian-i386-and
https://en.wikipedia.org/wiki/Stratus_VOS#Programming_for_VOS

The first post is from the LibreSSL project. :v: The code still exists in OpenSSL as far as I know.

Nomnom Cookie
Aug 30, 2009



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

pretty sure i only said 2x is fine. let me go on record as saying that 1000x is not fine

Nomnom Cookie
Aug 30, 2009



Xarn posted:

Slowing down our code so that it takes twice as long in computation is literally adding an hour of runtime....

ok. doesn't matter

TheFluff
Dec 13, 2006

FRIENDS, LISTEN TO ME
I AM A SEAGULL
OF WEALTH AND TASTE
incredibly hot take: realtime systems exist

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Kevin Mitnick P.E. posted:

what got me started though, is when you were pearl clutching about an fd wrapper having a vtable and how it was so much better to write and maintain code to avoid that

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

Kevin Mitnick P.E. posted:

i really like the fd example because no matter how skinny you make it in userspace the kernel still has a struct file, which, aside from being vomit-inducingly bloated by c++ standards, includes a vtable pointer

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

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

Kevin Mitnick P.E. posted:

yeah it doesn't really matter how fast your code is. do something simple and correct in a decent language like java and your code will never be the bottleneck in a "query db, make http requests, repeat" loop.

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

Kevin Mitnick P.E. posted:

"but my code is very important and does things with bytes and it really really matters how fast i shuffle records from disk to ram and back. a factor of 2x is competitive advantage". nope, you're just ignoring the opportunity cost of using c++,

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

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

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

Adbot
ADBOT LOVES YOU

VikingofRock
Aug 24, 2008




Krankenstyle posted:


or you could use any of a number of packages that may or may not break if used with other packages, who knows! :shrug:

This is the worst thing about LaTeX. It would be so good if it just had package-level namespacing, and maybe a build system that automatically downloaded needed packages from CTAN, but that's not the world we live in.

Also,

Xarn posted:

I just had flashback to writing my thesis, make it stop.

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