« first day (2597 days earlier)      last day (2352 days later) » 
00:00 - 20:0020:00 - 00:00

12:02 AM
does anyone know how can I use node module fs (file system) in vuejs? I'm developing on nwjs with vue, but I am blocked at the node module import, it never works
 
@Shadow "Never works", be more specific. What errors, if any?
 
sorry, I'll post it in a sec
`This dependency was not found:

* fs in ./node_modules/babel-loader/lib!./src/(IP removed)

To install it, you can run: npm install --save fs`
I already tried installing fs, but does not seem to be the node file system that is suppose to install
however I am running on a node environment already
and the fs module is being imported correctly when using vanilla javascript (no vuejs)
 
shouldn't matter with nwjs
And you definitely don't need to install it
 
that is what I thought, but still it is not working
web solutions refer to empty the node in webpack, but once I do that (node: fs:"empty") it results in an empty fs module
a example of this solution being suggested github.com/socketio/socket.io/issues/…
thought it would let the system handle the fs module as normal if I did that, but the alas it does not
 
Are you using target: 'node'?
 
12:11 AM
in wepack base config?
 
yes
 
I'll check
no target...
 
Either that or target: 'node-webkit'
 
I'll add it now
"require not defined" but I only added node webkit
no dice
app wont even start with node target
 
> In September 2013, the online image sharing community imgur suffered a data breach. A selection of the data containing 1.7 million email addresses and passwords surfaced more than 4 years later in November 2017. Although imgur stored passwords as SHA-256 hashes, the data in the breach contained plain text passwords suggesting that many of the original hashes had been cracked. imgur advises that they rolled over to bcrypt hashes in 2016.
booo
 
12:27 AM
@Loktar Wow, did they not disclose that?
 
no idea, I just got that in an email from haveibeenpwned or whatever the site is
> You've been pwned!
You signed up for notifications when your account was pwned in a data breach and unfortunately, it's happened. Here's what's known about the breach:
so yeah seems new
well newly reported
that's kind of crazy, almost 5 years ago and never disclosed?
er well I guess they "just surfaced" now
 
I tried installing the npm file-system to see if it would help, but nope
 
unnoticed for 4 years
wow
wew lad
 
throws an error that "fs" is not found in the file-system module
the problem as I understand is the require that is not working correctly
without vue, if I use window.require it works correctly, even without window.
but in vue, window.require does not work, but plain require appears to work, just not the same way clearly
 
I use nwjs but I've never used webpack with it, not sure sorry
 
12:35 AM
well this is odd
I am already using require correctly to fetch the nw module
no problems with that
I think I know what the problem is, the require is being done at the import level, not at the component runtime level
that was it, the IDE was elevating it to outside the component
now inside it no longer throws errors
but it also isn't creating a new file or folder, but thats a different issue I assume
thanks Ben, I was already going crazy with this for the past 4h, just this chat was a huge help
oh, it is working exactly fine, I just thought it was creating the files and folders in the dev environment, but it is already using the final paths for the prod environment. strange but this will make it easier for me!
 
12:54 AM
Wow, I had no idea I was in 5 different breaches
Imagine the chaos if haveibeenpwned was pwned
 
thing is, you can actually use it to pwn others
no need to download tons of lists right away and look through them yourself, just insert the victim's username/address into it, and it will tell you what list to use, complete with sources and stuff :P
we just can't have nice things
 
@towc No, it doesn't give you the actual data
 
I mean, we can, but we suck as a species
@KendallFrey links to articles from which you can google your way through the list though
in your case, it links directly to an actual paste with a hash from something
 
1:11 AM
oh that seems dumb
 
I feel like one way to do it right would be to have someone insert their email, ask them to confirm it by sending a link to that email, and then sending the results back to that email
ofc comes at costs
 
@towc That's exactly what HIBP does
At least for "sensitive" breaches
 
but would be interesting to at least say "make my email address unsearchable by others. If I want it, send an email to it"
@KendallFrey oh, wut. I can put your email in and see tons of stuff
 
But no sensitive breaches
 
how do you mean by sensitive? plaintext?
pornhub?
gov?
 
1:14 AM
pornhub, basically
 
