« first day (2746 days earlier)      last day (2195 days later) » 

7:00 PM
I haven't used it much, but I can see how I'll soon feel so unproductive if I don't use it
 
ever since moving into Immersive Engineering i had to start using a newer version of java to avoid crashes which helped, but it still crashes once every few hours
 
now, to kubernetes I guess?
 
whatcha gonna cluster?
 
I feel like I want to play around with docker itself a bit more, but I'm not sure if it will be almost useless after I learn kubernetes
 
everything
it won't be useless. kubernets manages clusters, but you still use dockerfiles
 
7:01 PM
suggestion though... Try out a few of the attuned mantle of the stars... they're very strong, and well worth it
 
get a botnet and build a very uptimish service with kube! #lifegoals
@KevinB will do thx
 
btw, this is the stack I might be working with soon:
 
I'd learn Kubernetes, but I don't feel like Ill have a need for it in any closer future
 
I've never used pouchdb, exponea, (docker), couchbase, or kubernetes
 
@towc yay Jenkins
 
7:04 PM
kubernetes has some flaws, but it's pretty cool
 
couchbase is the one that sounds the scariest tbf
 
@towc not at all
@SterlingArcher what have you run into?
I've hit a few major bugs, most already tracked and being fixed, but
@KamilSolecki jenkins is a world of pain
 
jquery isn't in the list
it isn't a real company
 
hey, they have angular, give them a break
 
we use AWS, but we are fairly new to it
 
7:06 PM
@ssube to be fair it's the only CI / CL I used, is there a nicer world out there?
 
also, for some reason I hadn't heard of pouchdb
 
so far, it looks like it can cover all stuff you need
 
but the logo is so cute
 
oh yes :D
Jenkins is to CI/CD what hammerpants are to clothes
curious but no longer practical
 
do tell more :D
 
7:07 PM
we use a little bit of AWS, but should probably be taking advantage of more of what they offer
 
it's just an extremely old, XML-based, A->B->C style "build" runner
 
what would you recommend?
 
all the cluster-y container-y stuff is tacked on 15 years after the fact
 
will see how I like it, danke
 
@KarelG grats! How are they?
 
7:10 PM
@ssube have you done an RHCSA or similar exam?
 
@KamilSolecki Sure. I'm Zirak#21929
 
@Zirak we've played together yo
 
reset() is supposed to reset all of a view models properties, right
 
I'm Greenhill on Battle net
 
@Luggage I have not
 
7:14 PM
@KamilSolecki ...really? when?
 
then nevermind :)
 
@KamilSolecki you can use it on their server, which is popular for open source (I run my own)
until you mentioned the RH certs, I hadn't heard about them (or had forgotten)
the Ansible and some of the container ones look interesting, I might have to look at those after the CKA
 
is the CKA the first you are doing, then?
 
@Zirak 1 game, we did a challenge with Madara and ikari
 
oh
 
7:17 PM
I took SysOps in Jan, doing CKA mid-May
 
CisOps
 
nah we're cool with all kinds of operations now
has kubernetes not taught you about tolerations yet? :P
 
Where will you be when the sun falls out of orbit and kills us all?
 
@ssube your excessive use of acronyms scares me sometimes
 
mmmm, I see one acronym
 
7:20 PM
that's the problem
It's acronyms all the way down
GNU inside PHP inside GNU
 
they deserve each other
 
does sysops mean the LFCS cert, in this case?
 
aws sysops
 
ah
 
it's the top of their associate track, before the professional ones
I'll probably get the Google equiv at some point
 
7:24 PM
@ssube Neato, thanks <3
 
flow has poo comments
lol
💩 This is a comment
 
I'm not impressed. My comments were poo even before emoji
 
@zirak @Ikari @MadaraUchiha @SterlingArcher discord.gg/z2jDP6
yall ready?
 
yall is our word, you can't just use it like that.
I need payment for that, send me 3 lightbulbs and a polish sausage
 
?
it's in the dictionary
anyone can use it
 
