« first day (1946 days earlier)      last day (2996 days later) » 

2:00 PM
Anyone on chrome can load data:text/html, <fieldset style="display:flex"><a>foo</a><i>bar</i></fieldset> and send out a screenshot?
 
> 95? Jesus, I'm still on 10
heh
 
crl
damn I always edit mistakenly, sorry
 
thanks for confirming
stupid chrome can't even flex properly
 
TIL node.js was not secure against request smuggling attacks
 
crl
weird didn"t expect that css result
 
2:04 PM
I will file a bug and shout at them very loudly
 
crl
hehe, I filed 25 bugs in 2 months, they work well, like 70% are done
 
you are the only person who cares about Range, though
 
crl
:) blink s
 
@crl ever tried fixing them too?
 
crl
I suck at c++
 
2:06 PM
you're not going to get better by not using it
 
@crl pun intended? :P
 
c++ is a lot used language
 
crl
yes and yes you both
 
btw, does someone know if the results of the SO survey got released ?
 
crl
the codebase of chrome/firefox is huge.. but Zirak's chrome code search link is useful to navigate in
 
2:08 PM
also, the "I didn't do it because I suck at x" is the same excuse that every noob uses. I'm kinda sick of hearing it.
 
@FlorianMargaine I think it is fair in this case. Browsers are fairly complicated. Even handling that code is not feasible on regular machines, and not everyone has a beast CPU.
 
@AwalGarg no, it's not really fair to not even try it.
 
crl
I'm not throwing bugs to chromium like that, I give some good test cases, and they seem happy to have those bugs coming
 
if he'd told me "I tried it but my machine is too laggy when running chrome in debug mode", sure.
 
hmm, well I did try it and even though I reached 75% success, I won't recommend that to anyone else
 
2:10 PM
but no, the excuse is always "I suck at x"
 
@FlorianMargaine fair enough
 
crl
I can't master all languages possible... and well it's not really my job to work on browser development (even if it's open sources projects)
 
yeah yeah, same excuse
 
fix bugs, or watch my turtles eat bugs. which would you choose?
yea, thought so...
 
crl
watch your turtles fix your bugs
 
2:13 PM
@AwalGarg what is your machine again ?
 
slow
 
didn't you like buy your laptop after you got paid ?
 
wait, when did I get paid?
 
@AwalGarg he also could've told me "no, I don't really want to do that", that would've been fair too. But no, it was just "I suck at x".
 
@AwalGarg you told me in way past you bought lappy and fees ?
@FlorianMargaine calm down :-)
 
2:15 PM
7 mins ago, by Florian Margaine
also, the "I didn't do it because I suck at x" is the same excuse that every noob uses. I'm kinda sick of hearing it.
 
I agree :P
 
@Abhishrek oh, past. yes. It is still slow for compiling chrome though. i5, 8gigs RAM. FF compiles just fine, OTOH.
Haven't tried servo. Have been meaning to do that.
 
@AwalGarg err I compiled chrome on an i5 4gigs ram and it was pretty old
may I debug ?
 
@AwalGarg compiling FF was fine, running it in debug mode wasn't :D
 
@FlorianMargaine it was fine
@Abhishrek how many cores?
 
2:16 PM
4
 
Mine has 2
 
But yours probably is 3 generations ahead of it
 
@rlemon SterlingArcher is afk: home
 
@rlemon lmfao
 
2:18 PM
> found out the hard way that crime doesn’t pay.
wut
 
Hello
:(
very short question:
$(document).ready(function(){
	var oldURL = document.referrer;

	if(oldURL == "http://127.0.0.1/website/main.php"){
		alert('you are coming from main');

	}
	else{
		alert(oldURL);
    //THIS ALWAYS SHOWS AN EMPTY BOX
	}

});
this code always shows me an empty box!
why?
it always comes in the else statement
but no matter what I do I just get shown an empty box
 
how are you going on the page?
 
> The value is an empty string if the user navigated to the page directly (not through a link, but, for example, via a bookmark). Since this property returns only a string, it does not give you DOM access to the referring page.
 
document.referrer is very unreliable
 
oooh ok...
 
2:20 PM
a better way would be using query strings in the URL
 
yes I always just type the url direclty
well
the issue is
 
code.google.com/p/chromium/issues/detail?id=262679 cool, it is reported already. everyone go star that
@crl ^ it is marked "GoodFirstBug". fix it
 
this is an admin page, so I don't want there to be any link visible on the webpage
so I have no other choice than surfing directly to that link
 
crl
done, 2.5 years ago tho
 
I think for security this might be the best, no?
 
2:22 PM
no
security through obscurity isn't security at all
 
crl
Status:Available eh
 
what would be a better option?
 
@FlorianMargaine robin pls fix your dad's toaster
 
proper auth system
 
isn't using a login system a litlle bit overkill?
 
2:23 PM
@trilolil redirect if the user is not authenticated to view admin page
 
not if you want a secure page
 
ok I ll try it
thx :)
 
