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
The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

TheEffect posted:

Two unrelated questions:

1) Can anyone point me in the right direction on how to time out a function in VBS? For example if I call a function and it takes longer than x seconds move on.


Can you be more specific about what you're doing that you might want to time out on? There's likely a better way to accomplish it than "wait x seconds" depending on what you're doing.

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

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

Pollyanna posted:

How would I structure the package, then? What methods and pieces of data would I have to expose? I know that the game would have to at least expose a tick/step method of some sort, but would I do something like expose a list of entities? Or would I flat-out just expose the entire game state? If so, how would I do that - meaning what data would need to be exposed/readable by the rendering/sound/physics engines? How would the data be structured?

I find this poo poo fascinating, and the idea of making my game its own decoupled package from a game engine like Gosh or Pyglet is exciting. It makes my life so much easier. (I hope!)

Have you even finished a single project yet?

TheEffect
Aug 12, 2013

LeftistMuslimObama posted:

Can you be more specific about what you're doing that you might want to time out on? There's likely a better way to accomplish it than "wait x seconds" depending on what you're doing.

Sure. Basically I have a script that checks for a file on a network share. If the file is newer than the one on the local machine it replaces it. This takes all of 2 seconds normally, but when the network share is down the script hangs for about a minute or so. I want it to exit the function that checks the share if there's no response after about 10 seconds.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

TheEffect posted:

Sure. Basically I have a script that checks for a file on a network share. If the file is newer than the one on the local machine it replaces it. This takes all of 2 seconds normally, but when the network share is down the script hangs for about a minute or so. I want it to exit the function that checks the share if there's no response after about 10 seconds.

Can you post your code? I'm betting there's an exception being thrown if the file is inaccessible that you're not handling right now and you could probably just fail immediately upon catching the exception.

TheEffect
Aug 12, 2013

LeftistMuslimObama posted:

Can you post your code? I'm betting there's an exception being thrown if the file is inaccessible that you're not handling right now and you could probably just fail immediately upon catching the exception.

Here you go-

code:
'--------------------Set up Dim and paths------------------------------------------------------'

' ----- Set Version Here! -----
Const strVersion = "2283"
Dim objFSO:Set objFSO = CreateObject("Scripting.FileSystemObject")

home = objFSO.GetAbsolutePathName(".")
locWocIni = home & "\DATA\woc.ini"
locBHIni = home & "\DATA\BridgeHistory.ini"
remWocIni = "\\share\woc_" & strVersion & ".ini"
remBHIni = "\\share\BridgeHistory_" & strVersion & ".ini"

'--------------------Subroutines and Functions --------------------'

Sub FileCompare( remFh, locFh, fn )

	If objFSO.FileExists(locFh) Then
		'Check if ini file is present on the network share
		If Not objFSO.FileExists(remFh) Then
			WScript.Echo remFh & " file not found!"
			Exit Sub
		End If
		
		Set myLocFh = objFSO.GetFile(locFh)
		Set myRemFh = objFSO.GetFile(remFh)
		
		'Compare Date Last Modified for local and remote files.  Copy if remote file is newer
		If myRemFh.DateLastModified > myLocFh.DateLastModified Then
			myRemFh.Copy locFh, True
		End If
	Else
		'Check if ini file is present on the network share
		If Not objFSO.FileExists(remFh) Then
			WScript.Echo remFh & " file not found!"
			Exit Sub
		End If
		
		'Copy file from remote location to PC.
		objFSO.GetFile(remFh).Copy locFh, True
	End If

End Sub

'--------------------Main--------------------'

' Check woc.ini file
FileCompare remWocIni, locWocIni, "woc"
' Check BridgeHistory.ini file
FileCompare remBHIni, locBHIni, "BridgeHistory"
' Shell out and run console executable
myWoc = home & "\22831 WOC.exe"
createobject("WScript.Shell").RUN """" & myWoc & """", 0, True

Linear Zoetrope
Nov 28, 2011