oh, hadn't seen that option
 
it's in the faq
 
either way, right now hibp is as much a tool for blackhats as it is for everyday users :P
 
ashleymadison was a classic example
 
> Oh no — pwned!
Pwned on 20 breached sites and found no pastes (subscribe to search sensitive breaches)
lol it's gone up 2 since I last checked
 
1:16 AM
@towc I'm just gonna go ahead and guess that blackhats have enough connections that they don't need HIBP
 
@KendallFrey well, skids :P
 
is that a letterkenny reference or
 
I dunno what letterkenny is, so maybe?
script kiddies?
 
oh that way
I mean it's not so far off
The skids wrote fartbook
 
I'm going to go ahead and attempt to wake up early without external stimuli set by me, while feeling fully rested and relaxed
at this point I should just embrace the night, maybe
slowly become batman
my waking up late might end up being a real problem when I'll move to the hackerspace, with people not wanting to disturb me and what not
on the other hand, me going to bed at a decent hour has the same issue
maybe I should just give up and live on the streets :P
just get into the hackerspace to shower and shave
 
1:22 AM
Why would you want to live in a hackerspace
 
would you not?
constantly surrounded by people you can learn a lot from
cheap and all
 
@towc no I wouldn't
As much as I like learning, I also like privacy
 
internet's up 24/7 because so many people know how to fix it
@KendallFrey if you touch yourself all day, it's not my problem :P
 
Hi All, can anyone here help me to figure out my json problem? i tried to parse json to html but not any data printed out
 
@da_root 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.
 
1:23 AM
@towc If that's what you think privacy means, well, ok then
 
nah, I get what you mean, and I'll try for a while
I go in fully accepting that it might be awful
and knowing that I always have other options
 
I tried to figured out the JSON on html but the html page showing empty value: jsfiddle.net/oL1jf9bv
 
If I tried to immerse myself completely into "hacker" culture I'd go bananas.
Need a bit of variety in life
 
@da_root you have a parse error
@KendallFrey oh, I thought that actually living in a hackerspace will overwhelm me with variety
simply because people are doing different things all the time
and you get thrown into stuff you've never heard of before
 
Maybe I'm the only one, but I need some non-thinking time between nerding sessions
 
1:27 AM
also yeah, the hacker in hackerspace stands for the tech explorer kind, not specifically the security kind
@KendallFrey oh that. Yeah, I agree
Here we see a group of JavaScript engineers implementing a method that adds two numbers
 
@towc I like the reply chain
 
@towc can you please guide me how to fix it, because I am really new with this json
 
fascinating, huh?
@da_root it's got nothing to do with json, I'm afraid
 
I mean, part of it actually hurts
@thomasfuchs @deanboop @johncblandii I'll be honest, I think most of what we produce as an industry is garbage. If you look at the films being made when cinematography was only a few decades old, they were really crap by modern standards. Software is the same - we don't know what we're doing yet. Instead we write JS
some good points, but f u
 
1:33 AM
> node_modules/koa-body/index.d.ts(3,16): error TS2665: Invalid module name in augmentation. Module 'koa' resolves to an untyped module at '/tmp/build/node_modules/koa/lib/application.js', which cannot be augmented.
fix pls
 
add the }); but still not working :D
https://jsfiddle.net/oL1jf9bv/1/
 
@da_root still nothing to do with the json
remove the whole ajax/done part, and put in console.log('test'), and see if it actually logs it
if not, then try to find out why
 
Anyone good with regex and wants to poke holes in my code?
 
I do love a good hole poking from time to time
 
( ͡° ͜ʖ ͡°)
 
1:36 AM
7 mins ago, by Kendall Frey
user image
 
ok
 
it's not pon farr time
 
aaaaargh and there went a shitton more minutes
 
2:19 AM
woah..
I don;t use GH enough lately
just noticed the marketplace link at the top
 
 
2 hours later…
4:10 AM
2 hours later..
 
2 hours later...
 
4:38 AM
user image
4
 
 
2 hours later…
6:22 AM
@ssube what do you think of now.sh ?
 
