« first day (2089 days earlier)      last day (2874 days later) » 

12:00 PM
@virepo probably?
 
@Gordon: Last
 
vaa
caaaation caaation
 
Gon
\oooooooooooooooooooooooooooooooo/
 
@RonniSkansing room 11 brainwashed me into hearing that rebecca-ish in my mind... :(
 
Wes
\o
 
Gon
12:03 PM
@NewCod3r Y U NO PASTEBIN or GIST?
@Oldskool same here :P
 
Wes
2 days full immersion with client. i'm dying
 
hehe
@Oldskool =)
it was also meant it a frydai'ish way
 
how to close a question i posted?
 
@avz2611 You can't self-close, but you can delete.
Just press the "delete" link under the question.
 
12:08 PM
@NewCod3r why is the order of that array 2016-07, 2015-12, 2016-03, 2016-07?
 
@Wes Clientitis. I usually prescribe Beeramol for acute cases, Bulletine for chronic cases, although in that latter case I've heard an experimental treatment called Fuckthisene is performing well in trials.
2
 
Wes
rofl
 
@Gordon: Lol I Dont Know !!!!
@Gordon: U think My Problem for this?!
 
its part of the problem
 
does this group like dark humor?
 
12:13 PM
We're not completely hive-minded. Depends on the person
 
Gon
We only like Rebecca songs!!
 
@Fabor resistance is futile
 
All hail hypnotoad!
 
!!giphy hypnotoad
 
gross
 
12:14 PM
that is rank
 
Anonymous
cute.
 
@Jeeves not the hypnotoad I was looking for
 
Your jedi powers aren't working.
 
I really don't want to look at that
 
Yet I couldn't look away. I'm glad it's gone.
Maybe it really was hypnotoad.
!!giphy php
 
12:19 PM
 
Wut
 
Gon
 
Anonymous
@DaveRandom What was the reason for removing the Jeeves code format detector thing? I can remember it failing but can't remember why?
 
Wes
@Gon what's wrong with that?
 
Gon
@Wes nothing
 
12:23 PM
!!plugin codeformat status
 
@DaveRandom Syntax: plugin [list|disable|enable] [plugin-name]
 
@Gordon: How Do Can Fix This Problem?!
 
ugh
 
Wes
that's how we make houses for the homeless
 
!!plugin list codeformat
 
12:23 PM
Command endpoints for plugin 'CodeFormat' (enabled):
 
^ @JayIsTooCommon
It's enabled atm, why do you ask?
It could definitely use some work, I'll grant you that
 
@NewCod3r I already told you what the problem is, didnt I?
 
Wordpress

$activation_link = add_query_arg( array( 'key' => $code, 'user' => $customer_id ), get_permalink( 2562 ));

output : - http://localhost/ something/actiavtion/?key=761e71f1120bfd301a2925c12707d2a280182898&user=185


i want : - http://localhost/ something/actiavtion/2562?key=761e71f1120bfd301a2925c12707d2a280182898&user=185
 
Anonymous
@DaveRandom oh, I thought it was removed because of annoyance. I was just looking at Pastebin API and thought auto-pastebin could be a cool feature :3
 
@NewCod3r you are creating a new document on each newsitem. consequently, you will overwrite the contents of the open uris each time and end up with only the last item for a month in it.
 
12:27 PM
@PraveenKumar Is the permalink for that post ID correct?
 
@Gordon: Sure, For Each Reload File I overwrite new item But My Problem is : In Action My Code overwrite Only One Record! I need To Add/overwrite All record
 
I'd recommend looking at the output of get_permalink(2562); first
 
@Gordon: U have My Print_r array. Can u test for your idea?!
 
yes
@Sean let me check it again
 
@NewCod3r sorry, I dont have time to write teh code for you. I told you what the problem is: you are creating a new document for each newsitem. you only need to create new document when the year and month changes.
 
12:32 PM
@NikiC are you around?
 
@Sean this is correct
 
@Victor yes
 
@Sean output of get_permalink(2562); is localhost something/actiavtion/
got no 2562 in the end
 
@PraveenKumar Then the problem is the permalink of that post ID. Refresh your permalinks and try again, if it's a custom post type check in the register call if it's rewriting the structure at all
Or check the hook in get_permalink with a super high priority vs a low priority to check if something is changing the permalink behind the scenes
 
does data transfer out, mean if some one downloads a 1GB video, and then another 1GB video, 2 GB has transfered out?
 
12:37 PM
You should probably check that 2562 is also the right post you're needing
 
