HNHacker News
TopNewBestAskShowJobs

tizoc

867 karma · joined September 15, 2009

submissionscomments
tizoc··on A six-fold improvement in the Merkle tree storage for Tezos
From the article:

> Please note that the large spike in the TezEdge v1.15 RAM graph is caused by the update to protocol 011 Hangzhou. This included a major restructuring of the context tree, which is a very expensive operation. While the new representation of the context tree is better, it takes a while to migrate the past version’s tree to the new one.

The difference in range is caused by that spike (the "before" screenshot is from a node that has not reached that point).

Edit: you can also see the actual usage in the tooltip (and before the spike and protocol switch, the memory usage for the TezEdge one was even lower)

tizoc··on Mono 4.0.0 Release Notes
Sorry, saw it on reddit as "Mono 4 Released"[1] and reposted here, without noticing it was just a draft (the "THIS IS A DRAFT" comment wasn't there at the moment).

[1] http://www.reddit.com/r/programming/comments/31ezp0/mono_4_r...

tizoc··on Shen more strongly typed than Haskell?
In Scheme asking for the car or cdr of an empty list is an error, and in Common Lisp it isn't (the result is the empty list itself).

In Shen you have "hd" and "tl" which use whatever the platform provides (in Scheme it is going to fail, in Common Lisp it is going to return the empty list), and "head" and "tail" which work the same on all platforms (it is an error to pass an empty list to them, just like in Scheme).

> If I manage to get Shen working (under Chibi) it will be even more interesting to see what it does.

What problems are you experiencing? Please submit an issue on Github and I will look into it.

tizoc··on A shallow survey of formal methods for C code
> I wonder if one day we will be able to use a lighter version of formal methods to web development.

https://en.wikipedia.org/wiki/Type_system#Type_checking

tizoc··on Shen is a portable functional programming language
That depends on the port. The Clojure port allows this:

https://github.com/hraberg/shen.clj#神-define-prolog-and-defp...

tizoc··on Shen is a portable functional programming language
It means that to be portable you have to wrap symbols that represent functions in (function <the-symbol>) when passing them as arguments. Not doing so will work on some ports but not on others, and should be considered "undefined behaviour".

Portable:

(foldl (function +) 0 [1 2 3])

May work depending on the backend:

(foldl + 0 [1 2 3])

tizoc··on Why We Use OCaml
It is quite new compared to what others posted: https://github.com/rgrinberg/opium
tizoc··on Exec($_GET
Another one with even more results: https://github.com/search?q=eval%28%24_GET&type=Code&ref=sea...
tizoc··on What I Didn't Say
https://alastairadversaria.wordpress.com/2012/08/07/of-trigg...

Search for "Offence trolling" and read that section please (the whole article in general is good, but that section talks specifically about what you are talking about).

tizoc··on Rust is surprisingly expressive
From where is that?

This is how it works in C# (and .NET in general)

DateTime.Now.AddDays(-2)

Not wanting to overload integers with calendar functionality doesn't mean you have to make it so cumbersome.

Edit: typo

tizoc··on Real World OCaml
Another one: Effective ML

http://vimeo.com/14313378

tizoc··on How Homakov hacked GitHub & the line of code that could have prevented it
In Django (and Python in general) you have a form abstraction that validates the user input and filters out unwanted fields, preventing problems like this. On Rails (and Ruby in general) they don't use such abstraction (I do myself, using an implementation of forms abstractions[1] very similar to what Django provides).

Instead they send the params dictionary (which contains url captures, POST and GET values) directly to the model instance, and expect the model to deal with it. The problem with this approach is that it gives too much responsability to the model. Other than forms not necessarily mapping directly to models, making this more complicated, it is also prone to security issues, like the one Github suffered. ActiveRecord (Rails ORM) allows you to whitelist and blacklist fields at the model level (which IMO is the wrong way to do this, Django got it right), but a lot of people don't do it.

[1] https://github.com/tizoc/bureaucrat

tizoc··on Ruby Frameworks? Which one? Bye bye Rails.
I'm working on Fiasco, which intends to be similar to Flask but for Ruby. It is still a work in progress, but you can see it here: http://tizoc.github.com/fiasco
tizoc··on Python-Dev: Adding braces to __future__
I think the reason for asking for the patch was the [PATCH] in the subject.
tizoc··on Dojo Toolkit 1.7 Released.
It is modular, you only use the modules you need, and you only load the javascript you need. As for data-*, you only use that if you want, it is a feature provided by another module. If you don't like it then don't use that feature and don't load that module ('dojo/parser'). You can create widgets programatically like in jQuery (and thats what I do).
tizoc··on Dojo Toolkit 1.7 Released.
Dojo is extremely modular (unlike jQuery which is has a pretty big monolithic core and overloads $ for almost everything).

If what you have to do is manipulate the DOM and do XMLHttpRequests, then jQuery is more than good enough, otherwise Dojo has a lot to offer.

Some features from Dojo which are not about DOM manipulation or XMLHttpRequests that I use a lot:

- AMD-style modules (you can have this with jQuery, but Dojo is built with AMD from the ground up) http://livedocs.dojotoolkit.org/loader/amd

- the build system http://livedocs.dojotoolkit.org/build/index

- object stores http://livedocs.dojotoolkit.org/dojo/index#store-dojo-store

- deferreds (jQuery has these now) http://livedocs.dojotoolkit.org/dojo/Deferred

- templated widget definitions http://livedocs.dojotoolkit.org/dijit/_TemplatedMixin

- publish/subscribe http://livedocs.dojotoolkit.org/dojo/publish

- observable attributes http://livedocs.dojotoolkit.org/dojo/Stateful

This doesn't mean that you should be using it, just use what feels better for you. For some people (like me), Dojo is what feels better.

tizoc··on Mpd + ncmpc - perfect combo for iTunes replacement - Tuan Anh Tran
I have been happy with cmus[1] for years, both in Linux and OSX.

[1] http://cmus.sourceforge.net/

tizoc··on Overtone
If you like Impromptu, take a look at Extempore by the same author. Unlike Impromptu, Extempore is open source, and runs on Linux and Windows too.

https://github.com/digego/extempore

tizoc··on Overtone
The author of Impromptu is now working on Extempore, which unlike Impromptu, is opensource, and runs on other operating systems other than OS X.

https://github.com/digego/extempore

tizoc··on Speeding up Rails startup time
rpg works by installing everything on a common directory: https://github.com/rtomayko/rpg

If rubygems did this, everything would be much better.

There is one problem though, and it is that some libs are bad citizens and install stuff outside of lib|bin and depend on it (haml's VERSION file is an example of this), and that sucks.

rpg has a 'shitlist' with fixes for specific cases: https://github.com/rtomayko/rpg/blob/master/rpg-shit-list.sh...

tizoc··on LSD: The Geek's Wonder Drug
You shouldn't worry about some random person on the internet believing you or not, but sharing experiences is good anyway.

The woman part was the interesting part to me because thats something recurrent, the presence of a woman (maybe not a woman, but a femenine entity)

I get the pressure while on the effect, and most of the people I have seen smoking extract here at home do too (some just getting pulled to a specific direction, others feel a rotating force). Not everyone gets the same physical effects but a lot of it is common. Something that happens to me that so far only one friend has shared is being split in two (we feel it on the tongue, the nose, the chest, the whole body, left is separated from right).

But the physical aspects of the experience are not what I find problematic for trying to do something like scribbling, it is the mental aspect. Do you even know that you are under the effects before they are already fading out? do you remember that you wanted to scribble? do you know who are the people there with you? mm.. do you even know that there are people there?

How did you guys (in your experiment) consume it? smoked extract? smoked leaves? chewing leaves?

After such positive results, did you ever try the experiment again? if not, why not? (if I had such experience I would like to try more and more)

tizoc··on LSD: The Geek's Wonder Drug
I just can't visualize anyone doing any kind of meaningful thinking while in the influence of salvia divinorum, or scribbling, the effect is just too strong and too disconnected from our reality. The only thing in your story that gives it a bit of credibility is this: "He claimed a woman told him the answer."

Anyway, not enough to convince me.

Edit: of course, I would like to know more :)

tizoc··on 1st draft of R7RS small language available (all changes listed on linked page)
Keep in mind that what you see on that Draft is just for the "small language", which is being worked on by the "Working Group 1". Then there is "Working Group 2" which is going to take care of building a standard library of non-core features. This means that R7RS in it's whole is going to be more than R5.1 -- but the separation is needed imo is wide adoption is desired.

You can get more information here: http://scheme-reports.org/

tizoc··on 1st draft of R7RS small language available (all changes listed on linked page)
R6RS was controversial and didn't get that much adoption. And yes, this is official.