« first day (1779 days earlier)      last day (3168 days later) » 

10:00 PM
you mean convert a string from JSON to a JavaScript object?
 
Been playing Civ5, and both games the main opposition to peace has been Napoleon and Elizabeth. Can't we all just get along?
 
But the result has 20 objects
Yes convert to javascript option, but not sure how to do it when the response has 20 objects / pagination
 
@pingo it'd help if you provided a code example
 
Pagination in the response JSON?
 
Is there anyway to prevent express.session to create cookie even for users that are not logged in?
 
10:03 PM
Thought i did but it's not going through
 
@Zirak & @ssube Here's the ETL/realtime processing thing I've been hacking on: github.com/SomeKittens/gustav
 
1 message moved to Trash can
@pingo 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 or pastie.org
 
@Srle You don't want cookies for non-logged-in users?
 
@SomeKittens Nope, i cant get rid of them :D
 
cookies aren't that harmful, just seems like a lot of work. Legal issues?
Also, you look a lot like @rlemon
 
10:05 PM
EU (european union) has stupid laws on cookies.
 
Yeah, was wondering if that was it
 
You must notify the user that cookies are present, and it is recommended that you provide an opt out
 
oh, i always wondered
 
user3233318
@SomeKittens Why I got kicked?
 
It's a bit more complicated than that, but y'know. EU and shit.
 
10:06 PM
@user148098 I gave you two warnings and you continued to belabor the point
 
crl
How could I do a while loop containing asynchronous code (xhr)?
 
> @user148098 Last warning - don't belabor the point
 
@SomeKittens, i have specific problem that can be solved by removing 'connect.sid' cookie for users that are not logged in, looking solution for hours. Besides that i dont see the benefit of having that cookie for users that are not logged in.
 
user3233318
I just want to know what I have done wrong in order to not do it again.
 
@Srle ah, what problems?
 
10:07 PM
@user148098 You did belabour the point.
Nope.
CTRL+K
 
@user148098 you continued to insist you'd done nothing wrong after being given a warning.
 
That'll turn it into code, but use a formatter, damn it.
 
@user148098 Your contributions so far today have been to sink the room into pointless arguments.
 
Still nope
 
I'm sorry! I'm a newb
I'm copying form sublime where it's beautifully formatted
 
10:09 PM
Paste the code into a paste site, e.g. hastebin
 
Was doing cmd+k my bad
 
Meteor.methods({
    'updateItem': function (itemId, param) {
        var result = HTTP.call("GET", url);
        var itemPush = {
            item: {
                _id: JSON.parse(result.content).data[0].id,
                username: JSON.parse(result.content).data[0].user.username,
            }
        }
        Collection.update(itemId, {
            $push: itemPush
        }, {
            validationContext: 'updateForm'
        }, function (error, result) {
            if (error) {
                console.log("error:", error);
@pingo here you go
Ah, so this is a Meteor thing
unfortunately, I'm clueless about Meteor
 
god, rx is killing me
 
rx as in rx/tx?
 
crl
How could I chain an undetermined number of promises? (basically as long as the response contains a next link I'll call another xhr)
 
10:12 PM
rxjs
 
Ah, don't think I can help you there
 
user3233318
@SomeKittens That is not true. I helped someone with Linux, and I have being answering all the questions given to me with respect even when they are loaded with sarcasm. I am sorry if I offended you, but I would like to know what I have said that caused the issue in order to not do it again. Is the problem just asking what I am doing wrong?
 
Thank you @SomeKittens
Yes meteor, but I can write any javascript
Just need to do some sort of loop
 
@user148098 You've been kicked again, for the same reason. I don't care if you disagree, so long as you follow the rules.
@pingo oh, loops shouldn't be too complicated
 
If it is any help on his side, he did actually help me :3
 
10:14 PM
Ok
So that var itemPush only gets the first object
There's 20 total how can i grab them all w/o writing 20 fucnctions
data.[0] to data.[19]
 
so result.content is a JSON string representing twenty items?
 
Yes
 
All hail mdn!
 
Ok thank you @SomeKittens
 
10:17 PM
So you'll need to JSON.parse first, but save that in a variable. Then call .map on that variable.data
Docs should take you the rest of the way
 
Ok cool thank you
Result looks like this btw: postimg.org/image/u9x5tl2a7
 
great!
 
(of JSON.parse(result.content)). Seems like .map on variable.data will help. Thanks again!
 
@SomeKittens, without problem explanation, is there some known way to omit 'connection.sid' cookie for users that are not logged in?
 
@Srle Your problem will be that the session middleware is built to give everyone a session. Which one are you using again?
there might be a config value, but I doubt it
 
10:22 PM
@SomeKittens, using epxress 3.0.3, express.session is built in middleware
 
ah
so, no
 
even if the user isn't logged in, wouldnt the session come in handy?
 
my other concern is that there's a bigger bug regarding authentication in your app (somewhere you DO NOT want bugs) and this isn't fixing it
so more details about the problem at hand would help
 
crl
next='http://foo.com', urls=[];
while(next){
    fetch(next).then(r => r.html() /*let's say it exists */ )
      .then(doc => {next=doc.querySelector(...); urls.push(...)})
}
// that code is totally wrong (loop containing async code), but how could I do?
 
@crl are you using a promise library?
 
crl
10:26 PM
yes fetch (browser)
 
er, like Q or Bluebird
 
crl
just browser's default Promises
I feel like it's impossible
 
Reading, this is basic scraping, you've got a URL, grab all the links from said URL, and scrape those links
 
@SomeKittens Reading the examples, I have a few qualms with the API. But right now I'm dead tired. Ping me tomorrow in case I forget?
 
@Zirak can do
Qualms?
 
crl
10:29 PM
@SomeKittens I can only get the next url, and proceed one by one until the end
 
@crl Can you make a fiddle?
 
@SomeKittens Also, I accidentally hit e in github and forked your repo
 
\o/ repo activity!
 
@SomeKittens, i created now new small project just with express 3.0.3 and dummy index page, just on hitting '/'which will server index.html cookie from express.session is being created
 
@Srle ok, and?
 
10:37 PM
@BadgerCat you'd have to track me down first! who says i'm where my profile claims i am? ;)
 
@ThiefMaster The .de domain - they are usually only handed out to people within/affiliated with people in Germany?
 
@SomeKittens, can we make things easier, do you have some idea how to avoid cookie for users that are not logged in. I tested same thing with express 4 (dummy page also) and there is no cookie.
 
the admin-c needs to have a german address
 
@Srle I've expressed (pun intended) my concerns above
15 mins ago, by SomeKittens
so more details about the problem at hand would help
 
one that is never actually verified (and even if it was, it'd just mean that someone there knows how to forward whatever they'd send for verification to me) ;)
 
10:40 PM
@ThiefMaster Aren't you at work?
I mean, in that city?
 
at this time on a sunday (well ok, monday)? hell no ;)
but yes i'm still around here
 
We're going to Konstanz
 
I wouldn't call that nearby ;) But have fun!
(@copy: throw her in the bodensee? :p)
 
He's already there! He can't see you!
And I'll stop by at your home town. I'll be sure to take a picture next to your house ;)
 
That would be totally not creepy
 
10:47 PM
It's only creepy if you don't go out to take the picture for/with them, to be frank.
 
But he's not there, only his parents.
 
Oh, you could get a picture with his parents then.
 
That would be cool
 
Cool as long as they don't call the police :)
 
10:51 PM
@crl yikes!
why don't you just write a function that runs the whole shebang once and call it recursively?
 
crl
ohhh right thx
 

« first day (1779 days earlier)      last day (3168 days later) »