Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

03-27-2017 , 05:50 PM
git doesn't need any servers, it's just an application. You can install it and create a local repo on your hdd and just keep it there. It saves everything in a .git folder under the repo. Just make regular backups and you're set.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-27-2017 , 05:52 PM
Sorry, I meant if you want a repo off of your local machine in case you don't back that up or whatever.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-27-2017 , 06:08 PM
Yeah, ofc you're right, I just wanted to be clear for Saw's sake since he was mixing up git with github.com earlier.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-27-2017 , 06:17 PM
Quote:
Originally Posted by Wolfram
git doesn't need any servers, it's just an application. You can install it and create a local repo on your hdd and just keep it there. It saves everything in a .git folder under the repo. Just make regular backups and you're set.
And if you do want a remote but don't want to bother with a github/bitbucket, you can use dropbox as a proper git server:

https://github.com/anishathalye/git-remote-dropbox

I actually set this up this morning, was up and running with no snags in < 10m.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-27-2017 , 06:21 PM
Crap, I forgot that's what I was doing with some stuff I used at work. There was some talk of git not handling mac hidden files right and that causing some problems with Xcode projects but I don't remember ever running into it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-27-2017 , 06:36 PM
I am fairly new to JS Promises, typescript and whatever else is going on here. Can anyone explain what this function is doing?

Code:
  public setAccessToken(authNWait: Promise<string>): Promise<boolean> {
    const ret: Promise<boolean> = new Promise<boolean>((resolve, reject) => {
      authNWait.then((accessToken: string) => {
        this.logger.log(`access token is '${accessToken}'`);
        this.authNResolver(accessToken);
        resolve(true);
      }, (error) => {
        resolve(false);
      });
    });
    return ret;
  }

  private authNResolver: (accessToken: string) => void;
  
  private authNWait: Promise<string> = new Promise<string>((resolve, reject) => {
    this.authNResolver = resolve;
  });
Is it just me or does this take a lot of the fun out of JS? These guys have factories all over the place. I can tell they come from a Java background - probably converting the app straight from Java. Everything is a damn factory.

Last edited by suzzer99; 03-27-2017 at 06:48 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-27-2017 , 06:47 PM
Quote:
Originally Posted by suzzer99
I work for hyper-global-megacorp, and even they've almost completely converted to git. It's just so clearly better than old school version control w/o pull requests and local repositories.

For reference - we still have internal websites that only work with IE 7.
dont a ton of companies just use the microsoft tfs? esp visual studio shops.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-27-2017 , 07:21 PM
Quote:
Originally Posted by suzzer99
I am fairly new to JS Promises, typescript and whatever else is going on here. Can anyone explain what this function is doing?
f typescript in general but isn't that just a function that returns a promise that calls 2 other functions on resolve? not a factory.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-27-2017 , 08:32 PM
Correct, it's inside a factory.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-27-2017 , 08:58 PM
Quote:
Originally Posted by Victor
dont a ton of companies just use the microsoft tfs? esp visual studio shops.
I work for a company that has been a big Microsoft shop for like 15 years. We've been using TFS for source control, continuous integration, task tracking, etc. Next month, we're apparently going full-on Atlassian: BitBucket, Confluence, Jira, etc. It should be an interesting experience. We have a lot of solid, experienced devs who have never touched Git.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-27-2017 , 09:08 PM
Quote:
Originally Posted by Victor
dont a ton of companies just use the microsoft tfs? esp visual studio shops.
TFS and git are no longer mutually exclusive:

https://www.visualstudio.com/en-us/docs/git/overview
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-27-2017 , 09:42 PM
I don't think this really warrants a new thread so I'll just post it here, has anyone messed around with omaha hi/lo much(other than PPT of course)? Hand evaluations, equity calculations, maybe even simple AI, etc. Definitely not as easy to code for as holdem or really any other poker variant, figuring out starting hand strength alone is pretty difficult.

Also on the topic of AI, would o8 even be worthwhile from an AI perspective? I've seen a few omaha-hi projects, but haven't noticed anything for hi-lo yet.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-27-2017 , 09:56 PM
Quote:
Originally Posted by suzzer99
Is it just me or does this take a lot of the fun out of JS? These guys have factories all over the place.
Not sure if you're talking about TS or factories, but if the former, it's just you.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-27-2017 , 10:46 PM
Quote:
Originally Posted by suzzer99
I am fairly new to JS Promises, typescript and whatever else is going on here. Can anyone explain what this function is doing?