A hero must cook

Pollyanna posted:

How would I structure the package, then? What methods and pieces of data would I have to expose? I know that the game would have to at least expose a tick/step method of some sort, but would I do something like expose a list of entities? Or would I flat-out just expose the entire game state? If so, how would I do that - meaning what data would need to be exposed/readable by the rendering/sound/physics engines? How would the data be structured?

I find this poo poo fascinating, and the idea of making my game its own decoupled package from a game engine like Gosh or Pyglet is exciting. It makes my life so much easier. (I hope!)

Be very careful about platform constraints. I wrote a pretty nice modular, concurrent game engine that I had to hack and mangle (and eventually abandon) because I found out that on OS X event loops need to be on the main thread, and not just have a context bound to A thread.

JawnV6
Jul 4, 2004

So hot ...
Just build one lovely duct-taped abomination of code then sit back, and with the knowledge that can only come from seeing the actual implementation headaches, then think all you want about elegant architectures and structures and other cruft that could make those headaches lighter on the next go round.

If you're googling for "osx event loop" without personally having hit that snag in your actual development you're wasting time.

Linear Zoetrope
Nov 28, 2011

A hero must cook

JawnV6 posted:

Just build one lovely duct-taped abomination of code then sit back, and with the knowledge that can only come from seeing the actual implementation headaches, then think all you want about elegant architectures and structures and other cruft that could make those headaches lighter on the next go round.

If you're googling for "osx event loop" without personally having hit that snag in your actual development you're wasting time.

I agree, which is actually why I was pointing that out. The fact that he's trying to design a modular system instead of just building something is a bad idea when he doesn't have the experience to know what an engine needs yet. Though there are obviously broad constraints that it may be worth following to make things easier (functional reactive programming, entity component systems, etc).

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Everything in life is doing poo poo badly over and over until you become less bad (but still bad).

Build some loving stuff.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

TheEffect posted:

Here you go-

code:
'--------------------Set up Dim and paths------------------------------------------------------'

' ----- Set Version Here! -----
Const strVersion = "2283"
Dim objFSO:Set objFSO = CreateObject("Scripting.FileSystemObject")

home = objFSO.GetAbsolutePathName(".")
locWocIni = home & "\DATA\woc.ini"
locBHIni = home & "\DATA\BridgeHistory.ini"
remWocIni = "\\share\woc_" & strVersion & ".ini"
remBHIni = "\\share\BridgeHistory_" & strVersion & ".ini"

'--------------------Subroutines and Functions --------------------'

Sub FileCompare( remFh, locFh, fn )

	If objFSO.FileExists(locFh) Then
		'Check if ini file is present on the network share
		If Not objFSO.FileExists(remFh) Then
			WScript.Echo remFh & " file not found!"
			Exit Sub
		End If
		
		Set myLocFh = objFSO.GetFile(locFh)
		Set myRemFh = objFSO.GetFile(remFh)
		
		'Compare Date Last Modified for local and remote files.  Copy if remote file is newer
		If myRemFh.DateLastModified > myLocFh.DateLastModified Then
			myRemFh.Copy locFh, True
		End If
	Else
		'Check if ini file is present on the network share
		If Not objFSO.FileExists(remFh) Then
			WScript.Echo remFh & " file not found!"
			Exit Sub
		End If
		
		'Copy file from remote location to PC.
		objFSO.GetFile(remFh).Copy locFh, True
	End If

End Sub

'--------------------Main--------------------'

' Check woc.ini file
FileCompare remWocIni, locWocIni, "woc"
' Check BridgeHistory.ini file
FileCompare remBHIni, locBHIni, "BridgeHistory"
' Shell out and run console executable
myWoc = home & "\22831 WOC.exe"
createobject("WScript.Shell").RUN """" & myWoc & """", 0, True

Hmmm, there don't seem to be any exceptions for that method. One thing you could try is wrapping the FileExists call in an On Error Goto statement and jumping to the point in the script you want to continue from if the file isn't available. If the method is throwing an error when it finds the network path unconnectable, that should hopefully at least let you fail through faster.