6:48 AM
hello
I just made a react-native app and i want to launch it to App Store, but i want to change to bundle identifier before launching
should i directly change the bundle identifier in Xcode General >> Bundle Identifier >> org.reactjs.native.example.MyApp to the new identifier i want? how to avoid error
After reading a question on stackoverflow How to change the “Bundle Identifier” within React Native?, I'm confused...
 
7:04 AM
If you are authoring a library, ecosystem etc, good talk to watch : youtube.com/watch?v=G39lKaONAlA
 
user5891775
7:36 AM
hey
 
@everybodyHatesMe 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.
 
user5891775
8:05 AM
good day
 
9:12 AM
Hi guys, I need some help with a project I got with no documentation done in angular 1
 
Anyone made an website to view archived SO documentation?
 
I am trying to just serve the site so I can have a look at it, but I can't figure out how to do it... I tried npm start but seems like there is no script for it
If anyone has some time I would really appreciate your help
There is also no server.js file
I also tried running node app.js, but that gives me some errors
It seems like they are using grunt, but I have never used it before
I now installed grunt, ran grunt serve, but now have no further idea what to do
 
9:36 AM
Check out the grunt documentation and read the grunt file.. ?
 
I tried figuring it out but I am bad... I am assuming I have to somehow run one of the tasks
So I tried going to 127.0.0.1:9000/task/grunt-serve which I am assuming runs the task, however it doesn't work. Not sure if that is even a valid task, that is just what I found in the grunt.js file
Any tips?
I would really appreciate some guidance
Does no-one know or does no-one want to help? Sigh...
 
hi
 
Hi
If anyone reads this and is willing to help please tag my name
 
10:08 AM
test @Chris
 
11:00 AM
css only todo list
 
thanks for sharing @towc
 
11:14 AM
>css only
>uses svg
 
would u teach a student Vue or React first after vanillajs?
 
I think Ramda.js doesn't really force you to write your code in a Functional Programming way.
You should code in Elm.js
if you want to be functional
 
@SuperUberDuper I'd teach them how to drink responsibly
 
However, Ramda does implement many conventional functional programming APIs such as compose
 
@SuperUberDuper how about neither
teach them to use ES6 instead
teach about build processes (how to use npm, gulp and webpack)
 
11:29 AM
and a little about software engineering :P
 
11:42 AM
@littlepootis well, no js
!!breakfast or lunch
 
@towc breakfast
 
!!Live or die
 
!!mr robot or oss
 
@Abhi I'm afraid I can't let you do that, Abhi
@towc mr robot
 
@Abhi just try not to kill yourself
if you're having second thoughts, chances are you've already gone past it
we don't know you well enough to feel emphatic about you
what's your favourite color?
 
11:56 AM
>css only
>uses html
posers amirite?
 
12:25 PM
I have just started to learn JS 4 real, and I started up by extending the HTMLElement, and I'm apparently NOT supposed to do that. Are there any other alternatives in pure JS?
 
12:41 PM
@gloriousCatnip alternatives for doing what exactly?
 
For being able to extend HTMLElements
but for some reason, that is not good to do
 
1 message moved to Trash can
@gloriousCatnip 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
 
HTMLElement.prototype.switchClasses = function(cOne, cTwo) {
	// Toggle from one to two
  if(this.classList) {
  	if(this.classList.contains(cOne)) {
    	this.classList.remove(cOne);
      this.classList.add(cTwo);
    }
  } else {
  	console.error("no classlist wtf");
  }
}
 
1:06 PM
@gloriousCatnip make a method that takes the element as an argument as well
 
1:17 PM
Has anyone wrote a website to view stackoverflow.com/documentation
 
1:37 PM
They shut that down
 
user5891775
2:31 PM
Hi, I'm Farty
 
TypeScript - What does type assertion mean in this syntax?
let mySquare = createSquare({ width: 100, opacity: 0.5 } as SquareConfig);
where
  interface SquareConfig {
    color?: string;
    width?: number;
  }
  function createSquare(config: SquareConfig):{color: string, area: number}{
    // ...
  }
Got some idea
 
2:53 PM
@Cereal I know.. but they offer to download the archive which is in JSON format..
160 MB JSON file.
How do you embed images again?
K just the link
 
