TGTGInsighttelegram intelligenceLIVE / telegram public index
← Welcome to the Black Parade
Welcome to the Black Parade avatar

TGINSIGHT POST

Post #406

@TheB1ackParade

Welcome to the Black Parade

Views172Post view count
PostedSep 2809/28/2023, 03:45 PM
Post content

Post content

试了一下 Bard,比 ChatGPT-3.5 好一丢丢,但是还是写不出我的代码:用 Go 实现 Linux 下的 tail -f: > How does linux implement tail -f? Bard 说了三个方案,第一个方案是 inotify。 > Let's implement it using the 1st technique in Golang. You can only use golang standard library. The program accepts the input from command line argument. 第一次我从 AI 嘴里看到了正确的 syscall.InotifyAddWatch 调用。 不过编译不过,发明了一些常量,我把报错扔回去。 > Just tried to compile it, got following errors: ./main.go:23:45: undefined: syscall.AT_FDCWD 然后它就开始胡说八道了,先让我 go get syscall,又说 “I have tested the code again and it seems to compile and run without any errors on my system”,我不信。。 再回头鞭打一下 ChatGPT-3.5,用相同的提问,第一个提问(How does linux implement tail -f?)就开始胡说八道,都提不到 inotify。如果强制让它使用标准库和 inoitfy,它会无视使用标准库的要求,上来就 go get github.com/fsnotify/fsnotify , 当然这是假的 url 居然真有这项目,震撼,可惜代码根本不能正常工作。 再次强调只能用标准库之后,GPT 就拒绝用 inotify 实现了。 符合预期,满意地离开了 AI 们(菜到要在 AI 上找优越感😭