We need more of the security. We probably don't need the Rust though.
102 karma · joined August 8, 2019
We need more of the security. We probably don't need the Rust though.
Do note that C did not have such a flaw built into language — C++ authors invented it and Rust inherited this flaw (the authors simply did not feel like it's a flaw). I mean specially designed embedded C code can survive total RAM erasure and still perform some meaningful work (with CPU registers and ROM intact). Or compare it to BEAM that can have processes crash all day long and still continue to work. "Memory safety at all cost" is not a practical requirement — it's theological.
ORM and OOP whine is niche, agreed. Linux vs Windows is irrelevant because windows runs linux nowadays — I don't think I've read a single article about it.
Git? Okay, mostly circumvented by solutions that don't carry any implementation from the original Git, but have "git" in the product name.
Javascript bloat? I'm pretty sure that's still a hot topic. I don't remember it being solved, do you? Like if I open website and it greets me with a window suggesting to apply cookie policies for 300 (three hundred) trackers on the website — isn't it worth talking about?
Funny fact: one of the reasons Qwen suggested my article is LLM-generated is because it considered link as impossible. I was so gaslit I opened the article and clicked the link. And it worked. Mic drop.
Few days ago I made an experiment — put my article into Qwen and asked to evaluate it for LLM-generated content. To my amazement it told me the article is 70-90% AI-generated. Which is even more weird considering the fact I know I wrote it all top to bottom. I think I spend so much time in LLM conversations I actually started copying LLM style.
I mean if you look into the article https://bykozy.me/blog/rust-is-a-disappointment/ — it's structured exactly like LLM implicit templates (a.k.a. fine tuning training datasets) do: short reiteration of the question, list of key points, key points explained exactly one by one, final summary. However, why would I not write the article this way? Just to make sure a person skimming the article would not pattern-match it to "formatted as LLM output"?
If I wanted to disguise an AI-generated article as a 100% human content — I would do it. But thanks for the suggestion — might be viable to consider doing so, because I just scare too many people away this way.
Strongly disagree. Although x86 was dominant on desktop PCs with MS DOS, Nintendo Entertainment System used MOS 6502 which is a lighter version of m68000, while Sega Mega Drive used a full blown m68000. Apple II desktop also used MOS 6502, HP used PA-RISC for their HP-UX servers, and Sun replaced their 68000s with SPARC in late 80-s. Alpha achitecture was so successfull there was a Windows NT port for this achitecture. So it wasn't really game over as of 80s, and even in 90s the market was still diverse. It's only by 00s x86 together with Windows NT series achieved total dominance, even in small server segment.
>So I guess the point is that technology adoption proceeds by evolution, and trying to plan 10 or 20 years ahead of time never works
Right conclusion - wrong reasoning. Quality of product is never a main driver of sales. That's why to succeed you need to market it first and then elaborate some way to make it usable. That's where, for example, Motorolla, Alpha, MIPS failed, and that's where ARM won as an umbrella brand for actually 4 incompatible architectures (original ARM, AArch32, AArch64, and Thumb a.k.a. SuperH).
YouTube also encountered the same problem. Their solution sounds kinda like "never use pickle, because it's slow. Use custom serialization".
This is why PyPy reimplements standard library in RPython — so you can JIT-optimize it. But it feels like Mark Shannon knows nothing about these efforts — which is kinda strange considering his position of core CPython developer.
>There are other lower hanging fruits, like optimizing core data structures (e.g: the implementation of python dicts)
Unfortunately, you cannot easily implement efficient data containers without rewriting existent python code. The latter one relies heavily on dictionary-based access to pretty much everything, and you cannot easily convert "string hash" access into "record offset" access, because you cannot know a priori what object has what structure and converting hash into offset is basically the same dictionary lookup. For example:
a = A() a.field = varname + 1
What can you optimize here? What "varname" is? What A's structure is? Is "A" a class or a function? Not only you are unable tell the semantic of the code just by looking at the code — you can't even tell the semantic after you've examined the "A" and "varname" on some previous iteration, because somebody might've declared/modified those on outer scope or directly modified "A" or "varname".
Last year in my spare time I've been working on an unpublished library for python multitasking with shared memory structures (probably will make some blog post in few weeks and link it here), and I also encountered the problem of inherently inefficient implementation of python basic types. However, I'm yet to find the solution without breaking compatibility with existing code. For example, if you look at ctypes, they have some very efficient containers, but using them in a regular python code is a pain, and the c-python interface eats most performance benefits of efficient containers.
So what's really needed for optimization of python is some kind of python subset, like RPython but probably more human-friendly, so efficient containers can really become efficient while automatic optimizer can select or create automatically those efficient containers. Just like V8 JS engine does, which stores objects in records with static structure. It happens to works in JS for most cases. Countrary, in Python it does not work for most cases, that's why we have so much struggle optimizing the Python.
I tried building spaceship and failed. Fiend of mine tried building a spaceship and failed too. However, I know of people who built a spaceship. So is building a spaceship a crapshot?
Reality is: 95% of HRs are incompetent. That's where randomness comes from. Take a random man from street and assign him for HR role after a brief training -- you'll achieve a similar performance to those 95% HRs.
Everybody's talking about hiring the engineer, but so fewer people talk about finding a good HR that would help you to solve a "simple" problem: how to find a good engineer with small experience and small salary that would not leave your company for the next few years and would become after several months just as good as 70-100$/hour engineer hired from top software company, while later most likely still gonna need some time to adapt to your product to become efficient.
Isn't WebView kind of work around for web browser being overbloated? I mean they made single instance of browser and interfaces for embedding that single instance, but do you really need that for desktop?
Yeah, I feel like Embarcadero/Borland took a completely wrong turn with their price policy. Instead of making the tool widespread and make small money from huge amount of places, they decided to go on full vendor-lock where you either get all or nothing, so Borland got nothing eventually and ceased to exist. That also burried my carrier prospects in that area, which is so sad considering how good the Pascal is as a language compared to C/C++.
Could you provide a concrete example?
Intuitively I do understand ClojureScript is not as seamless as some people say. First of all, Clojure is kind of a database-programming language with fundamental data types built around concurrency, while JavaScript was single-threaded until recently (and web workers used shared-nothing model). Second, Clojure is build around Java specifically, not any other language. Java has some strict type system with immutable complex objects being pretty much native way of doing things, thus Java is great for implementing dynamic types on top of it.
But I feel like not having undeniable proofs of fundamental flaw in ClojureScript. For example, JavaScript fundamentally lacks copy-on-write complex structures. Thus development of copy-on-write libraries is painful e.g. ProseMirror which can become completely broken until page reload which is bad for Single Page Application. However, could it be that ClojureScript... just works?
The topic is about general desktop GUI applications. Some users of desktop applications don't even have internet connection e.g for security considerations. Tell me more about changing application UI without internet connection.
Old Skype was a P2P networking application, which is a way more complex functionality than Slack's client has (excluding Chromium itself), but it was invisible to a regular user. Server side of Skype had only basic things like authentication, simple messaging, contacts data, and telephony gateways (paid service). It didn't even store message history on server side, which was PitA. Contrary, Slack has a lot of heavy logic on server side thus taking heavy financial losses and unable to become profitable.
>Perhaps, given sufficient memory, you can also run clang in the browser (WASM) so you can compile and link in Chromium too
I wass talking about framework/toolkit, because we are talking about framework/toolkits. You cannot run Chromium in WASM to debug it, and it would take days to compile chromium in clang-WASM.
>Electron, Qt, Swing, JavaFX, Flutter all take the approach of drawing every pixel themselves, not using any "native" widgets rendered by the OS vendor
There are no native widgets on Linux and other posixes, so your statement is true for them. However, for Windows Qt is able to optionally use native drawing routines. Firefox and Chromium use native routines too, but the extent is way more restricted. Also, Qt allows you to use fully platform-specific features, which is very problematic in Electron. The most basic example is date formatting, which almost never works the same way native applications work, you always get small differences here and there.
>Anecdotally all the Electron apps I've used have been beautiful whereas the Qt/GTK ones look stuck in the 90s
Heavily depends on applications you used. I don't think you tried to use any 10-years old electron application, because electron itself is 7 years old. Have you used VirtualBox?
What are you going to do with the video? Coz that's where the problems with electron begin to appear. For example, you want some controls for seeking, displaying time, copying link, full screen, etc. And suddenly you get yourself a slow youtube-like monster. I really wish I could continue to use flash-based youtube, because I had no performance problems with it.
>HTML snippets rendered for free (no need for an external HTML renderer)
Slack doesn't need to render html snippets.
Because it looks ugly (i.e. non-native) on pretty much every platform. Qt has different levels of success at that, having most problems with macOS and Android.
Also, there's Qt Quick, which lies somewhere in the middle between classic Qt and Electron.
>It's slow to render? Wrong, Electron (Chromium) renders faster than Qt. The Skia engine is optimized to an extent that these other toolkits cannot compete with. It even has a Vulkan backend now
The reason why classic single-threaded GUI toolkit are the way they are is because you can perform a custom reactive drawing or just reactive UI update in a blink of the eye, so user won't notice any delay. I know there are some bad examples like java-based IDE bloatware, but there are good examples like... Chromium! However, you cannot develop Chromium with Chromium, but you can develop something similar to Chromium with Qt.
>Memory? It's 70MB
Haven't seen Electron application using less than 200 Mb of memory. For example, launching Skype plus chromium SPA takes 550 Mb of RAM on my system. JavaFX has similar problems.
>Slack is a slow monster, but it's a giant codebase that does things that would be simply impossible in Qt, GTK, Swing and others
Like what? I'm not aware of any special Slack's features that could be hard to implement using classic GUI toolkits.
Usually when I read wiki written by more than one man and need something more complex than "born xxxx, died xxxx", I feel like the page was written by schizophrenic with OCD i.e. the information is not consistent and writer is obsessed by formal correctness at the expense of clarity. Thus I cannot understand shit unless I'm already well familiar with the topic - but then what's the reason for me to read this article?
Because it isn't. It's not even close to "anything". Only superficial things are googlable, and even then google's NN algorithms sometimes manage to mess thing up, providing some useless links instead of a single correct one. That's why I tend to use google for quick search, but then I back it up with my own notes and articles/books/webpage archive. Of course, most of the times I will never use the things I store, but once in a while it saves me days. Knowing that I don't save regular stuff every kid can find in a minute even if the original resource is gone.
>In my current SaaS product, if we were doing SSR instead of client side rendering, our hosting costs would be through the roof right now
It's good you mentioned your product instead of generalizing implicitly. Because SSR in some cases allows you to prerender pages and host them statically, thus significantly reducing server CPU and RAM load, and also making page loading time very fast.
>Plus, using service workers, it can work offline, which is not really possible with SSR
Similar scenario is possible with SSR, allowing for completely offline operation. SSR implementations usually require scripts to be run on the client side, and also allow for defining explicitly server-side-only and client-side-only scripts, including full transition into kind of SPA for specific pages, as well as a full SSR prerendering with dead-static content on both server and client. And gzip can help to reduce the bandwidth required.
"position: absolute" can be used to disrupt the two-way size propogation. Without it you either get shrinked content on y, flexbox wrapping problem on x, scroll appearing on a wrong element in some cases (or cropping for "overflow: hidden"), or you have to set width and height of the block with scroll using css "calc()" — all these solutions are ugly.
>My reasoning is that I want to prevent elements from overlapping and obscuring important information
The most simple example of overlapping elements is a background/border. You can look around this page and find a lot of overlapping graphical elements — it's not the problem, but overlapping text (and other content) is.
"CSS is awesome" example formally has no overlapping DOM elements, no "position" attributes. It's just a block with "border" style and "width" set to some fixed amount. Often this problem happens without border on the block and remains invisible, unless two such blocks are really close together and the text begins to overlap. Still no "position" involved though.
HTML was never intended to separate data and presentation. That's what PHP and other server-side languages (ColdFusion, Perl, etc) were used for, because HTML specifically is a presentation. Moreover, DOM, as HTML representation, is also a presentation. Considering high availability of network bandwidth, I'd say there's no more need to squeeze data into client-server channel, that's where server-side rendering comes into play with thin client just doing presentation thing.
I would like to remind you the whole reason for creation of Angular/React/Vue/Polymer/etc — that is because you have this overbloated DOM which is slow despite being implemented in fast low-level compiled languages. The main reason is complexity of calculation of inline elements (text and images with wrapping) and two-way propagation of size (parent to child and child to parent). At the same time the whole idea of CSS as a customizable style description (similar to LaTex/MS Office/OpenOffice styles) is completely forgotten while becoming inseparable from the rest of the content e.g. visibility styles, inability to show the content in different sizes, etc. And now we need workarounds like Webpack and HTTP/2 for putting together separate files that are not so separate by their functions. Because, in fact, a simple textual HTML is separate, its CSS is separate, but dynamic application within this page is a single entity composed of html+styles+js+images — similar to adobe flash swf blob.
I've been writing native GUI apps for like seven years, but now I write web SPA, and the more I write them, the more I feel like today's HTML is not a good platform for true GUI application, because within DOM simple GUI things have to be implemented as complex entities. Yes, we got a flexbox which makes positioning much simplier than float blocks or scripted positioning. However, we also got "display: grid" and "column-width" which also implement flexbox-like behavior, but slightly different. In the end it doesn't matter how many layout mechanism we are going to have — it will never be enough.
Recently we got HTML5 canvas, including WebGL, but we got no good language to write the program for this canvas. Actually, WebGL is the closest to the double-world model of web browser I'm trying to suggest, because WebGL uses a separate high-performance shader language to describe the WebGL-canvas logic which is uncoupled from the main web page's logic. We can also render from a webworker into WebGL canvas, and chromium supports OffscreenCanvas capable of webworker rendering. However, both 2D canvas and WebGL lack one important thing — two-way composability i.e. include html page into canvas. Just like native GUI apps struggle with including native elements into internal browser, canvas struggles with including web browser into 2D or WebGL context.
Actually, Microsoft once solved this problem by implementing support of custom elements in the IE browser, thus bringing a two-way composability. However, due to windows-only nature of the solution it had not achieved wide acceptance. Some cross-platform execution environment is required for success, like JVM or CLR — WebAssembly being the most relevant today, but the composability problem has to be solved. Until then, the developers would still prefer to keep the composability by avoiding HTML5 <canvas> and clinging on the old DOM as long as they can.
And by the way, speaking about cross-platform runtime. JVM, CLR, optimized JS, WebAssembly, and non-native-architecture VM have similar performance, so it's really not the fundamental execution speed that killed Java applets, but a failed GUI model "every pixel is drawn by JVM bytecode". WPF, UWP, JavaFX tried to fix the issue, until "everything is web" came.
Now about a second small idea I have and I've been struggling with for many years of web surfing. Bookmarks, history, and tabs are not separate things. The gap between them is closing but closing very slowly. We are getting web services that live between pages, we are getting frequently visited pages as a kind of bookmarks, we are getting cheap tabs that are loaded only when user switches to them, but nobody is brave enough to erase the separation and create a single visited-tab-bookmark entity. Today's computational resources clearly allow us to save some amount of data about every visit without forcing the user to be a bookmark keeper, especially when the user has no convenient tools for managing current tabs he's working with, and as for me I work with 50-300 tabs daily, so it's really a pain to manage them with this "ten tabs on the screen"-oriented tool modern browsers have. I know tree-like tabs exist, but usually they have their own issues. I'd prefer to open the tabs in a full-screen view, preferably with preview. Some people in the older days would save onto HDD every page they visit — they had a struggle sorting all the crap they've got.
Just a sheer complexity of the layers being deposited during the current and the previous century makes it impossible for a single person to understand all the possible interactions. So today's situation with chromium-based browsers differ from IE in that the latter deliberately went against existing standards while creating many non-standard features.
In the last years google set a course for putting more and more features into browser so no other browser can catch up quickly enough. And despite the fact google actually tries to be standard-complaint and to create standards for their new feature, but only a large corporation is able to implement those features e.g. Mozilla.
Tell me an alternative to flexbox scrolling with "position: absolute; left: 0; top: 0; bottom: 0; right: 0".
I do agree "position: sticky" and "position: fixed" are harmful though.