TheEffect
Aug 12, 2013

LeftistMuslimObama posted:

Hmmm, there don't seem to be any exceptions for that method. One thing you could try is wrapping the FileExists call in an On Error Goto statement and jumping to the point in the script you want to continue from if the file isn't available. If the method is throwing an error when it finds the network path unconnectable, that should hopefully at least let you fail through faster.

If the file doesn't exist it immediately fails out and uses the backup one. The issue is if the network share is down or is very latent that's when it takes about a minute or so to fail out. If I add an On Error statement won't it be the same behavior?

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

TheEffect posted:

If the file doesn't exist it immediately fails out and uses the backup one. The issue is if the network share is down or is very latent that's when it takes about a minute or so to fail out. If I add an On Error statement won't it be the same behavior?

It's hard to say. I can't find any documentation on what errors it throws. It could do exactly what you say, or it could throw a separate error for communication issues and give you a shortcut past the code.

Have you tried making an object for the directory alone and checking if it exists before opening the file? Does it fail any faster when there's connectivity issues? Online documentation for vbscript (vs VBA or VB.Net) is pretty sparse from what I can find, so I'm sorry this isn't more helpful. I'd just mess around with all the possible ways you can reference the directory and see which one fails the fastest. You might also try to use the commands for mapping the network path to a drive and see if that fails quickly.

TheEffect
Aug 12, 2013

LeftistMuslimObama posted:

It's hard to say. I can't find any documentation on what errors it throws. It could do exactly what you say, or it could throw a separate error for communication issues and give you a shortcut past the code.

Have you tried making an object for the directory alone and checking if it exists before opening the file? Does it fail any faster when there's connectivity issues? Online documentation for vbscript (vs VBA or VB.Net) is pretty sparse from what I can find, so I'm sorry this isn't more helpful. I'd just mess around with all the possible ways you can reference the directory and see which one fails the fastest. You might also try to use the commands for mapping the network path to a drive and see if that fails quickly.

Good suggestions. I'll play around with those items and see if I can't find something that works. Thanks for your help!

Centripetal Horse
Nov 22, 2009

Fuck money, get GBS

This could have bought you a half a tank of gas, lmfao -
Love, gromdul
Edit: Nope, looks like the exporter someone wrote for the original EvoLisa does have the same problem. I guess it's got something to do with the polygons, but it seems like fill-rule="evenodd" should work.
Edit II: I've also tried ClipperLib, with no real success. If someone knows something about that library that might help, I'd like to hear it.

I'm working on an implementation of Roger Alsing's EvoLisa idea. If you don't know what that is, you can check out my post, here: http://forums.somethingawful.com/showthread.php?threadid=2841382&pagenumber=161#post442218088



The picture is made up entirely of polygons which are defined by integer coordinate pairs. I am having an issue when exporting to SVG.



On the left is a polygon as drawn by my program. On the right is that polygon rendered from an SVG file. This is the polygon as defined in the SVG file:

code:
<polygon points="0 124 0 0 198 0 308 267 399 53 166 0 192 7 246 78 271 109 243 126" fill-rule="evenodd" fill="rgb(241, 247, 252)" opacity="0.250980392156863" />
The differences seem minor, but they add up to create an unrecognizable image. They are also more pronounced on messy polygons.

My polygon fill routine works like this:

Use left-to-right scanlines to find walls between vertices. When I hit the first one, start filling. When I hit the next, stop filling. When I hit a third, start filling, again, and so on. As I understand it, this is the same as the even-odd polygon filling used by SVG.

I don't know if this is due to the self-intersecting nature of my random polygons, or what. Generating non-self-intersecting polygons seems to be a non-starter because it involves guesswork, and the program is constantly adding and removing points on the polygons, which would require lots of checking and re-running.

