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 8y ago · link · parent

That's basically what I'm doing. But even for pdf browsing it feels sluggish.

I mainly use my ipad as a third screen, placed on a dock to read through pdf books/documents. It feels more natural to read on it compared to the computer screens.

Old ipads can definitely be repurposed as book readers, mp3 players (without spotify) or movie players (with older movie formats)

Maybe I should do a clean install.

392.

My Workflow with Org-Agenda (2016)(cachestocaches.com ↗)

2 points · by terminalcommand · 8y ago · discuss

comment 8y ago · link · parent

I don't know if it's just me, but I don't feel like I'm using a computer when using Windows. After using OpenBSD exclusively for weeks (my laptop broke, so I had to repurpose an old netbook with OpenBSD), I felt bored and limited in Windows. I tried Powershell, but -mostly because I don't know much about it- it didn't give the same feeling.

The thing that is working for me is to explore VB.net . It is really an interesting language with many historical features. I've noticed that all the languages I use (Python, C#, Java, Go, etc.) distracted me from the essence of programming. When I started programming I immidiately thought about patterns, architecture, unit-tests, integration-test etc.

In VB.net I feel like I'm slowly reexperiencing the joy I've felt in my earlier days of programming.

comment 8y ago · link · parent

There is something called conditional release, where you get to leave prison early. Maybe he benefited from that. Basically, now that all prisons exceeded maximum capacity, if you commit a crime that requires up to 5 years of punishment you don't have to go to jail. You can directly benefit from a conditional release. For example if you steal something, and you don't have any previous criminal record, you walk free due to overcrowding.

In Turkey, prison sentences seem long on the paper, in real life you always get released a lot early. Especially now that prisons are hugely overcrowded.

comment 8y ago · link · parent

Not all academics are pursued by the government. However, if you state an opinion against the government openly or are an expert in an important field such as constitutional law or state theory you are sure to face some consequences.

For example all my constitutional law professors at one of the most prominent law faculties in Turkey were either arrested or forced to retire. Nowadays, our professors only state that new laws contradict the whole legal system but are afraid to speak out. For example, there are horrifying changes with executive decrees to the most basic rights such as Habeas Corpus. They contradict with the constitution but no one can take these executive decrees to the supreme court, because that is not allowed. The professors jokingly state that they do not want to speak further about these subjects, because they do not want to be subjected to these very laws they'd want to criticize.

comment 8y ago · link · parent

That problem would probably be solved by a bilateral agreement between France and Spain :)

comment 8y ago · link · parent

I don't know much about copyright law, but basically if you state the clauses in the unlicensed license and create the impression that you waive your rights to the software, you shouldn't be allowed to sue without real cause. That is to protect the software owner against ill-willed third parties. For example, if someone has made very minor changes to your software and distributes it commercially. You could sue that person, if you wanted, granted that you live in a law system where the copyright laws don't permit the usage of an unlicensed clause.

Waiving all your present and future claims on a software without any compensation beforehand could very well not be permitted in many legal systems. Law systems such as Germany and many other countries do not recognize software as an intellectual property. Software is recognized as a right which has personal and economic prospects. It is asserted that you can make legal acts on the economic prospects, but your ability to make legal acts for the personal part of your right on the software you've written can be limited. Because it is believed that there are some rights you have, that you cannot freely dispose of. For example you cannot make a legal act to become the slave of someone else, or you cannot trade your life for money. Because of the same reasons you cannot trade all rights for something you've created (~your software).

On the other hand, as tscs37 has stated, the unlicensed "license" statement means that you promise to not pursue your legal rights against anyone who uses your software. But as there are no parties, no signatures, no compensation, this is not a license agreement. This could only be regarded as a promise. You could break it at any moment, change your idea etc. But if you do that without any cause, you could get sued for damages, because of the trust you've implied to the other party.

Again, I don't know much about copyright law. I'm just a law student. But IMHO, you can safely rely on using software that promises to guarantee the unlicensed clause. If the author of the software changes their minds, you might have to switch to using a different software but you can in principle get compensation for all provable costs that this change has caused you or may cause you in the future.

