Re: [racket-users] ffi-lib: couldn't open "libobjc.dylib

2019-04-22 Thread Matthew Flatt
I don't have a good idea of what could be going wrong, either.

Just to make sure, you're running 64-bit variants of Racket?

Do you get a more informative error message if you try

 > (require ffi/unsafe)
 > (ffi-lib "/usr/lib/libobjc.A.dylib")

?

At Sat, 13 Apr 2019 11:14:33 -0700 (PDT), Ed Hirgelt wrote:
> I've been away from racket for a while and started using it yesterday with 
> 7.2. I get the following with 7.2, 7.1 and 6.12 (the latter used to work 
> fine). This is on Mac OSX 10.14.4 updated around 3/20/2019 (based on the 
> timestamps on the files).
> 
> 693$ racket
> Welcome to Racket v7.2.
> > (require racket/gui/base)
> ; ffi-lib: couldn't open "libobjc.dylib" (dlopen(libobjc.dylib, 6): image 
> not
> ;   found) [,bt for context]
> > 
> 
> And libobjc.dylib is where is has always been (I believe)
> 
> 694$ ls -l /usr/lib/libobjc*
> -rwxr-xr-x  1 root  wheel 87744 Mar 20 23:10 
> /usr/lib/libobjc-trampolines.dylib
> -rwxr-xr-x  1 root  wheel  28112240 Mar 20 23:11 /usr/lib/libobjc.A.dylib
> lrwxr-xr-x  1 root  wheel15 Oct 25 13:56 /usr/lib/libobjc.dylib -> 
> libobjc.A.dylib
> 
> 
> The code I have still works, but this breaks racket-mode in emacs.
> 
> Any ideas??
> 
> Thanks,
> Ed Hirgelt
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] db module 'query' does not return insert-id

2019-04-22 Thread David Storrs
> (require db)
> (define db (postgresql-connect  ...args...))
> (simple-result-info (query db "insert into collaborations (name) values
('foojalskdsfls')"))
'((insert-id . #f) (affected-rows . 1))

>From the docs on the 'simple-result' struct:

"Represents the result of a SQL statement that does not return a relation,
such as an INSERT or DELETE statement.

The info field is an association list, but its contents vary based on
database system and may change in future versions of this library (even new
minor versions). The following keys are supported for multiple database
systems:

-

'insert-id: If the value is a positive integer, the statement was an INSERT
statement and the value is a system-specific identifier for the inserted
row. For PostgreSQL, the value is the row’s OID, if the table has OIDs (for
an alternative, see the INSERT ... RETURNING statement). For MySQL, the
value is the same as the result of last_insert_id

function—that is, the value of the row’s AUTO_INCREMENT field. If there is
no such field, the value is #f. For SQLite, the value is the same as the
result of the last_insert_rowid
 function—that
is, the ROWID  of the
inserted row."


I get the same results with a SQLite connection -- the insert-id is always
#f.  I know that it says the contents may change and that it varies per
database, but it also specifically calls out 'insert-id as a thing that is
supported for both of these DBs.  What am I missing?

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] SIGSEGV when running Racket

2019-04-22 Thread 'Paulo Matos' via Racket Users



On 22/04/2019 00:23, polarish...@gmail.com wrote:
> Hello everyone,
> 
> I observed some exceptions like `SIGSEGV MAPERR si_code 1 fault on addr
> 0x7f6f4e30fff0` when running a Racket program. Any ideas why this happens?

Hi Shaobo,

Unless you're using an unsafe op / ffi, it's a bug. Report it please.

Can you fill in a report here: https://github.com/racket/racket/issues/new

Attach example to allow us to reproduce and debug the issue. Add
information about OS, machine architecture. We will ask for more
information if necessary.

Thanks,

Paulo

> 
> Thanks,
> Shaobo
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to racket-users+unsubscr...@googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.

-- 
Paulo Matos

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.