« first day (2311 days earlier)      last day (2862 days later) » 

00:19
stackoverflow.com/a/42182664/774078 lmao php answer on a js question
Hello. How do you call this regex => .* I'm googling for a programming problem and I think that regex wildcard is the wrong term for it.
I like how the best answer got downvoted
Instead they upvoted some do while cancer
* is called the greedy quantifier
Idk if there's an official name for . but I'd just call it a wildcard
Actually now that I'm researching this I think I've been confused about regex for my whole life so ignore me
00:36
Is there a max size for sending a file using a FormData object?
My form works fine and PHP page works fine but when I try to send a 10MB file my PHP form says undefined index for the file
I have..
		var file_data = $('#fileToImport').prop('files')[0];
		var form_data = new FormData();
		form_data.append('fileToImport', file_data);
Then send form_data via Ajax
... or you could actually use Fetch API
Is that towards me?
@Alesana Please check your server's configuration if uploads with that size are allowed or will be rejected
@miny1997 Ah I thought I had set it to 32mb but I forgot that I only did that on my production server! Thank you
That was it
@Alesana You're welcome
01:11
I have a really hard problem. I want to fetch a site with AJAX but I can't due to the CORS policy from the other server.
How can I bypass the policy or shutdown it with JS or PHP?
Have you tried get_file_contents() in PHP?
I'm talking about JS. I only use php for http headers.
let me explain the scenario. at my local serve at localhost is my webapp located, which wants to get a html site from example.com, but chrome refuses because the server from example.com says that this is not allowed due to the policy.
But you just asked how to bypass it with PHP
Ask them to change their cors settings or make a proxy server
They will never do this and handling it with a proxy violates against their TOS.
01:17
Then don't use their data if they don't want you using it?
Could you make a PHP file named file_retriever.php and then use the Ajax request to get contents from that, and then in file_retriever.php use curl?
They save the client's IP and I really need to let the server fetch the IP of my clients so the service works well.
Ah I see
Using curl you can use curl_setopt($curlh, CURLOPT_INTERFACE, "xxx.xxx.xxx.xxx");
And set the IP to the user's IP
However if you're really just trying to bypass CORS policy via ajax I don't think there is a way.
01:36
Thank you W3C and tech industry.
I found a solution
Client now need a extension to shut down CORS enforcement on the client
01:54
@miny1997 You can use PHP to access the other server. CORS only exists on client side to prevent stealing of important information. For example, if you have logged in to Google, and I send an ajax request to Gmail, it'll be sent with your cookies and login. You will want that blobked.
I refuse due to legal reasons (The other server prohibits it)
As long as my clients it use, it's legal
What is the exact clause? Is it restricted to web browser, or explicitly forbid something?
Oh, client IP.
Wait...
Something I have tried is ActiveX. The old ActiveX does not have CORS implemented.
or fu** it, i will tell you about my plan
01:58
You can also use ActiveX to run PowerShell which can run .Net code on client side.
ActiveX? Is that some legacy technology from IE?
isn't it
I'm going to tell you about my project...
Yes. And it does not have the problem because it is legacy. But for other browsers yeah you need extension. One for each browser, that may break anytime - extensions break faster than websites.
Who of you knows Watch2gehter?
Never heard of it ._.
The extension only disables CORS
I already tested it
02:01
Does it disable cors for all visited sites?
watch2gether is a service where you can watch youtube videos with friends and every1 sees the same
I think yes, but there's a trigger for it
afk baby needs milk. will come back later and read
cuuute
02:19
@towc brew tea? Here we "make" tea and brew coffee.
C/C++ dependency management is a mess..
02:41
well, India doesn't exist anyway
^lol
anyone else often feels like their tongue is constantly trying to press against the walls of their mouth and just generally trying to be in a constant status of tension?
@towc It's possibly caused by lots of caffeine (or other stimulants) or stress, or little sleep?
@littlepootis I've had a senpai who failed his master project because of c++ dependency.
02:57
@Alesana or all of them
@littlepootis Usually does it for me
My friend just got an entry level job in UX design (front-end) for 80K a year with no college degree :O
I didn't realize entry level jobs in front end development payed so much
I hope they don't
I guess this one did
03:13
Anyone know an easy way/library to paginate an arbitrary amount of any collection of items?
In my case I have a variable amount of buttons (number depends on the user, each button corresponds to a dataset), and I'd like to paginate them to show only 5 or so at a time
Wait why do you hope they don't @Meredith?
03:36
I'm trying to move #div5 before #div3 being in the same parent using plain js
I googled and I found some examples using appendChild()
but I'm not sure... I need only to move
@neoDev you could can do that with pure css, if you use display: flex on the parent and then the order property on the divs
so order: 1 for #div5 and order: 2 for #div3, etc
I need to use plain js
Are divs 1-5 generated, and then you have to move 5 before 3 using js?
If so, you could try removing the necessary divs, storing them somewhere, and then appending them back in order
That might be useful
user6820627
Is there anyone joining JS1K?
03:55
here I made a jQuery simple version using before() jsfiddle.net/6z2L7wxp
what is the equivalent in plain javascript?
04:59
how to get the css selector in javascript?
html > body > div#mainDiv etc etc
??
What is your question?
I imagined that like in chrome dev tools you can get the full selector
but maybe not
06:17
@littlepootis Haha totally. I haven't found it to be as amazing a resource as I'd hoped, though.
Aug 3 '16 at 14:43, by Some Guy
Ooh! I just remembered that this exists! https://github.com/papers-we-love/papers-we-love
This was a more fun starting point for me
http://insecure.org/reading.html
Hey guys
Whats up
Guess the room is empty tongiht :(
cool
06:32
Well, some of us are around
06:50
does targetElem.appendChild(myDiv) duplicate targetElem?
 
1 hour later…
07:52
I mean myDiv
08:52
why would it do that
 
2 hours later…
10:48
lol
@neoDev No.
And neither it does myDiv.
 
1 hour later…
12:01
Winston with Morgan in ExpressJS logs like
info: ::ffff:127.0.0.1 - - [12/Feb/2017:11:59:24 +0000] "GET /admin/users HTTP/1.1" 200 1489 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36"
It does not show response time. Anyone know any workaround for this?
Oh I got it, the format was wrong.
bob
bob
anyone familar with using ajax in proccesswire?
12:22
anyone learning webassembly yet?
13:20
wasm is not something you are supposed to learn afaik
you're not meant to write in it, I think it's already assembled
what you do is use external tools to convert js/c/asm code into wasm, which is already a bitstream in itself, not a series of characters
I don't think it works with js for now, except asm.js. Which you typically don't handwrite...
@Sheepy, what do you think nodejs does?
node, just like JS in the browser, has JIT self-optimizing compilation
@towc It's a headless js environment that provide api for io, socket, and other native function. Some people has written web server and framework for it.
so in the end it does go down to a set of dynamic computer instructions
no, nodejs is a tool that compiles js code to machine code in an environment that can run it
I don't understand what that has to do with wasm.
13:24
is it ok to ask a question regarding css in here too
?
@ngunha02 yes
wasm is also a set of instructions, so you can surely bring any js code down to wasm
have you done putting 4 input boxes in one line?
make it responsive
I have tried many ways, but it is never center in mobile
@ngunha02 that means nothing
@towc Sounds good. can you show me a tool that works with general js? Preferably ES6.
13:26
@Sheepy emscripten
@towc: want to start a private room?
@ngunha02 nno
it is a very long explaination
I mean, depends on whether you want to pay me or not
13:27
just write it here
@towc It converts llvm to asm.js, but not general js to llvm?
css, js and html are tightly integrated.
@towc let me create a gist
the same as kellyanne conway is deeply integrated with Trump
JavaScriptScript?
13:28
yes i fixed it
@Sheepy use nodejs
I am learning nodejs now.
@towc You mean node.js can compile my js to wasm?
everyone is always learning nodejs :)
@Sheepy no, nodejs can kind of compile your js to asm
but I just found out that namecheap sharedhosting don't support nodejs.
any idea what hosting support nodejs?
13:29
@towc: so i have an html page like this one gist.github.com/anonymous/9879ca44b092dbccada6a2653949a71b
@jacobian use your own computer
@towc But we were talking about wasm, not asm, right?
I want people to know I am able to code that's why I put it on the web
if I did it on my own computer. then only god will know
@Sheepy I thought you were saying that you can't bring js down to asm
13:30
@ngunha02 try jsfiddle
it works fine on desktop but when i try on mobile, the left side is a bit off
@towc You can't just feed any js code into emscripten...
@jacobian try heroku, or have a dedicated nginx server
did you try putting the code on netlify so we can see what it's look like
13:32
@Sheepy but that's your problem
you can't change contents of elements in wasm, that's just not what it was meant to do
@towc what kind of website did you build with heroku?
@towc That's what I've been trying to point out. wasm does not work with general js.
@jacobian I never used heroku. I just redirected every request to a certain domain that I own (with dns) to my router, and I told the router to reroute every request on port 80 to a laptop that runs node
@Sheepy js is js regardless of whether you use dom manipulations or not
nodejs is js
and nodejs is compileable to wasm
@towc did you use dyndns for that route?
@ngunha02 A) Table. B) display: inline-block and width. C) display: flex in the container
13:34
@jacobian no, I use... dns
the dns record for type A goes to the ip of my router
so that's mean you have static ip
my ip always changing so I need to pay dyndns 80 dollars for that reroute
@towc Hmm. I believe the core part of node is not js. But if you mean the js part can be compiled to wasm... any reference?
well, I do have a dynamic IP, but if I want to show something to someone, I'll simply put it there, boot up the laptop with the code, and change the dns record to wherever my router is
if I want something to be shown at all times, I'd probably get a dedicated server somewhere or use heroku
@Sheepy nodejs is js.
document and window and similar are not defined by the ES specs, afaik, but by the browsers
13:37
i did try digital ocean once, turns out they don't allow payment from the same paypal account already registered with another digital ocean account.
so the paypal needs to be unique
@Sheepy: right, table!
@jacobian that's kind of your issue. Why is that not ok?
@ngunha02 don't use table
@towc github.com/nodejs/node Yes I see 61% js and 31% C/C++. So you are saying the js part can be compiled to wasm?
don't listen to sheepy, he has no idea what he's doing
sheepy is a lady
13:39
@Sheepy C++ is compiled to asm by asm, not C++ code -_-
@jacobian if you're on the internet, you're a male
but why nodejs isn't supported in shared hosting though. I thought nodejs is part of javascript.
a bit weird to me
nodejs is a program
@towc You said "nodejs is compileable to wasm".
@Sheepy it is
well no, it's compileable to asm, that's what I said
and it uses some instructions/system calls that wasm can't
@towc but the program is made of javascript and yet still aren't allowed on sharedhosting
13:41
for example starting the routines for opening files and ports
@towc what is your suggestion then?
@ngunha02 learn how to actually do responsive designs
and not hack them toghether
read articles, look at examples
8 mins ago, by towc
and nodejs is compileable to wasm
I assume you haven't read more than the technical bits
@towc: i come from back end side :P now jump into the front end bit
13:43
@Sheepy oh, right. What I meant is that core js (without any modules) is compileable to asm and wasm
@ngunha02 that changes nothing
and in all honesty I don't care. Congrats on making the jump I guess
@towc: :P
@towc I guess I'll stop prompting you here. Don't worry, I know what I am saying. Have written and debugged more asm and c programs than I'd like to remember...
no, I still think you have no clue
of the relation between js and asm/wasm at least
You want to say node (V8) can compile any js into asm and asm can be turned into wasm?
no, far from it
7 mins ago, by towc
and it uses some instructions/system calls that wasm can't
13:48
Ok, I am lost. Any article I can read?
just think about it this way: nodejs can open ports and listen to them, that's normal, right? You can do that in asm, but why should the browser be allowed to open and listen to ports other than the preconfigured ones? Therefore, wasm can't open and listen to ports, therefore not any asm can be transpiled into a wasm equivalent
@towc Yes. Agree. And then?
@Sheepy so only the nodejs that can't open ports and do other things that a browser is not meant to do (so I guess without most of the core modules like net and fs) is compileable to wasm
nodejs has just as much power as C
you can't transpile any C into wasm, but it wouldn't be sensible to anyway
@towc This I can agree with lol. Guess that's problem solved?
14:16
@towc lol
no
no?
where?
you're comparing apples and oranges
well, in terms of i/o and events
14:36
what is this wasm thing everyone's talking about
> WebAssembly or wasm is a new portable, size- and load-time-efficient format suitable for compilation to the web.
oh
What has this got to do with asm?
I was comparing equivalency and saying that in some respects they are equivalent, but mostly not
what does "nodejs can be compiled to wasm" mean? That doesn't really make sense tbh
a subset of code written for nodejs can be brought down to the basic instructions that can be used by wasm
unlikely considering it specifically mentions it's written for browser environments
exactly
the subset which only has basic i/o and data manipulation
and wasm can't interact with elements and stuff afaik
it's just supposed to process some input (given by js), and turn it into some output (given to js) which will later be used by js
it's mainly just for fast manipulation of data, which may include some accelerated cpu graphics, text analysis, hash creation...
14:46
um
So, the toolchain lets us compile any language with an llvm frontend into wasm.
Nice.
 