comment 8y ago · link · parent

Htop also had segfaults after a while in OpenBSD 6.2 i386, when I used OpenBSD exclusively for a couple of weeks. It could also be present in other BSD-like kernels.

comment 8y ago · link · parent

Ted Nelson has some novel ideas. But I can't help to think that the failure of the mass adoption of his ideas stems from him being too greedy. If he had open sourced the code he wrote for Xanadu, if he had even published specs of a simple Xanadu system free of copyright he could've brought us a better hypertext.

The idea that data should consist of small addressable chunks, with each chunk having relations with other data actually makes a lot of sense.

We are thinking of data linearly, you start from byte 1 to end. Even if you copy the file or make minor changes the OS considers it another file. You make a reference to a movie, a novel etc., if you do not explicitly add the reference no one knows. Then we end up in piles and piles of data we cannot process. We have to rely on proprietary search engines, we have to rely on our browser history and our memory.

And with the latest shiniest web apps that fully render in JS we can't even get addressable future-proof links. Try to access a news page from 10 years ago, most likely the link won't work. Archive.org helps in that regard. But things could've been easier.

We have all these resources at hand, we could implement the idea of transclusion even if it is only limited to our domain. Information-heavy sites such as Wikipedia, C2-wiki etc. would greatly benefit from it.

It's true that we need a new way to look at data. It is not pen and paper anymore, we need to be able to go beyond searching. Even now, most of the world uses plain-old PDF, which is an image of a printable paper. We can use animations, videos, sound, interactivity in our content, but mostly we don't.

Ted Nelson thinks this is caused by the invention of the GUI (or PUI -Parc user interface- as he calls it) in Xerox Parc. They needed to show their managers something they could make sense of. So they created the desktop. Here is your trash-bin, here is your notepad, here are your documents (e.g Postscript/PDF). It is just like your physical desk.

But it is not your physical desk, what you have in front of you is a computer. We teach hours and hours of hand-writing to hour children, but only very few countries teach touch-typing. The old generation either doesn't understand or doesn't want kids to utilize their full potential with computers. Fortunately kids learn on their own, build their own online communities, so there is hope. Any kid that can get his/her hands on Computer Lib/Dream Machines won't be able to believe the idea that computers are only good for showing us an enhanced simulation of a work-desk.

comment 8y ago · link · parent

The downside is that static typing makes your programs much more rigid. Even if you program to interfaces, apply open-closed principle etc. After a while you start fighting the type system.

That's why I like dynamic typing. Coupled with Python's type annotations for hard cases and good documentation, dynamic typing allows you to go further by reducing cognitive load.

comment 8y ago · link · parent

It is not this interview, but I found out that Ted Nelson has a Youtube Channel. The link is: https://www.youtube.com/channel/UCr_DXJ7ZUAJO_d8CnHYTDMQ

In there you can find interviews/talks in full length: For example: this might be of interest to you:

Ted Talking Fast: How Computer Documents Got Dumbed Down-- and the Alternative https://www.youtube.com/watch?v=gDrHkNgGQDs

comment 8y ago · link · parent

If you're interested in Go, JustforFunc is pretty interesting: https://www.youtube.com/channel/UC_BzFbxG2za3bp5NRRRXJSw

The author covers some interesting and advanced details of Golang in an entertaining fashion.

comment 8y ago · link · parent

As a person whose been there, I can say that it is temporary. Drift for a couple of months, even a couple of years if you can afford to. You will eventually find balance in your life and be much more prepared for the future.

I always thought to myself when I felt bad that it was actually fortunate for me to have lived this kind of extreme burnout earlier in life where I didn't have serious obligations and had time to overcome it.

Now when I think back at the times when I worked crazy hard, I think the root of that problem was my insecurity. I thought if I had good grades, it would lead me to a good university. A good university would lead me to a good job. And a good job would lead me to a good life. It was a pretty hard blow when I realized that the cycle of work never stops. There is always something to do and what I got left with after high school was poor social skills and a massive burnout.

