<<18-11-2012>>

00:00:18Araqtest5 tests a sequence of tuples
00:07:53dom96well that's just weird.
00:08:15dom96unknown file(1, 0) Error: '{' expected for an object expected [EJsonParsingError]
00:08:22dom96I get this when trying to reproduce.
00:08:44dom96the generated json seems fine
00:23:33*q66 quit (Quit: Quit)
00:29:45Araqgood night
00:56:50dom96!lag
00:56:50NimBot10001ms between me and the server.
00:57:10dom96!lag
00:57:10NimBot10001ms between me and the server.
01:03:31dom96!lag
01:03:31NimBot7ms between me and the server.
04:46:20*XAMPP_ joined #nimrod
04:49:40*XAMPP quit (Ping timeout: 246 seconds)
05:18:01*XAMPP_ quit (Read error: Connection reset by peer)
05:18:25*XAMPP_ joined #nimrod
07:49:27*FreeArtMan joined #nimrod
07:50:11Araqwb FreeArtMan
07:54:39*FreeArtMan quit (Ping timeout: 252 seconds)
08:36:36*FreeArtMan joined #nimrod
08:55:18AraqFreeArtMan: if you like to develop kernel modules, the stdlib will need some patches for that; best way is to try and nag me whenever there is a problem ;-)
08:56:04Araqafter that do a pull request and perhaps add an article to the wiki ... :D
09:02:01Araqbut I have to go, see you later
09:16:13FreeArtManok
10:22:02*fowl_ joined #nimrod
10:25:23*fowl quit (Ping timeout: 255 seconds)
11:02:16*ekselkiu joined #nimrod
11:09:06*FreeArtMan quit (Ping timeout: 264 seconds)
11:32:14*q66 joined #nimrod
11:37:10dom96!ping
11:37:10NimBotpong
11:43:43Araqdom96: I think I already know the marshal bug ;-)
11:44:04Araqdunno yet what the best fix will be though
11:46:08dom96ok
12:00:50dom96Araq: http://build.nimrod-code.org/beta Almost done! :P
12:02:41Trixar_zaHow do I se the damn away nick with this thing :/
12:07:54Trixar_zaThere we go
12:08:10Trixar_zaI hate upgrading stuff that breaks backward compatibility every release
12:20:57Araqdom96: excellent :Dd
12:21:12AraqI annotated sockets.nim, you may have a look over it
13:11:32Araqping zahary
17:26:46*Trixar_za is now known as Trix[a]r_za
18:51:19*gradha joined #nimrod
18:59:00Araqping zahary
19:01:42Araqping gradha
19:01:54gradhapong Araq
19:02:48AraqI've implemented #250
19:03:01Araqas the compiler already did the check for codegen
19:03:18gradhadidn't you say it was a PITA?
19:03:24gradhaI was expecting you to close it
19:03:30*FreeArtMan joined #nimrod
19:03:45Araqbut the warning is turned off per default and the stdlib uses the 'var a = a' idiom
19:04:06Araqthere was also a request to warn about shadowing 'result'
19:04:23gradhaexcellent, more options always feels like christmas
19:04:36AraqI dunno ...
19:04:59Araqthe docs about compiler switches are already excessive ...
19:05:50gradhawell, wading through all C warning/error switches always requires a good afternoon anyway
19:06:07gradhaat least if you want to understand what they do, rather than quickly read them
19:06:25gradhasuch is the reality of compilers
19:06:45Araqwhat's up with #174 btw? still valid?
19:07:29gradhahaven't checked in a while, I'll see again when I come to implementing the iOS todo example
19:07:40Araqok
19:07:46gradhaI'll fire it up now to see how it goes
19:09:16AraqI hate it when the list of issues becomes too long ...
19:09:27Araqand I have to page
19:10:01zaharyhi Araq, what's new?
19:10:25Araqwanted to talk with you again about first class iterators
19:11:31Araq1) I still wasn't able to find out whether C# 5 captures the full stack or not
19:11:46zaharyit doesn't
19:11:57Araq2) first class 'yield' cannot be made compile-time evaluable without rewriting evals.nim
19:12:20Araqwhich is not a bad thing I guess since people want it to be a real VM anyway
19:12:41zaharyrewriting? not merely augmenting? why so?
19:12:49zaharyhaven't thought about it at all
19:13:10Araqwe can only evaluate structured control flow
19:13:20Araq'yield' is too unstructured ;-)
19:13:34Araqconsider this:
19:13:42Araq while cond:
19:13:46Araq stmts
19:13:54Araq yield value
19:13:56zaharybut the transform to closure will happen before evals? why wouldn't it just work?
19:14:10Araqthe closure is not the problem
19:14:25zaharyaha, it's the lack of gotos?
19:14:29Araqyes
19:14:32zaharyI see
19:14:55Araqwe can't eval goto with the current approach
19:15:21zaharywell, I would list this as known limitation for now
19:15:24Araqok, rewriting as an "interpreter loop" would work as well I guess
19:15:43Araq(we talked about it: rewrite everything to fit a single while+case statement)
19:18:03Araqbut meh, rewriting evals to use a proper bytecode is fun :-)
19:18:06zaharyI was thinking through the necessary steps of integrating the compilation of macros to DLLs with my new compilation scheme. it wouldn't be extremely hard to do
19:18:45Araqyeah but I'd prefer to have a proper nimrod interpreter now
19:19:02Araqwe get a REPL for free then
19:19:38Araqand having a "scripting layer" that's statically typed is sweet too
19:19:55zaharyit's useful to have an interpreter, yes
19:20:34Araqplus we can add it to the stdlib and implement 'eval'
19:20:36zaharywhat about the other idea of reusing lua? it's more exotic, but it too might work
19:21:23Araqreusing the JS backend sounds like a better plan then
19:21:53AraqJS supports 'try' for a start
19:22:50zaharyI woudn't argue the details - it's true that there are usable JS implementations out there
19:24:30Araqwell Lua is fine with me too, it's a nicer dependency than "v8" or spidermonkey
19:24:39Araqmuch easier to build I'm sure
19:24:44zaharyyou can also implement iterators as true coroutines in the current design I guess - i.e. allocate additional stack for them
19:25:30Araqthe problem is we use recursion in evals.nim and thus have not much control over the stack
19:25:46Araqand so we can't have continuations in evals.nim easily
19:27:11zaharywhat do you mean? ok, we use recursion, but all functions work on EvalContext (which contains the stack) - can't we allocate another EvalContext for the coroutine?
19:28:12Araqthe stack doesn't contain the control flow within a single proc
19:29:09AraqnkWhileStmt is interpreted with a Nimrod while loop
19:29:17Araqyou can't resume that easily
19:29:34zaharywhat you mean is that we cannot interrupt the execution at a given point and resume it later?
19:29:42Araqyes
19:29:46gradhaAraq: updated https://github.com/Araq/Nimrod/issues/174 with current git nimrod and latest xcode warnings
19:30:49zaharywe can if we allocate a stack in the evaluator itself too, but ok, this is getting complicated
19:32:41AraqI tried to eliminate the recusion in evals.nim years ago btw
19:32:57AraqI think it's impossible without introducing a bytecode
19:33:31gradhaIf you need the generated source that xcode tries to compile you can get it at http://dl.dropbox.com/u/145894/nimrod/system.m and replace the other paths in the url
19:35:23Araqgradha: the missing prototypes are worrysome; does hello.nim have the same problem?
19:35:52gradhawhat hello.nim?
19:36:06Araq'echo "hello world"'
19:36:21gradhaah, you mean compiling that
19:36:59Araqbut yeah (2) is interesting but not very important
19:37:37Araqnumber 3) is: using 'iterator' and 'yield' for async programming reads horrible
19:38:09Araqso I plan to have:
19:38:17Araqproc p() {.async.} =
19:38:22Araq await downloadUrl()
19:38:41Araqwhere 'await' is a simple template that aliases 'yield'
19:38:49zaharyit's not bad - I have suggested it in my gist after all :)
19:39:10Araqand 'async' transforms the proc into an iterator returning a 'PEvent'
19:39:35AraqI still think 'event' is a much better term than 'promise' as promise for me has something to do with threads
19:39:48gradhahallo.nim shows the same problem as backend.nim, missing NimMain prototype
19:40:10gradhathe other missing prototypes are in system.m, which I presume is the same for every generation
19:40:28Araqis NimMain invoked before it's defined?
19:40:28zaharyabout the "event vs promise" debate, I personally like the C# meaning of `event` (what in C++ we call signals/slots, publish/subscribe)
19:41:25zaharypromise is an object with a bit more semantics - it can be resolved, it can be rejected, and I also like some modern developments when another onProgress event is added for reporting progress from the async operation
19:42:05gradhaI think the problem is that whatever.m generated file doesn't include its own whatever.h file
19:42:20Araqnor should it
19:42:31Araqthe compiler only generates the header for you
19:43:26zaharysome libraries also call it `deferred` btw, to add another name to the list
19:44:20Araqgradha: do you mean the bug only shows up when you use --generateHeader
19:44:53Araqwell it's an "event loop" and the iterators request the event to wait for
19:45:03Araqit's the natural term for me
19:45:06gradhait's not really a bug, it's a warning that I enabled in llvm named "Missing Function Prototypes"
19:45:17Araqit's a bug
19:45:38Araqmissing prototypes cause strange conversions (everything is converted to 'int' or something)
19:45:41gradhait's not a default warning, if I disable it there are no complaints
19:46:00Araqmissing prototypes are bugs
19:46:03gradhaok
19:46:29zaharywhat I am saying is that by calling this thing event, you miss the opportunity to call `events` the much more widely useful signals/slots
19:46:54gradhamy question is as follows: if whatever.m doesn't include whatever.h, where NimMain is defined for external code, maybe you should re-prototype it at the beginning of whatever.m
19:47:03zaharybtn.onClick do:
19:47:03zahary ….
19:47:03zaharythat's the events I'm talking about
19:47:16gradhahmm... in fact, this example only uses a single nimrod file, if I had two would I have two NimMain header prototypes?
19:47:58gradhaI'll try with some more nimrod files and get back to you later
19:48:01dom96I agree with zahary, that's what I associate the term 'event' with.
19:48:02Araqso what? two identical prototypes are no bug
19:48:28Araqalright then
19:48:29gradhaok then
19:48:31zaharyasync.TEvent vs events.TEvent ?
19:48:42Araqthat's confusing
19:48:52dom96and indeed we do already have an events module :P
19:48:55zaharythat's my point
19:48:59zaharyunnecessary clash
19:49:15Araqthe events module needs to changed anyway
19:49:22Araqit was written before we had closures
19:49:45zaharyin fact, the implementation of TPromise (or whatever it's called) should consist of 3 events - success, failure, progress
19:50:04zaharyevent is the primitive publish/subscribe object
19:50:11zaharylist of closures to be called
19:50:22Araqnah not in my book :P
19:50:58Araqit's the base class for an hierarchy of promises that epoll supports
19:51:26Araqsomething like: file handle, socket handle, timer, ...
19:51:37zaharyepoll should not concert itself with promises - promises are resolved with normal callbacks (which is what epoll calls)
19:52:13Araqyou've looked at titer8, right?
19:52:47zaharywhat about it?
19:53:14Araqthat's what I imagine: the even loop supports a simple list of iterators that 'yield' what they await
19:53:19Araq*event loop
19:53:42Araqnothing too fany ... error handling will be done with exceptions
19:54:08zaharyit can't be handled with exceptions
19:54:19Araqwhy not?
19:54:20zaharylet me find a link to article that explains that
19:54:30Araqok
19:55:59zaharyhttps://gist.github.com/3889970
19:56:41zaharyalso, explain in details what you mean by "the even loop supports a simple list of iterators that 'yield' what they await
19:56:41zahary*event loop"
19:57:44zaharythe event loop works by you requesting some async operation like "send these bytes over the network", and the operating system posting a "operation complete" object in your event queue (completion port on windows, epoll queue on linux, etc)
19:58:09zaharythis is why the fundamental primitive is "the operation complete" object has arrived - execute that callback
19:58:49zaharypromises add additional sugar over this by allowing multiple interested parties to be notified when the callback is executed
20:02:29gradhaAraq: I have added more .nim files to the ios example, now each of them defines its own NimMain in the objc generated code. I'm using --noMain to compile, but maybe that only takes effect at the nimrod level
20:03:05gradhamaybe compiling .nim files individually is not the right way to generate C/objC code and I have to compile through a "project" file?
20:03:58Araqindeed you should never compile .nim files individually
20:04:25gradhayay!
20:04:53Araqzahary: I wonder whether that's the reason why in C# 'await' is not simply compiled into a yield
20:04:56gradhain that case everything is wrong so far, I'll look up on projects and report later
20:05:07Araqgradha: good
20:05:43Araqzahary: which would be my next question: they say something about how the compiler transforms it into CPS form
20:05:58Araqbut I don't get why they even need to do that
20:06:15zaharyaraq, indeed await should return reject value in case of failure - it's also a good idea to allow the user to add custom handling by adding else or except block
20:06:15zaharyvar x = await downlaod(url)
20:06:15zahary else: …
20:06:43Araqthey could simply promote all variables to the heap as I do ... :-)
20:07:19*fowl_ quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
20:07:26zaharyCPS is alternative strategy - you can try digging though this project to understand the implications
20:07:26zaharyhttp://maxtaco.github.com/coffee-script/
20:09:37zaharyI personally haven't yet read much about it, but it's apparent that in Iced coffee-script the integration goes a bit further as it interacts with for loops and other stuff like that
20:10:29zaharyawait
20:10:29zahary for k,i in keywords
20:10:29zahary search k, defer out[i]
20:10:36*fowl joined #nimrod
20:10:53AraqCPS is much more complicated to implemented
20:11:15Araqand you need a good inliner for it
20:11:57Araqand you need to do some tricks so that the "returns" are predicted by the CPU as good as an ordinary return
20:12:44zaharyI personally find promises really beatiful and easy to work with in the projects where I've used them and the with the iced model it's harder to imagine what's actually going to happen (to execute the code in your head to to speak)
20:13:50AraqI'm still thinking how to do error handling with my approach :P
20:13:56zaharyit's nice to see this await / defer span other control flow structures, but it's easy to translate their code to regular promises
20:20:05Araqthe gist is very convincing though
20:20:49Araqthings that don't compose properly are not good design
20:21:00zaharywell, this is really solved problem - you are not the first one to think about it.
20:21:00zaharyit's not that exceptions are incompatible with async code - you can use them but they must be converted to rejected promises when they leave the async boundary of the code
20:25:47Araqso as far as I can see Nimrod's yield implementation is just fine for promises, right?
20:26:03zaharyyes, it's fine
20:26:08Araqit's just that the API will be more complex than I would prefer
20:26:34zaharythis is the runtime stack with async code: epoll() -> thin_net_framework_layer() -> user_iterator() - you don't want the exception from the user code to go through thin_network_layer, you want anyone waiting on the job the user_iterator is performing (download files for instance) to be notified that it failed
20:27:51zaharynow imagine what this waiting code looks like - it itself waits on the promise
20:27:51zaharyawait download_files() - so this promise gets rejected and possible handled here or otherwise just result in further rejection of the bigger async job that has "download files" as part of it
20:31:25AraqI dunno, in sync mode an exception isn't propagated to multiple "listeners" either
20:31:44zaharywell, multiple listeners is just a convenience
20:32:26zaharymost of the code has single listener - multiple listeners are cool, because they allow you to write some abstracted code that works over "any task"
20:32:47Araqcan't think of a really useful example for that; maybe for UIs ...
20:33:07zaharyfor example, in AJAX powered website, you want to add hourglass to any operation that talks to the network
20:33:39AraqUIs yes :P
20:34:03zaharyno problem - it just hooks all ajax promises and add onProgress, onComplete callbacks that update the hourglass
20:35:12zaharyin practice, it's easy to find useful application of this capability once you have it
20:36:05Araqdunno, "list of listeners" is one of my favourite anti patterns
20:36:15zaharyheresy :)
20:36:31Araqsay if you notify every item/task that a new item(task arrived
20:36:35zaharypublish/subscribe is one of the best things ever in my book :)
20:37:00Araqcongratulations you transformed O(1) into O(n) for 'append'
20:37:53zaharywell, why would I notify every other item? it's publish/subscribe - only who really cares should subsribe
20:37:53AraqI prefer 'pull' over 'push' for that reason
20:38:13Araqyeah but if you have some filter that comes afterwards
20:38:19FreeArtManO(n) => n < 1.0 =D
20:38:34Araqthen the publisher has no choice to but to publish it to everyone
20:38:53zaharythe publisher calls event.fire()
20:39:37Araq"pull" == "ok, I really need it"
20:39:48Araq"push" == "here, may be interesting to you"
20:39:50zaharywhoever called event.subscribe do: … gets notifed. I agree that filtering now events would be bad, but why does the design require such filters?
20:40:00zaharyit unified multiple events into one?
20:40:22AraqI guess it's mostly bad coding ;-)
20:41:49Araqbut I can see why it's pretty useful for game programming ;-)
20:43:07zaharywell, the real reason it's useful is because it allows for reusable code
20:43:31Araqit decouples stuff, yeah
20:44:31Araqmaybe one more reason why I don't like it :P
20:44:52zaharyyou don't like code reuse?
20:45:10Araqdecoupling often makes debugging harder
20:45:31Araqand I spend most of my time debugging things
20:45:58zaharythe fact that code reuse is broken in most language is the single greatest reason why I'm interested in languages like nimrod
20:46:52*XAMPP_ quit (Quit: Leaving)
20:47:08*XAMPP joined #nimrod
20:48:41Araqwhen you have g(f(x)) it's pretty obvious how to debug it; make it a[i] = f(x); g(a[i]) and you have a much harder time; because now you have to find out where the wrong write operation occured
20:49:11AraqI'm using a[i] here for some indirections
20:49:34Araqpossibly persisting it into a database and using it much later
20:50:01Araqbut it's the old "mutable state is evil" thing and I digress
20:51:23zaharywe should talk one day about reversable debuggers btw (debugging backwards in time)
20:51:23zaharywhile it's true that indirection adds to complexity, it's really a small price to pay for enabling the creating of reusable libraries - reusing a library that have been debugged and optimized for 10 years is much greater reduction in complexity
20:56:44AraqI don't disagree
20:57:23AraqI tried some reversable debugger for C
20:57:29Araqcan't remember its name
20:57:39Araqwas some comercial GNU debugger addition
20:57:52FreeArtManzerobug?
20:58:02Araqbut I was underwhelmed by its performance and documenation ;-)
20:59:03zaharyreversable debuggers could really be improved with some high-level knowledge about the data types - instead of remembering the low level memory details of pushing an element to the sequence, just write "add element" event in the trace
20:59:28zaharyI mean * to a sequence * (to serve as example)
20:59:49Araqyeah I read some papers about reversible computing
21:00:10Araqthe consensus was that it's very hard and limited
21:00:18Araqiirc
21:01:36zaharyI've read some papers too and I though about it for a while and I'd love to try implementing the concept at some point in the future
21:02:22zaharyit's like compile-as-a-service to me - eventually inevitable development of technology
21:03:54Araqinterestingly there were some algorithms that interact very badly with a generational GC
21:04:06AraqI can't remember the details
21:04:20Araqbut ML really lost against C because of this
21:04:21zaharyit's not really reversable computing btw - the easier approach is to use tracing (record a log of what is happening)
21:04:38Araqtrue they are different
21:04:46Araqlogging is much easier :-)
21:04:49zaharyyou can then reply the log to arrive at any point in time
21:05:41Araqyeah and it's only a macro away
21:06:07Araqlogging for every 'if' with the values involved in the condition makes a pretty decent "explain" system
21:09:47Araqproblem is: if you automate it too much, you quickly get lost in too much data
21:10:45zaharyhave you watched this:
21:10:46zaharyhttp://www.youtube.com/watch?v=xpI8hIgOyko
21:10:59zaharythe interface is the amazing thing that hooked me up
21:13:13gradha6 year old video about backwards debugging, seems like a pun
21:15:18gradhaofftopic: does somebody use bash/readline completion-prefix-display-length feature?
21:15:19zaharythe video is really cool, recommended - it's hard to implement these systems even now, but as I said the debugging experience is so much greater that the development is inevitable
21:15:38Araqha, I actually watched it
21:15:45Araqnoticed it only works for java and lost interest :P
21:16:16zahary:) try to ignore that
21:17:30Araqin fact, visual studio supports reverse debugging
21:17:52AraqI don't use it ;-)
21:17:58zaharynot in the same way as shown in the video
21:18:08Araqyeah it can only go back a few lines or something
21:18:13zaharybut also proves my point that microsoft are working on it :)
21:19:15gradhamicrosoft research tends to do fun stuff, shame it rarely reaches a real/commercial product
21:20:24Araqgradha: I don't know what a bash/readline completion-prefix-display-length feature is ...
21:20:38gradhamauaha, but I'm glad you asked
21:21:04gradhait's a feature I proposed around 2003 http://lists.gnu.org/archive/html/bug-bash/2005-12/msg00022.html
21:21:28gradhait reduces visual clutter when completing filenames with tab (or anything using readline really)
21:22:10gradhaexample inside nimrod's examples directory:
21:22:11gradha$ ls cross_...calculator/ ...todo/
21:22:21gradhaso you type cross_<tab>
21:22:32gradhaand instead of showing again the prefix in the suggestions it shows the ellipsis
21:22:52gradhathe nice thing is you can visually see the first character to disambiguate the completion conflict
21:23:04gradhait's really really sweet, especially for long filenames
21:23:25gradhaI had forgotten about it but got included in readline 6.0, released around 2009
21:23:44Araqaha
21:23:50Araqwell my bash doesn't do that
21:24:01gradhanow even poor mac users like me can enjoy it (using macports, though)
21:24:14gradhayou only need to add something like "set completion-prefix-display-length 3" to .inputrc
21:24:20gradhaweren't you on linux?
21:24:30gradhaI would expect that to have updated versions
21:24:33Araqyes I am
21:26:10dom96Araq: So i'm looking at your tags in the sockets module. Shouldn't bindAddr be FWriteIO?
21:27:20gradhathe completion prefix is disabled by default, you would need to update your .inputrc and start a new shell to see if it works
21:27:58dom96gradha: I recently switched from Bash to zsh.
21:28:50gradhait should be available there too if zsh uses gnu's readline, does it?
21:28:59dom96i have no idea
21:29:23Araqgradha: doing it right now
21:30:19Araqdoesn't work
21:31:04Araqdom96: should it? I dunno
21:31:14Araqbinding an address is no write operation, is it?
21:31:35Araqit doesn't send anything over the socket
21:32:58dom96sure, but it 'binds' the socket to an address and port.
21:33:26dom96Seems more of a write than a read.
21:34:37Araqreally? who is the receiver then?
21:34:57dom96The OS?
21:35:11Araqdoesn't count :P
21:35:45dom96Well it changes the state of the environment, so it's a write no?
21:36:08gradhaAraq: the option completion-prefix-display-length is listed in my "man readline" page, you could check that to see if your distro has included it, and if not bug the maintainers
21:36:25Araqpretty much every effect results in a write on the OS level
21:36:31Araqso that doesn't count
21:36:54Araqreading from a file updates the current file position
21:37:06Araqbut that's not the point of the effect system
21:37:56dom96hrm, I guess that makes sense.
21:37:58*gradha quit (Read error: Connection reset by peer)
21:39:22*gradha joined #nimrod
21:39:33AraqI wanted to emphasize the "lookup" aspect of bindAddr instead so I picked FReadIO
21:39:50Araqhowever the more abstract FIO would be fine too
21:41:48Araqcompletion-prefix-display-length (0)
21:41:50Araq The length in characters of the common prefix of a list of pos‐
21:41:51Araq sible completions that is displayed without modification. When
21:41:53Araq set to a value greater than zero, common prefixes longer than
21:41:54Araq this value are replaced with an ellipsis when displaying possi‐
21:41:56Araq ble completions.
21:41:59Araqso yeah, the manual says it exists
21:42:17gradhain that case you should research why .inputrc is not being read by your shell
21:42:28gradhaor maybe it's another file on your system?
21:42:36Araqwell I modified .bashrc ...
21:43:20gradhathat's different, bash and readline are separate entities and have their own etc files
21:43:32gradhaor so do the man pages say, at least
21:43:37Araqindeed it works with .inputrc :D
21:43:41gradhaawesome
21:44:00Araqnow if only it would be the default :P
21:44:11gradhayeah, such a simple feature and makes life so much easier
21:44:42Araqsane defaults are not open source's strength :P
21:44:55gradhasad but true
21:45:12Araqhow else can you sell support? ;-)
21:47:49Araqnow what's the switch to make autocompletion case insensitive?
21:48:13gradhamaybe completion-ignore-case
21:49:49Araqthanks
21:51:39gradhabtw, I updated https://github.com/Araq/Nimrod/issues/174 but I'm afraid I'm not making much sense in my comments so I defaulted to zipping you all the files and let you figure out the problems
21:53:07gradhaheh, sorry
21:53:50gradhaas said before, if you let some time go I will eventually reach this and try to fix it myself, so don't waste too much time with it
21:54:30*Trix[a]r_za is now known as Trixar_za
21:55:08Araqalright
21:55:26AraqI'm making doc2 the default for the documentation instead ;-)
21:55:46Araqso gradha take a look at the db_ modules
21:56:36Araqthey now list their effects but I cheated a bit
21:56:48gradhacheated?
21:57:17Araqinsert only lists FWriteDB but you could pass arbitrary SQL to it
21:57:44Araqmaybe 'getRow' is a better example
21:58:17Araqthe SQL could delete the entire database and yet getRow pretends to only read from the DB
21:58:32gradhauff, I would have settled for FDBIO and called it a day
21:58:38AraqI don't think there is a better solution though
21:58:55Araqyou can indeed only care about FDb ...
21:59:14gradhaneither do I, unless you restricted some custom procs to specific actions, as in the module builds the sql statement itself
21:59:54Araqwell the sql query is already a distinct string to prevent against sql injection attacks
22:01:31Araqzahary: is there a reason why skLocalVars lacks 'skResult'?
22:02:05zaharynope, it's a oversight
22:02:35Araqalright
22:02:52dom96Araq: connect is FWriteIO if the socket is an ssl socket. :P
22:03:14dom96but I suppose that doesn't really matter.
22:03:38Araqthat's a hard one, the effect is static
22:03:50Araqyou can't model that 'if'
22:04:18dom96yeah, well you marked ``handshake`` as FReadIO, FWriteIO... actually you made a typo there lol
22:04:40Araqwhat typo?
22:04:47dom96{.tags: [FReadIO, RWriteIO].}
22:05:05Araqer, ... the compiler should have caught that
22:05:17Araqah but it's in a 'when' statement, right?
22:05:29dom96yeah
22:06:21AraqI still think it's much nicer than having everything in an underspecified IO monad :P
22:07:32Araqzahary: the C backend also seems to not zeroMem the result sometimes
22:08:02AraqI noticed it with the new first class iterators
22:08:07dom96Araq: Why didn't you simply annotate the posix wrapper?
22:08:09zaharyskLocalVars is quite new
22:08:28Araqbut I haven't looked into the issue yet
22:08:58Araqdom96: it's much more flexible this way
22:09:08AraqI can deliberately hide effects this way
22:09:13Trixar_zaMy connection sucks :(
22:09:24dom96ahh, alright.
22:09:55AraqTrixar_za: read the logs then instead, I often do that too
22:10:20Trixar_zaYeah, I do that for for here, my own network's main channel and slitaz (all logged)
22:10:27Trixar_zaKind of sucks for other things though
22:10:54Trixar_zaSince I'm struggling I started wondering if I could write a dialer
22:11:28Araqwhat about changing the main aim for slitaz?
22:11:44AraqI don't really need a distro that runs all from RAM
22:11:46dom96Araq: hrm, wouldn't a FBlocking effect be useful?
22:12:26Araqhrm, indeed
22:13:02Araqbut then this doesn't really work because it works with async sockets too
22:13:05Trixar_zaNot really the aim Araq. Just to be small and to run on older hardware. The runs in ram thing is just a LiveCD/LiveUSB gimmick.
22:13:26Trixar_zaWhich TinyCore ran a mile with
22:14:17dom96Araq: Damn, yeah. :\
22:15:28Trixar_zaSpeaking of TinyCore, I tried it the other day. I kind of liked it. It was simple with a set purpose.
22:17:28gradhawrt the FReadDB/FWriteDB I would now create FDBIO and let FReadDB/FWriteDB inherit from that, so maybe in the future more orm-like procs which constructed their sql statements could guarantee the tags, otherwise nothing prevents you from concatenating "; DROP table;" to even getRow. Though you would have to be a really mean programmer to do that yourself.
22:17:56gradhain fact, maybe FDBIO is not needed at all and plain IO, or maybe you could have a db_ module with in ram database?
22:18:59gradhayou can create an in memory sqlite database http://www.sqlite.org/inmemorydb.html so I don't think tags help much in that situation
22:19:18dom96Araq: A way to guarantee that a function will not block would be nice I think.
22:19:42Araqargh ... FReadDb should inherit from FDb ...
22:19:47Araqnot from FReadIO
22:20:24Araqgradha: it doesn't matter if the database is in RAM or on some disc; that's not the point
22:20:43Araqthe point is that I can do:
22:21:16Araqproc main() {.tags: [db_sqlite.FReadDb, db_mysql.FWriteDb].} = ...
22:21:41Araqand the compiler validates that I'm reading from the sqlite database and writing to the mysql database
22:22:13Araqok, parametrized effects would be even more useful for this
22:22:44Araqbut also more work to implement
22:22:54gradhabut wouldn't you have to implement a complete sql parser to validate that?
22:23:20Araqok, it "validates" it with the tags only
22:23:32gradhaand something you can't guarantee at runtime if the program builds the sql
22:23:58Araqtrue but the distinct string tries to prevent that
22:24:13Araqso it's much better than nothing already
22:25:13Araqoh btw
22:25:28Araqwe have a quite complete SQL parser in the stdlib ...
22:26:52gradhainteresting type hapiness...
22:28:44*ekselkiu quit (Ping timeout: 260 seconds)
22:30:51Araqparsing the query and assertion it doesn't contain a 'drop' command is a sweet idea :-)
22:30:51*gradha quit (Read error: Connection reset by peer)
22:32:21*FreeArtMan quit (Ping timeout: 265 seconds)
22:36:38Araqzahary: what about supporting 'yield promise except EIO' directly in the language?
22:36:39*NimBot_ joined #nimrod
22:36:40*NimBot_ quit (Remote host closed the connection)
22:37:21*NimBot_ joined #nimrod
22:38:30dom96!lag
22:38:31NimBot7ms between me and the server.
22:38:31NimBot_95ms between me and the server.
22:38:35dom96interesting
22:39:55Araqif the event loop wraps every exception via 'try except: send(getCurrentException())' we lose exception tracking ...
22:44:50reactormonk!lag
22:44:50NimBot7ms between me and the server.
22:44:50NimBot_95ms between me and the server.
22:47:05*NimBot_ quit (Remote host closed the connection)
22:47:39*NimBot_ joined #nimrod
22:47:47Araq!lag
22:47:47NimBot7ms between me and the server.
22:47:47NimBot_Unknown.
22:47:53Araq!lag
22:47:53NimBot7ms between me and the server.
22:47:54NimBot_100ms between me and the server.
22:48:42AraqNimBot hinders NimBot_ ...
22:48:51dom96They're at war.
22:48:59dom96The old one doesn't want to be replaced.
22:49:03Araqyeah and NimBot always wins
22:49:17dom96But NimBot doesn't trust anyone.
22:49:23Araqkick Nimbot and see what happens
22:49:34dom96!trusted
22:49:34NimBot_Trusted users: dom96@unaffiliated/dom96
22:49:59dom96hah. If only it had auto-rejoin logic...
22:51:24dom96I am curious what causes this though
22:51:32dom96Quite a big difference
22:51:44dom96omg
22:51:47dom96I know what it is.
22:52:05AraqepochTime vs cpuTime?
22:52:09dom96[NimBot_] morgan.freenode.net :Chicago, IL, USA
22:52:14dom96[NimBot] wolfe.freenode.net :Manchester, England
22:52:18Araqlol
22:52:18dom96lol
22:52:33Araqcan't believe you missed *that* :P
22:52:33dom96Mystery solved
22:52:48dom96You missed it too :P
22:52:59*NimBot_ quit (Remote host closed the connection)
22:52:59Araqlol?
22:53:22*NimBot_ joined #nimrod
22:53:33Araqnow stop it
22:53:40dom96yeah yeah
22:53:44dom96btw join #nimbuild
22:56:17Araqso ... is nimbuild done yet?
22:56:37dom96not really
22:56:57dom96But I am in the process of setting it up so that it can be tested.
22:57:33Araqok
22:57:46Araqping zahary
23:04:01dom96ok, everything is running.
23:16:56Araqexcellent
23:18:16dom96:O
23:18:29dom96Well, it didn't crash yet :D
23:18:40dom96Take a look: http://build.nimrod-code.org/beta
23:19:58Araqsweet
23:21:00dom96aww, the current commit hash got reset
23:24:49Trixar_zaThat looks awesome
23:26:02dom96thanks :)
23:26:14*q66 quit (Quit: Quit)
23:30:01dom96good night
23:30:42Trixar_zaGoodnight dom96
23:30:55Trixar_zaAlso how did an hour and half go by without me noticing?
23:31:10AraqTrixar_za: alcohol?
23:31:28Trixar_zaNope, I'm sober. But I did fix a minor bug
23:31:34Trixar_zaBut no way that took an hour...
23:32:25Trixar_zaI was a little surprised that it worked exactly like I wanted the first time I tested it
23:33:05Araqyou should finally code in nimrod; I heard some people are willing to help in this channel ...
23:35:36Trixar_zaReally? I never noticed :P
23:38:51Araqthat's because people don't have problems with nimrod, it simply works :P
23:39:05Araqso instead we can rant about unix all the time
23:40:57Trixar_zaAh, my other past time
23:49:39Trixar_zaEh, what the hell