News for hackers. Stuff that matters.

ssfak

Re:Migrating from Go to Rust on Monday May 25, 2026 @05:06AM (#48264858)
In Go you can ignore the error value though, and use directly the returned value (`int` in your example). In Rust you cannot do that, you need to unwrap the Result or use the `?`
chartsdb[1][2] can be installed locally (or run through Docker) and import your database schema

[1]: https://chartdb.io/ [2]: https://github.com/chartdb/chartdb

Re:PostgreSQL 17 on Friday September 27, 2024 @05:00AM (#41667888)
Using the pg_duckdb[1] is an option, if you can install extensions on your setup.

[1]. https://github.com/duckdb/pg_duckdb

Re:Maestro: Netflix's Workflow Orchestrator on Tuesday July 23, 2024 @02:34AM (#41043148)
For Python tasks you can check Prefect, among others..
Re:Surprising things about HTTP on Thursday June 09, 2022 @06:40AM (#31679594)
I was expecting something like sending a payload with GET requests is not prohibited by the standard...
Re:The Problem with C (2020) on Tuesday February 01, 2022 @05:07AM (#30160606)
More adequate title would be "C++ problems with C"..
Re:Best Practices for Using Functional Programming in Python on Wednesday December 05, 2018 @10:41AM (#18609208)
Indeed, "Mostly functional" programming does not work: https://queue.acm.org/detail.cfm?id=2611829
The findings are well known, but I find it a bit ironic that the authors provide supplementary material as an Excel file...
Re:Clojure Design Patterns on Friday November 24, 2017 @12:10PM (#15771828)
..and closures
Re:Show HN: WebSocket-first development on Monday February 13, 2017 @03:48PM (#13638622)
I believe in the majority of cases SSE are a better technology than web sockets (e.g. WS do not seem to conform to HTTP/2.0, SSE offer transparent (browser-supported) reconnects, SSE event ids allow for replay, etc). The downside is no support in IE/Edge (you can vote at https://goo.gl/bd8V1K), no binary content (but again usually JSON is enough) and no fully bidirectional communication.

A good talk at the matter can be found at https://youtu.be/NDDp7BiSad4

Re:RethinkDB versus PostgreSQL: my personal experience on Saturday February 11, 2017 @02:10AM (#13621534)
I am a bit puzzled about the scalability of listen/notify in Postgres and its use in the article. Each "listener" in the code requires a connection in the database so it's not a good design to have one listen "query" for each user. You will probably need a dedicated connection in a thread (or a limited number of connections) for the database listening functionality. You can possibly use some async PG driver but still on the database end I am not sure how efficient and scalable this solution will be.

I can assume that this is a good solution if you don't have (need) a high rate of "notify" statements and a high number of subscribers waiting on "listen". Any comments on these limits of PostgreSQL?

Re:Neanderthals were people too on Friday January 13, 2017 @01:54AM (#13388969)
cough sci-hub.cc cough
Re:From Python to Go and Back Again on Saturday October 17, 2015 @05:03AM (#10403829)
Doesn't a TLS terminator proxy solve this? E.g. I usually put my application services behind HTTPS-enabled nginx and it works wonderfully.
Re:PostgreSQL Magic on Friday September 11, 2015 @04:01AM (#10202497)
For windows functions a good tutorial can be found at http://tapoueh.org/blog/2013/08/20-Window-Functions

Postgresql also has good support for SQL-99 : http://www.slideshare.net/MarkusWinand/modern-sql

WITH clauses (CTE) are great, but they are "optimization fences" in Postgresql : http://blog.2ndquadrant.com/postgresql-ctes-are-optimization...

Re:Things I do to be consistently happy on Monday August 20, 2012 @08:08AM (#4407173)
Well, he recommends to stick to a specific schedule (having a walk at 21:30, going to sleep at 22:00, waking up at 06:00, etc) The exact times do not really matter, but sticking to a specific time schedule is problematic IMHO when you have a family because of the non-determinism introduced (especially by the kids).. Unless everyone in your family agrees to follow (and stick to) a similar schedule..
Re:Make HTTP requests from your browser on Monday January 09, 2012 @04:35AM (#3441927)
Somewhat similar but more useful for debugging "HTTP caching" by Mark Nottingham: redbot (http://redbot.org/)
Re:Some People Understand REST and HTTP on Monday August 08, 2011 @05:20AM (#2859350)
> This re-imagines passwords as nouns. As a side effect, you get a complete log of whenever anyone changes their password or requests to reset it. > Want to enforce password reuse policies? Do analysis of password lifetimes? Track down malicious abuse of your password reset system? > Those things are now pretty easy with a schema like this

I am also proponent of the more "resource oriented" view of an application but I fail to see how the CRUD approach you proposed is unique in order to support the above.. Because, all of the things that you mentioned can be also implemented/supported if you transmit the tokens in query strings. I.e. /password/:token and /reset_password/?token=:token are more or less the same thing from the REST point of view although the first is more user friendly, cache friedly, etc. After all URIs are opaque to the client: http://www.w3.org/DesignIssues/Axioms.html#opaque and that's where HATEOAS enters so the client just needs to know a single (bookmark) URI and the hypermedia will guide to the creation of the rest resource identifiers needed by the application (HATEOAS is indeed the "highest level" of REST: http://martinfowler.com/articles/richardsonMaturityModel.htm...).

Unless you mean that by following the 'noun'-oriented view of the password tokens you can easily spot these operations in the apache logs.. to which I agree if you also include the user id in these URIs...

Re:Gevent, Long-Polling & You on Monday August 01, 2011 @04:32AM (#2831266)
Instead of "long polling" (or a different way to have long polling) is to use the HTML5's server sent events (http://www.w3.org/TR/eventsource/) See here for examples: http://www.html5rocks.com/en/tutorials/eventsource/basics/

I have implemented such a functionality for real time monitoring using gevent and works extremely well. This HTML5 feature is supported in recent versions of Chrome, Opera, and Safari and in the beta versions of Firefox, but not in any version of IE: http://caniuse.com/#feat=eventsource