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:45 | OrionPK | dom96 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:02 | flaviu | lexer.nim:605 seems to have its own version of hashIgnoreStyle that is subtly different, I think its a bug |
02:36:03 | flaviu | Also, 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:26 | Araq | hi donydh welcome |
03:46:19 | donydh | hello |
03:55:33 | Skrylar | ok, 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:02 | fowl | Araq, is this a known issue? (codegen error if i dont recapture open/close) https://gist.github.com/fowlmouth/dac6a78bc816ada5dc6b |
05:50:12 | Araq | yes |
05:50:20 | Araq | known issue |
05:51:18 | fowl | ok |
05:56:36 | fowl | now this is saxy https://gist.github.com/fowlmouth/11284189#file-parsetron-nim-L203 |
06:24:37 | Araq | indeed |
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:28 | Skrylar | :/ |
07:59:43 | Skrylar | meh. 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:15 | milosn | hmm when proc has this signature: |
08:20:17 | milosn | iterator fastRows(db: TDbConn; query: TSqlQuery; args: varargs[string, `$`]): TRow |
08:20:26 | milosn | whats args there? |
08:20:36 | milosn | what do i need to supply? :) |
08:20:47 | milosn | sorry for the noob question, just started poking around |
08:20:49 | milosn | :) |
08:21:34 | milosn | i assume that array/hash of bindings for SQL query i am executing |
08:21:50 | milosn | but i have/need none, so what should i supply there? |
08:22:45 | runvnc | milosn: http://nimrod-lang.org/manual.html#varargs |
08:22:51 | runvnc | see the second example |
08:24:25 | milosn | cool thanks, problem is i have none varargs |
08:24:41 | milosn | and just doing: |
08:24:41 | milosn | for row in sqlite.fastRows(conn, sql): |
08:24:50 | milosn | gives me compilation error |
08:25:40 | milosn | maybe its because 'sql' is string ... hmmm |
08:25:45 | milosn | but dont think so |
08:27:10 | runvnc | what is the exact error message |
08:27:40 | milosn | hmm noone around i can spam here :) |
08:27:41 | milosn | genzone_la.nim(29, 26) Error: type mismatch: got (TDbConn, string) |
08:27:41 | milosn | but expected one of: |
08:27:42 | milosn | db_sqlite.fastRows(db: TDbConn, query: TSqlQuery, args: varargs[string]): iter[TRow] |
08:28:13 | runvnc | maybe you need to include an arg then |
08:28:18 | runvnc | tsqlquery is string? |
08:28:44 | milosn | TSqlQuery = distinct string |
08:28:47 | milosn | yes i think so |
08:29:00 | runvnc | maybe you need it to be something like select * from mytable where name='?' or something and then your varargs is thename |
08:29:31 | milosn | ive tried doing this: |
08:29:43 | milosn | for row in sqlite.fastRows(conn, sql, ""): |
08:29:51 | milosn | dont work either :D |
08:29:56 | runvnc | put a question mark like I said |
08:29:58 | runvnc | and a real arg |
08:30:01 | runvnc | see if that works |
08:30:32 | runvnc | https://github.com/nimrod-code/nimforum/blob/master/forum.nim |
08:30:37 | runvnc | see on line 411 |
08:30:40 | runvnc | they are using fastrows |
08:30:52 | runvnc | maybe you have to have an arg like that |
08:32:13 | milosn | puting sql"<my_query>" worked |
08:32:18 | Araq | a TSqlQuery is a *distinct* string to prevent SQL injections |
08:32:21 | milosn | and i can have empty varargs |
08:32:25 | Araq | yep. |
08:32:28 | Araq | that's it. |
08:32:40 | milosn | cool let me if it works and prints the rows |
08:32:41 | milosn | :D |
08:33:21 | milosn | yup it sure does, excellent |
08:43:03 | Araq | milosn: please provide PRs to the module's documentation if it's not sufficient |
08:44:29 | milosn | Araq: its not that, i am sure its sufficient enough to anyone that has dealt with languages like nimrod before |
08:45:08 | milosn | ive poked a bit with scala, and always found "method signatures" doc frightening ... just gotta learn how to read it :) |
08:45:28 | Araq | no, the module needs examples at the top level |
08:45:39 | Araq | every module should have that really |
08:45:45 | milosn | ah ok |
08:46:18 | milosn | do you have web interface for problem reports? |
08:46:26 | milosn | bug tracker? |
08:46:37 | Araq | we use github's bug tracker |
08:46:44 | milosn | ok, ill have a look |
08:47:15 | milosn | i opened git account at one point in time so it should be there someplace, but i mainly use bitbucket myself |
08:48:05 | milosn | i have this DNS zone compiler i wrote in chicken scheme, few years back |
08:48:39 | milosn | i want to rewrite it in nimrod, since noone else can tweak scheme at work ... maybe with nimrod they can contribute something |
08:48:42 | milosn | :) |
08:49:58 | * | nande quit (Remote host closed the connection) |
08:54:03 | * | nande joined #nimrod |
08:58:26 | zahary | hi guys, I'm back from the dead |
08:58:50 | Araq | nice |
08:59:14 | zahary | sorry for not being around for the release, I imagine that gave you some hard time |
08:59:29 | Araq | we simply declared it a "beta" |
08:59:34 | Araq | ;-) |
08:59:44 | zahary | I noticed :) |
09:00:17 | Araq | most annoying is that async still crashes with markAndSweep and leaks with the default GC |
09:01:14 | zahary | is it clear which objects leak? |
09:01:49 | Araq | no but I didn't really look into that, tried to fix the markAndSweep instead |
09:02:17 | Araq | I think dom96's low level stuff corrupts something |
09:02:30 | Araq | and we're lucky with the default gc to not notice it |
09:03:51 | zahary | I had markAndSweep enabled for a while and there were some test cases that were working differently I think |
09:04:05 | milosn | what is the default hash/dictionary structure in Nimrod? |
09:04:21 | zahary | so maybe there is still some problem lurking in there |
09:04:44 | zahary | milosn: TTable from tables |
09:05:08 | * | Matthias247 joined #nimrod |
09:06:11 | Araq | yeah 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:18 | Araq | *assumed |
09:07:17 | Araq | well the crashes disappear when use -d:useGcAssert and -d:useSysAssert so ... that indicates it's not a GC nor a codegen bug |
09:07:58 | Araq | maybe we should forbid dom96 to use copyMem :P |
09:18:52 | zahary | we had problems with valgrind, right? I haven't tried yet this new valgrind alternative that is getting some hype: |
09:18:52 | zahary | https://code.google.com/p/address-sanitizer/ |
09:19:57 | Araq | we only need to figure out how to tell valgrind that the gc is allowed to scan the stack conservatively |
09:20:16 | Araq | other GCs/runtimes have the same problem |
09:28:48 | Araq | but I can't test it on linux anyway |
09:29:05 | Araq | my linux is broken for quite some time now and I never find the time to fix it |
09:29:40 | Araq | and 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:08 | runvnc | araq last time I had a problem with linux I just put linux mint on a usb and started from scratch |
09:32:26 | runvnc | which distro are you using |
09:32:37 | Araq | linux mint debian edition |
09:32:57 | dom96 | Araq: So you don't even know what's wrong with my code and yet you want to forbid me to use copyMem? |
09:33:23 | Araq | dom96: I wasn't serious but you know that |
09:33:42 | runvnc | araq what version are you on |
09:33:42 | dom96 | yes :P |
09:33:45 | runvnc | of mint |
09:33:56 | dom96 | Araq: What do you think about dependent types? |
09:34:29 | dom96 | zahary: how long will you be alive for? :P |
09:34:50 | Araq | I 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:16 | dom96 | have you seen the video I posted? |
09:35:25 | dom96 | I decided to try implementing the same using macros |
09:35:38 | dom96 | seemed simple enough |
09:35:42 | Araq | not really but fyi we have a type safe printf in the manual |
09:36:38 | dom96 | That's a much better implementation than mine lol |
09:38:18 | dom96 | I asked in #idris what advantages dependent types have to macros |
09:38:27 | dom96 | and they didn't really come up with anything big |
09:40:38 | dom96 | and yet they still have 70 more users than us in IRC |
09:46:20 | Araq | yeah but that's because Nimrod is inherently inferior to Rust and a stillborn. |
09:47:57 | Araq | and there is only enough room for 1 systems programming language in the universe |
09:48:17 | dom96 | What is 'formatChars' in the safe printf example? |
09:48:42 | Araq | never mind that we are safer than Rust for quite some use cases already afaict |
09:58:11 | dom96 | why does this have a '[]'? http://build.nimrod-lang.org/docs/macros.html#typ,PNimrodNode |
09:59:47 | dom96 | come on, no `==` for typedesc? |
10:04:20 | * | [1]Endy joined #nimrod |
10:20:03 | Skrylar | rust isn't a system programming language, its a masochism training program |
10:20:06 | Skrylar | :P |
10:20:51 | Skrylar | speaking 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:54 | bbodi | "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:34 | Araq | no I'm saying Uncle Bob has no clue about formal semantics |
11:01:56 | Araq | and every example in his book is an anti pattern |
11:02:26 | bbodi | He has to work with a language wich is an antipattern itself. |
11:02:43 | Araq | he choose to work in it |
11:04:34 | Araq | the compiler is mostly clean structured btw as soon as you can accept we like abbrevs |
11:04:51 | bbodi | There 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:09 | Araq | every example of bad code in his book is immediately understandable to me |
11:08:31 | Araq | and every example of good code in his book is garbage. |
11:09:06 | Araq | he moves things from the stack to the heap (aka more complex lifetimes) |
11:09:18 | Araq | he uses lots of indirections (aka more complex control flow) |
11:09:33 | runvnc | sorry who is uncle bob |
11:10:20 | bbodi | I 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:04 | Araq | and yet he advocates a style of programming which pretends we have no type checkers |
11:13:21 | Araq | or debuggers |
11:13:54 | Araq | and all his examples are simplistic anyway |
11:14:20 | Araq | the real complexity comes from the problem domain and all you can do is push it around |
11:15:07 | Araq | well ofc when one develops simple web apps with PHP, the complexity comes from the broken tools |
11:15:39 | Araq | but a compiler != business logic + web app |
11:18:31 | bbodi | btw, 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:53 | Araq | I can use gdb perfectly fine with nimrod |
11:18:59 | bbodi | A compiler has some business logic too which is evolves with time |
11:19:07 | Skrylar | isn't there a built-in debugger, or supposed to be |
11:19:17 | Araq | --lineDir:on --debuginfo does the trick |
11:19:30 | bbodi | then sorry, i didnt try gdb, I try it with the Nimrod debugger (endb or what) |
11:19:38 | Araq | --debugger:on enables the built-in debugger but yeah |
11:19:44 | Araq | that's broken |
11:19:45 | * | Skrylar has insofar only used debugEcho's around problem areas while unit testing ._. |
11:24:11 | Araq | so 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:53 | foodoo | the dynamic typing crowd says "quack" ;) |
11:25:11 | bbodi | dynamic typing is very dangerous and it has its own place, I dont like it anyway :) |
11:25:33 | Araq | and 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:44 | Araq | oh and just to be clear: adding unit tests to the compiler is perfectly fine with me |
11:30:30 | Araq | what is not fine is "omg skProc is ugly, make that SymbolKind.Proc everywhere" in 70_000+ lines of code |
11:32:08 | Araq | and the long procs are all because they use nimrod's poor man's approach to pattern matching (case) rather than dynamic binding. |
11:34:22 | Araq | which 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:45 | bbodi | I 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:36 | Araq | well enough talking |
11:42:46 | Araq | edit a single module to your liking, make a PR |
11:42:54 | Araq | and then we can discuss this PR |
11:42:59 | Araq | or I apply it ;-) |
11:43:14 | bbodi | you are right :) |
11:44:55 | bbodi | I 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:00 | Araq | bbodi: that's stdlib code though. your PR looks fine |
11:57:24 | Araq | but the stdlib is mostly dom96's business :P |
11:57:39 | bbodi | ok 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:08 | EXetoC | dom96: == for typedesc? why not 'is'? |
12:53:29 | milosn | whats the easiest way to drop last element of the sequence? |
12:53:30 | milosn | :) |
12:53:50 | milosn | another stupid question, i cant find the docs for seq type |
12:54:18 | milosn | hmmm |
12:56:41 | * | foodoo quit (Remote host closed the connection) |
12:57:34 | Araq | discard s.pop() |
12:57:43 | Araq | s.setLen(s.len-1) |
12:57:59 | Araq | the latter is more efficient |
13:13:16 | milosn | thanks |
13:13:21 | milosn | pop() 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:02 | Araq | so zahary ... what branching model do you think we should use? |
15:58:12 | zahary | I 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:11 | bbodi | Araq: you said that the endb debugger is brroken. What's wrong with that? Are there any issue for that problem? |
16:00:17 | zahary | in general, I agree with your previous statement that we should strive to keep the test suite green and release more often |
16:00:51 | Araq | well my question is about the master vs devel split and what to do with bugfixes |
16:05:10 | Araq | if you think anything is wrong with cherry picking them into master (my preferred way) |
16:05:12 | * | untitaker joined #nimrod |
16:06:22 | zahary | if 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:33 | Araq | well but that is Varriount's problem. :-) |
16:09:03 | Araq | but seriously, let's try it and Varriount shall complain as soon as it's becoming too hard |
16:09:16 | zahary | sure |
16:09:54 | Araq | for many things I do I can easily tell if it's a bugfix or whether it breaks code |
16:12:36 | Araq | bbodi: you tell me, all I know is that people say it's broken. I use it for its watchpoint support |
16:13:01 | Araq | usually I need to patch it to hunt down a particular bug |
16:16:26 | Araq | but still it's really good for that, especially since watchpoints are broken in every other debugger that I've tried |
16:17:27 | EXetoC | #1148 has some info regarding the debugger bug (else without if) |
16:18:39 | EXetoC | bbodi: 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:09 | bbodi | thanks guys, I try to investigate it |
16:23:42 | OrionPK | dom96 but that link has all the documentation :'( |
16:24:39 | EXetoC | I don't know my way around the compiler so it seemed pretty difficult to figure stuff out without stepping through the source. |
16:25:24 | EXetoC | Araq: speaking of which, how limited are the eval expressions? does 'echo renderTree(n)' and 'debug n' work? |
16:29:00 | EXetoC | I don't know if echo is necessary |
16:29:23 | Araq | you mean in ENDB? there is no renderTree nor debug |
16:32:00 | EXetoC | right |
16:40:57 | bbodi | http://nimrod-lang.org/endb.html is outdated. callstack command now is "bt" or "backtrace" |
16:42:27 | bbodi | to tell the truth, this debugger is awesome |
16:44:37 | dom96 | OrionPK: Your readme links to it anyway |
16:45:07 | * | Skrylar quit (Ping timeout: 252 seconds) |
16:45:35 | OrionPK | ok |
16:46:59 | OrionPK | dom96 updated it |
16:47:10 | * | PortableEXetoC joined #nimrod |
16:49:05 | NimBot | nimrod-code/packages master 000c1e8 onionhammer [+0 ±1 -0]: Added shoco string compression |
16:49:05 | NimBot | nimrod-code/packages master 430f9b9 onionhammer [+0 ±1 -0]: Updated url |
16:49:05 | NimBot | nimrod-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:38 | Araq | bbodi: glad you like it, I sto |
16:59:50 | Araq | le 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:58 | dom96 | hi recodr |
17:24:12 | recodr | hi |
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:37 | reactormonk | recodr, 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:21 | enurlyx | Hello, i have a 64bit installation of nimrod and MinGw-64 on windows. |
18:05:48 | enurlyx | How 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:23 | Demos | Araq, did you know that c# allows the debugger to trigger side-effects in the program! Makes a good case for {.noSideEffect.} |
18:27:16 | reactormonk | enurlyx, I assume you need a cross-compiler |
18:28:37 | seertaak | hi all, looking for way to do simple FFI, using as an example strlen C-func. |
18:28:43 | seertaak | proc strlen(formatstr: cstring):int {.importc: "printf".} |
18:28:52 | seertaak | echo(strlen("MP")) |
18:29:26 | dom96 | enurlyx: You need a 32bit gcc I think. |
18:29:36 | Demos | seertaak, that is not going to call strlen :D |
18:29:45 | dom96 | enurlyx: You can then set its path in nimrod's config file. |
18:29:56 | seertaak | oh oops |
18:30:16 | seertaak | how silly of me!!! |
18:31:39 | reactormonk | seertaak, ^^ |
18:32:26 | seertaak | ok how about this: proc printf(formatstr: cstring) {.importc: "printf", varargs.} ? |
18:32:36 | seertaak | then: printf("Hello, %s", "World") |
18:32:41 | seertaak | doesn't seem to work... |
18:32:51 | seertaak | (was what I was originally trying to do ;) |
18:33:40 | seertaak | oh... actually it is working! |
18:33:51 | seertaak | sorry everyone for silly questions!!! |
18:34:38 | enurlyx | ok, thanks. i will try it. |
18:37:33 | reactormonk | seertaak, I assume you forgot your varargs[expr] |
18:40:09 | seertaak | reactormonk, actually I think the mistake was attempting to do it from the repl |
18:40:21 | reactormonk | seertaak, the repl isn't all that powerful |
18:40:31 | Demos | seertaak yeah, the repl does not support FFI, and it somewhat buggy in any case |
18:40:34 | seertaak | doesn't seem to work, then I changed, in vain, a couple of the pragma incantations |
18:40:41 | seertaak | when actually i should have just compiled ;) |
18:40:55 | seertaak | ok no big deal |
18:52:20 | reactormonk | seertaak, whatcha tinkering on? |
18:53:23 | seertaak | I'm trying to do something similar to objcbridge, but doing it myself to learn nimrod and its ffi a bit |
18:53:47 | seertaak | i.e. setting up an obj-c object (or at least call one) from nimrod |
18:54:08 | seertaak | eventually use macros to make it easy to set up an obj-c object from nimrod |
18:54:24 | seertaak | with an eventual goal of using cocoa classes like nsview, nswindow etc. |
18:56:24 | superfunc | dom96: babel has been working great for me, just wanted to say thanks for the hard work |
18:56:40 | dom96 | superfunc: That's nice to hear, thanks :) |
19:00:48 | EXetoC | dom96: are you going to implement a better formatting interface? in addition to just showing off :> |
19:03:19 | EXetoC | I can have a look at it if you don't have time |
19:05:01 | renesac | I 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:38 | Araq | Demos: yes. indeed I do know. |
19:30:46 | dom96 | EXetoC: 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:28 | Araq | hi seertaak welcome |
19:31:37 | Araq | same to you, recodr |
19:33:00 | * | dom96 would really love to see a "Nimrod by example" |
19:43:28 | EXetoC | dom96: I asked "why not 'is?'" before. why can't you use that? |
19:43:51 | dom96 | I don't think it works for typedesc either |
19:45:11 | EXetoC | it does in some cases at least |
19:45:29 | * | askatasuna joined #nimrod |
19:47:17 | seertaak | Hi Araq! very impressed with nimrod, giving it a little spin right now :) |
19:47:18 | EXetoC | and printf is a start but that should just be a convenience wrapper of course |
19:47:21 | EXetoC | hm, echof? |
19:47:47 | renesac | dom96, https://gist.github.com/ReneSac/b57811eb4ae8ab39bed1 |
19:48:19 | renesac | for some reason an element from varargs[int] is not "int" |
19:48:36 | renesac | I don't know what it is because I can't print typedescs... |
19:48:51 | dom96 | try echo(type.name) |
19:48:59 | dom96 | and import typetraits |
19:49:36 | EXetoC | but doesn't it tell you in the error message? echo(T) |
19:51:05 | * | njoejoe joined #nimrod |
19:51:06 | renesac | I'm getting a SIGSEGV: Illegal storage access. (Attempt to read from nil?) |
19:51:11 | renesac | from the compiler |
19:52:29 | dom96 | hey njoejoe |
19:52:37 | Araq | renesac: report it |
19:54:06 | renesac | it was wrong code, now it compiles |
19:54:11 | renesac | I can report anyay |
19:54:18 | renesac | https://gist.github.com/ReneSac/b57811eb4ae8ab39bed1 <-- new code |
19:54:21 | Araq | a crash is a crash |
19:54:26 | renesac | Expected Int got int |
19:54:26 | renesac | 1 |
19:55:05 | dom96 | so `is` is broken? |
19:55:15 | renesac | it seems |
19:55:24 | Araq | not suprising though |
19:55:32 | dom96 | is it the same for varargs[expr]? |
19:55:34 | Araq | 'is' is harder than it looks |
19:56:50 | Demos | the 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:17 | Araq | no, 'is' is somewhere else |
19:58:12 | * | Matthias247 joined #nimrod |
19:58:20 | renesac | with varargs[expr] I get: |
19:58:20 | renesac | Error: internal error: getTypeDescAux(tyExpr) |
19:58:21 | renesac | No stack traceback available |
19:58:32 | renesac | three bugs to report? |
19:58:46 | Araq | the last one is old |
19:59:08 | * | Matthias247 quit (Read error: Connection reset by peer) |
19:59:20 | renesac | already on github? |
19:59:29 | Araq | who knows |
19:59:39 | renesac | I would hope you would |
19:59:40 | renesac | :P |
20:00:17 | njoejoe | hey 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:28 | EXetoC | I see some discussions for that particular error message but I guess no one bothered to report it |
20:00:48 | dom96 | njoejoe: Can you gist your full code? |
20:00:49 | * | Matthias247 quit (Read error: Connection reset by peer) |
20:01:08 | Araq | njoejoe: use #!strongSpaces as first line for your code |
20:01:18 | EXetoC | there's one for getTypeDescAux(tyGenericInvokation) |
20:01:36 | dom96 | or what Araq said |
20:02:03 | * | Matthias247 joined #nimrod |
20:02:05 | renesac | $(fib(40)) will probably work too |
20:02:27 | renesac | (that is what #!strongSpaces does, I think) |
20:02:36 | Araq | $fib(40) DOES work, but not within 'echo' |
20:02:54 | Araq | because it is parsed as (echo) $ (fib(40)) |
20:03:14 | Araq | known gotcha, fixed with #!strongSpaces |
20:03:49 | renesac | is that because echo is a macro or something? |
20:04:09 | dom96 | If njoejoe is using 'echo' then there is no need for `$`. |
20:04:09 | njoejoe | dom96: https://gist.github.com/jots/11329556 (using your jester) |
20:04:27 | Araq | no it's because that's how precedence is handled, renesac |
20:04:50 | Araq | a + b # same as a +b |
20:05:00 | Araq | in the old parser |
20:05:21 | Demos | one 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:31 | dom96 | njoejoe: In that case you can either use strongSpaces, use 'resp($fib(40))' or use resp $(fib(40)) |
20:05:40 | Demos | at least that is what I recall |
20:05:42 | njoejoe | oh! it works with the strongspaces. I will have to read about that! thanks :-) |
20:07:52 | Araq | maybe strongSpaces should be the default? |
20:08:06 | Araq | still too early to tell, I think |
20:08:06 | dom96 | not yet |
20:08:22 | dom96 | I still haven't tested it yet :P |
20:09:11 | recodr | I am a newbie, how to read an integer value to a variable? |
20:10:44 | dom96 | http://build.nimrod-lang.org/docs/strutils.html#parseInt,string |
20:12:08 | njoejoe | dom96: 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:08 | recodr | oh thanks, dom96 |
20:14:19 | dom96 | njoejoe: 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:23 | njoejoe | dom96: 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:28 | dom96 | njoejoe: You could also use the http server module manually depending on your needs. |
20:18:40 | dom96 | For now at least, or help me with Jester |
20:20:43 | * | xenagi joined #nimrod |
20:22:10 | fowl | i need a name for this parsing dsl |
20:22:37 | dom96 | perseus |
20:23:13 | EXetoC | nimparsebbq |
20:24:31 | renesac | Araq, that 'is' bug was not a bug at all |
20:24:47 | renesac | the logic was simply wrong, I should have used 'isnot' |
20:24:54 | Araq | XD |
20:25:08 | renesac | ^^" |
20:25:11 | Araq | happens surprisingly often, even to the best of us |
20:25:25 | * | Araq gets it wrong all the time too |
20:25:29 | renesac | that is why creating a minimal working example is so important |
20:25:37 | njoejoe | btw, 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:48 | renesac | you end up catching your mistakes |
20:26:03 | renesac | well, the other two are still a bug though |
20:29:04 | dom96 | njoejoe: No, it's not. Likely an uncaught 'connection reset by peer' exception. |
20:31:19 | EXetoC | exception? I don't know if that's a good idea |
20:32:56 | dom96 | EXetoC: 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:39 | njoejoe | dom96 so does runForever need try poll; except continue or some such? |
20:53:11 | dom96 | njoejoe: 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:39 | fowl | ahaha |
20:55:46 | EXetoC | dom96: some flag that turns it off maybe |
20:55:48 | fowl | converter toPtrPtr* [T,IDX] (some: ptr array[idx,ptr T]): ptr ptr T = |
20:55:48 | fowl | cast[ptr ptr T](some) |
20:56:06 | fowl | for c array/ptr compatibility>_> |
20:56:48 | EXetoC | but then you need to be able to catch it using a returned value or something |
20:56:51 | njoejoe | ah. i tried to add a try block in processClient, but it didn't like it. "yield cannot be used within try" |
20:58:41 | dom96 | njoejoe: yeah, something like this should work: https://gist.github.com/dom96/6fe8c0675eb6f9e90509 |
20:58:48 | dom96 | (I haven't tested it at all) |
21:01:18 | Araq | fowl: we have .unchecked for pointer like arrays now |
21:01:48 | dom96 | njoejoe: Also may need a safeSend |
21:02:45 | EXetoC | dom96: won't this do for identity checking in your case "int is char"? |
21:02:47 | reactormonk | Araq, how to use them? |
21:03:09 | dom96 | EXetoC: I don't follow |
21:05:01 | EXetoC | dom96: you said you couldn't use 'is' with typedesc |
21:05:40 | renesac | Araq, {.unchecked.} implements the semantics of flexible array members? |
21:05:42 | dom96 | EXetoC: yeah? |
21:06:10 | renesac | so in the example on the manual, you would alloc space for the MySeq struct? |
21:07:35 | EXetoC | dom96: yes, and you use "T is U" for typedesc equality checking |
21:08:13 | dom96 | EXetoC: right |
21:08:50 | EXetoC | so what would `==` do? the same thing I imagine |
21:09:24 | dom96 | When I tried `is` it wasn't working for typedescs |
21:10:06 | dom96 | I 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:17 | renesac | EXetoC, well, 'int is TInteger" makes more sense than "int == TInteger" |
21:10:57 | renesac | TInteger being a typeclass with more than just int |
21:11:16 | renesac | dom96, gist your try |
21:11:18 | * | seertaak quit (Ping timeout: 240 seconds) |
21:11:23 | EXetoC | yeah but either 'is' is broken in this case or it's that varargs parameter |
21:11:28 | * | bjz joined #nimrod |
21:11:53 | renesac | for me it aways worked (except for the vararg[expr] that I just filled a bug) |
21:11:55 | dom96 | renesac: https://github.com/Araq/Nimrod/issues/1152 |
21:12:32 | renesac | hum |
21:12:42 | renesac | I aways used it on the output of '.type' |
21:12:49 | renesac | and that output can't be assigned to a variable |
21:12:53 | renesac | last time I tried |
21:13:14 | dom96 | yeah, that probably shouldn't work. |
21:13:35 | dom96 | but remove the `.typedesc` |
21:13:52 | renesac | I think it should |
21:13:52 | dom96 | and then s/!=/isnot/ and it doesn't work IIRC |
21:13:54 | renesac | :p |
21:14:17 | dom96 | Is a type implicitly a typedesc? |
21:14:26 | * | nande joined #nimrod |
21:16:31 | fowl | dom96, yea |
21:17:13 | renesac | dom96, using types directly on the 'is' worked |
21:17:33 | renesac | now I get this error: |
21:17:33 | renesac | /home/rene/projetos/Nimrod/lib/core/macros.nim(206, 21) Error: undeclared identifier: 'cprintf' |
21:17:35 | renesac | normal? |
21:18:37 | dom96 | Oh cool. Change 'cprintf' to 'printf' in the source. |
21:18:48 | dom96 | (or the proc name to cprintf) |
21:20:15 | renesac | returning with most of your code, now I get: |
21:20:16 | renesac | /tmp/aporia/a7.nim(30, 29) Error: internal error: cannot generate VM code for type args[i] |
21:20:26 | renesac | var actualType = args[i].type <-- the line |
21:21:14 | Araq | yeah. I've looked at this bug. |
21:21:25 | Araq | but I have no idea what the VM needs to do for this case :P |
21:22:00 | renesac | replacing the 'args[i].type' for the type name works |
21:24:17 | * | [2]Endy quit (Ping timeout: 264 seconds) |
21:25:01 | dom96 | do we have any string matching algorithms? |
21:26:21 | Araq | pegs, regexes |
21:26:30 | Araq | editDistance |
21:27:38 | dom96 | editDistance is exactly what I want I think |
21:27:57 | OrionPK | araq had any time to look at 1140? |
21:28:14 | Araq | OrionPK: sorry not yet |
21:28:31 | EXetoC | Araq: watcha working on? |
21:28:34 | OrionPK | np |
21:28:58 | OrionPK | im more eager for a diagnosis than a fix, necessarily |
21:29:24 | OrionPK | i love that the index links to the source now, thats pretty helpful |
21:35:21 | dom96 | OrionPK: Add 'echo(result.toStrLit)' under line 24. |
21:35:38 | dom96 | Interesting issue. |
21:38:44 | OrionPK | lol |
21:38:46 | OrionPK | that is interesting.. |
21:40:20 | * | bjz quit (Ping timeout: 255 seconds) |
21:40:25 | * | Varriount joined #nimrod |
21:40:49 | OrionPK | what do those two procedures have to do with each other |
21:40:52 | OrionPK | thats bizarre |
21:42:08 | OrionPK | dom96 check it out when you change if to when on line 8 |
21:43:06 | OrionPK | an error w/ the vm? |
21:44:24 | dom96 | very strange |
21:58:53 | * | uvelichitel quit (Quit: Textual IRC Client: www.textualapp.com) |
22:01:36 | * | Jesin quit (Quit: Leaving) |
22:05:10 | dom96 | Araq: What's the best way to pass a ref to a C callback which has a pointer data param? |
22:05:38 | Araq | GC_ref() and GC_unref() the 'ref' and then you can simply 'cast' it |
22:06:28 | * | Kyzsloth joined #nimrod |
22:07:15 | dom96 | alright |
22:07:54 | Araq | hi 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:06 | Demos | hey 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:30 | Araq | yes we do it. |
22:34:43 | Araq | but look at how we do it :P |
22:35:17 | Araq | just to be clear here: rewriting sigmatch.nim takes 2 months at least. |
22:35:39 | Araq | it's not trivial and you have to support quite some special cases |
22:35:58 | Araq | plus it shouldn't break code that's out there :P |
22:38:42 | Demos | we have a 200+ line function, I see it. |
22:43:32 | Demos | from 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:53 | Varriount | Araq: The new_comment_handling branch is for removing regular comments from the ast, correct? |
23:26:56 | * | darkf joined #nimrod |