« first day (2044 days earlier)      last day (2887 days later) » 

4:06 PM
ok so kinda got first part of json working lol,,... that's a bonus!
 
When I added this to my angular app: app.config(function($routeProvider, $locationProvider) {
$locationProvider.html5Mode(true);
});, I got a "$injector: modulerr" error. What about the line I added is causing the error?
 
Hello, does someone know how to solve that problem with a JavaScript debugger console (I don’t care about the browser) ?
-1
Q: How to replace all variables that contains specific string values with other values?

user2284570For example, replace the value of all variables that containsgnl.frwithnlg.com In windbg (windbg being attached to the web browser process) this can be achieved like this : .foreach (hit {s -[1]a 0 L?80000000 "gnl.fr"}) {ea ${hit} "nlg.com"} However, it erase critical values from times to time...

I don’t even know how to walk underwindowfor searching into globals.
This could be a good first step.
 
<For i={1} condition={i < 10} step={i++}> JSX. Because plain JS ain’t enough. And designers can’t understand anything without < and >
old but stumbled upon it and laughed again
 
#IDontGetJSX
What about you? Is JSX a pointless sugar OR useful syntax?
 
mixed opinions
 
4:22 PM
I think the syntax is useful for 'declarative' code.
 
@AwalGarg ngReact ?
 
I don't like JSX but I think it is useful. It is not the best option, seeing that we have virtual-hyperscript!
 
it strikes me as really gimmicky
though gimmicky things can be useful
 
I think it is just sugar, but just like arrow functions and destrutors, a really useful one.
 
@KirstyMarks There is a mixed content issue because i use HTTPS while the weather app doesn't work over HTTPS .... lol
 
4:27 PM
it is comparable to coffeescript
 
no, coffeescript replaces everything.
jsx just add one more transform
 
coffeescript didn't take off though
 
yeah, I think it is an overkill to sugar for what it does. sugar doesn't have to be syntax extensions.
 
Ohh, I know all about that. I wrote a large project in coffee and ended up converting it all to es6. Most by hand.
I spent a LOT of time paying for that mistake
 
mistake being writing in cs or converting to es?
 
4:30 PM
writing in cs
 
cs has some good things JS can learn from. we already took lambdas for instance which was a good move.
 
ES6 is standard so that can't be a mistake.
 
I am not particularly a fan of using cs as a language though
 
right. I liked coffeescript, but once es6 came out, I just couldn't justify using something that esoteric.
 
oops! :D
that sucks @karelG doesnt it lol
 
4:36 PM
I have checked the API
 
I'd like to see ideas from cyclejs, virtual hs, virtual dom, rx etc. mixed
 
why don't you use the long/lat ? That API offers it and it's much easier because it will find the nearest weather point of that location
 
i was reluctant to try coffeescript
I was afraid it was going to make me too dependent on it
 
@KirstyMarks jsfiddle.net/bxhynwww <-- used longitude/latitude approach. Also provided comments to know what happens. You can build further on that
i have to go. if you have question, ping me with the Q
 
and also JS has the biggest annoyance that is statements. it troubles me to great lengths that I can't do let x = if (c) { ... } else { ... }.
 
4:39 PM
I'd say it's unusual to have if be an expression
 
you are unusual
 
And you have the biggest annoyance
 
there should be a babel transform that automatically wraps statements in IIFEs when used in expression context
 
ok @karelG, thankyou for this
 
let x = c ? 1 : 2;
let x = (() => { if (c) { return 1; } else { return 2; } })();
or an IIFE operator, like CoffeeScript's do
 
4:44 PM
@Luggage ES is importing do from cs too, btw :P there is a proposal on stage 2
 
then there you go.
babel has it, so it solved your problem: babeljs.io/docs/plugins/syntax-do-expressions
let x = do { if (c) { ... } else { ... } };
 
@Luggage yeah no. I really want statements to go away altogether :P
 
ahh, well, then too late.
 
Hey guys, java chatroom has no one on right now, mind if I ask a java question?
 
@AswinG Welcome to the JavaScript chat! Please review the room 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:48 PM
java has nothing to do with javascript, be we aren't strictly on-topic here.
 
@AswinG I know a bit of Java, shoot
 
okay
What does for(String str:args) do?
if args is another string
 
what does it do for you?
 
not sure, i'm trying to understand a program
I'm assuming everytime it loops the string 'str' will hold one character from the string 'args' until it reaches the length of args
am I right?
 
that would be my guess as a c# user.
 
