« first day (1647 days earlier)      last day (3299 days later) » 

8:00 PM
pointfreedom or gtfo
 
Python is pretty though
I love that it is so readable
I don't think I like python itself, just the design
 
REBEL is sexy
I love that it is so regexy
 
FORTRAN is even more sexy
 
rebel is bad and you should feel bad, ken
 
have u tried using it for graphics
 
8:00 PM
accidental rhyming
 
I'm really not a fan of pythons code style.
 
@Retsam noob
*throws tomatoes*
 
@ShotgunNinja that ball thing bot ? yeah. Also, from the trailer, that " Chewie, we're home " quote \o/
 
In context of nodeJS modules, is the interface a "list" of available functions/properties and what it takes to use them?
 
@KarelG "yaurggggh"
 
8:02 PM
@Ken do people ever call you Ken?
 
can I?
 
sure
 
no thanks
 
okey
 
8:03 PM
Wait, if you're @Ken, then does that mean you have no junk?
 
Like a Ken doll?
 
stop
 
Python is awesome
 
HAMMERTIME!
 
8:03 PM
hammertime
 
@Catgocat Indentation-based code? Underlines instead of camelCase? English words instead of ||, &&?
In a gif:
 
@Retsam It's great and you also have thousands of variables on the global scope one of them is called len
 
I'm all for indention based code. It forces great formatted code
 
@Catgocat And that's a good thing?
 
@SterlingArcher hi
 
8:05 PM
@ShotgunNinja As if that was an original joke that I haven't heard eighty-three times
 
@KendallFrey Only 83? Wow.
 
@SterlingArcher I prefer freedom over forced compliance
significant whitespace can kiss my ass
 
@Retsam Of course everybody likes global variables, it makes things so much faster to type
 
user1596138
If you're doing nltk then Python that shit up
 
Significant whitespace can go die a slow painful death in COBOL
 
8:07 PM
@Catgocat I can't tell if that's parody or not.
 
collabedit.com/tcbmh I have a column field named Tips (treat.Tips) I'm trying to display by itself at the end of this code, can anyone explain how to correctly duplicate treat.tips or quickly walk me through how these if statements really work?
 
user1596138
If you need Python's structure to force good coding practice well... I don't think it really matters what you use, just cluster fuck something up and vamp for help when you get stuck
 
@copy hi :) How're you?
 
Does NodeJS offer full functionality on Windows?
 
