Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  Can't find or open a Sqlite3 database inWindows Vista
      (Patrick Lynch)
   2. Re:  Sqlite3 - INSERT statement question (Patrick Lynch)
   3. Re:  Lujvo forming with cmavo rafsi (aditya siram)
   4. Re:  Lujvo forming with cmavo rafsi (Alex Rozenshteyn)
   5. Re:  Can't find or open a Sqlite3 database inWindows Vista
      (Patrick Lynch)


----------------------------------------------------------------------

Message: 1
Date: Thu, 03 Feb 2011 13:55:10 -0500
From: "Patrick Lynch" <kmandpjly...@verizon.net>
Subject: Re: [Haskell-beginners] Can't find or open a Sqlite3 database
        inWindows Vista
To: "Daniel Fischer" <daniel.is.fisc...@googlemail.com>,
        <beginners@haskell.org>
Message-ID: <87E74C9BF85E487599C3CF4A4FC2FD20@UserPC>
Content-Type: text/plain; format=flowed; charset=UTF-8;
        reply-type=original

...you're right, see following - thank you...

Prelude Database.HDBC Database.HDBC.Sqlite3> conn <- connectSqlite3 
"c:\\users\\user\\test1.db"
Loading package bytestring-0.9.1.7 ... linking ... done.
Loading package Win32-2.2.0.2 ... linking ... done.
Loading package old-locale-1.0.0.2 ... linking ... done.
Loading package time-1.1.4 ... linking ... done.
Loading package old-time-1.0.0.5 ... linking ... done.
Loading package syb-0.1.0.2 ... linking ... done.
Loading package base-3.0.3.2 ... linking ... done.
Loading package mtl-1.1.0.2 ... linking ... done.
Loading package array-0.3.0.1 ... linking ... done.
Loading package containers-0.3.0.0 ... linking ... done.
Loading package convertible-1.0.9.1 ... linking ... done.
Loading package utf8-string-0.3.6 ... linking ... done.
Loading package HDBC-2.2.6.1 ... linking ... done.
Loading package HDBC-sqlite3-2.3.1.0 ... linking ... done.
Prelude Database.HDBC Database.HDBC.Sqlite3>

----- Original Message ----- 
From: "Daniel Fischer" <daniel.is.fisc...@googlemail.com>
To: <beginners@haskell.org>
Cc: "Patrick Lynch" <kmandpjly...@verizon.net>
Sent: Thursday, February 03, 2011 1:39 PM
Subject: Re: [Haskell-beginners] Can't find or open a Sqlite3 database 
inWindows Vista


On Thursday 03 February 2011 19:01:41, Patrick Lynch wrote:
> ...this doesn't work, note the back slash...also, this will only work,
> that is to create the database automatically and then subsquently create
> a table, if you user the 'users' folder...if you use 'program files,
> etal' you will not be able to create the database...bummer: Prelude
> Database.HDBC Database.HDBC.Sqlite3> conn <- connectSqlite3
> "c:\users\user\test1.db" <interactive>:1:27:
> lexical error in string/character literal at character 'u'

