Better HN
topnewbestaskshowjobs
Log inSign up

terminalcommand

1,673 karma · joined Sep 27, 2013 (13y ago) · 683 submissions

Corporate lawyer with a passion for computers.

Software design and implementation should be a joyous art, a kind of high-level play. If this attitude seems preposterous or vaguely embarrassing to you, stop and think; ask yourself what you've forgotten. Why do you design software instead of doing something else to make money or pass the time? You must have thought software was worthy of your passion once...

To do the Unix philosophy right, you need to recover that attitude. You need to care. You need to play. You need to be willing to explore.

Submissions

comment 10y ago · link · parent

I always think of the DB, as the last castle of a program. When everything else fails, the DB should function. Programs are maintained way more than they're written.

No matter how hard I try to keep my code-base clean, it gets cluttered.

That's why I strive to create a powerful base structure and make them bulletproof.

Whatever may come (depression, personal problems, fatigue, stress, deadlines, etc.) this skeleton keeps the app alive.

In my experience code that is written now, will stay and that complete rewrite I've been dreaming about will never happen :D.

So IMHO it's better to design the core funcionality exhaustively and try to create a failproof code-base.

My intellectual capacity fluctuates and I'm never as productive as I want to be. I need a safety rope for my dumber version, who has forgotten about the code and has no idea where to start :)

Indenting, and aligning helps a lot, when I try to load the code back into my memory.

comment 10y ago · link · parent

Bash is what I miss in iOS, I used to jailbreak just for getting a shell.

Now, I use pythonista as a python-shell. Being able to chain a couple of commands and fix a good-enough solution saves a lot of time in many cases such as web scraping on-the-go.

I know this may be an extreme use case, but if iPad is going to be a laptop replacement we need to be able to get a way to speak with it without immidiate access to a laptop.

603.

Python @property: How and Why?(programiz.com ↗)

2 points · by terminalcommand · 10y ago · discuss

604.

Introduction to Named Pipes (1997)(linuxjournal.com ↗)

1 points · by terminalcommand · 10y ago · discuss

comment 10y ago · link · parent

I've had type 1 diabetes since I was 12, I'm 21 now. Food with identical glycemic indexes do cause different responses. Bread and food with fibers keep the blood sugar levels sustained.

When I have to skip a meal, I've learned that it's best to eat oatmeal crackers. They keep you full and you don't experience hypoglysemia. When I eat candy-bars/chocolate as a substitute for a meal, my blood sugar drops immensely after a couple of hours. I feel exhausted, my hands start to tremble and I forget words/things.

On the other hand, fruits also have the same effect on me as candy-bars. Fructose is no different for me.

For diabetics at least, sugar is poison. But I can't seem to live without it.

comment 10y ago · link · parent

Here is a bookmarklet that does this:

  javascript:(function() { document.body.style.maxWidth='700px'; document.body.style.margin='0 auto'; document.body.style.lineHeight='1.5'; document.body.style.fontSize='20px';} )();
I call it StyleLet :).

comment 10y ago · link · parent

The dillema is that you need to understand the low-level aspects in order to understand the abstractions.

The problem that haunts me -and a lot of other hackers I presume- is that we have this urge to understand every little detail of the systems we design. Nothing is good enough.

The other problem is that by using arcane and primitive tools we limit ourselves in the ability of producing real work. As with everything in life, we need to make the distinction between tinkering and doing real work.

If all we do is tinker, very little gets done :).

PS: I just read the satire Real Programmers Don't Use Pascal [1], my comment could be highly biased from that.

[1]: http://www.pbm.com/~lindahl/real.programmers.html Bonus: Here is a little bookmarklet I wrote for styling unstyled html pages for easier reading.

  javascript:(function() { document.body.style.maxWidth='700px'; document.body.style.margin='0 auto'; document.body.style.lineHeight='1.5'; document.body.style.fontSize='20px';} )();

608.

Generics in C11 (2012)(robertgamble.net ↗)

2 points · by terminalcommand · 10y ago · discuss

comment 10y ago · link · parent

You're right wireless charging should already be here too.

