« first day (3022 days earlier)      last day (1925 days later) » 
00:00 - 18:0018:00 - 00:00

12:16 AM
yeah people pop in asking about it occasionally
seems like the starting point for a lot of websocket learning
 
I thought socket.io used long-polling, not native WebSockets?
 
hmm I thought it used the best protocol available
> For this purpose, it relies on Engine.IO, which first establishes a long-polling connection, then tries to upgrade to better transports that are “tested” on the side, like WebSocket.
 
If it's using the same underlying WebSocket API, I'll probably have the same problem.
Here's the MVCE in the form of a question: stackoverflow.com/q/54337720/690573
 
12:43 AM
You guys are gonna kill me, but how can I do this?

// index.html
<script src="example.js"></script>
<div onclick="someObject.doSomething()"></div>

// example.js
var someObject = {
    doSomething: function() {
        alert('I am doing something');
    }
};
It says someObject is not defined.
the scope of var is never reaching the HTML dom, right
I thought it would
Actually, in my code script is bellow div on html
I don't know if it makes a difference for onclick
 
1:05 AM
@LucasBustamante works for me
and don't use inline
 
I must have done something wrong, but ended up listening on the js for the click event anyway and it worked
 
1:26 AM
you probably had it inside of a $(document).ready or somethign similar
 
 
2 hours later…
3:35 AM
Hi all, I'm having trouble using CSS positioning to make a certain webpage; If the viewport has certain dimensions, it looks as intended, but in the standard viewport, everything goes haywire
Here's my codepen: codepen.io/Refath/pen/MZoaML?editors=0100; If anyone can help, that would be great
 
you're goign to have to give a bit more detail @DarkRunner
 
The following is the design I want: ibb.co/r63Pph3; At certain dimensions, my code looks like: ibb.co/hdWx3yR; But in the standard browser viewport, it looks like: ibb.co/8d6PPQn
I can't post imgs here, so I put them in the links above
 
@DarkRunner what is this for?
 
3:51 AM
Side project I'm working on
Why?
 
because there are many ways of doing it, and which is best depends slightly on what you're trying to achieve
Like, you could just use an image that looks like that rather than trying to position them with css
if they need to be animated or something it might be better to put them in an SVG
if you just want it in html/css i'd probably use css grids
but depending on your audience that might not be available
 
ah OK
I'm gonna try CSS grids; Didn't think of that, thanks
 
 
2 hours later…
DON
6:09 AM
I have implemented text boxes inside textarea using javascript. Now i'am looking for a change event of the textbox which is inside the textarea to identify how many values are currently there in the textarea. Note : textboxes are generating dynamically.
 
6:27 AM
you can just count it?
I think that you meant change event on the textarea
since those "textboxes" are non-input elements (aside from clicking on that x to remove it)
 
DON
6:43 AM
Change event of the textarea is not working for this case.
 
7:09 AM
can you setup a fiddle of that?
only that textarea + scripts that made those boxes and some css if applicable
 
hello all
any react native devs here?
 
chuckles
o/
 
@geisterfurz007 haha yes im looking
 
7:24 AM
How to zoom and Scroll google Chart on Mobile device? I have tried below Url code, working fine on my Computer browser but not working on mobile browser, please help me..

https://stackoverflow.com/a/36596155/8203578
 
@FraRed Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
 
2 hours later…
9:12 AM
*pokes towc*
 
Hahaha
 
*pats some guy*
now you are worthy of your avatar!
 
And with that, I finally feel complete
Thank you
 
@towc You okay bud
 
9:27 AM
he's not giving a sign of life! 😲
who's gonna to do some mouth-on-mouth?
 
9:51 AM
no candidates? Well fortunately; there is a bicycle pump for this
 
hello
 
@Sami Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
need some help
 
go see a doctor
 
10:08 AM
@Sami on first sight, it seems that it got a useful answer already
 
@KarelG It has been updated since
 
Can you guys please help me, why is this question downvoted? I´d like to know whats wrong with my syntax and why I received downvote? It helps me improve future questions. stackoverflow.com/questions/54343411/jquery-loop-elements-issue
 
