<< 19-02-2014 >>

00:01:38BitPuffinhehe
00:04:21BitPuffinAraq: does not solve the issue
00:04:49filwiti remember when there was less than 100 issues in the tracker...
00:07:27*Matthias247 quit (Read error: Connection reset by peer)
00:09:13*carum joined #nimrod
00:10:43*EXetoC joined #nimrod
00:17:54*musicalchair quit (Ping timeout: 260 seconds)
00:18:22*brson quit (Ping timeout: 260 seconds)
00:18:37*brson joined #nimrod
00:19:07*musicalchair joined #nimrod
00:20:11*io2 quit ()
00:20:23*zahary1 quit (Quit: Leaving.)
00:20:47*darkf joined #nimrod
00:23:07*carum quit (Remote host closed the connection)
00:33:13*vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
00:35:33renesacvbtt: it seems I need a function that expects a closure iterator to use it
00:36:41renesacEXetoC, I wan't to pass a seq[int] to a function that expects a openarray[float], so the inner type needs to be converted
00:36:51renesacsorry for the delay in answering
00:37:34*zahary1 joined #nimrod
00:40:07*zahary quit (Ping timeout: 260 seconds)
00:40:50*carum joined #nimrod
00:45:41*carum quit (Remote host closed the connection)
00:46:48*carum joined #nimrod
01:00:05EXetoCrenesac: I think you should just convert the elements. that's what you'll be doing either way
01:02:09EXetoCand now we have a more convenient map function called mapIt, in sequtils
01:04:10renesacyeah, but it introduces a memory overhead
01:04:44renesaca whole new seq must be allocated, created and then discarded before returning from the called function
01:04:44VarriountPfft, optimize later.
01:04:44EXetoCyou'll need to modify the proc then
01:05:21renesacactually, the proc accepts any type, but I want to run it as float
01:05:22renesac:P
01:05:52EXetoCyeah. a lot is copied by default, and most of the time it doesn't matter
01:05:58renesac(calculate the mean of a int array/seq)
01:06:07renesacfor math.nim
01:06:31renesacI basically reimplemented 'sum' inside mean
01:06:46renesacbut maybe there is a better way
01:10:36EXetoCsomething involving 'expr' params perhaps
01:11:43EXetoCI don't think there are many options at the moment when it comes to lazy container operations
01:11:54renesacok
01:12:10*q66 quit (Quit: Leaving)
01:12:40NimBotVarriount/NimLime master 694417a Clay Sweetser [+0 ±3 -0]: Added the clear error command
01:13:19EXetoCI've been wanting to do something about that, but I'm waiting for for user-defined type classes
01:19:12VarriountEXetoC: We have user defined type classes.
01:20:33EXetoCI recall it being documented but not working
01:21:47EXetoCso people have been awfully quiet about it if it has indeed been fixed by now :p
01:24:27EXetoCbecause it seemed like an anticipated feature. I'll have to see if it works then
01:26:46VarriountEXetoC: It works, mostly
01:26:47EXetoCVarriount: and I mean the new feature which doesn't have anything to do with the old one. T|U|V seems user-defined to me, so the terminology is confusing
01:27:09EXetoCok
01:28:29EXetoCwell, it needs to be pretty solid for most things I imagine
01:30:50renesacwell, templates are supposed to be stable, but I'm encountering bug after bug
01:31:14renesacreporting a new one now
01:31:20EXetoCI don't know who claimed that, but ok
01:33:20EXetoCthe situation was a little better a couple of months ago IIRC
01:33:59renesacbefore the new VM?
01:34:34EXetoCpossibly
01:36:33renesacwell I hope all those problems have a single root that is fixed soon
01:36:37renesac^^"
01:39:11EXetoCaround the end of the month (next release) if I had to guess
01:41:47filwitrenesac: master (or at least 0.9.2) uses a different VM to execute template/macro code than devel. The new VM still has quite a few bugs in it.
01:42:08*carum quit (Remote host closed the connection)
01:42:15renesacright
01:43:19renesacthere is some explanation of the differences between VM1 and VM2? besides irc logs?
01:43:55filwitno, it's still actively in development and subject to change
01:44:18renesacok
01:44:46filwitand the functionality wont change as far as use-code goes. It's just a lot faster (apparently ~10-20x speed improvement, so i've been told)
01:45:21renesachow that translates in the time need for the compiler compiles itself?
01:45:27renesac*compile
01:45:37renesac(well, I guess I could benchmark that myself...
01:47:56Varriountrenesac: I'm confident that your questions will be answered when these three conditions become true: 1) Araq is satisfied with the VM; 2) People ask him to explain its internals; 3) Araq finds the time to write a new blog post;
01:48:27renesacyeah
01:49:37renesacin the mean time, I'm writing yet another template issue (one I stumbled a few days ago, so I'm trying to recreate it)
01:49:49renesac^^'
01:51:04filwitrenesac: yes, compile-time performance.
01:51:05EXetoCpeople sure like metaprogramming
01:51:26renesacwell, that is the nimrod diferential
01:51:44renesacalso the nice syntax
01:52:42renesacit is always a bad idea start listing things like that, because you will aways forget something important...
01:52:46renesac:P
01:52:54renesacso forgive me
01:53:47VarriountYay! I finally fixed the bug in my nimcheck code that was causing sublime text to pause
02:00:45*zahary joined #nimrod
02:00:46*zahary1 quit (Read error: Connection reset by peer)
02:05:03*DAddYE quit (Remote host closed the connection)
02:05:37*DAddYE joined #nimrod
02:09:10*brson quit (Quit: leaving)
02:10:19*DAddYE quit (Ping timeout: 253 seconds)
02:22:29reactormonkhow do I prepare a statement with do_sqlite?
02:22:42reactormonkinsert.
02:28:36reactormonkhow is the string templating again? let's do it this way.
02:32:31renesacwhy do I need {.immediate.} templates for overloading, if I'm not introducing any new undeclared variable?
02:32:40renesachttps://github.com/Araq/Nimrod/issues/110
02:34:22reactormonkrenesac, because templates are inserted into overload resolution at the end of the file IIRC
02:34:35renesacactually, why not make all templates immediate?
02:34:39EXetoCreactormonk: tryInsertId(db, sql"...", ...) ?
02:34:46reactormonkEXetoC, sounds good enough
02:39:39renesacthe documentation don't makes it clear
02:40:19renesacand "An immediate template does not participate in overload resolution" sounds like I shouldn't use {.immediate.} when I'm overloading
02:40:31renesacbut it is actually the inverse
02:40:48fowlnot sure how that changed
02:41:31fowlwhen*
02:41:51renesacI'm lookin at the build.nimrod-lang manual
02:41:57renesacand that bug report
02:41:59renesac:P
02:42:10renesacand my own code...
02:42:40renesacthat worked after I added {.immediate.} but I don't know why
02:43:07renesacand why I should't put {.immediate.} in every template I write
02:50:09*eridu quit (Ping timeout: 240 seconds)
03:00:40reactormonkany way to get table.keys.join(", ") to work?
03:09:28EXetoCthat's a similar issue. no I don't think so
03:09:33*carum joined #nimrod
03:11:32EXetoCtoSeq to the rescue
03:16:08*DAddYE joined #nimrod
03:16:29*DAddYE_ joined #nimrod
03:16:29*DAddYE quit (Read error: Connection reset by peer)
03:24:53reactormonkEXetoC, popped an issue to github
03:24:59*nequitans_ joined #nimrod
03:25:39nequitans_I think I have a noob question when trying to compile in C++ mode, but I'm not sure what to do at this point
03:29:27fowlnequitans, shoot
03:29:28nequitans_I have a file that is just echo("Hello world")
03:30:19*aftershave_ joined #nimrod
03:30:23nequitans_I run $ nimrod --opt:speed --parallelBuild:1 cpp file.nim
03:30:44nequitans_Error: execution of an external program failed; rerun with --parallelBuild:1 to see the error message
03:31:20nequitans_In verbose mode there are many errors
03:31:23nequitans_here is an example:
03:31:45nequitans_ error: no matching function for call to 'nimFrame' nimfr("file", "file.nim") ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
03:32:46fowlnequitans, i recommend the latest from github
03:32:59nequitans_I see -- will try that out
03:47:37nequitans_So after compiling with devel, it seems like an architecture/compiler issue:
03:47:39nequitans_Undefined symbols for architecture x86_64: "std::terminate()", referenced from: ___clang_call_terminate in Nimrod-devel_system.o "vtable for __cxxabiv1::__class_type_info", referenced from: typeinfo for NimException in Nimrod-devel_system.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "___cxa_allocate_exception", referenced from: open_10003(__sFILE**,
03:49:25*aftershave_ quit (Quit: Computer has gone to sleep.)
03:49:30fowli cant attest to devel, i tried it on the master branch and hello world ran fine
03:51:00reactormonknequitans_, any reason why cpp over c?
03:54:30nequitans_reactormonk, i'm compiling with some cpp code i want to also include
03:55:42nequitans_fowl, i tried it on OS X, maybe on linux it works? will try that too
04:04:35*nande left #nimrod (#nimrod)
04:06:23nequitans_fowl: interesting, it works on unix
04:06:27nequitans_(devel that is)
04:08:56reactormonkError: unhandled exception: node.kind == JObject [EAssertionFailed]
04:08:58reactormonkmuh
04:09:02reactormonknequitans_, O.o
04:09:05reactormonknequitans_, file an issue
04:10:31*Demos joined #nimrod
04:20:18*carum quit (Remote host closed the connection)
04:29:23renesacnequitans_, did you try it with clang on linux?
04:33:28reactormonkis it just me, or are the stacktraces kinda off?
04:52:44reactormonkdom96, how exactly do I get a string representation of a json element?
04:54:59fowl$/pretty()
05:02:03Demosdoes nimrod have something like C's restrict keyword. This is an interop related question btw, I could ofc just use ptr foo's for foo * restricts but I wanted to know if nimrod had something like restrict
05:04:50fowlnever heard of restrict
05:11:40Demosit tells the compiler that a pointer passed as a parameter does not alias any other parameters
05:12:30Demosthe compiler DOES NOT VERIFY this, passing in two aliasing pointers can result in undefined behavior
05:13:46Demosessentially C and FORTRAN are in a pissing contest that FORTRAN kinda walked away from, C has not realized this and continues to add stupid "features" that make C "faster" while fortran adds things like OOP, modules, and lowercase
05:14:23Demosso now you know about restrict
05:15:36fowlhm. i dont even know when that would be useful
05:16:02Demosvoid doSomeArrayStuff(int* arrayone, int* array2)
05:16:29fowlbut they are the same array?
05:16:58Demosthe compiler can generate better code for some such functions if it knows that array1 and array2 point to different locations and that all pointers derived from them also point to different locations
05:17:01Demosright
05:17:45Demosfor void doSomeStuff(int* restrict arr1, int* restrict arr2)
05:18:19Demosif arr1 and arr2 point to the same location, OR if ANY pointer derived from arr1 points to any pointer derived from arr2 by pointer arithmatic within the function you get UB
05:18:21fowlif(array1==array2)return;
05:18:42Demosnot good enough
05:19:25Demoswhat if I call doSomeStuff(arr, arr + 5) then in the function I access arr[6]
05:19:42*nequitans_ quit (Ping timeout: 252 seconds)
05:19:48Demosin the restrict case I think the compiler can optimize out that if statement
05:31:30*Demos quit (Quit: Leaving)
05:58:08*ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
06:25:35*ics joined #nimrod
06:43:41*carum joined #nimrod
06:47:59*carum quit (Ping timeout: 240 seconds)
06:54:20*carum joined #nimrod
06:59:53*filwit quit (Quit: Leaving)
08:01:39*dmac joined #nimrod
08:04:25*wan quit (Quit: leaving)
08:07:29*dmac quit (Ping timeout: 240 seconds)
08:11:29*gour joined #nimrod
09:07:29*BitPuffin quit (Ping timeout: 240 seconds)
09:08:48rixxhm, is there a specific reason that .. can only replace countup() but not countdown()?
09:14:02*io2 joined #nimrod
09:41:41*DAddYE_ quit (Remote host closed the connection)
09:42:09*DAddYE joined #nimrod
09:46:31*DAddYE quit (Ping timeout: 245 seconds)
09:47:35rixx"User defined operators are allowed. Nothing stops you from defining your own @!?+~ operator, but readability can suffer." -- yup, having fun reading the tutorial :D
10:04:20*profmakx joined #nimrod
10:08:39Araqhi profmakx welcome back
10:09:58profmakxhi Araq
10:17:09*carum quit (Remote host closed the connection)
10:18:01profmakxhas anyone written some code to deal with serial ports (i assume using termios or similar)
10:18:21profmakxalhtough doing the ioctls directly is probably not a big issue either if it need be
10:22:30*carum joined #nimrod
10:27:30Araqprofmakx: were you the guy using the AVR target?
10:29:22profmakxAraq no
10:29:43profmakxI am happily using linux/dragonfly and a serial adapter that's plugged into usb
10:30:06profmakxi _might_ be very interested in compiling for avr
10:31:36profmakxafter being fed up with python and C I started doing my thing in nimrod last night
10:33:15*ics quit (Ping timeout: 260 seconds)
10:33:38Araqprofmakx: what's wrong with labeling avr a 16 bit cpu? its pointers are 16 bits wide
10:35:23*ics joined #nimrod
10:36:33profmakxAraq probably that all registers are 8 bit and to access a 16 bit memory location you have to assemble it from 2 8 bit registers
10:36:51*profmakx has a vague memory of calling an architecture n-bit if the accumulator is n bits wide
10:39:22Araqmeh, makes little sense, but ok.
10:39:47profmakxwould you consider i386 with PAE a 36-bit architecture :P
10:40:03*iNode000 quit (Quit: iNode000)
10:40:36profmakxI think one can live fine without calling things "x-bit architecture" and just agreeing on what the general purpose register size and the pointer width is
10:48:37Araqthe pentium 3 with its SSE registers it's a 128 bit architecture then :P
10:49:05Araqimho only pointer size makes some sense
10:49:19Araqas a defining criterion
10:51:13profmakxwikipedia seems to agree with you to some extent. not that that would mean a lot :P
12:25:04*BitPuffin joined #nimrod
12:42:47EXetoCreactormonk: that's a very specific suggestion for a single proc, but ok
13:17:32*darkf quit (Quit: Leaving)
13:20:52EXetoCreactormonk: well, you or someone else labelled it a feature. it's vague, but I'm going to ask some questions and make suggestions regarding user-defined type classes in a new issue, and I think I'll of some relevance
13:24:54EXetoCwhere is zahary's blog?
13:25:12EXetoCI need to look through that article and see if it covers anything not in the manual
13:33:25EXetoCactually I think someone else wrote it
14:05:34*nequitans_ joined #nimrod
14:13:56*[1]Endy joined #nimrod
14:15:26BitPuffinping Araq
14:17:01*[2]Endy joined #nimrod
14:19:23*[1]Endy quit (Ping timeout: 265 seconds)
14:21:25AraqBitPuffin: pong
14:26:12*[1]Endy joined #nimrod
14:29:26*[2]Endy quit (Ping timeout: 245 seconds)
14:34:21*brihat quit (Quit: Leaving.)
14:35:41*nequitans_ quit (Ping timeout: 245 seconds)
14:35:45*EXetoC quit (Ping timeout: 272 seconds)
14:58:13BitPuffinAraq: mark and sweep bootstrapping didn't help
15:00:37AraqBitPuffin: the better, bbl
15:22:20*dom96 quit (Excess Flood)
15:23:54*dom96 joined #nimrod
15:26:36*EXetoC joined #nimrod
15:31:45zahary_so, Araq, the new VM is not reentrant? why is having a global reusable VM context considered a benefit?
15:31:49BitPuffinAraq: oh, I thought it would be a bad thing
15:32:09BitPuffinAraq: because I thought that was your one suspicion or something haha
15:47:31*[2]Endy joined #nimrod
15:48:43*Varriount|Mobile joined #nimrod
15:50:16*[1]Endy quit (Ping timeout: 245 seconds)
15:53:27reactormonkEXetoC, I labeled it a feature.
15:53:46reactormonkfowl, nope, $ returns a string as "foo" instead of foo
16:03:38*Demos joined #nimrod
16:06:37*nande joined #nimrod
16:09:47Varriount|MobileHi Demos
16:09:51Varriount|MobileHi nande
16:12:07reactormonkhow exactly do I get a string of a json element? `$` gives me a string representation, not a string.
16:12:14reactormonkaka "foo" -> ""foo""
16:12:46dom96'.str'
16:12:55*hihihihi joined #nimrod
16:12:58reactormonkdom96, negative
16:13:10reactormonkthat doesn't work on floats etc.
16:13:35dom96case node.kind
16:14:27reactormonkthat sounds... annoying.
16:16:02reactormonkdom96, any reason why `$` on a string node doesn't behave like `$` on a string?
16:16:11EXetoCwhat's the deal with the pipe symbol in doc comments? is it used mostly in comments that were written a long time ago?
16:17:45dom96Because that is the most popular use case.
16:18:08reactormonkdom96, hm.
16:18:34EXetoCdom96: it is?
16:18:53EXetoCI haven't used the module much
16:19:50EXetoCanyway, using a case statement doesn't seem to be that much of an effort, because you only need two branches in this case
16:19:52reactormonkdom96, and what do you use the json representation for?
16:20:14reactormonkEXetoC, 7.
16:20:32EXetoCwhat kind of special-casing do you need for the remaining ones?
16:20:50EXetoCI don't know exactly what it is you
16:21:20EXetoC... you're doing, but add a shortcut if you feel it's necessary
16:21:21dom96reactormonk: Nimrod isn't a dynamically typed lang, it sounds to me like you are trying to it into one.
16:21:34dom96*to turn it
16:21:53renesacdom96, err, he want's a single output type
16:22:18EXetoCwhat do you mean? you already get that with `$`
16:22:24reactormonkEXetoC, nope.
16:22:25renesacI agree that $ on a string node should behave the same as $ in a string
16:22:36renesacif you want repr(string) you should call it
16:22:45reactormonkrenesac, it's not repr(string)
16:22:48reactormonkit's json_rep(string)
16:23:03EXetoCreactormonk: yes, string
16:23:18reactormonkEXetoC, it's the same _type_ but not the same semantics.
16:23:21dom96Perhaps.
16:23:36dom96Perhaps it shouldn't be an alias for pretty()
16:23:41EXetoCdom96: what was the verdict before? BitPuffin complained about json.`$` before
16:23:46dom96but it's a bit late to change it now
16:24:09reactormonkdom96, it is? O.o
16:24:09renesacdom96, why it should't be an alias for pretty()?
16:24:35EXetoCreactormonk: yeah, we hit 1.0 yesterday
16:24:41reactormonkEXetoC, ... fuck
16:24:57dom96Because people want it to act just like $node.whateverTypeItHolds
16:25:16reactormonkEXetoC, https://github.com/Araq/Nimrod/releases yeah, yeah.
16:25:27EXetoC:p
16:25:34renesacwhy not call repr() when you mean repr()?
16:25:47reactormonkrenesac, because it's _not_ repr()
16:26:02reactormonkrepr is strictly human-readable output.
16:26:03renesacI was asking dom96
16:26:13reactormonkrenesac, because it's not repr(), but json_repr()
16:26:36dom96Well apparently I missed this really important use case. I thought aliasing $ to a single-line pretty() was wise.
16:27:41dom96But let me ask this. What should $ print when it gets a JObject PJsonNode?
16:27:49dom96s/print/return/
16:27:50renesacreactormonk, wasn't it about $ ?
16:37:54nequitansHi all, I'm using the importc pragma and was wondering what the best way to obtain a seq[int] in Nimrod as the return value from a C routine
16:40:18*pmullin joined #nimrod
16:40:52BitPuffin"too late to change it" I think the 67 people using nimrod can deal with it
16:40:56BitPuffinnot only that
16:41:06BitPuffinthe 7 people using json with nimrod
16:41:26reactormonkdom96, a json representation of the node
16:41:34Demosnequitans: you write a nimrod wrapper
16:41:44reactormonknequitans, you importc it as an array
16:41:53dom96nequitans: If I understand you correctly what you want to do is return an array from your C routine and then convert that to a seq manually.
16:41:55reactormonk... then you write another proc using the importc'd one
16:41:59Demosreactormonk: but you may not know the size
16:42:09dom96nequitans: Similar to the way it's done here: https://github.com/Araq/Nimrod/blob/78761f0b4bd3b7240ed7db84203fb393a648910e/lib/system.nim#L2112
16:42:09reactormonkDemos, hm.
16:42:24Demosthe C library will provide a way to get a pointer to the first element and the size
16:42:54dom96reactormonk: Please tell me your use case.
16:43:22reactormonkdom96, reading stuff from json and putting it into sqlite
16:44:20dom96So why not just store it as a JSON compliant representation anyway?
16:44:25*aftershave_ joined #nimrod
16:44:33BitPuffinif there is any time we should change things it is now
16:44:40reactormonkbecause I want to be able to query it with SQL
16:45:28EXetoCpossibly add an unquotedStr or something
16:45:41DemosI think you can take a C pointer that you know is an array and cast it to like array[type, 0..100000] then access it using indexing
16:45:42dom96I don't see how $ makes that a problem.
16:46:01reactormonkdom96, because varargs[string] will hopefully escape the "
16:46:17reactormonk... in insertID
16:46:39dom96still don't see the problem.
16:46:46*hihihihi quit (Quit: Page closed)
16:46:51dom96It makes your job easier, you can then use the JSON module to read the data back.
16:47:18dom96Without having to check manually whether the data is a float, int, bool or string.
16:47:35nequitansDemos -- thanks. Do you know how I would obtain the # 100000 (it can return variable length arrays depending on the input)
16:47:56Demosthat was just a "large number"
16:48:38dom96nequitans: What C proc are you wrapping?
16:48:50EXetoC`$` does apply to the node, which isn't the same as accessing the elements directly
16:49:51nequitansDemos -- thanks. Do you know how I would obtain the # 100000 (it can return variable length arrays depending on the input)
16:50:47*pmullin left #nimrod ("Textual IRC Client: www.textualapp.com")
16:50:59Demosgah I gotta go. the length of the array in my example is just a maximum, the actual array better by shorter than that. You are not actually allocating all the memory since it is just a cast. Accesses beyond the end of the "real" array would just be undefined behavior
16:51:43EXetoCso in this case you're getting the representation of a node, and I don't mind it behaving differently for that reason
16:51:47DemosC does not really specify a maximum length of an array, so a max value is just a ballpark. I think nimrod only allows up to like 2^32 for int literals
16:52:07EXetoCdom96: so you're claiming it is too late to change it, which I disagree with, but do you think the current behavior is correct?
16:52:07nequitansdom96, it's a procedure I wrote using the Lemon Graph C++ library. It takes as an input an array of doubles and outputs an array of integers
16:52:11EXetoCBitPuffin: what is your argument?
16:52:49*Demos quit (Quit: Textual IRC Client: www.textualapp.com)
16:52:50BitPuffinEXetoC: consistency
16:53:22dom96nequitans: Well I think you should expose the size of the array you are returning.
16:53:33BitPuffinEXetoC: When you use $ you expect a fucking nimrod string that is comparable with other fucking nimrod strings
16:53:37BitPuffinnot some bullshit string
16:54:01dom96As far as I'm concerned when you use $ you are expecting a string.
16:54:29dom96That is the only requirement that $ has.
16:55:03BitPuffinYeah and you expect that if you use $ on a thing that has the value "hello" it should == "hello"
16:55:08BitPuffinas in the literal
16:55:20BitPuffinnot the json encoding thing whatever
16:55:32BitPuffinand what's worse iirc is that if you echo it, it looks like you think
16:55:34BitPuffinso you are like
16:55:45BitPuffinwell okay I'll just compare it to what it should be then, "hello", and nope
16:55:47BitPuffinfalse
16:55:56BitPuffinand then you punch the computer and start hating nimrod
16:56:00BitPuffinwe don't want that for people
16:56:44nequitansdom96, I see, so maybe a clean way to do it is to return a struct of int nels and int * rvals. Does nimrod have a nice way of reading in C structs? Alternatively I could encode the size as the first element
16:57:34nequitansbut i may also want to include a double in that struct
16:57:38nequitansso a struct would be ideal
16:59:13dom96You can just importc structs, just create an object with the same fields and use the importc and dynlib/header pragmas.
16:59:23EXetoCBitPuffin: so only when a json aggregate is converted to a string should it represent the corresponding JSON string?
17:00:30EXetoCecho node -> {"x": 1, "y": 2}
17:01:47BitPuffinEXetoC: I can barely even remember what it was that happened but it was stupid. But yeah I guess if a node is a json string $ should give you a string
17:02:20BitPuffinso I should be able to do $node["str"] == "noob"
17:02:27BitPuffinif the node is "str" : "noob"
17:02:35BitPuffinI think that's what didn't work iirc
17:03:49*aftershave_ quit (Quit: Computer has gone to sleep.)
17:05:31EXetoCOne might argue that since a string *type* is expected, ".str" should be called directly. Otherwise it's very inexact if you consider the fact that you might do $node == "123", but where the underlying type might be an int
17:07:57BitPuffinIt's "123" if it is "123", and 123 if it is 123
17:08:00BitPuffindo you know json?
17:08:03BitPuffinit has numbers
17:09:34*gour quit (Quit: WeeChat 0.4.2)
17:14:19EXetoCI never said otherwise
17:15:34BitPuffinwhat did you mean then
17:15:46dom96Why would you compare the value of a node like that?
17:15:52dom96What if it's a float?
17:16:06EXetoCdo you not care whether a node is an int or a string whenever you're doing $node == "123"?
17:16:11dom96node.fnum == 123.0 will work, but $node == "123.0" will not.
17:16:18BitPuffinwell no I can't even remember what it was
17:16:26BitPuffinbecause it was so long ago
17:16:32BitPuffinwe should have had the conversation then
17:16:36BitPuffinwhen it was fresh
17:16:40EXetoCdom96: it won't?
17:16:42BitPuffingo back in the logs or something
17:16:53nequitansdom96, thanks -- i created a struct and am returning it from the c function. i was looking around in the docs a little but am a little confused as to how to declare the type in nimrod, right now i'm doing this noob thing:
17:17:03*aftershave_ joined #nimrod
17:17:07BitPuffinor yeah wait
17:17:07EXetoCdom96: isn't that the JSON representation of a float?
17:17:08*Demos joined #nimrod
17:17:12nequitanstype TSubgraph {.importc: "subg_t".} = object
17:17:14BitPuffinOkay so I think I was right
17:17:26BitPuffinyou get back a json node with [] right
17:17:34BitPuffinand if you know that what you will be getting is a string
17:17:42Demosdoes the nimrod library wrap C's setjmp/longjmp functions? Again asking for interop reasons
17:17:43BitPuffinthen you think, hmm, how do I get a string in nimrod
17:17:47BitPuffin$ comes to mind
17:17:54BitPuffinnot fucking str
17:17:57BitPuffinor whatever it was
17:18:06EXetoCthat'd be the representation, and not an actual string
17:18:36BitPuffinOkay so does str exist for numbers too?
17:19:10nequitansDemos, was that directed to me? :)
17:19:46Demosno, directed at anyone who might know
17:19:52EXetoCBitPuffin: I asked you whether or not you care what the underlying type is when you do $node == "123"
17:20:10BitPuffinEXetoC: not really
17:20:30BitPuffinEXetoC: because generally I know what the structure of the json will be
17:20:35BitPuffinso I will know that it's a string
17:20:48BitPuffinand for example
17:21:00BitPuffinwhat is the behaviour if you call str on a node that isn't a string?
17:21:02BitPuffinA crash?
17:21:16EXetoCan exception is raised
17:21:19EXetoCbut then surely you're only working with JSON strings that you've constructed
17:21:21BitPuffinThat adds unnecessary checks that you have to perform otherwise if so
17:21:24BitPuffinyeah so exactly
17:21:37BitPuffinIf I know I am expecting a string and want to compare it to my string
17:21:48EXetoCit's not unnecessary if you have correctness in mind
17:21:56*Varriount-Mobile joined #nimrod
17:22:18BitPuffinthen I want it to be false if I compare it to "sthoet" when it's 38.29382938e-2
17:22:42BitPuffinActually what I think would be the most intuitive way to do it is to have a comparison operator for all the json node types
17:23:28BitPuffinbasically proc `==`(node: PJSONNode, s: string)
17:23:31BitPuffinfor example
17:23:35BitPuffinofc for numbers and so on too
17:23:59BitPuffinI can just do node == "hello"
17:24:14BitPuffinand if the value happens to be a float value
17:24:15reactormonkdom96, I can't use $() on a string node, because it gives me incorrect data.
17:24:22BitPuffinwell then it catches the exception and returns false
17:24:28BitPuffinbecause then they sure as hell are not equal
17:25:42*Varriount|Mobile quit (Ping timeout: 252 seconds)
17:28:19Skrylarwell I think I have 1/4th of a decent GUI system done in nimrod now
17:28:36renesacis there some work in making a bigint library for nimrod?
17:28:47renesacventor3000 said he wanted to work on it sometime ago in the nimrod forum
17:29:02EXetoCreactormonk: A node representing a string is not the same as a string, which is why I don't consider the current behavior to be incorrect
17:29:47EXetoCBitPuffin: that might be a reasonable addition
17:31:47dom96EXetoC: I was talking about if we change the behaviour of $.
17:31:51BitPuffinEXetoC: that way we can even keep backwards compatibility for lazy people like dom96 :)
17:32:05dom96bbl
17:32:18EXetoCdom96: yes but I wanted to know what behavior you think is correct
17:32:56EXetoCBut then I don't think I'd use it that much. I'd just access the str field, and if it is indeed not a string, then it'll fail, in which case I can either catch the exception, or just let everything blow up
17:33:23dom96BitPuffin: And then we'll need === just like JavaScript :P
17:33:43dom96bbl4real
17:34:45renesacok, there seems to be some work: https://github.com/ventor3000/nimrod-lab
17:34:56renesacbut frozen
17:35:26BitPuffindom96: lol no
17:35:31BitPuffindom96: not even related
17:35:46BitPuffindom96: I didn't say that == should try and convert a number into a string and then compare it
17:35:49EXetoCBitPuffin: lazy?
17:36:01BitPuffinWhat I'm saying is, if it is a string, compare them, if not, return false
17:36:08BitPuffinhow is that anything like == in js
17:36:51runvnchello
17:37:03runvncIs the JavaScript compilation target compatible with templates and macros
17:38:19reactormonkEXetoC, I'll check what others do
17:38:23reactormonkrunvnc, sure
17:38:32runvncreactor awesome
17:38:39reactormonkrunvnc, templates and macros are done before the code generation
17:39:02runvncoh duh
17:39:04runvncthanks
17:40:08reactormonkdom96, I see. Other languages (ruby/python) solve this by converting it to `native` data types
17:40:12BitPuffindom96: in fact if anything it is like ===
17:40:15BitPuffinthe way it should be
17:40:32reactormonk... which you can't do with static typing.
17:41:39BitPuffinreactormonk: well no
17:41:43BitPuffinbut that's not related
17:41:51BitPuffinI didn't mean that it should work like that for the general types
17:41:54BitPuffinjust for json nodes
17:42:20reactormonkBitPuffin, a parse[someType] should work theoretically
17:42:50reactormonkvia https://github.com/backchatio/jerkson
17:49:34EXetoCI've done something similar in the new db_mongo interface, but it's limited
17:51:38EXetoCthough I'm not sure if that lib supports arbitrary structures
17:52:36*io2 quit ()
17:55:41reactormonk~.
17:55:59reactormonkemdr.nim(64, 2) Error: selector must be of an ordinal type, float or string
17:56:13EXetoCso a basic impl based on overloading should be possible, but support for arbitrary inputs would require better reflection support I think
17:56:15reactormonkcan I use case <something> and check for the type?
17:56:39EXetoCreactormonk: not for things like typedesc's if that's what you mean
17:56:45reactormonkhttp://dpaste.com/1638748/
17:56:58*vbtt joined #nimrod
17:57:03EXetoChm
17:57:11EXetoCnode.kind
17:57:34vbtthello, wondering if there is any interest in making the tutorials, manuals etc. match the website theme.
17:58:03EXetoCreactormonk: "case kind*: TJsonNodeKind", so that's a field that you need to access explicitly
17:59:43reactormonkEXetoC, nah, works
17:59:46Varriountvbtt: I might be, if I haven't already donated my time to something else.
18:00:12VarriountI have no practical experience in web design though. Just stuff I've read. :/
18:00:45VarriountIf you want to do it though, by all means go ahead.
18:00:47EXetoCreactormonk: didn't you say it didn't?
18:00:59Skrylarare the source files for that lying around somewhere?
18:01:02EXetoCthat might've been something else
18:01:11vbttVarriount: I've already come up with the css to reuse the website's style.css and adapt it to the tutorials.
18:01:16VarriountSkrylar: source files for what?
18:01:31SkrylarVarriount: the other pages that vbtt is wanting the styles converted on
18:01:50VarriountSkrylar: It's in the docs and website directories
18:01:50Skrylarits not that hard to chuck them in to nanoc unless they're stored in some weird format
18:02:22Skrylar(amusingly yes, you can tell nanoc to use 'nimrod rst' as a processor)
18:02:51*Demos quit (Ping timeout: 272 seconds)
18:03:01*BitPuffin quit (Ping timeout: 246 seconds)
18:03:53vbttSkrylar: yes the sources are rst files.
18:04:02*Varriount can't wait to see the pretty
18:04:03Skrylarvbtt: i might be able to look at it later
18:04:26SkrylarI seem to remember discussions earlier that nimrod's reST processor was broken right now though
18:04:53vbttno, it seems to work just fine.
18:05:02Skrylarguess its a non-issue then
18:05:10*Skrylar was here a day or two ago when they were discussing nimweb having trouble generating docs
18:05:11vbttalso, they just rebuilt the website so I assume it works at least for everything on there.
18:05:32vbttyes I was having trouble, finally figured out how to pass in the right arguments to nimweb.
18:05:53VarriountAll I had to do was turn generation of PDF's off
18:06:05*[2]Endy quit (Ping timeout: 260 seconds)
18:06:06SkrylarVarriount: lol
18:06:13VarriountI don't have the whole LaTeX package thing installed.
18:06:21VarriountNor do I want to, for that matter.
18:06:24*q66 joined #nimrod
18:06:25*q66 quit (Changing host)
18:06:25*q66 joined #nimrod
18:06:27reactormonkEXetoC, works if I add .kind
18:06:29Skrylari keep one of those around but i don't use it often
18:06:46reactormonkVarriount, I use latex exclusively ;-)
18:06:47Skrylarall though lately Anki has decided to screw up using latex, so I have to go in to openoffice and screenshot math formulas -_-
18:07:02EXetoCk
18:07:03reactormonkSkrylar, muahahaha
18:07:26Skrylarreactormonk: yeah well. lol
18:07:48SkrylarConnectedText? Has no problem prodding miktex and generating formulas. Anki? *used to* Suddenly, "HERP AMSMATH IS BORK"
18:08:44Skrylaradmittedly i know nothing about nimweb and may or may not be really endeared to nanoc's pipeline method of working that none of the site generators seem to copy :(
18:09:02Skrylarit does a really good job of being exactly a middleman that just pipes text through other programs
18:09:25reactormonkSkrylar, org-mode \o/
18:09:42*Skrylar burns your emacs
18:10:04SkrylarNah I actually used org-mode for a while.
18:10:50VarriountI wish there was a choose-your-own guide for linux command line tools
18:11:06SkrylarBut I'm spoiled to the days that I had a macbook, and had access to these neat database-backed outliners with pretty GUIs
18:11:09SkrylarVarriount: ... Hm.
18:11:23VarriountSkrylar: There's already one for git, that I know of.
18:11:32SkrylarVarriount: You are standing in front of a black screen with a series of small rocks. Do you pick up the zsh rock or the bash rock?
18:11:41Varriountbash
18:11:58SkrylarThe bash rock hurts your head as it smacks in to you. You have died.
18:12:04Skrylar</pun>
18:12:55SkrylarVarriount: someone could probably make one of those in twine
18:13:26SkrylarI've wondered if theres a correlation to linux having some of the worst information organizing tools and the lack of information organizing though :o
18:13:57VarriountLinux has a lot of information.. just not very straightforward
18:14:09SkrylarIt's not organized though, which is what I said.
18:14:12*Demos joined #nimrod
18:14:36VarriountSkrylar: Although, there's one thing you should always do, if you can - use the dry run option
18:14:51SkrylarMac data tends to be highly indexed / centralized, and oddly they have things like Tinderbox / Notebook / OmniOutliner / etc and some amazingly rock solid word processors like Mellel that can eat 500 page documents like candy
18:15:02SkrylarLinux has.. maybe org-mode
18:15:32SkrylarFreemind/plane are good when your data fits in the mindmap model, I will give credit for that
18:16:22*DAddYE joined #nimrod
18:16:38SkrylarVarriount: i usually don't dry-run... all though I memorized most of the commands i care about on a regular basis by now :(
18:19:37Demoswell windows has HANDS DOWN the best information organising tool (OneNote) and it is not like windows is organised
18:20:38Demosspeaking of, I just finished making my libpng wrapper compile and at least load. It is suprising how many funciton are in the libpng manpage that don't actually exist
18:21:07vbtthttp://vocalbit.com/tmp/manual.html
18:21:15vbtthttp://vocalbit.com/tmp/httpserver.html
18:21:26vbttwhat do you think? I think there should be a back link for 'docs'
18:21:29VarriountWhy isn't there a single consistant way of doing things in opengl? I swear, I've found 4 different ways of settings up things.
18:22:08DemosVarriount: because cruft
18:22:20Demoslimit yourself to OpenGL 3.2 core profile and things are better
18:22:59Varriountvbtt: Looks nice. Though, the sides margins could be lessened a bit
18:22:59reactormonkDemos, yeah, some information organizer would be nice to have, but it should run on linux :-/
18:23:10Araqvbtt: it looks very nice but I'm not sure it's the way to go
18:23:12Demoseven then there are uniforms with both glUniformi/glUniformiv as well as UBOs and the wierd UBO API
18:23:29Demosreactormonk: Org mode is really quite good
18:23:45Araqthe docs are part of the distribution
18:23:53VarriountDemos: Is there some hidden tutorial site I'm missing?
18:23:55Araqand not part of the website really
18:24:02Demoshell no
18:24:15Demosmost opengl tutorials are really, really, REALLY, terrabad
18:24:20VarriountWhy?
18:24:24DemosDirect3D ones are worse
18:24:26DemosI have no idea
18:24:30VarriountAnd what are my alternatives?
18:24:36VarriountCairo?
18:24:38AraqDemos: support for 'restrict' is planned and hopefully we can insert assertions to make it safe
18:25:02reactormonkDemos, let's take some more looks into that then
18:25:40DemosAraq: sweet, for now I just used regular pointers, the c code is in a shared/static lib so the "restrict" has already done its job
18:25:49DemosVarriount: http://www.opengl.org/wiki/Main_Page is good
18:25:52vbttAraq: fair point. even then, is there a reason the docs shouldn't match the theme of the website somewhat?
18:26:07Demosas is the OGL spec/manual
18:26:22DemosI hear Cairo is quite good
18:26:30vbtteither way, I didn't put that much work into it so I can let it go.
18:26:53Demosand like I said limiting yourself to openGL 3.2 core makes things better
18:27:04vbttVarriount: the margins are the same as the website.
18:27:09vbttbut they can be changed.
18:29:12*brson joined #nimrod
18:29:18SkrylarDemos: I like Notebook more than onenote :(
18:29:41vbttAraq: or do you think the current presentation is better than the new style?
18:30:58SkrylarDemos: partly because Notebook actually has the full app themed as a moleskine, you can throw in index tabs and whatnot, and its essentially a database-backed outliner with a neat metaphor. Evernote and OneNotes UI to me.. egh. Also, Onenote isn't really accessible to most Windows users either; its difficult to get a stand-alone copy of it and its heinously expensive when you do manage to find it
18:31:34Skrylarlast time i had office suites it wasn't stock with those either
18:31:45Araqvbtt: I personally like the current presentation but apparently nobody else
18:31:56Demosit is part of almost all office distributions. I like onenote because of its tablet PC support. I can take notes with my pen (includeing maths) and it will run OCR on them and make em searchable
18:32:17AraqI think it has style and the table of contents as a side menu make sense
18:32:35Skrylarthey must have made it standard after i stopped using office completely then; i remember having a standalone disc for onenote years ago
18:32:53Skrylari'm trying to build a database-backed outliner in nimrod, just takes time to deal with the GUI sadly
18:33:11Demosyeah, this is true. the other thing is that it is easy to access the notes (incl maths) on my windows phone :D
18:33:31DemosI actually really like how org-mode is all just text
18:33:56SkrylarI think Taskpaper pulled off the "outline as text" paradigm better IMHO
18:34:10Demosis there a place where I can download nimrod related images in various formats (the crown and whatnot)
18:34:33*Varriount-Mobile quit (Ping timeout: 260 seconds)
18:34:37Demosyeah, org-mode does a ton of other stuff as well though
18:34:45vbttAraq: the toc can be put on the side. the issues with the current presentation are: looks out of place on website, no syntax highlighting, 100% width, grey toc box too big.
18:35:35vbttAraq: don't you want the toc to be always visible, irrespective of scroll position?
18:35:39*brson quit (Ping timeout: 252 seconds)
18:36:07SkrylarDemos: it does, but how many people can actually use it?
18:37:04SkrylarDemos: i remember reading some of the really longwinded documents about how you can jank org-mode in to doing all of this extensive day planning (and pinky destruction), and by that point the heavy org-mode users were complaining the "everything as plain text" became a liability because emacs had to crunch through text files to generate their calendars
18:37:12*Varriount-Mobile joined #nimrod
18:37:28vbttg2g, bbl.
18:37:35*vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
18:38:00Demosyeah, I guess. I found it easy to make a calender in org-mode after a few hours of dicking around. But it was still a bit annoying
18:38:04*io2 joined #nimrod
18:38:23Skrylarin connectedtext i can do a calendar by just saying view->calendar :(
18:38:24*carum quit (Remote host closed the connection)
18:39:34Skrylarthat program is weird though
18:39:50Skrylarits basically a desktop wiki stored in a Firebird database
18:40:56Skrylari think my favorite organizer was Notational Velcoity, simply because its basically a folder of .txt files with 'grep' run on them
18:43:36Discoloda"note" discussion would have been perfect in #nimrod-offtopic
18:43:50Demosthis is true
18:44:00*Skrylar shrugs
18:50:04Skrylari'm not sure offtopic channels have ever really worked. in my IRC experience pointing towards an offtopic channel is usually interpreted as telling people who were talking to STFU, half the people who do/might've commented on the OT topic aren't even in them and it tends to just make the main channels more idle
18:50:11Skrylarbut thats just my impression of ~10 years on IRC
18:50:12*Skrylar shrugs
18:51:36AraqSkrylar: I agree
18:51:39*aftershave_ quit (Quit: Computer has gone to sleep.)
18:51:47Demosacpi
18:52:01*Demos quit (Quit: leaving)
18:52:03Araqwho authorized that offtopic channel anyway
18:53:59Skrylari'd have to check the log
18:54:21*sale4one joined #nimrod
18:57:28sale4oneSo quiet here :/
18:58:32runvncwhy do you guys use rst instead of markdown
18:59:04Skrylari guessed because python uses reST and nimrod is styled after python
18:59:31runvncis there a way to get nice colored syntax highlighting for different programming languages using rst
18:59:56Skrylarrunvnc: i think nimrod's built in rst processor does it
19:00:06Skrylarthey don't use the docutils or sphinx versions
19:01:19runvncoh that sounds awesome
19:01:51*profmakx quit (Ping timeout: 272 seconds)
19:02:00runvncI see this ipsumgenerator thing seems to be doing something specific related to the language you specify
19:02:31runvncfor code blocks
19:03:36runvncIt seems like nimrod is the best language ever
19:04:21Araqrunvnc: markdown didn't even exist when I implemented the RST parser
19:04:25runvncso easy for me to understand most of the code, and yet it has the most powerful templating, and very fast execution
19:04:30Araqor at least I wasn't aware of it
19:05:10runvncI have been using this ToffeeScript/CoffeeScript thing because it is very pythonic, lets you do nice classes compiled to JavaScript, and I can use all of the node modules
19:05:13AraqRST is not that far away from markdown anyway
19:05:21runvncbut nimrod code is even clearer than toffeescript
19:05:31*ehaliewicz joined #nimrod
19:05:41runvncand the built in modules take care of most of the things you would use third part modules for in node
19:06:06runvncthe only thing I dont have with nimrod is everything being async and event based transparently
19:06:18runvncwhich I am not even sure thats possible probably not
19:06:28runvncanyway its not transparent in node
19:06:40Skrylarasync as in nodejs?
19:06:45Skrylari don't see why that couldn't be done
19:06:54Skrylarnodejs just does it with closures and i think nimrod has those
19:07:09Araqrunvnc: we almost have a new async core
19:07:19Araqbe patient, it's nearly there
19:07:22runvncwell in toffeescript you can use a sync syntax that is more convenient than javascript closures
19:07:34runvncwraps them
19:08:33runvncI just never thought that I would be enthusiastic about a language that had this kind of interaction with c
19:09:15*sale4one quit (Remote host closed the connection)
19:09:25runvncalways thought that that I was done with low level stuff. but this seems to be the best of both worlds. sorry I am rambling. but I must be missing something because I dont see that many people talking about the best new language ever
19:09:41*sale4one joined #nimrod
19:09:44Skrylarthats because rust has a better marketing team
19:09:44runvncalthough nobody talks about toffeescript and a lot havent caught on to coffeescript and those both make big improvements over javascript
19:10:43Skrylari was excited once that rust seemed like it had the backing that it could dislodge C++ somewhat, now i'm horrified that might actually be true
19:10:46Skrylarlol
19:10:50runvnchaha
19:11:08VarriountJust so I have a point of reference, what is bad with rust?
19:11:14runvncgive it 10 or 20 years and people won't be the main thing holding back technologies anymore
19:11:27runvncbecause we will have artificial general intelligences that can keep up
19:11:36SkrylarVarriount: the syntax has had basically zero attention paid to it
19:11:42runvncI don't think rust is bad
19:11:51runvncbut definitely syntax is not as nice for starters
19:12:04runvncI think rust is way better than c++ for a lot of things for example
19:12:27runvncI think nimrod is better though
19:12:29Skrylarrust is basically meant to vent frustration from using C++ for writing a browser, so they brought a bunch of haskell-y things over
19:12:42dom96To bring back an old topic: I really like vbtt's docs.
19:13:11Skrylardom96: which docs are specifically vbtt's?
19:13:15dom96I think that the toc at the top is more stylish
19:13:23dom96http://vocalbit.com/tmp/manual.html
19:13:59Skrylarmaybe add a 'jump to header' after each section
19:14:17dom96The headers are clickable.
19:14:37Skrylarthats not very obvious from a usability standpoint
19:14:46*aftershave_ joined #nimrod
19:15:29dom96true
19:15:39Skrylaridentifier keywords are a horrifying shade of blue on white
19:16:03Skrylarstrings are orange on white
19:16:32SkrylarI'd say about 80%.
19:16:47dom96brb
19:16:57VarriountI'll be nitpicky, and say that there needs to be a greater degree of seperation between headings and subheadings
19:17:11VarriountAlso, collapsable TOC lists
19:17:20SkrylarSome of the code coloring needs to take hints from Solarized as far as contrasting, and I might like to see a chunked version of the page so it doesn't give the scrollbar chronic shrinkage
19:20:49*Varriount-Mobile quit (Remote host closed the connection)
19:23:11SkrylarI wonder what he's using to make that site though
19:24:01Skrylarmakes me curious about using nokogiri to split the manual up at the heading level in to chunks, and some side-filters to make a lunr index so that thing becomes searchable
19:24:33VarriountSkrylar: Whatever search feature is chosen better support basic logic operators
19:25:14Skrylari have no idea how lunr works, i only heard of it through this irc lol
19:27:24reactormonkSkrylar, I'll take care of lunr if someone gives me the data as JSON
19:27:45Skrylarreactormonk: i was talking about vvtb's manual that dom was mentioning
19:28:11*profmakx joined #nimrod
19:28:35*profmakx is now known as Guest79110
19:29:02Skrylarreactormonk: is there a way to get lunr to use a pre-processed index?
19:29:04*Guest79110 quit (Changing host)
19:29:04*Guest79110 joined #nimrod
19:29:20Skrylari noticed that they expect you to feed it the complete document contents, and i'm not satisfied with the javascript having to download every article on the site
19:29:35reactormonkSkrylar, I'll find out
19:29:44runvnccant you run it in node
19:30:04Skrylarrunvnc: yeah, if it supports exporting the processed index
19:30:14*Guest79110 is now known as profmakx
19:30:20runvnchttps://www.npmjs.org/package/lunr
19:30:34*vendethiel quit (Ping timeout: 260 seconds)
19:31:05runvncor is that supposed to actually run on the client for searching a big page full of manual
19:31:15Skrylarrunvnc: lunr is meant to run on the client
19:31:37Skrylarif one wants a server-based search there is the solr project, which i think lunr is nodding to with the spelling
19:32:03runvnchow else is it going to index it without giving it the full text
19:32:09reactormonkSkrylar, https://github.com/olivernn/lunr.js/pull/19
19:32:12reactormonkit's possible.
19:32:34runvncoh
19:32:39reactormonkSkrylar, https://github.com/olivernn/lunr.js/issues/26
19:32:40Skrylarrunvnc: depends on how the algorithm works; one option is to run the stemmer ahead of time and only store that
19:32:42runvncwas just gonna say dont they have that
19:33:03Skrylarif you only care about keyword search (not keyword order) its really easy to do
19:33:20runvnclunr.Index.load
19:33:37reactormonkhttps://github.com/assemble/assemble-contrib-lunr
19:34:23reactormonkSkrylar, yup, you can just JSON.stringify the index and load it later
19:36:20Skrylarreactormonk: well thats neat
19:37:34reactormonkSkrylar, don't forget to preprocess type sigs
19:38:20Skrylari feel as though i have been dogpiled suddenly. xD
19:38:44reactormonkSkrylar, you give me the JSON with all the documents and I'll go for the rest.
19:38:59Skrylarreactormonk: i don't have any data to index for the time being
19:39:10reactormonkSkrylar, mess with the docgen?
19:39:34SkrylarI mentioned an interest in it; I haven't poked it yet
19:39:57reactormonkSkrylar, now you will :-P
19:40:09reactormonka bit of NLP experience isn't bad.
19:40:35Skrylarnatural language processing or neurolinguistic programming
19:40:40reactormonka)
19:40:56Skrylarparser code makes me die
19:41:03Skrylarlol
19:41:05reactormonkit's not fucking parser code
19:41:28reactormonkthat stuff (lucene/lunr) is just plain old bag-of-words approach which don't use parsers
19:43:03Skrylarlately i've been face-deep in GUI trees
19:43:52dom96Skrylar: Are you writing a GUI toolkit in Nimrod?
19:43:59Skrylardom96: correct
19:44:07dom96Skrylar: Tell me more.
19:45:05Skrylarat the moment its backed by ncurses, the way widgets are composited is based on Morphic (display trees, composition of trivial widget types), i borrowed the CSS box model for some of the layout parts
19:46:06dom96I'm playing with the idea of creating a GUI toolkit using libcef
19:46:34Skrylarhrm.
19:46:39SkrylarChromium stuff
19:47:04SkrylarI tend not to touch chromium code because its a nightmare of a dependency to keep around
19:47:06reactormonkare there more hashes than md5 available?
19:47:16Skrylarreactormonk: in existence or in nimrod?
19:47:22reactormonkin nimrod
19:47:30Skrylari didn't know we even had md5
19:48:43OrionPKtheres a sha1 package in babel
19:48:58Skrylarwhirlpool is a neat hash
19:49:21runvncskrylar is there a public repo for this awesome terminal gui
19:49:35Skrylarrunvnc: no, its not usable enough to be worth publishing
19:50:04Skrylari should probably go make a repo for the modules that are usable though
19:50:11Skrylari have a gapbuffer and rectangle module
19:50:14runvncI have been thinking of, after I build my tool as a command line, adding a dialog based UI for the terminal. like the dialog thing that uses ansi or whatever to make menus in bash
19:50:54runvncdialog is not really that advanced or feature rich though
19:51:10runvncor particularlyo flexible or integratable into nimrod
19:52:01runvncI would like to use all of the stuff you geniuses make
19:52:02runvnclol
19:52:06Skrylarheh
19:52:15SkrylarI would love to use this too, but it still doesn't have event processing :(
19:52:39SkrylarActually my ncurses wrapper sucks right now; I only bound enough to use it like termbox
19:53:38*sale4one` joined #nimrod
19:54:12Skrylarso I'm told discardable is a thing
19:55:36*sale4one quit (Ping timeout: 245 seconds)
19:56:40Varriountdom96: Did you try using the libcef wrapper?
19:56:56dom96Not yet
20:01:54Skrylarspeaking of that, i probably ought to do a proper binding of ncurses and toss it on github
20:03:15Araqdon't we have ncurses bindings in the stdlib?
20:03:36Skrylari don't remember seeing it, though i could be blind
20:03:53OrionPKVarriount theres a libcef wrapper?
20:03:56SkrylarAraq: Nope, not listed on the lib page
20:05:00VarriountOrionPK: One that I hastily tried to put together
20:05:09VarriountIt's untested.
20:06:08OrionPK:)
20:06:11OrionPKat all?
20:06:23OrionPKuntested or unproven?
20:09:20*BitPuffin joined #nimrod
20:16:29*brihat joined #nimrod
20:18:21*brihat quit (Read error: Connection reset by peer)
20:19:13VarriountOrionPK: I think I got it to compile, but I didn't actually use anything
20:19:27OrionPK:D
20:20:54*brihat joined #nimrod
20:21:59*aftershave_ quit (Quit: Computer has gone to sleep.)
20:22:12VarriountOrionPK: I make no promises. If your computer disintegrates from compiling, running, or even touching any of that code, don't blame me.
20:22:31OrionPKheh, i have no time to try it out atm
20:22:39OrionPKbut i would definitely blame you
20:22:49AraqSkrylar: we have pdcurses in lib/wrappers though
20:28:45runvncis there a gui toolkit built on pdcurses
20:32:40runvncits not hard to make a binary that is compatible on all os x is it? I was thinking of doing something in bash as a command line to connect to my saas/paas, but if it is realistic to give people a binary on osx and different linux, then I will do that
20:40:29Skrylari don't think there is one for pdcurses
20:40:37Skrylarthere is one for ncurses
20:40:44Skrylarthey're fairly compatible libraries though
20:42:46nequitansthanks to everyone who's answered my questions so far :). i have a question about using importc. I have an array of integers in C that I returned from a function (in the form of a struct). the struct member is of a type ptr : int (inspired by the code in libuv.nim). the struct also has a member with the length of that array. in Nimrod-land, what is the best way to traverse the elements of this array represented by ptr int and convert it to a seq?
20:43:49*[1]Endy joined #nimrod
20:45:17nequitans(or is this even a good way to do what I want?)
20:48:42*vbtt joined #nimrod
20:48:50Skrylari think you can have a struct in the nimrod side with a {.nodecl, importc: "name in c".} so nimrod can access the struct without adding extra code
20:49:11Skrylarconverting to a seq would involve actually looping over the array and adding to the seq though, since they're different types
20:51:35vbttfollowing up on earlier comments.. my docs are only a proof of concept. it didn't take much to make the docs look more like the website.
20:52:21vbtti just reused the same style.css
20:52:46nequitansSkylar, thanks: if instead of using a ptr int, i use array[0..100000,int] (but only go to the number of elements i know), it works. i presume this doesn't waste space since it is a pointer into already allocated memory?
20:53:41Araqnequitans: yes and there is a feature request to support array[int]{.unchecked.} or something similar
20:54:01Araqas it's so common when interfacing with C
20:54:39nequitansAraq, ah, I see. Thanks!
20:54:53Skrylar*sigh* just don't call high() on that fake array
20:55:12Skrylarcode that actually trusts types are what they say they are will break with the 0..10000 thing
20:55:53dom96Araq: Is there no efficient way to convert a C array into a seq?
20:56:18Araqdom96: no, it has to be copied
20:57:21dom96Why? What does seq consist of?
20:57:32Araqit's allocated on nimrod's heap
20:57:45Araqthe C array is allocated somewhere else
20:57:52Araq--> copy IS necessary
20:58:13*zahary1 joined #nimrod
20:58:34dom96I see.
20:58:36nequitansyea, that would make sense if by def seqs are always garbage collected
20:58:53Araqnequitans: they are
21:01:53*sale4one` quit (Remote host closed the connection)
21:02:00nequitansis there a case to be made for non-garbage collected seqs where you have your own destructor? then seqs could be made with new() or alloc()? one option for that would be to have a function called something like fromCSeq[T](a: ptr T, n: int) where it is assumed alloc and you have to dealloc in nimrod land. (i'm not saying this is a great idea, just considering the possibility :))
21:03:59nequitanson the other hand the 'unchecked' option makes sense because what is the case where you want to change an array allocated from a C function?
21:04:11Araqsure it's possible
21:06:11Araqping Varriount
21:06:51*brson joined #nimrod
21:09:09*[1]Endy quit (Ping timeout: 252 seconds)
21:10:45nequitansiterator
21:11:07nequitans(sorry -- i meant that to be in a browser window!)
21:15:28dom96WebGL is becoming impressive: http://madebyevan.com/webgl-water/
21:18:02OrionPKit's been impressive :p
21:23:01*tinAndi joined #nimrod
21:23:04nequitansthis is pretty awesome -- i'm doing so many things in nimrod now from pipelines to more 'meaty' procedures
21:23:28*skyfex joined #nimrod
21:26:13*tinAndi quit (Quit: ChatZilla 0.9.90.1 [Firefox 27.0.1/20140212131424])
21:27:31SkrylarI love C headers where the function prototypes are neatly thrown against each other
21:27:41Skrylarits so much easier to just toss a vim macro at them all in one go
21:28:37*zahary1 quit (Quit: Leaving.)
21:30:14runvncCan I build a binary that will work on most OS X if they put it in their path? Sorry if that is a dumb question
21:31:21Skrylaryeah
21:31:37Skrylarunless you're using dynamic linking, all of the nimrod runtime is embedded in the binary and only the parts you need
21:32:15runvncso I just run the compiler on os x, or specify something to tell it to cross compile
21:32:28runvncfor x 64 or something
21:32:36Skrylaroh, doing fat binaries?
21:32:43runvnctrying to make a command line tool
21:32:52runvncdon't know what you mean fat binary
21:33:11Skrylarwell if you're compiling to OSX, there are 32 and 64 bit versions
21:33:15Skrylara fat binary has both packed in to it
21:34:32runvncoh ok thank you
21:34:44Skrylari figured thats what you were cross compiling for
21:35:07runvncwell maybe on my mint machine somehow I could make it spit out a command line tool for an os x machine
21:35:20Skrylari don't know anything about cross compiling *to* osx though; seems like it would be hard to do since the headers aren't really worked on for that path
21:35:21runvncprobably 64 bit would be good for most people
21:35:37*zahary1 joined #nimrod
21:36:04runvncso I could just install nimrod on os x and compile on there with nimrod and it would probably run on most people with any 64 bit osx
21:36:38runvncif I am on 64 bit os x
21:41:06dom96Yes. Unless you are using external libs.
21:42:04runvncso awesome
21:42:27*BitPuffi1 joined #nimrod
21:42:32runvncwell what if I need to use the -d:ssl option that doesnt use openssl as an external lib or something does it
21:42:38runvncneed to do https requests
21:42:41dom96it does sadly.
21:42:43*sale4one joined #nimrod
21:42:56runvncdang
21:43:02runvncmaybe I dont need to do https then
21:43:39*BitPuffin quit (Ping timeout: 252 seconds)
21:44:03dom96maybe you could include the dll with your binary
21:48:06VarriountAraq: You rang
21:49:00AraqVarriount: I want you to add babel support to the tester; the tester should get an option to download every babel package and ensures it still compiles
21:49:50VarriountHm.
21:50:39VarriountAraq: Have you seen my PR yet?
21:50:50runvncmaybe dom. or maybe I can just shell out to curl or wget depending on which they have. then I dont have to do it in bash or worry about ssl
21:52:12AraqVarriount: yeah but I'm not too sure I want macro voodoo in winlean. IMO the bare bone stuff shouldn't depend on what currently still is fragile and in flux
21:52:39VarriountI understand.
21:54:30VarriountAraq: Just to be clear, you only want to make sure a package *compiles*, correct?
21:54:40*sale4one quit (Remote host closed the connection)
21:54:48Araqcorrect
21:55:26*sale4one joined #nimrod
21:56:47VarriountAraq: You mentioned a bloom filter for coroutines, there's actually one in babel
21:57:55Araqlooked at it, doesn't fit
21:58:10VarriountAw.
21:58:32Araqcome on a bloom filter for the stack detection is like ~20 lines of code anyway
21:58:36Araqif at all
21:59:15EXetoCnot that you have any control over those packages, but it gives you an overview I guess
22:04:02AraqEXetoC: actually after manual checking we can disable these babel packages or mark them as "broken"
22:04:18Araqif the tester fails at compiling them and it's not a compiler bug
22:04:55*brihat quit (Remote host closed the connection)
22:05:01dom96I don't think this will work out.
22:05:28dom96Although it all depends on how much broken code people actually commit.
22:06:46*brson quit (Quit: leaving)
22:07:03*brson joined #nimrod
22:07:06sale4onebut I could be used on essential packages :)
22:07:06EXetoCone more reason to allow packages to be flagged as trusted, but then you should still compile in an isolated VM
22:07:13VarriountAraq: I will do it, however atm, I have a calc test to study for.
22:07:51Varriountdom96: What do you do when someone doesn't want to use git as a repository?
22:08:58EXetoCit's not just git that is supported though
22:09:46dom96Varriount: What do I do? You should ask Araq what he will do.
22:10:05VarriountHuh?
22:10:54dom96Varriount: Well Araq wants this feature in the tester so you should ask him, or am I misunderstanding your question?
22:10:59AraqVarriount: babel supports mercial too
22:11:06Araq*mercurial
22:15:37VarriountYou know, this makes me think fondly of sandboxes
22:15:51Araqindeed
22:16:07SkrylarVarriount: vagrant?
22:16:18Skrylarhttp://www.vagrantup.com/
22:17:28dom96That's a good point. You will need to implement some sort of sandboxing since processes can be executed at compile-time now.
22:17:37Varriount^
22:17:49VarriountVagrant will do for now.
22:18:04VarriountJust means another fun, interesting program to learn.
22:18:51AraqVarriount: ok but we should start with the official babel packages from the nimrod-code organization
22:19:04dom96"For almost three years, Vagrant was a side-project for Mitchell, a project that he worked on in his free hours after his full time job."
22:19:07dom96hrm, sounds familiar.
22:19:59Skrylari've never actualy used vagrant; i just ran across it once when people were talking about testing web software
22:20:32Skrylarsince you can tell it to load a stock arch + install nodejs + test the things
22:22:51*sale4one quit (Quit: Leaving)
22:25:16Skrylaryou know what would be really great for dealing with wrappers/binds?
22:25:20Skrylarsomething like Leo that actually worked
22:26:24SkrylarChunk a file in to nodes (leo puts in comment markers so it can find them later), made a side-node with the bound/wrapped code and mark them as related
22:27:03Skrylarthey have this neat thing where it stores your node boundaries in the file itself as comments, and a shadow option which uses diff/patch to hide them
22:27:17Skrylarso if someone hands you a new C file, it tries to patch the plain text markers back and re-load it to the IDE
22:30:30*zahary1 quit (Quit: Leaving.)
22:36:41Skrylarheh that would be weird
22:36:45Skrylarsource-code-in-database for nimrod
22:39:14VarriountHm. Is it naive to think that sandboxing nimrod's VM would be as easy as allowing only certain wrapped OS calls to be executed at compile time?
22:40:03Araqyes
22:40:41Araq"naive" in relation to "sandboxing" always has "yes" as an answer
22:40:48profmakxgnihi
22:41:01Varriountprofmakx: Come again?
22:41:12profmakxgnihi
22:42:36VarriountGesundheit
22:47:34*filwit joined #nimrod
22:48:38VarriountIt's filwit!
22:48:43filwitit's Varriount!
22:50:56VarriountAraq: http://www.chromium.org/developers/design-documents/sandbox
22:52:46SkrylarWell, er.
22:52:49SkrylarThat *is* how you sandbox.
22:53:52SkrylarIn the case of Lua, you only expose calls you want people to be able to use. Then you can set tracers on runtime cycles so infinite loops don't lock up the host, and finally hook malloc to impose a memory limit.
22:53:59SkrylarDepending on the nimrod VM it wouldn't be that different
22:54:48Skrylar(lua actually has a debugging API which allows you to tell it "break in X opcodes")
22:57:49*oxful_ quit (Quit: Leaving)
22:58:01SkrylarHuh, now there is an idea. Compile nimrod to luajit
22:58:37VarriountI think that's what Araq did, once upon a time.
22:58:53AraqSkrylar: the JS codegen still has the start of a luajit backend in it
22:59:12AraqVarriount: no, I only played with the idea but abandoned it
22:59:16Skrylarmoonscript and nimrod would probably go well together
22:59:33Skrylarall though moonscript is hard to debug because its basically the 'coffeescript of lua'
23:02:22VarriountThat's not much of an excuse, after all, nimrod compiles to C
23:03:55SkrylarVarriount: it means a lot when you pop open a stacktrace
23:04:03Skrylarall though in lua you don't tend to have stack traces, so.
23:06:23VarriountIs lua not stack based?
23:06:54SkrylarVarriount: Lua tends to be of the opinion that your scripts should be small enough that if something goes wrong you already know where to look
23:07:23SkrylarI think you *can* do stack tracing but it usually isn't done
23:08:11*Matthias247 joined #nimrod
23:09:33EXetoCVarriount: some people have complained about coffeescript for that reason, but I suppose it depends on how much is added etc
23:10:03*q66 quit (Quit: Leaving)
23:11:00SkrylarEXetoC: the problem with coffeescript is that say, nodejs tells you there is an error on line 127
23:11:29SkrylarSo you open broken.js on line 127, oh wait its full of crap
23:11:45Skrylarnow you have to go find which line of coffeescript "line 127 in broken.js" actually is
23:13:40Varriountdom96: Every babel project I try installing gives me an error that the name attribute is missing in the babel file
23:14:10dom96Varriount: Quote me the error plz.
23:16:05Varriounthttps://gist.github.com/Varriount/9103647
23:16:05EXetoC:>
23:16:26Varriountdom96: FYI, I downloaded comandeer before that, and got the error,
23:17:21dom96rm -r C:\Users\Clay\.babel\pkgs\commandeer-0.1.2
23:19:12Varriountrmdir /S /Q
23:19:24VarriountIs what you should have said.
23:20:45*[Pete_27] left #nimrod (#nimrod)
23:20:55Varriountdom96: That is a bug, I presume?
23:21:31dom96Kinda. Do you remember the error you got when you were installing commandeer?
23:24:34Varriountdom96: https://gist.github.com/Varriount/9103750
23:29:28dom96hrm
23:29:53dom96you shouldn't be building it though
23:29:59*xtagon joined #nimrod
23:30:19Araqgood night
23:30:23VarriountThen what is the build command for?
23:30:27VarriountGood night Araq
23:30:31VarriountHello xtagon
23:30:59dom96what are the contents of commandeer.babel?
23:31:11dom96For binary packages
23:31:18*brihat joined #nimrod
23:31:44xtagonHello Varriount
23:33:35Varriountdom96: https://github.com/fenekku/commandeer/blob/master/commandeer.babel
23:34:12dom96You sure C:\Users\XXX\.babel\pkgs\commandeer-0.1.2\commandeer.babel contains that?
23:34:52*oxful joined #nimrod
23:34:52*oxful quit (Max SendQ exceeded)
23:35:10Varriountdom96: Yep
23:35:39dom96Varriount: Recompile babel in debug mode and tell me the stack trace.
23:42:13VarriountHmf. Now it works.
23:42:49dom96now try it in release mode
23:43:11dom96if it fails in release mode then we may have a corruption on our hands
23:43:29VarriountLet me try again.
23:47:16Varriountdom96: It must have been a fault on my part. I can't reproduce it. :/
23:48:17*xenagi joined #nimrod
23:48:30dom96No worries. Try the steps if you remember them from the very start again if you can, or if you don't feel like it that's fine.
23:49:37VarriountEh, I have calc to do
23:49:56*zahary1 joined #nimrod
23:50:02dom96yeah, that's what I figured.
23:50:03VarriountTBH, I was using babel in order to test out that NimBorg project
23:54:35*Matthias247 quit (Read error: Connection reset by peer)