News for hackers. Stuff that matters.

photokandy

Re:Ask HN: How do you like developing on an M1 Mac so far? on Saturday January 16, 2021 @02:10PM (#25804537)
Native Node is fine, and generally runs better than the equivalent MBP. My 8GB M1 handles Node & JS about twice as fast as my 16GB 15" Intel MBP from 2019.

Where you can run into issues is architecture support. I'm running Node natively, but this means that some packages that don't support ARM will fail to build properly. I've been able to work around/do without for now, but depending on your use case, it could be an issue, if you want to run Node natively. (I do not have a feel for Node via Rosetta 2 performance.)

Re:Ask HN: How do you like developing on an M1 Mac so far? on Saturday January 16, 2021 @02:03PM (#25804481)
My perspective: Going from a 2019 15" MacBook Pro with 16GB of memory to an 8GB M1 13" MacBook Pro

You don't start to feel the 8GB until you:

* have a lot of tabs open in Safari (like ~30+)

* have heavy web apps (GMail & Outlook, I'm looking at you)

* run a virtual machine (Only so much you can give a Parallels instance w/ 8GB)

* run some known performance & memory hogs (Slack, Teams, etc.)

* vpn seems to slow things down a bit

I generally will close down apps when I don't need them (but that's _always_ been my habit). I do find the M1 to be fully sufficient (and still faster than my previous MBP) when doing my day-to-day (including VS Code, JIRA, Slack, Xcode, Node, etc.). I also use my M1 for music performance and composition, and that's worked just fine for my purposes (but so did the previous MBP). I will (as I did before) switch contexts by closing apps I don't need, so it's hard to say if apps from development impact the apps for music or not; they rarely run side-by-side.

Things that have greatly improved my productivity:

* This thing is as cool as a cucumber, and absolutely sips its battery. This means I can be more comfortable taking my MBP to the couch, or to the patio (when it was warm) and not worry about watching the battery %.

* This thing _in general_ is much snappier. Native apps load quickly, and performance in the apps I use is about twice that of the previous MBP.

* I can type on this keyboard!

* Using a single external monitor is fine; I work from a couple of locations, and both my Dell P2415Q and my LG 24MD4KL-B 24" Ultrafine 4K work fine.

There are edge cases here where the M1 falls short:

* I can slow the poor thing to a crawl for a few seconds if I attach a 4K monitor and then try to AirPlay to another 4K display. It catches back up and is generally fine after, but you see the beachball for a while.

* Lots of tabs in Safari will cause slow tab switching, and some web sites just chew through CPU. Battery life is still _way_ better than the previous MBP, but it definitely impacts the feel of the device.

* Bluetooth mice -- ugh. I bought a Logitech MX ergo and had to switch to using the receiver instead because the MBP bluetooth felt so laggy.

* Most iOS apps just aren't well suited for the device. Apollo (for Reddit) works pretty well, but even that has its quirks where sometimes keyboard shortcuts will just stop working.

* VMs. If you run Windows in Parallels, you _will feel it_. I do not run VMs all the time for this reason, but spin them up and down as needed.

Re:Building a Basic Interpreter, '80s Style, Part 2 on Tuesday August 11, 2020 @11:09AM (#24121092)
(OP Here)

I've used pagetable.com quite a lot for reference to see how things were done in CBM BASIC. I didn't always follow that direction (also looked at GW-BASIC, and others), but it has proven very useful to either set me on a well-trod direction or to validate ideas I'd already had.

Re:Building a Basic Interpreter, '80s Style, Part 2 on Tuesday August 11, 2020 @11:07AM (#24121063)
Nice! (OP here)

I've definitely been looking a some implementations, but I don't think I directly looked at these. (Instead, pagetable.com and gw-basic and the like have proven invaluable as well.) I should write a quick post summarizing all the resources that I've been using -- that might prove useful.

Re:Politically-correct witch-hunt is killing free speech on Sunday August 09, 2020 @10:43PM (#24104952)
When it comes to JK Rowling, absolutely. She's pretty firmly in TERF territory, and holds pretty damaging views when it comes to those of us who are trans/gender non-conforming.
Re:Building a BASIC Interpreter, '80s style on Wednesday July 08, 2020 @04:48PM (#23774079)
I finally had time to revisit the suggestions in the comments -- what great ideas. :-)

I wrote them up in a post here: https://able.bio/kerrishotts/building-a-basic-interpreter-80...

I also included some links to resources that may prove useful to others trying to do similar things.

Re:Building a BASIC Interpreter, '80s style on Sunday July 05, 2020 @10:33PM (#23744133)
Oooh -- good idea. I don't think I have an instruction that quite matches. Retroputer's branch instructions are directly tied to the flags, so you can do `br !c(arry)`, but that doesn't rule out zero like `ja` does. At a quick glance I don't think that should rule something like this out, though. :-)

That looks like a really interesting book -- I think I shall add it to my reading list!

Re:Building a BASIC Interpreter, '80s style on Saturday July 04, 2020 @02:59PM (#23734189)
A quick search indicates that BBC Basic had a LISTO command that could add indents. I should see if I can add something similar.
Re:Building a BASIC Interpreter, '80s style on Saturday July 04, 2020 @02:54PM (#23734164)
You’re right! I’ll do that. :-)