Someone wrote an SVG exporter for the original EvoLisa, which I just had a look at. It seems to be doing the exact thing mine is doing, but it results in less artifacts. I've looked through Alsing's code, and he seems to be generating his polygons essentially the same way I am. I am a little stuck on what the problem could be.

Centripetal Horse fucked around with this message at 22:03 on Mar 2, 2015

nielsm
Jun 1, 2009



It looks like your problem is on the edge cases, quite literally. You handle horizontal edges wrong, probably.

How are you actually implementing the even-odd rule? Some code would be useful.
The way I'd usually do it is decompose all polygons into just their edges, discard purely horizontal ones, and sort the remaining by top Y coordinate (starting scanline). Then iterate downwards over scanlines, adding your edges to the active set as you go, and removing edges from the active set when you reach their lower endpoint. On each scanline you then intersect the scanline with all active edges and get a list of intersection X coordinates, you can then sort that list and fill between pairs (0-1, 2-3, 4-5, etc) of intersected edges.
This method may not be the fastest, but it's quite simple, and should be very obvious to see that it's correct.

Centripetal Horse
Nov 22, 2009

Fuck money, get GBS

This could have bought you a half a tank of gas, lmfao -
Love, gromdul

nielsm posted:

The way I'd usually do it is decompose all polygons into just their edges, discard purely horizontal ones, and sort the remaining by top Y coordinate (starting scanline). Then iterate downwards over scanlines, adding your edges to the active set as you go, and removing edges from the active set when you reach their lower endpoint. On each scanline you then intersect the scanline with all active edges and get a list of intersection X coordinates, you can then sort that list and fill between pairs (0-1, 2-3, 4-5, etc) of intersected edges.
This method may not be the fastest, but it's quite simple, and should be very obvious to see that it's correct.

In fact, this is exactly what I'm doing. In the FindIntersections() method, I use

code:
if (
    (yi < y && yj >= y) 
    || 
    (yj < y && yi >= y)
)
where yi and yj are the y-coordinates of two consecutive vertices, and y is the current scanline y-coordinate, so that horizontal edges are ignored. Otherwise, I calculate where the line between those two vertices intercepts the current y-axis, and add that to my intersection list. The intersections are sorted, and the fill function goes from minY to maxY filling in between intersection points.

That horizontal black line also made me think it was something to do with horizontal edges, but EvoLisa uses Graphics.FillPolygon and seems to have the similar discrepancies between what is shown by the program, and what is shown when the points are exported to SVG and rendered.

The problem does show up where I would expect horizontal lines, but also in places with no obvious horizontal lines.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Do the SVGs you export have a fill-rule of evenodd? By default, the winding rule is nonzero.

ButtWolf
Dec 30, 2004

by Jeffrey of YOSPOS
edit: Sorry, I'm an idiot.

ButtWolf fucked around with this message at 03:08 on Mar 3, 2015

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Use code tags so that we can see the indentation. Quote this part to see how it works:
code:
Like so.

Centripetal Horse
Nov 22, 2009

Fuck money, get GBS

This could have bought you a half a tank of gas, lmfao -
Love, gromdul

Suspicious Dish posted:

Do the SVGs you export have a fill-rule of evenodd? By default, the winding rule is nonzero.

Yeah, the filter option is shown in the polygon line I posted with my question.

[Four hours later]

OK, I got distracted mid-reply, and went back to mucking about with my code. I have located and fixed the problem. Figuring it out took me way longer than it should have, because I thought there must be something wrong with my polygon-filling code. In fact, every line of code I'd written was working exactly as intended. The problem was that SVG automatically closes the polygon by calculating a line between the last point and the first point. I was not doing that before sending the polygon to be rendered, which caused the even-odd fill to work differently from the SVG render in certain circumstances, such as the last line cutting across part of an empty area in the polygon.

Holy poo poo did that suck. SVG export is go, however, so I am pleased.

Peristalsis
Apr 5, 2004
Move along.

Centripetal Horse posted:

Figuring it out took me way longer than it should have... Holy poo poo did that suck.

