Recent submissions

Comment · 3 years ago
I recently purchased a BOOX device, it is a large e-ink tabled which runs android. I have google drive sync a specific folder and it works seamlessly to read and markup pdfs, epub, djvu. The screen is excellent for reading and writing. I bought one of the 10 inch devices but they have full 13 inch models that are a bit more expensive.
Comment · 3 years ago
https://www.youtube.com/@LowByteProductions/videos - Previously called Low Level JavaScript builds various low level or fundamental components from scratch in JavaScript/TypeScript and a bit of C lately I think.
Comment · 4 years ago
It is still alive, it has just moved to github! It is a big language and it can prove useful programs. Apparently, part of the Ethereum 2 specification was verified using it. https://github.com/dafny-lang/dafny

I have been learning it and the syntax is close to most C style programming languages. As a software developer this makes it much more approachable than Coq. The proof statements also feel more like the math I learned in college rather than the weird magic keywords of Coq.

Comment · 5 years ago
This is a false equivalency that I see pop up pretty often. Like Use Types or Go Fast? Why are those the only options? Why does using types make you slower? If you're a slow typist then I suppose writing the types can take a little longer. Why is the comparison not Go Fast or Write Tests? A test suite with reasonable coverage is many times the amount of code that adding types takes.

Here's a great tool, https://quicktype.io/typescript . You can paste in JSON objects and it will spit out useful type definitions for your objects. The reality is that types exist in JavaScript and any other untyped language, they're just implicit. You have to read the code to know what they are. Then to help yourself or people who work with you, you will start writing examples either in the docs or in tests, and now you've informally specified your types. Or you don't do either then every time you or anyone else goes to edit a piece of code you have to read, understand, manually find all places you used that code and make sure you didn't break anything.

The purpose of a static type system is to find bugs, or issues with your code without even running it. The compiler will let you know if you make a change to the code which breaks the type you set. It can do a lot of the above mentioned work completely automatically.

You end up saving a lot of time not repeating work. One time working in python I had a problem that took me an hour to figure out. I had to look through a bunch of project code, then library code, and then I figured out that I just had put in the wrong shape of data. In a typed language it would have take me 30 seconds. The compiler would have complained and told me how I was wrong and then I would have fixed and moved on. At that moment I said "I'm getting too old for this shit", and then have never looked back from working with typed languages.

Secondly, TypeScript is not Java/C/C++. TypeScript has type inference and expressive type system. This means that you do not need to manually write the type for every single variable. Most you can omit because TypeScript is clever enough to figure it out.

Secondly, Structural typing is exactly how duck typing works in JavaScript and Python. Unlike those older languages you don't need to build huge class based hierarchies to make types that work in many situations. Define a minimal interface that you need for a function. Any object that has those properties will type check and work.

Check out Effective TypeScript, or Programming TypeScript. As a seasoned node developer I assure you that if you ever have teammates, types will help them contribute to a code base faster and with more confidence.

Comment · 6 years ago
Studies of college students learning CS showed that students who built a consistent mental model of what the code was doing did considerably better in classes.

To that end when I was teaching students I would print out snippets of code and have them evaluate the code in their head/on paper and then have them run the code to see if there was anything wrong. Repeat this process until your mental model matches what the computer does.

Comment · 6 years ago
I start all my server side projects in TypeScript lately. There is enough support that it is actually very easy to get started. ts-node, npm @types, and many packages natively supporting ts help.

The browser is a crazy environment and adds difficulty, but I find my server code can very strictly typed. The nodejs type definitions are good and if you pick an ORM library with good typescript support then both the in memory data structures and database objects can be well typed.

The build step with typescript is basically negated by ts-node for the server. Alternatively, by using tsc --watch and some clever indirection I've enabled hot reloading for most of my server code. So just to be clear, I have types helping me code using vs-code, I save and immediately see changes on the server.

If you know the tools well and how to set things up then TS + node can provide a better developer environment than many languages.

Comment · 7 years ago
For another data point consider https://www.reuters.com/article/legal-us-otc-uber/forced-int...

Even if you willingly accept the forced arbitration clause you still may not get justice because the company doesn't want to pay for it!

Comment · 7 years ago
Maybe try not raping or abusing people or other illegal activities and don't suffer economic punishment?
Comment · 7 years ago
If some pernicious pedophile develops a cure for cancer, it would be morally wrong not to use it. However, if that particular pedophile should profit from it is an entirely separate question. Patents and copyrights are a government given right and they can be removed. Actions have consequences.
Comment · 7 years ago
The difference between all the things that you listed is that works of art are able to give royalties to a person. If you continue to buy or consume their products they still profit.

Obviously ex post facto law is bad for society. However, if an artist is receiving royalties for a work they made during which they raped several people, why should they still profit?

Comment · 7 years ago
While I can understand and somewhat agree with his point that the works should be judged on their own merit. However, I find his attitude extremely callous. He even reiterated the point that even if the artist was an axe murderer he wouldn't care he just wants the goods.

It boils down to he's saying that the suffering of any of the victims doesn't matter to him. Literally at all... More over there is a pretty deep undercurrent that that has been the attitude for a long time and that the suffering of others has been ignored for equally long.

If you want justification for removing the works of the artists then consider it a form of ill-gotten gains. Would that work of art have been made if they're crime had been revealed or convicted?

Comment · 7 years ago
Comment · 8 years ago
The report specifically calls out Kraken as extremely suspicious. This is the excerpt.

"The OAG could not review the practices and procedures of non-participating platforms (Binance, Gate.io, Huobi, and Kraken) concerning manipulative or abusive trading. However, the Kraken platform’s public response is alarming. In announcing the company’s decision not to participate in the Initiative, Kraken declared that market manipulation “doesn’t matter to most crypto traders,” even while admitting that “scams are rampant” in the industry."

Comment · 8 years ago
Comment · 8 years ago
That's sort of tautological. "Any" and type assertions are designed as the escape hatch of the type system. If you're trying to develop type safe typescript you obviously won't use those. The followup question is for typed code (excluding usage of any or type assertions) does typescript have an unsound type system? Afaik the answer is no.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton