General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Lawrence D’Oliveiro
Fireship
comments
Comments by "Lawrence D’Oliveiro" (@lawrencedoliveiro9104) on "Fireship" channel.
Previous
4
Next
...
All
Mastodon and the rest of the Fediverse.
2
That would be a side-effect ...
2
And here I thought the name was either from Flash Gordon , or Blazing Saddles . “Mongo only pawn in game of life.”
2
FORTH really only belongs in a museum. I don’t see any reason to use it any more. PostScript, on the other hand, had some interesting ideas. Give it proper local variables and lexical binding, maybe even module scoping, and you could have quite a useful programming language. Just dump the obsolete built-in graphics.
2
@zilog1 I know all that. I understand the difference between YOU FORTH LOVE IF HONK THEN and you PostScript love {honk} if But FORTH’s memory management is still from the Stone Age. Avoid.
2
Start with an editor that will grow with you. For example, I moved from vi/vim to Emacs about 20 years ago. I started with very minimal customization. But gradually, here and there, I noticed things I was doing repeatedly, that could be done faster with some automation help. So bit by bit I added custom commands to help with those. Currently my main ~/.emacs file is up to about 1200 lines.
2
Futhark!
2
Remember the rule: never use a .0 version of anything. Wait for 0.1.0.
2
This is YouTube. Use the playback controls, Luke!
2
If you are objecting to the way Python is designed, take it up with the Python designers. I am merely pointing out how it actually works.
2
This is an opportunity for Microsoft to squeeze a bit of revenue out of those too dumb to realize that they can drop the Excel part—indeed, the entire Microsoft part—and run this entire advanced Python-based analytics stack for free.
2
Dijkstra called APL “the language of tomorrow to solve the problems of yesterday”.
2
One thing experience teaches you is to hold off on optimization until you get the code actually working correctly. I revisited a personal command-line script of mine a few days ago. It was taking about 6 seconds to start each time. I soon discovered a couple of things: * Importing matplotlib is quite slow. So if I defer that to the actual plotting function, so it only gets imported if I use that function, that speeds up the invocation of other functions. * When computing stats over a particular sampling interval, my database query was iterating through all the samples and discarding ones outside the range, because I couldn’t be bothered narrowing things down within the query itself. That made sense at the time, but now I have accumulated over 150,000 sample records, it was time to revisit this decision. So I added a couple of extra queries to determine more appropriate time bounds for the actual query for samples. As a result, displaying accumulated counts over the last 30 days went from 6 seconds down to about 1 second.
2
Fun fact: Python allows semicolons in places like that.
2
@marcasrealaccount Show me the “using” equivalent, and explain why it’s better.
2
Base 30 seems a better compromise: it has the same prime factors 2, 3 and 5, so it can express all the same numbers as base-60 in terms of exact ratios.
2
@yokowasis We have proper command-line tools and scripting APIs to do automation, we don’t have to struggle to pull puppet-strings through a GUI.
2
On the contrary, these new features are increasingly tied into CSS.
2
VS Code is an Electron app. So that means it’s never going to be as slim and fast as proper native Linux code.
2
“I’m having a Windows problem—” “Run as administrator!” Please don’t ...
2
@wlockuz4467 I have NFI what that means.
2
The card punch I used might have been an IBM 129. It stored the entire line in memory, with no display (other than a column number) until you pressed a key to punch the card. Make a typo? Hold down a key to advance the column number (preserving the existing contents of the line prior to that) to the point where you need to make the correct, press the correct key, then advance past that to the end (again preserving the existing contents of those columns), and punch a new card.
2
It was better than getting the data-entry people to input the programs. They made so many typos -- confusing “O” and “0” and “1” and “I”, for example. I just found it quicker to input the programs myself.
2
Emacs didn’t get GUI support until it had already been around for about 20 years. That was in the 1990s.
2
0:41 “\” instead of “/” -- yet another case of DOSlexia.
2
In Computer Science we learn about “abstract syntax trees” (ASTs), which are an intermediate representation when parsing a programming language which just represents the structure of the code, getting rid of layout details. Think of LISP as a language that is already in AST form -- I think the term for this is “homoiconic”. Since language constructs can be directly represented in terms of data structures in the language itself, this makes all kinds of powerful manipulations possible. For example, have you ever tried to use “♯define” macros in C or similar? These macros work by string substitution, and that is notorious for being fiddly and troublesome, and prone to mysterious bugs. In LISP, on the other hand, the macro facility works at the syntax level. This lets you do many useful things very conveniently and with much less trouble.
2
Just a note that, to get the most out of FFmpeg, you have to build it yourself. This lets you enable certain options together that have incompatible licences (e.g. non-free + GPL), so the result ends up as “unredistributable”.
2
Not sure why I would want to use custom structured data types in a DBMS. That breaks normalization.
2
@jonathanalonso6492 Point-and-click maybe OK for one-off tasks, not so good for things you need to do a hundred times a day. Then you discover that GUIs cannot be automated.
2
Nobody uses Dotnet for anything important. Microsoft itself won’t use it in anything worthwhile, like Office. Even when they were developing VSCode, they decided to go for, of all things, Electron with JavaScript/TypeScript, instead of DotNet.
2
So where does it put the entire Universe, exactly? Given that “Universe” means “everything there is”, where is the machine located whose state represents all these Universes?
2
JavaScript/TypeScript for that!
2
@armincal9834 You tell me. Why doesn’t Microsoft use it in VS Code or Microsoft Office, for example? Actually, I know why. Trying to build core parts in Dotnet was a key reason for the problems in Windows Vista.
2
Linux system logfiles used to use some idea of a “system” timezone for timestamps. Luckily, systemd does away with this: internally timestamps are stored as UTC, but you can display entries in any timezone you like, by setting your TZ variable in the usual way.
2
Maybe it could have been implemented faster if more developers had contributed to it.
2
They are the smart ones who don’t get taken in by a big company’s ad campaigns into somehow believing that it does favours for its customers. Above all, they believe that, if you buy something, you own it. That’s not an attitude that Apple is comfortable with these days.
2
Certainly the traditional “parenthesis pileup” way of writing LISP code just looks ugly to me. Here is how I write my code: (defun convert-to-region-codes (beg end) "converts alphabetic characters in the selection to “region indicator symbols”." (interactive "*r") (unless (use-region-p) (ding) (keyboard-quit) ) ; unless (let ( deactivate-mark (intext (delete-and-extract-region beg end)) c ) (dotimes (i (- end beg)) (setq c (elt intext i)) (cond ((and (>= c ?A) (<= c ?Z)) (setq c (+ (- c ?A) #x1F1E6)) ) ((and (>= c ?a) (<= c ?z)) (setq c (+ (- c ?a) #x1F1E6)) ) ) ; cond (insert-char c) ) ; dotimes ) ; let ) ; convert-to-region-codes
2
Instead of “idempotent”, it should be described as a “makefile for distributed configuration”.
2
Got reminded of this item from The Onion : “Prague's Kafka International Named Most Alienating Airport”.
2
@GSBarlev He also gave up his post as Python BDFL. Coincidence? You be the judge.
2
Do any of his reasons make sense?
1
Meanwhile, Emacs can still run rings around it with a scripting language that is over half a century old.
1
“My machine is supposed to be fast. Why is my code so slow?” “Do you understand the locality principle?”
1
Even with SRP, anybody who gains unauthorized access to the hashed password on the server will be able to impersonate the server.
1
@tobiasb6200 The server has to have some information to allow it to authenticate itself to the user. Anybody getting hold of that information can impersonate the server. QED.
1
@tobiasb6200 How does your user know they’re connecting to the right server?
1
I always felt that original fixed-function-pipeline OpenGL was the easiest to learn. As they got rid of the fixed functions and replaced them with custom shaders, things got a lot more powerful, but also harder for beginners.
1
Best described as a “makefile for distributed configuration”.
1
If you are doing “scratchpad”-style programming (a few lines of code to calculate something), I would recommend using Jupyter notebooks with Python code. Makes it very easy to try things out. You can even get graphical plots and other rich output. And basic widgets for simple interaction.
1
So Python code that uses Mojo reserved words (like “struct”) as names would not be a strict subset of Mojo, since it would fail to compile with syntax errors.
1
Previous
4
Next
...
All