I don't know anything about your problem, but I propose that this be the new definition of computer programming.

DholmbladRU
May 4, 2006
Does anyone know of any ODBC driver frameworks. That would allow me to create an odbc 'driver' which would treat a web service as the data source? I am attempting to connect an application to an existing web service, but the only available connection from this application is ODBC. Yes I understand that ODBC is, Open DATABASE ...

Edit: It looks like this application supports OData. Which is exactly what I am looking for.

DholmbladRU fucked around with this message at 16:45 on Mar 3, 2015

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer
What would be the easiest source versioning system to use 100% locally on a Linux machine. I just want to use it for saving school projects whenever I get a piece implemented correctly so I can go back if I break things working on the next part. So far I've tried CVS, Git, and SVN and they all seem to have frustrating issues when dealing with a local (rather than remote) repository.

Eggnogium
Jun 1, 2010

Never give an inch! Hnnnghhhhhh!
Git is incredibly easy to use locally. In fact most issues I have with it are when managing remotes. What issue are you running into?

gariig
Dec 31, 2004
Beaten into submission by my fiance
Pillbug

LeftistMuslimObama posted:

What would be the easiest source versioning system to use 100% locally on a Linux machine. I just want to use it for saving school projects whenever I get a piece implemented correctly so I can go back if I break things working on the next part. So far I've tried CVS, Git, and SVN and they all seem to have frustrating issues when dealing with a local (rather than remote) repository.

Use git and sign up for an education pack from Github so you get 5(?) free private repos or use Bitbucket for unlimited

EDIT: Using a remote repo is nice if you have to jump to another PC or a hard drive dies. Plus collaboration with other students on group projects

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Eggnogium posted:

Git is incredibly easy to use locally. In fact most issues I have with it are when managing remotes. What issue are you running into?

I can't seem to create the repository in such a way that my checkouts match the folder structure I start with. I always seem to end up with my original code directory nested inside a folder or two that are created by Git when I make the repository.

As far as github, I'm working via am ssh to my school's Linux lab, so my files are all on network storage. Github doesn't really make my code any more accessible for my use case.

Eggnogium
Jun 1, 2010

Never give an inch! Hnnnghhhhhh!

LeftistMuslimObama posted:

I can't seem to create the repository in such a way that my checkouts match the folder structure I start with. I always seem to end up with my original code directory nested inside a folder or two that are created by Git when I make the repository.

As far as github, I'm working via am ssh to my school's Linux lab, so my files are all on network storage. Github doesn't really make my code any more accessible for my use case.

I use git on Windows so maybe this behavior is different but I doubt it. When you run git init in directory foo it creates the hidden .git folder inside of foo which has all the repository metadata. All other folders should be left intact and unmoved. If you then run git status it should list everything that was originally in foo or a subdirectory as an untracked file, which you add and commit to populate the repo.

If for some reason that's not working you could always init an empty repo in a new directory, then copy your files there in the form you want.

JawnV6
Jul 4, 2004

So hot ...

LeftistMuslimObama posted:

I can't seem to create the repository in such a way that my checkouts match the folder structure I start with. I always seem to end up with my original code directory nested inside a folder or two that are created by Git when I make the repository.

Are you doing git init . or git init --bare .? The first should be fine for a local repo and shouldn't disturb the folder structure.

luchadornado
Oct 7, 2004

A boombox is not a toy!

There's almost no reason to use anything besides Git at this point - note I said "almost". Google, Microsoft, everyone is moving their stuff to Git. Dealing with local vs remote will be somewhat confusing at first no matter which system you use.

baquerd
Jul 2, 2007

by FactsAreUseless

LeftistMuslimObama posted:

What would be the easiest source versioning system to use 100% locally on a Linux machine. I just want to use it for saving school projects whenever I get a piece implemented correctly so I can go back if I break things working on the next part. So far I've tried CVS, Git, and SVN and they all seem to have frustrating issues when dealing with a local (rather than remote) repository.