As for the headphone jack, I tried to clean it many times but couldn't fix the problem. Although, I haven't tried compressed air yet.

We have wifi sync, bluetooth peripherals, the only remaining thing for a cordless future is wireless charging.

Maybe we'll see the removal of the lightning port as yet another bold move. It would line up with Apple's vision. But then I think Apple will develop some kind of a new short-range wireless transmission protocol that's inconsistant with everything else.

If they'd fix all the problems, what would be left to sell :)?

comment 10y ago · link · parent

I want to offer a different perspective.

Apple ships the phones with an adapter for lightning to 2.5 inch headphone jack. Old headphones may become harder to use, but they're still perfectly usable.

We can't argue that the future is in wireless. Headphone cables get tangled, headphone sockets collect dust.

I'm currently using an iPhone 5 and the headphone input, spits out the earphones from time to time. That's because it collected dust.

IMHO that's why the article is spot-on. Apple always had the courage and boldness to push things forward.

I remember when the current macbook came out, everyone -including me- made fun of it. Just a usb-c port, really? Or performance??

But now I think that mobility beats performance, and simplicity beats complexity on portable devices.

On the other hand the price politics, and marketing ploys of Apple do make me angry.

comment 10y ago · link · parent

During the day I suspend my laptop, but at night I power it off, out of habit I guess.

And I have this superstition that if I leave my laptop plugged-in to any sort of cable at night, it might get hacked while I'm sleeping.

I'll try suspending the next time I install OpenBSD.

comment 10y ago · link · parent

I guess you're probably right, I usually boot up just once in the morning. The truth is, being a performance freak, I expected OpenBSD to fly on my current hardware.

After much tweaking and struggle I couldn't get the DBus working, hence couldn't install GNOME.

i3wm as my window manager and manual configuration of everything especially the wireless connection were too spartan for me. So I switched back to Debian 8 + KDE.

comment 10y ago · link · parent

Last month I installed OpenBSD on my laptop, and was frustrated with its boot time. I'm using an SSD. Debian 8 with KDE boots up in a matter of seconds. OpenBSD on the other hand needed at least 20 seconds to boot up.

I had done some research at the time, and came to the conclusion that it was systemd that allowed Linux to boot up so fast.

What is your experience with OpenRC?

614.

iPhone spying flaw: What you need to know about Apple's critical security update(telegraph.co.uk ↗)

3 points · by terminalcommand · 10y ago · discuss

comment 10y ago · link · parent

Here is a paper and a mov only compiler. http://www.cl.cam.ac.uk/~sd601/papers/mov.pdf, https://github.com/xoreaxeaxeax/movfuscator

PS: Found these links on hn.algolia.com, the HN threads are: https://news.ycombinator.com/item?id=6309631 https://news.ycombinator.com/item?id=9751312

comment 10y ago · link · parent

I've had type 1 for nearly 10 years, after 4-5 years I think my body stopped producing glycogen. That's why I am super-alert for lows.

The constant fear of trying to catch if you're low is exhausting. Especially when a diabetic like me goes through sad phases, can't get enough sleep etc. The main symptom of being low is dizziness, and if you're blood sugar levels are not in control you always feel that diziness.

I've had panic attacks, thinking I'm low when I'm not, got really depressed, my blood sugar levels were like a roller coaster.

This year I managed to get a grip of my life, right now I'm on vacation and relatively happy, I noticed that I get by with much less insulin. Stress definitely has an effect on diabetes management. During exam weeks for example, it's nearly impossible for me to keep my levels under control.

A CGM could end all this suffering, but the cost of having one is very high. The insurance, at least here in Turkey, covers only 3 strips a day of the cheapest brand available.

I've seen 22 mg/dl at a time, and didn't lose consciousness. Most diabetics can feel when they're hypoglycemic.

PS: These are my own experiences, sorry if it's too verbose.

comment 10y ago · link · parent

If you alt-tab it to the vm, you have to alt tab again to switch between linux programs.

Usually that's not a problem, because I only have emacs and/or a terminal session running. With the control key on the right, you switch back to your host os.

To switch to a windows program from linux you simply press RCtrl+Alt+Tab.

