« first day (1907 days earlier)      last day (3048 days later) » 

4:01 AM
How should I store odds? "7-1", [7,1], 71, etc?
 
how to add image for this
 
Installed Fedora on my co-founders laptop
she is loving it !
 
Her first time using Linux?
 
how can i add image for this
 
meh... linuxes nowadays are pretty pc-like
 
4:09 AM
@pootis second
she installed Suse once
didn't work at all with her insanely high dpi touch screen, fedora though (works like bliss)
 
can i add multiple fields to promt
 
fedora is quite beautiful, last time I tried
 
yeah I REALLY WANT TO SWITCH TO FEDORA
 
@Abhishrek They both use Gnome as default DE iirc
 
damn it I am using windows :-/
@pootis vOv yep, which is what confuses me
 
4:11 AM
no. install freebsd, then relevant wm's
even gnome, if that's what you want
fedora can actually be configured, I sometimes used kde with it
 
I use Ubuntu Gnome, it's nice. I'm stuck with Debian family coz others just don't work.
 
meh.... what u mean?
like, watching youtube and stuff?
 
No, some packages and stuff. Only avail. on apt repos.
I use a network manager which for some reason doesn't work on anything other than debian derivs.
Not sure why
 
define network manager. you mean the hardware?
 
4:17 AM
oic
woa... got some heavy deps
 
yep
 
well... when configuring 'nix-like boxes I tend to lower my gui expectations.... helps a bit on the being satisfied in the end part
 
Okay new setup :D
gulp dev:phonegap hosts a cordova application and builds it.
gulp dev:desktop hosts a desktop application.
gulp build:desktop -> autopackages application.
 
btw I'm a bit newb with js and stuff, but can I consider that bower is kind of composer for javascript?
 
You're working on a photo-sharing app?
 
4:22 AM
gulp build:phonegap:platform -> builds the device package
:D yeehaw
 
Hey JavaScript chat, I come from the far land of CodeReview.SE, and I recently put up some Node.js/Socket.io code which I'm looking for a good review on. If anyone wants to chime in, below is a link to my question! (If you're brand new, check out our answering Help Center.)
 
@AlexL 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.
 
4
Q: Baking homemade pies has made me so many new connections

Alex LSorry, if you were looking for fresh baked pies, I only have a web client to help you sell them. I've recently picked up server-side JavaScript and have added it to my toolbox, and while I've had a great time learning so far, I've got some code which needs another pair of eyes to review it. A ...

 
@FélixGagnon-Grenier yep
 
If you have an array of functions, what is the simplest way to find a specific function in the array in order to remove it ?
 
4:34 AM
@Dave run it?
 
huh?
 
What kind of functions are they?
 
just normal functions
 
The only way to tell them apart is by running each of them
 
how would running a function help me find their position in an array and slice it ?
 
4:40 AM
well... evaluate the output, I don't know
 
i'm really not following
 
var arrayOfFunc = [function (a,b){return a+b;},function (a,b){return a-b;},function (a,b){return a*b;}];

for (var i = 0, l = arrayOfFunc.length; i < l; i+=1) {
  if (arrayOfFunc[i](2,3) === -1) {
    arrayOfFunc.splice(i,1);
    i = l;
  }
}
@Dave ^ something like this
or just:
 
thats not really going to be useful for more complex returns such as those that return objects or yet further arrays
 
@Dave As long as all your functions return the same kind of values, it shouldn't be that hard to check for them, assuming they are pure functions.
 
many return false because they execute a process rather than doing a calculation
 
4:53 AM
@Dave check for every possible scenario then. The only way to differentiate pure functions is by evaluating their outputs.
 
hm
that doesn't seem like a viable option for me. i push functions into an array and use them to execute draw functions to canvas. i want to pop them when i don't need them anymore
but unless i give them all unique return numbers
 
seems you got yourself into some kind of mess dear
 
