00:00:14 | * | reem joined #nim |
00:00:14 | * | sampwing joined #nim |
00:03:12 | * | mpthrapp quit (Remote host closed the connection) |
00:09:48 | Varriount | Maxdamantus: Ah, the eternal struggle. Security vs Convenience |
00:10:08 | * | reem quit (Ping timeout: 256 seconds) |
00:12:19 | flaviu | def-: Looks like you figured it out? I have a hunch I can avoid the pcre_stack_guard when dynamically linking with older distros. |
00:12:57 | def- | flaviu: I just don't use -d:pcreDynlib anymore |
00:13:48 | def- | I like the shorter compile time since nimcache seems to be invalidated so often |
00:13:56 | flaviu | Ok. I think that I can avoid the pcre_stack_guard anyway for people who don't need it if I add {.deadCodeElim: on.}. |
00:14:21 | def- | I explicitly had to use --deadCodeElim:off because of a compiler bug anyway |
00:14:32 | flaviu | And that didn't fix the issue? |
00:14:37 | def- | off, not on |
00:14:52 | Varriount | Stack guard? |
00:15:02 | flaviu | I don't have to require global dead code elim. Just in pcre.nim. |
00:15:19 | def- | flaviu: well, i didn't try around, since i don't get the error on my system |
00:15:30 | flaviu | def-: Of course. |
00:17:10 | * | randomwalk joined #nim |
00:17:46 | * | reem joined #nim |
00:18:15 | Varriount | Nim needs a way (other than dead code elimination) of dealing with unavailable dll procedures. |
00:18:48 | flaviu | Varriount: IMO it doesn't. |
00:19:26 | flaviu | More complexity is the last thing Nim needs, and I don't see a more appriate approach than erroring out anyway. |
00:19:47 | Varriount | flaviu: What about using the body of a dll'd procedure as a fallback? |
00:20:41 | Araq | flaviu: "More complexity is the last thing Nim needs". Does that mean you don't want overloading based on the return value anymore? ;-) |
00:20:43 | Varriount | See also: Symlinks on Windows XP |
00:22:34 | Varriount | Although, I could probably hack together a macro to do that using the dlsym module. |
00:23:31 | flaviu | Araq: Haha, nice joke! Don't forget you need to get to work on assignment operators too! |
00:25:16 | Araq | assignment operators ... oh yeah ... but these are essential. overloading based on return types is not |
00:26:51 | Maxdamantus | fromInteger :: Integer -> a |
00:26:55 | Maxdamantus | er |
00:26:59 | Maxdamantus | fromInteger :: Num a => Integer -> a |
00:27:17 | Maxdamantus | actually, s/Num/Integral/, but Haskell has it, so it must be important. |
00:27:31 | Maxdamantus | oh, it is Num. |
00:28:34 | flaviu | How do I check for nil in `==` without a stack overflow? Incredibly stupid question, right? |
00:28:35 | Maxdamantus | Though Haskell has an elegant way of actually achieving it (HM type inference) |
00:29:14 | flaviu | Right, isNil works. |
00:29:41 | * | Matthias247 quit (Read error: Connection reset by peer) |
00:33:06 | * | fizzbooze joined #nim |
00:36:52 | fowl | flaviu, nothing in the std lib handles nil in == |
00:37:15 | fowl | no ref type at least |
00:37:27 | flaviu | Sounds like a bunch time bombs. |
00:38:04 | * | reem quit (Remote host closed the connection) |
00:38:10 | fowl | only if you expect obj == nil to work |
00:38:38 | flaviu | and that's not .. a given? |
00:39:12 | * | reem joined #nim |
00:40:58 | * | Maxdamantus wonders why `nil` is even allowed for a default reference type. |
00:42:15 | Maxdamantus | It'd probably make some sense having nil-capable reference subtypes, for when you really want to use them. |
00:42:27 | Araq | flaviu: you would be the first to complain about a non-existing == for seqs |
00:42:34 | fowl | because branchign like this in every == is annoying https://github.com/Araq/Nim/blob/devel/lib/pure/json.nim#L672 |
00:43:22 | Maxdamantus | if a.isNil: |
00:43:25 | Maxdamantus | return b.isNil |
00:43:28 | Araq | Maxdamantus: Jehan said it the best way: "nil gives us the axiom of choice". |
00:43:49 | fowl | Maxdamantus, you want a cookie for reducing one line |
00:44:05 | Maxdamantus | I'd put that on the same line as the if, actually. |
00:44:07 | fowl | you still need elif b.isNil |
00:44:42 | * | reem quit (Ping timeout: 256 seconds) |
00:45:49 | Maxdamantus | Can you do this? if nil in { a, b }: return a.isNil == b.isNil |
00:46:00 | Maxdamantus | Probably not. |
00:46:25 | Maxdamantus | if a.isNil or b.isNil: return a.isNil == b.isNil |
00:46:53 | fowl | it doesnt matter how you lay it out Maxdamantus the problem is it has to go in every `==` function |
00:48:06 | fowl | i would just make nullable convetible to bool |
00:48:19 | fowl | every nullable type is now option[t] |
00:49:04 | Maxdamantus | instance (Eq a) => Eq (ref a) where { nil == nil = True; nil == _ = False; _ == nil = False; a == b = deref(a) == deref(b) } |
00:49:07 | Maxdamantus | Solved. |
00:50:19 | * | fowl left #nim ("Leaving") |
00:50:35 | flaviu | fowl: That's an ugly way to write that. |
00:52:07 | flaviu | https://github.com/flaviut/nre/blob/master/src/nre.nim#L178 |
00:53:32 | Maxdamantus | .eval var a: Regex = nil; echo (a == a) |
00:53:34 | Mimbus | Maxdamantus: eval.nim(3, 7) Error: undeclared identifier: 'Regex' |
00:54:42 | flaviu | Maxdamantus: That nim doesn't have nre anyway. |
00:55:09 | def- | you could do staticExec "nimble install nre" ;) |
00:55:29 | * | leonlee joined #nim |
00:55:30 | flaviu | Pretty sure that I don't have nimble there either. |
01:00:37 | flaviu | Well, I guess you could install nimble and nre, but it's a PITA |
01:03:08 | Araq | why is it a pita? |
01:04:44 | * | TEttinger joined #nim |
01:07:22 | * | reem joined #nim |
01:08:07 | flaviu | Because I have to do lots of staticExec("command 1"); staticExec("command 2"); ... |
01:08:31 | flaviu | And I can't combine multiple commands into one with ";" because of .replace(";", " |
01:08:34 | flaviu | \n") |
01:18:32 | * | NimBot joined #nim |
01:33:27 | * | sampwing quit (Ping timeout: 252 seconds) |
01:35:22 | * | Trustable quit (Remote host closed the connection) |
01:40:01 | filwit | http://www.phoronix.com/scan.php?page=news_item&px=SPIR-V-Consumption-GCC |
01:40:24 | filwit | ^ that has interesting implications for Nim on Vulkan as a shader/compute language |
01:41:25 | * | ch_ris joined #nim |
01:44:19 | filwit | looks like it wont be long before there is some kind of C/C++ -> SPIR-V compiler, so there may be little reason to make a OpenCL Nim backend at this point |
01:44:34 | filwit | (i noticed that listed on the GSoC page) |
01:46:21 | def- | filwit: always nice to profit from gcc and clang |
01:46:37 | filwit | yep :) |
01:48:59 | * | reem quit (Remote host closed the connection) |
01:54:32 | * | fowl joined #nim |
01:54:55 | * | reem joined #nim |
01:56:19 | * | reem quit (Remote host closed the connection) |
02:04:01 | * | daurnimator joined #nim |
02:04:07 | daurnimator | Hi everyone |
02:04:18 | filwit | hello |
02:04:22 | daurnimator | just reading the manual today :) |
02:04:38 | daurnimator | I had a look at nimrod a couple of years ago; but things seem to be quite nice now |
02:05:00 | flaviu | daurnimator: Say Nim, it sounds better :) |
02:05:19 | daurnimator | flaviu: 2 years ago it was nimrod. now it's nim :P |
02:05:43 | daurnimator | I remember there being something like being able to derive the basic types from bit strings etc? |
02:05:47 | daurnimator | or was that something else |
02:05:55 | filwit | flaviu: for legacy reasons, I think we should all still refer to ourselves as "nimrods" :P |
02:07:04 | flaviu | And the best time to do it is in front of lots of random people. That way Nim gets maximum exposure! |
02:07:15 | daurnimator | do unsigned integers wrap around? |
02:07:24 | daurnimator | if not, how do you get wrap around behaviour? |
02:07:44 | flaviu | Yep, unsigned ints wrap. |
02:08:07 | daurnimator | flaviu: k, it doesn't really say that in the manual :) |
02:08:34 | daurnimator | infact it implies it doesn't except for *maybe* uint64 |
02:09:01 | daurnimator | (see section on ordinal types: http://nim-lang.org/manual.html#ordinal-types ) |
02:15:56 | * | leon_lee joined #nim |
02:19:38 | * | vezzy joined #nim |
02:19:55 | * | l04m33_ joined #nim |
02:20:13 | * | aidanh_ joined #nim |
02:20:16 | * | skroll1 joined #nim |
02:20:54 | * | darkf joined #nim |
02:20:59 | * | kniteli_ joined #nim |
02:21:22 | * | aidanh quit (Ping timeout: 250 seconds) |
02:21:22 | * | BitPuffin quit (Ping timeout: 250 seconds) |
02:21:22 | * | l04m33 quit (Ping timeout: 250 seconds) |
02:21:23 | * | skroll quit (Ping timeout: 250 seconds) |
02:21:23 | * | lyro quit (Ping timeout: 250 seconds) |
02:21:23 | * | leonlee quit (Ping timeout: 250 seconds) |
02:21:23 | * | quasinoxen quit (Ping timeout: 250 seconds) |
02:21:23 | * | kniteli quit (Ping timeout: 250 seconds) |
02:21:23 | * | lyro joined #nim |
02:21:24 | * | aidanh_ is now known as aidanh |
02:25:45 | * | lyro quit (Ping timeout: 250 seconds) |
02:26:01 | * | lyro joined #nim |
02:33:13 | * | brson joined #nim |
02:51:00 | * | reem joined #nim |
02:52:10 | * | reem quit (Remote host closed the connection) |
02:55:04 | * | reem joined #nim |
02:55:18 | * | chemist69_ joined #nim |
02:58:14 | daurnimator | "not nil" is confusing |
02:58:18 | * | chemist69 quit (Ping timeout: 252 seconds) |
02:58:25 | daurnimator | it precisely means it *can* be nil |
02:58:54 | filwit | i don't see how |
02:59:14 | daurnimator | ? |
02:59:20 | filwit | you're stating that that specific parameter cannot be nil, unlike it's default |
02:59:35 | daurnimator | you annotate that a type can be nil, by juxtaposing it with "not nil" |
03:00:23 | filwit | by default, any ref-type can be nil. The 'not nil' parameter option states that this cannot be (runtime checked i believe) |
03:01:18 | daurnimator | "All types for that nil is a valid value can be annotated to exclude nil as a valid value with the not nil annotation" |
03:01:35 | daurnimator | maybe I can't parse that correctl |
03:02:12 | daurnimator | I read that as: "If your type can be nil, put 'not nil' next to it, so that the compiler won't put nil in it when initialising" |
03:03:46 | * | reem quit (Remote host closed the connection) |
03:04:37 | filwit | yes basically.. so it prevents this "var i: MyRefType = nil" |
03:04:53 | filwit | or it prevents you passing nil to a parameter marked as 'not nil' |
03:05:55 | filwit | basically it's saying that any variable reference of the type cannot be nil, therefor you don't need to explicitly check for nil in your code |
03:06:13 | daurnimator | oh, I thought it was saying it *could* be nil |
03:06:28 | daurnimator | i.e. you might want to store nil in it |
03:06:52 | daurnimator | so nim should't use `nil` as a sentinel value for that type |
03:07:10 | * | jholland quit (Quit: Connection closed for inactivity) |
03:08:00 | filwit | i don't know you mean by "nim shouldn't use" (don't know weather you're refering to regular ref-types or ones marked with 'not nil') |
03:08:50 | filwit | but basically, by default ref-types in Nim can be nil (in fact they default to it). To prevent this, use 'not nil' |
03:08:53 | daurnimator | I'm just confused now |
03:09:01 | filwit | lol, sorry |
03:09:19 | filwit | here, let me right code: |
03:09:23 | filwit | type Foo = ref object |
03:09:32 | * | reem joined #nim |
03:09:32 | filwit | var f: Foo = nil # valid |
03:09:40 | filwit | type Bar = ref object not nil |
03:09:56 | filwit | var b: Bar = nil # not valid (cause Bar is 'not nil') |
03:10:21 | daurnimator | okay. that makes more sense |
03:10:57 | daurnimator | in the manual I think you need 'invalid' instead of 'valid' |
03:11:06 | filwit | lol, i spelled 'write' as 'right'... sill brain.. |
03:11:12 | daurnimator | filwit: it's late. somewhere :p |
03:11:34 | filwit | yeah, i'll blame it on that :) |
03:13:23 | daurnimator | in http://nim-lang.org/manual.html#memory-regions what is "T" |
03:13:27 | filwit | daunimator: PR's to the documentation are welcome, of course. I haven't read through them in awhile, but I know they need a lot of work in places (especially the standard libs) |
03:13:38 | * | saml_ joined #nim |
03:13:41 | daurnimator | (or in the example: Stat) |
03:14:11 | filwit | err.. I'm not sure what 'T' you're referring too |
03:14:29 | def- | T usually stands for any type |
03:14:32 | def- | like x for variables |
03:15:24 | daurnimator | so in the first kernel vs userspace example |
03:15:33 | daurnimator | what does it look like fleshed out? |
03:15:47 | daurnimator | e.g. how do you actually specify the regions? |
03:17:18 | filwit | only the 'Stat' type is missing from the first example, and that could represent any type... the main illustrations is showing that a ptr mapped to the Kernel region cannot point to memory in the Userspace region (and vise versa) |
03:18:44 | daurnimator | okay; I think I get it |
03:19:23 | daurnimator | how fast does nim move as a language? |
03:19:56 | filwit | things are still subject to change (we have not hit 1.0), but mostly the features are pretty stable at this point |
03:20:18 | filwit | most compiler work is going into stability and tooling (like nimsuggest) |
03:21:09 | filwit | the only things that will change a lot before 1.0 are probably some libraries (like the async stuff, regex maybe, macros, etc) |
03:22:03 | daurnimator | is the javascript target usable? |
03:22:32 | reactormonk | daurnimator, kinda |
03:23:01 | daurnimator | is it actual js? or asm.js or something |
03:23:29 | filwit | I can't answer that really, I've not extensively used it (though it did run well on my simple tests). That said, the real solution to Nim on the web is probably Nim -> EMCC (which is still somewhat broken, but half-working) |
03:23:53 | filwit | "i cant answer that" was directed at your JS-backend question |
03:24:55 | def- | daurnimator: actual JS, but would make sense to translate to asm.js I think |
03:25:07 | filwit | daurnimator: I ported a Nim raytracer to asm.js awhile ago.. but things don't work correctly (even with disabling the GC). You can see it here: http://reign-studios.net/philipwitte/nimrod/emcc-raytracer/main.htm |
03:25:43 | filwit | daurnimator: for comparison, the image is supposed to look like this: https://github.com/zezba9000/RayTraceBenchmark/blob/master/ReferenceImage.jpg |
03:26:40 | filwit | daurnimator: if i disable the GC, the resulting image (in the asm.js version) is different (much faster) but also incorrect. |
03:27:26 | filwit | daurnimator: so it looks like Nim is very close to being able to work with EMCC/asm.js, but not quite there for some reason (unknown to me) |
03:28:32 | * | reem quit (Remote host closed the connection) |
03:28:37 | filwit | speaking of which... i'm going to port this little ray-tracer at some point: http://www.kevinbeason.com/smallpt/ |
03:29:09 | reactormonk | def-, it's actual JS. |
03:31:51 | * | brson quit (Ping timeout: 264 seconds) |
03:33:24 | daurnimator | the reason I ask is due to working with native objects |
03:35:44 | filwit | you can work with native JS object from asm.js (that's how I fill the <canvas> in the raytracer) |
03:37:12 | daurnimator | the nature of javascript is that you have no finalisers |
03:37:53 | * | reem joined #nim |
03:37:53 | daurnimator | which makes things.... hard |
03:39:13 | filwit | well, if you use Nim's JS backend, you can't use some things (like pointers). However, asm.js is a different story. So it's like interfacing with C. You write Nim code which (theoretically) get's compiled to asm.js (which works off it's own heap) and call out to native, hand-written JS functions (which work like regular JS) |
03:41:13 | * | reem quit (Remote host closed the connection) |
03:42:44 | filwit | I recently updated the raytracer code to work with the new Nim compiler, but haven't uploaded it (the version on the web only works with an older Nim compiler). I can upload that for you if you want to take a look (it illustrates how to call native, hand-written JS functions from Nim/asm.js and pass data to them) |
03:43:19 | daurnimator | sure; I'll give it a look |
03:43:26 | filwit | k, one sec |
03:43:43 | * | reem joined #nim |
03:45:39 | * | fizzbooze quit (Ping timeout: 264 seconds) |
03:47:30 | filwit | daurnimator: http://www.reign-studios.net/philipwitte/nimrod/RayTracer_emcc.zip |
03:48:00 | daurnimator | it's js, can you just serv it? :P |
03:48:53 | filwit | well, just but it's easier to look at the Nim code if you download it |
03:49:00 | filwit | well sure** |
03:49:10 | filwit | one sec |
03:50:43 | filwit | daurnimator: http://www.reign-studios.net/philipwitte/nimrod/RayTracer_emcc/main.htm |
03:50:57 | filwit | whoops.. one sec |
03:52:42 | * | fizzbooze joined #nim |
03:52:56 | filwit | wtf.. my permissions are being denied on the files now... |
03:53:01 | * | reem quit (Remote host closed the connection) |
03:54:02 | daurnimator | nim is growing on me |
03:54:12 | daurnimator | it has a lot of things I wish other languages had |
03:54:21 | daurnimator | I haven't actually programmed anything though |
03:54:22 | reactormonk | daurnimator, welcome to nim :-) |
03:54:24 | daurnimator | just reading at this point |
03:54:36 | * | daurnimator is mainly a lua programmer |
03:55:02 | reactormonk | I think one of the greater things is the unified call syntax |
03:55:38 | daurnimator | the thing I'm most afraid of so far is if people overload operators too much |
03:55:52 | reactormonk | go on |
03:56:02 | daurnimator | that's it |
03:56:11 | daurnimator | nim has powerful custom operator capabilities |
03:56:16 | reactormonk | yup |
03:56:20 | reactormonk | and macros. |
03:56:20 | daurnimator | they can be easily be overused |
03:56:29 | daurnimator | which makes debugging other people's code hard |
03:56:34 | reactormonk | want a DSL? dumpTree: <your syntax> and if it compiles, it's possible |
03:56:42 | filwit | daurnimator: can you just work with the Zip i uploaded before.. i don't want to play with permissions right now (it's not serving my file due to that) and I don't want to fix it right now |
03:56:44 | daurnimator | because at the end of the day, 60% of programming is fixing other people's bugs |
03:56:49 | daurnimator | filwit: sure |
03:58:48 | daurnimator | damn, I don't have emscripten installed on this box |
03:59:03 | filwit | daurnimator: some notes: libCanvas.js contains the hand-written JS (it fills the <canvas> pixels with data passed from Nim). The important function is 'canvasDraw', but it has to be wrapped in a LibraryCanvas object used with 'mergeInto()' to interface with asm.js |
03:59:55 | filwit | you'll notice in the Nim code i declare the 'canvasDraw' procedure at line 254 and use it at line 284 |
04:00:17 | daurnimator | anyone got a nano highlighter for nim? |
04:00:30 | filwit | 'canvasDraw' is declared as {.importC.} as if it was a C function... and that's basically it |
04:00:31 | * | reem joined #nim |
04:00:47 | daurnimator | a quick search found http://pastie.org/pastes/4275242 |
04:00:50 | filwit | daurnimator: dunno about a nano one, but there's a vim one somewhere |
04:00:55 | reactormonk | daurnimator, nano? nah, never heard of. Get a real™ editor ;-) |
04:00:58 | daurnimator | I assume that one isn't very complete though |
04:01:32 | daurnimator | filwit: hrm. with importC |
04:02:03 | * | reem quit (Remote host closed the connection) |
04:02:51 | filwit | daurnimator: if you don't know what that means, it's basically saying "this function is defined outside of Nim as a C function" (but is also used for native JS functions) |
04:03:16 | daurnimator | filwit: yeah, I was just musing at the point of using importC to import a JS function. but it's in emscripten so that makes sense :) |
04:03:58 | daurnimator | filwit: so in libCanvas.js you just use the emscripten getValue etc. the tricky bit is e.g. handing closures to setInterval, and knowing when to collect them |
04:04:07 | daurnimator | at least that's been the unsolved problem for me with lua.vm.js |
04:04:16 | daurnimator | and AFAIK, it's impossible with finalisers |
04:04:19 | daurnimator | *without |
04:05:39 | filwit | hmm.. your problem is a bit beyond me, but what i can answer: yes, i'm just passing a pointer to the canvasDraw() and using emcc's getValue to lookup what the actual array values are. |
04:06:06 | daurnimator | filwit: yeah I know; I was just hoping the js target had something magical to not have that |
04:06:09 | filwit | it's possible the rendering bug in the output is actually a flaw with that JS code, but I stopped playing with this project awhile ago |
04:14:31 | * | BitPuffin joined #nim |
04:18:08 | reactormonk | daurnimator, yeah, https://github.com/Araq/Nim/issues/347 |
04:18:20 | * | reem_ joined #nim |
04:19:37 | daurnimator | reactormonk: your link to gist is dead |
04:20:32 | * | ch_ris quit (Ping timeout: 272 seconds) |
04:22:23 | * | reem_ quit (Remote host closed the connection) |
04:28:56 | * | a5i quit (Quit: Connection closed for inactivity) |
04:31:37 | * | dapz joined #nim |
04:44:00 | * | johnsoft quit (Ping timeout: 265 seconds) |
04:44:30 | * | johnsoft joined #nim |
04:45:23 | * | randomwalk_ joined #nim |
04:46:49 | * | randomwalk quit (Ping timeout: 256 seconds) |
04:48:02 | * | reem joined #nim |
04:48:41 | * | dapz quit (Quit: Textual IRC Client: www.textualapp.com) |
04:51:54 | * | reem quit (Remote host closed the connection) |
04:55:48 | * | reem joined #nim |
04:57:39 | * | randomwalk__ joined #nim |
05:00:18 | * | reem quit (Remote host closed the connection) |
05:01:24 | * | randomwalk_ quit (Ping timeout: 256 seconds) |
05:04:39 | * | brson joined #nim |
05:05:07 | * | reem_ joined #nim |
05:16:27 | * | wb_ quit (Read error: Connection reset by peer) |
05:17:16 | * | randomwalk_ joined #nim |
05:17:34 | daurnimator | how hard is it to debug nim |
05:17:38 | daurnimator | e.g. with gdb? |
05:19:21 | * | randomwalk joined #nim |
05:19:28 | * | reem_ quit (Remote host closed the connection) |
05:19:53 | * | randomwalk__ quit (Ping timeout: 240 seconds) |
05:21:48 | * | randomwalk_ quit (Ping timeout: 256 seconds) |
05:21:51 | * | ruzu quit (Read error: Connection reset by peer) |
05:22:43 | * | ruzu joined #nim |
05:23:13 | * | randomwalk_ joined #nim |
05:23:30 | * | elbow_json quit (Quit: Leaving) |
05:26:06 | * | randomwalk quit (Ping timeout: 246 seconds) |
05:31:12 | * | reem joined #nim |
05:32:45 | * | saml_ quit (Quit: Leaving) |
05:32:51 | * | Menche quit (Quit: Leaving) |
05:33:57 | * | reem quit (Remote host closed the connection) |
05:37:15 | * | reem joined #nim |
05:38:59 | * | ChrisMAN quit (Ping timeout: 246 seconds) |
05:39:03 | filwit | daurnimator: dunno, never really tried, here's a thread about it though (more info on the second page): http://forum.nim-lang.org/t/929/1 |
05:39:25 | * | reem quit (Remote host closed the connection) |
05:42:07 | filwit | night |
05:42:09 | * | filwit quit (Quit: Leaving) |
05:43:40 | * | Menche joined #nim |
05:44:45 | * | reem joined #nim |
05:46:26 | * | akiradeveloper joined #nim |
05:46:53 | akiradeveloper | Do we already have one like this? (lifting future (A->B) -> Future[A] -> Future[B]) https://gist.github.com/akiradeveloper/3ea77497c3b514d0dc74 |
05:47:29 | akiradeveloper | I am looking for something like this but worry if it reinventing the wheel. This applicative approach is not preferable in Nim? |
05:47:49 | * | reem quit (Remote host closed the connection) |
05:53:54 | Varriount | akiradeveloper: What exactly are you asking? I don't think I've seen any functionality like that in any of the async modules, though I could be wrong. |
06:06:27 | * | reem joined #nim |
06:07:36 | akiradeveloper | It's just because I want to write that way. |
06:08:07 | * | reem quit (Remote host closed the connection) |
06:08:33 | fowl | a couple examples of the new macros.getType https://gist.github.com/fowlmouth/9b9010397ad5fe4b9872 |
06:08:50 | fowl | one is curry() the other is a proper `==` for variant types |
06:10:26 | * | reem joined #nim |
06:14:49 | * | reem quit (Ping timeout: 245 seconds) |
06:25:51 | * | randomwalk__ joined #nim |
06:29:06 | * | randomwalk_ quit (Ping timeout: 244 seconds) |
06:32:34 | * | bjz joined #nim |
06:32:34 | * | ruzu quit (Read error: Connection reset by peer) |
06:33:10 | * | ruzu joined #nim |
06:35:11 | * | reem joined #nim |
06:39:24 | * | reem quit (Remote host closed the connection) |
06:40:41 | * | Demos quit (Read error: Connection reset by peer) |
06:44:32 | * | gsingh93 quit (Ping timeout: 256 seconds) |
06:46:47 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
06:47:07 | akiradeveloper | where is the "await"'s implementation? |
06:47:22 | * | reem joined #nim |
06:57:05 | fowl | akiradeveloper, isnt it in asyncdispatch |
06:58:05 | * | brson quit (Ping timeout: 246 seconds) |
06:58:38 | * | epichero quit () |
06:58:57 | * | epichero joined #nim |
06:59:44 | * | randomwalk__ is now known as randomwalk |
07:05:23 | * | untitaker quit (Ping timeout: 240 seconds) |
07:10:17 | * | skroll1 quit (Ping timeout: 245 seconds) |
07:18:44 | * | nande quit (Remote host closed the connection) |
07:20:51 | * | untitaker joined #nim |
07:21:21 | * | reem quit (Remote host closed the connection) |
07:21:54 | * | reem joined #nim |
07:25:51 | * | reem quit (Remote host closed the connection) |
07:27:22 | * | randomwalk quit (Ping timeout: 245 seconds) |
07:30:43 | * | reem joined #nim |
07:37:27 | * | skroll1 joined #nim |
07:37:50 | * | reem quit (Remote host closed the connection) |
07:42:27 | * | reem joined #nim |
07:44:38 | * | reem quit (Remote host closed the connection) |
07:45:49 | * | BlaXpirit joined #nim |
07:47:19 | * | reem joined #nim |
07:52:13 | * | reem quit (Remote host closed the connection) |
07:54:07 | * | Roin quit (Quit: WeeChat 1.1) |
07:54:16 | * | Roin joined #nim |
07:56:49 | * | fizzbooze quit (Ping timeout: 250 seconds) |
08:00:27 | * | reem joined #nim |
08:05:09 | * | Bluek404 joined #nim |
08:08:30 | * | Bluek404 left #nim (#nim) |
08:08:47 | * | epichero quit () |
08:12:11 | * | reem quit (Remote host closed the connection) |
08:13:09 | akiradeveloper | fowl: http://nim-lang.org/asyncdispatch.html async is seen but await is not |
08:13:13 | akiradeveloper | where is it |
08:14:00 | akiradeveloper | btw, await is like <- in Haskell (in do notation) |
08:14:11 | akiradeveloper | that's is how I understood |
08:14:36 | fowl | it says await is a keyword |
08:16:24 | akiradeveloper | I though it is a macro. sorry |
08:17:36 | fowl | you're fine |
08:17:52 | fowl | it isnt mentioned in the manual? |
08:19:43 | akiradeveloper | I believe this document says await is macro http://nim-lang.org/news.html |
08:20:00 | akiradeveloper | Note that this feature has been implemented with Nimrod's macro system and so await and async are no keywords. |
08:20:09 | akiradeveloper | The latter is done through the use of an await macro which behaves similar to C#'s await. |
08:20:37 | gokr | But the words "await" and "async" are listed as keywords now (although implemented as macros) - right? |
08:21:04 | gokr | Simply to "reserve" them I guess. |
08:21:22 | * | gokr crawls back to bash |
08:31:54 | * | reem joined #nim |
08:32:12 | * | Trustable joined #nim |
08:32:50 | * | Boscop_ quit (Quit: Boscop_) |
08:35:00 | * | reem quit (Remote host closed the connection) |
08:37:29 | * | reem joined #nim |
08:47:56 | * | reem quit (Remote host closed the connection) |
08:51:37 | * | reem joined #nim |
08:56:10 | * | akiradeveloper quit (Quit: Page closed) |
08:57:50 | * | reem quit (Remote host closed the connection) |
09:01:13 | * | reem joined #nim |
09:03:06 | * | epichero joined #nim |
09:05:45 | * | BlaXpirit quit (Quit: Quit Konversation) |
09:07:08 | fowl | ok i looked at asyncdispatch's macros |
09:08:35 | * | reem quit (Remote host closed the connection) |
09:10:45 | fowl | await doesnt exist, its scanned for in {.async.} procs |
09:13:03 | * | reem joined #nim |
09:15:45 | * | reem quit (Remote host closed the connection) |
09:19:04 | * | tumult joined #nim |
09:32:41 | * | reem joined #nim |
09:35:54 | * | randomwalk joined #nim |
09:36:33 | randomwalk | I wrote these simple statistics functions since I didn't see them in the standard library: http://pastebin.com/aPyCXGFz |
09:36:44 | randomwalk | Comments on my style? |
09:38:03 | randomwalk | I tested it by comparing the results to what the same functions return in OpenOffice (Excel) |
09:39:42 | randomwalk | def-: I summon you. :^) |
10:07:49 | randomwalk | I have a seq[tuple]. Is there an idiom to iterate over just one of the columns (seq[fieldx of tuple])? |
10:21:27 | * | bjz joined #nim |
10:37:57 | * | bjz quit (Ping timeout: 252 seconds) |
10:47:17 | randomwalk | How can I fix this? http://pastebin.com/3xYZ25FW |
10:48:56 | * | reem quit (Remote host closed the connection) |
10:53:40 | randomwalk | I fixed it. Also found a compiler bug. :) |
10:59:59 | randomwalk | Bug: http://pastebin.com/SY8RpDAU |
11:00:28 | fowl | that isnt a bug |
11:02:17 | fowl | you cant index a tuple by a variable because the fields would be different types |
11:02:40 | def- | const col = 1 works |
11:03:29 | fowl | typeinfo may work for you |
11:03:29 | def- | randomwalk: don't create a result variable, there is one automatically and it's initialized to 0 already. Also, don't return it |
11:04:04 | def- | randomwalk: when you have values that won't change, use "let" instead of "var" |
11:05:29 | def- | instead of (float(i) + 1.0) I'd add first, then convert to float |
11:06:07 | def- | len(vx)-1 is the same as high(vx) |
11:07:05 | def- | And we write the colon like without a preceding space: "vy: openarray[float]" |
11:07:12 | randomwalk | def-: Thx. Why is there let and const? |
11:07:37 | def- | randomwalk: as you just saw const is sometimes required even |
11:08:20 | def- | but in general the reason is to specify whether a value is set only once at compile time, only once at runtime, or as often as you want at runtime |
11:09:18 | def- | it's good style to use the least powerful one that works (const -> let -> var) |
11:09:32 | def- | and allows the compiler to do more advanced optimizations |
11:10:03 | randomwalk | If the compiler could suggest const, that might be helpful. |
11:12:56 | def- | Maybe it could but I think it's useful to think about that manually so you are aware of where assignments happen in your code (but maybe that's just me) |
11:15:06 | * | chemist69_ quit (Quit: WeeChat 1.1.1) |
11:15:15 | * | chemist69 joined #nim |
11:16:46 | randomwalk | def-: I understand your explanation (compile time vs. runtime) |
11:19:29 | randomwalk | def-: When I remove the "return result" line, the result is wrong. |
11:19:51 | def- | randomwalk: because you create your own result variable, shadowing the actual one |
11:21:49 | * | bjz joined #nim |
11:22:17 | randomwalk | def-: How's this? http://pastebin.com/4eiK27Lb |
11:23:08 | def- | randomwalk: you can remove both returns and all vars |
11:23:08 | randomwalk | My error string is slightly wrong, but I'll change that |
11:23:35 | def- | apart from that it looks good |
11:23:47 | randomwalk | def-: Does the compiler not optimize out the vars? |
11:24:10 | def- | randomwalk: it's also for human readers of the code |
11:24:27 | def- | so they can immediately see that this variable will not be overwritten |
11:24:55 | randomwalk | you mean make the vars lets? |
11:24:59 | def- | yes |
11:25:23 | randomwalk | what is return for then if we just do result = instead? |
11:25:48 | def- | for me it's similar to the const -> let -> var thing |
11:25:55 | randomwalk | ya |
11:26:15 | def- | in this case I would implicitly return covar(vx, vs) without "result = " and "return" |
11:26:59 | def- | "return" breaks the control flow, so it's more powerful than "result = " |
11:28:10 | randomwalk | http://pastebin.com/zmFDUJE3 |
11:28:13 | def- | implicit return values -> result = -> return |
11:28:48 | def- | randomwalk: try removing the "result = ", it still works |
11:30:25 | randomwalk | http://pastebin.com/cVDv4999 |
11:32:27 | randomwalk | def-: now I will write the cointegration score from the Augmented Dickey Fuller test. I am writing a stock analysis program. :) |
11:39:28 | randomwalk | def-: Is there an idiom to grab a tuple column from a seq[tuple], returning a seq? |
11:40:14 | def- | randomwalk: I guess you could use map from system or mapIt from sequtils |
11:41:05 | * | federico3 quit (Quit: WeeChat 0.3.8) |
11:44:56 | * | reem joined #nim |
11:47:40 | randomwalk | This fails: map(a, proc(x:tuple):float = x[1]) # Error: value of type 'seq[float]' has to be discarded |
11:48:04 | def- | assign it to a variable or echo it |
11:49:22 | randomwalk | maybe I don't want map. I want to return seq[float] |
11:49:24 | * | reem quit (Ping timeout: 256 seconds) |
11:50:17 | def- | then return the result of map? |
11:52:56 | randomwalk | thx :) echo(map(...)) |
11:53:23 | randomwalk | I was looking at the proc.... doh! |
11:54:51 | randomwalk | Should my/our new stat functions go in module math? :):):) |
11:56:40 | def- | if you think they're relevant enough you can try to make a pull request |
12:00:08 | * | randomwalk cools his jets... |
12:00:21 | fowl | two versions of map |
12:00:59 | randomwalk | fowl: why |
12:01:48 | fowl | one takes var param to modify in place, the other returns a new seq |
12:02:10 | randomwalk | I'll make a pull request later...I haven't done it in a while |
12:02:56 | randomwalk | oh, like map and map! |
12:03:25 | randomwalk | The exclamation mark is what means there's a storage side-effect in lisp |
12:03:45 | fowl | yes |
12:05:03 | randomwalk | fowl: what would you call the new version of map? |
12:05:19 | Maxdamantus | 00:47:24 < randomwalk> This fails: map(a, proc(x:tuple):float = x[1]) # Error: value of type 'seq[float]' has to be discarded |
12:05:27 | * | Maxdamantus hopes the `tuple` thing there is also incorrect. |
12:05:49 | randomwalk | Maxdamantus: it works without the tuple type specifier |
12:06:12 | fowl | map! i come from ruby and that is how array#map! works |
12:08:20 | Maxdamantus | randomwalk: so it works just with that constraint? |
12:08:38 | fowl | randomwalk, check out this lib for playing with tuples https://github.com/MasonMcGill/tuples |
12:08:44 | randomwalk | echo(map(a, proc(x):float = x[1])) |
12:09:17 | randomwalk | that's fowl, j/k I will look |
12:11:30 | randomwalk | fowl: nice. the get() proc does what I'm doing with map |
12:14:39 | randomwalk | fowl: I will try module tuples with nimble |
12:15:08 | fowl | he has some interesting stuff in here like recursive templates |
12:18:15 | randomwalk | fowl: module tuples does not compile |
12:21:02 | fowl | codegen error |
12:21:40 | fowl | i wonder if this is supposed to work? assert(().join == |
12:21:40 | fowl | ()) |
12:32:14 | randomwalk | can you quote an empty tuple? |
12:35:24 | fowl | its supposed to work |
12:36:20 | fowl | randomwalk, `()` is an operator |
12:37:43 | ekarlso | def-: would you be wanting to take a look at the play site stuff ? |
12:42:05 | randomwalk | ekarlso: Is it def, or is it fowl? :D |
12:42:31 | ekarlso | randomwalk: ? |
12:42:55 | randomwalk | def = cool, fowl = foul; lol |
12:43:02 | ekarlso | hah |
12:43:09 | ekarlso | I got some issues with it :/ |
12:45:05 | * | randomwalk likes fowl for lunch and dinner |
12:45:35 | * | reem joined #nim |
12:49:31 | ekarlso | guess noone is interested :p |
12:50:22 | * | reem quit (Ping timeout: 272 seconds) |
12:57:07 | def- | ekarlso: is it working? or do you mean the code of it? |
12:57:47 | ekarlso | def-: it's not fully working no :/ |
12:57:58 | ekarlso | for some reason when nim runs inside playpen stdout is ignored or smth |
12:59:16 | def- | stderr too |
12:59:16 | def- | ? |
12:59:31 | ekarlso | def-: you got tmatE? |
12:59:38 | ekarlso | or actually I need it only |
12:59:42 | ekarlso | I can show you if you'd like |
12:59:55 | def- | I'm pretty busy actually, sorry |
13:00:02 | ekarlso | ok... |
13:00:38 | ekarlso | let it be for now then :p |
13:02:23 | ekarlso | if anyone wants to help out please ping.. |
13:05:18 | dom96 | ekarlso: I may be able to help |
13:05:42 | ekarlso | gimme 10 dom96 and i'll fire off a tmate session |
13:06:42 | * | wb joined #nim |
13:10:10 | dom96 | ekarlso: I need to leave in ~20 minutes |
13:14:48 | * | BlaXpirit joined #nim |
13:15:48 | ekarlso | dom96: did you get my tmate message ? |
13:20:59 | dom96 | bbl |
13:26:35 | ekarlso | collect2: error: ld returned 1 exit status |
13:27:01 | ekarlso | that's from nim c |
13:28:26 | fowl | randomwalk, i made an issue for the error you found |
13:28:41 | ekarlso | https://bpaste.net/show/4c15916070e6 |
13:28:46 | ekarlso | rather is the full error output |
13:30:59 | ekarlso | what does -cc:ucc mean ? |
13:33:55 | * | epichero quit (Remote host closed the connection) |
13:38:32 | ekarlso | ok, it's now working ! :) |
13:38:34 | ekarlso | http://185.56.186.94/ |
13:41:27 | def- | ekarlso: that's cool. tcc would be nice for faster compilation |
13:43:20 | def- | ekarlso: and also to get output before the entire program is finished. I threw a few sleeps in there |
13:43:33 | ekarlso | def-: ? |
13:44:06 | ekarlso | def-: is tcc not available on fedora ? |
13:44:20 | def- | no idea |
13:44:43 | ekarlso | def-: how do you use that / enable it ? |
13:45:01 | def- | --cc:tcc |
13:45:13 | ekarlso | yeah, wasn't available on fedora :/ |
13:45:44 | def- | You could compile it from source: http://repo.or.cz/w/tinycc.git |
13:46:23 | def- | but really cool work |
13:46:36 | def- | I want to use your playpen thing in combination with my nim-unsorted repo |
13:46:45 | def- | to have a bunch of nice, runnable examples |
13:47:09 | ekarlso | def-: I was thinking of switching it to angular (dont hate me) |
13:47:18 | ekarlso | and store all runs |
13:55:47 | * | mpthrapp joined #nim |
14:10:59 | ekarlso | ok def- switched to tcc |
14:11:27 | * | TEttinger quit (Ping timeout: 264 seconds) |
14:14:36 | * | leon_lee quit (Ping timeout: 272 seconds) |
14:18:46 | def- | ekarlso: then you can't do anything with randomness I guess |
14:21:20 | ekarlso | def-: hmmm i'll make it a setting then :) |
14:34:50 | ekarlso | hah |
14:34:55 | ekarlso | who was playing with while loops ? :p |
14:53:49 | * | Triplefox quit (Ping timeout: 255 seconds) |
15:04:32 | ekarlso | Araq: does nim have some smart safeguard against infinite loops ? |
15:17:08 | * | johnsoft quit (Ping timeout: 244 seconds) |
15:17:55 | * | johnsoft joined #nim |
15:21:03 | * | zahary1 joined #nim |
15:21:59 | * | zahary quit (Read error: Connection reset by peer) |
15:23:42 | * | zahary joined #nim |
15:25:51 | * | zahary1 quit (Ping timeout: 264 seconds) |
15:37:22 | * | Triplefox joined #nim |
15:48:09 | * | zahary1 joined #nim |
15:49:44 | * | zahary quit (Ping timeout: 246 seconds) |
15:50:17 | def- | ekarlso: you should have limited cpu time and so on and just abort the program after the limit is over |
15:57:03 | * | ChrisMAN joined #nim |
16:00:01 | * | johnsoft quit (Ping timeout: 244 seconds) |
16:00:11 | * | darkf quit (Quit: Leaving) |
16:00:44 | * | johnsoft joined #nim |
16:13:34 | * | jholland joined #nim |
16:17:10 | dom96 | ekarlso: that's really cool |
16:17:21 | dom96 | ekarlso: works very fast too |
16:19:59 | dom96 | The old logo looked nicer on the nim-lang github org page IMO. |
16:20:01 | dom96 | Who changed it? |
16:20:33 | fowl | ekarlso, thats neat |
16:27:47 | ekarlso | def-: but how -,,- |
16:34:12 | * | Jehan_ joined #nim |
16:38:26 | def- | ekarlso: i thought that's just what playpen is for |
16:38:57 | def- | ekarlso: it's listed in the playpen features at least |
16:39:09 | def- | "An optional timeout can take care of automatically killing the contained processes." |
16:41:35 | * | Matthias247 joined #nim |
16:48:48 | BlaXpirit | dom96, flaviu changed it |
16:53:05 | * | pregressive joined #nim |
17:03:21 | ekarlso | BlaXpirit: changed what ? |
17:04:50 | def- | ekarlso: 17:19 < dom96> The old logo looked nicer on the nim-lang github org page IMO. |
17:06:26 | ekarlso | ah ok :p |
17:16:09 | ldlework | Any news on completion in Aporia? |
17:16:33 | * | vendethiel- joined #nim |
17:18:16 | * | vendethiel quit (Ping timeout: 255 seconds) |
17:19:55 | * | tumult quit (Ping timeout: 246 seconds) |
17:26:06 | * | xet7 quit (Quit: Leaving) |
17:26:06 | * | ruzu quit (Read error: Connection reset by peer) |
17:26:37 | * | ruzu joined #nim |
17:32:28 | dom96 | ldlework: try out the new-suggest branch |
17:32:37 | dom96 | you need to press Ctrl+Space to activate it |
17:32:49 | dom96 | there is still some issues on Linux |
17:33:01 | dom96 | well, more like major issues because it doesn't really work |
17:40:05 | ldlework | :/ |
17:40:14 | ldlework | I'll give it a couple more months. |
17:43:12 | * | gokr quit (Ping timeout: 246 seconds) |
17:46:03 | * | gokr joined #nim |
17:48:15 | * | mpthrapp quit (Remote host closed the connection) |
17:53:30 | * | mpthrapp joined #nim |
18:15:26 | * | fizzbooze joined #nim |
18:34:25 | * | gsingh93 joined #nim |
18:38:24 | * | kniteli_ quit (Quit: Leaving) |
18:50:17 | * | kniteli joined #nim |
18:52:38 | Araq | ping Varriount |
18:59:42 | * | fizzbooze quit (Ping timeout: 252 seconds) |
19:01:19 | * | davidhq joined #nim |
19:03:52 | * | Demos joined #nim |
19:06:42 | * | jfchevrette joined #nim |
19:13:18 | ChrisMAN | urho3d indiedb page is up finally. http://www.indiedb.com/engines/urho3d. thanks nimrods \m/ |
19:15:15 | Araq | ChrisMAN: hey thanks, but what did we do to help with it? |
19:17:27 | ChrisMAN | i did all the working getting the indiedb page up but am just genarally thankful for your contribution to the growth of urho |
19:17:40 | * | brson joined #nim |
19:38:11 | Araq | ChrisMAN: yeah, I think we also have minor patches we'll contribute back |
19:40:11 | * | alexruf joined #nim |
19:43:53 | * | epichero joined #nim |
19:44:36 | * | alexruf quit (Client Quit) |
19:44:55 | * | fizzbooze joined #nim |
19:47:58 | Araq | hrm still 3 show stopper bugs left |
19:56:19 | Araq | dom96: why does Aporia have problems on Linux? I tried the 'import times; times.' example and it works on win |
19:59:23 | * | Mat4 joined #nim |
19:59:30 | Mat4 | hi all |
20:03:34 | * | UberLambda joined #nim |
20:09:40 | dom96 | Araq: no idea. |
20:09:52 | dom96 | Araq: There seems to be an issue with nimsuggest but also a separate one with Aporia. |
20:10:03 | dom96 | When a thread exits it segfaults |
20:10:14 | dom96 | (See mailing list) |
20:13:23 | * | jsudlow joined #nim |
20:22:27 | * | epichero quit (Remote host closed the connection) |
20:23:13 | * | epichero joined #nim |
20:28:48 | * | enquora joined #nim |
20:32:39 | reactormonk | does ./koch tests run the stdlib tests in the files themselves too? |
20:32:49 | Araq | yes |
20:34:21 | reactormonk | cool |
20:34:22 | Araq | it used to not do it, but now it does |
20:34:45 | reactormonk | So I should migrate the tests I put into tests/ back into the stdlib files? |
20:35:29 | Araq | nah, it still tests things are properly exported |
20:35:41 | Araq | if the test is in a different file |
20:35:55 | reactormonk | I put any tests into tests/ even with stdlib |
20:36:30 | reactormonk | https://github.com/Araq/Nim/pull/2231 <- wanna keep it consistent, at least to a certain degree. |
20:41:34 | Araq | reactormonk: the PR is fine the way it is |
20:41:53 | reactormonk | Araq, yeah, figured. I did it the other way a few times, time to move code? |
20:42:21 | Araq | reactormonk: no time to give me your PR that does the 'result' shadowing check |
20:42:39 | Araq | the tests are in good shape, better work on something more important |
20:42:41 | reactormonk | Araq, oh right |
20:46:57 | def- | Araq: you're aware that many tests still fail? or is that just my system? |
20:49:40 | Araq | these are my results: "total": 895, "passed": 849, "skipped": 29 |
20:50:44 | reactormonk | Araq, ah, I found the reason why I didn't push it. |
20:51:11 | reactormonk | How can I make this fail: https://gist.github.com/reactormonk/6559aab85a7ad9627507 ? |
20:51:14 | Araq | def-: that's a quota of 98,1% |
20:51:23 | reactormonk | it doesn't check for the warning. |
20:51:38 | reactormonk | aka it doesn't fail when it doesn't output the warning. |
20:51:40 | Araq | reactormonk: there is a new 'nimout' spec entry for this |
20:52:02 | reactormonk | thanks |
20:52:39 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
20:53:31 | reactormonk | Araq, the error message could be better: https://gist.github.com/reactormonk/6559aab85a7ad9627507 |
20:53:59 | Araq | so fix it |
20:54:20 | Araq | I'm not spending my time wondering what to do next. |
20:55:40 | * | fizzbooze quit (Ping timeout: 256 seconds) |
20:59:58 | * | epichero quit (Remote host closed the connection) |
21:02:58 | Mat4 | ciao |
21:03:05 | Mat4 | have some work to do |
21:03:09 | * | Mat4 quit (Quit: Verlassend) |
21:05:32 | * | BlaXpirit quit (Quit: Quit Konversation) |
21:07:36 | * | BlaXpirit joined #nim |
21:15:19 | dom96 | Araq: release soon? |
21:16:47 | Araq | meh |
21:19:57 | * | enquora quit (Remote host closed the connection) |
21:25:04 | reactormonk | Araq, can I add new fields to TSpec? I have one for msg, where can I put what I expected, and now I'm missing one for what was given |
21:25:31 | reactormonk | the other solution would be string return values |
21:26:06 | * | fizzbooze joined #nim |
21:26:21 | * | sampwing joined #nim |
21:31:43 | * | Sembei quit (Ping timeout: 244 seconds) |
21:32:31 | Araq | reactormonk: er what? are you sure you understood how the TSpec works? |
21:32:50 | reactormonk | Araq, probably not |
21:33:17 | Araq | there are 2 of them. expected and given |
21:35:50 | reactormonk | Ok. |
21:41:37 | * | sampwing quit (Ping timeout: 252 seconds) |
21:43:22 | * | Trustable quit (Remote host closed the connection) |
21:44:09 | * | Trustable joined #nim |
21:47:32 | * | bjz joined #nim |
21:47:40 | * | bjz quit (Client Quit) |
21:48:28 | Varriount | Araq: You called? |
21:50:02 | reactormonk | got (TResult, TTest, string, string, TResultEnum) tester.addResult(r: var TResults, test: TTest, expected: string, given: string, success: TResultEnum) |
21:50:07 | onionhammer | Varriount I added snippets :3 |
21:50:09 | reactormonk | find the difference. |
21:51:12 | Araq | Varriount: do you happen to know if the selDiff Query in the tester works? |
21:51:36 | Varriount | Araq: Not off hand. I'm guessing you want me to find out? |
21:51:52 | Araq | not really |
21:54:11 | reactormonk | Araq, https://gist.github.com/reactormonk/9779abe2b8701e6ea73d too noisy or good? |
21:54:13 | flaviu | dom96: Yep, I did. I feel that it's best to be consistent with the branding, using one thing here and another thing there isn't as effective. |
21:55:31 | dom96 | flaviu: It appears to me that you resized the image incorrectly - it looks squished to me. |
21:55:53 | dom96 | So the branding is certainly not consistent |
21:56:58 | reactormonk | Would it be possible to write specific iterator `..`*[S, T](a: S, b: T): T {.inline.} for the high(T) case? Wasn't there some kind of optimization mathers? |
21:57:39 | Araq | reactormonk: too noisy but you can make the tester pass --hint[Path]:off to the compiler |
21:57:51 | Araq | and --hint[Processing]:off |
21:58:13 | reactormonk | Araq, I hope they're not tested anywhere |
21:58:22 | Araq | nah |
21:58:43 | Araq | reactormonk: the problem is it could be high(T) at runtime |
21:58:57 | Araq | though that's very rare |
22:00:29 | reactormonk | Araq, sounds like something that goes into overflow checks |
22:01:04 | Araq | reactormonk: I think we should simply do: |
22:01:34 | Araq | when T is not bigger than int: ... use int as the counter and bounds |
22:01:55 | Araq | else: use int64 as the counter and bounds |
22:02:28 | Araq | and document that it fails for high(int). big deal. |
22:03:02 | reactormonk | and high(int64) ;-) |
22:03:15 | Araq | there have been done quite some experiments by AdrianV |
22:03:34 | Araq | and essentially everything is slower than what we have now |
22:04:37 | * | mpthrapp quit (Remote host closed the connection) |
22:07:16 | reactormonk | Araq, https://gist.github.com/reactormonk/153db97bdafda0a16fe2 acceptable? |
22:07:27 | reactormonk | Hm, casting around ints to chars shouldn't be slower? |
22:07:36 | * | elbow_jason joined #nim |
22:08:15 | Araq | it's free |
22:09:11 | Araq | reactormonk: acceptable. |
22:09:24 | reactormonk | let's see if you like the code changes. |
22:09:32 | flaviu | It's only free on little endian |
22:09:40 | reactormonk | btw: https://github.com/Araq/Nim/pull/2274 |
22:09:45 | flaviu | dom96: Yep, I see. I'll try to get a fix out. |
22:09:50 | reactormonk | flaviu, hm. How many systems are not little endian? |
22:10:32 | flaviu | I don't think there are any popular systems that are big endian, ARM supports both. |
22:10:42 | Araq | flaviu: char to int conversions are everywhere in C so CPUs had no choice but to make them very fast |
22:10:44 | flaviu | But it looks like no one uses big endian arm. |
22:11:02 | * | UberLambda quit (Remote host closed the connection) |
22:11:24 | Araq | it's not a check, so no branch prediction is involved, nor is it a memory access |
22:11:42 | flaviu | Araq: You said free ;) |
22:14:48 | * | jfchevrette quit (Quit: Textual IRC Client: www.textualapp.com) |
22:21:50 | * | BitPuffin quit (Ping timeout: 244 seconds) |
22:26:36 | * | TEttinger joined #nim |
22:35:10 | * | Trustable quit (Remote host closed the connection) |
22:36:31 | * | reem joined #nim |
22:38:33 | * | Varriount left #nim ("Leaving") |
22:43:31 | * | epichero joined #nim |
22:44:58 | flaviu | dom96: Done. Fairly minor distortion (.21 vs .23), but yeah, it was obvious. |
22:45:13 | flaviu | I also cropped more tightly this time. |
22:45:22 | * | asdf_ joined #nim |
22:46:36 | dom96 | flaviu: Still doesn't look right here: https://github.com/nim-lang |
22:47:11 | flaviu | Yeah, caches. It'll eventually update. It should be updated on https://github.com/organizations/nim-lang/settings/profile |
22:47:14 | * | pregressive quit () |
22:48:29 | Araq | OderWat_: *if* you feel like it please look into http://forum.nim-lang.org/t/969 |
22:48:52 | * | epichero quit (Ping timeout: 272 seconds) |
22:49:19 | Araq | looks my "Ansi C compliant" malloc implementation is not compliant enough for OpenSSL on Mac |
22:50:44 | * | Varriount joined #nim |
22:52:16 | OderWat_ | @Araq OK but that has to wait a bit because I need to fix a strange bug in a company project first. BTW github jobe2015 is working in our company and currently gets paid to look at Nim :) I thought that is funny to mention that I pay a person which started to fix the docs :-) which she was not even supposed to do. I think she likes Nim so far. |
22:53:44 | Araq | wow. nice! |
22:55:08 | Varriount | :D |
22:55:55 | * | asdf_ quit (Ping timeout: 246 seconds) |
22:59:33 | * | Varriount|Mobile joined #nim |
23:02:48 | Araq | OderWat_: well you know she can always come here and ask us questions about the inner workings of the compiler. it's a complex beast. |
23:04:32 | OderWat_ | Yeah. I was looking since some months for a "compiled" language I want to use for some projects in the future and to eventually create a new backend for our main product. |
23:04:33 | Jehan_ | Araq: (1) OpenSSL does a lot of fishy stuff and (2) OS X ships with an old version of OpenSSL. Either could be an issue. |
23:05:48 | Araq | Jehan_: thinking about it ... I wrapped the thread local allocator. if OpenSSL uses some threading this will fail |
23:05:54 | OderWat_ | Short story is that I decided on Nim in the end and we made a budget to get a second person working with it such that its not only me (cause I am mr doitall anyway) |
23:06:13 | Jehan_ | Araq: Hmm, that may be a possible cause. |
23:06:47 | dom96 | OderWat_: That's brilliant news! |
23:07:00 | Araq | in fact, I don't know why we even overwrite the allocator. dom96 ? |
23:08:06 | dom96 | Araq: I remember that there were some issues when I just told it to use alloc, dealloc, realloc. |
23:08:16 | dom96 | Can't remember what they were though. |
23:08:23 | Araq | well I do. |
23:08:33 | Araq | but why did you set them in the first place? |
23:08:54 | dom96 | OpenSSL requires it I think. |
23:09:04 | Araq | nah it doesn't |
23:09:09 | Araq | we never set them on windows |
23:11:01 | dom96 | Araq: what's the problem with it anyway? |
23:11:12 | Araq | it doesn't work on mac |
23:13:14 | dom96 | Does it work if CRYPTO_set_mem_functions is not called? |
23:13:42 | Araq | read the forum. yes it does. |
23:15:34 | dom96 | link? |
23:17:06 | Araq | read the logs. |
23:17:37 | dom96 | oh I see it |
23:19:20 | dom96 | If somebody could verify that SSL still works without CRYPTO_set_mem_functions then we can just remove it. |
23:19:27 | dom96 | *works on Linux |
23:19:29 | Jehan_ | Hmm, the function is deprecated on OS X, but it's there. |
23:20:12 | dom96 | Finding OpenSSL docs is annoyingly difficult. |
23:20:23 | Jehan_ | Would be nice to have actual documentation … yeah. |
23:20:31 | OderWat_ | if you want me to run some code I can do that quickly.. |
23:20:38 | Araq | no heart bleed thanks to our custom allocator which even fails when nobody is attacking :-) |
23:21:06 | Jehan_ | Well, because OS X has an outdated OpenSSL library, it was never vulnerable to heartbleed. |
23:21:17 | Jehan_ | Blessing in disguise and all that. |
23:21:18 | OderWat_ | I just need to fire myself... for writing == instead of >= while checking for a date >= 2015-01-01 .. my good :( |
23:21:49 | Araq | sounds like SQL fun |
23:28:32 | * | Sembei joined #nim |
23:28:36 | OderWat_ | nope... it's php. We do Datev + SAP + other cool stuff with PHP in realtime... that error changes the paid salary of people by some 100k in one company... well but not anymore :) |
23:29:44 | Araq | hrm fowl used to work on a SAP binding, but it was closed source work iirc |
23:33:15 | * | mpthrapp joined #nim |
23:33:25 | OderWat_ | It is really hard to describe what we do. Basically we do software for time tracking, billing and statistics + boni / forecasts, communication and a lot more for currently 6 companies with >20k employees total. Software is in development since 10 years and still growing every day. most is written by me and there are properties of it which makes interesting even for really big companies. But much of that is just because it is tightly integrated with how the |
23:33:25 | OderWat_ | clients work internally. |
23:33:28 | Jehan_ | OderWat_: Stories like that make be grateful that I'm working in academia. :) |
23:37:53 | * | BlaXpirit quit (Quit: Quit Konversation) |
23:39:58 | reactormonk | Araq, how do I check best for "same results"? |
23:41:48 | OderWat_ | BTW .. with "We do Datev + SAP + other cool stuff with PHP in realtime.." I did not mean we use SAP/Datev but that we do the same as they do .. with PHP... one of our clients was former sap integrator. I have to believe him that our stuff is better :-P ... |
23:42:33 | Araq | 'tester html' and then check testsresults.json at the bottom "diff" entry |
23:43:11 | Araq | it checks against the test results of the previous commit so you better have those too |
23:47:26 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:47:56 | mpthrapp | This might be slightly off topic, but what nim editor do you recommend for Ubuntu? |
23:48:18 | def- | mpthrapp: You can see support for editors here: https://github.com/Araq/Nim/wiki/Editor-Support |
23:48:45 | mpthrapp | def-: Yeah, I'm looking at that list now, I'm just new to Linux, and I was wondering what the community thought was the best. |
23:49:15 | def- | If you're familiar with vim or emacs, these should work. Aporia is an IDE/editor written in Nim itself. Sublime seems to have a really nice Nim plugin. |
23:50:10 | mpthrapp | def-: I've poked around at Vim and Aporia. I'll give Sublime a shot. My ideal editor would have autocomplete for the stdlib, is there one that does that |
23:51:18 | def- | there is work going into just that for Nim (nimsuggest), so that editors can use it |
23:51:26 | def- | It should land in Aporia first |
23:51:52 | mpthrapp | def-: Awesome, thanks. I liked Aporia other than that, so if nothing has it, I'll use Aporia. |
23:52:08 | Araq | it landed in aporia but it's still buggy on linux, apparently |
23:52:39 | OderWat_ | Can somebody (@Araq?) tell me why that fails for me? https://gist.github.com/oderwat/9d9f1ff286036a4f03b8 .. I can't create the docs because of that. |
23:53:29 | Araq | OderWat_: that's a strange bug caused by some clang and gcc versions afaict |
23:54:03 | Araq | as a workaround 'koch boot' without -d:release seems to fix it |
23:54:33 | OderWat_ | ok i try |
23:56:25 | Araq | I could never reproduce it :-/ |
23:56:27 | OderWat_ | @araq confirmed.. works for me this way. |
23:58:01 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:58:30 | mpthrapp | I'm having an issue install Aporia through nimble. It says https://bpaste.net/show/d8c0018987a7 |
23:58:47 | mpthrapp | s/install/installing |
23:59:37 | def- | nimble install "aporia@#head" |
23:59:57 | mpthrapp | Oh, duh. Yup, just saw that on the install instructions. :P |