« first day (1821 days earlier)      last day (3146 days later) » 
00:00 - 15:0015:00 - 00:00

12:02 AM
Here's an example of a working controller: paste.ofcode.org/cgWPJAksmzKUWpmk3Dtpsx
I'm not even sorry
 
Hey guys! Just a quick question
I'm currently making a backend where it does some transactional stuff with mongo, and I want to create a clientside program on the browser
is there any way I could invoke the python file talking to mongo and get data from the python file via javascript?
 
Is your whole backend in python?
 
yes, basically.
I'm using python's webscrape to get stuff, and then put it in a db. Then I'll use python(turned into matlab-compatible code via scipy) to get the data out of the db for algorithms
and then I hope to get javascript to communicate with that program
 
Then in your client-side, do an ajax call to your python server, and have the python server do the DB query, then have it return the data (probably in JSON form) back to your client
 
@Nick but I have no python server implemented yet
I should write a django server? Oh god
 
12:13 AM
wat
You need a server.
 
Damn. got ya
 
If you want your client-side javascript to communicate with your server, then you're gonna need a server...
I'm confused how this is news to you
 
@Nick Sorry, 8 hours of straight coding has my mind fuzzied LOL
I'm at a hackday right now, forgive my stupidity
 
If you're not too far in, you could always try Node as your back end
 
@Nick true, but I've never done node
I've done spring before, but that takes a while to set up
 
12:19 AM
If you're interested in javascript, Node is fantastic
 
I know, I'm really interested but I don't have the time right now :'(
 
m59
12:50 AM
Can someone help this git noob get some open source work done?
I want to implement feature x, but module y is a bit awkward. I want to make a pull request to refactor module y so that my work on feature x is more comfortable. However, I don't have to do the refactor in order to write x, it just changes some contracts that would be easy to change according to whether my refactor is accepted by the maintainer.
I have no idea how to approach this as far as branches/pull requests.
 
@m59 How soon can you expect a PR to be merged by the maintainer?
 
Okay guys here is something crazy I have been working on for purely educational purposes
a clone of scratch.mit.edu, so far I just save the code structure as its generated in json and use that as an AST to then transform the block code to runnable javascript
 
m59
no idea, but I want to get all this knocked out right now if I can @KendallFrey
 
which is basically more or less a dictionary translation, do you guys think i should convert it to a text language and then parse it and transform it like babel does ?
if x is equal 2:
    y = x ** 2
    z = x ** 4