if you don't want a log in system, don't cry if your webpage became a victim of malicious adversaries
 
but for auth I am almost forced to use an sql db to store passwd and so on
 
@KarelG you're so dramatic
 
2:24 PM
or is there a shorter way?
 
if it's a simple auth system, hash your password in a text file and read from it
 
mhm indeed can try that
 
make sure to not serve that file also :D
 
^-- and make it RO afterwards
 
2:25 PM
lol
@FlorianMargaine's twitching over there
 
lel
 
make a server component, end of story
 
@FlorianMargaine what is the job of a success engineer >
 
wth is that
 
developer success engineer*
 
2:26 PM
@Abhishrek succeeding?
 
o.O
 
@littlepootis *keyboard
 
@FlorianMargaine lmao
As in what are you supposed to do ?
Do I get to code ?
 
like I know?
 
@AwalGarg that's a funny one
 
2:26 PM
titles are worthless
 
vOv IIRC you linked me something similar
true
 
would this be secure
if I just created a page like: /myAdminpage.php
which only contains a short form with two fields pwd and username
and which is not accessible via the website only via url
 
@AwalGarg I think it's because florian uses emacs os
I mean Alt + F4 not bringing up codemirror
 
I drank so much last night that I puked... twice, lol
 
based on what @rlemon said I think still there I am hoping for security through obscurity
or is that ok?
 
2:30 PM
are you going to check that form field entry ?
 
of course
it s a login form
 
@littlepootis stumpwm
 
and which page can the authenticated person see ?
the same ?
 
they ll see the admin page
 
@AwalGarg Microsoft windows 7 supported IoT !
Intranet of Toasters
 
2:32 PM
don't forget to add a condition to redirect the user if he's not authenticated
 
ok
 
pseudocode
if (! user_is_auth ) {
     redirect
}

code for auth page
 
@FlorianMargaine I guessed it's written in lisp. I was not wrong.
 
@littlepootis even my shell is in lisp now :)
 
shell in lisp ? o.O
 
crl
2:33 PM
@AwalGarg I tried for curiosity to require('./node_modules/react/react.js') but then it fails because of missing '.js' extension, I added:
		fqn.abs = new URL(url.match(RE_URL) ? url : ((url.startsWith('/') ? ROOT : __dirname) + url)).href;
		if (!fqn.abs.endsWith('.js')&&!fqn.abs.endsWith('.json'))fqn.abs+='.js'; // this

but still fails require.js:33 Uncaught Error: Unable to load module localhost:3000/wysi/node_modules/react/lib/fbjs/lib/…
 
thx
 
crl
it works with var React = require('./node_modules/react/dist/react-with-addons.js'); of course, or other builds, but I was wondering if I could require the sources
 
> [..] being able to prevent a command from running, and run something else instead
What does prevent here mean?
 
To stop it. To intercept it.
 
crl
2:37 PM
to not do, avoid
 
SIGTERM?
 
no, just not running it in the first place
 
@FlorianMargaine heh at naming shell commands as "shelly"
 
@KarelG that's not my code
 
@FlorianMargaine How is it different from aliases?
On an unrelated note, I have
 
2:39 PM
@littlepootis I wanted to intercept cd to do something else
 
crl
the massive amount of snow prevented the bus from passing there (not sure if correct english)
 
alias emacs="vim"
 
@littlepootis I wanted to intercept every command to do something else
 
can you extend the environment ?
 
Oh, I kind of get it.
 
2:40 PM
like adding perl / curl stuff ?
 
@KarelG ?
 
i sometimes combine shell codes with perl commands for better flexibility
 
perl scripts?
 
crl
@RoelvanUden I'm going to try some isomorphic code with, I read it's really hard to debug, I think I'll try to have a flag to run it either from client or from server, and play between the 2 modes
*with react
 
@KarelG every command is run as usual, so you can run perl commands in it, yes
 
2:43 PM
@crl try replacing ./ with /?
 
@crl Sounds great. Perhaps you meant to ping someone else though!
 
