Better HN
topnewbestaskshowjobs
Log inSign up

TJSomething

812 karma · joined Oct 10, 2013 (13y ago) · 304 submissions

Submissions

comment 3y ago · link · parent

Scopalamine is amazing. Being on the ocean is otherwise a debilitating ordeal for me. Worked really well on cruises I've been on.

comment 3y ago · link · parent

I mean, it doesn't take much for a class of errors that has existed for 55 years to cause a billion dollars in damage. Just in US labor costs, that's less than 5 hours per developer year. And I probably spend about 10 hours a year on average dealing with NPEs.

comment 3y ago · link · parent

This doesn't use WASM or a browser at all. This is an new, original x86-64 machine code interpreter with a JIT compiler that supports x86-64 and aarch64. This is an extension of Justine's APE project to use x86-64 ELF as the core of write-once-run-anywhere software.

comment 3y ago · link · parent

One of the important parts of ChatGPT over plain GPT-3 is the reinforcement learning from human feedback to ensure alignment, without which it's not quite as good of a product for the public.

comment 3y ago · link · parent

I can't tell, since I don't have a Mac, but looking at the code, it implements a note from the Safari documentation for canvas [0]. I assume that if you don't do this, it either is very small or very pixelated.

[0] https://developer.apple.com/library/archive/documentation/Au...

comment 3y ago · link · parent

You can do something similar in F#. This creates a cross-platform desktop GUI.

    #!/usr/bin/env -S dotnet fsi

    #r "nuget: Avalonia, 11.0.0-preview4"
    #r "nuget: Avalonia.Desktop, 11.0.0-preview4"
    #r "nuget: Avalonia.Themes.Fluent, 11.0.0-preview4"
    #r "nuget: JaggerJo.Avalonia.FuncUI, 0.6.0-preview4"

    open Avalonia
    open Avalonia.Controls
    open Avalonia.Controls.ApplicationLifetimes
    open Avalonia.FuncUI
    open Avalonia.FuncUI.DSL
    open Avalonia.FuncUI.Hosts
    open Avalonia.Layout
    open Avalonia.Themes.Fluent
    open System

    module Main =
        let view =
            Component(fun ctx ->
                DockPanel.create
                    [ DockPanel.children
                          [ TextBlock.create
                                [ TextBlock.fontSize 48.0
                                  TextBlock.verticalAlignment VerticalAlignment.Center
                                  TextBlock.horizontalAlignment HorizontalAlignment.Center
                                  TextBlock.text "Hello world!" ] ] ])

    type MainWindow() =
        inherit HostWindow()

        do
            base.Title <- "Hello World!"
            base.Height <- 400.0
            base.Width <- 400.0
            base.Content <- Main.view

    type App() =
        inherit Application()

        override this.Initialize() =
            this.Styles.Add(FluentTheme(baseUri = null, Mode = FluentThemeMode.Dark))

        override this.OnFrameworkInitializationCompleted() =
            match this.ApplicationLifetime with
            | :? IClassicDesktopStyleApplicationLifetime as desktopLifetime ->
                let mainWindow = MainWindow()
                desktopLifetime.MainWindow <- mainWindow
            | _ -> ()

    AppBuilder
        .Configure<App>()
        .UsePlatformDetect()
        .UseSkia()
        .StartWithClassicDesktopLifetime(Environment.GetCommandLineArgs())

comment 3y ago · link · parent

Because VSCode relies on garbage collection, but WASM doesn't support garbage collection yet. Vim is written in C and manages its memory manually.

comment 3y ago · link · parent

Perl's original "use strict" was added in 1994 with Perl 5, to allow backward compatibility with Perl 4 scripts.

comment 3y ago · link · parent

C++ can do it with variadic template overloading.

https://stackoverflow.com/questions/35959979/functional-comp...

comment 3y ago · link · parent

Currently, RPis are quite difficult to obtain and have been since 2020. I was just looking at a project design that required 2 RPi Zero 2 Ws and I'm currently considering alternatives. Unfortunately, the software stack is Java, so I don't think this will work.

comment 4y ago · link · parent

It's about 10,000 deaths per year per CO2e PPM from 2080 to 2100, mostly based on this paper:

https://www.nature.com/articles/s41598-021-99156-5

comment 4y ago · link · parent

Boxcryptor was originally just a wrapper around Encfs and a Dropbox API client and probably hasn't significantly changed how they worked since they made it a fancy service. I assume that they rebuilt something like Encfs, but closed source.

comment 4y ago · link · parent

I'm not an accountant, but for the US in 2021, that was Form 1040, Schedule 1: Additional Income and Adjustments to Income, Part 1: Additional Income, line 8: Other income, sub-line i: Activity not engaged in for profit income. You would just put $40 on that sub-line and add it to your adjusted gross income. If you made only $40 on it, I don't it can reasonably be called self-employment income, per Publication 535.

[0] https://www.irs.gov/instructions/i1040gi#en_US_2021_publink1...

[1] https://www.irs.gov/pub/irs-pdf/p535.pdf

comment 4y ago · link · parent

It seems kind of weird to me that you could exist as part of an intentionally engineered, computer simulation that could be patched and restarted, while also having past lives in the Buddhist sense.

I mean, I guess if you figured out where qualia and continuity of consciousness came from, you could engineer past lives for ethical purposes, so you aren't really killing people if you have to restart the simulation.