@virepo yes
 
thank you
so if some stupid person, wanted to click the download button 100 times, he would actually make me use 100GB of transfer and cost me $8 -_-
suppose I could set a COOKE and stop any more downloads for that video in a certain time
 
@Sean yes it is the id i need
 
@JoeWatkins Why did you merge Closure::fromCallable()?
 
@NikiC Was that thing not supposed to be merged?
 
12:45 PM
@bwoebi I've left a bunch of review comments that were never handled
I even get test failures on master...
 
well… that's bad…
 
Is this sentence correct? "Do you want us to translate it for you?"
 
@Shafizadeh Yes.
 
tnx
 
What is fake_closure concept about? I see that it used in reflection often. @NikiC, can you clarify this a bit?
 
12:56 PM
how can I call a method with parameter in _remap function in Codeigniter?
 
deja vu
 
@Ricardo "george" would be nice I think
 
are there any usage cases outside reflection? (thx for the link, i'm aware of that)
 
@pinepain it is only used for creating closures from ReflectionAbstractFunction, you cannot rebind fake closure to a different scope
 
yep, basically all Closures not directly created via function() { … } … i.e. Closures of named functions.
 
1:06 PM
thanks
I'm trying to knock to Joe Watkins, but it looks like he's busy with release (or have no time for that), so can someone provide highlight about TSRM in PHP 7 or point me to good manual or whatever. I would appreciate any piece of information.
 
@pinepain Well, either ask Joe or Anatol…
others won't give you very detailed answers I guess
 
and Anatol available only in internals, isn't it?
 
yes, and IRC
 
Hi, i´m trying to find duplicate dates in an array, but the problem is that they are dates and not string/ int. Is there a way to parse an entire array (each element) to a string, without using an additional foreach?
 $test = [];
    foreach($response['data'] as $value){
        $data = getDatesFromRange($value['dateFrom'], $value['dateTo']);
        array_push($test, $data);
    }
    $x = array_count_values($test);
    var_dump($x);
or does someone know a better way to find array values that are duplicates for a specific number of times
or wait I was wrong... $test contains string´s. Why does array_count_values throw array_count_values(): Can only count STRING and INTEGER values! ?
 
1:28 PM
@bwoebi Did you implement the trampoline handling for Closure::fromCallable()?
 
> trampoline handling
looks awesome
 
@NikiC might be, don't remember
@NikiC yea, looking at the code, it was me…
 
If that person who checks in every few moths or so asking us to write a bittorrent client in PHP asks again, we can just point them at this: kristenwidman.com/blog/33/…
 
@bwoebi Ok, can you please check out github.com/php/php-src/pull/1906/files#r65804723 ?
 
Which one is correct? (English perspective)
- when it comes in the beginning of sentence?
- when it comes in beginning of the sentence?
 
1:36 PM
neither....
 
@Shafizadeh in the beginning of the sentence
 
@Shafizadeh when it occurs in the
 
@NikiC I'll check it out later, busy with something else
 
Are you talking about a word at the start of a sentence?
 
I'd say "comes" is colloquially correct
 
1:37 PM
Ah .. thx guys
 
When it comes at the beginning of a sentence
 
ah ..
 
but I'd also s/comes/occurs/ tbh
 
got it :-)
 
unless you're talking about a specific sentence, then it'd still be "the sentence" :x
 
1:39 PM
:)
 
hi
i send a file from my android via post request to the server i don't have idea what is the post name
 
Gon
Evenin'
 
You are a repeat offender for pinging people unsolicited with garbage and it is not welcome here.
6 messages moved to bin
 
@DaveRandom what does mean repeat offender
 
means you keep doing it, stop it =)
 
1:50 PM
how can i run through the array and get all dates where int = 3? the output is from array_count_values(). I can´t access it the normal way...
array(5) { ["2016-08-09"]=> int(2) ["2016-08-10"]=> int(3) ["2016-08-11"]=> int(3) ["2016-08-12"]=> int(3) ["2016-08-13"]=> int(1) }
 
@elsololobo A combination of array_filter() and array_keys() I guess
 
foreach
 
if i run this i just get the int´s
foreach($x as $item){
        echo $item;
    }
 
@bwoebi Thanks
 
@DaveRandom do you remember how to hijack an AJAX request from an extension?
 
1:53 PM
@Sarah It means that you have a long history of appearing in rooms and pinging random people (I know that because you have done it to me in other rooms)
 