I haven’t done a lot of optimization yet-probably lots of things like this. :-)

Re:Building a BASIC Interpreter, '80s style on Saturday July 04, 2020 @12:29PM (#23733315)
Author here & wow! Didn't expect to see this get posted anywhere, but happy to see that there are people as interested in this stuff as I am.

If you do play with Retroputer at all, it is still very much WIP -- so lots of things aren't implemented (or don't work). It's proven a fun project to reacquaint myself with lower-level concepts after having been in very high level languages for several years.

One thing I really loved about the computers like the C64 I grew up on: it was possible to hold the entire workings of the machine in your head. While things often appeared magical at first glance, it wasn't that hard to figure out how and why they worked, and then to use that to your advantage. I don't _know_ if that's a benefit when writing high level code today, but I like to think that having that low-level understanding is useful.

It's also proven useful as a project to learn _new_ things. I'm figuring out some back-end coding, Twitter bots, and at some point would love to make this thing in hardware with an fpga. One of these days... ;-)

Re:Building a BASIC Interpreter, '80s style on Saturday July 04, 2020 @12:23PM (#23733277)
OMG--that would have been SO nice to have. I don't think I got my first taste of syntax highlighting until I got access to Turbo Pascal.

Adding it to Retroputer BASIC should be trivial. I think I'll have a go at it tonight, since it has support to use control codes to change the text color.

I wouldn't rule out the pandemic being an issue here. These are not _normal_ times, and is an additional stressor. For me stress _definitely_ impacts my ability to think clearly, and the higher the stress (even if not immediately obvious to me), the worse my thinking skills are.

As another commenter mentioned, migraines can also do this. Not all migraines come with a lot of pain, so that's not always a dead giveaway. But during a migraine, my thoughts are muddy as hell.

