<<10-12-2012>>

00:26:46*q66 quit (Quit: Quit)
06:13:09*XAMPP quit (Ping timeout: 248 seconds)
06:48:15*XAMPP joined #nimrod
09:23:29*XAMPP quit (Quit: Leaving)
10:26:02*zahary1 joined #nimrod
10:32:45*XAMPP joined #nimrod
10:33:46*dom96_ joined #nimrod
10:34:02*fowl quit (*.net *.split)
10:34:02*zahary quit (*.net *.split)
10:34:02*a_peach quit (*.net *.split)
10:34:02*dom96 quit (*.net *.split)
10:40:03*fowl joined #nimrod
11:41:32zahary1>> zahary and I talked about it for days and thought it's a good idea given the current configuration system
11:42:24zahary1Araq, the issue we discussed at length was not this actually. it was wether to use the current working directory (in the shell) as a lib path as well
11:43:50zahary1we decided against it, because it leads to non-repeatable builds. relative paths within the module to other modules should be ok
11:46:06*zahary1 is now known as zahary
15:05:39*apriori_ joined #nimrod
15:32:01*q66 joined #nimrod
16:20:35*Trix[a]r_za quit (Ping timeout: 240 seconds)
16:20:55*Trix[a]r_za joined #nimrod
16:44:22*gradha joined #nimrod
17:42:20*FreeArtMan joined #nimrod
17:44:40gradhanimrod c -r ping-statistics-fetcher.nim
17:44:46gradhaError: invalid module name: 'ping-statistics-fetcher'
17:44:59gradhaare dashes bad or something?
17:45:19fowlgradha: they cant work as a module name
17:45:50*dom96_ is now known as dom96
17:45:51*dom96 quit (Changing host)
17:45:51*dom96 joined #nimrod
17:46:16fowlgradha: ping-statistics-fetcher.somefunc() is really ping - statistics - fetcher.somefunc()
17:46:26dom96^^
17:46:28gradhaits much better than python, which allows it until you realize the mistake and renaming becomes a PITA
17:47:12fowllol
17:49:45gradhathere's something wrong with the httpclient example under macosx: echo(getContent("http://google.com")) never returns!
17:56:14Araqdoes it return under linux?
17:57:23gradhaI was going to dig into httpclient but looks like something in idetools has broken the vim plugin, did something change there recently?
17:57:40gradhajust in case I'm going to update everything now
17:58:43fowlAraq: not for me
17:58:52gradhaok, eventually getContent returns, it just takes its sweet time, apparently
18:00:40Araqgradha: I dunno, every change affects idetools as it runs the compiler all the time
18:04:19fowlweird
18:04:25fowlgetcontent() took hella long
18:04:29gradhazahary: how could I dump/view the command being run against nimrod idetools?
18:05:10gradhaI'm timing now "downloadFile(REPORT_URL, "temp.txt")"
18:05:28gradhathe temp.txt gets created, but is blank at the moment, will see how long it takes
18:08:29gradhaFetching data from http://www.google.es/
18:08:30gradhareal 3m35.460s
18:08:31gradhauser 0m1.807s
18:08:32gradhasys 0m0.279s
18:08:44gradhaodd numbers
18:10:48gradhainterrupting the program shows the stack at http://pastebin.com/hvxyqHHU
18:14:55Araqyeah makes sense
18:15:20Araqit blocks until it read buffer.high chars or a timeout occurs
18:15:41Araqwell that could be the reason
18:18:32*Araq never got posix's sockets API ...
18:23:16*apriori_ quit (Quit: Konversation terminated!)
18:24:01dom96It's quite possible there is an issue.
18:24:11dom96For example it might expect more data, and continually blocks.
18:24:17dom96After a while the http server drops the connection
18:24:33dom96and it then knows that no more data is to come.
18:31:47Araqwell that's easy to validate; just decrease the buffer size
18:32:36dom96in fact, I think I can see what the issue is already
18:32:59dom96The default implementation of sockets changed from a non-buffering to a buffering implementation.
18:33:18dom96That might be the issue
18:34:58gradhaI changed TSocketImpl.buffer to an array of 1 but still get the same behaviour
18:36:06gradhaOTOH changing socket's default buffered param to false solve this
18:37:20dom96mmm
18:58:15*apriori_ joined #nimrod
19:01:03Araqhi apriori_, I've implemented generic converters for you
19:01:10gradhalooks like running `[]` on a JSonNode with an incorrect key sigsevs, do you want a bug report?
19:02:37apriori_Araq: hey :)
19:02:48apriori_Araq: are they in git already?
19:04:18gradhaah, no, my bad, I forgot echoing nils is bad for your health
19:07:32dom96Araq: Sooner or later we are going to have to figure out why Aporia acts odd on Windows without -d:release
19:07:41dom96Araq: Any quick ideas?
19:09:46dom96Araq: https://github.com/nimrod-code/Aporia/issues/24
19:16:21fowlgradha: you should still get an exception for unknown key, right?
19:16:39gradhawith []? I just get nil
19:17:22Araqapriori_: yes
19:17:35gradhadon't think it should throw any exceptions, who knows where that json came from
19:17:41dom96yeah, `[]` returns nil if the key does not exist.
19:17:55fowlo
19:18:23fowli use haskey() automatically so i never noticed >_>
19:18:27fowlexistskey()
19:18:36dom96same :P
19:19:19Araqdom96: I'd guess it's a calling convention problem somewhere
19:19:36Araqand -d:release causes some other stack layout causing the crash
19:20:57dom96Araq: hrm, looks like I need to read up on that :P
19:21:29Araqor maybe you missed a trailing 'nil' for one varargs call
19:21:49dom96hrm, possible.
19:21:51Araqand the stack location was 'nil' by good luck in debug mode and under linux
19:22:13dom96especially because it occurs for a treeview widget.
19:22:32dom96well, on linux.
19:22:43dom96anyway, bbl.
19:24:29Araqsame here, bbl
19:33:21*FreeArtMan quit (Ping timeout: 276 seconds)
19:48:29apriori_Araq: unfortunately I just triggered an internal error: https://github.com/Araq/Nimrod/issues/271
20:05:24dom96fowl: You should add your libraries/wrappers/etc to babel. :)
20:10:23fowlii will
20:41:04*Vladar joined #nimrod
20:48:39VladarAraq, is there any way to convert string to c's *wchar_t to pass into c-function? Like mbstowcs or something
20:51:06gradhaI believe there's only cstring, which returns the C utf8 version of the nimrod string
20:51:16fowlVladar: in my experience cstring works fine where *wchar is expected, but i havent tried throwing unicode chars in there to see what happens
20:58:49apriori_guys.. for the anonymous specialisation of a generic type (say SMatrixNM*[M, N, T] = object aij*: array[M, array[N, T]]), can I somehow make typedesc[T] match a specific SMatrix[M, N, T]?
20:59:24apriori_say.. I'm stupid enough that I want to "overload" new on a typedesc.. I seem to end up with anonymous types only
21:05:47apriori_https://gist.github.com/4253422
21:08:44fowlapriori_: irt your issue im pretty sure converters dont work at all with generics
21:10:09apriori_fowl: Araq said earlier he implemented it
21:10:35fowlo
21:11:31apriori_oh.. ast based overloading was added, too
21:25:50AraqVladar: there is a way, let me look it up
21:27:00AraqallocWideCString("my nimrod string")
21:27:10Araqbut don't forget to dealloc() the wide C string
21:27:22Vladarthanks, Araq. I'll try it out.
21:28:17Araqapriori_: are you sure it's the converter? does it work when you invoke the converter explicitly?
21:29:30apriori_Araq: explicit call works
21:29:47Araqyay ... :-/
21:30:47Araqbtw your code looks like a good stress test for the compiler, but not like production code :P
21:31:12Araqbut then I guess that's indeed common production code in C++ ;-)
21:31:20apriori_Araq: what specifically?
21:35:45apriori_Araq: that's just an excerpt.. you don't want to see the whole mess ;)
21:37:02AraqTMatrixNM*[M, N, T] = ref SMatrixNM[M, N, T] # so a vector is a heap object?
21:37:22Araqa specialized matrix that resides on the GC'ed heap? ;-)
21:38:02apriori_yup.. for now..
21:38:19apriori_later tests will show whether that's actually a good idea...
21:38:29Araqit's not
21:39:31Araqand you really should decide whether it's a 4x4 matrix or something ("used for games") or a potentially huge matrix ("used for scientific computing")
21:39:34apriori_true for small matrices.. but say you got 2k x 2k
21:42:39apriori_btw, suggesting a minor language change for "conveniently" typed array literals
21:42:52apriori_(T)[...] and (T)@[...]
21:43:44apriori_I think.. a TR macro should be able to transform that (though of course depending on the compiler flag)
21:43:57Araqhow is that better than T([1, 2]) ?
21:44:18Araq(except that T([1,2]) may not work for now)
21:44:35apriori_well, I would definetly confuse T(..) with a "normal" cast
21:45:19apriori_but, well.. one could just document that and it'll be fine
21:48:31Araqwell a cast is 'cast[T](x)' and type conversions are always safe, so it's no problem to conflate type annotations and type conversions
21:49:10Araqint16(133) is already the same as 133'i16
21:50:44apriori_okay
22:05:53VladarAraq, I tried allocWideCString (also, it didn't imports with system, only as "import system/widestrs") and it failed. But when I make other one with int32 instead int16 it worked correctly.
22:08:48AraqVladar: on linux wchar_t could indeed be 32 bits ...
22:10:06VladarAraq: Well, it means, I must test it on wine too )
22:11:12Araqand hm, it's only part of system.nim on windows
22:11:23AraqI guess I should change that
22:11:40Araqwas never meant to be exported :P
22:12:34VladarIt might be using `when` for different OS'es
22:16:41Araqer ... no?
22:16:45Araqwhen defined(windows) and not defined(useWinAnsi):
22:16:46Araq include "system/widestrs"
22:16:53Araqsysio.nim:160
22:18:28apriori_need to go now
22:18:30apriori_bye all
22:20:06*apriori_ quit (Quit: Konversation terminated!)
22:39:29*gradha quit (Quit: gradha)
22:41:51Vladarbye
22:42:01*Vladar quit (Quit: Leaving)