« first day (3195 days earlier)      last day (1757 days later) » 
00:00 - 14:0014:00 - 22:00

2:00 PM
Yes
 
from what I understand, GDPR is just a placebo
you are not actually offered real protections. just enough to shut up
 
There are no protections at all, only what they force the company to create.
Which, 99% of the time are hacked together and thrown onto a site
 
2:44 PM
@BenFortune Its like 2 year old dude, give it time.
 
Has anyone ever played with ArrayBuffers and DataViews? I've figured out how you can essentially program like C++ using TypeScript + ArrayBuffer + DataView. You allocate your heap into an ArrayBuffer, then you extend the DataView class to create type-safe and right-sized data containers.
I was originally trying to create WebGL compatible data containers, but the applications of this are far more interesting than just webgl
 
It's a regulation designed to push companies away from hogging you and tracking you without your consent by people who barely understand it works. You own your data, that is basically the entire point of it. It acts more as a deterrent and empowers the user.
@ndugger That does sound pretty damn cool, I played with something long long time ago but we didn't even have ArrayBuffer back then (Binary Decoding in old style buffers so forget any safety -- I ended up with a lot of bit math etc)
 
hey guys whats the easiest way to write a regex that replaces a substring between two given characters?
for example I have something like 60806040523480156100105760 0080fd5b5032600090815260208190526040902061275b61006c600480360360208110156100d457600080fd5b50356001600160a01b0316610204565b600073__$adf451eb015a3a786d75bd206b3a06f9e7$__6396e4ee3d61010984610204565b60026
and I want to replace everything between $ and $ with 00000
and also remove $__ and __$
 
!!> "60806040523480156100105760 0080fd5b5032600090815260208190526040902061275b61006c600480360360208110156100d457600080fd5b50356001600160a01b0316610204565b600073__$adf451eb015a3a786d75bd206b3a06f9e7$__6396e4ee3d61010984610204565b60026".replace(/__\$(.+)\$__/, (m,p) => Array(p.length).fill(0).join('') )
 
@rlemon "60806040523480156100105760 0080fd5b5032600090815260208190526040902061275b61006c600480360360208110156100d457600080fd5b50356001600160a01b0316610204565b60007300000000000000000000000000000000006396e4ee3d61010984610204565b60026"
 
3:08 PM
that looks good @rlemon thanks
 
@rlemon '0'.repeat(p.length)?
 
@MadaraUchiha probably better
I never remember repeat
 
repeat? TIL
 
the new api methods sometimes elude me
 
@ShrekOverflow const red = new Lib.Array<Lib.Byte<false>, 3> = new Lib.Array(new Lib.Byte(255, false), new Lib.Byte(0, false), new Lib.Byte(0, false))
(false for unsigned)
 
3:14 PM
@ndugger Aye, it's relatively new
!!> '0'.repeat(5)
 
@MadaraUchiha "00000"
 
so the Lib.Array would reserve a chunk of memory that is 3 bytes in size
and each byte is unsigned
so 0-255
 
!!> "".padEnd(5,"0")
 
@rlemon "00000"
 
3:15 PM
superior method
 
!!> Array(5).fill(0).toString()
 
@ShrekOverflow "0,0,0,0,0"
 
need the join. array's naturally join with a comma
 
😐 ok lol
!!> Array(5).fill(0).join('')
 
@ShrekOverflow "00000"
 
3:15 PM
!!> [1,2,3,4,5] + [,6,7,8,9,10]
 
@rlemon "1,2,3,4,5,6,7,8,9,10"
 
Now perf them, am betting fill will be the slowest!
 
marvellous
 
let red: Array<Byte<false>, 3>;

red = new Array(
    new Byte(255, false),
    new Byte(0, false),
    new Byte(0, false)
);
there, more readable
Although having the classes is nice, trying to control memory so granularly, it doesn't make sense to continue to slam the JS mem pool full of objects that essentially just act as references to my custom heap. I might have to rethink the API
This is really cool with a SharedArrayBuffer, though, where you can share the "heap" between workers
So now you can shoot yourself in the foot, like multithreaded programming in C++
 
@ndugger Syntax error tho
 
3:23 PM
ohhi
 
because it's typescript? not a syntax error, bro
 
Why not const?
also, that throws a typescript syntax error for me
 
not const because of the example, stop nitpicking
also that Array would be a custom class, that's probably why you're seeing an error
 
ew
 
ew in what way?
 
3:28 PM
a custom class named Array?
 
you're writing a framework right?
 
you're nitpicking details that don't even matter; it could be named KevinBSpecialArray
 
but it's named Array
 
14 mins ago, by ndugger
@ShrekOverflow const red = new Lib.Array<Lib.Byte<false>, 3> = new Lib.Array(new Lib.Byte(255, false), new Lib.Byte(0, false), new Lib.Byte(0, false))
 
ok, so your opinion doesn't matter
 
3:29 PM
import Array from 'lib/myArray';
sure.
stay withing the confines of the framework
naming is less important
 