I am trying to get a response after a linkedin share window popup. But I cannot figure it out and cannot find it anywhere on the internet.
Anyone willing to help me? I made a post to make it a bit more clear: https://stackoverflow.com/questions/54290872/linkedin-popup-on-successful-share
 
10:26 AM
@SilverSurfer missing "from" code.
and the answer is a joke. You can change the jQuery's .outerHeight into its vanilla javascript variant as well
and a.css({'color': "green"}); (where a is jQuery object of a link) is just a.style.color = 'green'; (where a is the link itself)
 
Ok thank you
 
11:21 AM
should you not link to v2 one?
it is essentially checking if the response status is a 201
 
they don't do a plugin for the v2 one
Or they do, but I can't find the API
If you're using that SDK though from the page I linked, it's using V2
 
Hi guys
Is there any way to get .css file in .ts file
 
11:37 AM
yeah
 
how?
 
Are you just using TS on its own, or a build system such as webpack?
 
not a webpack
i have gulp
i googled and there are examples for webpack
 
You need a proper bundler, such as webpack for it to work
 
in Gulp we have task runner which build out files
isn't it possible wit gulp .. like we create tasks and they build files
i havnt used webpack but i think it somehow do the same job as gulp
 
11:41 AM
They serve different purposes
 
alright
 
For example you wouldn't necessarily use webpack on your server files
 
isn't there any way i can import .css in .ts file ... using gulp
 
no
Well probably, but no way that I know of.
 
ok
 
i have a method in.ts file, which contains this:
htmlfooter = "<div style='padding-top:25px' class='footer'> ..."
 
Why are you in-lining HTML inside your TS?
 
@BenFortune why plugin if there is a RESTful api watiing there?
 
@KarelG Why spend a month creating your own integration when one already exists
 
@BenFortune it seems like a workaround ..
 
11:50 AM
You have to read that as a LinkedIn's developer
 
but again i cant put entire css in style tag
 
Hi All
 
@Sadiq It is a workaround, use webpack
 
hi pikachu. I am sorry. Ash is not here.
 
@KarelG what
 
11:53 AM
@KarelG damn, know where i can find him
@KarelG actually looking for misty
 
why should they work on a plugin if people can just use their API server?
those plugins are kinda "additional" services.
@PikaChU she is somewhere in Reddit 😉
 
@KarelG haha.
@KarelG hey man i ask you something in private chat?
 
@KarelG because they serve different purposes
the plugin handles all the tracking
Like every other share button, google, facebook, twitter
@PikaChU nothing here is private
Also you're going the wrong way about recruiting someone to build an app for you.
 
reactnative devs here ?
@BenFortune what is the right way? educate me
 
Post on a job board.
 
12:05 PM
@BenFortune takes too long & lots of chancers
 
As opposed to asking random people in a chat room
 
@BenFortune it works
 
12:29 PM
@BenFortune This is the old api
 
@Tygo No it's not
If you're using the platform.linkedin.com/in.js widget then it's V2
Or it was when I last checked it
You can force it however
<script type="text/javascript" src="//platform.linkedin.com/in.js">
  api_key: YOUR_API_KEY_HERE
  authorize: true
  onLoad: onLinkedInLoad
  v2: true
</script>
 
Is that valid JS or HTML?
 
@geisterfurz007 yes
 
Are those request params then? Or how does that work?
 
12:50 PM
@BenFortune I still don't know how to check if a user actually shared something with this. Not quite sure if it's even possible
 
@Tygo You'd check the success callback in that article
 
I found this randomly on the internet
can anyone, anywhere, tell me what the actual fuck
 
@BartekBanachewicz water is cool, except for the scenario where it's warm
 
well, it's the internet...
 
I mean what would prompt anyone to make this image
and post it
 
12:54 PM
what is considered contributing to open source? I put my shitty code on Github public repo. Does that count?
 
for some reason photobucket showed me that after the stuff I wanted to see
@JBis yes if anyone except you uses it in any way
 
@BartekBanachewicz I assume you do not browse Facebook then :D
 
not really no
 
people, in general, seem to get off at any kind of inspirational / "deep" / fact-ful / whatever images, and don't worry I don't get it either
 