Virtual desktops in Win 10 are very handy while using a VM. Ctrl+Win+d opens a new virtual desktop. Ctrl+Win+Arrow Keys switches between them.

comment 10y ago · link · parent

I stuck with linux for many years for the very same reason.

The solution that worked for me was getting an SSD.

Now, I always have a debian VM working in seamless mode. Ctrl+alt+t opens a terminal window, all linux dev tools work without a flow.

With an SSD there is absolutely no lag. Virtual desktops in Win10 and snapping with win+arrow keys, eliminate the need for a linux DE.

Plus you can use Adobe products, Visual Studio etc. at full speed, without hassle.

comment 10y ago · link · parent

Is it feasible to use dragonfly bsd for small-medium sized sites? I am currently using netbsd for my servers.

comment 10y ago · link · parent

And not all robberies and thefts are reported to /recorded by the police. There are vast differences between countries in those numbers. On the other hand, the car theft numbers is probably accurate, because people need to report to get insurance.

621.

Observations and thoughts on the Linked-in data breach(troyhunt.com ↗)

3 points · by terminalcommand · 10y ago · discuss

622.

The Plan 9 Effect or why you should not fix it if it isn't broken(di.unipi.it ↗)

116 points · by terminalcommand · 10y ago · 107 comments

comment 10y ago · link · parent

I am not an expert on the field. But | means or and ^ means execute.

In the traditional W(rite)|(or)E(xecute) model, the processes can both write and execute instructions in their address space in memory. I might be wrong but I think this could result in security leaks, because you cannot determine what the code evolves into at execution time.

W(rite)^(xor)E(xecute) model doesn't allow the processes to write AND execute instructions at the same time.

The wikipedia page states:

  W^X requires using the CS code segment limit as a "line in the sand",
  a point in the address space above which execution is not permitted and data is located,
  and below which it is allowed and executable pages are placed.
This means using W^X is an improvement for security, but it's hard to adapt to from a technical viewpoint and limits your computer's ability in meta-programming.

For further information:

https://en.wikipedia.org/wiki/W%5EX

http://marc.info/?l=openbsd-misc&m=105056000801065

Disclaimer: I myself am a beginner in the field. Apologies for oversimplification and possible faulty assessments.

624.

Lessons Learned in Ruby Concurrency (2013)(blog.engineyard.com ↗)

3 points · by terminalcommand · 10y ago · discuss

comment 10y ago · link · parent

Not sure if this helps. I'm also a self-thought programmer coming from a similar story -started programming at 10 and never stopped since- I'm in law school now, but I continue to spend nearly all my time hacking. Sometimes I think it's better not working as a programmer, because I'm very passionate about computers.

I was depressed for a long time that I couldn't study CS. Then I realized, I can learn what I want freely. I have an entire life dedicated to computers.

Although I secretly dream about inventing the next facebook, I mostly embraced the fact that I won't be able to get a formal education and a job in the field.

Tinkering with computers is part of who I am. The rest is not in my hands.

comment 10y ago · link · parent

There is also lispyscript for people interested in writing js in a lispy syntax.

comment 10y ago · link · parent

You could always alias make to the default you like. But if the newbie can't "make" it work, he/she gets frustrated.

I really wish dd had this type of caution. It would save me a lot of misery, preventing the loss of numerous drives.

comment 10y ago · link · parent

Learning lisp syntax requires just a very short introduction. In SICP, it is said that they never formally taught lisp at class. The students just pick Lisp up in a matter of weeks.

comment 10y ago · link · parent

Digital evidence is IMO a different matter than physical evidence. The threshold for implanting fake digital evidence is very low. You need fewer people, you can cover your traces easily... To break-in and install cameras you need to find a suitable time where the suspect is away for a long time. And you can't always break-in to the house and change things, you won't be permitted. The monitoring of the use of these trojans is the most important problem. With a trojan horse you have access to the computer 24/7 and you can do whatever you want. Of course you could argue that police could also plant fake physical evidence, but that's a lot harder to do and you need more people. (more witnesses) There is a thin line seperating a state of law from a police state.
1
1920212223