« first day (2290 days earlier)      last day (2660 days later) » 

9:00 PM
@neoDev I don't understand why you need to let your users store actual code.
 
at the moment I am elaborating existing variables, everything is fine...
but those variables are few
user input can create new variables by filling forms
 
http://codepen.io/wostensen/pen/YNVvLm
how can I get the value of ``{this.state.value} * {this.props.price}`` from all the child components in my Codepen?
 
so they will make the app growing
 
i need them for my parent component
 
@neoDev What are you trying to do?
What are you making?
 
9:05 PM
I told you a bot
 
You don't need users modifying the server's code for a bot
 
it makes sense
but at the moment I am still developing it
and I need to do that
at the moment nobody can store malicious code
only me
 
But why?? For what purpose will you be letting users submit code for you to execute?
What does a bot have to do with it?
 
the bot reads variables
elaborates them
that's it
user can add more variables
simple
so the bot can elaborate more variables
 
sounds like something AI-related
 
9:10 PM
What does "elaborating" variables mean?
 
several things, like every day processing
I'' create an open source project
for now is messy
is similar to luis
but with luis I had some limitations
so I created my own
or at least, trying to :)
 
Isn't LUIS an NLP thing?
What does it have to do with generating variables on the serverside?
 
@neoDev It understands language, right?
As in, English?
 
yes
 
9:14 PM
What does that have to do with generating variables server-side???
Have you ever done anything close to Machine Learning in the past?
 
no
 
I suggest you watch some Uni courses on it on YouTube
It's not a trivial subject, and it involves lots of math.
(And you definitely don't need to dynamically generate variables or fucntions for it)
 
I strongly agreed, but
for now it helps me
 
I still don't see how, honestly.
 
believe me, I feel happy for now doing this
it works
I will improve it in the future
but for now is ok like this
can nuke my laptop, but it's ok
I'll be careful
@MadaraUchiha in your opinion, how I should store the new intents (user-input)?
 
9:19 PM
You'll need to generate the variable, write the string down into your file, and restart the server.
Can you not use an object with dynamic keys?
var key = 'foo';
var obj = {};

obj[key] = 'whatever';
 
not at the moment because I haven't created a parent object for some variables xD
I told you, I am doing this because it's still messy
is only a temporary test thing
good thing is that works
and I want to add a lot of variables for now
 
!!> var a = {}; a[a] = a; a[a] // TIL
 
then play with the bot a little bit
 
@towc TypeError: cyclic object value
 
oh, works in chrome
oh, the error is for JSON stringification I guess
 
9:22 PM
@MadaraUchiha how can I include the database.js
 
@neoDev const foo = require('./database.js')?
 
it will look into modules
rifgt?
so I have to move it inside modules?
 
mmm
no
 
I think you've taken a bit more than you can chew with this one, why don't you learn node a bit more thoroughly first?
 
9:24 PM
because then I have to use foo.variable1
but I need to use only variable1
without foo
 
Okay look
You're saying things like "I need" but you don't explain why you need, it's not trivial, and that's not how things are done in Node (or in JS)
I'm getting the feeling of extreme XY problem
And I'm trying to help you help yourself by explaining the problem and perhaps providing an alternative solution
 
and I am thankful to you
believe me, a lot
I admit that I still have a lot to learn, but the tentation to try them is big
and I am also sorry, because I do not have much to offer to you
in terms of js knowledge
 
You have a problem
 
but I promise that I will replay you soon
 
And you say "Well, if I could generate variables dynamically, I'll be able to solve my problem!"
So you ask about generating variables dynamically
But I'm trying to get to your original problem
The one that can probably be solved without dynamic code generation which is highly unidiomatic for JavaScript.
This is called the XY Problem
"I need to do X, I can do X if I manage Y, let's ask how to do Y"
 
9:29 PM
Like asking a doctor for a drug, but never explaining the symptoms.
 
I could manually add more variables to my code
 
@Luggage That's a nice analogy.
 
like I already have
 
> "Hey doc. I need some arsenic.".. "Uhh.. no you don't. What's wrong?"
 
but I have to open my editor and write them
 
9:30 PM
@neoDev Like every single developer on the planet?
 
I would create them from an interface
but keeping things simple
so if for now I have:
var x = 1
from the interface I want to fill the form:
name: x, value: 1
thats it
 
Are you trying to re-write some code? Refactoring?
 
@Luggage am I the recipient?
 
what?
 
ok
 
9:33 PM
yes.
 
what you mean?
no rewrite, add more variables
 
you know how to add a variable.: var foo = ...;
 
yes
 
but if you want to dynamically add/remove key: value pairs, then use an {} or a Map
 
@Luggage He wants to add variables via a form on a webpage
Actual variables to his source code
 
9:35 PM
@MadaraUchiha exactly
 
So he saves opening the editor
 
You don't. Variables are for programmers. They are not data.
 
But I honestly don't see how this workflow improves anything in any way
 
they hold data.
one-time thing?
 
yes, like const
 
9:36 PM
search/replace on a text file to make a bunch of code from a list of identifiers.
 
how do I get values from child components in react?
 
you generally only give values to child components. But one of those values could be an event handler for an onChange event. That's one way.
is onChange appropriate for this?
 
my one parent component uses three other components in its JSX objects, and I need the combined values of the three child components
it might
http://s.codepen.io/wostensen/debug/YNVvLm/vWARwWzoyVjk
I want the numbers before ' kr' to be summed up
 
@MadaraUchiha so, require() will put my variables inside a new object
but I don't want to put inside an new object
 
yea, i think onChange makes sense here. They are value editors, like <input />
 
9:40 PM
but with eval() I can use them as they are, right?
 
but how do I get the values tho? that's the part I don't get
 
the child component calls it's onChange event.
 
how can the child component interact with the parent component?
 
can I do:
 
@gloriousCatnip You pass the onChange from the parent
 
9:40 PM
eval(fs.readFileSync('database.js'))
 
gtg
@neoDev I just puked a little inside my mouth. +1
 
^ lol
gloriousCatnip: Yea. parent passes a value and a onChange() so the the child becomes "dumb" and the parent manages the value.
 
so is ok?
 
@neoDev No. You don't understand us and we can't understand you.
 
Hello :)
 
