News for hackers. Stuff that matters.

localhostdotdev

Re:YTMND is down for temporary maintenance on Wednesday May 15, 2019 @04:33PM (#19923469)
to be fair, i went there, saw rip and didn't read further :)
Re:The Problem of Thinking Too Much (2003) [pdf] on Wednesday May 15, 2019 @01:51PM (#19921944)
oh nice, i didn't know where the coin flipping quote came from: https://en.wikiquote.org/wiki/Piet_Hein
Re:Material Design Guidelines for Dark Mode on Wednesday May 15, 2019 @10:17AM (#19919581)
you were programming in text, a very popular programming language that i'm using right now :)

here is a peg grammar:

    text = $.*
you can try it at https://pegjs.org/online :)

edit: sry to disappoint but this matches binary files too :(

already better than s3 :) makes me think of https://www.reddit.com/r/DataHoarder/
wow that's quite amazing! could be worth it even at 10k+

here is a direct link so people don't have to copy/paste https://innerscene.com/products

Re:The boring front-end developer (2014) on Monday May 13, 2019 @08:45PM (#19905664)
this is my definition of a boring programmer:

- makes code that works

- solves people's problems

- doesn't care what other programmers think

edit: the truth is a boring programmer won't even read this, just doesn't care, doesn't read hn, just does stuff

Re:GitHub Package Registry on Friday May 10, 2019 @05:32PM (#19882442)
Re:Database IDs Have No Place in URIs (2008) on Friday May 10, 2019 @08:47AM (#19877198)
pretty cool how the urls stayed the same:

http://stackoverflow.com/questions/13204/why-doesnt-my-cron-... (still works)

http://stackoverflow.com/questions/21064/massive-reputation-... ("this question was removed from stack overflow for reasons of moderation", still available: https://i.imgur.com/Csy94IL.png)

Re:Estimating Number of Jupyter Notebooks on Github on Wednesday May 08, 2019 @12:23PM (#19860370)
thanks for linking there, tried to make some ruby notebooks and works quite well https://nbviewer.jupyter.org/github/localhostdotdev/notebook... (very similar to the github interface though)
Re:To ORM or Not to ORM on Tuesday May 07, 2019 @01:52PM (#19851775)
I stayed close to what the author did.

adding an index:

    add_index :tags, :name
adding a null constraint:

    change_column :tags, :name, :string, null: false
    validates :name, presence: true # for proper validations
https://github.com/localhostdotdev/bug/commit/3765237008c36c...
Re:To ORM or Not to ORM on Tuesday May 07, 2019 @01:42PM (#19851673)

    rails g model Post published_at:datetime title content:text
    rails g model Comment post:references author published_at:datetime content:text
    rails g model Tag name
    rails g model PostTag post:references tag:references

    class Post < ApplicationRecord
      has_many :comments
      has_many :post_tags
      has_many :tags, through: :post_tags
    end

    class Tag < ApplicationRecord
      has_many :post_tags
      has_many :posts, through: :post_tags
    end
from there it's just regular rails:

    Tag.find_by(name: "something").posts
    Post.joins(:tags).where(tags: { name: "something" })
    Tag.create(name: "something")
    Post.create(...)
    Tag.first.posts << Post.all.sample(2)
made a little repo if people want to play with it: https://github.com/localhostdotdev/bug/tree/orm-or-not-orm
> for intelligence, surveillance and reconnaissance (ISR) and strike missions (wikipedia)

for the strike part, wouldn't it be better to use a satellite-based system, I would think it could reach any place on earth much faster given the initial velocity of being in orbit.

e.g. missiles/drones would be launched from a satellite at 8000m/s (17000 mph, 3/4 times faster than the SR-72), and they could be distributed globally. I'm just unsure about the descent phase but sounds like it would work out.

kinda hoping "testing weak passwords on your existing user's passwords" becomes standard practice at some point.
Re:A New Way of Voting That Makes Zealotry Expensive on Friday May 03, 2019 @11:11AM (#19819107)
there is a democracy index: https://en.wikipedia.org/wiki/Democracy_Index

there is something similar for voting systems but it isn't as elegant: https://en.wikipedia.org/wiki/Comparison_of_electoral_system...

Re:A New Way of Voting That Makes Zealotry Expensive on Friday May 03, 2019 @10:25AM (#19818716)
> An intriguing new tool of democracy just had its first test in the real world of politics, and it passed with flying colors.

how can you even measure if a voting system is a success?

Re:Common mistakes in PostgreSQL on Friday May 03, 2019 @08:22AM (#19817736)
discussion on lobsters where I posted it recently: https://lobste.rs/s/m4f2ke/don_t_do_this
Re:Bento – An Android UI Framework on Thursday May 02, 2019 @08:43PM (#19814450)
works fine for me™️ here is a copy: https://outline.com/jHJzzZ
exactly what I was thinking, e.g. "need a working space anywhere? just use the app and rent a one of our free spaces or share one"

I could definitely see VC money going into this, maybe even an existing company doing it.

the parking spots could have temporary structures to make it more like an office, have plugs, internet, etc.

then it could expand globally and it's no issue if it's outlawed in one city/country, just go to the next city/country.

Re:Over 13% of the homes in Japan are abandoned on Sunday April 28, 2019 @09:37AM (#19771096)
wouldn't that be a sign of a healthy housing market? (e.g. liquidity)

if 99%-100% of homes were occupied then it would reach saturation (hard to buy/rent homes)

Github's https://primer.style/

Google's https://material.io/design/

I guess most companies have a design system in place

Re:Could time be logarithmic? (2016) [pdf] on Friday April 26, 2019 @04:43PM (#19761567)
found from a comment on the incorrect calculations of speed of the expansion of the universe: https://www.reddit.com/r/space/comments/bhoapu/hubble_finds_...
Re:Gitlab 11.10 Released on Thursday April 25, 2019 @08:15PM (#19753743)
reminds me of github's project paper cuts https://github.blog/2018-08-28-announcing-paper-cuts/
not so easy for lower scores :)
you could use https://news.ycombinator.com/over?points=200 or maybe the experiment could allow opt-out
css version tested with stylus:

    .score { display: none } /* stories and own comments */
    .pagetop { color: transparent !important; } /* hide karma top right (also hides username and logout) */
    #me, #logout { color: black } /* show username and logout */
    #hnmain > tbody > tr:nth-child(3) > td > form > table > tbody > tr:nth-child(3):not(.athing) { display: none } /* own profile */
    #hnmain > tbody > tr:nth-child(3) > td > table > tbody > tr:nth-child(3):not(.athing) { display: none } /* other user profile */
I don't think it could easily be truly hidden but a css experiment might be interesting.

Older »