« first day (2022 days earlier)      last day (2927 days later) » 

8:00 PM
Order is not a singular concept.
 
@Xan this little detail is the root of my confusion, so I have to be pedantic to resolve it
 
You have order of insertion and maybe order of retrieval. The collection has storage order, which can change.
 
@ssube they're all, orders of "something", hence, they are all orders
 
Under that, the array has order, the memory pages have order, the memory has hardware order, etc.
There are many different forms of order and, with a Set, you have access to none of them.
 
@ssube yeah... and this order always exists
 
Xan
8:01 PM
RAM = Random Access Memory = Tell-me-the-address-and-I'll-tell-you-the-value memory.
 
Krush, what exactly is your question again? Maybe let's start with that instead of going in circles.
 
Xan
Yeah, indeed.
 
@Krush which order?
 
@ssube again, you can't access the order, you can't read the order, you can't tell the order, you can't touch the order, you can't do anything with the order directly, BUT it exists?
 
Xan
We lost sight of the question.
 
8:02 PM
@Xan no I'm still on this detail
 
@Krush some of the types of order exist, some don't
 
Xan
Which detail?
 
@Xan when I get a concrete understanding, then it's answered
@ssube give me the name of one order that exists at one time, and then ceases to exist later
 
What is your question though? It's hard to answer something without knowing the question. These guys are being way more tolerant than I would be in trying to read your mind.
 
Xan
Define "ceases to exist"
 
8:03 PM
@Krush insertion order exists when you add the items, but is ignored by the collection.
 
Xan
No-no.
 
Memory page order can be changed by the OS.
 
Xan
Here's the crux
As a historical record, abstract, the insertion order "exists".
But after insertions, having only the result, you cannot reconstruct it.
In that sense it "no longer exists".
 
right. Adding items to a set is a lossy operation (sort of).
 
@ssube Say I make Set set = new HashSet in java, so somewhere in my RAM chip, there's insertion order?
 
8:04 PM
That order is not kept by the set and cannot be retrieved later.
@Krush stop focusing on what kinds of order may or may not exist
 
@ssube but the existence of order is MY ONLY CONFUSION
 
collections don't offer order unless they say so, which only List and the Ordered-Thing ones do
 
You don't have to offer order for it to exist
I hesitate to be repetitive, but I need to make sure that there's nothing else I'm missing
 
What's your question?
 
@Waxi whether Sets in your Ram have order somewhere, regardless of how you're ability to access it or use it
 
Xan
8:06 PM
Okay. Using my example above, if you insert 3, then insert 5, nowhere in your whole RAM can be used to tell that it wasn't 5 then 3.
 
@Waxi of you're ability, not how you're ability
 
Xan
It's nowhere there.
 
@Xan Awesome... that does not disprove the existence of storage order
@Xan whatever it may be
 
Xan
What's "storage order"?
We're getting philosophical.
"existence"?
 
@Krush I feel like you're asking a very specific, technical question, and not using the right terminology.
 
8:07 PM
@Xan ask @ssube for a better explanation, he referred to it many times, I think I have the same understanding of it
 
If you want to get into the implementation details, you need to be specific.
 
It's almost like I have to go down to the actual physics of how a computer works, to understand this teeny detail, I think I already have my answer, but I want to make sure...
 
Xan
Again, to my bitfield example.
[1,0,1,0,0,0,0,0]
That's the only thing stored in the RAM.
That's a set containing 1 and 3.
 
Maybe rephrase the question, what are you trying to do? I think Xan answered the question. Things stored in memory don't have a recorded order, why would they?
 
Xan
There's nothing telling whether it was "add 1, add 3" or "add 3, add 1".
Or, incidentally, "add 2, add 1, remove 2, add 3"
 
8:09 PM
Those 8 bits of memory have order (bit 1, bit 2, bit 3, ...).
The set they represent has no order.
 
Xan
And no element of that memory is "3"
And yet it represents 3.
 
@Xan but in memory, the bitfield is stored somehow, [1, 0, 1, 0, 0, 0, 0, 0] means at index 0 there's 1, at index 2 there's 1, everywhere else is 0, REGARDLESS of this order possibly changing in the next second, or your ability to access IT... Jeez
 
Xan
Yes.
Correct.
And yet it's not the insertion order.
That one is lost.
 
I wasn't talking about the insertion order
Okay, Xan answered my question
I'm going to assume ssube agrees?
 