@elsololobo foreach ($arr as $key => $value) {
 
@MadaraUchiha There are a couple of possible approaches, depends what you are actually trying to do
I assume you are talking about specifically Chrome?
 
@Kyll get over here
 
I don't know anything about other browsers
 
@MadaraUchiha Woah, cross-room mentions. Forgot about that
Plop everyone!
 
1:55 PM
@Kyll Mod abuse
 
:-P
 
@DaveRandom So yeah, @Kyll wants to find out when the question list had returned from clicking on a tab in the new nav
 
In chat I know it's something like CHAT.addEventHandler
Checking StackExchange object now
 
@MadaraUchiha perfect! thanks, that worked for me
 
I remember that you could hijack an XHR object and do stuff on it, so was wondering if it can somehow happen
 
1:56 PM
@MadaraUchiha array_search should suffice, shouldnt it?
 
@Gordon I don't know, what does array_search do?
 
!!docs array_search
 
[ array_search() ] Searches the array for a given value and returns the corresponding key if successful
 
this does only work if you know what you are searching for, or?
 
@Kyll Iy may be that this provides some APIs that will suit your use case and it may not be, I very specifically needed to intercept message posts and to do that I had to hijack the underlying jQ
 
1:58 PM
@Gordon That won't work if you have more than one key with the value 3, and you want all of them though, right?
@DaveRandom I still have no idea how you did it
 
@MadaraUchiha see Note: array_key in that case
 
Did you just replace $ with your own proxy or something?
 
@DaveRandom Well, for chat it was easy. I may need to monkeypatch XHR for main...
 
@elsololobo you asked for int = 3, so I assume you know what you are searching for, e.g. 3
 
Uh, buncha things in StackExchange.newnav
 
2:01 PM
 
@elsololobo array_keys($data, 3)
 
hello guys
 
@Gordon you are right, but @MadaraUchiha was right that it wont work if there is more than one key with 3... as far as i tested in the last 20 sec
 
@elsololobo see the Note in the manual: "If needle is found in haystack more than once, the first matching key is returned. To return the keys for all matching values, use array_keys() with the optional search_value parameter instead."
 
@Kyll I had to do three things (but what I was doing was horrible already): run a background script that had access to the chrome.webRequest API (where you can intercept state), run a content script (which has permission to manipulate the page) and inject a script into the page from the content script (where you can get at the same jQ that the SE code is using and hijack the global ajax events.
That's how I did specifically this horrible thing, which is old and may no longer work as Chrome seem to change their APIs every 5 mins
 
2:03 PM
Today I faced one problem
when I print_r Json in yii2 then result is just fine but when I did print_r same Json in Wordpress the it show json with backslahes. Any reason why?
 
@DaveRandom I see
 
@Gordon okay, so you would prefer that solution over foreach?
performance consideration
 
@ManuJain Wordpress/Yii don't have anything to do with that, but the server configuration does.
 
@Kyll Never touched the main site though, I don't even know if it uses jQ for ajax, or even at all
chrome.webRequest was the thing that took the most effort IIRC
and creating a way to relay messages through 3 layers
 
@Oldskool ya, but i tried on my local
 
2:05 PM
@DaveRandom What I did for this one was use CHAT.addEventHandlerHook to intercept incoming messages, then disgustingly timeout to wait for the message to appear on the DOM and change it.
 
@elsololobo IDK if its faster.
 
@Gordon I do :P
 
@elsololobo Its likely irrelevant anyway. If you are concerned about performance, profile your code in production.
 
okay, you are right
 
Today I faced one problem
when I print_r Json in yii2 then result is just fine but when I did print_r same Json in Wordpress then it show json with backslahes. Any reason why?
 
2:08 PM
Mnrf mnrf mnrf
Really need to know what to Monkeypatch in StackExchange
 
Kick all the users \o/
 
anyone here that knows Amazon AWS that wouldnt mind a private chat 5 minutes?
 
Seems like e.selectList(+i) is the code doing the switch work... Now need to find what the heck is e
 
@Kyll yeh I was needing to actually intercept and modify the request in flight, so I suspect your job will be easier
 
2:12 PM
So you can probably just jack into developer.chrome.com/extensions/webRequest
@PeeHaa :-P
 
@DaveRandom Oh, it's a US
 
@PeeHaa So does that make you Goose?
 
@Kyll ahh, then you may have a challenge. So you are trying to do what, exactly? Detect when an xhr completes?
 
@DaveRandom Detect when, on the new nav, questions in a tab have loaded
 
I have a feeling that will be more fruitful
 
2:24 PM
@Machavity :D
 
it's a really hard API to work with, but it does what it says on the tin when you can wrap your head around it
 
@DaveRandom I haven't heard only nice things on it =p
Let me check...
 
@DaveRandom setInterval(areYouThereYetFtw, 1000); :P
No worries. I'm not allowed anywhere near JS
 
me neither :-P
 
@PeeHaa is that yet another way of telling us about your lack of "frontend" expertise?
 
2:27 PM
@Gordon He has expertise just no taste.
 
It's not really a coincidence now anymore now is it :P
@LeviMorrison ouch burn
 
@Kyll what I used it for, and made it work really nicely after a lot of wrestling, was detecting new posts being added to the DOM in chat. You can just watch for the container elements you are interested in and handle them individually, it plays very nice with the zomgasyncsauce model of programming
 
@PeeHaa its becoming pathological
 
@DaveRandom I see. I'm on it. I'll let you know if I get any progress.
 
2:29 PM
@LeviMorrison in that context, having no taste could actually be helpful, but lets not go there
 
:P
 
@Kyll sorry, what exactly is this "new nav" of which you speak?
I may be able to put a PoC together pretty fast, I just read over some old code and I think I remember how it works
 
@DaveRandom The new tab-based SO navigation?
Well "new"... It's a few months old now
 
I don't actually know what that's referring to, am I getting an old version of the site or something?
Like, what's written on the tabs?
 
Let me take a screenshot
 
2:33 PM
Every time I click on anything that looks like a "tab" I get a full page load, no xhrs :-S
 
Some can help me to combine php to js pls?stackoverflow.com/questions/38204778/…
 
And it's XHR powered here
 
Never seen that before
DId you sign up for the beta?
 
275
Q: New Navigation Release Candidate

SklivvzTLDR: We overhauled the navigation again. To get it you need to opt in via the user preferences page, and we want your general feedback (love it / hate it) after you try it for a few days. We are planning to deploy it before the end of the year, and your feedback is important. New new nav: bac...

 
You have to signup in your profile
 
2:35 PM
ahh k
 
Ah right. No thanks :P
 
It's actually pretty nice =p
 
@nikita2206 wtf
 
for each
maybe_foreach()
 
2:37 PM
foreach or fuckoff () {}
 
forsome (){}
 
I say we just need "use strict"; mode for parse-erroring on tabs in the source
 
@Kyll I have done so, let me know how you get on, if you can't make it work then come back to me and I'll see what I can do (I have to wait for the thing to be activated on my account)
 
@DaveRandom Yay, maybe you'll want to use the US then =p
 
@nikita2206 haha, how about.. "the maintainer doesn't accept shit code in the first place"
 
2:52 PM
@nikita2206 and closed
 
Looks like I'll have to switch to for-loops for my shitty code.
 
@nikita2206 Dear PHP Devs, please save me from myself
 
@Machavity: ^
 
@nikita2206 Kinda reminds me of that jehovah's witness complaint in bugzilla about them breaking his hundreds of sites
Google is magical lol
 
@bwoebi @NikiC Regarding the PR for pcntl_signal returning the previous handler, does this seem like a thing we can merge into 7.1? Perhaps a separate function to fetch the current handler would be better?
 
2:56 PM
I searched for "firefox animation bugzilla bible"
 
@Trowski yes, no.
I'd just like if we could make it return SIG_DFL/SIG_IGN and redefine SIG_DFL to be <>false
 
@bwoebi Is that something I can just do... or is redefining a constant like that something people would be upset about?
 
yes, no.
(I think … perhaps ask Nikita to be sure)
 
@MadaraUchiha This site is similar to The Onion (fake news) but this article is highly applicable
 
@bwoebi That fills me with confidence :-P
@bwoebi Ok. (@NikiC ping)
 
3:03 PM
@Jimbo i'm currently drinking at newbury race course, for a company do.
 
Posh bastard
 
So not solved, but also technically not a problem right now.
 
@DaveRandom The mutations this API yields are... peculiar.
 
@Kyll I remember this being the case, I think that's because jQuery does things in a way you wouldn't necessarily expect. Keep it simple - find the container you are interested in and look at childList only if possible
subtree is nightmare, although it is required sometimes
 
jQuery?
 
3:11 PM
Not sure if main site uses it
 
Oh, right
 
Chat does though
 
Yeah, the way the nodes are added is fairly special
 
Hey, @bwoebi, what would be causing this error? "PHP Warning: String is not zero-terminated () (source: /path/to/zend_execute.h:250) in /path/to/index.php on line X"
 
It will be optimised for browser perf rather than observable logic so you might have a little fun... but I am pretty certain that it will yield a functionally better result than trying to intercept xhr
 
3:12 PM
yeah, JQ uses an object that refers to DOM nodes instead of the nodes themselves
 
@MarkWeiman well, exactly what it says… the byte on string + length is not zero.
 
I miss lxr
dd someone here mention it was easy to set up a local one?
 
@DaveRandom Okay, I'm going to try the naive way and see if it works.
 
@Leigh no… is it?
 
@bwoebi Yes, I get that, but why would a line like $h = new Handle("/", "/var/lib/pacman"); be causing this?
 
3:15 PM
@bwoebi I don't know, I thought I briefly saw someone here say it's "just X, you can set up X locally", but I can't remember what X is
 
@Leigh OpenGrok
 
there we go, on the opengrok page, ctags is what I was thinking of, thanks :)
 
@MarkWeiman this line alone shouldn't trigger it. It's the code in the constructor.
 
hi guys, just popping in from the ruby room.
i was wondering what is the typical way you guys deploy php apps to servers nowdays?
do you just manually ftp and port files*?
 
ftp, now there's something I'd forgotten about ;)
 