The backslash is the escape marker, so if you want a backslash in a String,
you have to escape it (as written, it tries to interpret the escape
sequence '\u', which doesn't exist).

Try with "c:\\users\\user\\test1.db" 




------------------------------

Message: 2
Date: Thu, 03 Feb 2011 14:09:41 -0500
From: "Patrick Lynch" <kmandpjly...@verizon.net>
Subject: Re: [Haskell-beginners] Sqlite3 - INSERT statement question
To: "Brent Yorgey" <byor...@seas.upenn.edu>,    <beginners@haskell.org>
Message-ID: <51883D9540114DD1B6A835A5C3C53470@UserPC>
Content-Type: text/plain; format=flowed; charset=iso-8859-1;
        reply-type=original

...looks good, thank you - see following: [note: the '1' on the 2nd line 
indicates a successful command execution] -- 

Prelude Database.HDBC Database.HDBC.Sqlite3> run conn "INSERT INTO test 
VALUES (?, ?)" [toSql (0::Int), toSql ("zero"::[Char])]
1

----- Original Message ----- 
From: "Brent Yorgey" <byor...@seas.upenn.edu>
To: <beginners@haskell.org>
Sent: Thursday, February 03, 2011 12:25 PM
Subject: Re: [Haskell-beginners] Sqlite3 - INSERT statement question


> On Thu, Feb 03, 2011 at 12:20:12PM -0500, Patrick Lynch wrote:
>> Good morning,
>>
>> I'm using "Real World Haskell" and a Windows Vista PC and I have Sqlite3 
>> installed...[note: I had to change test1.db to /users/user/test1.db in 
>> order to get this to work, otherwise, neither the database nor the table 
>> could be created -- also, note c:/users/user/test1.db gives a syntax 
>> error], ghci doesn't like c:/]:
>>
>> I tried to use the following example from the book but it failed...see 
>> following:
>>
>> Prelude> :m Database.HDBC Database.HDBC.Sqlite3
>> Prelude Database.HDBC Database.HDBC.Sqlite3> conn <- connectSqlite3 
>> "/users/user/test1.db"
>> ...
>> Prelude Database.HDBC Database.HDBC.Sqlite3> run conn "INSERT INTO test 
>> VALUES (?, ?)" [toSql 0, toSql "zero"]
>>
>> <interactive>:1:43:
>>     No instance for (Data.Convertible.Base.Convertible t SqlValue)
>>       arising from a use of `toSql' at <interactive>:1:43-49
>>     Possible fix:
>>       add an instance declaration for
>>       (Data.Convertible.Base.Convertible t SqlValue)
>>     In the expression: toSql 0
>>     In the third argument of `run', namely `[toSql 0, toSql "zero"]'
>>     In the expression:
>>         run conn "INSERT INTO test VALUES (?, ?)" [toSql 0, toSql
>>     "zero"]
>
> I think the problem is that 0 is polymorphic, so GHC does not know
> what type you want it to have, but its type determines which
> Convertible instance is chosen.  It should work if you put a type
> signature on the 0, like
>
>  toSql (0 :: Int)
>
> or
>
>  toSql (0 :: Integer)
>
> or whatever.
>
> -Brent
>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://www.haskell.org/mailman/listinfo/beginners 




------------------------------

Message: 3
Date: Thu, 3 Feb 2011 13:15:38 -0600
From: aditya siram <aditya.si...@gmail.com>
Subject: Re: [Haskell-beginners] Lujvo forming with cmavo rafsi
To: Alex Rozenshteyn <rpglove...@gmail.com>
Cc: beginners@haskell.org
Message-ID:
        <aanlktin9vuh+6mffkkdev9dohru+fduz0gy-izfoj...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

I have never understood less about what's going on.
-deech

On Thu, Feb 3, 2011 at 12:45 PM, Alex Rozenshteyn <rpglove...@gmail.com> wrote:
> ki'asai
>
> On Thu, Feb 3, 2011 at 12:10 PM, Brent Yorgey <byor...@seas.upenn.edu>
> wrote:
>>
>> On Thu, Feb 03, 2011 at 11:52:13AM -0500, Alex Rozenshteyn wrote:
>> > Specifically, I want to form a lujvo meaning "omnicide" (to ta'o this is
>> > due
>> > to the tvtropes trope "Omnicidal Maniac" ta'onai toi). ?{ro zei catra}
>> > or
>> > {rolcatra} seems to be wrong.
>> >
>> > {ro zei se catra} seems like it's all the victims, so maybe
>> > selrolselcatra?
>> >
>> > I'm not quite clear on what it means to be a lujvo if you don't have a
>> > tanru
>> > as the basis.
>>
>> Me neither. ?You probably need to use zygohistomorphic prepromorphisms.
>>
>> -Brent
>>
>> _______________________________________________
>> Beginners mailing list
>> Beginners@haskell.org
>> http://www.haskell.org/mailman/listinfo/beginners
>
>
>
> --
> ?? ? ? ? ?Alex R
>
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>



------------------------------

Message: 4
Date: Thu, 3 Feb 2011 14:17:36 -0500
From: Alex Rozenshteyn <rpglove...@gmail.com>
Subject: Re: [Haskell-beginners] Lujvo forming with cmavo rafsi
To: aditya siram <aditya.si...@gmail.com>
Cc: beginners@haskell.org
Message-ID:
        <aanlktimbab2yifjmstqsqj6w1b3dqsobpqj0a0vw5...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I think brent's reply was making fun of me and didn't have much meaning
beyond that.

If there was any part of my question you did not understand, feel free to
point out a specific part, and I'll try my best to clarify.

On Thu, Feb 3, 2011 at 2:15 PM, aditya siram <aditya.si...@gmail.com> wrote:

> I have never understood less about what's going on.
> -deech
>
> On Thu, Feb 3, 2011 at 12:45 PM, Alex Rozenshteyn <rpglove...@gmail.com>
> wrote:
> > ki'asai
> >
> > On Thu, Feb 3, 2011 at 12:10 PM, Brent Yorgey <byor...@seas.upenn.edu>
> > wrote:
> >>
> >> On Thu, Feb 03, 2011 at 11:52:13AM -0500, Alex Rozenshteyn wrote:
> >> > Specifically, I want to form a lujvo meaning "omnicide" (to ta'o this
> is
> >> > due
> >> > to the tvtropes trope "Omnicidal Maniac" ta'onai toi).  {ro zei catra}
> >> > or
> >> > {rolcatra} seems to be wrong.
> >> >
> >> > {ro zei se catra} seems like it's all the victims, so maybe
> >> > selrolselcatra?
> >> >
> >> > I'm not quite clear on what it means to be a lujvo if you don't have a
> >> > tanru
> >> > as the basis.
> >>
> >> Me neither.  You probably need to use zygohistomorphic prepromorphisms.
> >>
> >> -Brent
> >>
> >> _______________________________________________
> >> Beginners mailing list
> >> Beginners@haskell.org
> >> http://www.haskell.org/mailman/listinfo/beginners
> >
> >
> >
> > --
> >           Alex R
> >
> > _______________________________________________
> > Beginners mailing list
> > Beginners@haskell.org
> > http://www.haskell.org/mailman/listinfo/beginners
> >
> >
>



-- 
          Alex R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20110203/4370c68f/attachment-0001.htm>

------------------------------

Message: 5
Date: Thu, 03 Feb 2011 14:40:09 -0500
From: "Patrick Lynch" <kmandpjly...@verizon.net>
Subject: Re: [Haskell-beginners] Can't find or open a Sqlite3 database
        inWindows Vista
To: "Patrick Lynch" <kmandpjly...@verizon.net>,
        <beginners@haskell.org>
Message-ID: <5EE91C7A70094E14A22F1908E71CBE59@UserPC>
Content-Type: text/plain; charset="iso-8859-1"

...just to put the 'finishing touch' on this -- Daniel Fischer pointed out how 
to use the Windows back slash for this command [he pointed it out that GHCI 
consider the backspace to be an escape character] - note the use of the double 
back slashes:

   Prelude Database.HDBC Database.HDBC.Sqlite3> conn <- connectSqlite3 
"c:\\users\\user\\test1.db"
   Prelude Database.HDBC Database.HDBC.Sqlite3>

Thanks Daniel...
  ----- Original Message ----- 
  From: Patrick Lynch 
  To: Patrick Lynch ; beginners@haskell.org 
  Sent: Thursday, February 03, 2011 1:01 PM
  Subject: Re: [Haskell-beginners] Can't find or open a Sqlite3 database 
inWindows Vista


  ...oh dear, guess what -- I told you a lie...ghci does except either 
c:/users/user/test1.db or /users/user/test1.db but not the Windows folder 
separator of backslash '\'...please see following:

  ...this works:
      Prelude Database.HDBC Database.HDBC.Sqlite3> conn <- connectSqlite3 
"c:/users/user/test1.db"
      Prelude Database.HDBC Database.HDBC.Sqlite3>

  ...so does this:
      Prelude Database.HDBC Database.HDBC.Sqlite3> conn <- connectSqlite3 
"/users/user/test1.db"
      Prelude Database.HDBC Database.HDBC.Sqlite3>

  ...this doesn't work, note the back slash...also, this will only work, that 
is to create the database automatically and then subsquently create a table, if 
you user the 'users' folder...if you use 'program files, etal' you will not be 
able to create the database...bummer:
     Prelude Database.HDBC Database.HDBC.Sqlite3> conn <- connectSqlite3 
"c:\users\user\test1.db"
     <interactive>:1:27:
         lexical error in string/character literal at character 'u'

  ---- Original Message ----- 
    From: Patrick Lynch 
    To: Patrick Lynch ; beginners@haskell.org 
    Sent: Thursday, February 03, 2011 11:24 AM
    Subject: Re: [Haskell-beginners] Can't find or open a Sqlite3 database 
inWindows Vista


    ...this seems to work: 
       ghci> conn <- connectSqlite3 "/users/user/test1.db"

    ...this allows me to create a database in this directory, named test1.db, 
and then I can create a table in this database...
    ...I'm now working on writing some queries...

    ...wish me luck
      ----- Original Message ----- 
      From: Patrick Lynch 
      To: Kathleen Lynch ; beginners@haskell.org 
      Sent: Thursday, February 03, 2011 10:08 AM
      Subject: Re: [Haskell-beginners] Can't find or open a Sqlite3 database 
inWindows Vista


      ...could this be the problem...in Windows Vista I cannot change the file 
name in the directory c:\Program Files (x86)\Haskell 
Platform\2010.2.0.0\winghci but can change it in c:\users\user directory...

          ...> ren  "c:\Program Files (x86)\Haskell 
Platform\2010.2.0.0\winghci\test1.db" test2.db
          Access is denied.

      ...but I can see the contents of this file:

          ...> type test1.db
          hello, world!

      ...is it possible to specify the directory c:\users\user in ghci so that 
Sqlite3 will look there to open the database and then to create a table in it?

      Good day

      ----- Original Message ----- 
        From: Kathleen Lynch 
        To: beginners@haskell.org 
        Sent: Wednesday, February 02, 2011 5:28 PM
        Subject: [Haskell-beginners] Can't find or open a Sqlite3 database in 
Windows Vista


        ...seems like I 'kicked over another bee hive'...plenty of messages in 
regard to this when you do google search--->[sqlite3.operational error unable 
to open database file in windows vista]

        ...i'm getting the following error messages when I try to create a 
database in Sqlite3:

        *Sandbox> dbh <- connect "poddbtest.db"
        *** Exception: SqlError {seState = "", seNativeError = 21, seErrorMsg = 
"prepare 6: BEGIN: unable to open database file"}

        *Sandbox> dbh <- connect "test1.db"
        *** Exception: SqlError {seState = "", seNativeError = 1, seErrorMsg = 
"step: SQL logic error or missing database"}

        Both come from Chapters 21 and 22 in "Real World Haskell"

        I can't invoke Sqlite3 from the command line using---> Sqlite3 
myDatabase.db...
        I created blank files in folder C:\Program Files (x86)\Haskell 
Platform\2010.2.0.0\winghci -- seemed to get me a bit further along...at least 
I was able to connect...

        Is it possible to specify the folder that the database should be 
created in?
        Is it possible to run Sqlite3 from the command line - when it has been 
installed using the Haskell wiki?
        Has anyone had better success with MySql - I've used it in the past and 
it was very reliable?

        Thank you




------------------------------------------------------------------------


        _______________________________________________
        Beginners mailing list
        Beginners@haskell.org
        http://www.haskell.org/mailman/listinfo/beginners
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20110203/c4b203ce/attachment.htm>

------------------------------

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 32, Issue 8
****************************************

Reply via email to