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
raminasi
Jan 25, 2005

a last drink with no ice
Is there a name for a data structure that's like a "fuzzy" search tree? (Or hash set, maybe?) Basically I need a dictionary-like type where I can look up keys that are close to some target value, for some specified meaning of "close." (My specific case is with doubles, so something specialized with strings won't help.)

Adbot
ADBOT LOVES YOU

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


You could use a skip list to efficiently find the closest keys to your query value, and then decide whether they're close enough. That would probably be tough to do with strings, but it should be fine with doubles (assuming that your notion of closeness is the standard metric on the real line, or something else that plays well with the ordering).

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Hughlander posted:

What's the latest and greatest for Javascript IDEs? I don't do JavaScript often so I mostly just ssh to a toy VPS I own and use vi and hit a page with a browser. But now I got a project I'd like to work on that's full of javascript buzzwords, AJAX, Bookmarklet, page injection etc... and I'd probably kill myself if I had to continue to do vi.

I've been using Sublime Text 2 for JavaScript. It's not really a full fledged IDE, more of a really nice text editor. WebStorm may be worth checking out if you want more of an IDE.

baquerd
Jul 2, 2007

by FactsAreUseless

GrumpyDoctor posted:

Is there a name for a data structure that's like a "fuzzy" search tree? (Or hash set, maybe?) Basically I need a dictionary-like type where I can look up keys that are close to some target value, for some specified meaning of "close." (My specific case is with doubles, so something specialized with strings won't help.)

You could use a rounding function on input values and then compare rounded values to your dictionary. If you need mixed precision then you can set up a b-tree structure with different levels of precision until you reach a leaf node, but that gets a little messy.

OnceIWasAnOstrich
Jul 22, 2006

GrumpyDoctor posted:

Is there a name for a data structure that's like a "fuzzy" search tree? (Or hash set, maybe?) Basically I need a dictionary-like type where I can look up keys that are close to some target value, for some specified meaning of "close." (My specific case is with doubles, so something specialized with strings won't help.)

Could you do something like a binary search tree except when you get to the last child node you compare back to the last parent and see which one of them is closest? Or are you trying to find some number k-nearest neighbors, for which there are algorithms of that name

Nippashish
Nov 2, 2005

Let me see you dance!

GrumpyDoctor posted:

Is there a name for a data structure that's like a "fuzzy" search tree? (Or hash set, maybe?) Basically I need a dictionary-like type where I can look up keys that are close to some target value, for some specified meaning of "close." (My specific case is with doubles, so something specialized with strings won't help.)

FLANN is a library for doing approximate nearest neighbor searches in high dimensions. I'm not sure that that's quite what you're doing but it's a good library if it does fit your requirements.

raminasi
Jan 25, 2005

a last drink with no ice

OnceIWasAnOstrich posted:

Could you do something like a binary search tree except when you get to the last child node you compare back to the last parent and see which one of them is closest?

This is essentially what I want to do, but it wouldn't be worth the developer time/running time tradeoff to actually roll it myself so I was trying to figure out if someone had already done the heavy lifting somewhere.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

GrumpyDoctor posted:

This is essentially what I want to do, but it wouldn't be worth the developer time/running time tradeoff to actually roll it myself so I was trying to figure out if someone had already done the heavy lifting somewhere.

Depending on your language, pretty much any SortedSet implementation has subset operations already defined for you.

clockwork automaton
May 2, 2007

You've probably never heard of them.

Fun Shoe
I really hate putting this here, but I need to try to reach out to as many programmers as possible.

There's currently no data on LGBTQ individuals involved in tech so I am doing my own informal anonymous survey. As of writing so far I have 580 respondents and I'd love to increase that number. It's just 5 questions and should take no time at all.

I'd appreciate any responses that I can get and if people could pass it on that'd be awesome, but is by no means required.

raminasi
Jan 25, 2005

a last drink with no ice

Jabor posted:

Depending on your language, pretty much any SortedSet implementation has subset operations already defined for you.

:cripes: jesus christ why didn't I realize this

Huragok
Sep 14, 2011

clockwork automaton posted:

I'd appreciate any responses that I can get and if people could pass it on that'd be awesome, but is by no means required.