converts that to
[{
    oprClassDef: ‘$ctrl$if’,
    meta: {
        condition: [{
		oprClassDef: ‘$arit$eq’,
		meta: {
                operands: [{
		        oprClassDef: ‘$val$get’
			meta: { varName: ‘x’ }
                },{
                    oprClassDef: ‘$val$cns’
                    meta: { value: 2 }
               }]
        }]
        body: [{}]
    }
}]
 
1:09 AM
@rlemon You sent me a Happy Friday message on my birthday? Jerk...
 
@monners Happy Birthday
 
Thanks
 
@monners how old are you now ?
 
1:25 AM
@m59 I'd say refactor y, make a PR, write x based on that, make a PR for x once y is merged
or one PR for both (sets of) commits
 
user2620028
@loktar your website at first glance looks like a scam or malware website
 
@HatterisMad fix your eyes
 
m59
@KendallFrey just both on master?
err, I mean refactor on master?
 
user2620028
1:43 AM
@nick i sold my miata a couple months ago lol why do you ask
 
user2620028
@abhishrek his website wants me to download his screen savers and there are bright colors that don't go together and big download buttons.... does that not screen warning to you
 
@m59 Doesn't matter whether you create a new branch or not, but I was thinking both in the same branch.
assuming the refactor gets accepted, you won't have to refactor x
 
m59
Bad question on my part. I'm sleepy a lot, ya know.. new stuff gets to me. Anyway, I think I figured it out. The problem is that I already started on x. I cloned the up-to-date repo and made a branch for the refactor and pushed that to my github fork, that way I can PR that. Meanwhile, I can merge that branch with my previous work on x, I think, and then continue on from there and PR that next, like you said.
(dang that is confusing to explain. No wonder I had trouble reasoning about it)
 
Limonene is a colourless liquid hydrocarbon classified as a cyclic terpene. The more common d-isomer possesses a strong smell of oranges. It is used in chemical synthesis as a precursor to carvone and as a renewables-based solvent in cleaning products. Limonene takes its name from the lemon, as the rind of the lemon, like other citrus fruits, contains considerable amounts of this compound, which contributes to their odor. Limonene is a chiral molecule, and biological sources produce one enantiomer: the principal industrial source, citrus fruit, contains d-limonene ((+)-limonene), which is the ...
 
2:00 AM
@HatterisMad lol I knew it
did you replace it with anything?
 
user2620028
@nick just another motorcycle
 
lol, another motorcycle
 
2:15 AM
@HatterisMad haha
yeah like I said its crazy old
oh wait its starred so no context
lol yeah I havent updated it since like 2009
 
wow
 
2:30 AM
thanks obama
 
user2620028
@nick what? whats wrong with motorcycles
 
@AwalGarg IT WORKS !!!!
 
2:52 AM
Trying to wrap my damn head around websockets. Not the code or how to set anything up, but ... Unless I am missing something I am still having to poll for data
using php on the servers end ^
 
3:12 AM
hey guys, noob at javascript.. wanted to know why the statement
 
@PratikPattanayak 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.
 
var x=(10,2) returns 2
why so?
 
@HatterisMad Haha, nothing, I was just commenting on the fact you have multiple
 
user2620028
@nick one for thailand, one for america
 
for me, a motorcycle is a truly impractical toy (esp. given the roads I'm on)
haha for real?
I bet you got the second one on your other private jet right ;)
 
user2620028
3:22 AM
@nick haha you are funny.... both of my motorcycles in price, summed would be about $4000
 
user2620028
@nick and cars are not affordable enough here, it is my primary source of transportation. You think they are toys but whatevs i guess
 
user2620028
@nick and the roads i am on are some of the worst conditions you could imagine
 
but you can drive on them without dying right?
 
Sometimes I die on them
 
oh are you OK?
 
3:36 AM
@Jesse that was a good lol
 
@nick your question has no other answer than "Yes I do not die on them" so I had to go there lol
Why the heck would some guy go edit my question and remove all of my tags ...
 
user2620028
@nick i see people die on the road at minimum once a week, sometimes once or twice a day
 
3:56 AM
@Jesse quite a flame war on there..
 
@HatterisMad that's terrible
 
user2620028
just the norm for over here
 
hmm, i used to enclose technology terms in code brackets, seems tags is way nicer
and a plus of info
 
4:10 AM
@Jesse refer to the recent PHP room discussion about tags in question body
 
 
2 hours later…
5:57 AM
@PratikPattanayak still there ?
 
6:09 AM
If I wanted to pick a color from a color wheel, and on save-- save that HEX value of that color in my db. How would I go about that? This complex, or fairly easy to do ?
so that I can later retreieve that hex color code from ajax get data
retrieve*
@Abhishrek any idea how I could go about this?
 
6:36 AM
Please give my question a look
1
Q: Updating database call without page relaod

Lulutho MgwaliA list of images (treasures) are displayed to the user, here the user will choose a single image which will be stored in the Learner_treauser table: List<The_Factory_Chante.Models.Treasure> tresh; using (The_Factory_Chante.Models.The_FactoryDBContext db2 = new The_Factory_Chante.Models.The_...

 
Is it allowed to bounty some one purely to grant them rep?
 
i would imagine so
but that would be immoral
to do
 
-1
A: Check if value > 0

Madara UchihaNo. If obj.val === -1, the first expression is false and the second is true. > Boolean(-1 && -1 > 0) false > Boolean(-1) true

Am I missing something obvious here?
 
crl
nah, but the question is horribly formulated, brought you back positive
 
7:32 AM
i award you no points.
- for bad format.
suggest you clean up your question and give examples
 
crl
@levizoesch the OP isn't in the chat room
 
Show what you have, what you want, or what you're after. Be detailed, and explain yourself. You're speaking to people that have no clue wha tyou're doing and adding a few lines of code
 
@crl I saw that.
 
@levizoesch I gave an answer
I'm not the one who asked :P
 
7:34 AM
ah
idk, im going to bed.
bb
 
@MadaraUchiha LGTM
 
crl
!!urban LGTM
 
@crl LGTM An acronym for "Looks Good To Me", often used as a quick response after reviewing someone's essay, code, or design document.
 
How do you freaking feature detect the "mozAnimationEnd" event? I just can't get it right.. -.-
 
!!tell mash mdn CSS.supports
 
7:44 AM
 
@AwalGarg That's a JavaScript event and not a CSS property.
 
event? where is the event?
 
crl
!!mdn mozAnimationEnd
 
crl
e.addEventListener("animationend", listener, false);?
 
7:48 AM
@crl yeah no I don't want to check for the css property support and then assume the event is supported either. Since they were not invented at the same time and I don't want to listen for events which are not supported. Yes I could just simulate an animation and check if the event is fired but that seems like overkill to me.
 
crl
I guess like Awal says, if the browser supports the css animations, it supports the event, oh ^ ok
 
@crl That's not true. At least the shitty version of opera I got does not support any of the possible events but does support css animations.
I just want a simple check for one damn event -.-
 
Ah, @mash I see what you want now. Your best bet after the manual check would to be detect if AnimationEvent constructor on window allows you to construct that particular event object.
 
crl
also, since you define in your css the animation duration, is this animationend event really useful?
 
7:52 AM
@crl it gets hard to co-ordinate manual setTimeout calls when you have a ton of elements having those animations randomly
 
crl
ah yeah
 
Why is the recursive watch feature not available on unix-like machines? -> nodejs.org/api/fs.html#fs_caveats #node #fs
 
@AwalGarg great!! Opera throws me "NOT_SUPPORTED_ERR". Thank you soo much.
 
np :)
@deostroll OSX is based on Unix. I believe you mean Linux, in which case, as the docs state, it uses inotify. Probably the said API doesn't support recursive watching.
 
so on linux there isn't a workaround?
 
7:59 AM
there is. google chokidar npm
 
@MadaraUchiha sums up the world's entire novice developer culture :)
 
I don't get it
 
^ this doesn't match strings that end with html,css, or js...
 
@Mosho You've never looked for a solution to a problem only to find 50 noobs saying "I have this problem too plz halpp"?
 
8:14 AM
not in person
 
well, actually file names with html,css, or, js...
 
{ doesn't have any special meaning in ECMA regex. I guess you meant ( and the corresponding ) instead?
 
oh yea...my bad...
 
8:48 AM
Could someone identify this code editor? I saw a short video someone working with it and it looks awesome.
 
@MajidFouladpour Visual Studio
What language are you working on?
 
@MadaraUchiha PHP, CSS, JS, HTML
 
@MajidFouladpour Consider using PhpStorm
Depends on what you do, you may qualify for subsidized or free license.
 
@MadaraUchiha Thanks. I am using Sublime Text 2 and am happy with it. What I especially liked about the VS editor was its code-intelligence feature.
 
@MajidFouladpour PhpStorm's is better
 
8:54 AM
@MadaraUchiha I'll check it out :)
 
9:15 AM
@MajidFouladpour To be more specific, that is Visual Studio Code; code.visualstudio.com
 
@MadaraUchiha that's a matter of an opinion
 
... I think. VS is purple, VSCode is blue.
 
@MajidFouladpour btw, why are you not using the 3rd version?
 
10:04 AM
What's the diff between PHPStorm and Webstorm? Cause I love Webstorm
 
@dievardump 1) I only saw it when I linked to it. 2) I didn't know you were there :P
 