7:39 PM
@KevinB So is the n word
 
i mean... anyone can use it
 
all of them should be. If not, you might need a new dictionary.
 
@KamilSolecki I'm here
brb
 
@Zirak NON MURDER WIKIPEDIA, IN YOUR FACE! en.wikipedia.org/wiki/Gruen_transfer
 
@MadaraUchiha we are ingame chat do come
 
7:50 PM
@KamilSolecki If you're connected to Europe, add me (Exeggutor#1304) if you've got room, I can play
 
Hello! I have a question and I would like some help. Can someone take a look, please? :)

https://stackoverflow.com/questions/49985423/last-item-of-array-logs-undefined-reactjs?noredirect=1#comment86988045_49985423
 
8:16 PM
@Timmy a directory is a tree structure and should use nested lists
 
Hmm, okay
 
@KamilSolecki i'll have to do something else soon if i can't get in
 
how the heck to you clear a reference pointer in javascript?
I tried setting the original object to null with no luck
 
JS doesn't have references
or pointers
 
well properties behave that way
 
8:20 PM
?
you mean after passing an object, changes propagate out?
 
you can delete a property from an object, but that doesn't delete the thing that the property held.
 
yes,propgate to other instances
 
setting a variable to null when it used to hold an object doesn't delete the object
 
they aren't other instances, that's why
it's the same instance, you're passing it around rather than copying
 
let me write out the code just to be clear
 
8:23 PM
I'll wager a guess that making your POJSOs immutable will solve this, but code is always good :)
 
var items = [];
var item = { elementProperties: null, inputDataProperties: null };
for(var i = 0 ; i < copiedObjects.length; i++){
                item.elementProperties = null;
                item.inputDataProperties = null;

                item.elementProperties = elementProperties;
                item.inputDataProperties = inputDataProperties;

                items.push(item);
     }
 
yeah, you only ever have a single item
items.push({elementProperties, inputDataProperties}) will work if you have es6
 
I tried also with var item = in the for loop with same result
 
JS does not copy objects by default, nor does it pass a reference in the traditional (C++) sense
253
Q: Does Javascript pass by reference?

J AnyDoes Javascript pass by references or pass by values? Here is an example from Javascript: The Good Parts. I am very confused about my parameter for the rectangle function. It is actually undefined, and redefined inside the function. There are no original reference. If I remove it from the functio...

 
so the second time I set item.elementProeprties for example, it nukes whatever I set in the firs tone that got added to the items array...they both contain the same values
 
8:27 PM
sort of. items[0] === items[1], every element of the array is the same object.
 
the only thing I can think of it to do a var blah = new something
 
ew, he used var in an example
 
that would be correct if item was a new Something
 
to create a separate instance, but then again I'm thinking interms of OO language like c#
 
as it is, you just need to declare item within the loop or inline in the push
 
8:34 PM
whats wrong with var?
 
many things, most important it cannot declare things within a loop, it's only function scoped
 
scoping
 
const items/const item = {...} or push({...}) will both work
 
so declarations must be outside a loop?
 
no
 
8:36 PM
I hate javascriot
 
welcome to hell
 
if anything, you want it in the loop
this behaves pretty much the same in any language with objects
 
i'm also struggling with a smelly dead mouse near my desk
 
I love how often the dell laptops bluescreen here
 
gives you more time to play on your phone
 
8:38 PM
your code will behave the same in C, C++, C#, and Java
in all of them, you can fix it by moving item inside the loop
 
that's a lie
 
that example you posted has the same problem in all of them
there's only ever a single item
 
is this anything to do with hoisting?
 
nope
 
8:40 PM
nothing is being hoisted, it happens exactly where you declare it
 
lol
 
you're just declaring item in the wrong scope
 
@erotavlas lemme break it down for you
 
not sure how else to explain that, the canonical is pretty thorough and you can paste both (both!) of the answers here
 
