HNHacker News
TopNewBestAskShowJobs

krollew

40 karma · joined April 2, 2012

submissionscomments
krollew··on Haiku OS (BeOS clone)
Well, I see Haiku becomes more and more popular. I wonder on one thing - why would I be interested in next operating system if I have Windows 7 and Linux? What does it have that those systems haven't? I think authors of Haiku should find that and make sure that people that visit their site will read about that.
krollew··on Using unix as your IDE
Yeah. POSIX shell is my IDE of choice too. So I agree with it. Although there is one exception - development in C#/.NET which is only environment in which I wouldn't code with anything else than Visual Studio. :) But maybe it's just a matter of way I was tought to use it, with all those one click - hundreds LOCs stuff. So I can't imagine coding in .NET without it.
krollew··on Success Amnesia
Yeah, that works very well for me. No worries, very much happiness plus while for reflection on fail. I like it. :)
krollew··on Creativity is not a talent
Brilliant. Most of things he said I already knew and I have to say he's completely right.
krollew··on Rethinking Programming Language Tutorials
I disagree. Early mentioning "associative arrays" is a problem? I don't think so. Even if reader don't know what they are, he can learn from wikipedia or somewhere else. Why write so many times about basics? Googling is so hard? Sory, I think it's most basic programmer skill - to find information he need.

The same with everything nil and another novice caring stuff. This book is good (I know since I learnt from it), if authors cared about so-novice-people this book would suck so much. Imagine you want use lua for your C program, whant to learn it first and you read what associative array is. I'd be mad.

And I disagree with your point about "practical" examples. Practical stuff you learn at work. Examples are good to learn syntax and general stuff, rest you can find quickly in documentation.

On the other hand, programming tutorials needs rethinking, but I think it need far deeper change.

krollew··on Error handling style in C
That's more than goto:

1. It can be called from any place in code.

2. Its call can be written in function. You don't write so much ifs whenever you call it.

krollew··on Error handling style in C
It lacks 4th method that I find the best: with long jumps. I mean for example:

  jmp_buf errbuf;
  int result;
  if( !( result = set_jmp ) )
  { 
      /* Code to do on fail. Result may be some error code */
  }
  else
  {
      someaction( par1, par2, ..., errbuf);
      anotheraction( par1, par2, ..., errbuf);
      /* Etc. */
  }
errbuf might be global if you prefer, but I'd rather avoid them. When something is wrong called function calls longjmp(errbuf, errorcode).
krollew··on Why is there no Facebook for programmers & hackers?
That's obvious. Programmer is somebody who create source code. Hacker is someone who learn alot about IT stuff and knows multiple times more than typical coder. Someone who can solve real problem. Programming is a craft, hacking is an art.
krollew··on Thinking in a Foreign Tongue Reduces Decision Biases
Sounds reasonable. My experience (native polish, almost native english plus ukraininan and russian) says brain is rather unable (or it's not used) to use multiple languages at the same time. So if you think in foreign language (I mean: language you don't usualy think in) brain hasn't enough words (or is too lazy to look for them ;)) to make big analysis of problem so It doesn't do that.
krollew··on Let's hack television by getting rid of all commercials
Nowdays TV became something not worth to have. All those movies, shows, news and popular scientific stuff you can find in the internet. I don't have TV set at home and It's great, no shows that make you stupid. Instead there is silence, good music or nice chat with people you live with. Ow, I like it so much. :D
krollew··on Pitfalls in C and C++: Unsigned types
Why not to use unsigned int where no negative numbers should occur? You should write code that won't make those values negative anyway.

Except that I think unsigned int will cause segmentation fault when signed int would cause program run farther and work inproperly. For example, if you use some int as an index. It should be non negative, but you've made mistake and you calculated -1. If you use signed int it would access some data and work if it and probably you will have big problem with debugging. If you used usigned int -1 is incredibly high number which in 99% cases will cause segmentation fault at the source of problem, so process of debugging would be far faster.

When you use that value for some calculations it's the same. Problably such value would make values "unbelivable" and you start debugging at place where such value occured.

krollew··on You're bored?
Some wise guy told: "Only boring people gets bored".

Seems to be true. Since I'm not boring I hardly remember how does it feel to be bored. :) There's so much stuff to do. Only thing you have to do it to see it's awesomeness and then "good bye, boredom". :D

krollew··on How Psychedelic Drugs Can Help Patients Face Death
Psychedelic drugs can help nearly everybody, not just terminal patients.
krollew··on I Learned to Speak Four Languages in a Few Years: Here’s How
It migh sound unbelievable, but why not?

I'm learning Ukrainian and Russian for 3,5 months. I understand Ukrainian just like that and understand Russian quite well; written and spoken. I speak ukrainian quite good and start to speak russian (because I started with ukrainian and didn't write russian first). It was 3,5months of nearly no effort maybe couple hours a week.

OK, I'm polish so slavic languages are nothing new to me, but many people learnt russian here with nearly no result. I think it's way of learning. I just started write and read ukrainian and russian bit later.

If I learnt familar language so fast with no effort why not to learn european language in 5 months of some effort? It's possible since european languages are not completely different and I know english and understand german now. Well, maybe it won't be C1, but I can believe there are people with better language skills than me.