2 hours later…
17:05
does anyone know some sort of trello-like time management app?
17:16
quick node question. I've installed bootstrap 4 with npm and it has jquery in a sub node_modules folder. How do I load from that folder?
Hello all
hello Sohaib
Anyone know about "Stacksight error: apikey not supplied" when running node server.js
I have tried everywhere but not found any resolution for this
Hi everyone
I have a little doubt. cand someone help me ?
Can I make questions for this room ? or is neccessary create a question on the page ?
17:42
go ahead and ask your question
@jrodriguez doubt is what you have, when you are already standing on a bridge an are about to bungee jump
what you have is either question or problem
 
1 hour later…
19:04
@SohaibAsif I would start by supplying an API key to StackSight
19:15
so, I might be giving a short-ish talk on the relationship between emotions and programming, which is what I'm most half qualified to do, on wednesday
19:26
@towc Cool! Where? Will it be in English?
19:39
any good starting point for a backend for a game using websockets?
19:50
guys I need a little help with pure js selectors
I am selecting a child in this way:
document.querySelector('#parent .child')
but what if, for example, I already assigned a variable to #parent
var parent = document.querySelector('#parent')
parent.querySelector('.child')
you should write it as $(document.querySelector('#parent .child'))
thank you so much guys. it makes sense.
20:15
@Zirak oxford, uk. Not worth coming to for my talk, it's like 5 mins and I haven't even decided what on exactly
anyway, I was mainly looking for good ideas to throw in
and I don't speak any language other than english at an understandable enough level to give a talk anyway
how are you guys?
I'm rediscoverying javascript in all its purity
creating a GUI webpage creator
I'm definitely throwing in some esolangs
doing a bit of graphics
giving examples of people to check out who have done something purely for the sake of art
then spend the last 30 seconds telling the people how to get started with "expressing their emotions through code" (which sounds corny af, I need to find a better way to say it)
I'd be talking to people from various walks of tech (jsoxford.com/2017/The-Oxford-Mega-Super-Meetup-Meetup), so it has to be kinda inclusive
20:34
@neoDev Outstanding
still starting creating it...
but maybe that's it for now xD
20:53
Using webpack with multiple entry points to generate style.css and main.js file but it seems to be generating main.js, style.css, and style.js... how do i prevent it from generating style.js?
21:05
@ray9209 Change your configuration
21:20
1 message moved to Trash can
@ray9209 Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
1 message moved to Trash can
@ray9209 Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
@OliverSalzburg change what exactly in the configuration? this is what it looks like now: gist.github.com/anonymous/0db52243713f1de865081ec73291caf4
@ray9209 Seems to me like your problem is somewhere here: gist.github.com/anonymous/…
But I've never used webpack myself
does everyone agree with the statement that "progress is about filling a demand"?
Guys, I am building a plugin system for my app
and currently trying to use npmjs.com/package/require-all for it (tried it and it works fine)
I have a question: are there any alternative approaches?
My goal is to simply, require all modules under a certain directory (selectively in the future), run a main function
It would be nice if there's a native way to do this in Node.js
21:55
any particularly good articles about revealjs?
22:07
@towc gluck, and if it's recorded send us a link afterwards
it won't be anything funcy, but sure :P
@JasonMarsh You can pretty much re-implement require-all, maybe you don't have to use all of its features, but there isn't really anything native which does that
@Zirak right, thanks for your advise
gluck
cheers
22:18
what is supposed to do an input inside a button?
just happened... lol
I think it will pop out of the button element
it shows input inside the button on Chrome
On firefox, it shows you the input inside button but you cannot edit the input
22:53
@Zirak u there?
23:10
anyone know where i can get a good intro to wasm or some sort of demo project to play around with?
@natureminded 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.
anyone, please ping me with arguably useless projects you enjoy, before wednesday, like lorempizza.com or eelslap.com. Bonus points if they can be shown off in just a few seconds and are not resource-heavy
and/or your favorite esolangs that aren't meant for practical industry use
lol that eelslap.com is a trip
i couldn't resist
(can that be pinned?)
I think I'm going to title the talk "a tour of useless"
23:17
if you'd like to add stuff and things to my talk on wednesday: docs.google.com/document/d/…
I need to sleep now
what time is your talk? get some rest!!
also will link be shared here at time of talk?
23:35
damn it mom
what is the talk about?
talk about how wasm paves way for faster rainbows
I'll make sure to mention that
oh, that reminds me actually, I should include some stuff from shadertoy
1 min ago, by little pootis
what is the talk about?
useless stuff. Check the google docs
I'm only allowed 5 minutes
and the audience is from various meetups around oxford (list here: jsoxford.com), which includes python, .net, ruby and stuff
what time is it son?
23:39
although I can be slightly biased for js, as long as I don't make it only for js stuff
@natureminded click the link.
> The Oxford Mega Super Meetup Meetup
> 43 are going
@littlepootis only from the jsoxford side
cool thx u added to my calendar and may try and listen in
look at the event described in all of the other meetups as well
and yeah, it won't be terribly big, but quite big compared to all other meetups in the area
23:43
I also better push the v2 of my site and get that cv sorted before wednesday if I want to make a nice impression
so, 43 from jsoxford, 28 from python, apparently only 9 from ruby (most likely many just don't use meetup.com, we all have separate slack stuff), and god knows how many from the other two communities. There may be some overlapping in the numbers, but it's at least 80 people, a nice amount
btw @littlepootis, you may enjoy this:
js from lambdas
@KendallFrey ^

« first day (2311 days earlier)      last day (2862 days later) »