Xan
In memory, any structure is going to be a sequence of bits. Ordered sequence. Does that help?
 
8:11 PM
Yes
Very
 
Xan
It doesn't make the Set any LESS pure.
 
Thank you... now I'm sure :)
 
There are many different orders. Some are lost, some change, some are visible, etc.
 
But the sequence of bits always remains a sequence, even if it changes so drastically that you don't what the actual f**k happened
Unless array gets deleted :D
 
So it seems like the question ultimately was, when looking at memory, what order were things placed?
 
8:13 PM
no
 
:(
 
:D
 
@Krush yes
if you want to be pedantic
 
Xan
The sacred incantation "Implementation-defined" is the answer.
 
but it's an order you will never see
 
8:14 PM
The question ultimately was, when looking at memory, things are placed in order?
Which has been answered yes
 
it might exist, it might not. Assuming it does will sometimes crash your program.
@Krush well :D
 
@ssube you might not use it :D
 
Xan
Yes. And yet "things" are not elements of the set.
 
memory address are relative to the process, but the pages under them are controlled by the OS
so the hardware under the memory could change at any time
 
@ssube hehe whoever controls them Idc, they exist, and you say you won't use them, I say you might not use them, :)
 
8:15 PM
you're dealing with multiple layers of "order" that could change out from under you
that's why we say a set has no order: it has no usable, visible order
 
TL;DR - computer theory and engineering salad
 
@ssube usable, hmm... you can use the order of the memory, and back engineer what happened in your computer to work out where yo element is
@ssube but we'll leave that debate for another time... :D
 
@Krush because arrays are ordered
 
Xan
@Waxi Yup, pretty much.
 
so the computer half-asses it enough to give you some small chunk that, within itself, will appear to be in the same order (stable)
 
8:17 PM
@ssube and it doesn't half-ass itself when you don't try and access [index]?
 
Xan
@Krush It can literally be nowhere
[0,0,1,0,0,0,0,0]
Where's mah 3?
 
@Xan whatever... you know what I meant... whatev
 
lol
 
Xan
No, at times, we don't know what you mean.
 
sadly
 
Xan
8:18 PM
And that's why we're losing so much time
 
My understanding of everything is too mathematical sorry
 
Xan
I dare say it's not mathematical enough.
 
lol
 
If it were you would die trying to talk to me
 
It probably would have been easier if he started with what he was trying to do and not with how he thinks computers work.
 
8:19 PM
Logic is only one half of your brain, the other is important too :)
@Waxi I'm not trying to do anything rlly P:
@Waxi just understand
 
omg
2 hours later, you're still discussing the same thing?
 
Yah :)
 
These guys talking about some low-level computer shit and I'm still fiddling with git...lol
 
You know how badly I want to kill myself when I have wasted 1 minute of my life getting score in this game, and after I have 3 seconds to go away from my death, I am just somehow so god damn stubborn that I hit this guy and die..
3 literal seconds
To move my mouse an inch
After playing this game for days
 
does anyone here know if Facebook remove the patent clause on their ReactJS library?
i found this link quora.com/…
 
8:26 PM
@erotavlas As long as you don't threaten Facebook with your product I'm sure they won't care.
 
hmm stackoverflow.com/questions/36946198/… why do i get a virus warning?
 
@FilipDupanović FILIP
 
so no changes
 
8:31 PM
You know hotmail, can you use any email address without any consequences?
as in after the @
 
anyone work with angular2 yet?
 
@erotavlas Not something I'd use though.
 
Xan
@Krush As long as "rejected for invalid DKIM/SPF" is not a consequence..
 
DKIM/SPF?
 
Xan
@Krush This is a good overview: blog.codinghorror.com/…
 
8:33 PM
In Git, is tagging just a way of committing the entire project to a point in time?
 
Xan
Tagging is just a way to mark a certain commit.
With a name.
Like a branch that doesn't move.
 
Heh, my chrome keeps track of all the trash gmails I make?
 
OK, so you're not really committing files when tagging.
 
no
There are two kinds of tags. I've used the one Xan described. The other, I never did, so I don't know.
 
What would be the other? (curious)
 
8:37 PM
Annotated tags
 
Xan
Okay, so it's name+description.
Still, it's just a point to a commit.
 
@Waxi branches and tags are just fancy names for a commit.
 
Xan
(Just like a branch is just a point to its head)
@ssube Errrrr no.
 