it gets v.tedius very quickly
 
5:19 AM
Angular is being weird. $state.go won't change the page until I manually hit refresh.
 
@DemCodeLines is it the same state?
cause it won't reload it unless you tell it
 
@phenomnomnominal No, it's another state.
It goes by the name index, but I don't think that should create any problems, should it?
 
wouldn't imagine so
 
Don't know what's up then. The address bar shows the right URL. But it won't navigate to it, without me manually hitting F5.
 
Sudden back pain, don't know what to do.
 
5:31 AM
sounds like there's an error thrown in the state that it is trying to resolve to
 
I would imagine so too, but I don't see anything in the console.
 
you're using ui router I assume?
 
Yup.
 
find the line that says if ($state.transition !== transition) return TransitionSuperseded;
and put a break point there
and see if it stops there
it's the error handler for a promise
 
Is this in angular's JS files?
 
5:34 AM
in ui router
 
Well setting a breakpoint in the console does make it show up.
 
 
1 hour later…
6:51 AM
hi
 
7:35 AM
morning
 
Morning sleepers
 
morning
 
crl
mañana
 
Môge
 
Guten Morgen!
 
7:40 AM
R29vZCBtb3JuaW5n
 
base64 is way too old now
use a GWT signed token instead
 
Did anyone ever designed a report management system - ever
 
I don't even know what a Report Management System would be...
oh, I see.
 
crl
*JWT
 
@AwalGarg 2gd3gcgc0a82b2 good luck
:D
 
7:46 AM
@GNi33 You have a large enterprise application used by 100s of clients, they want all or just 1 sql table out of your database or storage system
I need to provide them with an interface (UI more then 1) and options to let them choose what they want to extract (Naming will be different) and some business logic will be involved
then returning them a pdf, excel or alike report back..
 
what are you planning to use?
 
@Mathematics There are many softwares for that, look for Business Intelligence
Any big application in the enterprise world incorporates one (either a software, a library, or a custom tool)
 
@DenysSéguret I looked at SSRS and SharePoint business intelligence too, but I can't decide would it be better for me to just get data with Entity Framework and through in Html controls
I think am searching google with wrong keywords "reporting framework" "Exporting data for reports"

I need to see a reporting management system, but maybe it's not called reporting at all, let me try with business intelligence, but am not sure if it will get me what am after
 
"Business Intelligence Software" will get you many well known results
 
I don't want end users to design reports, I want to create UI for them, all they would require to do is select what to include and just get the format in output
@DenysSéguret ok let me try
 
7:53 AM
it gives much, much better results than "Report Management System" at least
 
@Mathematics There are free libraries, too. But usually, even in a commercial software, you can provide the report templates and the users only apply them (with varying levels of customization)
 
it still feels like a umbrella term though
 
@DenysSéguret free libraries, exactly that's what am after xD - not to save time only but learn the way they do it
 
In my experience many top level managers understand the SQL logic well enough to combine queries if the tool is well designed and there are easy to use SQL views
 
we are creating software for dummies really
 
7:56 AM
@Mathematics Be careful that there's a lot to do when building such a software, and BI tools also targets dummies (via a customization made by programmers)
 
and because we share database for 1000s of clients we can't let them touch database, want to keep them to Presentation layer only
 
@Mathematics I think you should stop thinking about the solution until you really tried a few BI tools (for example Crystal Reports)
 
@DenysSéguret I agree, your opinion would 100% going to work in an enterprise software, but we are selling our software to 1000s of these enterprises that shares databases, maybe am just getting paranoid for security
@DenysSéguret true, let me do that now
thanks
 
@Mathematics Those are standard requirements. BI tools don't usually let users break databases
@AwalGarg I tested, it works (ok, I guess you figured it yourself)
 
@DenysSéguret yeah I was testing rest parameters... they are under the --es_staging flag
 
