News for hackers. Stuff that matters.

dzsekijo

Re:What Is Vim? on Sunday December 15, 2024 @08:23AM (#42423267)
I've set up myself once to learn Helix. First there was Kakoune that sounded exciting with its new modal model, but what had me wanting to really give Helix a go, beyond being exciting, was that it advertised itself "batteries included". It promised to deliver all the cool things programmers' editors do recently.

But then I stopped abruptly when realized Helix misses a key feature of Vim: swap files. I can just start editing and have not have to worry about losing my work, may whichever of computer panic, computer running off charge, environment (desktop env or tmux) crash, etc. occur.

So edit semantics is cool, but fundamentals like recovery should be got right before being a serious contender.

(I did a quick search to see if there is any news on this front, but what I found is all about "recovery hooks for panic", which is far more less than what's needed - it's about an emergency saving of the work if something goes awry with the editor. I need to be protected from loss if something goes awry with the environment too...)

Re:The PayPal Mafia is taking over America's government on Wednesday December 11, 2024 @02:10PM (#42391521)
I don't fully get the story. Was it Calanacis who ditched the Econ reporter? He is the one among the All-iners who voted Harris. See https://audioboom.com/posts/8589911-bonus-episode-with-jason...
Re:JSON5 – JSON for Humans on Sunday December 08, 2024 @07:27PM (#42361993)
Yeah. But I think the goal was here to sugar the syntax while keeping semantics intact.
Re:File over App: A Philosophy for Digital Longevity on Monday November 18, 2024 @07:07AM (#42171696)
In my previous workplace I used to use Workflowy to keep my to-do list in. I had a script that generated OPML from data pulled from Bugzilla / GH Issues / Jira, which then I could paste into Workflowy and from that on, update it interactively in their web UI. The Workflowy data was daily synced to Dropbox (as OPML) which in turn was synced to my local machine, so I had all the data at hand in usable format even offline.

(OK, OPML is not utterly human friendly as such; actually when I needed to access it locally, I parsed it and used it in an interactive programming environment.)

This was a nice hybrid workflow.

Re:Class methods are Ruby's useEffect on Friday October 18, 2024 @04:37PM (#41883258)
The post says "Most of our Ruby code reads like English, but that’s not the case when we combine multiple DateTimeFns class methods", and to illustrate this, gives the following agreeably ugly example:

  DateTimeFns.add_minutes(DateTimeFns.add_hours(DateTime.current, 1), 1)
Sure thing, but the syntax can be improved without restorting to refactor into instance methods:

  DateTime.current.then {
   DateTimeFns.add_hours(_1, 1)
  }.then {
    DateTimeFns.add_minutes(_1, 1)
  }
However, these days AI assisted tools can be involved in the task.
Re:Rocky strikes back at Red Hat on Saturday July 01, 2023 @04:49AM (#36548137)
That's true but you must give the source to your customer and they should be free to redistribute.
Re:Rocky strikes back at Red Hat on Saturday July 01, 2023 @04:45AM (#36548118)
Well, but then Red Hat's T&C may be a violation of GPL.

Red Hat bases its model on dwelling in the grey zone.

So if Rocky aspires to be a Red Hat clone... they can adopt this bit, too :)

Re:Red Hat cutting back RHEL source availability on Wednesday June 21, 2023 @02:54PM (#36422743)
What stops then someone to buy a RHEL subscription for the purposes of setting up an unofficial RHEL source mirror?
Re:Update from Lemmy after the Reddit blackout on Tuesday June 20, 2023 @06:03AM (#36401851)
'i.reddit' is still available by appending '.i' to the url
Re:I wish JSON5 was more popular on Saturday June 17, 2023 @06:47AM (#36369006)
I don't see why to stick to being a JavaScript subset. Yes, in the olden days it was practical with JSON that there is no need to write a dedicated parser, just pass the data to eval(). Nowadays you should not pass anything to eval, apart from metaprogramming purposes (in which case the input is fully in control of the code).
Re:I wish JSON5 was more popular on Saturday June 17, 2023 @06:46AM (#36369000)
What I miss from JSON5 is a dedicated date/time type (TOML eg. does have it!). I understand that this would be a step beyond mere syntax sugaring, but I'd still prefer this trade off.
The Show HN you want: https://news.ycombinator.com/item?id=35654401

Update: Ah, sorry, "iOS", "Firefox", I missed that. I leave it here still, to honor the pain it took me to dig it up.

Show HN: Chatbladder, a Ruby wrapper for Chatblade

https://github.com/csabahenk/chatbladder

Why?Looking for a viable solution for interactive interaction with ChatGPT from terminal.Why wrap?There are two kind of interaction models I saw in ChatGPT command line clients:- REPL. However, a REPL is painful without mature line editing capabilities, and these programs have not progressed as far as to have this under their belt. - Direct command line invocation. Popular shells do have...

( Read More... | no comments | on HN )
Re:OpenAI has temporarily stopped selling the Plus plan on Tuesday April 04, 2023 @06:52AM (#35437650)
Best gimmick ever. This did work out on me to get me subscribed ;)
Re:macOS Subsystem for Linux on Monday September 19, 2022 @06:22AM (#32896442)
I use Xhyve to spawn a Linux VM on Mac. For what I need it works well, so I haven't looked for alternatives. How that compares to Qemu?
Re:Firefox is losing users fast on Thursday July 28, 2022 @03:42AM (#32261498)
Thanks for the Kiwi hint! Exploring it now.
Re:Firefox is losing users fast on Thursday July 28, 2022 @03:41AM (#32261490)
It's anecdotical, but I did use to have the common nitpicks with Firefox, the slight but annoying incompatibility with that what where the net is evolving these days, and weird performance chokes.

Then in the last few months... I noticed I do not notice these anymore. Using Firefox is pleasant and decent both on desktop and mobile now. They got their shit together, or my browsing habits have changed? Dunno... needs more time to decide.

Anyways, the deal maker for me is that still Firefox is the only browser that allows to export data from it in a tolerable manner. Sync data is accessible via the "About Sync" extension, and the ability to share multiple tabs on Android is golden. (As of Brave: Brave sync is great, but a third-party client or extension to explore its data does not yet exist [at least, it's hard to search for it, because "Brave sync extension" will bring up ways to sync your extensions in Brave, not extensions that interact with Brave sync].)

Re:Why Ruby Is More Readable Than Python on Friday July 22, 2022 @06:20AM (#32190425)
What I enjoy about Ruby over Python the most is not intricacies of the OO implementation or delicacies of metaprogramming, but a good support for functional style. In ruby, statements are expression-like, they have a return value. Also, with Ruby it's easy to break down code to consecutive pure blocks.

Condiser the following task: take /proc/kallsyms in Linux, that lists symbols in kernel, in an '<address> <type> <name>' format, like:

  0000000000000000 A fixed_percpu_data
  0000000000000000 A __per_cpu_start
  0000000000001000 A cpu_debug_store
  0000000000002000 A irq_stack_backing_store
  0000000000006000 A cpu_tss_rw
  000000000000b000 A gdt_page
  ...
let's make stats on it -- how much of each type is present? Wanna get the result ordered by number of occurrence.

In Ruby:

  # ruby -rset -e '$<.readlines.to_set.classify { |l| l.split[1] }.transform_values(&:size).sort_by { |_,v| v }.to_h.tap { pp _1 }' /proc/kallsyms 
  {"V"=>1,
   "w"=>2,
   "a"=>14,
   "R"=>98,
   "W"=>154,
   "A"=>328,
   "B"=>655,
   "D"=>2910,
   "b"=>3097,
   "T"=>22289,
   "d"=>34424,
   "r"=>49904,
   "t"=>55346}
Of this method call chain, first and last are impure (as they do I/O), the intermediate ones are pure.

In Python you'll have to grind through it procedurally. (Unless you use reach out to some advanced libs... https://gist.github.com/richardbann/5b363096de6b3de2e8178cce...)

Re:IBM Is Destroying Red Hat and Red Hatters Are Leaving on Monday March 22, 2021 @10:40AM (#26541462)
I'm also in RH. Our team is on Google Chat for some years now. Ironically, I preferred IRC as I could run my own instance of Weechat continuosly on a server and logged all conversations, so could extract information from history by grep et al. The hist search UI in gchat is much more cumbersome.
Re:Why I still Lisp on Sunday January 31, 2021 @05:36PM (#25983302)
This is a confusing example, because in a REPL steps of compilation and evaluation are interleaved.

Indeed, can you write a program for CLISP that works like this:

- takes one command line argument (a file name)

- reads in the given file, interprets it as Common Lisp code, expecting it to deliver a definition for the add2 macro

- then runs

   (let ((a 1)) (dotimes (i 4) (add2 a)))
Re:Telegram publishes users' locations online on Tuesday January 05, 2021 @06:00AM (#25644229)
Do you know of any unlimited free cloud storage service? I know just one, that's being Telegram.
Re:Building a high performance JSON parser on Sunday June 28, 2020 @06:12AM (#23667804)
Adding this, for sake of completeness (I have no experience with it, just yet another Go JSON project aiming at high performance).

https://github.com/minio/simdjson-go

Re:Why is there a “V” in SIGSEGV Segmentation Fault? on Thursday June 18, 2020 @04:08PM (#23567372)
I checked Hungarian, it's simply "core készült" ("core has been made"). I guess they did not want to go too far with translating "core" as possible faithful translations would collate with expressions for ejaculation...
Re:Why is there a “V” in SIGSEGV Segmentation Fault? on Thursday June 18, 2020 @09:33AM (#23562930)
Well some aspects are still not clear. If this thing was originally called "segmentation violation", who, when switched to calling it "segmentation fault"? Why we don't get

    Segmentation violation (core dumped)
when this thing fires?

Actually "violation" sounds much clearer to me. It's telling me that the code I'm running does something that was not part of the contract. With "fault"... well, it's someone's fault... probably someone else's fault... who knows what happened... ¯\_(ツ)_/¯

I wouldn't be surprised if it was found out to sound smoother to managerial ears.

Re:Deno Is a Browser for Code on Saturday May 30, 2020 @04:43AM (#23359573)
THere is a subtle but significant difference between the approaches of Deno and Go.

Deno directly use standard URIs to import packages. Go imports syntactically appear as schemeless paths, which boils down to the semantics of importing URIs from an implicit private go:// scheme.

And that catches two fishes at once:

1) the go:// namespace is isomorphic to the https:// namespace, so the default resolution strategy is just to pipe through this isomorphism. This is convenient, makes sense right away and avoids the a priori need of a central registry.

2) Whenever it's needed, the resolution can be instructed to do some custom thing instead of casting to https://.

The exemplar instance of 2) is the usage of sibling packages. They wanted to make it possible to have several packages within a single module, whereby the module serves as a compilation unit. So when an import path is a subpath of the module path, then the package is looked up locally, relative from the root of the current module. There is no way you could get away with such a bending of a https:// URI. But go:// being a private scheme gives the freedom to proceed so.

(The go:// scheme is just my own literary device, but this semantics is explained clearly in simple terms at https://golang.org/doc/code.html.)

Re:Deno Is a Browser for Code on Saturday May 30, 2020 @04:13AM (#23359420)
For example https://deno.land/x/ is effectively nothing but a URL redirect server, where it rewrites URLs to include a git commit-ish reference in the redirected URL. So https://deno.land/x/[email protected]/mod.ts becomes https://raw.githubusercontent.com/oakserver/oak/v4.0.0/mod.t..., which GitHub serves up a nice versioned module.

Thus http://deno.land/x/ is the de facto central registry. I'm yet to see how it makes a difference whether the logic of resolving a package name to a concrete version of the package is baked into command line tooling or a web service.

Re:Weakening Cycles So That Turing Can Halt on Friday May 15, 2020 @05:21AM (#23190334)
> The answer is "yes, there is a decision algorithm"?

Indeed.

> What would that decision algorithm be for this particular function (odd_perfect_number)?

Either of

  () => True
or

  () => False
where '()' represents the empty input.

> And what is its answer?

I'd be a Fields medal candidate if I knew ;)

Older »