01:13:09 | DAddYE | Araq, dom96: maybe I'm retarded but is there a better way for https://gist.github.com/DAddYE/e7458756dabeca6d1d9c |
01:13:35 | DAddYE | do you think I can avoid var s = s; and use discard ? |
01:23:38 | dom96 | use 'var string' in your functions param list |
01:23:40 | * | DAddYE quit (Remote host closed the connection) |
01:24:03 | dom96 | or better yet, use 'result' |
01:24:06 | dom96 | good 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:13 | DAddYE | dom96: 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:20 | DAddYE | Araq: 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:19 | Araq | DAddYE: no but you can use 'from posix import a, b, c' |
07:46:04 | Araq | and I'd use simple character iteration for your 'classify': |
07:46:09 | Araq | result = "" |
07:46:19 | Araq | for i in 0 .. <s.len: |
07:47:04 | Araq | if s[i] == '_' and s[i+1] in {'a'..'z', '0'..'9'}: result.add(s[i+1].toUpper) |
07:47:15 | Araq | else: result.add(s[i]) |
07:47:41 | Araq | but 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:52 | EXetoC | peekaboo |
11:08:25 | dom96 | hallooo |
11:36:37 | EXetoC | playing games again. not good |
11:37:11 | EXetoC | a programmable usb-driven shock device might be the solution. are there any? |
11:39:13 | EXetoC | I could trigger it based on GPU utilization/temperature, though I'd have to be careful when writing graphics code |
11:42:50 | dom96 | now that's an idea for a kickstarter project |
11:48:49 | EXetoC | you 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:25 | Araq | hi 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:20 | EXetoC | Araq: 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:03 | DAddYE | Araq: completed libuv https://github.com/DAddYE/gist/blob/master/uv.nim |
16:49:09 | DAddYE | lemme know what do you think |
16:49:30 | DAddYE | Araq: If you'll like it I'll make a pull request to update the very very old one |
16:50:56 | DAddYE | Araq: 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:05 | Araq | DAddYE: I like it but you should get rid of the uv_ prefix I think |
16:53:23 | Araq | also "Classify" needs a better name |
16:53:30 | Araq | but I like this idea as well |
16:53:43 | DAddYE | Araq: yep, I added it back due to a lot of "redefinition" problems |
16:54:23 | DAddYE | that's why yesterday I asked if is possible to import types because seems that import much more than specified |
16:54:44 | Araq | import shouldn't cause redefinition problems |
16:55:00 | Araq | current module scope is preferred then |
16:55:14 | DAddYE | he did with (IIRC) shutdown, fs_write ... |
16:55:24 | DAddYE | Araq: can you explain? |
16:56:13 | DAddYE | is there some like in clojure: from posix import getsockaddr, sockwrite as socket |
16:56:40 | DAddYE | and thus invoke like: socket.getsockaddr, socket.sockwrite ? |
16:58:31 | Araq | well it conflicts with TReqType.SHUTDOWN |
16:58:40 | Araq | so make TReqType a .pure enum |
16:59:09 | Araq | and no there is no "import as" for now |
16:59:32 | Araq | there are however millions of other ways to solve naming issues |
16:59:36 | Araq | I have to go, bbl |
16:59:43 | DAddYE | Araq: thanks for your time |
16:59:48 | DAddYE | have fun! |
16:59:58 | DAddYE | and thanks for this awesome "language" |
17:00:07 | Araq | hu? |
17:00:14 | Araq | why the "quotes"? |
17:00:22 | DAddYE | because is much more |
17:00:24 | DAddYE | ;) |
17:00:32 | Araq | alright, 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:38 | DAddYE | Araq: here the update after your thoughts https://github.com/DAddYE/gist/blob/master/uv.nim |
18:55:19 | Araq | DAddYE: looks better ;-) |
18:55:24 | Araq | however you shouldn't define TStat, you should import it from posix |
18:55:54 | Araq | dunno what to do on windows, win has stat_t too somewhere iirc |
19:07:14 | DAddYE | Araq: 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:14 | dom96 | gradha: please fix your builder |
21:18:41 | gradha | dom96: I'm interested, please tell me more |
21:19:27 | gradha | "We seem to be timing out! PINGing server" it says |
21:19:40 | dom96 | well it keeps spamming #nimbuild because NimBot announces when a builder disconnects |
21:19:51 | dom96 | and your builder hasn't done any building since may |
21:20:08 | gradha | why is it disconnecting? |
21:20:44 | dom96 | no idea |
21:20:49 | gradha | I reseted it now, doesn't say anything for the moment |
21:21:53 | dom96 | still disconnecting |
21:22:06 | gradha | ok, will disable it |
21:22:39 | gradha | any idea why it doesn't build anything either? |
21:22:57 | dom96 | probably because it's disconnecting all the time lol |
21:23:13 | dom96 | but once it does start building I think it crashes or something |
21:23:17 | gradha | has it been spamming disconnections since may? |
21:23:33 | dom96 | sometimes it spams it more than other times. |
21:24:02 | gradha | maybe it was in may when I set the process some ulimits |
21:24:36 | gradha | I 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:40 | gradha | ulimit -l 524288 -t 1000 -m 524288 -v 524288 |
21:25:47 | dom96 | try forcing a build by changing the config and restarting |
21:26:52 | gradha | requestNewest = True? |
21:27:47 | dom96 | yeah |
21:28:23 | Araq | dom96: irclogs are down |
21:28:23 | Araq | bad gateway |
21:28:43 | dom96 | Araq: do you refresh the logs every second or something? |
21:28:58 | Araq | lol |
21:29:51 | Araq | well they render more nicely than my irc client does it |
21:29:51 | dom96 | well gradha crashed it :P |
21:30:16 | Araq | nice |
21:30:27 | Araq | what about some respawn script? |
21:30:54 | gradha | how can I crash the irc logs? |
21:31:40 | dom96 | yeah yeah, respawn scripts galore over here... |
21:33:14 | gradha | also, if I crashed the log, doesn't it crash every time so you need to fix something somewhere? |
21:36:06 | dom96 | yes, it seems to be a subtle error though |
21:40:07 | gradha | I guess the builder is not working, "git checkout master exited with 1" |
21:41:15 | gradha | for some reason it has a newtempl, zahary branch, and is in the middle of a merge? |
21:41:58 | gradha | yeah, for some reason pulling autoconflicts it, well, let's nuke it from orbit |
21:42:04 | dom96 | yeah, I had strange things like that happen too. |
21:45:11 | gradha | now the builder gets "unzip csources.zip started." followed by "Error: unhandled exception: No such file or directory [EOS]" |
21:45:52 | gradha | oh, more weirdness, all the files are gone |
21:46:00 | dom96 | lol? |
21:46:33 | gradha | it was again inside some merge, resetted it again, now the hub doesn't like me though |
21:50:38 | dom96 | !repos |
21:50:38 | NimBot | Announced repos: Araq/Nimrod, nimrod-code/nimbuild, nimrod-code/aporia, nimrod-code/nimforum, nimrod-code/babel, nimrod-code/packages, dom96/jester |
21:50:48 | dom96 | where is my announcement NimBot?! |
21:52:25 | dom96 | Anyway, fixed that crash. |
21:55:56 | gradha | hmm.. could the pinging be blocked by some filter? I am just experiencing the awesomeness of FTTH |
21:56:09 | Araq | WHO DARED TO HIGHLIGHT ME? |
21:56:21 | gradha | eh? |
21:56:25 | Araq | Nimbot ... |
21:57:09 | gradha | so for fiber you get two awesome routers instead of one, and you have to configure them through a website |
21:57:39 | gradha | why two routers? the technician says: "talk to the bosses" |
22:01:28 | dom96 | FTTH? |
22:01:38 | gradha | fiber to the home |
22:02:19 | dom96 | I wish I had fiber... The Last of Us would already be downloaded if I did. |
22:20:30 | gradha | FTP: Uploading... blah blah |
22:20:41 | gradha | Error: unhandled exception: Expected reply '226' got: 421 Data timeout. Reconnect. Sorry. [EInvalidReply] |
22:21:08 | gradha | hmm... maybe these routers I have now suck at maintaining connections |
22:22:48 | EXetoC | plop |
22:23:48 | gradha | just killed Mothra's offspring |
22:45:21 | * | gradha quit (Quit: bbl, need to watch https://www.youtube.com/watch?v=1ZZC82dgJr8 again) |
23:27:27 | DAddYE | noob question, is there a inspect_object method? |
23:27:36 | DAddYE | to see all properties values ? |
23:28:41 | dom96 | repr() ? |
23:28:53 | DAddYE | lemme try |
23:29:00 | dom96 | not sure if that's what you mean. |
23:29:24 | DAddYE | dom96: yep it is |
23:29:26 | DAddYE | awesome! |
23:29:33 | dom96 | good :) |
23:39:25 | * | Max00355 joined #nimrod |
23:39:40 | Araq | hi Max00355, welcome |
23:39:40 | dom96 | hey Max00355 |
23:39:45 | Max00355 | Hey, I am new to nimrod and I don't understand hw functions are used in this language.. |
23:39:50 | Max00355 | It is strange to me |
23:40:15 | Max00355 | I have an extensive Python background, so I am no newbie to programming, I just don't understand this completely. |
23:40:26 | Max00355 | proc a(b: string): |
23:40:29 | Max00355 | return b |
23:40:32 | Max00355 | Does not wrok |
23:40:33 | dom96 | hrm, are you having trouble grasping the static typing? |
23:40:37 | Max00355 | Yes |
23:40:47 | dom96 | You need a return type. |
23:40:58 | Max00355 | string = return b |
23:41:04 | Max00355 | ? |
23:41:09 | dom96 | yeah |
23:41:31 | Max00355 | Okay, so than another thing. |
23:41:34 | Max00355 | Calling the functions |
23:41:41 | Max00355 | Sometimes I see discard |
23:41:47 | Max00355 | and others I see it called from within a loop... |
23:41:52 | dom96 | that's equivalent to python's: def a(b): return b (If my python knowledge didn't die already :P) |
23:42:05 | Max00355 | haha, that is correct. |
23:42:56 | Max00355 | I 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:00 | dom96 | If a function returns something you must explicitly discard the return value. |
23:43:06 | dom96 | Sure thing. |
23:44:04 | dom96 | Maybe 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:21 | dom96 | proc blah(): string = return "foo" |
23:45:33 | dom96 | blah() # Error, need a 'discard'. |
23:45:54 | dom96 | discard blah() # Works, but there isn't much point to this. |
23:46:33 | dom96 | The 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:54 | dom96 | Are you with me? |
23:53:30 | Max00355 | I am |
23:53:46 | Max00355 | Sorry I was AFK |
23:54:12 | dom96 | np |
23:57:30 | Max00355 | How long have you been writing Nimrod? |
23:57:56 | dom96 | ~3 years |
23:58:32 | Max00355 | Holy shit. |
23:58:39 | Max00355 | Does Nimrod compile to C? |
23:58:53 | dom96 | yeah |
23:59:24 | Max00355 | That's what really attracted me to it. |
23:59:35 | Max00355 | Do you have a github I can look at? |
23:59:43 | dom96 | https://github.com/dom96 |
23:59:53 | dom96 | :P |