8:07 AM
@AwalGarg I didn't need any flag in my test
dys@dellette:~/vm/share/share-dev/superpos/src/main$ node --version
v5.3.0
dys@dellette:~/vm/share/share-dev/superpos/src/main$ node
> var a = [1,2,3];
undefined
> var b = Math.max(1,5,3,7);
undefined
> b
7
> Math.max(1,1,1,...a);
3
 
@DenysSéguret that's the spread operator. now try function foo (...args) {}
 
crl
doesn't work on 4.2.1 time to update it a bit
 
@BenjaminGruenbaum Given that complex loads are usually full of ajax queries, I doubt there's a simple solution to the real problem
 
crl
p... put scripts at end of body
 
8:13 AM
@BenjaminGruenbaum performance API has loadEventEnd
 
In fact, I'm not sure I get the goal, why is the delay calculation mentioned ?
 
@AwalGarg it's not an event though. He wants to know "as soon as he can read that value"
@DenysSéguret only in AJAX heavy sites. Lots of sites are mostly static.
 
Pffff... regex are so verbose in mysql...
 
querystring params
 
Good morning
 
8:29 AM
it's only 1:30 am, sir
not quite morning yet ;)
 
@BenjaminGruenbaum oh, I see
 
@SterlingArcher too much nu metal dulls the brain
 
Oh good I thought it was 0930 and I overslept :D
 
@Boris 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.
 
@Boris just moose and squirrel playing tricks
 
8:31 AM
@Shmiddty good thing I came to work then
 
@Boris why would that be oversleeping?
 
@Boris tell Natasha I said Здравствуйте
 
@Shmiddty @Shmiddty she said hello back :)
 
you guys work together?
 
I work with everyone
 
8:33 AM
@BenjaminGruenbaum They don't like if I sleep more than an hour at work
 
@Boris fascists
 
0
Q: ES6: import module from URL

madox2Is it possible to import javascript module from external url in ES6? I tried (using babel-node): import mymodule from 'http://...mysite.../myscript.js'; // Error: Cannot find module 'http://...mysite.../myscript.js'

 
ok I'm going to go lie down before I pass out
\o
 
can someone please explain me what is the best way to get the new changes from server using git?
I have changes in my local too
 
crl
pull
add/commit before
 
8:40 AM
that will remove my changes right?
 
If you're not ready to commit you can stash your changes, then pull, then reapply stash
 
crl
just be careful with stashing :)
 
but before pulling, I am thinking of a way where I can diff the server changes as well as my local changes.. is this possible?
 
crl
not really
 
@crl yeah had a very bad day using that tbh
 
8:41 AM
@crl Any caveats? Never had problems
 
crl
it's like doing many ctrl+z for later doing ctrl+y, just risky, doing the wrong thing and it's lost
I'd prefer commiting my changes and pulling and merging if needed
 
@BenFortune answered.
 
All these days, I was maintaining two directories in my local. one for my colleague changes(git directory) and other for my own changes(working directory). I used to pull in git directory and compare the git directory with working directory and make necessary changes to git directory. and later I used to commit the git directory. This was the safest one I ever known.
So, the git directory used to do the communication work with git but not working directory
I find no flaw in this method but now other devs are forcing me to have only one directory in my local. So, I am asking is there any way to diff the server and local changes before pulling?
 
lol fucking windows 10
sometimes the windows key doesn't work, neither clicking on the windows icon
and I have to reset the computer :/
 
yeah, that's extremely frustrating
not sure what happens there, the whole taskbar goes numb
 
8:48 AM
How do I abort a pending jqXHR?
 
windows has this kind of bug?
 
Apparently xhr.abort() is not working on the new promise version
 
any help with the above git concern?
 
@Mr_Green I always do git fetch and a diff followed (or not) by a merge, I never use git pull
You don't need 2 directories
At worst you can use specific branches
 