When you add more commits to a branch, git magically moves it to the latest commit.
Tags stick.
 
Xan
Well, yes.
 
8:38 PM
you can't checkout a tag
 
@littlepootis you can
 
Xan
You can.
 
you can check out any tree-like
 
Xan
"Fancy names for particular commit", not "fancy names for the concept of commit"
 
@Xan yes
 
8:39 PM
In this game I take too many risks, in my life I take too little risks, the gradient tares me apart so much so that I lose any meaning to continue living or playing...
 
fancy names in the symlink sense
 
How do you.. checkout a tag..?
 
@littlepootis git checkout version-1.0
 
It looks like I'll only ever use tags to say what version the master is at, most likely before/after feature branches are merged back into it. I think.
 
Xan
Okay, actually you can't directly checkout a tag.
 
8:41 PM
ssube@ops-vm ~/projects/build/docker-node $  > git tag v-1.0
ssube@ops-vm ~/projects/build/docker-node $  > git checkout v-1.0
Note: checking out 'v-1.0'.
 
Xan
But you can git checkout -b newbranch version-1.0 and the branch will have its head at the tag.
 
p.sure you can
 
@Waxi Here's another use for a tag: Show the current version on a sprint
 
@ssube Do you have a branch named v-1.0?
 
@Xan You can do that on anything commitish
 
8:41 PM
but since it's a symlink to the commit, you end up on the commit
@littlepootis nope
 
Xan
Ok, I'm just quoting git-scm, which is woefully outdated.
 
And you can checkout a tag
But you'll be in detached HEAD mode.
 
branches have some magic, tags are just a pointer
 
@ssube Branches are just pointers too, that move with the commit flow.
 
the underlying (patch) behavior is the same, git just remembers the branch
 
8:42 PM
@MadaraUchiha Sprint being a branch?
 
@MadaraUchiha magic pointers
 
@Waxi No, version sprint
Say your company has a weekly release cycle
You can use a tag as a pointer to "what's the current main version", which works better than branches because you can't accidentally commit to a tag.
 
many build servers also support creating a tag when they do a build
or only doing a deploy when you've created a tag
 
I think for my purposes I'll just tag the master before/after merging another branch.
I read that once you merge into your main, you should delete that branch and if I were to do that and something got out of whack, I could restore that branch right?
 
Xan
"Branch" is just a pointer to a commit.
After a merge, you have a commit that references, if you walk back, all of its ancestors. So it's not "lost".
 
8:50 PM
I'm just trying to understand why you would want to delete a branch after you merged it if it's not going to affect future deveopment.
 
Xan
Because why would you want the branch in the list of branches? There's already a commit that you can find saying "Merging branch 'blah' into 'master'"
It's the same as the branch in the first place, at the point where it's recommended to delete it.
If you do that merge often (without deleting branches), the list of branches becomes significantly bigger than list-of-branches-you-care-about
 
Ah ok, so it's a best practice thing...gotcha.
 
Xan
Deleting a branch does not delete any commits. They may become inaccessible if nothing else references them
But after a merge, the merge commit references them.
You don't need anything else to see the full history
@Waxi It's an "I want git branch to be useful" practice.
 
If I have a file in my master, and I branch off with it making changes to it, I'm never truly going to have 2 files in the system? I'm kinda confused on when I open my text editor and I'm working on that file, am I working on the master one or the other one at that point?
I've jumped back and forth between commits and noticed it changes my file in real time, which is cool, but is that the same for when I have multiple branches?
 
Xan
When you checkout, you set your working directory state to the state from the commit at the head of the branch (for tracked files)
Or the exact commit, if you're checking out a commit.
 
8:58 PM
Ah ok gotcha...no multiple heads running.
 
Xan
You're working on your working copy, and if you stage-then-commit your changes they will make a new commit based off your current HEAD
 
That's what I was trying to ask, there can only be one active head at a time...
 
Xan
Yep
When you branch, you create a (new) label for the current HEAD
 
@FilipDupanović FILIP
 
Xan
When you commit changes, you create a new commit based off current HEAD, it becomes the new HEAD, and the current branch will point to the new HEAD.
 
9:01 PM
This stuff is so slick. Never thought version control could be this good. Gonna work on my skills some more tonight so when I get back to work on Monday I'm ready to rock.
 