4:53 PM
hmm...
and what exactly does 'nextline' do
scanner.nextline
 
<li class "view" href = "#Scripting">Scripting</li> ..Now the <a> just missing. How can I manage to do that??
 
read a sentence or a character?
 
enemy.getHP() * 100) / 400) * 8. Where 400 is the hp bar. I wonder if there is a better way to convert the percentage to the actual px units. Right now im multiplying the percentage by the max value first digit * 2 (8)
 
@AswinG args as in String[] args?
It loops once for every item in the array, so for every argument
 
nope, args is a string declared in the main function
 
5:01 PM
show us
 
hmm, never seen it used like that
@AswinG Reads until it finds a newline \n or \r\n
 
for(int x = i-1; x >= 0; x--)
args[x] = s.nextLine();
where x is input using nextInt
 
sup nubs :d
 
@AswinG no, x would be i-1 to start
i don't know what "i" is so I can't tell you what it would be
 
oh yeah sorry, i was previously input using nextInt
 
ah ok
Well for i-1 times, read a newline from the input and assign it to array "args"
 
args[x] <- args IS a String[].
 
the program would essentially wait for you to enter i-1 lines
 
I've had enough of your lies! :)
 
so does args[i] take a character or sentence?
 
5:05 PM
Yeah, he's right. You can't do args[x] if it isn't a String array
 
args being declared like:
args = new String[i]
 
@AswinG Okay, lets say this, you write "Lalala" and then press enter
It grabs "Lalala"
It returns everything you entered prior to hitting enter key
Ok, then it just seems to me that the program is loading i lines from the user, nothing more nothing less
 
this is reversing the order of input lines? This smells like homework.
 
meh, it's ok. It's not a stackoverflow question ;)
 
lol not homework
thanks Neil. That clears some things
 
5:08 PM
no problem
 
Whats wrong with homework by the way xD
 
Nothing.
 
@Neil I finally figured everything out
 
@Abhishrek what were you doing wrong?
 
@Neil Mixer should have random access on mixable inputs
but should stream a control statements
 
5:18 PM
For the record, still lost
 
sources--------------V
controlStream -> mixer -> Encoder -> Output
controlStream basically tells the mixer
what offset to use to create the output for this frame
user can then control the controlstream
and this will work exactly like an audio player, but... the user can control this remotely
 
and it's transparent for the user?
 
@Neil user knows nothing about how this happen
he just opens his phone / laptop
opens a url / app
and starts broadcasting online :P
 
no, I just meant the interface to the mixer is "play", "stop", "pause"?
 
yep
and also a Microphone In
crossFade out, crossFade in etc
I cant simply just switch streams :P
that would sound like a disaster.
The user is playing music in his app, the server re-creates events that occured n seconds ago on the user end
 
5:21 PM
anyone know how much support fetch has? ive just tested a code that works on FF and Chrome, but it doesnt work in IE :S
 
@KirstyMarks just use what-wg fetch, it shims fetch really really well.
and also tells you where fetch won't work :P
 
have u got a reference for this lol? is it on a website? as that didn't make alot of sense xD...
 
awesome, ta
god why didnt i find this earlier lol
it may have just saved me :) thanks @abhishrek
 
#blameIE
 
5:26 PM
@KirstyMarks It won't work less than IE 10+
just saying :P
 
I'm not going below IE11
 
well tbf, i supposed to support to IE8, ..... long story....
 
Babel + ES5shim + fuckCSS
 
is a standard ajax JSON request supported by IE8 do u know?
 
*you
 
5:28 PM
oops
i think im just going to do some practice either way with json and retrieving the data... i like it better than xml, must admit
well just found out whatever i'm doing doesnt work in IE11..... ffs.. lol
 
I think you're chewing way more than you can eat
 
most likely, try telling that to your boss...
tbf im already asked to see if i can scrap this. I don't know enough JS or understand it enough
i admit
 
If he doesn't have anything better for you to do :-D
 
hahaha! That's the thing, he set it as a project for me to go away and learn, but i feel i don't even know the fundamentals and feel a little out of my depth
 
Anyone has an example of a fairly complex jekyll site with lots of pages?
 
5:32 PM
If it's a throw-away project, go ahead and learn
 
that's the thing, i don't think it is :S
 
I <3 Node.JS
 
Then I think they are screwing themselves over by tossing a key project to be founded by a newbie (any newbie)
 
