00:09:43 | * | boopsiesisaway is now known as boopsies |
00:10:16 | * | boopsies is now known as boopsiesisaway |
00:12:03 | * | ^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
00:12:49 | * | irrequietus quit () |
00:19:17 | * | wuehlmaus quit (Ping timeout: 256 seconds) |
00:20:43 | * | wuehlmaus joined #nim |
00:21:07 | * | wuehlmaus is now known as Guest74945 |
00:29:43 | * | yglukhov joined #nim |
00:34:13 | * | yglukhov quit (Ping timeout: 252 seconds) |
00:48:40 | * | brson quit (Read error: Connection reset by peer) |
01:02:10 | * | bendiken quit () |
01:03:46 | * | saml_ joined #nim |
01:10:52 | * | drewsrem quit (Quit: Leaving) |
01:15:23 | * | askatasuna quit (Ping timeout: 256 seconds) |
01:15:37 | * | gmpreussner|work quit (Read error: Connection reset by peer) |
01:16:05 | * | gmpreussner|work joined #nim |
01:55:01 | * | chemist69_ joined #nim |
01:57:55 | * | chemist69 quit (Ping timeout: 246 seconds) |
02:08:06 | * | infinity0 quit (Ping timeout: 240 seconds) |
02:13:19 | * | NimBot joined #nim |
02:19:35 | * | infinity0 joined #nim |
02:21:19 | * | Demon_Fox quit (Quit: Leaving) |
02:26:52 | * | stomplop` joined #nim |
02:29:47 | * | stomplopster quit (Ping timeout: 265 seconds) |
02:40:14 | * | DeerGod is now known as nchambers |
02:44:28 | * | Kingsquee quit (Ping timeout: 246 seconds) |
02:57:04 | * | stomplop` quit (Ping timeout: 246 seconds) |
03:04:36 | * | saml_ quit (Quit: Leaving) |
03:09:34 | * | ohmibod_ joined #nim |
03:09:40 | * | ohmibod_ quit (Remote host closed the connection) |
03:10:44 | * | Kingsquee joined #nim |
03:18:39 | * | yglukhov joined #nim |
03:23:03 | * | yglukhov quit (Ping timeout: 255 seconds) |
03:28:34 | * | jck quit (Ping timeout: 246 seconds) |
03:28:55 | * | Xe quit (Ping timeout: 246 seconds) |
03:31:41 | * | jck joined #nim |
03:34:51 | * | Xe joined #nim |
03:35:53 | * | vega_nsk joined #nim |
03:49:58 | vega_nsk | How can i convert varargs[T] to seq[T]? |
03:50:47 | * | askatasuna joined #nim |
04:03:51 | * | ohmibod_ joined #nim |
04:04:48 | * | ohmibod_ quit (Remote host closed the connection) |
04:13:03 | * | Demon_Fox joined #nim |
04:14:10 | * | ohmibod joined #nim |
04:17:22 | * | darkf joined #nim |
04:17:56 | Varriount | vega_nsk: Well, you could create a new sequence and copy the arguments into it. |
04:18:11 | Varriount | vega_nsk: Why do you need to do that? |
04:18:14 | * | askatasuna quit (Quit: WeeChat 1.2) |
04:19:54 | Varriount | Araq: Remind me again why we use NSIS? |
04:21:30 | vega_nsk | Varriount, I need to make recursive call of varargs function with lesser arguments count |
04:21:55 | Varriount | vega_nsk: You're asking for trouble that way. Canyou show me the source code? |
04:26:20 | vega_nsk | Varriount, I'm porting the exercises from "Functional programming in scala" to nim. So recursive call with some rest of arguments - it's quite common thing here. Wait a minute, I'll make a minimal example |
04:31:42 | vega_nsk | Varriount, here it is: https://gist.github.com/vegansk/ac3b44e85ac5d2c50f0f |
04:32:44 | Varriount | vega_nsk: Is that... a linked list? |
04:33:33 | Varriount | vega_nsk: Also, I'm assuming you're not using a 'for' loop because of reasons? |
04:35:44 | * | endragor joined #nim |
04:36:29 | * | endragor_ joined #nim |
04:38:52 | vega_nsk | Varriount, yes and yes. The reason is to show my friends, scala programmers, that nim can do almost the same things as scala in functional programming, so I'm trying to do it as close as possible to scala code |
04:39:29 | Varriount | vega_nsk: Hm. What kind of balance do you want regarding efficiency VS scala-ness? |
04:39:53 | * | endragor quit (Ping timeout: 244 seconds) |
04:39:53 | Varriount | vega_nsk: Because creating a new sequence on the heap for each node in the list is not going to be pretty. |
04:41:12 | vega_nsk | Varriount, it's not about efficiency for now. I imagine all the problems of this approach :-) |
04:41:53 | Varriount | vega_nsk: Ok, but don't say I didn't warn you. I'm not responsible for any core meltdowns or power outages the solution may cause. |
04:43:18 | vega_nsk | Varriount, shure, my electric generator is full of gasoline :-) |
04:46:55 | Varriount | vega_nsk: The thing is, Nim doesn't have an 'expansion' operator for sequences. varargs computation is done at compile-time. |
04:48:30 | * | endragor_ quit () |
04:50:11 | vega_nsk | Varriount, ok. Seems that solution is to use seq[T] as initList parameter type. It would be nice to describe this moment in the documentation. |
04:51:26 | Varriount | vega_nsk: Here's the most efficient way, while still using recursion: https://gist.github.com/Varriount/cc34b4c5b77c8fab4d0c |
04:52:23 | Varriount | I don't know how to do it with only one procedure. It would probably require casting. |
04:54:38 | vega_nsk | Varriount, wow. It's what I need. Thanks! |
04:58:11 | Varriount | vega_nsk: Personally, I dislike using recursion unless the situation requires it (think AST traversal or tree walking) |
05:03:13 | vega_nsk | Varriount, I'm totally agree with you. But it's not production, it's just for fun. And maybe it will result in the creation of jvm backend for nim, and then rewriting some scala code to nim (dreams :-) ) |
05:05:15 | vega_nsk | pigmej, what can you say about https://github.com/nim-lang/nim-mode/pull/61 ? |
05:17:52 | * | gsingh93_ joined #nim |
05:34:50 | Araq | Varriount: because it's the best installer software out there |
05:57:15 | * | Miruya joined #nim |
06:04:09 | Araq | hi Miruya welcome |
06:04:46 | Miruya | Hello and thanks |
06:24:42 | * | vendethiel joined #nim |
06:36:03 | * | NimBot joined #nim |
06:44:59 | * | Guest74945 is now known as wuehlmaus |
06:46:15 | Araq | er ... is it too late to change the definition of os.ExeExt to include a dot? |
06:47:01 | Araq | oh well, yes it is |
06:52:00 | * | jszymanski joined #nim |
07:01:31 | * | irrequietus joined #nim |
07:09:13 | * | filcuc joined #nim |
07:09:13 | gokr1 | Good morning! |
07:09:23 | Araq | hey |
07:09:26 | * | gokr1 is now known as gokr |
07:09:49 | Araq | I added NimScript support to Nimble and testing it with my lexim project |
07:10:10 | gokr | So... NimScript I think I grok - its ... basically Nim VM running scripts, right? |
07:10:16 | Araq | yup |
07:10:19 | gokr | As in - I don't have to compile. |
07:10:23 | Araq | yup |
07:10:27 | gokr | Any other specific differences? |
07:10:45 | gokr | Its neat not having to compile of course, just wondering. |
07:10:50 | Araq | there is an extension to system.nim for scripting support |
07:11:04 | gokr | Ah, you mean, for using it in Nim programs. |
07:11:17 | Araq | no, for Nim scripts |
07:11:24 | gokr | Ah, oh. |
07:11:28 | gokr | Files etc, right. |
07:11:36 | Araq | right and tasks |
07:11:42 | Araq | task tests: |
07:11:44 | keyle | how fast is the exec? |
07:11:56 | keyle | is it jitted or interpreted? |
07:12:14 | Araq | it uses Nim's register based bytecode VM |
07:12:15 | gokr | So... people were quite excited about NimScript - but... am I missing some other obvious cool aspect of it? |
07:13:32 | Araq | Unfortunately, no one can be told what NimScript is. You have to see it for yourself. |
07:13:55 | Araq | ;-) |
07:14:04 | gokr | But... can it do something I can't do with Nim? I mean, I can do "nim c blabla && ./c" right? |
07:14:24 | gokr | And if its meant to do build scripts - I need to have a C compiler around anyway. |
07:15:05 | gokr | You know I am definitely not an enemy of VMs - I just wanted to see if I am missing something. |
07:15:17 | Araq | it replaces: |
07:15:28 | Araq | * Nim's traditional .cfg configuration file system. |
07:15:33 | Araq | * Nimble files. |
07:15:49 | Araq | * makefiles or similar. |
07:15:53 | * | ^aurora^ joined #nim |
07:16:13 | Araq | * bat or sh files for building |
07:16:25 | gokr | Ok, so... this is basically the "Let's just use code instead of various document formats" approach - which I of course 100% support - being a Smalltalker its natural. |
07:16:54 | gokr | Same drive can be seen in many interpreted language communities, like say Ruby. |
07:17:15 | gokr | While language communities like Java and C++ go overboard on the XML/JSON train. |
07:17:16 | Araq | yes, we're not doing anything new really |
07:17:40 | Araq | except that I always wanted static typing for scripting ;-) |
07:17:52 | gokr | But I like the fact that *you* like the "lets use code instead". |
07:18:24 | Araq | Nim definitely took some lessons from more dynamic languages :-) |
07:18:30 | gokr | Its yet another step towards the live coding world of Smalltalk ;) |
07:18:43 | gokr | Although of course - with the specific Nim characteristics. |
07:18:55 | Varriount | Araq: Well, did you know that nsis has a c plugin interface? |
07:19:09 | gokr | Varriount: Hey man, long time no see. |
07:19:28 | Varriount | Hi gokr. |
07:19:50 | gokr | Which reminds me my Linux 32 bit build slave is in a bag next to my feet... |
07:19:55 | Varriount | gokr: Sorry, between burglaries, school, and family events, I've not had much time to chat on IRC. |
07:20:13 | gokr | No need to be sorry, just nice to see you again! :) |
07:20:16 | gokr | Burglary? Ouch. |
07:20:23 | Araq | in fact, I like to argue that static checking is even more useful in a scripting setting since you usually have no tests for your scripts |
07:20:44 | gokr | If it doesn't slow you down in whipping it up - sure. |
07:20:44 | keyle | this is exciting |
07:20:55 | keyle | just not sure why, the compiler is so fast |
07:21:01 | keyle | and tells me I've done something stupid |
07:21:06 | keyle | why find out at runtime? |
07:21:20 | gokr | As Alan Kay always said - "its not that I don't like static type systems. They just still suck too much." - well, he said something like that. |
07:21:40 | gokr | keyle: Its not that simple. |
07:21:50 | Varriount | I must admit, lack of static typing is something of a burden in Python too. |
07:22:12 | Araq | keyle: when I develop the compiler, if it's not tested, it's wrong, static typing doesn't help much tbh. |
07:22:31 | gokr | IMHO the major downpoints of static typing is a) Gets in your way of exploratory design or larger refactorings, slows you down and b) Truly kills the 100% live coding experience. |
07:22:40 | Araq | Having said that, it still helps to produce efficient code and maintainability. |
07:22:49 | gokr | If you can make a static type system that handles those two - then you are golden. |
07:23:37 | gokr | Right, lots of studies show that "classic" static typing only finds a certain limited set of bugs. |
07:23:50 | Araq | Varriount: so how much of the new Win wrapper has been lost? |
07:23:52 | gokr | Nim can of course do a bit more - effects system being very promising I guess. |
07:25:18 | gokr | keyle: Just as to explain what I mean - currently I am fixing bugs in our 3D virtual world system. I am running it live and I am at the same time modifying code while its running, and can see effects immediately without doing anything. 3D objects "jump into the right spot" etc in front of me. |
07:26:21 | Varriount | Araq: All of it. |
07:26:39 | Araq | no chance of getting your laptop back? :-( |
07:26:50 | gokr | Almost all game engines use script languages in order to be able to do this, because otherwise productivity would simply be insanely low. Since making games (and 3D worlds) involve a lot iterative adjustments. |
07:26:58 | Varriount | Well, I'm looking at local listings |
07:27:18 | gokr | You lost a laptop and code on it? Shit. |
07:28:20 | Araq | Varriount: well we can make the best out of it and give c2nim better preprocessing support |
07:28:45 | Araq | so that if you do it again, at least you don't have to mess with 300char regexes |
07:29:24 | gokr | keyle: Our current architecture is Smalltalk calling out to a Nim layer that in turn uses Urho3D. 90% of our coding is currently done in Smalltalk, and... well, lets just say I am very interested in solutions to get the similar liveness when our codebase moves more and more to Nim. |
07:30:29 | Miruya | 300char regex? I think I would cry |
07:30:43 | gokr | keyle: Whenever I need to modify the Nim/Urhonimo/Urho3D layer, I need to shutdown and restart - which takes a bit of time. Its a client server system so ... I need to login, get a new session blabla, get into the world, find the stuff I was doing or redo it etc etc. |
07:31:20 | Varriount | Miruya: Most of it was static characters. |
07:32:18 | Varriount | Miruya: The... interesting part was using recursion and subroutines |
07:32:40 | Miruya | Varriount: That sounds..."fun" |
07:34:11 | Varriount | Miruya: Basically, large parts of the Windows API are generated by the MIDL compiler, which generates sections of C & C++ code. |
07:34:43 | Varriount | Anyway, goodnight. |
07:36:34 | Varriount | Miruya: To make creation of a Windows API wrapper feasable, c2nim needs to have a way to statically skip sections of #ifdef statements |
07:37:22 | Miruya | Varriount: Ah, alright thanks. Good night |
07:49:50 | * | vendethiel quit (Ping timeout: 240 seconds) |
07:54:27 | * | gsingh93_ quit (Quit: Connection closed for inactivity) |
08:08:08 | * | aziz joined #nim |
08:08:51 | * | xcombelle joined #nim |
08:21:19 | * | filcuc_ joined #nim |
08:21:59 | * | yglukhov joined #nim |
08:23:45 | * | filcuc quit (Ping timeout: 240 seconds) |
08:24:50 | * | yglukhov quit (Remote host closed the connection) |
08:25:13 | * | yglukhov joined #nim |
08:33:05 | * | filcuc_ quit (Ping timeout: 240 seconds) |
08:37:23 | * | yglukhov quit (Remote host closed the connection) |
08:41:39 | * | yglukhov joined #nim |
08:46:20 | * | gmpreussner|work quit (Read error: Connection reset by peer) |
08:46:23 | * | yglukhov quit (Ping timeout: 264 seconds) |
08:47:08 | * | gmpreussner|work joined #nim |
08:54:05 | * | Arrrr joined #nim |
08:56:56 | Araq | hrm if Nim reads nimble/nims files it can detect check the Nim version requirements and adapt |
08:57:47 | Araq | so stuff written for 0.11.x can continue to work even if we change the language. I wonder how feasible this is. |
08:58:07 | * | Ven joined #nim |
08:58:53 | * | aziz quit (Remote host closed the connection) |
08:58:55 | OnO | gokr: Unity which I believe is most popular nowadays use C#, which is statically types and not a scripting lang, but I understand that being able to "hotfix" game logic without restarting game is really cool thing |
08:59:35 | * | Trustable joined #nim |
08:59:54 | gokr | OnO: Sure, I know. They embed mono. But most engines use Lua or do other dynamic reloading tricks. |
09:00:25 | Arrrr | It is possible to "connect" nimscript to nim? |
09:00:36 | gokr | We considered Mono and I looked at several game engines using C#. NeoAxis was the most interesting one, but we eventually decided not to go into C# - and here we are :) |
09:00:52 | OnO | gokr: Most engines, does not mean most games, I think these engines are niche |
09:01:44 | Araq | OnO: as far as I can tell most games build upon on one of the big existing engines |
09:01:48 | OnO | gokr: but in fact you may keep your game logic in a DLL, C4 does that and its C++, it can reload the logic without killing the app |
09:02:20 | OnO | Araq: this is what I am trying to say, and Unity is far most popular using C# and mono |
09:02:24 | gokr | Yes, I know. And we are considering to use similar approaches with Nim - which can even be non destructive since we can split out procs/methods in our own dlls. |
09:02:48 | * | BitPuffin|osx quit (Ping timeout: 255 seconds) |
09:03:04 | gokr | So in theory we could preserve objects, as long as we don't mess up their structure. |
09:03:13 | OnO | gokr: only thing that DLL approach can handle is changing class/type layout, as long you change only the code/methods its fine |
09:03:22 | OnO | :) |
09:03:49 | gokr | I know. In Smalltalk we can modify anything though :) |
09:04:45 | OnO | Erlang too, but honestly it is always deal between performance/flexibility |
09:05:07 | OnO | Smalltalk is such a holy grail, but noone uses it in real applications |
09:05:32 | gokr | We do :) |
09:06:08 | gokr | OnO: Also, Bitsquid (now bought up by... the AutoCad guys) went 100% all in on Lua: https://www.kth.se/social/upload/5289cb3ff276542440dd668c/bitsquid-behind-the-scenes.pdf |
09:06:56 | gokr | I even checked with the Bitsquid guys if their engine could be licensed for a ... non astronomical price, but not at that time. Then they were bought :) |
09:07:35 | * | ^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
09:09:37 | gokr | OnO: And all that "noone uses it in real applications" is bs. Sure, its much less common these days - but it was quite big and there is nothing inherent in Smalltalk making it non suitable. |
09:10:55 | gokr | Unfortunately though the commercial players buckled under the pressure of Sun (Java) and the open source alternatives weren't evolved enough to pick up those existing customers. |
09:11:09 | OnO | this is Lua, not Smalltalk, do you know some present app/game using Smalltalk |
09:11:19 | OnO | btw. the slides are pretty interesting |
09:11:23 | gokr | Our system is written in Smalltalk. |
09:12:19 | gokr | Yes, Bitsquid is an interesting engine, but it was swallowed by Autodesk. |
09:12:43 | gokr | http://www.cgchannel.com/2014/06/autodesk-buys-bitsquid-game-engine/ |
09:13:19 | OnO | okay granted, probably I miss part of the conversation, what system? |
09:13:35 | gokr | Terf |
09:14:10 | gokr | http://3dicc.com |
09:14:29 | gokr | Although our new website is not there yet - our current is soo... ugly :) |
09:16:10 | gokr | Might be nicer to watch: https://www.youtube.com/watch?v=yNFwF13yBIg |
09:16:11 | ohmibod | [3D ICC Terf Short Movie for New HUD Vendor Wearality Kickstarter (00:00:57)] |
09:16:20 | gokr | Yeah. |
09:16:26 | gokr | We have too few good movies out there. |
09:16:40 | Araq | we have an ohmibod? o.O |
09:16:48 | OnO | heh |
09:17:01 | gokr | The product is an evolution of Teleplace - and one can find more movies searching for "Teleplace". |
09:17:46 | OnO | gokr: probably it would deserve some explanation, why you've chosen Smalltalk, and how it is goes so far, etc. etc. |
09:18:08 | OnO | honestly I dunno what's the current status on Smalltalk VMs, how do they perform comparing to other |
09:18:18 | gokr | Well, I have worked with Smalltalk since 1994 approximately. So I can tell you all you want to know. |
09:18:38 | Araq | ok, but we can move this to #nim-offtopic ? |
09:18:43 | gokr | Oops, sorry |
09:19:26 | gokr | OnO: Join offtopic and I can tell you a bit |
09:19:27 | OnO | some of my Smalltalk encounters were during my studies around 2000 :), anyway Q is if you would choose Smalltalk again if you were do remake this project from scratch |
09:19:52 | OnO | okay going to #nim-offtopic |
09:21:44 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
09:30:53 | * | yglukhov joined #nim |
09:30:59 | * | yglukhov quit (Remote host closed the connection) |
09:31:14 | * | yglukhov joined #nim |
09:31:18 | * | yglukhov quit (Remote host closed the connection) |
09:31:52 | * | yglukhov joined #nim |
09:32:54 | * | NimBot joined #nim |
09:37:48 | yglukhov | Araq, I've been thinking about nimvm. And I find my solution more clumsy than previously. Allowing only "when nimvm" construct may lead to duplication of code. Even considering my changes to seq.delete and add, there will be code duplication. |
09:42:33 | ekarlso | you guys adding lua support for vim ? |
09:42:58 | yglukhov | no |
09:43:27 | ekarlso | yglukhov: what you working on then ? |
09:45:01 | yglukhov | ekarlso: https://github.com/nim-lang/Nim/pull/3286 |
09:45:52 | Araq | yglukhov: it's not like there are many alternatives to this solution |
09:45:53 | vega_nsk | Araq, Is there any plans to support tail call optimisation in nim compiler, or it's up to backend? |
09:46:16 | Araq | up to backend |
09:46:30 | Araq | for the foreseeable future |
09:47:48 | * | NimBot joined #nim |
09:49:34 | yglukhov | Araq: how about the following statement: "nimvm may be used only in when expression, i.e. visually". if nimvm is used in a function that is a part of when expression, it's an error. |
09:49:49 | yglukhov | is it possible to do such check? |
09:50:06 | Araq | sure |
09:50:15 | Araq | and it's not hard either |
09:50:51 | yglukhov | cool, then it would be much more flexible than my initial solution |
09:50:54 | Araq | semmagic: of mNimvm: localError(n.info, "illegal context for 'nimvm' magic") |
09:51:18 | Araq | and you check for mNimvm much like you currently check for the "nimvm" identifier |
09:54:33 | yglukhov | ok, i'll try that |
09:55:54 | * | yglukhov quit (Remote host closed the connection) |
10:02:56 | * | NimBot joined #nim |
10:07:34 | * | X67r joined #nim |
10:11:40 | * | gokr quit (Quit: Leaving.) |
10:11:48 | * | yglukhov joined #nim |
10:12:25 | * | ^aurora^ joined #nim |
10:16:31 | * | gokr joined #nim |
10:18:07 | yglukhov | Araq: do I have to define nimvm as a const in system.nim? |
10:18:19 | yglukhov | and give it a magic pragma? |
10:18:25 | Araq | yeah |
10:18:35 | Araq | you also need to add the magic to ast.nim |
10:18:56 | yglukhov | ok |
10:23:44 | NimBot | nim-lang/Nim devel 178275f Araq [+1 ±5 -0]: split os into os and ospaths parts; ospaths is available for NimScript; better NimScript support |
10:44:11 | * | Ven joined #nim |
11:02:35 | * | NimBot joined #nim |
11:22:46 | * | NimBot joined #nim |
11:29:06 | * | ^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
11:30:12 | * | yglukhov quit (Remote host closed the connection) |
11:31:14 | * | BitPuffin joined #nim |
11:32:14 | * | Kingsquee quit (Quit: http://i.imgur.com/EsXzoum.png) |
11:35:27 | * | ^aurora^ joined #nim |
11:49:08 | * | vega_nsk quit (Quit: Ухожу я от вас (xchat 2.4.5 или старше)) |
11:50:49 | * | yglukhov joined #nim |
11:55:13 | * | yglukhov quit (Ping timeout: 250 seconds) |
12:10:33 | * | yglukhov joined #nim |
12:12:58 | * | Ven quit (Read error: Connection reset by peer) |
12:13:33 | * | Ven joined #nim |
12:17:49 | keyle | any doco/tuto on nimscript? |
12:18:59 | reactormonk | keyle, it runs on the nim vm, so no ffi, otherwise it's just good old nim |
12:19:14 | * | yglukhov quit (Remote host closed the connection) |
12:24:34 | * | yglukhov joined #nim |
12:25:08 | * | golak joined #nim |
12:30:49 | * | xcombelle quit (Remote host closed the connection) |
12:34:01 | * | xet7_ quit (Ping timeout: 246 seconds) |
12:35:02 | * | raza joined #nim |
12:51:24 | * | FedeOmoto quit (Ping timeout: 255 seconds) |
13:03:45 | * | Ven quit (Disconnected by services) |
13:20:25 | * | Sembei joined #nim |
13:23:40 | * | keyle quit (Quit: http://twitter.com/keyle/) |
13:41:40 | * | matkuki joined #nim |
13:41:47 | * | Ven_ joined #nim |
13:41:59 | * | yglukhov quit (Remote host closed the connection) |
13:52:02 | * | yglukhov joined #nim |
13:55:29 | * | matkuki quit (Quit: ChatZilla 0.9.92 [Firefox 40.0.3/20150826023504]) |
13:56:22 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:11:44 | * | yglukhov quit (Remote host closed the connection) |
14:12:26 | * | yglukhov joined #nim |
14:12:35 | * | Ven_ joined #nim |
14:14:33 | * | matkuki joined #nim |
14:31:12 | matkuki | Araq: Got time for a question? |
14:31:22 | Araq | shoot |
14:32:54 | Araq | matkuki: that means "yes" |
14:33:13 | matkuki | got it, thanks. just writing the code. |
14:33:46 | * | yglukhov_ joined #nim |
14:34:40 | matkuki | https://bpaste.net/show/497eb64af4dd |
14:34:41 | matkuki | Why is it that when the last attribute in the 'Line' type is added(line 9), the code gets 50% slower? |
14:34:43 | matkuki | The New_Line proc is used a couple of hundred times in a cycle. |
14:34:44 | * | yglukhov_ quit (Read error: Connection reset by peer) |
14:35:20 | reactormonk | matkuki, because otherwise it's fixed size, so the compiler can align it - just a random guess |
14:36:26 | matkuki | reactormonk: Oh. Araq, is this correct? |
14:36:42 | * | yglukhov quit (Ping timeout: 255 seconds) |
14:37:49 | Araq | no. |
14:38:27 | matkuki | Btw, if the New_Line proc is replaced with just 'Line(point_from:x, point_to:y, ...)', the performance stays the same even when adding the attribute. |
14:38:44 | Araq | your Line object without 'locked_objects' has no GC'ed data types and so the compiler can generate memcpy etc |
14:39:14 | Araq | with a GC'ed datatype it uses the slower assignments with write barriers etc |
14:39:30 | Araq | and yes if you inline the newline away, things can get back up to speed |
14:39:55 | Araq | that said, the compiler isn't yet as smart as it should be when it comes to move vs copy |
14:40:30 | Araq | so eventually it will make no difference |
14:42:06 | matkuki | Araq: Thank you. It's been eating at me for days. |
14:44:12 | Araq | matkuki: you can make New_Line a template in the meantime, that enforces inlining too |
14:44:51 | matkuki | Araq: Already did a few days ago. I found that during experimentation, thanks. |
14:45:14 | Araq | could have asked me earlier :P |
14:46:16 | matkuki | I tried, but everytime I came here, you were away. Had a fun discussion with dom96, though. |
14:47:10 | * | xcombelle joined #nim |
14:48:43 | matkuki | Araq: Another question: Types in different type block cannot reference each other, is there a way to 'merge' all type blocks in a module? |
14:49:05 | matkuki | sorry, 'different type blocks'. |
14:49:14 | Araq | yeah, but it needs to be top level type blocks |
14:49:32 | matkuki | Can you give me an example? |
14:49:38 | Araq | {.noforward: on.} |
14:49:47 | Araq | type Foo = Bar |
14:49:50 | Araq | type Bar = int |
14:49:54 | matkuki | Cool, let me try. |
14:50:12 | Araq | it's fragile, for example: |
14:50:27 | Araq | const X = 10 # must come before the .noforward |
14:50:43 | Araq | {.noforward: on.} |
14:50:45 | Araq | type A = array[X, int] |
14:51:18 | Araq | the type sections can also be in include files btw |
14:51:32 | Araq | but again, the include statement must be toplevel for this to work |
14:51:41 | Araq | so the following doesn't work: |
14:51:44 | Araq | when true: |
14:51:54 | Araq | include file_with_typesection |
14:52:32 | Araq | also, you're only allowed to use it when you create a PR which documents this thing :P |
14:54:08 | matkuki | :) Got it. |
14:54:09 | matkuki | Does it work if new type blocks are created with a macro? Like flaviut's OOP macro, for example. |
14:54:34 | Araq | nope |
14:55:20 | Araq | sad, I know, this noforward is mostly a hack to play with how it could work out eventually |
14:56:10 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
14:56:36 | matkuki | So it a future feature. Good to know. |
14:57:07 | Araq | well with the current limitations it's still useful today |
14:57:39 | * | NimBot joined #nim |
14:59:10 | * | Ven_ joined #nim |
15:00:05 | Arrrr | What is the reason of locklevel warnings and how can i solve them? |
15:00:30 | Araq | Arrrr: related to methods? |
15:00:35 | Arrrr | Yes |
15:00:56 | Araq | just disable it {.warning[LockLevel]: off.} or similar |
15:01:08 | Arrrr | Ok |
15:01:15 | Arrrr | Thanks |
15:01:32 | matkuki | Araq: I also have a request. When there will be a version 2 of Nim, it has to be called 'nimm2'! |
15:01:54 | Araq | ha ha ha, a good one |
15:02:06 | matkuki | Saw the commercial a couple of weeks ago :) |
15:02:28 | Araq | it's a very old product here in Germany |
15:04:02 | matkuki | Now everytime I walk by the candy section in SPAR, I think of Nim. |
15:04:12 | Araq | that's good |
15:04:40 | Araq | Arrrr: I'm about to fix methods. and preference of what the new pragma should be called? |
15:04:50 | Araq | I am thinking of either: |
15:04:53 | Araq | .anchor |
15:04:55 | Araq | .disp |
15:04:58 | Araq | .dispatcher |
15:05:08 | Arrrr | What is that pragma going to do |
15:05:16 | Araq | the idea is that you need to annotate the base method explicitly |
15:05:26 | Araq | something like: |
15:05:42 | * | ^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
15:06:11 | Araq | method m(x: RootRef) {.anchor.} = ... |
15:06:27 | Araq | method m(x: Subtype) = ... |
15:06:42 | Arrrr | So, if you dont use this pragma, it cannot work with threads? |
15:06:43 | * | ^aurora^ joined #nim |
15:07:00 | Araq | hrm? has not much to do with threads |
15:07:18 | Araq | but the anchor needs to specify the effects for all overriding methods |
15:07:46 | Arrrr | I thought locklevel warnings was related to threads |
15:07:54 | Araq | yes it is |
15:08:07 | Araq | but lock levels are just an effect |
15:08:17 | Araq | the problem exists for all effects |
15:08:50 | * | allan0 quit (Ping timeout: 240 seconds) |
15:10:32 | Arrrr | I don't know, im not familiarized with them. In fact, i have to say it is not common for me to use inheritance. So maybe im missing a lot of stuff about methods |
15:13:00 | * | darkf quit (Quit: Leaving) |
15:15:06 | OnO | Araq: stupid question - why `not nil` isn't default? and we have `optional` expressing that ref can be nil |
15:15:27 | OnO | don't we deal with refs/ptrs that cannot be nil more often? |
15:15:52 | Araq | that's a complex topic |
15:15:59 | OnO | looking at Nim's stdlib `not nil` isn't really used often |
15:16:11 | Araq | that's for historic reasons |
15:16:14 | OnO | have a look at this PR https://github.com/nim-lang/Nim/pull/3261 I really do NOT like to be merged |
15:16:37 | * | jszymanski quit (Quit: computer sleeps...) |
15:16:40 | OnO | its about implicit string -> cstring when string is nil the PR wants to convert it to NULL (extra check) |
15:17:34 | OnO | Araq: would you consider deprecating `not nil` at all and making all refs not nil unless `optional` (or some other keyword eg. `or nil`) |
15:18:01 | Araq | yeah |
15:18:20 | Araq | there is at least 1 serious bug with the "not nil" prover |
15:18:30 | Araq | but I guess that shouldn't stop us |
15:19:50 | OnO | okay that's cool, honestly I really like Swift optionals I think bringing them not Nim as `or nil` would be great |
15:20:21 | Araq | however, in theory, a not nil ref shouldn't be as common as in -say- Java which value based datatypes |
15:20:28 | Araq | *which lacks |
15:20:49 | OnO | we may have also this if let xNotNil = xOrNil: |
15:21:01 | OnO | or even if let x = x: |
15:21:08 | Araq | we have flow typing instead |
15:22:28 | * | allan0 joined #nim |
15:22:36 | * | brson joined #nim |
15:22:38 | Araq | also there is still the problem with setLen |
15:22:57 | Araq | var s: seq[ref T not nil] |
15:23:06 | Araq | newSeq(s, 10) # congrats |
15:23:41 | Araq | for i in 0..s.high: s[i] = foo() # you just created a type checking mess |
15:24:56 | OnO | yeah, I see... heh, default constructors or initializers, nightmare |
15:25:12 | Araq | 'nil' gives us the axiom of choice |
15:28:06 | Araq | this null problem is totally overblown, caused by languages where everything is a pointer/reference |
15:29:05 | Araq | null actually makes language definitions much simpler with a reasonable price in type unsafety |
15:30:22 | * | yglukhov joined #nim |
15:30:38 | OnO | sure thing, doing calling: someFunThatGetsNonNil( otherFunThatMayReturnNil() ) should be catched by compiler |
15:30:53 | OnO | and this is what swift does |
15:31:12 | OnO | it just forces you to do checks when they are necessary |
15:33:01 | * | NimBot joined #nim |
15:33:43 | Araq | what's your opinion on the .anchor pragma? |
15:35:18 | OnO | I am not aware of it, is it some PR? |
15:35:36 | Araq | no, it's my attempt to fix Nim's methods |
15:37:01 | Araq | it also makes things much clearer, cause the .anchor method needs all these effect annotations |
15:38:03 | OnO | do you have doc about that idea? I'd gladly read about that |
15:38:24 | Araq | no, sorry |
15:39:10 | Araq | but the basic problem is this: |
15:39:31 | Araq | m() # which effects to infer here? we don't know which 'm' is called since its dynamically bound |
15:39:39 | federico3 | how can a library detect (at compile time) if it's being used in an async loop? |
15:40:04 | Araq | so we use m's *anchor* definition for the effects |
15:40:27 | Araq | and every m that overrides the anchor must adhere to these effects |
15:41:16 | yglukhov | Araq, this nimvm is constantly driving my brain into endless recursion. My latest conclusion is that when nodes are just wrong for this stuff. Depending on nimvm forces when semantics up until codegen. Moreover, semantics can actually be run for different branches of when. So, problem #1. Calling semantics from codegen i could not do yet, because of forwarding restrictions. Problem #2. Code following after when may depend on when semantics. |
15:41:55 | yglukhov | * s/forces/defers |
15:42:25 | Araq | federico3: async doesn't produce an effect, so you have no chance of detecting that. why? |
15:43:16 | Araq | yglukhov: cannot follow. you solved this problem already in your PR yesterday |
15:43:51 | yglukhov | no, it's wrong. |
15:44:12 | Araq | why? |
15:44:32 | yglukhov | when nimvm: |
15:44:39 | yglukhov | var i = 0 |
15:44:41 | yglukhov | else: |
15:44:45 | yglukhov | var i = 123 |
15:44:47 | yglukhov | inc i |
15:45:10 | Araq | that's a totally reasonable limitation |
15:45:30 | Araq | 'when nimvm' is a new construct in the language |
15:45:44 | Araq | which doesn't use a keyword cause it's so rarely needed |
15:46:08 | yglukhov | ok, that was problem #2. what about #1? |
15:46:44 | yglukhov | when nimvm and someOtherStuff: ... |
15:46:54 | * | Arrrr quit (Quit: WeeChat 1.2) |
15:46:56 | Araq | #1 makes no sense, the sem'check is simply following both branches |
15:47:12 | Araq | and the codegen doesn't have to call semcheck |
15:48:04 | yglukhov | nimvm-dependant whens defer expression evaluation to codegen. |
15:48:28 | yglukhov | every codegen should evaluate test expression to chose the correct branch |
15:50:34 | yglukhov | am i right here? |
15:50:59 | Araq | no, and you don't do this in your PR either |
15:52:02 | yglukhov | But that's what i'm trying to do now. |
15:52:28 | yglukhov | because otherwise when nimvm code will not be DRY, you know ;) |
15:52:46 | Araq | wet is better anyway |
15:53:27 | yglukhov | thats disappointing. |
15:53:49 | Araq | well you can make it smarter |
15:54:04 | yglukhov | actually, i think i've got an alternative approach. like in D =) |
15:55:35 | Araq | you only need to ensure that nimvm isn't folded at all, and then you need to transform the when into an 'if' and ... do ... something smart in the backends |
15:59:05 | * | Araq likes .anchor best |
16:01:37 | yglukhov | Araq, thats basically what D does, except D doesnt pretend that it's a when. in D you should use it in if |
16:02:42 | yglukhov | and then backends can gen nimvm to true/false. and they might (or not) do some optimization on if nimvm nodes. |
16:04:26 | yglukhov | how can i restrict folding of const? =) |
16:05:51 | Araq | declare it a 'let' in system.nim |
16:06:11 | yglukhov | oh ok |
16:06:33 | yglukhov | but do you like the idea in general? |
16:06:51 | Araq | not really but why not |
16:07:30 | yglukhov | well, me neither, but now i can't see anything better. |
16:07:56 | Araq | I don't see your DRY problem |
16:08:27 | Araq | you can always put the same branches in a template and minimize the amount of repetions |
16:08:56 | Araq | and as you said, we're talking about a niche feature here |
16:09:54 | * | yglukhov quit (Remote host closed the connection) |
16:11:43 | * | yglukhov joined #nim |
16:12:41 | yglukhov | do you suggest i just leave as it is? |
16:12:51 | yglukhov | except for the magic part, of course |
16:13:19 | Araq | yeah |
16:14:03 | Araq | it's a nasty problem with only nasty solutions |
16:15:04 | yglukhov | ok then |
16:20:08 | * | ^aurora^ quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
16:25:38 | * | Jehan_ joined #nim |
16:29:32 | yglukhov | Araq, pr updated. |
16:30:59 | * | enquora joined #nim |
16:39:19 | Araq | yglukhov: that's a very lazy update :P |
16:39:48 | yglukhov | oh come on, it wasnt intended to be the final one :P |
16:41:06 | Araq | oh, then don't ping me please |
16:41:38 | * | boopsiesisaway is now known as boopsies |
16:42:30 | * | Ven_ quit (Ping timeout: 240 seconds) |
16:42:47 | * | ^aurora^ joined #nim |
16:47:34 | Araq | yglukhov: does https://github.com/nim-lang/Nim/pull/3283 fix http://forum.nim-lang.org/t/1610 ? |
16:49:09 | yglukhov | yeah, it seems realated. will test it as soon as come up fith final nimvm version. |
17:01:35 | * | kilon joined #nim |
17:07:46 | yglukhov | Araq. Can I check for ident magic before I run semantics on it? |
17:15:05 | * | yglukhov quit (Remote host closed the connection) |
17:15:46 | * | yglukhov joined #nim |
17:15:48 | Araq | nope, you need to check after semantics |
17:23:14 | * | xet7_ joined #nim |
17:25:03 | yglukhov | ok, another question. vmgen handled nkWhen node before my changes. why? |
17:25:49 | yglukhov | can i assume, that nkWhen was never a case there? |
17:41:15 | Araq | dunno |
17:45:56 | * | repax quit (Read error: Connection reset by peer) |
17:58:42 | * | saml quit (Quit: Leaving) |
17:58:50 | * | jszymanski joined #nim |
18:01:14 | * | jaco60 joined #nim |
18:07:43 | * | Sembei quit (Quit: WeeChat 1.4-dev) |
18:10:41 | yglukhov | Araq, my vm fix doesn't fix that bug with write to object. The problem is somewhere with global vm vars. There's no problem if this code is in a block. |
18:14:09 | Araq | yeah globals a a pain to support |
18:17:18 | * | yglukhov quit (Remote host closed the connection) |
18:23:16 | * | Matthias247 joined #nim |
18:28:38 | * | BitPuffin quit (Ping timeout: 244 seconds) |
18:31:42 | * | golak quit (Quit: leaving) |
18:32:14 | * | yglukhov joined #nim |
18:34:09 | * | ehaliewicz joined #nim |
18:37:10 | * | irrequietus quit (Ping timeout: 246 seconds) |
18:47:03 | * | NimBot joined #nim |
18:54:33 | * | ehaliewicz left #nim ("ERC Version 5.3 (IRC client for Emacs)") |
19:02:54 | * | irrequietus joined #nim |
19:19:36 | * | jszymanski quit (Quit: computer sleeps...) |
19:19:42 | NimBot | nim-lang/Nim devel a9f114c Adam Strzelecki [+0 ±1 -0]: osproc: Define and select spawn/fork same way... 7 more lines |
19:19:42 | NimBot | nim-lang/Nim devel 538fc04 Dominik Picheta [+0 ±1 -0]: Merge pull request #3285 from nanoant/patch/lib-pure-osproc-spawn-vs-fork-simplify... 2 more lines |
19:22:56 | Araq | dom96: any opinion on .anchor? |
19:23:45 | dom96 | Araq: link to discussion? |
19:24:00 | Araq | read today's history please |
19:24:31 | dom96 | IRC logs? |
19:24:39 | Araq | yes |
19:30:24 | yglukhov | Araq, isn't it better to mark overrides? |
19:30:27 | * | kilon quit () |
19:30:41 | yglukhov | and consider non-overrides the anchor ones |
19:31:02 | Araq | yglukhov: but that would mean more annotations? |
19:32:11 | yglukhov | yes, but that would reduce the number of problems when changing base method wihtout changing all subclass methods gets unnoticed |
19:32:45 | dom96 | hrm |
19:33:00 | Araq | hrm? the effect system would catch these things |
19:33:02 | dom96 | Couldn't the compiler force all methods to have the same effects? |
19:33:31 | dom96 | or more specifically all methods that are bound to a specific object inheritance hierarchy? |
19:33:43 | Araq | it tries to do that but there is also bugs caused by: |
19:33:52 | Araq | method m(x: Subtype) = ... |
19:34:24 | Araq | method m(x: RootRef) = ... # subtype's m is not attached to this, because the order is wrong |
19:34:42 | Araq | it's hard to fix but with .anchor we could easily produce an error at least |
19:34:56 | Araq | "method m has no anchor" |
19:35:25 | dom96 | if you're creating a method like that second one |
19:35:56 | dom96 | then surely the first m should have the same effects as the second one |
19:36:09 | dom96 | because Subtype inherits from RootRef |
19:36:40 | dom96 | which means that every other `m` whose `x` parameter is of type which inherits from RootRef has to have the same effects |
19:36:48 | dom96 | Maybe that's too constrained |
19:37:05 | dom96 | I never use methods though |
19:40:19 | dom96 | if the order of the method declaration is the problem then surely this will be solved once we finally remove the need for forward declarations? |
19:41:01 | Araq | no, the problem also exists for cross-module method groups |
19:46:55 | * | Jesin quit (Quit: Leaving) |
19:49:14 | dom96 | ok, anchor sounds good then |
19:49:47 | dom96 | Might be worth asking on the forum what others think as well. |
19:55:41 | * | tankfeeder joined #nim |
19:55:50 | tankfeeder | hi all |
19:55:51 | Jehan_ | anchor, dispatch, dispatcher sound all good. I'd also offer up base as a possible alternative. |
19:56:30 | Jehan_ | I don't think the name is terribly important, as long as it makes sense once you have read up on it. |
19:58:06 | * | brson quit (Ping timeout: 240 seconds) |
19:58:35 | * | Jesin joined #nim |
19:58:35 | Araq | hi tankfeeder |
19:58:57 | * | enamex joined #nim |
19:59:56 | * | xcombelle quit (Remote host closed the connection) |
20:01:04 | * | NimBot joined #nim |
20:01:08 | dom96 | let's not use dispatch/dispatcher |
20:01:25 | dom96 | might confuse people when dealing with asyncdispatch/asyncdispatcher |
20:01:30 | dom96 | hello tankfeeder |
20:03:05 | Jehan_ | dom96: True. |
20:03:27 | * | Mat4 joined #nim |
20:06:55 | Araq | hi Mat4 |
20:10:06 | Mat4 | hi Araq, it's some time. What's new ? |
20:11:05 | * | NimBot joined #nim |
20:15:18 | * | heinrich5991 quit (Ping timeout: 244 seconds) |
20:15:18 | * | Araq quit (Ping timeout: 244 seconds) |
20:15:18 | * | gmpreussner|work quit (Read error: Connection reset by peer) |
20:15:18 | * | mahlon quit (Read error: Connection reset by peer) |
20:15:18 | * | gmpreussner|work joined #nim |
20:15:19 | * | renesac quit (Ping timeout: 244 seconds) |
20:15:34 | * | johnsoft quit (Ping timeout: 244 seconds) |
20:15:39 | * | renesac joined #nim |
20:16:08 | * | Miruya quit (Ping timeout: 246 seconds) |
20:16:09 | * | mahlon_ joined #nim |
20:16:10 | * | Miruya joined #nim |
20:16:19 | * | heinrich5991 joined #nim |
20:16:25 | * | Araq joined #nim |
20:17:15 | * | chernozem joined #nim |
20:17:33 | chernozem | hi |
20:17:49 | dom96 | hello chernozem |
20:17:54 | chernozem | what wrong with |
20:17:57 | chernozem | @[1, 2, 3, 4].each(echo) |
20:18:16 | chernozem | i got "Error: type mismatch" |
20:20:29 | * | yglukhov quit (Remote host closed the connection) |
20:21:21 | Araq | Mat4: sorry I'm too tired to answer, plenty of new stuff |
20:22:14 | dom96 | chernozem: The `each` procedure needs a closure proc. |
20:22:28 | Mat4 | Araq: no problem |
20:22:43 | * | zeph quit (Quit: ZNC - http://znc.in) |
20:23:13 | dom96 | chernozem: This closure proc also needs to return a value. |
20:23:27 | dom96 | chernozem: `echo` is not a closure nor does it return a value |
20:23:28 | dom96 | http://nim-lang.org/docs/system.html#each,openArray[T],proc%28T%29 |
20:23:45 | dom96 | `each` is also deprecated, you should use `map` |
20:24:11 | dom96 | https://gist.github.com/dom96/291fe9d06669a025342c |
20:24:14 | dom96 | That works. |
20:24:20 | dom96 | But you're honestly better off just using a for loop. |
20:25:13 | Miruya | After rebuilding from source a few times to make sure my changes weren't breaking anything... is the test suite breaking for anyone else on "/tests/testament/htmlgen.nim(141, 12) Error: undeclared identifier: 'writeLine'"? |
20:25:37 | NimBot | nim-lang/Nim devel 619ab0b Doran [+0 ±1 -0]: Include port in host header as expected |
20:25:37 | NimBot | nim-lang/Nim devel 37fe21b Dominik Picheta [+0 ±1 -0]: Merge pull request #3288 from Snowie/devel... 2 more lines |
20:26:53 | * | victor-rene joined #nim |
20:27:10 | chernozem | dom96, tnx a lot! |
20:28:07 | Araq | Miruya: old nim in your path? |
20:28:24 | Miruya | Will check |
20:28:40 | federico3 | Araq: could you please check if you received an email on [email protected] to subscribe to the nim-dev mlist? |
20:29:30 | federico3 | hm, I just got a bounce: undeliverable address: unknown user: "[email protected]" |
20:30:37 | dom96 | Araq: Can you login to namecheap account and see where the emails are forwarded for [email protected]? |
20:30:44 | dom96 | *to your |
20:31:13 | dom96 | wow, our analytics graph shows a clear dip in visitor numbers every weekend |
20:31:24 | federico3 | Araq, dom96: they aren't being forwarded. I got a bounce when sending from my email address as well. |
20:31:54 | federico3 | dom96: it would be nice to publish the charts if there's an easy way to do so |
20:32:20 | dom96 | Don't think there is |
20:32:24 | Miruya | Araq: Yep. I think I just need to get a vm when working on things because of how often that happens to me |
20:32:26 | dom96 | I can give access to individual users though |
20:33:07 | Araq | Miruya: our instructions tell you to not copy it to /usr/bin :P |
20:33:19 | federico3 | apparently google is trying to prevent people from doing that |
20:33:44 | Miruya | I don't think I did? (unless my package manager did) |
20:37:01 | OnO | can anyone remind me how do I make nim forum threads land in my mailbox? |
20:37:08 | OnO | subscribing nim-dev? |
20:38:18 | Araq | OnO: I think so |
20:41:03 | OnO | thnx |
20:41:18 | Araq | OnO: I know I will regret this but ... what's the reason we don't allow you to fix every trailing whitespace in Nim again? |
20:41:19 | OnO | so far I was using some cron script turning RSS into mails |
20:41:45 | Miruya | Araq: found my issue. the tests proc in koch was doing exec("nim cc --taintMode:on tests/testament/tester") instead of exec(findNim() & " cc --taintMode:on tests/testament/tester") |
20:43:23 | OnO | Araq: don't remember :> I think it was lost in the translation, I think the original issue is still there somewhere |
20:43:34 | federico3 | OnO: we are still working at fixing the mailing list. |
20:44:09 | OnO | I've learnt to live with seeing commits containing numerous whitespace changes |
20:44:17 | dom96 | Araq: breaks blame |
20:44:50 | Araq | just add ?/w=0 to the github url |
20:44:58 | OnO | dom96: in fact there's -w in blame |
20:45:54 | OnO | but still it is just f.. annoying to just ignore what and put ?w=0 seeing some PR with whitespace changes |
20:46:10 | OnO | just trim that everywhere commit and case solved |
20:46:18 | dom96 | doing it file by file is fine IMO |
20:46:36 | Miruya | I wonder if there is a chrome addon to add ?1=0 to github diff links automatically... |
20:46:46 | Miruya | ?w=1, even.. if only I could type |
20:46:54 | federico3 | dom96: is there any plan to add a compile time symbol for async? |
20:46:57 | Araq | not if OnO tells our precious contributors to do it in separate commits and stuff |
20:47:18 | dom96 | federico3: no |
20:47:30 | dom96 | federico3: I don't quite understand why this is needed |
20:49:19 | OnO | Araq: telling to squash 3 commits, where 2 last are fixups for 1st one is bad too? |
20:49:25 | federico3 | dom96: to write libraries that can leverage multithreanding and/or async based on what is enabled at compile time? Or I am missing something? |
20:50:18 | dom96 | async will use multithreading some day |
20:50:42 | OnO | Araq: you know when I was kid I wanted to be cleaner :P |
20:51:05 | Araq | OnO: we disagree on git commit policies and that's fine, we'll find a compromise |
20:51:58 | Jehan_ | There are about 2k lines in 80 files with CRLF line endings, but only one in lib and compiler each. Most of the offenders are tests. I'm assuming that's what you're talking about? |
20:53:42 | OnO | Araq: and as you may notice, I asked just to separate cleanup commit from the actually subject commit, because it was "Adding X Y functionality and meantime fixing some trailing whitespace" |
20:54:09 | OnO | so in fact my problem was that the PR was mixing two subjects in one commit |
20:54:25 | OnO | I had no problem with fixing whitespace or not fixing it.. honestly I don't care |
20:54:37 | Araq | no, in fact I did not notice |
20:54:45 | OnO | but for f.. sake one commit = one subject |
20:54:47 | Araq | cause I even less than you do :P |
20:54:52 | Araq | *I care |
20:55:46 | dom96 | OnO: It's not trivial to separate these when editors strip them automatically |
20:56:12 | OnO | dom96: git add -p |
20:57:22 | dom96 | what if there is trailing whitespace on a line that is part of my edit? |
20:57:34 | Araq | also I'm not blaming you, just want you all to be happy and not concerned with irrelevant stuff |
20:58:00 | OnO | dom96: see no problem with that |
20:58:17 | OnO | my only problem is line changes irrevelant to the commit subject |
20:58:28 | * | tankfeeder quit (Quit: Leaving) |
20:58:34 | OnO | and need to ?w=1 just to see relevant stuff |
20:58:51 | Araq | yeah and that's fine, really. |
20:59:18 | * | raza quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
20:59:37 | OnO | maybe it if there was a checkbox in GH so I can turn on ?w=1 for Nim that would be fine too |
21:00:45 | Araq | just fix the whitespace and make a big cleaning commit |
21:01:17 | Araq | we don't need git blame anyway, when something goes wrong, I'm to blame |
21:01:25 | dom96 | if you do that, set up travis or circle ci to check PRs for trailing whitespace |
21:01:53 | Araq | why? the diff shows it per default? |
21:02:21 | * | yglukhov joined #nim |
21:03:55 | * | Ven joined #nim |
21:04:44 | dom96 | it's whitespace |
21:04:49 | dom96 | it's easy to miss |
21:07:02 | * | NimBot joined #nim |
21:07:10 | * | gsingh93 quit (Ping timeout: 250 seconds) |
21:11:07 | * | M-max quit (Ping timeout: 265 seconds) |
21:11:13 | * | yomiel joined #nim |
21:12:01 | Jehan_ | This is interesting, --gc:boehm outperforming --gc:refc on a very large heap (because of parallel marking). Of course, amortized performance only, not counting pause times. |
21:13:45 | * | gsingh93 joined #nim |
21:16:16 | OnO | here you go https://github.com/nim-lang/Nim/pull/3289 |
21:16:35 | * | M-max joined #nim |
21:18:10 | * | NimBot joined #nim |
21:18:11 | dom96 | A little unicode fix there too I see: https://github.com/nim-lang/Nim/pull/3289/files?w=1 |
21:19:02 | Araq | woher willst du denn wissen, dass der nicht R?dseth heißt? |
21:19:43 | Araq | Jehan_: what is a very large heap for you? |
21:20:40 | OnO | dom96: so the subject says "Convert contributors to UTF-8" |
21:21:04 | OnO | unless you want garbage to be shown on GH :P |
21:21:41 | OnO | the reason I did this UTF conversion is that sed was getting crazy on this file, heh |
21:21:49 | * | chernozem quit (Quit: Page closed) |
21:23:22 | * | tinAndi joined #nim |
21:24:03 | * | matkuki quit (Quit: ChatZilla 0.9.92 [Firefox 40.0.3/20150826023504]) |
21:28:58 | * | enamex left #nim (#nim) |
21:30:09 | * | yglukhov quit (Remote host closed the connection) |
21:30:38 | * | yglukhov joined #nim |
21:32:40 | * | yglukhov quit (Remote host closed the connection) |
21:35:22 | Jehan_ | Araq: A few GB. |
21:35:50 | Jehan_ | Mind you, we're talking pause times of up to .5 seconds. |
21:38:11 | * | yglukhov joined #nim |
21:41:09 | * | Kingsquee joined #nim |
21:43:04 | Jehan_ | And if I turn off parallel marking, it's about 2.5 times slower (quadcore mit turboboost). |
21:44:19 | Jehan_ | This also means that if you're actually running multiple threads, then refc can also exploit multiple cores and will be correspondingly faster. |
21:45:29 | Mat4 | does refc stand for reference counting ? |
21:45:43 | * | tinAndi quit (Quit: ChatZilla 0.9.92 [Firefox 40.0.3/20150826023504]) |
21:46:16 | Araq | I'm working on making the refc a pure refcounting GC with optimizations that optimize stack RC ops away |
21:46:41 | Araq | Mat4: yeah, but it's a deferrent refcounting GC |
21:47:24 | * | BitPuffin|osx joined #nim |
21:49:05 | Jehan_ | Araq: Neat. :) As an option, I hope? |
21:50:15 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:50:59 | Araq | sure. until it's stable and beats the old GC consistently |
21:51:21 | Jehan_ | I don't think it can, at least not always. |
21:52:59 | Mat4 | I hope the algorithm is able to exclude or detect reference cycles |
21:53:00 | Jehan_ | But regardless of speed, it'll be valuable for providing precise GC. |
21:53:32 | Araq | precise GC, hard realtime, 'shared ref' |
21:53:49 | Jehan_ | Mat4: Well, dealing with reference cycles is an old hat. |
21:54:36 | * | boopsies is now known as boopsiesisaway |
21:55:42 | * | Ven joined #nim |
21:59:22 | Jehan_ | For what it's worth, shared ref can be tricky. Naive implementations of shared reference counting have nasty race conditions. |
22:01:25 | Mat4 | I think all kinds of GC share some nasty to handle conditions in one way or another, it's all depend on the implementation effort in my opinion |
22:04:50 | Jehan_ | Mat4: The underlying problem is that reading or writing a pointer while updating its reference count is not an atomic operation, even if both parts are individually atomic. |
22:06:57 | Jehan_ | On the other hand, you are going to need some logic for access to a shared memory location containing a pointer anyway, just in order to have sane semantics. So it's solvable. |
22:09:36 | Mat4 | ok |
22:11:14 | OnO | http://www.drdobbs.com/atomic-reference-counting-pointers/184401888 |
22:11:29 | OnO | I guess interlocked dec/inc helps a lot |
22:11:59 | Mat4 | yes, that's what I suggested |
22:12:34 | * | enamex joined #nim |
22:14:20 | Mat4 | however it seems, for this implementation it seems that memory access is or can be done beside the reference-count update if I understand correctly |
22:15:54 | * | Mat4 wonders about automatic text duplication |
22:16:00 | OnO | http://www.opensource.apple.com/source/objc4/objc4-647/runtime/ is interesting lecture |
22:16:25 | OnO | Mat4: you mean reading the object in same time as other thread is releasing it? |
22:16:48 | OnO | but I think you need to hold the reference in order to read an object |
22:17:49 | Mat4 | ^yes |
22:20:26 | Mat4 | I don't know implementations where the counter update isn't atomic, so are not sure to undestand the problem right |
22:22:42 | Mat4 | to citate the article you have posted:" For example, consider the following function that atomically increments a counter. It is thread-safe because the locks ensure that only one thread increments the counter at a time" |
22:23:23 | Mat4 | i know this procedere as 'serialisation' |
22:23:32 | * | yglukhov quit (Read error: Connection reset by peer) |
22:24:07 | * | yglukhov joined #nim |
22:24:37 | * | yglukhov quit (Remote host closed the connection) |
22:27:06 | * | Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:28:35 | Mat4 | using some special cpu instructions for this, it is even save in case of asynchron interruptions (the articel explain this for the PowerPC ISA) |
22:28:37 | * | Matthias247 quit (Read error: Connection reset by peer) |
22:29:02 | Mat4 | so again, I don't think to understand the problem |
22:29:03 | Jehan_ | OnO: One problem with this approach is that it's pretty expensive. |
22:29:13 | * | yglukhov joined #nim |
22:29:35 | * | yglukhov quit (Remote host closed the connection) |
22:30:10 | Jehan_ | And without other constraints, you need to do it even every time you read a pointer from a heap. Think about traversing a linked list or a binary tree. |
22:31:51 | Jehan_ | But if you know, for example, that you have even a readlock on the underlying object, you may be able to omit the operation entirely. |
22:33:21 | Mat4 | yes, that is needed for every access. However the disadvantage result from the memory organisation used so this is only a question of design I think |
22:34:49 | Jehan_ | There are a lot of tradeoffs (I'm working on this problem for my day job, for what it's worth). |
22:39:33 | * | yglukhov joined #nim |
22:40:07 | Jehan_ | My biggest problem is that I have to do it in C++, so using dataflow optimizations is not an option for me. But there are workarounds to basically do the dataflow optimization manually and have checks that verify that you did it right. |
22:40:42 | Jehan_ | Plus, lots of templates involved. :) |
22:44:08 | Mat4 | reads like a frustrating work |
22:44:10 | * | irrequietus quit () |
22:49:04 | Mat4 | ciao |
22:49:10 | * | Mat4 left #nim ("Konversation terminated!") |
22:57:38 | * | yglukhov quit (Remote host closed the connection) |
23:12:34 | * | pregressive joined #nim |
23:16:04 | * | Jehan_ quit (Quit: Leaving) |
23:26:48 | * | strcmp1 quit (Ping timeout: 255 seconds) |
23:28:42 | * | strcmp1 joined #nim |
23:43:43 | * | rollo joined #nim |
23:50:50 | * | enamex quit (Quit: Page closed) |
23:58:17 | * | yglukhov joined #nim |