<< 12-07-2013 >>

01:13:09DAddYEAraq, dom96: maybe I'm retarded but is there a better way for https://gist.github.com/DAddYE/e7458756dabeca6d1d9c
01:13:35DAddYEdo you think I can avoid var s = s; and use discard ?
01:23:38dom96use 'var string' in your functions param list
01:23:40*DAddYE quit (Remote host closed the connection)
01:24:03dom96or better yet, use 'result'
01:24:06dom96good night
01:24:16*DAddYE joined #nimrod
01:28:01*q66 quit (Quit: Leaving)
01:28:23*DAddYE quit (Ping timeout: 240 seconds)
02:24:57*DAddYE joined #nimrod
02:31:16*DAddYE quit (Ping timeout: 240 seconds)
03:22:16*DAddYE joined #nimrod
03:27:13DAddYEdom96: tried but the compiler said = Error: for a 'var' type a variable needs to be passed
04:13:26*OrionPK quit (Read error: Connection reset by peer)
06:47:20DAddYEAraq: quick question, is it possible to import only types? Like I saw somewhere: import posixtypes
06:59:40*Associat0r joined #nimrod
06:59:40*Associat0r quit (Changing host)
06:59:40*Associat0r joined #nimrod
07:39:06*Trix[a]r_za quit (Ping timeout: 264 seconds)
07:39:13*Trix[a]r_za joined #nimrod
07:42:42*Trix[a]r_za is now known as Trixar_za
07:45:19AraqDAddYE: no but you can use 'from posix import a, b, c'
07:46:04Araqand I'd use simple character iteration for your 'classify':
07:46:09Araqresult = ""
07:46:19Araqfor i in 0 .. <s.len:
07:47:04Araq if s[i] == '_' and s[i+1] in {'a'..'z', '0'..'9'}: result.add(s[i+1].toUpper)
07:47:15Araq else: result.add(s[i])
07:47:41Araqbut gah, you need to make it a 'while' so that you can i+= 2 for the underscore case
08:16:22*DAddYE quit (Remote host closed the connection)
08:27:51*Trixar_za is now known as Trix[a]r_za
08:46:23*Raynes quit (Ping timeout: 256 seconds)
08:47:02*Raynes joined #nimrod
09:42:34*q66 joined #nimrod
09:56:49*EXetoC joined #nimrod
09:56:52EXetoCpeekaboo
11:08:25dom96hallooo
11:36:37EXetoCplaying games again. not good
11:37:11EXetoCa programmable usb-driven shock device might be the solution. are there any?
11:39:13EXetoCI could trigger it based on GPU utilization/temperature, though I'd have to be careful when writing graphics code
11:42:50dom96now that's an idea for a kickstarter project
11:48:49EXetoCyou might be right
12:57:57*Zor quit (Ping timeout: 246 seconds)
12:58:52*Zor joined #nimrod
13:08:09*EXetoC quit (Quit: WeeChat 0.4.1)
13:25:09*Associat0r quit (Quit: Associat0r)
13:33:41*EXetoC joined #nimrod
13:34:25Araqhi EXetoC, work on better gdb integration instead of playing ;-)
13:53:00*Associat0r joined #nimrod
13:53:00*Associat0r quit (Changing host)
13:53:00*Associat0r joined #nimrod
13:57:31*Sergio965 joined #nimrod
14:06:20EXetoCAraq: I guess you can't afford to pay me in monies or cookies, so I'll have to think about it
14:28:39*EXetoC quit (Read error: Connection reset by peer)
16:15:01*EXetoC joined #nimrod
16:15:37*comex quit (Quit: Coyote finally caught me)
16:15:45*comex joined #nimrod
16:44:45*DAddYE joined #nimrod
16:49:03DAddYEAraq: completed libuv https://github.com/DAddYE/gist/blob/master/uv.nim
16:49:09DAddYElemme know what do you think
16:49:30DAddYEAraq: If you'll like it I'll make a pull request to update the very very old one
16:50:56DAddYEAraq: also, If you'd like I can pr a little helper to Classify (remove underscore and capitalize) for c2nim, that's useful when u add T and P to types/pointers and avoid things like T_foo_bar
16:52:56*Sergio965 quit (Read error: Connection reset by peer)
16:53:05AraqDAddYE: I like it but you should get rid of the uv_ prefix I think
16:53:23Araqalso "Classify" needs a better name
16:53:30Araqbut I like this idea as well
16:53:43DAddYEAraq: yep, I added it back due to a lot of "redefinition" problems
16:54:23DAddYEthat's why yesterday I asked if is possible to import types because seems that import much more than specified
16:54:44Araqimport shouldn't cause redefinition problems
16:55:00Araqcurrent module scope is preferred then
16:55:14DAddYEhe did with (IIRC) shutdown, fs_write ...
16:55:24DAddYEAraq: can you explain?
16:56:13DAddYEis there some like in clojure: from posix import getsockaddr, sockwrite as socket
16:56:40DAddYEand thus invoke like: socket.getsockaddr, socket.sockwrite ?
16:58:31Araqwell it conflicts with TReqType.SHUTDOWN
16:58:40Araqso make TReqType a .pure enum
16:59:09Araqand no there is no "import as" for now
16:59:32Araqthere are however millions of other ways to solve naming issues
16:59:36AraqI have to go, bbl
16:59:43DAddYEAraq: thanks for your time
16:59:48DAddYEhave fun!
16:59:58DAddYEand thanks for this awesome "language"
17:00:07Araqhu?
17:00:14Araqwhy the "quotes"?
17:00:22DAddYEbecause is much more
17:00:24DAddYE;)
17:00:32Araqalright, bye
17:04:24*q66 quit (Ping timeout: 246 seconds)
17:04:24*q66 joined #nimrod
17:31:19*XAMPP joined #nimrod
17:31:19*XAMPP quit (Changing host)
17:31:19*XAMPP joined #nimrod
17:52:38DAddYEAraq: here the update after your thoughts https://github.com/DAddYE/gist/blob/master/uv.nim
18:55:19AraqDAddYE: looks better ;-)
18:55:24Araqhowever you shouldn't define TStat, you should import it from posix
18:55:54Araqdunno what to do on windows, win has stat_t too somewhere iirc
19:07:14DAddYEAraq: oky thanks!
20:25:52*Amrykid quit (Quit: Goodbye!)
20:26:37*Amrykid joined #nimrod
20:57:59*OrionPK joined #nimrod
21:15:42*gradha joined #nimrod
21:18:14dom96gradha: please fix your builder
21:18:41gradhadom96: I'm interested, please tell me more
21:19:27gradha"We seem to be timing out! PINGing server" it says
21:19:40dom96well it keeps spamming #nimbuild because NimBot announces when a builder disconnects
21:19:51dom96and your builder hasn't done any building since may
21:20:08gradhawhy is it disconnecting?
21:20:44dom96no idea
21:20:49gradhaI reseted it now, doesn't say anything for the moment
21:21:53dom96still disconnecting
21:22:06gradhaok, will disable it
21:22:39gradhaany idea why it doesn't build anything either?
21:22:57dom96probably because it's disconnecting all the time lol
21:23:13dom96but once it does start building I think it crashes or something
21:23:17gradhahas it been spamming disconnections since may?
21:23:33dom96sometimes it spams it more than other times.
21:24:02gradhamaybe it was in may when I set the process some ulimits
21:24:36gradhaI periodically caught the build process eating all my RAM and halting the matchine, so I jailed it with maybe 500M of ram or something like that
21:25:40gradhaulimit -l 524288 -t 1000 -m 524288 -v 524288
21:25:47dom96try forcing a build by changing the config and restarting
21:26:52gradharequestNewest = True?
21:27:47dom96yeah
21:28:23Araqdom96: irclogs are down
21:28:23Araqbad gateway
21:28:43dom96Araq: do you refresh the logs every second or something?
21:28:58Araqlol
21:29:51Araqwell they render more nicely than my irc client does it
21:29:51dom96well gradha crashed it :P
21:30:16Araqnice
21:30:27Araqwhat about some respawn script?
21:30:54gradhahow can I crash the irc logs?
21:31:40dom96yeah yeah, respawn scripts galore over here...
21:33:14gradhaalso, if I crashed the log, doesn't it crash every time so you need to fix something somewhere?
21:36:06dom96yes, it seems to be a subtle error though
21:40:07gradhaI guess the builder is not working, "git checkout master exited with 1"
21:41:15gradhafor some reason it has a newtempl, zahary branch, and is in the middle of a merge?
21:41:58gradhayeah, for some reason pulling autoconflicts it, well, let's nuke it from orbit
21:42:04dom96yeah, I had strange things like that happen too.
21:45:11gradhanow the builder gets "unzip csources.zip started." followed by "Error: unhandled exception: No such file or directory [EOS]"
21:45:52gradhaoh, more weirdness, all the files are gone
21:46:00dom96lol?
21:46:33gradhait was again inside some merge, resetted it again, now the hub doesn't like me though
21:50:38dom96!repos
21:50:38NimBotAnnounced repos: Araq/Nimrod, nimrod-code/nimbuild, nimrod-code/aporia, nimrod-code/nimforum, nimrod-code/babel, nimrod-code/packages, dom96/jester
21:50:48dom96where is my announcement NimBot?!
21:52:25dom96Anyway, fixed that crash.
21:55:56gradhahmm.. could the pinging be blocked by some filter? I am just experiencing the awesomeness of FTTH
21:56:09AraqWHO DARED TO HIGHLIGHT ME?
21:56:21gradhaeh?
21:56:25AraqNimbot ...
21:57:09gradhaso for fiber you get two awesome routers instead of one, and you have to configure them through a website
21:57:39gradhawhy two routers? the technician says: "talk to the bosses"
22:01:28dom96FTTH?
22:01:38gradhafiber to the home
22:02:19dom96I wish I had fiber... The Last of Us would already be downloaded if I did.
22:20:30gradhaFTP: Uploading... blah blah
22:20:41gradhaError: unhandled exception: Expected reply '226' got: 421 Data timeout. Reconnect. Sorry. [EInvalidReply]
22:21:08gradhahmm... maybe these routers I have now suck at maintaining connections
22:22:48EXetoCplop
22:23:48gradhajust killed Mothra's offspring
22:45:21*gradha quit (Quit: bbl, need to watch https://www.youtube.com/watch?v=1ZZC82dgJr8 again)
23:27:27DAddYEnoob question, is there a inspect_object method?
23:27:36DAddYEto see all properties values ?
23:28:41dom96repr() ?
23:28:53DAddYElemme try
23:29:00dom96not sure if that's what you mean.
23:29:24DAddYEdom96: yep it is
23:29:26DAddYEawesome!
23:29:33dom96good :)
23:39:25*Max00355 joined #nimrod
23:39:40Araqhi Max00355, welcome
23:39:40dom96hey Max00355
23:39:45Max00355Hey, I am new to nimrod and I don't understand hw functions are used in this language..
23:39:50Max00355It is strange to me
23:40:15Max00355I have an extensive Python background, so I am no newbie to programming, I just don't understand this completely.
23:40:26Max00355proc a(b: string):
23:40:29Max00355 return b
23:40:32Max00355Does not wrok
23:40:33dom96hrm, are you having trouble grasping the static typing?
23:40:37Max00355Yes
23:40:47dom96You need a return type.
23:40:58Max00355string = return b
23:41:04Max00355?
23:41:09dom96yeah
23:41:31Max00355Okay, so than another thing.
23:41:34Max00355Calling the functions
23:41:41Max00355Sometimes I see discard
23:41:47Max00355and others I see it called from within a loop...
23:41:52dom96that's equivalent to python's: def a(b): return b (If my python knowledge didn't die already :P)
23:42:05Max00355haha, that is correct.
23:42:56Max00355I really want to become decent at Nimrod because I find it to be such a beatuful language, I hope you guys can help me out.
23:43:00dom96If a function returns something you must explicitly discard the return value.
23:43:06dom96Sure thing.
23:44:04dom96Maybe once you are awesome at Nimrod you could write a "Nimrod for Python programmers" tutorial? :)
23:45:09*EXetoC quit (Quit: WeeChat 0.4.1)
23:45:21dom96proc blah(): string = return "foo"
23:45:33dom96blah() # Error, need a 'discard'.
23:45:54dom96discard blah() # Works, but there isn't much point to this.
23:46:33dom96The reason this is done is to remind you to use the return values, I can't tell you how many times this helped me find bugs.
23:46:54dom96Are you with me?
23:53:30Max00355I am
23:53:46Max00355Sorry I was AFK
23:54:12dom96np
23:57:30Max00355How long have you been writing Nimrod?
23:57:56dom96~3 years
23:58:32Max00355Holy shit.
23:58:39Max00355Does Nimrod compile to C?
23:58:53dom96yeah
23:59:24Max00355That's what really attracted me to it.
23:59:35Max00355Do you have a github I can look at?
23:59:43dom96https://github.com/dom96
23:59:53dom96:P