Xan
So much for this being a JavaScript room. When was the last actual JS question? (ReactJS licensing doesn't count)
 
lmao
The people in here seem to be knowledgeable in all things, not the case for other rooms.
 
Xan
I'm not complaining, just finding that amusing.
 
9:17 PM
What is the ignition timing for a '72 Plymouth fury?
What is the recommended temperature to cook venison?
Should I invest in money market funds?
 
Xan
1) Which engine model? 2) Which cut? 3) What's your risk model?
 
9:36 PM
1) no engine, 2) paper thin, 3) I'm bankrupt
 
9:59 PM
Does JavaScript have anything similar to Lua's metaevents? For instance, if an object does not contain a member that is being accessed, a meta-event is called that if a function is passed the object and the key into, and its return value is, what you get from trying to access a member that doesn't exist in the object?
It's an interesting meta-programming feature that allows emulating OOP, and I'd like to design a custom OOP in JS with some similar functionality...
 
@Krush no
you can do it to a limited extent with Object.defineProperty
but there is no "oops not found" callback
js has prototype chain, is that anything like what you want?
 
maybe
 
@Krush this is why lua is better than js, imho
 
Lua is more crude and has some weird, ugly features like indexing start from 1
 
10:05 PM
lol, js is based on it, and it is js that is more crude
 
And javascript is generally more developed, easily usable in web development etc etc
 
i am looking for a way to generate unique 6 digits hashes with integers only
any ideas?
maye based on time
so collisions can be avoided
 
js is stripped down, same as lua but removed all the extreme flexibility of __index etc
 
reddit.com/r/javascript/comments/ft7zn/… my reasons, like this guy's, mostly
This is why I want to design my own language though
 
Xan
@Zombievirus "unique" and "hash" don't go together well. "unique" and "6 digits" don't go together well either. Do you need any hash-like properties? Define "unique" if you only have 1000000 possible values.
 
10:08 PM
i need customer ids and booking ids
 
Xan
Then you need just a counter.
 
customer id can be based on their email address
 
@doug65536
 
it's about the first customer id and first booking id which will have to be hardcoded.
doesn't seem secure
 
@Krush I used to do stuff like that, until I realized how fast and lightweight luajit was... lol you got me on a lua kick
 
Xan
10:11 PM
The only way to guarantee uniqueness is to have a counter, issued by a central authority, and panic as 1000000 gets exhausted.
If you generate anything on client side, it's going to break uniqueness.
 
@Krush I am using luajit in a project I am currently working on, so I have lua at the front of my mind lately
 
@doug65536 I'm especially attached to functional programming, and I'd like to merge something like Lua, with something like a hybrid of Scala and Haskell.
@doug65536 you familiar with functional programming, if so, maybe Scala?
 
@Krush not serious stuff. just simple map/reduce type stuff
 
Xan
@Zombievirus I'm sort of guessing that when you want "hash" you just want non-guessable IDs.
 
@doug65536 imagine variables don't exist, everything is either an immutable constant or a function, and functions can't access anything outside their bodies. What's your first impression of this way of programming? :D
 
10:14 PM
well pretty much.. yes
 
@Krush emphasises too much cleverness for my taste
 
hash was the first thing that came up when i googled for a solution
 
I am a KISS principle believer
 
Xan
@Krush "Finally! A language that compiles straight to result!"
 
@doug65536 cleverness... It makes you think
@Xan ???
 
10:15 PM
i have no problem with incrementing, it's all about how to begin. how to come up with the very first customer id and very first booking id
 
Xan
@Zombievirus Hash is not guaranteed to be unique.
@Zombievirus What's wrong with "1", or "42"?
 
@Xan what you mean by a language that compiles straight to result?
 
Xan
@Krush If everything is a function or a constant, then it reduces to a constant. Massive optimization, that!
 
it would be hardcoded
 
Xan
It can be fully evaluated at compile time
 
10:17 PM
@Xan yes! I've been thinking so much, it's beautiful when you think about it
 
Xan
Except impractical if you ever want anything as input.
 
@Xan Imagine that every program written in this language is one function, but it can be written in such a way to look similar to most languages today, and this one function has one argument, which is the input universe, still adhering to the no external-scope access!
@Xan the interpreter decides whether to execute this function once, or as fast as the CPU can run it.
 
Xan
 
@Xan it's pretty much the "main" function, but everything has to be inside it, other files can be any fragments, broken at any point, of any code written in this language, only to be loaded and embedded into the main function
@Xan :D
@Xan but it's very practical...
 
