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
titaniumone
Jun 10, 2001

prefect posted:

maven?

and is scons particularly bad or something? i've never used it

someone last page said it was nightmareish and someone else linked that it scales horribly and this is a really large project so they're definitely gonna get owned by the scaling

i want other laffs as well though but yeah i know nothing about it

Adbot
ADBOT LOVES YOU

Sapozhnik
Jan 2, 2005

Nap Ghost
you're not declaring things, you're executing imperative statements to declare things one at a time (or in a loop or in an if statement or whatever)

this smells like dung

build systems in general smell like dung tho so w/e if it works for you use it

Posting Principle
Dec 10, 2011

by Ralp
the nightmare i was talking about was caring about build systems, not specifically scons

right now one of our components at works has a build process that goes like this:

1. build tool from source
2. fetch variable number of files from network location to parse
2. use tool to parse files from step 2 and output variable number of headers
3. use headers from step 3 to build component

scons makes it easy for us to mix the imperative (get some stuff, parse some stuff) and the declarative (make a list of dependency nodes from the parse results, add them as a requirement for component foo)

scons makes doing that really really easy so if we can manage/tolerate the slowness then its a net gain for us but who knows how it will work out

Posting Principle
Dec 10, 2011

by Ralp
note that right now we do this with autotools and shell scripts :negative:

tef
May 30, 2004

-> some l-system crap ->

Jerry SanDisky posted:

note that right now we do this with autotools and shell scripts :negative:

build system documentation
build scripts
test docs
test code
comments
code

the thing at the bottom is terrible. the thing at the top is just painful.

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band
builds are supposed to be horrible; otherwise it would be harder for me to find work

qntm
Jun 17, 2009

prefect posted:

and is scons particularly bad or something? i've never used it

it is pronounced "scones" :mad:

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

qntm posted:

it is pronounced "scones" :mad:

that's one point against it

(scones are terrible)

quiggy
Aug 7, 2010

[in Russian] Oof.


prefect posted:

(scones are terrible)

mlyp

salted hash browns
Mar 26, 2007
ykrop
I have a graph theory type question

I have an object that looks like this:
code:
data = { 
  nodes: [
    {name: 'whatevs1', attribute: 'yaws' },
    {name: 'whatevs2', attribute: 'paws' },
    ....
  ],
  edges: [
    {source: 'whatevs1', target: 'whatevs2'},
    ...
  ]
}
Unfortunately, I need to represent this graph in HTML. I need a javascript library that can lay out each of the nodes as <div>'s using top/bottom/left/right positioning so I can draw the edges between them.

I tried writing my own javascript graph library, and boy was that a bad idea. I'm not a good web dev.

So yospos: how do I position <div>s according to a graph? tia

Blotto Skorzany
Nov 7, 2008

He's a PSoC, loose and runnin'
came the whisper from each lip
And he's here to do some business with
the bad ADC on his chip
bad ADC on his chiiiiip
comedy option: have graphviz render it as an image

Carthag Tuek
Oct 15, 2005

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



so can you use SCons.Scanner to get a dependency tree structure or what, the docs are terrible

kmqat
Aug 18, 2008

Otto Skorzeny posted:

comedy option: have graphviz render it as an image

just compile graphviz to javascript, nbd

tef
May 30, 2004

-> some l-system crap ->

salted hash browns posted:

I have a graph theory type question

I have an object that looks like this:
code:
data = { 
  nodes: [
    {name: 'whatevs1', attribute: 'yaws' },
    {name: 'whatevs2', attribute: 'paws' },
    ....
  ],
  edges: [
    {source: 'whatevs1', target: 'whatevs2'},
    ...
  ]
}
Unfortunately, I need to represent this graph in HTML. I need a javascript library that can lay out each of the nodes as <div>'s using top/bottom/left/right positioning so I can draw the edges between them.

or you can find something that will draw the edges

quote:

I tried writing my own javascript graph library, and boy was that a bad idea. I'm not a good web dev.