welp, smbc took an interesting turn: smbc-comics.com/comic/mathematical-methods ?
 
> Renewing an Ontario health card is free.
God I love Canada
 
3:12 PM
anyone here a network engineer?
 
no, but you could call this an engineer network
 
ok
 
What are my options for using a package that doesn't have a definition file, just declare module "foo"?
 
that's the local way to define it, yea..
 
So if I wanted to use github.com/tunnckoCore/koa-better-body, I could just do
declare module "koa-better-body" {
   const nope: any;
   export = nope;
}
 
3:20 PM
yea.
or type it more, if you like.
 
Read the source.. and inference the type.. think like a compiler
 
() => KOA.Middleware //whatever the real type is
 
Ah okay, thanks
 
@BenFortune If you're the good guy, you'll create a type definition and submit it to DefinitelyTyped
 
@KendallFrey That's for the future, just wanted to get it working for now
 
3:24 PM
Oh yeah for sure
 
Hello (Java)Scripter .. joined just now to see what I missed.
 
@devbd 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.
 
I read that as Java(Script) at first. I'm calm, now.
 
@Luggage glad that you are not clumsy :D
this @CapricaSix is a bot! Where is the other 1-5 bots?
 
her and @KendallFrey are the only bots here
 
3:28 PM
ah.. any Grails guy here?
 
