« first day (2140 days earlier)      last day (2804 days later) » 

6:01 AM
oh man this is hard
 
That's what she said
 
hey @ivarni
 
sup?
 
havent seen you in SOCVfinder for a while
nothing much just working on VR
 
I drop by there when I have time to actually do something about the reports
 
6:07 AM
ohh i see
 
user4710450
Hi
 
@Ehsan 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.
 
user4710450
Is it possible to write Android Applications with JavaScript?
 
Kindof. You can use Cordoca or you can use React Native and I'm sure there are others around
 
@Ehsan Yes. Search PhoneGap or Cordova.
 
6:09 AM
In some cases you'll have an app running in a webview, in other cases (like React Native) it will be closer to actual native
 
user4710450
Thanks. Also I have heard about Meteor, is that good?
 
But I think those will be Hybrid
and not Native. Right?
 
user4710450
How does Cordova work?
 
@SagnikChakraborti Right.
 
user4710450
Is that simply a web view?
 
6:10 AM
you get the worst of both worlds
 
React Native provide wrappers over native functionality
 
lol
 
Cordova is just a webview
with some APIs made available
 
@Sheepy So why write Hybrid? Instead try C# and Xamarin
 
user4710450
So why not write in Native Java with a webview and web contents in a .html file and open it in java and put the contents in the webview?
 
6:12 AM
java is as native as cordova
 
@Ehsan are you talking about writing only Android apps? or Others as well?
 
@SagnikChakraborti Given that Ehsan asked for JavaScript instead of Java or Swift, I assume he/she is already proficient in JavaScript and doesn't want to learn one of the more native languages.
 
Personally I hate Java, so that's reason enough for me. I also manage to share all my business logic with a web version of my app when using RR
 
user4710450
Only android, I don't care for IOS
 
user4710450
Java is native for Google Android
 
6:12 AM
@Sheepy Ohhk. Didn't check that out
 
user4710450
The way C is native for i686
 
@Ehsan Right
 
user4710450
Also another question,
 
user4710450
Is it possible to convert HTML contents to an image
 
6:14 AM
@Ehsan Actually, C is as native for x86 as for ARM. Android Java also runs on VM, and you can bypass Java when writing for Android. Most rooting app, for example.
 
user4710450
I have written a Rails website in which I need to convert the HTML inside a div tag to an image for user
 
Sure. Press the printscreen button, open your favorite image editor and hit Ctrl+V
 
accordion and angularjs :S
 
user4710450
Hey man
 
user4710450
I witing an api. lol
 
6:15 AM
lol
 
user4710450
Just don't want to tell user to take screen shots. :)
 
@Ehsan Open it in Firefox. Press F12. Click the gear icon in the debug panel's top right corner. One of the options buttons you can enabled is "Take a fullpage screenshot".
There are quicker way but this is stable and easy to remember. May be Chrome have this function too; I don't know.
 
user4710450
i think I wrote my question not the way intended to
 
I don't think s/he is talking about taking screenshots. :p
 
@Ehsan That's very common on stackoverflow, sadly.
 
user4710450
6:16 AM
I am writing an api where I should get an HTML and give a .jpg to user to download
 
user4710450
no screenshoting
 
converting
 
user4710450
somehow
 
user4710450
@SagnikChakraborti he
 
6:17 AM
It's certainly possible
just render it yourself
 
user4710450
Is it possible to do with JavaScript or should I use Ruby to handle it
 
user4710450
?
 
you need to use atleast a backend language for that I think
not sure
 
@Ehsan There are javascript libraries that claims they can do it, but they don't work well. You need a big browser engine to render html correctly, main problem is how you get a screen shot from that engine.
 
Guys! Does anybody have a idea how this is done in react?
http://stackoverflow.com/questions/39137647/build-a-dynamic-table-using-array-data-generated-from-php-in-jsx-react
 
user4710450
6:19 AM
@SagnikChakraborti Thanks so Ruby should get involved ...
 
