« first day (2501 days earlier)      last day (2449 days later) » 

5:00 PM
@KendallFrey Not in France it's not :/
 
!!afk eclipse watching
 
Can some one help me to play HTML5 audio in mobile browser after X - seconds. This code works but not in mobile stackoverflow.com/questions/22766719/…
 
You accepted an answer.
 
var player = document.getElementById('player');
setTimeout(function(){
    player.play();

    setTimeout(function(){
        player.pause();
        player.currentTime = 0;
    }, 2000);
}, 1000);
Same code not working in mobile browser. IF I remove setTimeout then it will work in mobile too
No I didn't accept this answer
 
@Vineet 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, pastie.org or a demo site like jsbin.com
 
5:04 PM
I see, not your question. Maybe make a question for yourself.
 
@CapricaSix Please check now.
 
@FrançoisGuthmann either you're not passing enough data for the buffer or you need to pad it out
 
@ssube Yeah it sounds like it but yet it works on windows :/. And there is no documentation stating differences between Windows and Linux. As Kurt G said it's the point.
 
@FrançoisGuthmann There are innumerable differences, I have no idea what he was talking about.
Most of that is left up to the driver, so it can vary between cards, but this sounds like a simpler issue.
 
@ssube Ok let's say I didn't pad it right or something. What happens when I get it right for Linux, it's gonna crash on windows, right?
 
5:11 PM
No, I bet the Linux driver just has a higher buffer size requirement.
Buffer for uniform block is smaller than UNIFORM_BLOCK_DATA_SIZE is pretty clear
The other side is expecting at least UNIFORM_BLOCK_DATA_SIZE (bytes, probably) and it claims you are passing less.
 
@ssube the other side being the graphic card?
 
the card, driver, OS, and browser are all involved. My bet is on the driver or browser.
OpenGL, across the board and including WebGL, is extremely platform dependent. AMD cards have their set of plugins, nV has theirs, Windows has some, even Apple has their own custom additions.
 
@ssube ah, that's not cool
 
That applies less to newer versions of the API and even less to WebGL, but at the driver level, things like buffer size will still be enforced.
 
@ssube it might be it but it's weird because this is something that worked in C++ / OpenGL in Linux, it uses the std140 layout.
 
5:14 PM
That's why OpenGL lost to DX, which lost to Vulkan, etc.
@FrançoisGuthmann are you absolutely sure the JS buffer is being laid out in the same way as the C++ one?
what length is the buffer and what length is UNIFORM_BLOCK_DATA_SIZE?
 
@ssube you can never be, one does not really control a js variable size. In c++ I ad my clean int / float etc.
 
@FrançoisGuthmann you do with buffers and typedarrays.
If you're preparing the buffer, make sure you're writing numbers as the right type, maybe.
 
@ssube then I don't know enough JS to be sure. I'll check that
@ssube UNIFORM_BLOCK_DATA_SIZE is 35392
 
that seems... large
 
I know right
Are you on Linux right now?
 
5:17 PM
I have access to some
 
Can you check what you see in console? frguthmann.github.io/VirtuaLightJS/index.html
It should be right after "Main initialization done"
 
this one VM doesn't support webgl 2, apparently
 
Arf, nvm. Thanks anyway
 
I just had a fought about the way facebook manages its database architecture and now I'm scared. My thought is that when they store things, they don't store things like:
 
@FrançoisGuthmann I can reproduce it on my macbook
 
5:19 PM
user: {
  name: ...,
  friends: [...],
  taggedIn: [...]
}
 
facebook doesn't store data. it's just a proxy to the nsa
 
but rather as just a very long list of events
 
@ssube Ah nice, tell me what your eyes see :p
 
same value for the buffer length
same error, as well
 
5:20 PM
@towc they have message and event queues, sure
 
in webpack, it seems like my dev-server keeps falling back to /index.html, anyone know how to set it to just fall back to /?
 
I wanna check on windows but that would mean rebooting again :/
 
@FrançoisGuthmann I think this is yet another "only on Windows" situation. :) Those drivers are less strict for some reason.
 
im trying to work but can;t really use my right pinky or ring finger
the top right row is hard to hit
 
@rlemon what did you do?
 
5:21 PM
() sucks too
 
events: [
  EventUserCreated: { ... },
  EventUserEdited: { ... },
  EventUserEdited: { ... }
  ...
]
 
@ssube You mean I got lucky without knowing it? ^^
 