The ocean holding more mysteries than outer space is hard to believe. I understand what is trying to be said (our ocean is full of stuff we don't know about)... but what about oceans on other planets? Isn't there infinitely more questions about space given its almost infinite size?
 
12:57 PM
> Description
I was experimenting with the typing tool on Photoshop and thought I
and you thought you what
why does the description end there
what did you want to say, mystery internet water man
or woman
 
S/He was attacked by a sea monster and didn't get to finish
 
I think I like the swimming fact the most
 
@TravisWhite science in general is cool and full of undiscovered phenomena, but I rather consider this a fact and not something I go around hyping about. I don't walk up to random people on the streets and tell them: "Yo, do you realize HOW COOL the ocean ACTUALLY IS?" why? cause it's weird.
@BartekBanachewicz DID YOU KNOW THAT YOU CAN SWIM IN WATER
how cool is that
 
you are missing a disclaimer: provided that you can swim
 
@BartekBanachewicz fair enough
 
1:14 PM
@BenFortune triggered
 
heh, I was just pranked with this
pretty fun
 
@KamilSolecki did you know you can DROWN in water as well?
 
@KamilSolecki Yeah, I agree with you. I think it was created by somebody learning photoshop and wanted to try something artistic. The text is filler. S/he needs to do an ode to fire for contrast
 
@BartekBanachewicz look at the source. ASCII art
<!--

   ///// COPY CAT AWARDS 2017 \\\\\

   These people literally copy pasted this site and are claiming they made it:

   #1. www.fakewindowsupdate.com by diskordier
   #2  www.fakeupdate.co.uk by HARVEY BOLTON who is an Absolute Legend apparently (totally legit)



		   _    _____         _
		   \`,""   ,'7"r-..__/ \
		  ,'\ `, ,',','    _/   \
		 /   \  7 / /     (   \ |
		J     \/ j  L______\  / |
		L   __JF"""/""\"\_,    /
		L,-"| O|  f O |  L_  _/
		F   \_ /  \__/   `-  j|
			.-'    `"""    ,' |          _..====.._
 
1:24 PM
@JBis heh
 
I picked up a creality ender 3 over holidays. Have printed bunch of random stuff. Love it. Need more time to learn 3d modeling/can finally turn some ideas into plastic
 
where can I find information about steel rod stiffness?
 
@JBis that needs some better allignment
 
@KarelG you need some better alignment
 
@BartekBanachewicz if it is labeled, check its specs. Otherwise figure out the material and ect
@towc llet me use the doublle ll, towc. The LL key is just sensitive today!
 
1:28 PM
@BenFortune So I used the Javascript SDK with literally the code that is provided on the page. onLinkedInLoad > shareContent > onsuccess gives callback. But this doesn't seem to do anything. Why? I don't know there are no errors. Just doesn't seem to be triggered at all.
 
@KarelG eh, I wanted to order this from AliExpress
frankly I'm more interesting in ballpark
as in, is 8mm strong enough
 
you can go thicker to be safe: go for 2cm :P
it depends of the length too.
 
@BenFortune developer.linkedin.com/docs/getting-started-js-sdk It doesn't seem to be supported at all :(
 
1:43 PM
node still doesn't officially support import/export right?
 
yes it does
 
without flags?
 
don't know about that
let me see
still under flags in v11.7
 
just tried in 11.7.0, I'm trying it occasionally
SyntaxError: Unexpected identifier
 
@KarelG for a steering wheel shaft
for gaming wheel
suspended between two bearings
 
1:56 PM
What wheel do you have?
 
@TravisWhite I'm thinking about building one
I have a few
 
Ahh sweet, I wouldn't know where to start. Picked a logitech up with shifter, the wheel is great but the mount I bought is crap. I added supports to sturdy it up but really disappointed with it, need something sturdy and easily adjustable
Favorite wheel you own and are you building it as a hobby/learning experience or trying to make a better wheel?
 
@TravisWhite it's not that hard, it would seem. There's some open-source code running on STM32F4 discovery board (which I already own), and you just need a motor, an encoder and a few other bits
@TravisWhite well, a bit of both
I haven't decided yet
the parts list totals at $85 now
 
"Homemade Pc Steering Wheel" "31 Steps"
 
@TravisWhite kinda
 
2:04 PM
fucking hell
 
the most expensive bits are the optical encoder, the power supply and the engine
 
If you build it, I would like to see the finished product. Very interesting, I'd like to tinker around with some motors. As a kid I'd take apart remote control cars and combine the motors with my dad's cordless drill battery. I tried to make a duo-copter out of two motors spinning in opposite directions. Props made out of balsa wood... it had a lot of problems but I've always been fascinated with hardware/robotics... I think you've inspired my next project
 
@TravisWhite well I mean a lot of people have already done that
that's really the only reason I'm thinking about it
they solved a lot of problems already
 
Right, still doesn't take away from your craftsmanship
 
Huh, that's backwards from how I do things
If it's already been done, I'm not interested.
 
2:39 PM
Anyone here who knows particles.js? https://vincentgarreau.com/particles.js/
The performance is absolutely terrible. I'd like to re-implement a basic version of that. Maybe using WebGL and WebWorkers. What should I do get acceptable performance? Are there any tricks or caveats?
 
the trick is to write it
and then optimize in a myriad ways
 
@BartekBanachewicz I love the custom clutch and pedals
 
@KamilSolecki Yeah, but I think if I get the fundamentals wrong I'll end up having to rewrite everything. I currently don't even know if I should utilize multiple threads and if so how many. I mean I could do one thread per particle, but would that be a good idea?
 
posted on January 24, 2019 by CommitStrip

 
anyone heard of tensorflow.js ?
 
2:52 PM
@Forivin well, do you happen to have a million-threaded CPU?
using more threads than your CPU has will in most cases be a slowdown
are you sure you want to tackle something performance-wise? @Forivin
 
@KamilSolecki Well, your CPU is probably running a few hundred if not thousand threads. It doesn't really appear to be such a big issue. In the end I'm not planning to have a million particles, but maybe around 60. Of course I want to tackle this performance-wise.
 
@KendallFrey it makes way more sense if you want to actually get something to work
 
@Forivin Most of them are long-running, low-usage threads. Creating a thread for a single operation will create an absurd amount of overhead.
@BartekBanachewicz In that case, I just use the power of consumerism
 
@KamilSolecki But still, there are fundamental issues. I don't know how WebGL works. Maybe WebGL just talks with the GPU directly and doesn't really use the CPU. And I don't know how that works. Maybe I can write the code to use a certain amount of shaders or cuda cores. A GPU sure has a lot of those.
 
@KendallFrey building it yourself costs way less than buying a comparable thing
 
3:06 PM
Unless you value your time
 
@KendallFrey even if.
also building is still fun
even if someone has done that before
in fact, in science there's a lot of pressure on repeating existing experiments
 
Fun and utility rarely mix for me.
 
If I need something, I buy it. If I want to build something, I build it.
 
Well, it is a fun-project for me, in case that matters.
 
3:08 PM
i find fun in all projects pretty much
 
@KendallFrey I bet you want to build a time machine
 
@Forivin If you wanna tackle this (surely not easy task), then you got some reading to do
 
I still think I'd be hard pressed to build a gaming wheel for $150 after parts and labour
 
@towc who doesnt?
 
wait for it
 
3:11 PM
The basic algorithm is really easy. Generate a few dots at random positions and move them in different random directions and if they get close darw a line between the dots. Doesn't sound hard to me at all. I basically just need to know how I need to render it in order to get good performance.
I mean particles.js manages to use like 30% of the CPU core it runs one, even if it's set to 1 particle.
 
\® Hello over here
 
@RaymondArteaga Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
Maybe there are tricks like only rendering the things that actually changes since the last frame or maybe there is some caching functionality that I could make use of. I think that's the kind of stuff I'm looking for.
 
I just can't believe that Angular really is something people work with voluntarily
 
please go on
 
3:19 PM
I'm just looking at it... and yes I worked with it myself... but anytime I see it now and I know all the pure vanilla JS API's and far more convenient frameworks
 
which frameworks are you thinking of?
 
I have to puke
my own most likely, but then, I'd chose React any day over Angular if someone puts me a gun on the chest (even if I don't like it either)
 