10:20 AM
@phenomnomnominal it sounds like PHPStorm might be more about PHP
I'm not sure though, better wait for the experts
 
@phenomnomnominal PhpStorm is WebStorm + PHP (with a name rebrand)
 
10:40 AM
^
 
11:19 AM
@tereško I have not checked what's new in 3, but I should soon actually.
 
What is a good TLD for local projects?
.dev seems to be standardized by IANA
 
@MajidFouladpour I actually dont recall. From what I remember, it let you access go-to-definition without ctags
but that's about it .. I switched almost 2 years ago and now have migrated to Atom instead
 
@tereško Yes, Atom has caught my eye too. Problem is, I was lazy finding out if my CPU supports 64, and I have xubuntu 32 installed and Atom I have heard only a 64 thing.
 
what's your cpu?
cat /proc/cpuinfo | grep model
 
model : 28
model name : Intel(R) Atom(TM) CPU N570 @ 1.66GHz
 
crl
11:28 AM
what's your screen size? usually intel atom comes with small netbooks
 
I don't obviously invest in my tools ...
 
it's a 64bit chip, but you would need a 64bit OS too
 
crl
hehe
 
Asus EEEPc
 
crl
11:29 AM
best laptop for programming
 
Good to know. Thanks.
@crl Yes, I quite like it! I'm going to boost it up with a ssd too.
 
