HNHacker News
TopNewBestAskShowJobs

vbit

344 karma · joined September 14, 2013

submissionscomments
vbit··on The difference between top-down parsing and bottom-up parsing
Another good write-up on this topic is http://blog.reverberate.org/2013/07/ll-and-lr-parsing-demyst...
vbit··on What is special about Nim?
Slices start at 0, not 1. However they are inclusive of both boundary items. This matches how ranges are specified in Nim.
vbit··on What is special about Nim?
The 0s and 1s are specific to the examples. A range in nim `x..y` includes both x and y. Sequences are always 0-indexed. Now, if you want to start with 1 for any range you can.
vbit··on Nim (formerly Nimrod) 0.10.2 released
Maybe you can't. But you can get the small companies and individuals first. Slowly the contributions make the ecosystem stronger and bigger and risk-averse organizations then can hop on as well. This is pretty much how Python grew.
vbit··on Nim (formerly Nimrod) 0.10.2 released
There is nothing quite like Nim in the other languages you mention. Nim's GC is different than most of the others and you can also control it so it only runs for a certain amount of time. Nim is also very expressive and clean. The meta-programming capabilities are fantastic. Its overhead is significantly lower than the JVM and it is cross platform (unlike .net).
vbit··on Nim (formerly Nimrod) 0.10.2 released
Care to give an example of a language you find beautiful?
vbit··on FreeBSD coming to DigitalOcean
Have you seen vultr.com? There's also atlantic.net and dediserve.com for comparison.
vbit··on Simple Language Implementation Techniques for the 21st Century
Apart from the time and effort spent in writing the AOT compiler as the other poster mentioned, there is also the question of compiler complexity.

You seem to be implying that JITs are somehow more complex and only help with languages having no static typing. Both assumptions aren't quite true. Also, consider the cases where it's much easier for a JIT to produce code, as it has more information than a static compiler.

For e.g. which functions should be inlined? Which mechanism should be used for dynamic dispatch? If you have 10s of types possible at one dispatch but only two seen in practice, the tracing JIT will only compile the fast paths with an exit for the other paths. The AOT compiler will have to produce a vtable or big switch statement to handle all the types as it lacks the runtime information. Which would you consider 'quality code'?

vbit··on Simple Language Implementation Techniques for the 21st Century
Have you looked at http://terralang.org/ ?

It may be a good toolchain if you're targetting static compilation using the LLVM.

vbit··on File Systems, Data Loss and ZFS
Interestingly I switched from Linux to FreeBSD around 2002, primarily because I was frustrated with Linux sysadmin. Perhaps I was more of a newbie but the inconsistencies in Linux system organization and the confusing, low quality, half-obsolete docs, and unbounded time required for troubleshooting were some of the reasons. When I switched to FreeBSD and started using ports, my sysadmin time dropped significantly. But I was only using a single system.
vbit··on File Systems, Data Loss and ZFS
As others stated, binary package management is state-of-the-art now, thanks to the `pkg` command (aka the pkgng system). In fact I can never remember all the sub commands for apt+dpkg but pkg is a dream by comparison. I particularly like `pkg audit` - https://www.freebsd.org/doc/handbook/pkgng-intro.html#pkgng-...

Btw, I would completely disagree that the sysadmin side is or was behind Debian. FreeBSD is way easier to sysadmin than most Linux, even without pkg.

vbit··on The Cost of My Mother’s Cardiac Care in the United States and India
1 USD ~ 60 INR

https://www.google.com/search?q=34000+inr+in+usd

=~ $600 US

vbit··on Time Travel Simulation Resolves “Grandfather Paradox”
Say I go back in time. Does it mean I disappear from the time I was in? And I'm in two places at a point in the past (the me from that time and the me from the future)? Now if I want to go back to the time I came from, do I join back at the exact time I left (which means no one would notice my travel), or would I have to travel back to the time I left + the elapsed time I spent in the past? And if I really did return to the exact time I left, does that really mean no one noticed my leave? Because I'm sure when I left time continued and somebody noticed.
vbit··on Show HN: LuaJIT FFI binding to libuv with coroutines
While I agree that LuaJIT is great piece of work, the linked page says Mike is not accepting sponsorships at this time and there doesn't seem to be any way to fund him.
vbit··on The Future Programming Manifesto
I think you are not stepping back far enough to look at the problem. Are you actually suggesting the entire complexity of the current web-stack (html, css, js and server side code) is essential to make web-apps?
vbit··on Show HN: LCON – Ludicrously Compact Object Notation
I'm waiting for ubjson http://ubjson.org which is probably the most compelling json replacement I've seen yet.
vbit··on Go 1.4+ Garbage Collection Plan and Roadmap
> That helped some but a Nginx/LuaJIT implementation of the same solution still crushed it on the same box, identical workload.

That's very interesting because LuaJIT has GC as well. Could you please reveal a bit more about the type of application, number of lines, and if the code is public?

vbit··on Transducers are coming to Clojure
I'm not quite sure what this means, so here's my attempt to translate this into Python. A reducer is a function such as `add`:

    def add(sum, num):
      return sum + num
  
Of course you can plug `add` directly in `reduce(add, [1, 2, 3], 0)` which gives `6`.

A transducer is an object returned by a call such as `map(lambda x: x + 1)`.

You can now apply the transducer to a reducer and get another reducer.

    map_inc = map(lambda x: x + 1)
    add_inc = map_inc(add)
    