words taken from my own mouth
@jandvorak, jsfiddle.net/0fy86atr please feel free to rip it out. Please don't tell me how to fix it, as i know very well its completely wrong no doubt, but you can get the jist of what i was trying to achieve with it. I'm going to speak to him Monday regarding it, as i shouldn't be stressing over something i don't know
 
No, I mean: learning is good. They just shouldn't be expecting maintainable code from someone who never saw the language. Which reminds me...
!!google webforms websocket tutorial
 
5:38 PM
no i know what you are saying, completely agree
 
nvm, i forgot how to bash
 
btw do you have an owl on your head? 0_o
 
Nope, I have a human stuck up inside me.
 
ok, fair point....
0_o
 
(removed)
 
5:41 PM
:-/
 
oh my... unmasked!
 
6:02 PM
hi guys , when i try to request site with www. the stylesheet and javascript file not work in my site , but when i request without www. file work fine ,
so can you help me
 
@HaithamShehata Welcome to the JavaScript chat! Please review the room 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.
 
I thought node -v 6 supported import?
I get:
SyntaxError: Unexpected token import
at Object.exports.runInThisContext (vm.js:53:16)
 
@HaithamShehata how are you including your files?
 
Is there a nice way to "increment" a double? That is, go to the next representable value?
 
@JanDvorak + Number.EPSILON?
 
6:16 PM
!!> 10 + Number.EPSILON
 
@JanDvorak 10
 
Is shift still slower than pop?
 
wait wat
 
Adding epsilon only works for values close to 1
 
but.. why?
 
6:17 PM
doubles get less precise as you go on
 
^
EPSILON = 2.220446049250313e-16
that precision will be far gone
 
@JanDvorak it works for 2.1 but not for 2. This doesn't make sense to me according yo your reason
 
@AwalGarg ever known this
!!> 0.1 + 0.2 === 0.3
 
@Abhishrek false
 
@Abhishrek that's unrelated
 
6:19 PM
multiplying by 1+epsilon should work better. If multiplying by 1+2*epsilon always increases the value, it's good enough for my purposes, I guess
 
@AwalGarg do you know how floating point numbers work?
 
!!> 2.1
 
@JanDvorak 2.1000000000000005
@JanDvorak 2.1
 
!!> 2 + Number.EPSILON
 
@JanDvorak 2
 
6:21 PM
Round to even, I'd guess
 
> The Number.EPSILON property represents the difference between one and the smallest value greater than one that can be represented.
 
@JanDvorak same for 3 and 3.1
 
!!> 2.1.toString(2).length
 
@JanDvorak "10.000110011001100110011001100110011001100110011001101"
@JanDvorak 54
 
There was a bug in Chrome about toString
 
6:22 PM
See the 1 at the end?
 
lemme see if it still happens
 
ohhhh
sooorrt of makes sense. sort of.
 
round to even
 
!!> 2.1.toString(5)
 
@BenjaminGruenbaum "2.0222222222222222222223"
 
6:23 PM
Run this in Chrome
> 2.1.toString(5)
"2.022222222222222222222232344110240034301340200113300332043423342241222143424002223101121123212323433233231112204030032304432402110140331440334433103431423002033323023333120021341301130042431140414002343404342132310143003134134131121134021001403140040402430121314442323214124411134414211444001312112332440202424003304400022242323204100400204004341311303402131422321042021434343103102203231104143131340323114113111224204414404203444211404242440230212034140310321012123403233312211021203100110140100242213101011433413143342303400142103110200001114233441134144113200131324413130201
 
Chrome sucks
 
2.1.toString(5).length // 1101
Chrome is the only bearable browser atm, I tried firefox - it was slow and some websites didn't work well on it
 
Chrome is ugly, and on my older laptop Youtube worked better in FF than in Chrome
 
@BenjaminGruenbaum such a solid proof :P
 
Chrome can't do position:relative; top:50%
 
6:25 PM
@BenjaminGruenbaum Edge?
@JanDvorak chrome lags on node.js docs /all page
 
Edge has no extension support = worthless for most news sites
 
Both chrome and FF and great pieces of tech. Browser wars are the same as OS wars except browsers are a hell lot more similar than OSes, so browser wars are even more silly.
 
Also worthless for this chat because then I can't have the lines color-coded
Chrome has too many old bugs
 
Still sucks with huge svgs and even raster images (did they just give up?)
 
I might give a second chance to Chrome if they remove that ugly ass-button that tells the whole world your name anytime you screencast
 
6:30 PM
@JanDvorak the login button on top?
 
