Better HN
topnewbestaskshowjobs
Log inSign up

funcDropShadow

1,291 karma · joined Mar 27, 2019 (7y ago) · 868 submissions

Submissions

comment 4y ago · link · parent

The problem you are describing is probably rooted in the specific SQL dialect you had to use. Selecting from inside JSON strings and matching regular expressions should be a no brainer. And it is straight forward in PostgreSQL, e.g.

comment 4y ago · link · parent

I have once worked for a customer where other freelancer had developed a special proxy. The customer required working in a hermetically closed vpn environment even to access the test systems. Whitelisting a single web page cost an unreasonable amount of budget and took days to weeks. Therefore someone had decided to run the vpn inside a virtual machine, and developed an http proxy that consisted of two processes, one running inside the VM and one outside. Now, you gan guess how they exchanged requests and responses. That whole setup was surprisingly usable.

comment 4y ago · link · parent

> The courses that introduce big-O are often the weeder courses, they don't aim to education, they aim to flunk out the people that might be hard to teach so that CS departments can gate keep.

That is an often re-iterated conspiracy theory. In practice nothing could be further from the truth. Professors have nothing to gain from weeding out students. They have to gain by ensuring a certain standard. By the way it is also better for a student to encounter the difficult parts of their subject as early as possible, so that they can decide whether they have chosen their subject wisely. On the other hand, not failing students on fundamentals means complicating advanced subjects even further --- for everybody.

At some point in life students have to accept that neither their time in university nor their time in the industry will consist only of externally motivating tiny bites of tasks that are awesome. In order to understand complicated matters, you have to put in the work. Spending hours in the gym is also quite boring, but most people accepts that it is necessary for certain results.

I've been involved with undergrad teaching in a University. And the amount of time we spend on finding ways to teach and test better was way more than I could have expected as a student myself. On the other hand I couldn't have imagined the arrogance and sometimes stupidity of first year student claiming to know already what they will need in there career and what not.

comment 4y ago · link · parent

> can effectively enforce the decision on their vendors unilaterally,

I can second that, someone I know personally who is building well-reputed longboards in his shop with a few friends, thought a few year ago it would be a good idea to sell through Amazon. Let's just say it didn't went well. Amazon forced them to take basically any returned longboard no matter how obviously it was destroyed.

comment 4y ago · link · parent

Well, in Germany, Amazon logistics is so bad, that I am actively looking for other online shops that deliver through DHL. Most of the time, I don't care whether an electronic gadget arrives in one or two days. But I like reliability. And Amazon's own drivers usually arrive very late in evening, drop the packet wherever they want without even ringing the bell. Recently, I found an Amazon packages in my garden that was delivered before christmas.

And I agree totally with your point about search.

comment 4y ago · link · parent

CPU bound calculations are not parallelized automatically. There are some operators (a.k.a strategies) to do that declaratively to pure code and there are monadic libraries to parallelize Haskell code.

comment 4y ago · link · parent

There is and it has been for quite some time, see chapter 4 of [1].

[1]: Runtime Support for Multicore Haskell, Simon Marlow, Simon Peyton Jones, Satnam Singh (https://www.cs.tufts.edu/~nr/cs257/archive/simon-peyton-jone...)

comment 4y ago · link · parent

My understanding of Loom is, that it is loosely inspired/similar to GHC's runtime. In both every blocking call into a system call is replaced with an equivalent asynchronous system call and some internal thread will manage all those things to wait for. While the operating system is processing the asynchronous request the lightweight thread which made a seamingly blocking call is put aside and some other lightweight thread can execute on the same OS/level thread.

Since the JVM comes with all the blocking call in its own standard libraries, it can rewrite them all internally. Every third-party library that uses the normal Java standard library will benefit from this under the hood replacement of blocking systems call with non-blocking system calls. Only when you use other native libraries you have to be careful to use mostly non-blocking functions.

Therefore Loom allows programmers to think and program with blocking calls, but they get the performance characteristics of non-blocking calls. That is awesome. And there is no need to use function colouring or type-level encoding of blocking/non-blocking code.

comment 4y ago · link · parent

> If Conservancy win their lawsuit against Vizio, the answer will be "anyone who has received GPL code can sue for GPL compliance":

In the U.S. . The GPL tries to match different international law systems.

comment 4y ago · link · parent

You are right, I was under the assumption that Organice did use 200ok-ch/org-parser. Sorry, for the confusion.

comment 4y ago · link · parent

In principle I agree whole heartedly. When introducing parallelism and or concurrency into an old language, the "web workers" aproach, or Erlangs actors, to name a decades older reference to a similar idea, should always be considered. The problem with emacs in particular is the use of the buffer as the most versatile data structure. Lot's of data that could live in some data structure lives in some overlay over some part of the buffer. And emacs is built on dynamic variables. Others in this thread have argued to "just refactor" them to lexically scoped variables. But that would decimate the largest vector to adapt and modify the system.

Parallelizing Emacs needs to be a long-term endaveour, as the maintainers of Emacs already said years ago. I think Emacs could learn something from Clojure's story for parallelism. Make data structures immutable by default, and reference them from as few global variables as possible. The "make data structures immutable by default" ship has already sailed, but introducing additional immutable list/vector/map/set data structures with first class syntax support would allow newly written code to prepare for a more parallel future. Such immutable data structures could then be shared between different "ELisp web workers". The "as few global variables story" ship has already sailed, but again ELisp authors would start to consider reducing the number of global variables if it would enable multi-threading.

comment 4y ago · link · parent

> But languages are absolutely slow or fast! There are fast Schemes and Lisps and there are slow ones.

You are contradicting yourself. If languages instead of implementations were slow or fast, then their would not be fast and slow Schemes and Lisps. Scheme would be either slow or fast.

Actually, I would go even further than saying only implementations are slow or fast, they are slow or fast for certain use cases.

> There is simply no efficient implementation of Elisp possible as it stands and as it is used today. Even with JIT compiling Elisp performance is simply wretched.

I agree in so far as there will --- probably --- never be an Elisp implementation which can run numeric intensive code as fast as the best Fortran or C compiler for this task. But it is certainly possible to improve the performance of ELisp even more than native-comp branch did. The question is whether there are people capable and willing to invest the time to develop that and whether spending that time on the language implementation is the most useful way to spend that time.

comment 4y ago · link · parent

Then use ansible, or some other stateless tool in the same space.

comment 4y ago · link · parent

I've used that parser to write some custom tools for me, it chocked on one large file (30k lines) with lots of code blocks. It needed 30 min and dozens of GiB of RAM to parse that file, that was on the JVM not in the browser. But the next update of the parser combined with some strategic deletions of code blocks, made parsing fast enough.

comment 4y ago · link · parent

Elisp as an embedable engine would be cool, but it would still need lots of the other parts of Emacs, e.g. the buffer data structure. A more realistic approach would be to implement some kind of FFI/RPC display type in emacs and compile the whole of emacs as a library or with emacsen.

comment 4y ago · link · parent

> Some of the coolest things about reinventing wheels are A) it's your wheel and thus motivation levels tend to be higher that way