@KendallFrey freedom makes shitty code >=(
 
8:09 PM
nuh-uh
 
Have you seen my code?
 
@SterlingArcher Muy bien, y tu?
 
open source software has a reputation for being better quality than proprietary code
 
user1596138
!!> console.log('freedom');
 
@SterlingArcher yeah, looks like it was written by a mong
 
8:10 PM
@Jhawins "undefined" Logged: "freedom"
 
user1596138
Look at dat shitty code
 
@copy asi-asi pero bien, gracias
wat is mong
mongolian?
 
british slang
I been over this just the other day
 
github.com/bigcommerce/bigcommerce-api-python/blob/master/… bask in the glory of this beautifully written API
 
!!urban mong
 
8:11 PM
@KendallFrey [Mong](http://mong.urbanup.com/319231) Adj. Lacking in physical and cerebal ability. General retardation.
Generally: a total spastic
 
that's some pretty python BC wrote
lmao I thought that said cereal activity
 
@SterlingArcher ecommerce is hard
 
@FlorianMargaine most definitely. Especially when I'm importing custom shit from BigCommerce into SalesForce
 
My ecommerce experience is with wordpress and the woocommerce plugin. I didn't have to do shit.
 
print "Contact not found, creating record."
new_contact = sf.Contact.create({'LastName':l,'FirstName':f,'Email':o})
record = sf.query("SELECT Id, AccountId, FirstName, LastName FROM Contact WHERE email='%s'" % o)
print "Record has been created for {} {}".format(f,l)
new_aid = record['records'][0]['AccountId']
sfID = sf.Opportunity.create({
    'AccountId':new_aid,
    'Name':f+" "+l+" Store Purchase "+convert+" (auto import, free materials)",
    'StageName':'Posted',
    'Amount':a,
    'CloseDate':datetime.now().strftime("%Y-%m-%d"),
Lookit that pain in the ass
 
8:14 PM
@SterlingArcher I'm working at the editor of a big ecommerce solution... shit's hard
 
then eat more fiber
 
@FlorianMargaine my condolences :( They can be pretty nice, but some are just so confusing. Like the SalesForce API is very tricky
 
nah it's fine, working on hard problems is fun :)
 
Magento is god awful to work with. I feel sorry for any magento developers out there.
 
8:19 PM
0
Q: Knockout click binding strange behavior

YarinTrying to get basic Knockout click binding set up, as per the example below: <button id="btn-a" class="btn" data-bind="css: {'btn-primary':mode() == 'manual'}, click: $root.mode('manual')">Manual</button> <button id="btn-b" class="btn" data-bind="css: {'btn-primary':mode() == 'automatic'}, clic...

 
@AnotherDev Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
Of the two answers, what do you all prefer? I was a little surprised to see the points exactly the same. Personally, I think ".bind" looks cleaner, but are there any drawbacks?
 
I use .bind() in mine
click: someObservable.bind(null, 'TheValueIWantOnClick')
 
@FlorianMargaine nah he is looking at apartments, she can't help with those too much
she put together a list of local ones for him though
 
@AnotherDev I'd use function() {} over bind, there.
 
8:21 PM
beware older browsers don't have .bind()
 
Though, ideally, I avoid using function() {} (or .bind) in view logic, wherever possible.
 
@Retsam Because of browser support?
 
yeah the the non accepted answer is much better imo.
 
@Loktar cool
 
hello
 
8:22 PM
@Retsam Good point, adding the function into the viewmodel would be cleaner
 
@AnotherDev No, more because it closer matches the intention of the code, imo. You're not changing "this", which is the primary purpose of bind, so bind is confusing, in my opinion.
 
What was that domain cocaine.stackoverflow.com something like that
 
but then you need multiple function (one for each button) when all you are doing is setting a value.
 
@KendallFrey
 
yes?
 
8:24 PM
Why is @Unihedro not appearing in voting list now? Did you withdraw or something :(
 
The domain that lead to that youtube video
What was it
 
that one
 
What one?
 
^^^^^^^^
 
dafuk man
 
8:25 PM
@AwalGarg wasn't in the top 10 for voting
 
ooooooooh I thought cocaine.stackoverflow was an actual domain
you just double trolled me
fak u
 
Can I make nodeJS use the AMD approach to import modules instead of the commonJS one?
 
@ssube oh. ok :(
 
@StevensHaen no
 
drugs.stackexchange.net?
 
8:26 PM
I mean, ultimately you can, but it's stupid
 
@StevensHaen Don't
Why would you
 
@Catgocat Isn't AMD better for I don't have to order them?
 
So get off your ath and do some math
 
@StevensHaen It's stupid to use AMD when you have commonJS already built-in
 
@AnotherDev I went ahead and added my own answer with the "define it on your viewModel" answer.
0
A: Knockout click binding strange behavior

RetsamEither the .bind answer or the function() {} answer will work; but generally I prefer to avoid defining functions in my views where possible, and instead move that logic to the ViewModel. So another option, and the one I'd probably go with in this case is to define a viewModel.setToManual() func...

 
We're no strangers to love
 
@BenjaminGruenbaum I wrote a haskell program which proves you love jquery
3
 
@Zirak You managed to put "haskell", "love" and "jquery" in the same sentence. Wow.
 
@AwalGarg So did you, technically.
 
8:33 PM
0b0010100 >> 3 == 0b000010
 
@Retsam You are technically correct. The worst kind of correct.
 
Shouldn't that right shift make it 0b000001 ?
With 5 zeros before
 
For the record, from a user standpoint, I would never visit your site again if an iframe caused popups. — Sterling Archer 45 secs ago
 
@Catgocat how do you right shift once?
 
Also anyone knows how can I stop SE notifications from coming to inbox?
 
8:35 PM
@FlorianMargaine idk binary help :(
Ohh it's moving the 1s and 0s three to the right
got it
i dont understand why 0b1 << 2 would return 0b100?
 
because it pushes the "1" 2 bits left
 
I get this one though 0b000001 << 2 == 0b000100
Oh, so even there are no higher bits
it pushes them to higher bits?
 
0b1 and 0b00000001 are the same
 
you know that 0b1 is exactly the same as 0b00000001, right?
 
ye
 
8:40 PM
just like 0016 is still sixteen
just a redundant way of writing it
 
ohhhhhhhhhhhhhhhh ok
 
in decimal
 
remember that in js, bitwise shifts are all the time on 32 bits anyway
 
got it got it!!!!!
why would this be useful ?
 
0016 in hex is not sixteen
 
8:41 PM
instead of shortcutting floor dividing and multiplying by 2
 
@ShotgunNinja 0016 is not in hex
if it was, it would be 0x0016
 
0x0016 would be ninja'd
 
@KendallFrey it's not formatted in standard hex, but it's still in hex
because all the digits are between 0 and F
 
you mean we've been using sexigesimal this whole time
 
your mum goes from 0 to F
 
8:42 PM
my life is a lie
 
@NickDugger in uck seconds
 
yes
 
So the equivalent of 12 >> 2 which is 3 is 12 / 2 / 2 ?
 
ofcourse it gives the same output but the math behind it
what is the equivalent
 
8:43 PM
because a right bitshift is mathematically equivalent to an integer division by 2^(number shifted), discarding the remainder
 
or 12 / 2^2 == 12 / 4
>> N is like / 2^N, where ^ is power
 
nginx open-sourced it's tcp load balancer. No idea what that means but... yay!
 
Oh right
And the left shift?
is it multiplying ?
12 * 2 ^ 2
 
@AwalGarg you don't know what a tcp load balancer is?
 
12 << 2
48
 
8:45 PM
@FlorianMargaine I do. But I don't know to use it :/
Heck, I don't even know all of the nginx configuration.
 
Are there any alternatives to Window.requestAnimationFrame() ?
 
a timeout (but not really)
but why?
 
none that do the same thing
but why do you want an aternative?
 
RAF is more clever
 
@KendallFrey Why would you use binary (in JS)
 
8:47 PM
that's the core function... i don't see a point for an alternative, unless you want to do extra useless steps
 
Just curious, just started reading about it for the first time was wondering if any tools out there do something similar
 
@Catgocat binary operations is faster then standard operations ya know
 
@Catgocat what do you mean by "use binary"? every value is stored in binary
@ApathyBear similar as in hook into the rendering loop of the browser? no
 
Mainly because I don't really understand what it does
 
then read the docs
 
8:49 PM
@ApathyBear In the golden era when we didn't have it, we used window.setTimeout to simulate it in a buggy manner.
 
@KendallFrey In a real world case, where would you use bitwise operators.
 
it wasn't buggy, just not as nice :p
 
I'm not saying it's not useful (because I don't know shit about it), just asking for an example.
 
@ApathyBear nvm
 
MDN docs are sparse on the subject. But noted. Ill look around.
 
8:50 PM
@Catgocat bit flags. almost all crypto algorithms. and more
 
@ApathyBear I have noticed reading the source code of the browser, and pretending to understand it helps a lot.
 
@ApathyBear it lets the browser determine when to repaint basically
allows your animations to run at 60/120/144hz even
 
@KendallFrey some function-operators, like sqrt uses bit operations internally to speed up the tasks.
 
user1596138
Jhawins got approved for the apartment, I move to @Loktar's area on the 6th.
 
@Loktar repaint == refresh DOM objects?
 
8:52 PM
@ApathyBear that's part of repainting
 
^
 
What is the other part ?
 
when did I say there were only two parts?
repainting also involves rendering the current state of animations
 
make sure you let the DOM objects dry before applying items with a higher z-index.
 
which is kind of where most canvas stuff falls under
and RAF is often used for canvas
 
8:55 PM
How do you remove shortcuts from Chrome Debugger?
 
or to check for window visibility
 
Everytime I write ^ I get a popup
 
> The browser can optimize concurrent animations together into a single reflow and repaint cycle, leading to higher fidelity animation. For example, JS-based animations synchronized with CSS transitions or SVG SMIL. Plus, if you’re running the animation loop in a tab that’s not visible, the browser won’t keep it running, which means less CPU, GPU, and memory usage, leading to much longer battery life.
the biggest wins with using requestAnimationFrame
 
Gotcha. Thanks @Loktar @KendallFrey @AwalGarg
 
8:57 PM
@Loktar I bought the book you suggested (Foundation HTML5 Game programming)
I'll be reading it this summer when my classes are over
 
nice
let me know how you like it
its pretty cool imo
 
I need a good page for 502 while my site is restarting..
 
@SomeGuy Fucking hell, stop wanting to read so much
 
(until I finally get zero downtime setup)
tumbeasts are sort of a cliche, but not in some corporate office full of old ladies..
 
@Luggage tumbeasts?
 
Barracuda Web Filter
 
What is the benefit of making a function as an expression (var function = function () {}), as opposed to just declaring it (function () {}), except for hoisting? I know one can call the declaration before defining it
 
I guess they were only a cliche for a very brief time in 2011..
the image is licensed permissively.
 
@StevensHaen Sometimes you can't not (ot at least can't comfortably) use a declaration, e.g. when passing a callback or assigning in an object literal.
 
9:08 PM
you can't call it before defining it, just reference it.
also, function someFunction() { } is named. it's useful for stack traces
as opposed to var someFunction = function() { } which is anonymous.
 
^-- i always use the last one
 
same, except for 'classes'.
 
at objects ? i use prototyping
 
I always define classes with function MyClass() {} so that i get a name.
right.. followed by MyClass.prototype.whatever = ...
 
the first char of functions is in upper case when i use "classes". lower cases = "methods"
 
lol'd
 
same. I think that's a common convention.
"types" in PascalCase, variables in camelCase.
 
we've found him
 
m59
Anyone experienced with Cordova?
 
@rlemon now, you have to find a candidate to fit his/her hand in the frog's ass. Then a new muppet show will arise.
 
@SterlingArcher dude I love them
 
just a puppet, no real porn
 
#OIMATEWTF
one of my fav songs of theirs
 
will checks it outs
 
> Tell left from right in an instant.
shit man I have the same problem :'(
 
9:20 PM
@AwalGarg Right's the one I jack off with. Done.
 
are you talking about the frogs?
 
also, happy 4/20 everyone
 
I should maybe practice identifying them in an instant :/
 
that's why java can suck sometimes : Exception in thread "main" java.lang.OutOfMemoryError: GC overhead limit exceeded
 
They say practice makes a man perfect. Must be right?
 
9:27 PM
left
 
People at the Python's Room are so rude
they look like robots too
 
are they?
I've found them nice
 
@Catgocat lolwut
 
idk.. it was a sarcastic guy bt wtever
 
are you referring to your question how to syntax ur code line ?
 
9:34 PM
function monthz () {
    var months = ["January", "February", "March", "April"];

    exports.toNum = function(name) {
        return months.indexOf(name) + 1;
    }

    exports.toMon = function(num) {
        return months[num];

    }
}
This is my module
var month = require('C:/Users/Asus/Desktop/mod.js');

console.log(month.toNum('January'));
Calling the mod with NodeJS results in undefined for toNum
 
@StevensHaen you're missing a month
 
@FlorianMargaine The enclosing function?
 
Your computer username is Asus?
 
.. that was a joke
 
you aren't assignint exports until you run monthz(), which is likely not intended
 
9:35 PM
@StevensHaen anyway, you're declaring a function. It's nice et al, but it's never called
 
@FlorianMargaine It doesnt work with the function called either month.monthz.toNum()
 
@StevensHaen Just drop the monthz() function wrapper. it does nothing for you
 
@StevensHaen no. When are the values added to exports?
 
@Luggage Yes it does, it's my namespace
 
Don't need one, the module does that for you automatically
 
9:36 PM
@FlorianMargaine at the declaration
 
remember the conversation yesterday?
 
@Luggage I do. But the exercise requires using a namespace inside the module. Array has to be visible only to those 2 funcs
 
@StevensHaen declaration of what?
 
It is because node already wraps it in a function (or some other way of isolating it)
 
@FlorianMargaine I mean, at the line with the function expression
@Luggage What if I want 2 namespaces in here? Node is going to wrap them both in a single function with exports arg
That's not what I want
 
9:38 PM
Then you'd make 2 modules
since that's what modules are
 
or.. just CALL monthz() once in the module if you want to keep it
 
@Luggage So I shouldn't local-scope anything in the module?
 
well.. like I've said once or twice, node does that for you already
but you are free to make another self executing function if you want
but this isn't self-executing
 
you can try florian's input, but really, no need to wrap that IMO
 
9:40 PM
@KarelG wrap and then call with()
?
 
no, just look at Florian's link
 
@Luggage I did
it works, I was just curious about Karel's suggestion
 
@FlorianMargaine how can you simply skip those semi-colons??!!!
 
@FlorianMargaine How would you do this? codewars.com/kata/interleaving-arrays
 
@AwalGarg I just copy pasted
 
9:42 PM
@SecondRikudo sweet, will fix
 
@Catgocat that's cheating
 
@Luggage No I have already done it
 
suuuuure :)
 
Why did I have to call it? Aren't higher-order functions accessible with the dot notation?
 
9:43 PM
function interleave() {
    var list = [].slice.call(arguments);
    return (list[0]||[]).reduce(function(init, $, i) {
        return init.concat(list.reduce(function(prev, curr) {
            return prev.concat([ curr[i] ]);
        }, []));
    }, []);
}
@Luggage ^
 
@Catgocat no idea ^
 
ohh good, now I can cheat.
 
@Catgocat @?
 
@FlorianMargaine You have to hack the system first it's part of the challenge
 
so, @BenjaminGruenbaum, you love jquery, eh?
 
9:44 PM
 
@StevensHaen it's just a function that's not exported. But that function, when ran, assigns some exports
so.. that funciton must be called
 
@Luggage Oh, I see
 
@FlorianMargaine it's @Zirak, I was bored at a conf so I wrote a program that proves it in Haskell
 
It's a good idea to name an argument that you're not going to use, a random letter?
 
@FlorianMargaine Influenced too much by Python? :P
 
9:44 PM
@BenjaminGruenbaum apparently he did the same with you
@AwalGarg no, it's npm coding style
 
(arg_that_Im_not_using, arg_that_I_will_use)
 
He was just being funneh
 
_1, arg_that_I_will_use
 
@Catgocat we usually use _ for that
 
Oh right!
 
9:45 PM
var _1 = 1; // perfect
 
And when using underscore, you use __ :P
 
use .1 ? :p
 
@FlorianMargaine And if there are multiple arguments, you name every of them _? `function hello( _, _, _, _, _) {})
 
that's why I used _1. I do use lodash
 
@Catgocat you fix your API
 
9:46 PM
Can someone write a chrome extension to number tabs please?
 
>:(
 
that said, I already had 2 unused arguments
I just used __
 
If you have not voted for @SecondRikudo yet, please do so
4
 
@AwalGarg make it as your small project. try it
 
@BenjaminGruenbaum what if we don't want to vote for him?
 
9:47 PM
Voted.
 
I already did
 
Vote for his enemies.
 
@BenjaminGruenbaum I almost missed it, but thankfully SE sent a notification in my inbox! :D
@KarelG not motivated enough :(
 
@FlorianMargaine what if the earth was flat?
 
the SO vote isn't a popularity show bro. (Still he's qualified imo )
 
9:48 PM
@BenjaminGruenbaum it is, next
 
Thing is, you can do Ctrl + <tab number here> to jump to a tab. Would be handy to have the tabs numbered so I don't have to count them :/
 
@AwalGarg except for ctrl + 9
 
Who wants to donate me 20 reputation so I can vote?
 
but I know him to be not-a-jerk and I don't know that of the others. So in that way, just knowing him makes him qualified as far as I'm concerned.
 
@FlorianMargaine Then I split into windows :D
 
9:49 PM
@FlorianMargaine at FF, Ctrl + 9 = last tab
 
@AwalGarg nah seriously, ctrl + 9 will lead you to the last tab
even if you have 20 tabs
@KarelG same on chrome
 
@BenjaminGruenbaum approximately
 
Lots of humor here today
 
Humour*
 
Humer
 
9:50 PM
English please. :)
 
*Homer
 
@FlorianMargaine ikr
 
great minds think alike?
 
9:51 PM
@FlorianMargaine hahaha nice one
 
thanks, I invented it
 

« first day (1647 days earlier)      last day (3299 days later) »