News for hackers. Stuff that matters.

soveran

Re:Hired: A Modern Take on 'Ed' on Wednesday February 14, 2024 @04:45AM (#39368196)
I use it daily. I run a slightly modified version: I added line editing capabilities with linenoise and I use EREs. The most common use case for me is editing with :g/re, which allows me to see only the matching lines. If I want to keep only those lines, I type :v/re/d, and so on. I also invoke it regularly from my main editor when I find it more efficient for modifying some file or some region.
Re:Solving a Dungeons and Dragons riddle using Prolog on Tuesday January 03, 2023 @08:12AM (#34230891)
For an alternative solution, describe the directed graph by listing the nodes and using whitespace to represent the arcs:

  $ cat riddle
  Vixen Rudolph
  Vixen Prancer
  Vixen Dasher
  Dancer Vixen
  Comet Vixen
  ...
  Vixen Dasher
Then use tsort:

  $ tsort riddle
  Dancer
  Donder
  Comet
  Vixen
  Blitzen
  Dasher
  Rudolph
  Cupid
  Prancer
I've always used MessagEase (both on Android and iPhone). It is a keyboard layout that was originally designed for the Palm Pilot, and it is optimised for typing with one finger. I don't use any sort of autocompletion, yet I'm usually the fastest typist in the room. More info: http://www.exideas.com/ME/index.php
I don't think the paper assumes a many worlds interpretation.
Did you read the paper I linked to?
All the paradoxes disappear if we use Quantum Field Theory instead of Quantum Mechanics. I would really like someone with deep knowledge on Quantum Theory to explain if something is wrong with a theory that otherwise makes a lot of sense to me. A good read on the topic is the paper "There are no particles, there are only fields" — https://arxiv.org/pdf/1204.4616.pdf
Re:Ask HN: How can I get better at bash? on Monday June 26, 2017 @06:07AM (#14635509)
For scripting, I recommend the rc shell from plan9, which is the one I use for my shell scripts. It is only when I want to share a script with other people that I consider using /bin/sh, and even then more often than not I've gone for rc.

I invite you to read about it: http://doc.cat-v.org/plan_9/4th_edition/papers/rc.

I find the control structures simpler and more elegant, and overall its design feels more consistent. For example, consider an if statement in bash:

  if [ condition ]; then
    ...
  else
    ...
  fi
And now in rc:

  if (condition) {
    ...
  } else {
    ...
  }
Or a case statement in bash:

  case $1 in
    "bar")
      ... ;;
    "baz")
      ... ;;
  esac
And expressed in rc:

  switch ($1) {
    case "bar"
      ...
    case "baz"
      ...
  }
In the past, I've used it as my shell too, but now I use it only for scripting. I think you can install it in most platforms.
Re:Ask HN: How can I get better at bash? on Monday June 26, 2017 @05:49AM (#14635423)
In most platforms you can install the rc shell from plan9. It's what I use exclusively for my shell scripts. It is only when I want to share some script with other people that I consider using /bin/sh, and even then I've gone for rc nevertheless. Here you can read about it: http://doc.cat-v.org/plan_9/4th_edition/papers/rc
We started openredis in 2011, and we reached the 1k customers mark a year later. It's a Redis hosting service for EC2, also available as a Heroku add-on. Aside from the fact that the Heroku add-ons program could be considered some sort of marketing, we've never paid a single ad. For us, the key to getting customers was word of mouth. In 2014, at the three year anniversary, I wrote a blog post about how we got started: http://soveran.com/turning-three.html
Re:One Day, a Machine Will Smell Whether You’re Sick on Sunday May 07, 2017 @02:28AM (#14284191)
I love the idea, thanks for the tip!
I just updated the README with a gif of that video. Thanks for the idea!
That's interesting: commands that consume everything in the stack. About saving/loading words: I have plans to work on that, it could be a very useful feature.
I'm not the author of the post, I just wrote the tool. I agree with you that it's not groundbreaking technology :-)

In fact, the code is extremely simple. As I mentioned in the README, I've used dc a lot and what I propose with clac is an improvement (for my taste) regarding the UI, as there's an always-visible representation of the stack that gets updated as you type. I recorded a short video to show it in action: http://files.soveran.com/misc/clac.mov

Re:Show HN: Fake SMTP server as a service on Monday April 03, 2017 @03:49PM (#14026458)
Some years ago I wrote a tool called mailcat, which is a fake SMTP server that prints the incoming emails to stdout. I use it to this day when I need it in development. It's available at https://github.com/soveran/mailcat
Re:Go Proverbs: Simple, Poetic, Pithy on Friday April 01, 2016 @04:14AM (#11403453)
For the original go proverbs, see https://en.wikipedia.org/wiki/Go_proverb.
Re:Why I won't be switching to Disque on Thursday May 14, 2015 @11:38AM (#9545754)
The author of the article declares his incompetence at building and maintaining software projects for which he's not the target user, and thus concludes the same applies to the creator of Redis and Disque. Based on that he instills a lot of FUD around a project that has proven very useful for me so far.

Also, from the article:

The other reason I don't foresee using Disque is alluded to in the author's own comments. He observes that many people are using Redis as a message broker, and decides that maybe there is a need for a "Redis of messaging". I would say the opposite is true, and that instead of another message server, people want to use Redis!

I disagree. I've been using Redis for queues for a very long time, and I'm in the process of migrating all those queues to Disque.

Re:On software popularity on Thursday April 09, 2015 @02:20PM (#9349760)
My experience is the opposite, I agree it may vary from person to person. Care to elaborate what went wrong in those projects?
Re:On software popularity on Thursday April 09, 2015 @11:12AM (#9348081)
The way you put it, it looks like it's a matter of trust rather than understanding. If you don't understand what X does and how, if you don't want to invest the time to analyze it, then you are gambling. The fact that a lot of people use X makes it look like a safe bet, but the point is that even if it turns out to be a safe bet, it's still a gamble. Isn't that cargo cult programming?
Re:On software popularity on Thursday April 09, 2015 @10:10AM (#9347598)
An extended version of the quote would be "Don't just believe that because something is trendy, that it's good. I would go the other extreme where if I find too many people adopting a certain idea I'd probably think it's wrong. Or if my work had become too popular I probably would think I have to change." I took it from this video: https://www.youtube.com/watch?v=75Ju0eM5T2c
Re:Ruby Gem Configuration Patterns on Wednesday March 19, 2014 @01:39PM (#7430383)
It can be simplified even more:

    megalotto = MegaLotto.new
    megalotto.draw(10)
Re:Beyond grep: ack, a code search tool for programmers on Saturday July 20, 2013 @12:17PM (#6075582)
Not quite what you want, but you can restrict the search to filenames matching certain pattern with the -G option. For example, ag <pattern> -G \.c will only search on C files.
Re:Put Callback Logic Into Callback Objects [Rails] on Thursday March 08, 2012 @09:48AM (#3679875)
You may run into race conditions when two processes end up saving an object with the same hash_id. The check and the object creation should both happen inside a transaction.
Re:Hacked: commit to rails master on GitHub on Sunday March 04, 2012 @07:33PM (#3664761)
> I always felt that "it's up to the developer to do the right thing" violates the normal Rails convention over configuration principles, but I also weigh breaking a large % of existing Rails apps in a way that is not easy to quickly fix heavily.

It can be argued that those apps were already broken. Nobody should complain against a security fix.

Re:Logging consulting hours - The Good, The Bad, and the Ugly on Saturday February 11, 2012 @07:28AM (#3579126)
Are you sure the clients want that? I has never happened to me. Besides, it is terrible for the developers.
Re:Renee, the friendly rack-based framework on Saturday October 15, 2011 @11:20AM (#3114943)
The same in Cuba (http://cuba.is):

    Cuba.define do
      on "blog/:id" do |id|
        blog = Blog.get(id)

        on(get) { res.write blog }
        on(put) { blog.update(req.params); res.write :ok }
      end
    end

Older »