@ssube broke my hand
 
and there's no actual structure, just a pure, functional list of events that describe how state should be changed
 
5:21 PM
@rlemon why?
 
was a good idea at the time
 
Said every man ever.
 
@ssube well, graphql shows a clear tree structure of data, but I don't see that possibly working really well on their storage database
the way I would see it working well would greatly violate DRY
 
@towc they use graph databases for a lot of data
 
basically, they'd have a database with the current state, and one with the list of events
 
5:22 PM
run some graph queries against graph databases and viola
 
i have the feeling that the engineering teams on fb got this handled.
 
@towc that's called map/reduce
 
just a feeling tho
 
you make the most boring cloud tech sound so scary :P
 
@ssube gotta go for now but do not hesitate to hit me up if you have another idea on the question :p. I'll tell you if I ever find out where this is coming from
 
5:24 PM
@rlemon well, sure, they clearly got something that works very well, I'm just really confused as to what it is. The thought of the event list works quite well probably, but for some reason I feel so scared by it. I had a sudden impulse of going to a corner and just cry because of it for a while
 
@FrançoisGuthmann do you go looking, do keep in mind that it could be specific to a card or driver
just in case nobody else has ever had the same problem
@towc that's called scaling and it makes all of us cry sometimes
 
@ssube but you do have the same problem!
 
ok, just googled graph databases
 
@ssube I know people who managed to see it on windows, some who couldn't on mac and me on linux
 
I always thought it was just a name for graphql, and you could use graphql on mostly any kind of database as long as you provided decent hooks
 
5:26 PM
@towc there's a saying, ignorance begets fear.
 
so, facebook uses a graph database?
 
@towc a properly decoupled system can, ideally, ignore network boundaries just as easily as class boundaries and transmit events, in an observable fashion, over the wire. There are plenty of examples about observables reading from input and sockets. Tie that to graphql subscriptions, backed by a graph database, and a change in one place will propagate out to every relevant client without you really doing anything.
@towc they use many different databases for different purposes
 
@ssube so it's cleary a unix/windows thing
 
@FrançoisGuthmann yeah, that's a good point
 
@ssube I'll keep investigating later tonight. Happy to have met you :)
 
5:28 PM
@rlemon and it applies because I have no clue what I'm saying?
@ssube I'm not sure I understand. What do you consider a network boundary?
or class boundaries
 
@towc "this sounds scary... wait, let me google what it is first"
you do this semi-frequently.
 
oh
@ssube is this a good pattern?
I'll think about it over dinner. I still feel so full from yesterday's mac and cheese
 
@towc classes or modules, in the JS sense, vs computers or networks in the hardware sense. Once state changes are packed into events, you can route those events like internet packets.
At some point it stops mattering if you're sending them to the same process or a different data center, the only thing you care about is latency and throughput.
20 minutes until the eclipse and CLOUDS
 
5:49 PM
oh, ok, that makes sense
the workaround might be only creating the events when needed
as opposed to using a list of events, and only creating state (the data tree) when needed
but then it's hard to keep certain things like "Username changed name of conversation to Topic", as that implies that at least that particular kind of event has to be stored
so the state tree is events themselves anyway?
 
@towc you do only create them as needed
and then you send them to the local message broker, who might forward them to a message queue, which might pass them on, route them, etc
 
Joe
Hi I have a question
 
oh, my idea of events was more like "user account created" "user changed name to" "topic of conversation changed to ... by ..."
which have to be stored even after the database goes down and is reconstructed (if this makes any sense. I have no clue what the real terms are)
I should probably find out what those terms are
in my head, there are 2 states for any reasonable database: one that follows the DRY principle and stores only information needed to create the other one, which is expanded and shows relationships both ways
 
@towc you can make those more generic. On the User object, identified by Uuid=xxxx-yyyy-etcetc, change Name to Foo. Now you can a few million of those going around and, sort of like git does with diffs, just smash them into the "real" state every so often.
That's the basis of eventual consistency, sort of.
 
although, in light of graph databases, you only ever need the first one, even if you lose some more bytes to relationship metadata
 
5:56 PM
@towc storage is cheap. Compared to compute and memory, it's free.
When you're talking about big databases, that's at least 10TB of data, usually much more.
 
I'm sitting on 50+ TB at the moment.
 
makes sense
 
@Luggage probably an effective butt warmer
 
just be careful of the fans
 
No, but my butt makes an effective data warmer.
 