@DenysSéguret I checked git fetch but didn't quite understand it
I know the doc that it keeps the remote version in local somewhere but doesn't make changes to our local directory
but I am unable to understand how to diff this remote version and my local version
 
8:57 AM
Anyone knows if I can use any of this to abort a jqXHR?
`ajaxRequest
Object {always: ()done: ()fail: ()pipe: ()progress: ()promise: (a)state: ()then: ()uniqueId: (...)__proto__: Object}`
 
I would be happy if someone provide me atleast a link of what to do next after git fetch
I am assuming I need to do diff of the fetched version with local version but don't know how/where to do that
 
https://www.atlassian.com/git/tutorials/syncing/git-fetch
Really nice site by Atlassian
 
@Mr_Green Here's an example:
dys@dellette:~/vm/share/share-dev/superpos$ c synosteel
# On branch: trt_ed  |  [*] => $e*
#
➤ Changes not staged for commit
#
#       modified: [1] flat_pmc/src/java/com/keods/pmc/m3/json/JsonServlet.java
#       modified: [2] flat_pmc/src/java/com/keods/webservices/NumerixWebProductProvider.java
#       modified: [3] flat_pmc/src/webapp/m3/XBasedGrapher.js
#
➤ Untracked files
#
#      untracked: [5] flat_pmc/src/java/Thing.java
#
dys@dellette:~/dev/synosteel$ git fetch rbi
dys@dellette:~/dev/synosteel$ git fetch eme
I fetch the repository eme
then I do a diff between my local trt_ed and eme/trt_ed
as I'm happy, I merge
But I could also have made a specific local branch, merged into it, and worked (and tested) in that branch before merging into my trt_ed
changing branch should be natural in your workflow
 
crl
just don't saw the branch you sit on
 
trt_ed
and I merge eme/trt_ed, which is the branch trt_ed of the distant repository eme
 
9:03 AM
so you use command prompt? is it better than any GUI like sourcetree (which I am using currently)?
 
crl
command prompt ftw
gitk if you want to vis
 
ok will switch to that then :)
 
with command prompt you know what happens
I suppose you can do the same in sourcetree, but I don't know it
 
i am trying simple sub string using pure javascript
    function sub_string(){
        var nameFirstname = document.getElementById("name");
            nameFirstname.innerHTML = "checking";

        //console.log("name",nameFirstname);
        var output_text = document.getElementById("output");
        var reslt = nameFirstname.substring(2,4);
            output_text.innerHTML = reslt;
    }
i am getting below error
Uncaught TypeError: nameFirstname.substring is not a function
what i am doing wrong here
 
nameFirstname is a DOM element, not a string
 
9:06 AM
 <body onload="loadmsg(),sub_string();">
        <label id="wlc_Greeting"></label><br/>
        <div>
            <label id="name"></label>
            <label id="output"></label>
        </div>
    </body>
 
You should be careful with how you name your variables
 
oh ok
what i am doing wrong here
 
@DenysSéguret and you should be careful with how you name your git remotes/branches
 
crl
hehe
 
@FlorianMargaine what's the problem ?
 
crl
9:08 AM
thought the same tbh :)
 
seriously, what kind of name is "trwe_ds"
or w/e it was
 
crl
maybe it was a dummy example
 
@FlorianMargaine trwe_ds ? Where do you see that ?
 
crl
7 mins ago, by Denys Séguret
then I do a diff between my local trt_ed and eme/trt_ed
 
@DenysSéguret I don't remember the names
yeah, that ^^^
 
9:09 AM
guys help me
 
looks the same to me
 
trt_ed is the name of a big feature, and a branch. How is that a problem ?
 
it doesn't mean anything
 
crl
it's not too expressive, like my name :)
 
You mean you never use acronyms ?
like, AJAX, or another one ?
 
crl
9:10 AM
I do :), but other people tend to not like it
 
why i am getting this error
Uncaught TypeError: nameFirstname.substring is not a function
 