yup. think so
 
@Ehsan I am thinking more in line of JavaFX WebView or Sikuli. Not familiar with Ruby.
 
user4710450
No its handled well with Ruby by github.com/csquared/IMGKit
 
It uses WebKit which is good. Good luck with it.
 
user4710450
Thanks, I have a question it says it uses a QT-based application. Does QT have Ruby bindings?
 
6:23 AM
probably
 
user4710450
Heard it has Python bindings but quite astounding it has Ruby bindings
 
user4710450
A question which may not be related to JS,
 
user4710450
What is the best city to live in as a programmer?
 
@Ehsan karachi
 
user4710450
Is Cambridge in Massachusetts a good choice to live in, as my family are currently planning to go there :|
 
user4710450
6:28 AM
@Mathematics I can't come to India currently.
 
@Ehsan why your family wants to go there ?
@Ehsan it's not india
 
user4710450
@Mathematics As I am admitted to MIT, the best event in my life,
 
user4710450
@Mathematics Pakistan, sorry
 
user4710450
@Mathematics I am Iranian in fact
 
@Ehsan Nice, congrats :)
 
user4710450
6:29 AM
Thank you very much :)
 
@Ehsan Master in IT ?
 
user4710450
@Mathematics No, undergraduate
 
user4710450
in physics if they allow me
 
what is physics ?
 
user4710450
This en.wikipedia.org/wiki/Physics could possibly adress your question
 
6:34 AM
You should counter question what is Mathematics :)
 
user4710450
Lol .... :)
 
user4710450
They are both awesome, if they didn't exist today we couldn't have computers
 
user4710450
Quantum Mechanics is pushing our frontiers of knowledge and making teleports somehow possible
 
user4710450
This article is quite amazing...
 
6:39 AM
Which is not necessary a good thing. Quantum tunneling is one of the roadblocks in getting faster computer. Having electrons teleporting around in the CPU is bad.
 
user4710450
@Sheepy Also they are making them faster
 
@Ehsan In theory, in certain very very narrow applications, and a hell lots more expensive.
I personally find metamaterials very fascinating, though.
 
user4710450
@Sheepy Yeah they are magnificent :)
 
user4710450
Do other stack exchange communities chat-rooms like stackoverflow?
 
user4710450
6:44 AM
I am really interested to join Physics chat-room .
 
@Ehsan Yes. They do.
And google can answer you faster than we can :)
 
Are you saying we're not smart enough for ya? :p
 
user4710450
9
Q: Did you know there is a chat room for physics?

mbqSorry for such pseudoquestion, but check it out: http://chat.stackexchange.com/rooms/71/physics

 
user4710450
Well thats what I got in Google .. :|
 
@ivarni We are trained to better answer certain questions that google can't. ;)
 
user4710450
6:49 AM
Sorry it existed but the name was quite confusing ( The h bar ) => Plank's reduced constant :)
 
Ah. You come at a rare time when our title is normal.
 
user4710450
@Sheepy lol
 
user4710450
What other titles do you use for this room?
 
room topic changed to JavaScript: Boats, Boats, Boats!: Topic: JavaScript, ECMAScript. Read this: javascriptroom.github.io/rules. Before asking inform yourself on the XY problem goo.gl/taIqf | devdocs.io Documentation™ Helps. Room meta discussions: github.com/JavaScriptRoom/culture [ecmascript] [ecmascript-next] [javascript] [node.js]
 
I'm on a boat!
 
7:07 AM
I KNOW
 
7:19 AM
Hi everyone...

Can someone help me with this? I do not really know what newbie error on JS I am having...

http://stackoverflow.com/questions/39137820/printing-a-html-table-with-js-on-window-load
 
@MarnyA.López 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.
 
@MarnyA.López Remove the useless PHP code, reduce your problem to the actual printing, analyze
 
@OliverSalzburg
 