Also, is the color picker in devtools working in chrome stable? It seems entirely broken in the dev version.
 
crl
@RoelvanUden no, we had react discussions in the past I think, nvm
@AwalGarg works on dev/windows10
 
We might have. I know very little about React other than how to use it sensibly though. I have no idea what isomorphic code even means :P
 
@crl try on github.com (on the svg logo, to be specific)
 
crl
2:46 PM
works normally, I see their nice circle of pixels
 
weird
 
crl
try to close and reopen chrome
@AwalGarg no, even tried the full url require('http://localhost:3000/wysi/node_modules/react/react.js'); but it wants to reach this node_modules/react/lib/fbjs/lib/ExecutionEnvironment.js that I can't even find
 
that's possible?
a require over http?
 
@crl does it work with browserify?
 
crl
2:51 PM
yes, hmm wait, require('react') works, let me try this one
 
@crl see what package.json defines as main?
 
crl
yes var React = require('./node_modules/react/react.js'); works wirh browserify
 
hmm... I'd have to experiment myself, then. @crl mind adding a comment on the gist describing the exact situation?
 
crl
ok
yes it has dependancies (fbjs) but anyway, the url didn't go back to node_modules it did react/lib/fbjs/.. instead, ok reporting it
 
ahh, ofcourse!
hmm, I should add proper node_modules support then.
oh btw I was thinking of making a truly async version of that require. so modules shall do yield require(...) instead of require, and the module source will be compiled with GeneratorFunction instead of Function and piped to co. Since most browsers support generators these days, it will work pretty much universally. Would need to figure out whether a module is async compat or not, though.
maybe just a .includes('require') && !.includes('yield')
 
crl
3:02 PM
that would great with yield, let {foo, bar, qux} = yield require('./wat/doge')
 
yeah it is mostly keeping BC which is the problem
 
crl
js1k.com/2016-elemental/demo/2410 hehe, ok back to trying to make some cms model
 
user5020521
3:33 PM
how can you attach an event handler to an id of an element created in javascript
 
user5020521
i.e.
 
user5020521
var foo = document.createElement("div");
 
user5020521
foo.id ="hello";
 
user5020521
foo.addEventListener("click", function(){
			foo.id="hi";
			console.log(foo);
		});
 
user5020521
as a metter of fact I wanna get and set the id of the div element just created
 
3:36 PM
what doesn't work in your code?
 
user5020521
debugger mode can't enter that function @FlorianMargaine
 
user5020521
plus browser can't even see the console.log
 
user5020521
it looks as if it exists as such but it makes no sense and has no effect to the code
 
user5020521
I even tried to tell browser console.log("I'm in the function") and this doesn't work either
 
user5020521
3:44 PM
so the browser just can't enter the function at all
 
@Riccardo990 jsbin.com/wepamozulo/edit?js,output looks okay
 
user5020521
@Zirak maybe there must be something wrong in my code may I send you a different bin?
 
Sure
 
user5020521
ok
 
user5020521
@Zirak jsbin found the solution for me
 
user5020521
3:51 PM
matter of fact it seems not working becasue I'm attempting to make a function within a for loop
 
user5020521
and it is reportedly wrong
 
user5020521
so should I only call it within the loop ?
 
4:27 PM
!!stat
 
@BenjaminGruenbaum You (http://stackoverflow.com/users/1348195/benjamin-gruenbaum) have 100015 reputation, earned 50 rep today, asked 67 questions, gave 1593 answers, for a q:a ratio of 67:1593.
avg. rep/post: 60.25. Badges: 31g 217s 299b
 
Dat ratio
 
blame @Zirak
 
You are my love my angel, why you treat me like potato?
@FlorianMargaine I don't think they udnerstand what dynamic scoping is
 
@Zirak clearly
all I see is just global scoping...
I also never heard of earmuffs... but I guess that's just me
 
user5020521
4:36 PM
@Zirak I didn't have time to translate the name of the variables and functions frm italian to english and I'm sorry about it I sincerely hope this bin is clear enough for you to tell me what is going on
 
@Riccardo990 Zirak is not in a hurry, he can wait for you to translate
 
user5020521
ok are you his naughty secretary? :)
 
crl
 
@Riccardo990 no, I am someone who sees that you think your time is worth much more than his time
 
user5020521
4:52 PM
@FlorianMargaine I was just kidding and I've always tried not to annoy anybody while asking a question and I think ther's no need for this allegations here
 
