Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Drup
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
Drup
7y ago
Actually, it's been proved for ... longer than PERL exists ? The various features in PERL allow you to emulate context-free languages. There is a proof somewhere, but it's trivial to see you can use backreferences to parse languag
32.
▲
by
Drup
7y ago
As an alternative data-point: My firefox session is persistent (tab are restored when I open firefox again). Apparently, I'm around 500 right now, which is a bit above average for me (I usually stay around 300). Firefox's lazy loa
33.
▲
by
Drup
7y ago
SAT (and SMT) solvers are extremely optimized and very expressive. Writing an encoding from problem P to SAT is usually much simpler and easier to do correctly than writing a dedicated solver for P. SAT solvers are so efficient than very of
34.
▲
by
Drup
7y ago
No it isn't: The goal is to use a specific construction with specific cards to build a universal Turing machine. Unlike previous attempts, which used cards that leave some room for Player agenda, this new version doesn't.
35.
▲
by
Drup
7y ago
And yet the Sagrada Família is being slowly built in Barcelona, and financed mostly by tourism.
36.
▲
by
Drup
7y ago
If you wonder about linux: gcolor2 ( http://gcolor2.sourceforge.net/ ) does the job. And for size fetishists: it weights 42KB.
37.
▲
by
Drup
8y ago
Well, there are lot's of well known compiler techniques to handle closures in that context. It's a little bit out of scope of the article, but it's not very complicated either.
38.
▲
by
Drup
8y ago
The constraint on the language for this to work well is fairly natural and is actually described in the article: the language should follow lexical scoping. Unfortunately, since some dynamic languages do not respect lexical scoping, program
39.
▲
by
Drup
8y ago
It's untyped then simply typed basic imperative language, which is more or less the first few courses of programming language theory 101.
40.
▲
by
Drup
8y ago
What does that has to do with type systems? OCaml is one of the fastest compiler around, and yet it has a very rich type system. Julia also has a very rich type system, but is interpreted/JITed. Many compilers are very slow, even thoug
41.
▲
by
Drup
8y ago
That's ... actually pretty good! I'm usually quite frustrated by those, but this one is not so terrible. Some remarks: - Coq is not an ML at all, it's simply implemented in OCaml and has a vaguely similar syntax. I think depe
42.
▲
by
Drup
8y ago
Except Perl 6 doesn't enforce it, so you have to guess yourself if you are really in the regular case. Additionally, PCRE used to be exponential for certain "bad cases", some of which were (truly) regular expressions. My poin
43.
▲
by
Drup
8y ago
Well, except Perl doesn't parse regular grammars (it parses much more) and is far from being "one pass" (since the complexity guarantees are not valid anymore) ....
44.
▲
by
Drup
8y ago
No, Parsing expression grammar (PEG) are not regular grammars at all. For more resources, I think the related work of my paper has the main ones. The "Kleene meets Church" project has lot's of very good publications on the to
45.
▲
by
Drup
8y ago
This is cute! It's basically a nice syntax for full parsing of extended regular expressions. It would make for a very nice tool. Far too often, regular expression tools only implement "matching" (i.e., extract a list of strin
46.
▲
by
Drup
8y ago
Combinators make for a very nice Regex API. In OCaml, most people use the re[1] library for regular expressions (example[2]). I wrote a library called tyre[3] for typed extraction that follows a similar API. Of course these APIs are much mo
47.
▲
by
Drup
8y ago
Yes, that's why in Tyxml, we have a set of combinators and an HTML-like syntax, and you can compose them arbitrarily with each other. This way, you can use the HTML syntax (and c/c internet snipets) but still enjoy all the cool
48.
▲
by
Drup
8y ago
As the maintainer of a similar OCaml library[1], questions to the authors: - How compositional it is ? I have find that some of the HTML properties are very hard to verify in a compositional way, see https://github.com/ocsig
49.
▲
by
Drup
8y ago
Regarding ocsigen, It's more appropriate to point to tyxml[1] and its syntax extension [2]! Note that tyxml goes quite further than Rust's typed-html: the nesting is significantly more flexible, type inference is still complete, a
50.
▲
by
Drup
8y ago
My experience is that people who think that never worked with a language where inference is principal and complete (aka, "good") and/or have poor editor support. In languages that are still reasonably close to HM and that hav
51.
▲
by
Drup
8y ago
HM type inference works perfectly fine with separate compilation and/or partial files (whichever you mean). See the OCaml tooling for a concrete demosntration. Subtyping is a fairly large domain, and it really depends what you mean. Th
52.
▲
by
Drup
8y ago
On that topic, I recently wrote a tool to take a PDF file, an OCaml bytecode file (OCaml can compile to both byte or native code) and smash them together to create a file that is both a valid PDF and a valid bytecode. https://git
53.
▲
by
Drup
8y ago
So, if I remember correctly Ange Albertini's nomenclature, chimeras are particular types of polyglots where a single data is disguised as different file formats. For example, consider a file that is both a JPEG of a picture and a PDF w
54.
▲
by
Drup
8y ago
I'm not sure why this is linked. This online toplevel is very old. People who want a more modern version, with more exercises should follow the online MOOC [1] or use this website [2]. People who just want an online OCaml/Reason i
55.
▲
by
Drup
8y ago
The Mamluks are a major power stuck between the Ottomans and Persia with a weird government form that almost guarantees rulers with a 6 in paper mana. They somehow often colonize Australia.
56.
▲
by
Drup
8y ago
This probably means your code is wrong. You should not raise and catch exceptions normally in Lwt promises. You should use `Lwt.fail` and `Lwt.catch`. This is described rather precisely in the documentation: https://ocsigen.org&#
57.
▲
by
Drup
8y ago
Maybe JetBrain doesn't, but lot's of editor do, thanks to merlin, including vscode.
58.
▲
by
Drup
8y ago
Most strongly typed languages have such escape hatches ("Unsafe" in haskell, "Obj" in OCaml, "trustme" in Idris,....) . It's something you always need at some point when the typing is not sufficient to pro
59.
▲
Opening the doors of the Software Heritage archive
(softwareheritage.org)
5 points
by
Drup
8y ago
|
0 comments
60.
▲
Regenerate: test generation for regular expression engines
(drup.github.io)
4 points
by
Drup
8y ago
|
0 comments
More ›