<< 13-04-2014 >>

00:00:29flaviuOk, you can have the syntax `?[]` syntax compile
00:00:29flaviuthing?["prop"] => StmtList(Infix(Ident(!"?"), Ident(!"thing"), Bracket(StrLit(prop))))
00:01:59*DAddYE quit (Remote host closed the connection)
00:05:42EXetoCdom96: how about a converter?
00:05:54EXetoCor a set of converters in that case
00:06:27dom96how would that work?
00:07:10EXetoCnevermind
00:11:38EXetoCdom96: failed lookups can return an appropriate node that subsequent lookups would handle, and then you eventually arrive at the end safely
00:13:21dom96yes, that will be nil.
00:14:51EXetoCok if it makes sense to use nil
00:34:56*DAddYE joined #nimrod
00:39:15*DAddYE quit (Ping timeout: 250 seconds)
00:40:45EXetoCand then you should be able to use varargs together with [] too
00:41:11EXetoCif you do indeed want a shorter syntax
00:47:13EXetoC`[]`(x: T, y: varargs[U, initNode]) ?
00:49:18reactormonkAraq, btw, how is recalculation of hashes in sets handled in case of a var?
01:00:46*Demos quit (Quit: Lost terminal)
01:29:29*vendethiel quit (Quit: q+)
01:39:50Skrylarbleh. openoffice decided i don't get to have nice things
01:41:22flaviuSkrylar: What are you trying to do?
01:45:34*Demos joined #nimrod
01:57:55*Traverse_ joined #nimrod
01:58:12Traverse_anything like python dictionary type in nimrod?
01:59:06flaviuTraverse_: check out the tables module
01:59:27flaviuhttp://build.nimrod-lang.org/docs/tables.html
01:59:30fowlError: system module needs 'pushFrame'
01:59:50fowlmeh
02:04:45Traverse_flaviu thank u
02:18:24*q66 quit (Quit: Leaving)
02:40:21BitPuffinSkrylar: how come you're using openoffice?
02:40:39BitPuffinI don't know if I've tried the recent versions, are they nice?
02:40:49BitPuffinI hear apache are at least doing something with it
02:40:52VarriountIsn't it LibreOffice now?
02:41:02VarriountOr is LibreOffice a split/fork?
02:41:03flaviuYeah, I was going to ask the same thing?
02:41:27flaviuLibreOffice is a fork, but OpenOffice was pretty much abandoned when Oracle took over
02:41:49BitPuffinflaviu: no, it's an apache project now
02:42:27BitPuffinhttp://www.openoffice.org/
02:42:56flaviuhttps://blogs.apache.org/ooo/ lol
02:43:13BitPuffinVarriount: LibreOffice was forked from Open Office indeed when oracle got it, but then a year or two ago, Oracle gave the project to Apache
02:45:30flaviuLibreOffice still seems to have most the devs
02:52:34SkrylarBitPuffin: i still call it openoffice even though i install libreoffice
02:52:45flaviuYeah, I do the same
02:53:00Skrylarits pedantically incorrect but its basically the same thing
02:53:33flaviuWhat are you trying to accomplish that's frustrating you?
02:53:37Skrylaranyway nimrod was being stupid so i had to make a spreadsheet to calculate out enum values, and then "something"office calc decided LOOKUP() was going to be disobedient on single character values
02:54:20Skrylarso i had to go sort the table by the single character value and manually shove them together
02:57:04EXetoCsounds like productive programming :>
02:59:29*Traverse_ quit (Remote host closed the connection)
03:03:07*Traverse_ joined #nimrod
03:03:11VarriountHm. Is it allowed to "modify" the parameters of templates?
03:03:32Varriountlike "template foo(a) = a.x = 3"?
03:05:01EXetoCit's not really any different, is it?
03:05:33SkrylarEXetoC: another good excuse to learn one's spreadsheet software.. lol
03:06:53flaviuVarriount: Sure, that looks fine
03:07:18flaviuVarriount: https://gist.github.com/flaviut/9474507
03:07:23DemosSkrylar: how is that GUI? I ask because I am decideing if I want to try and be clever and do a novel GUI thing, or if I should just go ahead and make a huge OOP tree
03:07:47SkrylarDemos: my GUI is in an infinite hell of dependency code
03:07:58Traverse_Is nimrod used by some only as a scripting language like python, and if it is does the code get compiled to binary executable first?
03:07:59VarriountSkrylar: Is it cyclic?
03:08:06Skrylarfinagling SDL to work so i can put pixels on the screen so i can deal with the eternal misery of getting shit drawn
03:08:07DemosSkrylar: how so?
03:08:08VarriountTraverse_: Yes.
03:08:32SkrylarDemos: also a gui doesn't need to be a big oop tree
03:08:37DemosSkrylar: just render a big full-screen quad
03:08:40SkrylarFLTK is quite a small oop tree
03:09:10Skrylaranother option is what i plan on doing; just have a generic morph object, and a couple bolt-on things like a decorator
03:09:22Demosright, but I would love something without much OOP at all, I could go the "lots of arrays" approach but I dont know if it will work all that well
03:10:00Skrylarbase object with all the kernel functionality like having a text label and child morphs, then make the drawing behavior bolt-on with a separate object
03:10:03Traverse_Varriount: when using as scripting language is "nimrod c code.nim" still used to compile or is that done differently?
03:10:12Skrylaran integer property and a string property cover a lot of your needs
03:10:20VarriountTraverse_: Yes.
03:10:57Traverse_Varriount: thanku
03:11:28VarriountTraverse_: In a strict sense, nimrod *isn't* a scripting language because it is a compiled language. However with regards to ease of use, it is on a level with most scripting languages.
03:12:05VarriountCanonically, scripting languages are usually interpreted by a high level virtual machine.
03:12:28flaviuNimrod can be interpreted by a virtual machine
03:12:33*DAddYE joined #nimrod
03:13:20VarriountWell yes, but then you lose foreign function access.
03:14:48Skrylaryou can re-enable that
03:15:02*Skrylar looks at coffee mug.
03:15:23SkrylarOn one hand, coffee. On the other hand, enough mentally instabilizing things occured today I'm not sure I *want* to stay awake.
03:24:28VarriountSkrylar: Story time?
03:28:02Demosis there a good way besides just holding on to ref TObjects to pin down a random GC'd object that I do not nessassarly know the type of
03:28:41VarriountDemos: Can you do something funky with destructors/finalizers?
03:28:57VarriountOr just turn off the gc?
03:29:08Demoswhy would I turn off the GC?
03:30:07Demosthe whole point is to be able to reference an object who's lifetime is defined as "until everyone is done with it" and where without the GC I would have to write a bunch of lifetime related code
03:30:20Demosbut I do not /really/ need the type field
03:31:44VarriountDemos: Increment the reference count?
03:32:25Demosmeh, I think I will just use the GC
03:32:26Demoseaiser
03:32:45Demossince I dont really want to write my own ref counting code that is probably slower than the GC
03:32:55VarriountDemos: I mean, the gc allows you to increment the reference count of an object.
03:33:25VarriountDemos: http://nimrod-lang.org/system.html#527
03:33:52*EXetoC quit (*.net *.split)
03:33:53*bstrie quit (*.net *.split)
03:33:53*DAddYE quit (*.net *.split)
03:33:54*zahary quit (*.net *.split)
03:33:55*Skrylar quit (*.net *.split)
03:33:56*OrionPK quit (*.net *.split)
03:33:56*renesac quit (*.net *.split)
03:33:57*icebattle quit (*.net *.split)
03:33:58*oxful__ quit (*.net *.split)
03:33:58*delian66 quit (*.net *.split)
03:33:59*bjz quit (*.net *.split)
03:34:00*eigenlicht quit (*.net *.split)
03:34:02*flaviu quit (*.net *.split)
03:34:03*eximiuswastaken quit (*.net *.split)
03:34:04*CARAM quit (*.net *.split)
03:34:04*zahary_ quit (*.net *.split)
03:34:05*krusipo_ quit (*.net *.split)
03:34:08*musicalchair quit (*.net *.split)
03:34:08*zielmicha_beta quit (*.net *.split)
03:34:09*Raynes quit (*.net *.split)
03:34:11*phI||Ip quit (*.net *.split)
03:34:12*seubert quit (*.net *.split)
03:34:12*cark quit (*.net *.split)
03:34:15*darkf quit (*.net *.split)
03:34:15*Jesin quit (*.net *.split)
03:34:15*BitPuffin quit (*.net *.split)
03:34:15*Zuchto quit (*.net *.split)
03:34:18*psquid_ quit (*.net *.split)
03:34:20*fowl quit (*.net *.split)
03:34:21*Ycros quit (*.net *.split)
03:34:22*betawaffle quit (*.net *.split)
03:34:23*CarpNet quit (*.net *.split)
03:34:24*mal`` quit (*.net *.split)
03:34:25*comex quit (*.net *.split)
03:34:25*silven quit (*.net *.split)
03:34:26*noam quit (*.net *.split)
03:34:27*tumak quit (*.net *.split)
03:34:27*reloc0 quit (*.net *.split)
03:34:29*JStoker quit (*.net *.split)
03:34:29*Araq quit (*.net *.split)
03:34:29*Amrykid quit (*.net *.split)
03:34:30*dom96 quit (*.net *.split)
03:34:34*epsylon quit (*.net *.split)
03:34:36*rixx quit (*.net *.split)
03:34:37*flyx quit (*.net *.split)
03:34:37*reactormonk quit (*.net *.split)
03:34:38*iNode001 quit (*.net *.split)
03:34:38*mac01021_ quit (*.net *.split)
03:34:38*Roin_ quit (*.net *.split)
03:34:39Demosyeah I guess, I will keep that in mind if I really need it. but I probably will not
03:34:39Demosjust stick a ref TObject in and I am good to go
03:35:05VarriountWoah, that's a lot of netsplits.
03:35:20*Demos hugs nimbot
03:35:28Demosat least we still have nimbot
03:37:41VarriountDarn, And I just got the linux implementation of GetFileInfo working, too.
03:39:53Demoshm so I am writing a little bit of code that lets you take a typeclass that looks like an interface and get a "real" object that has closures to access those bits of the object satisfying the typeclass, neat stuff....
03:40:36VarriountI'm stuck with two incompatible file handle types.
03:41:53Varriountthe getFileInfo procedure needs to take a handle, however nimrod file handles are the type handled by the c std library.
03:42:56VarriountThis is fine on posix, however on windows, the procedures I call to get file information take *native* handles, such as obtained by createFile
03:51:06VarriountDemos: Windows is wierd, who would have known: http://msdn.microsoft.com/en-us/library/ks2530z6%28v=VS.100%29.aspx
03:55:21*Traverse_ quit (Quit: Leaving)
04:20:04*Demos quit (Ping timeout: 245 seconds)
05:16:44*Raynes joined #nimrod
05:16:44*zielmicha_beta joined #nimrod
05:16:44*musicalchair joined #nimrod
05:16:44*epsylon joined #nimrod
05:16:44*JStoker joined #nimrod
05:16:44*Zuchto joined #nimrod
05:16:44*BitPuffin joined #nimrod
05:16:44*darkf joined #nimrod
05:16:44*fowl joined #nimrod
05:16:44*Ycros joined #nimrod
05:16:44*psquid joined #nimrod
05:16:44*rixx joined #nimrod
05:16:44*mac01021_ joined #nimrod
05:16:44*flyx joined #nimrod
05:16:44*reactormonk joined #nimrod
05:16:44*iNode001 joined #nimrod
05:16:44*Roin_ joined #nimrod
05:17:01*DAddYE joined #nimrod
05:17:01*zahary joined #nimrod
05:17:01*Skrylar joined #nimrod
05:17:01*OrionPK joined #nimrod
05:17:01*renesac joined #nimrod
05:17:01*icebattle joined #nimrod
05:17:05*comex joined #nimrod
05:17:05*silven joined #nimrod
05:17:05*noam joined #nimrod
05:17:05*tumak joined #nimrod
05:17:05*reloc0 joined #nimrod
05:18:13*Araq joined #nimrod
05:18:13*Amrykid joined #nimrod
05:18:13*dom96 joined #nimrod
05:18:19VarriountYay! I'm no longer alone!
05:18:26*eximiuswastaken joined #nimrod
05:18:26*CARAM joined #nimrod
05:18:26*zahary_ joined #nimrod
05:18:26*krusipo_ joined #nimrod
05:18:39*oxful__ joined #nimrod
05:18:39*delian66 joined #nimrod
05:18:39*bjz joined #nimrod
05:18:39*eigenlicht joined #nimrod
05:18:44*phI||Ip joined #nimrod
05:18:44*seubert joined #nimrod
05:18:59VarriountAraq: I finished the Posix and Windows implementation of getFileInfo.
05:24:27renesacVarriount, you could have talked about 'nimrod i'
05:24:49renesacnot exactly scripting, but...
05:24:55Varriountrenesac: That probably wouldn't have given a good impression of nimrod.
05:25:23renesacit's been a while since I tried
05:25:29renesacand many fixes to the new VM
05:25:31VarriountThe VM works well for macros and templates, but without a functioning FFI, things are *very* limited.
05:25:48renesacright...
05:26:15renesacstill, nimrod with the command call syntax should be great for a interpreter prompt
05:26:21renesaceasy to type
05:26:28VarriountAnyway, I found a cool windows-only c runtime function that turns a C file descripter into a windows file handle.
05:27:39renesacin linux you can create filesystems for the most different things
05:27:56renesacI'm not sure if the same is possible or not
05:28:15Varriountrenesac: You mean, for windows?
05:28:33renesacfor linux
05:28:55VarriountNo, "I'm not sure the same is possible or not".. for windows?
05:29:04renesacfor linux
05:30:18Varriountrenesac: Are you running Linux/Posix OS at the moment?
05:30:47renesacyes, on a VM
05:30:55*cark joined #nimrod
05:30:55*betawaffle joined #nimrod
05:30:55*CarpNet joined #nimrod
05:31:57Varriountrenesac: Could you test this procedure implementation for me? I'm on Windows at the moment, and don't have a virtual environment free.
05:32:24renesacmaybe
05:32:29renesacI'm going to sleep soon
05:36:47Varriountrenesac: https://gist.github.com/Varriount/10570686
05:37:23renesachow to use that?
05:37:50VarriountDownload it, compile, and run the resulting executable
05:38:21*[1]Endy joined #nimrod
05:38:41VarriountIt should print out some information about the executable file itself.
05:39:05renesac[id = [Field0 = 64512,
05:39:05renesacField1 = 955991],
05:39:05renesackind = pcFile,
05:39:05renesacsize = 184146,
05:39:05renesacpermissions = {fpUserExec, fpUserWrite, fpUserRead, fpGroupExec, fpGroupRead, fpOthersExec, fpOthersRead},
05:39:07renesaclinkCount = 1,
05:39:09renesaclastAccessTime = 1397367519,
05:39:11renesaclastWriteTime = 1397367518,
05:39:13renesaccreationTime = 1397367518]
05:39:50VarriountAh good, then it works.
05:39:55VarriountThanks renesac
05:41:49renesac^^
05:54:56*mal`` joined #nimrod
05:56:11*Traverse_ joined #nimrod
06:13:10*BitPuffin quit (Ping timeout: 258 seconds)
06:36:06AraqVarriount: you don't need the variant with result: var FileInfo for you FileInfo object. The compiler generates the same code for the other proc
06:36:46Araqoh wait
06:37:06Araqin one version you open/close the handle, in the other you don't
06:37:40Araqbut anyway, proc getFileInfo*(handle: TFileHandle, result: var FileInfo)
06:37:47Araqcan be:
06:37:57Araqproc getFileInfo*(handle: TFileHandle): FileInfo
06:41:09NimBotAraq/Nimrod devel 3f3014f flaviut [+0 ±1 -0]: Koch deletes the .gitignore while cleaning
06:41:09NimBotAraq/Nimrod devel ed0736d Andreas Rumpf [+0 ±1 -0]: Merge pull request #1079 from flaviut/kochcleanfix... 2 more lines
07:11:34VarriountAraq: You saw the wrapper proc for _get_osfhandle, right?
07:13:06Araqno
07:14:32VarriountAraq: Updated the gist.
07:15:20Araqhmm I think I wrapped that before
07:15:32Araqand didn't have to use 'header'
07:17:04Araqno, I'm wrong
07:17:08Araqso what about it?
07:17:49VarriountAraq: I dunno. I'm just excited that something like that exists. :D
07:18:01VarriountIt's probably due to me being awake at 3 in the morning.
07:18:57*epsylon is now known as Guest69942
07:18:57*JStoker is now known as Guest59113
07:19:22VarriountAraq: What did you mean by "the compiler generates the same code for the other proc"?
07:19:41VarriountDo you mean, the C compiler, or the Nimrod compiler?
07:20:49Araqthe C compiler in this case, but nimrod does it for other cases
07:22:24VarriountAraq: But couldn't you also use a procedure of that form to save memory? By, say, passing the same FileInfo object to the procedure when scanning for a particular file?
07:23:18Araqno. again, the compiler generates the same code for both.
07:33:43VarriountAraq: Where does the compiler output stuff for the '--genScript' option?
07:33:53Araqin nimcache
07:34:05Araqbbl
07:34:22VarriountNo I mean, in the compiler code. I want to fix --genscript
07:52:29*delian66 quit (Ping timeout: 240 seconds)
08:10:44*Matthias247 joined #nimrod
08:37:18*psquid quit (Ping timeout: 276 seconds)
08:44:12*DAddYE_ joined #nimrod
08:44:12*DAddYE quit (Read error: Connection reset by peer)
08:55:47*psquid joined #nimrod
09:16:13AraqVarriount: extccomp.nim iirc
09:18:14*cark quit (*.net *.split)
09:18:16*betawaffle quit (*.net *.split)
09:18:17*CarpNet quit (*.net *.split)
09:19:33*cark joined #nimrod
09:19:33*betawaffle joined #nimrod
09:19:33*CarpNet joined #nimrod
09:25:13*io2 joined #nimrod
09:43:29*vendethiel joined #nimrod
09:46:45*delian66 joined #nimrod
09:51:19*[2]Endy joined #nimrod
09:54:29*[1]Endy quit (Ping timeout: 240 seconds)
09:59:21*[1]Endy joined #nimrod
10:00:33*delian66 quit (Quit: Terminated!)
10:01:33*[2]Endy quit (Ping timeout: 245 seconds)
10:04:22*DAddYE_ quit (Remote host closed the connection)
10:05:23*Traverse_ quit (Quit: Leaving)
10:11:34*Guest59113 quit (Changing host)
10:11:34*Guest59113 joined #nimrod
10:11:34*Guest59113 is now known as JStoker
10:32:02*EXetoC joined #nimrod
10:37:30*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
10:45:25*bjz_ joined #nimrod
10:48:29*bjz quit (Ping timeout: 240 seconds)
11:00:58dom96hello
11:01:40Araqhohoho
11:02:14dom96wassuuuppp
11:03:16AraqI noticed zahary implemented "distinct with" in the parser
11:11:33dom96what would do that?
11:11:37dom96*that do
11:12:15Araqtype Foo = distinct int with `==`, `.`, `+`
11:14:28dom96ooh, that's nice
11:22:51*vendethiel quit (Remote host closed the connection)
11:24:36Araqwe likely need that for 'object' too though
11:25:04Araqit's annoying to have a default '==' for object, but it's also annoying not ot have it
11:25:48Araqbtw what's "docker"?
11:25:48*vendethiel joined #nimrod
11:26:36EXetoCit's useful. at least now that array types can be compared :>
11:27:04AraqI reverted that iirc, EXetoC
11:27:22Araqarray[char] vs cstring is an annoying conflict
11:30:16EXetoCit works
11:38:43Araqbbl
11:47:20reactormonkAraq, isn't one an alias of another?... oh, trailing zero.
12:00:40dom96Araq: Yep. It works :D
12:09:24*q66 joined #nimrod
12:09:24*q66 quit (Changing host)
12:09:24*q66 joined #nimrod
13:04:01dom96Araq: Buffering makes a dramatic difference: ~4.5 sec vs. ~2.4 sec
13:04:29dom96Go does it in ~1.8
13:07:53dom96We have a memory leak heh
13:25:21*darkf quit (Quit: Leaving)
13:26:07*flaviu joined #nimrod
13:42:38dom96Araq: I need your help :\
13:45:52*xenagi joined #nimrod
13:58:27*Amrykid quit (Changing host)
13:58:27*Amrykid joined #nimrod
14:01:10*BitPuffin joined #nimrod
14:06:28*Matthias247 quit (Read error: Connection reset by peer)
14:13:04*BitPuffin quit (Quit: WeeChat 0.4.3)
14:16:08*BitPuffin joined #nimrod
14:23:58*Mordecai joined #nimrod
14:24:20*Mordecai is now known as Guest40072
14:26:33*psquid quit (Ping timeout: 245 seconds)
14:46:55*io2 joined #nimrod
15:09:07*Guest40072 is now known as psquid
15:33:44NimBotAraq/Nimrod devel 3612aca Dominik Picheta [+0 ±3 -0]: Implemented buffering for asynchronous sockets.
15:34:32*[2]Endy joined #nimrod
15:37:33*[1]Endy quit (Ping timeout: 250 seconds)
15:45:46*flaviu left #nimrod (#nimrod)
15:52:29*psquid quit (Ping timeout: 240 seconds)
15:53:12*psquid joined #nimrod
15:54:54*Mordecai joined #nimrod
15:55:12*Mordecai is now known as Guest3648
15:58:13*psquid quit (Ping timeout: 245 seconds)
16:12:37*psquid joined #nimrod
16:13:31*Guest3648 quit (Ping timeout: 250 seconds)
16:44:24*OrionPK quit (Read error: Connection reset by peer)
16:46:09*OrionPK joined #nimrod
16:47:48*cark quit (Read error: Connection reset by peer)
16:48:07OrionPKphew
16:48:21OrionPKblog is much much faster now that I got my cubox on ethernet instead of wlan
16:51:20*flaviu joined #nimrod
16:52:39xenagiOrionPK, you blog?
16:53:04*cark joined #nimrod
16:55:59*psquid quit (Ping timeout: 250 seconds)
16:57:23*psquid joined #nimrod
17:01:31OrionPKtry to
17:02:05*psquid quit (Ping timeout: 240 seconds)
17:04:12xenagilink?
17:04:42flaviuxenagi: http://www.eoleary.me/
17:05:06xenagiah thx
17:05:20OrionPKnot much up there yet
17:07:03xenagii look forward to seeing more Nimrod posts :)
17:09:00*flaviu left #nimrod (#nimrod)
17:14:52*psquid joined #nimrod
17:24:53*Mordecai joined #nimrod
17:25:14*Mordecai is now known as Guest96814
17:25:26Araqdom96: I'm here now
17:26:02dom96ok, what's the best way to figure out where the leak is coming from?
17:26:40Araqtry to use the memory profiler
17:27:11*psquid quit (Ping timeout: 250 seconds)
17:28:11fowlahoy Araq
17:28:11dom96ok
17:28:21Araqfowl: what's up?
17:28:48fowlAraq, i tried to add the auto-initialization stuff for string, i have to move around stuff in system.nim, but moving things around causes a weird error
17:28:55fowl"Error: system module needs 'pushFrame'"
17:29:03Araqthat's not weird :P
17:29:35*Guest96814 quit (Ping timeout: 252 seconds)
17:29:38Araqyou need to move it around differently or ensure the new stuff is in a stacktrace:off section
17:29:59dom96Araq: argh, what do you call the doc describing profiling?
17:30:02fowlbrb though i have to run to the store
17:30:30Araqprofile_results.txt iirc
17:30:42dom96Araq: no. The documentation.
17:31:51Araqdoc/estp.txt
17:32:01Araqand yeah, feel free to rename it
17:32:57dom96We need a link to it from the doc page on the website.
17:33:14Araqit's in the tools section
17:33:49dom96I don't see a tools section here: http://build.nimrod-lang.org/docs/documentation.html
17:34:11Araq"Tools documentation"
17:34:21Araqit's there
17:34:39dom96oh
17:34:45dom96Gah. It's too easy to miss that.
17:35:13dom96and the tools page should expand the acronyms
17:35:52Araqit does that
17:36:02dom96in the link
17:36:15dom96not in the sentence below
17:37:10renesacabout that documentation page
17:37:51renesacthe 'User guide' title should really have the word 'compiler' somewhere in it
17:39:04renesaclike "Compiler Options", "Compiler User Guide" or something
17:39:55renesacand the 'Manual' should be something like 'Language Manual/Specification (beta)", and should be higher in that page...
17:39:57dom96Araq: ugh, no file is generated
17:40:33renesaclike between tutorial (part II) and the Library documentation
17:40:52dom96renesac: I agree.
17:41:03dom96renesac: Could you make a PR for that?
17:41:52*Guest96814 joined #nimrod
17:42:03renesacok, but I still haven't rebased my git and I will be away now
17:42:04renesacso latter
17:42:22dom96Can't you just refork?
17:42:49renesacyeah, probably
17:42:55renesacI still haven't look into that
17:43:26renesacI was just modifying the tutorial 1 when that happen, but it is easy to diff it and replace in the new fork
17:43:42renesac*happened
17:46:58*Guest96814 quit (Ping timeout: 245 seconds)
17:47:08*Guest96814 joined #nimrod
17:48:17Araqdom96: well I recently used it myself and it worked for me
17:48:21*psquid joined #nimrod
17:51:53*Guest96814 quit (Ping timeout: 250 seconds)
17:52:17dom96Araq: now it created an empty file...
17:52:23dom96Araq: Can you please try it?
17:52:41Araqlater, ok?
17:53:13dom96ok
17:54:14*psquid_ joined #nimrod
17:56:57*psquid quit (Ping timeout: 276 seconds)
18:29:11*Matthias247 joined #nimrod
19:03:58Skrylarrenesac: there is also cherrypick and patch exporting
19:04:40Skrylari forget the command to do it exactly, but there is a command to tell git "take these last X commits, give patches for those" and then you carry it over to the other repository and say "apply this patch"... it'll keep the author/timestamp information too
19:07:15dom96renesac: if you haven't committed you can also just do: git diff > diff.txt and then git apply diff.txt in your new fork.
19:11:15*flaviu joined #nimrod
19:11:45EXetoCshould we keep the gl prefix?
19:12:32EXetoCsome might consider it excessive to remove it all of a sudden, but I could maybe do that in another module that provides a high level interface
19:19:25EXetoCand I don't really care for the OpenGL types. they are just fixed aliases
19:24:01EXetoCI could do that in another module that maybe only supports OpenGL 3+
19:34:13*nande joined #nimrod
19:34:23*Fernandos joined #nimrod
19:34:37*Varriount_ joined #nimrod
19:36:33*Varriount quit (Ping timeout: 245 seconds)
19:38:25*DAddYE joined #nimrod
19:52:11*DAddYE quit (Read error: Connection reset by peer)
20:04:00BitPuffinEXetoC: I dunno
20:04:03BitPuffinI'd say keep gl
20:08:26NimBotAraq/Nimrod devel fac9947 Grzegorz Adam Hankiewicz [+0 ±1 -0]: Adds generic split proc to sequtils.
20:08:26NimBotAraq/Nimrod devel c3cb03c Grzegorz Adam Hankiewicz [+0 ±1 -0]: Renames split to distribute. Refs #1084.
20:08:26NimBotAraq/Nimrod devel bb94abd Simon Hafner [+0 ±1 -0]: Merge pull request #1084 from gradha/pr_adds_sequtils_split... 2 more lines
20:11:12*DAddYE joined #nimrod
20:11:49Araqhi Fernandos welcome
20:11:56AraqEXetoC: keep gl
20:14:56*DAddYE quit (Remote host closed the connection)
20:17:58dom96Araq: Which do you prefer? x.str("test"/0/"foo", "default") or x["test", 0, "foo"].default("default")
20:18:03dom96Assuming the latter is even possible.
20:19:44Araqthe latter seems harder to do
20:19:47flaviudom96: The latter is possible
20:19:57Araqthe former is just fine
20:20:12dom96But now that I think about it, something which would allow the following might be better: let f = x["test"]; f[0] # still works if f is nil.
20:20:28dom96Perhaps, x?["test"] ?
20:20:35dom96(If possible)
20:21:06Araqjust pick something, it doesnt matter
20:21:39dom96it does, I wanna put it in the json module
20:22:05flaviudom96: Thats also possible, but I think you need a macro on `?`
20:22:12EXetoCAraq: I suggested a converting varargs parameter
20:22:45flaviudom96: Why not just change `[]` so that if the PJson is nil, it returns nil?
20:22:47EXetoCwhich shouldn't make it that difficult
20:23:17EXetoCjust have it implicitly convert to some variant type
20:24:04EXetoCand you said the former is fine so nvm
20:24:33Araqdom96: flaviu's idea has some merit
20:24:46dom96Yep. I like it.
20:25:12dom96I will also simply add overloads for str, num and other accessor which take a default value
20:28:13EXetoCBitPuffin: keep the prefix where? in 'opengl' obviously, but it can be omitted in gl3 or something
20:28:32EXetoCand then there's 'gl' which seems to be ancient. should I just remove it?
20:29:07EXetoCI could re-use it, but gl3 is more obvious
20:33:05Araqdunno, versionized module names suck
20:34:32fowlAraq, the only thing in system.nim thats in stacktrace:off blocks is min/max/abs
20:35:02Araqfowl: that's because the other procs don't have a body
20:35:16Araqonly a proc body triggers generation of pushFrame
20:35:21fowlah
20:38:26NimBotAraq/Nimrod devel d96f256 Araq [+0 ±4 -0]: implemented 'R ptr T' syntax
20:38:26NimBotAraq/Nimrod devel 817337a Araq [+0 ±5 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
20:42:57Skrylarso i have multiple compilers to jiggle around now, since apparently the github was fiddled with
20:43:05SkrylarGCC is still driving me insane with the "no drive" nonsense
20:43:16dom96Araq: This means that `[]` for JArray will no longer raise an EInvalidIndex exception
20:43:18dom96Is that fine?
20:43:57Araqno. and it doesn't mean that
20:44:15Araqyou can easily make 'nil' return 'nil' but do the bounds check if there is an array
20:44:32fowlR ptr T not nil
20:44:48dom96But then I can't chain things nicely.
20:45:01dom96Which is the whole point of this.
20:45:06Araqyes you can
20:45:13dom96how?
20:45:20fowlAraq, id like to be able to do ptr[region, object]
20:45:41Araqfowl: that's possible too already
20:46:01fowli mean just"object" as in "ptr object"
20:46:23Araqgah that's nasty
20:46:56Araqdom96: a[10] # if 'a' is nil, the whole expression is nil.
20:47:04Araqthat should suffice for chaining
20:47:43fowlnil usually wrecks any efforts at chaining
20:47:43dom96but if `a` does not have enough elements I will get an exception
20:48:15dom96so to be safe I will need to check the length of 'a' which breaks chanining
20:48:17dom96*chaining
20:48:28dom96Also, I just tried: parsed["key2"][12123].str("This should fail.")
20:48:48dom96Error: identifier expected, but found '[]([](parsed, "key2"), 12123).str'
20:54:13Araqweird
20:58:32flaviuDo seqs always do bounds checks?
20:59:12Araqflaviu: not in -d:release mode
21:03:51flaviuOk, pull request sent for the JSON thing. https://github.com/Araq/Nimrod/pull/1089
21:04:30reactormonkflaviu, description plz
21:04:47reactormonkflaviu, hmm, maybe not needed. Sorry.
21:04:59reactormonkbut tests help
21:05:28flaviuOk, give me a few seconds
21:05:41*[2]Endy quit (Ping timeout: 240 seconds)
21:13:48Araqglld
21:13:52Araqgood night
21:14:49BitPuffinEXetoC: but we already have gl3
21:17:54dom96Maybe we should finally include a Maybe monad in the stdlib and just implement this JSON thing using Maybe?
21:20:45flaviureactormonk: Oh, tests done
21:21:36flaviuOk*
21:25:35dom96'undefined'? They're not undefined. The result is perfectly defined: an EInvalidIndex exception will be raised.
21:26:17dom96I would prefer a solution which does not raise that exception.
21:26:26flaviudom96: See Araq's response at 25 minutes ago
21:26:50flaviu'flaviu: Do seqs always do bounds checks? Araq: flaviu: not in -d:release mode'
21:28:54BitPuffindom96: writing a nimrod web thingy
21:28:58BitPuffinlibrary thing
21:29:46dom96flaviu: It's a segfault in release mode then.
21:29:52dom96The result is still defined though.
21:30:30flaviuI think the exception should be guaranteed
21:30:47dom96I think so too.
21:30:58flaviuOk, so I'll do that
21:31:17EXetoCyes, the common version should be the safe one
21:31:20Fernandoshi Araq :) sorry was watching an awesome movie →"The Machine"
21:31:34EXetoCand then you can omit it if you really really need it
21:31:41dom96hey Fernandos. I actually watched that movie yesterday hah
21:31:49dom96Got bored of it halfway though.
21:32:12dom96flaviu: I still think that we need something which is guaranteed to be safe.
21:32:23Fernandosdom96: Why is that? I found myself bored with "Her" right at the beginning..
21:32:31dom96To always give the default value if for some reason it cannot retrieve the value you asked for.
21:33:33EXetoCis that what people want more often?
21:33:37dom96Fernandos: Havne't watched Her yet but I really want to. Dunno, the story just didn't really interest me after a while.
21:33:58dom96EXetoC: I think so.
21:34:22EXetoCok
21:34:22dom96Otherwise like I said you need to write a lot more code to do these checks manually
21:34:29dom96or risk a crash
21:35:03Fernandosdom96: Interesting. Must have been an expectation you've set, that wasn't matched. I had none, maybe that's why I was impressed. :)
21:35:22FernandosAre you guys talking about formal verification or type safety?
21:37:47EXetoCdom96: yeah but you either want a default value or to know. there's no need to crash either way
21:37:53EXetoCbut the only difference is the last call, right?
21:38:05EXetoCok it depends
21:39:07flaviuI don't think you should be hard-coding array indexes. If you need them hard coded, promote them to fields.
21:42:04EXetoCI ended the first sentence early
21:42:20FernandosAre there even ways to formaly verify nimrod code? (I know there are for C, but I'm speaking of nimrod specifically)
21:42:46EXetoCI mean, you either want a default value, or you want it to fail if lookup fails. but I don't know what people want in general
21:43:52EXetoCmaybe by crash you unhandled exceptions too
21:45:01EXetoCgrammar fail..
21:51:03flaviuOk, dom96, Varriount_ I fixed those things
21:51:48flaviuIt now always throws an exception on invalid accesses
21:51:55flaviuin arrays that is
21:52:14dom96flaviu: You have to when parsing JSON
21:52:52flaviuI don't understand what you mean
21:53:17EXetoCparsing?
21:53:52dom96flaviu: How do you promote them to fields?
21:54:32EXetoCare you complaining about the hardcoded index?
21:54:46*psquid joined #nimrod
21:54:46EXetoCit doesn't have to be
21:55:27flaviudom96: When writing your json, do { "a":[2,3,4,5], "theanswer": 42} instead of { "a": [42/*This number is really important*/,2,3,4,5] }
21:55:56dom96flaviu: Er, what if I'm not the one writing the JSON?
21:56:31*psquid_ quit (Ping timeout: 252 seconds)
21:56:52BitPuffinwow staring at the word "session" for too long tells you what an ugly word it is
21:57:00BitPuffinyou start to wonder if it's really spelled that way
21:57:04flaviuThen you'd have to add a bit of boilerplate to make sure indexes are in range or realize that if your hard-coded indexes are incorrect then the JSON you're looking at is malformed
21:57:51dom96exactly.
21:57:55dom96I want to avoid that boilerplate
22:01:00flaviudom96: I really can't see a place where hard array accesses are part of a json schema
22:01:18EXetoClike I said, what about those that aren't?
22:02:07flaviuEXetoC: What do you mean? Like in a loop?
22:02:07*Varriount_ is now known as Varriount
22:02:17Varriountflaviu: Fixed what things?
22:02:19EXetoCI guess
22:03:12flaviuVarriount: Added tests and an description, like you asked in your comment
22:03:26Varriountflaviu: Thanks
22:03:32flaviuMight want to hold up on pulling, though
22:04:47dom96flaviu: That's a good point. But there will always be someone who decides that hard-coding indexes is a good idea.
22:05:16BitPuffinwut Error: internal error: computeRecSizeAux()
22:05:19BitPuffinNo stack traceback available
22:06:03BitPuffinseriously
22:06:09BitPuffinwill the compiler ever let me write any code
22:06:15flaviuEXetoC: If you schema says that the json array is of a certain, hardcoded length, it should throw because that property obviously doesn't hold and the json is malformed. If you're basing the loop off of len, you shouldn't have any problems with exceptions.
22:06:32BitPuffinI have the nimrod bug curse or something
22:06:47Skrylar:/
22:06:48EXetoCflaviu: I didn't imply hardcoded values
22:06:52Skrylari need a vial of acid to dump on gcc
22:07:12EXetoCbut I suppose it's common to just want to get the whole array right away
22:09:39BitPuffinwell
22:09:47BitPuffindid an issue report
22:09:49BitPuffinbut it's like
22:09:52EXetoCdom96: so you generally want a default value rather than having som error raised in that case?
22:10:00EXetoCI'm not sure if your answer was relevant
22:10:18BitPuffinhey run in to compiler bug, well ok then I'll do a side project while waiting for that to get fixed, and this doesn't do any generic voodoo so I should be fine
22:10:20BitPuffinnop
22:10:23flaviudom96: Then why make it easy? Failing silently will just lead to issues later on, where they'll be harder to track down.
22:10:24BitPuffinhttps://github.com/Araq/Nimrod/issues/1090
22:10:37EXetoCflaviu: it depends on whether or not you care about an absent value
22:10:40BitPuffincan anyone see anything extremely wrong just by looking at that? I hope it's my fault raher than the compiler
22:10:55BitPuffinalthough then the compiler wouldn't say internal error I guess
22:10:59flaviuBitPuffin: ICEs are always bugs
22:11:02EXetoCI'm just trying to figure which approach is more common, thus optimizing for convenience
22:11:29BitPuffinmm
22:11:29dom96I guess iterating over a JSON array is far more common than accessing some hard-coded index.
22:11:43dom96So I see what you meant now flaviu .
22:11:46EXetoCisn't this about lookups in general? string or not
22:12:14BitPuffindom96: well at least you can see what kind of web thing I'm writing lol
22:12:59dom96BitPuffin: You know why you're cursed?
22:13:04dom96Because you're using a Mac :P
22:13:21BitPuffindom96: Yeah you are probably right, could try it out on my laptop
22:13:25flaviuEXetoC: Json object field lookups do allow you to supply a default result, array lookups don't
22:13:36dom96BitPuffin: try with --threadAnalysis:off
22:13:45EXetoCflaviu: where?
22:13:53EXetoCnvm
22:13:56EXetoC:p
22:13:58BitPuffindom96: still an ICE
22:14:01BitPuffinweird
22:14:12BitPuffindom96: however I was cursed when I wasn't using a mac as well
22:14:48BitPuffinFor some reason I'm considering going to work
22:14:50flaviuMy reasoning is that fields can be optional, but if you treat arrays as a bunch of fields there's going to be problems with optional index-as-fields
22:14:57BitPuffinI didn't get up until like 16:00 today
22:15:13dom96BitPuffin: Same error on Linux
22:15:21BitPuffindom96: ha! :)
22:15:25dom96er
22:15:27dom96I mean Windows
22:15:30dom96wtf am I saying
22:15:36BitPuffinyou're saying BULLSHIT
22:15:46BitPuffinnon, non, I'm just kidding monsieur
22:16:17flaviuI get a traceback on linux
22:16:33EXetoCflaviu: either way, should you differentiate between those cases in the interface? I don't know
22:16:33BitPuffinadd it as a comment on the issue then would you kindly
22:17:00flaviuThat's what I was doing :P
22:17:13BitPuffingood
22:18:38flaviuSomeone in the compiler seems to like `- 1` for some reason
22:19:26flaviuThere's a space between - and 1, not as obvious with variable-width fonts
22:19:28BitPuffingit blame to find out whom
22:19:41flaviuI did that, IIRC it was Araq
22:19:45EXetoCI always include spaces
22:19:49flaviuIt was a while ago
22:21:05flaviuThis particular case was Araq. All the way back from when it was pascal
22:21:39dom96BitPuffin: Found the cause of the crash
22:21:49dom96s/TThread/TThread[void]/
22:22:28BitPuffinah
22:22:36EXetoCflaviu: oh, unary minus? it doesn't make sense then
22:25:32flaviuSomeone should also clear out the cobwebs, there are lots of `when false:` and commented code
22:25:32*io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist)
22:37:10flaviuOh, that makes sense. In pascal `37.5 * -2` is invalid, but `37.5 * (-2)` is valid, he's just emphasizing that its an operation like any other
22:37:54EXetoCand it's not some code that was ported?
22:38:21flaviuNo, it is code that was ported
22:39:34flaviuIt just a pascal best-practice that was not translated correctly into an everything-else best-practice
22:39:50flaviuAt least that's what it looks like
22:39:59EXetoCyes that explains it
22:41:14BitPuffindom96: odd: Error: invalid type: 'TTimeInterval'
22:41:50dom96what's the code?
22:42:24BitPuffinah
22:42:26*Fernandos quit (Ping timeout: 252 seconds)
22:42:29BitPuffincan't store them in a const
22:42:32BitPuffinwhich I find odd
22:47:41EXetoCis "macro x(f: stmt): stmt = f" a valid pragma?
22:49:31*darkf joined #nimrod
22:58:39EXetoCI was doing something else wrong
23:00:14*brson joined #nimrod
23:01:57EXetoCI was applying pragmas to foreign procs, but there's limited support for that I think
23:02:08dom96BitPuffin: So what are you coding exactly?
23:05:01EXetoCI want to wrap them in error handling procs, so I guess I need to put all the signatures in a pragma block instead
23:05:02*Matthias247 quit (Read error: Connection reset by peer)
23:12:44BitPuffindom96: a multithreaded session store
23:13:38BitPuffindom96: initially I was just gonna have it be a part of my webapp but then I realised that certain people in the nimrod community are not doing sessions properly, ie they are sending people's password hashes unencrypted back and forth over the internet :P
23:14:16fowlEXetoC, you can always do proc foo(x:int) = proc private(x:cint): cint; result = private(x); check result
23:14:37fowlEXetoC, i mean use importc/dynlib on the inner proc
23:21:49EXetoCI want to rely as little as possible on patching together snippets of code though
23:23:54EXetoCwell, reduce code size really
23:55:55*Revised joined #nimrod
23:56:26Revisedwhat is the method to extend a sequence once set?
23:57:58*Revised quit (Quit: Leaving)
23:59:23BitPuffindom96: I'm kinda confussled on how to make it thread safe though. I'm thinking that when you create the session store it divides the store in to n number of substores, one for each thread. And when you ask for a session via id, the id contains info on which substore it is in and it will go to that therad. The idea is that the gensession proc will generate a new session in the thread that has the least
23:59:25BitPuffinsessions in it for load balancing sort of
23:59:28BitPuffinthat should prevent locking
23:59:43BitPuffinbut it doesn't prevent the fact that one thread might get bombarded with requests
23:59:59BitPuffinbut it's the only way I can think of without having to lock