user5020521
by the way it is in english jsbin.com/jiqavehake/edit?html,js,output
 
Hey, are any of you familiar with proof assistants?
I have a question about the recursion principle for natural numbers:
1
Q: How to prove that the defining equations of the recursor for N hold propositionally using the induction principle for N in Agda?

Aadit M ShahHere's what I have: data â„• : Set where zero : â„• succ : â„• → â„• iter : {C : Set} → C → (C → C) → â„• → C iter z f zero = z iter z f (succ n) = f (iter z f n) succâ„• : {C : Set} → (â„• → C → C) → â„• Ă— C → â„• Ă— C succâ„• f (n , x) = (succ n , f n x) iterâ„• : {C : Set} → C → (â„• → C → C) → â„• → â„• Ă—...

 
cc @BenjaminGruenbaum
hi @AaditMShah :)
 
Hey Florian. How are you doing?
 
5:07 PM
fine, thank you
I see that you're still doing way-above-my-head math :-)
how's Agda?
 
Adga is actually a lot of fun. Some parts are quite tricky.
I'm actually reading the Homotopy Type Theory book and practicing the exercises at the end.
So, what are you doing? Working on any interesting projects?
 
a new shell since 2 days
 
Your own shell? That sounds really cool.
 
yeah, I like it
I just pushed the alias feature
 
Nice. That's something neat to put on your resume.
 
5:11 PM
Allowed to talk jQuery here?
 
Yes, indeed.
Although, I don't know anything about jQuery yet I'm sure quite a lot of people out here do.
 
@AaditMShah oh, I have plenty of those
 
does anyone have neDB experience?
 
Why am I getting a "$ is not defined" error?
I've linked jQuery CDN and jQuery UI from Google.
 
I just want to show how many collection in my database
 
5:13 PM
@FlorianMargaine That's cool. Working on stuff you enjoy is the best kind of work there is.
 
Any ideas of how I can fix it?
 
@JamesSnowy You need to give us more information than that. It seems that $ should not be undefined.
 
@AaditMShah well, it's not work there, just personal stuff
 
@Aadit Yes, indeed, I'm getting; "Uncaught ReferenceError: $ is not defined"..
 
@FlorianMargaine Personal marketable stuff.
 
5:15 PM
Let me try a thing first..
 
I've never used anything other than Bash. Wait, I did use zsh when installing Arch Linux if that counts.
 
@AaditMShah oh hi
 
@AaditMShah meh. For my last 2 previous jobs, I didn't even hand out my resume. It was just from recommendations.
 
@crl that's a lot higher than I assumed.
 
Anyone who has any ideas?
 
5:16 PM
Hey @BenjaminGruenbaum. How are you doing?
 
@AaditMShah doing good, lots of hard work :)
 
@JamesSnowy Does jQuery work?
 
@Little No, it doesn't work at all.
 
@AaditMShah I don't know Agda, sorry. Are you asking how to mathematically prove it?
 
not saying personal projects don't look good, just that they're not the reason I'm doing them
 
5:17 PM
@JamesSnowy Any errors in the console?
 
@BenjaminGruenbaum The best reward that life has to offer is working hard at work worth doing.
 
@AaditMShah making rich people even richer?
:P @BenjaminGruenbaum
 
@Little Yep, the console states; "Uncaught ReferenceError: $ is not defined".
 
@AaditMShah I don't think so - I don't enjoy hard work, I enjoy work that's interesting and rewarding.
Lots of work is hard and worth doing but I don't want to be the person doing it.
 
@BenjaminGruenbaum Yes, I need to mathematically prove it using the induction principle. You can do it on paper in theory. However, using a proof assistant make things much simpler.
 
5:18 PM
@JamesSnowy Uh.. put your entire codebase on pastebin. thx
 
> In English, given a natural number n and the induction hypothesis prove the consequent.
I don't understand that English.
 
@FlorianMargaine The rich get richer, the poor get poorer and the middle class struggles to stay in the middle class. That's how the world works unfortunately.
 
@AaditMShah That's how India works
 
Never used pastebin before..
 
5:20 PM
@JamesSnowy functions.js content too
wait
 
Okay.
 
Include functions.js AFTER jquery
 
function recN(z, f, n) {
    if (n === 0) return z;
    else return f(n - 1, recN(z, f, n - 1));
}
 
Common mistake, watch out for that
 
5:21 PM
@BenjaminGruenbaum This is what the recN function would look like in JavaScript.
 
Lol
 
It's just the primitive recursion principle for natural numbers.
 
