00:05:44 | transfuturist | what should i use in place of a word type? |
00:05:53 | transfuturist | unsigned? |
00:07:07 | transfuturist | well, no, that still wouldn't let me use streams with unsigned types |
00:07:19 | transfuturist | the unsigned separation is a pain. |
00:08:06 | transfuturist | ah, read() is generic, good |
00:31:10 | * | vendethiel quit (Ping timeout: 272 seconds) |
00:46:52 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
00:47:36 | * | banister joined #nim |
00:48:39 | * | BitPuffin quit (Ping timeout: 256 seconds) |
01:05:27 | * | gmpreussner|lapt quit (Quit: Leaving) |
01:07:59 | * | askatasuna joined #nim |
01:09:45 | * | filwit quit (Quit: Leaving) |
01:13:53 | * | pregressive joined #nim |
01:18:25 | * | pregressive quit (Ping timeout: 255 seconds) |
01:30:35 | transfuturist | .eval var a: seq[int] = nil |
01:31:10 | transfuturist | > > |
01:31:15 | transfuturist | where's mimbus? |
01:35:00 | transfuturist | Araq: do you think you could add a sugar for object refs? |
01:35:11 | transfuturist | so you can do type Foo = ref object ... |
01:35:21 | transfuturist | instead of making two types for each |
01:36:12 | transfuturist | wait, that already seems to work |
01:36:35 | Triplefox | That's the preferred style now, i think |
01:43:04 | * | saml_ quit (Remote host closed the connection) |
01:48:34 | * | adam| is now known as adam12 |
01:49:44 | * | noob_ joined #nim |
01:50:12 | noob_ | Hey can anyone tell me how I could dereference an object through an argument for a procedure? |
01:50:34 | def- | noob_: obj[] or what do you mean? |
01:52:11 | noob_ | well I've defined an object, lets call it screen. Screen has values xPos, and yPos. I'm passing it into a function like so add( addr screenObj ) |
01:52:35 | noob_ | how can I dereference screenObj in add, so that I can get dynamic values for xPos and yPos |
01:52:43 | def- | noob_: any reason you pass it as a ptr? |
01:52:54 | noob_ | Mostly because I'm unsure on how to use it dynamically |
01:53:20 | noob_ | Because I'm pretty sure arguments are static values |
01:53:22 | noob_ | right? |
01:53:31 | def- | do you want to manipulate the passed object? then make it "proc add(x: var Screen) = ..." |
01:53:40 | noob_ | Ohh |
01:53:43 | noob_ | Gotcha |
01:53:46 | noob_ | Didn't know that was legal |
01:54:02 | Triplefox | You could do it the c way but it's not really idiomatic |
01:54:18 | def- | a ptr would work as well, but it's unsafe and bad style, and you have to manually dereference with screenObj[] in some places |
01:54:57 | renesac | and there is the "ref" keyword in the middle |
01:55:47 | noob_ | So I can just pass it into add like so : add(screenObj) |
01:56:00 | def- | noob_: right |
01:56:01 | renesac | yes |
01:56:10 | renesac | or screenObj.add() |
01:56:54 | renesac | with or w/o the parenthesis (but as you are making a change, I advise the parenthesis to indicate that an action is being made, not just an field access) |
01:57:34 | noob_ | I'm getting an illegal capture. |
01:57:52 | def- | noob_: what does your full code look like? |
01:58:01 | noob_ | proc makeScreen*( obj: var screen, canvas: proc() ): proc() = |
01:58:12 | noob_ | makeScreen(panel, drwFunc) |
01:58:23 | noob_ | where panel is a screen |
01:58:44 | noob_ | more specifically its a var panel = screen |
01:59:15 | def- | hm, don't understand the error. Have a paste? |
01:59:49 | def- | ah, you're returning a proc that uses obj |
02:00:04 | def- | that's not legal because obj may not exist anymore, while the proc may still exist |
02:00:15 | def- | so it would write into wrong memory |
02:00:52 | noob_ | Gotcha |
02:01:14 | noob_ | What would you suggest? |
02:01:44 | def- | Not sure what you're trying to do. Making screen a ref type might work, then you don't need the var anymore |
02:03:11 | noob_ | Essentially I'm just drawing a 3D/2D panel, and then rotate it around |
02:03:36 | noob_ | But Yea, you got me the tools to figure out the problem |
02:03:37 | noob_ | Cheers |
02:03:40 | noob_ | I appreciate it |
02:03:58 | def- | I'm not sure why makeScreen returns a proc |
02:04:15 | noob_ | It has to do with our current drawing implementation |
02:04:20 | noob_ | its a bit rudementary |
02:04:36 | noob_ | Essentially it just loops through a sequence of procedures |
02:04:39 | noob_ | and calls them |
02:05:24 | renesac | and now is my turn: https://gist.github.com/ReneSac/912219fbf0cfc87f4440 |
02:05:45 | renesac | why the procs/iterators that return "var T" arent working? |
02:06:08 | renesac | (they are commented out) |
02:06:15 | * | anthony_ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
02:06:52 | renesac | the compiler gives the rather unhelpfull message: seqviews.nim(111, 15) Error: identifier expected, but found '' |
02:07:40 | def- | renesac: pass in a var SeqView[T] and don't yield a var |
02:07:48 | def- | don't yield a ref* i mean |
02:09:04 | renesac | indeed, that fixes the mitems |
02:09:23 | renesac | but what is wrong with the [] that returns a var T? |
02:09:29 | renesac | I can't overload it that way? |
02:10:15 | def- | should work in devel, let's see |
02:10:55 | def- | it works with a return s.data[s.base + x] |
02:11:25 | def- | may be a compiler bug/limitation |
02:11:39 | renesac | oh |
02:11:46 | renesac | it is because I call a template first |
02:12:03 | def- | right, but without the var return type it works, which seems inconsistent |
02:12:18 | renesac | yeah, it is strange |
02:17:37 | def- | I would suggest to use implicit return value (without result or return) with one liners only, easier to understand |
02:18:29 | renesac | right |
02:18:34 | renesac | for the most part I do it |
02:21:30 | renesac | now everything looks to be working right |
02:21:44 | renesac | thanks |
02:23:27 | * | leonlee joined #nim |
02:25:44 | * | Kingsquee quit (Quit: Konversation terminated!) |
02:27:43 | * | gsingh93 quit (Ping timeout: 244 seconds) |
02:29:34 | * | anthony joined #nim |
02:29:57 | * | anthony is now known as Guest76077 |
02:31:03 | * | askatasuna quit (Quit: WeeChat 1.1.1) |
02:34:37 | * | wb quit (Ping timeout: 264 seconds) |
02:40:15 | * | egrep joined #nim |
02:40:16 | * | darkf joined #nim |
02:40:29 | * | vendethiel joined #nim |
02:43:22 | * | Demon_Fox quit (Ping timeout: 265 seconds) |
02:43:59 | * | pregressive joined #nim |
02:44:53 | dhasenan | Huh, so apparently if you want to wrap a constructor for a templated C++ class in Nim, the importcpp argument you need to provide is "'0(@)". |
02:44:56 | dhasenan | That's...strange. |
02:45:36 | renesac | it's araq that invented this syntax |
02:46:00 | renesac | what would you preffer instead? |
02:46:24 | dhasenan | Well, from other usages, it looks like '0 indicates the first template parameter in the current context. |
02:46:55 | dhasenan | So I should have something like: proc constructPODVector[T] {.importcpp: "Urho3D::PODVector<'0>(@)".} |
02:47:26 | dhasenan | (Adding in arg list and so forth.) |
02:47:35 | renesac | well, you should talk with Araq about that... |
02:47:41 | dhasenan | I'll file a ticket. |
02:48:56 | * | Demon_Fox joined #nim |
02:53:20 | fowlmouth | dhasenan, what is the question |
02:57:04 | * | Kingsquee joined #nim |
02:59:13 | fowlmouth | https://github.com/Araq/Nim/blob/6fb372d96bade748aa6cb3484fef2118b4585f26/doc/nimc.txt#L457 |
02:59:19 | * | Demon_Fox quit (Ping timeout: 265 seconds) |
02:59:24 | * | brson quit (Quit: leaving) |
03:03:50 | dhasenan | fowlmouth: the question is https://github.com/Araq/Nim/issues/2578 |
03:03:56 | dhasenan | It's not a question, just an observation. |
03:05:42 | * | vendethiel quit (Ping timeout: 272 seconds) |
03:07:04 | fowlmouth | importcpp: "'0(@)" |
03:07:50 | fowlmouth | oh |
03:07:52 | dhasenan | Right. |
03:08:13 | dhasenan | And there doesn't appear to be a way to wrap `template <typename T> int foo(T)`. |
03:08:20 | dhasenan | Fortunately, I don't need to do that right now. |
03:08:53 | fowlmouth | hhh |
03:12:02 | fowlmouth | dhasenan, got it |
03:12:19 | fowlmouth | the return type is '0 |
03:13:24 | dhasenan | Oh. So you can't wrap `template <typename T> int foo(Bar<T>)` |
03:14:08 | fowlmouth | yes. that would be proc foo [x] (some:x): int {.importcpp:"foo<'1>(@)", nodecl.} |
03:15:37 | dhasenan | Nope. |
03:15:54 | dhasenan | That would wrap `template <typename T> int foo(T)`. |
03:16:15 | fowlmouth | ok |
03:16:26 | fowlmouth | ? lol |
03:17:24 | fowlmouth | pity i dont have all day to sit here and write code for free |
03:17:45 | dhasenan | I'm not asking you to. |
03:23:11 | fowlmouth | i think importcpp is messed up |
03:23:36 | dhasenan | Sometimes, yes. But the basics work. |
03:37:43 | fowlmouth | dhasenan, you should reopen that issue, it is a bug |
03:37:58 | fowlmouth | here the difference is between 'argument' and 'parameter' https://github.com/Araq/Nim/blob/6fb372d96bade748aa6cb3484fef2118b4585f26/doc/nimc.txt#L457 |
03:42:51 | dhasenan | fowlmouth: templates don't have return types, so that doesn't make much sense. |
03:43:17 | dhasenan | It looks like a breaking but intended change in behavior. |
03:43:21 | fowlmouth | dhasenan, templates aren't relevant here |
03:43:46 | fowlmouth | you're frustrating. i'm out |
03:47:06 | * | pregressive quit (Remote host closed the connection) |
03:54:20 | * | gsingh93 joined #nim |
03:55:28 | * | ChrisMAN quit (Ping timeout: 255 seconds) |
04:06:50 | * | Guest76077 quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
04:10:17 | * | transfuturist quit (Quit: Lost terminal) |
04:32:56 | * | johnsoft quit (Ping timeout: 240 seconds) |
04:34:01 | * | johnsoft joined #nim |
04:46:42 | * | gsingh93 quit (Ping timeout: 244 seconds) |
04:47:18 | * | anthony joined #nim |
04:47:41 | * | anthony is now known as Guest46751 |
04:50:23 | * | transfuturist joined #nim |
04:54:15 | transfuturist | does nim not have libraries to handle non-UTF8 unicode? |
04:54:43 | tstm | Does nim handle utf8 variable names? |
04:54:55 | tstm | eg. emoticons and such |
04:55:19 | transfuturist | i'm talking about sequences of unicode as a type, not variable names |
04:55:42 | tstm | Yeah, I got it. But it just reminded me of something I wanted to ask some time ago. :P |
04:56:24 | tstm | For your question, I don't know. UTF16 and such are pretty important to support database things etc. |
04:56:54 | transfuturist | maybe bindings to iconv will work |
04:58:29 | transfuturist | speaking of bindings to desirable features, i'm wondering if using a c library for coroutines would work for nim, like libconcurrency |
05:01:44 | transfuturist | probably not... |
05:18:06 | transfuturist | ah, iconv seems to be abandoned... |
05:19:48 | transfuturist | the changelog is 5 years old, ick |
05:20:07 | transfuturist | let's try it straight from the source |
05:20:10 | transfuturist | http://site.icu-project.org/download |
05:25:37 | * | vendethiel joined #nim |
05:33:19 | * | a5i quit (Quit: Connection closed for inactivity) |
05:37:07 | * | Guest46751 quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
05:43:06 | * | anthony joined #nim |
05:43:30 | * | anthony is now known as Guest34916 |
05:44:00 | Araq | transfuturist: we have encodings.nim in the stdlib already |
05:46:34 | * | johnsoft quit (Ping timeout: 272 seconds) |
05:46:52 | * | johnsoft joined #nim |
05:50:42 | * | wb joined #nim |
05:51:06 | * | leonlee quit (Quit: Leaving) |
05:51:18 | * | smelod joined #nim |
05:53:32 | * | vendethiel quit (Ping timeout: 272 seconds) |
05:54:06 | Araq | dhasenan: I can see no breaking changes |
05:54:44 | Araq | the proc types are used because -- guess what -- we don't have the list of generic types at this stage in the compiler anymore |
05:55:43 | Araq | fowlmouth: proc p(param: int) = ... |
05:55:46 | Araq | p(arg) |
05:56:03 | Araq | that's the difference. arg is what you pass, param is the formal parameter |
06:02:00 | * | gsingh93 joined #nim |
06:09:10 | * | gokr quit (Quit: Leaving.) |
06:11:21 | * | BlaXpirit joined #nim |
06:25:24 | * | OnO joined #nim |
06:27:19 | * | Guest34916 quit (Ping timeout: 245 seconds) |
06:27:33 | reactormonk | Araq, need some different format from nimsuggest, can I just parse the compiler output via writelnHook? |
06:27:57 | Araq | omg, no |
06:28:10 | Araq | you *can* do that, but it's insane |
06:28:27 | Araq | just patch compiler/suggest.nim instead |
06:28:33 | reactormonk | Yes, I know it's insane. |
06:29:14 | Araq | we like to have a --json switch so everything the compiler emits is in json format |
06:29:23 | Araq | would that help you? |
06:29:49 | reactormonk | Kinda, but it's not json since emacs doesn't have a native lib for that and elisp is slooooow and linking code to emacs... bleh |
06:31:17 | transfuturist | >emacs |
06:31:20 | reactormonk | the protocol needs to know the full message because the first for bytes are the message size, so I need to have all suggesting in a seq - could I rewrite the suggestX stuff to return their suggestings instead? |
06:31:34 | reactormonk | transfuturist, they're working on it/stallman |
06:31:37 | * | endragor joined #nim |
06:33:21 | Araq | hrm I see |
06:33:44 | Araq | so you would simply emit the 4 bytes length before the message in the writelnHook? |
06:36:40 | reactormonk | nope, I need to compile the full answer. the protocol is question - response. So question would be "suggest names at X with dirtyfile Y" and the answer needs to be the full list at once |
06:36:57 | reactormonk | I can't send incrementally. |
06:37:50 | Araq | ok |
06:38:06 | Araq | you need to override the hook for that, but you don't need to parse things then |
06:38:25 | Araq | you need to patch nimsuggest.nim |
06:39:00 | * | vendethiel joined #nim |
06:39:46 | Araq | just add a couple of lines for emacs support to the serve() proc and implement an --emacs command line option |
06:40:17 | Araq | hacking support into it for specific editors is valid, that's why we split it from the main compiler |
06:40:49 | * | dhasenan__ quit (Remote host closed the connection) |
06:42:36 | reactormonk | so basically remove suggestWriteln(symToStr(....)) and rename it to suggestSym() and either print it or yield it to the hook? can I go break apis? |
06:43:27 | Araq | you don't have to change any of that, everything goes via the hook already |
06:44:40 | reactormonk | yes, but the information is in string form in the hook already |
06:45:20 | Araq | I thought you only need to concat these strings in your hook implementation and then output length+concatened stuff |
06:46:08 | reactormonk | then you'd have (answer . ("suggest ...." "suggest ....")) and would have to parse it on the emacs side? |
06:46:24 | Araq | but yes, you can also change the API as long as the protocol remains the same |
06:46:35 | Araq | it's not a public API |
06:47:03 | reactormonk | ok, I'll go do that instead. Should also make --json easier since you only have to package the object |
06:47:33 | Araq | make a proper PR because code review |
06:47:33 | reactormonk | need to go sleep, o/ |
06:47:37 | reactormonk | sure |
06:47:40 | Araq | ok bye |
06:53:43 | * | cmk_zzz_ joined #nim |
07:04:01 | * | transfuturist quit (Ping timeout: 264 seconds) |
07:07:48 | * | endragor_ joined #nim |
07:09:54 | * | endragor quit (Ping timeout: 246 seconds) |
07:12:24 | * | thotypous quit (Ping timeout: 244 seconds) |
07:14:24 | * | cmk_zzz_ quit (Ping timeout: 245 seconds) |
07:15:55 | * | thotypous joined #nim |
07:17:03 | * | vendethiel quit (Ping timeout: 245 seconds) |
07:19:55 | * | endragor_ quit (Remote host closed the connection) |
07:24:05 | * | untitaker quit (Ping timeout: 248 seconds) |
07:26:06 | * | untitaker joined #nim |
07:26:51 | * | cmk_zzz_ joined #nim |
07:37:50 | * | bcinman quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
07:44:44 | * | vendethiel joined #nim |
07:45:56 | * | Trustable joined #nim |
07:55:34 | * | bjz joined #nim |
07:59:34 | * | bjz quit (Client Quit) |
08:00:00 | * | bjz joined #nim |
08:05:37 | * | HakanD_ joined #nim |
08:06:13 | * | bjz quit (Ping timeout: 248 seconds) |
08:07:30 | * | coffeepot joined #nim |
08:09:42 | * | vendethiel quit (Ping timeout: 272 seconds) |
08:11:04 | * | gsingh93 quit (Ping timeout: 256 seconds) |
08:11:27 | * | jeffburdges joined #nim |
08:14:13 | * | zahary1 joined #nim |
08:14:48 | * | endragor joined #nim |
08:14:51 | * | zahary quit (Read error: Connection reset by peer) |
08:19:23 | * | superfunc joined #nim |
08:24:46 | * | Pisuke joined #nim |
08:37:54 | * | vendethiel joined #nim |
08:42:58 | * | superfunc quit (Quit: Page closed) |
08:44:22 | * | smelod quit (Ping timeout: 244 seconds) |
08:45:10 | * | bjz joined #nim |
08:50:58 | * | Demon_Fox joined #nim |
08:59:53 | * | gokr joined #nim |
09:00:56 | * | vendethiel quit (Ping timeout: 240 seconds) |
09:01:58 | * | jeffburdges quit (Quit: jeffburdges) |
09:05:00 | OnO | hi |
09:05:31 | Araq | hey |
09:05:39 | OnO | Araq: regarding this column numbering, to you just want getColNumber to return starting with 0 |
09:05:48 | OnO | but is it okay diagnostics to start with 1 ? |
09:06:06 | Araq | no, diagnostics need to start with 0 too |
09:06:28 | Araq | 1. this is documented and important for idetools |
09:06:35 | Araq | 2. IMHO it makes more sense anyway |
09:07:34 | Araq | columns are "between" the characters, so they should start at 0. |
09:08:56 | OnO | ouch, but editors such as emacs expect 1 to be first column? |
09:09:41 | OnO | even Visual Studio starts column with 1 |
09:09:47 | Araq | dunno, Aporia starts with 0 |
09:10:23 | def- | oooh, that explains why the column output of nim always seemed wrong by 1! |
09:10:37 | Araq | -.- |
09:11:17 | def- | I think most editors start line and column numbers with 1 |
09:11:23 | OnO | and yes! Python dianostics start with 1 too! |
09:11:51 | Araq | ugh, so yet another thing we have to change for consistency with stupidity |
09:12:35 | repax | For error messages meant to be read by people I prefer visual feedback over column numbers, i.e: |
09:12:37 | repax | Syntax error here: ------^ |
09:13:48 | Araq | at least it's consistent with line numbering then |
09:13:52 | * | Araq sighs |
09:14:33 | OnO | indeed |
09:16:19 | OnO | repax: adding this is another step for user friendly diagnostics |
09:17:27 | repax | OnO: Clang is a good inspiration. It can even mark column intervals |
09:17:52 | Araq | repax: we can do the --------^ too but I forgot which command line switch enables it |
09:18:12 | repax | Oh, nice. I didn't know |
09:20:01 | OnO | template optPrintSurroundingSrc*: expr = |
09:20:02 | OnO | gVerbosity >= 2 |
09:20:24 | HakanD_ | fwiw, sublime text also starts from 1 |
09:21:17 | Araq | strange. it's as if programmers suddenly cannot count from 0 anymore :P |
09:21:50 | HakanD_ | i've also wandered why the column no is always one off, assumed it's buggy and stopped using the column no all together (: |
09:22:34 | OnO | honestly I think Nim should internally count from 0, but just output diagnostics from 1 |
09:22:37 | OnO | just when printing |
09:22:38 | Araq | no, it's not buggy :P it's correct when everybody else is wrong |
09:22:45 | Araq | OnO: yup, make it happen please |
09:22:51 | HakanD_ | (: |
09:22:54 | cmk_zzz_ | as long as it is consistent I wouldn't care |
09:23:06 | OnO | but it is now all f.. up, lines start with 1 (internally), column from 0 |
09:24:00 | Araq | OnO: making it consistent internally is too much work |
09:24:14 | HakanD_ | well, theoretically it's correct, not sure about practicality |
09:24:31 | Araq | quite some stuff depends on line, col numbers internally |
09:25:14 | OnO | so hey, I will just remove change to getColNumber but add +1 to lexMessage family? |
09:25:26 | Araq | yes |
09:25:41 | Araq | and patch Aporia too then ;-) |
09:30:56 | Araq | you also need to patch a couple of places in msgs.nim |
09:34:36 | * | TEttinger quit (Ping timeout: 264 seconds) |
09:36:54 | * | gokr quit (Ping timeout: 250 seconds) |
09:37:11 | OnO | updated https://github.com/Araq/Nim/pull/2566 see 1st commit |
09:38:00 | OnO | I just patched liMessage |
09:38:34 | OnO | seems everything else calls that |
09:41:36 | OnO | as for Aporia, I am on OSX, but "Since Aporia uses gtk, and gtk is not easy to compile natively under MacOSX (yet)" |
09:42:58 | Araq | you don't have to run Aporia, just patch it and let us review and merge it |
09:44:02 | OnO | okie, let me try |
09:55:21 | OnO | https://github.com/nim-lang/Aporia/pull/82 |
09:57:19 | BlaXpirit | Araq, I can replace isMainModule with defined(testing) |
09:57:35 | BlaXpirit | but how to change the tester for this? |
09:57:54 | Araq | you can grep for isMainModule in the tester |
09:58:04 | Araq | it's a primitive implementation |
09:58:18 | BlaXpirit | ah i see testStdlib |
09:58:37 | Araq | BlaXpirit: btw I tested the new pcre and can confirm it just works on windows too |
09:59:02 | BlaXpirit | Araq, but it may not work with some features |
09:59:10 | BlaXpirit | dll should be updated |
10:01:36 | BlaXpirit | nah, I can't make sense of the testing code |
10:01:47 | BlaXpirit | another problem i have is how to actually define testing |
10:01:58 | BlaXpirit | and also I don't see why the code is not run |
10:02:10 | BlaXpirit | it looks like it's supposed to run the executable |
10:02:47 | Araq | there is a cmd const you can update so that -d:testing is always passed |
10:04:32 | BlaXpirit | ok ok but i still don't know why it isn't actually run |
10:05:09 | Araq | you need to fake the TSpec into a runnable test |
10:05:41 | Araq | needs more patches I guess :P |
10:05:47 | BlaXpirit | maybe it's best that you just do it |
10:06:07 | * | arnetheduck joined #nim |
10:06:17 | Araq | well but you can update the isMainModule usages in the stdlib |
10:06:21 | BlaXpirit | yes |
10:06:27 | Araq | ok great |
10:06:44 | BlaXpirit | would also need to drop broken stuff |
10:06:58 | BlaXpirit | some isMainModule should stay |
10:07:43 | Araq | exactly |
10:10:03 | * | vendethiel joined #nim |
10:11:20 | BlaXpirit | https://github.com/Araq/Nim/blame/devel/lib/pure/pegs.nimfix ??? |
10:12:13 | Araq | I think we can remove that file by now |
10:12:49 | Araq | nimfix doesn't work anyway, for some reason |
10:13:32 | * | Kingsquee is now known as flopsquid |
10:17:10 | BlaXpirit | Araq, a little problem. |
10:17:15 | BlaXpirit | every imported module is tested |
10:17:48 | def- | when isMainModule and defined(testing): ? |
10:18:01 | BlaXpirit | i suppose ... |
10:18:22 | BlaXpirit | but no |
10:18:24 | Araq | hrm? |
10:18:33 | BlaXpirit | i run actors.nim -d:testing |
10:18:39 | BlaXpirit | and got a failing test in times.nim |
10:19:04 | Araq | aye, def-'s suggestion is a good one? |
10:19:04 | BlaXpirit | def-, problem with that is, when isMainModule blocks will still be run |
10:19:18 | BlaXpirit | i'm leaving some isMainModule blocks as they were |
10:21:07 | BlaXpirit | different approach: leave testing in isMainModule |
10:21:27 | BlaXpirit | but change non-test blocks to when not defined(testing) and isMainModule |
10:21:43 | Araq | that's a good idea too |
10:21:56 | Araq | there should only be a few of these |
10:28:20 | * | wb quit (Ping timeout: 265 seconds) |
10:30:25 | * | Ven joined #nim |
10:32:52 | * | vendethiel quit (Ping timeout: 244 seconds) |
10:36:04 | * | vendethiel joined #nim |
10:46:27 | * | HakanD_ quit (Quit: Be back later ...) |
10:46:35 | * | BitPuffin joined #nim |
10:46:40 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
10:46:54 | * | gokr_ quit (Ping timeout: 245 seconds) |
10:46:56 | * | HakanD_ joined #nim |
10:51:04 | * | jfchevrette joined #nim |
10:51:04 | * | HakanD_ quit (Ping timeout: 245 seconds) |
10:51:12 | * | Ven joined #nim |
10:55:40 | BlaXpirit | looks like romans is broken |
10:55:45 | BlaXpirit | can i fix it in the same pull request |
10:55:55 | BlaXpirit | really dont wanna make mant of them |
10:55:58 | BlaXpirit | many |
10:56:22 | Araq | throw it out of the stdlib ? |
10:56:30 | Araq | why does the stdlib need roman numbers? |
10:56:51 | BlaXpirit | it's cool lol |
10:57:12 | BlaXpirit | you wrote it yourself |
10:57:17 | Araq | this should be a nimble package |
10:57:30 | BlaXpirit | make it so, but later |
10:57:34 | BlaXpirit | for now i'll just fix it |
10:57:38 | Araq | well no, I adapted it years ago. ok. |
10:57:48 | Araq | I didn't write the original code I think |
10:58:01 | BlaXpirit | says (c) Copyright 2011 Philippe Lhoste |
10:59:42 | Araq | that's not my name |
11:00:02 | BlaXpirit | oh yeah, i didnt mean it as confirmation |
11:00:08 | Araq | I don't even know how to speak Lh |
11:00:17 | BlaXpirit | first i looked that it was committed by you |
11:00:21 | BlaXpirit | then saw this |
11:00:57 | Araq | proc decimalToRoman*(number: range[1..3_999]): string lol |
11:01:18 | Araq | the romans could only count until 3999 |
11:01:29 | Araq | no wonder they needed slaves for everything |
11:02:18 | BlaXpirit | Can there be `echo` in testing code? |
11:02:25 | BlaXpirit | will it output during testing phase? |
11:02:41 | Araq | well kind of |
11:02:51 | Araq | the tester compares this against the given spec |
11:02:59 | BlaXpirit | just asking if i need to wrap every echo in when not defined(testing): |
11:03:03 | Araq | but there is no spec section for stdlib modules |
11:03:20 | Araq | you need to transform the echos into asserts |
11:03:44 | BlaXpirit | that's a different task |
11:03:57 | Araq | that's a necessary task |
11:04:30 | * | cmk_zzz_ quit (Ping timeout: 276 seconds) |
11:05:10 | * | wb joined #nim |
11:10:45 | BlaXpirit | times has a test that takes year out of range[-10_000..10_000] |
11:10:59 | BlaXpirit | and it's intentional |
11:11:56 | BlaXpirit | i mean it intentionally wants to get # Fri 7 Jun 19:20:45 BST 30143 but year range is too small |
11:12:29 | BlaXpirit | I don't see any point in this arbitrary range anyway |
11:12:50 | Araq | arbitrary boundaries is the nature of computing |
11:13:28 | Araq | but I guess we can make 'year = int' |
11:13:42 | BlaXpirit | https://github.com/Araq/Nim/commit/4fbba0a#diff-91d68bf578ea4bbef60621e73245f542L114 |
11:14:33 | BlaXpirit | times module was not tested since 8 Jul 2012 lol |
11:14:57 | Araq | bbs |
11:21:24 | * | vendethiel quit (Ping timeout: 264 seconds) |
11:25:03 | * | vendethiel joined #nim |
11:30:46 | * | jefus joined #nim |
11:41:18 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:46:39 | * | flopsquid quit (Quit: Konversation terminated!) |
11:47:06 | * | OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
11:48:48 | * | Senketsu joined #nim |
11:49:47 | * | Ven joined #nim |
12:00:25 | * | BitPuffin quit (Remote host closed the connection) |
12:10:40 | BlaXpirit | hardcoded mimetypes? okaay |
12:10:50 | BlaXpirit | who's gonna maintain it? nobody? |
12:25:39 | BlaXpirit | strutils formatSize is broken |
12:25:39 | * | zahary1 quit (Read error: Connection reset by peer) |
12:34:21 | * | HakanD_ joined #nim |
12:35:12 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
12:36:25 | * | vendethiel quit (Ping timeout: 256 seconds) |
12:42:51 | * | vendethiel joined #nim |
12:43:14 | * | HakanD__ joined #nim |
12:47:12 | * | HakanD_ quit (Ping timeout: 264 seconds) |
12:52:53 | * | mpthrapp joined #nim |
12:56:17 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:03:53 | * | Ven joined #nim |
13:04:27 | * | vendethiel quit (Ping timeout: 265 seconds) |
13:07:33 | Araq | BlaXpirit: what's the alternative? some bloated mimetype library that only works on unix and reads crap from /etc/bananajoe? |
13:07:51 | BlaXpirit | at least some good way to maintain it |
13:08:35 | Araq | what's your definition of "maintain"? add every mimetype under the sun? |
13:08:52 | BlaXpirit | for example, where were the current mimetypes taken from? |
13:09:03 | Araq | if a new important mimetype comes along, somebody will create a PR |
13:09:42 | BlaXpirit | that is ridiculous |
13:09:54 | BlaXpirit | "having only old mimetypes and ones that someone needed" |
13:10:06 | Araq | why? this way the module stays lean and useful |
13:10:25 | * | devzerp quit (Ping timeout: 256 seconds) |
13:10:25 | * | no_name quit (Ping timeout: 256 seconds) |
13:10:31 | Araq | "having thousands of crapware bloating everything that wants mimetype support" |
13:10:45 | BlaXpirit | wut |
13:11:30 | BlaXpirit | i assume it was stolen from here http://cpansearch.perl.org/src/RRWO/Media-Type-Simple-v0.30.6/share/mime.types |
13:12:00 | BlaXpirit | or maybe they stole from the same place |
13:12:20 | Araq | well you can make it read some file at compile-time if you feel like it |
13:12:41 | BlaXpirit | that's exactly what i wanted |
13:18:28 | Araq | *shrug* having to add 3 lines of code per decade has hardly anything to do with maintenance |
13:19:17 | BlaXpirit | Araq, the point is not how many lines you would add |
13:19:25 | BlaXpirit | but how you would detect what and when to add!!! |
13:19:39 | Araq | somebody who actually needs it will tell you. |
13:20:30 | * | vendethiel joined #nim |
13:20:46 | Araq | it's the same with time: who cares if the stdlib's time doesn't support the Maya calendar? |
13:21:35 | * | pregressive joined #nim |
13:21:36 | BlaXpirit | no |
13:21:51 | BlaXpirit | whatever, pointless arguing with you |
13:22:34 | * | pregressive quit (Remote host closed the connection) |
13:22:54 | * | jfchevrette quit (Quit: Textual IRC Client: www.textualapp.com) |
13:31:28 | * | Varriount|Busy joined #nim |
13:33:01 | Varriount|Busy | When writing a binary literal, why is '0b1000000000000000' (0b + 16 digits) invalid for a 16-bit integer? |
13:34:25 | BlaXpirit | Varriount|Busy, isn't that 1 more than |
13:34:48 | BlaXpirit | no |
13:35:02 | BlaXpirit | ah, it is |
13:35:15 | BlaXpirit | 0b1000000000000000 < 1<<15 - False |
13:38:24 | Varriount|Busy | BlaXpirit: Huh? |
13:39:26 | BlaXpirit | Varriount|Busy, let me put it this way |
13:39:28 | BlaXpirit | 0b1000000000000000 > int16.high |
13:40:16 | BlaXpirit | 0b111111111111111 == int16.high |
13:41:07 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
13:41:27 | * | vendethiel quit (Ping timeout: 244 seconds) |
13:41:31 | Varriount|Busy | BlaXpirit: But isn't that only 15 bits? |
13:41:45 | BlaXpirit | Varriount|Busy, it is |
13:41:51 | BlaXpirit | 1 bit is for sign |
13:42:05 | Araq | Varriount|Busy: use uint16 'u16 |
13:42:14 | Varriount|Busy | Ah, Ok. |
13:42:53 | Varriount|Busy | I was under the expectation that the binary notation would include the sign bit. |
13:42:58 | * | no_name joined #nim |
13:42:59 | * | devzerp joined #nim |
13:43:14 | BlaXpirit | i don't think it ever does |
13:45:03 | * | vendethiel joined #nim |
13:45:35 | Varriount|Busy | no_name, devzerp: You're the same person? |
13:45:42 | Varriount|Busy | Also, Hi. |
13:47:14 | * | noob_ quit (Quit: Page closed) |
13:53:16 | * | Ven joined #nim |
13:54:09 | * | HakanD__ quit (Quit: Be back later ...) |
13:54:36 | * | HakanD__ joined #nim |
13:55:13 | Varriount|Busy | Araq: So, my final project in my CS course for this semester is to write an interpreter. |
13:55:41 | Araq | for what? |
13:56:07 | Varriount|Busy | Araq: Nothin in particular. We're supposed to model a simplified processor. |
13:56:11 | Varriount|Busy | *Nothing |
13:56:41 | BlaXpirit | oh that's fun. once i made a mediocre asm interpreter |
13:57:19 | Varriount|Busy | I currently have 31 opcodes. Nim's 'enum' mechanism is proving very useful. |
13:59:24 | BlaXpirit | turning opcodes into binary and then interpreting the binary would be horrible though |
13:59:25 | Araq | make it process a subset of Nim ;-) |
13:59:28 | BlaXpirit | i hope that is not what u have to do |
13:59:48 | BlaXpirit | what i meant to say: turning commands into binary and then interpreting the binary would be horrible though |
14:00:01 | Araq | BlaXpirit: that's not horrible at all |
14:00:52 | Araq | Varriount|Busy: if you want advice: don't model a stack machine |
14:01:03 | Araq | design a register based machine |
14:01:23 | thotypous | unless you plan to run forth in the machine :) |
14:02:32 | Araq | in my not so humble opinion register based machines are much easier |
14:04:46 | Varriount|Busy | Araq: Well, the layout is very simple. One register, 4096 * 16 bytes of memory, no flags, etc. |
14:05:18 | renesac | Varriount|Busy: I just opened a bug related to that, I should add binary notation too |
14:05:21 | renesac | https://github.com/Araq/Nim/issues/2539 |
14:05:51 | renesac | see the alternatives I copied there |
14:06:23 | Varriount|Busy | Gotta go, Calculus class calls. |
14:06:27 | * | Varriount|Busy quit (Quit: Page closed) |
14:09:55 | * | vendethiel quit (Ping timeout: 256 seconds) |
14:10:46 | Araq | renesac: The following should work: |
14:10:48 | Araq | let foo: int8 = 0xFF |
14:10:49 | Araq | Er no. why? |
14:11:34 | Araq | 0xff is obviously 255. |
14:11:40 | thotypous | and int8 is signed |
14:11:43 | thotypous | so out of range |
14:11:56 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:11:58 | * | justicefries joined #nim |
14:12:21 | renesac | well, the reason why I think this is in the title: Hex literals should represent bit-patterns, not numbers. |
14:12:43 | Araq | that ignores the problem though |
14:12:54 | Araq | you need to give it a *type* |
14:13:20 | Araq | and let foo: typeHere = nowGuessTypeFromHereProperly is not part of the language |
14:14:04 | BlaXpirit | literals should be literals |
14:14:22 | BlaXpirit | until the last possible moment |
14:14:33 | renesac | yeah, it should be some "bitpattern" convertible to the "typeHere" |
14:14:39 | thotypous | that depends if you assume the literal to be unsigned and cast it to signed when reaching the int8 declaration |
14:15:02 | thotypous | IMHO the default for literals should be signed |
14:15:13 | BlaXpirit | wut |
14:15:14 | thotypous | because that is the convention in nim |
14:15:28 | BlaXpirit | no language has this |
14:15:32 | thotypous | Test.java:3: error: incompatible types: possible lossy conversion from int to byte |
14:15:34 | thotypous | byte n = 0xff; |
14:15:36 | BlaXpirit | what are you even talking about |
14:15:43 | * | jeffburdges joined #nim |
14:15:57 | BlaXpirit | thotypous, it is a signed byte, isnt it |
14:15:59 | Araq | BlaXpirit: "no language has this" continues to be a non-argument. |
14:16:20 | Araq | we all know where to find Java and C++. |
14:16:31 | * | pregressive joined #nim |
14:16:46 | Araq | (which amusingly don't agree on this point at all) |
14:17:26 | thotypous | java agrees with nim because it only has signed integers |
14:17:33 | thotypous | which is the default in nim |
14:17:38 | thotypous | but C++ doesn't |
14:18:30 | BlaXpirit | oh well, i don't remember a language that got integer literals right |
14:18:52 | BlaXpirit | a language that doesn't have built in long arithmetics, anyway |
14:19:17 | Araq | bignums don't help for hexadecimal literals |
14:19:33 | renesac | well, when one writes 0b1000000000000000 he is not thinking on the number behind this, but on the bit pattern |
14:19:39 | BlaXpirit | i'm not trying to bring bignum into this topic |
14:19:41 | renesac | well, arguably one should use uints for that |
14:19:59 | renesac | but it is so incredibly ankward to use them in nim that people avoid it |
14:20:08 | Araq | that's good :P |
14:20:09 | renesac | even for those obvious things |
14:20:09 | BlaXpirit | just that python got integer literals right but it doesn't count |
14:20:12 | * | johnsoft quit (Ping timeout: 272 seconds) |
14:20:14 | renesac | Araq: that is bad |
14:20:15 | renesac | :P |
14:20:20 | * | johnsoft joined #nim |
14:21:02 | * | Ven joined #nim |
14:21:58 | thotypous | then nim could have bit pattern literals like verilog :P |
14:22:14 | thotypous | 16'b1000_1011_1001_1011 |
14:24:33 | thotypous | Araq: in nim-lang.org/tut2.html, "Macros have to be implemented in pure Nim code if the foreign function interface (FFI) is not enabled in the compiler" seems to imply there is some option to enable FFI at compile-time, but i couldn't find anything related in koch options, did i misunderstood? |
14:25:10 | renesac | thotypous: it is simply not supported |
14:25:22 | * | vendethiel joined #nim |
14:25:32 | renesac | I think it used to be an option... |
14:25:36 | BlaXpirit | confusing wording |
14:26:04 | Araq | thotypous: no, it used to be supported via some define |
14:26:29 | thotypous | hmm so that's the reason the REPL outputs messages like "lib/system.nim(2285, 6) Error: cannot 'importc' variable at compile time"? |
14:26:38 | BlaXpirit | yes |
14:26:50 | thotypous | thanks for the clarification |
14:26:59 | fowlmouth | i thought the repl was taken out behind the shed and shot already? |
14:27:03 | BlaXpirit | the REPL is barely usable btw |
14:27:15 | thotypous | is the support for FFI at compile-time supposed to return at some point? |
14:27:29 | Araq | the REPL is not documented anymore, but 'nim i' still exists |
14:27:50 | thotypous | (and also the REPL) |
14:28:08 | Araq | thotypous: not in its current form |
14:28:25 | Araq | there are thoughts of how to use TinyC to get a real REPL |
14:28:59 | Araq | and instead of compile-time FFI I'm working on a compiler plugin system |
14:29:11 | BlaXpirit | :/ |
14:29:36 | Araq | and there is always staticExec anyway |
14:30:25 | BlaXpirit | Araq, remember i was talking about macros, templates and found out about quote |
14:30:53 | BlaXpirit | what would be nice is if something like quote also supported control statements like https://gist.github.com/7e4a445f5c64ef658d2d |
14:32:01 | BlaXpirit | although it may even be impossible for a changing value, who knows |
14:32:04 | Araq | version 1 out and reasonable stable would be nicer though |
14:32:14 | BlaXpirit | yah |
14:32:32 | Araq | you can do it already anyway |
14:32:40 | BlaXpirit | do what |
14:32:44 | Araq | you think 'quote' is a builtin because it's magic |
14:32:52 | Araq | but it's only builtin to be faster |
14:33:07 | Araq | you can have your Nimception already |
14:33:16 | BlaXpirit | i know how to implement quote |
14:33:16 | Araq | you only need to implement it as a module |
14:33:45 | Araq | good |
14:33:46 | BlaXpirit | and I know how to implement compiletime string templates like i did here https://github.com/BlaXpirit/nimception/blob/master/nimception.nim |
14:33:57 | BlaXpirit | but i don't know how to make a combination of these |
14:35:18 | fowlmouth | you can stack macros |
14:35:41 | BlaXpirit | I kinda did |
14:35:43 | fowlmouth | hold on ill make an example |
14:36:25 | BlaXpirit | in the example I turn a string into code which outputs a string which is then executed |
14:37:24 | * | arnetheduck quit (Remote host closed the connection) |
14:38:49 | * | untitaker quit (Ping timeout: 256 seconds) |
14:39:38 | * | untitaker joined #nim |
14:41:52 | * | ingsoc joined #nim |
14:42:08 | ingsoc | wow, quite a crowd |
14:43:06 | ingsoc | the googlesphere is pretty thin on nim |
14:43:53 | * | untitaker quit (Ping timeout: 250 seconds) |
14:44:12 | BlaXpirit | so thin that it is rarely worth searching for anything outside site:nim-lang.org |
14:44:23 | ingsoc | I was wondering if there is some light weight concurrency features or libs planned |
14:44:37 | ingsoc | big like go channels |
14:44:40 | ingsoc | bit* |
14:44:51 | BlaXpirit | a lot of talk goes into this |
14:45:39 | * | untitaker joined #nim |
14:45:53 | fowlmouth | nim doesnt exist |
14:45:56 | fowlmouth | just ask wikipedia |
14:46:30 | ingsoc | BlaXpirit: if this can be done while providing seamless multicore utilisation then I predict massive pythonista adoption (with a lil help from establishing an active marketing department for nim) |
14:46:49 | ingsoc | this would then drive library support |
14:46:51 | federico2 | any suggested test framework? |
14:46:58 | BlaXpirit | federico2, unittest of course |
14:47:32 | * | banister joined #nim |
14:47:38 | * | banister quit (Max SendQ exceeded) |
14:47:56 | federico2 | ingsoc: why the multicore bit? |
14:48:04 | * | vendethiel quit (Ping timeout: 272 seconds) |
14:48:23 | fowlmouth | anybody who voted keep on the AFD discussion is canvassing |
14:48:46 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:48:46 | * | justicefries quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
14:48:49 | BlaXpirit | federico2, https://github.com/flaviut/nre/blob/master/test/init.nim :3 |
14:50:43 | federico2 | BlaXpirit: anything to do functional/integration testing as well? |
14:51:01 | ingsoc | federico2: because that is where things are headed HW wise, and it is a buzzword to pique interest, and also because a number of alternative of dynamic languages have fundamental designs that limit the ability to scale without extra work, and also becuase some of the other performant languages like ocaml also have a bad story regarding multi-core (afaict) |
14:51:06 | BlaXpirit | federico2, what's that |
14:51:18 | BlaXpirit | what's "functional" anyway |
14:51:25 | BlaXpirit | integration i can guess |
14:51:49 | * | vendethiel joined #nim |
14:52:17 | ingsoc | a channels library able to utililise multicore in a sane way would rock |
14:52:29 | ingsoc | or am i alone in this ? |
14:52:31 | ingsoc | :) |
14:52:37 | * | untitaker quit (Ping timeout: 264 seconds) |
14:53:13 | BlaXpirit | ping me when u answer |
14:53:20 | ingsoc | go seems to have more ceremony than go, has larger exe's and supports fewer platforms and is maybe slower |
14:53:30 | ingsoc | i mean more ceremony than NIM |
14:53:39 | * | untitaker joined #nim |
14:54:16 | dom96 | and has no generics |
14:54:19 | dom96 | no macros |
14:54:29 | dom96 | no indentation based syntax |
14:54:33 | * | banister joined #nim |
14:54:51 | ingsoc | dom96: yeah wordier, and I am not sure about c integration for go ? |
14:55:01 | ingsoc | how seamless it is ? |
14:55:03 | ingsoc | or not |
14:55:08 | dom96 | good question |
14:55:11 | dom96 | no idea |
14:55:16 | BlaXpirit | there is not a single thing that go is the best at. |
14:55:17 | dom96 | but I bet it's worse than Nim's beautiful C ffi :P |
14:55:26 | ingsoc | dom96: it can;t be nicer |
14:55:45 | ingsoc | (I have not used Nim in anger yet I only just found it be it looks the real deal |
14:56:08 | ingsoc | i was gonna jump on the rust bandwagon as it has become API stable |
14:56:12 | ingsoc | not so sure now |
14:57:07 | Araq | ingsoc: we have TChannel which is a bit ugly, but works |
14:58:38 | federico2 | ingsoc: I would choose a fast Python over a GIL-free Python any day. Unfortunately many people want buzzwords and shiny features |
14:59:31 | federico2 | BlaXpirit: what is functional testing in general? Anything with a bigger scope than unit testing and that interact with external components (e.g. filesystem, databases...) but is run in a testbed |
14:59:38 | ingsoc | federico2: given that choice of course. That doesn't mean wanting it is a buzzword or not possible |
15:00:05 | ingsoc | how can wanting to be able to utilize HW in a sane way a buzzword |
15:00:14 | ingsoc | be a buzzword* |
15:00:16 | ingsoc | : / |
15:00:20 | def- | one of the nice things about go is that you don't need forward declarations, even among different files |
15:00:46 | federico2 | well of course - if I didn't have to choose |
15:01:25 | ingsoc | federico2: i was just highlighting the issues with alternatives and where things like go are picking up users |
15:01:41 | * | Ven joined #nim |
15:03:31 | federico2 | ingsoc: I would imagine many Python devs giving Nim a try after being told "it's like Python but GIL-free" expecting a similar OO model and running away in panic :) |
15:04:41 | ingsoc | federico2: probably a proportion will run away, but then if thje blogosphere is anything to go by they are going to go which is arguably even more different |
15:07:14 | fowlmouth | ingsoc, nim's metaprogramming makes things possible that is only possible with compiler support in go |
15:07:43 | fowlmouth | i wrote a macro so that import_repo github.com/blah/blah works for ex |
15:11:59 | fowlmouth | thats the killer feature imo |
15:12:32 | ingsoc | fowlmouth: my interest in this is that if there is a language out there that enables similar productivity possibilities of slow dynamic languages like python/ruby etc. then this could be a huge win for high performance and data centres as the cost is increasingly coming down to power requirements needed to run your stack verses the cost to build and maintain the code, so if you could build in similar time and use 1/10th the HW then |
15:13:06 | * | darkf quit (Quit: Leaving) |
15:13:38 | * | bcinman joined #nim |
15:13:38 | * | bcinman quit (Client Quit) |
15:14:40 | * | vendethiel quit (Ping timeout: 272 seconds) |
15:15:08 | coffeepot | speaking of concurrency, does anyone use nim's "disjoint check" for parallel code? Seems like a nice feature for parallelism |
15:15:44 | ingsoc | fowlmouth: interesting re. macros, will have to have a look at Nim in more depth |
15:16:18 | Araq | coffeepot: it's still very "experimental" but I think some people out there use it :-) |
15:16:39 | coffeepot | it seems amazing, but I never see it mentioned - even on here! :D |
15:17:28 | ingsoc | lock free multi-threading ? |
15:17:55 | ingsoc | how can this be with all the time and investment moving into things like STM |
15:17:57 | ingsoc | etc. |
15:19:00 | Araq | ingsoc: well it's limited. but I still think it's a solid basis for *safe* GPU programming |
15:21:03 | renesac | I tried implementing a type of sipmle slices (I called it views) with minimum low level fidling, but I get that gc error: |
15:21:06 | renesac | https://gist.github.com/ReneSac/912219fbf0cfc87f4440 |
15:21:19 | renesac | the test and error are at the end |
15:23:00 | Araq | renesac: well @[1, 2, 3] is put into a const section, it doesn't start on the heap |
15:23:04 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
15:23:22 | Araq | so you cannot take it over to your stuff |
15:23:39 | Araq | you need to overload by AST constraints |
15:23:55 | Araq | and even then it's fragile |
15:24:10 | Araq | there is a reason why shallowCopy is unsafe ;-) |
15:25:09 | renesac | yeah, there is a reason |
15:25:20 | renesac | the system manual also teases at this, but don't explains it |
15:25:55 | Araq | make your view take a 'var seq'. This is safe to "capture" |
15:26:15 | renesac | the string is also put at the const section? |
15:26:21 | Araq | yes |
15:26:30 | renesac | I tried to force it on the heap, but wasn't successful |
15:26:34 | renesac | will try the var seq |
15:27:30 | renesac | in the end, I discovered that I wanted the same magic of OpenArray, but with the ability of limiting the range and working with strings |
15:30:44 | renesac | ok, now I get a nice compilation error for "var testDirect = view(@[1,2,3,4,5,6,7,8,9])" |
15:30:52 | renesac | but I still get the same runtime error for strings |
15:33:21 | renesac | gist updated |
15:35:27 | * | banister joined #nim |
15:48:38 | * | vince quit (Disconnected by services) |
15:49:17 | * | vinnie joined #nim |
15:54:57 | * | TEttinger joined #nim |
15:55:52 | * | ChrisMAN joined #nim |
15:56:41 | * | vendethiel joined #nim |
16:12:35 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:20:33 | * | OnO joined #nim |
16:31:26 | * | brson joined #nim |
16:41:24 | * | gsingh93 joined #nim |
16:50:57 | * | dhasenan left #nim (#nim) |
16:59:41 | * | TylerE_ is now known as TylerE |
17:03:35 | * | BlaXpirit_ joined #nim |
17:04:11 | * | vendethiel quit (Ping timeout: 265 seconds) |
17:06:10 | * | BlaXpirit_ quit (Client Quit) |
17:06:31 | * | BlaXpirit_ joined #nim |
17:06:42 | * | BlaXpirit quit (Ping timeout: 250 seconds) |
17:06:55 | * | pregressive quit (Remote host closed the connection) |
17:12:13 | * | jeffburdges left #nim (#nim) |
17:23:28 | * | vendethiel joined #nim |
17:43:00 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
17:52:55 | * | bougyman joined #nim |
17:53:22 | bougyman | is this an ok place to ask nimble questions? |
17:53:40 | * | pregressive joined #nim |
17:55:35 | * | HakanD___ joined #nim |
17:58:36 | * | HakanD__ quit (Ping timeout: 240 seconds) |
18:00:18 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
18:02:01 | def- | bougyman: sure |
18:02:43 | * | smelod joined #nim |
18:06:15 | * | endragor quit (Ping timeout: 250 seconds) |
18:07:36 | * | Pisuke quit (Ping timeout: 264 seconds) |
18:07:56 | bougyman | def-: basically https://github.com/nim-lang/nimble/issues/115 |
18:08:26 | bougyman | i'm very new to nim (like this-morning) so don't know how to test that ssl is working. |
18:08:49 | bougyman | is there a nim repl? |
18:09:55 | dom96 | bougyman: Can you try Nim 0.10.3? |
18:11:10 | thotypous | where is 0.10.3? "devel" branch? |
18:11:30 | bougyman | dom96: is that a release? |
18:11:39 | dom96 | devel branch |
18:11:44 | * | vendethiel quit (Ping timeout: 246 seconds) |
18:11:46 | dom96 | bougyman: no |
18:12:13 | BlaXpirit_ | bougyman, i don't find repl useful. it is much better to just have a window to write code in and press run |
18:12:29 | BlaXpirit_ | (aporia does that well) |
18:12:41 | BlaXpirit_ | but, there is this https://github.com/wheineman/nrpl |
18:13:02 | bougyman | BlaXpirit_: for me everything starts on the repl. |
18:13:08 | bougyman | blame LISP, it was my first language. |
18:13:16 | BlaXpirit_ | your loss |
18:14:03 | bougyman | a tightly-intergrated repl-editor-debugger loop doesn't feel like a loss, to me. everyone has the flow which suits them ebst. |
18:14:51 | thotypous | bougyman: there is "nim i", but it is currently very limited, most things don't run |
18:15:17 | BlaXpirit_ | disregard it |
18:28:39 | * | HakanD___ quit (Quit: Be back later ...) |
18:29:14 | * | HakanD___ joined #nim |
18:29:25 | * | vendethiel joined #nim |
18:32:08 | * | fichtl joined #nim |
18:33:13 | * | fichtl quit (Client Quit) |
18:33:19 | * | smelod quit (Quit: Leaving) |
18:33:22 | * | HakanD___ quit (Ping timeout: 250 seconds) |
18:44:22 | * | filcuc joined #nim |
18:48:43 | * | HakanD___ joined #nim |
18:51:26 | * | Pisuke joined #nim |
18:53:09 | * | filcuc quit (Ping timeout: 276 seconds) |
18:55:48 | * | filcuc joined #nim |
19:02:06 | * | ingsoc quit (Quit: Leaving.) |
19:02:37 | * | banister joined #nim |
19:17:58 | * | gsingh93 quit (Ping timeout: 255 seconds) |
19:18:25 | * | smodo joined #nim |
19:23:51 | * | HakanD___ quit (Quit: Be back later ...) |
19:24:51 | * | OnO quit (Quit: Textual IRC Client: www.textualapp.com) |
19:29:15 | * | ehaliewicz joined #nim |
19:30:26 | * | untitaker quit (Quit: ZNC - http://znc.in) |
19:45:32 | * | HakanD___ joined #nim |
19:46:12 | * | HakanD___ quit (Client Quit) |
19:54:28 | * | gokr joined #nim |
19:55:27 | * | TEttinger quit (Ping timeout: 250 seconds) |
19:57:51 | * | filwit joined #nim |
20:08:34 | * | renesac quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/) |
20:10:40 | * | HakanD___ joined #nim |
20:14:17 | * | smodo quit (Ping timeout: 256 seconds) |
20:14:17 | * | Ettore joined #nim |
20:23:45 | * | Matthias247 joined #nim |
20:30:44 | * | dhasenan joined #nim |
20:38:13 | * | filwit quit (Quit: Leaving) |
20:43:41 | * | justicefries joined #nim |
20:46:10 | * | justicefries quit (Client Quit) |
20:58:54 | * | BlaXpirit joined #nim |
20:59:27 | * | BlaXpirit_ quit (Quit: Quit Konversation) |
21:01:15 | * | Trustable quit (Remote host closed the connection) |
21:03:33 | * | BlaXpirit quit (Read error: Connection reset by peer) |
21:03:46 | * | BlaXpirit joined #nim |
21:05:36 | * | mpthrapp quit (Remote host closed the connection) |
21:23:54 | * | shodan45 joined #nim |
21:40:13 | * | justicefries joined #nim |
21:43:35 | * | ehaliewicz quit (Remote host closed the connection) |
21:46:41 | * | HakanD___ quit (Quit: Be back later ...) |
22:06:34 | ldlework | Can anyone tell me about Nim's feasibility in replacing the usecase of Vala? |
22:06:44 | ldlework | Just like, philosophically. I know not much has been done. |
22:09:32 | federico2 | oh, vala |
22:09:47 | ldlework | federico2: where the main problem being solved is gobject interoperability |
22:16:05 | federico2 | hm, it could be nice to have an introductory wiki page with a list of usage scenarios where Nim is a good fit and why (and where is not and why) |
22:18:22 | * | justicefries quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
22:21:36 | * | dhasenan left #nim (#nim) |
22:24:38 | Araq | federico2: write it ;-) |
22:26:20 | * | brson quit (Quit: leaving) |
22:28:41 | federico2 | gladly - where? |
22:28:59 | * | wb quit (Ping timeout: 265 seconds) |
22:29:40 | Araq | github wiki? |
22:30:01 | federico2 | I mean - at what location in the wiki? |
22:30:56 | BlaXpirit | new page called "an introductory wiki page with a list of usage scenarios where Nim is a good fit and why (and where is not and why)" |
22:33:45 | * | BlaXpirit quit (Quit: Quit Konversation) |
22:36:20 | * | Matthias247 quit (Read error: Connection reset by peer) |
22:42:11 | * | filcuc quit (Quit: Konversation terminated!) |
22:49:07 | * | justicefries joined #nim |
22:51:27 | * | elbow_jason joined #nim |
22:52:38 | * | thotypous quit (Quit: WeeChat 1.1.1) |
22:57:22 | * | elbow_jason quit (Remote host closed the connection) |
22:57:35 | * | elbow_jason joined #nim |
23:09:25 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:16:20 | * | justicefries quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
23:27:18 | * | a5i joined #nim |
23:34:24 | * | Ettore quit (Quit: Leaving.) |
23:34:42 | * | saml_ joined #nim |
23:43:09 | reactormonk | so where do I need to put nimsuggest such that it finds e.g. strutils? |
23:44:46 | Araq | nimsuggest is simply like 'nim' itself |
23:44:59 | Araq | dunno what's so hard to understand about it |
23:45:16 | Araq | where do you put 'nim' so that it finds e..g strutils? |
23:48:43 | reactormonk | http://pastie.org/10106500 |
23:49:59 | * | TEttinger joined #nim |
23:51:14 | Araq | reactormonk: cp compiler/nimsuggest/nimsuggest bin/nimsuggest |
23:55:32 | onionhammer | araq any updates to nimsuggest lately? |
23:56:10 | Araq | onionhammer: yes but nothing about the bugs you reported, well in fact, I couldn't reproduce these |
23:56:52 | onionhammer | araq hm ok |
23:56:52 | a5i | Aloha |
23:59:29 | reactormonk | a5i, neat, works. |
23:59:29 | onionhammer | araq what about when u ran the python app |
23:59:41 | reactormonk | ehh @ Araq, IRC laggy. |