6:00 PM
actually no, I'm still really confused on how you'd implement the storing of the user changing name using a graph db
you have a node representing the user, with uuid and name
but then, using graph patterns, you'd just end up with the same user with the same uuid, and with a different name, I don't think I can see how to correlate them
unless you add another layer
which, again, would be "events" or "history"
 
those probably live in a document database, not a graph
they are part of a graph and a reference to the document might be in a graph db
 
cough just use a relational db
 
maybe each user has a current state, and is also linked to a "history/events" state, which just keeps track of what changed, how, by who and at what time
ok, googling document database
 
mongo, couch, and friends
dynamo
 
postgres with a json column
 
6:03 PM
@Luggage this I do agree with. But is there an intuitive trivial solution to implementing this event/history system?
 
history table with a user id..
 
which would require facebook's feeds to have to check in multiple places for something it should only check in one, which is a pretty big backend performance issue, right?
thinking about the chat system
a single chat can have messages, and meta-events like "topic changed to". Messages will be in a main table, while the events will be in a history table for the chat
so when a chat is loaded, the backend has to check in both places, and maybe go through a pretty big search of things
 
You lost me at 'facebook feeds'
 
@Luggage the main timeline you get on the homepage
 
unless you got a job at facebook then that should not have any effect on your choice of persistence.
 
6:06 PM
As an angular dev: Is preact.js big (in the context of react) or is it just an independant fork like Vue.js?
 
> independent fork like Vue.js
Vue.js is not a fork
 
@jake neither.. that question makes no sense and angular/vue and react are not related at all
 
@Luggage is that a joke? I've lost you
 
Not a joke.. I lost you, too. :)
 
(choice of persistence)
 
6:08 PM
@towc Isn't it (Vue) a reimplementation of angular2? Sorry, I guess thats bad info.
 
@Luggage I'm shouting at the center of the mall. Can you hear me?
 
preact is a re-implementation of react.
 
@jake No no nonno no no no no nno
 
towc yea, but the echo comes from all directions.
 
@Luggage damn
 
6:09 PM
vue is competition for angular, but unrelated. not a fork, not a reimplementation, not anything.
 
@jake it smashes up angular 2 with some of react's view style
 
@towc Ah ok, Ill take a better look at it. Would you recommend react or preact to a disaffected angular dev (like myself)?
 
it's not directly related to either, but heavily influenced by both
 
@jake vue
 
@jake react and preact implement the same API
 
6:10 PM
for some values of 'same'
 
preact is not burdened by shady patent grants
 
Oh, cool.
 
if you haven't looked at vue, definitely do
 
>patent grants

Nice!
 
try vue, get sick of it, move on to react
it won't take long :)
 
6:11 PM
vue is for casuals
 
@towc do you work at vue?
 
it's nothing like angular, yet it solves everything angular does and better (in my opinion, that is)
 
vue is for people who's office doesn't have one
 
Justed looked at it, angular rip off
 
He accidentally bought a huge box of Vue and has been trying to sell it ever since.
 
6:11 PM
> nothing like angular
 
@KurtG you can tell that by "just looking" at it? I'm sure.
 
heavily influenced by angular and follows some of the same patterns, yeah
 
@SterlingArcher you kinda can, there are a lot of patterns they took from angular
 
How heavy is (p)react? Could it be used to write a small widget? Or is it really just for SPAs like angular?
 
^
 
6:12 PM
and knockout
 
the amount of pre-registering you have to do
@jake much lighter than react
typically faster than vanilla react or vue
 
oy
 
vanilla react
 
> vue is for casuals
 
jake preact is pretty small and might be reasonable for a small widget. react is a bit heavy in file size (but can still work for widgets)
 
6:13 PM
there's also this thing called "moon", which is a faster version of vue in a lot less bytes
 
@towc it's oi, and vue sucks, deal with it
 
^
 
which I suspect is faster than preact. Although there's little comparison to do, as they do different things, they just happen to share a lot in what they're trying to achieve
 
@Luggage Cool, ill try it out. 🙏 Thanks (p)react pros!
 
@ssube brits called it first
well, scots
 
6:14 PM
I just wrote a collection Schema
I feel so dirty
and I'm scared to test it
I'm just going to deploy it and pray lol
 
that's how you ops
 
want us to look at the source?
 
collection schema? mongoose?
 