@Little Thanks, just completed learning jQuery on a web-course.
 
However, I'm defining it a bit differently.
I just have to prove that although I'm defining it differently, the semantics of the function are the same.
 
I'm trying to do thing on my own now, I didn't know that jQuery was to be placed before your js..
 
5:22 PM
@AaditMShah oh, that I know.
Oh, you just want to show that the definitions are equivalent and are looking for an iff mapping?
 
So, I'm proving that it behaves the same by performing induction on the natural numbers.
For the base case (i.e. 0) I need to prove that recN(z, f, 0 + 1) = f(0, recN(z, f, 0)) which Agda can do automatically. Hence, the proof is refl which mean reflexivity.
 
crl
reflexivity is f(x) = f(-x) no? no is x R y <=> y R x, bit tired
 
that's just odd
that's technically odd
 
No, reflexivity means that for a binary relation R, each element is related to itself (i.e. aRa).
 
crl
oh yes that
 
5:27 PM
since when stackoverflow has chatting room?
 
@AliSaleem Welcome to the JavaScript chat! Please review the room rules. Please don'task if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@AliSaleem around 6 years
 
@crl What you described is symmetry.
 
@AaditMShah why are you doing it with Agda, it's very simple to prove out of ZF from the looks of it
Or from definition and whatever other axioms you have, it doesn't look like something you'd use a proof system for
Or is the exercise to use an automatic solver?
 
@BenjaminGruenbaum It's actually an exercise from the Homotopy Type Theory book. I can't prove it using ZFC or any other conventional set theoretic system. I have to prove it using Martin-Löf Type Theory.
 
5:31 PM
Oh
Haven't heard that name for years
I would not approach it with an automatic solver.
 
crl
@AwalGarg lol
 
hi people
 
crl
yea all those template strings for bundling are clever, but may be slow
build systems in js are annoying to deal with, (my opinion), will reexplore gulp or see if I can continue with the mini-require in dev
I need partly isomorphic code, the admin mode of the cms is like a normal page, but gets additional tools that could be client-side only (server-side rendering isn't important for them)
 
I had a discussion earlier here
but alas chat section here only has record for one month
I would like to ask it out again
www.domainname.com/anything
anything is profile id of people let's say
I am lost - how to make route that specific thing
route for*
 
@GandalftheWhite uh?
 
5:44 PM
I am using express js
and this is what I want to do
 
@GandalftheWhite That was hard.
 
please tell me how to do it
 
Read the express docs.
 
/:profileid
will this work
and then I take out the detail from req.param
 
yes
 
5:46 PM
okay
 
Well, req.params
 
@crl I should have edited it. When I benchmarked it, it was like crazy faster than browserify
 
crl
ah ok
 
Mostly because I don't parse code. Simply bundle it. Parsing code is verry slow.
 
crl
5:57 PM
also why not github.com/tmpvar/jsdom and vanilla instead of jquery + cheerio (I think you use them)?
 
jsdom is bloatware, basically
 
crl
ok I'll try your bundle then, seems fun, hehe ^ ok
 
hey i'm trying to dynamically load database information into Bootstrap modal using ajax but it's confusing me a bit anyone feel like lending a hand? :)
 
@crl I would have to accept that it is very primitive and very easy to forget adding new files to the config. manual file list is inconvenient to manage, to put it mildly.
 
crl
yes, why not a /dir/*
 
6:02 PM
because lazy
 
crl
ok :)
 
@AwalGarg ah, you're not resolving the require at build time?
(aka just provide an entrypoint and the build does the rest of the job)
 
@FlorianMargaine yeah. It works out pretty well for small projects when you are working alone.
 
got it.
and you don't use any npm module.
 
yeah, that too
 
6:20 PM
thinking about how I should handle pipes in crash...
using a new interface is ok.
hm, there's redirection too.
mostly thinking about the syntax
(yes, reinventing the wheel)
 
tracert -h 100 216.81.59.173 // from bashrc
 
@Abhishrek looks like it's times out after 8: et-7-1-0.atl11.ip4.gtt.net for me
 
me at 3
or 4
 
@Neoares the number depends on your network
 
@FlorianMargaine yeah he got ddos'd
 
6:28 PM
and where you are
 
that's true
 
he basically set up Episode 4
 
@FlorianMargaine github.com/peco/peco
4
 
@Zirak oh, that's fun
I'm not sure I'd use it, but that's fun
 

« first day (1946 days earlier)      last day (2996 days later) »