<paroneayea>mark_weaver: my goal over the next couple weekends is to write an FFI based postgres lib <paroneayea>mark_weaver: the main header is not too complicated luckily: <paroneayea>mark_weaver: the part I'm running into trouble with is understanding how to deal with structs <paroneayea>mark_weaver: it looks like from the documentation that for structs where you know the layout, you can just represent those composing them of the same components(?) <mark_weaver>paroneayea: any place where an FFI type is wanted, you can pass a list and that is a struct type. <mark_weaver>so, for example, you can handle structs passed in as arguments or returned from functions, by passing in a list where the type is wanted. <mark_weaver>as I recall, our docs aren't very clear on that point. <paroneayea>mark_weaver: hm ok... so a list of (list 1 2 (string->pointer "fooo")) <paroneayea>could substitute for a struct that has 2 ints and a string? <paroneayea>mark_weaver: these lines worry me that it might be hard for me to figure out how to pass around this equivalent type: <paroneayea>/* PGconn encapsulates a connection to the backend. <paroneayea> * The contents of this struct are not supposed to be known to applications. <mark_weaver>paroneayea: no, the lists can be substitutes for *foreign types*, not for the values themselves. <paroneayea>mark_weaver: okay I'm not totally clear on this, but I'll look at wingo's guile-sqlite3 lib with this in mind for reference! ***heroux_ is now known as heroux
***mario-go` is now known as mario-goulart
<mark_weaver>paroneayea: I'm back now, and have more time to answer questions <paroneayea>hey mark_weaver, thanks! :) I'm making dinner now, but maybe in a while, or I'll have more questions queued for you in a nearby day :) <mark_weaver>okay, I'll be around on and off tonight, and will read the backlogs in any case <septopus>reading through the little schemer, came across this. can someone elaborate? <septopus>specifically on the answer to the question.. what is the structure of the argument? <taylanub>septopus: perhaps it means that it's clearer to first check whether somelist is null or not (a type-check), and then when its type is determined as a list, do something accordingly (which in this case involves another 'cond' clause) <taylanub>septopus: but I'm not sure, it's not clear to me either what's meant with the argument's structure <taylanub>septopus: by the way, this would be more suitable for the #scheme channel <amz3>I connected the dots, looking at racket documentation <amz3>a walkthrough would have been nice <davexunit>but basically I wanted to release sooner rather than later <amz3>how do you generate the downloads sections ? <amz3>looking at it, I was bit lost <amz3>I find the page too wide <amz3>maybe it's personal preference <amz3>yes, the download page is a regular builder <amz3>I'm back at trying to get simple markdown parser in scheme using the first parser from GLL <davexunit>yeah, my CSS and stuff isn't great. a lot of run for improvement. <zacts>speaking of CSS which guile modules / libraries allow for static blog generation (a la Jekyll) <zacts>I'm looking at using chicken scheme's hyde egg for this, but it would be cool to see what guile offers, or may soon have the potential to offer ***michel_mno_afk is now known as michel_mno
<amz3>zacts: did you look at haunt ? ^ <amz3>I would be interested in a comparison as I never tried Jekyll. <zacts>nope. let me check it out though <amz3>Jekyll is used by 99% of dev crowd <zacts>I would rather use a scheme based solution for nerdy reasons <zacts>and technical reasons, and educational reasons <amz3>I find haunt nice. But I won't use it, I work on something I'd like to dogfood <amz3>maybe i will use for some software i build it could be nice <paroneayea>ACTION keeps going through manuals for postgres ffi driver <amz3>there is a lot of function to bind? <septopus>hey dave, did you use gogs to get your site up? it looks good. <davexunit>septopus: it's actually just gitweb, the nasty perl web ui that ships with git <amz3>davexunit: do you use gitolite? <paroneayea>davexunit: btw I think I was wrong re: posgres being huge in its api <amz3>I don't thinkg that much is required to build a blog ***michel_mno is now known as michel_mno_afk
<daviid>davexunit: cool stuff, congrat for haunt 0.1 release! the web site could win with bit of arganization if you allow me :) [not talking about esthetic here]. would be nice to reuse the font used in the logo name and add subtitles, like About ... if you are interested I can help, let me know <davexunit>I made some scratchy letters on a piece of scrap paper and had inkscape auto-trace it. <daviid>:) you should create one, it's super cool! <daviid>mine too, but as a creator, you don't need any knowledge of course ... haha <amz3>how can i define a recursive macro? <mark_weaver>amz3: nothing special is needed, just do the obvious thing. <sneek>Welcome back mark_weaver, you have 1 message. <sneek>mark_weaver, francis7 says: PM francis7 for some good news <mark_weaver>macro expansion happens from the outside in, so what happens is that, e.g. (and x y) expands into (if x (and y) #f) with the inner 'and' being expanded later. <amz3>I think it doesn't work with define-syntax-rule <mark_weaver>hmm, well, actually, I think there's a fundamental problem with trying to use 'define-syntax-rule' to define a recursive macro: there's no way to define a separate "base" case. <amz3>I ll try otherwise thanks mark_weaver <mark_weaver>well, obviously you need a define a recursion that will eventually terminate :) <amz3>define-syntax works as expected <amz3>macros and goops are two areas where I can learn a lot <amz3>the funny things is that I'am super fan of python class and fiddle with metaclass, but right now I feel no hurry to learn it in scheme <amz3>something that I found dubious in javascript, inline function definition, is actually very useful in scheme <amz3>Since i did two times the same program, I can tell that i prefer the scheme implementation, so far. <amz3>macros and goops are two things I know I don't know ;) <OrangeShark>amz3: I need to learn more about macros and goops as well <amz3>define-syntax-rule is an easy way to define macros (define-syntax-rule (increment a) (+ a 1)) it can't be easier <amz3>the recursive macro we were talking about previously is implemented using define-syntax <mark_weaver>amz3: this is a case where 'syntax-rules' would be sufficient, and it's a bit simpler that way. <mark_weaver>(define-syntax seq* (syntax-rules () ((seq* a b) (seq a b)) ((seq* a b c d ...) (seq a (seq* b c d ...))))) <mark_weaver>I added 'c' and 'd' there to make sure that rule would only match when there are 3 arguments or more. <mark_weaver>the pattern "x ..." matches any list (zero or more elements)