<< 09-06-2014 >>

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:39NimBotAraq/Nimrod devel ce29b9f flaviut [+0 ±1 -0]: fix tokenizing bug
05:59:39NimBotAraq/Nimrod devel bebc3f6 flaviut [+0 ±1 -0]: Regenerate docs
05:59:39NimBotAraq/Nimrod devel 41e599a Andreas Rumpf [+0 ±2 -0]: Merge pull request #1257 from flaviut/fix1217... 2 more lines
06:05:02NimBotAraq/Nimrod new_spawn 6d3fbf9 flaviut [+0 ±1 -0]: Allow for nil chaining in JSON
06:05:02NimBotAraq/Nimrod new_spawn 4ff5112 flaviut [+0 ±1 -0]: Add a couple words to docs
06:05:02NimBotAraq/Nimrod new_spawn db7fee6 flaviut [+0 ±1 -0]: Add tests for the nil passthrough
06:05:02NimBotAraq/Nimrod new_spawn 64d3b9a flaviut [+0 ±1 -0]: Fix subtle mistake in docs and formatting
06:05:02NimBot123 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:28dom96hello
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:23dom96hi zshazz
15:29:31zshazzHeya.
15:29:50zshazzI got something interesting to show you (and I've got a few questions)
15:31:04dom96Awesome.
15:31:54EXetoCgotta get the hang of message passing
15:32:13zshazzObviously, 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:18zshazzhttps://gist.github.com/Zshazz/7782d1cbefc6160cbb75
15:32:25EXetoCthe added indirection is annoying, but at the same time it forces you to separate the logic from the other stuff
15:32:57zshazz(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:10EXetoCgreat
15:33:13dom96zshazz: 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:14zshazzWell, 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:07zshazzfor 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:08dom96You should probably create a initRNG function.
15:35:17dom96Which returns a PIsaacRng
15:35:33dom96or perhaps name it initIsaacRng
15:36:09zshazzOK
15:36:33EXetoCit's a reference type so the convention in that case is to use the 'new' prefix
15:37:06dom96oh yeah, what EXetoC said.
15:38:45zshazzOK, that sounds good.
15:41:05zshazzAs 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:00EXetoCI don't think so, but see system.nim for example
15:43:27zshazzAre 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:51zshazzAlso, 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:34dom96zshazz: You can try using the profiler although last time I checked it was broken.
15:59:51dom96Also, you may be able to get better performance using the C backend.
16:03:18zshazzdom96: Where can I find info on the profiler? (I'm using 0.9.4)
16:03:36zshazzand thanks for the tip about the c backend. I'll try running it on that next
16:04:00dom96http://build.nimrod-lang.org/docs/estp.html
16:11:47*DAddYE joined #nimrod
16:12:48zshazzThank 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:30flaviu1zshazz: xorshift is really great
16:23:48flaviu1http://xorshift.di.unimi.it/
16:31:34zshazzI'll add that as well flaviu1. Thanks :)
16:36:35*hoverbea_ joined #nimrod
16:37:12*hoverbear quit (Ping timeout: 260 seconds)
16:46:48Araqflaviu1: fixed your regression yet?
16:47:22Araqhi zshazz welcome
16:47:28flaviu1Yes, you've already merged it
16:47:28flaviu1https://github.com/Araq/Nimrod/pull/1257
16:47:45zshazzThanks Araq
16:48:14flaviu1Oh, build still fails
16:49:05flaviu1Sorry, I didn't test windows
16:50:32*brson joined #nimrod
16:51:40*Araq is now known as araq
16:52:15araqflaviu1: also we got a bug report about it
16:54:14*hoverbea_ is now known as hoverbear
16:55:12flaviu1Feel free to close that, I've commented and that issue is fixed
16:55:41flaviu1No idea why bootstrapping fails on windows though, I'm trying to reproduce it now
16:57:25araqso ... I just re-installed Linux
16:57:51araqwhen I press the backspace key, my pc speaker makes some noise
16:58:08araqit's 2014 and they use my PC speaker!
16:58:31flaviu1Yeah, but that's going to get very annoying though
16:58:38araqit's simple enough to disable ofc, but still
17:01:44araqalso 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:04flaviu1Mint? Use arch, it doesn't include any crap.
17:02:53araqwell I thought I can install that over my existing installation and get things to work without reformating the HD
17:03:04araqturns out I was wrong
17:03:18araqso yeah, could have installed arch instead
17:03:58flaviu1I also have my home on its own partition, so that makes reinstalls easier for me
17:04:58dom96araq: You would probably hate Arch
17:08:21araqwhy?
17:09:30dom96Because you like to get stuff done, not waste days looking through wikis to fix a crashing X server.
17:09:50flaviu1dom96: I dunno, I've had no issues with my X server
17:09:58EXetoCnot that you have to upgrade every 24 hours
17:10:17EXetoCI've had problems with it, but it was easy to fix like in most cases
17:10:17dom96replace X server with any other critical piece of software
17:11:35EXetoCas in full upgrade
17:11:57dom96full upgrade?
17:12:12dom96what do you consider a full upgrade in Arch?
17:12:58EXetoCan upgrade of every installed package that is outdated
17:13:24flaviu1"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:27flaviu1Whoever runs the build server: how did you solve this: http://build.nimrod-lang.org/commits/windows-x86_64/58e583e39be1/logs.txt ?
17:15:04flaviu1NM, it seems that 32 bit gcc can't compile 64 bit programs
17:21:22*Demos joined #nimrod
17:23:07zshazzFrankly, 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:30flaviu1Huh? Reinstalling Arch means just as little as saying "full upgrade" for Arch
17:24:47EXetoCcalling it time-consuming seems like a bit of a stretch
17:24:50EXetoCpossibly initially
17:27:06EXetoCflaviu1: what do you mean?
17:27:23EXetoCit means upgrading all packages that are outdated
17:27:26zshazzflaviu1: 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:37flaviu1Arch doesn't force you to delete your files when installing.
17:28:17zshazzIf 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:05DemosI have found installing arch to be the most painless of any linux distro I have tried...
17:29:12*boydgreenfield joined #nimrod
17:29:43EXetoCDemos: I assume that most people imply setting it up also
17:30:11Demosjust some simple commands, most desktops work pretty much out of the box
17:30:22zshazzMaybe 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:00Demostheir 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:04Demospretty sane
17:31:04zshazzActually 4 years ago I found it easier to get set up and working correctly than Ubuntu at the time.
17:31:33flaviu1I 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:38EXetoCDemos: that was a recent change IIRC
17:33:09EXetoCpacstrap and all that?
17:34:56zshazzWell 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:05Demoshm, 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:09araqDemos: the "quirky less than" of course, spelt <~
17:41:01DemosI think it actually is a real less than operator
17:44:32*Matthias247 quit (Read error: Connection reset by peer)
17:47:53EXetoCdom96: 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:14dom96EXetoC: yeah, in fact reconnect doesn't work IIRC
17:53:48EXetoCok
17:56:09dom96I think it's some socket issue though
17:56:26dom96It's also tough to reproduce
17:59:19*shodan45 joined #nimrod
18:00:50EXetoCgot it
18:07:52flaviu1does gcleak5 do anything?
18:08:21*hoverbear joined #nimrod
18:08:32flaviu1its just sitting there, doing nothing
18:10:29*shodan45 quit (Ping timeout: 264 seconds)
18:11:05*hoverbea_ joined #nimrod
18:11:17Jehan_flaviu1: That's what it should do.
18:12:15flaviu1Hmm, ok. However, I'd like to keep going, I don't really want to babysit the tests all day.
18:12:18Jehan_Unless I'm completely misunderstanding something.
18:12:37Jehan_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:16EXetoClittle more than 50 seconds I think
18:13:31Jehan_There was apparently a bug that caused getGMTime() to leak memory.
18:13:41flaviu1Way longer than 50 seconds
18:13:55Jehan_EXetoC: It sleeps 50,000 times for one second.
18:14:17Jehan_So, something like 14 hours.
18:14:31EXetoCthat's a millisecond sleep
18:14:33EXetoCroughly
18:14:50EXetoCthe test suite didn't take 14 hours last time I checked :>
18:15:00zshazzI'm trying to figure out distinct... it's not supposed to work on ref objects, is it?
18:15:16EXetoCI don't see why not
18:15:36Jehan_Ah, I hadn't realized that sleep takes a ms argument.
18:16:02*shodan45 joined #nimrod
18:16:11EXetoCit's possible that you have to do something like distinctVar.(ref TFoo) to get to the underlying variable
18:16:27EXetoCah, yet another reason why I don't want the prefixes to go
18:18:21flaviu1Anyway, first round finished, time for the second -_-
18:20:02zshazzWell, 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:06EXetoCzshazz: with that said, how does it fail?
18:20:22flaviu1zshazz: How about a typeclass?
18:20:23zshazzI'll make a gist, one sec
18:20:48flaviu1Although typeclasses are buggy
18:20:56EXetoCtypeclass indeed. I doubt you want runtime polymorphism
18:20:59zshazzin reference to "how does it fail": https://gist.github.com/Zshazz/1089919776d439341503
18:21:03EXetoC*user-defined* type classes, yes
18:22:13flaviu1zshazz: type PRNG = generic x\n proc next(self: var x): int64
18:22:27EXetoCPOther is not a reference type
18:23:19EXetoCwell, he can try
18:24:24zshazzTrying it now, let you know how it goes. Thanks for the advice :)
18:24:51*Jesin joined #nimrod
18:25:18EXetoCvanilla type classes: http://build.nimrod-lang.org/docs/manual.html#type-classes
18:25:30dom96Typeclass? Use templates.
18:26:29dom96If most of the code is the same you should be using templates for the common parts.
18:26:36dom96or even procedures if you are able to.
18:27:05flaviu1dom96: The idea is to have that is generic and doesn't depend on the type of the RNG
18:27:52flaviu1IMO using templates for this feels like a horrible hack
18:29:25dom96typeclasses seem like overkill to me.
18:29:37dom96not to mention that they are still largely unstable IMO
18:30:00flaviu1They are pretty unstable, but they are the right way to do things
18:31:09dom96Well 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:11flaviu1Also, overkill doesn't really matter, you should be using the most powerful and appropriate features whenever possible
18:31:53flaviu1I think that just the `proc next(self: var PRNG): int` is all that is different.
18:32:07araqno, you should use the simplest feature that suffices
18:32:27araq"principle of least power" is its name I think
18:32:40araqotherwise you would simply use a macro for everything
18:34:32zshazzType 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:46Demoscan we copy c++'s <random> interface, it is quite good
18:34:52dom96Well I was under the impression that the implementations are shared and templates are therefore required, typeclasses don't cut it.
18:34:55flaviu1Yes, 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:09dom96"overkill" might have been the wrong word to call it.
18:35:38Demosthey 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:43flaviu1zshazz: Oh, you're trying to implement different sizes of RNGs, ex xorshift-64, xorshift-128, ...
18:35:53flaviu1For that, templates are best
18:36:23zshazzflaviu1: 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:47zshazzAlthough I hope that it works out for me (using 0.9.4 right now)
18:37:46flaviu1Most people here are on a git snapshot, but I don't think there have been enough bugfixes to merit switching to git
18:40:42araqdom96: so how do I get babel for linux "properly"?
18:41:03dom96araq: Clone, compile, babel install
18:43:59araqCreating symlink: /home/araq/.babel/pkgs/babel-0.2.0/babel -> /home/araq/.babel/bin/babel
18:44:13araqthat's not in my path
18:44:22dom96add it to your path
18:44:33dom96then you can babel install aporia
18:44:38dom96and aporia will be in your path :P
18:44:50dom96#TheFutureIsNow
18:44:55araqoh ... damn
18:45:04araqI already downloaded Aporia myself
18:47:14dom96araq: Your loyalty is always appreciated :)
18:49:09EXetoCI'm doing multithreading, and 'assert false' isn't being propagated
18:49:54clone1018Where can I find the prebuilt aporia?
18:49:57*flaviu1 quit (Read error: Connection reset by peer)
18:49:57EXetoCraising EAssertionFailed manually works. I'm not sure why
18:50:48dom96clone1018: For Windows?
18:51:02clone1018Yeha
18:51:05clone1018Yeah*
18:51:17*flaviu1 joined #nimrod
18:51:19dom96clone1018: http://nimrod-lang.org/download/aporia.zip
18:51:27clone1018Thank you
18:51:27dom96clone1018: That version is a bit old now though
18:52:24EXetoCI don't know why it's so important not to list EAssertionFailed
18:53:17araqEXetoC: because it sucks to have to do proc () {.raises: [EAssertionFailed].} for a callback
18:53:37araqalso it's not an effect
18:53:55*Jehan_ quit (Read error: Connection reset by peer)
18:54:08araqyou don't write raises: [EInvalidIndex] either
18:54:09*Jehan_ joined #nimrod
18:55:06dom96araq: Is there a pragma for this? like EInvalidIndex {.invisible.} = object of EBase, or is it defined in the compiler?
18:55:13EXetoCok well it doesn't work very well for some reason
18:56:56zshazz`type PBlah1 = ref TBlah` and `type PBlah2 = ref TBlah` are the same type?
18:57:09EXetoC'ass false'. nice and short
18:57:22EXetoCzshazz: yes, they are aliases
19:00:10araqEXetoC: please report it
19:01:20EXetoCjust gotta figure out how to trigger it, but I think it's just a matter of doing it in a separate thread
19:01:26EXetoCand maybe spawn has something to do with it
19:03:49araqdo you use 'spawn'?
19:03:58*kunev quit (Ping timeout: 240 seconds)
19:04:06EXetoCyes
19:04:15flaviu1araq: Build works fine for me on x64 windows, although I did remove the GC tests because they would've taken hours.
19:04:53EXetoChours?
19:04:57EXetoCweird
19:05:06flaviu1Possibly, IDK
19:05:13flaviu1Too long to sit there and wait
19:05:40EXetoCthat 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:53araqEXetoC: well 0.9.6 will require 'import threadpool' for 'spawn' to work
19:06:41EXetoCthat's not a particularly big change, but good to know
19:08:00araqflaviu1: ok, will test it later myself on win
19:08:35flaviu1Anyway, bootstrapping works, so if there's a bug, its in the tester.
19:09:03araqyou recompiled the tester too, right?
19:09:20flaviu1I started up a fresh VM and cloned everything from git
19:10:56def-Consts declared inside a template are not accessible from outside the template. Is that intentional?
19:11:29araqdef-: yes, it's called "hygienic" macro system
19:11:41def-ah, thanks
19:11:44araquse .inject to export them
19:11:53araqor .dirty on the template
19:12:23zshazzFor templating based on type: What's the simplest way to cast to and from unsigned versions of ints?
19:12:44flaviu1zshazz: myint.uint64
19:12:52flaviu1or uint64(myint)
19:13:20flaviu1Either works because of UFCS
19:13:31zshazzwell, 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:04zshazzbasically, 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:30zshazzI'm aware I could just do a bunch of "when" clauses, but that doesn't look nice
19:15:45araqzshazz: you can do them in a template
19:16:11araqyou can also use +% etc. and keep working on ints
19:16:23araqno need for int->uint->int hacks
19:16:52flaviu1I thought +% was for legacy purposes?
19:16:53zshazzIt's for client code. I'm working only on ints internally
19:17:22zshazz(well, int32 or int64 or whatever, depending on whatever the algorithm wants)
19:17:29araqzshazz: then don't bother with unsigned
19:17:45araqflaviu1: no, I like them enough to keep them
19:17:45zshazzBut when the client wants the unsigned version, what do I do?
19:18:07araqtell the client he's a fool
19:19:04flaviu1zshazz: `proc c[T](a: int64): T = a.T` Works for me
19:19:11flaviu1templates don't for some reason...
19:21:08*Jesin quit (Quit: Leaving)
19:21:26zshazzThanks flaviu1, that will probably work okay.
19:26:28Demosif I have an array is there a way to go like arr[1], arr[2] = someProcThatReturnsATuple?
19:26:44flaviu1TBH I'm not a big fan of the % family
19:27:27araqDemos: there is a macro for it somewhere and the next version will support it natively
19:27:28EXetoCdom96: 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:43EXetoCI had upgraded 1-2 weeks before that
19:28:22araqflaviu1: TBH I don't give a fuck about whether you like them or not
19:28:53EXetoCthe diff doesn't mention irc.nim but a couple of socket modules have been modified
19:29:05flaviu1I know, just throwing my opinion out
19:29:08Demosaraq: any idea what that macro is called? It does not seem to be in sequtils
19:29:39araqDemos: it's one of gradha's gists ...
19:31:33EXetoCIt'd be nice to include a description in addition to "fix #xxxx"
19:34:45*ehaliewicz joined #nimrod
19:35:09EXetoCbut it says that sockets.nim was last updated in may.. who knows when I upgraded then
19:35:42Demosscrew it I will just make a huge number of temp variables
19:36:01araqwhere huge means 2
19:36:18Demoshuge means like 15
19:36:47araqtuples of length 15 are rarely useful
19:36:49Demoscan you at least do a,b = foo() for just regular variables?
19:37:11araqyou can only do var|let (a, b) = foo()
19:37:18Demosuggggghhhhhh
19:38:34DemosI have like a,c = foo(input); a,b = foo(a); c,d = foo(c); and so on
19:39:05DemosI may just use out params
19:39:12araqI never have that :P
19:39:59Demoshehe
19:42:37*Trustable joined #nimrod
19:44:08dom96EXetoC: I haven't changed anything in sockets for a long time IIRC
19:44:22dom96EXetoC: google the error
19:56:46EXetoCdom96: my bad, forgot to connect
19:57:12EXetoCI suppose it could be more specific than that. will look into it
19:58:51dom96EXetoC: I found that reconnection works when the server properly closes the connection.
19:58:57dom96It doesn't when the connection times out
19:59:10dom96Reproducing that is a bit tough
19:59:15dom96Which is why I never bothered :P
20:00:52EXetoCok
20:10:31EXetoCso, have a lag threshold basically?
20:12:36zshazzI'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:04dom96zshazz: you can't overload on return type
20:17:58zshazzThat'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:54zshazzbut with that knowledge, I think I know what to do.
20:20:32*askatasuna joined #nimrod
20:21:32dom96Functions with the same names but different inputs are overloads.
20:27:20araqzshazz: arguably it's a bug, but then 'T: int32' is already borderline programming
20:27:50Demosis there a way to reset a first-class iterator?
20:28:12araqDemos: generate a new instance
20:28:16dom96re-instantiate it.
20:28:48Demosright, that is obvious now that I think about it
20:33:41*bjz joined #nimrod
20:34:52dom96araq: https://gist.github.com/dom96/0c79dc841df01e97978f
20:35:41araqdom96: so fix your GCC installation
20:35:57dom96araq: What's wrong with it?
20:36:21araqnimrod and gcc disagree of how many bits an 'int' should have
20:37:00dom96hrm, perhaps I shouldn't be using 64bit GCC?
20:38:14dom96oh duh
20:38:16*bjz quit (Ping timeout: 260 seconds)
20:38:21dom96build64.bat
20:38:23dom96Forgot about that
20:40:17*shodan45 quit (Ping timeout: 255 seconds)
20:40:49araqwell you could patch build.bat so that it determines what GCC build is used
20:42:01dom96Wasn't there a very good reason why we have build.bat and build64.bat?
20:42:06zshazzOh okay, so typedesc is almost certainly what I'm looking for to do what I want
20:43:27dom96We should add this error to the FAQ though
20:43:31dom96or at least the unofficial FAQ
20:43:45araqI agree
20:44:47*Demos quit (Quit: leaving)
20:47:05dom96Actually, it may also be a good idea to rename build.bat to build32.bat
20:47:10dom96That way the user is forced to choose.
20:47:28araqno
20:47:52dom96why?
20:47:54araqthat will likely break somebody's automated build
20:48:43araqI'm tired of pointless changes that only cause more work than it first looks
20:49:32dom96Who does automated Windows builds except us?
20:50:09dom96But fine.
20:50:15araqthe 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:22dom96If someone out there exists with a script which they only use once every year. Then ok, it will break for them.
20:51:29dom96But the breakage will be extremely easy to fix.
20:52:14*Jesin joined #nimrod
20:52:22araqI'm sure some guy said the same about my mint installation ...
20:53:17dom96This isn't like changing the behaviour of select :P
20:53:22*Johz joined #nimrod
20:54:33dom96But 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:58EXetoCit's their problem then, cus < 1.0 :p
20:55:28*shodan45 joined #nimrod
20:55:29EXetoChow? wizards?
20:56:09dom96An installer which will do the bootstrapping of the latest git version for you.
20:57:04VarriountSomething wrong with Windows Builds?
20:57:16EXetoCdo you save a keystroke or something?
20:57:23*Jehan_ quit (Quit: Leaving)
20:58:34*Mat3 joined #nimrod
20:58:39Mat3hello
20:58:51dom96EXetoC: You save at least 30 minutes
20:59:29Varriountdom96: What do you mean? The current installer just requires that you click 'next'
21:00:04dom96Varriount: "An installer which will do the bootstrapping of the latest git version for you."
21:01:03EXetoCjust chain the commands
21:01:13EXetoCin the prompt
21:02:23EXetoCactually, what is it that takes so long? the cloning? how will you speed that up then?
21:02:53dom96installation of gcc
21:03:00dom96but meh, maybe it is too specific.
21:03:20EXetoCright
21:03:27dom96If you want latest from git then you likely want to clone yourself
21:03:35EXetoCwill gcc always be the preferred compiler on windows?
21:03:52EXetoCI don't want any clones of myself
21:04:18EXetoCok I would want that. I could write awesome software in no time
21:04:36dom96Although setting up Nimrod, babel and Aporia does take a lot of steps
21:05:30*superfunc joined #nimrod
21:06:01dom96Like this for example "could not load: (ssleay32|libssl32).dll"
21:06:27dom96really discouraging
21:07:05EXetoCwell the windows way is indeed to bundle with dll's
21:07:41dom96What we need is a "Nimrod platform" ala Haskell Platform.
21:08:38araqwhat we need is 1 installer that includes all this shit
21:08:57superfuncthat would be nice
21:09:01dom96That's exactly what Nimrod platform would be
21:09:03EXetoCsame thing basically, but yeah
21:10:05araqand we need something comparable for Linux
21:10:54dom96On Linux it's easier.
21:11:03dom96Because the libraries are usually there
21:11:09dom96and are easy to install anyway
21:11:16araqon linux there are other problems
21:11:27araqcloning the csources is hardly ideal
21:11:43araqI could have used nimbuild instead perhaps
21:12:16dom96gah. And i'm guessing babel won't work in 64bit mode
21:12:26dom96because it tries to load libssl32.dll
21:12:41dom96so now I have to redo everything
21:13:32dom96At this point I even feel like giving up
21:13:41dom96and that is a problem
21:14:11araqyes. that's what I kept telling you
21:14:12*Matthias247 joined #nimrod
21:14:23araqbut you want the node.js experience
21:15:38dom96What have you kept telling me?
21:15:56dom96That I shouldn't build a 64bit compiler?
21:16:07araqthat dependencies suck
21:16:32araqand that package managers tend to create more problems than they solve :P
21:17:10dom96Alright. Lets get started on an SSL implementation in Nimrod then.
21:18:09dom96Oh but wait, that'll still be a dependency.
21:18:16*vendethiel quit (Quit: q+)
21:18:26dom96I'm not sure what your magical solution is here.
21:18:52EXetoCaraq: I suppose you aren't using one in mint then
21:19:47araqdom96: 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:38dom96araq: Reading the package list from github does
21:24:46dom96I can get around that now.
21:25:01araqI know and I'm not really blaming you
21:25:16araqsoftware development is hard
21:25:32dom96But what about dependencies on GTK?
21:25:37araqand just for the record: I like babel by now
21:26:38*Johz quit (Ping timeout: 240 seconds)
21:26:56araqdom96: the installer should package babel and aporia, this way people also get the DLLs for important nimrod libs
21:27:06araq*the nimrod installer
21:27:49zshazztypedesc 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:08araqzshazz: yes
21:28:41Varriountaraq: I'm surprised you let zahary add typedesc parameters, considering that Nimrod has generics.
21:28:41zshazzCool, thanks
21:29:15araqVarriount: maybe but things like high(int) always existed
21:30:06zshazzFrankly, 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:34EXetoCisn't it merely syntactical?
21:30:41zshazzmyRng.next(int32) looks good to me, anyway
21:31:34Varriountzshazz: What are you trying to do? Return a randomized value of the given type?
21:31:42EXetoCand you might've had syntax in mind. it simplifies cases such as that I guess
21:31:58zshazzVarriount: Yep.
21:32:26EXetoCanyway, didn't someone suggest that typedesc parameters be used in most cases?
21:32:53araqEXetoC: not most cases, but whenever you need to explicitly pass a type
21:33:06EXetoCmakes sense
21:33:30EXetoCit's obvious what's a type anyway, and it's very concise. I do that quite often
21:35:08Varriountzshazz: Regarding the RNG "interface", what's so bad about using methods?
21:35:21zshazzThey're slow.
21:35:33Varriountzshazz: And what about function pointers?
21:35:38dom96whoo. I found 64bit OpenSSL DLLs.
21:35:54Varriountdom96: When were they built?
21:35:56dom96Varriount: I feel your pain now.
21:36:08EXetoCdoes it need to be a runtime thing?
21:36:08dom96Varriount: Using 32bit stuff on Win64 just feels /wrong/
21:36:20Varriountdom96: Good. It should.
21:36:38dom96Varriount: no idea when they were built: http://www.indyproject.org/Sockets/fpc/OpenSSLforWin64.en.aspx
21:37:02araqdom96: these have the heartbeat bug :P
21:37:12zshazzThe 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:27Varriountzshazz: So what method are you using?
21:37:36dom96araq: look at all the shits I give
21:37:53zshazzCompile-time polymorphism: https://gist.github.com/Zshazz/7782d1cbefc6160cbb75
21:37:57dom96araq: See that space between Earth and Mars?
21:38:17dom96araq: That vacuum is how many shits I give :P
21:38:48zshazz(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:55araqhmm vacuum = nothing, so you give no shits at all? good.
21:39:16dom96araq: yep :P
21:39:35Varriountzshazz: 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:35dom96hrm, they have gtk3 bins for windows now
21:53:13VarriountAre they 64 bit? If so, I'd be quite surprised.
21:53:25dom96yeah http://www.gtk.org/download/win64.php
21:57:51*askatasuna quit (Quit: WeeChat 0.4.3)
22:04:42zshazzHow 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:13Varriountzshazz: Did you try "if T is TInteger"?
22:06:20zshazzHold on, I think I might have another issue first, let me work that out
22:10:13dom96Argh. No 2.24 GTK for Win64.
22:13:48Varriountaraq: 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:56zshazzOk, 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:24zshazzThe 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:41EXetoCcan't you just not nest then?
22:30:12zshazzSure, that's how I fixed it. But it results in repetitive, ugly code
22:31:14zshazzsee: https://gist.github.com/Zshazz/7782d1cbefc6160cbb75#file-isaac-nim-L120
22:32:38zshazz(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:28araqVarriount: 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:35Varriountaraq: -3
23:36:22Varriountaraq: Any number less than -2 (which is used for the recursive types error) will raise the correct error.
23:46:52*saml_ joined #nimrod