|
cutting edge cmd.exe itt
|
# ? Feb 20, 2015 04:59 |
|
|
# ? May 11, 2024 09:57 |
|
|
# ? Feb 20, 2015 05:02 |
|
Jonny 290 posted:lemme know when you guys wanna try an actual professional email provider Who would that be? We've tried mandrill and sendgrid, which are enough for our 40k emails / month
|
# ? Feb 20, 2015 07:14 |
|
the latter would be a good start
|
# ? Feb 20, 2015 07:28 |
|
|
# ? Feb 20, 2015 08:00 |
|
Shaggar posted:current hobby project status: is that a powershell cmdlet?
|
# ? Feb 20, 2015 09:22 |
|
Jonny 290 posted:the latter would be a good start go on. inquiring terrible programmer minds need to know
|
# ? Feb 20, 2015 09:29 |
|
triple sulk posted:is ur actual name shaggar james shaggar licence to .dll
|
# ? Feb 20, 2015 09:47 |
|
it's samuel haggar
|
# ? Feb 20, 2015 09:58 |
|
pronounced hay-gar
|
# ? Feb 20, 2015 09:58 |
|
Corla Plankun posted:python-pcyopg2 wants me to put a plaintext password in my python script to connect to a database put pw in file only readable by the user script runs as. also add file to ur git/svn ignore
|
# ? Feb 20, 2015 10:01 |
|
code:
|
# ? Feb 20, 2015 10:33 |
|
Necc0 posted:in case anyone missed this thread: i dunno it looks like every thread full of dickwaving programmers
|
# ? Feb 20, 2015 10:51 |
|
i found out today that devenv 2013 has 64 bit EAC so hopefully we can upgrade soon also for anyone else who is sick of R# generated properties you can use the built in control+period instead which works much better
|
# ? Feb 20, 2015 12:37 |
|
wow and I nearly started a node thread myself. dodged a bullet. I do front and back development and node owns for that.
|
# ? Feb 20, 2015 12:38 |
|
promises are pretty neat
|
# ? Feb 20, 2015 12:45 |
|
tef posted:promises are pretty neat promises are amazing, but out of curiosity who started this? i was introduced to it through the javascript community.
|
# ? Feb 20, 2015 12:47 |
|
yeah I use promise s. no dumb callbacks. well, less.
|
# ? Feb 20, 2015 12:56 |
|
Stringent posted:promises are amazing, but out of curiosity who started this? i was introduced to it through the javascript community. It evolved from logic variables and Wikipedia says Concurrent Prolog had the first 'proper' concurrency-oriented implementation.
|
# ? Feb 20, 2015 13:23 |
|
MononcQc posted:It evolved from logic variables and Wikipedia says Concurrent Prolog had the first 'proper' concurrency-oriented implementation. if that's it, then the javascript community has something to congratulate itself for.
|
# ? Feb 20, 2015 13:35 |
|
what are promises and how are they related to and/or better than callbacks?
|
# ? Feb 20, 2015 13:35 |
|
fart simpson posted:what are promises and how are they related to and/or better than callbacks? just a convention unfortunately, but if adhered to religiously they make writing asynchronous code much, much, much less painful
|
# ? Feb 20, 2015 13:40 |
|
like, you must serve your promise as you would serve your god
|
# ? Feb 20, 2015 13:41 |
|
fart simpson posted:what are promises and how are they related to and/or better than callbacks? basically a 'promise' is an object that calls a callback when some operation has finished (or failed). it has sensible semantics (like, if you say "hey call this function when you're done" on a promise that's already been resolved, that function still gets called instead of being forgotten about), and having a common api for every thing-that-calls-a-callback-when-it's-done means that you can get lots of cool utility functions to manipulate promises and avoid your async code turning into callback hell
|
# ? Feb 20, 2015 13:49 |
|
but what about broken promises i also hate it when a delegate doesn't actually do anything
|
# ? Feb 20, 2015 14:23 |
|
PleasureKevin posted:it's samuel haggar PleasureKevin posted:pronounced hay-gar
|
# ? Feb 20, 2015 14:39 |
|
PleasureKevin posted:it's samuel haggar PleasureKevin posted:pronounced hay-gar
|
# ? Feb 20, 2015 16:23 |
|
eschaton posted:is that a powershell cmdlet? lol no. its just a regular console app and I wrote a lot of really terrible stuff for moving the cursor around and clearing lines and sections and stuff its pretty lol
|
# ? Feb 20, 2015 16:24 |
|
there's an ms dev that's involved in the corefx development and every time i see his account name i do an lol
|
# ? Feb 20, 2015 17:24 |
|
triple sulk posted:there's an ms dev that's involved in the corefx development and every time i see his account name i do an lol lol
|
# ? Feb 20, 2015 17:32 |
|
|
# ? Feb 20, 2015 17:36 |
|
PleasureKevin posted:it's samuel haggar
|
# ? Feb 20, 2015 18:02 |
|
fart simpson posted:what are promises and how are they related to and/or better than callbacks? here's a bad example probably. sorry of the php tags, wanted some highlighting. php:<? function upgradeUser () { return Q.Promise( function ( resolve, reject, notify ) { // this makes the function return a promise, and passes 3 functions into it getUser( req.userToken, function ( err, user ) { if ( err ) reject( new Error( "Could not find any user." ) // this uses the reject functions passes in above, // which ends the function and sends this message along performUpgrade( user, function( err, success ) { if ( err ) reject( new Error( "Could not upgrade this account." ) ) // same as above. but keep in mind // it doesn't just return this value, it returns it and the status that it failed resolve( success ) // ends the function upgradeUser(), returns the value (same as above) // BUT with the status that "it worked" }) }) }) } upgradeUser() upgradeUser() // .then( someOtherFunction ) -- just showing you can add many more functions to the chain, each passing the resolve() value of the last to the next .then( function ( success ) { // or pass it into an anonymous function like this return res.json( "Account upgraded" ) }, function ( err ) { // the second function, separated by comma, will be the error, and only triggered if there is a reject() value sent somewhere above console.error( err ) return res.json( err.message ) }) ?> at the bottom you chain the functions together with the really easy ".then()". unfortunately, though, you have to do this. i can't do code:
you can also do code:
i hope someone likes reading this cause it took me forever to understand promises and i probably still but this is what i wish someone told me from the start
|
# ? Feb 20, 2015 19:44 |
|
hey what the hell are these addresses like //il1.soundcloud.com/images/hamster-dance-2015.jpg i can't resolve them using request() or whatever but i want to edit: you just add your choice of http or https i guess PleasureKevin fucked around with this message at 19:54 on Feb 20, 2015 |
# ? Feb 20, 2015 19:47 |
|
PleasureKevin posted:hey what the hell are these addresses like yeah it's like any other relative url. it assumes the scheme of the base url
|
# ? Feb 20, 2015 20:00 |
|
oh an interesting thing about the Pandora api is when they deliver an ad a lot fo the time the ad metadata specifies a higher gain than normal songs lol
|
# ? Feb 20, 2015 23:45 |
|
PleasureKevin posted:go on. WARNING: TRANSPARENT SHILL we are monsters at email and take our services very seriously and don't name them after wacky monkeys. our free tier gives you 400 a day, if you need more beef to test we will work with you most likely. pm or email to username@gmail, I don't get commissions i just like happy customers END SHILL
|
# ? Feb 21, 2015 00:11 |
|
Shaggar posted:oh an interesting thing about the Pandora api is when they deliver an ad a lot fo the time the ad metadata specifies a higher gain than normal songs lol yeah just like commercials, which was supposed to be illegal now iirc but still happens anyway
|
# ? Feb 21, 2015 00:13 |
|
tef posted:promises are pretty neat eh. proper async/await support is a strictly better interface, but promises at least papers over the callback hell, and with yield they can even be tolerable to write the big problem with the js promises i've seen is they tend to swallow errors because there's nowhere to raise them with an async statement you have a call point where you can just raise the exception as normal, with a proper stack trace and everything promise stack traces tend to suck, when you even get them
|
# ? Feb 21, 2015 00:14 |
|
|
# ? May 11, 2024 09:57 |
|
fart simpson posted:what are promises and how are they related to and/or better than callbacks? a promise is sorta lifting the callback into the return argument, so you can compose things through method chaining, rather than nested functions. i.e get_a_page().then(do_a_thing).then(some_other_thing) instead of get_a_page(function callback(v,e) {do_a_thing(v, function callback2(v,e) { some_other_thing(v) }) }) the reason that it is more than just a future or observable value, is that a promise is something you can pass in to a thing that expects a callback p = Promise() get_a_page(p.callback) p.then(....) tef fucked around with this message at 00:37 on Feb 21, 2015 |
# ? Feb 21, 2015 00:35 |