Perhaps you could also add a question something to the tune of "what impact (if any) does your sexuality or gender identification have on your job/profession?"

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

clockwork automaton posted:

I really hate putting this here, but I need to try to reach out to as many programmers as possible.

There's currently no data on LGBTQ individuals involved in tech so I am doing my own informal anonymous survey. As of writing so far I have 580 respondents and I'd love to increase that number. It's just 5 questions and should take no time at all.

I'd appreciate any responses that I can get and if people could pass it on that'd be awesome, but is by no means required.

Is this related to Maddog coming out?
http://techcrunch.com/2012/06/25/jon-maddog-hall-comes-out-in-honor-of-alan-turings-birthday/

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


clockwork automaton posted:

I really hate putting this here, but I need to try to reach out to as many programmers as possible.

There's currently no data on LGBTQ individuals involved in tech so I am doing my own informal anonymous survey. As of writing so far I have 580 respondents and I'd love to increase that number. It's just 5 questions and should take no time at all.

I'd appreciate any responses that I can get and if people could pass it on that'd be awesome, but is by no means required.

This is fine if you just want to say something like "Out of N respondents, p% are not straight", but if you want to draw any inferences about the industry as a whole, you absolutely need to use proper sampling techniques. Right now your respondents are entirely self-selected, and you can't make any inferences about non-responders. (Not that you won't have problems of non-response in any survey of this nature, but that's a well-considered problem and you can look into how other researchers have addressed it.)

clockwork automaton
May 2, 2007

You've probably never heard of them.

Fun Shoe

ultrafilter posted:

This is fine if you just want to say something like "Out of N respondents, p% are not straight", but if you want to draw any inferences about the industry as a whole, you absolutely need to use proper sampling techniques. Right now your respondents are entirely self-selected, and you can't make any inferences about non-responders. (Not that you won't have problems of non-response in any survey of this nature, but that's a well-considered problem and you can look into how other researchers have addressed it.)

I completely understand this, which is why it is mostly me getting a feel for the data. I plan by no means to represent what I gather as being statistically accurate. I don't really have the resources to do this as it really should.

This doesn't actually relate to Maddog coming out. I'm actually co-giving a talk at a couple ruby confs in august on anti-oppression and the person I was giving it with suggested also showing some data on LGBTQ populations in tech. Though, I suspected this would be one of the groups of people that aren't underrepresented in tech and thus far the survey seems to indicate that is the case. The people I talked to at NOGLSTP also seemed to think that this was the case and told me that ~10% of their members are involved in tech and that 3.8% of the overall population is LGBTQ.

edmund745
Jun 5, 2010
I gots a questions about parallel ports:

Earlier OS's could only have one, but I assume that WinXP and Linux can use multiples.
1--Is this incorrect? and-
2--can it use two at the same time?

There ain't jack squat in the consumer world using PP anymore.

I am curious as to how it might be possible to control a CNC machine that will have 12 axis. There are driver boards and kits for CNC machines up to 6-axis, but nothing beyond that I have found. With two cards or two USB adapters, this would seem pretty easy.

There is straight-USB driver boards also, but I dunno if there's any 6-axis ones. And anyway the 4-axis USB ones cost $250 while the 6-axis parallel-port ones cost $30.

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

I don't have an answer to your question (my guess is that latency might be an issue depending on what bus the PP uses) but I do remember there was a mini slap fight in the Raspberry Pi thread in SHSC proper between 3-4 guys talking about its viability as a CNC machine, and they seemed to know what their stuff in general. I believe TimThomas was one of them but I don't remember the rest.

PDP-1
Oct 12, 2004

It's a beautiful day in the neighborhood.

edmund745 posted:

I gots a questions about parallel ports:

Earlier OS's could only have one, but I assume that WinXP and Linux can use multiples.
1--Is this incorrect? and-
2--can it use two at the same time?

There ain't jack squat in the consumer world using PP anymore.

I am curious as to how it might be possible to control a CNC machine that will have 12 axis. There are driver boards and kits for CNC machines up to 6-axis, but nothing beyond that I have found. With two cards or two USB adapters, this would seem pretty easy.