4:09 PM
export * from './WebRequestRequestInterceptor';
wow such naming!
WebRequest is the API, RequestInterceptor is the role, I am shy of adding Based in there.
 
WebRequestInterceptor. Don't emulate java by adding crazy long names for things that don't need to be
Having RequestRequest in the name is just ugly
 
That is what I am trying to get rid of
will probably rename a whole bunch
 
how can we refresh the pagination of the table?
 
ctrl + r
 
@ndugger -.-
 
4:16 PM
ask bad questions, get bad answers
 
ok i get a print for you see
 
4:32 PM
I don't understand how you expect anyone to be able to answer your question without any technical details or code
 
4:42 PM
as I said before, I have a table, which has pagination, when I apply the filters the pagination stops working, I would like to know what I could do if someone has an idea I appreciate
 
> I don't understand how you expect anyone to be able to answer your question without any technical details or code
You've given us no information that would help to debug your problem. What libraries are you using? How do you manage state? Do you have any code snippets that demonstrate your problem?
We can't read your mind
It's like asking, "I have an imaginary fruit; how does it taste?"
I don't fucking know, you tell me
 
When you apply a filter, go to page 1.
If you are doing your pagination server-side, your filtering needs to be server-side too.
if you are doing pagination client-side, your filtering needs to be client-side too.
 
4:58 PM
<ReactTable ..bunchofprops.. />
done and done
programming in 2019 is so easy
 
Some of these question askers seem to think it is
As if we can magically pull a solution from our bumholes without any kind of technical information
 
give them the 2015 solution
 
use jquery
 
$('table').datatables(options);
😉
 
The stupidest question I ever asked someone was to my best friend. I only knew JS at the time, and came to know that literal objects were {}, and literal arrays were []. I was convinced that literals were the only way to construct these objects, and so I asked my friend what java objects "looked like", because I didn't even know that I was referring to literals. He had no idea what I was talking about, lol
 
5:02 PM
hrm. twitter no longer oneboxes
 
it's a hoax
 
5:44 PM
ur a hoax
 
@shrekoveflow, you around again today?
 
6:27 PM
o/
0
Q: import jquery file in react

mango5kI have a page written in React. Now I want to insert a function at the end of the page that was written in Jquery. How is that possible? I would have thought that I could do this by import/export, but unfortunately it didn't work so far. Here is a section from my code of React and JQuery. How w...

 
wtf
 
I mean you can
There should be a top level file that mounts the react component, you could do it there
 
You can do anything you want, but there are consequences
 
I mean it's retarded, but you can
 
It's a footgun
 
6:39 PM
and if it's a legacy app that already has jquery
and you're implementing react piecemeal, I could see it
 
meh
just use jquery
react keeps changing shit anyway
 
I'm using svelte right now, it's pretty fun
 
i don't like it
 
you should use my library, it's better, because I made it
 
nugger-script
 
6:46 PM
my library is so good that it doesn't have any tests or documentation
and it doesn't work on safari for some reason that I haven't bothered looking into
 
TypeDugger
 
DypeTugger
 
cfml
 
I actually took the time to answer a question on main stackoverflow.com/questions/57062529/…
Because it was more interesting than "how do I jquery in my react"
 
7:49 PM
-1
Q: Is there a special method in React that updates DOM?

Amelie EngelmaierHello I am making a flashcard app in React and I am trying to switch in between cards, but they don't update until I switch the card over. I have tried setting the index currentCard to state instead of globally, but I had some problems implementing that. I also tried this.forceUpdate(), but that...

 
Well she's on the right track
 
8:12 PM
tests for what
 
@tiagolisalves 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.
 
what?
 
thanks for your answer Naga Sai A, but can you please adjust it according to my code and provide me a working solution. i am not so good in coding. i will be very grateful to you for this. thanks in advance :) — user11651048 3 mins ago
 
very pragmatic
 
8:17 PM
Still not have enough reputation to add comments, but someone can tell the last guy of this question that Object.watch is deprecated? stackoverflow.com/questions/57063824/…
Hahahahaha
nice
thanks forrest
 
anytime
 
8:58 PM
Object.defineProperty(Object.assign(window, { __foo: null }), 'foo', {
	set(newV) {
		this.__foo = newV;
		if( this.__foo !== bar ) {
			console.log( 'run here' );
		}
	},
	get() {
		return this.__foo;
	}
});
const bar = 123;
foo = 123; // no run
foo = 456; // run
because why not
cc @tiagolisalves
 
9:24 PM
yes
 
9:42 PM
I'm not so used to anwser in S.O. But I'm trying to help more people now.
Sometimes is difficult to find good questions to anwser too
Today I anwsered 2, that's a progress
:D
 
eh, just depends on your definition of "good"
if it just means "will answering this question give me rep", there's a TON of them
 
Good I mean where I can really help.
A question only needs one correct awnser.
If I can't contribute more.
 
00:00 - 14:0014:00 - 22:00

« first day (3195 days earlier)      last day (1757 days later) »