HNHacker News
TopNewBestAskShowJobs

padator

59 karma · joined April 7, 2014

submissionscomments
padator··on Principia Softwarica: Fundamental Literate System Programs
Thx a lot for the nice words pona-a. Here is my presentation of principia at the IWP9 workshop if you are interested: https://www.youtube.com/watch?v=blVTDhr4QN8
padator··on Typical: Data interchange with algebraic data types
What is the difference with ATD: https://atd.readthedocs.io/en/latest/atd-project.html which also was designed with algebraic data types in mind?
padator··on Writing a Game Boy Emulator in OCaml
Not sure you really need GADTs for the instruction set. A separate arg8 and arg16 ADT types would be enough, so you would have | Add8 of arg8 * arg8
padator··on Show HN: Semgrep App
Why OCaml? It's a great language to write programs that works on complex data structures, e.g. ASTs. This choice was actually not very original: people in academia at stanford, berkeley, Microsoft research used OCaml for program analysis (CCured, Saturn, CIL, SLAM). And now and now the industry is also using it (Facebook Infer, Facebook Hack/Flow/Pyre, MS Static Device Verifier, etc.)
padator··on Show HN: Visualizing a Codebase
Shameless plug, but this was also showing the content of the file! https://github.com/facebook/pfff/wiki/CodeMap

There are lots of examples of OSS projects visualized here: https://github.com/facebookarchive/pfff/wiki/Examples

padator··on The Mercury functional programming language
I think it's more related to Prolog than functions. In prolog you can use a predicate in many ways. For example append(L1, L2, L3) declared that the concatenation of the list L1 and L2 result in L3, but you can use it in a "reverse" way too (thx to Prolog awesomeness) like append(L1, L2, [1,2,3]) and Prolog will enumerate all possibilities for L1 and L2. This can be slow though, and I think 'mode' is a way to declare all this different way to use prediate (in, int, out), (out, out, in), etc. and maybe compile things efficiently. See https://www.mercurylang.org/information/doc-latest/mercury_r...
padator··on Green Threads Explained
OCaml uses green threads where you can cooperate (yield()) or be preempted every 50ms.
padator··on Dentsu CEO resigns after overworked employee commits suicide
Suicide seems a bit extreme. Could she not just quit? Also everyday people commit suicide. Why do we blame CEOs for that?
padator··on Codebase Refactoring with Go
There is one such tool for C: coccinelle http://coccinelle.lip6.fr/
padator··on Gosubc – An implementation of the SubC language in Go
So? Is it shorter? How much shorter? How does Go improve over C? Just curious.
padator··on 500 Lines or Less – A Python Interpreter Written in Python
I count more than 30 000 LOC at https://github.com/JeffBezanson/femtolisp
padator··on Build System Rules and Algorithms (2009) [pdf]
You can use mk, the successor to make, which does not have the TAB requirement (you can use TAB or spaces interchangeably).

Regarding JSON, it is more verbose than Make. You need to use quote around strings, commands, everything. Compare:

foo.o: foo.c gcc -c foo.c

with

{ 'foo.o' => ['foo.c'; 'gcc -c foo.c'] }

padator··on Ecaml – Writing Emacs Plugins in OCaml
What about an Emacs-like editor fully written in OCaml: https://github.com/aryx/fork-efuns Easy to write an Emacs plugin then ...
padator··on Literate programming: presenting code in human order
Regarding the tangle barrier issue, there is a tool that helps: https://github.com/aryx/syncweb It allows to modify both the original WEB document and code and keep them in sync.
padator··on Scratchapixel: Computer Graphics Programming from Scratch
99% of the computer graphics you see on your screen everyday are made of simple lines, circles, curves, and text in 2D. 3D is useful mostly for games, movies, and CAD software. I don't understand this over focus on 3D. I think the latest edition of "Computer Graphics: principles and practice" does not even teach bresenham anymore. This seems wrong to me.
padator··on What Was the Greatest Era for Innovation?
There is one book doing that: http://the-knowledge.org/en-gb/the-book/ It's a great book.
padator··on TMSU: a tool born out of frustration with the hierarchical nature of filesystems
An old solution to this problem was the Logic File System https://en.wikipedia.org/wiki/Logic_File_System (disclaimer: I am one of the author).
padator··on 50 best HackerNews posts ever (found using math)
So I guess this medium post will eventually be part of his own list.
padator··on Ulix – a Literate Unix
Look at the ulix-book-0.13.nw file. It is the literate document. It contains all the code for the kernel.
padator··on Why ML/OCaml are good for writing compilers (1998)
There are many ways to avoid the boilerplate you mention. The deriving ppx extension is one of them. I personaly used my own poor's-man-deriving called ocamltarzan which I used in pfff to factorize boilerplate by using auto-generated visitors. See https://github.com/facebook/pfff/blob/master/lang_php/parsin...
padator··on Why We Use OCaml
> Using a not very popular programming language can actually make it harder for you to hire people.

Some evidence this is just not true: http://gazagnaire.org/pub/SSGM10.pdf

padator··on Rreverrse Debugging
OCaml had a time-traveling debugger for 20 years now. Good job catching on. (to be fair it got full stack back trace only since 2000 so far later than Perl for that).
padator··on Ask HN: How do you familiarize yourself with a new codebase?
I use CodeMap[1] which is a kind of google maps but where the countries are the code, and CodeGraph[2] which helps to understand code dependencies at different granularities (package, module, files, functions). [1] https://github.com/facebook/pfff/wiki/CodeMap [2] https://github.com/facebook/pfff/wiki/CodeGraph

disclaimer: I am the author of those tools.

padator··on Review: UndoDB, a reversible debugger
Seems similar to what ocamldebug does in ocaml (which itself was copied from the SML debugger).
padator··on Namespacing Variants in ML
One thing to consider though is the grepability of a codebase. By relying more on nested modules, module aliases, opens, local opens, then many constructors have more than one way to be written and it makes it harder for grep to find what you look for. Of course people should not use grep and instead rely on IDE or tools that understand deeply the programming language being edited ... which makes the problem I mentioned go away. But still it's nice to have the possibility to use simple tools like grep and that they would simply work.
padator··on Kythe – A pluggable ecosystem for building tools that work with code
or to pfff: https://github.com/facebook/pfff
padator··on Kythe: A pluggable ecosystem for building tools that work with code
A similar effort by Facebook open sourced 4 years ago: (I'm one of the author) http://github.com/facebook/pfff/wiki/Main with indexers for PHP, C, Java, Ocaml, and preliminary support for many other languages.
padator··on Visualising dependencies in Go
You should try Dependency Structure Matrix. In my experience they are more scalable than other forms of software visualization. See https://github.com/facebook/pfff/wiki/CodeGraph
padator··on Show HN: Lit – a modern literate programming tool
Wow nice. Found http://comments.gmane.org/gmane.emacs.orgmode/32814 but I'm not sure the workflow is as convenient as syncweb. Syncweb has a unison interface to synchronize which allows to very quickly synchronize many chunks automatically. Syncweb can automatically know in which direction things need to be synchronize. If one modify the code, then the synchro will update the org, if one modify the org, then the code will be regenerated. If one modify the org, and the code at the same place, then a conflict will be detected.
padator··on Show HN: Lit – a modern literate programming tool
Do you have a link explaining this org-mode feature?
Page 1 of 2Next →