@Mahadevan Name your variable nameFirstnameElement, to start with, and try to understand what's its value
 
"nameFirstname is a DOM element, not a string"
 
@DenysSéguret trt_ed is not an acronym like ajax
you can pronounce ajax
 
the value is string
 
crl
9:12 AM
can you pronounce www?
 
@FlorianMargaine You should look a little in the big enterprise world. Many things have a shortened name or an acronym, you can't just play with cute names like Greasy Bear
 
@DenysSéguret I know a little about the big enterprise world :)
and I know this is common
doesn't mean I approve it
 
@FlorianMargaine Should we speak about the names of your open source projects ? like dpsv ? qldeb ? They don't make more sense from outside :)
 
var firstName = document.getElementById("name");
     firstName.innerHTML = "Mahadevan";
console.log("name",firstName);
//I am getting the entire tag not the value
<label id="name">Mahadevan</label>
 
@DenysSéguret one point for you
:D
 
9:18 AM
Installing Windoge for GTA V, PS, SFM :(
 
PS, SFM?
 
crl
talking about acronyms
 
@FlorianMargaine Photoshop, Source Film Maker
 
!!google Source Film Maker
 
9:20 AM
who in da fucking hell indents code with "5" spaces?!
 
@AwalGarg fibonacci indent?
 
wtf is that
 
@AwalGarg I only indent with increasing prime numbers
 
crl
lol
 
9:21 AM
@phenomnomnominal ofcourse you do
 
@AwalGarg 1, 2, 3, 5, 8, 13, etc
 
function sub_string() {
    var firstName = document.getElementById("name");
    firstName.innerHTML = "Mahadevan";
    console.log("name", firstName);
    var reslt = firstName.substring(2, 4);

    var output_text = document.getElementById("output");
    output_text.innerHTML = reslt;
}
:)
 
  do
   you
     not
       think
           this
             is
                 readable?
 
crl
perfectly
 
@AwalGarg Hu ? TLDR ?
 
@AwalGarg retards?
 
@DenysSéguret some famous idiot said good bye to windows and osx and decided to blog about it. it reached LWN.
 
> I don't completely buy the utility of this
 
any suggestion please
 
9:23 AM
@FlorianMargaine actually makes quite a bit of sense
 
crl
actually a concave function for indentation would makes sense
 
@crl what ?
 
crl
because the farthest the least indentation diff
 
@phenomnomnominal totally does
haven't tried it yet tho
 
as a punition for big indentation ?
 
9:24 AM
@FlorianMargaine lets go for exponential indentation. that will keep callbacks out.
 
@DenysSéguret yup
 
crl
@DenysSéguret like 4, 8, 11, 14, 16, 18, 19, 20, ...
 
@FlorianMargaine would definitely not use it on a teem project haha
 
Personally I use 3 spaces (rendering, they're really tabs)
 
@phenomnomnominal just use tabs
 
9:25 AM
oh yeh and then it's just normal for them
 
and configure your editor to show tabs like fibonacci
 
crl
I use both :))
 
interesting
 
@AwalGarg I still don't get why this is a bad thing
 
If you do this with real spaces, any dev not having the same tool will screw the code
 
9:26 AM
@BenjaminGruenbaum has node's TC considered switching to rethinkdb's API style for native modules? i.e. return a promise if no callback is passed. That'll keep BC and things...
@GNi33 I don't understand why is it "news".
 
In fact the fibo indent could be more readable...
 
@AwalGarg So.. W10 works on MBR without any problems?
 
@pootis yes
@pootis without any "MBR related problems". that Os itself can not work without problems.
 
@AwalGarg I know. I'm going to dump it as soon as I get bored with GTA V.
 
@AwalGarg it's a guy popular in a completely unrelated field posting about his experience when switching to Linux as his main OS. Not some programmer posting about this solely to other programmers in this "ecosystem". It's not news, not at all, it may reach some other people than the usual suspects though.
 
