HNHacker News
TopNewBestAskShowJobs

vrotaru

237 karma · joined March 9, 2010

[ my public key: https://keybase.io/vrotaru; my proof: https://keybase.io/vrotaru/sigs/KZF_cku3RH0RTExvxtBGDZhPyshtOOOYpk-rWWa7ArY ]
submissionscomments
vrotaru··on I have complicated feelings about TDD
Even for something which is well defined up-front this can of dubious value. Converting an positive integer less than 3000 is well-defined task. Now if you try to write such a program using TDD what do you think will end up with?

Try it. Write a test for 1, and an implementation which passes that test then for 2, and so on.

Bellow is something written without any TDD (in Java)

    private static String convert(int digit, String one, String half, String ten)     {
    switch(digit) {
    case 0: return "";
    case 1: return one;
    case 2: return one + one;
    case 3: return one + one + one;
    case 4: return one + half;
    case 5: return half;
    case 6: return half + one;
    case 7: return half + one + one;
    case 8: return half + one + one + one;
    case 9: return one + ten;
    default:
    throw new IllegalArgumentException("Digit out of range 0-9: " + digit);
    }
    }

    public static String convert(int n) {
    if (n > 3000) {
    throw new IllegalArgumentException("Number out of range 0-3000: " + n);
    }

    return convert(n / 1000, "M", "", "") + 
        convert((n / 100) % 10, "C", "D", "M") +
        convert((n / 10) % 10, "X", "L", "C") +
                convert(n % 10, "I", "V", "X");
}
vrotaru··on Advanced, modern code editor written in Tcl/Tk
There are some on Wiki: https://github.com/phase1geo/tke/wiki/Bird's-Eye-View

Which let's you know what you can expect. Also the wiki seems rather good.

vrotaru··on Asus Zenfone 9
Sony is pretty much stock as well. Mine came with FB and LinkedIn pre-installed though.

The updates are decent and I had no problems with them.

vrotaru··on Skip: A programming language to skip the things you have already computed
Well Julien Verlaguet is the original author of SkipLang, so "proprietary fork" does not deserver the square quotes, IMO
vrotaru··on OCaml Multicore merged upstream
OCaml had threads. There even a Threads module in standard library. The limitation was that only one thread can run at any given time.

P.S There were ways around it, like calling an extern C function which will spawn a new theead and call and pass the control back, but those were almost never used.

vrotaru··on Chrome OS overtakes Macs for second place OS market share for the first time
> I'm curious what the best way to develop software for ChromeOS is that's not writing a web app.

Get hired by Google to work on Chrome OS. Certainly the best way. Afraid is also the only way.

More seriously. Chromebook have several native apps. The browser, the file browser the gallery app, the movie player.. and that's all I guess.

There is chromebrew but it requires you to put the device in dev-mode and it very niche.

The are some PWA which seem to work only with Chromebooks, but that's different I guess.

vrotaru··on JEdit – Programmer's Text Editor
The Isabelle Proof Assistant[1] uses JEdit as its IDE. Just thought it is worth mentioning.

[1]: https://isabelle.in.tum.de/

vrotaru··on An Incremental Approach to Compiler Construction (2006) [pdf]
http://www.cs.umd.edu/class/fall2021/cmsc430/index.html

Check this: Based on ideas from the paper above quite accessible.

vrotaru··on Ada is not just another programming language (1986)
Not sure that is the actual reason. (Also define worth it)

Wirth had developed that original, but misguided (IMO) notion that the faster a compiler can compile itself the better it is.

Consequently he has removed a lot from latest iterations of its languages/compilers

Pascal had an enum-like feature we could define an enumerated type.

Wirth removed it because... `CONST` should be enough for everyone.

Obviously it has simplified the compiler and increased the self-compilation speed. But I would not call that an improvement.

vrotaru··on Inkscape 1.1.1 Is Released
Some has investigated the a slow gtk3 program on Mac and found the program was spending a second drawing shadows under 4 (I guess) buttons.

That's downright impressive!

vrotaru··on Minimum wage would be $26 an hour if it had grown in line with productivity
Why do you think the capitalist pay programmers so much?
vrotaru··on Why is a Dollar like a Neanderthal
Stanislav Lem has a story about the attempts to change the history where the Einstein was never born but his theories were developed but

Unapietra, Odnocamenec, Onestone and so on..

vrotaru··on OnlyFans to block sexually explicit videos starting in October
> Is it really such a mystery?

Powerful "Blame your political opponents" move and damn those Chesterton fences.

On a more serious note, it is not just porn and it's all about gene survival.

Men who do not care about the sexual freedom of their partners tend to got the way of Dodo. (for obvious reasons).

But I grant you that they may a live a more pleasant and relaxed life.

vrotaru··on Multicore OCaml: May 2021
The documentation say yes.

With a caveat. If you depend on some cygwin libs for your ocaml program you need them on the other machine too.

Maybe you can copy them over as well. Or not. Not a win dev, sorry.

vrotaru··on Multicore OCaml: May 2021
Well, installing OCaml from sources was always considered the hard way.

Now there is https://fdopen.github.io/opam-repository-mingw/installation/

Basically you just need Cygwin and you are good. It worked for me when I last tried it.

vrotaru··on Why Is JRuby Slow?
IBM J9 has something called the JIT server. My understanding that JIT is done is one process and then provided as a service to clients (other processes)

Never used it though, so no idea how it works in practice.

vrotaru··on Update to Git changes the default of init.defaultBranch to main
And if it doesn't?
vrotaru··on Docable: Literate Runbooks and Interactive Tutorials from Markdown
Thanks. Good to know
vrotaru··on Docable: Literate Runbooks and Interactive Tutorials from Markdown
Markdown is eating out the (software) world.

Not that I object.

vrotaru··on DIY Video Hosting
Looks like we can assume a few things about the implied audience.

Highly (or highishly) technical people ready to pay for video courses. One can infer from that a they have a good enough connection.

Is not like everybody should be Facebook, and have his video content available for all devices and bit rates.

vrotaru··on The pervert's guide to computer programming languages (2017) [video]
They both out of the chart!
vrotaru··on F# Pipeline Operator in JavaScript with Babel
It appeared first in F#. The 4.01 version is quite recent actually.

F# was based on 3.xx, or maybe, even, 2.xx OCaml.

https://docs.microsoft.com/en-us/archive/blogs/dsyme/archeol...

vrotaru··on GNU Compiler Collection Internals [pdf]
If Haskell is your thing, this may be of interest

https://lukelau.me/kaleidoscope/

vrotaru··on OCaml on Baremetal Shakti RISC-V Processor
Yes.
vrotaru··on Use Turbo Modula-2 Instead of Turbo Pascal Under CP/M? (2013)
XDS Modula-2 - https://www.excelsior-usa.com/xds.html
vrotaru··on Linear types can change the world (1990) [pdf]
A few years ago I would have suggested LinearML - https://github.com/pikatchu/LinearML.

Now it may be quite a challenge, to just compile it.

vrotaru··on Code together in real time with Teletype for Atom
> but couldn't emacs have bindings for lua or python or something?

It can, and here is an example: https://blag.bcc32.com/ecaml-getting-started/2017/11/05/emac...

And here is a better link I guess: http://diobla.info/blog-archive/modules-tut.html

vrotaru··on With a $1k Price, Apple’s iPhone Crosses a Threshold
Everywhere else had it more expensive, but everywhere else IPhone are... well not niche, but definitely way less pervasive
vrotaru··on Knolling
I had once had to take apart an optical camera.

The approach which worked for me was:

a) Unscrew a few parts b) Screw them back c) Unscrew a few parts and some more d) Screw everything back in that same order ) .. repeat until done

Finally, it all ended well

vrotaru··on An OCaml manifesto – Problems and what's needed for widespread adoption
I like OCaml, just.. Has it ever been anything which can be called a successful manifesto?

I, certainly, do not remember one for JS or Node.

← PreviousPage 2 of 6Next →