crl
I was joking, with that processor, and likely your 1G RAM, that's not an SSD that will make a big diff
 
@tereško Yes, and that is quite some work.
 
not really
migrating a windows 7 to 10 is a lot of work
 
11:34 AM
@crl Well, ram is 2gb, and I don't expect much from it - I seldom even use Gimp.
 
installing a different linux distro is like a piss in a bucket
 
crl
@tereško it's relieving?
 
@tereško For me the downloads are BIG, we have the worst internet connection in the whole world ...
 
@MajidFouladpour lies. what's the speed?
 
oh .. Iran
hmmm
do you have access to university network?
 
11:36 AM
hehe ...
 
I think North Korea has the worst internet connection in the whole world by default.
 
I dont think NK has intenet
 
They are awful too. It is not a 'Mission impossible' thing to download, but not certainly a piss in a bucket ;)
 
@tereško My point stands.
 
@MadaraUchiha So maybe we are second-to-last :)
 
11:38 AM
@MajidFouladpour , but I am serious. You could plug in university's network to do the reinstall.
 
crl
Antarctica might not be fast too (no underwater connections at least)
 
Yes, I'd better switch sooner than later.
 
@crl I would say the earth's molten core has it pretty bad, as far as internet connectivity goes
 
@crl OK, let's give way to polar bears to get our second-to-last position :)
 
12:08 PM
constructor(props){
   // krypton props !
   super(props);
}
 
@Abhishrek Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
@CapricaSix go suck a lemon :P
 
using html 5 drag and drop, when I drag a file from browser into the drop area, e.dataTransfer.files is present and the I can render the file with file reader, but how do I do it with images on the page.. e.dataTransfer.files is empty
 
Huh. If anyone's startup speed is slow as shit in windows, turn off dropbox auto-start
 
12:17 PM
Steam gems/trading cards confuse me. I just finally clicked that stupid notifications about new things in inventory, converted a bunch of "cards" or whatever to gems, then bought a booster pack and I'm left with 3 more cards I can turn into about 1/20th the amount of gems I originally had? Is there any kind of point to this?
 
And onedrive for that matter
@ivarni The cards are to collect. The cards to gems are for people who have duplicates
or youcould just sell them on the market
 
Oh, so the answer is no, there's not point then :)
 
any nginx user willing to be my test subject?
 
Absolutely none
@AwalGarg Depends, will it bring down my server?
 
@Cereal no
 
12:19 PM
Whacha need
 