@JanDvorak set it to foobar? or switch to incognito? use guest profile?
 
Yes
@AwalGarg all of these are ugly and hacks
 
@AwalGarg and lose all of his bookmarks and stuff.
Anyway back to work
 
But yes, my profile name is .
 
@Abhishrek I doubt he wishes to show the world what he has bookmarked if doesn't want to show his name :P
 
6:31 PM
@AwalGarg I don't want to see my name myself...
I might consider Opera
 
@JanDvorak yeah makes sense. you can disable that "feature" in its entirety though. chrome://flags/#enable-new-profile-management
 
I've tried Vivaldi and it was slow as hell
@AwalGarg doesn't work anymore
 
@JanDvorak chrome -disable-new-avatar-menu
 
(I myself use FF though, just defending chrome because it is right)
 
@BenjaminGruenbaum doesn't work anymore
 
6:34 PM
da hell. when did these stop working
 
They've canceled the flag to "clean up old code"
v38 or so, I vaguely remember.
 
they removed memory stats and nerd stats in v51 too :(
 
@JanDvorak try replacing your name with a zero width space
 
@BenjaminGruenbaum that's both an ugly hack and it still leaves that button in place
I thought of compiling my own Chromium but cba
Plus, they're disabling Flash by default and it's only a matter of time until it can't be overriden.
 
FF does that too, thankfully.
 
6:38 PM
Plus the whole pepFlash thing...
OTOH, FF also has ancient bugs
 
!!> 1 + Number.EPSILON
 
@taco 1.0000000000000002
 
hmm, I can't find static sites which are not blogs :(
 
or jokes...
 
6:42 PM
You're moving goalposts
 
otc
Is it acceptable to post about TypeScript in here?
 
@otc Welcome to the JavaScript chat! Please review the room 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.
 
I think this one is static: vanilla-js.com
By which I assume you mean "served by a web server that just dumps you a file from the hard drive"
 
@JanDvorak multipage ones :x (sorry last move)
 
>:-(
 
6:45 PM
the github bug bounty program site is a close hit but I think it is dynamic. it could be static too, not sure
 
Why do you care, though?
 
wait, what is that?
@JanDvorak that's precisely the kind of thing I am looking for.
 
The website of a discontinued sci-fi magazine
 
ahh hell ofcourse. magazine sites!
 
Or rather a mirror thereof
I still want to know your motivations
 
6:48 PM
@JanDvorak I am writing a static site generator :S
don't judge
 
Wait, what?
 
@JanDvorak like jekyll
(and countless countless others)
 
The F$?
 
so.. you are writing a gulpfile.js? :)
 
I SAID NO JUDGING
 
6:51 PM
Oh, right. Sorry.
 
I'm not actually. I like that idea of static site generators
 
I am
was
 
and it's a GOOD thing, that you can build a basic one using off-the-shelf tools from npm and a gulpfile
or many other methods
 
How about static JS SPA + static partials?
 
6:52 PM
yup, like react-dom/server
or just jade/pig/whatever it's called now
 
Just write regular HTML and enhance it with JS and use SPAs only when needed?
 
regular HTML is an abomination
 
I meant SPA for layouting/templating
 
and I want to do something useless on sunday
 
copy/pasting the menu would be pain
 
6:53 PM
so, most template languages.
 
do most template languages compile to HTML ahead of time?
 
@Luggage PHP :P
 
Regular webpage + curl?
 
ahead of time or any other time you call their function
 
bitch-slaps Awal
 
6:56 PM
I have actually made a fair amount of static sites this way:
- use PHP as a templating language
- start a dev server to serve it
- use wget to mirror statically
- turn off server and rsync wget's mirror to live server
 
valid but disgusting
 
would be less disgusting if you used an actual templating language
 
last time i did a static site i used react at build-time only
 
But yes, valid
 
yeah it was disgusting indeed. I eventually wrote a small script to automate that as well and even do things that wget can't. It always ended up saving me some time (still sometimes do) but its a funny disgusting hack none the less.
 
6:59 PM
It wouldn't be disgusting if you didn't use PHP
 
Name one language/platform with which this is as easy/easier to do (except maybe perl). PHP + fastcgi's best feature is request uri to filesystem script direct transparent mapping.
 
html with inline jquery -> phantomjs -> static files. :)
 
so you add scripts as you go and see them work during that time
But I agree that PHP is not the best language. This is why I am building JSHP!
 
return <cough>{jsx}</cough>;
 
