<< 12-06-2015 >>

00:00:28flaviuTBH it's never been a problem for me
00:00:59flaviuand I keep Nim installed in my home directory structure since I change it too much to keep anywhere else.
00:01:15wepyic
00:01:25wepyyea i can see if you're developing it, it's nice to have a local copy
00:01:39wepybut i think that's solved well with environment variables, too
00:01:46wepyanyway, meh :)
00:03:55*wepy quit (Quit: leaving)
00:04:05flaviuThe debian package looks like it puts everything in the right place on the filesystem though
00:06:01*vikaton joined #nim
00:06:12AraqI don't think there is anything that is solved "well" with environment variables. That's just another form of global shared state, so instead of hardcoding /usr/lib/nim you hardcode NIM_PATH. Hardly better.
00:06:49Araqand then you get it wrong cause nim version 0.11.2 needs a different stdlib from 0.11.4
00:07:09Araqand so it's NIM_PATH_0.11.4 or whatever
00:07:27vikatonheh
00:07:32*enquora quit (Quit: enquora)
00:07:36vikatonAraq lost 2,000 stars 2day :P
00:08:31vikaton foldr (:) [] [1,2,3]
00:08:37vikatonWindows (Windows XP or greater) - x86 and x86_64 **
00:08:50vikatonwhats greater than Windows XP ?
00:10:57Araqvista, windows 7, windows 8 ?
00:11:30vikatonimo, it should be later than greater
00:11:36vikatoncuz windows XP is the greatest
00:11:41Araqlol
00:11:52EthecoWell
00:12:03vikatonanyhow, anyone try compiling Nim on Windows10 ?
00:12:33Ethecoi could try it on my laptop but htat seems like effort xD
00:14:02reactormonkvikaton, where are stars counted?
00:14:10reactormonkvikaton, but he got tons of public contributions :-P
00:17:16flaviuvikaton: Windows XP support is only $400/device/year!
00:17:24flaviuquite the bargain ;)
00:17:51vikatonI dont need no support!
00:17:52vikatonim 1337
00:18:15Araqpretty sure our cashpoints still run on xp
00:19:21flaviuWell, the way it works is that microsoft doubles the price every year to make it extra-convincing for companies to upgrade.
00:24:45Araqflaviu: I don't think banks have problems with paying Microsoft
00:26:21flaviuhttp://jwilson.coe.uga.edu/EMT668/EMAT6680.F99/Martin/instructional%20unit/day4.exponential/excel/grainofrice.html
00:27:50*brson quit (Ping timeout: 244 seconds)
00:39:29*blakev quit (Quit: Page closed)
00:40:45*wepy joined #nim
00:50:41reactormonkAraq, wanna bet how long they can pay it?
01:06:51*tennix joined #nim
01:11:13*tennix quit (Ping timeout: 256 seconds)
01:12:32*tennix joined #nim
01:14:50*jaco60 quit (Ping timeout: 265 seconds)
01:18:11wepyhm
01:18:23wepydo you think nim has too many features?
01:18:34wepylike.. so many option parsing modules
01:23:37flaviuwepy: "so many option parsing modules in the stdlib" might be a better argument
01:24:19flaviuThe people who work Nim have no control over anyone that decides to write a module out-of-tree.
01:44:23wepyya
01:57:07*dddddd quit (Ping timeout: 255 seconds)
02:07:34*wepy left #nim (#nim)
02:17:23*darkf joined #nim
02:18:39*kumul quit (Ping timeout: 276 seconds)
02:31:42*cmk_zzz quit (Ping timeout: 265 seconds)
02:40:12*tennix quit (Remote host closed the connection)
02:40:44*tennix joined #nim
03:11:55*TEttinger joined #nim
03:31:56*ddl_smurf quit (Quit: ddl_smurf)
03:50:17*xificurC quit (Read error: Connection reset by peer)
03:50:37*xificurC joined #nim
03:55:23*dalarmmst quit (Ping timeout: 265 seconds)
03:55:52*dalarmmst joined #nim
04:00:21*brson joined #nim
04:23:36*Jesin quit (Quit: Leaving)
04:43:19*tennix quit (Remote host closed the connection)
04:51:20*tennix joined #nim
04:57:23*kumul joined #nim
05:00:43*kumul quit (Read error: Connection reset by peer)
05:24:24*tennix quit (Remote host closed the connection)
05:31:34*tennix joined #nim
05:32:54*kas joined #nim
05:33:50*Jesin joined #nim
05:37:43*ozra quit (Ping timeout: 246 seconds)
05:58:05*vikaton quit (Quit: Connection closed for inactivity)
06:05:29*banister quit (Ping timeout: 252 seconds)
06:06:47*ozra joined #nim
06:09:30*sepisoad joined #nim
06:13:29*Jesin quit (Quit: Leaving)
06:18:10*kas quit (Remote host closed the connection)
06:23:39*Matthias247 joined #nim
06:24:12*sepisoad quit (Ping timeout: 272 seconds)
06:25:14*xcombelle joined #nim
06:25:38*brson quit (Ping timeout: 276 seconds)
06:33:55*Matthias247 quit (Read error: Connection reset by peer)
06:37:06*sepisoad joined #nim
06:46:02EastByteIs it safe to use templates in an async proc?
06:57:31*ozra quit (Ping timeout: 246 seconds)
06:59:51*Ven joined #nim
07:04:59reactormonkEastByte, templates just produce code, so sure
07:06:38*jbomo quit (Ping timeout: 272 seconds)
07:09:11EastBytereactormonk: the async macro does a body transformation on the proc
07:09:26EastBytebut when I dump the tree the template "calls" stay the same
07:10:04EastBytefor example using return in a template causes a crash
07:10:19reactormonkyeah, return in a template is funky anyway
07:11:22EastByteso I shouldn't do it then
07:11:34reactormonkwould you put a return in an async call?
07:11:45reactormonkremember, a template is not a proc. return doesn't work as you expect it to.
07:12:07reactormonkon another note, use return only for explicit flow control.
07:13:29EastByteehm, how should I complete an async proc?
07:14:22EastBytecan I simply call complete(retFuture) ?
07:15:00EastByteI thought return is the way of doing that using the async macro
07:17:19reactormonkI haven't used the async stuff too much, better wait for dom96, he should be at work by now...
07:17:39EastByteokay
07:21:52dtscodedoes nim have like a shuffle function?
07:23:34*Sembei joined #nim
07:30:06*wb joined #nim
07:30:37*ozra joined #nim
07:37:35*Sembei quit (Read error: Connection reset by peer)
07:38:21*Pisuke joined #nim
07:38:55*zikolach joined #nim
07:44:04*tennix quit (Remote host closed the connection)
07:45:05*tennix joined #nim
07:50:44*zikolach quit (Remote host closed the connection)
07:54:20*Pisuke quit (Read error: Connection reset by peer)
08:11:57*coffeepot joined #nim
08:12:52*yglukhov________ joined #nim
08:15:44*Pisuke joined #nim
08:18:29*Ven quit (Read error: Connection reset by peer)
08:19:25*zikolach joined #nim
08:19:46*bluenote quit (Ping timeout: 246 seconds)
08:20:08*yglukhov________ quit (Quit: Lingo: www.lingoirc.com)
08:20:28*yglukhov joined #nim
08:25:48*zikolach quit (Ping timeout: 272 seconds)
08:27:35yglukhovHello everyone :)
08:28:46*davidhq joined #nim
08:29:07yglukhovAraq, I still can not produce a test case which would fail my PR on bracket addrs. Also I haven't quite understood what you mean that I've got to do skipTypes twice :(
08:31:17*davidhq quit (Client Quit)
08:38:02*zikolach joined #nim
08:46:40*MyMind quit (Excess Flood)
08:47:10*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
08:47:46*silven quit (Quit: No Ping reply in 180 seconds.)
08:48:06*coffeepot joined #nim
08:49:01*silven joined #nim
08:49:25*MyMind joined #nim
08:49:31*ErikBjare_ quit (Ping timeout: 244 seconds)
08:50:40*elbow quit (Ping timeout: 252 seconds)
08:51:40*boopisaway quit (Ping timeout: 265 seconds)
08:52:08*Pisuke quit (Ping timeout: 246 seconds)
09:03:07*elbow joined #nim
09:03:15*boopisaway joined #nim
09:14:13coffeepothey guys, can I just check this with you for my sanity. Have buffer allocated with alloc0. I want to put a zero terminated string in it. This is what I want, right? cast[ptr cstring](buffer)[] = someString
09:16:26coffeepotand likewise, reading it out should be var mycstring = cast[ptr cstring](buffer)[] ?
09:16:53*ErikBjare_ joined #nim
09:29:23yglukhovcoffeepot, I think you should copy the string into the buffer, and you're doing something else.
09:30:04coffeepotsomething isn't right, that's for sure. What do you mean by copy the string in? Literally do a memcpy type thing?
09:30:20yglukhovyes, or strcpy
09:31:01yglukhovI'm not sure if nim has strcpy, but you can easily import it with importc pragma
09:31:49coffeepotfor what it's worth, if I do the cast to write, then the cast to read I get what I put in, so it does seem like it's doing a copy.
09:31:54*thepreacher joined #nim
09:32:11yglukhovno
09:32:26yglukhovwith cast to read you're referring your original buffer
09:32:36yglukhovnot the one created with alloc
09:34:05yglukhovcoffepot, actually I may be wrong here, maybe nim handles cstrings as value types internally
09:34:15yglukhovi'll check it now
09:34:16coffeepotoh... I think I see what's going on, so I'm basically stuffing a pointer to the cstring into the buffer?
09:34:26yglukhovyes, thats what i mean
09:34:34coffeepotthat makes a lot of sense tbh
09:36:53*thepreacher quit ()
09:37:29yglukhovok, I was right. Nim treats cstring as a raw pointer, so it doesn't do a strcpy when "copying" it. you have to do it manually
09:37:31*vendethiel quit (Remote host closed the connection)
09:37:41*vendethiel joined #nim
09:38:03coffeepotok this is good news! :D thanks a load yglukhov :)
09:38:17yglukhovno problem ;)
09:38:28*thepreacher joined #nim
09:41:48*thepreacher quit (Client Quit)
09:54:55coffeepotyglukhov, thanks again - finally got me sql params working whee! :D
09:55:56yglukhovanother happy nim user. thats nice to hear ;)
10:01:48coffeepotyes! Plus this raises the realistic prospect of using Nim at work, where we're all sql server :)
10:02:44yglukhovindeed. we also have started a project in nim in our company. and planning to start one more.
10:02:55yglukhovno releases though yet ;)
10:05:31*TEttinger quit (Ping timeout: 276 seconds)
10:07:29*jaco60 joined #nim
10:09:15*banister joined #nim
10:12:40*ddl_smurf joined #nim
10:13:59*milosn quit (Quit: leaving)
10:15:24*phI||Ip quit (Ping timeout: 264 seconds)
10:16:44*Kingsquee quit (Quit: Konversation terminated!)
10:17:34*phI||Ip joined #nim
10:18:49*Tennis joined #nim
10:18:49*Tennis quit (Changing host)
10:18:49*Tennis joined #nim
10:22:31*gmpreussner|work quit (Ping timeout: 244 seconds)
10:24:48*gmpreussner|work joined #nim
10:25:38*Jesin joined #nim
10:33:08*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
10:34:45*coffeepot joined #nim
10:36:15ozrayglukhov: Hey. Curious as to why not use enscriptem for js-compiling instead of maintaining another solution?
10:36:59ozraI read someone ported a SNES emu via Nim -> Emscriptem, so it should be pretty capable?
10:38:23*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:41:02coffeepotozra, I think that was def- here http://hookrace.net/blog/porting-nes-go-nim/
10:42:12*sepisoad_ joined #nim
10:45:10*sepisoad quit (Ping timeout: 258 seconds)
10:55:50*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
10:59:50*coffeepot joined #nim
11:01:35ozracoffeepot: right - that one :)
11:09:58avsejI'm getting this error while running tests
11:09:59avsejhttp://staging.toptal.net/stripe/hello
11:10:10avsejnot this one
11:10:11avsejsorry
11:10:19avsejlib/pure/times.nim(445, 17) Error: number 116444736000000000'i64 out of valid range
11:10:34avsejhttps://copr-be.cloud.fedoraproject.org/results/avsej/nim-devel/fedora-rawhide-i386/nim-0.11.3-530.g70e157d.el7.centos/build.log.gz
11:10:39avsejthe log is here
11:11:03avsejit is only reproducible on x86 platform
11:12:22avsejAraq, I think it was introduced by this PR https://github.com/nim-lang/Nim/pull/2896/
11:19:40ozraavsej: could also be from my PR...
11:20:49*tennix quit (Remote host closed the connection)
11:23:13*wb quit (Read error: Connection reset by peer)
11:23:53avsejinteresting why there are no fresh code on http://buildbot.nim-lang.org/builders/linux-x32-builder
11:24:01avsejI bet it will also catch this issue
11:24:56ozraavsej: It only happens in x86 32bit?
11:25:03avsejyes
11:25:26*Sentreen joined #nim
11:25:35avseji think that something platform-specific missed, and 64bit integer became not portable
11:25:45avsejat least literal
11:25:51yglukhovozra, that's just another holy war :) I beleive in nims js codegen, because I feel like it. Also emscripten adds another layer of VM which doesn't sound more efficient than generating semantically-alike code.
11:26:41ozrayglukhov: I see, was mostly curious. How stable is js codegen in Nim (I will probably have to js some more in the future ;)
11:26:45ozra?
11:27:37yglukhovin most cases it works for me. some bugs I fixed not beacause I personally faced them.
11:28:02ozrayglukhov: How does it handle pointers and the like?
11:28:04yglukhovyou might want to have a glance at my nimx pet project
11:28:31yglukhovit compiles to ios, android, macos, linux, windows, and js with webgl =)
11:28:47yglukhovpointers should mostly work.
11:28:57yglukhovpointer arithmetic - doubt it
11:28:57yglukhov=)
11:29:01*tennix joined #nim
11:29:20yglukhovi mean, it depends on what semantics you need from pointers.
11:29:42*tennix quit (Remote host closed the connection)
11:29:55yglukhovcompared to emscripten - no. pointers are not that "real" ;)
11:30:03ozraavsej: Can you make a ticket for the error?
11:30:06ozraissue..
11:30:15avsejsure
11:30:37yglukhovbut why would you need pointers in nim anyway? =)
11:31:12ozrayglukhov: No, I was just curious. I'm from the C++ camp, but I'm slowly accepting GC as not so bloody dangerous after all ;-)
11:31:49yglukhovme either =)
11:31:54ozraWas thinking if one uses modules in JS targeting...
11:32:04ozraand they use pointers..
11:32:06yglukhovafter I ran nim on arduino, i'm not going back
11:32:24ozrahow does nimx differ from nim?
11:33:14yglukhovnimx is not a compiler =) it's intended to be a UI kit, featuring hw accelerated vector drawing.
11:34:08yglukhovuses sdl on natives, and webgl for browsers.
11:35:09ozraAhaaa.. Cool! Well, if I do any js, it'll be iojs, and it will not be web stuff ;)
11:37:41yglukhovozra: "and they use pointers.." yeah, the hard part currently is that you have to consider for js when you're writing a library code. some things may not be available in js. but as a general rule of thumb, don't use pointers, don't use casts, don't use infinite loops, use IO accordingly, and you should be fine.
11:38:23ozrayglukhov: sweet, I'll try it out when the need arises :)
11:38:23yglukhovby "don't use pointers" i mean pointer arithmetics and casts.
11:40:55ozraavsej: When you have the issue up, you can tell me, so I know what to refer to, and I'll see if it's in the code I know and fix it.
11:41:26ozra(I like having the number in the branch - otherwise I have no clue what they are ;)
11:48:34*thepreacher joined #nim
11:49:44*thepreacher quit (Client Quit)
11:50:16avsejozra, https://github.com/nim-lang/Nim/issues/2909
11:53:34ozraavsej: Actually I saw my fix isn't pulled yet - it will likely fix that problem too. I made a mention in issue, so it's easier to follow..
11:55:09avseji will run my builder on your branch
11:55:36ozraIt's in branch fix-1179-unsigned-number-literals
11:55:59ozrait fixes more than 1179, because I found bugs while fixing it...
11:57:35*Ven joined #nim
11:57:38*sepisoad_ quit (Ping timeout: 256 seconds)
12:00:39*boopisaway is now known as boop
12:02:23Ethecoi am running c2nim --cpp and it states "woofers.cpp(53, 47) Error: ')' expected" that line is "static DWORD WINAPI ConnThread(LPVOID lpParam) {" any idea?
12:07:06ozraEtheco: I think this is Araq expertise area...
12:07:12*Ven quit (Ping timeout: 258 seconds)
12:07:41Ethecoi know it states it cant convert some so might just be out of luck on converting this for learning purposes :D
12:08:06*sepisoad_ joined #nim
12:09:13ozraHave you tried removing static or WINAPI, just to see what gets in the way.. I can imagine the three word combo might choke the parser if it's not prepared for it (?)
12:10:35gokrEtheco: Yeah, c2nim is Araq's baby and he is using it a lot right now and improving it too.
12:11:14Ethecoah removing DWORD has moved to another error
12:11:45Etheco"woofers.cpp(104, 37) Error: ';' expected" "CryptoPP::SecByteBlock rsaCypher(rsaBuffer, rsaPayloadLen);"
12:12:00Ethecothink this is because its using a third party module
12:12:50Ethecosuppose ill just keep hacking it till it passes :D
12:13:24ozraslice and dice!
12:13:53*JinShil joined #nim
12:14:06Ethecothink sometihng went wrong mind, it says successful yet has turned a 400 line file into 35 lol
12:15:30*Ven joined #nim
12:19:23*banister joined #nim
12:24:40*Sentreen quit ()
12:28:10avsejozra, your branch still have this issue
12:28:23avsejlib/pure/times.nim(445, 17) Error: number 116444736000000000'i64 out of valid range
12:31:41*xificurC quit (Ping timeout: 244 seconds)
12:32:41*thepreacher joined #nim
12:37:44*Ven quit (Ping timeout: 245 seconds)
12:39:01*Ven joined #nim
12:44:29*Arrrr joined #nim
12:44:46*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:45:55sepisoad_when i run an app compiled using -d:ssl on windows I get this error:
12:45:55sepisoad_Entry Point Not Found
12:45:56sepisoad_ -
12:45:56sepisoad_The procedure entry point DHparams_dup could not be located in the dynamic link library LIBEAY32.dll
12:46:18sepisoad_anyways the exe would run without any crash
12:46:30sepisoad_why is this so?
12:47:22*jszymanski joined #nim
12:52:51*Ven quit (Ping timeout: 265 seconds)
12:55:21sepisoad_I copied the libeay32.dll from nim bin folder to the folder where my exe resides and the error gone
12:57:44*dddddd joined #nim
12:59:45sepisoad_i guess my app was using a wrong version of the dll
13:00:04*wb joined #nim
13:05:13*wb quit (Ping timeout: 264 seconds)
13:08:22ozraavsej: Did you use fix-1179-unsigned-number-literals
13:08:29ozrabranch...
13:08:32avsejyes
13:09:36ozraaha, ok. to bad! I'll have a look if there's still something in that part of the code.
13:09:53avsej7ca61f4 is top commit on your branch
13:11:18*wb joined #nim
13:12:48*sepisoad_ quit (Quit: Leaving)
13:16:53*banister joined #nim
13:16:59*banister quit (Max SendQ exceeded)
13:28:01*kumul joined #nim
13:42:38*yglukhov quit (Ping timeout: 246 seconds)
13:47:31*banister joined #nim
13:51:15*milosn joined #nim
13:53:56*ggVGc quit (Quit: leaving)
14:02:44*zikolach quit (Read error: Connection reset by peer)
14:05:55*vikaton joined #nim
14:09:27*thepreacher quit ()
14:17:05ozraavsej: That should be right. Are you sure that compiled version was actually run? It does look like it should work with the patch...
14:17:23ozraI'm gonna see if I can boot up an old 32bit machine here..
14:18:05avseji'm sure. on copr everything run in clean chroot. there no other
14:18:17avsejno other nim installed
14:18:26ozracool. always worth checking :)
14:18:48avsejwhat OS do you usually use?
14:19:32ozraubuntu 14.04LTS 64 bit
14:20:14ozraI have an old ubuntu 10.10 32bit machine. No screen, kbd, I'll boot it up and see if I can guess the IP to ssh, haha
14:20:41avsejthere is cowbuilder on ubuntu, which allows to setup clean chroot of different architecture
14:21:08avsejof course it is more sane on centos/fedora, but afair it is pretty usable on debian-like systems
14:21:36ozradon't in the time frame of learning something new atm, I got in, so I'll try it on that machine.. I'll check that out later, thanks for the tip.
14:22:06avsejhttp://docs.vagrantup.com/v2/getting-started/index.html you can install vagrant+virtualbox
14:22:23avsejand get ubuntu 32bit with two commands
14:22:24avsejvagrant init hashicorp/precise32
14:22:28avsejvagrant up
14:22:54avsejbut if spawning old machine will be easier for you, I would be glad to test the fix
14:23:39ozraavsej: Thanks for all the tips, I'll definitely look into them - I've got a bit of slow connection and machine, so offloading is pretty good though, but, in any event :)
14:24:50ozraI sync the machines with syncthing, so everything is backed up all the time, so I'll just cp the dir on that machine for building 32bit :)
14:25:08ozra(it's still syncing though ;)
14:25:17*strcmp1 quit (Remote host closed the connection)
14:27:02*bjz joined #nim
14:31:01*bjz quit (Client Quit)
14:31:14ozraavsej: Did you get the error in the bootstrapping process?
14:31:31*bjz joined #nim
14:31:46ozraavsej: Never mind..
14:32:30avsej+ ./bin/nim c koch
14:32:42avsejozra, did you reproduce it?
14:33:15ozrayes, I got it on the 32bitter, on devel, gonna try it on the fix-branch..
14:33:47ozraHmmm, I'm no git master mind. How do I get that branch down?
14:34:08ozraonly got devel... (I cloned instead of waiting for sync ;)
14:34:46avsejyou have you clone your fork
14:34:55avsejor add it as a remote
14:35:03ozradone on both..
14:35:09ozracloned..
14:36:02ozradid a git fetch --all - seemed to work
14:36:21avsej git remote add ozra git://github.com/ozra/nim.git
14:36:21avsejgit checkout -b fix-1179-unsigned-number-literals ozra/fix-1179-unsigned-number-literals
14:36:27avsejthis is how i did it
14:37:21ozraWorked. With origin/ - thanks a lot!
14:45:36*zikolach joined #nim
14:46:29ozraavsej: The error was not in that part of the code, it's in a called function, that's why.. I'll check that out.
14:46:59*askatasuna joined #nim
14:50:05*jszymanski quit (Quit: computer sleeps...)
14:54:43*zikolach quit (Ping timeout: 250 seconds)
15:04:29*enquora joined #nim
15:14:57ozraAraq: Got a reeeally weird thing here I can figure out, can you help out a sec? A BiggestInt (verified to be 64bit+ in echo) overflows as soon as the number is larger than 32bit (!!) Where's that check being made. Or is BiggesInt "lying" and reporting 64bit ranges through .low / .high, but really being 32bit? - This is on x86 32bit...
15:19:55ozraavsej: I'm on the track, but just can't understand how it happens, it's too deep into the innards for me to figure out :-/
15:20:52ozraAraq: It's in parseutils rawParseInt() to be specific.
15:25:56*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:30:08*kumul quit (Quit: Leaving)
15:35:31*jszymanski joined #nim
15:48:08*drewsrem joined #nim
15:49:58drewsremI'm trying to create a statement-template that takes a stmt, creates a new proc around that stmt and provides access to that procs parameters within the passed stmt, like this: http://ix.io/j47 - it seems that the parameters aren't declared within the template tho. Any pointers?
15:50:17*jbomo joined #nim
15:52:56ozradrewsrem: you could go with a macro instead..
15:53:36ozradrewsrem: but then you build the proc via ast constructs. I've done similar to above that way.. Look in lib/pure/future.nim for inspiration
15:53:37drewsremozra, I tried the same with with a macro and quasi-quoting, the stmt that gets passed also can't access the procs-parameter
15:53:48drewsremozra, ahh, thanks, will do
15:55:28drewsremozra, hmmmmm... https://github.com/nim-lang/Nim/blob/devel/lib/pure/future.nim where exactly?
15:56:11ozramacro `=>` for instance, though it takes expr, but the gist...
15:56:23drewsremozra, thanks
15:58:17*aziz_ joined #nim
16:00:06*aziz_ is now known as aziz
16:01:22*xificurC joined #nim
16:10:26*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
16:25:04ozradrewsrem: Threw this together (not tested), might help make it clearer what goes where when creating proc: https://gist.github.com/ozra/dfb2c3f9e12787e08408
16:25:33drewsremozra, oh, much obliged, I'll try
16:29:36*Tennis quit (Quit: Leaving)
16:29:58*kas joined #nim
16:37:29*synthmeat quit (Quit: The way to get started is to quit talking and begin doing.)
16:38:29*darkf quit (Quit: Leaving)
16:40:12*milosn quit (Ping timeout: 244 seconds)
16:41:09*milosn joined #nim
16:42:26*Trustable joined #nim
16:46:50*flaviu quit (Read error: Connection reset by peer)
16:53:01*def- quit (Ping timeout: 250 seconds)
16:53:10avsejAraq, https://github.com/nim-lang/Nim/pull/2910
16:55:15*Jesin quit (Quit: Leaving)
17:05:34*Trustable quit (Read error: Connection reset by peer)
17:06:35*Trustable joined #nim
17:06:42*Trustable quit (Remote host closed the connection)
17:16:07*Matthias247 joined #nim
17:29:22*shodan45 quit (Quit: Konversation terminated!)
17:29:31*shodan45 joined #nim
17:29:31*shodan45 quit (Remote host closed the connection)
17:31:30*TEttinger joined #nim
17:32:43*kumul joined #nim
17:37:07*def- joined #nim
17:45:32*Jesin joined #nim
17:45:33*brson joined #nim
17:59:07*boop is now known as boopisaway
18:24:01*Miko_ joined #nim
18:25:07Miko_I want to make a programm that compiles to both javascript and c.
18:25:56Miko_For now I added for example "proc echo(a: string) {.importc.}",
18:26:17Miko_and implemented that in javascript.
18:26:46reactormonkMiko_, hm. echo is already defined by nim
18:26:51Miko_When i compiles to C, that should be the standart library.
18:27:05*silven quit (Ping timeout: 256 seconds)
18:27:35*silven joined #nim
18:27:56Miko_If this was C I'd add pre-processor directives and only include that line in the javascript compilation
18:29:43Miko_reactormonk, yes I know
18:30:05Miko_with the c backend it should act like the stdlibrary function.
18:30:12reactormonkMiko_, ah, you want to compile something only when compiling to JS?
18:30:28Miko_and with the javascript backend i'd like to implement that myself
18:31:10Miko_reactormonk, yes I think
18:33:41dtscodeMiko_: hold on this is really easy. let me write up an example
18:33:53*xcombelle quit (Remote host closed the connection)
18:35:46dtscodeoh nmd. Just use when defined(SOME_MACRO): ... and then just pass it when wanting to compile to javascript
18:36:10*Matthias247 quit (Read error: Connection reset by peer)
18:41:34*Igor__ joined #nim
18:47:42*Igor__ quit (Quit: Page closed)
18:51:17Miko_I'm brand new to Nim. So I guess it was meant to be like this? http://pastebin.com/U129UUeX
18:52:37*synthmeat joined #nim
18:56:02Miko_With gcc and other compiler i can define macros from the commanline like "-D linux". How do i do that with nim?
18:56:17reactormonkMiko_, check system.nim for a few defined(js) or similar
18:56:55reactormonkMiko_, yeah, it's when defined(js): <your code>
19:07:32*filcuc joined #nim
19:18:15*Mat4 joined #nim
19:20:58*synthmeat quit (Ping timeout: 252 seconds)
19:22:06Mat4following problem: Declaring an enum of 32 elements whereby each element is initialized with a different initial value the current Nim compiler quit with an objcure error message after the 16' element
19:23:13Mat4does one know a workaround for this ?
19:23:27*synthmeat joined #nim
19:25:01Arrrrmaybe a snippet of code could help
19:27:28Mat4uno momento
19:32:46*Trustable joined #nim
19:32:53Mat4https://gist.github.com/anonymous/d0fb3f321bcbbe5db296
19:35:31Mat4seems like the number of initial values is restricted to 16
19:36:31Mat4or it has something to do with the initial values
19:37:33ArrrrI get this: "Error: invalid order in enum 'LPI'"
19:37:52ArrrrThis is because, if im not mistaken, you have to put those values in order (from lower to higher)
19:37:59Arrrr0xFF is bigger than 0xF0
19:38:42reactormonkIIRC you can also make the enum impure
19:38:52reactormonkor something like that
19:39:00Mat4ok, but why might that be problematic. All values have initial values ?!????
19:39:25Mat4sorry I mean all elements share an different inital value
19:39:47ArrrrBecause the compiler is not as clever as you, and want to be feed with those enums in order
19:39:50Mat4or have a different initial value ? anyhow...
19:40:08Arrrrput RNZ at the end
19:41:03Mat4yes, that is the solution
19:42:03*jbomo quit ()
19:44:36Mat4thanks
19:45:05*Heartmender quit (Remote host closed the connection)
19:48:45kasHi. I have problem with fallowing code. It does not even compile. I got something like t5.nim(10, 6) Info: template/generic instantiation from here
19:48:45kast5.nim(4, 17) Error: type mismatch: got (iterator (): int{.closure.})
19:48:46kasbut expected one of: ...
19:48:48kashttps://gist.github.com/anonymous/ea78d09d31d313fb0829
19:49:04kasI just write some generic function on all iterable collections
19:49:45*NimBot joined #nim
19:49:53*Heartmender is now known as Guest24019
19:50:48kasI removed unnecessary things https://gist.github.com/anonymous/f452bb73e0255e5f5155
19:50:48*Guest24019 quit (Changing host)
19:50:48*Guest24019 joined #nim
19:50:48*Guest24019 quit (Changing host)
19:50:48*Guest24019 joined #nim
19:50:54*Guest24019 is now known as Heartmender
19:57:20Arrrrkas, first of all, replace line 2 to 'for i in coll():'
19:58:04Miko_Can I do bit manipulation in nim?
19:58:41*Heartmender quit (Quit: EliteBNC free bnc service - http://elitebnc.org - be a part of the Elite!)
19:59:08Mat4you mean like in C per bitfield index or in general ?
19:59:42Arrrryes Miko_, with shl, shr, or, and, xor ...
20:00:08kasArrrr: I suppose I should use this one invocation "print[int] (s.items)"
20:00:51kasArrrr: For this one i got error t5.nim(12, 14) Error: undeclared identifier: 'items'
20:01:00Miko_Mat4, I'd prefer bitfield indexes
20:01:20Mat4sorry, Nim doesn't support that feature as I know
20:01:33Miko_So I'm limited to bytes
20:01:40Miko_and have to operate on these?
20:01:52Miko_It doesn't sound hard to abstract away from that
20:02:05*Jesin quit (Quit: Leaving)
20:02:53*skyfex__ quit (Quit: (null))
20:02:53Mat4of course not, you can perform bit manipulations like for most processor architectures by outmasking and binary addition
20:03:05Arrrrkas i think that is because items does not return a closure iterator
20:03:12Arrrrmaybe you have to declare your own
20:03:34kasArrrr: Ok I will do so.
20:04:08*Heartmender joined #nim
20:04:11*Heartmender quit (Changing host)
20:04:11*Heartmender joined #nim
20:04:11*Heartmender quit (Changing host)
20:04:11*Heartmender joined #nim
20:04:35*skyfex___ joined #nim
20:06:35*johnsoft quit (Read error: Connection reset by peer)
20:07:31*def- quit (*.net *.split)
20:07:31*dddddd quit (*.net *.split)
20:07:31*phI||Ip quit (*.net *.split)
20:07:33*Gonzih quit (*.net *.split)
20:07:33*avsej quit (*.net *.split)
20:07:34*Amun_Ra quit (*.net *.split)
20:07:46*def- joined #nim
20:07:58*dddddd joined #nim
20:07:59*Gonzih joined #nim
20:08:35*Amun_Ra joined #nim
20:09:25*drewsrem quit (Quit: Leaving)
20:09:28*avsej joined #nim
20:09:29*avsej quit (Changing host)
20:09:29*avsej joined #nim
20:09:51skyfex___Hmm, how do I debug when it seems nim can't find modules in nimble packages?
20:11:35*dtscode is now known as ResidentTriscuit
20:11:57*phI||Ip joined #nim
20:13:59skyfex___I resolved my issue
20:16:03*johnsoft joined #nim
20:20:33*elbow quit (Remote host closed the connection)
20:23:16*Arrrr quit (Quit: WeeChat 1.2)
20:25:50skyfex___Is "srcDir" in .nimble files actually supported?
20:26:34Miko_Is it a good idea, or even possbile at all to deal with blobs in Nim? Can or should these blobs be of type string?
20:26:39Miko_or cstring?
20:27:17Miko_Or Arrays?
20:28:24*Jesin joined #nim
20:35:00*jszymanski quit (Quit: computer sleeps...)
20:41:46*skyfex___ quit (Quit: (null))
20:42:25*skyfex___ joined #nim
20:42:36Mat4I think an array of bytes will do
20:42:52*ResidentTriscuit is now known as dtscode
20:59:32*Kingsquee joined #nim
21:13:41*banister joined #nim
21:19:17*aziz quit (Remote host closed the connection)
21:28:05jackvwhat's the best way to convert seq[uint8] to string?
21:31:37*kas quit (Ping timeout: 264 seconds)
21:34:16*silven quit (Read error: Connection reset by peer)
21:36:28*silven joined #nim
21:55:24*filcuc quit (Quit: Konversation terminated!)
21:56:28*filcuc joined #nim
22:09:28*dtscode is now known as theSquirrelologi
22:10:15*theSquirrelologi is now known as TheSquirrelogist
22:14:04*boopisaway is now known as boop
22:18:39*brson quit (Quit: Lost terminal)
22:18:48*brson joined #nim
22:21:19*TEttinger quit (Ping timeout: 276 seconds)
22:23:07*filcuc quit (Quit: Konversation terminated!)
22:32:13*saml quit (Quit: Leaving)
22:44:36*askatasuna quit (Ping timeout: 272 seconds)
22:47:46*Miko_ quit (Ping timeout: 265 seconds)
22:54:06Mat4do you want to covert the whole number range ? Then your string can contain control sequences
22:55:18jackvMat4, I ended up just writing a proc that turns each uint8 into a char and spits out a string
22:57:43Mat4if there exist no library routine for this then your approach is of course the best one because it's the only way of conversion left...
23:01:43Mat4ciao
23:01:53*Mat4 quit (Quit: Verlassend)
23:04:13*Matthias247 joined #nim
23:06:23*brson quit (Quit: leaving)
23:15:37onionhammer@Varriount whoa what happened to the highlighting? o_O
23:15:42onionhammerlooks way... not as good :P
23:19:55onionhammerhttp://i.imgur.com/A9qQ8Io.png
23:21:42*kumul quit (Quit: Leaving)
23:26:55*kumul joined #nim
23:30:27*Trustable quit (Remote host closed the connection)
23:40:03*Matthias247 quit (Read error: Connection reset by peer)
23:40:44*egrep quit (Quit: Error -38: Black hole has swalled this client.)
23:49:01*Demos joined #nim
23:49:14*elbow joined #nim
23:49:18Demoshey, it's been a while
23:49:26DemosI watched the screencast. It was good
23:53:56*egrep joined #nim
23:54:59onionhammerDemos: link?
23:55:06Demosoh gee
23:55:51Demoshttp://www.oreilly.com/pub/e/3420
23:55:55Demosyou need to sign up and stuff
23:55:57Demoswhich sucks
23:57:15onionhammeragh thats a lot of signing up
23:57:42Demosyeah
23:57:52Demosyou probably know most of the stuff already in any case
23:58:10onionhammerstill fun to watch :P
23:58:23Demosugh I've been so busy lately, I wish I had time to write nim and work on my projects.