so you guys manually checkout production branch from github.
then just transfer the files right?
 
@Nima I guess there's no such thing as typical. A couple of apps here we use deploy keys and fetch straight from the git repo, others we deploy as containers and pull them down using docker.
And other people will do things differently
 
So apparently default_socket_timeout set to 0 means "timeout immediately" instead of "never timeout"?
 
@Nima: What I do is package it with my system's package manager and install it that way and tell the web server where to look.
 
ah ok i was just wondering if there is a tool or script that is populary in php.. like we have capistrano in ruby/rails world
 
3:20 PM
@MarkWeiman oh you bundle as an rpm or apt?
(or whatever)
 
@Leigh: Well, no, I'm an Arch Linux user and I make a pacman package, but same idea. I do rarely use Debian and will package a deb for apt.
 
+) thank you
 
(I know absolutely nothing about rpm sadly)
 
@MarkWeiman Aye I just meant the general idea. Is it possible to secure access to your package repo like that?
 
@Leigh: What do you mean?
 
3:23 PM
@MarkWeiman you efree() the passed string variables … only efree them when you allocated them. zpp doesn't allocate new variables, but return the passed strings directly. don't free strings received from zpp.
 
Like, say you have a closed-source proprietary app, and you deliver updates using a package repository, can you prevent unauthorised users downloading your updates?
requiring them to have a valid key or something to download
 