At Uni I stayed away from ambitious people, hanged around with slackers and misfits. I joined a band, became the go-to guy for making party posters/concert posters by leveraging my computer skills. At the same time my grades didn't suffer that much considering I studied considerably less.

I can't buy the tales of self-discipline anymore. If my body is actively fighting me on the work I think I'm supposed to do, I don't do it. I try to organize my work so that I don't lose track of the essentials. If I can't get myself to work more at least I get these covered. Most of the times, the work that I think that needs to be done turns out to be unnecessary.

Unfortunately ambition is a two edged sword: on one side you work yourself to the bone for a period of time exceeding all expectations, but on the other side once you depleted your energy, you can't get yourself to work at all.

That's why after many years of trial and error, I now manage the essential work in my life in org-files. I schedule a maximum of 6-7 essential items for my week. These tasks also include life-obligations such as getting a haircut, sending out job applications, going to the doctor etc. I usually try to do these tasks to avoid drastic outcomes in the future. My org-agenda works like a security rope for me. I cannot foresee my mental state or outside factors affecting my life, but at least I always know the few tasks that absolutely need to be done beforehand to sustain my living.

comment 8y ago · link · parent

I think that this kind of advice can be detrimental to people like me. It basically says force yourself to study 5 hours a day no exceptions. If you get a job or other extracurricular activities don't count it as work time.

Well, I lived that lifestyle in high school. I studied 4 hours a day, limited every extracurricular activities to not interfer with my study time. At the end I believe I have missed a great portion of my life and it was not worth it.

Studying everyday is a great goal to aspire for, but no way you need to study that much every day. Go to classes with the textbook, mark the areas the teacher lectures about. Take notes during class. Once in a while review the book and your notes. In the meantime make thought experiments, try to apply the information you learned on imagined cases you made up for fun.

There is only so much willpower you can tap into. Once that is over you basically drift not being able to do anything. It is much better to live a balanced life and never put yourself into impossible workloads for a prolonged time.

Another point is that these kind of study hacks work for people who can already study. If you are a procrastinator in soul (a deep procrastinator in Newport's terms), this advice won't help you. If you're procrastinating heavily your mind is trying to tell you that what you're doing is pointless.

One powerful weapon to fight it is to keep an agenda. Plan your day before (for example using org mode or a simple paper agenda). Set very small goals and always reschedule if you need to. For example 22 Jan Monday: place the notes taken during X class in a file. 23 Jan Monday: Buy the book required for Y class etc.

If you can keep your study material somewhat organized, you will find it much easier to begin studying. It is all about tooling like programming.

One last note: studying in a silent place does not always work. Especially when I'm bored, can't start studying or mentally overwhelmed, it helps a lot to put on headphones and blast some talkshow in the background. The change in the tone and volume of the host and occasional jokes and laughter feed my stimuli seeking brain. After 30-40 minutes I can continue without listening anything.

These reflect my hard-earned experience and intensive soul-searching :) YMMV

comment 8y ago · link · parent

Emacs can have tabs, besides the obvious tab-bar mode, you could also just use i3. Set it to tabbed mode with super+w,then hit ctrl-x-5-2 to open new frames, they will open as tabs. (Frame means window in emacs lingo)

With Emacs anything is possible. You don't have to settle for buffers. There is also speedbar for a tree-based view.

comment 8y ago · link · parent

The main feature of org-mode I find really helpful is the org-agenda. You could just try a bit.

You don't have to learn Emacs shortcuts, arrow keys work. For navigating between files use the menubar with a mouse.

