:: Re: [DNG] Please keep 32-bits alive
Página Inicial
Delete this message
Reply to this message
Autor: Christopher Clements
Data:  
Para: dng
Novos Tópicos: [DNG] High level language primitives [ was Please keep 32-bits alive]
Assunto: Re: [DNG] Please keep 32-bits alive
On Wed, Jul 26, 2017 at 10:56:13AM +0000, Enrico Weigelt, metux IT consult wrote:
>On 26.07.2017 09:34, Didier Kryn wrote:
>
>>    All languages wrap libc's API with their own primitives: C wraps
>>unistd's write() within printf() and fwrite()

>
>It doesn't just "wrap" it, it calls it in order to achieve some
>higher functionality. These functions only make sense if you're
>working with formatted texts. (you *can* use them for binary data,
>but that doesn't give any benefit, just slows things down).
>
>>and even unistd's write() and seek() are wrappers for kernel's pwrite().
>
>No. Just look at the code. write()+seek() as different semantics
>than pwrite(), and they don't even need to be supported by some
>particular fd.


Wouldn't this work? (no error checking of course XD)

    off_t lseek(int fd, off_t offset, int whence);
    ssize_t write(int fd, const void *buf, size_t count);


    ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset) {
        lseek(fd, offset, SEEK_SET);
        return write(fd, buf, count);
    }



>> I tend to consider Javascript as a junk language, but my opinion on it
>>is not well educated. It might be good for what it was designed for.
>
>Well, it once was designed for tiny things like alert() on a button
>click, some trivial input validations, etc. Today, it's totally abused
>(and nodejs is even worse). If I could travel back in time, I'd shoot
>the guy who introduced that ugly language.


I found "lua.js" <https://github.com/tdzl2003/lua.js#use-on-html>.
(Lua is actually pretty good, but running like that?)

--
This email has NOT been checked for viruses by Avast antivirus software.
http://0xc9.net

Of course, there is _absolutely nothing_ stopping me from saying it _has_.
Use common sense and most of your "security" becomes redundant.

GPG Key: 0xF4CB50441726610D5AE0