There is straight-USB driver boards also, but I dunno if there's any 6-axis ones. And anyway the 4-axis USB ones cost $250 while the 6-axis parallel-port ones cost $30.

I believe you can have up to two parallel ports, LPT1 and LPT2. The control/data registers were memory mapped in older Windows systems (I haven't used this stuff past the Win2000 era) so it wasn't possible to have more than that.

I wouldn't be thrilled about building something new on a deprecated IO system like parallel ports, but if you absolutely have to go that way look into getting a couple of USB-to-Parallel converter cables so that at least your control computer doesn't need to have any special hardware. Just make sure that the drivers that come with the cables support your OS (some USB-to-RS232 drivers have problems with Win7, I imagine the same caveat applies here), and buy both cables from one manufacturer since the drivers run at a kernel level and having multiple port emulators from different companies running at the same time will bluescreen your machine on a regular basis.

bootleg robot
Dec 8, 2004

Sorry if this has been asked before, but I wanted to know if there is a good rule of thumb / best practice when designing the interfaces for two objects that interact with each other.

For example, if I had a Pen interface and a Paper interface, would it be best to do Paper.draw(Pen), or Pen.draw(Paper)? Or maybe some more context is needed to make the best choice?

Jewel
May 2, 2009

bootleg robot posted:

Sorry if this has been asked before, but I wanted to know if there is a good rule of thumb / best practice when designing the interfaces for two objects that interact with each other.

For example, if I had a Pen interface and a Paper interface, would it be best to do Paper.draw(Pen), or Pen.draw(Paper)? Or maybe some more context is needed to make the best choice?

Usually I think it's best to do "Object.draw(Surface)", at least, it seems that way. Most games just use "for obj in object_list: obj.draw(screen)" and have the object handle it's position and sprite and whatnot.

Johnny Cache Hit
Oct 17, 2011

bootleg robot posted:

Or maybe some more context is needed to make the best choice?

One tip I've heard is to model the interaction as a sentence. You want active sentences, not passive ones. Thus it's better to say "the pen drew on the paper" (Pen.draw(Paper)) rather than "the paper was drawn on by the pen" (Paper.draw(Pen)).

I'm not sure if that test is the best, but it seems to work pretty well v:shobon:v

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

bootleg robot posted:

Sorry if this has been asked before, but I wanted to know if there is a good rule of thumb / best practice when designing the interfaces for two objects that interact with each other.

For example, if I had a Pen interface and a Paper interface, would it be best to do Paper.draw(Pen), or Pen.draw(Paper)? Or maybe some more context is needed to make the best choice?

If you think about methods as verbs and objects as nouns, it's the pen that draws on the paper.

chglcu
May 17, 2007

I'm so bored with the USA.

bootleg robot posted:

Sorry if this has been asked before, but I wanted to know if there is a good rule of thumb / best practice when designing the interfaces for two objects that interact with each other.

For example, if I had a Pen interface and a Paper interface, would it be best to do Paper.draw(Pen), or Pen.draw(Paper)? Or maybe some more context is needed to make the best choice?

I'll agree with the others who have said that Pen.draw(Paper) probably makes the most sense, though Paper.draw(Pen) doesn't really offend me.

I'd guess the most important thing to be careful of is that if you end up having multiple implementations of both Paper and Pen, to make sure you don't have to special case things everywhere. For example, you don't want:

code:
class Pen
    method draw (Paper)
        if (Paper is Cardboard)
    	    // draw on carboard
        else if (Paper is ConstructionPaper)
    	    // more special drawing code
        // etc.

class Marker
    method draw (Paper)
        if (Paper is Cardboard)
    	    // draw on carboard
        else if (Paper is ConstructionPaper)
    	    // more special drawing code
        // etc.

class Pencil
    method draw (Paper)
        if (Paper is Cardboard)
    	    // draw on carboard
        else if (Paper is ConstructionPaper)
    	    // more special drawing code
        // etc.
That obviously gets out of hand pretty quickly. You'd probably instead want to define the paper as a series of attributes that can affect the pen.

code:
interface Paper
    attribute roughness
    attribute color
    // etc.

Pen.draw (Paper)
    method draw (Paper)
        // One pen drawing path, using the attributes of the paper

Marker.draw (Paper)
    method draw (Paper)
        // One marker drawing path, using the attributes of the paper

class Pencil
    method draw (Paper)
        // One pencil drawing path, using the attributes of the paper
Depending on how pens are defined, you might also be able to have only one implementation of Pen.draw (Paper) that uses attributes of both the pens and paper:

code:
class Paper
    attribute roughness
    attribute color
    // etc.

class Pen
    attribute lineThickness
    attribute color
    // etc.

    method draw (Paper)
        // Drawing implementation

// All these work, using one simple drawing path:
Paper paper (roughness = 0, color = white)
Paper cardboard (roughness = 3, color = brown)
Paper constructionPaper (roughness = 1, color = RandomColor)

Pen pencil (lineThickness = 1, color = grey)
Pen pen (lineThickness = 2, color = black)
Pen marker (lineThickness = 3, color = RandomColor)

pencil.draw(paper)
pen.draw(cardboard)
marker.draw(constructionPaper)
I guess the main point here is don't create complex inheritance hierarchies that don't really help you. Keep things as simple as you can.

That ended up a lot longer than I intended, and it went a bit beyond the original question. Hopefully it made some sense. Literally the first thing I did after waking up.

raminasi
Jan 25, 2005

a last drink with no ice
This is why more languages need multiple dispatch :mad:

Grundulum
Feb 28, 2006
I have a question about FORTRAN, but I didn't see a thread for it in the OP. Is there a language specific thread for it, or should I just fire away in here?


You can stop laughing now. Thanks.

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
Grundulum: As long as the question isn't some variation on "How do I speed up this piece of FORTRAN code without using heavyweight abstractions like loops and procedures?"- There's a thread for those already. Otherwise here is probably fine.

Grundulum
Feb 28, 2006
Well, then. I'm trying to rework some code that reads like the OP of that coding horror stories thread you just linked.

Is there a way to change a variable's 'parameter' status from within the code? I'd like to read in a number that I will then use to allocate array sizes (easy if it doesn't have the parameter keyword), but since it's not my code I want to make sure that some line doesn't go and change that number after the input subroutine has run (hard if it isn't a parameter).

cr0y
Mar 24, 2005



Not sure if this goes here but I figure you guys could give me a quick answer. Can someone recommend a simple program for windows that can generate and check md5 and other signatures of a file(s)? I used to use hksfv back in the day which nicely integrated into the context menu but it's been 10 years since it has been updated and doesn't play nicely with windows 7.

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug
HashTab was perfectly fine for my uses, but it's been a long time since I've used it.

Huragok
Sep 14, 2011
Which one of you bought this banner ad:



Unless they're yours, it's pretty drat mysogynistic.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Huragok posted:

Which one of you bought this banner ad:



Unless they're yours, it's pretty drat mysogynistic.

"Come blog about apps and dev poo poo, my lord"

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Huragok posted:

Which one of you bought this banner ad:



Unless they're yours, it's pretty drat mysogynistic.

At least he's not farming Amazon clicks?

Factor Mystic
Mar 20, 2006

Baby's First Post-Apocalyptic Fiction
I assume it's an ironic critique of the boobs based amazon clickthroughs by slapping boobs on a low effort banner.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



That's higher effort than a few of the Kindle Fire banners in that it has not just one but two pictures and also some words. Must have taken whole minutes to make.

Jose Cuervo
Aug 25, 2004
I am not sure if I can achieve what I want, so hopefully you all will be able to tell me if what I want to do is impossible.

I have 4 different papers that I am writing that are each located in a separate folder. Each paper has it's own local plain text bib file with the citation information of the citations needed for that paper. The citation information is stored in the BibTeX format. A number of the citations overlap - i.e., the citation is used in more than one paper.

The two questions are:
1. Is it possible to write some code/script so that I would have one master plain text bib file with all the citations, and whenever I made a change to a citation, I could run the code/script so that the citation information gets updated in each local paper's plain text bib file?

2. Can someone with limited coding ability (me) write this code given a plan of how to do it?

I have been doing the updating manually, but sometimes I do not update everything, or I misspell something and it is getting to be very aggravating.

ToxicFrog
Apr 26, 2008


Jose Cuervo posted:

I am not sure if I can achieve what I want, so hopefully you all will be able to tell me if what I want to do is impossible.

I have 4 different papers that I am writing that are each located in a separate folder. Each paper has it's own local plain text bib file with the citation information of the citations needed for that paper. The citation information is stored in the BibTeX format. A number of the citations overlap - i.e., the citation is used in more than one paper.

The two questions are:
1. Is it possible to write some code/script so that I would have one master plain text bib file with all the citations, and whenever I made a change to a citation, I could run the code/script so that the citation information gets updated in each local paper's plain text bib file?

2. Can someone with limited coding ability (me) write this code given a plan of how to do it?

I have been doing the updating manually, but sometimes I do not update everything, or I misspell something and it is getting to be very aggravating.

This is possible, and given the simplicity of the BibTeX format, not even very hard, but it also sounds a lot like overkill compared to the other possibilities:

- merge all of the BibTeX files, have all four papers reference the same .bib directly rather than having its own copy of a subset of it
- have a single "common" BibTeX file that contains all of the citations used in more than one paper, and a file of paper-specific citations for each paper; have each paper reference both the common.bib and the paperspecific.bib.

Of those, I think I'd prefer the first one.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Jose Cuervo posted:

I am not sure if I can achieve what I want, so hopefully you all will be able to tell me if what I want to do is impossible.

I have 4 different papers that I am writing that are each located in a separate folder. Each paper has it's own local plain text bib file with the citation information of the citations needed for that paper. The citation information is stored in the BibTeX format. A number of the citations overlap - i.e., the citation is used in more than one paper.

The two questions are:
1. Is it possible to write some code/script so that I would have one master plain text bib file with all the citations, and whenever I made a change to a citation, I could run the code/script so that the citation information gets updated in each local paper's plain text bib file?

2. Can someone with limited coding ability (me) write this code given a plan of how to do it?

I have been doing the updating manually, but sometimes I do not update everything, or I misspell something and it is getting to be very aggravating.

Yes, that is something that you could do reasonably straightforwardly with the scripting language of your choice. Do you have any experience using a scripting language like Python, Perl, Lua, etc etc.?

I do not know how others would approach this (and I do not know anything about bibtex), but here is what I might do, assuming you do not want to go to the trouble of involving a relational database:

- Make a master citations file with all of the citations in it, together with identifying names (for your use). You could do a citation on every line of the file, with name first then citation text separated by a tab. Or you could do it innumerable other ways.
- If your papers are spread across a number of directories, then make another file that lists all of the directories to be searched and updated.
- For each paper, make a file called something like "papername.mybib" that just has a list of the citations you want, identified by the name you used in the master citation file.
- Now write your script. The script should read from the two master files. From the first one it builds up a list of identifiers and the citation text for each one. From the second one it reads a list of directories to search through. It goes through each directory in turn looking for .mybib files. For each one, it generates a .bib file.

When reading the first master file, the script should be prepared to encounter blank lines and lines that are "comments" (say, lines starting with % or #), so that you can lay it out in a way that is pleasing and easy for you to read.

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug
You could concatenate all of the .bib files together, symlink the single .bib file into each paper's directory, and fix the 'duplicate citation' errors/warnings if and when they happen.

Jose Cuervo
Aug 25, 2004

ToxicFrog posted:

This is possible, and given the simplicity of the BibTeX format, not even very hard, but it also sounds a lot like overkill compared to the other possibilities:

- merge all of the BibTeX files, have all four papers reference the same .bib directly rather than having its own copy of a subset of it
- have a single "common" BibTeX file that contains all of the citations used in more than one paper, and a file of paper-specific citations for each paper; have each paper reference both the common.bib and the paperspecific.bib.

Of those, I think I'd prefer the first one.

The issue with the first solution (which is how I was doing things to start) is that I have co-authors and need to upload the files to a single folder that they can then use to compile the latex files. Unless I force them to use the same relative file structure as I do, and have them download the master bib file each time this option does not work.

Hammerite posted:

Yes, that is something that you could do reasonably straightforwardly with the scripting language of your choice. Do you have any experience using a scripting language like Python, Perl, Lua, etc etc.?

I do not know how others would approach this (and I do not know anything about bibtex), but here is what I might do, assuming you do not want to go to the trouble of involving a relational database:

- Make a master citations file with all of the citations in it, together with identifying names (for your use). You could do a citation on every line of the file, with name first then citation text separated by a tab. Or you could do it innumerable other ways.
- If your papers are spread across a number of directories, then make another file that lists all of the directories to be searched and updated.
- For each paper, make a file called something like "papername.mybib" that just has a list of the citations you want, identified by the name you used in the master citation file.
- Now write your script. The script should read from the two master files. From the first one it builds up a list of identifiers and the citation text for each one. From the second one it reads a list of directories to search through. It goes through each directory in turn looking for .mybib files. For each one, it generates a .bib file.

When reading the first master file, the script should be prepared to encounter blank lines and lines that are "comments" (say, lines starting with % or #), so that you can lay it out in a way that is pleasing and easy for you to read.

I don't know any of the scripting languages you mentioned, but with the sketch of how to accomplish this I think I can fumble my way through. Thanks for the insight into how to attack this problem.

Lysidas posted:

You could concatenate all of the .bib files together, symlink the single .bib file into each paper's directory, and fix the 'duplicate citation' errors/warnings if and when they happen.

Not quite sure what this means, but I think I will go with the Hammerite's solution.

ToxicFrog
Apr 26, 2008


Jose Cuervo posted:

The issue with the first solution (which is how I was doing things to start) is that I have co-authors and need to upload the files to a single folder that they can then use to compile the latex files. Unless I force them to use the same relative file structure as I do, and have them download the master bib file each time this option does not work.

How does splitting it into multiple files (that they still need to re-download each time they change) address this?

quote:

I don't know any of the scripting languages you mentioned, but with the sketch of how to accomplish this I think I can fumble my way through. Thanks for the insight into how to attack this problem.

Hammerite's solution may be overkill, honestly. BibTeX is a pretty simple format and you don't really need (or want) a separate, non-BibTeX master file that gets processed into BibTeX. Revised version:

pre:
- read master.bib file
- foreach paper:
  - read the paper-specific ".mybib" file, which is just a list of papers you
    want to cite (using the same names they're listed under in the master.bib)
  - foreach paper listed: copy that entry from the master.bib into a paper-
    specific .bib file
I could probably hack together a simplified example implementation in Clojure or Lua if you want one.

quote:

Not quite sure what this means, but I think I will go with the Hammerite's solution.

It's the same as my first idea (create a merged file that all the papers use) with the added use of symbolic links so that each project looks like it has its own copy of the file, they just all refer back to the same master copy.

ToxicFrog fucked around with this message at 23:19 on Jul 3, 2012

Adbot
ADBOT LOVES YOU

Jose Cuervo
Aug 25, 2004

ToxicFrog posted:

How does splitting it into multiple files (that they still need to re-download each time they change) address this?

When I have a separate *.bib file for each paper, the *.bib file is contained in the same folder that contains the *.tex files for the paper. When I send them the latest version of the paper, all the necessary files are zipped in one folder so that all they need to do is extract the files to a single folder and can go from there. With the master bib file idea, they would then need to put the master bib file in the appropriate (relative) folder, which is one step to many for my advisors.

ToxicFrog posted:

Hammerite's solution may be overkill, honestly. BibTeX is a pretty simple format and you don't really need (or want) a separate, non-BibTeX master file that gets processed into BibTeX. Revised version:

pre:
- read master.bib file
- foreach paper:
  - read the paper-specific ".mybib" file, which is just a list of papers you
    want to cite (using the same names they're listed under in the master.bib)
  - foreach paper listed: copy that entry from the master.bib into a paper-
    specific .bib file
I could probably hack together a simplified example implementation in Clojure or Lua if you want one.

I know what I want is probably overkill, but I would like to make certain that each time I make a change to a citation, that exact change occurs everywhere. If you wouldn't mind putting together the example implementation I would appreciate it.

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