but you know that react is just a view library
so is that react+mobx or something?
 
I don't really care about what people call it, ultimately you always want to achieve the same, building a web app or website
just with different approaches
 
so you'd use plain react with some other state management of your own?
 
3:28 PM
I'd use pure api's as far as even possible, as for management of routes, modules, components or any structural definition, I for myself choose to use also self developed things
just for the reason that there will always be a next React, a next Angular, jQuery, etc.
 
nextjs
 
4:21 PM
nextjs is crap
stay away from it unless you are facebook
@jAndy The only reason for that IMHO is that the Web doesn't have an Apple or MSFT
 
i rolled my own treeview component in react. each node on the tree is made up of multiple components (one to expand/collapse the node if there are children, another to render the checkbox to select an item, yet another to display the label of the tree item, etc.). the performance was fine using a test dataset which included up to 2,000 nodes. the dataset has since changed and there are 17,000 nodes and performance is really bad.
is it unreasonable to expect react to manage the number of components 17,000 items will result in in a performant way or have i exceeded the upper limit?
 
damn, my package is delayed due to weather
 
user1596138
Thats what she said
 
user1596138
@im1dermike I do this. But I don't render anything unnecessary
 
user1596138
I just made a recursive component that holds it's own "expanded" state. If it is selected or if any child of it is selected I render the whole tree.
 