Alternately, if conscious observers are actually privileged over unconscious observers is some medium independent way (read: souls exist and spontaneously come into existence anywhere consciousness happens), that would just be an engineering limitation a universe developer would have to deal with.

comment 4y ago · link · parent

It's Ruby on Rails, which is the second slowest web framework I would consider reasonable for production use (after Django).

comment 4y ago · link · parent

I'm not an expert, but if it's a chip that just synthesizes DNA from a sequence of base pairs, isn't what you're asking similar to making a computer that can't be used to perform evil? I suspect that computing if a given sequence is usable in a pathogen is equivalent to the halting problem. And practically, it seems that a lot of computational resources are required to figure out what a protein does, even for common cases.

comment 4y ago · link · parent

I like keeping the offset and the zone name. Then, if there's a discrepancy, I can ask the user what to do about affected events.

comment 4y ago · link · parent

The specific thing that is illegal is "incitement to imminent lawless action", which is distinguished from advocacy for violent principles.

comment 4y ago · link · parent

Looking at the MIT directory, he's a research scientist and isn't teaching anything this trimester, but has previously taught a few courses on deep learning. He has 78 papers published. He has an office in the Ray and Maria Stata Center at MIT.

comment 4y ago · link · parent

The only comparable thing to an open source programming language on that list is AngularJS, and I wouldn't say that was killed but superceded by Angular 2 (which is also a lot better).

comment 4y ago · link · parent

I think a more apt example is Oracle, which is used in a lot of their branding.

comment 4y ago · link · parent

The thing that was said to be impossible was writing a fast FizzBuzz. Assuming that your reference is C, it kind of is.

comment 4y ago · link · parent

> Losing weight isn't causal to being healthy.

Except that's not how it works. An excess of fat can directly cause problems.

Above a certain point, having too much fat causes chronic hypoxia in fatty tissue, leading to chronic inflammation, which can eventually lead to systemic problems like insulin resistance, cardiovascular disease, kidney failure, liver disease, and cancer.

Edit: I am specifically referring to abdominal fat in excess of what a given body is able to cope with.

comment 4y ago · link · parent

My read is that it's equally likely that it's an inexperienced retail investor who got spooked by the state of the global economy.

comment 4y ago · link · parent

Yup. Not too hard. This outputs the current bandwidth in gigabytes when you pass your app name.

  #!/usr/bin/env bash

  set -euo pipefail

  QUERY=$(cat <<EOF
  {
      "variables":{
          "app":"$1",
          "start":"$(date +%Y-%m)",
          "end":"$(date -d "$(date +%Y%m01) +1 month -1 day" +%Y-%m-%d)"
      },
      "query":"query (\$app: String!, \$start: ISO8601DateTime!, \$end: ISO8601DateTime!) { app(name: \$app) { organization { billables(startDate: \$start, endDate: \$end) { edges { node { app { id } category quantity } } } } } } "
  }
  EOF
  )

  curl https://api.fly.io/graphql \
      -H "Authorization: Bearer $(fly auth token)" \
      -H 'content-type: application/json' \
      --compressed \
      -X POST \
      --data-raw "$QUERY" \
      --silent |
      jq '[.data.app.organization.billables.edges[].node | select(.app.id == "'"$1"'" and .category == "data_out") | .quantity] | add'

comment 4y ago · link · parent

My dude. I have worked with quite a few really smart engineers whose grasp on the English language was imperfect, though quite capable of communicating most points well enough. I would prefer it if I could take a little less time in my code reviews on copy editing, doing things like fixing plurality disagreements and false cognates.

comment 5y ago · link · parent

The best reason I've seen for tabs is this one [0], where there were two people working on the same code base with different visual impairments, where one person needed 1 space tabs with a very large font and the other had to use 8 space tabs with a very wide monitor. You can't get that functionality if you assume any tab width.

[0] https://www.reddit.com/r/javascript/comments/c8drjo/nobody_t...

comment 5y ago · link · parent

As TIOBE uses averaged, relative search engine hits for "[programming language name] programming" as its source, it's a significantly lagging indicator, since it counts all pages on the internet equally, regardless of their age. I'm also unsure of the precision of the search "C programming". I suspect that it's catching "C++" in some search engines.

Stack Overflow's annual survey puts JavaScript, SQL, and Python at the top, with C at 12th [0]. RedMonk's Top 20 puts JavaScript, Python, and Java at the top, with C in 10th [1]. ITJobsWatch puts JavaScript, SQL, and C# at top, with C at 9th [2]. Dice puts SQL, Java, and Python as its top 3, with C not even ranking in their top 12 [3]. All of those put JavaScript, Java, and Python in the top 5.

[0] https://insights.stackoverflow.com/survey/2021#most-popular-...

[1] https://redmonk.com/kfitzpatrick/2021/03/02/redmonk-top-20-l...

[2] https://www.itjobswatch.co.uk/default.aspx?ql=&ll=&id=900&p=...

[3] https://insights.dice.com/2021/01/05/top-12-programming-lang...

comment 5y ago · link · parent

You could have a JSON value interface with methods like getType and getAsString, which would remove the overhead and type safety issues of reflection.

comment 5y ago · link · parent

You could use a perceptual hash, which would work as long as you had the entire image in any format.
1
567
11