File -> Open file -> testtodo.org Type "* Something to do", hit C-c C-t, TODO will appear, hit C-c C-t again, the state will be marked as DONE. Hit C-c C-s, calendar will open you can select a date to schedule. Hit C-c [ to add the file to your agenda (permanently). Hit M-x, type "org-agenda", a menu will apear, hit a, to see all your scheduled items for the week. Hit j to select another date. (C is control key, M is meta key, a.k.a Alt) (C-c means ctrl+c, C-s means ctrl+s, M-x means alt+x, you get the idea)

That's all there is, it takes some getting used to, but a plain text format is really productive. You can easily search between items, transfer your files, customize it all you want. I probably use very of org-mode's capabilities, but it really helped me organize my life.

comment 8y ago · link · parent

I also think it was a PR coup from the Intel side. I think of myself as pretty much tech savvy. But even I hesitated for a moment and asked myself whether AMD was affected by meltdown although I knew that it didn't. All the google searches lead to sites mentioning "Meltdown/Spectre attacks" as if they were the same thing. You can hardly find sites that explicitly state: look here is meltdown, it only affects intel CPUs and it can only really be patched on the software level and that will result in HUGE perormance losses. Basically every time your CPU accesses the Kernel Space, some kind of cache cleansing needs to be done, it has to context switch.

Instead no one seems to grasp what meltdown is, intel is feeding the media with benchmarks and says there is no real impact, users believe intel.

I read somewhere that all big companies Google, Intel etc. knew about these security vulnerabilities, especially meltdown months before. Intel made a deal with Microsoft to disclose the vulnerability on a Microsoft Update date and tell everyone that there was an issue and it was fixed. Microsoft was also supposed to make all processors including AMD to get affected by the slowdown. However Google reported 1 week earlier said it couldn't keep this a secret with good conscience. But even if that plan failed there is still a lot of misinformation caused partly by intel.

Even if you visit sites such as meltdownattack.com (first result on google with some deeper info), it says we do not know in which aspect Meltdown affects processors.

I'm on the verge of buying a new desktop, I will go with intel because I have no other cheap choice. Intel still delivers the cheapest option for me (i3-8100). But I would appreciate if Intel played fairly. All this manipulation behind the scenes is corrupting the market and intel is responsible for it.

I don't know what we got ourselves into. The RAM folks built a cartel and are keeping the prices high. Microsoft is deliberately crippling third party antivirus software. Intel is shipping us CPUs with backdoors (Intel ME), there are serious vulnerabilities that get swept under the rug, yet we have to buy intel because we are locked into the x86 platform.

At least microsoft is teaming up with Qualcomm and Apple is rolling out its own ARM processors. We need to have an alternative. IMHO Intel has been playing an unfair and an unethical game.

comment 8y ago · link · parent

Because ubuntu is based on Debian, almost all software/drivers packages for ubuntu work on debian.

Using debian could maybe be compared to using vanilla JS instead of the shiny frameworks.

The downside is that, debian is very conservative in their releases. Most packages that ship with the distro or are in the repositories are a bit behind. I guess that's why Google switched to Debian Testing.

Btw even debian testing is comfortably stable.

For people who want to try debian, I advise them to try Linux Mint Debian Edition. It is a vanilla debian shipping with a good looking DE. I installed it on my mother's laptop, she's been using it for more than 2 years. It is so stable that, one time her laptop broke and we pulled her old netbook from storage. I only took the hdd from the old laptop and inserted in the netbook. After installing the wifi driver the machine has been running flawlessly for more than a year now.

I only do dist-update dist-upgrade from time to time, no further maintance was necessary.

comment 8y ago · link · parent

I instinctively used the "interpreted" term, because mainly you can execute instructions on the fly in an interpreter the language ships with. Whether it's compiled to bytecode and then executed from there is IMHO an implementation detail. With compiled languages (following this logic) such as Java or Go or C, you need to write your program pass it through a compiler to get an output.

With languages like Javascript, Lisp, Python, Ruby etc. you can write your programs incrementally, going back and forth between the REPL.

Sorry if my terminology has caused you trouble. I regard dynamically typed languages that ship with an interpreter as interpreted languages. For optimization reasons the implementation probably uses some sort of compilation but you can still use the built-in interpreter on all of these "interpreted" languages.

I should probably have used the term "ships with an interpreter" :)

BTW the current python-mode in Emacs also allows SLIME-like behaviour. You can open a python process with C-c C-p and then send the buffer, functions, marked areas, lines etc. to the python session.

