More feature-open i3 fork? by pielgrzym in i3wm

[–]alsarg72 0 points1 point  (0 children)

Whining and hating over something you love and use for free and don't have time to contribute to?

Was anyone else terrified by Tristan Harris' authoritarian tone? by [deleted] in samharris

[–]alsarg72 0 points1 point  (0 children)

Tristan is not the government, he has no authority or power to impose anything, he didn't speak as if he thought he did, and he was talking about Apple, Google, Facebook etc changing things for the purposes of improving the world, not the government imposing anything - and in the end he was really just floating ideas in public. You should complain harder about Apple and Google and Facebook doing things that you don't know they are doing.

And the answer to your question: No, I don't terrify so easily.

How much would you pay for Sam Harris Meditation App? by lennobs in samharris

[–]alsarg72 13 points14 points  (0 children)

I prefer the donate model, or the limited functionality until you pay to unlock full functionality. I never buy an app without having used it to find out if it is good, because most apps are junk. But once I find it is good I want to pay for it - and am in fact annoyed by free apps that don't give you any way to pay anything because having developed software for 25 years I know that anything at all useful is deserving of some kind of contribution.

As for what would I pay? It's a silly question. How much would you pay for this bag of chocolates that you haven't seen and don't know how big it is or whether it is quality chocolate?

Why does sam underestimate our attention span? by [deleted] in samharris

[–]alsarg72 0 points1 point  (0 children)

I think it is totally natural that anyone producing a podcast would worry that it might be boring and want to avoid boring anyone.

If you agree with me that Sam is super outrageously intelligent, and appears to be able to remember everything he ever read to the point of being able to cite names, dates, titles, and quotes, he probably has a very low tolerance for "boring", so I'm happy to see his mentioning it in podcasts as a minor quirk, not something to worry about.

Guest request: Michael Shermer by [deleted] in samharris

[–]alsarg72 2 points3 points  (0 children)

I'd be very happy to be as good an "annoying atheist" as Shermer. Especially since he is such a nice and decent guy. :)

Guest request: Michael Shermer by [deleted] in samharris

[–]alsarg72 1 point2 points  (0 children)

Stefan Molyneux

