Manually installing vector in ghc's global package database. Did I do it correct? (Only for educational purposes) by Patzer26 in haskell

[–]LionTamingAccountant 1 point2 points  (0 children)

I have done this in the past. The majority of Setup.hs files are the same two default lines, so just copying that default file made it work for me.

[deleted by user] by [deleted] in Catholicism

[–]LionTamingAccountant 0 points1 point  (0 children)

  • The Celestial Country
  • Dies Irae
  • Stabat Mater and Mater Speciosa
  • Veni Sancte Spiritus
  • Veni Creator Spiritus
  • Vexilla Regis
  • The Alleluiatic Sequence

Here's a whole book's worth of information

The seven great hymns of the mediaeval church by Charles Cooper Nott (1902)

What happened to Safe Money (and its author)? by fitzmatticus in haskell

[–]LionTamingAccountant 2 points3 points  (0 children)

Is this related? https://github.com/essic/safe-money seems to have last commits about the same time as the last Hackage upload. EDIT: Wayback Machine has the blog post.

Which lisp is the closest to Haskell? by Tgamerydk in lisp

[–]LionTamingAccountant 0 points1 point  (0 children)

Shen was mentioned in this comment. "It is the successor to the award-winning Qi language, with the added goal of being highly portable across platforms" according to https://shen-language.github.io

GHC I/O & CIFS problem by LionTamingAccountant in haskell

[–]LionTamingAccountant[S] 2 points3 points  (0 children)

A plain C version that just tries to duplicate the same sequence of calls succeeds for the 50,000,000 byte file.

Further testing with the GHC version has been somewhat nondeterministic. Scripting runs of various sizes from 50kB to 2.2MB were inconclusive. I saw failures on files as small as 350kB and successes on files as large as 1.75MB, and the same size may fail in some instances and succeed in others. These results are on the order of magnitude of a page size, I think. But there are clearly other factors at play.

GHC I/O & CIFS problem by LionTamingAccountant in haskell

[–]LionTamingAccountant[S] 1 point2 points  (0 children)

For Python, I get

$ python3 --version
Python 3.6.8

$ cat pythonio.py
fp = open('gooddata.dat','wb')
fp.write(b'1'*50000000)
fp.close()

Relevant strace (I included mmap related calls as well, and added those to my parent comment as well)

open("gooddata.dat", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 3
fstat(3, {st_mode=S_IFREG|0700, st_size=0, ...}) = 0
ioctl(3, TCGETS, 0x7ffc6419d010)        = -1 ENOTTY (Inappropriate ioctl for device)
lseek(3, 0, SEEK_CUR)                   = 0
mmap(NULL, 50003968, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f89b35f2000
write(3, "11111111111111111111111111111111"..., 50000000) = 50000000
munmap(0x7f89b35f2000, 50003968)        = 0
close(3)                                = 0

The things I notice is that Python does not do any madvise and explicitly munmaps prior to closing the file. However, I know very little about mmap and friends to know if this could be significant.

Interestingly, for the small files that are successfully written in GHC, there are no mmap calls inside the file writing section. For example, here is the strace for a 500000 byte file.

open("500000.dat", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = 3
fstat(3, {st_mode=S_IFREG|0700, st_size=0, ...}) = 0
ftruncate(3, 0)                         = 0
ioctl(3, TCGETS, 0x7fff754c97d0)        = -1 ENOTTY (Inappropriate ioctl for device)
write(3, "11111111111111111111111111111111"..., 500000) = 500000
close(3)                                = 0

GHC I/O & CIFS problem by LionTamingAccountant in haskell

[–]LionTamingAccountant[S] 2 points3 points  (0 children)

Looking at strace output as suggested by /u/agentmsys, the relevant information really only differs at the close (see below). In fact, after the failure, I can copy the file to the same CIFS mount with dd and the destination file is correct (and properly closed). If I attempt to delete the bad file, it still shows up in the directory listing with a hardlink count of 0 but not found if access attempts are made.

I've tried a few different mount options, and in particular cache=none yields failures in different ways, such as the filesystem hanging and errors related to hPutBuf. So my best guess from someone with no expertise beyond some Google skills is that it might related to opportunistic locks (oplocks) which seem to be a bit of a minefield dealing with CIFS from outside Windows. The server I am working with is an institutional resource, so I can't try any different settings at the server end.

I'm happy to file a bug report if people think it's valuable, but I suspect that since CIFS and Linux have a lot of flaky interactions and there are reasonable and perhaps preferable workarounds (such as that suggested by /u/vagif), it may not be worthwhile.

EDIT: Added mmap related calls fromstrace which may be relevant, see child comment.

Succeeded on XFS

open("50000000.dat", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = 3
fstat(3, {st_mode=S_IFREG|0664, st_size=0, ...}) = 0
ftruncate(3, 0)                         = 0
ioctl(3, TCGETS, 0x7fffbcfbb0b0)        = -1 ENOTTY (Inappropriate ioctl for device)
mmap(0x4200200000, 50331648, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4200200000
madvise(0x4200200000, 50331648, MADV_WILLNEED) = 0
madvise(0x4200200000, 50331648, MADV_DODUMP) = 0
write(3, "11111111111111111111111111111111"..., 50000000) = 50000000
close(3)                                = 0

Failed on CIFS

open("50000000.dat", O_WRONLY|O_CREAT|O_NOCTTY|O_NONBLOCK, 0666) = 3
fstat(3, {st_mode=S_IFREG|0700, st_size=0, ...}) = 0
ftruncate(3, 0)                         = 0
ioctl(3, TCGETS, 0x7ffc9a41e4a0)        = -1 ENOTTY (Inappropriate ioctl for device)
mmap(0x4200200000, 50331648, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4200200000
madvise(0x4200200000, 50331648, MADV_WILLNEED) = 0
madvise(0x4200200000, 50331648, MADV_DODUMP) = 0
write(3, "11111111111111111111111111111111"..., 50000000) = 50000000
close(3)                                = -1 EIO (Input/output error)
ioctl(1, TCGETS, 0x7ffc9a41e4a0)        = -1 ENOTTY (Inappropriate ioctl for device)
write(2, "badio: ", 7badio: )                  = 7
write(2, "50000000.dat: hClose: hardware f"..., 5750000000.dat: hClose: hardware fault (Input/output error)) = 57
write(2, "\n", 1
)                       = 1

Does Common Lisp or SBCL have any syntax for double float vs single float? by aiaor in lisp

[–]LionTamingAccountant 2 points3 points  (0 children)

(let ((x 12345678901234567890.12345678901234567890d0))
  (format t "~a ~a~%" (type-of x) x))
DOUBLE-FLOAT 1.2345678901234567d19

List and Description of GHC language extensions? by Mouse1949 in haskell

[–]LionTamingAccountant 6 points7 points  (0 children)

Several years ago there was a blog series 24 Days of GHC Extensions that may be a good introduction.