IRC channel logs


back to list of logs

<paroneayea>davexunit: left some messages for you with sneek :)
<davexunit>well then I should talk ;)
<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>paroneayea: strings it is, then.
<nalaginrut>morning guilers~
<davexunit>hey nalaginrut
<nalaginrut>seems a little bit too early
<nalaginrut>heya davexunit
<davexunit>ACTION attempts to relearn Guile's C API
<davexunit>I avoided it for awhile, but Sly needs a C extension in order for rendering to be fast enough.
<paroneayea>davexunit: for particles?
<davexunit>paroneayea: among other things
<davexunit>any kind of matrix multiplication heavy code
<davexunit>which is all of rendering, basically.
<davexunit>all dealing with floating point numbers.
<davexunit>offloading it to some efficient low-level C functions should bring great speed gains.
<davexunit>and I can drop the GSL dependency.
<paroneayea>ACTION nods
<paroneayea>davexunit: makes sense
<davexunit>while also not compromising the high-level stuff
<nalaginrut>davexunit: ah yeah, accelerate with C is good for sly
<nalaginrut>davexunit: does the sound works in sly now?
<davexunit>nalaginrut: I have a sound module, but it's old and I haven't made a functional API for it.
<nalaginrut>I haven't tried it for a year
<davexunit>been focused on rendering.
<nalaginrut>alright, rendering is more important
<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>the rest of the code can remain as-is.
<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.
<mark_weaver>davexunit: sounds reasonable
<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
<daviid>ok, i understand
<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
<davexunit>but there's issues.
<davexunit>at least in my case.
<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.
<daviid>I see, tx for the explanation
<daviid>we won't beat GPU though
<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 ?
<davexunit>or #\\↑
<daviid>ah tanks!
<daviid>"#\\x2191" writes #!91 in my clutter text instance
<davexunit>#\\x2191 is a character literal
<davexunit>daviid: use "\\u2191"
<davexunit>that's the escape sequence within a string
<daviid>oh, stupid me, tx
<daviid>tired [wonderful excuse haha]
<davexunit>well you did ask for how to do it "in a string" :)
<davexunit>so also my bad
<daviid>yes, then i copied pasted ... oh well
<daviid>it works
<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
<daviid>no big deal, jst curius
<mark_weaver>daviid: no, mouse clicks are not represented as characters in unicode or X
<daviid>mark_weaver: ok, tx to confirm
<daviid>for the fun:
<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>looks interesting
<wleslie>it remains to be seen if the UI doesn't suck
<wleslie>ah, it's similar to Rx
<nalaginrut>amz3: oh, another actors
***sbp_ is now known as sbp
<civodul>Hello Guilers!
<wleslie>hey ludovic!
***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:
<__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>héllo :)
<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
<amz3>there is no timestamp
<amz3>adhoc: yes
<adhoc>so you don't mutate the initial list at all ?
<amz3>i move the removed items to the list of deleted items
<adhoc>but not the added ones?
<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 ?
<adhoc>purge the deleted 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>I think
<adhoc>what about updates ?
<amz3>basically I need to diff between the start and the end
<amz3>there is no update
<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>so thats an in place update
<amz3>sorry, there is not*
<adhoc>why not synchronously do the adds and deletes ?
<amz3>yes, I used to do that.
<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>thx adhoc!
<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
<davexunit>that's refreshing
<amz3>His writing *style* is curious
<amz3>I takes strong position that seem not resonable
<amz3>like the one you quote
<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>It's in the paragraph "High Scoring" in the chapter Sphere of Lights
<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>then it writes
<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.
<healer>Hello everyone
<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
<amz3>(better performance)
<healer>I've not come across it
<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.
<healer>Thanks amz3
<amz3>healer: it's joke :))
<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>hello healer, davexunit
<healer>Hello paroneayea
<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
<paroneayea>it can run queries, get their results
<paroneayea>blah blah
<healer>davexunit:- I could not install guile-pg on Debian-stable
<paroneayea>but it accepts and returns everything as a string
<paroneayea>it's not ideal
<paroneayea>it *is* easy to hack because it uses the FFI
<davexunit>healer: why not?
<healer>unsatisfied dependencies
<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?
<civodul>paroneayea: nice!
<healer>paroneayea: thanks
<paroneayea>healer: it is verrry early stages
<paroneayea>but I was able to save/extract data from it
<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
<healer>paroneayea: thanks
<healer>checking guile-squee out now
<paroneayea>healer: let me know how it goes
<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
<amz3>nalaginrut: o/
<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.
<nalaginrut>amz3: heya
<amz3>nalaginrut: you missed my favorite essy among many others ;) aka.
<healer>paroneayea: thanks
<healer>I've just perused your repo
<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.
<healer>mark_weaver: you're welcome
<mark_weaver>I have to go afk for a while. ttyl!
<davexunit>mark_weaver: that name is familiar. what interested you about it?
<davexunit>oh, nvm!!
<davexunit>(answer later at your convenience)
<mark_weaver>davexunit: <healer> Came across and today via
<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>healer: let me see.
<davexunit>mark_weaver: thanks
<paroneayea>healer: this works:
<paroneayea>GUILE_LOAD_PATH="/home/cwebber/devel/guile-squee" guile
<paroneayea>adjust path appropriately
<paroneayea>(use-modules (squee))
<paroneayea>should then work
<nalaginrut>amz3: well, looks cool!
<nalaginrut>amz3: did you write this essay?
<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' ?