Code:
  public setAccessToken(authNWait: Promise<string>): Promise<boolean> {
    const ret: Promise<boolean> = new Promise<boolean>((resolve, reject) => {
      authNWait.then((accessToken: string) => {
        this.logger.log(`access token is '${accessToken}'`);
        this.authNResolver(accessToken);
        resolve(true);
      }, (error) => {
        resolve(false);
      });
    });
    return ret;
  }

  private authNResolver: (accessToken: string) => void;
  
  private authNWait: Promise<string> = new Promise<string>((resolve, reject) => {
    this.authNResolver = resolve;
  });
Is it just me or does this take a lot of the fun out of JS? These guys have factories all over the place. I can tell they come from a Java background - probably converting the app straight from Java. Everything is a damn factory.
the top level "setAccessToken" takes an "authorizor" object (think: something that makes a network call to some API endpoint that authorizes credentials, and returns, say, and OAuth token. that's what the real implementation would be. here the implementations seem to be placeholders but you should think about it in a real context.

so what *is* this authorizer object? well, it's just something that returns a promise of a string (ie, a promise of some token, which happens to be a string).

let's take a sidebar where i bash on the naming here, because that's my favorite subject. "authNWait" is a poor name, because it's a description of one possible implementation of this object. you're imagining a network call being made, and "waiting" for the response to come back. but you shouldn't be imagining that, because the whole point of the promise is to abstract that away. and who knows, maybe you're reading from the local file system in some other implementation, and you're not waiting. but mainly the problem is that the name is suggesting implementation details.

but gaming_mouse, you say, isn't "authorizor" as you described it above a bad name too? yes, it is. so what should it be named? "accessToken" would be a good name. remember: the whole point of a promise is that you can think of it as the thing being promised. It's a promise of an accessToken. Mentally, just swap that out for accessToken (and then in the back of your mind put a pin to remind you that it's possible you sometimes get an error instead of an accessToken).

So this "setAccessToken" method takes an accessToken and returns a promise of a boolean, which simply indicates if the accessToken promise succeeded or not. So this is just an old school design where the method does something, and returns a success/fail flag.

But since it's telling you if a "promise" succeeded or failed, the flag itself has to be a promise of a boolean. Once you enter promise land, everything thereafter remains a promise.

I can't really talk about the details of this fake implementation, because from what I see here I don't see the purpose of the "authNResolver" abstraction. But, eg, if you called "setAccessToken(Promise.resolve('my-token'))" it would log "access token is my-token" and then return return Promise.resolve(true) -- ie, a promise of true.

re: typescript, i've only used it some but having types is really nice. the syntax isn't fun with parameterized types, but the result of it is. if you use purescript you can get the type system (an even more powerful one, in fat) without the ugly syntax, because the type inference is so good. but that's a whole other language that compiles to js.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-28-2017 , 08:13 AM
Quote:
Originally Posted by saw7988
Guys, super noob questions here. My day job isn't software development, but I do a lot of it as a hobby on the side - right now mostly in the form of game dev, but not exclusively. I've never used a version control system before, and it's never bitten me in the ass, but I figure there's no point in waiting for that to happen when I've known the whole time that I should be using one.

What's the recommendation here? I've read a bit about svn vs git and it seems like git is the more loved one, but I'm not sure if being a solo dev (vs team) changes anything. Also, it seems like there's different specific implementations I can choose after that. GitHub and BitBucket? Others? Also, are these online storage or just local management tools?

Any help here would be appreciated!
Quote:
Originally Posted by iversonian
use git because it's ubiquitous. it's pretty standard for most open-source projects. some large companies use others, but if you want to collaborate with randoms on the internet, git is the way to go. even if it's just for yourself for a tiny project, it's probably better to learn git in case you work in software dev later.

github and bitbucket are services that host your repository for you. bitbucket has a free tier while github is only free if it's also public. github is more widely used and has a better brand and its interface is familiar to more people. but that doesn't really matter if it's just for yourself.
Sourcetree is a clickable front-end to git. It makes it easy to perform 99% of the routine things.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-28-2017 , 08:21 AM
So last night I signed up for a bitbucket account, and did all the local git installation stuff. When it came time to push the repo up to BB, I kept getting authentication failures. I probably should have copy/pasted the command/error message, but it went something like...

Code:
>> git remote add origin https://myname@bitbucket.org/myname/myrepo

kk no prob dude

>> git push -u somethingorother

*** username/password box comes up, I enter correct stuff ***

authentication failure!!! cannot do the stuff you want!
Googled for 15ish mins before having to do some other things. Anyone run into this? I'm absolutely stumped.

I guess if I only work locally and not use bitbucket I still get ~90% of what I want out of this, but it would be nice to solve.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-28-2017 , 08:55 AM
You probably need to add an SSH key:

https://confluence.atlassian.com/bit...302811853.html
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-28-2017 , 10:28 AM
Just launched our new website/product:
https://www.construct.net/

Website a bit rough round the edges for now and some missing content but good enough for our first public beta! Construct 3 has been 3 years in the making so this is a big day, any feedback much appreciated You can launch it here:
https://editor.construct.net

(You'll need to be using the latest version of Chrome, go to settings and update)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-28-2017 , 10:39 AM
So doesn't even load for Safari?

Code:
Critical error

This should not of happened. Please contact support.

System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer) at C3.Code.Caching.CityCaching.<>c__DisplayClass1_0.b__0() at C3.Code.Controls.Application.Caching.Manager.Manager.Get[T](String key, Func`1 getFromExternFunction) at C3.Code.Caching.CityCaching.GetCityID(Int16 countryID, String cityName) at C3.Code.Helpers.GeoIP.Functions.GetCityID(Nullable`1 countryID, String cityName) at C3.Code.Helpers.GeoIP.Functions.LookupIP(String ipAddress) at C3.Code.Caching.GeoIPLookupCaching.<>c__DisplayClass0_0.b__0() at C3.Code.Controls.Application.Caching.Manager.Manager.Get[T](String key, Func`1 getFromExternFunction) at C3.Code.Caching.GeoIPLookupCaching.GetIPDetails(String ipAddress) at C3.Code.Helpers.SEO.Functions.GetUsersIPRegion() at C3.Pages.Master_Pages.Global.Page_Init(Object sender, EventArgs e) at System.Web.UI.Control.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
running chrome Version 57.0.2987.110 (64-bit) on a mac I get this: (both errors were going to https://www.construct.net)
Code:
Critical error

This should not of happened. Please contact support.

System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer) at C3.Code.Caching.CityCaching.<>c__DisplayClass1_0.b__0() at C3.Code.Controls.Application.Caching.Manager.Manager.Get[T](String key, Func`1 getFromExternFunction) at C3.Code.Caching.CityCaching.GetCityID(Int16 countryID, String cityName) at C3.Code.Helpers.GeoIP.Functions.GetCityID(Nullable`1 countryID, String cityName) at C3.Code.Helpers.GeoIP.Functions.LookupIP(String ipAddress) at C3.Code.Caching.GeoIPLookupCaching.<>c__DisplayClass0_0.b__0() at C3.Code.Controls.Application.Caching.Manager.Manager.Get[T](String key, Func`1 getFromExternFunction) at C3.Code.Caching.GeoIPLookupCaching.GetIPDetails(String ipAddress) at C3.Code.Helpers.SEO.Functions.GetUsersIPRegion() at C3.Pages.Master_Pages.Global.Page_Init(Object sender, EventArgs e) at System.Web.UI.Control.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-28-2017 , 10:52 AM
Thanks, some people reporting that as well, on it!

Edit: should be ok now?

Last edited by Gullanian; 03-28-2017 at 11:19 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-28-2017 , 11:21 AM
In Javascript, do you use single or double quotes for things like assigning strings to variables?

let varOne = "string"
let varOne = 'string'

Double quotes feels more natural to me, but I wanna use the optimal approach.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-28-2017 , 11:33 AM
If you use double quotes, the computer has to do double the work!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-28-2017 , 11:37 AM
Quote:
Originally Posted by Gullanian
Just launched our new website/product:
https://www.construct.net/

Website a bit rough round the edges for now and some missing content but good enough for our first public beta! Construct 3 has been 3 years in the making so this is a big day, any feedback much appreciated You can launch it here:
https://editor.construct.net

(You'll need to be using the latest version of Chrome, go to settings and update)
Had same error messages earlier, but it's working now!

Looks really cool, will have to dig into it later since I'm at work.

Quote:
Originally Posted by Larry Legend
In Javascript, do you use single or double quotes for things like assigning strings to variables?

let varOne = "string"
let varOne = 'string'

Double quotes feels more natural to me, but I wanna use the optimal approach.
Being consistent with it is probably more important. Single quotes don't require you to press shift as well, so that seems more efficient.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-28-2017 , 11:41 AM
I've gotten used to the personal philosophy of double quotes in statically typed languages like C++, Java, etc. (single quotes for chars) and single quotes in scientific research environments like Matlab, which basically lead me to use single quotes in other dynamic languages like Python. I'd probably continue that for JS.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
03-28-2017 , 12:47 PM
Quote:
Originally Posted by Gullanian
Thanks, some people reporting that as well, on it!

Edit: should be ok now?
Good looking site!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m