Better HN
topnewbestaskshowjobs
Log inSign up

crazypython

4,542 karma · joined Jul 18, 2019 (7y ago) · 1,228 submissions

Submissions

1051.

What Is Free Software?(gnu.org ↗)

1 points · by crazypython · 6y ago · discuss

1052.

China Bans Free Text Editor Notepad++ – PCMag(pcmag.com ↗)

13 points · by crazypython · 6y ago · 3 comments

comment 6y ago · link · parent

People think the screen is the computer.

People think Google is the web.

People think the search engine is the browser.

comment 6y ago · link · parent

One of my favorite macOS/iOS features is URLs. Most good native apps-- Things, Drafts, DEVONThink, etc.-- support URLs. URLs such as `things://` and `drafts://`. Some accept POST as well as GET.

There's even a specification of an iOS/macOS protocol very reminiscent of webhooks. http://x-callback-url.com/

comment 6y ago · link · parent

Most people don't have more than one phone. Phones are used for more than gaming. If a developer doesn't like Apple's terms, they can't distribute on iOS, except through a web app.

Perhaps PWA+WebGPU will solve this.

comment 6y ago · link · parent

As a non-retina display user, LibreOffice works fine, and it is multiple gigabytes smaller than even a single Microsoft Office application.

What are you using word processing for? Of all the todo list apps I've tried or bought, Emacs' org-mode is my favorite.

comment 6y ago · link · parent

Did you use `__slots__` to store data pointers on the object itself, instead of in Python's hash table (today, a Hash Array Mapped Trie)?

comment 6y ago · link · parent

Discord works well in practice for creating groups and channels. By default, regular users cannot create channels. Like Slack, it has very fast search, with no message limit. File and image upload work wonderfully and the audio/video works every time.

For small-scale groups, Group DMs are fine, though, I would warn to try to use Group DMs only for when more than two participants should get an urgent ping on a message. (Users can "mute" group DMs so they don't get notified by them.)

1059.

Ask HN: What college scholarships for Software Engineering?

1 points · by crazypython · 6y ago · discuss

comment 6y ago · link · parent

> And that model is backed up by market share which is going down continuously

Firefox bugs that I have personally encountered as a user or developer I want fixed:

- localStorage implementation easily breaks during power failure https://bugzilla.mozilla.org/show_bug.cgi?id=1341070

- SVG rotation glitches

- Fails to correctly render the "Exo 2" font inside an SVG (Granted, for this one, it just made me switch fonts for my application.)

- Spidermonkey, as a JavaScript engine, is slow and the documentation (Perhaps it could be replaced with GraalJavaScript? An engine that lacks basic escape analysis is bad in my book.)

- Various bugs I am assisting them in resolving.

comment 6y ago · link · parent

Dlang let's you write GC code at first-- let's you allocate a string however you want-- and later convert that into @nogc code, or into GC code with manual deletions. The generational garbage collector will help with deleting strings. Best of both worlds-- fast prototyping, with the ability to drop down for faster code.

Furthermore, like interpreted languages, Dlang compiles very fast because the language implementers believe fast compilation is a core goal.

comment 6y ago · link · parent

Dlang has three implementations, one front-end, and a specification you can learn in a day. https://dlang.org/spec/statement.html

comment 6y ago · link · parent

Full-stack Dlang framework https://github.com/huntlabs/hunt-framework

comment 6y ago · link · parent

No, it's this. https://en.wikipedia.org/wiki/Cerebellum

Or, it's System 1, the fast system. While your System 1 might make bias mistakes, I believe it can be trained not to make them.

1065.

Daily Dlang Compiler Downloads(forum.dlang.org ↗)

1 points · by crazypython · 6y ago · discuss

comment 6y ago · link · parent

I'm worried making it public will encourage companies to "SEO"ify HN.

comment 6y ago · link · parent

A web app that only works in non-Chromium browsers isn't useless.

comment 6y ago · link · parent

Link to the transcript https://docs.google.com/document/d/14_onWLdG1UnUKjndLdJnwNJL...

comment 6y ago · link · parent

Joining an iterable of strings into a single string. Python does:

  seperator.join(iterable)
  "".join(["foo", "bar", "hello"]) # => "foobarhello"
  ", ".join(["Hacker News", "Twitter"]) # => "Hacker News, Twitter
Many people have complained about this strange syntax:

https://mail.python.org/archives/list/python-ideas@python.or... https://mail.python.org/archives/list/python-ideas@python.or... https://mail.python.org/archives/list/python-ideas@python.or... https://mail.python.org/archives/list/python-ideas@python.or...

`["a", "b", "c"].join(iterable)` was rejected because it forces every iterable to implement iterable functions.

Additionally some iterables, like generators, are mutated when you iterate over them:

  ", ".join(streaming_api.fetch_names())
UFCS let's you write join as a free function and still use "".join(iterable)

NaN guarding:

  import std.traits;
  auto unwrap(T)(T input) if (isFloatingPoint!T) {
      // Asserts cost nothing when turned off with -check=assert=off
      // The compiler can fully inline this function, so it isn't expensive
      assert(input !== input.nan);
      return input;
  }
Use like this:

  if (objSize.unwrap < cellSize) {
     // Allocate a new cell for the object
  } else {
     // Insert into current cell
  }
The parentheses are omitted because Dlang has https://dlang.org/spec/function.html#optional-parenthesis. The above compiles into this:

  if (objSize.unwrap() < cellSize) {
     // Allocate a new cell for the object
  } else {
     // Insert into current cell
  }

1070.

DConf Online 2020(dlang.org ↗)

1 points · by crazypython · 6y ago · discuss

comment 6y ago · link · parent

You can use D with GC but manually deallocate memory. This let's one use the GC as a backup.

1072.

Duck Typing in Dlang, a native, GC-optional language(code.dlang.org ↗)

1 points · by crazypython · 6y ago · discuss

1073.

D 2.091.0(dlang.org ↗)

1 points · by crazypython · 6y ago · discuss

comment 6y ago · link · parent

Rust has no specification.

comment 6y ago · link · parent

- DMD compiles D without templates 10.57 times faster than C, thanks to DMD's backend.

- DMD compiles D with templates 1.93 times faster than C++.

1076.

Comparing the compilation speed of C, C++, D, Rust, and Go(github.com ↗)

1 points · by crazypython · 6y ago · 1 comment

comment 6y ago · link · parent

See D 2.092.0 for D's preview support for Ownership and Borrowing. https://dlang.org/changelog/2.092.0.html

1078.

D 2.093.0(dlang.org ↗)

157 points · by crazypython · 6y ago · 43 comments

comment 6y ago · link · parent

For DMD's backend, that is true. It's like Rust's MIR project, but finished.

However, the commits I linked to describe front-end optimizations. LLVM-based D Compiler and GCC share DMD's front-end.

I've seen some generated code optimizations for DMD's back-end as well, which could get one lightning fast compiles for decent code. (Maybe in the future one could write a JIT that first compiles with DMD then tiers up to LLVM D Compiler or GCC.)

1
353637
41