That's package manager dependent
For pacman at least, you can use HTTP basic auth and put the credentials in the repo url
 
@Leigh: 1. You don't have to create a repo to install packages (`man dpkg` on debian/ubuntu; `man pacman` on Arch);
2. You don't have to put the repository on the public web.
 
@bwoebi What are the current values of SIG_DFL/IGN?
 
@NikiC the values as in the system headers
which is at least on my system, 0.
 
3:26 PM
IT WORKED
 
\o/
 
It's not possible
 
@Leigh: Also I do know that pacman will allow file:// urls for a repository, so there's one way to not make it public.
 
There must be some weird non-obvious bug
 
@bwoebi and IGN?
 
3:28 PM
@Leigh: It's never been an issue for me because I have yet written anything with a proprietary license.
 
Ok, new love... ctags... didn't know vim supported it by default ...
 
@bwoebi Err nevermind, I can test it myself :D
 
@NikiC 0 (DFL) and 1 (IGN)
@NikiC yeah, a simple grep in /usr/include
 
@bwoebi Or a var_dump :D
 
that's more to type!
 
3:29 PM
@bwoebi Anyway, I think having a separate getter for this is cleaner
Either a separate getter, or drop all pretenses at retval BC for pcntl_signal
 
@NikiC dunno, it'd be closer to C API^^
 
@bwoebi Thanks
 
Okay, there's one wee tiny bug...
Aaand it works like a charm now. Thanks a lot @Dave!
 
3:47 PM
Does WordPress use prepared statements internally like Drupal( I think it does) does? My company wants to use wordpress and wpdb->prepare is a sham.
 
@NikiC The separate function is probably better just because it doesn't require an RFC/have BC breaks.
 
@UselessIntern when it comes to wordpress, I'd always assume this. it's safer.
 
@Trowski I'd be fine with it too, though
 