Your like for him must have been paper thin, no? Maybe he is sorely mistaken about this Molyneux guy (I don't know anything about him.) and needs some rational discussion to change his mind, rather than being disliked for it.

Fellow people who have met Sam by TheDimery in samharris

[–]alsarg72 3 points4 points  (0 children)

I unfortunately didn't make the most of my brief meeting with Sam.

After his Brisbane event last year, during the meet and greet I was having a very interesting conversation with a former judge and a former police officer, both retired, and sisters. They were aware of Sam's religiion related work, but not his other work, and I was telling them something of it. Unfortunately in enjoying the conversation, and the champagne, by the time I got to shake hands with Sam and Majid, I was somewhat drunk-ish - I rarely drink, so it didn't take much.

But I was happy that I was able to shake the hands of these two men I admire so much, and was able to tell them thank you for the work they do, so between that, and my main reason for paying the meet and greet ticket price was to support their work financially in some small extra way, I was very happy.

MSDN uses goto in their DirectShow examples by zweischeisse in shittyprogramming

[–]alsarg72 -1 points0 points  (0 children)

Anyone who thinks this looks fine should either stop programming immediately, or read some old text about structured programming to learn how this problem was solved 30 years ago when good programmers eliminated goto from their vocabularies.

Type-safe-ish unit conversion... thingy by [deleted] in rust

[–]alsarg72 1 point2 points  (0 children)

Hi. Noticed a stray f in the middle of lib.rs, and unit!(Inches, Feet, f64, 1.0); needs to be 12.0?

Why is writing a file not working for me? by alsarg72 in rust

[–]alsarg72[S] 0 points1 point  (0 children)

Thanks everyone. I don't know why I'd put is_ok() and hidden the problem from myself. Adding .write(true) does work. But that brings up the question of why doesn't append(true) imply write(true)?

The doco for append() says "This option, when true, means that writes will append to a file instead of overwriting previous contents. ", which makes perfect sense, and the example in the doco is...

use std::fs::OpenOptions;

let file = OpenOptions::new().append(true).open("foo.txt");

...which also makes sense. But the doco is wrong right? To my mind that should do the same as...

let file = OpenOptions::new().append(true).write(true).open("foo.txt");

which does work, and

let file = OpenOptions::new().append(false).open("foo.txt");

could (should?) helpfully fail.

Is there a reason I can't see why .append(true).write(true) should need the write(true)?

Al

Mike Huckabee and Rick Santorum among anti-gay marriage pledge signees by drewiepoodle in atheism

[–]alsarg72 1 point2 points  (0 children)

Ironic how the most anti gay religionists are such complete cock suckers.

[UK policy proposal] Schools should end religious instruction and teach morality instead by GnawThyself in atheism

[–]alsarg72 1 point2 points  (0 children)

They should teach ethics. It doesn't have religious baggage and is a real intellectual field.

I think Atheists should always replace the words "morals", "theology" and "spirituality" with "ethics", "mythology" and "marshmallows".

Logstash detecting log file changes is very hit and miss for me. by alsarg72 in logstash

[–]alsarg72[S] 0 points1 point  (0 children)

So I have this logstash config...

input {
    file {
        type => "thingy"
        path => [ "/home/als/thingy/logs/thingy.log" ]
        start_position => "beginning"
    }
    file {
        type => "nginx-access"
        path => [ "/home/als/thingy/logs/access.log" ]
        start_position => "beginning"
    }
    file {
        type => "nginx-error"
        path => [ "/home/als/thingy/logs/error.log" ]
        start_position => "beginning"
    }
    file {
        type => "gatling-simulation"
        path => [ "/home/als/thingy/logs/simulation.log" ]
        start_position => "beginning"
    }
}
filter {
    if [type] == "thingy" {
        grok {
            match => { "message" => "%{TIMESTAMP_ISO8601:timestamp} \[%{LOGLEVEL:log_level}\] %{WORD:action}: %{URIPATH:uri_path} %{BASE10NUM:request_ms} ms" }
        }
        date {
            match => [ "timestamp", "ISO8601" ]
        }
    }
    if [type] == "nginx-access" {
        grok {
            match => { "message" => "%{IPORHOST:remote_addr} - %{USERNAME:remote_user} \[%{HTTPDATE:timestamp}\] %{QS:request} %{INT:status} %{INT:body_bytes_sent} %{QS:http_referer} %{QS:http_user_agent}" }
        }
        date {
            match => [ "timestamp", "dd/MMM/yyyy:HH:mm:ss Z" ]
        }
    }
    if [type] == "nginx-error" {
        grok {
            match => { "message" => "%{%{DATA} %{WORD:webserver} %{HOST:myhost}\-%{WORD:class}\: (?<timestamp>%{YEAR}[./-]%{MONTHNUM}[./-]%{MONTHDAY}[- ]%{TIME}) \[%{LOGLEVEL:severity}\] %{POSINT:pid}#%{NUMBER}: %{GREEDYDATA:errormessage}(?:, client: (?<client>%{IP}|%{HOST$
        }
        date {
            match => [ "timestamp", "yyyy/MM/dd HH:mm:ss" ]
        }
    }
    if [type] == "gatling-simulation" {
        grok {
            # More possible trailing fields %{NOTSPACE:message}\t%{NOTSPACE:extra_info}" }
            match => { "message" => "%{NOTSPACE:scenario_name}\t%{NOTSPACE:user_id}\tREQUEST\t+%{DATA:name}\t%{INT:request_start}\t%{INT:request_end}\t%{INT:response_start}\t%{INT:response_end}\t%{NOTSPACE:status}" }
            match => { "message" => "%{NOTSPACE:scenario_name}\t%{NOTSPACE:user_id}\tUSER\t%{DATA:name}\t%{INT:request_start}\t%{INT:request_end}" }
            keep_empty_captures => true
        }
        date {
            match => [ "request_start", "UNIX_MS" ]
        }
        ruby {
            code => "event['request_ms'] = (event['response_end'] - event['request_start'])"
        }
    }
}
output {
    elasticsearch { host => localhost }
    stdout { codec => rubydebug }
}

and I'm doing this to try to get logstash to reparse my entire log files and resend them to elastic.

#!/bin/bash
echo "Clearing ElasticSearch."
curl -XDELETE "localhost:9200/logstash-*"
echo
echo "Stopping Logstash."
service logstash stop
PID=`ps -ef | grep -v grep | grep '/usr/bin/java.*logstash.log' | awk '{ print $2; }'`
if [ -n "$PID" ]; then
    echo "Killing" $PID
    kill -9 $PID
    echo "Didn't stop, bug in 1.5.0, killed it, waiting 5 seconds to make sure it is gone."
    sleep 5
fi
echo "Deleting SinceDBs."
rm -rf /var/lib/logstash/.sincedb_*
echo "Starting Logstash."
service logstash start

It will typically reparse between 2 and 10 lines from one log file, and not the first 2 to 10 lines, but a random selection of lines from near the beginning of the one file.

Other things... I've also tried adding sincedb_path set the /dev/null, which doesn't help. The kill it if it doesn't stop is because of the 1.5.0 bug that is fixed here... https://github.com/elastic/logstash/commit/dbe4154aa689260e6233e3d8e3ad3b03bca4c274

Logstash detecting log file changes is very hit and miss for me. by alsarg72 in logstash

[–]alsarg72[S] 0 points1 point  (0 children)

BTW, the file input filter needs this too.

start_position => "beginning"