News for hackers. Stuff that matters.

aksx

Re:Run Clip on iPhone to Search Photos on Tuesday February 07, 2023 @09:55AM (#34693561)
What do you use to index image vectors? Does a "retrieval based modal" not require an index?
Maybe because other people search in different places. Events/Businesses: Google Maps, Instagram Trend/Tutorials: Tiktok, IG Reels News: Twitter/Social Media/News Outlet of choice

Google is for searching new sources of information and either it’s instant (google info box) or takes too long which makes a lasting memory about it being painful.

Re:A Rust optimization story on Saturday October 23, 2021 @12:45PM (#28970115)
So many interesting findings in the post.

The tantivy binary search & rust binary search only has one different at the end, knowing the size of the slice ahead of time, right?

Could the rust compiler infer the size ahead of time?

Re:What Google recruiters look for in a technical resume on Thursday February 04, 2021 @07:19PM (#26031429)
Even if your current employer let's you talk about specific numbers, without context they don't tell the recruiter anything.

"The API latency was 10 seconds, now it's 8.5 seconds."

or

"I reduced the p99.9 latency from 1 sec to 400ms" (by removing input validation)

So costco pays a small companies to sell their product and extract sales data.

Should amazon start paying small companies at the same margin that costco does?

Re:Ask HN: What projects are you working on now? on Sunday March 22, 2020 @11:18AM (#22655528)
i suggested building this at a bigco where i work last year, built a prototype using postgres and wrote the design doc.

sadly it wasn't picked up.

Congrats on product, there is a big market for it

Re:Google Open Source Code Search on Thursday March 12, 2020 @09:09AM (#22556379)
zoekt is absolutely awesome, I was reading it’s code yesterday to figure out how it does ngram indexing and search.
Capitalism is the way a system set of connections between subsystems and politics is a way to reorganize a system from within itself.

> can the system still be simplified enough to grasp it well enough to change it?

That would be a model of a system not the system itself, and as George box said "All models are wrong, but some are useful"

> where would an individual who has grasped it find the power to change anything?

If an individual is able to change connections between subsystems, they can change the behavior of the higher level system. But the impact of the change is dependent on the systems being changed.

Re:Implementing a Cuckoo Filter in Go on Saturday December 28, 2019 @07:54PM (#21903026)
I am all for the Go idiom that variable name length should be directly proportional to it's scope, the code samples in the post have take it a bit too far and make the code harder to read.

it would be so much more readable if the struct had more descriptive names

    type Cuckoo struct {
       buckets           []bucket
       numBuckets        uint
       entriesPerBucket  uint 
       fingerprintLength uint
       capacity          uint
    }
Re:Elementary OS 5.1 Hera on Friday December 06, 2019 @01:08AM (#21719628)
Why do you hope so? Vala is a decent language which let's users build Gtk applications easily.
Re:Thank You, Guido on Wednesday October 30, 2019 @11:49AM (#21399024)
Sometimes it's not about show how smart they are, developers aren't clear about the code they are writing.

when I write code for a concept i don't understand completely, it tends to be complex and cryptic. I'll go back to it after trying to understand the problem and the problem space more and be able to write simpler code.

H1B is a lottery: https://en.wikipedia.org/wiki/H-1B_visa#Lottery

You might be thinking of the L1 visa

> the evolution of slave labor is going to make the H-1B horror stories from the 90's to the present sound like fairy tales.

Sorry, english is not my first language. can you please elaborate on what you mean?

Re:Ask HN: Senior Positions Interview Prep Resources? on Saturday October 05, 2019 @02:04PM (#21166971)
Immigrant here, and I can read, write & speak english.

If i don't have a job with a company willing to sponsor my visa I would have to get back on the boat and leave.

My friends, who are from smaller countries have the privilege but I do not.

Stats from travel.state.gov

https://travel.state.gov/content/dam/visas/Statistics/Immigr...

    Waiting list size by country
    Country             Applicants
    Mexico              1,229,505
    Philippines         314,229
    India               298,571
    Vietnam             231,519
    China-mainland born 231,519
    Bangladesh          169,231
    Dominican Republic  146,160
    Pakistan            115,625
    Haiti               94,506
    El Salvador         64,868
    Cuba                55,847
    All Others          840,393
    Worldwide Total     3,791,973
Re:Ask HN: Senior Positions Interview Prep Resources? on Saturday October 05, 2019 @01:53PM (#21166915)
can you please link the study?
Re:How come PHP seems so much faster than Rust? on Saturday September 28, 2019 @08:55PM (#21104213)
> This is a little silly.

Is it though? I interpreted question the following way.

"Rust is a tool in my tool box, when the reason for picking it over other tools isn't demonstrably true, what am i doing wrong?"

I agree with the rest of your comment, just not with calling the OP or their question silly.

Re:Simple RPC framework in 300 lines of Go on Sunday August 04, 2019 @05:03PM (#20609212)
>The Server package contains the Register function. Main package implements the QueryUser function that does the work of querying the DB. When Main calls Server.Register to register the function with Server, it sends the function name (QueryUser) and..something else? Is that the memory address of QueryUser on my computer? And when Server actually runs the function, it's just pointing to QueryUser at the memory address given to it by Main?

This is correct, let me unpack this a little more.

The 'Register' function tells the server object that when a client tries to call the function "QueryUser" call the function passed as the second parameter and send back the result.

the client object's "CallRPC" functions tells the client object that i know that there is a function called "QueryUser" that the server know about and it has the same structure as the second parameter, when i call the second parameter, call the server with the arguments passed. The client object then creates a stub implementation which when called, creates a connection to the server, tell the server to call the function "QueryUser" with the given parameters, reads the results and returns the result.

The "Remote" part of RPC is done over the transport package which the main function is mostly unaware of.

Re:Skills Poor Programmers Lack on Sunday July 21, 2019 @03:04PM (#20493051)
>Poor programmers are optimistic

completely agreed, just had a long conversation with a junior engineer about how adding a cache would not solve a complex architectural problem and just add more complexity.

> All those are indicators of coupling unrelated ideas together.

once useful tool i have found is using automated tools to spot indicators like these. In java using checkstyles cyclomatic complexity checks and class fan out is a strong indicator (not proof though).

Re:Things I Enjoy in Rust: Error Handling on Monday April 22, 2019 @04:28PM (#19722625)
>The best parts of rust's error handling are the try!() macro (aka `?`),

Go's way of providing try!() macro is less magical but almost as useful.[1]

> From/Into error types allow the compiler to wrap types or convert between error types

error is an interface in Go which can be easily cast/checked for the underlying type.

> Go's error handling is pretty primitive

I wouldn't call it primitive, I would call it simple. I like the comparison i read on a blog on HN.

Rust is the 'new' C++ and Go is the new C

[1] https://blog.golang.org/errors-are-values

> AWS to provide a docker on lambda option

isn't that AWS Fargate?

Re:Monads you can understand (2015) on Sunday March 03, 2019 @01:31PM (#19295943)
They are important in Haskell because they allow "real world" tasks to performed and give the ability to reason about functions.

They are _useful_ for non-pure function programmers because it's a tool in the tool box which can allow them to write composable code that can be reasoned about.

Java's & C++'s Optionals are monads, Rust's Result<T, E> is a monad, etc.

Re:Monads you can understand (2015) on Sunday March 03, 2019 @01:26PM (#19295917)
that's a good generalization but has one small thing missing.

The main benefit of a monad is composition. It allows a programmer to chain computation and put some logic in the chaining. It's the difference between

    f(g(h(x)))
and

    h(x).then(g).then(f)
the '.then' method has some inbuilt logic, for to ability to add that logic we 'embellish' the return type of h (or put it in a container like Promise<>).

To equate it to java's Optionals, the flatMap is a good example, it takes an optional and applies some logic and decides to call the second function.

are you following a book or a website for the recipes? I would love to cook more at home but it takes time to find good recipes.
Re:After Surgery in Germany, I Wanted Vicodin, Not Herbal Tea on Wednesday January 31, 2018 @01:09AM (#16271846)
Do as the docs says not as the doctor does.
Financially.

Engineers are still Indians

Re:GitHub was down on Monday July 31, 2017 @01:31PM (#14894119)
or a bad commit being deployed on their fleet.
Re:Comparing Haskell and Node concurrency performance on Thursday December 08, 2016 @12:59PM (#13132419)
but wouldn't you still require [Stack size] * [num concurrent connections] space? pooling just means that there won't be the cost of creating a new thread on all/most connections.

Older »