<< 26-04-2014 >>

00:02:13*xenagi quit (Quit: Leaving)
00:06:33*nande quit (Remote host closed the connection)
00:09:51*nande joined #nimrod
00:20:53*nande quit (Remote host closed the connection)
00:23:31*DAddYE quit ()
00:24:53*nande joined #nimrod
00:33:00*nande quit (Remote host closed the connection)
00:35:33*jbe quit (Quit: Leaving)
00:36:40*nande joined #nimrod
00:57:48*brson quit (Ping timeout: 265 seconds)
00:59:46*brson joined #nimrod
01:32:45OrionPKdom96 added shoco to babel ( https://github.com/Ed-von-Schleck/shoco )
01:36:11*q66 quit (Quit: Leaving)
01:45:18*askatasuna joined #nimrod
01:45:39*q66 joined #nimrod
01:45:39*q66 quit (Changing host)
01:45:39*q66 joined #nimrod
01:56:05*Demos joined #nimrod
02:10:38*mal`` quit (Quit: ERC Version 5.3 (IRC client for Emacs))
02:10:46*Demos quit (Read error: Connection reset by peer)
02:15:52*mal`` joined #nimrod
02:15:57*mal`` quit (Remote host closed the connection)
02:19:51*mal`` joined #nimrod
02:20:44*mal`` quit (Remote host closed the connection)
02:26:53*mal`` joined #nimrod
02:27:23*BitPuffin quit (Read error: Connection reset by peer)
02:27:37*BitPuffin joined #nimrod
02:33:53*q66 quit (Quit: Leaving)
02:34:02flaviulexer.nim:605 seems to have its own version of hashIgnoreStyle that is subtly different, I think its a bug
02:36:03flaviuAlso, I see no reason for a__b_3_c or _a__b_3_c to be restricted. They are ugly, sure, but style insensitivity deals with that
03:06:16*brson quit (Quit: leaving)
03:24:34*donydh joined #nimrod
03:27:11*Skrylar joined #nimrod
03:45:26Araqhi donydh welcome
03:46:19donydhhello
03:55:33Skrylarok, got yoinking kerning tables from windows fonts done
04:05:48*donydh quit (Ping timeout: 240 seconds)
04:21:53*ehaliewicz quit (Read error: No route to host)
04:27:20*Jesin quit (Remote host closed the connection)
04:49:52*flaviu quit (Remote host closed the connection)
04:57:46*askatasuna quit (Quit: WeeChat 0.4.3)
05:08:53*darithorn quit (Read error: Operation timed out)
05:49:02fowlAraq, is this a known issue? (codegen error if i dont recapture open/close) https://gist.github.com/fowlmouth/dac6a78bc816ada5dc6b
05:50:12Araqyes
05:50:20Araqknown issue
05:51:18fowlok
05:56:36fowlnow this is saxy https://gist.github.com/fowlmouth/11284189#file-parsetron-nim-L203
06:24:37Araqindeed
06:26:28*oxful joined #nimrod
07:04:13*[1]Endy joined #nimrod
07:38:46*superfunc joined #nimrod
07:50:47*runvnc joined #nimrod
07:55:18*superfunc quit (Ping timeout: 240 seconds)
07:59:28Skrylar:/
07:59:43Skrylarmeh. I donno why, but I've developed an aversion to things written in Unity
08:18:26*[1]Endy quit (Ping timeout: 255 seconds)
08:20:15milosnhmm when proc has this signature:
08:20:17milosniterator fastRows(db: TDbConn; query: TSqlQuery; args: varargs[string, `$`]): TRow
08:20:26milosnwhats args there?
08:20:36milosnwhat do i need to supply? :)
08:20:47milosnsorry for the noob question, just started poking around
08:20:49milosn:)
08:21:34milosni assume that array/hash of bindings for SQL query i am executing
08:21:50milosnbut i have/need none, so what should i supply there?
08:22:45runvncmilosn: http://nimrod-lang.org/manual.html#varargs
08:22:51runvncsee the second example
08:24:25milosncool thanks, problem is i have none varargs
08:24:41milosnand just doing:
08:24:41milosnfor row in sqlite.fastRows(conn, sql):
08:24:50milosngives me compilation error
08:25:40milosnmaybe its because 'sql' is string ... hmmm
08:25:45milosnbut dont think so
08:27:10runvncwhat is the exact error message
08:27:40milosnhmm noone around i can spam here :)
08:27:41milosngenzone_la.nim(29, 26) Error: type mismatch: got (TDbConn, string)
08:27:41milosnbut expected one of:
08:27:42milosndb_sqlite.fastRows(db: TDbConn, query: TSqlQuery, args: varargs[string]): iter[TRow]
08:28:13runvncmaybe you need to include an arg then
08:28:18runvnctsqlquery is string?
08:28:44milosnTSqlQuery = distinct string
08:28:47milosnyes i think so
08:29:00runvncmaybe you need it to be something like select * from mytable where name='?' or something and then your varargs is thename
08:29:31milosnive tried doing this:
08:29:43milosnfor row in sqlite.fastRows(conn, sql, ""):
08:29:51milosndont work either :D
08:29:56runvncput a question mark like I said
08:29:58runvncand a real arg
08:30:01runvncsee if that works
08:30:32runvnchttps://github.com/nimrod-code/nimforum/blob/master/forum.nim
08:30:37runvncsee on line 411
08:30:40runvncthey are using fastrows
08:30:52runvncmaybe you have to have an arg like that
08:32:13milosnputing sql"<my_query>" worked
08:32:18Araqa TSqlQuery is a *distinct* string to prevent SQL injections
08:32:21milosnand i can have empty varargs
08:32:25Araqyep.
08:32:28Araqthat's it.
08:32:40milosncool let me if it works and prints the rows
08:32:41milosn:D
08:33:21milosnyup it sure does, excellent
08:43:03Araqmilosn: please provide PRs to the module's documentation if it's not sufficient
08:44:29milosnAraq: its not that, i am sure its sufficient enough to anyone that has dealt with languages like nimrod before
08:45:08milosnive poked a bit with scala, and always found "method signatures" doc frightening ... just gotta learn how to read it :)
08:45:28Araqno, the module needs examples at the top level
08:45:39Araqevery module should have that really
08:45:45milosnah ok
08:46:18milosndo you have web interface for problem reports?
08:46:26milosnbug tracker?
08:46:37Araqwe use github's bug tracker
08:46:44milosnok, ill have a look
08:47:15milosni opened git account at one point in time so it should be there someplace, but i mainly use bitbucket myself
08:48:05milosni have this DNS zone compiler i wrote in chicken scheme, few years back
08:48:39milosni want to rewrite it in nimrod, since noone else can tweak scheme at work ... maybe with nimrod they can contribute something
08:48:42milosn:)
08:49:58*nande quit (Remote host closed the connection)
08:54:03*nande joined #nimrod
08:58:26zaharyhi guys, I'm back from the dead
08:58:50Araqnice
08:59:14zaharysorry for not being around for the release, I imagine that gave you some hard time
08:59:29Araqwe simply declared it a "beta"
08:59:34Araq;-)
08:59:44zaharyI noticed :)
09:00:17Araqmost annoying is that async still crashes with markAndSweep and leaks with the default GC
09:01:14zaharyis it clear which objects leak?
09:01:49Araqno but I didn't really look into that, tried to fix the markAndSweep instead
09:02:17AraqI think dom96's low level stuff corrupts something
09:02:30Araqand we're lucky with the default gc to not notice it
09:03:51zaharyI had markAndSweep enabled for a while and there were some test cases that were working differently I think
09:04:05milosnwhat is the default hash/dictionary structure in Nimrod?
09:04:21zaharyso maybe there is still some problem lurking in there
09:04:44zaharymilosn: TTable from tables
09:05:08*Matthias247 joined #nimrod
09:06:11Araqyeah the testers agree with you. I haven't looked into these. I simply assumes the memory usage thresholds are too narrow for markAndSweep
09:06:18Araq*assumed
09:07:17Araqwell the crashes disappear when use -d:useGcAssert and -d:useSysAssert so ... that indicates it's not a GC nor a codegen bug
09:07:58Araqmaybe we should forbid dom96 to use copyMem :P
09:18:52zaharywe had problems with valgrind, right? I haven't tried yet this new valgrind alternative that is getting some hype:
09:18:52zaharyhttps://code.google.com/p/address-sanitizer/
09:19:57Araqwe only need to figure out how to tell valgrind that the gc is allowed to scan the stack conservatively
09:20:16Araqother GCs/runtimes have the same problem
09:28:48Araqbut I can't test it on linux anyway
09:29:05Araqmy linux is broken for quite some time now and I never find the time to fix it
09:29:40Araqand yes, it's the package manager who utterly fails at updating my system...
09:29:59*Araq dislikes package managers for a reason
09:32:08runvncaraq last time I had a problem with linux I just put linux mint on a usb and started from scratch
09:32:26runvncwhich distro are you using
09:32:37Araqlinux mint debian edition
09:32:57dom96Araq: So you don't even know what's wrong with my code and yet you want to forbid me to use copyMem?
09:33:23Araqdom96: I wasn't serious but you know that
09:33:42runvncaraq what version are you on
09:33:42dom96yes :P
09:33:45runvncof mint
09:33:56dom96Araq: What do you think about dependent types?
09:34:29dom96zahary: how long will you be alive for? :P
09:34:50AraqI think they are overrated and our control flow dependent typing is much easier to grasp and yet powerful enough with the right additions
09:35:16dom96have you seen the video I posted?
09:35:25dom96I decided to try implementing the same using macros
09:35:38dom96seemed simple enough
09:35:42Araqnot really but fyi we have a type safe printf in the manual
09:36:38dom96That's a much better implementation than mine lol
09:38:18dom96I asked in #idris what advantages dependent types have to macros
09:38:27dom96and they didn't really come up with anything big
09:40:38dom96and yet they still have 70 more users than us in IRC
09:46:20Araqyeah but that's because Nimrod is inherently inferior to Rust and a stillborn.
09:47:57Araqand there is only enough room for 1 systems programming language in the universe
09:48:17dom96What is 'formatChars' in the safe printf example?
09:48:42Araqnever mind that we are safer than Rust for quite some use cases already afaict
09:58:11dom96why does this have a '[]'? http://build.nimrod-lang.org/docs/macros.html#typ,PNimrodNode
09:59:47dom96come on, no `==` for typedesc?
10:04:20*[1]Endy joined #nimrod
10:20:03Skrylarrust isn't a system programming language, its a masochism training program
10:20:06Skrylar:P
10:20:51Skrylarspeaking of masochism, i hate how windows "aligns" things to strange stride values
10:22:00*[2]Endy joined #nimrod
10:25:03*foodoo joined #nimrod
10:25:43*[1]Endy quit (Ping timeout: 265 seconds)
10:54:40*bbodi joined #nimrod
11:00:54bbodi"Araq: oh god, no "clean code" please". So dou you say that clean, structured and immeadiately understandable code, which are covered by unit test to prevent defects during modification is prohibited in the compiler? it is sad
11:01:34Araqno I'm saying Uncle Bob has no clue about formal semantics
11:01:56Araqand every example in his book is an anti pattern
11:02:26bbodiHe has to work with a language wich is an antipattern itself.
11:02:43Araqhe choose to work in it
11:04:34Araqthe compiler is mostly clean structured btw as soon as you can accept we like abbrevs
11:04:51bbodiThere are some points which are language independent. Talkative method- and variable name, short method implementations and so on, you know it well, many of the design elements of Nimrod mirror these ideas
11:08:09Araqevery example of bad code in his book is immediately understandable to me
11:08:31Araqand every example of good code in his book is garbage.
11:09:06Araqhe moves things from the stack to the heap (aka more complex lifetimes)
11:09:18Araqhe uses lots of indirections (aka more complex control flow)
11:09:33runvncsorry who is uncle bob
11:10:20bbodiI dont want to protect him or his book at all, the ideas he spread is the useful thing: how we should handle our code, how we have to keep it clean and so on
11:13:04Araqand yet he advocates a style of programming which pretends we have no type checkers
11:13:21Araqor debuggers
11:13:54Araqand all his examples are simplistic anyway
11:14:20Araqthe real complexity comes from the problem domain and all you can do is push it around
11:15:07Araqwell ofc when one develops simple web apps with PHP, the complexity comes from the broken tools
11:15:39Araqbut a compiler != business logic + web app
11:18:31bbodibtw, I cant use debuggers in Nimrod. And I think debugging can be dangerous if you use it to test or validate your code, because it make you beleive that you dont need unit tests. Debugging is for bug hunting or helping in understanding foreign code.
11:18:53AraqI can use gdb perfectly fine with nimrod
11:18:59bbodiA compiler has some business logic too which is evolves with time
11:19:07Skrylarisn't there a built-in debugger, or supposed to be
11:19:17Araq--lineDir:on --debuginfo does the trick
11:19:30bbodithen sorry, i didnt try gdb, I try it with the Nimrod debugger (endb or what)
11:19:38Araq--debugger:on enables the built-in debugger but yeah
11:19:44Araqthat's broken
11:19:45*Skrylar has insofar only used debugEcho's around problem areas while unit testing ._.
11:24:11Araqso lets see, the dynamic typing crowd says "we don't need no static typing, unit tests catch type mistakes as a side effect anyway"
11:24:53foodoothe dynamic typing crowd says "quack" ;)
11:25:11bbodidynamic typing is very dangerous and it has its own place, I dont like it anyway :)
11:25:33Araqand yet when I say "we don't need no unit tests, our integration tests catch these things as a side effect anyway" I must be wrong because nobody else says that.
11:29:44Araqoh and just to be clear: adding unit tests to the compiler is perfectly fine with me
11:30:30Araqwhat is not fine is "omg skProc is ugly, make that SymbolKind.Proc everywhere" in 70_000+ lines of code
11:32:08Araqand the long procs are all because they use nimrod's poor man's approach to pattern matching (case) rather than dynamic binding.
11:34:22Araqwhich is rather controversial for the OO crowd, but IME works much better than dynamic binding and lots of other compiler developers and the whole FP crowd agree with me
11:38:45bbodiI like Nimrod's pattern matching, but the procs are not long because of them, the body of the different cases could be extracted to a proc. That is I am talking about, not the solution that some languages use for different problem, but how we use them to keep our code clean and readable.
11:42:36Araqwell enough talking
11:42:46Araqedit a single module to your liking, make a PR
11:42:54Araqand then we can discuss this PR
11:42:59Araqor I apply it ;-)
11:43:14bbodiyou are right :)
11:44:55bbodiI have a push request we could talking about: https://github.com/Araq/Nimrod/pull/1139
11:46:53*nande quit (Remote host closed the connection)
11:57:00Araqbbodi: that's stdlib code though. your PR looks fine
11:57:24Araqbut the stdlib is mostly dom96's business :P
11:57:39bbodiok thanks, I didnt know
12:02:02*bbodi quit (Ping timeout: 252 seconds)
12:07:18*bbodi joined #nimrod
12:11:51*q66 joined #nimrod
12:11:51*q66 quit (Changing host)
12:11:51*q66 joined #nimrod
12:22:08EXetoCdom96: == for typedesc? why not 'is'?
12:53:29milosnwhats the easiest way to drop last element of the sequence?
12:53:30milosn:)
12:53:50milosnanother stupid question, i cant find the docs for seq type
12:54:18milosnhmmm
12:56:41*foodoo quit (Remote host closed the connection)
12:57:34Araqdiscard s.pop()
12:57:43Araqs.setLen(s.len-1)
12:57:59Araqthe latter is more efficient
13:13:16milosnthanks
13:13:21milosnpop() is fine :)
13:25:26*darkf quit (Read error: Connection reset by peer)
13:25:53*darkf joined #nimrod
13:37:39*darkf quit (Quit: Leaving)
14:23:10*Jesin joined #nimrod
14:53:05*oxful quit (Ping timeout: 255 seconds)
14:59:35*Matthias247 quit (Read error: Connection reset by peer)
15:08:28*oxful joined #nimrod
15:53:02Araqso zahary ... what branching model do you think we should use?
15:58:12zaharyI think that whatever we call it, at least for a while people will still want to use the latest HEAD
15:58:34*untitaker quit (Ping timeout: 276 seconds)
16:00:11bbodiAraq: you said that the endb debugger is brroken. What's wrong with that? Are there any issue for that problem?
16:00:17zaharyin general, I agree with your previous statement that we should strive to keep the test suite green and release more often
16:00:51Araqwell my question is about the master vs devel split and what to do with bugfixes
16:05:10Araqif you think anything is wrong with cherry picking them into master (my preferred way)
16:05:12*untitaker joined #nimrod
16:06:22zaharyif we don't release often (to keep master close to devel), it's probably not realistic that we'll be able to do it easily
16:08:33Araqwell but that is Varriount's problem. :-)
16:09:03Araqbut seriously, let's try it and Varriount shall complain as soon as it's becoming too hard
16:09:16zaharysure
16:09:54Araqfor many things I do I can easily tell if it's a bugfix or whether it breaks code
16:12:36Araqbbodi: you tell me, all I know is that people say it's broken. I use it for its watchpoint support
16:13:01Araqusually I need to patch it to hunt down a particular bug
16:16:26Araqbut still it's really good for that, especially since watchpoints are broken in every other debugger that I've tried
16:17:27EXetoC#1148 has some info regarding the debugger bug (else without if)
16:18:39EXetoCbbodi: I don't know what other bugs might exist. I don't think I got that C error the first time, but rather that breakpoints didn't trigger
16:19:09bbodithanks guys, I try to investigate it
16:23:42OrionPKdom96 but that link has all the documentation :'(
16:24:39EXetoCI don't know my way around the compiler so it seemed pretty difficult to figure stuff out without stepping through the source.
16:25:24EXetoCAraq: speaking of which, how limited are the eval expressions? does 'echo renderTree(n)' and 'debug n' work?
16:29:00EXetoCI don't know if echo is necessary
16:29:23Araqyou mean in ENDB? there is no renderTree nor debug
16:32:00EXetoCright
16:40:57bbodihttp://nimrod-lang.org/endb.html is outdated. callstack command now is "bt" or "backtrace"
16:42:27bbodito tell the truth, this debugger is awesome
16:44:37dom96OrionPK: Your readme links to it anyway
16:45:07*Skrylar quit (Ping timeout: 252 seconds)
16:45:35OrionPKok
16:46:59OrionPKdom96 updated it
16:47:10*PortableEXetoC joined #nimrod
16:49:05NimBotnimrod-code/packages master 000c1e8 onionhammer [+0 ±1 -0]: Added shoco string compression
16:49:05NimBotnimrod-code/packages master 430f9b9 onionhammer [+0 ±1 -0]: Updated url
16:49:05NimBotnimrod-code/packages master c63295e Dominik Picheta [+0 ±1 -0]: Merge pull request #53 from onionhammer/patch-1... 2 more lines
16:50:02*cark quit (Read error: Connection reset by peer)
16:51:19*superfunc joined #nimrod
16:54:36*cark joined #nimrod
16:59:38Araqbbodi: glad you like it, I sto
16:59:50Araqle the idea from smarteiffel
17:10:36*PortableEXetoC quit (Read error: Connection reset by peer)
17:10:42*PortableEXetoC joined #nimrod
17:16:38*PortableEXetoC quit (Ping timeout: 255 seconds)
17:23:41*recodr joined #nimrod
17:23:58dom96hi recodr
17:24:12recodrhi
17:26:31*io2 joined #nimrod
17:33:05*Demos joined #nimrod
17:33:13*PortableEXetoC joined #nimrod
17:37:38*Varriount quit (Read error: Connection reset by peer)
17:50:29*PortableEXetoC quit (Quit: cake)
17:53:03*uvelichitel joined #nimrod
17:58:37reactormonkrecodr, o/
18:01:29*Demos quit (Ping timeout: 264 seconds)
18:01:30*bbodi quit (Ping timeout: 265 seconds)
18:01:45*enurlyx joined #nimrod
18:02:59*Demos joined #nimrod
18:05:21enurlyxHello, i have a 64bit installation of nimrod and MinGw-64 on windows.
18:05:48enurlyxHow can I compile a 32bit EXE? (--cpu:i386 ?)
18:11:11*[1]Endy joined #nimrod
18:13:29*[2]Endy quit (Ping timeout: 252 seconds)
18:15:33*[2]Endy joined #nimrod
18:18:37*[1]Endy quit (Ping timeout: 252 seconds)
18:20:41*Demos quit (Ping timeout: 264 seconds)
18:23:30*Demos joined #nimrod
18:25:58*seertaak joined #nimrod
18:26:23DemosAraq, did you know that c# allows the debugger to trigger side-effects in the program! Makes a good case for {.noSideEffect.}
18:27:16reactormonkenurlyx, I assume you need a cross-compiler
18:28:37seertaakhi all, looking for way to do simple FFI, using as an example strlen C-func.
18:28:43seertaakproc strlen(formatstr: cstring):int {.importc: "printf".}
18:28:52seertaakecho(strlen("MP"))
18:29:26dom96enurlyx: You need a 32bit gcc I think.
18:29:36Demosseertaak, that is not going to call strlen :D
18:29:45dom96enurlyx: You can then set its path in nimrod's config file.
18:29:56seertaakoh oops
18:30:16seertaakhow silly of me!!!
18:31:39reactormonkseertaak, ^^
18:32:26seertaakok how about this: proc printf(formatstr: cstring) {.importc: "printf", varargs.} ?
18:32:36seertaakthen: printf("Hello, %s", "World")
18:32:41seertaakdoesn't seem to work...
18:32:51seertaak(was what I was originally trying to do ;)
18:33:40seertaakoh... actually it is working!
18:33:51seertaaksorry everyone for silly questions!!!
18:34:38enurlyxok, thanks. i will try it.
18:37:33reactormonkseertaak, I assume you forgot your varargs[expr]
18:40:09seertaakreactormonk, actually I think the mistake was attempting to do it from the repl
18:40:21reactormonkseertaak, the repl isn't all that powerful
18:40:31Demos seertaak yeah, the repl does not support FFI, and it somewhat buggy in any case
18:40:34seertaakdoesn't seem to work, then I changed, in vain, a couple of the pragma incantations
18:40:41seertaakwhen actually i should have just compiled ;)
18:40:55seertaakok no big deal
18:52:20reactormonkseertaak, whatcha tinkering on?
18:53:23seertaakI'm trying to do something similar to objcbridge, but doing it myself to learn nimrod and its ffi a bit
18:53:47seertaaki.e. setting up an obj-c object (or at least call one) from nimrod
18:54:08seertaakeventually use macros to make it easy to set up an obj-c object from nimrod
18:54:24seertaakwith an eventual goal of using cocoa classes like nsview, nswindow etc.
18:56:24superfuncdom96: babel has been working great for me, just wanted to say thanks for the hard work
18:56:40dom96superfunc: That's nice to hear, thanks :)
19:00:48EXetoCdom96: are you going to implement a better formatting interface? in addition to just showing off :>
19:03:19EXetoCI can have a look at it if you don't have time
19:05:01renesacI would love something like that: https://docs.python.org/2/library/string.html#formatspec
19:10:41*enurlyx quit (Quit: Nettalk6 - www.ntalk.de)
19:30:38AraqDemos: yes. indeed I do know.
19:30:46dom96EXetoC: you mean printf? I reached a compiler bug, if you want to fix that you can take a look at my latest issue :P
19:31:28Araqhi seertaak welcome
19:31:37Araqsame to you, recodr
19:33:00*dom96 would really love to see a "Nimrod by example"
19:43:28EXetoCdom96: I asked "why not 'is?'" before. why can't you use that?
19:43:51dom96I don't think it works for typedesc either
19:45:11EXetoCit does in some cases at least
19:45:29*askatasuna joined #nimrod
19:47:17seertaakHi Araq! very impressed with nimrod, giving it a little spin right now :)
19:47:18EXetoCand printf is a start but that should just be a convenience wrapper of course
19:47:21EXetoChm, echof?
19:47:47renesacdom96, https://gist.github.com/ReneSac/b57811eb4ae8ab39bed1
19:48:19renesacfor some reason an element from varargs[int] is not "int"
19:48:36renesacI don't know what it is because I can't print typedescs...
19:48:51dom96try echo(type.name)
19:48:59dom96and import typetraits
19:49:36EXetoCbut doesn't it tell you in the error message? echo(T)
19:51:05*njoejoe joined #nimrod
19:51:06renesacI'm getting a SIGSEGV: Illegal storage access. (Attempt to read from nil?)
19:51:11renesacfrom the compiler
19:52:29dom96hey njoejoe
19:52:37Araqrenesac: report it
19:54:06renesacit was wrong code, now it compiles
19:54:11renesacI can report anyay
19:54:18renesachttps://gist.github.com/ReneSac/b57811eb4ae8ab39bed1 <-- new code
19:54:21Araqa crash is a crash
19:54:26renesacExpected Int got int
19:54:26renesac1
19:55:05dom96so `is` is broken?
19:55:15renesacit seems
19:55:24Araqnot suprising though
19:55:32dom96is it the same for varargs[expr]?
19:55:34Araq'is' is harder than it looks
19:56:50Demosthe code for `is` is that big function in sigmatch right? I was looking at it yesterday and got to it several times when trying to figure out compiler bugs
19:57:17Araqno, 'is' is somewhere else
19:58:12*Matthias247 joined #nimrod
19:58:20renesacwith varargs[expr] I get:
19:58:20renesacError: internal error: getTypeDescAux(tyExpr)
19:58:21renesacNo stack traceback available
19:58:32renesacthree bugs to report?
19:58:46Araqthe last one is old
19:59:08*Matthias247 quit (Read error: Connection reset by peer)
19:59:20renesacalready on github?
19:59:29Araqwho knows
19:59:39renesacI would hope you would
19:59:40renesac:P
20:00:17njoejoehey hey dom96 :-) new to nimrod. why does $fib(40) not work but intToStr(fib(40)) does? is there a shortcut for intToStr? I was looking for simple interpolation like ruby "#{fib(40)}"
20:00:22*Matthias247 joined #nimrod
20:00:28EXetoCI see some discussions for that particular error message but I guess no one bothered to report it
20:00:48dom96njoejoe: Can you gist your full code?
20:00:49*Matthias247 quit (Read error: Connection reset by peer)
20:01:08Araqnjoejoe: use #!strongSpaces as first line for your code
20:01:18EXetoCthere's one for getTypeDescAux(tyGenericInvokation)
20:01:36dom96or what Araq said
20:02:03*Matthias247 joined #nimrod
20:02:05renesac$(fib(40)) will probably work too
20:02:27renesac(that is what #!strongSpaces does, I think)
20:02:36Araq$fib(40) DOES work, but not within 'echo'
20:02:54Araqbecause it is parsed as (echo) $ (fib(40))
20:03:14Araqknown gotcha, fixed with #!strongSpaces
20:03:49renesacis that because echo is a macro or something?
20:04:09dom96If njoejoe is using 'echo' then there is no need for `$`.
20:04:09njoejoedom96: https://gist.github.com/jots/11329556 (using your jester)
20:04:27Araqno it's because that's how precedence is handled, renesac
20:04:50Araqa + b # same as a +b
20:05:00Araqin the old parser
20:05:21Demosone of the motivations for strong spaces was to fix these problems without having to parse all the included modules to figure out how stuff associated
20:05:31dom96njoejoe: In that case you can either use strongSpaces, use 'resp($fib(40))' or use resp $(fib(40))
20:05:40Demosat least that is what I recall
20:05:42njoejoeoh! it works with the strongspaces. I will have to read about that! thanks :-)
20:07:52Araqmaybe strongSpaces should be the default?
20:08:06Araqstill too early to tell, I think
20:08:06dom96not yet
20:08:22dom96I still haven't tested it yet :P
20:09:11recodr I am a newbie, how to read an integer value to a variable?
20:10:44dom96http://build.nimrod-lang.org/docs/strutils.html#parseInt,string
20:12:08njoejoedom96: one thing i'm hoping to do is to use jester as a webserver but requests result in the server going out to other webservers which may be slow, but have the jester webserver still serve other clients while waiting on the IO from the remote webservers. not sure yet what is involved in that.
20:13:08recodroh thanks, dom96
20:14:19dom96njoejoe: You may need to wait for me to implement the new async stuff in Jester because the current http client only supports it.
20:15:48*superfunc quit (Ping timeout: 240 seconds)
20:17:23njoejoedom96: ah. ok. I am going to look at the new async stuff after i have a bit better understanding of nimrod. most of my work involves async, using a lot of ruby eventmachine now.
20:18:28dom96njoejoe: You could also use the http server module manually depending on your needs.
20:18:40dom96For now at least, or help me with Jester
20:20:43*xenagi joined #nimrod
20:22:10fowli need a name for this parsing dsl
20:22:37dom96perseus
20:23:13EXetoCnimparsebbq
20:24:31renesacAraq, that 'is' bug was not a bug at all
20:24:47renesacthe logic was simply wrong, I should have used 'isnot'
20:24:54AraqXD
20:25:08renesac^^"
20:25:11Araqhappens surprisingly often, even to the best of us
20:25:25*Araq gets it wrong all the time too
20:25:29renesacthat is why creating a minimal working example is so important
20:25:37njoejoebtw, i tried out the async chat server code listed on http://nimrod-lang.org/news.html when client disconnects, server ends. is that supposed to happen? i haven't looked to see what runForever() is supposed to do
20:25:48renesacyou end up catching your mistakes
20:26:03renesacwell, the other two are still a bug though
20:29:04dom96njoejoe: No, it's not. Likely an uncaught 'connection reset by peer' exception.
20:31:19EXetoCexception? I don't know if that's a good idea
20:32:56dom96EXetoC: What do you suggest as an alternative?
20:48:53*Demos quit (Ping timeout: 264 seconds)
20:49:48*recodr quit (Ping timeout: 240 seconds)
20:50:39njoejoedom96 so does runForever need try poll; except continue or some such?
20:53:11dom96njoejoe: Ideally there should be a safe recvLine implementation which doesn't throw an exception. try: .. except: .. isn't currently supported in async procs, but you should be able to check the future manually.
20:55:39fowlahaha
20:55:46EXetoCdom96: some flag that turns it off maybe
20:55:48fowlconverter toPtrPtr* [T,IDX] (some: ptr array[idx,ptr T]): ptr ptr T =
20:55:48fowl cast[ptr ptr T](some)
20:56:06fowlfor c array/ptr compatibility>_>
20:56:48EXetoCbut then you need to be able to catch it using a returned value or something
20:56:51njoejoeah. i tried to add a try block in processClient, but it didn't like it. "yield cannot be used within try"
20:58:41dom96njoejoe: yeah, something like this should work: https://gist.github.com/dom96/6fe8c0675eb6f9e90509
20:58:48dom96(I haven't tested it at all)
21:01:18Araqfowl: we have .unchecked for pointer like arrays now
21:01:48dom96njoejoe: Also may need a safeSend
21:02:45EXetoCdom96: won't this do for identity checking in your case "int is char"?
21:02:47reactormonkAraq, how to use them?
21:03:09dom96EXetoC: I don't follow
21:05:01EXetoCdom96: you said you couldn't use 'is' with typedesc
21:05:40renesacAraq, {.unchecked.} implements the semantics of flexible array members?
21:05:42dom96EXetoC: yeah?
21:06:10renesacso in the example on the manual, you would alloc space for the MySeq struct?
21:07:35EXetoCdom96: yes, and you use "T is U" for typedesc equality checking
21:08:13dom96EXetoC: right
21:08:50EXetoCso what would `==` do? the same thing I imagine
21:09:24dom96When I tried `is` it wasn't working for typedescs
21:10:06dom96I don't really care. As long as I can do it, I don't mind if it's 'T == U' or 'T is U'.
21:10:17renesacEXetoC, well, 'int is TInteger" makes more sense than "int == TInteger"
21:10:57renesacTInteger being a typeclass with more than just int
21:11:16renesacdom96, gist your try
21:11:18*seertaak quit (Ping timeout: 240 seconds)
21:11:23EXetoCyeah but either 'is' is broken in this case or it's that varargs parameter
21:11:28*bjz joined #nimrod
21:11:53renesacfor me it aways worked (except for the vararg[expr] that I just filled a bug)
21:11:55dom96renesac: https://github.com/Araq/Nimrod/issues/1152
21:12:32renesachum
21:12:42renesacI aways used it on the output of '.type'
21:12:49renesacand that output can't be assigned to a variable
21:12:53renesaclast time I tried
21:13:14dom96yeah, that probably shouldn't work.
21:13:35dom96but remove the `.typedesc`
21:13:52renesacI think it should
21:13:52dom96and then s/!=/isnot/ and it doesn't work IIRC
21:13:54renesac:p
21:14:17dom96Is a type implicitly a typedesc?
21:14:26*nande joined #nimrod
21:16:31fowldom96, yea
21:17:13renesacdom96, using types directly on the 'is' worked
21:17:33renesacnow I get this error:
21:17:33renesac/home/rene/projetos/Nimrod/lib/core/macros.nim(206, 21) Error: undeclared identifier: 'cprintf'
21:17:35renesacnormal?
21:18:37dom96Oh cool. Change 'cprintf' to 'printf' in the source.
21:18:48dom96(or the proc name to cprintf)
21:20:15renesacreturning with most of your code, now I get:
21:20:16renesac/tmp/aporia/a7.nim(30, 29) Error: internal error: cannot generate VM code for type args[i]
21:20:26renesacvar actualType = args[i].type <-- the line
21:21:14Araqyeah. I've looked at this bug.
21:21:25Araqbut I have no idea what the VM needs to do for this case :P
21:22:00renesacreplacing the 'args[i].type' for the type name works
21:24:17*[2]Endy quit (Ping timeout: 264 seconds)
21:25:01dom96do we have any string matching algorithms?
21:26:21Araqpegs, regexes
21:26:30AraqeditDistance
21:27:38dom96editDistance is exactly what I want I think
21:27:57OrionPKaraq had any time to look at 1140?
21:28:14AraqOrionPK: sorry not yet
21:28:31EXetoCAraq: watcha working on?
21:28:34OrionPKnp
21:28:58OrionPKim more eager for a diagnosis than a fix, necessarily
21:29:24OrionPKi love that the index links to the source now, thats pretty helpful
21:35:21dom96OrionPK: Add 'echo(result.toStrLit)' under line 24.
21:35:38dom96Interesting issue.
21:38:44OrionPKlol
21:38:46OrionPKthat is interesting..
21:40:20*bjz quit (Ping timeout: 255 seconds)
21:40:25*Varriount joined #nimrod
21:40:49OrionPKwhat do those two procedures have to do with each other
21:40:52OrionPKthats bizarre
21:42:08OrionPKdom96 check it out when you change if to when on line 8
21:43:06OrionPKan error w/ the vm?
21:44:24dom96very strange
21:58:53*uvelichitel quit (Quit: Textual IRC Client: www.textualapp.com)
22:01:36*Jesin quit (Quit: Leaving)
22:05:10dom96Araq: What's the best way to pass a ref to a C callback which has a pointer data param?
22:05:38AraqGC_ref() and GC_unref() the 'ref' and then you can simply 'cast' it
22:06:28*Kyzsloth joined #nimrod
22:07:15dom96alright
22:07:54Araqhi Kyzsloth welcome
22:11:46*Kyzsloth left #nimrod ("Leaving")
22:19:06*Demos joined #nimrod
22:19:23*Jesin joined #nimrod
22:23:19*Matthias247 quit (Read error: Connection reset by peer)
22:34:06Demoshey Araq: I just wrote a test for partial ordering of templates w.r.t. overload resolution, and it seems that we do it
22:34:30Araqyes we do it.
22:34:43Araqbut look at how we do it :P
22:35:17Araqjust to be clear here: rewriting sigmatch.nim takes 2 months at least.
22:35:39Araqit's not trivial and you have to support quite some special cases
22:35:58Araqplus it shouldn't break code that's out there :P
22:38:42Demoswe have a 200+ line function, I see it.
22:43:32Demosfrom the looks of it the stuff for constructs such as A and B or A|B was written before user defined typeclasses
22:44:12*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
22:57:20*askatasuna quit (Quit: WeeChat 0.4.3)
23:17:18*njoejoe quit (Quit: Page closed)
23:19:53VarriountAraq: The new_comment_handling branch is for removing regular comments from the ast, correct?
23:26:56*darkf joined #nimrod