can you ls /etc/nginx?
(Please just don't be on windows)
 
I guess I could have copied that
[josh@li208-24 ~]$ ls /etc/nginx
fastcgi.conf    koi-utf  mime.types  nginx.conf.1        scgi_params   win-utf
fastcgi_params  koi-win  nginx.conf  nginx.conf.default  uwsgi_params
 
sigh, what distro is that?
 
lul
 
12:30 PM
@Cereal leave distro, can you do grep include /etc/nginx/nginx.conf instead?
 
@AwalGarg some distros include /etc/nginx/sites-enabled/, other don't
 
@FlorianMargaine I know that, and the other conf.d flavor. But cereal's screeny shows no directory at all
 
Ah yeah. Same.
 
you have the same structure?
 
12:33 PM
No, some distros include it, other don't
 
but... what structure do those distros follow?!
 
"deal with it"
 
sounds like arch linux.
 
Get nginx from nginx.org, see what it does
 
!!> wat4
!!wat4
!!undo x2
 
12:36 PM
!!wat3
 
This one is my favorite
 
:P
!!help wat3
 
@MadaraUchiha wat3: User-taught command: <>https://imgur.com/6by138R.gif
 
It doesn't tell who added it :(
 
12:37 PM
You could search "!!learn wat3" and hope it was taught in this room
 
Fairly sure it was not
Mar 18 at 8:42, by Second Rikudo
!!learn wat3 "<>https://imgur.com/6by138R.gif"
Oh it was
 
crl
!!info wat3
 
@crl Command wat3, created by Second Rikudo on Wed, 18 Mar 2015 08:42:55 GMT, invoked 1 times
 
@MadaraUchiha I wonder who the hell is "Second Rikudo" :-P
 
@AwalGarg
[josh@li208-24 ~]$ grep include /etc/nginx/nginx.conf
        include /etc/nginx/mime.types;
 
@Cereal you have a fucked up distro, is it gentoo or arch?
 
Arch, how does my distro have anything to do with nginx
 
distro manages the configuration, distribution, verification et al of all packages
 
Sure, my nginx works fine
 
@Cereal so where do you put your config files? in the main nginx.conf file itself?
 
12:43 PM
As of right now, yes
Do you want the conf?
 
no. and you might not want to share it either :/
 
There's literally nothing in it
Unless the physical path of the sockets is going to ruin my life
 
lol
@argentum47 hangouts
 
why does curl --head http://localhost:3000/index.html return 404? github.com/deostroll/lrexp/blob/master/index.js
 
@FlorianMargaine asciinema.org/a/dzqouans038rgm660jvx8ac32 managed to package it and put it in PATH :D
 
12:56 PM
@deostroll Synchronous I/O inside of request callbacks? Shame on you
 
packaging is much much harder than building
fuck debian
 
crl
@deostroll well, what is that doing github.com/deostroll/lrexp/blob/master/index.js#L72?
 
@crl If the request isn't GET, continue to the next middleware.
 
crl
ok, thanks
 
@deostroll Any particular reason you're not using express and express.static() to serve the static files?
It just saves you all this hassle
 
crl
12:58 PM
if there aren't any other midddleware, 404?
 
@crl Yes
 
crl
ok (@deostroll, maybe rx isn't the best abbreviation for regex, it's used for 'reception', use rather 're')
 
I personally wish express used return vals to determine next calls instead. calling a function is not very intuitive.
 
If you reach the end of the middleware chain and none sent a response, you get a 404 IIRC
@AwalGarg Like what?
Return the name of the next middleware or whatever?
 
return express.NEXT or whatever
 
1:00 PM
@AwalGarg And how would you do that asynchronously?
 
Promises!
 
Express was written before Promises were a thing :)
 