In your case, you might just be fine with the built-in, internal version control system for an IDE such as IntelliJ. But you really shouldn't be having these issues as other posters mentioned.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

JawnV6 posted:

Are you doing git init . or git init --bare .? The first should be fine for a local repo and shouldn't disturb the folder structure.

That might be it. The tutorial I found has you make a separate folder for the repository and use Git init - - bare to set it up. Is there a guide to running my repository out of the folder I'm working in?

luchadornado
Oct 7, 2004

A boombox is not a toy!

Also, one of the easiest ways to start things up is to create a Github repo and check the box for initializing with a readme file, create /home/code or C:\code or whatever, run git clone <repo uri>, create a src directory in there, and then move your code/projects into the src directory. A git add --all . and git commit -m "initial commit" and you're all set. I never mess with git init personally.

The src directory isn't necessary, but I've never had a project where I didn't have external libs, licenses, readmes, notes, data, or something else that wasn't part of my project, that I didn't need somewhere to store. You can make directories for those right next to the src directory to keep things clean.

LeftistMuslimObama posted:

That might be it. The tutorial I found has you make a separate folder for the repository and use Git init - - bare to set it up. Is there a guide to running my repository out of the folder I'm working in?

Why do you want to do that? Don't stress about making things work exactly the way you think they should work. It might not make sense for your intentions in this single situation, but overall it's much more useful to organize things like I outlined above. Worst case scenario you have an extra folder or two, best case scenario you're better prepared for adding more projects.

luchadornado fucked around with this message at 01:55 on Mar 4, 2015

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
Is there a method for cross-compiling old Linux tools like awk and gzip from Windows to Android with the NDK? The NDK is kind of set up for a custom make process, so it's not like I have the typical ./configure; make thing going on. I'm trying to pop into Cygwin and rig up all the environment variables, and I'm not getting very far. Like, it's ignoring my include override paths for one.

raminasi
Jan 25, 2005

a last drink with no ice

Helicity posted:

Also, one of the easiest ways to start things up is to create a Github repo and check the box for initializing with a readme file, create /home/code or C:\code or whatever, run git clone <repo uri>, create a src directory in there, and then move your code/projects into the src directory. A git add --all . and git commit -m "initial commit" and you're all set. I never mess with git init personally.

The src directory isn't necessary, but I've never had a project where I didn't have external libs, licenses, readmes, notes, data, or something else that wasn't part of my project, that I didn't need somewhere to store. You can make directories for those right next to the src directory to keep things clean.


Why do you want to do that? Don't stress about making things work exactly the way you think they should work. It might not make sense for your intentions in this single situation, but overall it's much more useful to organize things like I outlined above. Worst case scenario you have an extra folder or two, best case scenario you're better prepared for adding more projects.

Sure, but git init --bare is definitely wrong for their purposes.

The simple "I don't want to gently caress up my homework" case is dead-simple: cd to directory, git init, git add ., git commit -m "initial commit". That's the guide.

Of course I'm sure I screwed up my "dead-simple" case now :v:

JawnV6
Jul 4, 2004

So hot ...

Helicity posted:

Also, one of the easiest ways to start things up is to create a Github repo and check the box for initializing with a readme file, create /home/code or C:\code or whatever, run git clone <repo uri>, create a src directory in there, and then move your code/projects into the src directory. A git add --all . and git commit -m "initial commit" and you're all set. I never mess with git init personally.

The src directory isn't necessary, but I've never had a project where I didn't have external libs, licenses, readmes, notes, data, or something else that wasn't part of my project, that I didn't need somewhere to store. You can make directories for those right next to the src directory to keep things clean.
Fucks sake, a web service and active connection is not required for this use case. IS NOT REQUIRED FOR THIS USE CASE. And when the user has plainly stated their intent to only use local repos guiding them down your web-addled brain's fallback to the local-only case is actively detrimental.

GrumpyDoctor posted:

