Live data from Hacker News

Show HN: A Better Log Service

txtlog.net

61–70 of 109 posts

Re: Show HN: A Better Log Service

#61
post #28

We need glorified (rip)grep instead of ELKS and friends, which have huge learning curve. I welcome this effort.

I'm pretty satisfied with Loki. It just ingests the logs and offers a powerful query language to extract data at query time (e.g. parse JSON, run regexes, plot). It can store data in a local folder or S3-compatible storage. I also gave up on configuring ELK in the past...

VictoriaLogs is similar, but a nice improvement over Loki

Re: Show HN: A Better Log Service

#62

Earlier quoted context omitted.

I rebuilt durable-functions in php. Durable Functions is a C# actor model runtime. My PHP implementation meets or exceeds the same benchmarks as the C# version. > It could be easily proven by doing a bunch of work but obviously there is no point in me proving it. Because you cannot prove it... :) I wrote this post a few years ago, that actually spurned some improvements in C# ... so here you go: https://withinboredom…

No, it's because I've got productive things to do that do benchmarks that have already been done repeatedly. The only way to get PHP to the same speed as compiled languages for web requests is to use experimental tooling. I notice your benchmarks are over 10 runs?! That's not a good sample size. And even more importantly, it's not in the same context. Sure once you compile PHP and have it running it'll run fast. But…

I'm sure you've heard of PHP's opcache by now. That's not experimental and actually caches the interpreted code in memory for faster subsequent execution.

Re: Show HN: A Better Log Service

#63
post #54

Earlier quoted context omitted.

Just because a project is “open source” doesn’t actually mean you must accept or even merge PRs from others. After reading others pointing this out my opinion of managing open source projects have significantly changed. Of course, you can entertain PRs and see if the idea behind them is sound but not accept the raw code from others and implement the features they way you envision instead. Keep in mind it’s always pos…

> This is especially true if you use dependencies, as you don’t keep track of every line of code they add. You absolutely should vendor your dependencies and review them before accepting the new version. Even though they are dependencies, you are ultimately responsible for using them. "They are just dependencies" doesn't absolve you of responsibility.

Great points about dependencies and reviewing PRs. In addition to manual reviews, layering security tools within your CI/CD pipeline is key. Tools like static code analyzers, dependency scanners, and security linters help catch vulnerabilities early. Open source can also be a valuable way to uncover security gaps, but having a secure channel for reporting vulnerabilities is crucial to address them quickly. Leveraging techniques like Content Security Policies (CSPs) adds extra layers of protection, promoting proactive security throughout development and deployment.

Re: Show HN: A Better Log Service

#64
post #62

Earlier quoted context omitted.

No, it's because I've got productive things to do that do benchmarks that have already been done repeatedly. The only way to get PHP to the same speed as compiled languages for web requests is to use experimental tooling. I notice your benchmarks are over 10 runs?! That's not a good sample size. And even more importantly, it's not in the same context. Sure once you compile PHP and have it running it'll run fast. But…

I'm sure you've heard of PHP's opcache by now. That's not experimental and actually caches the interpreted code in memory for faster subsequent execution.

Yes, and in 8.4, uses an actual IR for machine code generation and is pretty cool!

Re: Show HN: A Better Log Service

#65

Some people praised Go as a better language for the use case than PHP. I’d say Elixir is even better. It can handle massive concurrency easy, can be made distributed easy, has a built-in, in-memory, key-value store (ETS), and is probably the best high-level language for anything that’s facing the network.

I've really been interested in learning more about Elixir and how it accomplishes these things, because I constantly hear the same opinions from others. Do you have some good resources you'd recommend for getting started with Elixir for a principal engineer that wants to understand these at-scale issues and how Elixir solves them better than other languages?

Re: Show HN: A Better Log Service

#66

Earlier quoted context omitted.

I rebuilt durable-functions in php. Durable Functions is a C# actor model runtime. My PHP implementation meets or exceeds the same benchmarks as the C# version. > It could be easily proven by doing a bunch of work but obviously there is no point in me proving it. Because you cannot prove it... :) I wrote this post a few years ago, that actually spurned some improvements in C# ... so here you go: https://withinboredom…

No, it's because I've got productive things to do that do benchmarks that have already been done repeatedly. The only way to get PHP to the same speed as compiled languages for web requests is to use experimental tooling. I notice your benchmarks are over 10 runs?! That's not a good sample size. And even more importantly, it's not in the same context. Sure once you compile PHP and have it running it'll run fast. But…

> That's not a good sample size.