9:31 AM
How to reverse "hello" string?
using Array.prototype.reverse()
 
"olleh"
 
!!> "hello".split("").reverse().join("")
 
@Mr_Green "olleh"
 
any better way?
 
9:33 AM
hmm
 
Array.from('hello').reverse().join(''); // maybe?
 
yeah maybe
 
!!> "that ^, or"; [...'hello'].reverse().join('')
 
@AwalGarg "olleh"
 
@AwalGarg this doesn't look like I can hold the string in a var
 
9:35 AM
you can
 
nice
 
@DenysSéguret yes, I want to believe that too :)
 
@AwalGarg considered look at the node-forward repo.
 
!!> [].reduceRight.call("foo", (s, c) => s + c)
 
@FlorianMargaine "oof"
 
9:40 AM
!!> [].reduce.call("foo", (s, c) => c + s)
 
@phenomnomnominal "oof"
 
I will create a perf wait
 
[...'foo'].reduce((s, c) => c + s)
 
@phenomnomnominal reduceRight is too often forgotten
 
but useless here
 
9:43 AM
it makes more sense imho
 
yes
(but using reduce here doesn't make sense, so the whole point is weak...)
 
@FlorianMargaine because there's a reverse function which totally makes sense in this specific case
 
it's destructive
so it doesn't apply to strings
 
yes but you saw the [...'hello'].reverse().join('')
 
9:45 AM
somehow getting errors jsperf.com/reverse-string-green
 
@DenysSéguret going through a temporary array sucks
 
@FlorianMargaine do you think reduce would be more efficient here ?
(disclaimer: I have no idea, both solutions probably suck)
 
crl
a for loop would beat all of you :p
 
@DenysSéguret semantically-wise, yes (you're not going through a temporary data structure)
 
@crl the problem is you always need temporary structures, be them an array (with reverse) or a big bunch of strings (with reduce)
 
9:47 AM
the fastest is....
 
goddamn immutables
 
@FlorianMargaine you're going through many temporary strings...
 
> "foo".split("").reverse().join("")
 
crl
but n strings concatenations suck bad..
 
@Mr_Green probably
 
9:47 AM
I checked through jsperf
 
@DenysSéguret yeah.. I guess I just prefer immutability
 
mutable arrays are powerful
 
crl
function rev(s){var r=''; for(var i=s.length-1;i>=0;i--)r+=s[i]; return r;}
 
@crl you're going through as many string concatenations as I am
 
crl
yes, that's the prob
function rev(s){var r=Array(s.length); for(var i=s.length-1;i>=0;i--)r[i]=s[i]; return r.join('');}
probably the most efficient one
 
9:53 AM
you could do half the iteration (with a slightly uglier code) if you're after performances
 
crl
oh I see
 
just like when you reverse an array in place: swapping
but the JS world of performances is sometimes hard to predict, especially with optimized array functions, it's possible reverse() is faster on big arrays
 
you tested with a 3 letters strings ?
try with document.body.innerHTML
 
yes
ok
 
crl
9:57 AM
r[i]=s[s.length-1-i] ^ small error
 
Time to update Chrome, I guess
 
crl
*firefox
 
@crl where exactly?
 
crl
function rev(s){var r=Array(s.length); for(var l=s.length-1,i=l;i>=0;i--)r[i]=s[l-i]; return r.join('');}
 
done
updated
still the custom function wins
 
10:06 AM
hi
 
@karanvirsingh 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.
 
crl
hola corazon
 
10:18 AM
The typical two users chat room experience:
user image
4
 
10:32 AM
:D
I can't get over that "sir" thing
 
@DenysSéguret look at the list of rooms that user is in :D
 
OMD ^^
@MadaraUchiha does that look OK to you ?
 
10:58 AM
lol
some user in this room has the username "gitprincess"
 

« first day (1907 days earlier)      last day (3048 days later) »