That is nice reason for somebody to create a solution to scratch once own itch. But it is completely relevant to others. As a user, I have no benefit if somebody reinvents a wheel per se.

comment 4y ago · link · parent

Could you give examples? There were plenty of problems with certain standards layered atop of XML or self-made implementations of XML parsers and unparsers [1], but there is also a well tested set of standard compliant XML libraries that avoid those issues.

[1]: An internationally known consulting firm, that I won't name, had (perhaps has) an internal tool that compiles an Excel description of a service interface into actual XML parsing code that accepts only one hard-coded namespace alias for each given namespace. Over the years I've come across multiple companies with that bug in some service. Everytime I looked into it, the reason was the same internal tool of that consulting firm. And I've met multiple times people who had already discovered that same thing.

comment 4y ago · link · parent

If OpenSSL was under LGPL you could relink the Oculus software with a version of OpenSSL that supports exporting the keys.

comment 4y ago · link · parent

It even connects with other computers [1], note the wildcard for the firmware version in the CVE.

[1]: https://nvd.nist.gov/vuln/detail/CVE-2019-13052#

comment 4y ago · link · parent

> Yet there are lots of real authoritarian governments in the world today whose path can be studied, in case you want to look for more real-world evidence of how the process typically happens.

Hitler started with redefining every day language and influencing/gaining control over youth groups as soon as he had power.

comment 4y ago · link · parent

But then it might be time do declare it stable.

comment 4y ago · link · parent

Truely fascinating.

comment 4y ago · link · parent

Anecdata: I have one severely depressed person in my family, and it is blatantly obvious that sun exposure has a positive effect on that person's depression. Does it cure the depression? No. But it makes living with it much better and removes blockages to working on the depression long-term.

comment 4y ago · link · parent

That is allowed in the US?

comment 4y ago · link · parent

They could have opened a book about the ancient history of the beginning of this millenium.

comment 4y ago · link · parent

> So to me it makes sense to define "hacker" as someone who has mastery over technology. A master is not dominated by their own creations and desires. Part of mastery is choosing exactly how much, and what type of technology to use, and not allowing other people to foist that upon you.

I like that definition and they way you argue. But don't forget that i.e. Meta and all other social networks are paying hords of hackers to screw with your emotions. I.e. you have a really capable opponent.

Why do I claim that social networks and other pay hackers to screw with our emotions? Actually I am convinced they don't care at all about the emotions of their users. They only care about their attention. Since, that is what is being sold to advertisers. Therefore, they do anything to prohibit users from staying in control of their social media use. That doesn't mean that it is impossible to use social media responsibly and healthy, but it is not easy.

comment 4y ago · link · parent

> There’s only one active profile and one user and one catalog and one persistence layer. There’s only one DOM and one window.

But --- hopefully --- there are more than one unit/component tests. ;-)

But I agree, there are contexts in which global variables may make sense, e.g. sometimes in an embedded system, sometimes in a short throw away program. As usual, the community of software developers discusses guidelines without clarifying the context or the assumptions they are working with. Since there are almost no universal guidelines for programming those discussion go on forever.

comment 4y ago · link · parent

E.g. Scala provides such an annotation, but that is implemented by rewriting the recursive method to a non-recursive method with a loop.

comment 4y ago · link · parent

No we won't. [1] does not even mention tail-call elimination. Project Loom does not change the bytecode and does not change it's semantics. I.e. we don't get guaranteed tail-call elimination.

[1]: https://openjdk.java.net/jeps/425

comment 4y ago · link · parent

But it requires changing the virtual memory mapping tables, i.e. it requires a context switch to the kernel and back. Therefore it decreases effectiveness of TLAB caches. I.e. there is a performance cost. One that is hard to quantify for very short lived threads and only slightly better quantifiable for longer lived threads.

And every argument that OS threads are good enough is in stark contrast to the length to which people go to avoid using them. I am talking about all the async libraries/patterns/language features people use to avoid using OS-level threads.

1
181920
29