9,565 reputation
2348
bio website dmitry.cheryasov.in
location
age
visits member for 3 years, 10 months
seen 10 hours ago

I constantly try to expand the little I know about programming.

google profile


21h
comment Removal or footer text in an open source
The program must have come with a license, or at least a name of the license, like "GPL v2", or "Apache License", or "BSD License", etc. Look for it.
22h
comment Removal or footer text in an open source
What does the license say?
2d
answered Is it possible to make a printable 'template' document?
Oct
22
comment How important is it to reduce the number of lines in code?
A tangential bit showing how far the care about code terseness and simplicity may take you: a story about kdb.
Oct
22
comment Return equal occurrence of char in a list of strings
Well, this can make perfect sense if we use byte-sized characters.
Oct
22
revised Return equal occurrence of char in a list of strings
added 9 characters in body
Oct
22
comment Return equal occurrence of char in a list of strings
Imagine that the first string has only one character, and the second line is long and contains all sizeof(char_t) * 8 possible characters. You'd have counted great many counts of characters in the second string that don't ever occur in the first. (This, or I misunderstand what you mean saying "preprocess both strings").
Oct
22
answered Return equal occurrence of char in a list of strings
Oct
15
comment Name for this type of parser, OR why it doesn't exist
Basically your parser parses a single document and yields a parse tree, then immediately starts parsing another document, etc. I suppose this behavior modification is trivial compared to the variety of parsing techniques applied to a single document. Hence the lack of a special term for it.
Oct
15
comment Seeking Guidance on Thread Safe Scripting
Try from multiprocessing.pool import ThreadPool and import Queue, and in no time you'll stop reinventing wheels and start solving your problem. Have some worker functions running on your thread pool, send tasks to workers using one queue, send results back to the main thread using another queue.
Oct
13
answered Haskell's ':' operator
Oct
13
comment Why does Scala have return but not break and continue
I can imagine that the authors of the language consider tail recursion as the way to construct iteration. I can imagine that break and continue need some additional cleanup machinery. OTOH return is a way to orderly terminate a function, and any cleanup machinery is already there anyway.
Oct
7
comment Which one of these would be the better way to implement object copying in c#?
The partial copying approach makes most sense with immutable objects, that is, when all object's fields are final. If you already have a builder class for that, you could extend it so that it would accept a template object: var modified = builder(template).WithA('foo').WithB('moo').build();. If the objects are indeed immutable, you could easily share larger parts of them while copying. Also, I always tend to prefer shorter code; it's usually clearer.
Oct
7
awarded  Enlightened
Oct
7
awarded  Nice Answer
Oct
6
comment Why was Fortran never used to develop an Operating System?
You are seemingly conflating C and C++. You can write OO code in C (see Gnome / GTK), and probably even in Fortran. C++ only provides [reams of] syntactic sugar for that.
Oct
6
comment Why was Fortran never used to develop an Operating System?
@Snowman А C compiler can lack support for particular CPU instructions, failing to offer a high-level construct to compile into these instructions, not even intrinsics. This leaves you with inline assembly or just assembly + extrn functions. I suppose Fortran could offer the same if it had adequate data structures and a way to handle pointers. Interfacing Fortran from assembly was not hard (at leas on PDP11), but it somehow defeats the purpose of a 'portable assembly'.
Oct
6
answered Why was Fortran never used to develop an Operating System?
Oct
3
answered An algorithm for finding converse duplicates of ordered pairs
Oct
1
reviewed Approve suggested edit on finally tag wiki excerpt