If you have to write "please ignore part of the code in my question", then you should have prepared a better question where nothing needs to be ignored
 
I know that on my post the php code seems useless, but I am using my real php code to bring info from my database and I did not wanted to fill my post with "trashy code" that is not needed to solve this...
I do not really know what part of my JS is not working ok, any guess on focusing on the JS?
 
7:29 AM
@MarnyA.López And you shouldn't. You should prepare a sample where all the needed data is included, without having to use PHP. Nobody cares about that and it's not relevant to your problem
Unless it is actually relevant to your problem, but then it's not a JS-related problem
But you won't know that unless you separate your code and isolate the issue
 
On this case it is, because I am passing the CSS from the PHP part of the code.
 
I'm not gonna repeat myself :P Good luck with your issue
 
@MarnyA.López Does the window pop?
 
@Sheepy, yes it does.
 
@MarnyA.López If it pops but is empty, there may be one or more single quotes in $content that needs to be escaped to \'. Line breaks, if any, need to be escaped to \n too.
@MarnyA.López i.e. Make it . addslashes( $content ) .
 
7:39 AM
great @Sheepy
i was missing 1 \ on the $content variable :s
Thank you for the assistance!
 
My pleasure :)
 
7:50 AM
0
Q: Mobile iOS Safari Test URL Scheme JS

Matt CowleyRight, so I've done a load of googling, all the answers I can find actually open the URL scheme. What I wish to do is test if a URL scheme (Cydia://) exists on the device, and then report back to a variable. I do not want to actually open the URL. Thanks.

Why has the room name changed?
 
Because boats are awesome?
2
 
@FlorianMargaine @Zirak have you guys tried Void Linux? Been running in VMs for a while and considering switching to it as primary. It is like Arch in terms of package management but uses runit instead of systemd and is slightly lighter and faster.
 
8:10 AM
@AwalGarg runit isn't even close to systemd when it comes to being an init system.
there's a small fact about runit
when you run sv up, it starts the service, and restarts it every time it fails
 
@FlorianMargaine what's missing? Is there some comparison article/table or something?
 
when you run sv start, it starts the service, and if the service is down 7 seconds later, runit tells you it failed to start it
why 7 seconds?
@AwalGarg it's just not even close. Runit doesn't even manage dependencies. It's just a stupid script waiting for another service to be up, whatever that means (and you have to do it manually). It doesn't do socket activation. It doesn't do mount activation. It doesn't do grouping of services. It doesn't do... so much stuff that systemd does we take for granted.
runit is great for small VMs where you need a couple of well-defined services, e.g. you have a PHP VM and you need nginx + fpm, only, on this VM.
a desktop? I'm not going to try...
 
@FlorianMargaine fair points - but it seems all of this is documented clearly enough on the main page itself and the timer is overridable - so I guess it is more "DIY" style of a thing?
 
@AwalGarg yeah, more of a "DIY" style of thing is a good description
 
