spdegabrielle
2019-9-27 07:04:32

Weird, looks like it was generated not written.


spdegabrielle
2019-9-27 07:05:24

I’m tempted to bid $10 just so I can find out more.



sorawee
2019-9-27 11:24:17

Yet another Rosetta Code?


soegaard2
2019-9-27 11:26:06

I suppose so. Makes their by-line funny “Please don’t reinvent the wheel”.


soegaard2
2019-9-27 11:26:14

joel
2019-9-27 15:03:10

I believe I triggered this by emailing the dev yesterday.


joel
2019-9-27 15:03:12

It would be funny to add a “rosetta code” idiom.


soegaard2
2019-9-27 21:07:25

@ryanc Where does db find the sqlite it uses? (I have a query that works on mac (version 3.22.0) but not in the server (version 3.22.0) so I am trying find differences).


ryanc
2019-9-27 21:58:06

@soegaard2 It uses the standard Racket shared library search path (for “libsqlite3” on Linux and Mac OS and for “sqlite3” on Windows). On Windows (and the natipkg Linux build) I believe Racket includes versions of the sqlite3 shared library, but on Mac OS and normal Linux it just uses what it finds on the system. On Racket 7.4 you can set PLTSTDERR="debug@ffi-lib" and Racket will print information about where it found foreign libraries (or where it looked, if loading the library failed). But if the library is loaded through the OS search path, it’ll just say something like ffi-lib: loaded "libsqlite3.0.dylib" and you’ll have to look in the standard locations yourself. If you want to use a different version of the library, you can drop the file into one of the directories returned by (begin (require setup/dirs) (get-lib-search-dirs)), and the logger should confirm that it loads that version.


soegaard2
2019-9-27 22:00:47

@ryanc Thanks for the tips. Still looking. I am getting prepare: near "AS": syntax error error code: 1 on Ubuntu - and it works on mac. I couldn’t find anything in the release notes of sqlite that could explain this, so I don’t know whether I am looking in the right place.


ryanc
2019-9-27 22:38:11

To double-check, what does (begin (require db/private/sqlite3/ffi) (sqlite3_libversion_number)) produce on each platform?


soegaard2
2019-9-27 22:39:40

mac: 3024000 ubuntu: 3022000


soegaard2
2019-9-27 22:41:40

It’s getting late. I’ll attempt to make a minimal example tomorrow.