How can I check a localstorage existing based on a part of the name?
here is my current code:
if (localStorage.getItem("infiniteScrollEnabled") === null) {
 
!!welcome traitor
 
@ShrekOverflow wat?
 
!!undo
 
17 mins ago, by Traitor
anyone here a network engineer?
!!undo
 
3:30 PM
@ShrekOverflow TimeError: Could not reach 88mph
 
^ Thats a good error.
 
Descriptive errors
 
errors every where ... need to faint.
 
@ShrekOverflow hello
 
What do you need a network engineer for?
I have been dealing with lower level network for a random musings project, I won't be helpful but I might be able to link you to the right docs.
(and someone liek Ssube / Luggage might actually answer)
 
3:34 PM
had some multi-boot usb questions
 
Thats not a Network Engineers question
 
not programming ones, eeeek
oh but thanks though
 
@Loktar I don't shop on BlackFriday
probably next year, I'll buy almost everything I need on one :P
 
black friday not worth it
does anybody get a lot of spam on their main email acct?
 
Me
 
3:42 PM
the feels...
 
I'm learning async await es2017
How do you handle this..
await somePromisethatNeverFullfills();
// rest of your code
 
has anybody given a try to next.js yet?
I feel node.js has a HUGE configuration burden
 
is it better than react.js?
 
Guys, what's the difference between these:
localStorage['name'] = 'something';
localStorage.name = 'something';
 
especially for beginners, I spent like an hour explaining various configurations to @oboecat
and <explicit words here> even I can't remember all of them
 
3:44 PM
@Shafizadeh one is using dot notation, the other isn't
 
so I tumbled upon next.js
@Traitor Next is react.
 
@rlemon both are valid and are the same thing? Just the syntax is different?
 
oh okay, no i havent yet
 
284
Q: JavaScript property access: dot notation vs. brackets?

Mark RenoufOther than the obvious fact that the first form could use a variable and not just a string literal, is there any reason to use one over the other, and if so under which cases? In code: // Given: var foo = {'bar': 'baz'}; // Then var x = foo['bar']; // vs. var x = foo.bar; Context: I've wri...

 
thx
 
3:46 PM
I mean I can just write the boilerplate code for @oboecat but thats something I want to avoid
for reasons mentioned in the video I linked earlier
 
what's a good way of building a website with the essentials?
1. a shopping cart, 2. registration page, 3. layout, 4. ui
is that what react.js is used for?
 
does react.js have built-in "a shopping cart/ registration page " ?
 
react is a tool to make views
it's not a pre-built website
 
how did you get started learning it?
 
reading the docs
 
3:52 PM
rtfm
 
how do you learn to read docs?
 
grades 1-4
 
in programming
how do you get started?
 
you just read them
 
ok
i had in mind that there is a way to do it better than other ways
 
3:54 PM
looks like, i am inside an interview board ..
 
there's many easy ways to get out of it, dw
 
im a visual learner so im looking at this to learn react.js
omg what the fuck have i been doing all this time
i should have learned react first, jesus
ReactDOM.render(<h2>Bacon</h2>, document.getElementById('example));
faster/easier than html + js
 
no and not necessarily
but go nuts
 
gigidy
 
.render? Why no JSX
 
4:07 PM
well...
@cswl what's JSX for you?
 
4:43 PM
@towc in b4 you suggest vue
 
meh
 
I still love vue
 
Oh.. I was alt tabbed
 
4:45 PM
I know a person named alt-tab
 
but 1) if he's enjoying react, no reason to stop him 2) the vue community is shitty enough, we don't need people like him
 
LOL
@towc so whats the way-to-go for server side rendering on React?
 
don't know much about react ssr
 
@ShrekOverflow ReactDOMServer.renderToString
or are you being somehow sarcastic
 
@towc I meant Vue.
 
4:49 PM
-_-
 
@Mosho Have you tried next.js?
 
I'm hearing good stuff about nuxt
never used it myself
 
nuts
 
Yeah I heard a talk about Nuxt
 
@ShrekOverflow no
 
4:50 PM
I expected Vue to propose Laravel as a means for SSR :Troll:
 
I still haven't heard 1 good critique from you against vue
 
vue sucks
 
^ that critique is good
 
don't see particular flaws in it
 
5:15 PM
greetings all!
I was wondering if any of guys know to make the passport req.user object accessible in client side javascript?
In express router, I can expose it the view template with res.render('home', {user: req.user})
and then in pug template, access it with something like #{user.username}
But how can I pass the req.user to client side js, not just the pug template?
I could set the desired information as an id of some other element like h1 tag, but that does not seem safe
do you guys know of anything else that would be better?
 
user7222571
hi i am using react-natve.      when i change something in js file nothing happen. Somebody knows why?
Scanning folders for symlinks in /home/t/react/test/node_modules (10ms)
┌────────────────────────────────────────────────────────────────────────────┐
│ Running Metro Bundler on port 8081. │
│ │
│ Keep Metro Bundler running while developing on any JS projects. Feel │
│ free to close this tab and run your own Metro Bundler instance if you │
│ prefer. │
│ │
│ github.com/facebook/… │
│ │
└────────────────────────────────────────────────────────────────────────────┘
 
so any help?
 
5:45 PM
!!pasta or chicken
 
@towc pasta
 
5:56 PM
@55Cancri "seem safe"
anything you pass to the client is unsafe
but if you need to pass from the server to the client, on the first load (not xhr) it's pretty nasty
<script>
  const whatever = #{JSON.stringify(obj)};
</script>
or however your template language would denote it
 
6:30 PM
That is exactly it rlemon
It ended up having to be through the script tag
 
7:08 PM
 
7:39 PM
O.o
 
@tereško what were you doing there? :P
 
I found my new favorite color theme
Monokai Pro (Filter Octagon)
ealier I was not aware of a monokai theme that was not brown-ish
its like One Dark and monokai combined, but with monokai's syntax and one dark editor bg colors. Much better than one monokai
 
@BadgerCat there is this new thing, you might have heard of - twitter
:p
 
oh :(
 
I call coverup
 
7:52 PM
I have to say I've learnt not to care much about color themes
give me a net distinction between the things you're trying to parse, that attracts attention to none of them in particular, and I'm game
not to say some are not much better than others
but honestly, meh
 
@rlemon @Luggage i.imgur.com/WITjkp8.png custom designed realtor business card holder
 
wow, nice.
 
nice
my printer is pissing me off
 
😒
why what's going on
 
looks good :D
 
user4272288
7:58 PM
HI, I HAVE A QUESTION:
 
@IsmaelRenteria 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.
 
dunno why yet, but the hot end fan that cools the heat sync stopped yesterday mid print
so the hot end is all jammed up now, and the fang deformed
 
@towc thanks man
@rlemon ouch wth
 
yea I'm going to take it apart later today
when I feel like fighting with machines
 
yay I'm a man now
 
00:00 - 20:0020:00 - 00:00

« first day (2597 days earlier)      last day (2352 days later) »