@FlorianMargaine and how did upstart manage all this? (I mean, it mostly didn't ofcourse, but ubuntu 14.04lts ran on upstart and it worked fine on desktops)
 
8:20 AM
it's very simple, and that's great
@AwalGarg I don't know upstart, sorry
 
@AwalGarg I use void
 
Git guys, I have the following situation:
I have a branch I've accidentally forked from master, instead of develop.
 
@FlorianMargaine what I mean is, runit is basically upstart but modern and clean code with structure and proper documentation instead of a collection of sh scripts. besides all this, upstart worked for an ubuntu lts release which is quite popular. so possibly all those things you described don't actually matter for most use cases?
 
The fork point of develop is about a hundred commits behind the tip of master.
 
@AwalGarg "runit is basically upstart" -- really?
 
8:23 AM
Is there a way to take the branch and move it (or copy it) onto a new branch from develop, without merging all of master into develop as well?
 
@MadaraUchiha isn't that kinda backwards?
 
@FlorianMargaine from the point of view of the downsides you described for runit - yes. upstart has all those too.
 
@FlorianMargaine A bit, I also changed the names a bit so that they make a little more sense.
 
@AwalGarg then how it "worked" was a lot of bash tears.
 
@MadaraUchiha If commit history isn't important you can squash and then just cherry-pick the commit to develop
 
8:24 AM
@ivarni Hmm, that's one way to do it
 
You can obviously also cherry-pick all the commits if you're not lazy
 
@MadaraUchiha I'd git rebase -i HEAD~100 and delete all the commits not in develop
 
@MadaraUchiha fork develop and cherry pick from your original fork?
@FlorianMargaine fair enough
 
@FlorianMargaine I'd honestly rather copy paste the changes manually than doing that :D
But cherry picking might work
 
why? it's just r i C-u 50 k C-c C-c
 
8:28 AM
@FlorianMargaine oh, and how about openrc?
 
@AwalGarg never looked
 
I've starting taking a look at clojure @FlorianMargaine
I have to say, so far, I'm liking it a bit more than I like CL, I don't know what, maybe it's less extreme a thought shift
And better tooling (I can use sublime-text, atom or Intellij)
 
yeah, clojure is pretty nice
 
The looping mechanism there is kinda wonky though, with the forced recursion
Needs some getting used to
 
Quick question: where can I find a jquery datepicker object when I debug in chrome? Is it somewhere in the Global namespace?
 
8:46 AM
@Oleander no one ever ever suggested doing that. I said that a million times.
You'r proving something I never disagreed about and never suggested.
 
@BenjaminGruenbaum hey has it been suggested for bluebirds then to autowrap generator functions with coroutine? foo.then(function*(val) { yield .. })?
 
@AwalGarg Yes, but the consensus is that if you're using coroutines anyway you probably don't do much then chaining where this is required or helpful.
 
@BenjaminGruenbaum Hmm yeah. I very occasionally stumble upon cases where it could be helpful but I also wouldn't like to overload then for such rare cases. I did consider another method (.gen) or something but then we'd either leave .map, .tap etc. or end up duplicating all the methods.
 
But why would it even be helpful?
 
@BenjaminGruenbaum My last usecase was the following in a test: somePromiseWhichResolvesToAnObject.then(function*(o) { expect(o).to.deep.equal(yield anotherPromiseWhichResolvesToAnObject); }). Although I generally don't use coroutines unless really necessary and prefer then/tap/map chains instead.
 
8:59 AM
You can use chai as promised if you want that, but honestly you could use coroutines all the way.
 
And ofcourse when really needed one can do .then(co(function*() { ... })). So not an issue with me but was just curious if it has been suggested and what's the consensus.
 
so, I should never try to customize the looks of a computer again
accidentally removed the sound+wifi+battery status from my debian menubar
and can't seem to be able to put it back on
oh nvm, managed
was so unintuitive tho
 
Your reputation is 404
2
Now you need an answer upvote, a question upvote and to downvote something crappy and you can be a teapot
 
is there a reference I'm not getting? (about the teapot)
 
9:08 AM
@towc maybe the 418 status response?
 
> The RFC specifies this code should be returned by tea pots requested to brew coffee
Might actually become relevant with the whole internet-of-things fad
 
oh
nice
 
@ivarni lol
 
this rounding off of pixels in browsers
can we control that somehow
 
@GandalftheWhite You can use round pixels to begin with
 
9:16 AM
is that a specific term? Let me google
 
@OliverSalzburg lol
 
Or you are suggesting me to use whole numbers instead?
round pixels - makes no sense tbh
 
@GandalftheWhite I'm suggesting you shouldn't assume that people understand what you mean by "rounding off of pixels"
 
I want to have 1.5 px border bottom for an input box
but browser rounds decimal values
therefore it'll be either 1 or 2
is there anyway I can have 1.5px border bottom
 
@OliverSalzburg the square pixels is just so last-year. Now we use ellipsoid pixels
 
9:21 AM
I can use fractions of pixels in my CSS just fine
 
example?
 
@GandalftheWhite border-bottom: 1.5px;
 
not working for me
: l
 
@GandalftheWhite Not working, as in people are dying when you enter that text into your favorite text editor?
 
What are you smoking man?
 
9:23 AM
@GandalftheWhite Right now, or in general?
 
Right now
 
This is a non-smoking office, so I'm not smoking anything
 
Oh...
calma calma btw
 
The Q&A here seems to mostly relate to the process of getting the actual problem description out of people
 
@OliverSalzburg xkcd 1172 (editor bug fix kills children)
@OliverSalzburg Getting the actual problem is often the hardest part.
 
9:34 AM
@GandalftheWhite How do you propose a 1.5px border renders?
There is no such thing as "half" a pixel...
 
well...there is a big difference between 1px and 2px when we are working with things such as borders etc.
 
What happens if you transform scale a 2px border by 0.75 btw?
 
@GandalftheWhite That doesn't answer my question.
 
Perhaps we need a new unit then
There you go
 
4 mins ago, by Cerbrus
@GandalftheWhite How do you propose a 1.5px border renders?
On the screen, what should it look like?
 
9:40 AM
Actually all browsers supports subpixel anti-aliasing. But borders will be rounded off to nearest pixel - even on retina - so you need to use semi-transparent colour and/or box shadow to mimic subpixel border.
 
@Cerbrus 1 + half of pixel, that is what it should look like : )
 