4:33 PM
i'm getting my new cpu, ram, and board today, but the new cooler is delayed
 
user1596138
I have to count the selected ones beneath any given branch tho.. So at some point I do have to render everything. IF the user actually selected everything I have perf issues. Otherwise not an issue
 
user1596138
@KevinB Ah you went intel?
 
?
but yes intel, not sure how that's related
 
user1596138
@im1dermike I'd bet your performance issues are only when initially rendering out thousands of components. React can manage them once they've been rendered for sure. If that's not where the issue is you have room to optimize.
 
user1596138
@KevinB Ryzen comes with coolers
 
4:35 PM
intel chips do too
 
user1596138
SO whats big deal
 
user1596138
Run hot for the day ;P
 
i'd rather have a better cooler
i could just re-use my existing cooler if i was really in that much of a hurry
really just want to have it together before tuesday
 
user1596138
What'd you build?
 
user1596138
Or just CPU/Ram/Mobo
 
4:45 PM
just those 3
I only wanted to upgrade the Mobo, but... that would have put me with a board that doesn't support more recent CPU's, so i'd be upgrading it again soon if i went that route
 
user1596138
Ahh. You don't game or anything either right?
 
i do
 
user1596138
WHat you playing recently?
 
well, a new raid tier just came out in wow, so that's my focus atm, but i play that, poe, diablo3, fallout/skyrim, dishonored, prey, etc
 
user1596138
THats all old stuff
 
user1596138
4:48 PM
Nice
 
i was having serious input lag problems, ruled out everything but the USB hub
hence the mobo upgrade
 
user1596138
Weird
 
it's pretty old at this point, was due an upgrade
 
user1596138
I have one of those "fatal1ty" ports or whatever haha
 
user1596138
I guess some people get really specific about their input lag.... I use a steam controller still tho so meh
 
4:50 PM
well, this input lag was something that noone would be able to ignore
 
user1596138
It just started out of no where?
 
the mouse literally bounces across the screen, with 1-2 second delays between moves
affects keyboard too
it started out small, then got worse
more frequent
 
user1596138
That's nutty
 
user1596138
ANd it's not the 10 year old monitor?
 
at first i only noticed it affecting my mouse, so i thought it was due to it being wireless and some kind of interference, logitech is apparently known to have that problem
but then i realized it was affecting the wired keyboard too
dunno, could a monitor cause that kind of problem?
only the input is lagged, everything else continues normally
 
user1596138
4:54 PM
If everything lags a certain amount yeah
 
user1596138
But nah if your audio matches up and such I'm sure it's not
 
user1596138
I had a monitor "go slow" on me once tho. Used to play on it all the time never had an issue.. Then one day even video/audio were unsynced. Couldn't ever figure it out ditched the monitor
 
