<< 22-03-2014 >>

00:00:07runvncbuildpack
00:00:30DAddYEbuildpack yes
00:00:55DAddYEat EOD I'm more retarded than usual
00:00:56DAddYE:d
00:19:23*vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
00:21:13*DAddYE quit (Ping timeout: 240 seconds)
00:36:40BitPuffinAraq: I think you'll like the let's play I just started :)
00:37:40*lanior joined #nimrod
00:37:54laniorrunvnc: hi
00:38:02runvncHello
00:38:20laniori did some benchmarks for you
00:39:18laniordo you remember our dispute about 80k RPS per core?
00:40:00*io2 quit ()
00:43:17runvncI think we were arguing about various things and not both arguing about the same thing at the same time
00:43:23runvncI don't really want to fight about it
00:43:43runvncWhat I thought you were saying was that particular benchmark page was all single core measurements
00:43:48runvncwhich I would dispute
00:43:54runvncbut I don't want to argue about it anymore
00:44:28lanioroh thats definitely not true
00:44:28runvncbut if you made a benchmark just for me then certainly please link to it
00:44:46runvncok I don't want to argue about benchmarks in here
00:44:56runvncwe can try the offtopic channel maybe
00:45:11laniorwe can discuss jester perfomance)
00:45:24runvncI have to get something to eat
00:45:27runvncsure
00:45:37runvncI was not able to measure jester properly with the wrk tool
00:45:46runvncwrk didnt like jester's output on my computer
00:47:35laniorLooks like jestil still lacking Keep-Alive support
00:48:37laniorab gives me the same result with and without -k flag
00:50:50runvncyou can see all the code https://github.com/dom96/jester/blob/master/jester.nim starting with that plus like two other files imported
00:51:03runvncdoes a lot for how short it is
00:53:47laniorOn my machine it can produce 48k Hello worlds per second
00:53:54laniorNot bad at all
00:55:31laniorComparing to 45.5k using my toy server without keep-alive support
00:55:41laniorAnd 65.5k if you are using it
00:57:20runvncgreat
00:59:06laniorNode.JS - 12k RPS with keep-alive
01:00:29laniorAnd the same number without it
01:00:57laniorLook like it doesnt support it too or it requires some additional configuration
01:01:17laniorOr V8 speed is bottleneck
01:04:30runvncyes of course v8 is a bottleneck there is a lot of overhead
01:04:44runvncbut node.js servers will do cluster mode on multiple processors out of the box
01:05:21runvncbut the reason I am using Nimrod and not node is because I needed to lose the overhead for a certain server agent that I was building
01:06:06laniorAnd some stunning numbers with G-WAN
01:06:14lanior47k without keep-alive
01:06:19laniorAnd 272k with it
01:07:26laniorBut I am not sure its not cheating
01:07:41laniori have specified 1 worker thread but it still spawns multiple process or threads
01:08:34laniorAnd it give the same numbers without that command line option so we can divide it by 4
01:09:51laniorWhich gives us 68k RPS. Pretty similar to my web server
01:10:29laniorAnd that thing makes me happy because it means coroutines are not a bottleneck
01:12:01runvncgwan looks interesting
01:12:18runvncI wonder if there would be a way to create a nimrod wrapper for gwan or something like that
01:12:27laniorbut many people said its butty
01:12:29laniorbuggy*
01:12:34laniorand its closed-source
01:13:00runvnck nvm
01:13:05lanioryou can get same speed with nimrod why you are interested in gwan?
01:14:46laniorhaving two paths in webserver (sync and async) doesnt seems to be a good idea
01:15:18laniorsource code looks like a mess
01:19:41lanioryou said you are using Nimrod for some real server. Are you using blocking or nonblocking API?
01:27:32runvncI'm using jester
01:27:44runvncI think its blocking
01:27:53runvncbut the performance isn't important for me
01:28:04runvncanyway I am running multiple processes fed by a queue
01:28:16runvncI dont need to serve a lot of traffic just some long requests
01:28:38*brson quit (Ping timeout: 240 seconds)
01:28:44laniorHow many processes do you use?
01:30:27*Demos joined #nimrod
01:30:43*brson joined #nimrod
01:32:07runvnc1 right now still testing some basic things
01:35:01laniorwhy you are using jester if your processes are fed by a message queue?
01:35:31laniorI thought message queue == background work
01:41:58Demosif I have proc foo(func: proc(tup: tuple[a: distinct auto])) is there a way to access the type of a in foo or do I ned to pull it out and write proc foo[T](func: proc(tup: tuple[a: T]))?
01:44:52runvncbecause I need basic stuff in jester.
01:47:21AraqDemos: the latter I'm afraid
01:47:50Araqbtw the type API's design is finished ... now somebody needs to implement it
01:56:15laniorAraq: can you show it?
01:56:57Araqlol no ...
01:57:35NimBotAraq/Nimrod devel fca57e5 Araq [+0 ±1 -0]: c2nim knows about arrray[N, T]
01:57:35NimBotAraq/Nimrod devel 904b18e Araq [+0 ±1 -0]: improved docs about strongSpaces
01:57:35NimBotAraq/Nimrod devel d33854b Araq [+0 ±1 -0]: bugfix: reprEnum for enums with negative values
01:57:35NimBotAraq/Nimrod devel b6368ad Araq [+0 ±1 -0]: added mapMem/unmapMem to memfiles; untested
01:57:35NimBot2 more commits.
01:58:15laniorAraq: there is no paper/wiki page describing planned API?
01:58:40Araqexactly. there are only some notes
01:58:45laniorAraw: I definitely cant implement it but I used Go/D reflection a lot so I can make a comparison.
01:59:16Araqok but the comparison is most meaningless
01:59:28laniorI can spot missing stuff
01:59:35Araqthe type API is type introspection at compile time for the macro system
02:00:00Araq*mostly meaningless
02:00:01laniorD has compile-time instrospection as well
02:00:10Demosso typetraits will have more than two procs :D
02:04:01Araqof the 2 procs 1 has never been implemented in the new vm :P
02:05:29laniorCan we construct PNimrodNode inside a macro and get it type as if it was evaluated in caller scope?
02:06:15Araqno as this is inherently unsound
02:06:38Araqand yes I know I'm the only one here who cares about soundness
02:07:09laniorwhy it is unsound?
02:10:17AraqI take it back, that could work
02:11:37Araqer ...
02:11:51Araqwhy "as evaluated in caller scope"?
02:12:29Araqso the macro constructs seq[int] but you shadowed 'seq' in the caller scope?
02:12:36laniorExample: TArticle.findOne(@slug != ""), findOne is a macro
02:12:52laniorI and I want to get type(TArticle.slug)
02:13:09laniorAnd make some decisions based on it
02:13:32Araqthat's not PNimrodNode *construction* in a macro
02:14:16laniorI'm using immediate macro
02:14:40Araqthat's bad
02:14:42laniorSo passed Expr is not bound to any symbol if I understand it correctly
02:17:42laniorThe only way I found so far is to generate AST containing all ifs
02:17:46laniorLike two-level macro
02:17:47Araqthat will work without immediate soon if it doesn't already
02:18:20laniorBut it will lead to exponential growth of code size
02:18:45Araqah you are that guy
02:18:51Araqdid you report that?
02:19:08laniornot yet
02:19:18laniorThat guy?
02:19:19AraqI've never seen exponentail growth, very interesting ;-)
02:19:38laniorIT's not a bug, its just a side of this approach
02:19:45Araq(with nimrod's macro system)
02:20:10laniorMaybe I am not right
02:21:47laniorNon-immediade macro do semantic checks on its arguments, am i right?
02:22:07Araqyeah but for 'expr' a special rule is planned
02:23:46laniorWell this is not a big problem if my workaround is working
02:23:55Araqsorry need to sleep now
02:23:56Araqgood night
02:24:02laniorbye
02:40:23comexAraq: i think rust is more complicated because statements are expressions, so a 'statement list' might be an if block
02:41:32comexor match
02:42:04comexsometimes you'd want to yield something from one of those, sometimes not, but no actual return statements need apply
02:49:53*grumio2 joined #nimrod
02:52:35laniorcomex: but it is still easier than ruby because it wont let you accidentally add return value to the function
02:52:42comexand yes, i bandwagon
02:53:05comexthere are reasons to like rust, though
02:53:43laniorlike CT checked memory safety
02:53:56laniorbut it has weird syntax
02:54:12comexwell, that without GC, non-nullable by default, immmutable by default
02:54:15comex*mm
02:54:17comexand i like the syntax
02:55:15laniornon-nullable by default is one of the part of it
02:55:26comexwell, i certainly like that
02:55:42laniorone of the best part*
02:56:51comexanyway, i'm pretty annoyed that my new favorite language has the exact same issue with incremental compilation as my old favorite language :p
02:57:17laniorlet me guess. D?
02:58:48comexno, rust and nimrod
02:59:27comexd... i might try it, but i want to stick to one at a time
03:00:38laniornimrod has problems with incremental compilation?
03:01:14comexwell, it did when i was using it
03:04:36comexit parsed all source files for every compile
03:05:08comexrust is.. well, usually used in this way too, and it's really slow
03:07:55grumio2whereas you want it to only parse the source files that changed?
03:08:15laniorD compiler shows that full recompilation can be really fast
03:08:31laniorIt has fastest compiler I saw so far
03:09:51*Skrylar joined #nimrod
03:09:56SkrylarMeep!
03:14:21comexmm.. not that i don't like fast compilation (I do), but incremental compilation really isn't that hard... i'm just a bad programmer
03:14:51comexand other people apparently don't care much about compile time
03:16:23Skrylarevidently the C++ people who make extensive use of scripting languages disagree with that statement, as do people in the games industry who rage when someone changes a base class that causes 30 minute rebuilds
03:17:15Skrylarthat said, what was the topic on incremental compilation?
03:17:29laniorpreprocessor-based import is a problem
03:18:08comexwell, clang is working on modules, which afaik includes saner incremental compilation (no more preprocessor import)
03:18:34comexSkrylar: i'm complaining about rust and possibly nimrod (i'm out of date)'s lack of support for it
03:18:53Skrylarnimrod is supposed to support it
03:19:12Skrylarnimrod --symbolFiles:on
03:19:29*brson quit (Ping timeout: 240 seconds)
03:19:30comexoh well, maybe i should change languages again
03:20:10Skrylar1) nimrod has something like that (currently experimental) 2) most immature languages lack it
03:20:28Skrylardoesn't Go still do whole program compilation?
03:20:49Skrylarand Rust can incremental compile but only at the crate/lib level
03:20:53lanioryeah but it is fast enough to do that
03:21:10comexdunno, but i do not want to use Go for several reasons
03:21:14laniorincremental compilation is a problem if you want to do cross-module optimization
03:21:23Skrylarlanior: symbol files are supposed to fix that
03:21:28comexno, it's not. what he said
03:21:49comexand you want some kind of global cache anyway because you want to avoid duplicating generic instantiation
03:22:09Skrylarthe only language i'm aware of that uses shared generics is Ada
03:22:57comexand yeah, so far my plan is to use crates of like 2 files each, but i have a feeling that's going to make full compile times bad
03:23:09laniorSkrylar: and c++ with exported templates?
03:23:30Skrylarlanior: is that standardized (+ implemented)?
03:23:54laniorc++11: extern template class std::vector<MyClass>;
03:24:12Skrylaroh, the mythical C++ Next :\
03:24:31laniorIts fully implemented by at least one compiler
03:25:07Skrylaralso, comex, the statement about cross module optimization and that rust can compile a module to a lib do not resolve each other
03:25:53comexhuh?
03:26:03comexi am tired, but what do you mean?
03:26:03SkrylarIf you use a dynamic library (and you will, because static libs plump up Rust's compiler time) then it can't optimize across those boundaries very well. Under a static library, the LLVM underneath can do some cross module optimizations
03:26:36comexno, llvm can only do it if you use *lto*, which is drastically slow
03:27:00laniorcomex: anyway you wants language-level LTO
03:27:02comexhowever, it's not much worse than C++
03:27:44comexwhich also can't generally inline across file boundaries
03:28:06*brson joined #nimrod
03:28:20Skrylarnimrod basically compiles it all in together, dead code eliminates everything (somewhat like delphi/fpc smartlink), shares generics, inlines, etc. Symbol files are intended to solve the compile time issues by letting it pre-cache the outputs AFAIK
03:28:24laniorcomex: it can if you keep information from semantic stage until link-time
03:28:46comexaka lto, rust also supports llvm's lto, they are both slow
03:30:35Skrylari wouldn't mind better support for shared libraries, but those are somewhat pathological in practice outside of C
03:31:08SkrylarGCs don't tend to work, so two libs that use a GC tend to not interface with each other and cause over-allocation of RAM
03:32:16comexgood thing rust uses no GC
03:32:34laniorthey moved it into library
03:33:01comexiirc, at the moment the library "Gc" never actually deallocates anything
03:33:03comexmaybe they fixed it by now
03:33:15lanioryou can still you it with std:cell AFAIK
03:33:24comexanyway, it's clearly not going to be used by much code
03:33:53Skrylarwhat? rust used a GC until 0.9
03:34:34comexyes, but from what i've seen they're moving sharply away from it
03:34:52Skrylarthe devel docs still mention managed pointers, though they're nonfunctional
03:35:03Skrylarand yes, they replaced it with an exorbinantly painful set of template soup
03:35:39comexyeah, mutability with Rc/Gc sounds a little too annoying now
03:36:27SkrylarI tried to write a GUI library in Rust. Rc<RefCell<Type>> is ugly, and even after aliasing to actually use it requires ugliness like let temp = x.copy().borrow_mut(); x.blah // i am very very readable i assure you
03:36:45Skrylarapparently the sprockets people were having issues with getting a DOM to work as well
03:37:17comexguess it's still evolving, for better or worse
03:37:37Skrylartheir macros are also sharply inferior :)
03:37:51comexthe way to do a vector drastically changed recently
03:38:11comexthey are procedural now, you knwo
03:38:19Skrylarthey went through with the [blah] -> Vec<Annoyance>?
03:38:20comexbut no type information and stuff
03:38:35comexyep, and currently you can't even do a[0] rather than *a.get(0)
03:38:53comexi think that's getting fixed
03:39:52Skrylari'm happy with nimrod. Rust is silly calling itself 0.9 when they're still making wide-sweeping changes that break everything
03:40:29comexperhaps...
03:40:33Skrylar"0.9" implies "almost done" and "0.10" is like web 2.0 stupidity
03:40:38*Demos_ joined #nimrod
03:40:50Skrylarbut thats not an objective criticism, just me ranting
03:41:04comex0.10 is hardly a new concept...
03:42:04Demos_honestly version numbers are really just for sorting
03:42:26comexlinux 0.11 was released in 1994...
03:42:42Demos_linux 3.11 for workspaces :D
03:43:13comexanyway, can nimrod macros read external files?
03:43:13Demos_comex so rust's GC is currently taking the PHO route
03:43:15comexi think rust ones can :P
03:43:20comexPHO?
03:43:26Demos_*PHP
03:43:39Demos_and comex staticRead and staticExec should do the trick
03:43:47Skrylarcomex: staticExec
03:43:53Demos_also known as slurp and gorge
03:44:07SkrylarNot that I really appreciate compilers that have behavior outside of themselves :/
03:44:18Skrylarespecially without an explicit --yes-do-potentially-bad-things flag
03:44:35comexafaik rust macros have the arguably saner property of basically being rust loaded into the compiler rather than some weird hybrid with the program code
03:44:46comexbut i haven't actually tried them, just heard about them
03:44:56Skrylarrust macros are a crippled subset of rust
03:45:06Skrylarnimrod macros have direct AST access
03:45:25Skrylarthey're more like what we'd call a template
03:45:30Demos_Skrylar, well sure. But if you don't let the compiler do nasty stuff you just end up using something like autotools
03:45:39comexno, those are the old macros
03:45:43comexthe new ones are rust code
03:45:48SkrylarDemos_: keyphrase, "without --do-bad-things" flag
03:46:19*Demos quit (Ping timeout: 245 seconds)
03:46:27comexhttps://github.com/mozilla/rust/issues/12178
03:46:30comexexample
03:46:30Demos_eagh, I really don't care. Like the compiler is already totally dependent on the system
03:47:07SkrylarDemos_: it became important earlier when they were talking about automatically compiling babel packages and it came up that to do so safely requires hypervising
03:47:20Demos_oh. Good point
03:47:35comexbuilding c has long involved executing arbitrary commands written in a makefile
03:47:44Demos_I would go for the approach of just having the default be the user interactively signing off on the bad thigns
03:48:01Demos_like what makepkg does
03:48:04laniorSkrylar: it requires it anyway because of potential security bugs in compiler
03:48:05Skrylari suggested Vagrant because you can set up a script to spawn a new linux box, apply the security restrictions on the box, and then go
03:48:08laniorlike stack overflow and so
03:48:20lanioryou can use linux containers
03:48:22Demos_Skrylar vargant is so overkill
03:48:56laniortry docker.io
03:49:01laniorits dead simple to use
03:49:23Demos_it is also not the write tool for installing packages
03:49:30Demos_*right
03:49:36comexplus, use cases for cloud compiling frequently involve running the compiled code, especially "try" sites
03:49:44comexso you need a sandbox anyway
03:49:51Demos_oh we are talking about cloud compileing,, never mind then
03:49:52laniorbut it wont cover compilation for windows
03:49:55SkrylarDemos_: i hadn't heard of the other :)
03:50:06lanioranyway you need virtualization
03:50:19comexplus, not being able to run, say, python scripts to generate code is dumb. so no, compiling should not be a safe activity
03:50:27Skrylaroh they're not for cloud computing, its because they were talking about being able to see if compiler updates broke mass amounts of public code
03:50:37Demos_comex well you should generate code with macros
03:51:09Demos_also, some kind of binary libraries could be neat, but also probably insanely hard
03:51:10laniorhow fast is compile time execution comparing to native code?
03:51:22laniorit was a problem for me in D lang
03:51:23Demos_I have heard "faster than python"
03:51:41comexi wonder if rust JITs it
03:51:55laniorwe can probably make luajit target
03:52:06comexyesterday i was working on some (admittedly silly) preprocessing which is too slow for python
03:52:06Demos_we could, but it will not happen
03:52:17laniorwhy?
03:52:26Demos_because it is a ton of work for no benifit
03:52:27comexi ended up using node.js, because rust's text handling currently sucks
03:52:36Skrylar... hrm
03:52:40comexwhich is a major problem...
03:52:42Demos_in most cases if you can use luajit you can just compile to C
03:52:53SkrylarMaybe not, Demos_. We don't have gotos
03:53:06comexin particular, no regular expression support in the standard library, lolwtf
03:53:10laniornope
03:53:12SkrylarCompiling to lua isn't really harder than to JS
03:53:22Demos_yeah I know. But why bother?
03:53:23laniorI thought about using nimrod as a scripting language
03:53:23Skrylarthe question is what do we get out of it, aside from using it for CTFE
03:53:34SkrylarDemos_: interactive development
03:53:50Skrylaremit nimrod to lua, change luajit code insitu, carry on
03:53:52Demos_why not just use vm2 and the REPL
03:54:02laniorvm2 has jit compiler?
03:54:06Skrylarbecause luajit is extremely high performance and written by a genius?
03:54:15laniorSkrylar: exactly
03:54:18Skrylarwell, a jit genius
03:54:25comexthough, with rust i know there is a lot of active development and this will probably get resolved soon, and the thing i really want (parser library) may or may not exist or be easy to install, but Cargo is coming to make package management work
03:54:40Skrylarnot to poop on Araq, it's just that vm2 was checked in recently and luajit is in industrial use
03:54:41comexso i have high hopes, basically
03:55:09Skrylarbut Demos_ asked for a use case, and i provided one :)
03:55:39Demos_I just don't like what I have seen of rust. There is a lot of syntax noise, I don't like the object model, and I am not convinced linear types are all that great
03:55:54fowlSkrylar, araq was going to use luajit then decided to write a new vm
03:56:26comex(i think package management is incredibly important, just look at the crap people do in C++)
03:56:32Skrylaroh, i saw the epitome of horror earlier
03:56:38Skrylarreading the maptool wiki
03:56:45Demos_comex babel is pretty good, a bit rough but OK
03:57:13comexDemos_: i like linear types, in C++ too
03:57:20comexalthough the implementation in C++ is incredibly stupid
03:57:25Demos_unique_ptr?
03:57:27laniorbut does it support installing modules from archives?
03:57:29Skrylartell me when you get scared: 1) It runs on Java. 2) They use a custom macro language which was bolted on over time. 3) They use java's half-baked HTML renderer for styled displays. 4) Old Java HTML renderer scripted with custom macro language with a massive amount of weird restrictions
03:57:51laniordistributing packages through Git is not a fun thing if you have big repos
03:58:10SkrylarOh and 5) Lists are strings that get strtok'd every time you parse it, TCL7-style
03:58:15*Skrylar shudders
03:58:17Demos_lanior this is true. babel does support installing from a directory, so installing from a zip should not be hard to support
03:58:33comexyes, sometimes it's useful to move away from part of an existing object or something, so it's good for move constructors to leave the old object in a good state. that is *not* an excuse for there being no way at all to check if you accidentally used a local variable after moving it
04:00:26laniorDemos_: and is would be good to use better compression algo than deflate
04:00:30laniorlike LZMA or so
04:00:43Demos_anyway my problem with linear types is that they are only good when the ownership model is very simple. In those cases manual management is usually not /that/ hard, and as soon as you get more complex you really want a gc or shared_ptrs
04:00:58Demos_yeah, we could use whatever
04:01:28comexi think that shared_ptr/gc is almost never actually needed
04:01:36laniorany plans for building public web package list like pypi?
04:01:52Demos_comex, sure. You /can/ do trees with unique_ptrs, but it is really annoying
04:02:06Skrylardefine better, lanior
04:02:14Demos_lanior we will have one shortly I think, there is a pull request to add it to the library docs
04:02:15SkrylarDeflate is cheap, LZMA is not
04:02:38laniorcomex: GC is a must if are using immutable data structures like ropes
04:02:52SkrylarWhen considering a compression algorithm, you have to consider the RAM/CPU and final disk size. For example LZMA produces smaller files, but RAR is more *efficient* for the size it produces
04:02:56Demos_also nimrod's GC can sometimes be advantageous if you don't actually want stuff to be immediately destructed
04:03:25comexlanior: i said almost never, not never :P
04:03:40laniorSkrylar: but you cant produce RAR files without proprietary archiver
04:03:47Skrylarlanior: its just an example
04:03:57SkrylarIIRC deflate is also efficient if you trade off time/size
04:04:15laniorbut we should only consider decompression time
04:04:52Skrylarwell if you're prioritizing the content host, you want the smallest. in that case LZMA is probably the best free option
04:05:03Demos_nobody cares for libraries. We really just want compatible files, maybe with the ability to navigate the archive without decompressing
04:05:18comexjust use zip like everyone else
04:05:37laniorim prioritizing for installation speed
04:05:39Skrylarzip uses deflate, which is what lanior was complaining about
04:05:58comex(jar, docx, odt, python eggs, chrome extensions, god knows how many other things)
04:06:01Demos_again, nobody cares. libraries are rarely al that big
04:06:15Demos_and zlib is everywhere and easy to deal with
04:06:38Skrylari wonder how complex the SDK for that is
04:06:41SkrylarLZMA
04:07:11comexit's not. i've used xz utils, it has a zlib-like api
04:07:20comexand then you just do .tar.xz like unix
04:07:25laniorI guess you are right
04:07:31Skrylaryeah, i was going to say that 'tar' is a very easy format to parse
04:07:32Demos_copying pacman is usually a good idea
04:07:42Skrylarzip is actually easy to parse, but tar is even easier
04:08:10laniorany plans for shipping precompiled libraries?
04:08:12Skrylarand i have seen the difference between tar.xz and tar.bz to be significant (50kb or more, depending on lib size)
04:08:30Skrylarwhich is not important on its own; it becomes important when you figure most people's internet use is now metered
04:09:00comexi'd contest 'most'
04:09:23Skrylarmost of the euros i know talk about their hardcaps, and AT&T has softcaps they bill extra for
04:09:29Skrylaranyway
04:09:37Skrylarmaybe i'll look at the xz source code later
04:10:19comexonly if you download over mobile networks, and even then, a few hundred kb is nothing to the youtube videos people usually watch on those things :p
04:11:13Skrylari want to say the 7z format is wonky to parse, but i don't have any experience with it
04:11:27comexme neither
04:11:39*Demos joined #nimrod
04:12:00Skrylari think most of the people who use renamed .zips do so because zlib ports are ubiquitous and you can get zip file editors off the shelf
04:12:13Skrylarkind of like how HTML is kinda terrible for a lot of uses but people still use it
04:12:25Skrylarbecause of ubiquity
04:12:48Demosbut zip is not painful
04:12:55lanioreven Windows XP has built-in support for zip
04:12:59Demoslike it is just a bit bigger, no need for fancy compression
04:13:09Skrylarlanior: ... technically it does
04:13:14SkrylarI'm not sure how they managed to screw it up so bad
04:13:36laniorwell it always works for me
04:13:40SkrylarI have not seen a worse deflate routine than XP and 7's decompressor
04:13:55SkrylarIt does the job, yes, its just inexplicably slow at it
04:14:15laniorbut i used it only for decompression
04:14:22Demoslanior: and this is why we do not need a fancy compression algo
04:15:34laniorsounds reasonably
04:15:56Skrylarwell its not realy a big deal
04:16:03Skrylarworst comes to worse .. support both?
04:16:34Skrylaras long as you implement it through a clean interface its no big deal
04:20:00laniorhttps://github.com/Araq/Nimrod/pull/998 - this PR seems to cover only package list
04:20:30lanioris would be nice to have something like `babel publish` which will publish new version of the package to the list
04:20:36Demosyeah
04:21:25laniorIs it scheduled? Any plans or discussion on that question?
04:26:31Demosthere are some plans, but right now you need to make a pr. You should fork babel and start hacking! It sounds like you have some good ideas
04:27:14*Demos_ quit (Quit: Textual IRC Client: www.textualapp.com)
04:29:08laniorwell I am still a nimrod newbie so it would take to study language and babel codebase
04:30:43Demosbabel is as good a place to start as any
04:31:29laniorright now I am trying to build ORM for Nimrod
04:31:54laniorbecause I primarily interested in Nimrod as a replacement for python/django
04:33:36SkrylarHmm, that might be easy to do at the low level
04:33:46SkrylarI should probably bug araq about annotation support
04:33:56laniornope
04:34:05laniori will do it django-way
04:34:26Skrylari like annotation support because there are certain times it works well with macros
04:34:44laniortype system can't express all required constraints
04:35:00*brson quit (Quit: leaving)
04:35:05Skrylari'd have to disagree with that, unless you have crazy restraints
04:35:06laniorcustom setters/getters seems to be a better idea for me
04:35:16laniormax string length is pretty common
04:35:18*brson joined #nimrod
04:35:30Skrylarit can do a considerable amount of it, though a bigger problem is the TAny interface can't identify a specific type as i understand it
04:35:42Skrylarit knows what an Object is, but it doesn't know that the object is actually X type
04:36:07Skrylarof course I could be completely wrong and the any interface has some secret voodoo with generics to allow exactly that
04:36:14laniorI want all checks to happen at compile-time
04:36:32Demosmax string length can be done using the type system I think
04:36:47Skrylarcustom setters would be the most robust, yeah
04:37:04Demosbut I know nothing about ORM so you should ignore me
04:37:12Skrylaryou could probably write a macro so you had an easy way of invoking common constraints
04:37:39laniorbut you definetily can't run regexp check
04:37:53Skrylar... actually...
04:38:01Skrylardistinct type + macro implementation of assignment
04:38:05SkrylarCTFE regexp
04:38:05laniorusing type system?
04:38:19Skrylarbut that only applies to regexping literals
04:38:36laniorwell regexp check is about runtime values
04:39:07SkrylarAFAIK you can use proc, template or macro to implement any function; and since nimrod operators are just funny named functions, you could implement the compile-time check that way
04:39:08laniormaking nice looking DSL for queries seems to be the hardest part
04:39:22lanioryeah I know
04:39:35Skrylarall though the downside is creating types that are only meant to be used in a single struct, unless the constraints common occurances its silliness
04:39:51laniorI can just use private fields
04:39:55*brson_ joined #nimrod
04:40:25laniorhttps://docs.djangoproject.com/en/dev/topics/db/models/#fields
04:40:28Skrylarnow you have me curious
04:40:32laniorthat is my aim
04:42:38*brson quit (Ping timeout: 240 seconds)
04:43:05lanioris there any support for inline testing?
04:43:21Skrylartwo options; unit test module and doAssert
04:43:35Skrylarlet me grab one of my github files that has it as an example
04:44:08Demospeople often use "when isMainModule" to write some tests, doAssert is probably a better option atm, unittest has some issues
04:44:18Skrylarhttps://github.com/Skrylar/Skylight/blob/master/skylight/maxrectpack.nim uses unittest, though that module has some ankle biting problems
04:44:25Skrylarit does give you the neat color coded list of passed tests though
04:44:48laniorhow does when isMainModule thing work?
04:45:17Skrylarnimrod c myfile.nim # myfile is the main module
04:45:20laniori thought its a compile-time if statement
04:45:26Demosit is
04:45:26Skrylaryes
04:45:28laniorcan I use it to test all modules?
04:45:31laniorat once
04:45:38Demosbut isMainModule is true when you pass that file to the compiler
04:45:41Skrylaryou can choose when isDefined("unittest") instead
04:46:06Skrylarthen when you do a -d:unittest build it should include them
04:46:15Skrylari use 'when isMainModule' because i unit test modules by compiling them directly
04:48:05*brson_ is now known as brson
04:48:14laniorso there is no standardized test runner?
04:55:42runvncwhen isMainModule is the standard
04:56:05Demoswell there is the unittest module, and if you code your tests seperately from your implementation files than you can run them as you would any other programs. when isMainModule is more for quick sanity checks, not large test suites
04:56:39Demosthat said it may be possible to like descend through the directory tree and run all the tests
04:56:44laniorbut I cannot test private stuff with external test suit right?
04:57:11lanioryes, that is what I was asking about
04:57:14Demosactually if you include the file instead of importing it then....
04:57:41laniormagic command like `tester run_all_tests`
04:58:15*Endy joined #nimrod
04:58:26Demossomething like that would be good, but it would require looking at all the source files
04:58:48Demosactually... can macros import modules?
05:01:01lanioris there any good tutorial for nimrod?
05:01:24Demosnot really. There is the tutorial on the site to get you started
05:01:36laniorits more like feature showcase
05:01:41Demoshehe
05:02:01laniornow i will complaint about documentation
05:02:21Demosmost of the features come from someplace else, like generics are very similar to C++/D templates, macros are lispish, and so on
05:02:31laniorits... not really terrible, but not as good as it should be
05:02:48laniordocumentation for system module is almost useless
05:03:04*grumio2 quit (Quit: Lost terminal)
05:03:13DemosI use the index a lot. Do keep in mind that we have a grand total of zero full time devs.
05:03:28Demosalso keep in mind we love documentation related pull requests
05:03:43laniorits nearly impossible to stop interesting stuff (like staticRead) in that HUGE list
05:04:19laniorit mixes stuff I dont care about (like tons of overloads for standard operators) with cool magic functions like compile
05:05:03laniornext thing, standard library looks like a collections of random modules
05:05:13laniormost of them should be a separate package
05:05:37laniorlike DB-related stuff
05:06:04lanioryes it works, yes its easy to use, but it covers only simple stuff
05:06:28laniorsuch modules tends to evolves faster than language
05:07:01laniorI think its better to keep them separately
05:07:10Demoslanior: look at the development docs
05:07:12Demosnot the release docs
05:07:20Demosa lot of packages were moved into babel recently
05:07:35laniorcan you give me a link please?
05:08:29laniorfound it
05:08:42Demoshttp://build.nimrod-lang.org/docs/overview.html
05:08:48laniorit would be better to have direct link on the website
05:09:19Demosthis is true
05:09:53Demosremind me never to pay $10 for a flash drive ever again
05:11:37*Raynes joined #nimrod
05:29:22*DAddYE joined #nimrod
05:29:35*Endy quit (Ping timeout: 252 seconds)
05:38:52Demosif I have like subdir/module.nim and subdir/module2.nim is there any way to write like import module2 in module. So I can lift the files out to another project?
05:41:36fowlDemos, that works, try it
05:42:46Demosreally I had problems a bit ago
05:46:19*brson quit (Ping timeout: 245 seconds)
05:52:04Demosseems to work... hrm
05:52:26Demosmaybe before I was having problems with scope in my macros
05:53:00*brson joined #nimrod
06:02:38laniorhow can i produce compile-time error outside of macro?
06:05:08laniorhttps://gist.github.com/anonymous/e67b6ae4c65396445bbe - this fails with `Error: cannot generate code for 'error'`
06:05:18*OrionPK quit (Read error: Operation timed out)
06:05:29*Demos quit (Ping timeout: 245 seconds)
06:09:43fowllanior, error pragma
06:10:09fowllanior, or static: error("blah")
06:11:11laniorthanks
06:40:58*DAddYE quit (Remote host closed the connection)
06:41:25*DAddYE joined #nimrod
06:46:03*DAddYE quit (Ping timeout: 252 seconds)
06:50:58*DAddYE joined #nimrod
07:10:21NimBotnimrod-code/packages master 619ae29 Billingsly Wetherfordshire [+0 ±1 -0]: Update packages.json
07:34:29SkrylarI find it incredibly suspicious that 5.16 "rounds" to 516
07:49:02*DAddYE quit (Remote host closed the connection)
07:49:28*DAddYE joined #nimrod
07:54:12*DAddYE quit (Ping timeout: 265 seconds)
08:10:17SkrylarI wonder why new(x, finalizer) requires an existing X when the finalizer applies to the type oO
08:10:53Skrylaroh. it just has a screwball return type
08:33:09Skrylarfowl: i'm a bit concerned as i've noticed destructors are not run after a finalizer
08:34:33Skrylarif you make a destructor, it does run if the item is made on the stack. if made via new, it will not. if made with a finalizer, it will not run at the end of a program unless you put in a spare GCFullCollect
08:35:33SkrylarWhich is a minor concern to me because backrefs involve making a weak cyclic reference :/ I'm guessing that if an object has been marked for collection but the finalizer is not yet run, then the memory is still "valid" in a sense the program won't necessarily crash if you call a method on it
08:35:38Skrylarthough it might do a lot of stupidity
08:43:27*Kooda joined #nimrod
08:47:30*brson quit (Quit: leaving)
08:49:59*DAddYE joined #nimrod
08:54:37*DAddYE quit (Ping timeout: 265 seconds)
09:19:17*q66 joined #nimrod
09:19:27*q66 quit (Changing host)
09:19:27*q66 joined #nimrod
09:24:22Araqoh not the new(x, finalizer) again
09:24:41SkrylarAraq: not it causing bugs or not people complaining about it?
09:24:45AraqSkrylar: yes, sometimes I provide features that are very useful before they reach perfection, spare me
09:25:16SkrylarAraq: Its okay. I made a test case and a bug report about it. :P
09:25:35Araqas if we don't have a bug report about that already
09:25:51Skrylarat least its productive whining :B
09:26:19Araqcomex: the 'stmt list' principle easily extends to 'if' and 'match'
09:26:39Araqyou just have to push the "void context information" up the AST
09:27:00Araqfor nimrod it's more complex thanks to 'result'
09:27:41Araqthere are also other solutions like '{' triggers a void context, '=' triggers a real expression
09:27:53Araqfn foo()-> int = 3
09:28:02Araqfn foo()-> int { ret 3 }
09:28:14Araqno need for semicolons here
09:28:59Araqit's a trivial language design problem when you made your homework ...
09:31:54AraqSkrylar: you must not invoke GCUnref when you never did GCRef
09:32:23SkrylarAraq: i also did a version with no unrefs, the finalizer doesn't run at all
09:32:31Araqso?
09:32:44Skrylarkinda want the finalizers to run :\
09:33:17AraqGCFullCollect() might not work because 'x' and 'y' are still on the stack as bit patterns somehow
09:33:30Araqthe stack is marked conservatively
09:33:58AraqI guess we really need GCFreeEverything
09:35:00Skrylarwhat i was trying to test is that if an object has a signal mapped to a slot, it would get a back reference to the signal so that when it was finalized it would drop the connection
09:35:16Araqput 'main' in a loop and see what happens
09:35:35Araqthe Gc might still have bugs when it comes to cycles
09:36:18AraqSkrylar: for weak references see the forum how to do them
09:36:34Skrylaris there a search button on that forum yet :)
09:36:51Araqno
09:40:02Skrylarokay, put main in a 1..100 loop and gnuplot'd it
09:40:23Skrylarweirdly it just starts collecting cycles until it hits four, then the rest of the test it obeys
09:40:35Skrylaralways leaves one cycle present
09:40:56Araqas I said weird stack location
09:41:03Araqkeeps 1 thing alive
09:42:44Skrylari'll amend my notes for it
09:42:49Araqbtw what do you do in the finalizer that needs to be done at program shutdown?
09:43:02Skrylarit doesn't, i was just testing to make sure they ran as expected
09:43:15Skrylarin that particular case the finalizer just removes itself from a list of listeners
09:43:37Araqthat's nasty
09:43:51Araqlists of listeners suck too
09:44:00Araqbackrefs suck
09:44:13Araqconvoluted control flow sucks
09:44:30Araqjust say no and use an event queue :P
09:44:33Skrylarthe Qt-way does it in an object's destructor, and usually the destructor for a qobject is handled by its parent so it tends to never be seen
09:45:14SkrylarI'm not hugely thrilled by event queues for a few reasons; one of which *might* be solvable with some CTFE magic
09:45:51Araqthe callbacky style is essentially not provable correct
09:46:03Araq*cannot be proved to be correct
09:47:24Skrylarwhat i was considering on the event pump branch of research was using a compile-time incrementer to guarantee each event ever defined to have a unique ID, so there is never a "use BLAH_LAST+14" situation
09:48:06SkrylarI know that wxWidgets has a fairly nice way of defining the event map, at least as far as being able to just tell it "on this do that"
09:48:21Araqbtw how does delphi do it?
09:48:34Skrylarlist of listeners, no backref cleanup
09:48:55Skrylarthe backrefs are optional, Qt just sneaks them in so that a signal can never crash the program
09:49:05SkrylarDelphi "events" are basically the same idea but without safety
09:49:18Araqbtw don't take me seriously
09:49:26AraqI'm not telling you what to do
09:49:45SkrylarQt also tends to treat slots as plain function calls, with a special QEvent::sender() if you really want the parent, while Delphi tends to treat events as "this callback must be like this"
09:50:35Araq(it is however true that when you need to *verify* software many things you learned simply do not work)
09:50:41Skrylarwhat interests me with the Qt approach is that there are times you can just wire a button press directly in to another control's specific triggers, so there is no "callback just to run this function" situation
09:52:54SkrylarWhat I was considering was adding a branch so that the first slot goes to a callback pointer and the seq is left uninitialized until its needed, and since signals can be put on the stack it means that until the list is needed it doesn't get alloc'd.
09:53:02SkrylarAs for event queues, I have a few ideas worth testing
09:53:19SkrylarIt ought to be possible to bury the more disgusting parts with some small macros
09:53:34Araqyeah
09:53:41AraqI need to go, bbl
09:53:43Skrylarbe safe
10:09:14*q66 quit (Quit: Leaving)
10:23:51*q66 joined #nimrod
10:42:53*silven quit (Ping timeout: 246 seconds)
10:48:20*io2 joined #nimrod
11:00:01NimBotAraq/Nimrod devel 448cf0e Araq [+0 ±4 -0]: fixes #1010
11:37:18dom96'morning
11:46:18*Trimsty joined #nimrod
11:57:40Araqhi dom96
11:57:58Araqif you don't mind, special case reIgnored "still ignored"
11:58:37Araqbut it's super low priority
12:01:13dom96good because I would rather work on async instead.
12:04:50Araqissue #1023 is great fun
12:04:58Araqthe vm's register allocated screws up
12:05:04Araq*allocator
12:10:10*runvnc quit (Quit: Leaving)
12:59:36*silven joined #nimrod
13:01:20BitPuffinAraq: Currently uploading but in about 340 minutes you'll be able to watch this http://youtu.be/HvC61WMRGQ4
13:04:30*psquid quit (Quit: work)
13:18:11*Endy joined #nimrod
13:24:49*noam quit (Ping timeout: 240 seconds)
13:39:11*[1]Endy joined #nimrod
13:41:19*Endy quit (Ping timeout: 245 seconds)
13:41:19*[1]Endy is now known as Endy
13:50:30*psquid joined #nimrod
13:55:21*noam joined #nimrod
14:00:17*[1]Endy joined #nimrod
14:01:17*eximius quit (*.net *.split)
14:01:20*comex quit (*.net *.split)
14:01:23*tumak_ quit (*.net *.split)
14:01:24*bstrie quit (*.net *.split)
14:01:26*musicalchair quit (*.net *.split)
14:01:43*tumak joined #nimrod
14:01:55*comex joined #nimrod
14:01:56*bstrie joined #nimrod
14:02:00*musicalchair joined #nimrod
14:03:31*Endy quit (Ping timeout: 245 seconds)
14:03:31*[1]Endy is now known as Endy
14:06:28*eximius joined #nimrod
14:06:46dom96hi eximius
14:09:55*darkf quit (Quit: Leaving)
14:16:26*BitPuffin quit (Excess Flood)
14:16:42*BitPuffin joined #nimrod
14:18:29*Skrylar quit (Ping timeout: 270 seconds)
14:19:07*Skrylar joined #nimrod
14:31:53*lanior quit (Ping timeout: 245 seconds)
15:06:16*askatasuna joined #nimrod
15:08:33*Demos joined #nimrod
15:23:46*zahary joined #nimrod
15:26:15*awestroke joined #nimrod
15:41:08*q66 quit (Ping timeout: 252 seconds)
15:49:17*q66 joined #nimrod
15:49:29*q66 quit (Changing host)
15:49:29*q66 joined #nimrod
16:19:21*Demos_ joined #nimrod
16:19:42*Demos_ quit (Client Quit)
16:19:57*Demos_ joined #nimrod
16:33:45fowlSkrylar, please write a gc test for slotted objects https://github.com/fowlmouth/signals.nim/blob/master/examples/ex1.nim
17:01:51*askatasuna quit (Ping timeout: 245 seconds)
17:04:11*q66 quit (Ping timeout: 252 seconds)
17:06:32*q66 joined #nimrod
17:24:18*Demos_ quit (Read error: Connection reset by peer)
17:28:40comexAraq: i don't see how it extends to "if" and "match" if it depends on "return", but if blocks which are not used as expressions don't use return
17:29:09comexi guess it doesn't matter since you can tell locally that the result isn't being used
17:29:31comexbut... if you don't have a special case for it, you would have a type error if the branches didn't match up, no good
17:30:49*Demos quit (Ping timeout: 240 seconds)
17:34:42*seagoj joined #nimrod
17:43:53*flaviu joined #nimrod
18:14:44*seagoj quit (Ping timeout: 246 seconds)
18:20:19*Demos joined #nimrod
18:29:33*Demos quit (Remote host closed the connection)
18:50:18*Endy quit (Ping timeout: 240 seconds)
18:51:27Araqcomex: you propagate the types of the branches and perform a merge; the "merge type" is then the type of the if expression
18:51:46Araqso void|int becomes void
18:52:08Araqof course it's less confusing when you demand explicit 'discard' statements ;-)
18:55:00EXetoCBitPuffin: Is your video supposed to be private?
18:56:20fowlwhich is better
18:56:23fowlMIT or BSD license
18:56:34AraqMIT because there is only 1 version
18:56:39AraqBSD has 2 or more
18:56:58NimBotnimrod-code/packages master e944150 Grzegorz Adam Hankiewicz [+0 ±1 -0]: Adds number_files command.
18:56:58NimBotnimrod-code/packages master 06d395c Billingsly Wetherfordshire [+0 ±1 -0]: Merge pull request #51 from gradha/pr_adds_number_files_command... 2 more lines
19:07:35dom96Araq: I've been wondering whether it's a good idea to put the large TSocket object (which is currently in sockets.nim) into the sockets2 module (which is meant to contain low-level sockets operations)
19:08:03dom96If I do that then the net module can truly only contain high-level procs.
19:08:46Araqhmm not sure but don't touch the old sockets module
19:08:47dom96But the fact that some procs in sockets2 will work on the TSocket and some on the TSocketHandle may be weird.
19:08:57Araqyeah
19:09:10Araqsockets2 should only be about the socket handles
19:09:45dom96ok
19:10:09Araqdo we have a better name for that btw?
19:10:17Araqrawsockets perhaps?
19:10:27Araqbarebonessockets
19:10:32Araqlowlevelsockets
19:10:45Araqsocketsmotherfucker
19:11:17dom96dunno
19:11:22dom96socketsll?
19:11:33Araqrawsockets is good I think
19:12:04dom96ok
19:12:50dom96In that case I think I will use that convention for the async stuff too
19:13:02Araqyeah good
19:13:05dom96btw
19:13:22dom96It would be nice if there was some symbol which is replaced by the current module name.
19:13:46dom96Otherwise I have to potentially rename a lot of stuff when renaming modules.
19:13:46Araqhmm ok
19:14:00Araqadded it to my todo
19:14:06dom96awesome
19:14:35AraqthisModule?
19:14:43fowlthisModule!
19:14:50AraqthisRoutine?
19:14:54AraqthisLine?
19:15:09dom96Also, need a different name for asyncio2 I guess
19:15:17Araqmeh I'll go with the ascii art __MODULE__
19:15:56Araqor perhaps ____MODULE____, you can never have enough underscores
19:16:38dom96Needs to be more noticeable \\***__MODULE__***//
19:16:39Araqsystem.thisModule # refers to the current module, lol
19:17:02Araqyeah it's likely the most important symbol everywhere
19:17:27dom96anyway, suggest a better name for asyncio2 please
19:17:33Araqeditors shouldn't even display the other text when there is __MODULE__ in the file
19:18:28Araqasyncio2 is really high level, right?
19:18:43dom96it's as high level as net
19:19:03Araqnet_async ?
19:19:17dom96It's not sockets specific.
19:19:23dom96oh wait
19:19:26dom96it is lol
19:19:38dom96That may be a problem...
19:20:02Araqasyncio2 should be named asyncio2 until we get the API right
19:20:11Araqwhich we will once enough people use it
19:20:18Araqso for now asyncio2 is fine I guess
19:21:08dom96Perhaps I should put the global dispatcher thread var in the low-level async module
19:21:19dom96which is currently called asyncdispatch
19:21:44dom96Then we can have asyncnet, asyncfile etc
19:21:58Araqyeah why not
19:22:40dom96Also, should I separate the futures stuff into a separate module?
19:23:00Araqno
19:25:42Araqdom96: feature request for aporia: a history of searched terms
19:25:52Araqscrollable with the UP/DOWN keys
19:26:13dom96Araq: Create an issue
19:27:42BitPuffinEXetoC: currently yeah
19:27:56BitPuffinor well
19:28:00BitPuffinwill make public now
19:28:00Araq BitPuffin upload complete?
19:28:38BitPuffinit's up
19:28:39BitPuffinhttp://youtu.be/HvC61WMRGQ4
19:29:48dom96BitPuffin: shannel
19:29:54dom96:P
19:29:55BitPuffindom96: gem
19:30:31dom96You should create like video tutorials teaching people Nimrod.
19:30:51BitPuffindom96: it'sa planned probably
19:33:02dom96hrm, I should play that game
19:33:07*BitPuffin quit (Remote host closed the connection)
19:33:19*nil42 joined #nimrod
19:33:26*BitPuffin joined #nimrod
19:33:29dom96hi nil42
19:33:29Araqhi nil42 welcome
19:33:58nil42Hello! I've just started experimenting with Nimrod.
19:34:12EXetoCgood!
19:35:19BitPuffindom96: you should
19:38:09Araqzahary: pong if you want to know the cause for #1023. pretty interesting bug
19:55:12*nil42 left #nimrod (#nimrod)
20:07:31EXetoChas anyone noticed any OpenGL-related breakages? I ran my app for the first time in a month or two, and I have no idea why the text isn't rendered all of a sudden. it's just a black rectangle
20:08:56AraqEXetoC: yeah a recent pull request changed GlHandle's type or something
20:13:54fowlEXetoC, ran it, or recompiled it
20:19:18NimBotAraq/Nimrod devel 7b26f16 Araq [+1 ±2 -0]: fixes #1023
20:19:32AraqI objected but the guy said the opengl changes are fine
20:22:54fowlAraq, it does look like all those funcs should take glUInt
20:23:41Araqfowl: since we broke code already, please fix it
20:30:15EXetoCAraq: that shouldn't be the issue
20:30:18EXetoCfowl: recompiled
20:32:16EXetoCI'm using a beta driver now so that might be the culprit. Not that I'm doing anything fancy
20:39:34fowlAraq, not sure how to fix it, it should be replaced with gluint
20:48:49*BitPuffin quit (Read error: Connection reset by peer)
20:49:27*BitPuffin joined #nimrod
20:49:36fowlEXetoC, do you use shaders?
20:50:58AraqBitPuffin: gah that's nasty do a speed run
20:53:27EXetoCfowl: yeah I'm using GL3
20:55:37BitPuffinAraq: but I haven't played it before
20:55:41BitPuffinAraq: and I'm scared :'(
20:55:46Araqlol
20:56:10BitPuffinI did cut in one place though
20:56:20BitPuffinwhen I was just sitting around waiting for the alarm to pass
20:56:21AraqBitPuffin: which character class do you play?
20:56:55fowlEXetoC, do you check glGetError
20:57:45BitPuffinAraq: I think I accidentally picked marine when I wanted to play the one that does hacking
20:57:59BitPuffinjust because I thought the paths corresponded
20:58:02Araqmarine is easiest
20:58:05Araqhacker is moderate
20:58:10Araqpsi guy is hardest
20:58:12BitPuffinso middle would give me the hacking
20:58:24BitPuffinlike in the tutorial
20:58:26BitPuffinbut nop
21:00:14EXetoCfowl: no but I will
21:00:47EXetoCI need to import unsigned just to be able to compare GLenum values. oh well
21:01:33AraqEXetoC: put the stuff from unsigned.nim to system.nim and make a pull request
21:01:52Araqunsigned.nim should remain as empty module so almost no code breaks
21:02:17BitPuffinAraq: I think it might work out though
21:02:18Araqenough people complained about this so lets change it
21:02:34BitPuffinAraq: with marine I get basic fighting stats and from there I can build up my hacking
21:02:35AraqBitPuffin: what do you mean?
21:02:48Araqyeah sure
21:02:58Araqyou can also become a psi guy later
21:03:04Araqit doesn't matter that much
21:03:21Araqwhat's the difficulity you chose?
21:06:34BitPuffinAraq: started with impossible and then changed to hard when I realized it was impossible
21:06:49BitPuffinthey fucking one hit you with impossible :(
21:07:13Araqhmm I made it up to level 2 or 3 with impossible
21:07:22Araqand then lost interest
21:08:11Araqspeed runs usually are done with impossible
21:08:29Araqso it's certainly possible but you need to know all the tricks and bugs
21:10:51*tmaynard joined #nimrod
21:11:12Araqhi tmaynard welcome
21:11:53BitPuffinyeah haha
21:11:57BitPuffinbut I'm not gonna speed run
21:12:00BitPuffinit's about the immersion
21:12:11tmaynardGreetings.
21:12:24dom96BitPuffin: You should code an AI to beat System Shock 2 instead
21:12:31dom96Then do a commentary on what the AI does.
21:13:43BitPuffinlol
21:13:51EXetoCanother fun weekend project
21:14:03BitPuffinthat's what god is doing
21:14:04dom96"It appears my AI is starting at this rather boring wall"
21:14:05BitPuffinwith me
21:14:09dom96*staring
21:14:13BitPuffinI'm just software that god wrote
21:14:15BitPuffinlol
21:15:27Araqseriously ... bug #1011 is embarrassing
21:15:48Araqand in the code responsible for it it says "XXX implement this"
21:16:18BitPuffinlol
21:16:40Araqwhich means it's been like that since forever and hardly anybody complained about it
21:16:47EXetoCAraq: I don't know why I complained this time of all times.
21:17:19EXetoCdidn't someone suggest moving the types to unsigned also? is that feasible?
21:17:49AraqEXetoC: no that breaks too much code for no benefit
21:17:54*Trimsty quit (Quit: Trimsty)
21:21:46dom96Araq: Perhaps we should get a test which fails as long as there is an "XXX" or "TODO" in the compiler's source? :P
21:21:58BitPuffinhahaha
21:22:00BitPuffinyeah
21:22:02BitPuffinseriously do it
21:22:22Araqdom96: we're already not releasing anything anymore
21:22:34Araq:-/
21:22:35EXetoCit'll only delay 0.9.4 by a month or so. no problem
21:24:29flaviuThere's a single, lone TODO in c2nim/cparse.nim. Does anyone want to change it to a XXX? :P
21:24:56dom96nah, every XXX should be changed to TODO instead.
21:25:25*tmaynard quit (Quit: Page closed)
21:25:34Araqno, XXX is the standard
21:26:17dom96Not in my source code :P
21:26:18BitPuffinXXX is like WARNING THIS NEEDS TO BE FIXED
21:26:22EXetoCI've mostly seen TODO in the wild
21:26:27BitPuffinwhereas TODO is more like, this could be done cleaner
21:26:36BitPuffinor would be nicer if we added this
21:26:41BitPuffinin my eyes
21:26:51AraqI use XXX because it reminds me of porn
21:27:14dom96Araq secretely dreams of being a porn producer.
21:27:59BitPuffin-.-
21:29:02flaviuIs there an issue less important than this to bikeshed over? :P
21:30:02dom96Oh plenty. For example I am deeply concerned about the lack of ASCII porn in Nimrod's source code.
21:30:10dom96The compiler should rely on it for its happiness.
21:30:11BitPuffinAraq: was it **typ that was an array or just *
21:30:28Araqhmm fixing this bug might break code
21:30:34*BitPuffin is asking Araq because he is the only one who can code here
21:30:42*OrionPK joined #nimrod
21:30:52AraqBitPuffin: * means pointer. but it is often used for arrays
21:31:03dom96Araq: Check how many tests it breaks then.
21:31:04BitPuffinAraq: aight, so for a [][] I should do ** ?
21:31:07fowllol
21:31:24AraqBitPuffin: yes
21:31:28BitPuffinoki
21:31:30BitPuffintyvm
21:31:42BitPuffinthen it is how I thought it was :D
21:33:21Araqdom96: want me to use a different branch for the fix?
21:34:23dom96Araq: Sure, if you want.
21:34:47*dom96 wonders why Varriount's builder's are down
21:35:04VarriountHm? they are?
21:35:11dom96yes
21:35:17VarriountError: unhandled exception: The system cannot find the file specified.
21:35:29VarriountThat's the error that's in the builder console.
21:35:50dom96Could you fix it please?
21:40:10dom96Araq: hrm. This is weird. Compiling oids fails with --threads:on
21:40:20dom96stdlib_oids.o:stdlib_oids.c:(.text+0x853): undefined reference to `__atomic_add_fetch'
21:40:34Araqare you on windows?
21:40:36dom96ye
21:40:38dom96s
21:40:45dom96known bug?
21:41:05Araqit's no bug
21:41:25Araqwe need to update gcc for windows
21:41:42Araqso that GCC knows about atomic ops
21:41:54dom96I see
21:42:33EXetoCAraq: I guess we'll just document the problems associated with unsigned types then
21:43:18dom96I know I asked this before, but can we allow ifs in object variants?
21:43:43Araqyou mean as a shortcut for 'case'?
21:43:46dom96yes
21:44:30Araqwe can but I won't before 1.0 is out
21:44:47dom96ok
21:44:55dom96I'll create an issue for it anyway
21:45:05dom96Maybe i'll implement it for fun.
21:45:09Araqmark it as feature request
21:45:14dom96indeed, will do.
21:45:28EXetoCfowl: Now to figure out what's triggering "invalid operation"
21:45:46EXetoCwe should turn these constants into enumerators
21:46:46AraqEXetoC: unfortunately that's always lots of work as C never was designed with static typing in mind
21:48:33EXetoCshouldn't be too hard in this case, but I'll think about it some more
21:49:10EXetoChopefully I can get my error checking macro to work now. Time to try my luck with useFFI again
21:49:39AraquseFFI is still broken
21:49:47EXetoCd'oh
21:50:17Araqand I'm not sure I want to provide it anymore
21:51:23Araqit scares me
21:52:30Araqit also creates a nimrod dialect ("oh you need to bootstrap with -useFFI to be able to compile this piece of code")
21:53:19dom96But then how will you provide an FFI for the VM?
21:53:21EXetoCI thought it would be unconditionally included at some point
21:53:44EXetoCanyway, the symbol is not actually invoked in the macro
21:55:54dom96ooh, this is really cool: http://www.wei-wang.com/ExplainGitWithD3
21:56:18EXetoCso it shouldn't be needed
21:59:20*BitPuffin quit (Ping timeout: 252 seconds)
21:59:46NimBotAraq/Nimrod devel f3ecc78 Araq [+0 ±3 -0]: fixes #1006
22:00:18EXetoCI'm getting some other error when it's a template rather than a macro
22:01:33EXetoC"let x = call" doesn't work if 'call' (an expr) evaluates to 'void'. is it possible to deal with that currently?
22:01:43fowlAraq, there is a lot of cool stuff that will impossible without ffi
22:02:17NimBotAraq/Nimrod devel 57c2a8d Araq [+0 ±1 -0]: fixes wrong commit
22:02:27EXetoCprobably in some way that isn't straightforward
22:02:56Araqfowl: like?
22:03:45EXetoCwith some macro magic perhaps, but then I'll hit that (seemingly unrelated) FFI error again
22:04:11AraqI think the stuff in os.nim and math.nim should get special treatment and that's about it; useFFI introduces simply too many problems for now
22:05:56dom96If getting rid of useFFI partially eases the pain then do it. But hopefully you will bring it back at some point?
22:07:14*BitPuffin joined #nimrod
22:07:17Araqdunno, I still think in the long run LLVM might finally give us runC_code(char* code) and we can use the C backend
22:07:45AraqBitPuffin: I'm closing but #1020 ok?
22:08:01BitPuffinAraq: which one was it?
22:08:14Araqunicode comma
22:08:14fowlError: cannot 'importc' variable at compile time
22:08:15dom96Araq: Is that on their todo list?
22:08:49Araqdom96: last time I asked them they said it would be hard and quite some work
22:09:01BitPuffinAraq: sure
22:09:02Araqbut in the meantime their got their own linker and stuff
22:09:19BitPuffinI even had some warnings today about unicode spaces lol
22:09:21BitPuffinin C
22:11:47Araqmaybe you should use a sane OS or something
22:12:09Araqif only there was an OS that takes the "operating" part in OS seriously
22:13:12Araqso now I know the name of the OS I'll eventually create: WOS -- the "working operating system"
22:15:34fowlAraq, i think the order push'd pragmas apply to procedures is wrong. pragmas that are on the proc should come first
22:16:54Araq"come first" as in "Processed last so they can overwrite stuff"?
22:17:18fowlyea
22:18:13Araqthe general "push" has lots of problems
22:18:19Araqwhy did we introduce it?
22:18:44fowlit makes wrappers less noisy
22:19:06Araqthe original push only supported a limited number of features and told you when it doesn't support the feature
22:19:25Araqthe new push is unreliable
22:20:01Araq.push raises: [] doesn't work either
22:20:47Araqfowl: that's only a problem when you don't use c2nim though
22:21:35dom96I think we should have {.add dynlib: lib.} and {.del dynlib.} instead.
22:21:47dom96Instead of this push & pop business.
22:21:59Araqthat's hardly any better, dom96
22:22:04dom96or perhaps 'set' instead of 'add'
22:22:16Araq{.pragma mypragma, dynlib: lib, cdecl, etc.}
22:22:22Araqis better though
22:22:33Araqand doesn't have these problems
22:22:40dom96You still have to add it to each proc though...
22:23:00dom96How about we add some matching mechanism?
22:23:06Araqmacrovoodoo:
22:23:10Araq proc foo()
22:23:13fowlAraq, what comes out of c2nim needs to be cleaned up anyways, the wrapper looks better when its proc x(); proc y(); ..
22:23:13Araq proc bar()
22:23:31dom96{.match proc, dynlib: lib, cdecl, ...}
22:23:48dom96{.match object, ...}
22:24:11Araqdom96: that's much better than 'push' for the user but as error prone to implement
22:25:05Araqinstead of 'match', 'annotate' reads nicer I think
22:25:12Araq{.annotate proc, dynlib...}
22:25:41dom96yeah
22:25:49dom96Why is it error prone?
22:26:21fowlpush is fine as it is it just needs one fix that i can see
22:27:01Araqfowl: 'push' should only allow for a certain list of pragmas
22:27:09fowlproc foo (f: proc(){.cdecl.}) it shouldn't apply anything to f, or at least not things that dont make sense (dynlib/header/importc)
22:27:35Araqwell that's simply a bug
22:27:46Araq'f' is no proc so 'push' shouldn't affect it
22:27:52BitPuffinAraq: :P
22:27:59Araq'f' has a proc type but that's different
22:31:53NimBotAraq/Nimrod devel 3c0f8ec Dominik Picheta [+0 ±1 -0]: Asyncio2 doc improvements. Changed recvLine's behaviour.... 5 more lines
22:31:53NimBotAraq/Nimrod devel ccbd4c9 Dominik Picheta [+0 ±1 -0]: Clean up IP address code in net module.
22:31:53NimBotAraq/Nimrod devel efe3104 Dominik Picheta [+0 ±4 -0]: Copied most blocking socket operations to the net module.
22:31:53NimBotAraq/Nimrod devel 7f7e917 Dominik Picheta [+3 ±1 -2]: Many renames. Created high level asyncnet module.
22:32:43dom96Araq: https://github.com/Araq/Nimrod/blob/devel/lib/pure/asyncnet.nim
22:33:00dom96Happy with that API?
22:33:33Araqdom96: it's error prone because if I forget things, things break silently, like .push raises: []
22:33:57Araqwhich is not supported but the compiler doesn't complain and so people think their code is exception safe
22:34:17dom96Isn't that trivial to fix?
22:34:38dom96Just check whether the pragma is supported and refuse to compile if it's not.
22:34:39Araqno
22:34:45Araqoh yeah
22:35:01Araqwhen defined(ssl): # no! let's use useSSL instead
22:35:27EXetoCwhen compiles(echo(call))
22:35:29EXetoCthat'll do :>
22:35:35dom96no, lets create a way to distinguish between defined vars and things defined on the cmd line.
22:36:06dom96I mean, yeah. I can change it.
22:36:13dom96But we should do that anyway.
22:36:30Araqyeah
22:36:40Araqbut that breaks code in subtle ways
22:36:47EXetoCsome timing. that has nothing to do with what you said
22:37:03Araqproc AsyncSocket vs proc newSocket ?
22:37:16dom96newSocket isn't exported
22:37:23dom96how does it break code?
22:37:32dom96EXetoC: huh?
22:37:33Araqhmm well it should be newAsyncSocket
22:37:43EXetoCdom96: nvm
22:37:45Araqor at least asyncSocket with a small a
22:38:02EXetoC"glTexStorage2D(GLtexture2D, 32, fmt.GLenum, size.w.cint, size.h.cint)" ok so I guess that broke at some point
22:38:02dom96ahh right
22:38:10dom96Well, it's 'socket' in net
22:38:14dom96and in sockets
22:38:38dom96Perhaps I should get rid of this convention.
22:38:54dom96or should i?
22:40:31Araqif we make TSocket Socket and keep --cs:none then we'll get into trouble
22:41:14Araqit should be 'socket' because of posix but newAsyncSocket
22:41:21AraqI think
22:41:24Araq ## If the socket is disconnected in the middle of a line (before ``\r\L``
22:41:26Araq ## is read) then line will be set to ``""``.
22:41:27Araq ## The partial line **will be lost**.
22:41:33Araqis that really good design?
22:41:42dom96I'm glad you noticed that.
22:41:47dom96I thought about this for a while.
22:42:00Araqif we redesign the API, shouldn't we always add \C\L and call it a day?
22:42:24dom96That scenario is pretty rare I think.
22:42:31Araqthough it sucks to have to do chop(line)
22:42:33dom96And what can you do with partial data anyway?
22:42:42dom96It breaks your protocol.
22:43:00Araqthat depends on the protocol though
22:43:09Araqpartial data can be useful
22:43:23dom96Can you give me an example of a protocol where it is useful?
22:43:54Araqlogging via http
22:44:00dom96The current recvLine in sockets.nim simply gives the partial line.
22:44:13Araqpartial error message in the log is still useful
22:44:17dom96And no code broke yet because of that AFAIK
22:44:38dom96Only the headers are read line by line in HTTP
22:44:52dom96And if you get half a header what are you going to do with it?
22:45:11Araqmake the example "logging by *some* protocol"
22:45:18dom96hah
22:45:40dom96You always tell me to ignore some scenarios which may exist.
22:46:08dom96So now you better give me a concrete example instead of "some protocol"
22:46:19dom96This depends on how popular these protocols are.
22:46:33dom96You still have plenty of options open to you.
22:46:59AraqI don't see 'recvLine' being only useful for common protocols
22:47:00dom96And if such protocols are rare then we should keep that behaviour.
22:47:18AraqrecvLine is protocol agnostic
22:47:36Araqso it shouldn's assume "partial lines who cares about these"
22:48:03dom96Well if you want partial lines then we need to have \c\L at the end.
22:48:12dom96Otherwise there is no way to tell.
22:48:16dom96But this will lead to bugs.
22:48:17*brson joined #nimrod
22:48:26dom96And I would prefer to have a return enum.
22:48:30dom96Which will force people to check.
22:48:57dom96In that case we can have two versions then.
22:49:23dom96Although they can't have the same name...
22:49:28dom96bleh
22:49:47fowlis udp possible with new async stuff?
22:50:00dom96Not yet.
22:51:08Araqwhy don't partial lines raise an exception?
22:51:59dom96That's a solution I didn't think of.
22:52:04dom96I can do that.
22:52:24dom96And I can create a custom exception which includes the partial line.
22:53:07flaviuHmm, there is an ICE when the compiled program run fails
22:53:53zaharydom96: do you plan to add support for timers in the asyncdispatcher module soon? they are the equivalent of the sleep call in the async world
22:54:05flaviuYou aren't supposed to get a stack trace for something like that right?
22:54:15zaharythe file system monitor could be hooked to the dispatcher as well
22:54:35dom96zahary: Yes, I will add all that later.
22:54:46dom96Sockets are my priority.
22:54:53zaharycool
22:58:25Araqcan somebody on a mac please fix: https://github.com/Araq/Nimrod/issues/965
23:00:27NimBotAraq/Nimrod devel 8dbd5d0 Araq [+0 ±1 -0]: fixes #994
23:00:27NimBotAraq/Nimrod devel eaf4ff7 Araq [+3 ±2 -2]: Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
23:00:41dom96zahary: What do you think of it currently? Is this what you had in mind?
23:00:49EXetoC"compiles(echo(call))" is this the best we got right now for checking whether or not something evaluates to 'void'?
23:01:31Araqwhen call() is void ?
23:01:44Araqnot sure if that works though
23:03:31EXetoCAraq: no it doesn't. by 'something' I meant 'expr'
23:03:43EXetoCwell, whatever works is fine
23:05:44Araqfowl: btw what do you think of 'existsAsFile' and 'existsAsDir'? uglier than 'fileExists'?
23:07:15zaharysure dom96, look great. where is dispatcher.poll defined btw?
23:07:31dom96asyncdispatch
23:07:45zaharyEXetoC: foo() is void soulds like something that I should implement :)
23:08:25*xenagi joined #nimrod
23:11:15EXetoCzahary: well, you'd just do 'foo' in this case
23:11:32EXetoC</nitpick>
23:12:36fowlAraq, way ugly
23:18:11*darkf joined #nimrod
23:39:58NimBotnimrod-code/babel master c451d20 Grzegorz Adam Hankiewicz [+0 ±1 -0]: Adds support for git submodules during clone.
23:39:58NimBotnimrod-code/babel master 948cf91 Dominik Picheta [+0 ±1 -0]: Merge pull request #34 from gradha/pr_support_git_submodules... 2 more lines