...
What does half a pixel look like, then?
 
cut a pixel into half
like a kg is a unit but then people thought of making a new unit
grams
and then we could split that KG into half
 
Okay, let's try this:
 
9:46 AM
Show me. Make a screenshot of a 1.5 pixel line.
 
how will it benefit me
or how will that help me in getting what I want
: /
@Sheepy Thanks for heads up. Will try to replicate something like that.
 
I'm trying to tell you that "Half a pixel" makes absolutely no sense.
 
Now, if someone had mentioned a scale transform 20 minutes ago...
 
9:54 AM
@Cerbrus Depends on the monitor: alienryderflex.com/sub_pixel
@OliverSalzburg Unfortunately those scale transforms doesn't work right in Firefox. Haven't tried other browsers.
 
@Sheepy I also found articles specifically addressing the issue in Firefox. My point is that "someone" doesn't seem to have even done the most basic research
 
10:08 AM
Someone used wrong search query instead
:'(
 
10:18 AM
There are two issues here. First is whether "half a pixel" make sense. Each pixel is make up of three to four subpixels at hardware level, and I know ClearType really do subpixel anti-alias rendering. (Note that SMAA does not do hardward subpixel antialiasing, despite having "subpixel" in its name )
Second issue is whether browsers can do subpixel rendering. As far as I know, although they can apply transforms (including scaling), these transformed are processing at a pixel level, not at subpixel level.
 
10:30 AM
I'd like to note that it's only the render that is limited to pixel. Browser does have subpixel position/dimensions. There is an old and outdated blog that describes the problem pretty well.
 
Perfect cross-browser solution for 1.5px border: jsfiddle.net/rz2LceLd
Case closed
 
@OliverSalzburg The border size (and thus the element dimension) won't add up those two 0.5 because they are actually outline. But that's the only drawback I can think of.
 
I'm not sure the web is the right place to care about sub-pixel border precision in the first place. What do you want to do next? Have your text look the same in all browsers?
 
Tough luck. Chrome will cut corner for small text. And that's after you have bypassed its hardcoded and vary-by-chrome-language font size limitation.
 
10:46 AM
@OliverSalzburg or colors in all monitors?
 
@BenjaminGruenbaum 5/5
Good luck.
 
Hello o/
 
Whats wrong with chrome ,when I change opacity of color in dev tools my css rule becomes invalid
 
@Paran0a You sure your opacity is between 0 and 1?
 
