<< 17-02-2014 >>

00:00:02OrionPKthat'd be interesting
00:00:18OrionPKalso if you add an integrated debugger I would use the shit out of it :p
00:00:28*Varriount puts his Critiquing Glasses on, and opens up asyncio2.nim
00:00:51dom96Aporia2 will probably be proprietary then :P
00:00:51Varriount>:D
00:01:12*dom96 readies his fork for stabbing Varriount
00:01:50VarriountI thought we were getting rid of the type prefixes?
00:02:13dom96Yeah, but that hasn't happened yet.
00:02:43*darkf joined #nimrod
00:04:09dom96There is still so much to do :\
00:04:38EXetoCbacon
00:18:55Matthias247Varriount, OrionPK: I added a link to the plugin there, so that the next person doesn't take the wrong one :) https://github.com/Araq/Nimrod/wiki/Editor-Support
00:20:12*darkf_ joined #nimrod
00:20:43*brson quit (Ping timeout: 260 seconds)
00:20:46*darkf quit (Disconnected by services)
00:20:48*darkf_ is now known as darkf
00:20:58OrionPKcool
00:20:59OrionPKafk
00:21:15Matthias247gn8
00:21:20*Matthias247 quit (Read error: Connection reset by peer)
00:21:28OrionPKu german?
00:24:36Varriountdom96: On a serious note, are you open to suggestions for the new asyncio stuff?
00:25:08VarriountI've only read a bit, and the code looks very well written, however there are some things that could be optimized/commented upon
00:25:14dom96Varriount: Sure.
00:25:30dom96I'm mostly too tired to code now so I feel like discussing things.
00:25:38VarriountSame here
00:26:00Varriountdom96: Really though, I'm really impressed at the amount of work you put into this stuff.
00:26:20VarriountI'm too indecisive when it comes to API building :P
00:26:42dom96thanks :)
00:27:21dom96I still haven't decided myself if I like everything the way it is.
00:27:44VarriountAre there any plans to seperate the futures aspect of asyncio into another module?
00:27:48dom96Relying on macros seems risky. I found 3 already.
00:27:55dom96*3 issues
00:28:14Varriount(I don't know if that's feasable, I"m just throwing the idea out there)
00:28:30dom96Sure, it's feasible. Haven't thought about it much yet though.
00:28:45dom96Araq will be creating his own future-like type.
00:29:02dom96I would like the two to be unified but it doesn't seem that will be possible.
00:30:08VarriountOr at least, not possible given the time-frame
00:30:11NimBotnimrod-code/nimbuild master d91e022 Dominik Picheta [+0 ±1 -0]: Test results diff is now gisted and the URL of the gist is announced.
00:31:59NimBotdom96/jester master 79862b6 Dominik Picheta [+0 ±1 -0]: Fixes compilation problems when SSL is enabled.
00:35:02NimBotnimrod-code/nimbuild master 9d5ff33 Dominik Picheta [+1 ±0 -0]: Added website.nimrod.cfg
00:43:07NimBotdom96/jester master 23eff32 Dominik Picheta [+0 ±1 -0]: Fixes compilation problems when ssl is enabled properly.
00:50:54dom96Varriount: Any other feedback?
00:52:54Varriountdom96: Hm. Mostly stylistic stuff.
00:55:18dom96well, in that case I may as well watch Top Gear.
00:55:44Varriountdom96: I feel that the windows api tradition of using long argument names is something that should be avoided
00:56:00*ddl_smurf_ joined #nimrod
00:56:27VarriountAlso, why cast the windows connectEx pointer to a procedure every time connectEx is called?
00:58:59*ddl_smurf quit (Ping timeout: 272 seconds)
00:58:59*ddl_smurf_ is now known as ddl_smurf
00:59:02*brson joined #nimrod
01:00:52dom96I don't think that has any effect on performance.
01:01:44VarriountIt's also an eyesore.
01:04:17NimBotAraq/Nimrod devel 7ef6aae Zahary Karadjov [+0 ±1 -0]: fix argument_parser
01:04:17NimBotAraq/Nimrod devel 9df7b1c Zahary Karadjov [+1 ±2 -0]: fix #188
01:04:17NimBotAraq/Nimrod devel 4510eb9 Zahary Karadjov [+2 ±31 -0]: Merge branch 'devel' of gh:/Araq/Nimrod into devel
01:04:17NimBotAraq/Nimrod devel 8a87ba3 Zahary Karadjov [+1 ±8 -0]: quite messy implementation of generic lambdas, needs reworking; fixes #715
01:05:10*Varriount wonders how zahary is going to allow generic lambdas to be passed around.
01:06:59zaharyit should be called inferred lambdas really
01:07:14zaharythe generic types in the signature are figured out by the compiler
01:09:29zaharyif we allow lambdas to be passed to object accepting procs (as it is in C++) then it's also possible to not collapse the lambda to a unified run-time type and to have "real" generic lambdas
01:17:48*carum joined #nimrod
01:25:57*zahary quit (Quit: Leaving.)
01:37:09*brson_ joined #nimrod
01:37:27*brson quit (Ping timeout: 265 seconds)
01:44:35renesacError: type mismatch: got (int literal(0), uint32) but expected one of: [...] unsigned.<=(x: T, y: T): bool
01:44:38renesac:/
01:45:16renesacuints are almost unusable...
01:46:55EXetoCnot really. use a uint32 literal (0u32)
01:47:18renesacnot happening if my code is supposed to be generic
01:47:39*carum quit (Remote host closed the connection)
01:47:51*carum joined #nimrod
01:47:54*carum quit (Remote host closed the connection)
01:48:06renesacok, aparently I can do "0.T"
01:48:07*carum joined #nimrod
01:49:33renesacmaybe I should report those bugs...
01:52:38EXetoCbugs? I don't know
01:52:59EXetoCI guess you'll find out if you report it
01:53:26renesaca literal 0 should be converted to uint32 in this situation, acording do the manual
02:01:53EXetoCI can't even test that as I get "Error: ordinal type expected"
02:02:43EXetoCbut it's the fact that the procs are generic that causes a problem I think. I'll ask Araq about that tomorrow, because I have some relevant patches
02:06:06renesacuint32 is an ordinal type IIRC
02:06:29renesacat least on 64bit nimrod
02:07:03dom96No, IIRC only signed ints are ordinal.
02:08:49EXetoCAraq: so my float patches worked? maybe I missed what you told me to do. I'll try with devel
02:11:20EXetoCthis seems relevant, so it's too bad I get that error message. will try again tomorrow
02:11:27EXetoCbye
02:12:37renesacTOrdinal* = int|int8|int16|int32|int64|bool|enum|uint8|uint16|uint32
02:12:44renesacfrom system.nim
02:13:35renesacthe only problem is uint64 (and thus, maybe uint), because uint64.high > int64.high
02:13:53EXetoCit fails for me with any unsigned type
02:14:28EXetoCI don't think TOrdinal is relevant, but the type class in unsigned might. bug? I guess so
02:16:02renesacanother thing that don't work: "let x:byte = 1; let y:int = 1 + x"
02:16:10renesacand should
02:17:29renesacthis I already reported here, but haven't created a issue yet (I tried to fix it myself, but failed because I couldn't define the priority of the conversions)
02:17:55*vendethiel quit (Quit: q+)
02:19:03renesacthe compiler become confused between calling a function for int64 or uint64 when receiving a uint8 argument
02:19:13renesacas uint8 could now be converted to both
02:19:37EXetoCisn't the manual referring to simpler cases only? "let x: int8 = 1" for example
02:20:07renesac"In Nimrod only widening type conversion are implicit:"
02:20:19renesacthose are widening type conversions
02:20:37renesac"Automatic type conversion is performed in expressions where different kinds of integer types are used: the smaller type is converted to the larger."
02:21:45EXetoCanyway, it's problematic if the language doesn't handle this in a special way, since the operators are procs
02:23:04renesacwell, this should be treated at the same place that treats int16 to convert to int when needed
02:23:17renesacthat works now
02:23:20*carum quit (Remote host closed the connection)
02:27:18EXetoCecho(5000i8) > 5000
02:29:41EXetoC"5000i8.type is typedesc[int8]" > true
02:30:06renesacoh, I thought your first line was a comparison
02:30:43EXetoCI don't know what's going on
02:31:03renesaclol
02:31:20renesacthe native type zoo is all broken
02:32:10renesaclet x = 5000u8
02:32:10renesacecho (x) #> 136
02:32:38renesacideally, the compiler should forbid this declaration as out of range
02:33:11EXetoCthat's still 5000 for me. are you on devel?
02:33:16renesacyes
02:33:31renesacbut I got 5000 when I echoed directly
02:33:56EXetoCah, yes
02:36:34EXetoCsomething must've gone horribly wrong not long ago, but this is the devel branch after all
02:39:11renesacyou are gonna open a issue?
02:42:58*carum joined #nimrod
02:43:01EXetoCI might, tomorrow
02:46:50EXetoCwhere are the failing tests?
02:47:08EXetoCperhaps a PR that adds a couple of those might be good enough
02:48:15EXetoCI mean, tests that are expected to fail
02:50:40EXetoCnevermind
03:23:39*dmac quit (Ping timeout: 260 seconds)
03:23:45VarriountWe just need an int128 :/
03:24:23*dmac joined #nimrod
03:28:00*carum quit (Remote host closed the connection)
03:28:48*carum joined #nimrod
03:33:33*carum quit (Client Quit)
03:36:48*aftershave_ joined #nimrod
03:52:34*aftershave_ quit (Quit: Computer has gone to sleep.)
04:01:51renesacVarriount, this only solves the uint/uint64 ordinal issue, and an int65 is sufficient for that
04:02:31renesacor a float128 that is more useful for other things, or a bigint
04:44:53renesacwow, this is bizarre: Error: ambiguous call; both system.-=(x: var T, y: T) and system.-=(x: var T, y: T) match for: (int literal(32), int literal(1))
04:47:14renesaclet me recompile my compiler...
04:53:11renesacsame error, I will try to make a minimum working example
04:54:02renesacohh, it was because I was trying to operate on a const
04:54:36renesaca less WTF-inducing error would be welcome...
05:05:29*carum joined #nimrod
05:11:13Varriountrenesac: It might seem surprising, but giving good error messages can be tricky
05:11:45VarriountMainly because, when the compiler does come across an error, there could be many things that are the cause.
05:12:26renesacyeah, I understand
05:12:49renesacbut I wanted to understand how the compiler come up with that error message above
05:12:50renesacXD
05:23:14*carum quit (Remote host closed the connection)
05:25:26Varriountrenesac: You want bizarre, try making macros
05:25:50Varriountrenesac: Like this -> https://gist.github.com/Varriount/9045180
05:27:14renesacI can't compile that code here
05:27:33renesacbut yeah... I imagine that macros may give weirder messages
05:27:58renesacI'm more afraid if using macros can be that hard too
05:28:57renesacthis is often an argument against allowing macros in a language...
05:29:25Varriountrenesac: But they allow a high degree of flexibility
05:29:41renesacyeah, w/o doubt
05:29:45Varriountrenesac: It generates 3 procs given the definition of one proc
05:31:29renesacI'm starring at a quite redundant case statement, but I think only a macro could remove that redundancy w/o impacting the performance
05:33:14renesacand that is not a good idea, of course
05:37:02Varriountrenesac: Oddly enough, most of the macro I pasted is simply replacing types, and converting them
05:37:18VarriountThe problem is that there's quite a bit of corner cases
05:37:34Varriountrenesac: Are you sure you need the optimization?
05:38:41renesacwell, it is for math.nim
05:39:01renesachttps://gist.github.com/ReneSac/cdac881c6fbd3920d653 <-- here
05:39:12renesacaraq would tell me to forget unsigned ints, of course
05:39:15renesacXD
05:40:16VarriountUnfortunately, as much as he may hate them, unsigned ints are just going to happen.
05:41:19Varriountrenesac: I'm fairly sure the compiler could probably optimize something
05:42:37Varriountrenesac: I myself am debating whether I should slash half of the logic in the macro I posted, and just make users use conversion templates :/
05:44:45renesaclike joining two `case` statements one following another?
05:45:08Varriountrenesac: You would be amazed at the optimizations compilers make.
05:45:46renesacyeah, but sometimes they can't prove things that are obvious to the programmer, and then can't optimize
05:46:43renesacand I don't think they would optimize a series of `if`into a `case`
05:46:45Varriountrenesac: Where exactly is the inefficient code?
05:47:03renesac?
05:47:26Varriountrenesac: In that snippet, what's inefficient?
05:47:36renesacnothing, only the code size
05:47:58renesaclots of repetitions
05:48:32renesacI will have to break up this case statement to reduce the redundancy
05:48:32VarriountWell, you could use a template, which is no-where near as complicated as a macro.
05:49:00renesaca template can mess inside a 'case'?
05:49:15renesacI couldn't think about a way to use template
05:49:17renesacin this case
05:49:27renesacpun not intended...
05:53:40*carum joined #nimrod
05:58:23VarriountHi carum
05:58:40renesacand I can put "return" inside a template?
05:58:54renesacfor the function calling the template return?
05:58:54carum'lo
05:59:14Varriountrenesac: Yes, but the return will work in the calling procedure, not the template
05:59:24renesacright
06:00:02renesacwell, tomorrow I will try to build a template then
06:00:25renesacrepeating 6 times the same line of code isn't pretty
06:01:15renesac(4 times if I divide the case statement in two)
06:02:19renesacgood night
06:02:25*renesac is now known as renesac|away
06:04:28*carum quit (Remote host closed the connection)
06:05:38*isenmann joined #nimrod
06:05:44*carum joined #nimrod
06:14:51*brson_ quit (Ping timeout: 245 seconds)
06:15:35*brson joined #nimrod
06:26:43*vbtt joined #nimrod
06:35:02vbtthello
06:35:26vbttdom96 you around?
06:37:11vbttbtw, I read the article Araq posted: http://calculist.org/blog/2011/12/14/why-coroutines-wont-work-on-the-web/
06:41:20vbttwas not convincing. the basic argument seems to be "you don't know which function will call yield" - this is bogus.
06:41:53vbttyou do know which functions can call yield. and even if you don't it's easily fixed by a no_yield wrapper of some sort.
06:42:24vbttwhy would anyone want to live in callback hell is beyond me. coroutines enable much clearer code.
06:46:09vbtthaving said that, I admit what nimrod has - isolated heap threads with asyncio - is superior to shared heap coroutines in golang.
06:46:15vbtt*far superior.
06:47:38vbttThe only reason I'm looking for full coroutines is because it allows me to run fewer threads to utilize all cpus effectively.
06:54:58vbtttoday to handle multiple requests, I could spin up a large number of threads (e.g. 40 threads on a 4-cpu box)
06:55:06vbttthen each thread sleeps when waiting for io.
06:55:59vbttwith full coroutines, I only spin up 4 threads, one for each cpu. and when doing io, only the coroutine handling the request sleeps, while the thread can run another coroutine.
06:56:22vbttthe latter system scales better (i.e not upper bound on number of in-flight requests)
06:58:27Varriountvbtt: I'm around :3
06:58:30vbttanyway, isolated heaps are really good. so is manual gc invocation.
06:58:34vbtthi Varriount
06:58:51vbtti just wanted to talk to dom96 about asyncio.
06:59:00Varriountvbtt: I was under the impression that coroutines worked in a single thread.
06:59:02vbttbut glad to know someone is listening.
06:59:21vbttVarriount:correct - but you can have multiple threads, each with multiple coroutines.
06:59:40VarriountOh, I see
07:00:34vbttnot migration coroutines across threads is also a very good idea.
07:01:20vbttit's good for both - avoiding race conditions as well as providing better control over latency.
07:01:39VarriountI'm assuming you meant 'now' instead of 'not'
07:01:55vbtti meant not.
07:02:11vbttwe don't want a coroutine to jump from one thread to another.
07:02:22VarriountAh, yes
07:02:31vbttfirstly, threads have isolated heap so not sure how feasible that is anyway.
07:02:44vbttbut also - it ensures that only one coroutine is mutating the shared state.
07:02:57vbttso two threads are never mutating the same shared state.
07:03:53Varriountvbtt: If you want to review something, you can look over dom96's new asyncio code
07:05:25vbttVarriount:do you know where it is? in devel?
07:05:44Varriountvbtt: Yes. Oh, but I need your opinion on something first
07:06:32VarriountSo, I'm currently developing a macro for winlean.nim, that generates 3 wrapper procedures out of one wrapper procedure
07:07:25vbttok
07:07:59VarriountThe macro generates 2 procedures that directly wrap a windows api call, and adjusts the names and parameter types to wrap either the ansi or unicode version of the call
07:08:29VarriountThe differences between these 2 procedures is name only - GetEnvironmentA and GetEnvironment
07:08:41VarriountThe thrid procedure is special though
07:09:19VarriountWhen built using unicode API's, the macro generates a third procedure that automatically converts strings to wide strings
07:10:24VarriountAbout half of the code in my macro is dedicated to generating this procedure
07:11:04VarriountThe question I ask is this: should I remove the generation of this conversion procedure, and replace it with conversion operators?
07:11:26VarriountOperators that convert a string to a wide string if the unicode api is selected
07:12:28vbttthe third procedure calls one of the other two, i hope?
07:12:51VarriountYes
07:13:20VarriountHere's the winlean code, with the macro -> https://gist.github.com/Varriount/9045180
07:14:45vbttso if i understand correctly, you generate f() that takes wide string and fx() that takes strings, converts then and then calls f()
07:14:54VarriountYes.
07:15:32VarriountThe alternative is creating some conversion procedure, say, toWinString(s: string): WinString
07:15:42vbttright
07:16:15vbttwell if nimrod mostly uses strings, it is best to make it easy to pass strings to the functions.
07:16:56vbttis there a way to do auto conversion in nimrod?
07:17:31Varriountvbtt: Well, aside from the macro I made, there are converter procs, however they are applied globally
07:18:25vbttideally there would be just one function that accepts both strings or wide-strings.
07:18:34vbttand does the conversion as appropriate.
07:18:37vbttnot sure if that's possible.
07:19:00Varriountvbtt: Not without a much more complicated macro, or a converter.
07:19:07vbttthe problem is return values too - if a function returns a wide string, now do you need another version to return strings?
07:19:41VarriountAraq doesn't like the idea of using a converter, I know that much.
07:20:01vbttyou mean conversion operator?
07:20:15VarriountNo, a converter procedure
07:20:22vbttit's a pain to always type the conversion operator everywhere.
07:20:47*skyfex quit (Quit: Computer has gone to sleep.)
07:21:12vbttyeah i definitely don't like a conversion procedure - it's even more of a pain to use it everywhere.
07:21:24Varriounthttp://nimrod-lang.org/manual.html#convertible-relation
07:22:06VarriountLook at the code block before assignment compatibility
07:23:20vbttin this case, i like implicit conversion if it's doable.
07:23:35*gour joined #nimrod
07:23:53vbttbecause, it's precisely what the programmer wants (i.e. you won't get any accidental bugs) and makes his life easier by not explicitly doing conversions back and forth.
07:25:06Varriountvbtt: Thanks for your input. Sorry for taking up your time.
07:25:06vbttif you implement toWinString, will it have to be called explicitly?
07:25:24vbttglad to offer feedback.
07:25:38VarriountYes, it would have to be caled explicitly
07:26:27Varriountversus the macro generated proc that converts its string args to wide strings
07:26:37VarriountAnyway, I have to get to bed. Goodnight
07:26:44vbttok, good night.
07:27:21vbttin summary i think implicit-conversion is better than multiple-function-definitions is better than explicit-conversion
07:41:38*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
07:43:25*runvnc joined #nimrod
07:43:37runvnchello
07:44:33runvncis there a way to get jester to work asynchronously, like if I put a sleep(5) in a route and call it 5 times concurrently, I want them to all come back in 5 seconds, not 25
07:44:40runvncis there an example of how to do that
07:45:04runvncjester is very awesome other than that
07:47:15runvncor maybe I should use nits or the build in http server
07:47:56runvncbuilt in
07:48:29runvncI'm going to do a test with httpserver
07:57:05runvnchm. maybe if I just do io it wont block everything
08:00:29*carum quit (Remote host closed the connection)
08:02:35vbttrunvnc: sorry no idea.
08:02:52runvnchey vbtt
08:02:56vbttrunvnc:perhaps asyncio has a sleep which doesn't call the system sleep so it doesn't block the whole thread.
08:03:07vbtttotal speculation here.
08:03:19runvncI am just wondering generally how people do web servers that need to handle multiple requests simultaneously
08:03:49runvncif I do like a long http request instead of sleep inside of my tests, maybe it will be able to handle the requests at the same time right
08:03:59runvnci will look in asyncio for that sleep
08:04:05vbttrunvnc: run multiple threads
08:05:21runvncasyncio doesnt have a sleep. I dont actually need to sleep anyway
08:05:32vbttrunvnc:using asyncio you should also be able to handle multiple requests concurrently, but dom96 can confirm that.
08:05:58runvncvbtt I have a feeling that the built in http server may be constructed on top of asyncio
08:05:58vbttrunvnc: i understand you're just simulating a long request using sleep()
08:06:04runvncand perhaps also jester
08:06:20vbttasyncio is new, not sure what the plan for the built in http server and jester is.
08:06:22runvncso let me do another test using a long http client request in my handler rather than a sleep
08:06:54vbttbut dom96 wrote jester and also asyncio I believe.
08:15:53runvnchm I found something in jester tests/asynctest.nim
08:24:00*dmac quit (Ping timeout: 265 seconds)
08:25:33runvncok so that didnt seem to make a difference
08:25:39runvnctrying threads like you said heh
08:27:24vbttthreads will work of course.
08:27:41vbttkeep a thread pool - that should work fine.
08:27:52runvncis there a module for a thread pool
08:27:56vbttnot sure :/
08:28:02vbtti'm new to nimrod.
08:32:27*[Pete_27] quit (Remote host closed the connection)
08:37:49vbttAraq:I got nimweb working. Had to tag on a --path:. at the end for it to work.
08:48:45vbttAraq:sent you a PR with website updates.
09:10:15*zahary_ quit (Quit: ~ Trillian Astra - www.trillian.im ~)
09:10:33*zahary joined #nimrod
09:20:58Araqvbtt: thanks
09:21:27*skyfex joined #nimrod
09:21:31Araqvbtt: I came to the same conclusion btw. All that he's missing is a 'lock' statement for 'yield' :-)
09:22:09vbttyeah, explicit yield is just not the same as preemptive threads.
09:22:58vbttnimrod's effect system can perhaps be made to enforce no_yield function annotation.
09:23:06vbttwhich means there is no overhead at runtime.
09:23:44*zahary_ joined #nimrod
09:25:36*skyfex quit (Ping timeout: 245 seconds)
09:26:33zahary_runvnc, asyncio should have timers that are the async equivalent of sleep; maybe dom96 haven't added them yet, but they are certainly possible withing the new framework
09:26:58runvncthanks zahary
09:27:08runvncso say I needed to do an http get request
09:27:16runvncinside of my handler
09:27:43runvncso when somebody GETs /hello I go and download google.com or something
09:27:46runvncand then send them that
09:27:55runvncso if I want to have five of those going at the same time
09:28:07runvncfive requests coming in, five requests out to google
09:28:11runvncsimultaneously
09:28:15runvnc?
09:28:17runvncasyncio?
09:28:26runvncis there an http get in asyncio
09:28:45runvncI figured out mostly how to do this with threads
09:29:21zahary_yes, asyncio is a good fit for that. I'm not sure what is available so far, but I can comment how it's supposed to work
09:30:16*gour quit (Quit: WeeChat 0.4.2)
09:30:31zahary_if all 5 requests are triggered from the same client request, then you'll use an async get that returns a future object - you get 5 of these futures in parallel, then you wait for their "union" to complete.
09:30:55runvnchm. in the asyncio module I did not see futures or http get
09:31:07Araq vbtt indeed the effect system works nicely here
09:31:09runvncit says something about other modules implementing async stuff using asyncio
09:31:29zahary_something like this.
09:31:29zahary_var r1 = get("www.google.com")
09:31:29zahary_var r2 = get("www.yahoo.com")
09:31:29zahary_let (g, y) = await r1 & r2
09:31:47runvnczahary where is the documentation for these future http get and await
09:31:53runvncor is that not implemented yet
09:31:55zahary_if you don't want to fire multiple request from the same handler, then it's easier; you just await the single request
09:32:07zahary_dom96 is currently actively working on this stuff
09:32:17runvnccan I actually use await
09:32:20Araqrunvnc: jester supports async operations, ftp and sending via http are available, not sure about httpclient
09:32:26vbttzahary_: can i do let g = await r1 | r2 # either r1 or r2
09:32:36Araqthis works today, what zahary_ describes is in development
09:33:19*CarpNet joined #nimrod
09:34:19runvncsending via http meaning http post and wait for it to return, without blocking everything?
09:34:26runvncis there an example of how to do that
09:34:31zahary_vbtt, yes; but the syntax is going to be different, because r1 and r2 can possible return different things - you cannot collapse them to a single variable; look up GO's select statement for a hint of the required syntax
09:34:58vbttok
09:36:06vbttzahary_: will I be able do a single select on multiple outgoing request, incoming connections, and timers ?
09:36:58zahary_in theory it's possible, better ask dom96 about his implementation plans
09:37:04Araqrunvnc: you could check out how nimbuild or the forum are implemented
09:37:48runvncok.. and those dont use threads then, but asyncio? thanks, I will look at them
09:39:07Araqnimbuild uses threads but only for control of external processes
09:39:47runvncok I will stop asking dumb questions now
09:39:57runvncjust one last question. is there a thread pool module
09:40:11Araqthere is actors.nim but don't use it, it sucks
09:40:24runvncthe threads example has an array
09:40:26runvncof threads
09:40:41Araqyeah, that's the way to go
09:40:58runvncmaybe I can recycle a thread at a certain index when it is done
09:40:59runvncor something
09:41:58runvncor I can push my request data into a queue that the threads read
09:42:08runvncI do need to run external processes
09:42:19runvncI will look aat nimbuild and the forum thank you
09:43:19Araqthreads + TChannel works fine if you know their limitations
09:43:48*gour joined #nimrod
09:57:30Araqzielmicha-cloud_: you use 'noStackFrame' incorrectly and since nobody uses it correctly, I'll remove/rename this feature
09:58:01Araqwe already had 1 hard to track down bug because of it
10:08:47runvnchttps://github.com/nimrod-code/nimforum/blob/master/forum.nim it looks like basic jester stuff. so if 5 people do a /threadActivity.xml at the same time, does this somehow allow those requests to be served simultaneously?
10:14:53Araqrunvnc: I think so, but ask dom96 when he's around
10:15:09runvncok thanks
10:16:52*vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
10:16:54*io2 joined #nimrod
10:23:34*brson quit (Quit: leaving)
11:08:15*ddl_smurf quit (Read error: Connection reset by peer)
11:13:55*BitPuffin joined #nimrod
11:18:22runvncdoesnt seem to have any magic way to automatically put every route handler in some async thing or thread. does support scgi so maybe he set it up with multiple forum processes each listening on a different port and nginx doing a round-robin somehow
11:18:41gourBitPuffin: do you use nimrod on freebsd?
11:19:19gourBitPuffin: i mean any issue seeing that https://github.com/Araq/Nimrod/issues/620 is still open?
11:19:24BitPuffingour: I did
11:19:28BitPuffingour: but then it didn't work
11:19:46gourBitPuffin: i installed it yesterday, but did not have time to play much
11:20:01gourit's in ports now
11:20:41BitPuffingour: Yeah okay
11:20:53BitPuffingour: well I did try it in a vm not too many weeks ago and then it seemed to work
11:22:17*skyfex joined #nimrod
11:22:35gourotoh, considering lisp's influence on nimrod, i'd really be thanksful to hear Araq's (dis)likes of langs like dylan/julia
11:26:39*skyfex quit (Ping timeout: 260 seconds)
11:51:30dom96runvnc: Async gets handled by the scgi module, I don't spawn multiple processes for the forum.
11:51:51runvncdom ok I was trying to use it in scgi
11:52:01runvncdoes scgi spawn multiple processes or threads or something?
11:52:24dom96httpserver also implements an async interface but it's currently a bit broken
11:52:40dom96runvnc: no, it all runs in a single thread.
11:53:01runvncdom with the current scgi forum implementation, if two people try to pull a big thread, one of them will block and wait for the data to come out of the db and be formatted to html right?
11:53:26dom96Yes, data from database is not pulled out asynchronously.
11:54:00runvncI am trying to just use a regulat httpserver or jester with a thread, but in my handlerequest or route handler, the connection is always closed, even though it seems like I am able to pass my socket into the thread
11:54:13runvncas soon as I get out of my handlerequest the socket is closed
11:54:35runvnctrying to make it a pointer or something because I think the socket is getting garbage collection or something
11:55:51dom96handleRequest automatically closes the socket IIRC
11:55:55runvncI am able to send in 5 requests to my server at the same time and they all download with http client in parallel, but it returns instantly
11:56:00dom96Jester wasn't designed for threads.
11:56:23runvnchow can I make an httpserver with a thread with a handlerequest or equiv that doesnt close the socket immediately
11:56:26BitPuffinI know run arch as a server os instead lol
11:56:29BitPuffinnow*
11:58:57runvncdoes asynchttpserver also close the socket after the handlerequest
11:59:06runvncmaybe I can just use sockets or asyncio or something
11:59:11dom96yes
11:59:19dom96Why do you want threads so badly?
11:59:31BitPuffindom96: webscale is the BOMB
11:59:37runvncthere are two things I want to happen in my route handlers or whatever
11:59:56runvncone is to make a REST api call to a third party service
12:00:00runvncor multiple services actually
12:00:11runvncthe other thing which may or may not happen before or after that api call
12:00:20runvncis to do a shell exec and wait for the output
12:00:35runvncI have it making threads and runnign my api call
12:00:41runvncjust closes the socket too soon
12:00:53runvncso maybe I can use asyncio or regular sockets module
12:06:05runvncdom96 if you have an idea of how I can do that without threads
12:06:17runvncmaybe I should use cgi or something
12:12:59dom96I'm not sure how tbh.
12:13:07dom96I guess you will need to hack jester.
12:13:52dom96although hrm
12:14:02runvnchttps://github.com/Araq/Nimrod/blob/devel/lib/pure/asyncio.nim
12:14:10runvncat the end it has a testAcdept thing
12:14:18runvnctestAccept
12:14:26runvncwhen mainmodule
12:14:31runvncmaybe I can copy that and change it
12:14:56runvncand instead of testread I pass a pointer or reference or something to the pasyncsocket to my thread or something
12:15:45dom96hrm? Are you planning on rewriting jester?
12:15:57runvncno too lazy to rewrite jester to use asyncio
12:15:59runvncand not smart enough
12:16:05runvncI think I am gonna do what I just wrote above
12:16:14dom96well I'm not sure what you mean
12:16:16runvncI dont really have to have all of the nice routing and path and other stuff jester does
12:16:25runvncmaybe it wont work what I said
12:16:36runvncdo you see towards the bottom of that file where it says testaccept and testread
12:16:37dom96ahh, so you will write your own jester-like module?
12:16:50runvncI am going to import asyncio
12:17:02runvncand then copy the stuff in whem mainmodule
12:17:08runvncand edit testread to create a thread
12:17:19runvncand pass the socket into it
12:17:26runvncI think
12:17:30Araqgour: dylan is dead afaict and when I looked at it it used a Lisp-like data representation which sucks for systems programming. I can't comment on Julia.
12:17:37runvncor maybe it will just send a message to an existing thread over a channel
12:23:47*awestroke joined #nimrod
12:40:09NimBotnimrod-code/nimbuild master 775dec3 Dominik Picheta [+0 ±1 -0]: Add extra newline to test results diff.
12:42:24*[Pete_27] joined #nimrod
12:57:12gourAraq: thank you. i see there is some endeavour to revive dylan...even to provide qt bindings soon. as far as julia, i believe you agree that it's reasonable to expect that nimrod's native code generator should produce better/quicker code than julia's jit?
12:59:32Araqshould, but sometimes JITs are faster, I don't think LLVM's is particularly good though
13:03:17gourin any case, not much speed gain to be achieved with nimrod being already so fast
13:10:58gourAraq: is there some potential student to work on qt bindings for gsoc?
13:11:46dom96gour: We still don't know if we've been accepted.
13:11:50Araqgour: I think not yet, but I'm much more concerned that we're not accepted for gsoc
13:13:18gourAraq: but it's not decided yet, right? decision is on 24th
13:15:40dom96Yes.
13:23:12*skyfex joined #nimrod
13:26:54Araqhi skyfex
13:27:12Araqwhat's the status of the exception handling bugs? ;-)
13:28:13*skyfex quit (Ping timeout: 272 seconds)
13:43:44gourAraq: see http://article.gmane.org/gmane.comp.lang.julia.devel/13684
13:52:59Araqgour: so? I can't say I disagree with the guy
13:57:25gourAraq: i am thinking about this part: "Static compilation will not change the execution speed."
13:58:12Araqgour: for Julia's design with its multi-methods everywhere that is quite likely
13:58:33*darkf quit (Quit: Leaving)
13:59:08gourAraq: ahh, that's interesting. thank you
14:24:08*brihat quit (Read error: Operation timed out)
14:25:45*brihat joined #nimrod
15:23:59*skyfex joined #nimrod
15:28:06*skyfex quit (Ping timeout: 245 seconds)
15:43:00*[1]Endy joined #nimrod
16:33:44*vendethiel joined #nimrod
16:41:46EXetoCI still don't like this whole float64 situation. it might make sense from an implementation standpoint, but only in this point and time, so I'm pretty sure that it's a source of confusion
16:41:54EXetoCwas it an implementation issue that triggered this change?
17:06:59AraqEXetoC: the "float is currently float64 but its own type and the stdlib only cares about float but not about float64 or vice versa" was too confusing
17:07:24Araqso it was changed that float64 is an alias for float
17:07:40Araqbbl
17:09:42*skyfex joined #nimrod
17:13:25*Demos joined #nimrod
17:17:15*vendethiel quit (Quit: q+)
17:18:24*vbtt joined #nimrod
17:18:45EXetoCI didn't think it was confusing. I do think it is now though
17:19:07EXetoCdid users actually claim it was confusing? if so, then I wonder if they had read that part of the manual
17:23:37BitPuffindom96: hmm weird
17:23:45BitPuffindom96: doesn't seem like redirect is working
17:24:23BitPuffinget "/":
17:24:24BitPuffin redirect("/redirected")
17:24:36BitPuffinredirect.nim(7, 2) Error: internal error: expr(skTemplate); unknown symbol
17:24:37BitPuffinNo stack traceback available
17:24:58dom96compiler bug
17:25:05dom96it seems
17:25:05BitPuffin:/
17:26:51EXetoCBitPuffin: what do you think about the current situation with float and float64? weren't you involved in the process?
17:28:15dom96BitPuffin: You can just do what the template does manually as a workaround
17:29:09BitPuffindom96: true
17:29:14EXetoCI mostly just remember supposed compiler bugs, and I think you encountered issues regarding float/float64 overloads being considered equal
17:29:16BitPuffinEXetoC: what do you mean
17:29:31BitPuffincan't remember lol
17:30:16EXetoCBitPuffin: ok but what about float64 + float64 -> float? rather than float64 + float64 -> float64, which I think makes more sense, even though float and float64 might be of the same size
17:30:40*vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
17:31:33*Demos quit (Quit: leaving)
17:32:37renesac|awayEXetoC: implicit conversion to a (possibly) smaller type on addition?
17:32:41*renesac|away is now known as renesac
17:33:44EXetoCrenesac: not exactly http://build.nimrod-lang.org/docs/manual.html#pre-defined-floating-point-types
17:34:07renesacwhat was not exact?
17:35:25EXetoCfloat is assumed to always be >= float64 though, apparently, but at this point in time it's always float64
17:35:53EXetoCso float64 + float64 *might* yield float64 instead in the future. that's just a minor point of confusion
17:36:06renesacwhere is this written in the manual?
17:36:26renesacI thought float may be float32 if it is faster in the target processor (eg: arm, a gpu, etc)
17:36:47EXetoCnowhere I think
17:37:08renesacI'm lost
17:39:03renesaconly a comment: in the math.nim there are lots of functions that call C functions that expect a double (what the C defines as double in the machine)
17:39:05EXetoC"I am not sure what to do for ARM etc which prefers float32 for performance. I guess people can introduce their own "fastFloat" aliases."
17:39:20EXetoCso is the manual wrong then?
17:39:43renesacwhere is this quote from?
17:39:53EXetoChttps://github.com/Araq/Nimrod/pull/583
17:46:03*aftershave_ joined #nimrod
17:46:07dom96BitPuffin: Please report that issue.
17:46:19BitPuffindom96: yeah I will
17:47:43renesacyeah, I'm with ventor3000, I don't like the plataform-dependent type having a smaller name...
17:48:37renesacit leads to people writing plataform dependent behaviour in bad places
17:49:30renesacI like D naming: "int, long, size_t, float, double, quad, etc"
17:58:31gouris there in nimrod something like julia's coroutines?
17:58:57EXetoCthat's just a case of some people not knowing the language well enough. they need to know a thing or to before they can care about fixed sizes and such
17:59:47EXetoCeither way, the issue I've been discussing is the fact that float64 + float64 calls `+`(x, y: float): float, so it's not really relevant is it?
18:01:39*aftershave_ quit (Quit: Computer has gone to sleep.)
18:05:07EXetoClike I said, float is basically the biggest type then, in which the manual needs to be updated. the point is that the interface in system.nim might be confusing
18:05:45*vendethiel joined #nimrod
18:17:36*carum joined #nimrod
18:40:42*aftershave_ joined #nimrod
18:44:26*Matthias247 joined #nimrod
18:44:51NimBotAraq/Nimrod devel 51af4c2 Zahary Karadjov [+0 ±2 -0]: fix #807
18:47:02*BitPuffin quit (Ping timeout: 252 seconds)
18:49:59dom96zahary: Join #nimbuild
18:52:27Matthias247I recoginized nimrod-lang.org is missing a link to Github. Somebody should add that :-)
18:52:51dom96Matthias247: The website is in the repo, you're welcome to make a PR
18:53:34Matthias247dom96: I think it should be prominent and with an Icon. And I'm not able to do icons :-)
18:55:44VarriountMeep!
18:56:27Varriountgour: Nimrod has closure iterators
18:56:38Varriountgour: Coroutines are planned, I think
18:59:41*carum quit (Remote host closed the connection)
19:05:58*carum joined #nimrod
19:25:07*zahary quit (Quit: Leaving.)
19:28:02gourVarriount: for 1.0? otoh, i must say julia looks as nice language as well
19:28:34Varriountgour: Not necessarily after 1.0
19:29:03Varriountgour: Coroutines are planned as a possible GSoC project, if nimrod gets accepted.
19:29:13gourahh, ok
19:30:02gouris 0.9.3 behind the schedule?
19:34:21Matthias247gour: I think julia is interesting, but for another domain
19:34:31Matthias247I would see it as a Matlab replacement
19:34:47Matthias247fast scientifical somputing
19:38:34gourMatthias247: maybe atm, but it has capacity to become 'general purpose' language
19:38:35*carum quit (Remote host closed the connection)
19:39:01*micklat joined #nimrod
19:39:13Matthias247gour: everybody gives itself that attribute nowadays. From Go over Haskell to Javascript ;)
19:40:43gourMatthias247: that's true but many also advertises as 'system? languages, like D, Rust, Nimrod
19:42:26Matthias247which are not that much when you see how big the market is ;)
19:43:40gour:-)
19:45:23EXetoCis that from worst to best?
19:45:53Matthias247he, maybe his answer depends on the IRC channel? :)
19:46:53gouri'm neither in #rust nor in #D ;)
19:49:56bstrieEXetoC: nah, it's like the olympic podium: gold medal in the center :)
19:50:16EXetoChuehue
19:51:48*BitPuffin joined #nimrod
19:51:51Matthias247bstrie: but gold cannot corrode, so rust can't be gold
19:52:02Matthias247and nimrod has the golden crown logo? :)
19:52:18bstrieMatthias247: I was trying to work that in somehow but got distracted
19:59:02*xtagon joined #nimrod
20:00:28*zahary joined #nimrod
20:18:12renesacEXetoC, I finally compiled the integer conversion problems in a github issue: https://github.com/Araq/Nimrod/issues/936
20:18:28*Varriount|Mobile joined #nimrod
20:26:47*Demos joined #nimrod
20:33:35*aftershave_ quit (Quit: Textual IRC Client: www.textualapp.com)
20:33:51*aftershave_ joined #nimrod
20:35:23*aftershave_ quit (Client Quit)
20:37:47*circ-user-97jC3 joined #nimrod
20:39:23*circ-user-97jC3 is now known as nequitans
20:40:40nequitansHi everybody, I'm super excited about Nimrod!
20:41:18*Trixar_za leaves nequitans alone in a room with the source code
20:42:05nequitansI was wondering: does there exist or are there any plans for numerics and plotting libraries by anyone? In either case, I think "numrod" would be a nice name :)
20:45:25renesacI would also like that, but your best bet right now would be the python bindings: https://github.com/micklat/NimBorg/blob/master/nimborg/py/test/test_pylab.nim
20:46:43Araqhi nequitans welcome. I planned a plotting library built on top of nim's graphics module but of course I never find the time
20:47:08renesac(those high level python bindings are new and still under development)
20:47:44Demosanyone know if there is a progmatic interface to GNUplot?
20:47:48Demoscould use that
20:48:06Demosalso I thought a lot of what numpy did was provide high speed data structures
20:48:42renesacDemos, and vector operations on them
20:49:14renesacand then, there is the entire ecosystem that uses those data strucutures
20:49:43renesacplus pandas, that offers data frames and other higher level data structures compatible with numpy
20:50:04Demoswell presumably one could use SSE/MMX/whatever intrinsics in nimrod. Our linear algebra library (linagl) does not use em yet though. Are data frames like haskell's lenses?
20:50:28renesacI don't know haskell, but they are like R data frames
20:50:58DemosI dont know python but I know nimrod's data structures are quite fast. Depends on the specific data structure in terms of how easy/hard nimpy interop would be
20:51:11renesachttp://pandas.pydata.org/pandas-docs/stable/10min.html
20:51:53nequitans@renesac: thanks! could be useful right away @Araq I'd be interested in thoughts/progress/contributing there. The template and macro structure could lend itself to some very nice syntaxes for numerical code
20:52:07Demosfor the kind of data analysis people do in R/Matlab I am not sure nimrod is really that much better than pyton. I mean matlab is really slow.
20:52:33Demos*python
20:52:38Demosbut what do I know right :D
20:52:41renesacwell, julia was created because python wasn't fast enought for some tasks
20:52:52Demosyeah. As was Cython I guess
20:53:11renesacyeah, cython has other uses outside the scientific comunity though
20:53:24Demosright
20:55:44renesacthere is no reason nimrod can't compete with those two too, other than manpower
20:56:23renesacthough those high level python bindings are a nice shortcut
20:56:25Demosthis is true
20:56:57renesacping micklat: for performance, we should implement something like this;
20:56:58renesachttp://docs.cython.org/src/userguide/memoryviews.html
20:57:16renesacfor python interop
20:57:56Demosbut I wanted to point out that it is not really a scripting language. And memory views look pretty much like arrays with demensional indexing functions. Kinda like Direct3D/OpenGL textures
20:58:12Demosor like what you get with Eigen or Blitz++
20:59:27renesacDemos, btw, you asked other day what was the dificulty adding two numbers in python: http://stackoverflow.com/questions/13334218/where-are-operators-mapped-to-magic-methods-in-python
21:00:19renesacthat is the overhead of interpreting a dynamic typed language
21:01:44Demosheh yeah
21:05:29*[1]Endy quit (Ping timeout: 272 seconds)
21:05:33nequitans@renesac -- I agree about the competition. I think nimrod has a # of advantages over python/cython. for example, expressivity: in python more language level modifications are required for performant code with a desired syntax.
21:09:31renesacyeah, and don't forget nirmod hability to define new operators
21:10:36renesacpython is winning over R/Matlab by being a better all around language
21:11:29renesacnimrod could win this way too
21:21:29skyfexIsn't numpy an interface to LAPAC and BLAS?
21:23:33nequitansAnd, to me, nimrod has couple of compelling modern languages. Over Scala, there's no dependency on the JVM (which has caused me performance problems in the past) as well as the fact that library *design* seems less complex (Scala has a very interesting and complex way to integrate static types with functional and object-oriented programming, but it can make library design difficult). I think Rust makes the memory management a little too complex, whic
21:23:57nequitans*compelling features when compared to other modern languages
21:24:02skyfexI think it would be best to do "numrod" as an interface to LAPACK/BLAS as well..
21:24:23*tinAndi joined #nimrod
21:24:31renesacskyfex, the thing is, there is a whole ecosystem based on numpy arrays in python
21:24:48renesacfrom machine learning, statmodels, etc
21:24:57nequitansI don't have any experience with Julia, though
21:25:06renesacme neither
21:25:16micklatrenesac: take a peek near the end here: https://github.com/micklat/NimBorg/blob/master/nimborg/py/test/test_linalg.nim
21:25:26skyfexnequitans: I've looked a tiny bit on Julia.. it looks pretty cool, and seems to be catching on very fast despite being very beta
21:25:45skyfexThey're using it in MIT courses
21:27:21renesacmicklat, oh, cool
21:27:27renesacI'm not sure if I like the api though
21:28:11micklatsuggest away
21:28:54renesacI don't have any sugestion right now, but it looks very low-level
21:29:02skyfexMaybe it would make sense to interface Nimrod to Julia libraries.. Julia and Nimrod seems quite similar, but I don't have too much experience with Julia
21:29:09nequitansack -- sorry to bring up a compiler message, but I thought it might ring a bell to anyone who has used the nimborg bindings:
21:29:20nequitansnimborg/py/low_level.nim(1649, 18) Error: type mismatch: got (string, global_symbols: bool) but expected one of: dynlib.LoadLib(path: string): TLibHandle dynlib.LoadLib(): TLibHandle
21:29:58nequitansIs getting rid of global_symbols=true OK?
21:31:31*awestroke quit (Remote host closed the connection)
21:31:39micklatnequitans: I'll take a look
21:32:13micklatI remember now: global_symbols is a flag I added to loadLib
21:32:20micklatI needed it to make scipy work
21:32:31micklatbut apparently my PR didn't get pulled into nimrod yet
21:32:34goursomeone on the julia-devel wrote today that his experience is that julia provides 1.2x performance in comparison with C
21:32:39nequitans@skyfex one of my friends who has played a little with Julia mentioned that a couple of issues are it has mandatory garbage collection, the startup time is big, and that currently it doesn't produce executables -- but as far as bindings, it may be interesting
21:33:12gournequitans: executables will come, according to devs
21:33:25nequitans@gour noted
21:33:58micklatnequitans: if you remove global_symbols=true, nimborg will work but scipy will not
21:34:22micklator you can pull this version of nimrod and rebuild your compiler: https://github.com/micklat/Nimrod
21:34:32nequitans@micklat thanks for letting me know! I'd like scipy to work, so I'll rebuild the compiler
21:34:43micklatare you on windows or linux?
21:37:02micklatwell, g'night
21:37:05*micklat quit (Remote host closed the connection)
21:37:42*brson joined #nimrod
21:38:45tinAndihallo, are there any resources with examples for using the winapi (gui) with nimrod?
21:39:49dom96https://github.com/Araq/Nimrod/blob/devel/examples/wingui.nim
21:39:53dom96But that isn't much.
21:43:01tinAndisoory, i meant except 'wingui.nim' ;)
21:44:55*Varriount-Mobile joined #nimrod
21:48:00*Mat3 joined #nimrod
21:48:03Mat3hi all
21:48:36*Varriount|Mobile quit (Ping timeout: 245 seconds)
21:48:40Araqhi Mat3
21:48:51tinAndican i use {.procvar.} for windows callbacks? (okay, i could test it, but it would be nice to have some more info...)
21:48:56*Varriount pushes his clone out of the way.
21:49:25*Varriount-Mobile quit (Remote host closed the connection)
21:49:49VarriounttinAndi: Actually, you might/should use regular procs
21:50:07Varriountthe only thing that matters with window api callbacks, iirc, is the calling convention
21:50:43Mat3hi Araq
21:57:53*gour quit (Quit: WeeChat 0.4.2)
22:00:43nequitansAraq: what inspired you to develop Nimrod? Seems to hit a sweet spot of efficiency, expressivity, and simplicity. Also, does it/do you plan for it to target the llvm directly or in other words, does targeting the llvm directly have any potential advantages?
22:04:03Araqnequitans: lots of reasons for creating nimrod
22:05:45Araqiirc I wanted to show that
22:06:41Araqa) dynamic binding as default is a stupid idea that's not nearly as often necessary as people think it is
22:07:57Araqb) Java's productivity gains over C++ are all due to having a GC, the "clean OO" paradigm has nothing to do with it
22:08:31tinAndiVarriount: Thank you, but i think I'am not ready for nimrod. registerclassex want's a struct where one member is a pointer to WNDPROC. I got to do some more basics with nimrod...
22:09:20VarriounttinAndi: If you think so.
22:09:20Araqc) Lisp style metaprogramming doesn't require a homoiconic syntax nor dynamic typing
22:16:26*tinAndi quit (Quit: ChatZilla 0.9.90.1 [Firefox 27.0.1/20140212131424])
22:16:36nequitansAraq: thanks!
22:24:13skyfexAraq: The finally statement C generation is a bitch :P
22:24:55Mat3sorry, what means 'a bitch' in these context ?
22:25:28Trixar_zaThat it's spiteful like a female dog
22:29:48*vbtt joined #nimrod
22:30:09Mat3English is such a colourful language
22:30:14Mat3hi vbtt
22:31:36vbttHi Mat3
22:32:16skyfexMat3: This is what I'm working on: https://github.com/Araq/Nimrod/issues/688
22:32:58skyfexI know what the C codegen does wrong.. but it's a bit hard to understand why it's doing it
22:34:43skyfexBut that's worries for another day..
22:34:50Matthias247can't the freestanding finally translated into a try {} finally {} block with the everything after finally in the try block?
22:35:31skyfexMatthias247: That's precisely what it does actually
22:35:36Matthias247ah, ok
22:35:57Matthias247I find the freestanding finally feature very cool. But the naming is bit ambigous, as #908 shows
22:36:28skyfexIndede
22:36:51Matthias247coming from c++/java/etc. I expected 908 to do exactly what happens and never thought the finally could not realted to the try/except before
22:37:04vbttIf i come across a finally.. how can u tell if it is freestanding
22:37:15skyfexMatthias247: Actually bug #688 can be produced without the freestanding finally, just by rewriting the same way the compiler does
22:37:59Araqnequitans: I have a pro/cons list of llvm vs C which I should post somewhere I guess
22:38:21Araqfrom time to time I re-evaluate it
22:38:31Araqbut llvm never wins :P
22:38:36nequitansAraq: noted. Thought there might not be a tweet-length answer to that question :)
22:38:43Matthias247D the same feature, but calls it scope(exit) stmt
22:39:13vbttYeah and go Lang has defer
22:39:17skyfexAraq: I'd be very curious about the details there, let me know if you write it
22:39:42Mat3Araq: I'm not a fan of LLVm either
22:40:23Demosat the very least using C means that if you have a C compiler booting the nimrod compiler is impressively fast
22:40:38Demosand more people have a C compiler than the LLVM libs
22:40:48Araqskyfex: if you're stuck with a bug, we have lots of other things to do
22:40:59Araqdon't get stuck and frustrated
22:41:07Matthias247Demos: oh yes, Nimrod compiler-compiling is about 100x faster than rust compiler-compiling
22:41:08Araqwork on something else then ;-)
22:42:35vbttI was really surprised how fast nimrod compiled itself.
22:42:59Matthias247me too
22:46:10*Demos quit (Read error: Connection reset by peer)
22:46:58VarriountAraq: Sent a PR
22:46:59Mat3skyfex: I trapped into a similar problem coding my VM in C. It is easy to let C compiler generating wrong code in this context
22:48:14Mat3as the standards seem to be very unspecific in C programmers would say minor details
22:48:45Matthias247C compiler standards for exceptions? :)
22:50:10Mat3branch dependent handling of function epilogs for example
22:50:28Mat3get some sleep, ciao
22:50:36*Mat3 quit (Quit: Verlassend)
22:51:06skyfexAraq: For now it's slighly more of a fun puzzle.. And I've been working on something else cool on the side to help me debug as well (XML output of each pass, with different CSS stylesheets to help look at the AST in different ways)
22:52:16Araqmeh, I mostly use n.renderTree
22:52:27Araqmust easier than looking at the raw AST
22:53:24skyfexAraq: Ah, didn't actually know about that module yet
22:53:54Varriountskyfex: It's built into one of the compiler modules. astalgo.nim I think
22:54:52skyfexVarriount: Thanks, astalgo.nim I knew about, renderer.nim is new to me
22:55:51*zahary1 joined #nimrod
23:00:03*Varriount looks at renderer.nim
23:00:51skyfexgetting some sleep too, baibai
23:01:06*BitPuffin quit (Ping timeout: 245 seconds)
23:01:13*skyfex quit (Quit: Lingo - http://www.lingoirc.com)
23:02:04*Kooda quit (Remote host closed the connection)
23:02:14*BitPuffin joined #nimrod
23:04:28NimBotAraq/Nimrod devel 23f1ae1 vocalbit [+0 ±2 -0]: Add two news items to website.
23:04:28NimBotAraq/Nimrod devel 4a389d0 vocalbit [+0 ±1 -0]: Fix website news formatting and grammar to be consistent.
23:04:28NimBotAraq/Nimrod devel 009a0d2 vocalbit [+0 ±1 -0]: Make ticker puntuation consistent.
23:04:28NimBotAraq/Nimrod devel b022887 Andreas Rumpf [+0 ±2 -0]: Merge pull request #934 from vocalbit/devel... 2 more lines
23:08:12*vbtt quit (Quit: Bye)
23:08:26*vbtt joined #nimrod
23:08:35vbttthanks Araq
23:08:46*io2 quit ()
23:08:51vbttfunny it took me 3 cls for a simple change..
23:12:01*Kooda joined #nimrod
23:12:53Araq3 cls?
23:12:56Araqwhat's cls?
23:18:50dom96commit lines?
23:21:12vbttchange list
23:21:22vbtti guess i call a commit a cl
23:22:31EXetoCI'm afraid it hasn't caught on yet :>
23:22:53VarriountI just call a commit a commit
23:22:53vbttheh it's old terminology.
23:23:28vbtthttp://en.wikipedia.org/wiki/Revision_control
23:24:07*tinAndi joined #nimrod
23:25:37vbtt'commit' used to be a verb
23:25:56vbttchangelist or changeset is a noun.
23:29:45*oxful quit (Ping timeout: 265 seconds)
23:30:58VarriountWhats the difference between a "ref object of TObject" and a "ref object of PObject"?
23:31:13*tinAndi quit (Quit: ChatZilla 0.9.90.1 [Firefox 27.0.1/20140212131424])
23:35:16vbttref of PObject sounds like pointer to a pointer.
23:35:22vbtti.e. double indirection.
23:35:52vbttref of TObject is pointer to the object
23:36:01vbtthmm
23:36:06vbttperhaps I shouldn't say pointer.
23:36:20dom96'of' means inheritance
23:37:03*oxful joined #nimrod
23:37:57Araqvbtt: 'ref object' is often used but then you don't have a name for the 'object' itself so 'of' can take a pointer and then strips it away to get the underlying value type
23:39:32VarriountAraq: So.. whats the difference between "ref object of TObject" and "ref object of PObject"?
23:39:36vbttdidn't get it but never mind. will re-read later.
23:39:49NimBotAraq/Nimrod devel c993d46 Araq [+0 ±1 -0]: nil->discard
23:39:49NimBotAraq/Nimrod devel 4e5b7ee Araq [+0 ±1 -0]: fixes #922
23:39:49NimBotAraq/Nimrod devel 2f06970 Araq [+0 ±1 -0]: fixes #923
23:39:49NimBotAraq/Nimrod devel 2f24475 Araq [+1 ±1 -0]: fixes #926
23:39:49NimBot4 more commits.
23:40:06AraqVarriount: there is none
23:40:38Araq"ref object of PObject" is supported for convenience when the TObject has no name
23:51:48*filwit joined #nimrod
23:52:02filwithey Araq, you still awake?
23:52:27filwityou fixed my macro bug with a recent code push, thanks mate
23:53:44filwiti gotta look at how you did it, but I just wanted to let you know now everything works with my macros on devel without my changes
23:54:38filwiti was putting off making a pull-request until i could ask you about the changes I made to get around it, but looks like you took care of it
23:55:09Araqgood to hear
23:55:23Araqbut tstringinterp is my new hard test case
23:55:24filwitnow i don't have any Nimrod PR's under my belt though.. gotta go find an easy bug to fix on the list or something soon
23:55:39Araqha, nothing is easy
23:56:10filwityeah, i know. let me take a look at your code changes. you going to be around for the next 10 mins?
23:56:24Araqok
23:56:31filwiti want to know if my fixes where similar to what you did, one sec
23:57:09filwitnope..
23:57:14filwithmmm..
23:59:07*darkf joined #nimrod
23:59:15filwitpretty sure this fix was probably what changed it: https://github.com/Araq/Nimrod/issues/926
23:59:32filwitanyways, i'll take a look at your changes and see what you did