Our first reducer simply added, but the next one increments and then adds. We can use it as `reduce(add_inc, [1, 2, 3], 0)` which gives, I'm guessing, `9`.

Since the transducer returns a reducer as well, we can compose transducers:

     r1 = filter(is_even)(map(increment)(add))
     # use r1 in reduce()
     
It seems in clojure, reduce() isn't the only useful function that works with reducers, there are others which makes this all worthwhile.

Is my translation accurate?

vbit··on Arrow: Better dates and times for Python
Good point. However this is a specific use case requiring future local time, and as you mention, even TZ aware local time fails here. In this case you cannot come up with a guaranteed physical time in the future that the event will take place.

IOW, I think storing local time and location as a rule is not a good idea. The rule should be to use UTC and store location if needed. Only if that doesn't work (e.g. '5 minutes after the game is over') come up with some other representation.

vbit··on Arrow: Better dates and times for Python
> Yes, it would be better if raw data was recorded in UTC in the first place but when working with such data the ability to make decisions and inferences from the TZ is very useful.

I maintain that time and location are orthogonal. If the application needs both, store both - properly in separate fields. That's better than shoving the granular location in the form of a timezone in the time field.

vbit··on Irken Language – A Scheme with parametric polymorphism
What is misguided - rtti or type-based dispatch - and why?
vbit··on Arrow: Better dates and times for Python
I did not know about DMC and am very happy to see this as I've often desired a simple but proper API for time. I always wondered why so many date+time libraries complicate matters so much.

I strongly agree with the principles you chose - specificaly - all time storage and math should be done in UTC (the 'unicode' of time). Timezones only come in when you display or parse times (the 'encodings' of time).

I hope more and more libraries apply this idea. It makes the API a lot simpler and error retardant.

Good job!

vbit··on Docker containers should not run an SSH server
Being part of util-linux makes sense. However, it would be so much nicer if I didn't have to look up those two lines.
vbit··on Docker containers should not run an SSH server
Wow. Given all the hype around docker, I'm really surprised nsenter type functionality isn't part of the core. Glad I'm using FreeBSD where running a shell in your jail is just 'jexec my_jail bash'. Compare that to the rigamarole described in the article. Maybe the docker guys will benefit from just reviewing the tooling for existing systems. I also recommend a look at ezjail-admin.
vbit··on Testing Free Will with Single-Neuron Measurements of Pre-Conscious Activity
Well I'm arguing that determinism implies there may be a conscious you, but there can't be a you that has choice. Anyway, I think I see what you are getting at and can accept that as a philosophical position even though I don't hold it. It has to do with the partly arbitrary line defining you. It also seems you are suggesting we look at the world from two different angles - one that is purely deterministic and one that has the concept of you and your choices, their results etc.
vbit··on Testing Free Will with Single-Neuron Measurements of Pre-Conscious Activity
> That the you that is follows from other things is immaterial in regard to 2 (it is material in regard to 1).

I don't see it that way. The you that is follows from the (you, stuff that isn't you) at the previous moment. Your actions and the results are both a consequence of the previous (you, stuff that isn't you).

In other words, I'm having trouble differentiating you from the stuff that isn't you. I just imagine the world is a giant mechanical machine, churning along according to some physical laws, where the you is just a conscious entity that identifies itself with small subset of atoms in the machine and believes it can affect the movement of those atoms.

vbit··on Testing Free Will with Single-Neuron Measurements of Pre-Conscious Activity
I think I'm in camp #2, and I lost you at 'but if you were a different you, and made a different decision..'. If your thoughts and actions are fated, how can you be a different you? Or try harder? Isn't all that fated? First you tell me that I don't have real choice, but then you tell me to exercise that choice.
vbit··on Testing Free Will with Single-Neuron Measurements of Pre-Conscious Activity
> Right, but in that example, the question of choice doesn't come into play. The paralyzed driver knows what it means to take a life, but they cannot act, regardless of determinism's validity.

Yes, but doesn't determinism mean that all of us 'cannot act'?

> From a moral perspective, there is no distinction between the illusion of control and actual control

Are you saying a fully capable driver would be culpable if he was under the illusion of full control while he drove over a pedestrian? Consider a vehicle malfunction, which goes unnoticed by the driver, leading him to believe he didn't brake or steer fast enough. Is the driver still at fault or is it the car? Doesn't actual control matter?

vbit··on Testing Free Will with Single-Neuron Measurements of Pre-Conscious Activity
> if punishment doesn't work, we can stop wasting time on it and expend our energy on more constructive responses

You assume we can choose which direction to go towards. With no free will, we have as much choice in expending our energy as offenders had in committing offenses. It's absurd to state 'we can' or 'we should' while assuming a fully deterministic world.

vbit··on Testing Free Will with Single-Neuron Measurements of Pre-Conscious Activity
> We ascribe moral culpability to the human killer not because of their choice to kill, but because of our own perception that the killer understands what it means to take another life.

Choice is most definitely a factor determining moral culpability. Consider a driver who drives into a pedestrian killing him, because at an unfortunate moment, the driver was paralyzed by an unexpected stroke. The driver witnessed the entire event with full understanding of what it means to take a life. Is he morally culpable? I would say no, because he was not in control. You can also imagine similar scenarios involving coercion or accidents.

The key point is whether we are in control of our actions, or merely witnesses with the illusion of control. I don't see how this can be separated from moral culpability.

← PreviousPage 4 of 5Next →