Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
nitely
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
1.
▲
Fast Unicode (UTF-8) validation with autovectorization
(nitely.github.io)
1 points
by
nitely
18d ago
|
0 comments
2.
▲
by
nitely
6mo ago
It's similar to RE2, but it lacks the on the fly DFA, ie: it's just the classic Thompson's NFA with some tweaks. It does not implement find all the same way, though.
3.
▲
by
nitely
6mo ago
FWIW, nim-regex does achieve linear time in the rebar test[0], even if the regex includes capture groups. It's NFA based. [0]: https://github.com/BurntSushi/rebar/pull/20#issuecomment-256...
4.
▲
by
nitely
1y ago
Yes, and the client may do multiple requests, and if all take long to be processed you may end up with a lot of open connections at the same time (at least on http1), so there is a point to fast HTTP requests+SSE, instead of slow requests (
5.
▲
by
nitely
1y ago
> What benefit is SSE providing here? Let the client decide when a session starts/ends by generating IDs and let the server maintain that session internally. The response is generated asynchronously, instead of within the HTTP reque
6.
▲
by
nitely
1y ago
not if you need bidirectional communication, for example a ping-pong of request/response. That is solved with WS, but hard to do with SSE+requests. The client requests may not even hit the same SSE server depending on your setup. There
7.
▲
HTTP/2 zero latency write coalescing
(nitely.github.io)
8 points
by
nitely
1y ago
|
0 comments
8.
▲
by
nitely
2y ago
There is a gem that implements lightweight threads[0], and there is an HTTP/2 server that seems to abstract things out[1]. Your point probably still holds in the context of ruby + async + http/2; but then it's not http/2
9.
▲
by
nitely
2y ago
In reality you would build your application server on top of the HTTP/2 server, so you'd not have to deal with multiplexing, the server will hide that from you, so it's the same as an HTTP/1 server (ex: you pass some cal
10.
▲
by
nitely
2y ago
> I think ReadableStream/WritableStream APIs on browsers were supposed to change that, but I haven't followed the progress in the last few years. There has been a lot of pushback against supporting full-duplex streams[0]. [0]:
11.
▲
by
nitely
2y ago
> A h2 proxy usually wouldn't proxy through the http2 connection, it would instead accept h2, load-balance each request to a backend over a h2 (or h1) connection. Each connection need to keep state of all processed requests (the HPA
12.
▲
by
nitely
2y ago
In theory request smuggling is not possible with end-to-end HTTP/2. It's only possible if there is a downgrade to HTTP/1 at some point.
13.
▲
HTTP/2 in-depth server design
(nitely.github.io)
1 points
by
nitely
2y ago
|
0 comments
14.
▲
by
nitely
2y ago
They are going to add boilerplate free error handling sooner or later. There are many proposals for "Go 2" already.
15.
▲
HTTP/2 in-depth server design
(nitely.github.io)
4 points
by
nitely
2y ago
|
0 comments
16.
▲
by
nitely
2y ago
Something not mentioned: web-browsers limit the number of connections per domain to 6. With +http/2 they will use a single connection for multiple concurrent requests.
17.
▲
by
nitely
2y ago
If those libraries are doing something at import time, then it could take any amount of time, TBF.
18.
▲
by
nitely
2y ago
I'll second this. There are a lot of good managers that care more about the product than some team metrics. Same for coworkers that care about improving. Don't let one bad manager define how you'll do things in your next job.
19.
▲
by
nitely
2y ago
Look-arounds can be implemented in quadratic time for unbounded expressions (i.e: containing +, *), and linear time for bounded expressions quite easily. And I suspect they can be implemented in (super)linear time in general by matching the
20.
▲
by
nitely
3y ago
Explaining the reasoning while solving the code puzzle is the most important part, though. Just being able to solve them without speaking a word has never been enough. Unless you are talking about automated coding tests (but that also has n
21.
▲
by
nitely
3y ago
idk who wins, but I'd assume extroverts need a quiet environment to be able to focus as much as anyone else.
22.
▲
by
nitely
3y ago
I implemented a variation long ago to parse regular expressions (regex) [0]. Albeit I did some pre parsing for things like character classes and lookarounds. [0]: https://github.com/nitely/nim-regex/blob/5e447
23.
▲
by
nitely
3y ago
How can you test all of that? through leetcode kinda questions you surely cannot. Maybe behavioral questions are close, but you would do those in both types of hiring processes, no?
24.
▲
by
nitely
3y ago
It's close to presidential election in Argentina. Gov won't do anything that gives them bad press. Plus I don't think they care at this point.
25.
▲
by
nitely
5y ago
CPython 3 does use UTF-32 under the hood for strings (there is bytes for plain sequence of bytes). As you say, it's the worst of both worlds. High memory usage, and not really useful if you are dealing with unicode characters (grapheme
26.
▲
by
nitely
5y ago
Of course it's possible, the Unicode standard even has a table[0] you can use to build a DFA (Deterministic Finite Automata) to break up a string into grapheme clusters. You can reverse the DFA to match and yield the graphemes backward
27.
▲
by
nitely
5y ago
You can, but you need to break the string into graphemes first.
28.
▲
by
nitely
6y ago
If we go by Alan Kay's definition, then we can argue Elixir/Erlang is an OO language [0]. It's not the first language one would think of when talking about OOP, is it? To me, OOP is all about implementation details. [0] http
29.
▲
by
nitely
6y ago
That's good to know. Is there an implementation of it? I know of TRE, regex-tdfa, ocaml-regex-tfa, and re2c, they all implement Laurikari's algorithm (or a variation of it), but have POSIX semantics.
30.
▲
by
nitely
6y ago
AFAIK, RE2 does not implement a tagged DFA. It implements a DFA that runs when captures are not required and/or to find a match within the text and then it runs the NFA to record the captures. I'm aware of Laurikari's algorit
More ›