SimpleSchema, close to mongoose
let action_geoSchema = new SimpleSchema({
  "label" : {type:String,  optional: false},
  "descriptor" : {type:String,  optional: true},
  "lat" : {type:String, regex: /^[0-9]{1,2}?((\\.[0-9]{1,}°)|(°( [0-9]{1,2}?)((\\.[0-9]{1,}?')|('( [0-9]{1,2})??(\\.[0-9]{1,4})??\"))|\\.[0-9]{1,}?)) [NS]$/, optional: false},
  "lon" : {type:String, regex: /^[1]{0,1}[0-9]{0,2}?((\\.[0-9]{1,}°)|(°( [0-9]{1,2}?)((\\.[0-9]{1,}?')|('( [0-9]{1,2})??(\\.[0-9]{1,4})??\"))|\\.[0-9]{1,}?)) [EW]$/, optional: false}
});
look at this shit
 
man, mongo is saving you so much time
 
6:15 PM
looks close to json-schema. just use that
 
schemaless databases ftw
 
@ssube ikr?
I feel bad for the shmuck who had to write that regex
 
you?
 
lmao no
thank god
 
@BadgerCat a couple of slovak friends were planning to go to Prematura (Croatia) this weekend, I was thinking about joining them. Is that near you?
 
6:21 PM
class Queue {
    constructor() {
        this.collection = [];
    }
    set inqueue(element) {
        this.collection.push(element);
    }
    get dequeue() {
        return this.collection.shift()

    }
    get print() {
        console.log(this.collection);
    }
    get front() {
        return this.colleciton[0]
    }
    get size() {
        return this.collection.length
    }
    get isEmpty() {
        return (collection.length === 0);
    }
}


let q = new Queue()
q.inqueue = 'a';
q.inqueue = 'b';
I get can't read property 0 of undefined when i do q.front
 
there's a typo
 
why are you assigning on a setter method?
 
wanted to try it
 
Does it work? O.o
 
ya excpet for the front
 
6:23 PM
@towc nailed it -- colleciton is a typoe
Is this native JS?
 
shh
was going to give him cryptive hints
 
Are the brackets in getters / setters definition required? Are they used for index args? i.e: Queue[arg]. (in js)
 
i removed the typeo still not working
 
like 16G4W6lxp
 
define 'not working'
 
6:25 PM
I take that back it's working :)
 
good, now make it not use getters and setters like that.
 
why is using getters and setters in this fashion bad?
 
also it's "enqueue" not "inqueue"
 
it makes the code do unintuitive things
 
@Arrow it promotes a bad habit of assigning to a method
 
6:26 PM
^ and ^^
 
ok
 
well, it's not assignig to a method
but..
 
q.inqueue = 'a';
 
yea, that's just using the setter
 
this just seems like a bad practice
 
6:27 PM
but your confusion is why it's bad.
 
why is it bad tell us
 
a reader might look at q.inqueue = 'a' and think "hey look! I know how this works! q.inqueue must hold a string variable and that's it" but nope, behind the curtains, you have an array, and there's no good reason not to make it easier for the reader to understand that
 
fucking clouds
can't see shit
 
yeah -- using the setter like that looks like it's just a property assignment
 
it's raining here
I got a few ok shots before that started
 
6:27 PM
There you go.
 
what's the room's policy on plain trolls?
 
isn't it "ban after proven guilty"?
 
why did you trash?
 
Please don't just repost the code and say "there you go". Explain what was fixed
 
6:28 PM
no, that's for hill trolls not plains trolls
 
Plus you added SO much whitespace
 
and don't post walls
 
Wwow, no appreciation. what a joke.
 
the idealist demon in me is rising because of ^
 
mostly just don't post walls of code
paste services exist for a reason
 
6:29 PM
@Luggage it's bad because it makes it less readable? it that the primary concern or are there other concerns?
 
he's utterly taking the piss
 
@Arrow we told you, it's confusing
you make a function call look like a plain property
 
so it does not make the code unpredictable right?
 
I just fixed his code, and got trashed then kicked.
The wall of code was the same length as his code.
 
it can, because people assume they can safely re-assign a property, but in this case they can not
 
6:30 PM
I'm fine with this
 
@KurtG double actually.
 
... was that bad aim?
 
lol what
 
lol what
 
!!wat3
 
6:31 PM
Guess I wont help anyone/.
 
@KurtG not it was not, you added lots of whitespace lines. Not to mention you didn't say what was wrong, which, was already solved 5 minutes ago
 
@KurtG help, i need socks.
2
 
that makes sense
 
6:31 PM
What the hell?
 
what?
 
@MadaraUchiha what have you done lol
 
type the phrase "this is fine" without quotes :D
 
That's an awesome easter egg @Shog9
 
Benji found an easter egg
 
6:32 PM
 
hahahahahaha
 
I discovered this by mistake
 
And got kicked for it
 
I don't get it
what's happening
 
6:32 PM
 
This is what they were adding when they accidentally sent everyone to Area 51 the other day.
 
there is a suspiciously named js file included
 
can the queue method be written without using "this"?
to refer to collection
 
A K
need mobx help here
 
6:38 PM
switch to vue and you'll be fine
 
A K
stawp lol. vue is in my list to learn but not for a long time
btw, a vue meetup started last week in the bay area
 
I was talking to the dog in the picture, not you
 
A K
it took a while, but people finally started one
 
not everything is about you, Jerry
 
MobX is superior to vue
We already established that like 10 times
 
A K
6:39 PM
 
@AK sup?
 
A K
so in redux, i typically map my state/props and connect to my componenet
what's the equivalence to mobx called?
 
how about VueX? (which is a thing, but referred to as vuex)
 
A K
i dont' want to follow the <Component state={state} /> pattern
how would i go about connecting my state to nested components
 
@m59 long time no see
 
6:41 PM
actually @BenjaminGruenbaum, did you hear about vuex? Yesterday when you thought components could only be defined and used globally (as a register), I started thinking maybe a lot of things about vue are just misunderstood because that's maybe the first thing you learn about, transitioning from something else
 
@towc I have, and I didn't think they could only be defined globally, I thought we stablished that vue is vastly inferior because components don't compose well
@AK I use dependency injection but you can also use provide from react-mobx or you can import your store.
 
Long term, DI is the most flexible and shouldn't be a lot of work, if your app is laid out well.
 
well, dynamically they don't, sure. But that just means you have to use different patterns, like the if-else component switch cascade in angular, which doesn't allow for as much immediate flexibility, but actually makes it much easier to debug and read and simply understand
 
@towc That doesn't resolve the extra work needed to create simple container components or the hoops you jump through to add template directives.
 
actually, I'm a dumb fuck
6
there's a really really easy way to add components dynamically in vue -_-
I'm so dumb
I never needed to use it, so I just forgot about it
it's not as pure/functional as react's, but it's still pretty good:
 
user2620028
6:49 PM
just did the whole eclipse thing
 
<div :is="componentNameComputedOrState" ...>...</div>
 
my mask wasn't working, so i had to take cellphone pics
they didn't turn out to show anything'
le sad
 
user2620028
@rlemon i didnt have glasses so i just used my eyes
 
rip eyes
 
user2620028
thankfully i was able to do that because there was a large cloud in the way
 
6:52 PM
@Zirak es8
 
(this means it's really easy to properly make container components, maybe even easier than in most react cases)
 
I think that's the best picture I got before the clouds came
 
my welding mask wouldnt darken
 
is that even an eclipse? Isn't it supposed to be dark?
 
its slightly darker
not like night time or anything
@KendallFrey got this shot
 
6:56 PM
@rlemon KendallFrey is afk: eclipse watching
 
the only time I saw an eclipse was 3 years ago, a couple kilometers from where I live now #funuselessfactsaboutmyinsecurelifewhyamihere
 
@towc Wheres here?
 
next eclipse I wanna get a proper filter and setup a timelapse camera
 
@jake I live in slovakia
 
 
6:57 PM
that country you probably can't point on in an empty map
 
@ssube what are you using as a filter?
 
I took some pictures with my go pro but idk if you can see much
 
@rlemon I used a (supposedly) ND 1000 filter
 
cool
 
10 stops
so roughly welding mask level
on a Canon SL1 and the telephoto lens that came with it
 
6:58 PM
my mask is auto darkening, and sealed.
so unless i smash it apart I can't up the sensitivity
 
there are adjustable camera filters, but I didn't want to melt a hole through the body, so I just got a fairly dark one
 
Hey, anyone know how I can limit a circle svg cy attribute relative to a d3 graph? I can clip it based on screen coordinates but I'm unsure how to get it relative to a graph axis?
 
@towc I took a good look at Europe after we got an intern from Bosnia and another from Kazakhstan (I couldn't point to either).
 

« first day (2501 days earlier)      last day (2449 days later) »