So yospos: how do I position <div>s according to a graph? tia


have you looked at d3.js.

it's neat http://bl.ocks.org/rkirsling/5001347

salted hash browns
Mar 26, 2007
ykrop

Otto Skorzeny posted:

comedy option: have graphviz render it as an image

Unfortunately, I thought about this :sigh: but then it looks like poo poo. We need a way to just place the <div>s so they can be styled with CSS and look half decent.

Carthag posted:

so can you use SCons.Scanner to get a dependency tree structure or what, the docs are terrible

you're right the docs look terrible and I don't even know where to begin.

tef posted:

or you can find something that will draw the edges

have you looked at d3.js.

Drawing edges from node1->node2 is easy. I mean if we can find something that will do both great.

D3 looked promsing, but the force layout (the one that you linked) is way overkill for what we're doing. Maybe we can strip out all the physics stuff and just have it render the nodes/edges? I dunno I'm not good with this stuff.

titaniumone
Jun 10, 2001

salted hash browns posted:

Unfortunately, I thought about this :sigh: but then it looks like poo poo. We need a way to just place the <div>s so they can be styled with CSS and look half decent.


you're right the docs look terrible and I don't even know where to begin.


Drawing edges from node1->node2 is easy. I mean if we can find something that will do both great.

D3 looked promsing, but the force layout (the one that you linked) is way overkill for what we're doing. Maybe we can strip out all the physics stuff and just have it render the nodes/edges? I dunno I'm not good with this stuff.

yes you can use d3 just to do the layout and svg rendering

d3 is great and probably what you want, use it

Squinty Applebottom
Jan 1, 2013

another vote for d3 is amazing

you don't need to do all that force poo poo. it makes poo poo like what you want to do super easy

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

salted hash browns posted:

Unfortunately, I thought about this :sigh: but then it looks like poo poo. We need a way to just place the <div>s so they can be styled with CSS and look half decent.


you're right the docs look terrible and I don't even know where to begin.


Drawing edges from node1->node2 is easy. I mean if we can find something that will do both great.

D3 looked promsing, but the force layout (the one that you linked) is way overkill for what we're doing. Maybe we can strip out all the physics stuff and just have it render the nodes/edges? I dunno I'm not good with this stuff.

GraphviZ and dot

Shaggar
Apr 26, 2006

prefect posted:

builds are supposed to be horrible; otherwise it would be harder for me to find work

if your build is horrible ur doing something wrong like not using maven properly.

Shaggar
Apr 26, 2006
I wrote a java wrapper around graphviz to generate svg graphs.

salted hash browns
Mar 26, 2007
ykrop

polpotpi posted:

another vote for d3 is amazing

you don't need to do all that force poo poo. it makes poo poo like what you want to do super easy

yeah d3 seems to be the way to go here. Trying to find some decent examples of static graphs in D3.

I've found this [static force graph in D3][http://bl.ocks.org/mbostock/1667139] that is kind of where I need to go, but not totally there yet.

MeruFM
Jul 27, 2010
chrome crashed trying to load that image

i think something went bad

Shaggar
Apr 26, 2006
upgrade your browser to IE10 and try again

salted hash browns
Mar 26, 2007
ykrop

MeruFM posted:

chrome crashed trying to load that image

i think something went bad

works for me

Shaggar
Apr 26, 2006
can you pass d3 a .dot or some other common graph file cause while it might be nice to have a graphing tool that isn't an external process, its not worth it if I'd have to deal with a bunch of javascript.

Squinty Applebottom
Jan 1, 2013

Shaggar posted:

can you pass d3 a .dot or some other common graph file cause while it might be nice to have a graphing tool that isn't an external process, its not worth it if I'd have to deal with a bunch of javascript.

no

also javascript is the best. its a scripting version of java, youre favorite lang

Nomnom Cookie
Aug 30, 2009



Jerry SanDisky posted:

the nightmare i was talking about was caring about build systems, not specifically scons

