« first day (2853 days earlier)      last day (2320 days later) » 

20:05
@JBis You have all of the right ingredients, it's just hard to read
well it's gonna be with all those shitty ligatures
@KevinB my mistake was overreading the code to be literally what I was reading in time... i read currentDownloadStateArray[fileName] as assuring me there was a property in the currentDownloadStateArray called filename... there wasn't. it is not created until it actually iterates through and attachs sets the property to the object or primative it is assigned to
i illusrate it here...
jsbin.com/hiwomaxaji/edit?html,js,console,output with trying to console out foo before it is set
to fileName... at first that value is undefined.
@BenFortune me?
@jake what would you suggest?
!!wat
20:09
@BenFortune fite me
now the way i can clean up my queston and now I see the use case of doing this... is to get a list of objects that are defined by property they contiain so that it can be referenced directly in an object of a group of ojects.. i.e. dictionary of dictionaries
@jake also may I ask what editor u use?
visual studio code
so instead of saying this
What is the purpose and usecase(s) of taking an object [property] and setting it to another object?
perhaps I should say this...
What is the purpose and usecase(s) of taking an object [property] and setting it to another object that contains a property that will be used to identify the new cooresponding object...
is that better?
@JBis Tell a story, condense everything down to small actions. small actions 👉 explicit input/output 👉 referential transparency 👉 coding happiness
@jake so instead of one jumbled shit split it into more smaller shits?
like set everything to variables and use in next action?
20:14
smaller shits means that global things like hoisting can't mess with your stuff. function doTheThing() should only do the thing
better example:
Is it advisable to dispatch new Event("change", {bubbles: true}) each time I change with code the value of a textbox or something similar?
you could
but you shouldn't need to
unless you want to deal with a third party lib that only listens to events
otherwise just call the handler when you make the change
sidenote: anyway to base64 invalid characters?
0
Q: How to encrypt strings that may have non-base 64 characters

MRKUPDATED: The problem was me! I did a mistake otherwise both Cods (below and the one at PS are correct) But still thanks to great answer from @Luke Park that I learned something new. I am not familiar with encryption/decryption algorithms, Therefor I search the net and found this class: Encrypting

but for js
@JBis editlinks(), get all of the getElementsByTagName() first, then pass it into the function as arguments
0
Q: On buttonClick in NodeJS

Lyubomir Ivanov ValchevI have a form that consists of 2 text boxes and a button. When the Login button is clicked it should check if the username textbox equals to 'admin' and if the password textbox equals to 'password'. If they are equal to that the user should be redirected to mainpage.html, else the user should be...