var item = { elementProperties: null, inputDataProperties: null };
for(var i = 0 ; i < copiedObjects.length; i++){
                item.elementProperties = null;
                item.inputDataProperties = null;

                item.elementProperties = elementProperties;
                item.inputDataProperties = inputDataProperties;

                items.push(item);
     }
 
8:41 PM
@ssube Not in C or C++
Or Haskell
 
C++ doesn't have var? must be a bad language then
 
@copy Unless the operator is overloaded ^ code should be the same no?
 
@copy depends on whether you make item a struct or new
@ShrekOverflow depends on how you translate it, obvs it won't compile as-is
 
@ssube Right, but the default is sane
 
Haskell and other functional languages do fix it
 
8:42 PM
SomeFoo foo();

for (var i = 0; i < copied.length; i++) {
foo.e = bar;
foo.b = baz;
items.push(foo);
}
 
@copy yes, it is
 
Wow I can't edit my messages anymore ?
 
although passing a pointer by accident is one of the classic gotchas
 
That is what his code is doing
@erotavlas you are creating the object out side the loop, during the entire loop you are therefore working on the same object.
 
so when i push to the array, it adds the same object again?
 
8:43 PM
yes
What you want is
 
19 mins ago, by ssube
items.push({elementProperties, inputDataProperties}) will work if you have es6
 
es6 = IE 11+ , edge, FF chrome etc?
 
^
ES 6 = EDGE 14, etc
 
no ie 11?
 
without es6, you just need to repeat the names
elementProperties: elementProperties
 
8:45 PM
items.push({
    elementProperties: elementProperties,
    inputDataProperties: inputDataProperties
});
Like so ^
 
a nuisance but no real change
 
oh i see
ok let me try
 
es6 adds the shorthand
making it inline fixes your scoping issue
 
We will get them next time!
 
It's confusing because "reference" in the sense that "a variable pointing to a value" is different from "reference" in the sense that "an object's identity", and they're both called "reference"
@KamilSolecki We shall
 
8:50 PM
yeah, and JS isn't pass by reference or pass by pointer
 
Right, it's pass by value
But the "value" of an object is its reference
Which is different from the other kind of "reference" :D
It's all very confusing and annoying.
Programmers are bad at naming.,
 
yeah
 
I'm so glad I'm not the only person that understands this
 
I'm glad I could slap together acronyms for my bot :D
 
Because whenever I explain it, it sure seems like it.
see today's xkcd
 
8:51 PM
pointers/references are one of those things that doesn't make any sense until it clicks
async, clusters, and declarative tools were all the same way for me
 
click click
 
bloody pancakes
 
I think the biggest click I had was monads
 
I'm still not sure I fully understand them
 
Same -_-
 
8:53 PM
I thought I did. Then I read "To Mock a Mockingbird" and lost it.
 
There's a lot less to understand then people like to make it sound
 
do you not just stand in a tree and throw sticks at them?
 
to mock a killingbird
 
Either that or I've got some serious Dunning-Kruger going on
 
is there a secret menu to chrome search or do you need like an addon to search for exact phrases
 
8:54 PM
@KendallFrey it's not a large pattern
 
@KamilSolecki search what?
 
@KendallFrey It's one of those concepts which you lose the ability to explain them once you understand them
 
@KendallFrey ctrl+f type search
 
Like closures
 
i.e. find
 
8:55 PM
@Zirak An example of their usefulness would be amazing.
 
@KamilSolecki does it not search for exact phrases by default?
 
@Zirak Closures aren't that hard to explain.
 
@MadaraUchiha I know, right!?
 
you cannot specify whole words
 
8:55 PM
huh
 
unless there is a markup trick
 
Recently I just stopped explaining them, and just used closures without telling anyone and my students just got it
 
@MadaraUchiha the concept isn't, some languages make it ugly as sin
 
@ssube And so you don't use those languages when explaining closures :D
@KendallFrey @Zirak can you provide an example which monads solve especially nicely?
 
8:56 PM
> everything!
 
@MadaraUchiha Promises, to a degree
 
