search for: hashabl

Displaying 9 results from an estimated 9 matches for "hashabl".

Did you mean: hashtbl
2010 Oct 23
2
[LLVMdev] Cast failure in SelectionDAGBuilder
...preds = %prologue %ValueRef_new = call %"tart.core.ValueRef[char]"* @"tart.core.ValueRef[int32].type.alloc"(), !dbg !48488 store %"tart.core.ValueRef[char]"* %ValueRef_new, %"tart.core.ValueRef[char]"** %gc_root, !dbg !48488 %construct = call %tart.core.Hashable @"tart.core.ValueRef[int32].construct(int32)"(%"tart.core.ValueRef[char]"* %ValueRef_new, i32 %value), !dbg !48488 store %"tart.core.ValueRef[char]"* null, %"tart.core.ValueRef[char]"** %gc_root, !dbg !48488 %upcast = getelementptr inbounds %"tart.c...
2012 Aug 19
0
[LLVMdev] Greetings & Javascript -> LLVM...
...officially doubles, but in many cases it is profitable to runtime-specialize them to be integers, on the other hand, Python distinguishes between floats and integers, but Python integers overflow into arbitrary-precision integers on-demand. For another example, in Python, dictionaries can have any hashable type as their key, but in JavaScript, "objects" (which double as hashtables) can only have strings as their keys (although numbers get implicitly converted to strings which is another big language-specific optimization opportunity). Oh, and in JavaScript "objects" have a number...
2009 Apr 24
11
We're sorry, but something went wrong.
Great. I''m in the development environment and that is the error message I get?! What good does that do me? I''m trying to follow along with the examples in AWDWR(3rd.), and I have this method in a store controller: private def find_cart Cart.new end That works fine, except that every request(initiated by clicking on an ''add to cart'' button) will
2012 Aug 19
0
[LLVMdev] Greetings & Javascript -> LLVM...
...profitable to runtime-specialize them to be integers, >> on the other hand, Python distinguishes between floats and integers, >> but Python integers overflow into arbitrary-precision integers >> on-demand. >> >> For another example, in Python, dictionaries can have any hashable >> type as their key, but in JavaScript, "objects" (which double as >> hashtables) can only have strings as their keys (although numbers get >> implicitly converted to strings which is another big language-specific >> optimization opportunity). Oh, and in JavaScri...
2012 Aug 18
4
[LLVMdev] Greetings & Javascript -> LLVM...
I have a concept for which I'm conducting an initial analysis. The broader idea is to create an LLVM, JIT based runtime that would create a platform amenable to scripting languages, but do so while enforcing an optional sandbox environment when dictated by security concerns (browsers, user preferences). With this approach, the community would gain language independence for browsers, as well
2012 Aug 19
4
[LLVMdev] Greetings & Javascript -> LLVM...
...t; many cases it is profitable to runtime-specialize them to be integers, > on the other hand, Python distinguishes between floats and integers, > but Python integers overflow into arbitrary-precision integers > on-demand. > > For another example, in Python, dictionaries can have any hashable > type as their key, but in JavaScript, "objects" (which double as > hashtables) can only have strings as their keys (although numbers get > implicitly converted to strings which is another big language-specific > optimization opportunity). Oh, and in JavaScript "objects...
2009 Oct 12
0
What is the correct way to define __hash__?
...d add >> up all the members. But I am wondering if this would cause a >> performance issue for certain classes. > > Unless if you are very familiar with the math of hash functions, I don't > recommend that you try to implement one directly. Instead, make a tuple of > the hashable content of your class and return the result of calling hash() > on that tuple. Be sure to make your equality comparison do the right thing. > > class A(object): > ?def __init__(self, a, b): > ? ?self.a = a > ? ?self.b = b > > ?def _key(self): > ? ?# I include the name of...
2024 Jan 18
0
Choices to remove `srcref` (and its buddies) when serializing objects
...or the bytecode to functions. The issue with the `identical()` function in that context was eventually patched, but the comment by R-Core that serialization is not intended to be used to produce a reliable hash stands. Use of `identical()` or `serialize()` is simply not designed to ensure the same hashable object (in terms of bytes). This is echoed by Tomas' comment above. But we note that it is 'good enough' in most cases. Fwiw `nanonext::sha256()` and family directly hashes character strings and raw objects, but uses the same approach as `digest::digest()` elsewhere. So if someone co...
2019 Aug 01
5
RFC: Strong typedef for LLVM
Lately I've been using some utilities to increase the number of logic errors caught at compile time. I thought they might be useful to the LLVM project. I'd appreciate feedback on the below proposal. Would the community find these useful? -David RFC: Strong typedef utilities for LLVM -------------------------------------- Abstract -------- This proposal