:(
 
So it wasn't... future-proof?
 
s/proof/\b\bistic/
 
1:23 PM
Is there a command to check if someone is online?
In the chat
 
With Jasmine for testing is it okay to spy on a method of the object under test? I have an abstraction over a WebSocket connection and when the connection closes I want to reconnect by calling the connect() method of my object.
 
!!listcommands
 
@JacquesMarais 666, help, listen, eval, coffee, refresh, forget, info, listcommands, tell, afk, ban, unban, convert, define, doge, google, hang, imdb, jquery, learn, put..it..back...ლ(ಠ益ಠ)ლ, phucket, gtfo, moneycantbuylove, catmode, coffeetime, lifeban, stopmyself, instagram, kendallfrey, excited, manigga, meinneger, dgaf, infiniteriot, okay, feelsgoodman, fabulous, sausage, playerpimp, installjavascript, moarkittens, kendall, kfc, uwot, nsfw, facepalm, somekittens, erase, fry, dudeism
hahastillhere, onebox, morecoffee, steve, whoosh, burn, woosh, roomowner, phony, really, inur, coffeescrip
 
I want to know if the connect() method was called and a spy is good for that but something about it seems weird. It is like creating a mock of my object under test
 
sounds like a 'mock object'.
and it's normal practice.
 
1:31 PM
Yeah but usually don't you mock a dependency of your object under test so you can tell if a method was called on that dependency
It seems weird spying on one of the methods of my object under test
 
if it's something you feel (or have determined) needs to be verified..
 
crl
@JacquesMarais it could be added, just: $('.avatar img[title^=startofname]').length>0
 
if you know id: $('#present-user-11111').length
 
1:53 PM
@Felix 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.
@Felix 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.
@Felix 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.
1 message moved to Trash can
@Felix Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com or pastie.org
@Felix 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.
Error 404 occured, I will call the maid (@Zirak)
 
crl
@CapricaSix you bombed him Cap.. go easy
 
Right
 
poor guy must be scared out of his wits
 
crl
lal
 
Hello guys! I have a little problem - basic, but I have no idea how to resolve it.
I have function
pastebin.com/zHigErhw

correct is {lat: 49.833349, lng: 18.159828}; .. but I have these numbers in variables plat and plng.. Have idea<
Ok, what now?:)
 
crl
1:55 PM
pray
 
or fall prey
 
has anybody used react-dnd ever ?
 
react dungeons and dragons?
 
crl
@Felix if I remember you need some new LatLng({lat: .., lng: ...})
but maybe it has changed or improved, check the doc
 
crl : thanks ;) I will check it
Thanks - I use this var myLatlng = new google.maps.LatLng(0.0,0.0);
;) Thanks for showing a way ;)
 
2:07 PM
@AwalGarg on mobile, what did you use to package it?
 
zip bags
 
Looks like you don't have a .deb...
 
@FlorianMargaine initially I used stdeb, but it wasn't cross platform so I wrapped up an .sh file
 
Cross platform?!
It's a .deb, of course it's not cross platform...
 
sorry, I mean cross version whatever
so it won't work on ubuntu 15.04 or something
 
2:10 PM
uh?!
 
@FlorianMargaine if I create a package from ubuntu 14.04, it won't work with ubuntu 15.04
 
.tar.gz is a cross-platform package.
 
@FlorianMargaine am I missing something?
 
what is the easiest way to know what properties of an object have changed?
I can either use a prototype and compare to the object own props
wrap everything in getter/setters
or use object.observe
anything else?
 
changed since?
 
2:14 PM
whenever
and it's not JSON
object.observe being async-y kinda sucks
 
it's overkill for dirty checking
 
2:35 PM
ownKeys(object).forEach(k => {
	const descriptor = getDescriptor(object, k);
	const {get: oldGet, set: oldSet} = descriptor;
	const get = oldGet ? function() {
		return oldGet.call(this);
	} : function() {
		return descriptor.value;
	};

	const set = oldSet ? function(v) {
		descriptor.value = oldSet.call(this, v);
	} : function(v) {
		descriptor.value = v;
	};

	Object.defineProperty({
		enumerable: descriptor.enumerable,
		get, set
	});
});
and descriptor.dirty = true in the setters
 
00:00 - 15:0015:00 - 00:00

« first day (1821 days earlier)      last day (3146 days later) »