Better HN
topnewbestaskshowjobs
Log inSign up

RubyPinch

888 karma · joined Feb 5, 2013 (13y ago) · 406 submissions

Submissions

comment 10y ago · link · parent

I noticed (in the original article) an almost complete lack of entertaining the thought that they mite have (edit: fixed grammer) been acting maliciously on someone else's behalf. So that is exactly what happened.

And man, I don't know, his whole business gets shutdown automatically, and he end up liking it for any reason? I think the picture that BI is painting here is really not properly representative of his views (or at least I'd assume this is the case)

comment 10y ago · link · parent

I feel like a person should be able to back their opinion up (for a specific case, not in general), instead of just mindlessly quoting a line from a bible.

comment 10y ago · link · parent

its "safe" to say that, like its also "safe" to say that <article> will be used to denote articles in HTML

Yes, decorators can do whatever they want, but, in practical usage I'd say a majority of decorator usages do not mutate the class/function significantly from its original typed-out intent (like, they don't often add 8+ methods to a class for example, but of course they can)

not literally "safe" to say.

comment 10y ago · link · parent

I know how decorators work and you might be missing the point I was making by a fair mile

The following don't mutate the mental map of how the function works, its "this function is still what I typed": "add logging" "add tracing" "register functions/objects for various reasons"

The following act as a filtering role, the inside isn't "changed", the mental map becomes "This function will operate within this feature in some way, but otherwise is still what I typed": "enable type validation" "change output formats to json/xml/yaml" "swap out implementations for global functions/vars" (assuming the implementations are comparable)

The following is "What I've typed is not a proper representation, and some things may act differently than usual" e.g. things that can take lists can no longer, due to needing to be serializable (and the least common decorator case):

"take a class, inspect a database schema and bind various internal attributes to update items in a row for that schema (somewhat common in ORMs)"

(and that is usually implemented via a subclassing of a Model class, which then in turn can implement a metaclass, to get the full mutate-class-on-creation funs, iirc)

- - -

> In particular, I don't see why mutating a type via a metaclass is preferable to using a decorator.

Its not a technical topic, its a semantics topic. while both can do whatever silliness they want, decorators are usually reserved for incidental tasks on the side, and wrapping the original function in some light filtering. Metaclasses are expected to do mutation to the class (hence requiring a metaclass), so semantically a subclass or metaclass would be more appropriate to use for this task, compared to a decorator (from the standard library, Enums come to mind as an example for this)

comment 10y ago · link · parent

It feels a bit hampered by "bad" design decisions to me

I think its safe to say that the current view of what decorators do is, a) filter things going to functions (so they error, or hit a cache), or b) register a function with another library (e.g. flask path decorator)