@MadaraUchiha I assume you mean the generic monad pattern, rather than any specific type of monad?
 
They all give this example, and it's only halfway there
@KendallFrey Either and both.
 
Well for a specific example you have Promise as Zirak said
 
@MadaraUchiha A bad example would be list or option
 
8:58 PM
How is it different from jQuery's chaining API?
(or any chaining API for that matter)
 
man, these late afternoon pattern discussions might be the best part of this room
 
If you've used a language with Optional or Maybe, that's also a monad
 
Essentially, Promise.then(result => Promise) is all you need for a fully featured async system
 
@MadaraUchiha Not very different
 
what about Optional/Maybe makes it such a good/traditional example of monads?
 
8:59 PM
@MadaraUchiha Probably state or exceptions
 
is it just that there's only ever one empty optional?
 
The optional chaining operator ?. is an extremely useful monadic operator
 
does the DOT test motorcycle helmets by just throwing them at a wall?
 
// generally, monads have three rules:
// 1. they have a constructor
var p = new Promise();
// 2. they have a function which converts a value to the monad type
var p = Promise.resolve(4);
// 3. they have an operator which receives the monad, and returns another instance of it
p.then(val => val + 1).then(...)
@ssube Because they're pretty simple to draw up and explain, and exception handling is common
 
ah, so it's easier to see the "win" than with another example
 
9:02 PM
Maybe not the "win" but the rules are there
 
A possible example of a generic monad operation might be a map from a list of monads to a monad of lists
 
the "win" as in all the error-handling code you get to rip out :)
 
So it would perform the equivalent of Promise.all for promises
 
there's a lot of ugly flow control that can go away
 
though I'm not sure if this is still strictly monadic
 
9:03 PM
What does it aim to solve though?
 
In this case it's about generic reusable code
tbh most of the usefulness of monads lies in how each type is implemented, rather than generic monadic operations
 
in a language with generics, would you expect to see a monadic type without a generic type parameter?
 
@MadaraUchiha Just like in promises or arrays: When you wrap a value in a container, you can operate on it at some higher level of abstraction
 
user2620028
@ndugger dropping things on them typically
 
@Zirak Right, the fabled "uplifting" of yore
 
9:05 PM
The very nature of types that can be composed like monads is very powerful and expresive
 
I understand the monads aren't generic in exactly the same sense as a generic type, but they seem similar
 
@ssube No, why?
 
@MadaraUchiha When you have an array and you map, you receive another array, which you can also map and so forth
Or filter or what have you
That's an abstraction that you win
 
@KendallFrey you would expect every monadic type to have a type parameter somewhere for the thing it contains? I'm just curious if monads are almost always generic in that sense or if they often are implemented against a particular type.
 
I'm not sure if every monad would
I'm not imagining any very useful reasons for a monad containing no value
 
9:08 PM
guys :| need help with one thing
 
I thought of a new way to describe monads that is probably just as terrible as all the others
 
@MadaraUchiha You also see how promises abstract away the notion of time and give you a value you can work with and do operations on while still retaining its abstractions
 
@Zirak Yes
 
I need to render a component within a component, and have it update only if it is currently visible. Is there any good way to do this?
 
A monad is a container that can hold data, and it defines what happens if you nest containers
 
9:09 PM
@ssube hows this method of removing the reference?

	var elementProperties = JSON.parse(JSON.stringify(copiedObjects[i], null, ' '));
	var inputDataProperties = JSON.parse(JSON.stringify(formElementFunctions().createNewInputData(elementProperties), null, ' '));
 
That's a monad: A level of abstraction you retain over function use
 
if I understand them right, monads abstract one aspect of an operation
 
@erotavlas eeewww
 
@ssube that's the only way I could get it to work byw lol
 
for collections it's how many items, for promises it's how long you wait, etc
@erotavlas did you try the push({ ... }) we suggested?
because with your original example, that should work
 
9:10 PM
The Promise container says that nested Promises mean that the resulting promise doesn't resolve until the complete nested hierarchy does.
 
