News for hackers. Stuff that matters.

nirs

Re:In Defense of Linked Lists on Friday November 04, 2022 @08:33PM (#33476237)
Typically you keep a list entry in the struct: https://man7.org/linux/man-pages/man3/stailq.3.html#EXAMPLES

The same list entry can be moved between several lists using the same type.

If the struct need to be in multiple lists in the same time you can keep multiple list entries in the same struct: https://github.com/freebsd/freebsd-src/blob/69413598d2660054...

Re:New Ways to Be Told That Your Python Code Is Bad on Friday September 03, 2021 @02:36AM (#28401077)
Theses are good examples for not using ternary expressions. The code looks wrong even if it is correct, and it is hard to follow.

There is a very simple rule avoiding most of these issues - if the ternary expression does not fit in one line, use if/else.

p and q are the same file now, but after you change current directory their are not. They should never be equal.
Re:On Privacy versus Freedom on Thursday January 02, 2020 @02:34PM (#21938857)
Can you explain how GPL prohibits distribution via app stores?
Re:Ask HN: Good python code for code reading on Thursday October 09, 2008 @02:42PM (#328116)
twisted is very clean and readable.
Re:Daring Fireball: Apple Needs a Nikon on Saturday November 03, 2007 @05:05PM (#75851)
He got it wrong; Apple is Nikon of course. Apple needs a Cannon :-)
Re:Please tell us what features you'd like in news.ycombinator on Friday November 02, 2007 @03:26PM (#75548)
It could be nice to have a way to change your password.
This is a nice web page for starting up with cocoa: http://andymatuschak.org/articles/2007/09/09/getting-started...
Opera and Google Earth are good examples of such apps - they suck. Both have non native and ugly user interface. So if you your app does more or less what other apps do, but looks like this, people will prefer the native cocoa apps.
AppleScript is nice tool for special jobs, but you do not like to write complete apps with it. It is too annoying to write, slow and hard to debug. Use it to script other apps.

If you are looking for easier development environment, try pyobjc: http://pyobjc.sourceforge.net/

If you want to create Mac OS X apps, forget about multi platform stuff - your customers do not care if your app runs on other platforms, and they will ignore your app if it does look and behave like a great Mac app.
This is a great book to start with. After you finish it, this one is also good: http://www.amazon.com/Advanced-Mac-Programming-Core-Unix/dp/...
Re:1 word in beta invite email subject reduces conversion by 14% on Saturday October 13, 2007 @06:14AM (#67259)
Interesting, out of 28 voters, 9 voted up :-)
Re:1 word in beta invite email subject reduces conversion by 14% on Thursday October 11, 2007 @04:15PM (#66455)
Lets see how it goes :) http://reddit.com/info/2z6fy/comments
Re:What does YC think of "JihadOnYou.com" ? on Monday October 08, 2007 @12:36PM (#64827)
Stupid but well done. Nice readable fonts, really easy to use.
Re:Hacker Music? on Monday October 01, 2007 @09:14PM (#61868)
Nothing like silence.
Re:Apple Loves Inconsistency on Thursday September 20, 2007 @01:38PM (#57490)
This is true also for their desktop apps user interface. This trend started with Mac OS 9, when QuickTime started to use that stupid brushed metal theme. Currently there few themes in Apple apps; Aqua (Mail), brushed metal (Safari), iApps (iTunes) and pro (Final Cut).

This make it tricky for 3rd party apps - you have to ask yourself which group your app belongs to. If you want to create iApp or Pro interface, you have to simulate the design because there are no ready made interface elements using those styles.

Re:FogBugz is Developer-Driven (Thank Goodness) on Thursday September 20, 2007 @09:49AM (#57395)
Re:Thoughts on editors (Emacs in particular) on Wednesday September 12, 2007 @06:24PM (#54043)
Of course it is interesting - this is your major tool. Photographers are obsessed with cameras, programmers with editors...
The source is NOT free - although I'm not not sure about their copyright - who is the dev team?

  iUnlock v42.PROPER -- Copyright 2007 The dev team

  Credits: Daeken, Darkmen, guest184, gray, iZsh, pytey, roxfan, Sam, uns, Zappaz, Zf
 
  All code, information or data [from now on "data"] available
  from the "iPhone dev team" [1] or any other project linked from
  this or other pages is owned by the creator who created the data.
  The copyright, license right, distribution right and any other
  rights lies with the creator.
  
  It is prohibitied to use the data without the written agreement
  of the creator. This included using ideas in other projects
  (commercial or not commercial).
  
  Where data was created by more than 1 creator a written agreement
  from each of the creators has to be obtained.

  Punishment: Monkeys coming out of your ass Bruce Almighty style.
Re:Desktop vs Web for email on Tuesday September 11, 2007 @04:43PM (#53522)
Apple Mail, when I'm away, either my isp webmail or Gmail. I don't like web mail - the user experience is poor and inconsistent.
Re:Joshua Schachter: Elevator camera obscura on Saturday September 08, 2007 @08:04PM (#52334)
This is reflection. In a similar camera, "view camera" http://www.answers.com/topic/view-camera?cat=technology the image is upside-down.
Re:CopFind - collaborative project to log speed traps on Saturday September 08, 2007 @07:07PM (#52317)
The phone network can locate your phone - so your phone can also know its location even without GPS. If your phone knows your location, and is connected to the web, it can work.
Re:CopFind - collaborative project to log speed traps on Saturday September 08, 2007 @01:36PM (#52230)
Even better: your phone will check for cops on your way, using GPS. When you locate a cop, you can report him in real time, and someone driving 200m behind you, using the same site, will get an alert.
Re:It's Official: Apple is the New Microsoft on Friday September 07, 2007 @05:12PM (#51913)
Crap article from crap site of crap magazine.
Re:Steve Jobs - To All iPhone Customers on Thursday September 06, 2007 @11:12PM (#51447)
They already do this: you want QuickTime for Windows? you must install also iTunes, because both come in the same installer.

Older »