« first day (1901 days earlier)      last day (3270 days later) » 

00:05
0
Q: Recreating audio filter curves in html5 canvas

AspergerIf I wanted to program curves of various audio filters, what tools should I use to construct them in canvas? http://raider.mountunion.edu/~miskeljp/ds/resources/filters/filter_types.jpg My ideas are: quadraticCurveTo bezierCurveTo custom curve using Math.sin Since I am still lacking experie...

Hello.
.olleH
hello!
Gruezi
00:07
Guys, what for are curly braces used in globs? /modules/**/{,*/}*.js
what are globs?
Did you even try googling? Even once? tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm
I must confess. This time I didn't. Usually I do. Plus I spelled the word wrong way :( double fail
googling is becoming a profession xD
00:14
@Asperger and you're terrible at it too
@phenomnomnominal why?
Bad but not terrible
You could've googled "glob" before and got an answer.
Asperger == lazy
:D
What the hell? Are you saying that people with mental disabilities are lazy?
/stoking the fire
00:18
Well I know at least 3 Social Justice Warriors, and I'm gonna tell on you
laziness is one thing, but actively wasting people's time is pretty shit.
no, seriously I dont really care what glob is
So if I'm right, then this pattern tells about all directories inside modules directory and all of subdirectories. So if /modules has /modules/homepage and /modules/contact, then this pattern should cover all *.js in there(not sure about /modules/homepage/sidebar).
so why say anything then?
00:20
There was a momentary spark of interest...
Its gone now ; )
Does anybody know of a gulp- file minifier that supports generator syntax? All that I've tried so far throw a fit at the asterisk char.
crl
crl
DOMTokenList.prototype.toggle = function(cls, b){if (b===undefined)b=this.contains(cls); if (b) this.add(cls); else this.remove(cls);}
generator syntax?
function* () { ... }
ES6?
00:28
Aye
Haven't looked into it yet.
I've just finished a project translation from grunt to gulp for the dev. env. Only jshint creates a headache. Not sure why, but for some reason it outputs warning in files two times.
Or it scans them two times.
Maybe due to that glob pattern. Investigating the issue.
crl
crl
!!>undefined||1 - 1
In typescript, is there a practical difference between import * as foo from "./foo" and import foo = require("./foo")?
yes
you can't do the latter if you're going to ES6
I think
I can't remember :(
00:44
I've switched a few modules over from export = to export default and that required a switch to import bar from "./bar", I'm trying to decide whether or not to switch the non-default exports over for consistency, too.
I still don't get it. What is the diff. between goo.gl/ig7e6d and goo.gl/X3VGvr
crl
crl
I guess {} is for optional things
great for concentrating while programming.
@Asperger I had a friend who read a study about Pachelbel's canon aiding concentration... so he listened to like 100 hours of it while studying for finals.
00:56
@Retsam great composer!
01:09
@crl isn't everything optional with the second as well?
import app from "../../../../app";, man I love Node's relative paths so much...
sarcasm?
Little bit.
if import statements could be used in conjunction with template strings, then that would mitigate at least some of that nonsens.
aliases like require js had would be nice
01:20
Oh? How so? Something like:
const BASE = '..\..\..\..';

import app from `${BASE}\app`;
import foo from `${process.cwd()}/app`
Ehh, assuming that the current working directory is the root of the application has its own issues.
Since you can't define variables above imports, you would have to define global properties that would store those things
Node actually does sort of support setting a base path via the NODE_PATH environment variable... but the documentation there is that they're basically just supporting that for legacy and don't actually want you to use it.
But that was annoying, since it meant setting either setting NODE_PATH globally on my machine... or else setting it every time I start the app. Which was mitigated by using scripts, but still annoying.
01:40
nick make me RO pls
02:33
How do I decide, whether I use object literal notation or function constructor for completing a task?
@overexchange Personal preference? Consistency with the rest of the code? There's not one "correct" approach.
@Retsam I saw this article preferring object literal notation
ok i got it.. i have to refresh the browser for a call to the server to happen and see the debuging in vscode
thanks
@Retsam that article also takes some concrete widget class to to explain the difference
nice article
@overexchange I mean, that's one person's opinion. If you agree, sure, go with that; but there are other opinions, too.
Though I'd still argue that consistency should trump either opinion. If the codebase has a convention, stick to that.
03:02
@ndugger you forgot to release 0.1.1-beta
Y u no use a version bump tool?
 
1 hour later…
04:32
Hello All
I am working with knockout js and a fileInput
And I get a fake path as my file input value in my knockout viewmodel
can anyone help me how to get full path not only file name or fake path
That would be a privacy breach
However the fake path should still be usable
105
Q: how to resolve the C:\fakepath?