@bwoebi I can probably get this guy to submit another PR, otherwise I could add it.
 
@Trowski and it allows you to get the handler without changing that ... might that be useful for something as well?
 
3:52 PM
@Trowski Though, if we add it as separate function, does it have to be 7.1 only? \cc @NikiC
 
Like, to check if a certain signal is ignored
 
@NikiC Right, the separate function is actually more versatile.
 
J.S
I been reading documentation for a while trying to find why $days = (int) "50 days"; is $days == 50; Can anyone point me in right direction? I was under the impression it would be 0
 
@Gordon Mhm, that only increases my concerns heh. Fortunately, we don't have any sensitive data on the site. Wont be surprised if it gets pwnd, they'll blame it on Windows when the bulk of web intrusions come form bad code. Written by ourselves or someone else.

Is there an easy was to force it to use mysqli at least?
 
@J.S It's truncating the non-numeric portion when it converts the type. Sloppy, but it works
 
3:54 PM
@bwoebi I would think it could go in 7.0 as well then.
 
@DaveRandom Seems to work perfectly now. The US hides the home tab (which you can't do by default with the new nav), and sets the tab right after it as "home". In case you want to check it out: github.com/Aralun/SO-home-nuker/blob/master/home-nuker.user.js
 
@Trowski yep… Bit late for 5.6 (I think even though it still would be possible), but should be good for 7.0 … just ask Anatol first
 
J.S
@Machavity really its that simple ? i was under the impression there must be some big reason or logic behind it :-)
 
@J.S You're giving PHP too much credit :P
 
@NikiC trying to come up with an efficient algorithm for array_rand - everything I come up with ends up using more memory, but results in a better distribution (at the moment playing with an n-bit bitfield to record bucket selection - where n = count(array)). resevoir sampling seems to be plainly bad as it always does count(array) iterations
 
3:57 PM
But yeah, that's pretty much it
 
Did you have anything in mind for it?
 
@Leigh Urgh
I spent a lot of time thinking about that some months ago
 
Gon
hoi!
 
But I don't think I still have my notes :D
@Leigh The most important part is fixing the N=1 case though, which is easy
 
Well my options seem to be:
1) create a temp hash table to record picks
2) create a bitfield to record picks
3) resevoir sampling
 
J.S
3:59 PM
@Machavity :-) thanks I feel much better
 
if we say we're picking n from m, 1 and 2 are O(n), and 3 is O(m)
N=1 is fixed
if (num_req == 1) {
    randval = php_mt_rand_range(0, num_avail - 1);
    hash_entry = Z_ARRVAL_P(input)->arData + randval;

    if (hash_entry->key) {
        RETURN_STR_COPY(hash_entry->key);
    } else {
        RETURN_LONG(hash_entry->h);
    }
}
 
@Leigh You need to check for UNDEF there as well
And resample in that case
And probably add a case to fallback to the N!=1 case if nNumUsed is much larger than nNumOfElements (which can happen)
 
ah crap, you're saying that even in the above, I may be picking a bucket that is now unassigned?
 
@Leigh yes
 
4:02 PM
you have to do it in a loop, until you hit something
 
back to the drawing board then
 
@Leigh What did you plan to do in the case an already picked element is hit? Just sample again?
 
@NikiC Yep, and where n > m/2 then I negate the whole thing
So I pick rejections rather than inclusions
 
hm...
I guess for a bitset that's the best you can do
 
Limits the max chance of a collision to 1/2
 
4:16 PM
but if you use an HT to record picks you might be able to remap this more intelligently
 
You don't want to be picking 9999 out of 10000 elements and being sat in a loop for multiple seconds
 
e.g. always pick one element less and map the already picked ones to the end of the array
 
@NikiC to avoid the undef issue, you can just rehash at start?
 
that would guarantee N samples, undefs notwithstanding
@bwoebi For the N!=1 case that's what I'd do, yes
 
Wouldn't the overhead of rehashing + directly accessing bucket at index n be more than iterating over the ht?
 
4:25 PM
@Leigh As you don't expect to rehash every time, no.
It would be preferable to only rehash if you have a bad population ratio though
 
4:47 PM
In the England country, what's the accent? Is it British?
 
It's called "moron"
Or fake murikan
@DaveRandom do you have a passphrase on your key?
 
@stack I'd say it's uh.. English, since the Scottish, Welsh, and Irish accents are quite different, although you have a ton of regional accents that make up the group of English accents
 
:)
 

« first day (2089 days earlier)      last day (2874 days later) »