search for: counterintuit

Displaying 20 results from an estimated 186 matches for "counterintuit".

2007 May 10
0
Counterintuitive behavior in ActiveRecord I was implementing dirty checking for an application, and I found something that is a little counterintuitive. Let me start with a quick quiz: bob=User.find(1) alice=User.find(2) trip=Trip.new trip.driver=bob old_
I was implementing dirty checking for an application, and I found something that is a little counterintuitive. Let me start with a quick quiz: bob=User.find(1) alice=User.find(2) trip=Trip.new trip.driver=bob old_driver=trip.driver trip.driver=alice In this example, who is old_driver? If you guessed Alice, you''re right. Inside associations.rb, the mutator is defined as: define...
2016 Sep 12
2
Counterintuitive use of LLVMBool in C-API?
...; reference to the module via the OutModule parameter. Returns 0 on success. > */ > LLVMBool LLVMParseBitcode2(LLVMMemoryBufferRef MemBuf, > LLVMModuleRef *OutModule); However in most scenarios i know, a Bool is something like 0 = False !0 = True In short: is it just me or is this really counterintuitive? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160912/f8b1e4c2/attachment.html>
2016 Sep 12
1
Counterintuitive use of LLVMBool in C-API?
...urns 0 on > success. */ > > LLVMBool LLVMParseBitcode2(LLVMMemoryBufferRef MemBuf, > > LLVMModuleRef *OutModule); > > However in most scenarios i know, a Bool is something like > > 0 = False > > !0 = True > > > > In short: is it just me or is this really counterintuitive? > > It is counterintuitive, but it is also consistent with a lot of C APIs > (including most of the standard library). Returning 0 on success and > non-zero on failure is a very common idiom in C. The rationale is that you > can write: > > int ret; > if ((ret = some_fu...
2017 Sep 18
0
Counterintuitive use of LLVMBool in C-API?
...gt;> > LLVMBool LLVMParseBitcode2(LLVMMemoryBufferRef MemBuf, >> > LLVMModuleRef *OutModule); >> > However in most scenarios i know, a Bool is something like >> > 0 = False >> > !0 = True >> > >> > In short: is it just me or is this really counterintuitive? >> >> It is counterintuitive, but it is also consistent with a lot of C APIs >> (including most of the standard library). Returning 0 on success and >> non-zero on failure is a very common idiom in C. The rationale is that you >> can write: >> >> int...
2005 Aug 04
1
Counterintuitive Simulation Results
I wonder if someone can help me understand some counterintuitive simulation results. Below please find 12 lines of R code that theoretically, to the best of my understanding, should produce essentially a flat line with no discernable pattern. Instead, I see an initial dramatic drop followed by a slow rise to an asymptote. The simulation computes the...
2004 Dec 14
5
sort() leaves row names unaffected
...I ran into a bug. If I do summary(df1$X1) -> df1.y df1.y a b c d e [1,] 50.74627 8.955224 17.91045 19.40299 2.985075 sort(df1.y) a b c d e [1,] 2.985075 8.955224 17.91045 19.40299 50.74627 my numbers are sorted but do not anymore correspond to the rownames. For me it is counterintuitive that solely the numbers are sorted and not the names. Is there a way to sort names + numbers or is this behaviour of sort() unintended? Martin R 2.0.1-1 debian reposit.
2012 Oct 22
3
Duplicate class declaration because of counterintuitive class scoping
...s[Profile::Tomcat]): Class profile::tomcat in module profile info: Applying configuration version ''1350936684'' notice: Finished catalog run in 0.05 seconds I haven''t come across this syntax for class declaration before, and although it seems to work, it is at least quite counterintuitive, and possibly a bug. Everything I find seems to confirm that a declaration like "include tomcat" should just apply the resources contained in the main class in module tomcat (in manifests/init.pp). What do you guys think ? Kind regards, k -- You received this message because you a...
2018 Nov 21
2
Subsetting row in single column matrix drops names in resulting vector
...nrow = 2, dimnames = list(c("row1", "row2"), c("col1"))) a[1, ] # 1 It returns *unnamed* vector `1` where I would expect named vector. In fact it returns named vector when number of columns is > 1. Same issue applicable to single row matrix. Is it a bug? looks very counterintuitive. -- Regards Dmitriy Selivanov [[alternative HTML version deleted]]
2015 Mar 05
3
Fwd: Re: IP drop list
...> > The inherent assumption here is that dovecot, using a "flat file", will > be able to process the block list more effectively than the firewall, > which is a tool written for the *purpose* but supposedly unable to even > *try* due to the list's size. That sounds ... counterintuitive. I am the original poster and just came back to this thread. When the first couple replies were "fail2ban" I lost interest. The reason I contemplated a flat text scan by dovecot is because, for the most part, my dovecot is low volume. So even if parsing a flat text file is less '...
2008 Nov 17
2
assign("FALSE", TRUE)
...ve an object named ``FALSE'' with value TRUE in one's workspace. This apparently has no deleterious effects; e.g. doing sample(1:7,replace=FALSE) gives a random permutation of 1:7 as expected and desired. I.e. the local object named ``FALSE'' is not used. Still, this seems counterintuitive and a bit confusing. Is it the intended state of affairs? I would have thought that FALSE <- <whatever> and assign("FALSE",<whatever>) would be completely equivalent. This is clearly not a very important issue, but it might bear some thinking about. cheers...
2020 Aug 20
2
[PATCH 05/28] media/v4l2: remove V4L2-FLAG-MEMORY-NON-CONSISTENT
..., but I found this out when trying > to figure out how to just disable it. But it also ends up using > the actual dma attr flags for it's own consistency checks, so just > not setting the flag did not turn out to work that easily. > Yes, sadly the videobuf2 ended up becoming quite counterintuitive after growing for the long years and that is reflected in the design of this feature as well. I think we need to do something about it. > But in general it helps to add a few more people to the Cc list for > such things that do stranger things. Especially if you think you did > it bas...
2018 Nov 27
1
Subsetting row in single column matrix drops names in resulting vector
...row1", "row2"), c("col1"))) > a[1, ] > # 1 > > It returns *unnamed* vector `1` where I would expect named vector. In fact > it returns named vector when number of columns is > 1. > Same issue applicable to single row matrix. Is it a bug? looks very > counterintuitive. This and related issues are addressed in pqR, in the new release of 2018-11-18. (See pqR-project.org, and my blog post at radfordneal.wordpress.com) The behaviour of a[1,] is unchanged, for backwards compatibility reasons. But in pqR one can explicitly mark an argument as missing using &quo...
2020 Jul 07
3
BUILD_VECTOR disambiguation
Thanks for the clarification. The `except` seemed dangling to me, but it's early here. Just curious... how do we end up with a mixed type BUILD_VECTOR? That's counterintuitive. On Tue, Jul 7, 2020 at 10:58 AM Krzysztof Parzyszek via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Mixed integer types are ok, but the values will get truncated to the element type of the output value. It's pretty much what the comment says. > > -- > Krzysztof P...
2017 Mar 28
2
`[` not recognized as a primitive in certain cases.
...c[[1]]) ## [1] FALSE # Expected to be TRUE mc2 <- as.call(list(`[`,iris,2,"Species")) is.primitive(mc2[[1]]) ## [1] TRUE So depending on how I construct the call (using call() or as.call() ), the function `[` is or is not recognized as a primitive by is.primitive() The behaviour is counterintuitive and -unless I miss something obvious here- likely to be a bug imho. I immediately admit that my C chops aren't sufficient to come up with a patch. Cheers Joris -- Joris Meys Statistical consultant Ghent University Faculty of Bioscience Engineering Department of Mathematical Modelling, St...
2015 Jan 13
3
DJBDNS: very weird dnscache issue
...rameters in the dnscache.conf as they seemed to be the only ones that seemed relevant: DATALIMIT and CACHESIZE. They are described as limints (in bytes) on the total data memory allocation and cache, default values are 80000000 and 50000000 respectively. Playing with these demonstrated some highly counterintuitive results: 1) Setting the values lower (say, an order of magnitude lower) made the dnscache process run longer. 2) Shortening the relative gap between the two values (for instance, setting DATALIMIT at 52000 and CACHE at 50000) made it run for about an hour vs about 1 minute, load seeming to be...
2013 Nov 22
2
what is the correct way to force a copy of an object?
Dear R-devs, I'm working on a package where we have a function that modifies an Object via .Call to a C function. Unfortunately in some situations this counterintuitive modifies a previously made copy of the object passed to the function. For example, if I first make an assignment to "copy" the object, b<-a and then modify 'a' , the value of 'b' will be modified as well. I understand that this is probably due to lazy evaluati...
2009 Mar 06
2
Interaction term not significant when using glm???
Dear all, I have a dataset where the interaction is more than obvious, but I was asked to give a p-value, so I ran a logistic regression using glm. Very funny, in the outcome the interaction term is NOT significant, although that's completely counterintuitive. There are 3 variables : spot (binary response), constr (gene construct) and vernalized (growth conditions). Only for the FLC construct after vernalization, the chance on spots should be lower. So in the model one would suspect the interaction term to be significant. Yet, only the two main term...
2014 Apr 08
4
[LLVMdev] Proposal: Move host CPU auto-detection out of the TargetMachine
All, Currently the X86 backend does CPU auto-detection and subtarget feature detection when the TargetMachine is created if no explicit CPU was specified. It's counterintuitive for low level tools like ‘llc’ to do this, as it means the same .ll file compiled on heterogenous machines generates different results from the same ‘llc’ command line. It is still useful to be able to opt-in to such behavior to, for example, replicate clang’s behavior when -mcpu=native is suppl...
2018 Nov 21
3
Subsetting row in single column matrix drops names in resulting vector
...ol1"))) > > a[1, ] > > # 1 > > > > It returns *unnamed* vector `1` where I would expect named vector. In > fact > > it returns named vector when number of columns is > 1. > > Same issue applicable to single row matrix. Is it a bug? looks very > > counterintuitive. > > > > > -- Regards Dmitriy Selivanov [[alternative HTML version deleted]]
2018 Nov 29
4
Unexpected argument-matching when some are missing
...,if(missing(y)) 'missing' else y, '\n') ? cat('z=',if(missing(z)) 'missing' else z, '\n') } myfun(x=, y=, "z's value") gives: # myfun(x = "z's value") # x= z's value # y= missing # z= missing This seems very counterintuitive to me, I expect the arguments x and y to be missing, and z to get ?z?s value?. When I call myfun(,y=,"z's value"), x is missing, and y gets ?z?s value?. Are my expectations wrong or is this a bug? And if my expectations are wrong, where can I find more information on argument-ma...