Like I said in the blog post, if I tell you the sky is blue and you don't believe me; run them yourself. FWIW, C# is faster now for that particular use case. Also, like I mentioned in a previous blog post ... which one would you rather maintain:

- https://github.com/TheAlgorithms/C-Sharp/blob/master/Algorit... -- merge sort in C# 130 lines

- https://www.w3resource.com/php-exercises/searching-and-sorti... -- merge sort in PHP 60 lines

PHP is often far more concise than C#, and many other languages. I code more in Go than C# or PHP these days, but even Go has its limitations where it would be easier to express in PHP than Go. There are even certain classes of algorithms that are butt-ugly in Go but quite pretty in PHP.

PHP is still my favorite language, even though I hardly get to use it these days.

> PHP has a very specific usage which is web applications.

Originally, yes. But it outgrew that about 10 years or so ago. It's much more general purpose now.[1][2]

[1]: https://nativephp.com/ -- desktop applications in php

[2]: https://static-php.dev/ -- build self-contained, statically compiled clis written in php

Re: Show HN: A Better Log Service

#67
post #62

Earlier quoted context omitted.

No, it's because I've got productive things to do that do benchmarks that have already been done repeatedly. The only way to get PHP to the same speed as compiled languages for web requests is to use experimental tooling. I notice your benchmarks are over 10 runs?! That's not a good sample size. And even more importantly, it's not in the same context. Sure once you compile PHP and have it running it'll run fast. But…

I'm sure you've heard of PHP's opcache by now. That's not experimental and actually caches the interpreted code in memory for faster subsequent execution.

Yes, it makes it faster but does not deal with the core performance issues which is why Roadrunner, Frankenphp, etc exist.

Re: Show HN: A Better Log Service

#68

Earlier quoted context omitted.

No, it's because I've got productive things to do that do benchmarks that have already been done repeatedly. The only way to get PHP to the same speed as compiled languages for web requests is to use experimental tooling. I notice your benchmarks are over 10 runs?! That's not a good sample size. And even more importantly, it's not in the same context. Sure once you compile PHP and have it running it'll run fast. But…

> That's not a good sample size. Like I said in the blog post, if I tell you the sky is blue and you don't believe me; run them yourself. FWIW, C# is faster now for that particular use case. Also, like I mentioned in a previous blog post ... which one would you rather maintain: - https://github.com/TheAlgorithms/C-Sharp/blob/master/Algorit... -- merge sort in C# 130 lines - https://www.w3resource.com/php-exercises/se…

[flagged]

Re: Show HN: A Better Log Service

#69

Earlier quoted context omitted.

> That's not a good sample size. Like I said in the blog post, if I tell you the sky is blue and you don't believe me; run them yourself. FWIW, C# is faster now for that particular use case. Also, like I mentioned in a previous blog post ... which one would you rather maintain: - https://github.com/TheAlgorithms/C-Sharp/blob/master/Algorit... -- merge sort in C# 130 lines - https://www.w3resource.com/php-exercises/se…

[flagged]

> Furthermore, the garbage collector is still designed for web requests.

Don't tell Swift about this...

Re: Show HN: A Better Log Service

#70
post #49
post #48

Earlier quoted context omitted.

The date treatment isn't great, but the repo seems to indicate it's existed as a public thing for 22 days. So perhaps just an early compromise to get it working.

For all the folks championing how awesome PHP is in this thread, one would surely hope it has rfc3339 aware date parsing, no? But I guess that https://www.php.net/manual-lookup.php?pattern=rfc%203339&sco... > and https://www.php.net/manual-lookup.php?pattern=iso8601&scope=... > both being :shruggle: doesn't do it any favors. However, it seems it is just a search stupidity because https://www.php.net/manual/en/datetim…

Given the tone and wording of your comments I hesitated to even reply but, alas, my love for PHP was strong enough to push me through.

You are, actually, doing it wrong.

https://carbon.nesbot.com/docs/

I forgive you, being that you're clearly not familiar with modern PHP and it's incredibly mature and diverse library ecosystem and first class package manager.

> However, it seems it is just a search stupidity ...

You're searching a list of thirty (30) functions. I don't even know how you found that list of functions but, surely, you don't think that's an exhaustive place to search for a specific date format? Surely you're not being purposely obtuse. (As you likely found, if you just plop your search term in the search at the top of the PHP website you would have found the DateTime class and how to handle these various formats)

Anyway - for anyone who may happen across this odd chain of comments, dealing with dates in PHP is an actual breeze using Carbon\Carbon.

Post reply on HN