The simple "I don't want to gently caress up my homework" case is dead-simple: cd to directory, git init, git add ., git commit -m "initial commit". That's the guide.
Looks good to me. I normally add things as "*.c", "*.h" instead of adding the whole directory. I'm not a git wizard but this seems to obviate the dependency on some social network to track local changes with a tool meant to track changes.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

GrumpyDoctor posted:

Sure, but git init --bare is definitely wrong for their purposes.

The simple "I don't want to gently caress up my homework" case is dead-simple: cd to directory, git init, git add ., git commit -m "initial commit". That's the guide.

Of course I'm sure I screwed up my "dead-simple" case now :v:

This is what I just did and it worked. I can't say the same for my memory allocator yet :)

luchadornado
Oct 7, 2004

A boombox is not a toy!

JawnV6 posted:

Fucks sake, a web service and active connection is not required for this use case. IS NOT REQUIRED FOR THIS USE CASE. And when the user has plainly stated their intent to only use local repos guiding them down your web-addled brain's fallback to the local-only case is actively detrimental.

The advantages you get from using github - portability, collaboration, backup, experience using the industry standard - outweighs any *crazy requirements* like being connected to the internet. Sorry if that ruffles your feathers, but you really shouldn't get so mad about advice that may differ from your own on such a trivial topic.

edit: to make the "100% local" crowd happy, using github only requires a connection for the original pull/clone. After that, it's just a local repo where you have the *option* of pushing remote easily later on. I don't think "100% local" needs to be a hard requirement in this case, and there are some good benefits to exploring Github. If he/she doesn't like my advice, they're obviously free to ignore it.

luchadornado fucked around with this message at 04:32 on Mar 4, 2015

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Rocko Bonaparte posted:

Is there a method for cross-compiling old Linux tools like awk and gzip from Windows to Android with the NDK? The NDK is kind of set up for a custom make process, so it's not like I have the typical ./configure; make thing going on. I'm trying to pop into Cygwin and rig up all the environment variables, and I'm not getting very far. Like, it's ignoring my include override paths for one.

make-standalone-toolchain.sh assembles a standard cross-compilation toolchain for you, and then you can follow pretty much any guide to cross-compiling autotools stuff.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

Helicity posted:

The advantages you get from using github - portability, collaboration, backup, experience using the industry standard - outweighs any *crazy requirements* like being connected to the internet. Sorry if that ruffles your feathers, but you really shouldn't get so mad about advice that may differ from your own on such a trivial topic.

edit: to make the "100% local" crowd happy, using github only requires a connection for the original pull/clone. After that, it's just a local repo where you have the *option* of pushing remote easily later on. I don't think "100% local" needs to be a hard requirement in this case, and there are some good benefits to exploring Github. If he/she doesn't like my advice, they're obviously free to ignore it.

You are being ridiculously obtuse. Why would I add a stop in the chain when the my code is already accessible anywhere and I'm working alone. Don't be the guy who over complicates everything just because you're stuck on some standard or you religiously belive in one way to do things. That guy writes lovely software.

Adbot
ADBOT LOVES YOU

luchadornado
Oct 7, 2004

A boombox is not a toy!

LeftistMuslimObama posted:

You are being ridiculously obtuse. Why would I add a stop in the chain when the my code is already accessible anywhere and I'm working alone. Don't be the guy who over complicates everything just because you're stuck on some standard or you religiously belive in one way to do things. That guy writes lovely software.

I have code that is accessible anywhere and that I work on alone as well, and Github's been useful, which is why I suggested it. It's not a "stop in the chain" and it's not a standard or a emacs/vi type religious war - it's just a simple site that hosts remote repos for you. A tool to help you organize/maintain your project. In the time it took you to fire off a post implying that I'm a lovely greybeard developer that writes lovely code, you could've learned the basics of Git and/or Github. In regards to your comment about the guy that writes lovely software - I would, and do, take the person that isn't rude and hostile to suggestions regarding new tools and workflows on my team over the better coder every time that choice is presented.

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