comment 8y ago · link · parent

I'm surprised nobody mentioned good-old Common Lisp. With quicklisp you get access to a ton of libraries.

For example you might be interested in: http://8arrow.org/caveman/

Lisp ecosystem is really mature and gives you a lot of freedom.

Dynamic typing, interpeted language, homoiconity, tons of great battle-tested libraries etc., Lisp is truly a great language for backend web development.

Even this very site runs on a homebrew lisp dialect (Arc) running on Dr. Racket (Scheme). If even that bizarre setup (sorry PG :)) can handle this much traffic on a single server, you shouldn't worry about speed or scalibility if you opt for Common Lisp.

comment 8y ago · link · parent

I also get very angry at Google trying to stop me from making advanced queries. Even if I only chain a couple of Google's very limited operators together it shows me captchas and after a while the captchas do not stop. I keep solving them and it just wants more.

Lately I've also been noticing that the behaviour of some google search operators are broken. " something " "otherthing" is not considered as an AND " something " OR "otherthing" is not considered as an OR. Google shows me the results it wants. I recently tried to research FreeBSD and Meltdown (I tried many times: "FreeBSD" "Meltdown", "FreeBSD" AND "Meltdown" etc.) and almost no result involved the terms both FreeBSD and Meltdown. The interesting thing was, Google did not say there was no results matching my criteria, it kept showing me popular IT news, linux news etc. It was extremely frustrating.

The only operators that work are site, date and filetype. The logical operators do not work reliably or do not work at all.

If you're searching for something popular google finds it best, but if your search patterns are deviant google ignores you and even thinks you're a bot and refuses to service you.

comment 8y ago · link · parent

For a python programmer some parts of Rust might feel too low-level and out of reach. However that is not a big issue. I would suggest you get comfortable tooling first, intellij rust plugin was awesome when I last checked it out. It comes with autocomplete, on-the-fly syntax checking etc. out of the box. The Rust compiler has very sane and understandable error messages (at least for basic tasks) so that will guide you a lot. I would also advise you to get on #rust-beginners on irc.mozilla.org, if you have any questions you will get instant help, which is a huge benefit :).

Lastly, I would first advise you to work through https://learnxinyminutes.com/docs/rust/ to get a feel of the language (like dipping your toes into the water). If you like what you see, then continue from the Rust book: https://doc.rust-lang.org/book/second-edition/ .

And most importantly remember to have fun!

comment 8y ago · link · parent

Been thinking the same thing lately. I'm in my last year of law school and it seems to me that life as I know is changing. I always liked to program, fiddle with computers, read about some obscure computer history but it seems like I've grown quite a bit.

I do not have nearly as much life experience as you do, but my plan for now is to 1) sleep well 2) eat well 3) try to work under my burn rate 4) socialize. I hope that if I stick to this goals things will change and I will at least be able to keep my sanity.

I remember the days when I was working on my Forth interpreter when I thought I could always make myself occupied and happy no matter what my life circumstances are. But now I understand I was being too naive.

The one thing that kinda works is trying to pursue romantic relationships. It's hard for an introvert I know, but if you treat it as a personal side project, things start to lighten up :). Another advice I could give is to spend some money, if you're earning well. I don't know, get a sports car or an expensive cappuccino machine.

comment 8y ago · link · parent

The problem I believe is not with the startup time. If you load bunch of scripts in your emacs, it also gets sluggish at start. The way Emacs people solved this problem was to use a server client architecture and run Emacs as a daemon.

I think the real problem Electron apps face is that rendering everything on the DOM is really expensive. I still remember the VS Code bug that caused a huge battery consumption because the gif they used to display the blinking cursor was in a high resolution.

Emacs was critisized, heck even banned from uni labs back in the day, because it used too much RAM. Now the time has come for us to mock Electron based editors :).

comment 8y ago · link · parent

At first I couldn't understand how "cache line” index is actually the byte read from kernel.

I could wrap my head around the idea that reading a single bit could be somehow possible, because you only need to know if something is 0 or 1. But reading an entire byte only by measuring time difference seemed impossible to me.