5:08 PM
when it happens, i don't see any gpu/cpu spikes, fan rpm doesn't change, clock doesn't change, nothing. Mouse just starts skipping across the screen
other thing i found was that ports that were supposed to be USB3 were reporting as usb 2.0 ports
 
After playing around with a different websocket server, I'm pretty sure my question from yesterday is backend related. I'm going to try multiplexing a single websocket instead. Thanks for your help!
 
user1596138
Burn the whole board
 
Has javascript some notion of "view (slices)" of arrays?
 
user1596138
Psuedo code it?
 
user1596138
5:16 PM
No clue what that would be
 
no, but you can probably create logic that recreates it (whatever it is)
 
for (const x of array[2:to_ver_far_away]) {
    //no copy of array is made
}
a = [1,2,3,4,5];
b = a[1:2];
a[1]=100;
assert(b[0] === a[1] === 100);
 
user1596138
When I said psuedo code... I meant relate it to JS.
 
user1596138
That's alien
 
wut?
 
5:18 PM
lol
 
user1596138
I don't do whatever that is
 
I'm not sure how I can make it clearer...
 
user1596138
a[1:2]
 
You can write pseudocode in any language you want as long as it's JS
 
user1596138
Yes ^
 
user1596138
5:19 PM
I figured english honestly
 
a[1:2] === slice of a, making a slice (view), a new array with elements 1 to and including 2.
 
basically, arrays contain values. You can create a "slice" of an array, but it won't have references to values in the source array
it will simply be a new array with copies of the original values
 
which is the only reasonable way
 
I mean honestly, the syntax start:end:step is quite clear right?
 
5:20 PM
You can fake it with objects and getters/setters
well, now that you put it that way, yes, but before i wasn't familiar with that syntax at all
 
user1596138
@paul23 Not if you've never encountered it. You're in the JS room and we don't have that :P
 
user1596138
I'm sure the other guys got it tho
 
honestly, I would've just typed above code in javascript at once I actually thought that was the slice notation XD.
 
user1596138
Haha. We have a functional slice
 
user1596138
And it returns a copy with the new values inside of it. If you want a reference.. Well you'll have to write that yourself
 
5:23 PM
And then run it, and then get grumbled that I have to google for "array slice mdn", and then get more annoyed I have fix code all over the place again.
 
user1596138
Doesn't sound terribly difficult
 
1
A: Is it possible to "overwrite a pointer" in JavaScript?

BergiNo, JavaScript does not have references or pointers as values. You always need some wrapper object (which you can mutate however you want, but not replace), it's not possible to create a custom primitive value.

relevant-ish?
 
Well it's just for a small utility function which is called lots of times in an object but is considered a "private" option. I might just go for giving start-end positions in the array.
 
there is no reference for values tho
 
Right
 
5:24 PM
whatever that should mean in that context
 
Since the function won't be external facing anyways.
 
which that answer kinda goes into
 
Or actually.... given that js jit compilers are highly optimized...
I guess I could depend on the compiler to not make a copy when the copy is never modified anyways.
 
user1596138
Or not. "If it doesn't hurt perf who cares"
 
user1596138
JS mindset lmao
 
user1596138
5:28 PM
Its not YOUR compute that has to run it haha
 
@paul23 Did you check out my link?
 
yeah, but I think creating the arraybuffer adds already more overhead that it solves.
 
Fair enough.
 
Basically the function is like:
updateNestedValue(nested_dict, path_to_value, new_value) {
    let subdata = nested_dict;
    let key;
    for (let i = path.length; i > 0; --i) {
        key = path[i];
        let d = subdata.get(key);
        if (d === undefined) {
            d = new Map();
            subdata.set(key, d);
            d = subdata.get(key);
        }
        subdata = d;
    }
    subdata.set(path[0], new_value);
}
//called as in:
updateData(path, new_value) {
    updateNestedValue(this.data, path.slice(1), new_value);
And I just wanted to optimize away making a copy of the path (as it's never edited anyways).
 
00:00 - 18:0018:00 - 00:00

« first day (3022 days earlier)      last day (1925 days later) »