« first day (1593 days earlier)      last day (3577 days later) » 

Has anyone tried dell xps 13 dev edition?
unless there is something specific that I'm not aware of about file inputs data attributes are added by the authors generally
guys I need help with grunt
hahah oh wow
so I just saw Bens starred article
^ I am trying this to understand
but it is going from top of my head as I am not aware of grunt
05:05
damn feeds..
@Mr_Green sounds like it allows you to include templates in your js via var mytemplate = require('sometemplate')
package up compiled templates with browserify
grunt is just a task runner, so that would be a step in your build process
@Loktar I know what data-* generally are...but what would data-url be doing on an html5 input file element?
no idea, maybe some plugin is using it and storing something there?
hard to say
friends i need help friends
i have created country footprint map. map is working good google chorme and as well as firebox also working.when i run my map IE8 its not working
@Thennarasu welcome to IE8 :(
Id offer to help but I don't have anyway of testing IE8 on my home machine unfortunately
post some code someone might be able to help
05:14
no, ctrl arrow is to switch desktops
oops.. out of date stream.
@Luggage yeah I was sad I missed that convo
Google no longer supports IE8
@monners iirc they were dropping support for IE9 soon or already did as well
@Loktar It went pretty much the same as it always does.
too bad we still support it at the workplace. The faster we can get to 10 and 11 the better
05:16
Our advice to clients that still use IE8: Don't
@monners lol yeah I saw that, I just feel Windows is under representing in those convos
well positive remarks about it anyway
My code line above 5000 lines there@Loktar
* represented, don't feel like editing and repinging
I love windows! It lets me play all the best games on my desktop!
haha yeah thats one of the primary reasaons I'll always use Windows
05:18
Every Mac I buy will likely end up with a version of Windows on it
If only so I can play games :P
in the past couple years though it has gotten some love from Indies along with Linux
but for most AAA studios its such a tough sell still it seems
Yeah, shame
Ah well, gotta keep the MS machine running
Yea, a surprising numbe rof my steam games are avaialble on OSX
Home time!
Weeeeeeee!
i still only really game on my windows desktop anyway, though
the mac is for coding and porn
5
05:20
lol
@Loktar I have no idea at all.. seems completely new to
Btw, what I am trying is to procompile my html files in to a single js
just like "Watch templates"
I am using lodash for templates
@Loktar any idea what should I do.. I am completely confused.
eh, not really I havent used templates in a while honestly
atleast do you understand what I am trying to do here? and does it better to do so?
yeah I totally understand
I think handlebars.js compiles templaates to JS if you are looking for something more than lodash
05:30
If you just want to end up with one file it totally makes sense
ok thanks
@Luggage I am using lodash templates
does handle bars does what I mentiioned above?
OK. I missed the previosu conversation but handlebars can pre-compile JS from templates, if that's what you need
I don't even know if you were looking for an alternative to lodash.
ohh, grunt-template-module ?
@Luggage I will definitely look for alternative if there is a precompiler for others
yeah grunt-template-module
do you have idea about it?
if yes, please help me :|
Yes. It's a way to use some template libraries (like lodash) in a build script.
Specifically a gruntjs.com build script.
I'd browse around the different template libraries to take your pick. You have so many choices.
!!s/ and // 21757087
05:38
@SomeKittens the mac is for codingporn (source)
@Luggage please help me what to do next
I installed "grunt-template-module"
it is telling me to write in this format
template-module: {
    myTemplates:{
        files: {
            "tmp/module_jst.js": ["test/fixtures/template.html"]
        }
        options: {
            module: true
        }
    }
}
but I don't know where to write
and in which file to write.. like json or js file?
That's for a grunt config file. Are you using grunt? Do you want to? gruntjs.com
Gruntfile.js
I already installed grunt too
not gruntfile.js though
I installed by doing: "npm install -g grunt-cli"
in nodejs command prompt
Well, Gruntfile.js is how you config grunt.
Are you even sure grunt is what you want?
You are looking to bulk compile a lot of template files?
05:45
yeah
I am not sure whether I need grunt or not (researching on grunt after seeing that it helps in precompiling the templates)
I am new to it
Well, it's just a build system. it just helps you run tasks against files. Gulpjs is an alternative and quite popular
both will do that you need.
please help me how to precompile the html files in to one js file using gulp or grunt..
atleast provide me a link to read
I have. gruntjs.com It has documentation.
@Luggage just tell me one thing. I will do later anything
there is a code like this:
template-module: {
    myTemplates:{
        files: {
            "tmp/module_jst.js": ["test/fixtures/template.html"]
        }
        options: {
            module: true
        }
    }
}
where to keep this code?
I mean in a .js file or .json file or something else?
I told you. Gruntfile.js
That' the filename.
05:53
ohh ok
I didn't get it before thanks
user1596138
Trying to figure out what I was going to build judging from my DX cart..
user1596138
It sucked whatever it was I can tell that much
06:13
All the cool kids use Gulp.js
0
Q: Trying to precompile html files in to one js file using grunt

Mr_GreenIn my Single page application project, I am using client templates. After searching on Internet, I came to know that client side templates can be organized in three ways: Writing Script tags in index.html with type, say: text/template. Writing the templates in separate .html files and write the...

@monners any idea? ^
06:41
What do you mean by down to a js file?
Wait, never mind. Your question answers that
@Mr_Green I'd use Gulp personally
Far less verbose
And you can attach pretty much any node process you want to the build chain
ok I will look in to gulp.. thanks
hello there
do you have any link as lead?
ohh thanks :D
Not sure if that's what you're after, hopefully it helps
06:46
@monners it seems to be actually modifying the html files
I mean replacing the lodash variables from html files to the actual data
@Mr_Green I don't have any experience with lodash (we use handlebars templates)
even if I use handlebars, it still replacing the html files with data but not gathering all the html files to one js file.
I am ready to go with handlebars.. if I can able to get what I explained above
@Mr_Green You should be able to roll your own method for doing that. The beauty of gulp is that you can interrupt and modify the stream where ever ya want. That's a little beyond my level of expertise though
ohh ok I will look around then.. thanks for you help.
No worries. Good luck
Out of interest, what exactly should the output look like?
Just html in a giant string?
06:51
yeah somewhat like this:
var templates = {
     "header.html" = "<div><% hello %><span>title</span></div>",
     "footer.html" = "<footer>hello</footer>"
}
And the variables should already be subbed out for the actual values?
no
then later I can access those html strings as _.template(templates["header.html"])({hello: "heading here"})
Ok, shouldn't be too hard to write a gulp task that reads the built files then dynamically constructs that object based on their content
That's as far as I can help though, I think.
Gotta run. Good luck.
thanks
 
1 hour later…
08:01
hmm, in angularJS, when posting objects, there are some parts of the json I want to drop. Since ng-model seems to create the key with null value, it's present in the request. Any suggestion on where to do this?
a request-interceptor? (docs.angularjs.org/api/ng/service$http)
Oh great, those bollocks $ signs in the URL gets eaten... "docs.angularjs.org/api/ng/service/$http"
seems they added transformers to, I'd have a look at wether those can do a better job at it
@Zirak what it's gonna look like ^
08:18
ivarni, mm, yea, I know those.. I'll check it out :) thanks
THE
THE
anyone good with string manipulation ?
For starters
Never use alert() for debugging.
THE
THE
thanks
And as we recently learned, try to avoid console.log() as well, at least with asynchronous code, unless you're very careful about not logging by reference
@ivarni Generally, you want to use a debugger for debugging. That's what it's there for.
08:30
@SecondRikudo exactly :)
@THE if there's something you don't understand, tell.
"var a = { b: 1} ; console.log('%O', a); a.b = 2; console.log('%O', a)" is the easiest way I can think of to demonstrate the problem with console.log
THE
THE
@SecondRikudo I always had trouble with string manipulation regardless of language, I will try to learn it this time
@THE There isn't a single string manipulation line in my solution.
THE
THE
I understand, which is why I am going to read about methods it uses e.g. substring etc.
08:36
@THE it's relatively straightforward. What aren't you getting?
@Alberto 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.
Hi there :D
@Alberto Greetings Big Al :D
@CapricaSix Are you a bot? If so, I'd like to take you out to dinner and get to know your code.
@21759194 Nope, totally hooman.
@Nick Nope, totally hooman.
@CapricaSix Really? Then who is the president of america?
08:43
That's hardly a proper turing test
@Nick bush. Not possible to have a black POUS anyway.
Ask her what her secret desires are. If she tells you it is to dominate the planet and slaughter mankind, she's a bot.
@FlorianMargaine It would be nice if the bot could send the other random stuff I say to cleverbot and re-convey cleverbots words... Hey, it's just an idea.
@FlorianMargaine He's so beautiful! Could I use him?
@FlorianMargaine Beautiful. That license looks legit! :)
08:49
it actually is
O-o You people are my new best friends.
Well, I gotta go :) Catch you l8r
THE
THE
@SecondRikudo LastIndexOf gives me the last index of "/" but how can I remove third last
should I put it in a loop and remove it 3 times, as if I need to remove last three parts
@THE That's how you'd have to do it with strings.
But to prevent that, I'm using arrays.
THE
THE
09:12
at last i made it work myself \o/ jsfiddle.net/RLsU5/18
Hopefully my docs PR will be merged today and we'll have io.js featuring unhanlded rejection events today :D
@BenjaminGruenbaum \o/
How do you guys manage client side templates?
09:31
@Mr_Green I compile them into JS
@RoelvanUden can you please tell me what you use to compile?
or atleast any link?
@Mr_Green browserify with brfs
4
Q: Extend profile hiding in chat for suspended users

