<< 19-07-2013 >>

00:00:31*Smaehtin quit (Client Quit)
00:02:13*Smaehtin joined #nimrod
00:02:22SmaehtinAnyone alive?
00:02:45SmaehtinAnyone alive that knows how the asm keyword works in Nimrod?
00:04:50SmaehtinI've tried the syntax found at https://github.com/Araq/Nimrod/blob/master/doc/manual.txt line 2161 but I keep getting a "Error: execution of an external program failed" when compiling no matter what asm syntax I use
00:09:45EXetoCno one who knows anything about that is available now I think. try again at reasonable european hours :-)
00:11:49EXetoCcya later
00:11:50*EXetoC quit (Quit: WeeChat 0.4.1)
01:16:11*BitPuffin quit (Ping timeout: 246 seconds)
01:23:01*Smaehtin quit (Quit: Page closed)
01:23:18*DAddYE quit (Remote host closed the connection)
01:23:53*DAddYE joined #nimrod
01:28:14*DAddYE quit (Ping timeout: 240 seconds)
02:13:26*q66 quit (Quit: Leaving)
02:24:22*DAddYE joined #nimrod
02:28:59*DAddYE quit (Ping timeout: 264 seconds)
03:17:55*DAddYE joined #nimrod
07:44:54*DAddYE quit (Remote host closed the connection)
08:01:02*DAddYE joined #nimrod
08:31:46*DAddYE quit (Remote host closed the connection)
09:05:21*q66 joined #nimrod
09:13:08*wan_ joined #nimrod
09:45:39*Araq_ joined #nimrod
11:01:35*BitPuffin joined #nimrod
11:52:06*Smaehtin joined #nimrod
11:53:59SmaehtinAnyone on here who knows anything about how to use the asm keyword in Nimrod? I tried following the example in the manual (https://github.com/Araq/Nimrod/blob/master/doc/manual.txt) but I keep getting a "Error: execution of an external program failed" when compiling no matter what assembler syntax I use
11:55:41*EXetoC joined #nimrod
12:02:38Araq_hi Smaehtin
12:02:56Araq_asm """ mov eax, `x` """ # where x is a nimrod variable
12:03:11Araq_however the asm syntax depends on the used C compiler
12:03:26Araq_there is a way to make GCC accept Intel syntax but I forgot how ;-)
12:03:47Araq_use --parallelbuild:1 to see the error message of the C compiler
12:04:11SmaehtinYeah, I'm using GCC. asm """ mov $10, %eax """ should be valid
12:05:51SmaehtinHm
12:05:53Smaehtinmain.c:187:6: error: expected string literal before 'mov'
12:08:43SmaehtinThis works, however: asm """"mov $10, %eax""""
12:12:07SmaehtinI guess I should've just read the "Triple quoted string literals" section of the manual :)
12:12:52Araq_oh yeah
12:13:18Araq_indeed gcc's broken asm needs everything in quotes
12:13:42Araq_also you need to specify clobber registers etc.
12:14:18Araq_it's as if the compiler doesn't know the instructions it accepts
12:14:53SmaehtinYeah, I don't really like it either. I figured the example was for GCC though since that's what's shipped with the Nimrod installation :)
12:17:07Araq_if you're good at GCC's asm, please have a look at system/arithm.nim ... I never got that to work for GCC
12:21:38comexAraq_: not broken compared to everything else which is worse :)
12:22:57SmaehtinGithub seems to be down here :(
12:23:06comexme too
12:24:01comex https://twitter.com/githubstatus/status/358199381389873153
12:25:05SmaehtinGreat
12:25:19Araq_comex: I don't agree; intel's compiler knows about clobber registers etc. iirc
12:25:55comexby parsing the assembly?
12:26:09Araq_sure
12:26:55comexgood luck implementing that in a clean way in a compiler whose job is to produce assembly files :)
12:29:00Araq_Microsoft does this: http://msdn.microsoft.com/en-us/library/5hd5ywk0%28v=vs.71%29.aspx
12:29:53Araq_but its job is to produce binary files, not assembler listings
12:30:18Araq_assembler listings can be outputted via some switch of course
12:30:30Araq_but that doesn't mean the compiler should do that all the time
12:30:36comexof course, a compiler like clang has knowledge about that stuff within the same binary
12:30:44comexand doesn't actually go through text form...
12:30:50comexthen again, clang's inline assembly sucks for other reasons
12:30:53comexwell, llvm's
12:31:18comexsince GitHub's down, want to paste a copy of system/arithm.nim?
12:34:13comexbeing able to use structure offsets in the assembly is neat though
12:35:15comexhowever, it seems that MSVC's inline assembler also sucks, because you can't ask the compiler to stick things into particular registers
12:35:35Araq_oh yeah good point
12:36:01comexof course you can use mov, but it's nice not to produce wasteful code
12:36:26Araq_on the other hand the movs are most likely not even measurable
12:39:02Araq_(no, can't paste system/arithm.nim without github either here)
12:39:49EXetoCok massive test case coming up soon
12:39:57comexoh, i'ts back
12:41:24comexis there a reason you're asking it to put the operands in specific registers?
12:48:28Araq_I can't remember, I think it didn't work otherwise either
12:48:56Araq_and of course eax is the return value of the function
12:53:29EXetoCI've created a new issue. I could've removed a couple of modules, but it's not really going to make a difference
12:54:09EXetoCno wait, why does it compile now??
12:55:20EXetoCdidn't z=0 fail before? anyway, I'll just have to commit some changes
13:01:14EXetoCdone
13:02:33Araq_and now it fails?
13:02:58EXetoCya
13:03:43EXetoCYou should get this "gui.nim(44, 37) Error: undeclared identifier: 'z'" if left untouched
13:04:56Araq_ok
13:09:23EXetoCadding 'when true:' seems to work, but not 'block:' for example
13:09:59Araq_'when true' doesn't affect scoping, block does
13:10:07Araq_looks like a very interesting bug
13:11:01EXetoCdoes something in this case though
13:11:21EXetoCyeah, very hard to reproduce or trigger
13:14:59EXetoCz=0 works in the first example too btw
13:16:14EXetoCit just looks for 'z' in the current scope. it can be the name of an import too
13:18:10EXetoCwhat is your uncommitted stuff for? improved compile-time evaluation or something?
13:18:42Araq_yeah but also a bugfix for clean templates as accessors
13:27:42EXetoCok
13:34:45*Mat2 joined #nimrod
13:34:50Mat2hello
13:34:51EXetoCMat2: YO
13:38:30Mat2Araq: GAS support Intel sytax with the .intel_syntax direction, and to be said luckily there exist only some incompatibilities in this mode :D
13:40:18*mal``` quit (Ping timeout: 246 seconds)
13:41:45Mat2(like prefixing word-sizes with the ptr statement in a way which conforms to Microsoft's assembler MASM)
13:42:12*mal`` joined #nimrod
13:51:45comexMat2: except for the part where .intel_syntax is completely broken on OS X :(
13:55:06Mat2oh, I don't know that before. Can it be that OS X comes with AS because it incorporating the FreeBSD user-land ?
13:56:08comexit comes with a very old version of gas
13:56:10comexwell, it used to
13:57:00comexstill does, but clang now uses its integrated assembler instead
13:58:13comexdon't actually remember what my issue with intel_syntax was, though
13:59:12comexmaybe it's not as bad as I thought
13:59:15comex*yawn*
13:59:59Mat2I know from my experiences with FreeBSD that the GAS version (there labeled simply AS like the executable) used don't support Intel syntax
14:00:37Mat2however, clang should compensate for that in form of its IL representation
14:03:41Mat2and AT&T syntax has the advantage to be exact defined...
14:04:40*Araq_ quit (Read error: Operation timed out)
14:05:29Mat2otherwise the sources of gas up version 2 should compile fine on OS X
14:05:55*Araq_ joined #nimrod
14:21:59*wan_ left #nimrod (#nimrod)
15:35:53EXetoCbeep
15:36:36Mat2.
15:43:48EXetoCno u
15:44:10Mat2??
15:46:47EXetoCI don't know
15:46:49EXetoClater
15:51:44*BitPuffin quit (Ping timeout: 260 seconds)
16:06:00*Mat2 quit (Ping timeout: 276 seconds)
16:47:17*silven_ is now known as silven
16:48:26*Mat2 joined #nimrod
16:54:46*DAddYE joined #nimrod
16:55:41DAddYEMorning PST guys
17:01:48EXetoChi
17:01:58EXetoCsensible -> sensitive?
17:02:37DAddYEExetoC yea
17:03:05DAddYEboth is my english that is pretty bad and also I should turn off autocorrector on osx :D
17:03:32Mat2welcome to the club ;)
17:04:01DAddYEEXetoC: I saw something in the forum but have u discussed with Araq to put Nimrod on kickstarted?
17:04:12DAddYE(again corrector) *kickstarter
17:10:20EXetoCit's understandable english though
17:10:23EXetoCno I haven't
17:21:57DAddYEEXetoC: I'm playing a lot with nimrod beside things you already know I'm enjoying it a LOTTTTTTTT
17:22:29DAddYEEXetoC: rewritten libuv wrapper, http wrapper and added a bit of highlevel interface
17:22:59EXetoCgreat
17:24:19EXetoCI started off with C++, which I abandoned quickly after I found about D, but it also has issues that I can't be bothered with
17:24:49Mat2what issues have you figured out ?
17:25:01*alexandrus joined #nimrod
17:26:15*DAddYE sadly never found D interesting enough
17:26:28EXetoCand then Rust, which I don't use anymore, but it's still a good language
17:34:03EXetoCMat2: bad syntax, bad const system, weird struct construction semantics, and tons other small issues, but it adds up
17:34:28EXetoC*tons of
17:36:06Mat2hmm, that's the characteristic of most languages influenced by C I think
17:36:42DAddYEEXetoC: rust, nice, too young to me a lot of things changes fast (and is good), like heem case sensitive :D, but also there are a lot of things I mean seems a language that stolen a lot of things from others languages sometimes is good others not so "clean" IMHO
17:36:51DAddYEbut definitely I like a lot deconstructors
17:41:07EXetoCas in conjunction with match expressions? yeah, it's pretty useful
17:41:56EXetoCor did you mean object destructors?
17:47:10EXetoCprobably not. that's a lot less original :>
17:50:05DAddYEEXetoC: IIRC you can use the match directly in the fun (unless they changed this thing again)
17:50:49AraqDAddYE: Rust never was case insensitive
17:51:10Araqbut they changed the convention from 'type' to 'Type'#
17:51:28Araqafaik anyway
17:52:09DAddYEhaaaa thanks
17:53:14Mat2don't know Rust but it can only be an C++ inspired language with functional extensions incorporated I think, because it's trendy (and multi-code cpu's more common)
17:54:39Mat2sadly, I know one language of these type, which offers automatical parallelization of code sequences (which should much more innovative and needed)
17:57:25AraqMat2: and that is? Parasail?
17:57:55EXetoCit borrows features from many languages, so yes that's likely
17:58:41Mat2Araq: no, I mean modern APL interpreters
17:58:56Araqauto parallelization requires a cost function IMHO
17:59:13Araqand I know of no language that has that
18:00:49Mat2it is doable in a static way but need an dynamic (re)evaluation of source-code
18:04:17Mat2the main problem is synchronisation and that I handle restricting the language to be pure functional at core
18:05:27Mat2APL is predestinated for cheap parallelisation because of its functional AND array orented characteristics
18:06:42Mat2basical most sequences are executeble in parallel without problems if the interpreter is able synchronisate array accesses in case of the dynamical state of the interpreter
18:06:56Mat2and that's a cheap and simple extension
18:07:16Mat2^oriented
18:11:57Mat2^executable
18:13:04Mat2APL is somewhat unknown beside special oriented programmers which work in the dataflow industry I must say
18:13:26Mat2ok, no one else knows this language I bet
18:14:23AraqI do "know" it
18:14:56Araqwell I looked at it and couldn't understand anything ;-)
18:15:09Mat2so I was wrong and that's fine
18:15:30Mat2dito, it's feared as write-once language
18:17:07Araqhey it's my job to know every programming language
18:18:03Mat2in reality it's just an alternative, more compact mathematical notation
18:18:36Mat2I bought some (ok, most) ideas for my own system
18:26:59EXetoCis there a good reason why &= is defined for strings only?
18:27:21DAddYEEXetoC: I asked myself same thing yesterday
18:27:46Araqyeah
18:28:00Araqthe reason is nobody made a pull request
18:28:07Araqit's an oversight ;-)
18:28:13EXetoCok
18:29:40DAddYEEXetoC: I asked myself same thing yesterday
18:30:07DAddYEalso we need to support == > and so on for uint8 and so on
18:31:07EXetoCDAddYE: it's defined in the 'unsigned' module, in order to discourage the use of unsigned types
18:31:36EXetoCwhich I think is reasonable. I rarely need them
18:31:45DAddYEok
18:31:45DAddYEmakes sense
18:31:53DAddYEdidn't noticed that module
18:32:18Araqbbl
18:47:04EXetoCspeaking of kickstarter, didn't you plan to work on Nimrod full-time, Araq? if so, is that how you'd go about it? seems like the easiest way in general
18:47:13*gradha joined #nimrod
18:47:23EXetoCstill fairly hard though, depending on the circumstances, but that'd be awesome and a half
18:47:26EXetoCgradha: yo, wazzup
18:47:48gradhawatching the logs, having a shake
18:48:28EXetoCmilkshake? protein shake? booty shake?
18:48:58gradhamilk + banana + blender
18:50:00EXetoCyum
18:56:29EXetoCmaybe we should have a "type TNone = object" in system.nim. I tried to use 'void' for this purpose, but it can't be instantiated
18:56:54fowlwhere do you need that
19:04:39EXetoCfowl: it's for denoting the absence of a value. T|none for example
19:06:31fowlthats not going to work like its haskell
19:07:26EXetoCI don't know how it works in haskell, but it seems useful
19:08:30fowluse tmaybe[t] https://github.com/fowlmouth/nimlibs/blob/master/fowltek/maybe_t.nim
19:17:40EXetoCI forgot about that
19:19:00fowlnobody is using fowltek yet :(
19:19:03fowlon github at least
19:20:13gradhalack of documentation and visibility may have something to do with that
19:20:14EXetoCas a submodule? I've installed everything using babel
19:21:34fowlgradha, docs are built with the nimrod doc command, docs are lame anyways
19:21:43fowlat the bottom of each module is an example of use
19:22:26EXetoCI don't know if it's a good idea to have 'has' depend on 'isNil' in any way (if present), but it doesn't matter right now
19:22:52gradhafowl: it doesn't matter that you have an example at the bottom if people don't even know why would they want to use the maybe_t module
19:23:13fowlgradha, oh so what do i need? a mission statement for each module?
19:23:23EXetoCI mean when using 'assign'. it might make sense for Maybe
19:23:30fowlits pretty obvious that its a maybe[t]
19:23:47gradhafowl: exactly, I don't even know why would I use a maybe[t] because I haven't used one in my life
19:23:49DAddYEmaybe a readme
19:23:59DAddYEwith example usage
19:24:20gradhaI don't even know why a maybe[t] is useful
19:24:33gradhaor what problem does it solve
19:24:41gradhaignorance is bliss they say
19:25:25fowlthere is a readme, and there is example usage
19:25:31EXetoCsometimes it's useful to be able to specify the absence of a value
19:25:40fowlbut no, im not writing a paragraph for each module to sell it to people
19:26:03fowlim not going to explain when you would use a maybe[t] anyways, or what problem it solves
19:26:09fowlgoogle will answer your questions gradha
19:29:03DAddYEEXetoC: from my low know-how about it should be some like a monad
19:29:09DAddYEbut that said no clue
19:29:20fowlEXetoC, i cant reproduce your named arguments problem, as long as you have parenthesis around the args
19:32:48EXetoCfowl: I can't either, which is why my test case is massive
19:33:49EXetoCit even works in my original source now, and I haven't really changed much
19:37:41EXetoCare default arguments as flexible in any other languages? proc f(o: T, bla=o.x())
19:38:36EXetoCyeah, probably in some dynamic languages
19:41:36EXetoCstupid zombie process!
19:44:49fowlEXetoC, not sure if you can do that
19:45:44EXetoCfowl: you can!
19:45:52EXetoCawesome innit
19:46:53Araqyou can? I wonder how
19:47:28EXetoCyou don't know, really? :p hopefully it works correctly then
19:48:03EXetoCbut I've used it successfuly a couple of times
19:48:06AraqI can't imagine how unless zahary1 made it work
19:48:21fowlbecause arguments are processed left to right
19:48:42Araqoh I don't wonder why it passes the semantic checking
19:49:05AraqI wonder why it generates correct code
19:49:31EXetoChopefully it's a feature, because it rox
19:51:55AraqEXetoC: btw kickstarter won't work I'm afraid, especially because I bought a house ... -.-'
19:53:02EXetoCdoes that mean you're not poor enough for people to care? :p
19:53:17DAddYEEXetoC: hahuahahahaha
19:53:25Mat2I'm just aksing me the same question right now...
19:53:36EXetoCstupid game keeps crashing. that's a good thing though, because it's a bloody waste of time!
19:54:26Araqwell ... you know ... buying a house doesn't imply that you have the money for it
19:54:40DAddYEwhat is your alternative language to Nimrod aka what do you use once you can't (like maybe at work)
19:55:00gradhaEXetoC: so true, I ragequite my last addiction when it could not load the save game "due to corruption", or should I say, incompetent programmers
19:55:03EXetoCI forgot about this 'loan' thing
19:55:32DAddYEAraq: you can ask your employer to give you 1 year of wait time (in Italy there is a law for that I think your country too)
19:56:30DAddYEluuuuuuuuuuuuuuuuuuuuuunch
19:56:34AraqDAddYE: C#
19:56:45DAddYEAraq: sorry for that :(
19:56:56DAddYE:D
19:57:04Araqcould be much worse, could be Java instead ;-)
19:58:00Mat2a lot of ehm ... useful documentation documentation for Java ;)
20:00:49EXetoCgradha: you should've been paranoid like me and created a new entry every time!
20:06:11EXetoCbut hopefully you're writing more code now instead
20:10:46gradhanah, switched to watching youtube
20:11:18EXetoC-.-
20:17:12dom96hi
20:17:40gradhahi
20:19:10EXetoChi
20:27:22Mat2hello
20:28:15dom96hi
20:28:28gradhahi
20:29:28EXetoCYO
20:29:44Mat2by the way, what means yo ?
20:30:10EXetoCthat's the gangsta way of saying hi
20:30:48Mat2ehm ok
20:33:55*Mat2 must be something like 'mu' in rinzai zen
20:43:06dom96gradha: so what did you do to fix the builder?
20:44:38gradhathe git checkout was broken, purged several times until it caught up
20:45:23gradhaalso increased the ping timeout, though extreme torrenting still messes it
20:46:04gradha- if epochTime() - state.pinged >= 5.0: # 5 seconds
20:46:04gradha+ if epochTime() - state.pinged >= 15.0: # 5 seconds
20:46:33gradhano idea if it helps at all, maybe it's a placebo
20:50:06dom96the hub may still time you out
20:50:25dom96and it does seem to be disconnecting sometimes.
20:50:39dom96Your lag is 18 seconds 0_o
20:50:57gradhayeah baby
20:51:25dom96I guess i'll make this stuff configurable then
20:51:33*alexandrus quit ()
21:30:56dom96Araq: So I think we need to finally move the csources out of the git repo.
21:31:27Araqas I said, fine with me
21:31:48dom96Alright. Where do you want to move the C sources to though?
21:31:58Araqnimbuild of course
21:32:32dom96How will you upload them then if you break bootstrapping?
21:32:43dom96I was thinking we have two options:
21:33:42dom96Hosting them on nimrod-code.org, which is I guess what you mean? But then zahary can't upload there.
21:33:51dom96*is
21:34:17Araqfine
21:34:26Araqlet's make another github repo then for them
21:34:34dom96Yeah, that's the second option.
21:34:41Araqwe need to spam github with nimrod projects anyway
21:35:23dom96we might as well keep it unzipped in the separate github repo then
21:35:48dom96github can zip it for us if the user has no git installed
21:35:48Araqbut the generated C is big
21:35:59Araqbut ok
21:36:09Araqsounds good
21:36:11dom96why would anyone be interested in the diff anyway?
21:36:20dom96I bet github got better at handling large diffs also.
21:36:33Araqoh yeah hmm
21:36:34dom96I would guess it's just hidden now if there is too many changes.
21:36:45AraqI don't think so
21:37:02dom96we can test that easily :P
21:37:52dom96I'll create the repo in the nimrod-code organisation, or do you want it under your username?
21:38:12Araqthe org of course
21:38:50dom96what should i call it? csources? bootstrap? bootstrappkg, nimboot, nimrod_bootstrap, nim_csources?
21:40:55Araqdunno the 'nim' prefix is getting boring
21:41:12dom96yeah, it's starting to annoy me.
21:41:37dom96Whenever I try to autocomplete 'nimrod' after typing 'nim' ...
21:41:48Araqsame here
21:42:33gradhasources.nim, you can have dots in the module name IIRC
21:42:51dom96heh, yeah. Was about to suggest that. Node.js style :P
21:43:15Araqno
21:43:20gradhayou could also start prefixing everything with gradha, it's getting fashionable
21:43:46dom96Araq: yeah, I don't like it either :P
21:44:11dom96gradha_sources: build your own gradha today!
21:44:27AraqI find it amusing; it comes from the "we don't need no stinkin file extensions on unix" crowd after all
21:45:37gradhaI'd name the github module xvsZ745HyV5FLqJc
21:45:48gradhait also serves as a nice random password
21:45:59EXetoCok this default argument stuff is too bleeding-edge :p
21:46:09dom96yeah, lets just use an md5 hash of 'sources'
21:46:27AraqEXetoC: doesn't work, hmm? :P
21:46:33EXetoCsometimes
21:47:42EXetoCI'll just have to avoid referencing some of the other arguments
21:47:55Araqyep
21:48:07Araqcalls as defaults are fine otherwise
21:48:24dom96what should I call it then?
21:48:47Araqlets ask DAddYE, he knows these things
21:48:58EXetoCand TMaybe for the others
21:49:36DAddYEAraq: wwwwwhat?
21:49:43gradhaname it gamera_eggs
21:49:51gradhagamera_cocoon
21:49:55Araqno
21:50:06Araqwe already have the gamera edition
21:50:10Araqthat's enough
21:50:11DAddYEAraq: what is the status of vm registers ?
21:50:31AraqDAddYE: I'm testing it
21:51:43DAddYEAraq: what big advantages it will give us?
21:51:49DAddYEother than eval
21:52:21Araqeval speed and it will fix eval bugs
21:52:46DAddYEneat
21:54:47DAddYEAraq: is there a roadmap?
21:54:51DAddYEof nimrod
21:55:47Araqthere is my todo.txt
21:56:12EXetoC"error: unknown type name ‘TY209224’ typedef N_INLINE_PTR(tmaybe209230, TY209224) (void)" d'oh
21:56:38*dom96 waits for that name
21:58:06AraqEXetoC: don't use .inline procs as first class
21:58:17DAddYEAraq: shared memory heap -> can't wait
21:58:18Araqbut make a bug report of course
21:59:25DAddYEAraq: also this arglist as a type (iterator chaining); variable length type lists for generics | NICE
21:59:57DAddYEAraq: any plan for coroutines ?
22:00:33EXetoCAraq: what do you mean?
22:01:09AraqEXetoC: I'm guessing you're passing a proc around which has been declared .inline, but I could be wrong
22:01:17dom96Araq: What should I name it!?
22:01:33gradhadom96: everything has been rejected, therefore name it nil
22:02:08Araqdom96: bootnim
22:02:14EXetoCAraq: ah right, forgot to call it
22:02:33dom96Araq: sounds too much like a tool.
22:02:56gradhalooks like Knuth was right
22:03:32AraqDAddYE: yes since many people requested them
22:04:56DAddYEhow hard will
22:05:37DAddYEdo that?
22:05:42DAddYE(for the current GC)
22:07:32Araqit's not really hard but tedious
22:07:39EXetoC"`type`: TWidgetType|typedesc[none]=none," aiight
22:07:54dom96ugh screw it, i'm calling it csources
22:08:05Araqdom96: ok good
22:11:03Araqdom96: do you prune the history too?
22:11:13dom96not right now, no.
22:11:32DAddYEyesterday night I did some nim coding, is there a better way in doing this: https://gist.github.com/DAddYE/47fc075004bcf7c0008e ?
22:11:33dom96I think we should do that once this bootstrapping method is stable and tested.
22:11:46EXetoCI can even do this: "type parent* = distinct void", and then f(`type`=parent) for increased readability.
22:12:55AraqDAddYE: req.body.add(body)
22:13:15DAddYEwithout nil check ?
22:13:27Araqinstead of req.body = req.body & body
22:13:50DAddYEok
22:13:56Araqthe nil check is necessary unless you use 'safeAdd'
22:14:13DAddYEneat, do you suggest to use it instead?
22:14:28DAddYEsafeAdd or assign
22:14:57Araqnot really, I think we should make 'add' and 'len' nil safe
22:15:12DAddYEI agree
22:15:22Araqand maybe have an xlen and xadd for the crazy people who can't stand the overhead
22:16:04DAddYEmakes sense
22:16:22Araq body = body[0..length - 1] # more efficient: body.setLen(body.len-1)
22:16:37Araqer
22:16:43Araqbody.setLen(length-1)
22:17:00DAddYEtrue! Good catch!
22:17:45DAddYEAraq: also, if you want to write a doc/spec about things missing in system or easy tasks like better docs and so on
22:17:56DAddYEwrite it somewhere so in my freetime I'll try to help
22:18:27DAddYEthe todo.txt is too todo for my current knowledge of nim
22:18:57DAddYEalso if you need to "reorganize things"
22:19:08DAddYEaka the boring stuff that no one one todo
22:19:10DAddYE:D
22:19:43dom96yep, I was right: https://github.com/nimrod-code/csources/commit/246869efea84f76e8972162a64dddee9ab80b4f6
22:19:44dom96:D
22:19:56dom962.8 million additions.
22:19:58dom96Nice.
22:20:01EXetoChe'll do it, and then demand cookies retroactively
22:20:16dom96DAddYE: Make a better gtk wrapper
22:20:50dom96But perhaps you need more experience with nimrod to make an idiomatic gtk wrapper.
22:21:12DAddYEdom96: yup
22:21:32DAddYEdom96: right now I'm rewriting / updating libuv and http_parser
22:21:49DAddYElong long plan (if possible) node.nim
22:21:50DAddYE:D
22:22:06DAddYEI know Araq did nimrod to port node.js
22:22:07DAddYE:D
22:25:39*gradha quit (Quit: bbl, need to watch https://www.youtube.com/watch?v=1ZZC82dgJr8 again)
22:28:12AraqDAddYE: you know he have a JS backend, right?
22:28:15Araq*we
22:28:30DAddYEjs is for losers :D
22:29:12EXetoClol
22:29:31DAddYEqq: a thing like $(at).setLen(length - 1) cannot be valid right?
22:32:58Araqright
22:33:23dom96Why are you mentioning node.js then?
22:34:04DAddYEdom96: I like libuv but I don't like (so much) js, node is neat
22:34:11DAddYEbtw is just exercises
22:34:40DAddYEAraq: so haven't we an alias for $ like toStr() or some like that?
22:37:39dom96why would we?
22:39:40DAddYEdom96: just because I need to convert a cstring to string in order to use setLen but I want to know if there is a way to avoid to assign a new var with $at
22:40:00DAddYEand so use at.toStr().setLen(..)
22:40:09DAddYEmaybe
22:40:15EXetoC($at)...?
22:40:15DAddYEsetLen $a, number
22:40:16DAddYE?
22:40:33dom96setLen needs a 'var' I think
22:40:40DAddYEok
22:40:55DAddYEthinking about that Im stupid
22:41:07DAddYEsetLen doesn't return a new string so
22:41:12DAddYEI need a var in any case
23:02:46*Araq_ quit (Ping timeout: 240 seconds)
23:03:08*Araq_ joined #nimrod
23:04:26Mat2ciao
23:04:43*Mat2 quit (Quit: Verlassend)
23:27:22DAddYEAraq: sounds crazy to you add to ArryLike foo[-1] to get latest result?
23:30:03EXetoCD's approach is good. $ evaluates to the length
23:30:49EXetoCyour approach would incur some overhead by default
23:32:54DAddYEso to get latest $foo is enough ?
23:33:17EXetoCfoo[$ - 1]
23:33:23EXetoCsame as foo[foo.length - 1]
23:33:44DAddYEfantastic
23:33:44EXetoCpretty neat, but $ is obviously occupied already
23:33:51DAddYEyep
23:34:04DAddYEfoo[#-1]
23:35:01EXetoCit would be inconsistent since # denotes the beginning of a comment
23:37:04DAddYEtrue
23:40:08EXetoCAraq: are sum types a planned feature? if not, then maybe you could allow two arguments to be specified for converters, which would allow type parameters of the target type to be extracted
23:43:19EXetoCwhich would allow things like foo(none), as an alternative to foo(Nothing[SomeType])
23:44:03EXetoCfowl: thoughts? too much nitpicking?
23:47:21EXetoCnah, just more awesomeness, amirite :>
23:47:24EXetoClater
23:49:42*EXetoC quit (Quit: WeeChat 0.4.1)