e_maxm<input type="file" id="file-id" name="file_name" onchange="theimage();"> This is my upload button. <input type="text" name="file_path" id="file-path"> This is the text field where I have to show the full path of the file. function theimage(){ var filename = document.getElementById('file-id...

04:49
@Retsam I have tried this, but It's giving me only file name
@Neha According to that question, that's what firefox does, yes. As the answer (and @Shea) says, there isn't any way to get the real path.
I need an alternate way to pass my file to my controller from knockout viewmodel
Hi All
@Neha You should be able to get the file object itself from the input; not just the file name.
@Neha See the MDN page on File.
05:09
@Retsam ok Thanks, I am working with fileReader api. See if it works.
05:45
Is there a chrome addon which highlights English syntax ?
as I type it ? Would help me significantly in learning the English language.
Hahaha
I don't think spoken languages are that simple
Just pay more attention. Read books, watch movies, etc.
Also, there shouldn't be a space before the question mark (or any punctuation) in your sentences.
06:25
@Retsam most of the browser objects are function constructors. Ex node -> element -> htmlelement...
@krish Welcome to the JavaScript chat! Please review the room pseudo-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.
Thanks @CapricaSix
@GNi33 I don't know if I've linked you to this sub before, but if not reddit.com/r/bodyweightfitness
@Retsam In this hierarchy all are function constructors
06:34
@nderscore you probably should watch infoq.com/presentations/8-lines-code-refactoring
(referring to that framework of yours)
@rlemon @KendallFrey whobuiltthemoon.com
@krish thats a linter I want a highlighter
although syntax highlighter + linter === fun ! :D
Also I'd rather not have everything I type uploaded to a web service !
06:57
 
1 hour later…
08:02
@crl It is very intuitive already, but still here you go: awal.js.org/especser/#7.3.21
My 2015 was very productive in career aspect. I learnt functional programming using python, completed Java JLS, CSS3, JS, currently learning jQuery
user image
2
stealing that
@overexchange You learned FP with Python? hehe
It was the continuation of SICP course and SICP course was using python language
08:22
@overexchange Yeah, JavaScript is actually a much stronger language to do functional in.
If you want to be really fancy, take a look at Common Lisp or Haskell.
Python is largely ok for FP too but to learn FP, as @MadaraUchiha said, JS is much stronger.
Also the ecosystem
JS is much stronger? Not true. python 3.x has functional programming features that ES7 is trying to propose. ex- generators
python programmer can use ES7 proposed features easily
@overexchange Generators are already supported in all major browsers, as well as NodeJS.
08:37
Generators are in ES6.
It is not about 1 feature or another. JS has function expressions, for instance, which Python doesn't have. But really, it is the entire language and the experience itself.
@overexchange generators are not a functional programming construct.
@overexchange python is a great imperative programming language, probably the best one right now for general stuff. It's just very imperative - the people in charge of it hate functional programming mostly.
@AwalGarg those are lambdas and python has those. They have to be single line though.
@BenjaminGruenbaum yep, single line ones. Which ES6 has too.
Anyhow, JS has tail recursion - any language without tail recursion isn't really a functional language.
@AwalGarg Yes, but the statement "JS has function expressions, for instance, which Python doesn't have" isn't really true.
Python is also very declarative (for example expressions), just not functional.
@BenjaminGruenbaum ok, should be "Python's lambdas aren't as useful".
@BenjaminGruenbaum s/has/will have/
08:43
@MadaraUchiha has, in babel today for instance.
It's a property of the language, not the implementation.
@BenjaminGruenbaum your hat's placement is near perfect, nice :D
comprehensions and generators help a lot for functional programming
@BenjaminGruenbaum Eh? How is that a property of the language?
crl
crl
comprehensions are not so necessary imo
@overexchange no, they're the opposite of it.
08:45
It's not left to the implementor's discretion, but it's still an implementation thing
You can have generator-like constructs in functional programming, but Python is very mutation friendly and has pretty weak functions overall (and that's a good thing).
crl
crl
!!> Array.from({length:4}, (_,i)=>i) // should be easier tho
@crl "0,1,2,3"
@MadaraUchiha the language dictates that it supports tail recursion, defines what a tail recursive call is - and an implementation that does not do tail recursion is not a conforming implementation.
@BenjaminGruenbaum Fair enough
Beer today?
Also, JSC does TCO, so Safari for example has them.
That's not a normal internet argument when a guy recognizes he's convinced...
Or is Sharon still busy reimplementing SVG in React?
^ * 2
@MadaraUchiha I'm the one doing that atm :D
08:47
@BenjaminGruenbaum Yeah, but you can do it in, what, 45 mins?
Shouldn't affect beer time.
I want to have a beer today, so I'm inclined to say yes, but Gal and I are supposed to see the new starwars movie - so if he opts out then sure.
@Zirak ping
@BenjaminGruenbaum Saw that yesterday
@MadaraUchiha no spoilers!
Company rented the entire theater for R&D
@BenjaminGruenbaum Darth Vader is Luke's father
@MadaraUchiha nooooooooooooooooooooooooooooooooooooooo
08:48
@FlorianMargaine nooooooooooooooo.com
@MadaraUchiha yeah, some companies did that. There were 3 free screenings - but I wanted to see the first 6 first.
@BenjaminGruenbaum Nope.
You didn't edit it.
@BenjaminGruenbaum see the histories of the two above messages
08:50
@BenjaminGruenbaum Reload
Ah, cool.
Weirdish
@BenjaminGruenbaum We can purge history, but the last revision always remains
If you want to ask me to permadelete, remember to edit your post before deleting
@MadaraUchiha or you can edit it yourself and then permadelete :D
Welp, talk to the relevant parties, I'm for a beer.
08:51
how can jon skeet have that amount of reps if he only answered 11 questions?
@AwalGarg Yes, that's also an option, but not after it's been deleted by OP.
@Neoares wat
only 30k people reached
@Neoares He answered 32K questions. Not 11.
~138.1m people reached.
08:52
You're looking at his meta profile
Not his stack overflow profile.
wait
shet
Jon Skeet, Reading, United Kingdom
833k 418 5873 6993
SO pls
now it has sense
6993 bronze badges?
> Jon Skeet has more "Nice Answer" badges, than you have badges.
oh ok, they are accumulative
last time awarded by @jAndy, 6 mins ago
08:54
I can't find a USB stick, going mad now >:(
@MadaraUchiha Do you think you can read my messages ? ^^
Jon Skeet has more gold badges than most users have rep
@TheLittleNaruto I have no idea about that.
Thank you
It's Stack Exchange employees, not the moderators, who are handling it
Sorry :(
08:55
NP :)
I had forgotten about that swag. Maybe that was the plan...
2
@DenysSéguret Given that out of 5m users on Stack Overflow, 3m have 1 rep
That applies to anyone with more than 1 gold badge :P
@MadaraUchiha let's be fair, those 3m users aren't 3m humans. Many people create an account each time they want to ask a question
@DenysSéguret Yes well, obviously users who remain active naturally get more rep
09:02
How many programmers are there on Earth ?
@DenysSéguret to be fair, a lot of high rep users get rep just from intertia
Look at Raynos for example, he had 60k when he left, I bet he has like 100k now
"inertia" ?
No activity in 2 years
@DenysSéguret passive rep
09:03
Yup, over 100k, he's getting a shirt for his 2 years of inactivity :D
Raynos, San Francisco, CA
100k 30 254 318
yeah, was wondering about the word, but I'm now sure it was just a spelling error ^^
@crl first time i see that ...
@DenysSéguret oh yeah. lol.
it has to be noted that scientists in USA is using metrics lately
09:07
Is the mole part precisely true ? I'm puzzled on that one...
Probably should be Carbon
Also, isotopes
@DenysSéguret Not for Hydrogen, AFAICR
Oh, I think I understand what they mean, if all your Hydrogen is 1H that's correct.
it's caused by definition
one mol hydrogyn has x weight
I didn't do Chemistry since 2010 :D
09:11
and one hydrogyn has y amu , which got found out that x = y
oh yes, the mass of C12 is exactly 12 times the mass of an atom of H
i don't know the precise value
> hydrogen has an atomic weight of 1.0079 amu or 1.0079 g/mol. By this definition, 1 mol of hydrogen weighs 1.0079 g.
OK, I've looked at wikipedia, there are 4 definitions which varies by "less than 1%"...
@BenjaminGruenbaum In this code, cartesian_product_recursive is a sequence generator
list comprehensions can be used in similar way. adding for..in in list comprehension is a different aspect.
Advantage is, code looks elegant
Eh, you're just asking for a flatMap, no need to write it recursively.
Doing iteration with recursion is a great way to tell who has not been doing fp for very long - in practice you typically don't need to do it explicitly.
09:22
example may be inappropriate but this is how we use generators in functional programming
So you use generators in FP inappropriately :D?
Is there somewhere a documentation discussing the performance impact of the various babel es2015 transforms ?
In babel itself, probably.
_.flatten(arr.map(x => arr.map(y => [x,y])));
I mean cartesian product may be solved with a different approach but this is one example that ensures stateless programming using generators
Generators are the opposite of stateless, they're super stateful.
09:25
@SomeGuy yeah, I know that sub. some good stuff in there
That's the point, it's a function that resumes state when run.
crl
crl
Array.range=function(len, cb){if(cb===undefined)cb=i=>i;else if(typeof cb!=='function')cb = i=>cb;return Array.from({length:len}, (_,i)=>cb(i))}, Array.range(3), Array.range(3,1), Array.range(3, i=>2*i)
Are you talking about generators that do lazy evaluation?
crl
crl
makes sense?
@overexchange no, I'm talking about the mental model of generators.
It's just _.flatten(arr.map(x => arr.map(y => [x,y])));... no need for generators and silly stuff. If you use an iterable it's lazy - that's a property of iterators not generators.
Of course, in a real functional language it's just cartProd = liftM2 (,) :D
09:28
I never use lambda expressions(arrow functions) because they are less readable, in the same code, I have iterative version.
But am not talking about the approach to solve cartesian product
@SterlingArcher What's your problem?
@overexchange right, you are correct - an imperative solution is the better Python here. This is because Python was designed to not be a functional language and its authors dislike functional programming.
crl
crl
do u . even . lift bro
This is why we find you learning FP with Python odd.
wait
who's learning FP with Python ?
09:33
@overexchange is.
i should go with Haskell to learn FP if i was you
@crl will give an error btw :p
Do I have to recalculate canvas.offsetTop everytime the user scrolls?
@MadaraUchiha any idea why Only I am getting the error though all people have same content in git config file Host gitserver User git Hostname 91.12.12.12 Port 22 IdentityFile ~/.ssh/pratikj ? — Pratik C Joshi 12 mins ago
Have you even bothered reading the answer?
crl
crl
@KarelG you can have fun, like the lengthiest titles: data.stackexchange.com/stackoverflow/query/383644
biggest post body would be len(Body)
> 219 | ... | 2008-09-09 19:36:57
keh, it's pretty obvious since the site at the start didn't have a lot limitations :p
09:44
!!urban keh
@AwalGarg keh Pardon, excuse me, what the fuck did you just say, what, huh, come again....you get the picture
title is now limited to ... 150 chars ?
guys why isnt this htaccess working?

AuthType Basic
AuthName "admin"
AuthUserFile /opt/lampp/htdocs/php/.passwd
Require valid-user
im never logged in
crl
crl
10:08
I feel like a noob, just fell in the "var in for loop bug" (where the last value of that var is taken)
all are noobs
crl
crl
I forgot I can fucking use let in strict mode
There is no regret in learning FP using python. For me, Understanding the paradigm is more important. I would not hesitate using Java 1.8 for the same
@overexchange java 8 is probably a better functional language than Python :D
damn I still can't understand how regenerator works :(
10:22
@overexchange good that you used "1.8" for java :p
before that version, lambda expressions fe doesn't work.
even method passing as argument.
now i can write a generic method which receives a method as argument
crl
crl
10:43
all it takes to do a wysiwyg jsfiddle.net/crl/sutjd8e0/6
nah, the tables are the worse
@BenjaminGruenbaum I was unable to understand how can they maintain lexical scope with ES5 functions. I experimented a bit more since that message and now I think I was missing the obvious: they are hoisting all lexical variable declarations (unconditionally) to an outer function and then return a closure. Isn't this... too hacky?
11:16
@AwalGarg of course it's hacky, it's a transpiler - all those are hacky.
What choice do they have? Anything other than a closure would totally break.
@BenjaminGruenbaum I was expecting something more exotic. Like maintaining a state object which acts as a copy of the [[GeneratorState]] internal slot or something :-P
@AwalGarg I don't think that would have been possible, consider a case where you have eval inside of a generator.
@BenjaminGruenbaum well, eval would break babel currently anyways...
11:32
@tereško i refuse.
@KarelG I guess I will have to make a change.org petition to revoke you developer's license
but seriously, it's a good lecture and a must-watch
crl
crl
Can someone explain the fuck out of this jsfiddle.net/crl/zmLLch8b/38? it's supposed to just toggle show.hide. But the display of that element is always none for some reason
I have a css rule that does it, but shouldn't style override it?
yea I know Awal, I should use add/remove class, well will do then, it's because of jquery...
I... what
crl
crl
nvm
@AwalGarg why?
Regenerator can just wrap eval calls if it needs to and run the code through regenerator, if it had a lexical scope dictionary thing I guess you could make it work but it'd be a lot harder.
Same with with I guess.
11:48
@BenjaminGruenbaum it doesn't precompile the passed code.
crl
crl
ok I'm doing something wrong, but dunno what exactly jsfiddle.net/crl/zmLLch8b/39
things don't get updated
1 message moved to Trash can
@Frondor Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
1 message moved to Trash can
@Frondor Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
1 message moved to Trash can
@Frondor Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
guys. I discovered IRC, I hope you're all proud of me :P
crl
crl
man...
11:58
(jQuery) is it possible to append some html template (few nested divs) and introduce a callback so I can manipulate the "appended" html as a jQuery element? something like:
    $(...).append(html, function($this){
        $this.fadeIn();
    });
crl
crl
you made it finally

« first day (1901 days earlier)      last day (3270 days later) »