Jul 15, 2018 13:29
@DocBrown: I did not say that code should never be changed (I do not see such a sentence in my comment). I agree that having automatic tests helps to change code, but nevertheless you should be aware that you are breaking something that was working to build something new. Being inflexible and never change anything leads to the problems you have described. Being overconfident because you have automatic tests and change code too often can produce code that is never really stable. IMO the best solutions lie between these two extremes.
Jul 15, 2018 13:29
@Doc Brown: "... because you did not write enough automatic tests" even with a lot of automatic tests, changing working code can introduce subtle bugs that are not detected by the tests. Changing working code is always a risk, even when using automatic tests.
 
Nov 13, 2016 17:18
I am going to have some dinner now. Thanks for the info and the chat. Maybe we catch up with each other some other time.
Nov 13, 2016 16:36
Which GNU/Linux distribution are you using?
Nov 13, 2016 16:33
I have first tried FreeBSD on an old computer for a while. Now I have decided to use it on my main PC. I do not have that much data: about 400 G in total.
Nov 13, 2016 16:28
How many disks do you have?
Nov 13, 2016 15:59
Anyway, I am filing a bug report right now.
Nov 13, 2016 15:59
I also had this problem. I copied the data to my main hard disk, reformatted with ext2, and copied it back. Before that I had installed it on a spare hard disk. You can find a second hand sata hard disk for very little money.
Nov 13, 2016 15:46
I have also used mainly GNU/Linux up to now. I am seriously considering FreeBSD.
Nov 13, 2016 15:39
Are you using FreeBSD? I have just started.
Nov 13, 2016 15:39
I have changed the title of the question on stackoverflow and on the FreeBSD forum. Maybe a developer will take a look at it? Otherwise I can file a bug.
Nov 13, 2016 15:35
Hello, thanks for the link. It is not me
Nov 13, 2016 15:32
@Ned64: Thanks for all the feedback. I have considered compiling the package from source and possibly inserting a few printfs to debug it.
Nov 13, 2016 15:32
@Ned64: More precisely: Does FreeBSD have problems using ext2fs with external USB hard drives that have a sector size of 4096 Bytes? I tested ufs on this drive and it seems to work OK.
Nov 13, 2016 15:32
@Ned64: The enclosures are identical and both disks are sold by the same company as 1T external drives. However, I found out that internally two different disks are used, even the vendors are different. I made further experiments and have posted a question on the FreeBSD forum (forums.freebsd.org/threads/58489).
Nov 13, 2016 15:32
I bought the disks with a built-in enclosure and I plug them directly on my computer using a USB cable. So there is nothing but the USB cable between the disks and my computer. Repartitioning the disks is not a problem: I am backing up my data right now, should be finished in one hour or so. I want to try using 512 logical sectors since, as far as I understand, it is not possible to change the physical sector size, because that is determined by the controller.
Nov 13, 2016 15:32
@dirkt: If this were the case, the problem should disappear when I remove the good drive (?) Anyway, running gpart list with only the bad drive attached gives the same result for stripesize and stripeoffset.
Nov 13, 2016 15:32
What puzzles me is that both disks are the same model, bought at a few months distance. Why do they have different physical block sizes?
Nov 13, 2016 15:32
@dirkt: However, it works without any problems under Linux. In any case, should I repartition the disk? Is it possible to change the sector size using a partitioning tool?
Nov 13, 2016 15:32
@wurtel: You mean read and write are disabled? I cannot find any complete documentation on the output of gpart geom so I do not know how to interpret the Mode field.
 
Apr 23, 2015 18:00
Bye bye
Apr 23, 2015 18:00
Ok, thanks for the hints. Maybe we meet in chat some other time.
Apr 23, 2015 17:55
Multiple inheritance turned out to be complex and we had a pretty sneaky bug lately
Apr 23, 2015 17:53
Maybe we should have considered the generic function + duck typing approach?
Apr 23, 2015 17:52
This is an interesting topic because we have a few places where we used inheritance in our code (at my workplace we work in Python).
Apr 23, 2015 17:52
Why wouldn't it be considered pythonic?
Apr 23, 2015 17:51
Ah OK.
Apr 23, 2015 17:50
What about adding a common superclass? Do you think it would be feasible?
Apr 23, 2015 17:49
They would all be one-liners.
Apr 23, 2015 17:49
Like it has to implement __iter__
Apr 23, 2015 17:48
Why?
Apr 23, 2015 17:48
Maybe
Apr 23, 2015 17:47
One reason not to add these methods is that there are the functions already.
Apr 23, 2015 17:47
My point was that it would not be difficult to add the methods. Like all collection must have an iter method, they could have a map, a filter method and so on. They could still share the implementation.
Apr 23, 2015 17:46
Hi, I understand your point: as soon as an object defines the __iter__ method, you can apply the generic function to it.
Apr 23, 2015 17:43
@WinstonEwert: Then each method can be a thin wrapper around this common function implementation using __iter__.
Apr 23, 2015 17:43
@WinstonEwert: What would be so bad about that? After all the existing function implementations have to discriminate between the different collections they are applied to in the same way as the corresponding methods would.
Apr 23, 2015 17:43
"There is no collection base class to put a map,reduce,filter etc on.": Why do you think that such methods should be put in a base class? Each collection classes could implement these methods and they would just happen to be there when you need them (duck typing).
 
Dec 22, 2014 19:24
@FaizanRabbani: Here is also on the Internet. ;-)
 
Dec 14, 2014 20:20
bye
Dec 14, 2014 20:20
good luck
Dec 14, 2014 20:19
I hope it works out, it is a cool problem anyway.
Dec 14, 2014 20:19
each time you do not find your function in the tree, you add a new branch
Dec 14, 2014 20:19
Using a dictionary you just build the tree from the bottom up
Dec 14, 2014 20:18
Oh, you are right, it is a tree because you only have unary functions!
Dec 14, 2014 20:17
Actually, if you build a dictionary along the way, you are building this DAG from bottom to top
Dec 14, 2014 20:16
DAG
Dec 14, 2014 20:16
so it is a directed acyclic graph
Dec 14, 2014 20:16
because you have no recursion