Re:Apple announces iOS 10 on Monday June 13, 2016 @11:31PM (#11899560)
Gah; my app doesn't like it either! Gotta be a bug... :-(
Re:Apple announces iOS 10 on Monday June 13, 2016 @11:31PM (#11899557)
As long as one can leverage plugins for hybrid apps, I don't see why most of the demoed features today aren't possible in a hybrid app. At least nothing sent up huge red flags for me as a hybrid app developer.
Re:Show HN: Writing Streak – write fiction every day on Monday May 02, 2016 @12:11PM (#11612680)
This looks pretty cool. I think it would be fantastic if you'd integrate social logins here. I'd rather log in with Facebook or Twitter than create a completely separate account just to use the site.

Having a demo of sorts would also be useful, so that I could get a feel for the sprint editor. Animations are great, but it doesn't give me a sense of how well it would work for me.

Re:The Birth of Standard Error (2013) on Saturday August 01, 2015 @06:32PM (#9988964)
Yes -- I was just indicating that WinNT was the first Windows to do it. Every Windows based on the NT kernel supports stderr redirection. Win95, 98, and ME didn't, since they were on a different kernel.

Still can't believe I bought ME. sigh

Re:The Birth of Standard Error (2013) on Saturday August 01, 2015 @05:46PM (#9988807)
Yeah, Windows NT Workstation 3.1 was the first Windows to have stderr redirection[1]. Windows 95, 98 and Millennium (oh, that horrid edition. I actually bought it! Gag.) don't support redirecting STDERR according to Wiki[2].

[1] https://support.microsoft.com/en-us/kb/110930

[2] https://en.wikipedia.org/wiki/COMMAND.COM#Redirection.2C_pip...

Re:Implement arrow functions in v8 on Thursday June 18, 2015 @12:03PM (#9739466)
I've been doing ES6 for several months now. Not once have I mistook `=>` for `>=`. Not once have I made a typo when I wanted an arrow function.

Of course any syntax can be abused in such a way to create ugly code. But if I compare

    [1, 2, 3].map( a => a * a );  // [1, 4, 9]
to

    [1, 2, 3].map(function(a) { return a * a; });
I prefer the former. It's more concise, and strips off a lot of visual noise, and I think it's more readable (the intent isn't wrapped in lots of boilerplate).

That doesn't mean one can't write horrible code with the arrow form. Of course you can. Furthermore, it's not necessarily something you should use all the time, because it's not completely analogous to a normal `function` because it binds `this` lexically. Which means `function` isn't going away any time soon, especially if you need to bind them dynamically.

In short: use the best (syntactic) tool for the job. There are use cases where the arrow makes sense semantically, and there are cases where it doesn't. Use as appropriate, as one should always do.

You'll probably transition fairly easily. Mac OS X is a customized BSD, so although it has differences with respect to Linux, it's also not that foreign either.

* Remap Command and Control if your fingers can't adjust to the change in shortcuts. System Preferences > Keyboard > Modifier Keys

* If you want TAB to work with all widgets (which is what makes sense to me): System Preferences > Keyboard > Shortcuts > Full Keyboard Access: All Controls

* Not sure where a menu command lives? Search for it in the Help menu's Search field.

* Spotlight is a pretty good launcher, calculator, and more. Command+Space is your friend.

* If you need additional keyboard remapping support: [Karabiner](https://pqrs.org/osx/karabiner/) and [Seil](https://pqrs.org/osx/karabiner/seil.html.en)

* Time Machine is your friend.

* Grab [iTerm2](http://iterm2.com). Apple's terminal is nice, but iTerm2 has so much more. If you use tmux, iTerm2 has support for that, too.

* Install [Homebrew](http://brew.sh) for package management.

* [TotalSpaces 2](http://totalspaces.binaryage.com) gives you even more control over how your spaces are arranged, animations between them, and keystrokes for accessing them. Can't live without it anymore.

* Window management sucks. I use [Moom](http://manytricks.com/moom/)

* I've given up on Apple's Mail.app. I use Gmail, and [AirMail 2](http://airmailapp.com) does the trick for me.

* Use virtual machines where appropriate (VirtualBox, VMWare, Parallels, ...)

* Install your preferred shell if Bash isn't your cup of tea. I use [Fish](http://fishshell.com)

* [F.lux](https://justgetflux.com) is your eye's best friend.

* [Bartender](http://www.macbartender.com) keeps all those pesky menu items under control

* If you want to really customize your gestures and the like, [BetterTouchTool](http://www.bettertouchtool.net) can be useful. For awhile I had my "Windows+E" muscle memory tied to launching a new Finder window until I got over it.

Good luck! Give it about a week or so (if that), and you should be comfortable in your new environment.