1,703 reputation
813
bio website blog.piechotka.com.pl
location Bay Area, California
age 25
visits member for 4 years, 1 month
seen 2 days ago

Sep
21
comment Why don't developers make installation wizards on linux?
@Arsalan00: Setting aside that this changes, I wasn't talking about what applications can do and about sandboxing - just installation model. And installation model on Linux is almost the same as in Windows Store/AppStore/Play Store.
Sep
21
answered Why don't developers make installation wizards on linux?
Sep
21
comment Why don't developers make installation wizards on linux?
@Arsalan00 Think about Linux model as AppStore - it's the same model really. You could ask why there are no wizards for Android or iOS.
Sep
11
comment What is the purpose of a Code Review
In addition to @DocBrown there are cases which cannot be easily testable - data races, some types of deadlocks, livelocks, undefined behaviours/values (mostly in C/C++ but the order of elements in hash tables in undefined as well) or resource leek (opening file in a loop might be a bad idea even with GC). Some of those things can be detected by sufficiently smart -compiler- static analysis.
Sep
1
awarded  Yearling
Aug
28
comment Is there any danger in writing raw bytes to a file?
@Caleb even 10^10 integers can be easily mapped into 48-bit virtual space (though with memory mapped files there is danger of writing beyond end of file) and 40 GiB of memory including swap is not necessarily unheard of even on laptops (assuming 4 bytes per integer). If you want to make sure no cheats with in-place sort are done you need ~140 TiB of data.
Aug
25
comment Is method overloading anything more than syntactic sugar?
"To count as syntactic sugar, java would have to be pretending that you really wrote foo_int and foo_double functions but it doesn't." - as long as we talk about overloading methods and not polymorphisms what would be a difference between foo(int)/foo(double) and foo_int/foo_double? I don't really know Java very well but I would imagine that such renaming really happens in JVM (well - probably using foo(args) rather then foo_args - it does at least in C++ with symbol mangling (ok - symbol mangling is technically an implementation detail and not part of language).
Jul
28
comment Programming a promotions engine
I guess take number of items in category A, divide by X and round down (number of promotions taken). Then multiply by Y giving number of items at Z% discount. Take Y most expensive items from category B and apply discount (otherwise people are disincetivised to add more items to basket which might be bad for UX). Probably it should be wrapped into some more general engine. If it's now what you had in mind please clarify.
Jul
23
revised Why is polling accepted in web programming?
Make the title more specific (polling can refer to multiple similar things which would have different answer depending if it's about OS, HPC, Web programming etc.)
Jul
23
suggested suggested edit on Why is polling accepted in web programming?
Jul
12
comment How can a true Vector be implemented in Haskell?
To some extend in the same way as how to store a value in register in say C or C++, or you free memory in GC language - compiler is free to rearrange data, put the values in register etc. or expose the things by (extensions)[tinyurl.com/ovvxtqt]/(libraries)[http://hackage.haskell.org/… to programmers if they really need them - but assumption is that they don't care in most cases. In similar way Haskell programmers don't care in most cases if the data is packed in sequential region of memory instead of, for example eliminating the need for evaluation entirely.
Jul
9
answered Referencing official documentation in source-code documentation
Jul
8
comment Pointer indexing
@BartvanIngenSchenau - ups. sorry - it looks like I implied instead of saying a bit too much. What I meant is that they are fast enough for debugging while too slow for production - and if the hit would be acceptable probably more HL language then C is probably preferable - so in a sense the severeness is dependent on context (debug vs. release).
Jul
8
comment Pointer indexing
@BartvanIngenSchenau depending on what you mean by 'severe performance hit' there is symbolic execution for C (for example clang+klee) as well as sanatizers (asan, tsan, ubsan, valgrind etc.) which tend to be very useful for debugging.
Jun
15
answered Why do programmers still use mailing lists?
Jun
13
revised Memory read/write access efficiency
added 572 characters in body
Jun
13
answered Memory read/write access efficiency
Jun
13
comment Memory read/write access efficiency
@wolfPack88 check matrix multiplication program for (int i = 0; i < size; i++) for (int j = 0; j < size; j++) for (int k = 0; k < size; k++) c[i,j] += a[i,k] * b[k,j]; with various permutation of loops. For size take sufficiently big number to fill the cache by the single matrix (preferably aligning to cache line). You'll find one that the most efficient one is when you 'stream' the data i.e. access values consecutive in memory and in worst case when you accesses data 'randomly'. BTW. for simple cases (such as matrix?) polyhedral compilers can optimize the code nowadays.
Jun
13
comment Memory read/write access efficiency
In general I would consider for HPC the last option but not necessarly in the trivial interpretation - in practice the data access and algorithm should be codesigned for particular platform (do you stream by row or column, do you need 'random access' and how it is structured, what's cache coherency of platform, how long is cache line etc.). However for most of linear algebra you have already optimized libraries such as BLAS, SPARSE etc.
Jun
13
comment Memory read/write access efficiency
@wolfPack88 for large data (HPC) I would imagine that you want to make the data close to each other to exploit the physical and temporal locality. I would imagine option 3 with alignment to cache line size of row might be most efficient if you would stream the data in correct way. On the other hand it would be least efficient if you have low associativity in cache and you will stream incorrectly as the processors starts trashing data. It would also depend on partitioning the data across machines (assuming you have single address space).