The best Hacker News stories from Show from the past day
Latest posts:
Show HN: Simple Zero-Knowledge Proof Treasure Hunt Game
Show HN: Simple Zero-Knowledge Proof Treasure Hunt Game
Show HN: SPyQL – SQL with Python in the middle
SPyQL (<a href="https://github.com/dcmoura/spyql" rel="nofollow">https://github.com/dcmoura/spyql</a>) is SQL with Python in the middle, an open-source project fully written in Python for making command-line data processing more intuitive, readable and powerful. Try mixing in the same pot: a SQL SELECT for providing the structure, Python expressions for defining transformations and conditions, the essence of awk as a data-processing language, and the JSON handling capabilities of jq.<p>How does a SPyQL query looks like?<p><pre><code> $ spyql “
IMPORT pendulum AS p
SELECT
(p.now() - p.from_timestamp(purchase_ts)).in_days() AS days_ago,
sum_agg(price * quantity) AS total
FROM csv
WHERE department.upper() == 'IT' and purchase_ts is not Null
GROUP BY 1
ORDER BY 1
TO json” < my_purchases.csv
</code></pre>
In a single statement we are 1) reading a CSV (of purchases) with automatic header detection, dialect detection, type inference and casting, 2) filtering out records that do not belong to the IT department or do not have a purchase timestamp 3) summing the total purchases and grouping by how many days ago they happened, 4) sorting from the most to the least recent day and 5) writing the result in JSON format. All this without loading the full dataset into memory.<p>The Readme is loaded with recipes and there is also a demo video: <a href="https://vimeo.com/danielcmoura/spyqldemo" rel="nofollow">https://vimeo.com/danielcmoura/spyqldemo</a><p>Any feedback is welcomed! Thank you.
Show HN: SPyQL – SQL with Python in the middle
SPyQL (<a href="https://github.com/dcmoura/spyql" rel="nofollow">https://github.com/dcmoura/spyql</a>) is SQL with Python in the middle, an open-source project fully written in Python for making command-line data processing more intuitive, readable and powerful. Try mixing in the same pot: a SQL SELECT for providing the structure, Python expressions for defining transformations and conditions, the essence of awk as a data-processing language, and the JSON handling capabilities of jq.<p>How does a SPyQL query looks like?<p><pre><code> $ spyql “
IMPORT pendulum AS p
SELECT
(p.now() - p.from_timestamp(purchase_ts)).in_days() AS days_ago,
sum_agg(price * quantity) AS total
FROM csv
WHERE department.upper() == 'IT' and purchase_ts is not Null
GROUP BY 1
ORDER BY 1
TO json” < my_purchases.csv
</code></pre>
In a single statement we are 1) reading a CSV (of purchases) with automatic header detection, dialect detection, type inference and casting, 2) filtering out records that do not belong to the IT department or do not have a purchase timestamp 3) summing the total purchases and grouping by how many days ago they happened, 4) sorting from the most to the least recent day and 5) writing the result in JSON format. All this without loading the full dataset into memory.<p>The Readme is loaded with recipes and there is also a demo video: <a href="https://vimeo.com/danielcmoura/spyqldemo" rel="nofollow">https://vimeo.com/danielcmoura/spyqldemo</a><p>Any feedback is welcomed! Thank you.
Show HN: SPyQL – SQL with Python in the middle
SPyQL (<a href="https://github.com/dcmoura/spyql" rel="nofollow">https://github.com/dcmoura/spyql</a>) is SQL with Python in the middle, an open-source project fully written in Python for making command-line data processing more intuitive, readable and powerful. Try mixing in the same pot: a SQL SELECT for providing the structure, Python expressions for defining transformations and conditions, the essence of awk as a data-processing language, and the JSON handling capabilities of jq.<p>How does a SPyQL query looks like?<p><pre><code> $ spyql “
IMPORT pendulum AS p
SELECT
(p.now() - p.from_timestamp(purchase_ts)).in_days() AS days_ago,
sum_agg(price * quantity) AS total
FROM csv
WHERE department.upper() == 'IT' and purchase_ts is not Null
GROUP BY 1
ORDER BY 1
TO json” < my_purchases.csv
</code></pre>
In a single statement we are 1) reading a CSV (of purchases) with automatic header detection, dialect detection, type inference and casting, 2) filtering out records that do not belong to the IT department or do not have a purchase timestamp 3) summing the total purchases and grouping by how many days ago they happened, 4) sorting from the most to the least recent day and 5) writing the result in JSON format. All this without loading the full dataset into memory.<p>The Readme is loaded with recipes and there is also a demo video: <a href="https://vimeo.com/danielcmoura/spyqldemo" rel="nofollow">https://vimeo.com/danielcmoura/spyqldemo</a><p>Any feedback is welcomed! Thank you.
Show HN: Infracost (YC W21) – Open-source cloud cost policies
Hi, we’re Ali, Hassan and Alistair, co-founders of Infracost (<a href="https://www.infracost.io/" rel="nofollow">https://www.infracost.io/</a>). Infracost shows engineers the cost of each Terraform change in CI/CD before resources are launched. When something changes, it posts a comment with the cloud cost impact. e.g. you’ve added 2 instances and volumes, and have changed an instance type from medium to large, this will increase your bill by 25% next month from $1000 to $1250 per month.<p>We launched the first version of Infracost just under a year ago (<a href="https://news.ycombinator.com/item?id=26064588" rel="nofollow">https://news.ycombinator.com/item?id=26064588</a>). As we said in our first release ‘the people who are purchasing cloud resources are not shown costs upfront, so they don’t know how much the resources will cost before launching them’. Our assumption was that because we are open source and engineers are flying blind, they (the engineers) would pull us into their workflow. Actually, something different is happening:<p>The engineers are not pulling us in - it turns out to be the senior DevOps, SREs and platform teams. One of their challenges is figuring out how their small team of 7 people can fulfill the infrastructure requirements of hundreds of engineers. To solve this, they have created and put in place processes for engineers to provision infrastructure when they need. Now they want to implement cost policies and guardrails so that these hundreds of engineers don’t blow past all budgets. For example, if a change will result in a higher than 15% increase, leave a warning. If a change results in a >25% increase in costs, block the change till a team lead has reviewed it.<p>This has two implications for us. First, we need to create an output that isn’t only used by humans but is also digested into other systems to make further decisions. The second is the people we have been speaking to are not our end users. We need to figure out how we can get introduced to our end users, and create a different set of questions for each persona.<p>We’d really love your feedback around the cost policies use-case. We've created examples with standard policy tools like Open Policy Agent (OPA), HashiCorp Sentinel and Conftest. Check out the repo for GitHub Actions at <a href="https://github.com/infracost/infracost" rel="nofollow">https://github.com/infracost/infracost</a>. Our other CI/CD integrations are listed here: <a href="https://www.infracost.io/docs/#4-add-to-cicd" rel="nofollow">https://www.infracost.io/docs/#4-add-to-cicd</a>.<p>We'd love to hear how you think about policies and guardrails for containing cloud costs!
Show HN: Infracost (YC W21) – Open-source cloud cost policies
Hi, we’re Ali, Hassan and Alistair, co-founders of Infracost (<a href="https://www.infracost.io/" rel="nofollow">https://www.infracost.io/</a>). Infracost shows engineers the cost of each Terraform change in CI/CD before resources are launched. When something changes, it posts a comment with the cloud cost impact. e.g. you’ve added 2 instances and volumes, and have changed an instance type from medium to large, this will increase your bill by 25% next month from $1000 to $1250 per month.<p>We launched the first version of Infracost just under a year ago (<a href="https://news.ycombinator.com/item?id=26064588" rel="nofollow">https://news.ycombinator.com/item?id=26064588</a>). As we said in our first release ‘the people who are purchasing cloud resources are not shown costs upfront, so they don’t know how much the resources will cost before launching them’. Our assumption was that because we are open source and engineers are flying blind, they (the engineers) would pull us into their workflow. Actually, something different is happening:<p>The engineers are not pulling us in - it turns out to be the senior DevOps, SREs and platform teams. One of their challenges is figuring out how their small team of 7 people can fulfill the infrastructure requirements of hundreds of engineers. To solve this, they have created and put in place processes for engineers to provision infrastructure when they need. Now they want to implement cost policies and guardrails so that these hundreds of engineers don’t blow past all budgets. For example, if a change will result in a higher than 15% increase, leave a warning. If a change results in a >25% increase in costs, block the change till a team lead has reviewed it.<p>This has two implications for us. First, we need to create an output that isn’t only used by humans but is also digested into other systems to make further decisions. The second is the people we have been speaking to are not our end users. We need to figure out how we can get introduced to our end users, and create a different set of questions for each persona.<p>We’d really love your feedback around the cost policies use-case. We've created examples with standard policy tools like Open Policy Agent (OPA), HashiCorp Sentinel and Conftest. Check out the repo for GitHub Actions at <a href="https://github.com/infracost/infracost" rel="nofollow">https://github.com/infracost/infracost</a>. Our other CI/CD integrations are listed here: <a href="https://www.infracost.io/docs/#4-add-to-cicd" rel="nofollow">https://www.infracost.io/docs/#4-add-to-cicd</a>.<p>We'd love to hear how you think about policies and guardrails for containing cloud costs!
Show HN: Infracost (YC W21) – Open-source cloud cost policies
Hi, we’re Ali, Hassan and Alistair, co-founders of Infracost (<a href="https://www.infracost.io/" rel="nofollow">https://www.infracost.io/</a>). Infracost shows engineers the cost of each Terraform change in CI/CD before resources are launched. When something changes, it posts a comment with the cloud cost impact. e.g. you’ve added 2 instances and volumes, and have changed an instance type from medium to large, this will increase your bill by 25% next month from $1000 to $1250 per month.<p>We launched the first version of Infracost just under a year ago (<a href="https://news.ycombinator.com/item?id=26064588" rel="nofollow">https://news.ycombinator.com/item?id=26064588</a>). As we said in our first release ‘the people who are purchasing cloud resources are not shown costs upfront, so they don’t know how much the resources will cost before launching them’. Our assumption was that because we are open source and engineers are flying blind, they (the engineers) would pull us into their workflow. Actually, something different is happening:<p>The engineers are not pulling us in - it turns out to be the senior DevOps, SREs and platform teams. One of their challenges is figuring out how their small team of 7 people can fulfill the infrastructure requirements of hundreds of engineers. To solve this, they have created and put in place processes for engineers to provision infrastructure when they need. Now they want to implement cost policies and guardrails so that these hundreds of engineers don’t blow past all budgets. For example, if a change will result in a higher than 15% increase, leave a warning. If a change results in a >25% increase in costs, block the change till a team lead has reviewed it.<p>This has two implications for us. First, we need to create an output that isn’t only used by humans but is also digested into other systems to make further decisions. The second is the people we have been speaking to are not our end users. We need to figure out how we can get introduced to our end users, and create a different set of questions for each persona.<p>We’d really love your feedback around the cost policies use-case. We've created examples with standard policy tools like Open Policy Agent (OPA), HashiCorp Sentinel and Conftest. Check out the repo for GitHub Actions at <a href="https://github.com/infracost/infracost" rel="nofollow">https://github.com/infracost/infracost</a>. Our other CI/CD integrations are listed here: <a href="https://www.infracost.io/docs/#4-add-to-cicd" rel="nofollow">https://www.infracost.io/docs/#4-add-to-cicd</a>.<p>We'd love to hear how you think about policies and guardrails for containing cloud costs!
Show HN: A simple Wordle clone in 60 lines, using Hyperscript
Hello HN!
I've been playing a lot with <a href="https://hyperscript.org/" rel="nofollow">https://hyperscript.org/</a> recently (not to be confused with the other hyperhype hyperscript). I threw together a quick Wordle clone in an evening to see what it would look like using this language. The main functionality that is missing is checking for invalid words. The word dictionary is also very small, so it's very easy.<p>The goal here wasn't really to create a good version of Wordle, it was to build 80% of Wordle in a different language to see what it looks like. Turns out, it looks pretty good! Stuff like using CSS rule precedence to highlight the squares, CSS selectors to figure out which key to highlight, and using the DOM to keep state are all really natural in Hyperscript. I highly suggest going to the site and viewing the source!
Show HN: A simple Wordle clone in 60 lines, using Hyperscript
Hello HN!
I've been playing a lot with <a href="https://hyperscript.org/" rel="nofollow">https://hyperscript.org/</a> recently (not to be confused with the other hyperhype hyperscript). I threw together a quick Wordle clone in an evening to see what it would look like using this language. The main functionality that is missing is checking for invalid words. The word dictionary is also very small, so it's very easy.<p>The goal here wasn't really to create a good version of Wordle, it was to build 80% of Wordle in a different language to see what it looks like. Turns out, it looks pretty good! Stuff like using CSS rule precedence to highlight the squares, CSS selectors to figure out which key to highlight, and using the DOM to keep state are all really natural in Hyperscript. I highly suggest going to the site and viewing the source!
Show HN: A simple Wordle clone in 60 lines, using Hyperscript
Hello HN!
I've been playing a lot with <a href="https://hyperscript.org/" rel="nofollow">https://hyperscript.org/</a> recently (not to be confused with the other hyperhype hyperscript). I threw together a quick Wordle clone in an evening to see what it would look like using this language. The main functionality that is missing is checking for invalid words. The word dictionary is also very small, so it's very easy.<p>The goal here wasn't really to create a good version of Wordle, it was to build 80% of Wordle in a different language to see what it looks like. Turns out, it looks pretty good! Stuff like using CSS rule precedence to highlight the squares, CSS selectors to figure out which key to highlight, and using the DOM to keep state are all really natural in Hyperscript. I highly suggest going to the site and viewing the source!
Show HN: Electric Tables – an experiment in personal databases
Show HN: Electric Tables – an experiment in personal databases
Show HN: Electric Tables – an experiment in personal databases
Show HN: Electric Tables – an experiment in personal databases
Show HN: Glove80 on Kickstarter-500 iterations to make split contoured keyboards
Show HN: My new platform. Check it out
This platform is an experimental social network solely based on soundclips. SONAR is meant to encourage genuine conversation and entertainment. I believe audio culture in the form of this app could create a community that is safe, smart, and more human than many of the current social media platforms.
Show HN: Do I need an umbrella today?
Show HN: Do I need an umbrella today?
Show HN: Social network that looks and works more like a forum