<< 04-05-2014 >>

00:00:07EXetoCI don't know what you mean by correct. is it an AST pattern that doesn't have a source code equivalent?
00:01:03dom96ok, let's say I have an AST which is basically nnkCall("echo", nnkIdent("foobar"))
00:01:13dom96That's the equivalent to: echo foobar
00:01:17dom96well
00:01:20dom96echo(foobar)
00:01:37dom96And that code will cause a compile-time error because foobar is not defined
00:01:47dom96You can generate an incorrect AST
00:02:01dom96One which cannot be compiled.
00:02:21EXetoCI know that but it was discard as a block
00:02:28dom96I'm using the word 'compiles' incorrectly above I think.
00:02:33dom96I should be saying transforms.
00:02:50dom96The macro transforms an AST (which is also incorrect, because 'await' is not defined)
00:03:16dom96Well, you said that they both compile.
00:03:24dom96And then you said that they don't if you put it in a module
00:03:41dom96I'm not entirely sure what you meant by that
00:04:05dom96I assumed that you thought that because echo result.toStrLit() worked that the code was compiled successfully.
00:04:20dom96But that's not the case.
00:04:55EXetoCdiscard \n [indent] 1\n2\n3
00:05:08EXetoCtoStrLit(result) might not compiled but it did output such patterns
00:05:28dom96Yes. toStrLit can return invalid Nimrod code.
00:08:13EXetoCmaybe it's just constructed in a weird way, but that doesn't matter in the end
00:08:39Skrylarhumm
00:08:47Skrylardealing with jmp_buf is going to be interesting
00:08:47EXetoCnnkDiscardStmt with several nodes
00:11:32*noam__ joined #nimrod
00:12:08Araqgood night
00:12:13Skrylargood night Araq
00:15:19*noam_ quit (Ping timeout: 276 seconds)
00:20:48dom96same here
00:20:50dom96'night
01:14:12milosnhmmm
01:14:47milosnhow should i prefix SQL strings with db_mysql? with db_sqlite its sql"SELECT ...;"
01:14:58milosnit dont work with db_mysql
01:14:59milosn:)
01:16:43fowlmilosn, copy the sql func to db_mysql, looks like it was left out lol
01:20:58milosnhmmm
01:21:14milosnso much about tested code :P
01:27:23VarriountMeep
01:31:40reactormonkmilosn, looks like no one likes mysql
01:43:27milosnummm i used to dislike mysql ... than we had a requirement at work to scale to multi-master-cluster
01:43:57milosngalera+mysql is the only open source solution that can do it and its been relatively proven in real world scenarios
01:44:25milosnor should i say ... galera+mariadb
01:45:19milosnit breaks almost every 2nd week, and our DB admin gets SMS at 3AM ... but oh well, at least he is sure about his job
01:45:22milosn:D
01:46:37milosnfowl: ive added it, works fine now
01:46:40milosnthanks
01:47:54fowlmilosn, do a PR too
01:51:11milosnhttps://github.com/Araq/Nimrod/issues/1176
01:51:17milosnthere you go, have fun :)
01:51:34*Demos_ joined #nimrod
01:53:12milosnfowl: while you are there ... can nimrod do python style getattr() and setattr() on objects?
01:53:31milosni presume not, but dont hurt to ask
01:54:23fowlno
01:54:39*Demos quit (Ping timeout: 245 seconds)
02:07:58reactormonkmilosn, what do you intend to do with it?
02:08:31Varriountmilosn: You could probably do something with a macro.
02:09:00VarriountIf you want python-like properties, nimrod has those though.
02:24:06njoejoei really wish echo 14.123 would echo just that instead of scientific notation. I see formatFloat, but how do I figure out what precision to use? i want the same precision as number of numbers to the right of the decimal place.
02:26:29Varriountnjoejoe: I think there's a PR that aims to fix that.
02:26:57VarriountIt may or may have not been merged recently.
02:29:50reactormonknjoejoe, https://github.com/Araq/Nimrod/pull/1130
02:31:09reactormonkVarriount, can you test the PR and see if it doesn't break anything too big?
02:31:51NimBotAraq/Nimrod float_ bebdeb2 Simon Hafner [+2 ±16 -0]: Merge branch 'devel' into float_$
02:31:51NimBotAraq/Nimrod float_ 634852e Simon Hafner [+0 ±2 -0]: Merge branch 'float_$' into devel
02:31:58Varriount-_-
02:32:24NimBotAraq/Nimrod float_ bebdeb2 Simon Hafner [+2 ±16 -0]: Merge branch 'devel' into float_$
02:32:24NimBotAraq/Nimrod float_ 634852e Simon Hafner [+0 ±2 -0]: Merge branch 'float_$' into devel
02:32:29reactormonkah whatever
02:32:51VarriountNow nimbot will do the work for us, and we can compare test results.
02:32:58reactormonkexactly
02:33:09reactormonkI wanted to push it as float_$_test
02:33:23Varriount(Though, one day Nimbot should test PR's like the fancy BuildBot software does)
02:33:59reactormonkyeah, how do you connect them?
02:34:20VarriountConnect what? The PR's?
02:35:07njoejoethis is all greek to me
02:35:31Varriountnjoejoe: PR = Pull Request
02:36:09VarriountWe have build bots that run tests when things are committed to the main nimrod repository.
02:41:03njoejoeah
02:41:33Demos_speaking of, I should submit the (one line) change to turn on error printing inside typeclasses
02:42:03Demos_I dont know how araq feels about "messy" PRs though, that is ones that have a bunch of small, unrelated changes
02:42:30Skrylaris it that hard to use git to cut multiple small stuff in to a big stuff
02:42:45Skrylari've used rebase and whatnot before to cut out a sequence of changes back in to a logical order
02:42:58Skrylar(assuming people know how to do that before making requests)
02:43:07VarriountMy GUI frontend lets me select specific lines to commit.
02:43:40Demos_I know how to select stuff to commit, but I dont know how to move specific commits from one branch to another
02:44:12Demos_I am sure I could google it but I think I will wait till next week since I am on the road right now
02:44:19VarriountHow can I tell if a pointer address is on a DWORD boundary?
02:44:36VarriountEg, a 32 bit int boundary.
02:44:47Demos_mod it by 32?
02:44:58VarriountThat's what I thought.
02:53:41VarriountThis is probably another stupid question, but how does one do pointer arithmatic in Nimrod? Just cast a pointer to an int and do arithmatic that way?
02:55:19*q66 quit (Quit: Leaving)
02:55:35NimBotAraq/Nimrod float_$ 03ffc34 Grzegorz Adam Hankiewicz [+0 ±3 -0]: Version switch displays options used during `koch boot`
02:55:35NimBotAraq/Nimrod float_$ a822d0b EXetoC [+1 ±0 -0]: Add spawn test. Hangs most of the time on linux x64 at least.
02:55:35NimBotAraq/Nimrod float_$ c0338ea Varriount [+0 ±3 -0]: Merge pull request #1118 from gradha/pr_show_boot_options... 2 more lines
02:55:35NimBotAraq/Nimrod float_$ 9ea55bf Dominik Picheta [+0 ±3 -0]: Website updates.
02:55:35NimBot16 more commits.
02:56:00reactormonkVarriount, well, there's the unbounded array
02:56:11reactormonkVarriount, but if you want to do some more math, yup, cast to ptr.
02:56:38Varriountreactormonk: Eh.. Are you sure you pulled/commit things correctly?
03:01:24reactormonkVarriount, yeah, somewhat of
03:02:52Varriountreactormonk: Be sure of things before you commit to devel.
03:11:49VarriountOk, why does this always report that it isn't aligned? -> https://gist.github.com/Varriount/b35bb90a650ce03de235
03:12:24VarriountI need a dword aligned block of memory whose size can be specified at run time. >_<
03:18:30reactormonkVarriount, didn't commit stuff to devel
03:18:44reactormonk... I hope
03:19:25Varriountreactormonk: I meant that as a warning. As in, before you commit that to devel, make sure it doesn't eat babies and cause rampant destruction.
03:22:01reactormonknah, it should possess babies and make them wreck their homes
03:34:03*Demos_ quit (Ping timeout: 252 seconds)
03:39:46VarriountAnyone know if 'memove', when moving overlapping sections of memory, deallocates the non-overlapped part of the original piece of memory?
04:22:54Varriountdom96: The asyncdispatch is going to need some way to support outside extension and such. For example, it currently derefs the overlapped structure tied to a callback, regardless of whether the callback should be dereferenced.
04:40:13fowlError: internal error: (filename: compiler/sem.nim, line: 143)
04:40:14fowl:<
04:40:41*Varriount pats fowl on the back
04:52:07reactormonkfowl, what are you messing with?
04:53:32Skrylarhuh
04:53:40Skrylari imported unsigned, yet it says system./ doesn't work on uints
04:54:19VarriountHm. Should I buy a .kiwi domain name?
04:56:09fowlreactormonk, some nasty stuff. when this line is not commented it causes that error: https://gist.github.com/fowlmouth/d926a6df3036d7ea1c74#file-p3-nim-L125
05:08:12Skrylarhrm
05:13:51fowl.. i fixed it by using a template
05:28:09VarriountWhy did the template fix it?
05:50:47*DAddYE joined #nimrod
05:55:06njoejoe"commify" numbers routine: https://gist.github.com/jots/11511274 I'm sure that is not the right nimrod way of doing things, so critique welcome...
06:04:04reactormonknjoejoe, you want to format floats?
06:04:16reactormonkI think sprintf + locale does that for you
06:05:30njoejoeI did not know that, will have to look into it
06:12:27Skrylari figured out the division issue :|
06:44:01*Skrylar quit ()
06:54:10*slacko15949 joined #nimrod
07:25:53*slacko15949 quit (Ping timeout: 250 seconds)
07:26:37*slacko15949 joined #nimrod
08:00:35*Kelet quit (Ping timeout: 258 seconds)
08:03:06*Kelet joined #nimrod
08:07:03*slacko15949 quit (Quit: Leaving)
08:11:11*musicalchair quit (Ping timeout: 255 seconds)
08:12:35*musicalchair joined #nimrod
08:22:37*Puffin is now known as BitPuffin
08:28:04*wan quit (Quit: leaving)
08:37:52*Skrylar joined #nimrod
08:39:37*skyfex joined #nimrod
09:16:48*wan_ joined #nimrod
09:17:51Araqmilosn: nimrod can do getattr and setattr via its RTTI module
09:18:02Araqseems nobody knows about this ... :P
09:18:02*wan_ is now known as wan
09:22:32*Jehan_ joined #nimrod
09:23:20*wan quit (Quit: leaving)
09:25:45*wan joined #nimrod
09:44:18SkrylarI kinda want something like pivotal tracker but not webbased :(
09:52:20milosnAraq: morning
09:52:32milosncool, where is RTTI module its not in the list
09:52:33milosn?
09:53:23Skrylari think thats 'types.nim'
09:55:40Araqno
09:56:22Araqtypeinfo.nim
09:59:08Araqbbl
10:13:31*wan quit (Quit: leaving)
10:14:53*skyfex quit (Ping timeout: 250 seconds)
10:23:32*wan joined #nimrod
10:41:00Skrylaraand the hand massaging of libpng is over
10:41:04Skrylargif is next ._.
10:42:54AraqSkrylar: if it is not in babel, it doesn't exist
10:43:05Araqkeep that in mind ;-)
10:45:11Skrylarpff, these aren't bricks anyway :P
10:45:29Skrylarthe actual load/save library is what they're for
10:47:51Skrylaralso i'm somewhat deliberately uncomfortable with package management at the moment, since i haven't finalized APIs yet
10:53:53SkrylarAraq: that said we still have to do something about the skUnicode chunks
10:54:05Skrylari have notes around here somewhere i was supposed to bug you sometime about the formatting
10:54:42Araqreactormonk: JNull == JNull surely should produce 'true'. Screw "SQL logic"
10:58:03AraqSkrylar: so bug me now
11:21:16EXetoCsome logic
11:21:58dom96we're on top of HN guys
11:27:04EXetoCdom96: is a "discard block" created by accident? and then later transformed of course
11:28:48*q66 joined #nimrod
11:28:48*q66 quit (Changing host)
11:28:49*q66 joined #nimrod
11:30:31dom96EXetoC: not sure what you mean, elaborate please
11:31:43EXetoCdom96: I'm referring to what we talked about yesterday, where asyncdispatch temporarily generates a discard statement with multiple children
11:33:41dom96EXetoC: The reason you get a discard block is because if you remove the discard specific createVar then you are left with the code at the end of processBody
11:33:53dom96Which will iterate over all the children of that nnkDiscardStmt
11:34:16dom96Thus only transforming the children and resulting in a discard block
11:45:45EXetoCif simplicitly is the reason then I'd use some dummy ident node, but ok now I know
11:45:50EXetoConwards, to important stuff!
11:50:03EXetoCdo you ever use getAst? it does allow you to construct ASTs in more literal way
11:51:08EXetoCI started using it after seeing it in action in unittest.nim
11:53:48EXetoCok now I found the right HN article. I noticed that the other one was published 1219 days ago
11:53:57dom96lol
11:54:00dom96we're on reddit too
11:58:50EXetoCthat guy is right. the name will make sure that no one will ever write nimrod code for money
12:02:04Jehan_No American, you mean. :)
12:03:42Jehan_Well, Araq can always rename the language to Artemis. :)
12:05:29Jehan_Or he can claim that he just wanted to jump on the bandwagon of Git's popularity. :)
12:06:47EXetoCsomeone made a point about git in that thread
12:07:00Jehan_What thread?
12:09:02EXetoChttp://www.reddit.com/r/programming/comments/24ok6c/nimrod_for_c_programmers/
12:10:48Jehan_Ah. I don't read Reddit.
12:11:06*q66_ joined #nimrod
12:11:20*q66_ quit (Changing host)
12:11:20*q66_ joined #nimrod
12:11:27*q66 quit (Disconnected by services)
12:11:36*q66_ is now known as q66
12:12:02dom96oh look, now people are complaining about unsigned being in a seperate module
12:12:30Jehan_From the discussion yesterday, it's more that unsigned support is somewhat incomplete.
12:12:56Jehan_E.g., var x: uint; x += 1 doesn't work.
12:13:03Jehan_Even with "import unsigned"
12:13:31Jehan_I do think a lot of "this should be the default" depends on what application domain people are writing for.
12:14:13dom96I wonder why `+=` just isn't a template for .inc
12:14:53Jehan_inc doesn't work for unsigned types, either.
12:15:00dom96true
12:15:31Jehan_It wouldn't be hard to add the relevant code to unsigned.nim, it's just that someone would have to do it. :)
12:15:47Jehan_Maybe I will, in my ample *cough* spare time.
12:16:50Jehan_But I have more important things to do first, alas.
12:32:45EXetoCit does work, but not for uint64
12:38:41Skrylari don't really agree with unsigned hate
12:39:50Skrylari've only seen a scant few arguments against unsigned from technical grounds, mostly being that ignorant people use it and then get surprised that 5 - 6 is four billion
12:45:03SkrylarEXetoC: does your gl module support 2.x and 3.x?
12:46:07EXetoCSkrylar: up to the latest version
12:47:12Skrylarthose are two incompatible versions
12:48:14SkrylarEXetoC: anyway, where is it and i'll look at it later
12:48:30EXetoCthere aren't any symbol conflicts or anything, so it doesn't matter
12:49:33Skrylari don't have very much text stuff left over to do, so i'll have to work on the mid-level GL stuffs
12:49:59EXetoCSkrylar: the package is called opengl, and the repository is here https://github.com/nimrod-code/opengl.git
12:50:21SkrylarEXetoC: starred
12:50:59Skrylarhuh
12:51:09Skrylarthose are some strange importc's
12:51:54EXetoCthere's no readme, but I think people should get used to generating the docs. perhaps it can be automated by babel
12:52:06EXetoCI'll add it either way
12:52:32EXetoCSkrylar: they're just dummies. I wasn't able to omit them
12:53:49Skrylari'll peer more at it later, though i think linking to gl32 doesn't provide much more than the 1.1 apis on windows
12:54:13SkrylarIIRC SDL and GLFW have their own "x_get_gl_function" type of API for loading
12:54:22EXetoCsee loadExtensions
12:54:33Skrylarnot extensions
12:54:39Skrylarthe core is supposed to be loaded in silly ways too
12:55:52EXetoCI don't know if it's specifically for extensions. either way, I've never heard about such complaints, so I guess it works somehow
12:56:27Skrylari'll have to check some time i'm not sleepy
12:56:42Skrylari remember the derelict apis for D loading the whole of opengl through the wgl-bleh commands
12:56:43EXetoCok
12:58:21Skrylarhuh. the libgif headers look sensible
13:02:52*darkf quit (Quit: Leaving)
13:04:56Skrylartextures are going to be weird
13:06:36Skrylarso far i was thinking of having texture objects with a non-managed pointer internally, which gets freed on a mix of finalizer/refcount
13:07:21Skrylarmostly so you could say "load this texture for me", then immediately get a usable handle, and let other threads load the image in proper
13:23:05EXetoCpointer? what other than the handle will you be storing?
13:24:27EXetoCthe reference count probably :p
13:31:19EXetoCI wonder how fast texture deletions are. pretty fast I'd assume
13:33:59EXetoCa lot of people mention ADA. has it stood the test of time?
13:35:43Jehan_Ada? In what way?
13:35:56Jehan_It is a better language than some that people use in its stead. :)
13:36:16Jehan_I think what scares a lot of people off is the verbosity.
13:36:48EXetoCsymbol lookup seems pretty verbose, while other things seem fairly concise
13:39:25Jehan_But let's just say that Ada had generics back in 1983 while more "modern" languages still struggle with the very concept.
13:49:23*closures999 joined #nimrod
13:49:38*closures999 quit ()
13:56:55*tymat joined #nimrod
13:57:13tymatlib/nimrod/system.nim(1746, 41) Error: invalid pragma: noStackFrame
13:57:23tymatgetting that trying to compile a simple program
13:58:54EXetoClib/compiler mismatch?
13:58:58Jehan_Huh. That's an odd path, too.
13:59:15milosndb_mysql's getRow() is broken :D
13:59:20*milosn trying to fix it
13:59:33EXetoCI don't know if it's noStackFrame that was renamed to asmNoStackFrame, but what I said seems plausible either way
14:00:00EXetoCmake sure to bootstrap again if you've pulled
14:00:13Jehan_The current version of system.nim doesn't use noStackFrame at all?
14:00:31Jehan_Unless I've forgotten how grep works. :)
14:00:49EXetoCno. it's just mentioned once in a comment
14:02:04EXetoCand in a couple of text documents. I should fix that
14:12:26EXetoCreactormonk: did you create the float branch and then merge with master after?
14:22:05EXetoCtymat: *nick highlight*
14:32:22milosnhmm looks like db_mysql cant handle NULLs
14:36:03*brechtm joined #nimrod
14:36:52milosndb_mysql.nim(134) getRow
14:36:53milosnSIGSEGV: Illegal storage access. (Attempt to read from nil?)
14:37:00brechtmhello
14:37:08EXetoChola
14:37:26milosncan someone enlighten me :), why is reading nil from what i think is a sequance a problem?
14:37:29EXetoCmilosn: what's nil?
14:37:35EXetoChm
14:37:36milosnthat field in DB is NULL
14:37:49milosni assume, mysql.nim converts it to nil
14:38:27milosnits 8th field in the resultset, ive run the query in mysql prompt, and its value is NULL
14:38:37milosnobviosly db_mysql/mysql dont like it
14:39:11brechtmAraq: could it be the "typedef struct a a" code in cparse.nim was copied from the "typedef enum a a" code where it perhaps does make sense?
14:39:36milosnEXetoC: exact line is probably wrong, ive already made change to db_mysql to fix something else
14:39:43milosnline is: add(result[i], row[i])
14:40:02milosnrow[i] is nil, i think ... and thats where it barfs
14:40:29*Skrylar quit (Ping timeout: 245 seconds)
14:44:59EXetoCyou could check if it's that
14:46:18milosnhow? :)
14:46:22milosni am new to nimrod
14:46:55brechtmmilosn: isNil(), IIRC
14:47:34milosnbrechtm: so i should do isNil(row[i])?
14:47:44milosnisnt that gonna trigger the error anyway?
14:48:15brechtmmilosn: well, if it is nil, you'll have to handle that case of course
14:48:22EXetoCI usually just compare with nil. anyway, I don't know how to debug this. fetchRow is some mysql function
14:48:36EXetoCand L might or might not return the correct length
14:48:54milosnEXetoC: yeah, its all from mysql wrapper ... i dont understand a thing in it
14:49:04milosnL is correct, its 13
14:49:19milosnchecked in mysql prompt for that sql query i am running
14:49:46milosnand it barfs on 8 ... first field thats NULL
14:50:49milosnlet me try to use rows() function ... and try to execute same query
14:50:55milosnit has slightly different impl
14:50:56brechtmmilosn: I would expect an SQL NULL to be mapped to a nil indeed... so you'll need to handle that case
14:51:14milosnbut if it barfs on nil, than it got the same problem
14:51:38brechtmI'm missing some context here... are you running an existing example that should work or?
14:52:03EXetoCthe prompt barfs on it too?
14:53:22milosnbrechtm: nope, i am just playing around with mysql ... trying to run some simple queries using rows(), fastRows(), getRow() etc.
14:54:13milosndb_mysql.nim(153) getAllRows
14:54:14milosnSIGSEGV: Illegal storage access. (Attempt to read from nil?)
14:54:25milosnyup same problem, i think db_mysql cant handle NULL
14:54:26milosn:D
14:54:45milosnso much for DB wrapper :P
14:54:46milosn:D
14:56:04milosnEXetoC: mysql prompt? of course not ... it just shows that the 8th field in the result row is NULL :)
14:56:50brechtmmilosn: so it also fails on fetching the row?
14:56:55milosnyup
14:57:05brechtmmilosn: that sounds like a bug indeed
14:57:23EXetoCthese are uncaught bugs of course. nil-checking might be necessary in multiple locations
14:57:35EXetoCmaybe it tries to copy the strings, which won't work in this case
14:57:59*zahary quit (Ping timeout: 252 seconds)
14:58:35EXetoCbut maybe it should work, because "" might be an ambiguous value
14:58:52brechtmthe mysql wrapper must to more than just wrap the C API then, no?
14:59:42EXetoCyes. there's lib/wrapper/mysql.nim, and then there's lib/impure/db_mysql.nim which uses the other module
15:00:05milosnbtw while you are at it ... if you have commit access ... https://github.com/Araq/Nimrod/issues/1176
15:00:08milosn:)
15:00:12milosni submitted that earlier
15:03:09brechtmmilosn: what version of nimrod are you running?
15:03:45brechtmdb_mysql.nim line 153 is getValue(), not getAllRow() here
15:03:57milosnNimrod Compiler Version 0.9.4 (2014-04-21) [Linux: amd64]
15:04:05milosnbrechtm: because i have made changes already
15:04:17milosnhave a look at that issue link i pasted :)
15:04:18brechtmoh
15:04:27milosnive just added a missing proc
15:04:38milosndidnt change any code logic anywhere
15:04:59milosnit looks like mysql support was just blindly coded, maybe with some quick tests
15:05:03EXetoCis result[i] nil?
15:05:17milosni think row[i] is
15:05:26milosnlet me try ... gimme a moment
15:05:46EXetoCno, it sets the length just above
15:06:05EXetoCso yeah, nil check might do the trick: if row[i] == nil: ..
15:06:32EXetoCisNil is often used though. apparently it's faster in some cases, but I don't know when
15:07:29milosnif i change the line to:
15:07:29milosnadd(result[i], "")
15:07:32milosnit works
15:08:05milosnso row[i] is nil for i = 7, 8th fields in my result
15:08:10*zahary joined #nimrod
15:08:25milosnlet me try to stick in a check and insert string "NULL"
15:09:29milosnyup that worked EXetoC
15:10:11milosni can create some patches for db_mysql and fix this everywhere, just not sure you want string "NULL" to represent NULL value in DB
15:10:15milosn:)
15:10:47milosnso why cant 'nil' value be fetched out of row[i]?
15:10:55EXetoCprobably not. it makes more sense to just let it remain nil though
15:11:23milosnah, maybe getting row[i] is not the problem, its adding it to string ""?
15:11:24*tymat left #nimrod (#nimrod)
15:11:30EXetoCin which case maybe setLen should be omitted too, but you might have a better idea of what's the correct behavior
15:11:52EXetoCmilosn: appending nil does indeed cause a segfault. I'll ask if this is intended
15:12:04brechtmmilosn: where is it doing that?
15:12:20milosnEXetoC: i understand now, where the problem was
15:12:22milosn!
15:13:21EXetoCAraq: what's the correct behavior for add(string, nil)? neither add nor safeAdd handles this safely
15:13:32milosnEXetoC: 'nil' breaks 'echo' proc a well
15:13:33milosnheh
15:14:12EXetoCyeah
15:14:13brechtmEXetoC: well, I'm pretty sure it should fail, no?
15:14:14milosnas in i cant echo the result row with nil-s in it
15:14:31brechtmshouldn't just succeed silently
15:15:10milosnso is there a different between 'add(str1, str2)' and 'str1 & str2'?
15:15:19milosnin performance or anything else
15:15:36brechtmmilosn: you could define:
15:15:36milosns/deifferent/difference
15:15:39brechtmproc `$` (a: ptr): string = "NULL"
15:15:56*q66 quit (Ping timeout: 252 seconds)
15:15:57brechtmmilosn: err, no, you need to check for nil first, of course
15:16:28milosnbrechtm: i fixed the error with nil check before add()
15:16:41milosnand if its nil, i just assign nil to result[i]
15:16:52brechtmmilosn: in fastRows?
15:16:55milosnill have a look if i can fix whole module
15:17:00milosnin getRow()
15:17:07milosnill check others if i get more time
15:17:55EXetoCjust omit the call to setLen too then
15:18:14milosnbecause value is already ""?
15:20:15milosni am actually trying to put together basic ORM :)
15:20:39milosnnot sure nimrod language features would allow me to make what i have in mind, but unless i try ill never know
15:21:26EXetoCnevermind. just leave it in there
15:21:45EXetoCit can do a hell of a lot. if Nimrod won't be able to do what you have in mind, contact Araq immediately ;)
15:21:45milosni have made myself something i call "DirtyORM" in python, for internal use ... its the ugliest but most usefull thing i ever made :D
15:21:58milosnso i wanna port that to nimrod
15:21:59milosn:)
15:22:53milosn... something to play with on sunday afternoon anyway :P
15:24:34milosnEXetoC: i am not gonna patch up anything yet, please find out if add("", nil) should result in "" or nil if you can (in this context)
15:25:01milosnmy logic is ... nil should be propageted to application code as representation of NULL value in the DB
15:25:17milosnbut maybe who ever made db_* thinks different
15:26:00milosnmaybe NULLs should be "" ... which is kinda strange
15:26:00milosn:D
15:28:05*q66 joined #nimrod
15:28:05*q66 quit (Changing host)
15:28:05*q66 joined #nimrod
15:29:31milosnactually it was easy to patch
15:29:41milosnonly 3 places where it needs to be changes
15:29:44milosn*changed
15:30:03milosnlet me play around a bit and i can post a patch to issue tracker
15:30:29*Jesin quit (Ping timeout: 245 seconds)
15:31:26milosnfastRows() works
15:32:04milosnrows() seems to work as well
15:32:05milosn!
15:32:20milosnmilos you are amasing.
15:33:13OrionPKhola
15:35:08milosnhttp://pastie.org/9139705
15:39:59milosnhmm wonder how easy/hard would be to add support for "DictRow" ... where i can access fields like: row['my_column_name']
15:40:26brechtmmilosn: only one way to find out!
15:42:17*Matthias247 joined #nimrod
15:46:26*menscrem joined #nimrod
15:48:39EXetoCmaybe you can wrap the row type in an object which defines those operators
16:01:58*untitaker quit (Ping timeout: 240 seconds)
16:08:12*untitaker joined #nimrod
16:13:53EXetoCAraq: or what about assert checks
16:23:38*brechtm quit (Ping timeout: 265 seconds)
16:28:11*HollyRain joined #nimrod
16:28:24Araqhi HollyRain welcome
16:29:32HollyRainI'm cururious about one thing, why do you think that to use a language based into a VM is not efficient?
16:29:55HollyRainsee V8 or the Dart's VM which has better performance that V8's
16:30:39renesacHollyRain, it has to compile the code on the fly, and do it fast
16:31:12renesacthis takes time, and the JIT can't use optimizations as advanced as an ahead of time compiler
16:32:02renesacand most languages that run on a VM need it because their dinamicity, and weren't projected for highest speed (dart is an exception)
16:32:52renesacnimrod runs on a VM (not a JIT) during compilation to evaluate macros and such
16:33:14renesacyou can run it with 'nimrod i', but it is very limited ATM as it don't support FFI
16:34:15HollyRainrenesac, very interesting, thx
16:34:23AraqHollyRain: also VMs tend to cause never ending problems when it comes to program distribution and installation
16:35:05Jehan_Also, debugging a JIT compiler is much harder than one that produces binaries.
16:36:43HollyRainAraq, true, but the positive side is that it can be embedded in other programs, like v8 is being done
16:36:59HollyRainnot only in the web browser
16:38:58HollyRainAraq, at the beginning, I though that you were a bot xD
16:39:19HollyRain"Nimrod produces small executables without dependencies" => does means that the compilation is static?
16:39:37Araqdepends on what you understand by "static"
16:40:04AraqIMO it is static, but it doesn't like statically against libc
16:40:12Araq*link
16:40:23Araq(strange typo ...)
16:40:58HollyRainAraq, $ file "some_executable": ... statically linked ...
16:42:45renesacand nimrod compiles to Javascript (thought I don't know how well supported that target is)
16:45:32Jehan_In practice, if you want to use JIT compilation, you want to use an established implementation rather than rolling your own. There are not many people in the world that can write a performance-competitive JIT compiler.
16:46:17Jehan_And right now, most of them are being employed by Microsoft, Oracle, IBM, and Google.
16:53:38Jehan_Araq: Is there an easy way to figure out if a type contains a ref, directly or indirectly?
16:54:18Jehan_E.g. tuple[foo: int, bar: ref int] would be such a type.
16:54:57Jehan_(This is to plug a potential memory leak in queues.)
17:06:46*milosn quit (Ping timeout: 240 seconds)
17:08:45*milosn joined #nimrod
17:16:16*olahol joined #nimrod
17:16:56AraqJehan_: I don't think so, more typetraits are planned though
17:17:23Jehan_Hmm, use "when T is ref:" as a stopgap solution then?
17:17:37*brechtm joined #nimrod
17:17:56Araqbrechtm: typedef struct foo foo; is often also used for forward declarations
17:18:03Araqhence we remove it and hope for the best
17:18:06Araq;-)
17:18:30brechtmAraq: I see
17:18:32EXetoCcan fields be used recursively for this?
17:21:46Araqbrechtm: but try to remove that special case, I think it's better to have duplicated definitions than none
17:23:26brechtmAraq: I did manage to get it to output "type structname* = object" eventually, but I'm not sure I'm doing the right thing
17:23:46Araqwell make a PR and I'll tell you
17:24:01brechtmAraq: any docs on the ast stuff?
17:24:26Araqast.nim is documented
17:24:59brechtmAraq: macros.html is perhaps also useful?
17:25:05Araqyep
17:32:41OrionPKaraq hows that vm register issue looking
17:35:28brechtmAraq: astspec.txt is also still relevant?
17:35:54Araqbrechtm: dunno, I think so
17:36:04brechtmnm, is the same as macros.txt
17:36:07AraqOrionPK: it's already the number 1 bug on my list
17:36:30brechtmor included in macros.txt in any case
17:36:43OrionPKaraq alrighty
17:37:47brechtmok, macros.nim then ...
17:38:00*brechtm will get the eventually
17:38:10brechtm*there
17:38:16*brechtm sighs
17:39:01reactormonkEXetoC, yes, no.
17:39:52brechtmshould the comments in ast.nim show up in the html after "nimrod doc ast.nim"?
17:40:23EXetoConly if they are doc comments (##)
17:40:36EXetoCalso, you might want to use doc2 instead
17:41:09brechtmEXetoC: what nim-file do I pass doc2?
17:41:39brechtmah, it will generate docs for all imported modules?
17:42:28EXetoCmaybe it does
17:43:05*HollyRain quit (Quit: bye, bye)
17:43:06brechtmdoesn't seem to
17:43:17Araqthey are not doc comments
17:44:00brechtmAraq: so I just read the nim file, no problem
17:45:50AraqJehan_: the builtin 'reset' could also be used to fix the leak
17:46:06Araq'reset' works on everything iirc
17:46:15Jehan_Yeah, but that creates overhead for non-ref types.
17:46:41Jehan_I knew that that was possible, I was wondering if it could be avoided.
17:48:56Jehan_Incidentally, what will happen if/when strings/seqs get non-nil default values?
17:49:48Araqthat wont happen
17:50:23Jehan_Ah, okay. I thought you were considering it.
17:50:44Araqlen and add will deal with nil instead
17:51:47Jehan_Hmm, I hadn't considered that option.
17:53:06Araqthat's what Delphi does
17:53:35Araqit conflates "" and nil even more though, there is no nil, only "" which is stored as nil
17:54:10Jehan_Huh.
17:54:44Jehan_Can't say I ever used Delphi/TP past the Windows 3.1 years.
17:55:21*zahary quit (Read error: Connection reset by peer)
17:55:40*zahary joined #nimrod
18:04:21EXetoCthere doesn't seem to be any obvious ways of getting milliseconds passed since the epoch
18:06:24EXetoCexcept maybe epochTime() :p
18:07:01EXetoCbut that's only for the current time
18:08:09EXetoCTTime.TTimeImpl.int64. there we go
18:09:12EXetoCno it's not exported. I think I'll have to patch it
18:15:34*dLog joined #nimrod
18:16:21Araqhi dLog welcome
18:24:24reactormonkmilosn, give us a PR
18:25:15milosnreactormonk: aye?
18:25:27milosnhttps://github.com/Araq/Nimrod/issues/1176
18:25:29milosnthat?
18:25:29EXetoCthere seems to exist little support for getting the time passed since the epoch in milliseconds, so I won't bother
18:26:16milosnreactormonk: check the patch link ... ive incorporated all tweaks i made in single patch
18:27:35Araqmilosn: the other db_* modules indeed treat NULL as ""
18:28:18Araqit's only ambiguous for 'string' (nvarchar) and I'd argue that if your database model distinguishes between NULL and "" it's simply broken.
18:28:44Araqand you deserve using the low level wrappers instead
18:29:33milosnAraq: hmmmm you decide, if you wanna keep it consistent, convert nil-s to ""
18:31:10milosnAraq: i am trying to write an "active record" style ORM in nimrod ... ill tell you where NULL as "" breaks everything ... imagine you load row from the DB into your AR object and NULL-s get convrted to ""-s ... on next update you no longer have NULL-s in the DB
18:31:32milosnfor varchar fields and friends, that holds true
18:31:42milosnso you got broken ISNULL() for example
18:33:55brechtmAraq: http://programmers.stackexchange.com/a/32582/25032
18:34:06Araqgood point, but the db_* modules are for convenience (and also quite old btw). The real problem is that they map everything to 'string' and don't know anything about SQL's datatypes
18:35:06Araqfixing 'NULL' is not nearly enough for an ORM, I think
18:35:15milosnAraq: everything as string is actually OK ... i can convert to nimrod types as i see fit :P
18:35:29milosn:)
18:36:14milosnmind you, doubt ill progress much in next few days, even weeks, i just dont know the basic language that well
18:36:23milosnso its a learning experience
18:36:25milosn:)
18:37:30Araqmilosn: once 'nil' is acceptable for 'add' and 'len' we can indeed properly distinguish NULL from "" and patch the db_* modules
18:37:58Araqso ... go ahead please, an ORM is a welcome addition for Nimrod
18:39:09Araqbrechtm: I know these arguments but IME nobody cares and you end up using ISNULL(x, '') <> '' everywhere
18:39:57Araqbtw "" could also mean "we KNOW this person has no email address" and NULL "we don't know anything"
18:41:27milosnAraq: i doubt i can write nice and easy to use ORM based on db_mysql alone ... ill need to peak into low level mysql wrapper ... opened it up, dont understand a thing
18:41:35milosnbut it can only get better :P
18:41:46milosn:)
18:41:53brechtmAraq: you mentioned clang2nim yesterday... will that obsolete cparse.nim?
18:42:11Araqbrechtm: time will tell
18:42:38Araqclang2nim doesn't even exist yet, we have no idea how good it will work
18:42:49brechtmAraq: just wondering if I should go for quick-n-dirty or nice-and-slow :)
18:43:15AraqDAddYE is working on it, maybe he can comment when he's around
18:44:30Araqbrechtm: from your link: "Unfortunately, Oracle confused the representation of VARCHAR string of length zero with the representation of NULL. They are both represented internally by a single byte with value zero. This makes the discussion just that much harder." .... ;-)
18:45:48brechtmAraq: I'm personally not much into databases, but it seems like the right thing to differentiate between NULL and ""
18:49:46reactormonkmilosn, pull requests make it more streamlined than issues
18:49:52EXetoCAraq: and what should add(string, nil) do?
18:50:06reactormonkmilosn, fork, push a branch, go to github
18:50:35milosnreactormonk: sorry about that, ill have a look at github workflow, cant be much different to bitbucket
18:51:29AraqEXetoC: append nothing.
18:51:38milosnreactormonk: i dont think this needs to be incorporated immidietly? as Araq said fix is to be made in add() ... and we need to decide on represenation of DB NULL in nimrod
18:51:45EXetoCmilosn: there you have it ^
18:52:31brechtmAraq: but only if nil is a string (ref?)?
18:52:33EXetoCso perform the nil check if you want, but I'll try to patch the string procs
18:53:14milosnEXetoC: yeah feel free, i can tell whats the correct expected behaviour of add(str, nil) :)
18:53:27milosnif you think it shouldnt break ... fix it please
18:53:35milosns/can/cant
18:56:36EXetoCAraq: for add or safeAdd?
18:56:56Araqwell I agree NULL should be mapped to 'nil', but the old way was not completely without its reasons
18:57:19AraqEXetoC: safeAdd should be deprecated
18:57:50EXetoCI know, but ok I'll patch add
18:58:02EXetoCmilosn: dunno when I'm done, but I guess you have your local changes in place anyway
18:58:15Araqgood luck, fowl tried and failed, EXetoC ;-)
18:59:46EXetoCreally? ok
19:00:29EXetoCsome posted this for babel-git "This pkg no longer depends on nimrod-git". so are you going to make sure that master can compile babel?
19:00:56EXetoC*someone
19:02:12EXetoCbecause we did discuss the significance of releases prior to 1.0 before, and I don't know whether or not what he said will remain true
19:03:00fowlEXetoC, it can probably be done but it requires moving stuff around in system.nim
19:03:42Araqfowl: probably? I bet I could do it :P
19:04:07NimBotAraq/Nimrod devel 79891b6 Reimer Behrends [+2 ±1 -0]: Added support for ref type hash tables.... 4 more lines
19:04:07NimBotAraq/Nimrod devel 93fed1f Andreas Rumpf [+2 ±1 -0]: Merge pull request #1177 from rbehrends/reftables... 2 more lines
19:04:22fowlAraq, you know what the cryptic that come up mean
19:04:25fowlcryptic errors*
19:04:43EXetoCdom96: thoughts?
19:05:06EXetoCmaybe a release that compiles on master? but I don't know if you plan to break things soon
19:06:00AraqEXetoC: what do you mean? I thought Babel is part of the distribution already
19:08:46EXetoCAraq: as in the arch package babel-git
19:08:51EXetoCthe official nimrod distribution?
19:17:49*nande joined #nimrod
19:24:46*Matthias247 quit (Read error: Connection reset by peer)
19:31:01*Varriount|Mobile joined #nimrod
19:32:42Varriount|MobileAnyone seen the latest Nimrod oriented reddit post? It's at https://github.com/Araq/Nimrod/wiki/Nimrod-for-C-programmers
19:33:25Varriount|MobileOh, and http://www.reddit.com/r/programming/comments/24ok6c/nimrod_for_c_programmers/
19:34:20Varriount|MobileIf anyone sees skyfex, give her/him my congratulations.
19:35:35Jehan_Varriount: Did you remove the comment that you had posted regarding my issue with 8-bit constants again? Asking because I'm seeing it only in my mailbox, but not on Github.
19:51:48*skyfex joined #nimrod
19:52:17Araqhi skyfex. congratulations from Varriount|Mobile
19:52:53skyfex:)
19:54:24skyfexSucks though.. they stole my karma! ;)
19:54:33Jehan_???
19:54:49Jehan_I think I'm lost. :)
19:54:56dom96skyfex: it's ok, you get infinite karma from us.
19:55:18skyfexdom96: Can I have it in the form of a meaningless number? :P
19:55:36dom96EXetoC: Sure, change the dependency to 'nimrod'.
19:55:43dom96EXetoC: we can always change it to nimrod-git later
19:56:20dom96skyfex: ∞
19:56:25*Varriount|Mobile quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com ))
19:56:36skyfexdom96: Sweet!
20:02:19Araqdom96: EXetoC's patch for #1170 looks good to me
20:02:31Araqapply it whenever you feel like it
20:03:37dom96oh yes, forgot about that
20:03:53dom96skyfex: hehe, looks like you've been inspired to make lots of edits to your wiki article.
20:04:09NimBotAraq/Nimrod devel b1c865a EXetoC [+1 ±1 -0]: Fix #1170.
20:04:09NimBotAraq/Nimrod devel 88cb485 Dominik Picheta [+1 ±1 -0]: Merge pull request #1175 from EXetoC/await-discard... 2 more lines
20:04:15dom96EXetoC: Thanks!
20:04:38skyfexdom96: Github annoys me, I've had to change the cheat-sheet table several times just because they've changed how they render markdown
20:05:14skyfexHaving formatted code blocks in tables used to work, suddenly it just stopped working
20:05:35skyfexNow suddenly the page was narrower, so the third column became invisible
20:05:55brechtmskyfex: I know this isn't much help, but reStructuredText might be better in that area, since it has a spec
20:06:22skyfexbrechtm: Thanks :)
20:06:46dom96skyfex: Time to write a strongly worded letter to Github.
20:06:59brechtmAFAICR, GitHub supports rST
20:17:33dom96Jehan_: Your answers on HN are awesome. Good job :)
20:18:37Jehan_Umm, thank you, though most of them don't really have anything to do with Nimrod. :)
20:20:28AraqJehan_: " # aborts at run: 44 on win32 with 3.2GB with out of memory"
20:20:38Araqthat's not nice for our testers
20:20:48Jehan_Oops. What did I do?
20:20:49Araqfortunately I already pulled it ... :-/
20:21:17Jehan_If it's the ptables tests, I just copied them from the ttables tests.
20:21:32Jehan_If one of them blows up, so should the original ones. :(
20:22:15Araqit's table/ptables2.nim
20:22:45Araqoh I see
20:22:53Araqindeed it's simply a copy
20:22:54Jehan_[behrends@Hilbert develop/nimrod]$ diff tests/table/?tables2.nim
20:22:54Jehan_8c8
20:22:54Jehan_< var tab = newTable[int,int]()
20:22:54Jehan_---
20:22:54Jehan_> var tab = initTable[int,int]()
20:23:15Araqso it just ensures the leak is gone for good
20:23:24Jehan_Heh. :)
20:23:26dom96Yep, the VPS is swapping to death. yay.
20:23:27Jehan_Phew. :)
20:23:48Jehan_Well, assuming it is and I didn't break it indirectly?
20:24:27Araqthis test is simply flawed
20:24:43Jehan_But really, all the new code does is wrap TTables in a ref and do exactly what the original does.
20:25:00Araqdom96: please disable these for now
20:25:10Jehan_By the way, I plan to fix collision behavior sometime this week (assuming I find the time).
20:25:20Araqwe need to use the OSes API to check memory usage
20:25:41Araqbut having a test breaking the test machines is not good
20:26:05Jehan_Yeah, I saw the comment, but figured it was outdated.
20:26:16AraqJehan_: do you know if this also will improve compile-times?
20:26:34Jehan_Doubtful. Or at least not a lot.
20:26:53Jehan_Right now, the hash tables do essentially an expensive form of linear probing.
20:27:04dom96I think I will move the x86 builder to the gcc farm
20:27:06Jehan_Since they don't use the perturb part of Python's algorithm.
20:27:15Araqlol good point
20:27:24Jehan_But linear probing isn't all that bad most of the time.
20:27:32Araqyeah
20:27:47Jehan_Changing that is more about fixing worst case performance than average performance.
20:28:04Araqthat doesn't change the hash function, right?
20:28:25Araqcause changing that is not so easy
20:28:28Jehan_And Nimrod's compilation is generally plenty fast unless I construct stuff that makes the compiler do extra work.
20:28:49Araqthe compiler uses the hash function too for generating string cases
20:28:49Jehan_The hash function would remain unchanged.
20:29:07Araqso the compiler and the stdlib need to agree on the hash function
20:29:11Jehan_It would just be about resolving collisions differently.
20:29:41Jehan_Oh, you mean case somestring? Yeah, I remember seeing that.
20:29:57Jehan_But no, I'm not planning on touching that.
20:30:48*menscrem quit (Ping timeout: 240 seconds)
20:31:00Jehan_My near future plans for additions to Nimrod are: GMP bindings, 128-bit ints, stacks, and better hash collision resolution. Any problems with any of that?
20:32:17Jehan_Mind you, they're mostly based on personal needs, so I'm writing the code anyway, but since I'm doing it, I may as well contribute them to Nimrod. :0
20:32:35njoejoeis there an incantation to allow multiple statements on one line with "var" like: var x:int; s:string; f:float i would find it handy.
20:32:49EXetoCAraq: hm, stack*trace* off?
20:33:17dom96we're over 600 stargazers now :O
20:33:57Jehan_njoejoe: I don't know of any. Would love to be able to do something like "let x = 1, y = 2" myself.
20:34:00AraqEXetoC: what do I know
20:34:18Jehan_dom96: Stargazers?
20:34:30dom96Jehan_: https://github.com/Araq/Nimrod/stargazers
20:34:37Araqformerly known as "watchers"
20:35:03Jehan_Oh, I see.
20:35:11EXetoCAraq: it must be a push/pop?
20:35:19Jehan_I don't use Github much, hence my ignorance.
20:35:31AraqEXetoC: it really should be, yes
20:36:12njoejoei'm used to thinking of ";" as somewhat equivalent to a newline. and it helps in reducing "lines of code" ;-)
20:36:36Araqnjoejoe: implement it, compiler/parser.nim
20:36:46Jehan_Heh. :)
20:37:03njoejoeAraq: you crack me up :-)
20:41:34EXetoCAraq: that's just a comment though. you want me to include the word push in there?
20:41:46EXetoCin the change made to osproc anyway
20:42:05AraqI dont care
20:43:58EXetoCand no further changes to manual.txt?
20:45:26Araqif it doesn't use "noStackFrame" then no
20:50:21AraqJehan_: what do you mean by "stacks"?
20:51:01VarriountJehan_: Yes, I removed the comment. I accidentally missed reading your example, and thought you hadn't posted one. Luckily, I make it a point to double check.
20:51:05Jehan_Stack data type. You know, push, pop, top, empty.
20:51:37Jehan_Yes, overlaps with seq a lot, but unless I'm missing something, it's still cumbersome to do some basic operations.
20:51:46Jehan_Mind you, it's entirely possible that I'm missing something. :)
20:53:50Jehan_Or should the additional stuff go in sequtils?
20:53:50VarriountJehan_: Doesn't a linked list make more sense?
20:53:50Jehan_Varriount: linked lists have pretty bad memory locality.
20:53:50VarriountAlso, me had someone in here a day or two ago, with some related changes.
20:53:50Varriount*we had
20:53:50Araqpush = add, pop = pop, top = last, empty = len == 0
20:54:04Jehan_There's a last routine?
20:54:13AraqI'm not sure lol
20:54:17Jehan_O…kay. I guess I've been missing the obvious.
20:54:25AraqI remember adding something like that
20:55:08Jehan_Hmm, it's named something different then.
20:55:27EXetoCso someone made a comment about VLAs being very efficient. how often does it make sense to use one though?
20:55:34Jehan_But yeah, foo[len(foo)-1] is a bit tedious.
20:55:52Araqfoo[foo.high]
20:55:56Araqbut sure
20:56:07VarriountOr foo(-1.. -1]
20:56:16Jehan_Oh, right. Part of me is still stuck in other languages.
20:56:37AraqVarriount: but that returns a seq with 1 element
20:56:48Jehan_EXetoC: Depends on the situation.
20:56:58Jehan_The problem with VLAs is, well, the risk of overflowing the stack.
20:57:24Jehan_Even if you don't actually overflow it, Linux tends to get unhappy if you alloca() a really large piece of memory at once.
20:57:49Jehan_It then decides that it isn't proper stack-like behavior and throws a hissy fit, eh, a segmentation fault.
20:59:21Jehan_If you don't need recursion, most of the time you can also keep a seq in a global or thread-local variable that you expand on demand.
21:01:05Jehan_If you do need it in Nimrod, just use C's alloca() to return a ptr.
21:06:40EXetoCa better interface could be added, but it's not like every other programmers needs to do this
21:07:48Araqare you sure? some random guy on reddit thinks they are important
21:08:09EXetoCok I take that back
21:09:52Jehan_Umm. They can be situationally useful. A killer feature they're not (at least not IMO, YMMV, etc.).
21:10:22Jehan_That said, alloca() support in the standard library would be nice for a system language.
21:11:49VarriountVariable length arrays would be nice..
21:12:25Jehan_The real problem is that for most non-trivial applications you want to cap the maximum size on those.
21:12:49Jehan_At which point you can just use an array of that size.
21:16:04fowlare you talking about variable length array in struct
21:17:30Jehan_No, they are local variables on the stack whose size depends on a function argument.
21:18:05EXetoCthen it'd be enforced at compile-time if anything
21:18:06Jehan_Honestly, they're primarily used in languages that don't have GC.
21:18:20fowloh
21:18:40fowlJehan_, sounds fun... good luck
21:19:55*keodameo joined #nimrod
21:20:26*keodameo quit (Client Quit)
21:22:05KeletHas anyone made a REPL for nimrod?
21:22:27*Jehan_ quit (Quit: Leaving)
21:23:21*nande quit (Remote host closed the connection)
21:23:40*nande joined #nimrod
21:23:44EXetoCthere's "nimrod i" and it's broken
21:23:53Keletoh, that's a shame
21:24:11brechtmKelet: but there's good news too
21:24:27brechtmKelet: you arrived just in time to fix it! :)
21:24:45KeletI don't really know how to code anything, I just read about coding
21:25:10EXetoCjust do some shotgun coding until it works
21:25:17KeletIn D, the REPLs compile to shared libraries
21:25:27Keletand then execute the code in shared libraries I guess
21:25:31brechtmDon't we all just copy and paste bits and pieces from the internet?
21:25:56Kelethttp://drepl.dawg.eu/
21:26:02KeletSomething like that for Nimrod would be nice
21:26:13KeletI'll start coding it as soon as I learn to code
21:26:23*Jehan_ joined #nimrod
21:26:32brechtmI would love to try out D, but it doesn't have significant indentation
21:26:40njoejoeKelet: you can use "nimrod i" for simple things. it breaks is if you import a library that uses "FFI" from what I understand...
21:26:52brechtmKelet: those are one and the same... you'll only learn by doing it
21:27:05dom96Kelet: That looks nice.
21:27:08Keletbrechtm: There are preprocessors that add it
21:27:08Keletbut
21:27:13Keleti don't like preprocessors all that much
21:27:15EXetoCgood luck starting by only reading about code
21:27:24EXetoCthat's how I started out. didn't work
21:27:32dom96Kelet: Are there any articles or anything describing how that repl works?
21:27:46*brechtm will never get to grips with the X clipboard(s)
21:27:57Keletdom96: There are 3 REPLs for D, each work ok, and each compiled to a shared library. Let me try to find the usenet posts where it's described more in-depth.
21:28:06fowlbrechtm, i love x clipboards
21:28:12fowlbrechtm, i really miss them when i use windows
21:28:13Keletcompile entered code into shared libraries*
21:28:30Kelets/usenet/mailing list/
21:28:44brechtmfowl: we will never get along! :)
21:29:14fowllol
21:29:21Keletdom96: Some information here: http://forum.dlang.org/thread/[email protected]
21:29:46brechtmfowl: I copy something into one, then try to paste from another
21:29:46Keletdom96: Also another D repl here, with some information in the main readme: https://github.com/callumenator/dabble
21:30:00brechtmfowl: so far, I've only discovered two, but I believe there are three?
21:30:38fowlbrechtm, there are two clipboards, one is for ctrl+v/ctrl+c (though some GTK copies selection to this buffer, hexchat for example) and the selection buffer thats what you highlight then hit the middle mouse to paste
21:30:38reactormonkso you want a nimrod repl written in nimrod that can compile to javascript...
21:30:39brechtmcan't seem to be able to guess a single correct D statement
21:30:47njoejoebrechtm: i was happy when i got my emacs kill buffer tied in with the clipboard. even works in terminal mode. forgot how the heck i did it though
21:30:50KeletApparently the approach was also used here: http://neugierig.org/software/c-repl/
21:30:57fowlbrechtm, yep there is a 3rd buffer but nobody uses it
21:31:01brechtmnjoejoe: hehe
21:31:12reactormonknjoejoe, let me see...
21:31:52brechtmfowl: I absolutely love how the buffer is cleared when you close the application in which you made the selection, not
21:31:55Jehan_On a practical note, I'm working on the current instability of the Nimrod REPL around by using a nimrun script.
21:32:09Jehan_Combined with vim bindings.
21:32:16fowlbrechtm, lol :D
21:32:25KeletI just figured since nimrod has fairly decent compiler-as-a-library functionality it might have a nice REPL somewhere
21:32:28reactormonknjoejoe, I assume you can get something working with xclip
21:32:41*brechtm patiently waits for Haiku to become mainstream
21:32:45KeletOcaml has a really nice third-party REPL floating around, the name escapes me
21:32:49fowlKelet, there is a GTK repl somewhere
21:32:57fowlKelet, its called nimrepl.nim iirc
21:33:10Keletinteresting
21:33:49njoejoereactormonk: i think it uses "xsel"
21:33:54brechtmD> write("hello")
21:34:01brechtm=> hellvoid
21:34:09brechtm=> hellovoid
21:34:13brechtminteresting
21:34:13fowlKelet, https://github.com/Araq/Nimrod/blob/devel/tools/nimrepl.nim
21:35:04njoejoereactormonk: this is what i followed: http://hugoheden.wordpress.com/2009/03/08/copypaste-with-emacs-in-terminal/
21:36:40dom96I think with symbol files creating a REPL which works this way is viable.
21:37:41fowlreactormonk, what is "SQL logic"
21:37:46milosnwhats wrong with this table type: var my_table = initTable[string, [string, string]]()
21:38:03milosnits suppose to be table of tables, is this not how you define it?
21:38:26Jehan_You need a TTable before the inner [
21:38:35milosnah
21:38:38milosnlet me try
21:38:42Jehan_Or whatever the inner table type is supposed to be. :)
21:39:32Jehan_Just be aware that TTable has value semantics.
21:39:47Jehan_If you assign it to a different variable, the entire table gets copied.
21:41:14KeletIs there a way to use generics but enforce that the incoming type is a number?
21:42:37fowlKelet, http://build.nimrod-lang.org/docs/manual.html#static-
21:42:49Keletthanks
21:42:55reactormonkfowl, everything is != null
21:43:41fowlreactormonk, nil is different here, it doesnt denote the absense of a value, its a distinct value
21:44:25fowlreactormonk, also nil string == nil string, so
21:46:14dom96Kelet: proc foo[T: TNumber](x: T) = ... # should work I think
21:46:17Jehan_Kelet: http://build.nimrod-lang.org/docs/manual.html#type-classes
21:46:35EXetoC(system.TNumber)
21:46:42Jehan_Type classes in Nimrod are confusingly something different from the Haskell kind.
21:47:11dom96They are kind of similar.
21:48:57reactormonkfowl, hm.
21:50:36reactormonkfowl, ok, should do.
21:51:01EXetoCI think it makes more sense when there's a distinct null "type", but "not nil" will remedy this somewhat
21:51:50EXetoCbut I wonder if we'll have to type "not nil" a whole lot
21:52:41reactormonkEXetoC, I think it should be default, and with an 'trying to access a non-inititalized object' error
21:53:50EXetoCwas it not considered "too late"?
21:55:17milosnJehan_: yeah that fixed that error ... but now when i try: cs_description[cname]["type"] = ctype
21:55:23milosnit says
21:55:36milosn Error: for a 'var' type a variable needs to be passed
21:55:38milosnhmmm
21:56:11EXetoCyou need a var. it's as simple as that
21:57:36Jehan_Try cs_description.mget(cname)["type"] = ctype.
21:58:15EXetoCyou either need to replace 'let' with 'var', or just add 'var' in case of a parameter
21:58:28EXetoCyeah that does return a 'var'
21:58:46Jehan_EXetoC: The problem is that cs_description[x] returns a TTable, which cannot be passed to []=.
21:59:02Jehan_This is part of the reason why I submitted a patch for PTable earlier. :)
21:59:25Jehan_Value types are terribly awkward for nested dictionaries.
21:59:39dom96We're going to have a problem with TTable vs. PTable when we remove the prefixes.
22:00:18Jehan_Yeah, same problem as anywhere else where T/P types are concerned.
22:00:48Jehan_One will be the default implementation (say, Foo), the other will be FooObj or FooRef, I guess.
22:02:12dom96Maybe we should just use the ref version everywhere? Are there drawbacks to that approach?
22:02:41Jehan_Dunno. Araq tends to favor value types, and probably for a reason.
22:03:06Jehan_One disadvantage to ref types is that they can be mutated even when not passed as a var parameter.
22:04:33brechtmif a param is not flagged as var, are the values copied?
22:04:37EXetoCso "ref Foo" causes problems?
22:05:30AraqI picked value types for consistency only
22:05:36Jehan_brechtm: Small types get copied for non-var parameters, large types passed by reference (since they're effectively immutable).
22:05:59Jehan_EXetoC: Not necessarily. It's what most languages do.
22:06:21brechtmwould it be bad to make ref params const by default?
22:06:22Jehan_Nimrod is just somewhat unusual in that it doesn't allow non-var parameters to be mutated.
22:07:00Araqactually I copied that feature from Ada ...
22:07:15Jehan_Eiffel also has this (for value types).
22:07:27Jehan_Didn't say it's unique, just somewhat unusual.
22:07:30Kelethttps://github.com/Araq/Nimrod/wiki/Nimrod-for-C-programmers says C doesn't have generics but it does, doesn't it?
22:07:43Jehan_C++ has generics. C doesn't.
22:07:47Araqyeah but I copied nothing from Eiffel :P
22:07:58Keletc1x has _Generic
22:08:00EXetoCbrechtm: const? you disallow mutation by omitting var. it doesn't do a whole lot though
22:08:01Keletdoesn't it?
22:08:11Kelethttp://www.robertgamble.net/2012/01/c11-generic-selections.html
22:08:28Keletoops, guess it's c11 now
22:08:29brechtmEXetoC: for ref types I meant
22:08:34Araqbrechtm: yes, it would be bad because it would break every single line in the compiler
22:08:53brechtmAraq: any real reasons aside from that? ;)
22:09:16Araqdunno, I played with it and decided it sucks
22:09:17brechtmEXetoC: though it's possible to dereference the ref before passing, which gets you the same, I suppose
22:09:39Jehan_It will take a few years until generics from C11 can actually be used portably.
22:09:54Jehan_Especially if Microsoft decides to not play ball again. :(
22:10:21KeletI thought Microsoft said no C99 support even, just use our C++ compiler for your C code
22:10:24Keletafaik
22:10:49reactormonkEXetoC, as in backwards compability?
22:10:50Jehan_Also, C11 generics are pretty cumbersome to use.
22:10:52brechtmJehan_: large types are composite types I assume?
22:11:02reactormonkAraq, not-nil default too late?
22:11:04KeletYeah, but they're there, I think it would be dishonest not to mention them :)
22:11:07*Kelet shrugs
22:11:14Jehan_You'll have to ask Araq, but from what I've seen, anything that's bigger than two machine words.
22:11:32Araqtwo floats iirc, but yes
22:11:48Araqand no, I haven't done any benchmarks
22:12:06Araqso if you know better, let me know
22:12:07Jehan_Kelet: Has any compiler actually implemented them yet?
22:12:32AraqKelet: C11 is academic. It doesn't exist.
22:13:02KeletJehan_: Araq: http://gcc.gnu.org/wiki/C11Status
22:13:24KeletI think clang may be further along, but that's a fair amount of features, given many of them are optional.
22:13:27Jehan_Also, as far as I recall, generics in C11 are actually a typecase statement.
22:13:39Araqwhy should Microsoft support C11? it doesn't support Posix either.
22:13:45Jehan_Which is not quite the same.
22:15:00Jehan_For what it's worth, the absence of generics in C was what drove me primarily to look into D and Nimrod (and a bunch of other languages).
22:15:17Kelethttp://gustedt.wordpress.com/2012/10/14/c11-defects-c-threads-are-not-realizable-with-posix-threads/
22:15:21KeletAn interesting read
22:15:47VarriountWhat drove me into Nimrod was type inference, lack of semicolons, and lack of braces. (I'm not ashamed, even if those are petty reasons)
22:16:46KeletI don't really program much but I looked into Nimrod because I liked the Lua-like GC and ADA-like features, to be extremely general and inspecific :)
22:17:11*Jesin joined #nimrod
22:17:30Jehan_Varriount: I enjoy those too (though I prefer an Eiffel-style syntax myself), but they or their absence were not dealmakers or dealbreakers.
22:17:46brechtmVarriount: same here... though I'm really starting to appreciate the "pragmatic" easy of interop with C now
22:18:18KeletLack of semicolons and braces kind of keep me away. Ideally, I prefer the Nimrod way but my eyes are untrained to read it nearly as fast.
22:18:19brechtmwhich might be very important for adoption
22:18:23Jehan_I need a minimally expressive type system to do serious work. For my purposes, linking the Boehm GC to get GC is good enough. So, it's really the generics that were my biggest problem.
22:18:47VarriountJehan_: I hear that you're good with low-level stuff. Can you veryify that my alligned allocation procedure is correct? https://gist.github.com/Varriount/335018e9f5d9ed177743
22:18:52Jehan_What I do enjoy is having actual bound and overflow checks.
22:19:25brechtmreminds me... what's the current stance on multiple inheritance support?
22:19:31Jehan_Varriount: looks okay, just a bit inefficient.
22:19:40VarriountJehan_: How could it be more efficient?
22:19:52Jehan_You don't need a loop.
22:21:04VarriountActually, that reminds me of a question. Does moveMem expect both pointer addresses to be already allocated?
22:21:16Jehan_Also, may want to use and (alignment-1) if it's not constant rather than mod alignment. Though that will be dwarfed by the allocation call.
22:21:33Araqbrechtm: MI is lots of work to implement so it won#t happen anytime soon
22:21:56brechtmAraq: but it's not something you want to avoid at all costs?
22:22:00AraqI'm not morally opposed to it though, I prefer MI over SI + interfaces
22:22:15brechtmgreat
22:22:32AraqSI + interfaces is stupid IME, how is having not 1 but 2 type hierarchies a good idea?
22:22:52brechtmI find myself using it MI a lot, but I'll have to investigate the alternatives in Nimrod
22:22:57VarriountAraq: Because Java does it! :3
22:23:17Jehan_brechtm: multiple dispatch and parametric polymorphism allow you to avoid a number of MI use cases.
22:23:44VarriountJehan_: "and (alignment-1)"? where would I insert that?
22:23:51brechtmJehan_: you happen to have an article with some examples illustrating that?
22:23:51Jehan_And for what it's worth, I agree that SI+Interfaces is an awful hack.
22:24:28Jehan_Varriount: x mod p == x and (p-1) if p is a power of 2.
22:24:37AraqI don't like inheritence at all, but IF you want/need it, I don't see how MI suddenly makes everything "too complex"
22:24:38Jehan_Actually, you may want to use "and" anyway.
22:24:56Jehan_That's because mod may give you something bad when applied to a negative number.
22:25:18Jehan_And an address cast to an int often is.
22:25:26AraqJehan_: I think we should fix that in fact
22:25:27Jehan_Actually, let me write that up for you, Varriount.
22:25:40Jehan_Araq: It's difficult to do that efficiently.
22:25:53Jehan_Sather is the one language I recall that did it.
22:26:10AraqI thought it's only an 'if' that we have to add to 'mod'
22:26:36VarriountJehan_: Thanks. I'm pretty new when it comes to low-level logic. I know a lot of the overall concepts, but don't have much experience.
22:28:28Jehan_Kinda sorta: It's one branch if we know that the modulus is positive.
22:28:35Jehan_Even so, one branch can hurt.
22:29:00Jehan_Admittedly, branch prediction should handle it correctly for most sane cases ...
22:29:16Jehan_Something that I'd definitely benchmark first.
22:29:25AraqKelet: indeed interesting. But it proves my point :P
22:29:42Araq'mod' is expensive already
22:30:53brechtmwhy do I get "Error: expression has no address" on getting the address for a proc arg?
22:31:32Varriountbrechtm: Sounds like you're trying to take the address of an inline procedure result.
22:33:06fowlbrechtm, thats nimrods semantics, arguments are const
22:33:35fowlbrechtm, (though they may be passed by reference, you cant modify unless you make it var T
22:33:46brechtmfowl: but but it still has an address, no?
22:34:33fowlbrechtm, you cant access it
22:35:05brechtmas in, not allowed
22:36:06KeletSpeaking as a huge Nimrod newb, would it be possible to have something like:
22:37:12Keletvar fx = toEquation("f(x) = x*2")
22:37:23Keletand then fx(2) = 4?
22:37:26Keletand so on
22:37:51Jehan_Varriount: https://gist.github.com/rbehrends/ab31743265488801cf02
22:38:08Kelet(I realize that might not exactly be the syntax, but on a higher level, is it possible?)
22:38:21Jehan_Note that it returns a tuple, the first is the address you can deallocate, the second is where the aligned part starts.
22:38:33Jehan_I also fixed it so that it actually allocates enough memory.
22:39:04Jehan_Kelet: parseStmt and parseExpr in macros should in principle have what you need.
22:39:15Jehan_As long as it's compile time stuff.
22:39:42VarriountJehan_: Thanks! I actually realized that problem after I gist'd it, but only had an inkling on how to fix it.
22:39:45Jehan_Araq: Yeah, but branch mispredictions can still hurt. Would prefer to benchmark that on a few architectures first.
22:40:40Jehan_I have learned not to trust my intuitions with respect to modern CPUs. :)
22:42:11dom96Kelet: I'm assuming you want to create your own parser for that which will transform that string into a procedure at compile-time? It is indeed possible.
22:42:48Keletdom96: Yeah, pretty much.
22:42:59KeletIt's kind of important that is assignable to a variable so it must create anonymous proc
22:43:06Keletbut I suppose that's possible too.
22:43:07Keletneat.
22:43:08fowldom96, who wrote that macro that parses a string into a template
22:43:25dom96fowl: OrionPK I think
22:43:36Araqfowl: OrionPK but it's broken due to a regression
22:43:42Keletdom96: I was thinking about writing a small, meager, likely useless numerical analysis library to get my feet wet.
22:43:48KeletAnd wanted to maybe hack on this first
22:43:52fowloh :(
22:43:55Keletso I don't have to make procs for everything
22:45:34VarriountThrough the magic of macros!
22:45:48KeletI suck at programming. I suck a lot more at metaprogramming.
22:46:08VarriountKelet: Which is why you have to practice, in order to suck less.
22:46:43fowlKelet, whats your experience with metaprogramming
22:47:13EXetoCimport macros\ndumpTree:\n f(x) = x*2
22:47:27Keletfowl: In Ruby there are some neat things where you can define variables pragmatically and do things if a missing method was called.
22:47:40EXetoCmake an equation solver!
22:47:42Keletfowl: And in D there is some template metaprogramming stuff but I mostly ran away.
22:47:50KeletI looked at C++'s Boost once
22:47:56VarriountKelet: We have delegators for the missing-method thing
22:48:00Keletand then I promptly turned off my computer and went to bed.
22:48:21VarriountWith a migraine?
22:48:32EXetoCthat's different in that you need about 10 times the amount of trial and error
22:48:35KeletI don't even understand C++ error messages 95% of the time.
22:49:05KeletI had a parallel and distributed computing course and we primarily used C++.
22:49:12KeletI made my solutions in D and then ported them to C++
22:49:15Keletwas easier that way
22:49:24fowlKelet, nimrods macros are a bit different. the macros are functions that run at compile-time to build AST directly
22:50:20Jehan_Araq: Hmm, a quick test has the overhead for the check in a loop as .290 vs. .235 seconds, approximately.
22:51:01Jehan_An option would be to have two mod operators, of course.
22:51:09AraqJehan_: yeah, was about to suggest that
22:51:27Araqbut in Ada I was always wondering which one to use for highest speed ...
22:51:42Jehan_Anyhow, I've got work tomorrow and need to head off to bed. Night, folks!
22:51:51KeletOne thing I didn't like about Scala is that two things which are functionally equivalent have big speed differences
22:51:56Keletfor example, foreach vs for loop
22:51:57Araqgood night
22:52:06Keletthere were preprocessors made to convert all foreach loops into equiv. for loops
22:52:14*Jehan_ quit (Quit: Leaving)
22:52:15Keletamong other things
22:52:28VarriountGood night Araq
22:52:40AraqVarriount: no, I'm still here
22:52:50AraqI said "good night" to Jehan_
22:52:57VarriountOh, I see.
22:55:06KeletSo do you think using Nimrod's macro is the best way to parse math expressions into procs?
22:55:28KeletWhat I mean is, using it's Nimrod Expression => Corresponding AST conversions
22:55:32Keletin the macro module
22:55:57AraqKelet: that depends onto whether your math expressions are all known at compiletime
22:56:13Araqotherwise you need a real parser
22:56:15brechtmand why not implement them as procs?
22:56:53EXetoCproc f(x: int): int = x * 2 :-p
22:57:36KeletI guess I'll write a real parser, then
22:57:46*Kelet digs his grave an inch deeper
22:59:33brechtmgoodnight
22:59:36*brechtm quit (Quit: leaving)
22:59:58AraqKelet: you can also simply import nimrod's parser and ast modules
23:00:10Araqthough this is likely overkill for math formulas
23:00:38KeletYeah I think I'll just write my own, I guess
23:00:54fowlAraq, whens the last time something you wrote went into an infinite loop
23:01:17Araqrecently in fact
23:01:27Araqwhen I patched the mark and sweep GC for dom96
23:01:43EXetoCnub
23:02:58AraqOrionPK: if it's blocking you you can edit HighRegisterPressure in vmgen.nim; set it to 100 and your example compiles
23:03:07fowlhey guys is this whack/not whack? https://gist.github.com/fowlmouth/d926a6df3036d7ea1c74#file-p3-nim-L123
23:03:35fowli want to hide the generic part since it will affect every rule
23:04:27Araqfowl: looks dangerous but I'm busy
23:05:14KeletNimLime is pretty laggy on my 5ghz intel i5
23:05:16Keletseems suspicious
23:07:58*Kelet goes and tries to copy and paste pieces of lexer.nim
23:08:47*nande quit (Remote host closed the connection)
23:11:23*nande joined #nimrod
23:15:56*zahary quit (Read error: Connection reset by peer)
23:16:14*zahary joined #nimrod
23:16:33Araqgood night
23:16:38Araqthis time for real, Varriount
23:18:26KeletBla = object vs Bla = ref object
23:18:33Keletthe first one uses value semantics ?
23:18:37Keletand the second one doesn't?
23:18:42Araqyes
23:18:53KeletSeems like it could get confusing
23:19:35AraqKelet: most nimrod users are constantly confused about everything
23:20:19AraqI often confuse '+' and * and -
23:21:31Araqand 'proc' vs 'while'
23:21:52reactormonkAraq, stop being sarcastic.
23:22:16reactormonkKelet, `ref` means `reference`. Not sure if the C * is better than that.
23:22:34reactormonk[] is deref, in case you ever need it. But in most cases, the compiler does the deref for you.
23:22:49dom96wow, look at that spike in traffic: https://github.com/Araq/Nimrod/graphs/traffic
23:23:47KeletLet's assume that I'm writing some code using someone else's library, and I don't recognize that he is using value semantics for his type. I then copy it around a lot and it degrades performance. I assume the only way to know concretely is to look at documentation or source code.
23:23:54KeletOr is this not a problem?
23:24:02reactormonkdom96, wow.
23:24:15AraqKelet: that's why we have the T/P convention but people consider it too ugly
23:24:17dom96Kelet: This is where type prefixes are an advantage.
23:24:29Araqso we're getting rid of them
23:24:47KeletBut that's just a convention, right?
23:25:03KeletOr was it enforced somehow
23:25:06reactormonkKelet, I consider IDE help for that as solution.
23:25:08reactormonkKelet, nope.
23:25:56AraqIMHO programmers do not care about readability at all. They pretend they do but in the end it only matters that it *looks* nice and clean.
23:25:59reactormonkAraq, apropos, I don't get anything back in the caas suggest tests where I should get stuff if I add the nilguard
23:26:20Araqreactormonk: so add the nil guard?
23:26:22EXetoCKelet: you can choose to export just the ref symbol
23:26:28KeletSo if I want to program "modern Nimrod" style I should avoid the T and P prefixes?
23:26:33Keletodd
23:26:35reactormonkAraq, yeah, I added it, but then the suggest doesn't provide anything anymore.
23:26:55EXetoCbut the planned changes will make it less obvious
23:26:58Keletto be fair, I never really liked the prefixes in Pascal, but they do serve a purpose.
23:27:04reactormonkKelet, I would actually prefer postfixes ^^
23:27:08EXetoCbut nothing is set in stone
23:27:19KeletTBla = object, PBla = ref object?
23:27:28AraqKelet: actually it's worse in Pascal
23:27:33VarriountHm. Is there a way to add a portion of previously unmanaged memory to the GC?
23:27:41EXetoCKelet: yes, ref or ptr
23:27:43Araqin Pascal T is used for classes which are reference types
23:28:10AraqVarriount: not really but you can wrap it in a 'ref' and give a finalizer
23:29:17*darkf joined #nimrod
23:29:31Keletdarkf: hi :)
23:29:34VarriountAraq: So when the ref is collected, the finalizer will deallocate the unmanaged memory?
23:29:46AraqVarriount: exactly
23:29:56Araqbut I really need to sleep now
23:29:59Araqgood night
23:30:06VarriountGood night.
23:31:25darkfhello Kelet
23:32:23reactormonkskyfex, good work o/
23:35:38Varriountskyfex: I only wish you could have been able to finish it before someone posted it on reddit.
23:38:31EXetoCwhat when how
23:38:55*Skrylar joined #nimrod
23:40:40EXetoCnvm
23:59:59Varriountdom96: I would really like some non-hacky way for my async callbacks to recieve the entire overlapped structure, instead of just choice bits of information.