I looked up what cache line is, it seems that if the byte stored at an address we're looking on is in the cache, the CPU will deliver it, if not it will go fetch.

Then it hit me, we're actually able to make the machine read the contents of the kernel addresses, because the CPU evaluates (not execute) code ahead of time.

We create an array that is large enough to represent a byte in its index. We try to access the value of the kernel addresses and use it as an index on our array. This succeeds because the CPU hasn't executed our code yet so, no access violation error was thrown. But it evaluated our code, so our instructions actually passed through the CPU during some branch simulation. So the address we accessed on array whose index represents the byte peeked from kernel is on the CPU cache. If we ask the CPU to retrieve that address it will return super fast. It doesn't matter that we couldn't set the content to something. Because C arrays are just bytes stacked on top of a memory address. So if we want to access the nth element of the address, we can use arrays_base_address+element_index*element_size. Then we probe the address of each element of our array. If the address is in the cache it will return much much faster. The array itself is in the userland so no exception for address violation will occur. Once we find the address, we can determine the byte of the kernel address we intended to find. Because we stored the content of the kernel address as an index of an array, which is a memory address.

I have no formal training in CS, so it surprised me that I could understand how Meltdown works. I might have made a lot of mistakes trying to explain this in my limited vocabulary, but I hope this helps someone trying to make sense of the article.

comment 8y ago · link · parent

Or better yet buy a bunch of cheaper 2TB hard drives configure them as RAID with redundancy. Or you could use ZFS for extra fun.

If you're going to host this at home you'll probably want/need a firewall, I hear OpenBSD is great in that area.

comment 8y ago · link · parent

The console of today's youth is in the browsers. Any kid can open the developer's console and start typing JavaScript, the results are displayed immediately on the screen. Considering that JavaScript has it's roots in Scheme, it is a good language for kids to experiment on.

For learning lower level constructs maybe Webassembly will help the future generations. The interested kids can also purchase raspberry pi s and dive into a world of low-level programming.

comment 8y ago · link · parent

I cannot always find the discipline to meditate, but I've found that listening to lounge/chillout music without doing anything else and letting my thoughts wander help a great deal.

comment 8y ago · link · parent

I remember seeing this suggestion earlier. If I'm not mistaken a commentor stated that a) this would come with a huge performance penalty b) there would be synchronization problems in multithreaded scenarios.

Don't take my word for it though, I might have understood it wrong. I imagine concurrent/parallel execution involving system calls could maybe suffer from synchronization issues if processes/threads run on different physical cores with separate caches?

comment 8y ago · link · parent

On windows you could install msys and then use pacman -S whatever to install packages. Calling it from any editor could be as simple as changing the PATH.

On the other hand, even without cygwin you could use a windows command line package manager such as chocolatey.

Everything unix-y is not always good, Windows has some novel ideas too. The main difference is that Windows is more GUI oriented and Unix is text oriented. Windows has APIs and Objects, whereas in a perfect Unix unix world everything needs to be a text stream.

I lived in the Unix world for a long time and I still use various BSDs and/or Linux. Yet after years preaching the Unix way, now I think one needs to choose the right tool for the job, there really is no silver bullet.

In reality, app development with a real IDE such as Visual Studio or Jetbrains products is much more comfortable for me. It's true that these tools limit your expression, but they also alleviate a lot of mental burden. If I don't have to waste brain cycles on typing commands, flexing my fingers through various M-x C-x positions etc. I seem to be able to write faster and with greater ease. On the other hand the code I write in my text editor is usually very dense and more beautiful to look at.

I sometimes compare the situation between living in the Unix world and Windows world with the two fractions in Game of Thrones. Unix people represent the Wildlings, they're brave, free, do not recognize authority, do everything by themselves, live in harsh conditions, yet they are happy because they live a straight-forward and free life. Microsoft people represent the other side of the wall, they're not free, but they have technology, civilization, more population. And there seems to be a great wall between these users.

1
131415
23