@ssube didn't work
 
The list container says that the value represented is a list of all values in the nested lists concatenated.
The optional container says that if any data in the nested hierarchy is missing, the overall result is missing.
Clear as mud
 
Is it accurate to say that monads are a value and an assertion or operation to it? Most languages that feature monads heavily also seem to prefer lazy resolution. I always assumed that was to minimize the cost of the monads, turning them into something more like a flyweight.
 
how even do eyes work
 
So you canstore where the value comes from and what to do, rather than many copies of it
 
9:18 PM
monads makes me think of gonads
 
go mad for gonads
 
@ssube Sort of. You get anomalies where optionals can have no value, and lists can have more than one value, etc. And the "operation" is essentially composition (nesting) the monad within itself.
The actual monad implementation defines how the operations are combined.
 
Hmm. In JS, would it even be possible to have a DI auto inject properties into functions, without wrapping them manually, and still maintain IoC? Its not like we have an assembly to work with, so I can't imagine how I could hijack things before construction
 
@KendallFrey yeah, that's where I was going with it
 
I can see this possible with service locator, but not really without one
 
9:21 PM
so lazy/eager is an implementation detail, not something monads dictate
 
exactly
lazy itself could be a monad, I think
 
@KamilSolecki maybe
 
I'm not sure why you would want to when you can decorate them, though
 
decorate how?
oh nvm
 
9:22 PM
because its much cooler not needing to decorate at all!
 
I disagree, the decorator makes those dependencies (or their contracts) explicit
 
unless you write in Typescript, and add some magical metadata
 
do you remember ziGi
 
TS doesn't even do that.
Babel can, and it's easy to use a decorator to trigger a babel transform. you can get as crazy as you like.
 
I wish it would, I could cut out so much code
would provide RTTI, that is
 
9:26 PM
what about when you simply register them in your container, and preserve things with reflect-metadata?

So you could go and register classes for interfaces, and be as explicit as you want
 
argh. i just failed to copy RHEL iso onto a usb 3 times.
 
javascript doesn't deserve classes
 
ziGi, Netherlands
603 6 23
 
but you're registering them, it's not automagical
that's what Guice does and the sort of DI I prefer using
 
registering is one, injecting is other
ealier I talked about solely injection without the need of any decorators
 
9:27 PM
once everything is registered, the container creates a root object for you, which injects everything else
 
well yes, but how would you go about accessing what needs dependencies to inject them
assuming its not an instance
 
well, you assume everything might, and then I prefer to attach them with a symbol and reflect that out
 
delete all traces from my facebook account that suggests that I hate cooking
 
well assume you want it to inject into everything registered, the hard part is still injecting without explicitly wrapping things, since you need to get a hold of the instances somehow
 
what do you mean?
as long as you always go through the DI container to get new instances, it shouldn't be a problem...
 
9:36 PM
@ssube I'm finding a disastrous level of 'reference pointers' all over my functions now
 
1 message moved to Trash can
@erotavlas Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
hey not fair i just formatted it
for example
paste: function(event){

    var copiedObjects = clipboard().storage;
    ...
    //make a change
    copiedObjects[i].property = something;

}
change gets propgated all the way back to clipboard().storage object
so next time i want to paste something it starts off with the updated values instead of the original that was copied in the first place
in any case I give up for today
 
heh, yeah, if you've been passing objects for a while, finding all the places you need to make copies can be tricky
make everything immutable and the question sort of goes away :P
 
I don't know how
@ssube what about immutable.js?
 
9:51 PM
you might end up in over your head very quickly
 
lol ok
 
@ssube what about Object.assign()?
 
that's in the right direction, but I don't think you need any functions to fix this
make sure you don't mutate any objects you're passed and copy them if you have to
do that consistently and you should be fine
 
ok
i'm going home, thanks
 
9:57 PM
Object.assign is bae
Anybody gonna watch the caps game tonight?
 
I didn't know Cylons played games
 

« first day (2746 days earlier)      last day (2195 days later) »