1,703 reputation
814
bio website blog.piechotka.com.pl
location Bay Area, California
age 25
visits member for 4 years, 3 months
seen yesterday

Nov
20
comment Why do functional programs have a correlation between compilation success and correctness?
@Doval I meant the ML-like type system, not a ML language. Also I meant 'to greater extent then most others'. Sorry for misspeaking.
Nov
20
comment Why do functional programs have a correlation between compilation success and correctness?
Not a full answer but typing of program is crude form of formal verification of program. In general Object Oriented programs have either complicated or very simple type systems as the substitution needs to be taken into account - in most cases they are made unsound for sake of convenience. OTOH the ML-like systems can use CH to full extent so you can encode a proof just in types and use compiler as proof checker.
Oct
24
awarded  Popular Question
Oct
22
comment Why are floating point numbers used often in Science/Engineering?
@Jules You made a type - you mean real, not rational, number. As rationals are enumerable you can do it by storing their number in a series (though easier way is through 2 bignums AKA arbitrary precision arithmetic).
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 approved 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