HNHacker News
TopNewBestAskShowJobs

zeugmasyllepsis

158 karma · joined May 9, 2014

submissionscomments
zeugmasyllepsis··on The last thing libraries need is Silicon Valley “disruption.”
The truth is, plenty of people go to libraries. By my local library's annual 2017 report, they have 625,000 active library card holders which collectively visited the library over 10 million times. [1]

This is one of the busiest library systems in the country, but shows that, at least within a local region, libraries may be heavily used.

[1] https://kcls.org/wp-content/uploads/sites/20/2018/03/2017-Ye...

zeugmasyllepsis··on Python startup time: milliseconds matter
I had a similar feeling a while back, but when I actually picked up Lua for a project I was shocked by how limited the standard library is. Third party libraries aside (which Python clearly has in spades), even just the standard library is pretty sparse. It makes sense, since Lua is at least partly motivated by being lean and embeddable, but it puts Lua in a completely different space for me.
zeugmasyllepsis··on Python, Go or Haskell?

  Mypy is a static type checker for Python.
From the intro in the MyPy docs. MyPy is a legitimate static type checker for Python, with similar capabilities and limitations as other statically typed languages. There's an escape hatch to get you back to dynamic land (the `Any` type) and you can do naughty things at runtime if you use it (in the same way that you can in languages like C#), but using Mypy you can get decent type checking without actually running your program.
zeugmasyllepsis··on A Brief Glance at How Various Text Editors Manage Their Textual Data (2015)
From the previous discussion [1] on HN:

I use ropes in xi editor. I did not find the argument against ropes convincing. Yes, they're not trivial to implement, but in a proper programming language you're not dealing with the data structure directly, you're always going through the interface, so you get the logic right once in the rope library implementation and then forget about it.

In a low-level design, your editing operations would be poking at the data structure directly. There, the simplicity of a gap buffer is a pretty big win. I agree in this environment ropes are too complicated. However, I don't see any good reason to architect a text editor in this way. Use abstractions.

The linked article contains a factual error, the referenced Crowley paper does not consider ropes. Thus it cannot be used in support of the argument that piece tables outperform ropes.

There's one other important concern with piece tables I didn't see addressed. It depends on the file contents on disk not changing. If your file system supported locking or the ability to get a read-only snapshot, this would be fine, but in practice most don't. It's very common, say, to checkout a different git branch while the file is open in the editor. Thus, the editor must store its own copy to avoid corruption. In the long term, I would like to see this solved by offering read-only access to files, but that's a deeper change that can be made piecewise.

[1]: https://news.ycombinator.com/item?id=15383193

zeugmasyllepsis··on Why is Rust difficult?
There is certainly some overlap between those features, but I think they largely cover different usecases.

For example, consider trying to implement a List data structure in Go. What type does the List hold? It poses no constraints on the type of things put in it, except that they must all share that type.

The List can store `interface{}`, but then there's nothing to stop you from adding two different types to the list. And what type of value would a method like `getFirstItem()` return? Just an `interface{}`, forcing the user to cast.

Go's interfaces express constraints on individual types (e.g. type A has methods Foo and Bar) but not across functions defined on a struct (e.g. the type that a List stores is the SAME type that the getHead() function returns).

zeugmasyllepsis··on Essential C
I recently started a graduate course that originally required C++. My only exposure to C++ basically went through the fundamentals of the C part without getting to any of the ++.

Is there something similar to this for C++? I understand that C++ is a much larger language and I'm definitely not looking for something comprehensive, more of a solid overview of a workable subset of the language. Enough to be productive, produce reasonably modern idiomatic code that can be improved or expanded in the future.

In the end, the graduate course ended up using Python, but I'm still somewhat curious about modern C++.

zeugmasyllepsis··on Ask HN: Who is hiring? (October 2017)
I don't recall where, but while going through one of the links above I saw the numbers:

45% on-site, 55% remote

zeugmasyllepsis··on GitHub Desktop 1.0
Around 80 MB of RAM with my project open in GitHub's Electron-based desktop app as well.

For comparison, gitk is about 14 MB for the same project.

Overall, GitHub's desktop app seems to have fairly stable memory use in my experience, though that stable mark seems relatively high compared to native counterparts. Not nearly as bad as some Electron apps, which seem to have no ceiling to their memory usage. Not a horrible price to pay, if you can accept the stable overhead.

zeugmasyllepsis··on Leaving Python for JavaScript
An intentional limitation, then :P

I tend to agree with the Python philosophy, that it's usually better to extract and name a function that to declare it inline. The `asyncio` module and `await` keywords go a long way in eliminating most use cases where I'd still prefer an anonymous function, for arbitrary callbacks.

zeugmasyllepsis··on Leaving Python for JavaScript
I'm guessing, since the author used the arrow shorthand notation in Javascript as an example, that the limitations of Python's lambdas are the chief complaint
zeugmasyllepsis··on The Problem with F# Evangelism
I thought Elixir supported type annotations and could perform static analysis via Dialyzer? [1]

[1] https://hexdocs.pm/elixir/typespecs.html

zeugmasyllepsis··on Cell – A self-driving web app framework
You're totally right, if a page is merely serving static content with hyperlinks between the pages. For many types of pages, however, that's not the goal, and using JavaScript makes sense. Think of an interactive data visualization, where nearly the entirety of the content depends on dynamic user input controlling aspects like filtering and highlighting.

There are many cases where developers use JavaScript when plain CSS and HTML would do, but there are also many pages that simply do not fit that simple model. And between those two extremes is a large space of application with a mixture of static content and interactivity. Don't focus on a single usecase and ignore the rest.

zeugmasyllepsis··on Show HN: JSONSchema to TypeScript compiler
I'm not the author, but I assume the intent is to allow you to share the JSONSchema definition between the front-end and back-end. For example, a developer could write an annotated .NET class using the Json.NET schema library from Newtonsoft[1], automatically generate the schema for that class, then use this project to compile that schema into an equivalent TypeScript class. Or go the other way around (TypeScript -> JSONSchema -> .NET class). Or start from the middle with a JSONSchema.

Alone, you're right, this project doesn't make much sense, but it's part of a larger community of tools for creating cross-language model definitions based on a common schema language.

[1] : http://www.newtonsoft.com/jsonschema

zeugmasyllepsis··on Foundations of Data Science [pdf]
Heads up - you can use the promo code `print-is-good-F15` to get 10% off. I chose to get a nicer binding and with the code it came to about $23.20
zeugmasyllepsis··on CShell: A simple, yet powerful, C# scripting IDE
Scala, OCaml/F#, and Haskell beg to differ.
← PreviousPage 2 of 2