@Krush how do you debug that?
 
10:20 PM
!!unban thepiercingarrow
Hi everyone!
 
@Xan I haven't thought that far ahead :D, there's most likely a way though, every obstacle I come across trying to think of how this language would fare, once solved, turns out to simpler than how most programming languages solve these same issues!
@doug65536 I meant*
 
cursor up to edit like this
 
how does a test command work in node?
 
Xan
Well, you are describing a pure functional program
 
ahh ok
 
Xan
10:21 PM
But it's by definition non-interactive
 
@Xan the purest :D
 
I am doing npm init and its asking me for a test command...
 
@Xan nope, you see, the programming is a function
 
@thepiercingarrow blank if you dont have tests. it is the command line to run to run tests
 
Xan
Once you start running it, it can't accept any input.
In many cases that's not practical.
 
10:22 PM
@Xan the interpreter can execute it as fast as possible, sending the input universe with contents of the environment, which always changes every time the function is executed!
 
Xan
Therefore you get your IO mess.
 
@doug65536 How do I make a test though? Any article I should read? I can't find any on google..
 
@Xan nope it can, if you think this way /\
@Xan !!! stop dismissing and read!
 
Xan
> the interpreter can execute it as fast as possible, sending the input universe with contents of the environment, which always changes every time the function is executed!
Aaaaand that's not pure anymore
You have your "event loop"
 
@thepiercingarrow there are several testing libraries. a test is simply a program that tries something and makes sure it did the right thing
 
10:23 PM
@Xan the interpreter decides to do whatever it wants with the function, but the program itself is pure
 
@doug65536 What is a good testing library for node?
 
@Xan ultimately nothing can be truly, pure in terms of functional programming
@Xan state will have to change somewhere
 
@doug65536 Wait so like for example if I use curl in my program then a test script could check whether curl succesfully curls something?
 
@Xan but as long as the program itself is pure, regardless of what the interpreter uses it for, I'm okay with that :)
 
Xan
Look, it's a good goal to have large chunks as pure functions.
It doesn't necessarily need a special language though.
 
10:24 PM
@Krush well, depends
 
yeah, a test might post a file upload, and look and make sure file is there
 
@Xan oh but I want to merge many features from other languages, because they would make it more aesthetic and less repetitive
 
it might then do delete, and make sure it deleted it, in a separate test. each test should be fully independent. it would upload and delete for example
 
I describe a Haskell program with side effects as pure
 
@doug65536 Thanks!!
 
10:25 PM
I like the asserts library, IIRC
 
@Kendall well if pure is used with the context of "pure of side-effects" then it's not pure
 
super ultra simple - this is as simple as testing libs get imho
 
@Krush still debatable
 
@Kendall I'm very concrete, my entire life is true/false, so you can debate if u want :)
 
the main function in Haskell doesn't do anything, it just returns a description of what side effects the runtime should perform
 
10:27 PM
@thepiercingarrow if you want more feature completeness, mocha is pretty good
 
@Kendall in this language idea, the entry function returns values, the interpreter decides what to use them, and like you can do mutual recursion, you can have the function get called over again, with the previous returned values, to emulate storage, and updated environment values to emulate external-scope access!
@Xan also /\, this is how the program, on its own and without regard to the interpreter, can be pure
@Xan but also interactive
 
@thepiercingarrow oh yeah, tests are awesome. they give you freedom and confidence to touch the code and not be afraid that you broke something
 
@Kendall but when I say you can have the entry function called over again, I really mean the interpreter, because it has to update the environment values
 
of course
 
@Kendall with which comes the issue of state, the but entry function itself is pure, haskell's side effect descriptions as return values of the main function are pure, because no side effects are performed during the execution of the function, only as a chain, however side effect descriptions still stray from the idea of purity.
@Kendall it's mainly morals, but aesthetics are important in programming to me too, I'd like programming as an art to one day become so flexible that what can be considered wrong, with a slight change of factors, which can even be the perspective of the developer, code can become considered right!
 
10:32 PM
that's already the case
 
So I have a little Angular 1 app with a Karma/Jasmine test suite that I've been working on, everything working fine
 
@Mason 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.
 
@Krush sounds like tail-recursing coroutines that use local variables for state
 
@doug65536 variables vary, no variables included here
 
decided to try setting it up for webpack instead of conventional deployment. Got the site working with webpack, but now all of the tests fail, because karma and jasmine don't know what to do with the require calls
 
10:33 PM
lol, but you have to decompose it into something that can execute if you implement a compiler, right?
 
@Kendall Cases can be found where this is true, but I literally mean, programming to become as fluctuant as painting, simply looking at a piece of code a bit more time can justify that it's 10x more effective than earlier, that's weird in terms of computers... But I'm sure it will happen one day.
 
trying to figure out how to get around that, nothing I've found searching around so far looks quite right
anybody have any ideas or pointers?
 
@doug65536 decompose what?
 
nevermind. you mentioned compilation of functional language earlier
I thought you were talking about that
 
@doug65536 the compilation I do not worry about, I'm mostly curious of the interpretation
@doug65536 simply put, the biggest troubles I've discovered with functional programming is accessing the environment, which is solved by having the interpreter constantly call the function with updated variables. And the other being storage if the function will always have to be re-called, but this can be solved by outputting storage variables, which the interpreter can decide to make part of the input universe.
@doug65536 that sentence was scrappy, I hope it makes sense :D
@doug65536 ultimately, all you did was define one pure function, that is an entire program :)
I luv' it :D
 
10:38 PM
you dont simply interpret the program, a functional compiler does extremely big transformations on the input to decompose it into something that can actually run
 
Yeah Ik
 
basic idea is the same up front though, input -> lexer -> parse -> AST -> IR -> optimizations -> output
have fun with that :D
 
But, how such decomposition will have to be done, I can partially predict, the interpretation, actually running the code, is what links to state, which is why I'm talking about it.
@doug65536 I've been studying compilation for some time, Ik
@doug65536 tried making a lexer in Python, but it was ugly, so I stopped :D
Ok, now that that's out of the way
Anyone have any recommendations for any emotional and/or romantic movies, anime, music I can enjoy?
PT Mono & Monaco, tasty fonts
I'm designing a color scheme for my language draft, any preferable hues anyone plz suggest?
 
If I have a directory named tests with file1, file2, and file3, is there some shorthand for ./file1 && ./tests/file2 && ./tests/file3 ?
 
10:55 PM
@thepiercingarrow typical setups just run all of them test/*.js
 
oh, that works?
 
well, ya, grunt can do that or whatever
usually I have a build system doing something so I don't remember off the top of my head, but "somehow just blindly run test/*.js" is a good starting setup
every test should be completely independent, so any sensitivity to what order they run is wrongness
 
do any of you guys know of dojo toolkit?
 
the best thing about tests is running just the failing case, and debugging straight into the problem, instead of dealing with entire-app/entire-server startup
 
@Krush here here
 
11:00 PM
@Filip heyoo
 
or what if any javascript frameworks libraries do your companies use in web applications?
 
@Filip -ino-san you watched NGNL?
 
Mhm, first 2 ep. Enojeyed, reminiscent of SOA and one more VR themed series I watches
Oh phone app ~.~
 
:O
You watched SOA too!! I need an Asuna in my life :C
NGNL is basically the embodiment of absurdity.
 
They always win in NGNL?
 
11:07 PM
Welllllllllllll
You ever watched One Punch Man? It's like that, but instead of just overwhelming with OP, they seem to just scrape-by every situation, regardless of difficulty, but barely, yet always... Though in entertaining ways... sooo
The anime's absurd anyway, though amazing at that, hence my fav :)
@Filip what's the other VR-themed series you watchesss?
 
11:26 PM
Mmm can't Google, but it was about this clandestine neural implant that would put you in a game where everyone is an avatar that represents their liberation of their greatest fears; players challenge each other to win points; if you lose all points, implant fries; points were used IRL for performance boosts
 
Wouldn't it be useful to be able to access and use members without repeating the container's name? For instance:
object = {
memberA = 10;
};
oops
 
1 message moved to Trash can
@Krush Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
object = {
memberA = 10;
memberB = 20;
};

x = object.{ memberA / 5, memberB * memberA }[1]; // expresses 200
Something like that
 
11:47 PM
with (object ) {
     x = {memberA: memberA / 5, memberB: memberB * memberA} // not sure what that [1] is
}
(Don't actually use this kids, dynamic scoping is le-terrible)
 
11:59 PM
Can I use with with a literal as a poor man's destructuring assignment?
 

« first day (2022 days earlier)      last day (2927 days later) »