| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
<ijchain> <torsten> db eval {select * from table where a=$foo($bar)} will not work, for example <ijchain> <aku> de - Yes, rmax wants to do that ... <ijchain> <rmax> BTW, the mic does not look like it is too close to his mouth. <ijchain> <Unununium> It probably doesn't understand how to evaluate $foo($bar) <ijchain> <de> Great! Thanks! <ijchain> <Unununium> Tcl doesn't know it has a variable named "foo($bar)" or "foo" or whatever Sqlite queries <ijchain> <gwlester> de, you should have been here! <ijchain> <torsten> yes, but the manual says: "Tcl variable names can appear in the SQL statement" and this is a variable,no? I would expect this to work <ijchain> <rmax> aku: no, I actually don't want to do that, but I am open to give the raw files to anybody who does. <ijchain> <Unununium> Try $foo(bar) instead <ijchain> <torsten> this works, I know <ijchain> <dkf> I guess you can only use scalar variables? <ijchain> <Unununium> Since sqlite probably won't do the lookup on $bar before looking up $foo(whatever) <ijchain> <aku> de - Then what will you do with the recorded files ? <ijchain> <torsten> seems so, but why this limitation? <ijchain> <aku> sorry, I menat rmax, not de with my last question <ijchain> <Unununium> It doesn't reimplement all of the Tcl variable substitution rules <ijchain> <de> gwlester: Sure, I'd love to be. But there are a few 'buts ...' too much for this year, again. :-( <ijchain> <Unununium> Implement, reimplement, it depends on how you look at it <ijchain> <de> aku: listen :-) <ijchain> <Unununium> Sometimes I think it would be neat to be able to turn dodekalogue rules on and off in child interps <ijchain> <rmax> aku: give them to somebody who has the time and patience to split them and make them available as separate files. <ijchain> <willdye> Man, it's great to finally hear the voices of Tcl'ers. One of the things I learned when getting a bachelor's degree in multimedia is that people remember information better when you link it to different senses. Shake hands with someone, and you get audio, visual, and physical contact. That's one of the main reasons why virtual conferencing still has a long way to go. <ijchain> <aku> I see ... <ijchain> <aku> How many files do you have so far, what size ? <ijchain> <Unununium> This would be a good use for that. Run the sql through a limited child interp that only substitutes variables (and by a special mechanism plugged in by Sqlite) <ijchain> <Unununium> (idea needs much more work) <ijchain> <rmax> 1 file with 160MB. <ijchain> <aku> One file ?! Wow. So things are recorded continously ? <ijchain> <rmax> yes <ijchain> <aku> With several hours of silence during the night ? <ijchain> <tclguy> you can use snack to split it up ;) <ijchain> <rmax> I would have to restart the servers to split the files during recording. <ijchain> <aku> I see <ijchain> <Unununium> postprocess it <ijchain> <aku> At least silence should compress well ... <ijchain> <rmax> aku: no, it stops recording when I stop the sending process. <ijchain> <Unununium> then don't!! <ijchain> <Unununium> :^) <ijchain> <aku> unun - postprocessing is still iffy for .ogg files, need good automatic tools. <ijchain> <Unununium> vcut <ijchain> <rmax> aku: didn't you write an ogg parser last year to split the stream at stream boundaries? <ijchain> <LucMove> the long silence periods are easily spotted in a waveform editor <ijchain> <Unununium> vcut is supposed to do that; let me go find its man page <ijchain> <aku> Yes ... <ijchain> <rmax> ... split the file at stream boundaries, that is. <ijchain> <aku> That may work ... <ijchain> <aku> Now I have to find the parser on my disks ... <ijchain> <Unununium> Yup, vcut should do it. Just identify the ranges in a waveform viewer, and that's it <ijchain> <rmax> Unununium: to use vcut, you have to know where you want to cut it. <ijchain> <Unununium> That's what the waveform viewer is for <ijchain> <Unununium> It accepts sample and time(seconds) positions <ijchain> <Unununium> Although, I would like it better if it would allow me to specify a range to extract <ijchain> <Unununium> Anyway, to see the tclsqlite variable substitution mechanism, look around line 1250 in src/tclsqlite.c from version 3.2.7 <cleverly> "are they on the cd?" (gwlester) <ijchain> <torsten> ok, I'll do when I get the time <azbridge> *** mhage entered <ijchain> <LucMove> clap clap clap <ijchain> <Unununium> Hey, you can use : in place of $ and it still works. That's funny... why? <ijchain> <kbk> : is the usual SQL syntax for variable substitution. <cleverly> : == bind variables traditionally <ijchain> <gwlester> unununium, richard said please send him an email, he has connectivity issues right now <ijchain> <Unununium> Ah, that's right. I had to write some SQL stuff in Java once <ijchain> <aku> Slience ... <ijchain> <Unununium> gwlester: danke <ijchain> <aku> Sound <ijchain> <kbk> Who's this? I had silence for the introduction. <ijchain> <rmax> we had to hand over the mic <ijchain> <aku> According to dkf <ijchain> <aku> Oscar Bonilla <ijchain> <aku> Structures For Tcl <cleverly> He's with BitMover <ijchain> <aku> dkf - Who will be on after Oscar, with what Talk ? <ijchain> <aku> Silence back <ijchain> <dkf> D Bazin <ijchain> <willdye> I'm still getting sound (though I'm trying to get the Larry McVoy song out of his head, after seeing the word BitMover). <ijchain> <aku> Restarting my player ... <ijchain> <aku> Ok, sound back <ijchain> <LucMove> new pics at http://tclers.tk/tcl2005/ <ijchain> <dkf> SpecTk: Displayer fopr NSCL SpecTcl <ijchain> <dkf> (which is not SpecTcl the GUI design tool) <ijchain> <aku> dkf - Thanks <ijchain> <Unununium> Hi drh <ijchain> <Unununium> I'm writing an email to you right now <ijchain> <kbk> Oscar is describing the "Ravioli Code" problem... <ijchain> <rmax> new photos uploaded. <ijchain> <willdye> When talking about c vs. c++, Mr. Bonilla is probably referring to the web article by Joel Spolsky about keeping error effects close to the error. <ijchain> <Unununium> Alright. Summary of the problem: [db eval {attach $var as foo}] gives {near "$var": syntax error} <ijchain> <Unununium> Hey, where is this event taking place? <ijchain> <drh> The $var substitution only works in places where it is valild to put an expression. <ijchain> <Unununium> I'd like to use it here, so the filename can come from user input <ijchain> <drh> $var is a named parameters. <ijchain> <drh> The TCL bindings look at all named parameters, grab the value of the TCL variable with the same name, and bind that value. <ijchain> <kbk> John used the word, "dainty" to describe the size of Tcl scripts that he originally envisioned. <ijchain> <willdye> Unun: http://wiki.tcl.tk/13846 describes the conference <ijchain> <drh> You'll have to do this: db eval "attach '[string map ' '' $var]' as foo <ijchain> <willdye> Un: It's in Portland <ijchain> <Unununium> Is that a double quote or a double ' <ijchain> <Unununium> willdye: thanks <ijchain> <gwlester> hi steveo <ijchain> <steveo> Hi Gerald - how's everything <ijchain> <Unununium> drh: I'll do that, but consider putting this in a FAQ. Also maybe think about allowing Tcl variables to store filename objects, as this might be useful for interactive SQL viewers/editors. <ijchain> <drh> db eval "attach '[string map ' '' $var]' as foo" <ijchain> <drh> The '' before the $var is two ' characters in a row. <ijchain> <gwlester> steveo, conference is going well -- we have arround 70 to 80 people <ijchain> <Unununium> Ah, that's how you quote 'em <ijchain> <steveo> great <ijchain> <Unununium> Sorry, ''em heh <ijchain> <willdye> The "i = j * 5;" example to which the speaker referred is probably from this article: http://www.joelonsoftware.com/printerFriendly/articles/Wrong.html <ijchain> <torsten> drh: why does db eval {select * from table where a=$foo($bar)} not work. Shouldn't it? <ijchain> <Unununium> torsten: tclsqlite knows nothing about computed variable names <ijchain> <drh> Because Tcl_GetVar() does not understand $foo($bar) <ijchain> <drh> The name is p***ed directly to Tcl_GetVar(). <ijchain> <gwlester> he complains about will's hsb and vsb, but he uses fn and dbg <ijchain> <Unununium> drh and torsten: is there any demand for this feature? <ijchain> <Unununium> Because it can get out of hand, supporting [bracketed] Tcl and {expand} and everything. <ijchain> <dkf> I'd complain about dbg (especially if it meant anything other than "debug") but wouldn't use it myself <azbridge> *** mhage left <ijchain> <willdye> The speaker's discussion of the lack of immutable objects makes me wonder if it's really a good idea to try to make languages do type checking and mutability checking. Maybe that should be done at runtime, with unit tests and such. Ex: http://mindview.net/WebLog/log-0025 <cleverly> I don't think that a snit definition is any less clear, if you don't know snit, than a C struct is if you don't know C. <ijchain> <gwlester> He has C bigotry, wanting to use "->" instead of "." -- but then my first language was pascal <ijchain> <miguel> drh: why not use Tcl_GetVar2? <ijchain> <Unununium> cleverly: snit definitions are clearly very cool-looking; that counts for something <ijchain> <torsten> Well, I often have these kind of arrays. I just like the substitution sqlite does for me, and it didn't state anywhere in the docs that $foo($bar) does not work. Had to find this out myself. <ijchain> <drh> I too have issues with Oscar's notation. But his core point that code you be understandable in isolation is still valid. <ijchain> <willdye> drh Agreed. <cleverly> I find snit definitions very understandable in isolation :) <ijchain> <torsten> but then again, drh, sqlite is just soo great. I use it nearly every day. Thanks !! <ijchain> <willdye> Er, agreed about isolation. I can't see the notation, so I can't comment on that part. :) <ijchain> <aku> I like snit as well, and consider it quite readable <ijchain> <gwlester> cleverly, agreed <ijchain> <Unununium> drh: I'm using it to manage user and node information for a small cluster, rather than dig all that information out of the standard Unix file databases spread across all the nodes <ijchain> <gwlester> I think the entire point is that he wants Tcl to look more like C <ijchain> <aku> That is actually consistent with Lary McVoy's drive <ijchain> <drh> gwlester - I disagree. I think the point is to make the code more maintainable. <ijchain> <Unununium> gwlester: tell him to use the Tcl C library, which is great even without the language of the same name <ijchain> <drh> bitmover chooses to make tcl look more like c to accomplish that, but that is just a choice. there are other alternatives. <ijchain> <willdye> gwlester : Well, it is The Cameleon Language. suchenwi seems to be able to make it look like Lisp, awk, and Greek all at the same time. :-) <ijchain> <dkf> If the setter knows the magical ->, it all works fine <ijchain> <dkf> I've done that in the past :) <ijchain> <gwlester> drh, the reason I said what I did was his comments about the other ways are not clear. It seems as though it is my way and the wrong ways <ijchain> <Unununium> gwlester: are those sets equivalent, disjoint, overlapping, or what? :^) <ijchain> <drh> that is larry bias showing through. try to see the good points and filter out the larry-talk. <ijchain> <gwlester> drh, understand <cleverly> "have you actually implemented any of that syntax sugar yet?" (will duquette) <cleverly> "do you intend to implement?" (bryan oakley)
Return to tcl or Go to some related
logs:
lightcache vray blackmetal
|
|