« first day (2038 days earlier)      last day (3135 days later) » 

00:05
>:|
00:47
Hi
please anyone?
00:58
cyka?
blyat?
ubit sebya!
ubit ubit
any way to prompt in node without the lib?
What?
hi
I am trying to use node's readline module
Is there some way to pause your program until a line is succesfully read?
Depends on the nature of your program, I suppose.
That's typically the normal behavior of readline
01:13
okay, thanks
Does nightmare pause node? or will node and electron run simultaneously?
 
2 hours later…
02:52
so quiet today :(
03:52
@littlepootis you got a new avatar?
04:16
anyone ever seen the javascript emulators for consoles, like jsnes (for javascript Nes emulator) web archive has a ton of these javascript emulators
@iGNEOS 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.
plus enscriptem which coverts c++ code into javascript, like someone ported snes9x using enscriptem in PURE javascript, runs amazingly
05:05
Hello everyone
@NickLim 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.
Hi good morning guys
hi learning
You guys work on weekends too
05:53
hello is there any api to change profile picture using "try it" button.?
06:27
@Learning mostly only on fun stuff thats non work on the Sabbath
@FlorianMargaine any advantage to python to do what I want (bash branch stuff) vs Node(which I already know)?
hmm seems I need to buy PyCharm as webstorm has no PY support
hmm seems like if I do it with node, I'll need to chain a bunch of promises together.. :(
07:11
@FastSnail do you mind explaining what do you mean? Where would the "try it" button be? Which website?
hey
07:31
Hey, guys
@user297904 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.
Look, does this page alert when you change the <select> input, jsfiddle.net/DRDsS , it is suppose to work
@SuperUberDuper no, use node, and you can use *Sync api since it's a script you don't care much about
@BartekBanachewicz a.push.apply(a, arr) or a.push(...arr) or a.forEach(::a.push) depends on what version you need to support
07:44
thanks @FlorianMargaine
light morning reading (soap opera in comments)
http://geekforbrains.com/post/after-a-year-of-nodejs-in-production
spawnSync looks like what I need
With today's exam, I'm done with computer-unrelated stuff :D Well, I hope so.
08:12
@FlorianMargaine so I tried this but when I get to this commit line

child_process.execSync("git merge origin/master")
child_process.execSync("node build.js")
child_process.execSync("git commit -m 'update'")

I get error:
at checkExecSyncError (child_process.js:469:13)


but when running in console it works fine
08:23
Oh shit. that free gh thing is gonna get more stars than alpg which will move alpg out of my gh profile front page :(
why don't people have the same opinion as me on which thing is better
You haven't removed that yet?
Also, what is Github doing to counter it?
Prevent free peeps from forking private repos?
08:49
in nodejs why can't I do something like this..

var logs = require('../routes/logs');
app.use('/entries/:entryId/logs', logs);

and inside logs routes, req.params.entryId ..is undefined .. infact the req.params is a {}
09:05
Ugg.. someone posted something WORSE than a screen shot. An off-angle picture taken of their monitor with code on it. My eyes bled.
09:22
maybe he/she was peeking into anithers code
@AwalGarg lol
done
GH frontpage isn't an indication of anything though
09:44
@littlepootis not allowed to speak of it
@BenjaminGruenbaum it indicates how much time I am willing to waste for free :P
@argentum47 How does routes/logs look like?
wow 27 people are following me on GitHub. what does following a guy do? you receive a notification everytime they do anything on GitHub?
holy shit @argentum47 @littlepootis you guys get a notification for my commits and issues and repos? O_O
and why is edge autocompleting things (even in incognito) and firing input events for it Without initial seed text? wtf anyone can just collect your emails and usernames for free?
@towc like this
10:14
@AwalGarg yes
@AwalGarg why are you using edge?
@AwalGarg and stars too..
@AwalGarg you see people in your feed, that's not something you see a lot.
@thepiercingarrow yeah
Git question: how to pop a git stash without merging?
pop or apply?
10:33
@littlepootis testing. I know, new repo on GH highlighting data collection attack because of microsoft's stupid browser
and sorry for all the feeds. I can understand that would be annoying.
Not really. It's not like I look at that feed everyday.
I don't, at all.
That feed is basically about people starring repos and plebs adding Torvalds as contributor.
11:00
halp
How do I clear the dev console history in Chrome?
@littlepootis incept devtools with devtools and inspect devtools' localstorage
then remove the history key. done
Wow, inspecting devtools is a thing?
In every sane browser, it is.
It worked :)
How do I.. disable it?
disable what?
11:04
History.
write a userscript for devtools
setInterval(clearHistory, 50)
lol, okay. Thanks, anyway.
I did that sheep counting thing yesterday night. didn't work
When do you sleep?
3 am (sometimes 4)
11:09
And when do you wake up..?
8 am (sometimes 9)
Do you want to die before 30?
haven't thought about that yet
who da hell thinks about >12 years in advance lol
You don't need to. You probably will.
I am sure many night owls live past that age
11:12
Most night owls get enough sleep.
hmm, yeah that part I need to look at sometime
You are not a night owl. You're sleep deprived...
okay mom
edge's scrolling is nice :)
If I submit this "attack" to Microsoft, they'd probably just mark it status-by-design-but-not-intended-to-be-revealed-in-public internally and tell me to wait with a long copy-paste thank you message. and I expected sort of the same from GitHub but it backfired. what do
11:18
It backfired?
You got more HN karma.
You were #1 for a few hours on another board.
well I missed the bug hunter badge and some potential bounty (don't actually care about that much though)
@littlepootis #1 for 2 days :P
It's been 2 days already?
omg.
time.. pls.
I mean I am not discriminating against Microsoft, but... c'mon. Would be stupid to expect better from them.
I should try reddit for advertising my GH stuff. probably adding a couple more buzzwords to project titles.
12:21
> is there a term or phrase to describe this churning where; You have to upgrade to fix old bugs, upgrade provides new features that add new bugs
anyone knows ^?
"Dependancy Tears"
Hello people :)
I'm at a dead end here
I am trying to use Jquery to generate a get url for php and go to that url
Basically my url looks like this example.com/…;
oops
example.com/id=213&stuff=323
$.param({ id: 213, stuff: 323 })
Now I have the values for id and stuff in textboxes and I want to grab it and get Jquery to append it to that link and run it
@phenomnomnominal How do you add it then?
'example.com' + $.param({ id: 213, stuff: 323 });
12:28
do i use window.location?
or is you're using ES2015: let params = $.param({ id: 213, stuff: 323 }); let url = `example.com/${params}`;
you could do
there's a few ways to change url, but that will probably do
URLSearchParams if you don't wanna use jQuery
and don't care about IE or Safari or mobile
I see. Let me try it :)
@phenomnomnominal ES2015 and jQuery in the same sentence sounds evil
12:33
window.location.href = 'rent.php?' + $.param({ id: varID, stuff: varStuff });
That works perfect :-) Thanks
@Quill seems a tad naive, but sure
I never heard of ES2015, what is it?
Pretty new :)
EcmaScript 2015 :D
@AwalGarg so what did GH say?
@BartekBanachewicz "against TOS, remove or get suspended" but more politely.
12:39
and that I missed their bounty or whatever because I publicized this
@AwalGarg #fail
I wonder how much you'd get for that
Even some swag would be cool ^_^
well, fail.
12:40
It is not really a security vulnerability anyways. Just an exploit of their terms.
also my Lua VM got loops today
1 message moved to Trash can
@Global 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
How can I call this function inside function?
https://gist.github.com/anonymous/5714058235708afbf568f9c2380b7754
13:05
@Global hm
@Global but you're calling it? You're trying to pass the function as a parameter.
What do you think equipmentMenu(gamePlay(equipmentChoice())); is doing?
no, equipmentChoice is defined inside gamePlay and he's calling it outside.
@Luggage he is also calling it inside
@Global Do you mean to make gameplay an object that contains multiple function?
@BartekBanachewicz ohh, right.
equipmentMenu contain switch case, depending on value from user input in prompt
13:23
@Global so you need to return that
@BartekBanachewicz But I am returning it? Returning the prompt. You you mean below?
https://gist.github.com/anonymous/10d08fcde599450521e5687a1e1f4977
@Global equipmentChoice does return; gamePlay doesn't
which means the result of equipmentChoice gets discarded
@BartekBanachewicz Oh. So I need to use return equipmentchoice() inside body of gamePlay? Because this is supposed be looped every time player looses. Thought it was possible to call it directly within gamePlay
@Global if you want the result propagated, yes
@Global it's possible to call it directly, but the return isn't pushed further
@BartekBanachewicz Okay. I'll try only use, intro(); and return equipmentChoice(); instead then. But how can I see the actual value in equipmentChoice outside the function? Like console.log, just to make sure it's not undefined.
13:39
function f() {
  function g() {
    return prompt("g?");
  }
  return g();
}
alert(f());
@BartekBanachewicz Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
@Global see above
@CapricaSix cap seriously I misclicked, lol.
@BartekBanachewicz excellent! Thanks a lot
Feel that Javascript is tougher than C#.. Having hard time to understand closures and how to call functions in functions, flow etc.
@Global Yes, JavaScript is a bit harder to follow
But that more complex flow rewards you with very good control over abstractions that classic OOP can't give you
Bought this book Eloquent Javascript, but the examples are difficult to follow, really.
13:43
@Global You bought it? It's available for free online
@Global Just stop treating functions as a special case.
They work just like any other value; you can take them as parameters and return them.
@MadaraUchiha [citation-needed]
@BartekBanachewicz Yeah, that's a pretty radical concept for someone whose entire programming education is summed with C# or Java
@BartekBanachewicz You can abstract and inject behavior, as opposed to abstracting and injecting just data.
Except I'm pretty sure C# has 1-st class functions
.map() is an excellent abstraction
"classic" OOP has patterns for that
13:45
@MadaraUchiha I don't think it is a concept anymore. I think it is just a fact that people can't wobble down their throat for some reason.
they suck, of course, but it has them
@BartekBanachewicz Yes, namely, polymorphism, but it's not as powerful.
Yep bought the book. Found out later I could get it for free... I really hope you're right..
@AwalGarg the reason being bad teaching
(Not nearly as powerful)
@BartekBanachewicz Definitely bad teaching.
13:45
Hello"
@Global The online version has interactable code examples
I've created my first script JS
That you can play around with
@Global it's powerful in a different way. There are things that subtype polymorphism can achieve that concept based generics can't and vice versa
Technically even C has first class functions, but only as pointers. So not completely first class but nearly first class.
13:46
If you have any questions about them, feel free to ask.
It's my first script js (but isn't useful lol)
@AwalGarg Function pointer isn't a function.
@BartekBanachewicz how do you go about fixing a badly taught student?
@AwalGarg In C, everything is first class, that's not necessarily a good thing :)
@AwalGarg Always individually, but usually you have to fix fundamentals first
@MadaraUchiha No; e.g. types aren't.
13:47
@BartekBanachewicz Right
My C is like my Spanish.
I don't speak Spanish.
@BartekBanachewicz Sounds great. I'll just keep on studying. Any good site you'll recommend?
C sucks
Python is better
@Global For Javascript? I'm not probably the one to ask.
But I personally like that one GH tutorial I found once
@Rain Write a graphics driver with Python, and then tell me how much C sucks :)
But then again I liked it because it had a very steep learning curve and a lot of details
so maybe not what you need.
13:48
@BartekBanachewicz As in, do you just tell them "your information is incorrect and what I am telling you is correct instead" or some other sophisticated way?
@MadaraUchiha I don't must create graphic drivers lol
Because that sentence I quoted is technically valid, but maybe people don't take it nicely.
@MadaraUchiha I think that it would at least be more stable than most of the graphic drivers
@AwalGarg It's a hard problem
@BartekBanachewicz And about 10 times slower, but sure.
I prefer when they execute it down to every single detail, so you're able to understand the concept.
13:49
anyone has any script js useful to create?
@AwalGarg Initial impressions are very hard to shake
@MadaraUchiha I don't think so. The graphics drivers aren't slow because the language they are implemented is slow
Instead of code where it should be like that, because that's the way to do it
They are slow because of stalls and locks between the hardware parts.
That's why most Java devs look at JS, think they can apply Java to it, fail, and never try again, denouncing JS as a "horrible language that no one should ever use"
13:50
??
@MadaraUchiha yeah in practice it is. I don't understand why, though. It really is just like telling someone that bob's name is actually bob not jack.
Anyone has idea for js?
@AwalGarg No, it's not.
@AwalGarg sometimes. But sometimes you need more to convince them
@MadaraUchiha "functions are just values not special things" "that guy is actually called bob not jack"
13:51
@AwalGarg "but my book said they are special"
@AwalGarg No, that's not the same
@BartekBanachewicz That's the issue ^
@BartekBanachewicz "but aunt said his name is jack"
@AwalGarg When you're being taught something for the first time
@AwalGarg You seem to assume they trust the book blindly; the books have their own reasoning. Fighting simple facts is easy. Fighting bad logical reasoning is hard.
The information takes the form of some sort of mental model
Shaking that mental model is hard for most people
13:52
@BartekBanachewicz so what is the book's reasoning? maybe fight that reasoning instead?
@MadaraUchiha cue people learning Haskell and seeing "return" keyword (it doesn't return anything)
When you think something behaves in a certain way, and you experiment (wrongly) and that only serves to enforce the wrong mental model
Destroying and reconstructing it is super hard.
@MadaraUchiha fair enough
@AwalGarg You can. But everyone forms their own model, as @Madara said. You need to tailor your explanation for the particular person
so bad experimentation with bad knowledge is the bad issue
13:53
It's not necessarily "bad"
@AwalGarg it doesn't have to be explicit "experimentation" per se
Again, Haskell. You might be a great C# or C++ or JS programmer, and your knowledge will hurt you there.
You work with the language, and as the language behaves, you shape your mental model
@MadaraUchiha yeah, thought experiments too I guess
If you assume that functions are special things, and you don't pass them around, and you don't change them in runtime (because that's how you're used to with Java), and you keep using JS that way for months, then suddenly someone throwing that mental model you've developed over that period of time out of whack, it's hard to adjust
That's why when I experiment on new things, I experiment on disprove, not prove.
@Rain Write me a form that validates itself
The user can write their name, a subject and a message
The name and message are mandatory, the subject isn't
Also, the message must not be over 500 characters
Think you can do it?
14:08
posted on May 15, 2016 by Axel Rauschmayer

In this blog post, we look at problems that arise when template literals contain whitespace: Breaking up long lines Dedenting content Joining Arrays Indenting inserted content I’m using the library common-tags by Declan de Wet (with “useful template literal tags for dealing with strings in ES6”) to demonstrate solutions for some of these problems. Breaking up long lines Occasionally, you

14:18
Since github has unlimited private repos now, should I make a simple "template" project for my own use private or public?
I half-think I shouldn't pollute public github with yet another boiler-plate template project.
yea. private. it has no value to others..
or i should look into yeoman or one of those other boiler-plater making tools..
14:32
Guys, anyone interested in a (paid) project to develop a JavaScript riddle for frontend recruitment? Ping me
11
@Luggage I hate boilerplate making tools
And I don't see a reason why not to do it in public, who cares.
yea.. reading about yeoman. too black-boxy
though, it was nice to make VSCode plugins. That's a good use of boiler-plate makers.
@MadaraUchiha not interested but just curious, what level of difficulty?
@AwalGarg medium, candidates are expected to know their way around JS (and frontend in general) performance
Reflows, DOM, a bit of big O complexity
Maybe CSS efficiency too
I was kinda hoping you'd take it tbh :P
14:37
reflow? pfff good luck
@MadaraUchiha Got a happy stable job now so I try to work on OSS stuff exclusively other than that :D
@Mosho Yeah, finding someone with that knowledge in Israel
I feel like they should look for bright young candidates and train them instead
But alas, I've already spoken my mind about this project, I'm not going to handle it internally so meh
aww, github won't let you fork your own repo. gotta do it manually on my end
clone and add a new remote, rename the old
I have an org dedicated purely to forks of my own repos just for this purpose
:)
meh, i'll just: git init && git remote add template <url>
and pull from template/master
14:53
!!> console.log( {1 : "test"} )
@BartekBanachewicz "SyntaxError: missing ; before statement"
@BartekBanachewicz "SyntaxError: return not in function"
@BartekBanachewicz "undefined" Logged: {"1":"test"}
!!> console.log( {-11 : "test"} )
@BartekBanachewicz "SyntaxError: invalid property id"
Are you sirius?
14:55
how to have an optional argument in a function that is of type boolean?
@BartekBanachewicz you know what? even template strings are not allowed as keys even though they are string expressions anyways
!!> console.log( { `1`: 'foo' } ); // not allowed
!!> console.log({ [`1`]: 'foo' } ); // allowed
@AwalGarg "SyntaxError: invalid property id"
@AwalGarg "undefined" Logged: {"1":"foo"}
@AwalGarg event template strings?
fixed, ty
Oh, I thought they were a thing
14:57
if (array[i] == equipment){
newArray = array[i];
Need to copy specific element in array to new array
since we are on wtfs, here is another one:
!!> [Array, Object, RegExp, String, Function].map(el => typeof el.prototype)
@AwalGarg ["object","object","object","object","function"]
and in fact Function.prototype is actually a no-op function which jQuery and all other libs proudly re-invent as $.noop or whatever
!!> [Array, Object, RegExp, String, Function].map(function (el) { return typeof el.prototype })
@littlepootis ["object","object","object","object","function"]
14:59
ok
yeah, I am not just tricking around here :P
another one: if a function takes destructured parameters, then that destructured parameter is required. not passing it is a typeerror (effectively). but for regular ones, there are no parameter checks
Hello Ppl
@Ashley 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.
ok last one before I go for cookies: Object.assign calls the internal Set function with the throwable flag, so if you give it a sealed object and one of the keys from sources is not present, it leaves the object in an inconsistent state with some keys written and some left as is.
JS is such a terrible pile of shit.
!!afk cookies
You eat cookies for dinner?
15:14
Just wondering, why would my account be question banned?
@Jasch1 Too many downvoted/closed/deleted questions.
Not enough upvoted questions.
How can this be reversed?
@Jasch1 Edit your current questions so that they receive upvotes.
15:19
Nobody looks at them because they are old
Omg did you guys notice how many tutorials there are made by developers from india when looking for java related content?
@Jasch1 Editing them bumps them.
@littlepootis I had dinner before. Went for cookies later.
15:42
ah
Hey @MadaraUchiha is the JavaScript riddle still open?
@Mr_Green Yeah, you have experience with these things?
I don't think so. I just created a sudoku app once long ago
thought I could give a shot in my leisure time
@Mr_Green Yeah, no, it's a serious project, deadline and everything.
Only take it if you're committed :)
15:47
ok np. can't do it then :)
@MadaraUchiha see? web stuff will always remain a silly copy of native tech. even in comics and jokes. that comic was originally based on tar commands.
@AwalGarg First, they ignore you, then they laugh at you, then they fight you, then you win.
@MadaraUchiha and then you get confused and curse yourself for life? sounds like a plan
@MadaraUchiha how many hours is it
16:01
Hello!
I'm bck
@MadaraUchiha Have you write a exercise for me in JS? Right?
I don't found the messages, can you remember me it?
@Mosho The lead guy estimates around 20 hours
But it depends on the taker
@rlemon the whole album is funny
16:17
@AwalGarg hah.
I just use dtrx.
I tried memorizing them once.. I couldn't.
found there is an irc channel for windows on freenode. tried trolling them. they responded incredibly seriously and asked me to stop trolling :'(
how to write synchronized methods in java script?
typical windows users
lol
There's a #windows on freenode?
I want to.. troll them.
@AchillesRamNakirekanti The Java room is 3 blocks away. Take some chilled water with you.
@littlepootis ##windows
@littlepootis what handle?
16:26
@AwalGarg hopeless___
@littlepootis good troll. also windows 7 lol
but I am not that guy
> [21:57] <not-that-guy> hopeless___: yeah there should be. windows is a very good platform with tools for everything and great community trust me
lmao
> [22:00] <not-that-guy> hopeless___: have you tried restarting?
16:47
@MadaraUchiha and the deadline?
Done w/ this shit
Account suspended again
No reason
For 30 days
@Mosho Flexible
@MadaraUchiha 20 hours for a quiz? wat
@AwalGarg It's not a quiz
It's a riddle
Something like "you're given a page with the safe, your goal is to unlock the safe" and unlocking the safe includes understanding the code, finding what needs to be done and clicked and whatever
I'm not the one leading it, I was just asked to see if I could find someone who could do it.

« first day (2038 days earlier)      last day (3135 days later) »