Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  using HS to writing/managing a selfmade filesystem on a
      real partition? (Sylvain Henry)


----------------------------------------------------------------------

Message: 1
Date: Mon, 9 May 2016 23:12:39 +0200
From: Sylvain Henry <sylv...@haskus.fr>
To: beginners@haskell.org
Subject: Re: [Haskell-beginners] using HS to writing/managing a
        selfmade filesystem on a real partition?
Message-ID: <b325f335-d475-400e-dbfa-b9fc473dd...@haskus.fr>
Content-Type: text/plain; charset="windows-1252"; Format="flowed"

Hi,

You don't have to write a kernel module (which would better be written 
in C), you can do everything in userspace and in Haskell with FUSE: 
https://en.wikipedia.org/wiki/Filesystem_in_Userspace
It seems to already have Haskell bindings: 
https://hackage.haskell.org/package/HFuse-0.2.4.5/docs/System-Fuse.html

To implement the file system operations, you can use binary 
(https://hackage.haskell.org/package/binary), Foreign.Ptr, Data.Bits, 
etc. You can write data on any real partition by using the associated 
block devices (e.g., /dev/sda1).

Sylvain

On 09/05/2016 20:50, Silent Leaf wrote:
> Mostly all in the title.
>
> I have a project of developing a personal filesystem, possibly at 
> first virtual (the file(s) representing a virtual partition formatted 
> with my filesystem, would be saved in a host filesys, eg ext4 or 
> whatever), but probably in the end not virtual, directly working on 
> the contents of a real partition.
>
> Can haskell do that kind of thing, aka writing data on a partition 
> directly (without using a known filesys), etc? Is it at least more or 
> less adapted for this task (not talking about performances, unless the 
> consequences be a *really* slow filesys), aka doable, easily doable, 
> relatively speaking (aka not worse than with another language)?
> Incidentally, if i wanted Linux to recognize the filesys, i've heard 
> one has to write a module and put it in connection with the kernel or 
> something. could haskell do that?
>
> if that's a "no" somewhere for one of my questions, which parts can't 
> be written in haskell (without horrible performances or code very very 
> hard to write), and can they be written in C (or whatever) as foreign 
> functions? which parts would that represent for the whole program?
>
> Thanks a lot in advance!
>
> PS: just in case, tips on sources of information on how to do any of 
> the above will be extremely appreciated! (even if it's in, say C, for 
> that matter, providing there's a way to translate the steps into a 
> haskell program)
>
>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20160509/e3a23aaf/attachment-0001.html>

------------------------------

Subject: Digest Footer

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


------------------------------

End of Beginners Digest, Vol 95, Issue 16
*****************************************

Reply via email to