9:44 PM
@gloriousCatnip may I have a link to the code in codepen?
 
Are you supposed to write tests before, after, or during website development?
 
@user6582640 Different schools of thought say different things.
 
Some say 0 tests :$
 
Although most agree that writing tests as close to writing the code as possible is a good thing
 
The dogma is before and during. Reality is after or never.
 
9:45 PM
omg yazz
that's how I feel!
 
I get: var1 is not defined
 
I use uri and api endpoints as my tests for a personal project
 
@luggage http://codepen.io/wostensen/pen/YNVvLm
I am trying to implement what you just said now
I want the value before ' kr' to be added to 'Total pris: '
 
eval(fs.readFileSync(__dirname + '/db.js'));
 
the value from all the Counter component that is
 
9:46 PM
var1 is not defined
 
In my case, though, I'm writing modules. So if I write, say, a Slack Module, I have API endpoints that I write for it, so it's easy to see if it breaks
 
so, I managed to fuck up a ubuntu install by trying to change the keyboard layout using sudo dpkg-reconfigure keyboard-layout or something similar
now on boot I just get a purple screen
well, it was about time I tried to re-install debian on it
 
thank you @taco
 
@towc What graphic card?
 
@user6582640 I'm not following a best practice, it's just my practice, but it works fine for me :$
 
9:47 PM
no idea
 
nVidia?
 
doesn't really matter at this point. I was going to retry to install debian tomorrow anyway
think so
I was really getting tired of all the ubuntu things
 
4
A: How to permanently configure keyboard

Privateusing sudo dpkg-reconfigure keyboard-configuration will change your keyboardlayout just for this session. go for sudo nano /etc/default/keyboard there you can change your keyboard settings. Find the line : XKBLAYOUT="xx" You can change layout and kboptions as well as your model and the kbvar...

 
Fair enough
 
note: not an ubuntu/debian fan myself
 
9:49 PM
actually, I think I should start investing in the idea of always bringing live usbs with me with the OS I need
 
you can probably boot off the rescue cd and edit that keyboard file
 
as to not have to redo the setup every time
 
@towc not a bad idea
 
fun fact: rebooting a second time seemed to have fixed the problem -_-
yup, all is working
for some reason reconfiguring the keyboard got rid of lightdm
 
figuires. that's what dude said in the SO post above
 
9:52 PM
and it's still the wrong keyboard layout -_- but that's probably on me
@taco oh
 
:p
 
urgh, my XBLAYOUT is gb... but pressing shift+2 still gives me @
it must be a separate ubuntu layer
damn it
and debian is still only trying to find a connection on eth0
 
10:16 PM
never asks for which AP to pick for wifi
so it already overrode my ubuntu install, and only now tells me that it can't seem to connect to any mirrors
 
I'm a RHEL guy, though I don't use Linux for desktop as it's hacky
 
10:42 PM
0
Q: Debian only recognizing eth0 on install

towcI'm trying to install debian on a laptop, on which I previously had ubuntu with everything working fine. After trying various ISOs (including firmware, looking at sid, testing, and stable), it always starts with looking for a link on eth0, debian never asks me to select a wifi access point every...

 
upvoted
 
well, apparently askubuntu is not for debian, as I should have figured out
0
Q: Debian only recognizing eth0 on install

towcI'm trying to install debian on a laptop, on which I previously had ubuntu with everything working fine. After trying various ISOs (including firmware, looking at sid, testing, and stable), it always starts with looking for a link on eth0, debian never asks me to select a wifi access point every...

 
That's why I don't use Linux for desktop. Hacking is great for drivers, but sucks on desktop. But even for drivers, the development is slow
 
once you get the setup going, you can make it work so much better for you than in windows, I still feel like this
 
@towc I've been using this website for 17 years. Might be worth a bookmark bhami.com/rosetta.html
 
11:01 PM
click "Linux" at top and then click the "Draw table & remember". Like that guy in the comment says "list hardware configuration" for linux would be one of several commands, e.g. lspci
Most likely it's not seeing your wireless device
 
In case if you havent completed the SO dev survey yet: stackoverflow.blog/2017/01/…
 
11:26 PM
madara are you there?
I figured out how to import db.js variables without put them inside a new object
 
 
lol
require('./db.js');
are they now global?
now I'm trying to check what I polluted in this way
 
@towc I stumbled on that too, lol
They might mean using tab to insert spaces, maybe
I do that in Sublime
 
11:42 PM
does anyone actually use spacebar to enter the spaces for indentation?
 
I never did it
 
@RahulDesai I think they meant mixing tabs and spaces
I have my tab key configured to insert 2 spaces in vim
 
what is the best?
 
@littlepootis I've heard you're clever. unix.stackexchange.com/questions/339384/…
@david a few years ago, probably most people who prefered spaces
 

« first day (2290 days earlier)      last day (2660 days later) »