1,673 karma · joined Sep 27, 2013 (13y ago) · 683 submissions
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.
comment 8y ago · link · parent
Also you could smell your urine, if it stinks like ammonia, your blood sugar levels are high.
If your blood sugar levels are normal you feel healthy.
I've been a T1 since I was 10 and this is my experience. The real problem is not noticing highs but noticing lows. Because low blood sugar is much more threatening than highs for the short term.
comment 8y ago · link · parent
If you play a lot of puzzle games, you will be mentally sharper.
If you play a lot of shoot 'em ups, your reaction times will improve.
If you hang around in the internet and have an interest for computers, you'll eventually get into computer science and programming and you'll learn quite a lot whilst trying to escape reality.
I had a friend whom I would describe as a gaming addict. He was the brightest pupil I knew from the high school. He didn't eat properly, he always wore the same hoodie (his favorite) even in the coldest winter days. He refused to drink water and only drank ice tea. He went on to a college in a distant town and disappeared.
After 3 years I saw him, he was still the same. He told me he earned some money from the youtube channel he opened in high school. He had purchased a big box of chocolate marshmallows from the supermarket, which would be his meals for a couple of days while he was visiting his friends in a different town. He struggled at college. He played obscure anime games.
After another year, he told me that he changed his major (econ) after 4 years of studying. He started CS and his life turned around.
It could be the case that you resort to gaming to escape reality. But resorting to gaming could also make you unable to change that reality and break out from that spiral.
I don't know if he would've made the decision to jump ship and start anew sooner if he wasn't playing. But in the end he was able to break out of his habit with time.
I think with time the addictions wear off, whether it is TV (in my case) or gaming. I used to watch hours and hours of TV every day. If I didn't I would feel stressed out and couldn't function properly. But now that I've grown I don't feel the urge to bing. It resolved by itself.
comment 8y ago · link · parent
As we import our laws from other European countries (for example criminal procedure law was imported from Germany) I thought that this must've been the case in many law systems.
This discussion has been eye-opening for me.
comment 8y ago · link · parent
I think a VPN provider in this case is still obliged to keep logs, albeit only hand them over if the necessary conditions are met.
Coming from Turkey, I could not imagine a state, where the communication logs are not saved. But it seems the US does this only through intelligence agencies and does not force the ISPs to keep logs.
comment 8y ago · link · parent
You might find this link useful: https://www.notebookcheck.net/The-Dell-XPS-15-9570-might-inh...
Even if the laptop works fine, the temperatures could get worse after a couple years of use. You might often need to change the thermal paste and clean the heatsinks and fan.
I would suggest waiting a bit more for extensive tests. OTOH if money is no issue, I'd go for it. i9 in a laptop sounds really cool.
comment 8y ago · link · parent
Furthermore, at least here in Turkey, communication records are also used in civil cases. For example, in a divorce case, the parties sometimes request the phone log through a judge and prove disloyalty by showing call history and duration of each call.
comment 8y ago · link · parent
DIRECTIVE 2006/24/EC OF THE EUROPEAN PARLIAMENT AND OF THE COUNCIL
of 15 March 2006
on the retention of data generated or processed in connection with the provision of publicly available electronic communications services or of public communications networks and amending Directive 2002/58/EC
Some citations from the preamble showing the purpose of data retention On 13 July 2005, the Council reaffirmed in its declaration condemning the terrorist attacks on London the need to adopt common measures on the retention of telecommunications data as soon as possible.
Given the importance of traffic and location data for the investigation, detection, and prosecution of criminal offences, as demonstrated by research and the practical experience of several Member States, there is a need to ensure at European level that data that are generated or processed, in the course of the supply of communications services, by providers of publicly available electronic communications services or of a public communications network are retained for a certain period, subject to the conditions provided for in this Directive.
The citations of the corresponding paragraphs:Article 3 para. 2 (data necessary to trace and identify the source of a communication):
The obligation to retain data provided for in paragraph 1 shall include the retention of the data specified in Article 5 relating to unsuccessful call attempts where those data are generated or processed, and stored (as regards telephony data) or logged (as regards Internet data), by providers of publicly available electronic communications services or of a public communications network within the jurisdiction of the Member State concerned in the process of supplying the communication services concerned. This Directive shall not require data relating to unconnected calls to be retained.
Article 5 Categories of data to be retained
para. 1/a/2 concerning Internet access, Internet e-mail and Internet telephony:
(i)the user ID(s) allocated;
(ii) the user ID and telephone number allocated to any communication entering the public telephone network;
(iii) the name and address of the subscriber or registered user to whom an Internet Protocol (IP) address, user ID or telephone number was allocated at the time of the communication;
Article 5 para. 1/b/2 ( data necessary to identify the destination of a communication): concerning Internet e-mail and Internet telephony:
(i) the user ID or telephone number of the intended recipient(s) of an Internet telephony call;
(ii) the name(s) and address(es) of the subscriber(s) or registered user(s) and user ID of the intended recipient of the communication;
Article 5 para 1/c/2 data necessary to identify the date, time and duration of a communication: concerning Internet access, Internet e-mail and Internet telephony:
(i) the date and time of the log-in and log-off of the Internet access service, based on a certain time zone, together with the IP address, whether dynamic or static, allocated by the Internet access service provider to a communication, and the user ID of the subscriber or registered user;
(ii) the date and time of the log-in and log-off of the Internet e-mail service or Internet telephony service, based on a certain time zone;
Note: Legislation is said to be anulled in 2014 by the European Court of Justice. [3] I don't know how EU legislation works. But many countries adapted the regulation in their national law. The EU anulment doesn't automatically change the regulations in other legislations. For more info on how data retention is implemented in different countries, you could look at the wikipedia link jacquesm provided.[1] Link to the directive: https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CEL...
[2] Link to the reddit thread: https://www.reddit.com/r/VPN/comments/7x07am/if_a_vpn_doesnt...
[3] Decision of the anulment of the directive: http://curia.europa.eu/juris/liste.jsf?language=en&num=C-301...
comment 8y ago · link · parent
The law inforcement officers or prosecutors can simply ask for the history of your traffic.
As it does not contain the content of your communication, in most legal systems they do not need any warrant to request this data.
341.
Life Hack: The 30/30 Minute Work Cycle Feels Like Magic (2010)(chetansurpur.com ↗)
2 points · by terminalcommand · 8y ago · discuss
343.
Aurelia: a battle-tested front-end framework that stays out of your way(aurelia.io ↗)
3 points · by terminalcommand · 8y ago · discuss
comment 8y ago · link · parent
Now that I'm much older I think I will take my shot at reading a more advanced book on Forth.
comment 8y ago · link · parent
HN looks super sharp and usable on mobile, why not achieve some usability on desktop as well. All that is required is a simple media query for browser windows larger than 1400px in width or using responsive units.
comment 8y ago · link · parent
This works, the line-width does not get out of hand. It even switches to full screen view and removes the margins.
If I use a narrower window, there is no problem. But if I use any window bigger than 1400px, the line-width becomes an issue.
I think the problem may lie in the screen specific CSS of HN, there is no custom CSS after 1349px max width:
@media only screen and (min-width : 300px) and (max-width : 389px) {
.comment { max-width: 270px; overflow: auto }
pre { max-width: 200px; }
}
@media only screen and (min-width : 390px) and (max-width : 509px) {
.comment { max-width: 350px; overflow: auto }
pre { max-width: 260px; }
}
@media only screen and (min-width : 510px) and (max-width : 599px) {
.comment { max-width: 460px; overflow: auto }
pre { max-width: 340px; }
}
@media only screen and (min-width : 600px) and (max-width : 689px) {
.comment { max-width: 540px; overflow: auto }
pre { max-width: 400px; }
}
@media only screen and (min-width : 690px) and (max-width : 809px) {
.comment { max-width: 620px; overflow: auto }
pre { max-width: 460px; }
}
@media only screen and (min-width : 810px) and (max-width : 899px) {
.comment { max-width: 730px; overflow: auto }
pre { max-width: 540px; }
}
@media only screen and (min-width : 900px) and (max-width : 1079px) {
.comment { max-width: 810px; overflow: auto }
pre { max-width: 600px; }
}
@media only screen and (min-width : 1080px) and (max-width : 1169px) {
.comment { max-width: 970px; overflow: auto }
pre { max-width: 720px; }
}
@media only screen and (min-width : 1170px) and (max-width : 1259px) {
.comment { max-width: 1050px; overflow: auto }
pre { max-width: 780px; }
}
@media only screen and (min-width : 1260px) and (max-width : 1349px) {
.comment { max-width: 1130px; overflow: auto }
pre { max-width: 840px; }
}
The interesting bit is, that if I try to load HN on responsive view in developer tools (ctrl+shift+m) and adjust the screen size to 1920x1080, the site displays without any problems, with bigger fonts and saner defaults.But if I open HN on a regular tab with the same pixel size, fonts get super small.
The problem becomes more annoying, if you use a tiling window manager such as i3. Then you have to open another frame and adjust the size of the window.
Even on regular window managers, it is annoying to have to make the browser window smaller to browse HN.
347.
Why doesn't HN use responsive units?
6 points · by terminalcommand · 8y ago · 6 comments
comment 8y ago · link · parent
I've attempted to use Django on multiple occasions but was put off by the sheer magic it entailed. (This was me before I singlehandedly coded a social media application and saw first hand how a project could consume all your mental resources. I made the mistake of jumping into things yelling "fail early fail fast" back then)
Currently I'm back on working on personal projects. Nowadays I mostly write networking applications in Go, I've recently been writing an irc library. I learned a lot about parsing, networking protocols etc.
As for Go web frameworks, I've been meaning to test these frameworks for a long time, if I were to start a project now, I'd go with gobufallo. When I had done my research on it (August 2017), it seemed to have excellent documentation and tooling.
comment 8y ago · link · parent
I think if you're used to a framework, you don't need to reinvent the wheel by sticking to the Go standard library. Know that the Go standard library exists and how it works but use frameworks for productivity.
In Goland, you jump to definitions and see things for yourself anyway. Even while using the standard library you generally read most of the code to be able to understand it. A framework would be no different, you'll read parts of its code rather than just passively looking at the documentation. Idiomatic Go encourages you to engage with the code, rather than just consume it.
There are many frameworks out there that leverage Go's advantages (simple code, single binary, fast, very little RAM usage) while maintaining a higher level programming interface. I'd encourage you to try some of these frameworks.
Examples that come to mind are: Gobufallo [https://gobuffalo.io/en] Revel [https://revel.github.io/] Iris [https://iris-go.com/]
To learn the basics of security handling in Golang, you could learn the basic web security concepts from OWASP Top 10 lists and other sources. The things you'll need to work at are mostly: preventing SQL Injection (the standard db driver does a good job in parameter substitution), implementing CSRF protection, Securely Generating And Storing Sessions (Gorilla toolkit will help here), and securing your databases (especially passwords) by only storing passwords hashed and salted.
As Django is a full-fledged very high level framework, you might find it easier to look up on some Flask documentation to see how barebone web programming works. Golang + gorilla toolkit gets you on a microframework level (like Flask).
The other frameworks I mentioned Gobufallo, revel etc. will provide you with a more familiar environment, as they come with code generators and templates.
When it comes to best practices, I'd advise to learn more about idiomatic Go programming and learn about some fundamental web security topics.
I remember that I was also very scared that if I attempt to code any site by hand I'd leave a lot of security holes behind. But the truth is, most of the security flaws stem from complexity. If you know the basics such as sql injection, safe encryption algorithms etc. and keep your code clean, there is no need to be scared.
On a side note: if you had the patience of being able to get through the steep learning curve of django, you won't have a hard time doing things the old fashioned way by using httplisteners and httpwriters. IMO people tend to stick with microframeworks and CGI because they are simple.
350.
Exploring the /proc/net/ Directory (2000)(linuxdevcenter.com ↗)
1 points · by terminalcommand · 8y ago · discuss
comment 8y ago · link · parent
I wouldn't say it looks like garbage, but if you want a more native look and feel you could certainly set it up in the settings.
(For example: you could look at https://stackoverflow.com/questions/37035936/how-to-get-nati... )
As a library purely coded in C, I still believe that GTK and GNOME lay a solid foundation for easy development in C.
Before downvoting you might want to give GTK another chance. Even this libui library uses GTK under the hood for linux.
comment 8y ago · link · parent
The library (GTK) feels the same in every language, whether it's C, Python, Go, etc.
I admit, it can be a hassle to get the library up and running, but once you do that, it is surprisingly simple to code in.
comment 8y ago · link · parent
I'm currently reading Turing's famous paper "Can Machines Think?" and the way Turing explains computers, state machines and Laplace's idea of a deterministic universe made me think about the current state of CS. It seems to me that CS faculties change their curricula to teach students more and more about practical programming and less about its history and theoretical foundations. I think that is not right.
Many of my friends are studying CS as their major, but it seems to me that they don't grasp the deeper meaning of the field. For them CS is about programming, about building apps. For me computer science is not about programming and computers, it is about creating an abstract world of computation that is independent from us.
Maybe it would've been a good decision to keep theoretical computer science inside mathematics departments and offer a computer engineering degree for practical applications such as programming.
comment 8y ago · link · parent
As a side note, I downloaded the Lispworks Common Lisp Hyperspec, but I could only find the HTML version.
I see that the project is on Github, maybe someone will parse the Hyperspec and generate the documentation pages.
I am adding a reminder to my org-agenda for next month, maybe I will attempt to do it :).
comment 8y ago · link · parent
For example if chromeos users wanted to install steam on their system having a Debian base would help.
Aside from this I'm really surprised that they are using Wayland instead of X11, this decision ought to bring some stability issues until Wayland gets widely adopted.
If I were to guess this feature has been added as a freetime project amongst Google employees. As such, I don't think we can expect continuity. If those developers go away/get reassigned or lose enthusiasm, I don't think Google would allocate resources to maintain a linux VM inside their OS. IMHO if it were important to Google that users could be able to use Linux apps, they would've strived for binary compatibility with Linux from the beginning.
357.
Emacs as a C# development environment(joshwolfe.ca ↗)
2 points · by terminalcommand · 8y ago · discuss
comment 8y ago · link · parent
After some time it bothered me that I had a machine plugged in 24/7 connected to both my local LAN and Internet, owned by Google. So, every night I unplug the chromecast and then plug it again whenever I want to cast something.
comment 8y ago · link · parent
Some useful links:
https://github.com/vincentbernat/nodecastor // one of the earliest attempts of figuring out CASTv2
https://github.com/thibauts/node-castv2 // one of the first libraries to support chromecast streaming based on the works of vincentbernat.