News for hackers. Stuff that matters.

tizoc

Re:A six-fold improvement in the Merkle tree storage for Tezos on Thursday February 24, 2022 @04:58PM (#30460869)
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)

Re:Mono 4.0.0 Release Notes on Sunday April 05, 2015 @12:07PM (#9324405)
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...

Re:Shen more strongly typed than Haskell? on Tuesday September 09, 2014 @10:15AM (#8290205)
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.

Re:A shallow survey of formal methods for C code on Monday September 08, 2014 @11:54AM (#8285463)
> 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

Re:Shen is a portable functional programming language on Sunday August 31, 2014 @07:39PM (#8250875)
That depends on the port. The Clojure port allows this:

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

Re:Shen is a portable functional programming language on Sunday August 31, 2014 @07:37PM (#8250866)
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])

Re:Why We Use OCaml on Wednesday July 16, 2014 @10:14PM (#8045661)
It is quite new compared to what others posted: https://github.com/rgrinberg/opium
Re:Exec($_GET on Tuesday April 29, 2014 @09:18AM (#7666739)
Re:What I Didn't Say on Monday December 30, 2013 @10:06PM (#6988699)
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).

Re:Rust is surprisingly expressive on Saturday December 28, 2013 @03:14PM (#6976276)
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

Re:Real World OCaml on Monday November 11, 2013 @09:38AM (#6711762)
Another one: Effective ML

http://vimeo.com/14313378

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

Re:Ruby Frameworks? Which one? Bye bye Rails. on Tuesday January 31, 2012 @08:29AM (#3533108)
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
Re:Python-Dev: Adding braces to __future__ on Monday January 02, 2012 @11:07AM (#3416287)
I think the reason for asking for the patch was the [PATCH] in the subject.
Re:Dojo Toolkit 1.7 Released. on Thursday December 01, 2011 @04:21PM (#3301430)
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).
Re:Dojo Toolkit 1.7 Released. on Thursday December 01, 2011 @04:18PM (#3301418)
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.

Older »