20:18
I am doing an extension for Chrome and it edits the value of some textboxes in pages, so should I put it (maybe they have third party lib)?
@JBis I use the Webstorm variant Rubymine
@jake and what's benefit?
brb
@JBis if editlinks() isn't working, you only have one place to fix it
You are compartmentalizing potential problems
@KevinB Ugh, why can we only dv once
ok
20:23
It will illustrate the benefit
ur referring to `var list = document.getElementsByTagName("TBODY")[0];
var movnum = 0;` ?
another nice feature I'd love: import { exportsA, exportsB } from 'modules/*', where modules might be a directory with files exportsA.js, exportsB.js, exportsC.js. This would only load the first two, but doing import allExports from 'modules/*' would give an actual object with keys corresponding to the filename without the extension, and the values as the export of that file
very simple syntax, that would enable much better static analysis, as to load arbitrary files you don't need to actually run any js
no more middle-files to just load all the contents from a directory
@towc just write a script to generate the index.js file for you
I'm taking this to the tc39 irc
@rlemon that's a temporary hacky solution
20:29
@JBis Read the article (it even has pictures)
but yeah, I could do that
@towc well, not hacky at all :P
it might not be the prettiest solution, but it's far from a hack
20:29
it's transpilation already
tools working on the source code will already have trouble
how? it's the same modules they already read?
@Jake Ooooo pretty pictures ;) . I would think that bbb is better. So much more functions to define and call and follow.
@KevinB another confusing thing... the property name... i was thking because the object 's property name that was the same as itself... made me think that it was being set somewhere for the oject... when in fact it wasn't, the property name came from another variable... so syntatically i could take the objects property name of filename which was set to filename and actually call it something else... that was another confusing aspect.
@rlemon oh, you're suggesting not changing the source at all
just creating that index.js file
yes
20:31
@JBis If you have any intention of ever learning React, functional programming is the foundation.
webpack probably already can do it for you
dir/index.js::
export * from './foo.js';
export * from './bar.js';

sample.js::
import { foo, bar } from './dir';
if you wanna do them by hand
@jake alright I'll go through code and fix. So just to confirm
function searchFoos() {
        var input, filter, tbody, table, tr, a, i;
        input = document.getElementById("myInput");
        filter = input.value.toUpperCase();
        table = document.getElementById("list");
        tr = table.getElementsByClassName("grid-item");
        for (i = 0; i < tr.length; i++) {
            td = tr[i].getElementsByTagName("a")[0];
            a = td.getElementsByTagName("div")[0].getElementsByTagName("div")[0].getElementsByTagName("div")[0];
            if (a.innerHTML.toUpperCase().indexOf(filter) > -1) {
just to confirm: read the article ;)
20:33
@Jake bleh reading :p But ok will do...
setSearchFoos(getFooElements()) // You can even chain things
@rlemon I've seen a few codebases where that happens. I don't think I've ever seen anyone use a tool for creating that
@Jake not function searchMovies(input,table) {?
but yeah, doesn't mean it can't be done
@towc maybe you can create one (although I highly doubt it doesn't already exist)
20:35
Have a function that gets things, have one that sets things
it probably does, but it would be neat to just have it in the standard instead
I love this instant comment deletion upon flagging common phrases
actually, this can be implemented as a module loader in nodejs
@towc if it didn't already look for index.js automatically I could really be on board with that.
have an entire function dedicated to


var input, filter, tbody, table, tr, a, i;
input = document.getElementById("myInput");
filter = input.value.toUpperCase();
table = document.getElementById("list");
tr = table.getElementsByClassName("grid-item");

??
20:36
looking at all files if index doesn't exist doesn't sit right with me
@rlemon again, modules/* is the syntax I'm suggesting, not just modules/
and what if an index exists?
now you have a circular ref of import/exports
there's probably better extendible syntax out there ("look only for pascal case files" or "also look for json files")
@rlemon then you're using an old pattern and you suck
it's still backwards compatible
ohh because that attitude works on the web :D
point is, it's an opt-in
don't try to access the files in 2 different ways
one of them is obsolete, and that's the end of that
20:38
lol
up to you if you want to use the old way. There's still people using var
but a lot of people have moved on
I think it might work
I'll suggest it, it's ultimately up to them (tc39)
I don't dislike your idea, I just don't think it would be compatible with how index.js is already looked at.
and I'm not sold that it's better
:43538598 thats not overkill? I mean and entire function to change things that are going to kept the same.
@JBis Honestly, don't do that, too much room for error. You will need to make the call whenever you need to refresh the reference to a given el
...
20:42
@JBis Interactive example from the article: repl.it/@panzerdp/HideousVisibleDromaeosaur
#tc39 :Cannot send to channel
uhm, I haven't angered anyone afaik
@jake just feels a bit like overkill but ok
oh, I wasn't logged in
32 mins ago, by JBis
sidenote: anyway to base64 invalid characters?
32 mins ago, by JBis
0
Q: How to encrypt strings that may have non-base 64 characters

MRKUPDATED: The problem was me! I did a mistake otherwise both Cods (below and the one at PS are correct) But still thanks to great answer from @Luke Park that I learned something new. I am not familiar with encryption/decryption algorithms, Therefor I search the net and found this class: Encrypting

32 mins ago, by JBis
but for js
20:51
certain characters are invalid for base64
It 100% is overkill to someone who is learning. As other people here have most likely experienced (probably including @rlemon), when you have a programming job, you will be looking at the same files for 6 hours a day. All of the time you spend muddling through disorganized code takes a very real toll.

When you boss says "I like what you did with the video page, but can you make it so that it doesn't show any filter/category combinations that return no videos"?

You need to make code that easily changeable without mental overhead.
^ just something I've been working on :P
> 5. Do not beg for help: If you have asked once and we ignore you then move on.
(arrow keys to move)
no ground detection yet xD
@oboecat what you do?
20:54
@oboecat Nice
@JBis if you mean what you can do in the game, nothing much at the moment. You can move around and there is a FOV.
@oboecat its cool
@oboecat nice
@rlemon so, tc39's point is that the ecma spec literally doesn't care how file paths are loaded
and they also heavily dislike export * from files
20:57
Its sick but will never be efficient
'they'
some dudes on the irc channel?
CSS transforms will never be optimized enough for gaming use-cases
or do you have a discussion you can link to
and they rightly say that most of the time you can just look deeper in the path
but still very impressive
20:57
@ShrekOverflow of course. but its still sick.
it's 2 people with +v (delegates)
@oboecat you could use CSS 😃
@towc ohh that is always recommended from me
for some parts
20:58
if you can just import foo from 'package/foo'; then that's way better
but lighting I don't think it'll ever be css able 😛 at that level
I love when packages have a file per module so I can do that
@rlemon but they agree that it's also often not what you want
because you might want to do some more processing on those files, and actually export them as a single object
which I was scared I was one of the only few who adopted that way of doing things
gtg
thanks for help today
adios
@towc I don't get what you're trying to say. one guy said he outright didn't like the export * stuff, the other said it would be better to import exactly the modules you want
when you import from a module, the module is run
which is why I personally like import foo from 'bar/foo';
I'm only running that module, not the entire library ( import { foo } from 'allthethings' )
21:01
20:50:00	<ljharb>	sure, lots of us do
I took this as "yes, you might often not want to do that"
although it wasn't very marked
there is never an 'always do this'
it's always per project / case
I don't disagree
like I said before. I don't dislike your idea. it seems like it could work if other things changed. I'm just not sold that it is better
like that meme, convince me
!!afk driving home
// Is fine the usage of anonymous functions here or I should do a normal code?
// I don't know why I just wanted to do some anonymous functions in my code to try them, and I did something like this:

let continueConfirm;
let dict;

(function() {
     continueConfirm = true
})()

(function() {
     if (continueConfirm) {
       dict = {"I have" : "Something"};
     }
})(continueConfirm)

(function() {
     //doSomething()
})()

chrome.runtime.onMessage.addListener(function(a,b,c){...dict...})
// Also, is better pass the variable as an argument (like in the 2nd function) or just use it (like 
@KevinB here is a complete foo bar'd example of me recreating the exact code funciton... i couldnt' do a constructor so i set it directly to state..
hoepfully this helps some poor soul
what do you guys think a better title would be for the question on stack
21:18
waffles
21:42
ok @KevinB i cleaned up the quesiton as best i could and answered it..
0
A: How can I take an object, set it to a specific property that is from a predetermined value that matches a property from another object?

Christian MatthewTo create a new object that is set to a value by another object which contains that object you would do the following. let state = { iteratedFoo: {} // this is a dictionary of dictionaried objects... an object which is a collection of objects. }; let currentDownloadState = (someValue, anothe...

somebody downvoted the question but i feel like it is a very useful question, pattern and potential missunderstanding...
why are you just smashing a bunch of bracket notation in there?
Update: Original version wasn't height aware - this one is dist-htgclybaav.now.sh (arrow keys for control)
22:04
is gravatar back
reanbling images
avatars arestil glitchy
for me
let me try an f5 again
yeah everyhing peachy
I just brought my new bike home
~350km was a great first trip
22:20
ew
awesome I would be biking right now execept for the rain
@BartekBanachewicz first thought "ohh 350 is not that bad" then I remembered 'bike', no f that.
even with the smoothest ride, must have been a stiff end
22:50
guys don't forget to turn down your 4-wat settings
@KyleVassella Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.

« first day (2853 days earlier)      last day (2320 days later) »