krollew··on Stroustrup C++ 'interview' - parody (funny)
Oh god. I've never looked at programming language like that before. Now C++ starts to make sense. xD
krollew··on Why Good Programmers Are Lazy and Dumb
Don't take words so binary. That's the big problem of most languages. That's something like that:

If I see I have so big job to do I have problem to start, procrasinate. What does it mean? Obviously I'm lazy, isn't it?

At the same time if I see nice way to make easier some complex stuff I do frequently I do it, find it exciting, enjoyable and I don't procrastinate. So? I'm unlazy at the same time. That's the effect of being inteligent and lazy at the same time.

Maybe he could have used better words to describe that, but It wouldn't tell the people that lazyness may be advantage as well, because such lazy code is so nice. Time saving is not only thing. Such lazy code tends to be so DRY, as he wrote and as code is DRYer it is more readable as well.

About dumb, it's very similar. Guy you ask so elementar questions. It's all so obvious. So many people would say he's dumb, even take it personaly.

If he doesn't use word dumb, that fact wouldn't be emphasized so nice.

krollew··on Never Stop Hacking
I hack for fun. Learning is just useful and profitable side effect. xD
krollew··on A Lisp based programming language I'm creating
Well. This language seems to be senseless. It looks like all those parenthesis are there to make language look like Lisp. Well, I'd grade Lispness of this code as totaly non-Lisp like. Far more interesting would be atempt to create C-looking functional language that could look like that:

  define( fact, ( n ), function(
      cond( ( n = 0 || n = 1, 1 )
            ( n > 1, n * fact(n-1) )
      )
  )

  print( fact( 5 ) )
I think I'd try to program in language like that. Lisp way of thinking, but parenthesis are bit more helpful and there are "normaly" used operators which makes language bit more readable. Your project looks like another purely academic example. I think purely academic examples sucks because don't teach people to do what is actualy needed.

I didn't read your code carefully, but "endles" elsif chains looks terrible and I think there shouldn't be stuff like that in tutorial project. Moreover I believe java isn't good tool for that purpouse( another nobody seems to teach ). I'd use flex and bison or perl if you realy want to implement lexical analisis yourself..

krollew··on Lucky to be a Programmer
I know what are you talking about. Joy at work is deminetely something I like very much. On the other hand I think it's about doing job that you like. It doesn't have to be programming.
krollew··on When will I ever use math?
Maths are sometimes useful for some people. It's matter of what part of maths we are talking about. For example I used to use some geometry and statistics/probability calculus. Of course I use algebra almost everyday. Rest of maths may be great entertainment for now. :)
krollew··on The demise of the low level Programmer.
Wise rule says "Don't tweak efficiency until needed". Since we have fast CPUs/GPUs and faster are made very often tweaking efficiency is less needed. I think this rule is sometimes overused, but what can I do? :P Anyway, there are still people that know much about internals even if they don't use it at work. :) Currently I code in Perl and can tell you something even about pageing internals. By the way we had quite nice class on it on university. :)
krollew··on C Finally Gets A New Standard
I think because such naming is used in all standard C library.
krollew··on Why haven't we cured cancer yet?
I think that there is no widely known cure for cancer not because nobody know one but because currently used cancer therapies are much more profitable. For example there is something like Gerson's Therapy, I've never heard that someone proved it wrong. Why it's not used widely? Because there is no money to earn, there are just fresh vegetables so noone want to prove it right.
krollew··on TIOBE : C overtakes Java as the No.1 programming language
Sure it's not not as different from C like Lisp is, but there are many differences. First of all: everything outside "<?php ?>" is treated as argument for print. Second, PHP is dynamicaly typed and support many functional language stuff like closures. In my opinion it's much more difference between C and PHP and between C and C#/Java.
krollew··on TIOBE : C overtakes Java as the No.1 programming language
I think that there is no need to check popularity of C and compare it to other ones. Even if C isn't most often used programming language anymore, it is and will be programming language number 1. Most popular languages are not realy different from C. Python, Ruby, PHP, Perl, Lisp - ok. those languages are different, OK. But C++, C# and Java are just C made bit more convienient tool for object oriented programming. Morover, if it isn't enough so much currently used software is written in C. Yeah, no doubt that C is programming language number 1.
krollew··on Open Letter to XSLT Fans
I think I can create much easier to create and much more readable code in any flexible language with nice XML support like perl or PHP. I think it'd be more powerful since as far as I remember XSL lacks some stuff.
krollew··on Open Letter to XSLT Fans
It's only programming language I know and is completely useless (since there are better choices) and totaly enoying. I see I'm not alone. :D
krollew··on Richard Stallman: How I do my Computing
There is no way Windows could be useful? Oh c'mon, don't be fanboy. xD
krollew··on Richard Stallman: How I do my Computing
I don't understand his point. I'd be very sad if set myself so strict rules. Terminal is powerful, but this doesn't mean not to user X11. I like *nix and open source, but why souldn't I use Windows (which i find very nice system since Windows 7). He says Lisp is powerful, I agree. I prefer Scheme, but it's the same strengh. However it doesn't mean I use only C and scheme. I rather use a rule - match programming language to task you do. Somethimes it's C, sometimes scheme, sometimes perl, sometimes even C#. And so on...
krollew··on Bad News: Google Is Doing The Corporate Future-Vision Video Thing
That's true. Google has very big impact on our information-looking habits. But I'm not sure if it's so bad.
← PreviousPage 2 of 3Next →