Eventually I'd make python-hp, rust-hp, haskell-hp and what not. conquer all the realms of the world.
 
7:03 PM
slaps Awal, then slaps him three more times
 
:D
 
7:22 PM
Why is there a Map.prototype.forEach
and not Map.prototype.map?
 
wubba lub dub dub, nubs
 
Bang Whamm whoop whoop whaaam whaaam
 
slaps Taco
 
How do I map a Map?
 
Two rums to room two two two!
 
7:27 PM
@taco Gubba nub nub doo rah kah
 
slaps his other hand several times in rhythm
 
Map.prototype.map = function(fn, thisArg) {
  let n = new Map();
  for (let [key, val] of this.entries()) {
    n.set(key, fn.call(thisArg, val, key, this));
  }
  return n;
};
 
@Luggage Hoping I work at Adult Swim eventually
 
@AwalGarg thats just :-/ ugh
anyway I can't access internet in chrome / firefox in fedora
 
Then remove your hat. Perhaps it blocks your FSO signal.
 
7:32 PM
?
 
fedora is a hat in non-leet world
 
Saw Bernie doing soundcheck with the guys next to me today^
 
how do you use the monitor behind the other one?
 
I'm not in Quality Control, so no idea
 
7:38 PM
why delete it?
 
I think he just flips out the one in front when he gets a call on the radio for a QC test
@AwalGarg Because I don't represent the company in any official capacity
I hear them doing QC checks all of the time but never cared until I heard it was Bernie doing a mic check
 
It only happens
on the laptop with https :S
or when opening non indian websites
windows works fine :S
 
I blame the french.
 
I blame the trench
 
I blame the ranch.
> Has there always been lightning in the game? That legitimately just scared me.
 
7:53 PM
twitch.tv/make live feed from Maker Faire. Currently discussing drones
 
8:12 PM
Teamviewer works
Skype WORKS
Civ5 works
but not the web browser this is annoying
the browser works only with facebook and Instagram
da hell is going on :S
 
@SterlingArcher you totally need to buy this thisiswhyimbroke.com/glitter-beard-kit
 
Hey, guys, I have a rails project, and in this rails project I use modal. Is it possible to send ruby Objects to the modal?
 
@tomSurge Welcome to the JavaScript chat! Please review the room 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.
 
and then use it there?
 
Javascript has no idea how to use Ruby objects
 
8:23 PM
for instance, var myObject = $(this).data('id');
Then, $(".modal-body #bookId").val(myObject.id)
 
@JanDvorak I wouldn't say that so fast.
 
@JanDvorak you're pregnant?
 
Will the example I wrote "work"?
How could I send a ruby object to modal and use it there? If it even is possible?
 
You can encode plain objects as JSON and send that to the client
 
> Augh! I have arms! What the fuck!? Why do I have arms!?
gotta love nerdcubed
 
8:25 PM
ah, I see Jan
 
@KendallFrey link?
 
8:39 PM
you enjoying it so far @KendallFrey
 
oh yeah
 
9:06 PM
evening geeks!
 
hola
@KendallFrey can you use HTC Vive apps with Oculus
This one looks cool tiltbrush.com
 
how do I specify root as up a directory in express?
I can't do res.sendFile('index.html',{ root: '../'});
basically I have my server and client in different subfolders
 
@taco idk, I don't need to
Oculus apparently updated their software to block their games from running on the Vive
 
I don't think I'm getting a VR anytime soon
 
9:22 PM
@KendallFrey there's an open source repo that lets you still use Oculus apps on the Vive. Saw it today
 
Betamax vs VHS anyone?
 
obviously VHS
 
Hindsight is 20/20
 
I had a friend the other day... he told me "this internet thing will never work, trust me"
 
Well, does it?
 
9:27 PM
Betamax was better
 
Next question: 1k IP frames, or 2k IP frames?
 
Uh....wat. 1k for better throughput if error correction is needed?
 
Error correction can be handled on the application level if needed at all. I'm more worried that 2k frames would take too long to transmit, meaning less fair distribution of bandwidth.
 
My network level experience is very limited to mostly ATM and TCP packet size, and net eng I level network troubleshooting, so I'm not really the best to give advice on that
Both are divisible by 64k which is the TCP packet size, so I'm guessing it would be fine on a TCP network
 
9:53 PM
How are you able to add <a href =...... </a> inside an li? Can only get the "href =#....."
 

« first day (2044 days earlier)      last day (2887 days later) »