:wtf: How can this be so wrong??? (AKA the Discopocalypse thread)
-
It's the DiscoDevs... do you think they follow a standard secure procedure to produce their GUIDs?
Inb4 Disco-GUID-CDN.
(Edit: ...)
-
Help us test our new post rendering engine!
No. How about you hire some QA and test it properly yourselves?
(Also set up a test instance, because your current idea is pants-on-head retarded, but whatever...)
-
-
-
?
GUID is a pretty well-established standard. There's only one algorithm that can be used, AFAIK, that results in a GUID. And I know it's impossible for two GUIDs generated during different milliseconds can collide, it's also impossible for a GUID generated with one MAC address to ever collide with a GUID generated with another MAC address.
What you're doing there is just random digits, which you're (correctly) calling a UUID. That's different from a GUID.
GUID is an actual defined "thing". UUID is just kind of a flailing around "eh, it's random enough I guess" thing.
-
There's only one algorithm that can be used, AFAIK, that results in a GUID
incorrect, there are two common algorithms
one is a temproal/spacial algorithm that uses the generating machine's MAC address and the current time to generate a GUID. this is a type 1 GUID
one is pseudorandom, and is rather more complicated but basically it's close to 124 random bits. this is a type 4 GUID
you can tell what kind you have because the format specifies that for a type 1 GUID the first hex digit in the third group will be a one (xxxxxxxx-xxxx-1xxx-xxxx-xxxxxxxxxxxx) and a type 4 GUID will have a 4 in that position. (xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx)
there are other algorithms too, but they are less commonly used.
-
UUID is just kind of a flailing around "eh, it's random enough I guess" thing
Actually, UUID is the standard.
-
I honestly did not know UUID was a standard. Nor did I know there was more than one type of GUID.
Huh.
I've only seen UUIDs created via ad-hoc code, like RaceProUK's example.
But really the point is: don't call it a UUID or a GUID unless it's actually the standard-specified one.
-
I spent mine building a new branch of Discourse which replaces our post rendering with a hand-tuned virtual-dom implementation, to get around some pathological performance issues in Ember.
But but but but but... we kept getting told that Ember was the thing that would SOLVE the performance issues?!?!?!?!
-
Help us test our new post rendering engine!
Please fix your quote. For a moment there, I thought Yami was doing dev work for @codlnghorror
-
Speeding up page load times is a good idea, but am I correct in reading that they've moved away from Ember.js for post rendering and are now building DOM elements by hand?
-
I select the text. I hit the quote button. If it's attributed to the wrong person, that's Discourse's fault, not mine.
are now building DOM elements by hand?
VIRTUAL DOM elements. They undoubtedly have some terrible JS library to convert their virtual DOM into actual DOM. Because otherwise you'd have to get rid of a layer of abstraction, and we can't have that.
-
And I know it's impossible for two GUIDs generated during different milliseconds can collide
True, but our simpler calculation can yield a collision if two machines use the same seed value, which IIRC in Node defaults to the current machine time; the Discourse one (apparently) doesn't have that weakness.
Of course, the chances of a collision even with our simpler calculation is vanishingly small, enough so we can ignore it; it's not like we need it crypto-strength.
-
If your library isn't big enough to contain a reasonable implementation of GUID, it's not big enough to write software in. Because seriously. Rolling your OWN GUID? That's ridiculous.
-
VIRTUAL DOM elements.
What the hell are virtual DOM elements?
When I search for 'Ember virtual dom' all I see are blog posts gushing about 'how fast Ember has become', docs from ReactJS or framework comparison lists. But nothing from the Ember website...
-
incorrect, there are two common algorithms
Except that approximately nobody uses the MAC-based one lo these dozen-or-so years past, after the Melissa virus writer got caught.
-
proper
basic stuff
band-aid
performance
fuck around with our only support method
hire some QA
building DOM elements by hand
-
Except that approximately nobody uses the MAC-based one lo these dozen-or-so years past,
hmm, no. they're still around. windows uses them internally quite a bit, as does DirectX for talking to graphics cards. We also use it as part of our database clustering/sharding to prevent the various servers in the cluster ever adding a conflicting row.
i'll grant you the temporal/spacial algorithm is very much rarer than the random one, but even today it has its uses
-
hmm, no. they're still around. windows uses them internally quite a bit, as does DirectX for talking to graphics cards.
Well, no kidding, they're not going to retire all the existing ones. I guess I should've written "approximately nobody creates Type 1 GUIDS any longer" to avoid ry.
-
I guess I should've written "approximately nobody creates Type 1 GUIDS any longer"
did you read the scentance that immediately follows the one you quoted?
we generate about 10ktype 1 GUIDs AN HOUR
-
-
-
You're going to use up all the GUIDs!
so? they're type1 GUIDS. if we run out we buy new servers that have new MAC addesses and then we have a fresh batch.
also: http://wasteaguid.info/
-
we buy new servers that have new MAC addesses
Are you using Windows? This dialog might save you purchases. Of course, you don't have to tell the bosses that, freeing up the budget for more fun things.
-
http://wasteaguid.info/
But that only wastes type 4 GUIDs; what if I want to waste a different type of GUID?
-
Are you using Windows?
Linux,
This dialog might save you purchases.
there's an equiv thing for linux yes.Of course, you don't have to tell the bosses that
SSSSSSHHHHHHHHH! don't let them hear that! i was going to build a new "development" rig with that money! i mean think what i could do with Dual i7s, quad SLI 980s (with 12GB GDDR5 in each obviously), and 128GB of RAM!
-
i mean think what i could do with Dual i7s, quad SLI 980s (with 12GB GDDR5 in each obviously), and 128GB of RAM!
All that, just so you can shoot me with pinpoint accuracy
-
@FrostCat said:
I guess I should've written "approximately nobody creates Type 1 GUIDS any longer"
did you read the scentance that immediately follows the one you quoted?
we generate about 10ktype 1 GUIDs AN HOUR
Goodness, you're cranky/stubborn today. Please read the very first word of the thing in double-quotes that I wrote, the adjective before "nobody", the one that implies that's it not actually 0 people.
-
-
guid.discourse.org coming soon?
-
-
i mean think what i could do with Dual i7s, quad SLI 980s (with 12GB GDDR5 in each obviously), and 128GB of RAM!
You could do one hell of a Dwarf Fortress.
-
wrong person,
i could have one hell of a house in minecraft!
-
guid.discourse.org coming soon?
API Documentation
To make a request to the GUID CDN, you must first generate a unique session key. This key must be new for EACH request. To avoid collisions or duplications, we suggest you generate a GUID and use that as your session key.
-
i could
have one hell of a house injust about play minecraft with shaders on!<empty be post can
-
@Lorne_Kates said:
API Documentation
To make a request to the GUID CDN, you must first generate a unique session key. This key must be new for EACH request. To avoid collisions or duplications, we suggest you generate a GUID and use that as your session key.
So it's Guid Exchange?
Careful, Jeff may like it.
-
i could have one hell of a house in minecraft!
But where's the challenge if you're not constantly fighting lag?
-
But where's the challenge if you're not constantly fighting lag?
the mod that turns the creepers up to 11 obviously
-
the mod that turns the creepers up to 11 obviously
You need a mod for thunderstorms these days?
Filed under: has never actually seen a charged creeper, that she recalls
-
You need a mod for thunderstorms these days?
no, but you do need one to affect the spawn rates, and make creepers spawn at any light level
-
affect the spawn rates, and make creepers spawn at any light level
You can keep that one.
-
With that much computing power, just spawn a second session with a creative mode admin character and write a bot that spams around with the creeper egg.
-
New feature for Disco1.6: automatic removal of 'old' bookmarks when you have more than 17
Shhhhhhh! He'll hear you!
-
/me is waiting for the time when they decide they need a "GUID CDN"
Shhhhhhh! He'll hear you!
-
so? i've got it documented that it was my idea first!
royalties man! royalties!
-
This post is deleted!
-
Rolling your OWN GUID? That's ridiculous.
It's because of this stupid propensity for everything to be written in Javascript nowadays, and it doesn't have any native GUID support, so people roll their own. How fun.
-
Fuck that shit. I do that with an AJAX call to the server.
-
@blakeyrat said:
Rolling your OWN GUID? That's ridiculous.
It's because of this stupid propensity for everything to be written in Javascript nowadays, and it doesn't have any native GUID support, so people roll their own. How fun.
One time I was going to include a library to do it for me in order to avoid reinventing the wheel, but then I remembered blakey's admonition to just write the few lines of code required to make it happen.
Filed Under: Not Really
-
@Lorne_Kates said:
API Documentation
To make a request to the GUID CDN, you must first generate a unique session key. This key must be new for EACH request. To avoid collisions or duplications, we suggest you generate a GUID and use that as your session key.
Shhhhhhh! He'll hear you!