right now one of our components at works has a build process that goes like this:

1. build tool from source
2. fetch variable number of files from network location to parse
2. use tool to parse files from step 2 and output variable number of headers
3. use headers from step 3 to build component

scons makes it easy for us to mix the imperative (get some stuff, parse some stuff) and the declarative (make a list of dependency nodes from the parse results, add them as a requirement for component foo)

scons makes doing that really really easy so if we can manage/tolerate the slowness then its a net gain for us but who knows how it will work out

it doesn't matter what tool you use to build a palace of poo poo. you're still the poop king

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

polpotpi posted:

no

also javascript is the best. its a scripting version of java, youre favorite lang

my favorite thing about javascript is how it has nothing to do with java.

Shaggar
Apr 26, 2006

polpotpi posted:

no

also javascript is the best. its a scripting version of java, youre favorite lang

javascript is terrible and if you cant just give it a preexisting graph and have it build it itself then its worthless.

Shaggar fucked around with this message at 21:34 on Jun 6, 2013

Nomnom Cookie
Aug 30, 2009



Shaggar posted:

if your build is horrible ur doing something wrong like not using maven properly.

i figured out recently that using maven to tar up static poop and put it in artifactory is really ez. now we have a unified build/deployment process for html/css/js/php/java. it fuckin kicks rear end

salted hash browns
Mar 26, 2007
ykrop
:siren: D3 TRIP REPORT :siren:

So I'm a poo poo terrible javascript programmer and in ~1hr got this having never used D3 before:



so this looks like the way to go. back slaps all the way around. special shoutout to tef, titaniumone and polpotpi who said to use this in the first place.

next: learning what all these things mean. Where can I learn more about charge, linkstrength, friction, etc and other graph terms?

edit: god damnit i can't get these things to stop stepping on each other :arghfist: javascript

salted hash browns fucked around with this message at 22:13 on Jun 6, 2013

Opinion Haver
Apr 9, 2007

idk but those are generally only terms used for graph layout engines, not graph theory

Notorious b.s.d.
Jan 25, 2003

by Reene

gucci void main posted:

@ID_AA_Carmack: The lack of strong typing in lisp is freaking me out, even in tiny programs. Writing an industrial program like this seems... unsound.

common lisp has (optional) strong typing and (optional) static type checking for that strong typing

what horrible lovely lisp is carmack using

Notorious b.s.d.
Jan 25, 2003

by Reene

prefect posted:

maven?

and is scons particularly bad or something? i've never used it

scons is basically "we heard you like building code, so we put code in your build scripts so you can build code while you build code." it is a nightmare to troubleshoot.

as an added bonus, it is written in python, so it's hilariously, mindblowingly slow. like, build scripts that can take as long as the compiler itself. oh, and have fun even getting it to run on your target platform.

titaniumone
Jun 10, 2001

Notorious b.s.d. posted:

scons is basically "we heard you like building code, so we put code in your build scripts so you can build code while you build code." it is a nightmare to troubleshoot.

as an added bonus, it is written in python, so it's hilariously, mindblowingly slow. like, build scripts that can take as long as the compiler itself. oh, and have fun even getting it to run on your target platform.

here are the laffs i was looking for

ty

Nomnom Cookie
Aug 30, 2009



basically maven and autotools are acceptable build systems. everything else is horrible trash

coaxmetal
Oct 21, 2010

I flamed me own dad
is autotools the same as autoconf

pseudorandom name
May 6, 2007

autotools includes automake and libtool in addition to autoconf, both of which are also horrible. especially libtool.

coaxmetal
Oct 21, 2010

I flamed me own dad
I don't really have much experience with build systems. I mean i've used them to build stuff other people made, but for my stuff ive either just used Makefiles, or no build system (for python and stuff)

Adbot
ADBOT LOVES YOU

Jonny 290
May 5, 2005



[ASK] me about OS/2 Warp

Shaggar posted:

javascript is terrible

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