I have hex as default values
when i try to change opacity of color my rule becomes this
0px 2px 5px #00000054
 
10:59 AM
@Paran0a I don't think the CSS hex syntax support alpha?
67
Q: CSS hexadecimal RGBA?

Li HaoyiI know you can write ... background-color: #ff0000; ... if you want something that is red. And you can write ... background-color: rgba(255, 0, 0, 0.5); ... if you want something red and translucent. Is there any terse way of writing partially transparent colors in hexadecimal? I want som...

 
I dont think it does either , but chrome changes the value by itself, usually if I had HEX value and changed its opacity it would transform it into rgba
 
Curious. Firefox's door is always open. :)
 
Was sworn FF user until it started crashing all the time , switched to chrome and never looked back :>
 
Only problem of chrome for me is the devtool -_-
I find FF's one a lot more user friendly
 
@GandalftheWhite use box shadow?
 
11:05 AM
@Paran0a My Firefox says it have had 28 sessions this month and 0 crashes.
 
Well I guess cancer doesn't exist since I never got it
 
@Sheepy where do you see that ?
 
@dievardump Menu > Help > Health Report
Or just go to about:healthreport
 
yep thanks. found it. 33 session, 1 crash... but it is because my laptop crashed (hardware problem)
So I will say 32 sessions 0 crash
 
off to 9 weeks holidays next week
 
11:10 AM
nice, what are you going to do?
 
that's a secret ;)
 
9 weeks?
Did you quit your job to get those?
 
will [...foo, ...bar] do the same as [...foo].concat([...bar]) ?
 
@Mathematics hehe, fair. Have fun!
 
@tereško Yes.
 
11:17 AM
cool, I can get rid of few concat() lines
 
in PHP, 5 mins ago, by Fabor
Will there ever be a class called "Pinkie" that extends a Promise class?
@BenjaminGruenbaum
Rename bluebird to Pinkie, do it for glory!
 
@MadaraUchiha Doesn't that already exist?
 
Dang.
It does.
!!nudge 24
 
@MadaraUchiha Nudge #1 registered.
 
11:35 AM
AngularJS, how to find previous route url in new controller
 
need to add event listener on route
and store it
use a service to store it
$rootScope.$on('$stateChangeStart', function (event, toState) {
 
Are there any scenarios where I must use catch in promise ? I mean , why not p.then(f1,f2) ? . I know that it is the same , but are there any scenarios where catch is mandatory or behaves different?
 
Oh sorry it's a ui-router event
 
@RoyiNamir At the end of a Promise chain
 
what do you mean , I can still do chain.then(x,y)
 
11:40 AM
@RoyiNamir where f2 would be the error handler ?
 
yes
 
Yeah, but it'll be chain.then(x,y).then(z,y), when you can do chain.then(x).then(z).catch(y)
 
Then it would be back to the "callback" architecture
Which create code mess.
 
@BenFortune oh... I see
 
@BenFortune can you not do .then(x).then(z,y)?
 
11:42 AM
@KendallFrey nice catch
 
i see what you did there <_<
 
@KendallFrey I don't know actually
 
@BenjaminGruenbaum , any thumb rule ?
 
Actually I think the problem is it wouldn't catch z's errors
 
@KendallFrey Yep
 
11:46 AM
@RoyiNamir because that is an anti pattern
 
@MadaraUchiha nudge
 
@rlemon i can't believe how much more speed he got. although getting back on was far too sketchy haha
 
@bitten The wobble made me clench
 
aerodynamics ftw
 
@BenFortune yeah, there was no nsfw tag so i -assumed- nothing would go wrong but still.. :l
 
11:52 AM
The person taking the picture too hahahaha
Just casually takes both hands off the handlebars and takes a picture
 
@rlemon ping
 
@FlorianMargaine MITM PONG!
2
 
@Luggage ouch.
 

« first day (2140 days earlier)      last day (2804 days later) »