--- Log opened Sat Feb 11 00:00:59 2006 01:35 < kanru> how do I construct a byte array? 01:35 < kanru> def b = array [0xff : byte, 0xef] looks weird 02:18 -!- sproingie [n=chuck@64-121-2-59.c3-0.sfrn-ubr8.sfrn.ca.cable.rcn.com] has joined #nemerle 06:30 -!- sproingie [n=chuck@64-121-2-59.c3-0.sfrn-ubr8.sfrn.ca.cable.rcn.com] has quit [Remote closed the connection] 08:52 -!- kanru2 [n=kanru@59.121.159.249] has joined #nemerle 08:57 -!- kanru [n=kanru@59-121-147-117.dynamic.hinet.net] has quit [Read error: 110 (Connection timed out)] 10:08 -!- nazgul` [n=d47f5f7d@lilith.ii.uni.wroc.pl] has joined #nemerle 10:08 -!- mode/#nemerle [+o nazgul`] by ChanServ 10:09 <@nazgul`> kanru: array [x : byte, y, z] or array[x,y,z] : array[byte] is a best way. You can also you byte literals, like 1B, 32B, but it will be a little bit confusing connected with hexadecimal notation 0xABB 10:18 < kanru2> nazgul`: but def b = array[x,y,z] : array[byte] doesn't work at all 10:18 < kanru2> t.n:1:9:1:32: error: expected array [System.Byte], got array [int] in type-enforced expression: the types System.Byte and int are not compatible [simple unify] 10:21 <@malekith> kanru2: this is a bug .. 10:21 <@malekith> kanru2: more or less 10:22 <@nazgul`> hm, I thought it was already solved.... 10:22 < kanru2> ah.. ;) 10:23 <@nazgul`> but indeed I stepped on something like (1,2) : byte * long causing the same error 10:23 <@nazgul`> so it seems that type enforcement does not go inside the structure when it comes to implicit conversions 10:46 -!- kanru2 is now known as kanru 11:00 <@malekith> nazgul`: no, it doesn't. there were some problem with it ... 11:00 <@malekith> I don't remember what exactly 11:07 -!- nazgul` [n=d47f5f7d@lilith.ii.uni.wroc.pl] has quit ["CGI:IRC (EOF)"] 11:17 -!- nazgul` [n=d47f5f7d@lilith.ii.uni.wroc.pl] has joined #nemerle 11:17 -!- mode/#nemerle [+o nazgul`] by ChanServ 16:42 -!- kanru [n=kanru@59.121.159.249] has quit ["Leaving"] 17:04 -!- danmorg [n=danmorg@pool-141-152-12-181.rich.east.verizon.net] has joined #nemerle 17:04 < danmorg> hi 17:06 <@malekith> hi 17:23 < danmorg> i hear nemerle is good for writing database-driven applications because of its macros 17:27 <@nazgul`> did you take a look at http://nemerle.org/SQL_macros ? 17:28 <@nazgul`> we have some macros, which perform checking and generation of SQL access code, but they are rather experimental (though from time to time we hear people using them) 17:29 <@nazgul`> of course potential is very large, you can easily write your own macros to automate some dull code 17:31 < danmorg> this is my favorite here: 17:31 < danmorg> def myparm = "John"; 17:31 < danmorg> def count = ExecuteScalar ("SELECT COUNT FROM employee WHERE firstname = $myparm", 17:31 < danmorg> dbcon); 17:32 < danmorg> how it handles the parameter for you 17:32 < danmorg> when you have a bunch of tables... and each table could be over 100 columns... creating parameter for each column can be tedious... 17:32 < danmorg> in C#/vb.net that is 17:33 < danmorg> i had to create code generators do it... i shouldn't have to that 17:34 < danmorg> i've come from a background using langauges like nemerle that handle that stuff for you 17:44 <@malekith> well... one need to write the generators anyway, but they are run from inside the compiler and called macros ;-) 17:45 < danmorg> is there support for other DBMS other than PostgreSQL/Npgsql ? 17:45 <@malekith> MS-SQL 17:45 <@malekith> but adding other should be strightforward 17:47 <@nazgul`> right, I had some problems with Sqlite, but it's only because its implementation did not support geting the schema of table, etc. 17:48 <@nazgul`> but if the DB provider is complete, then it should be strightforward 17:57 < CIA-17> nazgul * r6115 /nemerle/trunk/ncc/ (generation/ILEmitter.n typing/OverloadPossibility.n): Avoid callvirt for this.not_virtual_method() 18:37 < danmorg> for the SQL macros, what databases are supported? i heard postgresql, sqlite, and sql server. i looked in the docs and i can't find this info. what about oracle, sybase, and firebird? 18:42 <@nazgul`> you can take a look at nemerle/macros/data* 18:43 <@nazgul`> there is support only for Postgresql and Sql Server, but writing support for other DB/providers should be simple 18:43 <@nazgul`> (just changing names of provided classes) 19:13 -!- Arnia [n=jgeldart@14-16-101-159.adsl.legend.co.uk] has quit [Excess Flood] 23:44 < d> < kanru2> nazgul`: but def b = array[x,y,z] : array[byte] doesn't work <@malekith> kanru2: this is a bug ==> http://nemerle.org/bugs/view.php?id=486 23:44 < d> state: resolved btw 23:52 <@malekith> (0000910) 23:52 <@malekith> malekith 23:52 <@malekith> 08-23-05 20:47 23:52 <@malekith> [ Edit ][ Delete ][ Make Private ] I forgot, the version with :array[byte] won't work. Unfortunately we do not propagate type information this way. 23:53 <@malekith> I will have to look at it. There was certainly some reason why this propagation was disabled (it was in place some time ago) 23:53 * malekith & 23:58 <@nazgul`> ah, so maybe this is realted to covariance causing strange errors --- Log closed Sun Feb 12 00:00:00 2006