<paroneayea>davexunit: left some messages for you with sneek :) <sneek>davexunit, you have 1 message. <sneek>davexunit, paroneayea says: Well, here's two compelling reasons: the json-ld algorithms require sorting strings alphanumerically, so I'd have to coerce to strings then back anyway, and another reason is that strings with all kinds of symbols that are not "basic symbol friendly" is more than common, including whitspace and who knows what, and that just won't *look* nice in code to print out the way that quoted symbols look <davexunit>I avoided it for awhile, but Sly needs a C extension in order for rendering to be fast enough. <davexunit>any kind of matrix multiplication heavy code <davexunit>offloading it to some efficient low-level C functions should bring great speed gains. <davexunit>while also not compromising the high-level stuff <nalaginrut>davexunit: ah yeah, accelerate with C is good for sly <davexunit>nalaginrut: I have a sound module, but it's old and I haven't made a functional API for it. <mark_weaver>davexunit: you might want to do things in such a way that when we have good native code generation in guile, you can revert this change, and the design of the system is not distorted too much. <davexunit>mark_weaver: impact should be fairly minimal. <davexunit>procedures that construct 4x4 transformation matrices and procedures that perform multiplication of those matrices by other matrices and vectors will be moved to C. <davexunit>to efficiently render lots of dynamic sprites, I have no choice but to build the geometry to send to the GPU on the fly, so that means lots of CPU-intensive matrix multiplication. <daviid>davexunit: can't you keep them in scheme but mutate, just these? <daviid>as a proof of concept, it should not make any diff, if you accept to mutate these, which is what you will do in C right? <daviid>I'm just being curious here, I do not [by far] pretend to know... <davexunit>daviid: I already use mutable state for rendering <daviid>hum, i thought guile what almost as fast as C for vector and math [matrix as a contiguus vector...] <davexunit>performing matrix-matrix and matrix-vector multiplication on floating point bytevectors causes lots of heap allocation <davexunit>I've heard from mark_weaver and wingo that eventually this will be more efficient, but for now I must write some C. <daviid>too bad we can't keep your project full scheme, precisly as proof of concept <mark_weaver>davexunit: I understand your position, and it seems reasonable. <davexunit>imagine rendering 500 sprites. the sprites move each frame. a sprite is defined by 4 vertices. each vertex must be multiplied by the matrix that represents the "camera" to view the scene, and additionally must be multiplied by the sprite's local translation, scale, and rotation matrices. <daviid>mark_weaver: davexunit wrt this, couldn't we [all] benefit from an ffi binding to some GPL matrix/vector lib ? <davexunit>so, I've been using the GNU Scientific Library as a short-term solution <daviid>oh, i thought it would be the slution until guile-2.2 ... <davexunit>GSL provides generic functions, capable of working with any size matrices, which can never be as efficient as special-purpose functions built for 4x4 matrix math. <davexunit>furthermore, I also want to build the primitive matrices (translate, scale, rotate, etc.) outside of Scheme for now and GSL doesn't help with that. <davexunit>so even with GSL doing the mults, I'm still allocating floating point numbers like crazy trying to build the proper transformation matrix. <davexunit>you can do most matrix math on the GPU when the scene is static. <davexunit>but when the scene is dynamic, and involves many distinct pieces as in particle simulations, drawing each piece as an individual GL draw call is extremely wasteful. <davexunit>so, one needs to do batch rendering by building the geometry buffer on the client (CPU) and upload it to the GPU to draw in one go <daviid>how do i use this U+2191 in a string ? <daviid>"#\\x2191" writes #!91 in my clutter text instance <davexunit>well you did ask for how to do it "in a string" :) <daviid>yes, then i copied pasted ... oh well <daviid>the nice thig is we always help each other, here, not always the case in other irc channels <davexunit>#guile has a good reputation of being a friendly place <daviid>is there a unicode for Left [click] I don't think so, I can't find one <mark_weaver>daviid: no, mouse clicks are not represented as characters in unicode or X <please_help>Today, it has been found that images on imgur with embedded JS causes the JS to be executed. <daviid>wouw! no js in mine, i can sign it :) <daviid>sounds easy when you look at it, but the design and implementation of a gravity sensitive actor + gravity resistance factor was not a piece of cake <wleslie>it remains to be seen if the UI doesn't suck ***sbp_ is now known as sbp
***lloda` is now known as lloda
<taylanub>today I learned it's bad practice to use macros with large bodies liberally, since it will bloat code size and make compile times suffer greatly. the solution is to delegate the bulk of the work to a procedure which the macro calls after doing what it minimally needs to do as a macro (which a plain procedure couldn't). <__uu___>hi, I am trying my first FFI in guile from a C++ project. Could someone help me solve the compile problem? I guess it is c/c++ related, but don't know how to solve it: http://pastebin.com/TMRkNhVK <__uu___>the error message in included in the paste too <lloda>you must cast the function pointer to scm_t_subr <lloda>say scm_c_define_gsubr ("my-mview-pose", 0, 0, 0, scm_t_subr(eval_pascal_mview_c)) <lloda>the conversion you're asking for is apparently legal in C, but not in C++, so you need to cast. <__uu___>so I make the eval_pascal_mview_c function pointer void* <__uu___>lloda: thx, sound the key to the problem <amz3>I need to build datastructure that can; <amz3>remember addition and deletion <amz3>I was thinking about using three lists, one to store the original list, one to store what was deleted and another to store what was added <amz3>what would be a good name for data datastructure? <amz3>I think I will use list-trail <adhoc>amz3: you are creating an audit trail <adhoc>amz3: are you collecting any other meta data about timestamps of change? <adhoc>surely anything that is added will be in two lists? so why have an added list? <amz3>things that are added are only in the added list <adhoc>unless the context of the items in the list a tthe starting point is important <adhoc>so you don't mutate the initial list at all ? <amz3>i move the removed items to the list of deleted items <amz3>the added ones are only added to the list of added items <amz3>I will tell the background <amz3>daviid will tell me I'm silly maybe but anyway <adhoc>so is this a transaction list? <adhoc>presumably, at some point you merge the added items into the main list ? <amz3>I mean, I load the object from database, I mutate it and need to save it. you can think of the list storing a data assoc <adhoc>once the transactions have been store <amz3>it's writing the transaction that is difficult <amz3>I need to apply the mutations done to the scm object, to the database <amz3>yes, I merge the added items to the main list when the transaction is done <amz3>and flush the deleted list <adhoc>so this is list CRUD operations ? <amz3>basically I need to diff between the start and the end <adhoc>is an update a delete, then add ? <amz3>it can be, but in the semantic of the object, update does't make sens <amz3>I mean there is (my-scm-object-update my-thing) <adhoc>why not synchronously do the adds and deletes ? <adhoc>is this a performance oriented change ? <amz3>not really, reads are faster since then can be cached in memory <amz3>but that's not the main concern <adhoc>so why add all the complexity of transactions ? <amz3>I'm reinventing OOP inheritance <amz3>it's to add the ability to use the same datastructure for both in-memory and database backed <amz3>I could use OOP, and implement two classes, one that sync, one that doesn't <amz3>I call the in-memory datastructure "transient" <amz3>using OOP is less flexible, if say, you want to save a transient datastructure, you have to clone it as a database backend one <amz3>so 1) a single datastructure for transient and database backed datastructure 2) easy ability to move transient datastructure to database <amz3>the consequence of that, is that one can do computation, load <fact> from the database, add new ones and store the resulting graph only if it's required <amz3>also all algorithms that works on <fact> can be shared, but that is normal OOP <amz3>all this leads to wired code, I will think about it, <amz3>sorry for the cross post <amz3>Ten Rules for Open Source Success (Peter Hinjens) <davexunit>amz3: "merge first, fix later" is terrible advice <davexunit>but at least this guy promotes copyleft licenses <amz3>His writing *style* is curious <amz3>I takes strong position that seem not resonable <amz3>I think i means that when you start a project, take everything you can, make it smooth <ArneBab>I agree with merge first fix later, if you have sufficient work hours to actually do the fix: in the Freenet project we lost many contributors, because their code wasn’t merged in time <amz3>for instance, when you merge you fix the bug yourself <davexunit>ArneBab: there's a balance to be found. you don't want to ignore good work because it isn't perfect and isn't exactly how you would have written it. <davexunit>but you also don't want to accept patches that have issues or otherwise put extra burden on the maintainer <amz3> you must foster community before code. that the idea, I could go on giving examples where it can be done, but it will always seem narrow <amz3>e.G. the contraint he propose maste+merge-first is very difficult <amz3>onlye master branch and merge first <amz3>well, I found the strange TIP he gives in his eassey, it's crazy. <amz3>the chapter is about community building <davexunit>people over code is good advice, generally speaking. <amz3>the "High Scroring" paragraph is about "score" in communities. <amz3>TIP: When there is something that people are asking for, and you don’t know how to do it yourself, announce publicly that it is “impossible.” Or, propose a solution that is so awkward and hopeless that it annoys real experts into stepping up. <amz3>to finish the story, when I asked on github what was the meaning of this advice, he sent me to, i assume, a random post on his blog <healer>Is guile-dbi still the the recommended database connector for postgresql? <amz3>healer: usb3 is recommended nowdays <healer>I am having problems using guile-dbi <davexunit>healer: guile-dbi works, there's also guile-pg that I haven't used, and paroneayea here is working on a new and improved interface called "guile-squee" that is as-of-yet unreleased. <davexunit>healer: I haven't used guile-dbi except very briefly with sqlite, but what is your issue? <amz3>(ah I will apply C&E advice next time as joke ^^) <healer>davexunit:- It is difficult execute sql commands sent with guile-dbi and error messages are silent <healer>I've found it difficult to debug as a result <healer>Valid sql commands sent with guile-dbi fail silently <davexunit>healer: our good friend paroneayea may have some advice for you since he is also working with guile and postgresql. the long-term advice is to use his library when it's made available, but perhaps guile-pg will suffice for now. <paroneayea>I don't have recommendations really, except that if you want to check out guile-squee, you're welcome to.. it can only do the most minimal of things yet <healer>davexunit:- I could not install guile-pg on Debian-stable <paroneayea>but it accepts and returns everything as a string <healer>I had to abandon the installation <davexunit>is it the usual "debian stable is horribly out-of-date"? <davexunit>healer: which dependencies? it can't possibly require much. <healer>davexunit:- I really can't say if it's the fault of debian-stable; but testing and sid were moving too rapidly for my needs <healer>paroneayea:- I'll like to test guile-squee; How do i get it? <healer>Is guile-squee available on github? <healer>paroneayea: I couldn't get data into tables or get data out of tables with guile-dbi <healer>Anything that works will do for now <paroneayea>healer: both chicken and racket have nice wrappers for postgres btw... I mention because they do all the type conversions from native scheme types to the appropriate binary sql representation, and I'd like to borrow how they do it <paroneayea>for now you just have to format everything to/from the appropriate strings to your types <paroneayea>postgres has two ways of getting/sending data: either the dumb way via strings, or it returns stuff we'd have to transform from byterecords. I haven't gotten around to doing the latter at all yet. <mark_weaver>healer: btw, thanks for letting us know about interim OS! very interesting! <healer>To use guile-squee, is it sufficient to just copy squee.scm into somewhere in my $PATH? <mark_weaver>I'd like to enable such a thing in guile at some point, but it will be a lot of work to get there. <davexunit>mark_weaver: that name is familiar. what interested you about it? <paroneayea>healer: heh, I was hacking from emacs + geiser so I would compile it from inside emacs which did all the magic auto-loading for me <paroneayea>GUILE_LOAD_PATH="/home/cwebber/devel/guile-squee" guile <amz3>nalaginrut: it's not only about distributed thing, it's kind of a reflexion about where the world is going with all the tech <amz3>nalaginrut: it's impossible to write a book <nalaginrut>yes, I do like to read the so-called tech-philosophy nowadays <amz3>Cool, I hope you like it :) <nalaginrut>if it's not too long, I could try to translate it to Chinese, but it seems not short huh? <amz3>I read it in three days actually <healer>paroneayea: Okay, I'll give that a try. ***karswell` is now known as karswell
<daviid>mark_weaver: when we do this [or something like this I mean]: (define libpq (dynamic-link "libpq")) should this not be in an eval-when ? or is (dynamic-link "libpq") result valid across 'sessions' ?