1,772 reputation
814
bio website blog.piechotka.com.pl
location Bay Area, California
age 26
visits member for 4 years, 7 months
seen 3 hours ago

Mar
11
comment What level of a computer system does firmware run on?
@Tim Both. In general firmware refers to various embedded programs needed to operate the devices. One of the devices is processor where it can be used to implement ISA (it's called microcode). However it itself needs to use instructions so there is an internal, hidden from user, ISA between microcode and silicon. In addition the firmware of devices is usually encoded using some ISA for their internal processor or CPU external ISA if it is meant to use CPU.
Mar
11
answered What level of a computer system does firmware run on?
Mar
10
comment The dream of declarative programming
In addition to @itsbruce example reactive programming is consider declarative and is about interaction with environment.
Feb
16
comment Why are language features more popular than compiler design?
@EECOLOR re marking features - what about the features by prohibition? Agda do guarantee to large extent the correctness of program (corrects states and termination) - if you allow it to interact arbitrarily with PHP you loose such guarantees without needed to check anything. In similar way NULL-less languages have 'fun' interacting with languages that do have a billion dollar mistake in design (see Scala and JVM). (In addition to Doc Brown examples LLVM seems to be close to arbitrary input/arbitrary output).
Feb
5
comment Why doesn't Java have optimization for tail-recursion at all?
@ZanLynx it depends on the type of problem. For example Visitor pattern can benefit from TCO (depending on specifics of structure and visitor) while having nothing to do with FP. Going through state machines is similar though transformation using trampolines seems slightly more natural (depending on problem). Also while you can, technically, implement trees using loops I believe the consensus is that recursion is much more natural (similar for DFS though in this case you may avoid recursion due to stack limits even with TCO).
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.