<< 23-10-2014 >>

00:00:11gokr1"If no exception name is given, the current exception is re-raised."
00:01:12gokr1flaviu: So the code works stable for you?
00:01:12*dapz quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:01:24flaviuWell, I haven't got a benchmarking setup yet
00:01:30flaviuI'm trying to figure out gnu parallel
00:01:37gokr1I have been hammering - and sure, if I raise concurrent to say 2000 - I do get some failures, but it seems to just "hum on".
00:01:52gokr1Now... why am I doing this you may ask?
00:01:56gokr1Why not asynch?
00:02:10gokr1Well, if you go asynch - then all IO needs to be asynch.
00:02:31gokr1So what if you want to build a socket server - that perhaps does some MySQL queries in order to fulfil a request?
00:02:42*brson joined #nimrod
00:03:03gokr1This is seemingly to me a big issue with asynch - all modules doing IO needs to be asynch.
00:03:44gokr1But perhaps the listening/spawning part could use async stuff - not sure if that would help any.
00:03:51gokr1I don't think so.
00:04:26gokr1Also, this utilizes all cores :)
00:04:34gokr1We like, yumyum.
00:04:51gokr1Gonna hit the bed now.
00:04:56gokr1gnite
00:07:54*gokr1 changed it to just try:finally: - better.
00:08:40*dapz joined #nimrod
00:13:49*dapz quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:15:07*darkf joined #nimrod
00:22:22*rpag quit (Quit: Leaving)
00:25:24*ehaliewicz quit (Ping timeout: 255 seconds)
00:29:40flaviuWow, the new doesn't even compare in performance impact in comparison to deepcopy
00:30:07*dapz joined #nimrod
00:31:21*dapz quit (Client Quit)
00:33:57*bjz quit (Ping timeout: 255 seconds)
00:40:30*dapz joined #nimrod
00:41:45*dapz quit (Client Quit)
00:41:48flaviuhttps://gist.github.com/flaviut/78361fdcc8c1e110a26c
00:42:18flaviuReally nice how the assembler is mixed in with the nim code lines
00:49:57flaviugokr1: Similar results as you, but 16259.69rps with -c4
00:51:15*dapz joined #nimrod
01:03:00*dapz quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:04:42*Joe_knock left #nimrod ("Leaving")
01:06:18*kingisaac joined #nimrod
01:09:05kingisaacI'm running the tutorial examples and ran into this error: http://pastebin.com/rQAR01eh
01:11:57willwhat code caused that?
01:13:29*brson quit (Ping timeout: 260 seconds)
01:13:59kingisaacSorry. It was the first example in Tutorial 2: http://pastebin.com/e39agFYu
01:14:11willI also ran gokr1's socket server: 23678.46 [#/sec] (mean)
01:15:08*brson joined #nimrod
01:15:28willkingisaac: works for me, what version / OS are you running?
01:16:07kingisaac0.9.5, it's the newest in Arch repos. I will install the latest and see if that's the issue
01:17:29*brson quit (Client Quit)
01:19:51fowlkingisaac, name the module something other than 'object'
01:21:43willyeah, just realised that's why it worked for me :D
01:23:27kingisaacha! that is the issue
01:23:44kingisaacnow I feel a little dense
01:24:51*superfunc__ joined #nimrod
01:28:02*will quit (Ping timeout: 272 seconds)
01:33:52fowlkingisaac, you shouldn't, it isnt obvious why object cant be used as a module name (where was objectInit defined?)
01:39:17kingisaacfowl: in system.c and object.c
01:40:53*saml_ joined #nimrod
02:02:34*fghj quit (Ping timeout: 246 seconds)
02:51:50*dapz joined #nimrod
02:52:16*superfunc__ quit (Ping timeout: 246 seconds)
02:54:11*Fr4n quit (Remote host closed the connection)
02:54:42*Fr4n joined #nimrod
02:56:02*ARCADIVS joined #nimrod
03:03:53*kingisaac quit (Quit: leaving)
03:07:52*dapz quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
03:20:16Onionhammerhmm, why cant I do a local importc to override a pushed importc araq
03:22:44fowlOnionhammer, it needs work
03:27:18*dapz joined #nimrod
03:27:33*dapz quit (Client Quit)
03:28:59*noam quit (Ping timeout: 245 seconds)
03:33:48*jpoirier joined #nimrod
03:36:04*jpoirier quit (Client Quit)
03:39:18*superfunc__ joined #nimrod
03:46:54*superfunc__ quit (Quit: Page closed)
03:49:12*flaviu quit (Remote host closed the connection)
03:50:30*enitiz-mobile joined #nimrod
03:51:44*dapz joined #nimrod
03:51:48*dapz quit (Client Quit)
03:52:15Varriountgokr: So, in the end, how well does Nim stack up in requests per second when using threads?
04:12:34*dapz joined #nimrod
04:36:38*enitiz-mobile quit (Quit: Bye)
04:38:31*superfunc__ joined #nimrod
04:41:53*darkf_ joined #nimrod
04:43:24*xenagi quit (Read error: Connection reset by peer)
04:44:48*saml_ quit (Quit: Leaving)
04:46:03*darkf quit (Ping timeout: 272 seconds)
04:46:51*darkf_ is now known as darkf
04:59:14*nande quit (Read error: Connection reset by peer)
05:00:43*dapz quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:03:38*dapz joined #nimrod
05:08:09*dapz quit (Ping timeout: 260 seconds)
05:12:58*superfunc__ quit (Ping timeout: 246 seconds)
05:15:05*dapz joined #nimrod
05:50:59gokr1Varriount: Well, it seems comparable to me. On a single box with a single ab hammering. I can do some more testing though.
06:07:22*delian66 quit (Ping timeout: 250 seconds)
06:07:30*delian66 joined #nimrod
06:10:30*heinrich5991 quit (Ping timeout: 260 seconds)
06:10:44*gokr_ joined #nimrod
06:12:06*gokr quit (Ping timeout: 246 seconds)
06:13:44*heinrich5991 joined #nimrod
06:14:44*gokr_ quit (Ping timeout: 260 seconds)
06:16:32reloc0moin
06:35:08*dapz quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:37:30*gokr_ joined #nimrod
06:51:02*Hodapp quit (Ping timeout: 272 seconds)
06:57:41*Hodapp joined #nimrod
06:59:30*milosn_ joined #nimrod
07:05:55*milosn quit (*.net *.split)
07:15:19*bjz joined #nimrod
07:49:09*Trustable joined #nimrod
07:55:55*Etheco joined #nimrod
08:20:40*bjz quit (Ping timeout: 265 seconds)
08:23:21*bjz joined #nimrod
08:33:29Araqhi reloc0
09:58:20*xcombelle joined #nimrod
09:59:28*ARCADIVS quit (Quit: ARCADIVS)
10:09:26EthecoI love reading though the logs from the day in this channel :D
10:09:33Ethecothis channel is like a big howto
10:15:41*xcombelle quit (Ping timeout: 260 seconds)
10:32:13gokr1I am busy writing some new articles, its truly becoming a joy coding in Nim.
10:32:37Ethecowould love to read them, trying to find time to get into my project that i am going ot use Nim for
10:32:55gokr1Those I have so far are at http://goran.krampe.se/category/nim
10:33:19gokr1Now the articles I am working on are becoming more "hands on".
10:33:33gokr1One is about that spawningserver I wrote yesterday.
10:33:33Ethecoi did see you doin the http server stuff last night
10:33:43gokr1In fact its not HTTP :)
10:34:05gokr1It just echos first line.
10:34:12Etheco:D
10:34:41gokr1But its a clean little example and uses the new stuff (net, selectors, spawn)
10:35:02Ethecomy project is todo with getting backups run and reporting system stats etc
10:35:15gokr1And while async is "hip" - a threaded server still has many advantages I think.
10:35:48gokr1A todo app? Web based?
10:35:57gokr1Oh, no
10:36:07gokr1You meant "has to do with"
10:36:11Etheconah, its going to be a daemon that runs backups for files/mysql and report cpu/ram usage etc
10:36:20gokr1right
10:37:05Ethecoonce i figure out how procs work etc
10:37:07gokr1There are some nifty "scripts" in Nim you can use as starters.
10:37:42gokr1For example, I think "Lapp" has been ported from Lua (just guessing) and one of the scripts I read used it - very neat for making CLI type scripts.
10:38:11Ethecooh cool, will check it out
10:38:46gokr1Lapp in Lua means automatic options parsing based on the "help" text for the script.
10:39:34Ethecoyeh, i am getting a list of made scripts in Nim, i prefer to rip apart someones good code and figure out how it works :)
10:40:11gokr1koch.nim uses the older parseopt - but it has a bunch of other stuff in it.
10:41:34gokr1Steve Donovan (Lua fame, Penlight library) seems to be using Nim and he has ported Lapp. Perhaps he is even in this channel.
10:41:40gokr1https://gist.github.com/stevedonovan/6409900
10:42:29Ethecoawesome
10:42:33Ethecoadded to my list of nim pages :D
10:43:04Ethecoso parseopt is deprecated now then
10:43:10Ethecoin the documents it said to ues that
10:43:33gokr1Here he writes about it I think: http://steved-imaginaryreal.blogspot.se/2013/09/nimrod-return-of-pascal.html
10:44:11gokr1Just search down for "lapp"
10:44:48gokr1think I need to read that article again.
10:45:55Ethecoah this koch.nim
10:46:02Ethecohas a lot of great examples for me :D thank you!
10:46:20gokr1yeah
10:54:51*noam joined #nimrod
10:59:37*noam quit (Ping timeout: 265 seconds)
11:10:25*xcombelle joined #nimrod
11:44:03dom96_gokr1: It would be nice to see Async and Spawn working together.
11:44:27dom96_I know what you mean when you say that everything will need to support async in order to use async though.
11:44:44gokr1Yeah, if you don't use threads.
11:45:09gokr1But if we do spawn off the requests in threads - then I am not so sure that async gives us much in the listener part, or?
11:46:13dom96_Who knows.
11:46:25gokr1As an example of the "everything needs to use it" problem - if you look at Turbolua or Openresty - they need to make special modules for db access etc, in order for that to work with the rest of the framework.
11:46:44wanYes, I agree, I think lwan is blocking for the listener and async in the workers
11:47:28gokr1So if you have x worker threads, then yes, you could let each thread use async to handle more than 1 request concurrently.
11:47:35wangokr1: yep, we would need async wrappers for db stuff
11:48:45gokr1Btw, the numbers go a bit up and down depending. I am trying to write an article describing it.
11:49:18*noam joined #nimrod
11:49:50gokr1If you remove the "spawn" word - then it will actually do 22k requests - if you use ab with 50 concurrent clients. But again, don't compare with HTTP servers since they probably use keep alive.
11:50:36gokr1But if you raise the amount of data returned to something more reasonable - then data transfer goes up from 200kb/sec to say 12Mb/sec - and requests go down to around 7-10k.
11:50:53gokr1This I just played with in order to compare with spawn.
11:51:05gokr1Ok, gotta go - later
11:53:11dom96_You should write a similar pseudo-http server using async await to make the comparison fair I think :P
11:53:20dom96_My intention is to write async db modules.
11:54:14*noam quit (Ping timeout: 265 seconds)
11:57:42*khmm joined #nimrod
12:00:36*noam joined #nimrod
12:02:41gokr1dom96_: Then you should take my stab at a wrapper for HyperDex - since it has an API built for async :)
12:05:09*noam quit (Ping timeout: 255 seconds)
12:11:53*khmm quit (Ping timeout: 240 seconds)
12:51:05*gokr joined #nimrod
12:52:57*gokr_ quit (Ping timeout: 260 seconds)
12:53:18*BitPuffin joined #nimrod
12:53:43*noam joined #nimrod
12:55:00Ethecoso my daemon is going to need a config file, what is a good place to have this located?
12:55:23Ethecodo i go down the ~/.config/ route or /etc/folder route
12:58:09*noam quit (Ping timeout: 245 seconds)
12:58:24Araquse whatever os.getConfigDir returns
12:58:38Ethecooooooo, thats even better :)
13:39:20*gokr_ joined #nimrod
13:41:36*gokr quit (Ping timeout: 258 seconds)
13:49:32*noam joined #nimrod
13:49:37*darkf quit (Quit: Leaving)
13:50:02*dom96_ quit (Ping timeout: 258 seconds)
13:52:23Araqgokr1: "If you remove the "spawn" word - then it will actually do 22k requests" -- opposed to what? what's the number with spawn?
13:53:07gokr1Well, around 15k requests IIRC.
13:53:28Araqhu? so it's worse with spawn?
13:53:29gokr1It depends of course a LOT on if I just return a little line - or some more substantial data.
13:53:40Araqoh ok, yeah
13:53:55gokr1Is the deepCopy blocking?
13:54:01*noam quit (Ping timeout: 256 seconds)
13:54:17Araqyes and in fact, it's even worse
13:54:44Araqhowever you can also try spawnX
13:54:49gokr1It must of course block, duh.
13:56:14gokr1ok
13:56:36Araqwell we can implement it quite differently, it's more or less a prototype
13:56:44gokr1What do you mean with "worse"?
13:57:05gokr1Yeah, sure.
13:57:11Araqthat said, it surely is good enough if you give it reasonably sized chunks of work
13:57:25gokr1Exactly, just echoing a line isn't really interesting :)
13:58:10gokr1I will play with it a tad more to get that article together.
13:58:33*noam joined #nimrod
13:58:47Araqalso its implementation is so beautiful that I don't really want to optimize it ...
13:59:05*noam quit (Read error: Connection reset by peer)
13:59:05Araqworth a paper, it uses some really novel idea
13:59:17gokr1I also started on an article about "OO in Nim", so any non obvious thoughts on that, would be welcome. I will basically try to detangle the various techniques we have that sort has to do with OO.
13:59:23gokr1Really? cool
14:00:10gokr1Also, having simple multithreading is important. Async is all nice of course, but... you know. Then reality hits you in the face with some db API or whatever ;)
14:00:19gokr1And multicore.
14:00:25Araqyup, I agree
14:00:29Araqin fact
14:00:56Araqasync is a hack that makes "blocking/non-blocking" the essence of your programming model
14:01:06*noam joined #nimrod
14:01:13Araqwhich should rather be an implementation detail
14:01:20gokr1yes
14:01:38gokr1It seems to me that lots of people who jumped on the nodejs train... sortof got a bit burned and moved on.
14:01:40*noam quit (Read error: Connection reset by peer)
14:01:44Araqbut hey, as a systems programming language, we're allowed to care for implementation details ;-)
14:01:49gokr1Hehe
14:02:14gokr1What about the green threads over a pool of real ones?
14:02:20gokr1That's how Go does it, right?
14:02:30gokr1With the goroutines stuff.
14:05:15AraqGo uses a thread pool like everything else under the hood
14:05:47*dom96_ joined #nimrod
14:05:49Araqthere is no other way to use multi cores except of course multiple processes
14:07:09BitPuffinhmm
14:07:11Araqgreen threads sit on top of a thread pool
14:07:13BitPuffinsomeone just forked nim-portaudio
14:07:34BitPuffinis jaubert someone who usually comes here?
14:07:51BitPuffinactually this was 21 hours ago nvm
14:10:58dom96_Hey BitPuffin, how's life?
14:11:25Araqgokr1: that said, Go's model is indeed quite different. I'm not sure it's worth copying though. It has lots of problems too.
14:11:33Ethecowhen (server: var TServer) happens is it automaticlly passing the var in?
14:12:15gokr1Araq: It might be important to think "library" and not "language" here - since ... there are different ways to peel the banana.
14:12:30BitPuffindom96_: good good, working hard with work, and have also started writing actual code for my lang :P
14:12:33BitPuffindom96_: you?
14:12:38gokr1But having said that, threadpool and spawn is just a lib, right?
14:12:54dom96_BitPuffin: Pretty good, sitting in a lecture learning about what an Operating System is...
14:13:02BitPuffindom96_: HAH
14:13:12BitPuffindom96_: what is an operating system?
14:13:18BitPuffinNever heard of it
14:13:28dom96_BitPuffin: No idea man.
14:13:54Araqno, it's built into the compiler. but you can also implement things like these via Nim's macro system.
14:14:18dom96_Anyway, i'm starting to get worried that my async await stuff will become useless because of spawn.
14:14:33BitPuffindom96_: is it like an automate surgeon?
14:14:36gokr1“an operating system is a collection of things that don’t fit inside a language; there shouldn’t be one”
14:14:45BitPuffindom96_: why would it?
14:14:58BitPuffindom96_: isn't spawn more of a fire and forget sort of thing
14:15:05dom96_BitPuffin: possibly
14:15:12BitPuffinwhere asy async await is more do this while I do this other shit, and then I want the result
14:15:56Araqgokr1: *conceptually* it's only a library ... ;-)
14:16:08BitPuffinAraq: lol, what's that supposed to mean!
14:16:35Araqin practice the macro system still needs more features for 'spawn'
14:16:47dom96_Yeah, async await is cooler because it *is* a library :D
14:16:54BitPuffin>:D
14:23:05AraqBitPuffin: why the >:D ? surely 'spawn' is important enough to warrant some shortcuts taken in the implementation?
14:23:36BitPuffinAraq: the >:D was for dom96_'s stmt
14:23:55BitPuffinAraq: and yeah maybe, as long as the next step is to fix whatever is keeping it from being a library
14:24:42Araq"fix whatever" is mostly the missing types API iirc
14:25:16BitPuffintype information for the ast nodes?
14:25:21Araqyes
14:25:36BitPuffinthat a lot to add?
14:27:08Araqno, but I avoid designing APIs these days because everybody complains about my views
14:27:32Ethecois cpuinfo that got taken out ? http://nimrod-lang.org/cpuinfo.html
14:27:54Ethecoits linked to on osproc page
14:28:28BitPuffinAraq: your views about APIs? :P
14:28:45AraqEtheco: no it's so new that we missed it in the doc building process
14:28:47BitPuffinif you don't add the API then the language won't be powerful enough to add spawn, and then what's the point
14:29:01Ethecoah right okay :D
14:29:04BitPuffinjust seems like a strange excuse
14:29:31AraqBitPuffin: whatever man.
14:29:49BitPuffinagreed, I don't really have invested interest
14:30:29BitPuffinif you don't have time to add the api then that's a fine excuse imo, but avoiding it because people don't like your views, why would you even make a language then, if you are afraid of people disliking your views
14:30:55BitPuffinmeh who cares, back to work
14:31:01AraqBitPuffin: I will add the API, but it requires lots of design work
14:31:13BitPuffinAraq: alright so the reason is time then, fine
14:31:36BitPuffinno need to pretend to be a victim :D
14:32:17AraqBitPuffin: well look at the current macros API as a counter example.
14:32:58Araqthat hasn't been designed really.
14:33:33BitPuffinso redesign it
14:33:55Araqyes. Or: I fix compiler bugs.
14:34:37BitPuffinI reckon you should do both, but yeah fix bugs first obviously
14:39:19AraqBitPuffin: "so redesign it" is easily said. however, the existing API is not ugly, but also flexible and powerful.
14:39:27Araq*not only
14:39:36dom96_http://forum.nimrod-lang.org/t/601
14:40:54BitPuffinAraq: sure thing, it's not like it's done in a minute
14:41:12BitPuffinand after designing it you also have to replace old code that used it
14:41:13BitPuffinI get that
14:41:22BitPuffinI guess what you could do to mitigate that is have both apis
14:41:37BitPuffinand rename the old one or something so in all the files in which it broke you import the old one
14:41:56Araqimport macros2 ;-)
14:43:40gokr1Btw, the port of "Lapp" from Lua is pretty slick - should we stuff that into stdlib too? Search for "lapp" on http://steved-imaginaryreal.blogspot.se/2013/09/nimrod-return-of-pascal.html
14:44:06*itsmeront joined #nimrod
14:44:10gokr1(its a parseopt thingy that uses the help text as definition of opts)
14:45:18gokr1(yeah, ok, stdlib should not be a kitchen sink of course)
14:45:42dom96_Just realised I should tweet about the release on nim's twitter account
14:45:49Araqin general we don't add things to the stdlib that we don't maintain
14:46:03gokr1Also reasonable :)
14:46:11BitPuffinAraq: well then you have the ugly problem that it's always gonna be called macros2 xD or if you rename it, and then you have the same problem as when you started
14:46:27BitPuffindom96_: wasn't it released ages ago?
14:46:39dom96_BitPuffin: ...yeah
14:46:44Araqno, last week and we need to patch it anyway
14:46:48BitPuffinah
14:46:54BitPuffinconfused it with 0.9.4
14:47:07BitPuffinbecause I think the number it said when I was using nimrod git was 0.9.6 :P
14:52:00*askatasuna joined #nimrod
14:53:48Araqdom96_: we should have delayed "nimble" until "nim" is out ... :-/
14:54:50Araqbut I guess I can package "nimble" with "nimrod 0.9.8" ?
14:55:03BitPuffinthe hell is nimble :P
14:55:06dom96_Araq: well...
14:55:09dom96_Araq: too late now
14:58:03dom96_BitPuffin: http://forum.nimrod-lang.org/t/601
15:02:46BitPuffindom96_: fuuuuuuuuuuuuck
15:02:56BitPuffinnow I need to update all of my babel packages to have .nimble instead xD
15:03:23AraqBitPuffin: please check that 0.9.6 can still compile them
15:03:34Araqany regression we can fix for 0.9.8 is nice
15:04:05BitPuffinyeah well I can't check that now
15:04:12BitPuffinperhaps this weekend if even
15:04:13BitPuffin:P
15:05:13*ehaliewicz joined #nimrod
15:06:15Araqhrm we seriously need to re-think versioning
15:06:45Araqthis odd vs even distinction is quite good, but it sucks we have no real beta stage
15:08:11Araqand let's be honest: here in open source land, a release happens and *afterwards* many bugs are found and fixed
15:08:58Araqand then it's stable until work begins on new features
15:13:33*mko joined #nimrod
15:13:36*mko quit (Max SendQ exceeded)
15:14:40*mko joined #nimrod
15:20:39BitPuffinpretty sure that's how it works outside of open source as well
15:25:32Araqwell outside of open source there is more resources for QA
15:31:06BitPuffinyeah I guess
15:31:11BitPuffinbut hotfixes are quite common
15:31:15BitPuffinlook at autodesk products
15:31:18BitPuffinhotfix 24/7
15:42:44*ehaliewicz quit (Ping timeout: 258 seconds)
15:55:34*dom96_ quit (Ping timeout: 246 seconds)
16:05:49*Matthias247 joined #nimrod
17:00:08*gokr_ quit (Remote host closed the connection)
17:01:07*gokr_ joined #nimrod
17:05:32*gokr_ quit (Ping timeout: 258 seconds)
17:05:44*brson joined #nimrod
17:10:30TrustableHello everyone :) Has anyone tried to decode and play an Ogg Vorbis file in an own program? I have demo programs for two libraries, which works in principle, but the sound is distorted. I need to find out where this issue comes from.
17:10:54AraqTrustable: we already told you? float is 64 bits in Nim
17:12:13Araqbbl
17:13:16TrustableAraq: My problem with the sine generator was not related to types or Nim. It was an uninitiated sound buffer. But thanks anyway.
17:13:52*gokr_ joined #nimrod
17:14:07*gokr joined #nimrod
17:14:07*gokr_ quit (Read error: Connection reset by peer)
17:14:47shodan45I see there is now a "pas2nim".... next is py2nim? :)
17:20:29itsmerontHi All. I'm trying to compile koch.nim on ubuntu 14.04 LTS from bigbreak but getting lib/system.nim(2129,41) Error: invalid pragma: locks: 0
17:24:24itsmerontanyone seen that error before?
17:24:58*gokr_ joined #nimrod
17:27:14*ehaliewicz joined #nimrod
17:27:16*askatasuna quit (Quit: WeeChat 1.0.1)
17:27:22*untitaker quit (Ping timeout: 240 seconds)
17:27:39*gokr quit (Ping timeout: 256 seconds)
17:30:17*ehaliewicz quit (Remote host closed the connection)
17:33:21*untitaker joined #nimrod
17:33:29*gokr joined #nimrod
17:36:41*gokr_ quit (Ping timeout: 260 seconds)
17:38:07*xcombelle quit (Ping timeout: 258 seconds)
17:39:27*gokr quit (Remote host closed the connection)
17:39:40*gokr joined #nimrod
17:43:24Araqitsmeront: well I can imagine why that happens
17:43:43Araqlet me rebuild C sources to fix it
17:43:58itsmerontwhy?
17:44:19itsmerontexcellent. Thanks!
17:44:38Araqwhy? because bigbreak uses the most recent additions now
17:45:05Araqshodan45: pas2nim is *old*. it's been used for the initial bootstrapping
17:45:25Araqthe initial version of the compiler was written in Pascal
17:45:35shodan45Araq: hah, never knew that!
17:47:06shodan45just assumed it started in C
17:47:20*gokr_ joined #nimrod
17:49:42shodan45compiler bootstrapping just seems weird to me... it's both necessary and "throw away" code
17:51:09*gokr quit (Ping timeout: 258 seconds)
17:51:18Araqwriting a compiler in C is stupid
17:53:58shodan45Araq: agreed. all compilers should be written in python: http://www.llvmpy.org/ ;)
17:54:44shodan45(only half joking... llvmpy looks pretty cool)
17:54:54Araqno but in rust or ocaml or nim
17:55:34shodan45I tried ocaml a while back, I just couldn't get myself to like it
18:02:16*BitPuffin quit (Read error: Connection reset by peer)
18:15:55*itsmeront quit (Ping timeout: 246 seconds)
18:17:02NimBotAraq/Nimrod devel 2c5743d Araq [+0 ±3 -0]: fixes #1029
18:17:02NimBotAraq/Nimrod devel d72818e Araq [+0 ±1 -0]: updated news.txt
18:18:51*itsmeront joined #nimrod
18:21:03*vendethiel- is now known as vendethiel
18:22:48*willwillson joined #nimrod
18:25:58*xcombelle joined #nimrod
18:32:02*brson quit (Quit: leaving)
18:32:33*gokr joined #nimrod
18:32:33*gokr_ quit (Read error: Connection reset by peer)
19:15:13Varriountshodan45: There's no py2nim, unfortunately.
19:16:29ldleworkSo...
19:16:30Varriountshodan45: You might be able to partially convert a python script to nimrod, if you assume that certain things remain static, however it would take the equivalent of Cython to convert python to nimrod accurately.
19:17:19*paul_oyster joined #nimrod
19:17:26shodan45Varriount: I'm sure it would be quite non-trivial... I was mostly joking :)
19:18:12*noam joined #nimrod
19:21:31Varriountshodan45: Although, even a partial transformer would be helpful for porting.
19:22:31Araqhi paul_oyster welcome
19:23:12Araqwho wrote web/babelpkglist.nim ?
19:23:23*irrequietus joined #nimrod
19:25:01Araqhi irrequietus welcome
19:25:30irrequietushi Araq, actually an old member :)
19:25:47irrequietusdom96 knows me from twitter and here :D
19:25:59gokr1Araq: That has GOT to be scripted, admit it!
19:26:18gokr1Or at least semi automated.
19:26:21Araqwell here's the proof I'm not a greeting bot
19:26:32shodan45#nimrod is so friendly :)
19:26:34Araqgokr1: it's compiled to JS ...
19:26:39gokr1Hehe
19:26:48gokr1You need to vary the greetings.
19:26:59irrequietusAraq: https://lobste.rs/s/kdnbjw/nimrod_language_will_be_renamed_to_nim_from_0_10_0_slight_compatibility_break :P
19:27:06*paul_oyster left #nimrod (#nimrod)
19:27:17irrequietusdoing my best to spread the nim word :)
19:27:30*paul_oyster joined #nimrod
19:27:34gokr1Nim, Nim! We are the Knights who say .... NIM!
19:27:41reactormonkAraq, btw, should I talk to the admins to rename the channel to #nim and forward?
19:28:03Araqreactormonk: well some of us already are in #nim
19:28:15Araqbut if that can be done, that would be awesome
19:29:33paul_oysterhello everyone; a newbie here. read through the intro today and started playing with the language
19:30:07paul_oysterfucking beautiful syntax and fast as hell
19:30:37gokr1I am also a n00b - and I am documenting my stumblings at http://goran.krampe.se/category/nim
19:30:54Araqthank you, paul_oyster :-)
19:30:59*gokr1 reminds me we should do a Nim planet...
19:32:28ldleworkSo I have gone through rust and go, neither can expressively represent an ECS system
19:32:34*ldlework wonders if nimrod has the goods..
19:32:47Araqldlework: ECS?
19:33:11ldleworkentity component system
19:33:21*dom96_ joined #nimrod
19:33:53Araqwell fowl wrote one for Nim
19:34:17paul_oysterjust starting a new project, which uses both python and c++ heavily; will add nim to the mix as well; seems it could replace some of the code in both languages
19:34:27irrequietuswill there be a #nim channel switch?
19:34:28ldleworkAraq: can you link me?
19:34:50Araqdom96_: I have no idea where this "If you are reading this you are missing babelpkglist.js or have javascript disabled in your browser." comes from ... :-/
19:35:24ldleworkAraq: I can't find it
19:35:34dom96_Araq: The html?
19:36:02Araqdom96_: yeah in lib.html
19:36:07TrustableGood news: Ogg Vorbis playback now works in my Nim program using libsndfile :)
19:36:26gokr1ldlework: I think its this: https://github.com/fowlmouth/nimlibs/blob/master/fowltek/entitty.nim
19:36:33gokr1"entitty"
19:36:47ldleworklol
19:36:49gokr1And then we wonder why we don't attract women to CS ...
19:37:15gokr1Are there any women here today?
19:37:47*shodan45 hears crickets chirping
19:37:56*gokr1 in John Cleese accent...
19:38:19reactormonkAraq, could you /msg chanserv op #nimrod reactormonk
19:38:22gokr1fowl: By the way, damn you have lots of Nim code there...
19:38:53*BlaXpirit joined #nimrod
19:41:02Araqdon't misuse your power
19:41:11reactormonkoh, I'll trash this channel
19:41:39reactormonkhm, duh
19:41:48shodan45heh, maybe after things move to #nim, #nimrod could be the new offtopic channel? :)
19:42:01*Ven joined #nimrod
19:43:35gokr1fowl: Have you been wrapping mainly C libs, or also some C++ libs?
19:43:53gokr1Very funny description of ReadableCpp btw
19:44:08reactormonkAraq, hm, need more permissions. /msg chanserv access #nimrod add reactormonk
19:44:10Araqdom96_: never mind, I found it
19:46:03*itsmeront_ joined #nimrod
19:46:23Araqreactormonk: you know our policy. only ban somebody if absolutely necessary. and it's never been necessary in the past (6?!) years
19:46:44reactormonkAraq, hell nah, I'll drop it afterwards
19:47:51reactormonkAraq, could you /msg chanserv #nimrod set guard on
19:47:54shodan45wait, nim(rod) has been around for 6 years?
19:48:12reactormonk... that adds an idler to this channel which is needed to keep the flags
19:51:31reactormonkAraq, /msg chanserv set #nimrod mlock +if #nim
19:51:34reactormonk... for the forward
19:51:40reactormonkthen adjust topic accordingly
19:53:26Araqreactormonk: 'set guard on' doesn't work
19:53:41Araqshodan45: yes.
19:54:16reactormonkAraq, what does it say?
19:55:14*flaviu joined #nimrod
19:57:42*flaviu quit (Remote host closed the connection)
20:00:37Varriountpaul_oyster: fowl developed a successor to entitty called entooty
20:01:47Araqreactormonk: "Invalid command. Use /msg ChanServ help for a command listing."
20:02:49Varriount*entoody
20:02:52Varriountpaul_oyster: https://bitbucket.org/fowlmouth/entoody
20:07:30reactormonkAraq, huh
20:08:30reactormonkAraq, with the channel name? /msg chanserv #nimrod set guard on
20:09:44*flaviu joined #nimrod
20:11:35Araqreactormonk: yes.
20:11:40Araqwit the channel name
20:11:43Araq*with
20:17:57reactormonkduh
20:24:07*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:25:24*itsmeront quit (Ping timeout: 246 seconds)
20:36:23*gokr1 left #nimrod (#nimrod)
20:36:34VarriountAraq: Earlier you said that my string optimization isn't really an optimization - howso?
20:37:01VarriountOr rather, that it wasn't always an optimization.
20:37:16Araqvar x = newString(40)
20:37:33Araqx = someProc() # someProc allocates anyway ...
20:38:00Araq# better do the pointer assignment here
20:39:52VarriountAraq: So should I not implement the change?
20:39:52*xcombelle quit (Ping timeout: 255 seconds)
20:40:29Araqwell I can think of 10 things that are more important ;-)
20:40:52*gokr1 joined #nimrod
20:40:57VarriountAraq: Ok, then what should be my mini-task for this weekend?
20:42:22Araqfigure out why babelpkglist.nim works except for the wrong error message that it produces
20:44:55*nande joined #nimrod
20:45:13Araqalso I had to disable the "see source" feature
20:45:24Araqwould be nice if somebody could look into that
20:46:20AraqI also heard some rumors that we have a thing called a "bug tracker". With over 300 open issues.
20:49:26itsmeront_only 300?
20:51:11VarriountAraq: Uh... did you include sqlite, pcre, and pdcurses in the 32 bit installer?
20:51:27*Ven joined #nimrod
20:51:30AraqVarriount: I think so
20:51:41VarriountI don't know if I did...
20:53:30AraqVarriount: did you build the 64 bit installer from devel?
20:53:40VarriountAraq: Yes.
20:54:12itsmeront_fixes the lock:0 pragma error?
20:54:42itsmeront_on bigbreak?
20:55:25itsmeront_hehehe sorry I rad that wrong I thought Andreas was saying you built the new installer
20:55:31itsmeront_"read
20:56:16Varriountitsmeront_: Uh, I did. I built the 64 bit installer.
20:56:47AraqVarriount: well you know there is a reason we have git tags, but ok, no big deal
20:56:55AraqI just checked:
20:57:10Araqthe "import strutils as su" regression is *not* in 0.9.6
20:57:12reactormonkAraq, /msg chanserv access #nimrod add reactormonk +AFORfiorstv
20:58:59itsmeront_yeah was looking for new csources to fix system.nim pragma error for locks.
21:00:57Araqok ok, let me fix it ...
21:01:27itsmeront_Oh I never did really introduce myself here. I'm Ron Teitelbaum owner 3dicc.com. Just hanging out and playing with Nim.
21:02:00itsmeront_Hi All
21:02:24irrequietushi
21:03:08gokr1And I work with Ron btw
21:03:16irrequietusohhh
21:03:16itsmeront_Hi Goran :)
21:03:25gokr1Yo :)
21:03:35itsmeront_itsmeront = it is me Ron T
21:03:58gokr1It just took me like one year before I figured that out.
21:04:06itsmeront_hahahha
21:04:13*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:04:16*johnsoft quit (Ping timeout: 244 seconds)
21:04:41*johnsoft joined #nimrod
21:06:30VarriountI feel so honored, being in the same irc channel as all these venerable professionals.
21:07:29gokr1I can sense a bit of... irony?
21:08:11VarriountEh, no. I'm not being sarcastic. Or ironic.
21:08:37Araqthat's nothing. I only recently figured out the importance of fermat's last theorem ...
21:14:00irrequietusLOL
21:15:05NimBotAraq/Nimrod bigbreak b0d9dc4 Varriount [+0 ±1 -0]: Update nsis.tmpl... 2 more lines
21:15:05NimBotAraq/Nimrod bigbreak fa77547 Araq [+0 ±2 -0]: fixes 'import x as y' regression
21:15:05NimBotAraq/Nimrod bigbreak 0f26040 Araq [+0 ±1 -0]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
21:15:05NimBotAraq/Nimrod bigbreak 2c5743d Araq [+0 ±3 -0]: fixes #1029
21:15:05NimBot2 more commits.
21:15:32Araqitsmeront_: please try again
21:16:20itsmeront_thanks will do
21:17:46itsmeront_thanks that worked!
21:19:24AraqVarriount: well I guess the best project is to update koch.nim so that it ensures babel/nimble is bundled with the installers
21:19:31VarriountAraq: Anything in particular I need to avoid with compiler procs?
21:19:33Araqand also fix the versioning bug please
21:19:52AraqVarriount: generic compiler procs don't work without further magic
21:19:57VarriountLike, are var types allowed to be passed?
21:20:19Araqno.
21:20:43VarriountDarn.
21:20:50Araqwell
21:20:55Araqyou can use 'var'
21:21:12Araqbut you then need to use addrLoc in the backend to pass the argument
21:21:51Araqalso don't use importc/exportc with compilerprocs
21:22:51fowlgokr1, we had a female nim programmer, havent seen her in a couple years though
21:23:36Araqshe couldn't handle our dongle jokes
21:23:41VarriountAraq: Is there a better way to do this: https://gist.github.com/Varriount/fb62e4262efd18d7195b
21:23:47Araq(nah, just kidding)
21:23:52gokr1Yeah... its the same everywhere it seems. Truly a pity. I mean, there are very few female programmers in general (at least in Sweden) but I guess even fewer in the open source arena.
21:24:09gokr1I do guess there are more in say India though.
21:24:10*ChanServ joined #nimrod
21:26:16AraqVarriount: the basic idea is right but your 'else' won't work
21:26:17*Matthias247 quit (Read error: Connection reset by peer)
21:26:52Araqgokr1: I don't think the world needs more people spending way too much time in front of computers.
21:27:14fowlgokr1, c++ wrappers are possible, but some of c++s features are unwieldy
21:27:15gokr1good point, but its still... a problem I think.
21:27:19Araqso if girls do not want to program, that's a smart and wise decision.
21:27:57gokr1fowl: I saw you played with wrapping Horde3D?
21:28:06fowlagreed, i dont recommend people start programming or smoking
21:28:10fowlthey're terrible habits
21:28:44fowlgokr1, i wrapped it but didnt do anything with it
21:29:19gokr1We are interested in the Urho3D engine. Well, more than interested.
21:33:00*itsmeront joined #nimrod
21:38:11*Trustable quit (Quit: Leaving)
21:43:06Araqreactormonk: I see you summoned ChanServ
21:44:49VarriountAraq: So, for the string reuse, what should I do? Simply leave the passed data unchanged, and check for null?
21:45:41VarriountOr always return a string, which may or may not be the second argument?
21:47:24reactormonkAraq, yup, the guard worked
21:47:30reactormonkstill getting the forward figured out
21:48:34reactormonkoops
21:50:02*boydgreenfield joined #nimrod
21:50:15*Fr4n quit (Ping timeout: 244 seconds)
21:50:36boydgreenfieldHi – is there a quick summary of the best way to upgrade to v0.9.6 anywhere? And specifically whether I should be using `babel` or `nimble` (this broke a bunch of my CI scripts)?
21:52:46Varriountboydgreenfield: nimble only works for BigBreak, afaik.
21:53:09boydgreenfieldVarriount: OK. So check out v0.4? And BigBreak will be 0.10.0?
21:53:19reactormonkAraq, do you have op in #nim ?
21:55:05*itsmeront quit (Ping timeout: 265 seconds)
21:57:40Araqreactormonk: nope. but dom96 might have
21:58:22Araqboydgreenfield: bigbreak will be 0.10.0 yes. in fact, it's feature complete.
21:58:45reactormonkAraq, need it to set up the forward
21:59:15boydgreenfieldAraq: Ah, that’s very good to hear. If I’m moving things from ~v0.9.5 should I go straight to 0.10.0 then? (And, dare I ask, is there a scheduled date for that?)
21:59:59Araqboydgreenfield: you can definitely do that
22:00:35VarriountAraq: How about this: https://gist.github.com/Varriount/3a2274acd2375dd71e21
22:01:34AraqVarriount: dest.len >= src.len # logic wrong?
22:02:43VarriountAraq: The destination string needs to have already allocated an equal or greater amount of memory than the source string.
22:03:35AraqVarriount: yes, but look at your gist
22:03:44Araqyou copy the pointer then
22:04:56fowlgokr1, urho looks nice
22:05:08VarriountAraq: I still don't see what's wrong.
22:08:15boydgreenfieldAraq: Fantastic. Is it going to be imminently tagged v0.10 or in a few weeks? (Just deciding if it makes sense to wait a few days to roll everything forward or not)
22:09:41*dom96_ quit (Ping timeout: 260 seconds)
22:10:04*dom96_ joined #nimrod
22:11:31Araqboydgreenfield: well I think it's done, but experience suggests that means "few weeks to go"
22:12:16boydgreenfieldAraq: Fair enough. I’ll keep my CI running on the latest to monitor for breakage, and pin anything going near production to the most recent commit. Thanks!
22:13:13boydgreenfieldAraq: I need to clone -b bigbreak on csources as well yes?
22:14:05boydgreenfieldOr is devel/bigbreak now the same post 0.9.6?
22:14:20boydgreenfield(nevermind that’s obviously false)
22:18:42gokr1boydgreenfield: On csources - yes.
22:20:06gokr1fowl: Yes, very nice. I looked at TONS of engines... but then Urho (kinda like Nim) was truly under the radar - but its very, very good.
22:20:12gokr1Code is clean as hell.
22:21:50*BlaXpirit quit (Quit: Quit Konversation)
22:30:13*irrequietus quit ()
22:30:50dom96_Araq: reactormonk: are you guys redirecting this channel already?
22:31:31Onionhammerfowl you should integrate your cizzle library into clibpp and rename the macro to "clib"
22:31:41Araqboydgreenfield: we haven't merged bigbreak into devel yet. In fact, I'm not sure it's a good idea.
22:34:58Onionhammeraraq any thoughts on my Q up there? (re push pragmas)
22:35:19Onionhammerlocal {importc} should override {push} no?
22:35:29Onionhammerpushed {importc} that is
22:35:49fowlOnionhammer, i havent used cizzle since i learned how to use {.push.} properly, you can take the code and do whatever with it
22:37:23Onionhammerfowl okay, I wrote something very similar but then I saw cizzle
22:37:29fowlOnionhammer, push callconv:cdecl,dynlib:libname first then push importc, functions which c name clashes with nim go at the end (after one pop)
22:38:12Onionhammermm
22:38:13fowlOnionhammer, iirc cizzle is a better solution though, it probably checks if theres an importc pragma
22:38:44Onionhammerit'd be nice to have a kind of C equivalent of clibpp, thats all im really looking to do
22:38:50Onionhammerand cizzle looks close
22:39:32reactormonkdom96_, gimme op in #nim
22:39:33fowluse it and take pointer_arithm too
22:39:42AraqOnionhammer: oh sorry, I think it's simply a bug. but note that 'push' is rather misdesigned anyway.
22:39:56Araqand I wouldn't do it again this way
22:40:00dom96_reactormonk: I can't right now. Also, I was going to redirect it myself.
22:40:05Onionhammergotcha
22:40:15dom96_Kinda rude not to even ask me...
22:40:20Onionhammeraraq i wouldnt like to see it in code that doesnt involve wrappers
22:42:49AraqOnionhammer: yeah that too
22:43:02reactormonkdom96_, sure, feel free to do it yourself. gave you the permissions on this channel for it
22:43:15reactormonkdom96_, /msg chanserv set #nimrod mlock +if #nim
22:43:34reactormonkkicked myself from this channel
22:43:41reactormonk... as in chanserv.
22:43:41dom96_reactormonk: In any case I was going to wait until the official release of Nim 0.10.0
22:43:49dom96_It's still not officially Nim.
22:46:24reactormonkdom96_, kk
22:48:31Araqoh yeah, I agree with dom96_
22:55:20*itsmeront joined #nimrod
22:58:43*dom96__ joined #nimrod
23:00:14*dom96_ quit (Ping timeout: 245 seconds)
23:10:17*bjz quit (Ping timeout: 245 seconds)
23:10:57*flaviu quit (Read error: Connection reset by peer)
23:11:46*boydgreenfield quit (Quit: boydgreenfield)
23:13:47*flaviu joined #nimrod
23:15:01*Etheco quit (Quit: Leaving)
23:17:08*xenagi joined #nimrod
23:27:58*flaviu quit (Read error: Connection reset by peer)
23:30:03*flaviu joined #nimrod
23:40:30*darkf joined #nimrod
23:46:51ldleworkfowl: hi
23:47:06fowlldlework, hi
23:47:44ldleworkfowl: I cannot read Nim yet, but someone pointed out to me that you implemented an ECS system
23:47:54*Amrykid quit (Excess Flood)
23:48:04Araqhe means "entity system"
23:48:07ldleworkfowl: can you tell me a little about your implementation?
23:48:15*Amrykid joined #nimrod
23:48:42*saml_ joined #nimrod
23:49:08fowlldlework, it uses the type system so that a component is a type and an entity is a combination of components
23:51:06ldleworkfowl: so I have approached some programmers of other languages and posed them with the problem of how to implement a type safe ECS
23:51:36ldleworkfowl: in go, reflection seems to be the answer; in rust.. well the guy implemented a distributed database that I couldn't understand
23:51:55fowleach component can have methods attached to it, when a dynamic type is created, these are sorted out and available for the entity to use
23:51:58ldleworkfowl: what is the basic data structure at play? Are entities just an ID? How do you store the components?
23:52:13fowlah ok
23:52:58fowlwhat you get back is a TypeInfo and pointer to the entities data
23:53:06ldleworkfowl: in the ECS I understand, each entity is just an id, an index into some structure holding the components.
23:53:22ldleworkthen the only code allowed to couple itself to components are "Systems"
23:53:34ldleworkwhich start off by requesting all the entities that satisfy a list of component dependencies
23:53:50ldleworklike Physics might require Transform + Velocity, Graphics might require Transform + Sprite
23:53:52ldleworkand so on
23:53:59ldleworkso the entities are essentially non-existent
23:54:06ldleworkI take it this isn't much how you went about it?
23:54:17ldlework(since entities have methods exposed to them by components, etc)
23:55:02Araqldlework: tuple of typeinfo + pointer is what is used in some commercial game engines
23:55:03fowlno, systems would be the next step
23:55:29ldleworkSo I wonder what the hell is with go and rust, why don't they just use this "typinfo" thing?
23:55:39ldleworkIs typeinfo a value representing the type?
23:55:48fowlldlework, go doesnt have true generic functions
23:56:09ldleworkfowl: finding the intersection of entities that satisfy a list of component dependencies seems to be the tricky part
23:56:18ldleworksince systems will do this a lot
23:56:35ldleworkthe guy in #rust implemented it as a bitvector index into a table of components.. or something
23:57:09ldleworkI'm interested in the simple typeinfo + point
23:57:12ldleworker
23:57:46fowlldlework, ok so when a new typeinfo is needed say for components A, B and D, it stores them in a single block of memory sizeof(A) + sizeof(B) + sizeof(D) long, there is a list of offsets so that fetching data is done by entity.data[entity.typeinfo.offsets[componentID(A)]] casted to "ptr A"
23:58:21ldleworkdo you have to perform this cast yourself?
23:58:31ldleworkduh probably
23:58:38fowlno, you use entity[A] to fetch its A value
23:58:46fowlor entity.get(A)
23:58:58ldleworkwow and you magically get back a value already cast to A?
23:59:42fowlhttps://bitbucket.org/fowlmouth/entoody/src/72d7cc13e6f2dbfed4591eb62a601fbfcde6269b/src/entoody.nim?at=master#cl-609