Second RikudoWhen a user is suspended, his account is reduced to 1 rep and all of his privileges are stripped. However, they can still join chat rooms. This leads to various forms of abuse possible (all of those I've seen by suspended users): Join/Leave spams Expletives in profile messages Hold one sided ...

@Mr_Green So, this github.com/substack/brfs.
@Mr_Green I can then just fs.readFileSync files in my JS and get the HTML there.
@RoelvanUden ahh you said this me before too but I got confused.. :(
09:35
Confused?
yeah not related to this but project deadlines and other stupid stuff
Oh, I can't solve that. I'd just tell you to look at github.com/substack/brfs#on-the-command-line
@RoelvanUden thanks working fine :)
@RoelvanUden works pretty well, even with KO templates
but I have requirement where I need to gather all the .html template file strings in to single bundle.js
is this possible with browserify?
@RoelvanUden
09:46
@Mr_Green Sure, just have multiple statements.
You have multiple like that easily.
which build tool should I use for typescript? for compiling and running tests on node.js
@SecondRikudo sure why not
@Abyx the typescript compiler
@RoelvanUden sorry I didn't get it..
I am such a noob
@BenjaminGruenbaum it doesn't run tests
@Abyx Run your tests after TS compilation?
09:55
mocha takes a transpiler argument
@BenjaminGruenbaum oh, that's interesting
Does anybody knows
how to get a map of all files getting require'd by browserify
preferrably as a list ?
10:08
@RoelvanUden
var fs = require('fs');
var __view = 'app/templates';
var templateFiles = fs.readDir(__view);
var obj = {};
for(var i = 0; i < templateFiles.length; i++){
	obj[i] = fs.readFileSync(__view + templateFiles[i], 'utf8');
}
console.log(obj);
^ I wrote like this.. not workings
pasting the same in bundle.js
Please help with this... I will be done for today.. plssssss
You can't do that. It has to be static analyzable.
No dynamic references allowed.
Just make a list of files to include.
@RoelvanUden thanks it is working..
just of curiosity.. is there any way to remove the first line from bundle.js?
it is something like this:
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&
I don't need this..
Not that I am aware of, and not something I'd want, you have to consider that browserify bundles your entire require tree and essentially exposes an entire application as a single file with internal requires etc.
I build angular apps with 1 output file ;p
10:23
is Benji around?
@BartekBanachewicz only sorta - why?
@BenjaminGruenbaum is there a name for a relation between two higher-kinded types when A (B x) can be viewed as equivalent to B (A x)?
ffs sorry for the plinks. I'm terrible with this chat thing.
A and B are functions?
nah, kinds
like Maybe
For example...
Maybe [a] and [Maybe a] is what I'm thinking about
in this case, it's clearly different in what order you apply the wrapping types
You mean that composing types in different order gives the same result? That the order is not important?
10:26
but in some others, I think it might be not relevant
@BenjaminGruenbaum precisely
Sounds like associativity
lel
I'm dumb nvm.
@BartekBanachewicz wait, it's not, it's commutativity
Since you want A op B to be the same as B op A
well, either of the basic operations, was my point, and I wasn't thinking in terms of those
yea
Then yes, we say that composition is commutative for types A and B
10:28
time to google for commutative types
woo letters and arrows that means I'm on the right path :D
I don't think Haskell's type system can express those though :P
It's actually a classic problem in many areas and a classic exercise in dynamic programming
Given n commutative and associative operations find the optimal order for applying them.
@BenjaminGruenbaum mmm
It's classic in graphics (multiplying several matrices in a row), in databases (performing n joins) and so on.
10:33
Well what I had in mind was something related to an answer I just wrote
You have a Report type. It can be either a Failure or Success, and either XML or JSON
of course you can just write Report = Report Outcome Type
but what if you could actually compose FailureOrSuccess and that type
data MaybeFailing a = Fail a | Success a
data ContentType a = XML a | JSON a

type Report a = MaybeFailing (ContentType a) -- ~ ContentType (MaybeFailing a)
aaaand then in pattern matches, you can unwrap either layer
@BartekBanachewicz I wouldn't do it like that, I'd write a specific data type rather than a composable one since I think it'd give much more information. Like a Fail | JSON | XML or something like that.
v :: Report

case v of
    Failure x -> -- x :: ContentType a

case v of
    XML y -> -- y :: MaybeFailing a
I've found developers to be enjoying those a lot more.
@BenjaminGruenbaum the point was you can either succeed or fail with either xml or json report
combinatorial explosion
@BartekBanachewicz You can fail with JSON?
10:39
You can succeed with XML?
@BenjaminGruenbaum well, giving a failure report in JSON, I mean
@copy hihih
Well, good luck. I have to go work on my robot. TTYL.
I just think the fact that you could unwrap two such commutative layers in an arbitrary order is interesting
ADTs are fun
THE
THE
Is there any exemplary JS code I could look at and learn
Prelude> :set -XTypeFamilies
Prelude> data family Report a
Prelude> data RepType a = XML a | JSON a
Prelude> data PossibleFail a = Failure a | Success a
Prelude> data instance Report (RepType (PossibleFail a)) = RF a
Prelude> data instance Report (PossibleFail (RepType a)) = FR a
hmmmmm
THE
THE
or maybe good code vs bad code for JS
@THE every js code is bad code
hi hi hi
THE
THE
awwwww :(
11:03
aaahh
@THE read JavaScript: The Good Parts
http://stackoverflow.com/questions/28717439/how-can-i-improve-this-n‌​ode-js-website-so-it-can-be-more-useful-for-node-js-dev
@tereško Gees these jabbascript people should really clean up their crap...
11:21
what would be a good way to serialize the whole window ? JSON.stringify does not want to do it
why would you want to do that?
@CSᵠ That sounds like the wrong solution for whatever problem you are having :P
well... features
maybe not entirely @PeeHaa
wanna get browser features sent to the server
would want to minimize client side code
this will be done once and set a cookie/session/flags/etc
Just pick the useful features and send those?
Well given that you'd need to send 12KB of variable names alone (let alone values) to the server, that doesn't really save much
11:24
yeah...
@Qantas94Heavy it's not that much nowadays
well the JS code to detect all that would probably be better-performing and similar size
i'm aware of that, not really better performing per say, but npt much of a deal
hmm, for in loop, not much of a deal
any particular features you're detecting?
like html5 stuff
or more like ecmascript support
just the whole list
11:39
@AwalGarg look at the api spec, wanna get started with it ?
3
Q: Stringify DOMWindow object

ggutenbergFor some reason I seem unable to use JSON.stringify on a DOMWindow object. For example: console.log(window.self); // Outputs a hierarchical DOMWindow object console.log(JSON.stringify(window.self)); // Outputs nothing - not even an error alert(window.self); // Alerts "[object DOMWindow]" alert...

@PeeHaa well thanks
Listen to @copy @CSᵠ he actually knows what he is talking about :)
looks bettr, thanks @copy
11:44
The credit goes to @dystroy in this case
But he'll probably tell you that it's a terrible idea
and ofc, ty @dystroy
:) double pings
well... 'those specific cases'
that start being used for testing, then get into production 'temporary' aaaaaand.. get buried there

« first day (1593 days earlier)      last day (3577 days later) »