00:00:50 | * | Anna_Jokela quit (Quit: Page closed) |
00:08:43 | * | dymk quit (Ping timeout: 240 seconds) |
00:45:44 | * | dymk joined #nimrod |
01:19:16 | * | bjz joined #nimrod |
01:26:07 | * | q66 quit (Quit: Leaving) |
02:03:55 | * | flaviu1 quit (Ping timeout: 252 seconds) |
02:11:37 | * | brson quit (Ping timeout: 252 seconds) |
02:21:00 | * | boydgreenfield joined #nimrod |
02:32:49 | * | brson joined #nimrod |
03:11:37 | * | hoverbear quit () |
03:11:39 | * | def- joined #nimrod |
03:12:40 | * | hoverbear joined #nimrod |
03:14:57 | * | hoverbea_ joined #nimrod |
03:15:08 | * | def-_ quit (Ping timeout: 252 seconds) |
03:17:39 | * | hoverbear quit (Ping timeout: 265 seconds) |
03:18:43 | * | bjz quit (Ping timeout: 252 seconds) |
03:31:52 | * | brson quit (Ping timeout: 245 seconds) |
03:40:02 | * | bjz joined #nimrod |
04:02:36 | * | BitPuffin quit (Ping timeout: 260 seconds) |
04:24:06 | * | kemet joined #nimrod |
04:25:59 | * | kemet quit (Client Quit) |
04:45:58 | * | boydgreenfield quit (Quit: boydgreenfield) |
04:47:29 | * | boydgreenfield joined #nimrod |
04:49:33 | * | boydgreenfield quit (Client Quit) |
04:49:54 | * | BitPuffin joined #nimrod |
05:19:57 | * | boydgreenfield joined #nimrod |
05:25:17 | * | bjz quit (Quit: Textual IRC Client: www.textualapp.com) |
05:36:10 | * | Demos quit (Read error: Connection reset by peer) |
05:36:40 | * | boydgreenfield quit (Quit: boydgreenfield) |
05:37:57 | * | bjz joined #nimrod |
05:56:58 | * | zahary quit (Quit: Leaving.) |
05:59:39 | NimBot | Araq/Nimrod devel ce29b9f flaviut [+0 ±1 -0]: fix tokenizing bug |
05:59:39 | NimBot | Araq/Nimrod devel bebc3f6 flaviut [+0 ±1 -0]: Regenerate docs |
05:59:39 | NimBot | Araq/Nimrod devel 41e599a Andreas Rumpf [+0 ±2 -0]: Merge pull request #1257 from flaviut/fix1217... 2 more lines |
06:05:02 | NimBot | Araq/Nimrod new_spawn 6d3fbf9 flaviut [+0 ±1 -0]: Allow for nil chaining in JSON |
06:05:02 | NimBot | Araq/Nimrod new_spawn 4ff5112 flaviut [+0 ±1 -0]: Add a couple words to docs |
06:05:02 | NimBot | Araq/Nimrod new_spawn db7fee6 flaviut [+0 ±1 -0]: Add tests for the nil passthrough |
06:05:02 | NimBot | Araq/Nimrod new_spawn 64d3b9a flaviut [+0 ±1 -0]: Fix subtle mistake in docs and formatting |
06:05:02 | NimBot | 123 more commits. |
06:09:34 | * | Demos joined #nimrod |
06:15:00 | * | hoverbea_ quit () |
06:21:18 | * | kemet joined #nimrod |
06:23:10 | * | kemet quit (Client Quit) |
06:23:32 | * | Demos quit (Ping timeout: 240 seconds) |
07:10:33 | * | kunev joined #nimrod |
07:24:36 | * | zshazz joined #nimrod |
07:29:07 | * | zshazz quit (Quit: Leaving) |
07:43:16 | * | io2 joined #nimrod |
08:06:32 | * | BitPuffin quit (Ping timeout: 240 seconds) |
08:06:57 | * | BitPuffin joined #nimrod |
08:12:03 | * | noam quit (Ping timeout: 240 seconds) |
08:21:03 | * | io2 quit (Ping timeout: 240 seconds) |
08:21:46 | * | io2 joined #nimrod |
08:23:07 | * | dymk quit (Ping timeout: 240 seconds) |
08:23:58 | * | dymk joined #nimrod |
08:32:02 | * | io2 quit (Ping timeout: 240 seconds) |
08:32:22 | * | io2 joined #nimrod |
08:33:32 | * | Xuerian quit (Ping timeout: 240 seconds) |
08:35:47 | * | Xuerian joined #nimrod |
09:47:53 | * | vendethiel joined #nimrod |
10:08:16 | * | noam joined #nimrod |
10:25:09 | * | darkf quit (Ping timeout: 252 seconds) |
10:33:16 | * | darkf joined #nimrod |
10:50:28 | dom96 | hello |
11:22:16 | * | springbok_ joined #nimrod |
11:22:40 | * | springbok_ is now known as Guest7594 |
11:26:02 | * | springbok quit (Ping timeout: 245 seconds) |
11:35:25 | * | flaviu1 joined #nimrod |
11:44:21 | * | BitPuffin quit (Ping timeout: 252 seconds) |
12:03:32 | * | flaviu1 quit (Remote host closed the connection) |
12:16:52 | * | untitaker quit (Ping timeout: 245 seconds) |
12:22:37 | * | untitaker joined #nimrod |
12:35:36 | * | mal`` quit (Quit: ERC Version 5.3 (IRC client for Emacs)) |
12:40:59 | * | mal`` joined #nimrod |
12:58:12 | * | darkf quit (Quit: Leaving) |
13:03:27 | * | vendethiel quit (Ping timeout: 265 seconds) |
13:14:57 | * | vendethiel joined #nimrod |
13:24:10 | * | Matthias247 joined #nimrod |
13:26:46 | * | flaviu1 joined #nimrod |
13:57:27 | * | araq_ joined #nimrod |
14:45:26 | * | kunev quit (Quit: leaving) |
14:51:04 | * | araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 27.0/20140127194636]) |
15:01:59 | * | bjz quit (Ping timeout: 252 seconds) |
15:10:54 | * | Jesin quit (Quit: Leaving) |
15:29:07 | * | zshazz joined #nimrod |
15:29:23 | dom96 | hi zshazz |
15:29:31 | zshazz | Heya. |
15:29:50 | zshazz | I got something interesting to show you (and I've got a few questions) |
15:31:04 | dom96 | Awesome. |
15:31:54 | EXetoC | gotta get the hang of message passing |
15:32:13 | zshazz | Obviously, first off, I recently (2 days ago) started learning Nimrod for the second time (the last time was about 2 years ago) so I decided to code something everyone can make use of ... So here's an implementation of the ISAAC rng in Nimrod! |
15:32:18 | zshazz | https://gist.github.com/Zshazz/7782d1cbefc6160cbb75 |
15:32:25 | EXetoC | the added indirection is annoying, but at the same time it forces you to separate the logic from the other stuff |
15:32:57 | zshazz | (I've verified the implementation by running it against the Java version and C version to make sure it produces the same results and it appears to pass) |
15:33:10 | EXetoC | great |
15:33:13 | dom96 | zshazz: Good job! Please put it in its own repo and add it to babel though so that we can use it more easily. |
15:34:14 | zshazz | Well, my question relates to finishing it up before I do that. I'm trying to work out the interface for its usage. What can I do/should I do about construction |
15:35:07 | zshazz | for instance, I'd really like to disallow user code from doing `new(blah)` and requiring a custom new to be used or to make it so that `new(blah)` gives you the RNG properly initialized |
15:35:08 | dom96 | You should probably create a initRNG function. |
15:35:17 | dom96 | Which returns a PIsaacRng |
15:35:33 | dom96 | or perhaps name it initIsaacRng |
15:36:09 | zshazz | OK |
15:36:33 | EXetoC | it's a reference type so the convention in that case is to use the 'new' prefix |
15:37:06 | dom96 | oh yeah, what EXetoC said. |
15:38:45 | zshazz | OK, that sounds good. |
15:41:05 | zshazz | As you can see, I've started writing documentation for it. Are there any docs on nimdoc? My main thing is that I want to make comments on the overall module and have them show up at the top. I think I've managed to figure out most of how to document other things |
15:42:00 | EXetoC | I don't think so, but see system.nim for example |
15:43:27 | zshazz | Are there any other RNG algorithms you guys would like to see? I've got Well512 implemented as well. I'm considering implementing MT19937, but I think Well512 and ISAAC are both better than it for their respective purposes |
15:49:51 | zshazz | Also, what's the best way to optimize the generated C++ code. I've noticed that it's about 25% slower than the fastest c implementation I could find (which still makes it really fast compared to most implementations), so I'd like to spend some time tweaking it a bit |
15:59:34 | dom96 | zshazz: You can try using the profiler although last time I checked it was broken. |
15:59:51 | dom96 | Also, you may be able to get better performance using the C backend. |
16:03:18 | zshazz | dom96: Where can I find info on the profiler? (I'm using 0.9.4) |
16:03:36 | zshazz | and thanks for the tip about the c backend. I'll try running it on that next |
16:04:00 | dom96 | http://build.nimrod-lang.org/docs/estp.html |
16:11:47 | * | DAddYE joined #nimrod |
16:12:48 | zshazz | Thank you :) |
16:13:53 | * | DAddYE quit (Client Quit) |
16:14:12 | * | DAddYE joined #nimrod |
16:15:03 | * | DAddYE quit (Client Quit) |
16:15:23 | * | DAddYE joined #nimrod |
16:15:46 | * | hoverbear joined #nimrod |
16:19:30 | flaviu1 | zshazz: xorshift is really great |
16:23:48 | flaviu1 | http://xorshift.di.unimi.it/ |
16:31:34 | zshazz | I'll add that as well flaviu1. Thanks :) |
16:36:35 | * | hoverbea_ joined #nimrod |
16:37:12 | * | hoverbear quit (Ping timeout: 260 seconds) |
16:46:48 | Araq | flaviu1: fixed your regression yet? |
16:47:22 | Araq | hi zshazz welcome |
16:47:28 | flaviu1 | Yes, you've already merged it |
16:47:28 | flaviu1 | https://github.com/Araq/Nimrod/pull/1257 |
16:47:45 | zshazz | Thanks Araq |
16:48:14 | flaviu1 | Oh, build still fails |
16:49:05 | flaviu1 | Sorry, I didn't test windows |
16:50:32 | * | brson joined #nimrod |
16:51:40 | * | Araq is now known as araq |
16:52:15 | araq | flaviu1: also we got a bug report about it |
16:54:14 | * | hoverbea_ is now known as hoverbear |
16:55:12 | flaviu1 | Feel free to close that, I've commented and that issue is fixed |
16:55:41 | flaviu1 | No idea why bootstrapping fails on windows though, I'm trying to reproduce it now |
16:57:25 | araq | so ... I just re-installed Linux |
16:57:51 | araq | when I press the backspace key, my pc speaker makes some noise |
16:58:08 | araq | it's 2014 and they use my PC speaker! |
16:58:31 | flaviu1 | Yeah, but that's going to get very annoying though |
16:58:38 | araq | it's simple enough to disable ofc, but still |
17:01:44 | araq | also it's a fucking DVD version which doesn't include git, but 2 versions of python, the JVM, perl, ruby and lots of other stuff I won't use |
17:02:04 | flaviu1 | Mint? Use arch, it doesn't include any crap. |
17:02:53 | araq | well I thought I can install that over my existing installation and get things to work without reformating the HD |
17:03:04 | araq | turns out I was wrong |
17:03:18 | araq | so yeah, could have installed arch instead |
17:03:58 | flaviu1 | I also have my home on its own partition, so that makes reinstalls easier for me |
17:04:58 | dom96 | araq: You would probably hate Arch |
17:08:21 | araq | why? |
17:09:30 | dom96 | Because you like to get stuff done, not waste days looking through wikis to fix a crashing X server. |
17:09:50 | flaviu1 | dom96: I dunno, I've had no issues with my X server |
17:09:58 | EXetoC | not that you have to upgrade every 24 hours |
17:10:17 | EXetoC | I've had problems with it, but it was easy to fix like in most cases |
17:10:17 | dom96 | replace X server with any other critical piece of software |
17:11:35 | EXetoC | as in full upgrade |
17:11:57 | dom96 | full upgrade? |
17:12:12 | dom96 | what do you consider a full upgrade in Arch? |
17:12:58 | EXetoC | an upgrade of every installed package that is outdated |
17:13:24 | flaviu1 | "size of array 'assert_numbits' is negative". hmm? |
17:13:53 | * | q66 joined #nimrod |
17:13:53 | * | q66 quit (Changing host) |
17:13:53 | * | q66 joined #nimrod |
17:14:27 | flaviu1 | Whoever runs the build server: how did you solve this: http://build.nimrod-lang.org/commits/windows-x86_64/58e583e39be1/logs.txt ? |
17:15:04 | flaviu1 | NM, it seems that 32 bit gcc can't compile 64 bit programs |
17:21:22 | * | Demos joined #nimrod |
17:23:07 | zshazz | Frankly, I prefer Manjaro to Arch because "full upgrades" are a massive pain on Arch and Manjaro usually handles it better, in my experience. Plus reinstalling Manjaro takes very little time if something goes wrong, but Arch is (apparently) intentionally time consuming. |
17:24:30 | flaviu1 | Huh? Reinstalling Arch means just as little as saying "full upgrade" for Arch |
17:24:47 | EXetoC | calling it time-consuming seems like a bit of a stretch |
17:24:50 | EXetoC | possibly initially |
17:27:06 | EXetoC | flaviu1: what do you mean? |
17:27:23 | EXetoC | it means upgrading all packages that are outdated |
17:27:26 | zshazz | flaviu1: As far as "full upgrade", I'm talking about the definition ExetoC gave. And I've experienced breaking upgrades in the past on Arch. And reinstalling Arch when something goes wrong usually means you wipe everything (except your /home, of course) so it's like setting up initially again |
17:27:37 | flaviu1 | Arch doesn't force you to delete your files when installing. |
17:28:17 | zshazz | If you don't delete the previous installation, then your new installation will likely be as broken as the old that you wanted to get rid of. |
17:29:05 | Demos | I have found installing arch to be the most painless of any linux distro I have tried... |
17:29:12 | * | boydgreenfield joined #nimrod |
17:29:43 | EXetoC | Demos: I assume that most people imply setting it up also |
17:30:11 | Demos | just some simple commands, most desktops work pretty much out of the box |
17:30:22 | zshazz | Maybe it's changed. 4 years ago when I first started with Arch, I would have agreed with you. But circa 2 years ago the Arch maintainers decided to go hardcore and installation become significantly longer for me. Perhaps they've switched back to a sane install process. |
17:31:00 | Demos | their install process is essentially, "run this script to make the directory structure and install base" then chroot and set up locales and stuff |
17:31:04 | Demos | pretty sane |
17:31:04 | zshazz | Actually 4 years ago I found it easier to get set up and working correctly than Ubuntu at the time. |
17:31:33 | flaviu1 | I found it pretty painful to initially install since I had no idea what I was doing and doing pretty funky stuff with the partition table, but the second time when I deleted /var/, it was very easy to resetup. |
17:31:38 | EXetoC | Demos: that was a recent change IIRC |
17:33:09 | EXetoC | pacstrap and all that? |
17:34:56 | zshazz | Well anyway, the main problem I have with Manjaro is the fact that they run a bit behind Arch (which matters when something is found insecure). So if Arch has regained their minds, that might be the preference again. That said, I have never had a broken install with Manjaro (it seems like they spend more time making upgrades as painless as possible by automating things that you need to do) |
17:36:05 | Demos | hm, what should I call an operator that is like less than but where !(a < b) does not imply a > b, I guess less than already works like that for a == b |
17:37:06 | * | kunev joined #nimrod |
17:38:14 | * | boydgreenfield quit (Quit: boydgreenfield) |
17:40:09 | araq | Demos: the "quirky less than" of course, spelt <~ |
17:41:01 | Demos | I think it actually is a real less than operator |
17:44:32 | * | Matthias247 quit (Read error: Connection reset by peer) |
17:47:53 | EXetoC | dom96: why sleep in irc.reconnect? I guess only the simplest cases have been considered |
17:51:31 | * | hoverbear quit (Ping timeout: 265 seconds) |
17:52:40 | * | Jehan_ joined #nimrod |
17:53:14 | dom96 | EXetoC: yeah, in fact reconnect doesn't work IIRC |
17:53:48 | EXetoC | ok |
17:56:09 | dom96 | I think it's some socket issue though |
17:56:26 | dom96 | It's also tough to reproduce |
17:59:19 | * | shodan45 joined #nimrod |
18:00:50 | EXetoC | got it |
18:07:52 | flaviu1 | does gcleak5 do anything? |
18:08:21 | * | hoverbear joined #nimrod |
18:08:32 | flaviu1 | its just sitting there, doing nothing |
18:10:29 | * | shodan45 quit (Ping timeout: 264 seconds) |
18:11:05 | * | hoverbea_ joined #nimrod |
18:11:17 | Jehan_ | flaviu1: That's what it should do. |
18:12:15 | flaviu1 | Hmm, ok. However, I'd like to keep going, I don't really want to babysit the tests all day. |
18:12:18 | Jehan_ | Unless I'm completely misunderstanding something. |
18:12:37 | Jehan_ | It's a long-running test, as far as I can tell, due to the sleep() |
18:12:58 | * | hoverbear quit (Ping timeout: 240 seconds) |
18:13:16 | EXetoC | little more than 50 seconds I think |
18:13:31 | Jehan_ | There was apparently a bug that caused getGMTime() to leak memory. |
18:13:41 | flaviu1 | Way longer than 50 seconds |
18:13:55 | Jehan_ | EXetoC: It sleeps 50,000 times for one second. |
18:14:17 | Jehan_ | So, something like 14 hours. |
18:14:31 | EXetoC | that's a millisecond sleep |
18:14:33 | EXetoC | roughly |
18:14:50 | EXetoC | the test suite didn't take 14 hours last time I checked :> |
18:15:00 | zshazz | I'm trying to figure out distinct... it's not supposed to work on ref objects, is it? |
18:15:16 | EXetoC | I don't see why not |
18:15:36 | Jehan_ | Ah, I hadn't realized that sleep takes a ms argument. |
18:16:02 | * | shodan45 joined #nimrod |
18:16:11 | EXetoC | it's possible that you have to do something like distinctVar.(ref TFoo) to get to the underlying variable |
18:16:27 | EXetoC | ah, yet another reason why I don't want the prefixes to go |
18:18:21 | flaviu1 | Anyway, first round finished, time for the second -_- |
18:20:02 | zshazz | Well, maybe it's a better idea to say what I'm trying to do and hear your suggested solutions instead... I'm trying to make multiple variations of an RNG implementation without resorting to using methods. So most of the code is the same, except for something small like some internal generation function. Obviously, I don't want to repeat code I don't have to. |
18:20:06 | EXetoC | zshazz: with that said, how does it fail? |
18:20:22 | flaviu1 | zshazz: How about a typeclass? |
18:20:23 | zshazz | I'll make a gist, one sec |
18:20:48 | flaviu1 | Although typeclasses are buggy |
18:20:56 | EXetoC | typeclass indeed. I doubt you want runtime polymorphism |
18:20:59 | zshazz | in reference to "how does it fail": https://gist.github.com/Zshazz/1089919776d439341503 |
18:21:03 | EXetoC | *user-defined* type classes, yes |
18:22:13 | flaviu1 | zshazz: type PRNG = generic x\n proc next(self: var x): int64 |
18:22:27 | EXetoC | POther is not a reference type |
18:23:19 | EXetoC | well, he can try |
18:24:24 | zshazz | Trying it now, let you know how it goes. Thanks for the advice :) |
18:24:51 | * | Jesin joined #nimrod |
18:25:18 | EXetoC | vanilla type classes: http://build.nimrod-lang.org/docs/manual.html#type-classes |
18:25:30 | dom96 | Typeclass? Use templates. |
18:26:29 | dom96 | If most of the code is the same you should be using templates for the common parts. |
18:26:36 | dom96 | or even procedures if you are able to. |
18:27:05 | flaviu1 | dom96: The idea is to have that is generic and doesn't depend on the type of the RNG |
18:27:52 | flaviu1 | IMO using templates for this feels like a horrible hack |
18:29:25 | dom96 | typeclasses seem like overkill to me. |
18:29:37 | dom96 | not to mention that they are still largely unstable IMO |
18:30:00 | flaviu1 | They are pretty unstable, but they are the right way to do things |
18:31:09 | dom96 | Well it depends how much of the code is similar, if it's just the interface which is similar then sure, use typeclasses. But if the implementations are shared between different RNGs then templates should be used. |
18:31:11 | flaviu1 | Also, overkill doesn't really matter, you should be using the most powerful and appropriate features whenever possible |
18:31:53 | flaviu1 | I think that just the `proc next(self: var PRNG): int` is all that is different. |
18:32:07 | araq | no, you should use the simplest feature that suffices |
18:32:27 | araq | "principle of least power" is its name I think |
18:32:40 | araq | otherwise you would simply use a macro for everything |
18:34:32 | zshazz | Type classes seem like the way to go to implement the overall "RNG" concept, but templates seem to be correct for variations of the same RNG algorithm, I think. |
18:34:46 | Demos | can we copy c++'s <random> interface, it is quite good |
18:34:52 | dom96 | Well I was under the impression that the implementations are shared and templates are therefore required, typeclasses don't cut it. |
18:34:55 | flaviu1 | Yes, but in this case I'd say that templates are too much of a hack to be used here. Macros miss my second clause, they are not appropriate for anything but avoiding extreme code repetition or extending the syntax. |
18:35:09 | dom96 | "overkill" might have been the wrong word to call it. |
18:35:38 | Demos | they have a PRNG "concept" (we could make it a typeclass) and a seperate distribution typeclass that takes a PRNG and gives you a number in a given distribution |
18:35:43 | flaviu1 | zshazz: Oh, you're trying to implement different sizes of RNGs, ex xorshift-64, xorshift-128, ... |
18:35:53 | flaviu1 | For that, templates are best |
18:36:23 | zshazz | flaviu1: Yeah. But I would have still needed to know how to do generic RNGs as well, so your info on type classes is much appreciated :) |
18:36:47 | zshazz | Although I hope that it works out for me (using 0.9.4 right now) |
18:37:46 | flaviu1 | Most people here are on a git snapshot, but I don't think there have been enough bugfixes to merit switching to git |
18:40:42 | araq | dom96: so how do I get babel for linux "properly"? |
18:41:03 | dom96 | araq: Clone, compile, babel install |
18:43:59 | araq | Creating symlink: /home/araq/.babel/pkgs/babel-0.2.0/babel -> /home/araq/.babel/bin/babel |
18:44:13 | araq | that's not in my path |
18:44:22 | dom96 | add it to your path |
18:44:33 | dom96 | then you can babel install aporia |
18:44:38 | dom96 | and aporia will be in your path :P |
18:44:50 | dom96 | #TheFutureIsNow |
18:44:55 | araq | oh ... damn |
18:45:04 | araq | I already downloaded Aporia myself |
18:47:14 | dom96 | araq: Your loyalty is always appreciated :) |
18:49:09 | EXetoC | I'm doing multithreading, and 'assert false' isn't being propagated |
18:49:54 | clone1018 | Where can I find the prebuilt aporia? |
18:49:57 | * | flaviu1 quit (Read error: Connection reset by peer) |
18:49:57 | EXetoC | raising EAssertionFailed manually works. I'm not sure why |
18:50:48 | dom96 | clone1018: For Windows? |
18:51:02 | clone1018 | Yeha |
18:51:05 | clone1018 | Yeah* |
18:51:17 | * | flaviu1 joined #nimrod |
18:51:19 | dom96 | clone1018: http://nimrod-lang.org/download/aporia.zip |
18:51:27 | clone1018 | Thank you |
18:51:27 | dom96 | clone1018: That version is a bit old now though |
18:52:24 | EXetoC | I don't know why it's so important not to list EAssertionFailed |
18:53:17 | araq | EXetoC: because it sucks to have to do proc () {.raises: [EAssertionFailed].} for a callback |
18:53:37 | araq | also it's not an effect |
18:53:55 | * | Jehan_ quit (Read error: Connection reset by peer) |
18:54:08 | araq | you don't write raises: [EInvalidIndex] either |
18:54:09 | * | Jehan_ joined #nimrod |
18:55:06 | dom96 | araq: Is there a pragma for this? like EInvalidIndex {.invisible.} = object of EBase, or is it defined in the compiler? |
18:55:13 | EXetoC | ok well it doesn't work very well for some reason |
18:56:56 | zshazz | `type PBlah1 = ref TBlah` and `type PBlah2 = ref TBlah` are the same type? |
18:57:09 | EXetoC | 'ass false'. nice and short |
18:57:22 | EXetoC | zshazz: yes, they are aliases |
19:00:10 | araq | EXetoC: please report it |
19:01:20 | EXetoC | just gotta figure out how to trigger it, but I think it's just a matter of doing it in a separate thread |
19:01:26 | EXetoC | and maybe spawn has something to do with it |
19:03:49 | araq | do you use 'spawn'? |
19:03:58 | * | kunev quit (Ping timeout: 240 seconds) |
19:04:06 | EXetoC | yes |
19:04:15 | flaviu1 | araq: Build works fine for me on x64 windows, although I did remove the GC tests because they would've taken hours. |
19:04:53 | EXetoC | hours? |
19:04:57 | EXetoC | weird |
19:05:06 | flaviu1 | Possibly, IDK |
19:05:13 | flaviu1 | Too long to sit there and wait |
19:05:40 | EXetoC | that about 14 hours was wrong in case you missed that, and I don't think it has taken more than 30 minutes for me |
19:05:53 | araq | EXetoC: well 0.9.6 will require 'import threadpool' for 'spawn' to work |
19:06:41 | EXetoC | that's not a particularly big change, but good to know |
19:08:00 | araq | flaviu1: ok, will test it later myself on win |
19:08:35 | flaviu1 | Anyway, bootstrapping works, so if there's a bug, its in the tester. |
19:09:03 | araq | you recompiled the tester too, right? |
19:09:20 | flaviu1 | I started up a fresh VM and cloned everything from git |
19:10:56 | def- | Consts declared inside a template are not accessible from outside the template. Is that intentional? |
19:11:29 | araq | def-: yes, it's called "hygienic" macro system |
19:11:41 | def- | ah, thanks |
19:11:44 | araq | use .inject to export them |
19:11:53 | araq | or .dirty on the template |
19:12:23 | zshazz | For templating based on type: What's the simplest way to cast to and from unsigned versions of ints? |
19:12:44 | flaviu1 | zshazz: myint.uint64 |
19:12:52 | flaviu1 | or uint64(myint) |
19:13:20 | flaviu1 | Either works because of UFCS |
19:13:31 | zshazz | well, I mean, I have a generic int type and I want to get the uint version of it. So, uint16 from an int16 and uint32 from an int32, etc |
19:15:04 | zshazz | basically, I want an interface like gen.next[uint32]() or gen.next[int16]() and I'm just going to cast from the internal "next" function of the corresponding generator |
19:15:30 | zshazz | I'm aware I could just do a bunch of "when" clauses, but that doesn't look nice |
19:15:45 | araq | zshazz: you can do them in a template |
19:16:11 | araq | you can also use +% etc. and keep working on ints |
19:16:23 | araq | no need for int->uint->int hacks |
19:16:52 | flaviu1 | I thought +% was for legacy purposes? |
19:16:53 | zshazz | It's for client code. I'm working only on ints internally |
19:17:22 | zshazz | (well, int32 or int64 or whatever, depending on whatever the algorithm wants) |
19:17:29 | araq | zshazz: then don't bother with unsigned |
19:17:45 | araq | flaviu1: no, I like them enough to keep them |
19:17:45 | zshazz | But when the client wants the unsigned version, what do I do? |
19:18:07 | araq | tell the client he's a fool |
19:19:04 | flaviu1 | zshazz: `proc c[T](a: int64): T = a.T` Works for me |
19:19:11 | flaviu1 | templates don't for some reason... |
19:21:08 | * | Jesin quit (Quit: Leaving) |
19:21:26 | zshazz | Thanks flaviu1, that will probably work okay. |
19:26:28 | Demos | if I have an array is there a way to go like arr[1], arr[2] = someProcThatReturnsATuple? |
19:26:44 | flaviu1 | TBH I'm not a big fan of the % family |
19:27:27 | araq | Demos: there is a macro for it somewhere and the next version will support it natively |
19:27:28 | EXetoC | dom96: I upgraded nimrod and now I get this when trying to connect to freenode: "Error: unhandled exception: Transport endpoint is not connected [EOS]" |
19:27:43 | EXetoC | I had upgraded 1-2 weeks before that |
19:28:22 | araq | flaviu1: TBH I don't give a fuck about whether you like them or not |
19:28:53 | EXetoC | the diff doesn't mention irc.nim but a couple of socket modules have been modified |
19:29:05 | flaviu1 | I know, just throwing my opinion out |
19:29:08 | Demos | araq: any idea what that macro is called? It does not seem to be in sequtils |
19:29:39 | araq | Demos: it's one of gradha's gists ... |
19:31:33 | EXetoC | It'd be nice to include a description in addition to "fix #xxxx" |
19:34:45 | * | ehaliewicz joined #nimrod |
19:35:09 | EXetoC | but it says that sockets.nim was last updated in may.. who knows when I upgraded then |
19:35:42 | Demos | screw it I will just make a huge number of temp variables |
19:36:01 | araq | where huge means 2 |
19:36:18 | Demos | huge means like 15 |
19:36:47 | araq | tuples of length 15 are rarely useful |
19:36:49 | Demos | can you at least do a,b = foo() for just regular variables? |
19:37:11 | araq | you can only do var|let (a, b) = foo() |
19:37:18 | Demos | uggggghhhhhh |
19:38:34 | Demos | I have like a,c = foo(input); a,b = foo(a); c,d = foo(c); and so on |
19:39:05 | Demos | I may just use out params |
19:39:12 | araq | I never have that :P |
19:39:59 | Demos | hehe |
19:42:37 | * | Trustable joined #nimrod |
19:44:08 | dom96 | EXetoC: I haven't changed anything in sockets for a long time IIRC |
19:44:22 | dom96 | EXetoC: google the error |
19:56:46 | EXetoC | dom96: my bad, forgot to connect |
19:57:12 | EXetoC | I suppose it could be more specific than that. will look into it |
19:58:51 | dom96 | EXetoC: I found that reconnection works when the server properly closes the connection. |
19:58:57 | dom96 | It doesn't when the connection times out |
19:59:10 | dom96 | Reproducing that is a bit tough |
19:59:15 | dom96 | Which is why I never bothered :P |
20:00:52 | EXetoC | ok |
20:10:31 | EXetoC | so, have a lag threshold basically? |
20:12:36 | zshazz | I've run into an issue... it says this is ambiguous: https://gist.github.com/Zshazz/1bb1a4385b5a8a00252d ... am I using this wrong? If so, how can I do what I want to do? (I'm intending on putting different algorithms in different files and each would have their own `next` procedure, so merely combining them all into one `next` probably won't be acceptable) |
20:16:04 | dom96 | zshazz: you can't overload on return type |
20:17:58 | zshazz | That's a strange interpretation of that. I would have expected `next[int32]` and `next[int16]` to be effectively two different generated functions, not really an overload. |
20:18:54 | zshazz | but with that knowledge, I think I know what to do. |
20:20:32 | * | askatasuna joined #nimrod |
20:21:32 | dom96 | Functions with the same names but different inputs are overloads. |
20:27:20 | araq | zshazz: arguably it's a bug, but then 'T: int32' is already borderline programming |
20:27:50 | Demos | is there a way to reset a first-class iterator? |
20:28:12 | araq | Demos: generate a new instance |
20:28:16 | dom96 | re-instantiate it. |
20:28:48 | Demos | right, that is obvious now that I think about it |
20:33:41 | * | bjz joined #nimrod |
20:34:52 | dom96 | araq: https://gist.github.com/dom96/0c79dc841df01e97978f |
20:35:41 | araq | dom96: so fix your GCC installation |
20:35:57 | dom96 | araq: What's wrong with it? |
20:36:21 | araq | nimrod and gcc disagree of how many bits an 'int' should have |
20:37:00 | dom96 | hrm, perhaps I shouldn't be using 64bit GCC? |
20:38:14 | dom96 | oh duh |
20:38:16 | * | bjz quit (Ping timeout: 260 seconds) |
20:38:21 | dom96 | build64.bat |
20:38:23 | dom96 | Forgot about that |
20:40:17 | * | shodan45 quit (Ping timeout: 255 seconds) |
20:40:49 | araq | well you could patch build.bat so that it determines what GCC build is used |
20:42:01 | dom96 | Wasn't there a very good reason why we have build.bat and build64.bat? |
20:42:06 | zshazz | Oh okay, so typedesc is almost certainly what I'm looking for to do what I want |
20:43:27 | dom96 | We should add this error to the FAQ though |
20:43:31 | dom96 | or at least the unofficial FAQ |
20:43:45 | araq | I agree |
20:44:47 | * | Demos quit (Quit: leaving) |
20:47:05 | dom96 | Actually, it may also be a good idea to rename build.bat to build32.bat |
20:47:10 | dom96 | That way the user is forced to choose. |
20:47:28 | araq | no |
20:47:52 | dom96 | why? |
20:47:54 | araq | that will likely break somebody's automated build |
20:48:43 | araq | I'm tired of pointless changes that only cause more work than it first looks |
20:49:32 | dom96 | Who does automated Windows builds except us? |
20:50:09 | dom96 | But fine. |
20:50:15 | araq | the guys who know about windows powershell |
20:50:29 | * | Guest7594 is now known as springbok |
20:50:42 | * | springbok quit (Changing host) |
20:50:42 | * | springbok joined #nimrod |
20:51:22 | dom96 | If someone out there exists with a script which they only use once every year. Then ok, it will break for them. |
20:51:29 | dom96 | But the breakage will be extremely easy to fix. |
20:52:14 | * | Jesin joined #nimrod |
20:52:22 | araq | I'm sure some guy said the same about my mint installation ... |
20:53:17 | dom96 | This isn't like changing the behaviour of select :P |
20:53:22 | * | Johz joined #nimrod |
20:54:33 | dom96 | But whatever. I don't care enough to change it now anyway, so I probably won't change it ever. And we're wasting time arguing about this. |
20:54:52 | * | dom96 has a better idea about making Nimrod installation on Windows more user friendly anyway |
20:54:58 | EXetoC | it's their problem then, cus < 1.0 :p |
20:55:28 | * | shodan45 joined #nimrod |
20:55:29 | EXetoC | how? wizards? |
20:56:09 | dom96 | An installer which will do the bootstrapping of the latest git version for you. |
20:57:04 | Varriount | Something wrong with Windows Builds? |
20:57:16 | EXetoC | do you save a keystroke or something? |
20:57:23 | * | Jehan_ quit (Quit: Leaving) |
20:58:34 | * | Mat3 joined #nimrod |
20:58:39 | Mat3 | hello |
20:58:51 | dom96 | EXetoC: You save at least 30 minutes |
20:59:29 | Varriount | dom96: What do you mean? The current installer just requires that you click 'next' |
21:00:04 | dom96 | Varriount: "An installer which will do the bootstrapping of the latest git version for you." |
21:01:03 | EXetoC | just chain the commands |
21:01:13 | EXetoC | in the prompt |
21:02:23 | EXetoC | actually, what is it that takes so long? the cloning? how will you speed that up then? |
21:02:53 | dom96 | installation of gcc |
21:03:00 | dom96 | but meh, maybe it is too specific. |
21:03:20 | EXetoC | right |
21:03:27 | dom96 | If you want latest from git then you likely want to clone yourself |
21:03:35 | EXetoC | will gcc always be the preferred compiler on windows? |
21:03:52 | EXetoC | I don't want any clones of myself |
21:04:18 | EXetoC | ok I would want that. I could write awesome software in no time |
21:04:36 | dom96 | Although setting up Nimrod, babel and Aporia does take a lot of steps |
21:05:30 | * | superfunc joined #nimrod |
21:06:01 | dom96 | Like this for example "could not load: (ssleay32|libssl32).dll" |
21:06:27 | dom96 | really discouraging |
21:07:05 | EXetoC | well the windows way is indeed to bundle with dll's |
21:07:41 | dom96 | What we need is a "Nimrod platform" ala Haskell Platform. |
21:08:38 | araq | what we need is 1 installer that includes all this shit |
21:08:57 | superfunc | that would be nice |
21:09:01 | dom96 | That's exactly what Nimrod platform would be |
21:09:03 | EXetoC | same thing basically, but yeah |
21:10:05 | araq | and we need something comparable for Linux |
21:10:54 | dom96 | On Linux it's easier. |
21:11:03 | dom96 | Because the libraries are usually there |
21:11:09 | dom96 | and are easy to install anyway |
21:11:16 | araq | on linux there are other problems |
21:11:27 | araq | cloning the csources is hardly ideal |
21:11:43 | araq | I could have used nimbuild instead perhaps |
21:12:16 | dom96 | gah. And i'm guessing babel won't work in 64bit mode |
21:12:26 | dom96 | because it tries to load libssl32.dll |
21:12:41 | dom96 | so now I have to redo everything |
21:13:32 | dom96 | At this point I even feel like giving up |
21:13:41 | dom96 | and that is a problem |
21:14:11 | araq | yes. that's what I kept telling you |
21:14:12 | * | Matthias247 joined #nimrod |
21:14:23 | araq | but you want the node.js experience |
21:15:38 | dom96 | What have you kept telling me? |
21:15:56 | dom96 | That I shouldn't build a 64bit compiler? |
21:16:07 | araq | that dependencies suck |
21:16:32 | araq | and that package managers tend to create more problems than they solve :P |
21:17:10 | dom96 | Alright. Lets get started on an SSL implementation in Nimrod then. |
21:18:09 | dom96 | Oh but wait, that'll still be a dependency. |
21:18:16 | * | vendethiel quit (Quit: q+) |
21:18:26 | dom96 | I'm not sure what your magical solution is here. |
21:18:52 | EXetoC | araq: I suppose you aren't using one in mint then |
21:19:47 | araq | dom96: let me put it this way: does the babel package that I want to use depend on libssl32.dll? chances are there that it doesn't |
21:23:58 | * | Mat3 quit (Ping timeout: 276 seconds) |
21:24:38 | dom96 | araq: Reading the package list from github does |
21:24:46 | dom96 | I can get around that now. |
21:25:01 | araq | I know and I'm not really blaming you |
21:25:16 | araq | software development is hard |
21:25:32 | dom96 | But what about dependencies on GTK? |
21:25:37 | araq | and just for the record: I like babel by now |
21:26:38 | * | Johz quit (Ping timeout: 240 seconds) |
21:26:56 | araq | dom96: the installer should package babel and aporia, this way people also get the DLLs for important nimrod libs |
21:27:06 | araq | *the nimrod installer |
21:27:49 | zshazz | typedesc is strange to work with. What's the mental model behind it? When I pass it as a parameter, it looks like a runtime parameter to me, but should it be thought of as something closer to D's template functions where it generates two different functions if you pass in two different typedescs? |
21:28:08 | araq | zshazz: yes |
21:28:41 | Varriount | araq: I'm surprised you let zahary add typedesc parameters, considering that Nimrod has generics. |
21:28:41 | zshazz | Cool, thanks |
21:29:15 | araq | Varriount: maybe but things like high(int) always existed |
21:30:06 | zshazz | Frankly, what I'm doing now doesn't have an obvious/clean solution using generics (I've tried), so I'm glad there's typedesc parameters |
21:30:34 | EXetoC | isn't it merely syntactical? |
21:30:41 | zshazz | myRng.next(int32) looks good to me, anyway |
21:31:34 | Varriount | zshazz: What are you trying to do? Return a randomized value of the given type? |
21:31:42 | EXetoC | and you might've had syntax in mind. it simplifies cases such as that I guess |
21:31:58 | zshazz | Varriount: Yep. |
21:32:26 | EXetoC | anyway, didn't someone suggest that typedesc parameters be used in most cases? |
21:32:53 | araq | EXetoC: not most cases, but whenever you need to explicitly pass a type |
21:33:06 | EXetoC | makes sense |
21:33:30 | EXetoC | it's obvious what's a type anyway, and it's very concise. I do that quite often |
21:35:08 | Varriount | zshazz: Regarding the RNG "interface", what's so bad about using methods? |
21:35:21 | zshazz | They're slow. |
21:35:33 | Varriount | zshazz: And what about function pointers? |
21:35:38 | dom96 | whoo. I found 64bit OpenSSL DLLs. |
21:35:54 | Varriount | dom96: When were they built? |
21:35:56 | dom96 | Varriount: I feel your pain now. |
21:36:08 | EXetoC | does it need to be a runtime thing? |
21:36:08 | dom96 | Varriount: Using 32bit stuff on Win64 just feels /wrong/ |
21:36:20 | Varriount | dom96: Good. It should. |
21:36:38 | dom96 | Varriount: no idea when they were built: http://www.indyproject.org/Sockets/fpc/OpenSSLforWin64.en.aspx |
21:37:02 | araq | dom96: these have the heartbeat bug :P |
21:37:12 | zshazz | The problem with function pointers is that RNGs have a lot of state associated with them and each one has a unique state to keep track of. |
21:37:27 | Varriount | zshazz: So what method are you using? |
21:37:36 | dom96 | araq: look at all the shits I give |
21:37:53 | zshazz | Compile-time polymorphism: https://gist.github.com/Zshazz/7782d1cbefc6160cbb75 |
21:37:57 | dom96 | araq: See that space between Earth and Mars? |
21:38:17 | dom96 | araq: That vacuum is how many shits I give :P |
21:38:48 | zshazz | (note that I'm combining refillRsl between ISAAC and ISAAC+ right now, so hopefully the duplication will be lessened shortly) |
21:38:54 | * | BitPuffin joined #nimrod |
21:38:55 | araq | hmm vacuum = nothing, so you give no shits at all? good. |
21:39:16 | dom96 | araq: yep :P |
21:39:35 | Varriount | zshazz: Glad to see someone else shares my dislike of code duplication. |
21:42:56 | * | hoverbea_ is now known as Hoverbear |
21:44:32 | * | io2 quit (Quit: ...take irc away, what are you? genius, billionaire, playboy, philanthropist) |
21:52:35 | dom96 | hrm, they have gtk3 bins for windows now |
21:53:13 | Varriount | Are they 64 bit? If so, I'd be quite surprised. |
21:53:25 | dom96 | yeah http://www.gtk.org/download/win64.php |
21:57:51 | * | askatasuna quit (Quit: WeeChat 0.4.3) |
22:04:42 | zshazz | How can I check when a typedesc is, for instance, a TInteger? `when T is TInteger` doesn't work (internal error?) and `when T in TInteger` doesn't work (same thing) |
22:05:13 | Varriount | zshazz: Did you try "if T is TInteger"? |
22:06:20 | zshazz | Hold on, I think I might have another issue first, let me work that out |
22:10:13 | dom96 | Argh. No 2.24 GTK for Win64. |
22:13:48 | Varriount | araq: Regarding issue #1090, it seems that all I have to do is remove the internal error. When I do, the non-concrete field is caught by semstmts.checkForMetaFields |
22:13:50 | * | Matthias247 quit (Read error: Connection reset by peer) |
22:16:19 | * | freezerburnv joined #nimrod |
22:23:56 | zshazz | Ok, turns out `when T is TInteger` does work after all. What doesn't work is template definitions nested under `when T is blah` |
22:27:24 | zshazz | The consequence of that is that I have to figure out another way to reduce code duplication (and it'll, unfortunately, probably be more complex to read) :\ |
22:29:41 | EXetoC | can't you just not nest then? |
22:30:12 | zshazz | Sure, that's how I fixed it. But it results in repetitive, ugly code |
22:31:14 | zshazz | see: https://gist.github.com/Zshazz/7782d1cbefc6160cbb75#file-isaac-nim-L120 |
22:32:38 | zshazz | (I want to make ONE rngStep that has a "when" inside that switches the inner two lines depending on the variation, and I'd use opr and opl instead of rotr and rotl and have them be shifts or rotations depending on the variation as well) |
22:35:45 | * | bjz joined #nimrod |
22:36:01 | * | joelmo joined #nimrod |
22:40:32 | * | bjz quit (Ping timeout: 260 seconds) |
22:41:28 | araq | Varriount: hmm ok, what's its size then? |
22:48:28 | * | Trustable quit (Quit: Leaving) |
22:52:04 | * | superfunc quit (Quit: Page closed) |
22:52:24 | * | superfunc joined #nimrod |
22:58:03 | * | darkf joined #nimrod |
23:14:05 | * | superfunc quit (Quit: Page closed) |
23:17:54 | * | Hoverbear quit () |
23:20:22 | * | hoverbear joined #nimrod |
23:25:22 | * | freezerburnv quit (Quit: freezerburnv) |
23:28:13 | * | hoverbear quit () |
23:35:35 | Varriount | araq: -3 |
23:36:22 | Varriount | araq: Any number less than -2 (which is used for the recursive types error) will raise the correct error. |
23:46:52 | * | saml_ joined #nimrod |