This library does a lot more than that, so it seems that maybe a metaclass (which exists to mutate the class's creation) would be more appropriate?

This seems to act as a __init__ replacement, but it would be cool to act as a __init__ assistant (in other words, run the attr.s __init__, then run the user defined __init__)

The ordering of attrs matters a bit more than one would expect, not only does it define the attribute order for creating a new instance, it also defines the order of attributes when sorting against other classes. You would not want a id=attr.ib() at the top of the class definition, where it most makes sense!

The ordering of attrs is done through the .ib() call itself (which gives itself a number, and increments a global counter). This is a way of doing it, and practically might be the best way (it won't lead to any inconsistencies within a class), but it still feels weird

I personally won't use it, but I might make a competitor to it for personal use

comment 10y ago · link · parent

I'd be asking the question of wether anything depended on `more` that couldn't depend on `less` already, but instead depends on more because more is not less.

Or, in other words, maybe the issue is cultural instead of technical, which would in practice, result in new users going to either more (the relic) or less (the bloated), depending on their views, instead of all new users going to less

edit: reading through the rest of the comments here, it seems a lot of people prefer more, for various reasons!

comment 10y ago · link · parent

You still haven't removed the obvious copyright violations I mentioned prior

http://python.w3clan.com/tutorial/14/introduction-to-python has content taken from http://www.tutorialspoint.com/python/python_overview.htm

http://python.w3clan.com/tutorial/15/variables-and-types has content taken from http://www.learnpython.org/en/Variables_and_Types

And same attitude towards the PDO tutorial plagiarism (https://www.reddit.com/r/PHP/comments/4ynd0e/php_data_object...)

- - -

Oh and the owner of the site partakes in the plagiarism as well?

http://rocky.w3clan.com/post/88/terms-and-condition

https://webcache.googleusercontent.com/search?q=cache:xLyWQV...

and http://linux.w3clan.com/tutorial/164/deadly-commands which you can google almost any paragraph from to find where it was taken from

Really really sketchy

comment 10y ago · link · parent

Learning question: The next steps would be to take a discrete Fourier transform to help in the frequency detection, yes?

comment 10y ago · link · parent

It might of been like, when he was starting out, no one really cared to look, after he was famous, anyone who noticed anything would of just assumed it was a stint of bad luck, otherwise he wouldn't be famous!

comment 10y ago · link · parent

Learning question: so the tag was on an orphaned commit? What ways could this be resolved?

The obvious and chosen one was to tag a new release and explain to people that the old one isn't accessible because of a muck up.

Would of merging it back in worked? that would of fixed the "<nwc10> the tag is for a commit which is not a parent of nqp master" right?

comment 10y ago · link · parent

do you more mean like, the decisions, and planned changes, etc, aren't open? (along with being tied to the whims of the CEO and the company's money?)

comment 10y ago · link · parent

(rate of) change in memory per user

    150MB    - 100MB
    -------------------  =  50KB/user
    2k users - 1k users
no?

comment 10y ago · link · parent

I am aware it didn't invent the words, it was more of a "feels like" statement, as opposed to literal

comment 10y ago · link · parent

Probably the whole needing to learn an entire part of English that many didn't even know existed before.

A language really shouldn't require its language-specific glossary to be mandatory reading, just to understand anyone speaking about it. I could just learn any other language in half the time!

from the above comments

> "I have this pure function that I want to apply to the inner value of my functor"

pure function I know well enough, that is the same for any language, functors though... is that a function object that can be applied to something? then why does it already have a value?

I can take terminologies from C, to python, or C#, and feel a-okay, but haskell kinda feels like it went and shut it self away from the world, and its terminology developed differently due to that, I guess.

comment 10y ago · link · parent

for windows, in powershell

     (Invoke-WebRequest -UseBasicParsing "https://bootstrap.pypa.io/get-pip.py").Content | python -
but generally in that case, one doesn't need to install ensure_pip, and can use that. And one doesn't need to install pip at all, since it is an optional come-with

but in most cases, the `curl url | python -` or equivalent solves the problem

comment 10y ago · link · parent

for documentation

comment 10y ago · link · parent

if I'm not mistaken, while winamp does support the formats, its far off from correct support, hence one of the reasons why xmplay is still a thing

comment 10y ago · link · parent

But what is a better registrar? I've heard most all of the main players seem to have social engineering issues, regardless of twofactor, and google domains is still US only

comment 10y ago · link · parent

how were the fundamentals bad?

it was a SMS based broadcast service, no?, and it largely still is (only dropping the "SMS" part, but keeping all the baggage)

comment 10y ago · link · parent

https://github.com/MagicStack/httptools magicstack already did their own http parser

comment 10y ago · link · parent

I think its safe to say "it breaks the web" is from the user perspective, not the server.

It only takes 1 server to serve differing content through each protocol to break things for the user

comment 10y ago · link · parent

eh, the final pieces are kind of all being worked on

multiprocessing to stop freezing issues and increase response speed

a permissioned API for extensions, easier and saner full themes system (faster/easier development time for updates, and a wider range of extensions/themes as a result)

and switching critical components to a safer language)

which imo are more important for users than doing something an existing firefox fork does (like, if there was demand for firefox with seamless tor, then they would get the firefox with seamless tor today, because it already exists)

comment 10y ago · link · parent

it is the RCE, from the sounds of it

> We demonstrate a multi-stage monitor implant capable of loading arbitrary code and data encoded in specially crafted images and documents through active monitor snooping. This code infiltration technique can be implemented through a single pixel, or through subtle variations of a large number of pixels.

comment 10y ago · link · parent

> The left-pad fiasco

the whole "oh god, excessive dependencies mean js is gonna die!" response that people had at the time, which was imo more due to their dislike of JS as opposed to the dependency management

comment 10y ago · link · parent

That is a bit silly, especially considering its bank money, not bitcoins

Just have an app that allows the user to review transactions after they have happened. If there is a double charge, dispute and win easily, if charged too much, dispute and win easily, etc etc

This already exists too

comment 10y ago · link · parent

Windows' thing has always been backwards compatibility (not counting programs with questionable code in the first place), and the entire OS is win32 as well.

They'd practically be telling all their casual, professional, and enterprise userbase to not update. Their prior support for win32 has locked them into it, even if they want to leave it

comment 10y ago · link · parent

it'd probably have multireddits underneath, but multireddits don't currently play a part in onboarding

as far as detection tools for mods, https://www.reddit.com/r/ModSupport/comments/4tpla8/_/d5j7uo...

comment 10y ago · link · parent

isn't that more "don't trust any company"? what he says applies to way more than reddit

comment 10y ago · link · parent

http://archive.is/uOTnv (grabbed latest thing from archive is, so like, 7 hours ago)

There is... like, less than 10% matches what you describe

and a AmA is in 10th position with near 5000 points

comment 10y ago · link · parent

> But this would have been totally disastrous under any type of serious load. Even if I would have simplified the above query to only include three conditions/sorting operations, it would have been disastrous. Why? Because this is not how a database is supposed to be used. A database should query only on one index at a time, which is impossible with these geospatial queries.

> On the database side, I separate the snaps into a few different collections: all snaps, most liked snaps, newest snaps, newest valid snaps and so forth.

Pardon my ignorance, but don't most databases have some method of handling these issues?

(defining multiple indexes for use, having support for geospatial data, having support for like, subsections of the existing dataset, etc?)

I thought that the main goal was to offload the developer's code's logic onto the performant database, as opposed to offloading the database's logic and caching onto the developer's code? is the former not practical?

1
567
14