00:01:35 | FromGitter | <mratsim> I used it to construct proc names on the fly in Arraymancer |
00:01:56 | * | Ace_Emerald quit (Ping timeout: 255 seconds) |
00:03:44 | subsetpark | Do the values inside the backticks have to be arguments to the template? |
00:06:16 | subsetpark | eg I'm trying this code: |
00:06:23 | subsetpark | for pair in vars: |
00:06:23 | subsetpark | let |
00:06:23 | subsetpark | (name, example) = pair |
00:06:23 | subsetpark | `name` {.inject.} = example.next |
00:07:04 | subsetpark | But I'm getting "'name' is declared but...", which makes me think that it's not actually being interpolated |
00:11:37 | subsetpark | but I can make it work by using a separate template for just that line and it's not too verbose, so that works for now |
00:26:20 | subsetpark | Ok... weirder question. If I have a template forAll: <block> do: <block2> - is there a way to inject the variables declared in the first scope into the second scope? |
00:26:55 | subsetpark | Well, dang, I guess that's not what I mean. Ok, ignore me for now |
00:34:20 | * | dddddd quit (Read error: Connection reset by peer) |
00:37:57 | * | xet7 joined #nim |
00:38:02 | * | Ace_Emerald joined #nim |
00:45:49 | * | xet7 quit (Quit: Leaving) |
00:47:12 | captainkraft | I have a very strange bug. When I remove the line ``txt: cstring`` from a block of vars, I get a crash: "Abnormal termination" at a call to a c library. When I paste that code back in, everything runs fine. I don't even use the var txt, which is why I tried to remove it. |
00:59:35 | FromGitter | <Varriount> captainkraft: Sounds like memory corruption |
01:01:11 | FromGitter | <Varriount> Something is reading/writing that portion of the stack that it shouldn't. |
01:01:18 | captainkraft | hmm |
01:06:27 | * | Ace_Emerald quit (Ping timeout: 240 seconds) |
01:07:11 | captainkraft | It might be related to a string I'm hanging onto from reading a file. I use readFile to put the entire file into a string, then I pass a cstring of each line to the C lib |
01:16:40 | * | xet7 joined #nim |
01:20:42 | * | xet7 quit (Client Quit) |
01:23:11 | captainkraft | Is that a bad idea? It seems like some memory corruption happening under the hood that I should either understand how I'm causing it or that shouldn't be happening at all. |
01:23:17 | captainkraft | Any insight would be greatly appreciated. |
01:26:01 | * | xet7 joined #nim |
01:26:21 | * | vivus quit (Quit: Leaving) |
01:31:20 | subsetpark | POC for property based testing: https://github.com/subsetpark/ny |
01:41:07 | * | vlad1777d quit (Ping timeout: 252 seconds) |
01:45:30 | captainkraft | I'm trying to access `ctx.style.window.scrollbar` but the compiler is telling me the field scrollbar doesn't exist. I'm also looking at the nim code and there is definitely `scrollbar*: scroll` in the window object definition. Any idea why that is happening? |
01:57:09 | * | enthus1ast- quit (Quit: Lost terminal) |
02:02:22 | * | ipjk_ joined #nim |
02:04:47 | * | ipjk quit (Ping timeout: 248 seconds) |
02:13:24 | * | Ace_Emerald joined #nim |
02:16:51 | * | skrylar joined #nim |
02:18:02 | * | Ace_Emerald quit (Ping timeout: 260 seconds) |
02:22:28 | * | chemist69 quit (Ping timeout: 240 seconds) |
02:27:29 | skrylar | wonder what kind of sadness would be involved in something like mruby (or a python equivalent?) that used nim's gc. |
02:27:39 | skrylar | although i think araq has gone on jihad against the gc so that may be a pointless question |
02:27:50 | skrylar | well. suppose ARC can be hooked in to script contexts too |
02:28:20 | skrylar | someone did a lua interpreter for Go that hooks in to go's gc so the app/script supposedly just punt data around without worry |
02:32:47 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
02:36:15 | * | chemist69 joined #nim |
02:55:38 | FromGitter | <superfunc> subsetpark: just watched your talk, nice job! |
02:56:21 | subsetpark | oh why thank you friend! |
02:58:17 | * | Ace_Emerald joined #nim |
02:59:15 | * | Ace_Emerald quit (Client Quit) |
03:01:13 | FromGitter | <jamesalbert> Hi, I'm looking for a way to dynamically call an object method. e.g. I have a variable called opcode and want to do something like self.`opcode`. In python, it would be getattr(self, opcode), but I can't find the equivalent for nim. Anyone here know how to do this? |
03:02:19 | FromGitter | <jamesalbert> (that code snippet is supposed to be ticks, not a code snippet ;) ) |
03:02:20 | skrylar | you can override the dot operator iirc |
03:02:59 | FromGitter | <jamesalbert> thanks skylar, I'll check that out and see if I can make use of it |
03:03:00 | skrylar | jamesalbert: https://nim-lang.org/docs/manual.html#special-operators-dot-operators ? |
03:03:20 | FromGitter | <jamesalbert> ty for the link |
03:08:10 | * | derlafff quit (Ping timeout: 264 seconds) |
03:20:46 | * | derlafff joined #nim |
03:26:44 | * | ipjk_ quit (Quit: Leaving) |
03:28:18 | FromGitter | <jamesalbert> @FromIRC if I override the dot operator, I only get the variables name not its value. Is there any other way of doing it? I noticed here https://nim-lang.org/docs/manual.html#templates-identifier-construction that the ticks can interpolate variables to their value. Is there anyway I can do this casually outside of a template? Something like: ⏎ ⏎ ```let opcode: uint8 = get_opcode() ⏎ self.`opcode` # method |
03:28:18 | FromGitter | ... call``` [https://gitter.im/nim-lang/Nim?at=59f54ad28808bed73d3f08e9] |
03:30:00 | * | vlad1777d joined #nim |
03:31:40 | skrylar | jamesalbert foo.bar in nim is equivalent to bar(foo) |
03:32:09 | skrylar | if you're trying to ex. use a variable as a delegate, you just call it and hand it self |
03:32:45 | skrylar | thing.do(stuff) is the same as do(thing, stuff) |
03:48:30 | * | ryanhowe joined #nim |
03:49:09 | * | arecaceae quit (Remote host closed the connection) |
03:49:11 | FromGitter | <Varriount> @Gooseus That sounds good for a basic library. |
03:49:39 | * | ryanhowe quit (Client Quit) |
03:50:04 | * | arecaceae joined #nim |
03:50:12 | * | fastrom joined #nim |
03:50:40 | FromGitter | <Varriount> I had originally planned to make something like Boto3, where you have Session objects (which carry the basic state needed to make requests). |
03:52:26 | FromGitter | <Varriount> From these session objects you can create client and resource objects. Client objects allow you to make low-level method calls, while resource objects present a higher, resource-based view of the API. The resources created by the resource objects make appropriate API calls as their attributes are accessed. |
03:53:35 | * | vlad1777d quit (Ping timeout: 240 seconds) |
03:59:47 | * | vlad1777d joined #nim |
04:11:25 | * | fastrom quit (Quit: Leaving.) |
04:12:27 | * | vlad1777d quit (Ping timeout: 240 seconds) |
04:14:55 | * | couven92 quit (Quit: Client Disconnecting) |
04:55:26 | FromGitter | <Varriount> @Gooseus The generation code I posted a day or two ago attempts to load the JSON schema, however it doesn't actually generate much concrete code after that. |
04:55:52 | FromGitter | <Varriount> Half the battle in that area is simply loading the JSON file into concrete data structures. |
06:17:14 | * | chemist69 quit (Ping timeout: 255 seconds) |
06:17:39 | * | chemist69 joined #nim |
06:19:16 | * | miran joined #nim |
06:47:32 | * | SusWombat joined #nim |
06:48:50 | skrylar | is there a tag system in nim like go has nowadays? in go you can put things like `foo` in structs, and reflection can see those. |
06:49:20 | skrylar | i *suspect* but have not tried, that macros can read pragmas off of types, although that requires making empty pragma macros to attach to things |
06:56:36 | FromGitter | <Varriount> skrylar: You can have a no-op pragma attached to a type or procedure |
07:20:58 | * | nsf joined #nim |
07:53:37 | * | SusWombat quit (Read error: Connection reset by peer) |
07:53:52 | * | SusWombat joined #nim |
07:57:41 | FromGitter | <mratsim> There is a tag system not sure about how the go one works @skrylar https://nim-lang.org/docs/manual.html#effect-system-tag-tracking |
08:00:48 | SusWombat | do seqs have something like hasKey? for checking for duplicates? |
08:05:45 | Gertm | Is there a way to get the ssl dlls compiled into the exe? Or embedded in some way? |
08:14:35 | miran | SusWombat: you can 'deduplicate' duplicated entries in seq |
08:16:32 | * | Trustable joined #nim |
08:16:44 | SusWombat | miran, i look into that thanks |
08:17:44 | miran | SusWombat: other than that, you can maybe use sets? (not the default ones, but those you get with 'import sets') |
08:21:29 | * | gokr joined #nim |
08:25:17 | * | jjido joined #nim |
08:25:31 | * | tdc joined #nim |
08:28:05 | * | Vladar joined #nim |
08:29:11 | * | yglukhov joined #nim |
08:29:41 | FromGitter | <mratsim> Gitter is dead to me |
08:29:48 | FromGitter | <mratsim> (https://files.gitter.im/nim-lang/Nim/XagN/2017-10-29_09-22-57.png) |
08:30:31 | FromGitter | <jamesalbert> maybe my syntax is off but I can't seem to declare an object property as a table, e.g. ⏎ ⏎ ```type ObjectName = ref object ⏎ prop: Table[int, proc] ⏎ ...``` ⏎ ⏎ I keep getting `Error: invalid type: 'Table[system.int, proc]' in this context: 'proc (self: ObjectName)' ... [https://gitter.im/nim-lang/Nim?at=59f591a74ff065ac188c6658] |
08:31:00 | FromGitter | <mratsim> @SusWombat, they don’t, but you can do like in python, convert to set, and convert back to seq :P. |
08:33:20 | FromGitter | <mratsim> @jamesalbert it works for me: ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=59f5924f32e080696e3b772f] |
08:33:46 | FromGitter | <jamesalbert> @mratsim yes that works, but any method I have underneath it cause it to error out |
08:33:56 | * | Arrrr joined #nim |
08:33:56 | * | Arrrr quit (Changing host) |
08:33:56 | * | Arrrr joined #nim |
08:34:26 | FromGitter | <jamesalbert> for example, try adding: ⏎ ⏎ ```method unimplemented(self: ObjectName) {.base.} = ⏎ return``` ⏎ ⏎ underneath it [https://gitter.im/nim-lang/Nim?at=59f592928808bed73d3ffb2c] |
08:36:20 | FromGitter | <mratsim> mmm there is a bug, I could hack that with generics ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59f59304b20c6424295f7338] |
08:37:54 | FromGitter | <mratsim> anyway, I had to deal with that 6 months ago, I suggest you don’t use just proc but you properly define its type otherwise you might have to cast to proc quite often: https://github.com/mratsim/nim-rmad/blob/master/src/autograd.nim#L46-L52 |
08:39:28 | FromGitter | <mratsim> and report the bug on the bug tracker with my surprising workaround ;) |
08:39:35 | FromGitter | <jamesalbert> @mratsim thanks, that is definitely... one way of doing it ;) and yeah I tried to do that too, but it kept on automatically adding {.closure.} to the expected type which the functions I'm storing in the table do not have. Anyway around that? |
08:39:56 | FromGitter | <jamesalbert> I will, you definitely get street cred for that |
08:39:57 | * | Trustable quit (Remote host closed the connection) |
08:40:31 | FromGitter | <mratsim> you can’t store a proc in any container without it being a closure. |
08:40:58 | FromGitter | <jamesalbert> duly noted, I'm a nim noob if you couldn't tell |
08:41:19 | FromGitter | <mratsim> it’s not Nim, it’s the same in all language |
08:41:28 | FromGitter | <jamesalbert> I can't even language |
08:41:46 | * | alehander42 joined #nim |
08:42:45 | FromGitter | <mratsim> or try that but I’m pretty sure it will error out at one point: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59f5948532e080696e3b7fe2] |
08:42:57 | FromGitter | <stisa> Btw, I don't think `proc` is a concrete type, did you ⏎ try with `proc()` ? |
08:43:24 | alehander42 | hey subsetpark: I also started work on a property based testing lib for Nim last month https://github.com/alehander42/nim-quickcheck , what's your design goal with ny ? |
08:43:57 | FromGitter | <jamesalbert> @mratsim trying that now ⏎ @stisa I was able to use it like that as a variable e.g. `var prop: Table[int, proc] = {...}` |
09:04:06 | FromGitter | <jamesalbert> @mratsim hmm, your code works, but now it's complaining about the `method unimplemented(self: ObjectName)` ⏎ I pretty much have to `method unimplemented(self: ObjectName[U])`and U isn't in scope. |
09:05:42 | FromGitter | <jamesalbert> oh well, it's late for me 2 am for me. I'm gonna call it a night. ty for the help |
09:05:59 | FromGitter | <mratsim> enjoy your Nim dreams |
09:06:11 | FromGitter | <jamesalbert> they are the best dreams |
09:06:31 | FromGitter | <mratsim> method unimplementedU (self: ObjectName[U]) but generic methods are also buggy :/ |
09:12:16 | * | alehander42 quit (Quit: Page closed) |
09:39:04 | * | jjido quit (Read error: No route to host) |
09:44:27 | * | Arrrr quit (Ping timeout: 240 seconds) |
09:50:08 | skrylar | mratsim: i don't think that effect tag system is meant for reflection tho |
10:01:27 | * | thomasross_ joined #nim |
10:03:57 | * | thomasross quit (Ping timeout: 240 seconds) |
10:06:56 | * | SusWombat quit (Remote host closed the connection) |
10:15:44 | * | rauss quit (Read error: Connection reset by peer) |
10:17:45 | * | rauss joined #nim |
10:24:48 | FromGitter | <mratsim> @skrylar you’re probably right. The only reflection proc I found was InstantiationInfo or within nimscript |
10:25:28 | skrylar | nim doesn't really do reflection at all |
10:25:49 | skrylar | you can do type introspection with macros |
10:26:31 | skrylar | mostly go tags are nice just for stuff like autoserializer code or stuff like that. that nim module that was linked here a while back had to do an entire macro to encapsulate the type section just for a couple pragmas |
10:27:21 | * | CcxWrk quit (Read error: Connection reset by peer) |
10:28:30 | * | jjido joined #nim |
10:29:07 | * | CcxWrk joined #nim |
10:35:25 | FromGitter | <Yardanico> @jamesalbert you can't store different proc methods in a table |
10:35:31 | FromGitter | <Yardanico> well you can - with raw pointers |
10:37:55 | FromGitter | <Yardanico> and you don't need custom things really |
10:38:01 | FromGitter | <Yardanico> "self.mymethod" would work |
10:38:08 | FromGitter | <Yardanico> it would be rewritten to mymethod(self) |
10:55:35 | * | gokr quit (Ping timeout: 240 seconds) |
11:00:41 | * | jjido quit (Ping timeout: 240 seconds) |
11:02:24 | * | Snircle joined #nim |
11:17:33 | dom96 | @jamesalbert I think what you want is an `var procMap = array[MaxOpcodeValue, proc (yourArgs: type): ReturnType]`, then you can just do: procMap[opcode] and get your procedure. |
11:24:27 | * | aziz_ joined #nim |
11:26:10 | * | aziz_ is now known as aziz |
11:26:13 | * | Arrrr joined #nim |
11:26:28 | * | aziz quit (Client Quit) |
11:40:48 | * | miran quit (Ping timeout: 240 seconds) |
11:41:16 | * | elrood joined #nim |
11:43:13 | * | xet7 quit (Quit: Leaving) |
11:57:16 | * | xet7 joined #nim |
11:59:30 | FromGitter | <exts> is 'Serenitor/embeddedNimScript' the only package for embedding nimscript into nim? |
12:03:40 | * | FromGitter quit (Remote host closed the connection) |
12:03:41 | * | oprypin quit (Quit: Bye) |
12:03:57 | * | FromGitter joined #nim |
12:04:03 | * | oprypin joined #nim |
12:14:05 | * | xet7 quit (Ping timeout: 255 seconds) |
12:19:51 | * | xet7 joined #nim |
12:27:12 | * | xet7 quit (Quit: Leaving) |
12:28:43 | * | xet7 joined #nim |
12:31:37 | * | skrylar quit (Remote host closed the connection) |
12:33:20 | * | jjido joined #nim |
12:33:56 | * | xet7 quit (Quit: Leaving) |
12:37:55 | * | xet7 joined #nim |
13:01:01 | * | dddddd joined #nim |
13:16:26 | * | nsf quit (Quit: WeeChat 1.9.1) |
13:30:05 | * | Arrrr quit (Read error: Connection reset by peer) |
13:36:01 | * | jjido quit (Read error: Connection reset by peer) |
13:38:14 | * | xet7 quit (Quit: Leaving) |
13:48:30 | * | cspar joined #nim |
13:50:01 | * | cspar_ quit (Ping timeout: 240 seconds) |
13:58:01 | * | jjido joined #nim |
14:05:38 | * | xet7 joined #nim |
14:07:16 | * | jjido quit (Read error: Connection reset by peer) |
14:18:02 | * | jjido joined #nim |
14:18:30 | * | cspar_ joined #nim |
14:20:47 | * | cspar quit (Ping timeout: 248 seconds) |
14:27:03 | * | jjido quit (Read error: Connection reset by peer) |
14:32:55 | FromGitter | <Varriount> skrylar: What do you mean, Nim has no type introspection? The marshal module uses runtime type info |
14:38:34 | dom96 | wow, looks like boehm is the best when it comes to replying to HTTP requests the fastest |
14:56:35 | * | cspar joined #nim |
14:57:26 | * | cspar_ quit (Ping timeout: 255 seconds) |
15:07:48 | * | Sentreen quit (Ping timeout: 240 seconds) |
15:09:26 | * | zolk3ri joined #nim |
15:14:21 | * | miran joined #nim |
15:14:35 | FromGitter | <Varriount> I wonder why |
15:14:42 | GitDisc | <treeform> Hey, is there some thing that can define bits in a type? Kind of like this: https://gist.github.com/treeform/d9d3c49de0e36129c360ba19f6af7940 |
15:16:26 | dom96 | Not AFAIK |
15:16:33 | dom96 | Best thing to do is to create accessors for those fields |
15:16:42 | GitDisc | <treeform> ok |
15:16:47 | dom96 | and have a larger field in your type |
15:17:00 | GitDisc | <treeform> Yeah thats what other people did, though if there was a better way. |
15:17:20 | dom96 | Are you working on a websockets package? |
15:17:27 | GitDisc | <treeform> I have submitted my first PR, https://github.com/nim-lang/Nim/pull/6624 |
15:17:31 | GitDisc | <treeform> did I do it right? |
15:18:58 | GitDisc | <treeform> For now I have fixed up the existing packadge enough, todo what I want todo, I am considering making a ws packadge yes. |
15:20:09 | dom96 | Are you starting from scratch? There is an existing package, it might be a good idea to improve it, but I understand if you just want to start from scratch |
15:20:22 | GitDisc | <treeform> But I also like doing bit twiddling protocols and stuff. |
15:20:31 | GitDisc | <treeform> Yeah there are two I am getting ideas from. |
15:20:48 | * | Sentreen joined #nim |
15:20:53 | dom96 | commented on your PR |
15:22:25 | GitDisc | <treeform> sure ill add that |
15:22:53 | GitDisc | <treeform> Oh I did not like basic2d/basic3d, I wrote my own mathy lib for this |
15:22:58 | GitDisc | <treeform> I should publish it |
15:23:16 | GitDisc | <treeform> but I guess there is many of them now |
15:23:44 | * | xet7 quit (Quit: Leaving) |
15:24:30 | dom96 | I don't like those either, I'll probably remove them from the stdlib |
15:25:41 | GitDisc | <treeform> Change log says it was removed |
15:26:24 | dom96 | Oh, I guess I already did that heh |
15:27:12 | GitDisc | <treeform> dom do you know if the asyc stuff production grade, i was looking at libuv because it claims support for a large number of users, and is used by node.js, do you know if people run the async stuff in production now? |
15:27:52 | dom96 | treeform: NimBot, NimForum and my snake game are using async in production |
15:27:57 | * | yglukhov quit (Remote host closed the connection) |
15:28:00 | dom96 | Pretty sure there are some companies too |
15:28:07 | * | HoloIRCUser1 quit (Ping timeout: 255 seconds) |
15:28:33 | * | yglukhov joined #nim |
15:29:26 | GitDisc | <treeform> with my node.js server I had 3000 concurent players online when I released my game in early access. I want to be able to support 3000 players when I go out of early access. |
15:30:18 | GitDisc | <treeform> This is possible using threads (with 1mb) per thread per person only 3 gig machine is needed. |
15:30:29 | GitDisc | <treeform> But I am not sure what polling methods it uses etc... |
15:30:43 | GitDisc | <treeform> Is there more docs about the lowlevel implemination of it? |
15:31:09 | dom96 | not really, you can take a look at the code |
15:31:12 | dom96 | or just ask me questions |
15:31:21 | GitDisc | <treeform> ok |
15:31:36 | dom96 | I'm currently working on a much more performant HTTP server |
15:31:42 | GitDisc | <treeform> why did you guys decide not to use libuv, or libevent etc? |
15:31:48 | dom96 | I would suggest you do some benchmarks for websockets too |
15:31:51 | GitDisc | <treeform> It appears your just rolled your own right? |
15:32:01 | dom96 | because we (myself mainly) hate dependencies :) |
15:32:24 | dom96 | yeah, we use kqueue,epoll,iocp on BSD/Mac, Linux, and Windows respectively |
15:33:01 | GitDisc | <treeform> thats what libuv uses, so in theory it can/should be as good |
15:33:07 | * | yglukhov quit (Ping timeout: 260 seconds) |
15:33:27 | GitDisc | <treeform> I don't realy want a webserver, I serve no http files, just the websocket. |
15:33:38 | GitDisc | <treeform> So the whole HTTP parsing for me is not important |
15:34:09 | dom96 | sure, makes sense |
15:34:13 | GitDisc | <treeform> I have a client side app/game that is hosted on S3 basically and the only method it uses to talk to the server is websockets |
15:34:16 | dom96 | What's your game btw? |
15:34:42 | GitDisc | <treeform> http://store.steampowered.com/app/449140/Istrolid/ |
15:35:32 | dom96 | ooh, nice |
15:35:41 | GitDisc | <treeform> thanks |
15:36:07 | GitDisc | <treeform> It started out as a webgame, but I found more people to play the game on steam. |
15:36:47 | GitDisc | <treeform> I am trying to redo the root server (it handles chat and logins) in nim. |
15:37:09 | dom96 | Awesome. What made you pick Nim over all the other contenders? |
15:37:17 | GitDisc | <treeform> Right now its in coffee script which compiles to javascript and runs on node.js |
15:37:38 | GitDisc | <treeform> * I like indentaion based langauges |
15:37:53 | GitDisc | <treeform> * I am angry at python for being so slow |
15:38:14 | GitDisc | <treeform> * I am angry at coffeescript for still being javascript and stupid typos get into production |
15:38:33 | GitDisc | <treeform> I think of nim as coffeescript for C. |
15:38:57 | GitDisc | <treeform> I am alreayd used to dealing with a non mainstream lagnauge so its easy to convert. |
15:39:38 | dom96 | Brilliant. Please feel free to ping me with any async questions. |
15:40:22 | zolk3ri | treeform: Any reason for the "$1000 monetary limit" that's been posted by someone under the reviews? |
15:40:54 | GitDisc | <treeform> Yes. https://medium.com/@treeform/why-there-is-a-1000-cap-da28de02e186 |
15:41:15 | zolk3ri | OK, let me read that. :P |
15:41:35 | GitDisc | <treeform> We have plans to change this, or to make it less strict |
15:41:36 | dom96 | the ship/game art looks awesome, did you draw all of that yourself? |
15:41:39 | GitDisc | <treeform> for 1.0 though |
15:41:50 | GitDisc | <treeform> Yes I did all of the art untill a couple of weeks ago. |
15:42:07 | GitDisc | <treeform> I got an art person helping me out now. |
15:42:38 | GitDisc | <treeform> thank you for liking my art |
15:43:24 | dom96 | I want to make games but art is always what stops me, so I appreciate when others do it well and am a bit jealous :) |
15:43:42 | GitDisc | <treeform> Its just a ton of practice. |
15:44:10 | GitDisc | <treeform> Also art is not that expensive to buy/commision. |
15:44:17 | GitDisc | <treeform> compared to programmer time |
15:44:35 | dom96 | interesting, how do you find people to draw art for you? |
15:44:51 | GitDisc | <treeform> modders and mod comunaites |
15:45:55 | GitDisc | <treeform> Jonothan Blow even recomended finishing the whole game with programmer art and just finding an artists when you know the game play is good and free of bugs. |
15:47:12 | dom96 | Hrm, that could work. I bet I would get frustrated about the "stand in" art anyway though. |
15:48:06 | GitDisc | <treeform> ok async question |
15:48:14 | GitDisc | <treeform> so I am using it now, but I also have mysql db |
15:48:19 | GitDisc | <treeform> which is not async |
15:48:34 | GitDisc | <treeform> would mysql basically stop everything from working when it waiting? |
15:49:08 | GitDisc | <treeform> If i used threads atleast a person can be per thread |
15:49:18 | GitDisc | <treeform> but with async they kind of share same thread no? |
15:50:23 | GitDisc | <treeform> one could also imageing like an async wrapper for mysql, that uses threads but comunicated with the async stuff via callbacks. |
15:51:04 | GitDisc | <treeform> or one can also image a pure nim wrapper for mysql protocol, that is async based. |
15:51:36 | GitDisc | <treeform> Will my async/mysql stuff cause me trouble? |
15:54:00 | dom96 | treeform: depends how fast mysql can reply |
15:54:36 | dom96 | There are some async mysql packages though https://github.com/tulayang/asyncmysql |
15:55:00 | GitDisc | <treeform> oh, i looked for it. But did not see this, thanks! |
15:55:40 | dom96 | also, I'm fairly sure yglukhov is using async in production for his game |
15:55:55 | GitDisc | <treeform> neat |
15:56:08 | GitDisc | <treeform> Do you think many people come to nim for gamedev? |
15:56:17 | GitDisc | <treeform> It feels like a natural fit |
15:56:26 | dom96 | yeah, there seems to be a lot of game devs coming to Nim |
15:56:42 | dom96 | Why is it a natural fit? |
15:57:13 | GitDisc | <treeform> very flexible GC/integrates with existing game C/C++ libs? |
15:57:42 | GitDisc | <treeform> I had terible time in wrapping steam.dll with nodejs |
15:57:42 | FromGitter | <data-man> Hello! ⏎ Araq rests today from Nim? :) |
15:58:08 | GitDisc | <treeform> I have not tried to wrap steam.dll with nim yet. But I don't think it would be as hard. |
15:58:29 | FromGitter | <data-man> @treeform: MariaDB is not it better? |
15:58:48 | GitDisc | <treeform> probably, I am just used to mysql. |
15:59:15 | GitDisc | <treeform> I though MariaDB would be 100% clone ... but they started to add/change stuff. |
15:59:18 | GitDisc | <treeform> I hate change. |
16:00:05 | GitDisc | <treeform> I don't like learning stuff about mysql, I just want to do mystuff and move on. |
16:00:26 | FromGitter | <data-man> FirebirdSQL? |
16:01:15 | GitDisc | <treeform> i don't know what that is. |
16:01:46 | GitDisc | <treeform> I like redis |
16:02:02 | GitDisc | <treeform> I wish there was a fork of redis that stored stuff to the harddrive |
16:02:19 | GitDisc | <treeform> and was not ram bound |
16:02:41 | FromGitter | <data-man> https://firebirdsql.org https://github.com/FirebirdSQL/firebird |
16:03:21 | GitDisc | <treeform> Does not say firebird is like mysql? |
16:04:26 | GitDisc | <treeform> hmm I would never find usuable wrappers for it like I could for mysql |
16:04:50 | FromGitter | <data-man> lmdb, libmdbx, sophia - key-value DBs |
16:06:54 | FromGitter | <data-man> See https://github.com/pmwkaa/ioarena - embedded storage benchmarking |
16:12:31 | FromGitter | <data-man> https://github.com/symisc/unqlite has embedded scripting language with tons of built-in functions |
16:13:37 | FromGitter | <data-man> until I can't remember anything else :) |
16:14:14 | * | cspar_ joined #nim |
16:15:05 | GitDisc | <treeform> hmm some one named data-man is trying to sell my all kind of databases |
16:15:39 | dom96 | treeform: there is a redis that stores to the HDD IIRC |
16:15:40 | * | JL_ joined #nim |
16:15:57 | dom96 | well, redis itself can store to HD |
16:16:52 | * | cspar quit (Ping timeout: 260 seconds) |
16:17:30 | dom96 | but yeah, still ram bound |
16:18:18 | GitDisc | <treeform> yeah my db is 300gb, I can't afford a server with this much ram. |
16:18:44 | GitDisc | <treeform> I used to just use redis. |
16:18:51 | GitDisc | <treeform> untill I ran out of ram |
16:20:04 | dom96 | treeform: trying out your game a bit, should the main menu be taking 100% CPU on my MBP? :) |
16:20:37 | GitDisc | <treeform> welcome to Javascript |
16:20:49 | JL_ | hi, I was doing the tutorial and was wondering what is the rationale behing procedure having an implicit result variable and more important, initialised with a default value ? |
16:20:56 | dom96 | heh, gonna rewrite the client in Nim too? :) |
16:21:17 | GitDisc | <treeform> only if I like the expernce of porting the small server |
16:21:21 | JL_ | I mean it's just calling for bugs impossible to find... |
16:21:47 | FromGitter | <data-man> @treeform: try lmdb or libmdbx (better) - it's memory-mapped DB |
16:22:01 | GitDisc | <treeform> On my MBP it does not take 100% of cpu |
16:24:16 | GitDisc | <treeform> What are you using to measure cpu? Macs lie about CPU use. |
16:24:53 | GitDisc | <treeform> they say 100% of like the low energy state the CPU is in, not the actual cpu power. |
16:25:24 | GitDisc | <treeform> 3% on my MBP... |
16:27:12 | * | Arrrr joined #nim |
16:27:12 | * | Arrrr quit (Changing host) |
16:27:12 | * | Arrrr joined #nim |
16:27:23 | GitDisc | <treeform> jumps up to 30% in battles |
16:28:46 | GitDisc | <treeform> JL_ at first I though it was strange too. But I like it now. I have not had many bugs with this. |
16:28:59 | dom96 | treeform: activity monitor |
16:29:05 | dom96 | and my fan starts spinning :) |
16:29:17 | GitDisc | <treeform> well they always spin... |
16:29:31 | GitDisc | <treeform> |
16:29:32 | GitDisc | <treeform> https://cdn.discordapp.com/attachments/371759389889003532/374233299884834816/unknown.png |
16:29:39 | GitDisc | <treeform> Are you looking at this thing on the bottom? |
16:29:50 | GitDisc | <treeform> The % CPU column is basically broken on mac |
16:30:24 | dom96 | yep, I see it using everything on that graph |
16:30:55 | GitDisc | <treeform> what year is your mac? |
16:31:03 | GitDisc | <treeform> Are you using the web version? |
16:31:35 | GitDisc | <treeform> do you have like software webGL on (caused by adblock and privecy extentions) |
16:31:37 | dom96 | 2015 |
16:31:46 | GitDisc | <treeform> are you using firefox? |
16:31:49 | dom96 | no, via Steam |
16:32:04 | GitDisc | <treeform> hmm I don't know then. |
16:32:21 | GitDisc | <treeform> This is another thing that furstrates me about js. I can't debug low level issues. |
16:32:22 | * | JappleAck joined #nim |
16:32:22 | GitDisc | <dom> |
16:32:23 | GitDisc | <dom> https://cdn.discordapp.com/attachments/371759389889003532/374234015345147926/Screen_Shot_2017-10-29_at_16.31.15.png |
16:32:33 | GitDisc | <treeform> Yeah thats bad. |
16:32:59 | dom96 | it seems to be having a knock on effect on WindowServer |
16:33:05 | dom96 | and activity monitor too for some reason |
16:33:38 | GitDisc | <treeform> The chrome source code is like 4gb, its really hard to debug strange problems. |
16:34:06 | GitDisc | <treeform> With a native openGL wrapper atleast I could get GPU specs, timers etc... |
16:34:52 | dom96 | 0_o |
16:35:16 | dom96 | 4gb jesus |
16:35:35 | dom96 | I guess I shouldn't be surprised though |
16:37:15 | * | arecaceae quit (Remote host closed the connection) |
16:37:34 | * | arecaceae joined #nim |
16:37:39 | GitDisc | <treeform> These kind of issues make me really mad. It runs on $200 chrome books and tablets. But here we have some probably very stupid issue and it does not run on a 2k$ compuer. |
16:41:26 | dom96 | yeah, it sucks :( |
16:41:58 | * | cspar__ joined #nim |
16:44:01 | zolk3ri | yeah just stop using JS et al. |
16:44:15 | * | cspar_ quit (Ping timeout: 248 seconds) |
16:46:26 | GitDisc | <treeform> to be fair in this case its not a JS issue, its a GPU/driver/chrome issue. |
16:46:46 | GitDisc | <treeform> You have these kinds of issue in C++ too. Its just you can debug them better. |
16:46:56 | zolk3ri | et al includes chrome, and c++ |
16:46:58 | zolk3ri | :P |
16:53:07 | FromGitter | <alehander42> I can use getType only on typed args right ? I have to somehow make this work for a macro with untyped |
16:54:55 | FromGitter | <Yardanico> well you can't |
16:55:00 | FromGitter | <Yardanico> you should accept "typed" then |
16:56:05 | * | yglukhov joined #nim |
17:00:01 | dom96 | I don't think that's true |
17:00:17 | * | yglukhov quit (Ping timeout: 248 seconds) |
17:00:17 | dom96 | alehander42: what are you passing for the untyped arg? |
17:01:01 | * | Sentreen quit (Ping timeout: 240 seconds) |
17:01:03 | dom96 | oh, mratsim, your article is on HN https://news.ycombinator.com/item?id=15579806 |
17:04:02 | * | xet7 joined #nim |
17:04:48 | FromGitter | <alehander42> nah I'll just generate a new macro invocation and then expand this one with typed |
17:09:01 | * | xet7 quit (Quit: Leaving) |
17:09:22 | * | Jesin joined #nim |
17:12:01 | FromGitter | <Yardanico> well I know, but you asked a question if it's possible with one macro :) |
17:15:06 | * | Sentreen joined #nim |
17:19:35 | FromGitter | <alehander42> :D yep, I am trying to do some complicated code generation based on object fields, but I think it's not too hard with this cascade of macros too |
17:21:17 | FromGitter | <data-man> The Nim team, what do you think about https://github.com/blog/2392-introducing-code-owners? ⏎ In the D, relatively recently, this innovation was introduced for the Phobos. |
17:24:39 | FromGitter | <Yardanico> it wouldn't be very useful really |
17:25:01 | FromGitter | <Yardanico> almost all nim compiler/stdlib code is written by Araq and dom96 |
17:25:10 | FromGitter | <Yardanico> there are modules by another people, but still |
17:25:43 | miran | dom96: you really think that *currently* nim could attract more (python) crowd than julia? (re: HN thread) |
17:26:51 | dom96 | miran: hrm? I don't think I said that |
17:28:11 | dom96 | I meant that Nim has a chance to attract some of the Python crowd. |
17:28:16 | dom96 | Who knows if more than Julia |
17:28:57 | miran | then i misunderstood your reply where you disagree with the guy saying nim wouldn't be "his first choice for scientific computing language..." :) |
17:29:38 | miran | i got the feeling you wanted to say that nim *would* be a good first choice (and not julia or crystal) |
17:30:14 | dom96 | well, yeah :) |
17:30:26 | dom96 | that is what I wanted to say |
17:31:10 | miran | well, my plan for using nim is exactly that, because currently i'm using python for scientific computing |
17:31:29 | dom96 | awesome, you should reply on HN and say that ;) |
17:31:43 | miran | but i don't see myself committing to doing that *currently* |
17:32:22 | miran | i didn't explore nim's ecosystem that much, but some 'basic tools' for linear algebra are missing |
17:32:32 | miran | (or i just didn't find them yet) |
17:32:57 | * | slim_jim_jiss joined #nim |
17:34:42 | dom96 | yes, unfortunately somebody has to come in and build these tools |
17:34:50 | dom96 | I think andreaferetti has made a start |
17:36:53 | miran | ok, i'll write the stuff from this discussion there, to inform general public :) |
17:42:21 | * | yglukhov joined #nim |
17:45:13 | FromGitter | <Gooseus> @Varriount interesting, I can dig it, though I'm usually more of a fan of lower level libraries than bigger ORM models that make a lot of assumptions... but I'm sure both would be welcome since it seem like this nim community draws in people from a lot of different backgrounds |
17:45:35 | * | jjido joined #nim |
17:46:41 | * | yglukhov quit (Ping timeout: 248 seconds) |
17:48:56 | * | yglukhov joined #nim |
17:49:52 | dom96 | huh, somebody flagged that thread |
17:50:21 | FromGitter | <Gooseus> dom96 the one about the dude complaining about Rust? |
17:50:27 | dom96 | yeah |
17:50:48 | FromGitter | <Gooseus> yeah, lots of people were tearing it apart in the comments |
17:56:51 | * | jjido quit (Read error: Connection reset by peer) |
18:01:14 | * | smt` joined #nim |
18:04:02 | * | smt quit (Ping timeout: 246 seconds) |
18:09:29 | * | ibutra joined #nim |
18:10:59 | * | jjido joined #nim |
18:18:51 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
18:21:53 | * | kier quit (Ping timeout: 248 seconds) |
18:32:24 | * | ibutra quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
18:34:54 | * | kier joined #nim |
18:35:45 | dom96 | I dislike the lack of transparency |
18:35:53 | dom96 | The threads just disappears into thin air without any explanation |
18:36:07 | dom96 | *thread |
18:43:53 | * | ibutra joined #nim |
18:51:19 | GitDisc | <treeform> hmm this async, await, waitFor, Future {.async.} starting to really get confusing |
18:51:37 | GitDisc | <treeform> Has any one written an article that explains them like you are 5? |
18:53:14 | dom96 | Not that I'm aware of |
18:53:19 | dom96 | But I can explain them here if you'd like |
18:53:49 | dom96 | 'await fut' means: suspend the current async procedure until 'fut' completes |
18:53:52 | GitDisc | <treeform> waitFor should only be used at the top level stuff right? it like opens up a poll loop? |
18:53:56 | dom96 | yeah |
18:54:16 | GitDisc | <treeform> what If I want to waitFor inside an Future returning function |
18:54:27 | GitDisc | <treeform> is Future returning function different from {.async.} ? |
18:54:29 | dom96 | Take a look at the definitions of asyncCheck, waitFor and runForever |
18:54:31 | dom96 | it should help |
18:54:56 | dom96 | why would you want that? it would block everything |
18:55:07 | dom96 | if you want to wait for a future's result then use 'await' |
18:55:38 | dom96 | if you don't then just use 'asyncCheck' (asyncCheck just re-raises any exceptions) |
18:56:02 | GitDisc | <treeform> I just wait to wait for a future to return |
18:56:10 | dom96 | then use 'await' |
18:56:17 | GitDisc | <treeform> compile error then? |
18:57:01 | dom96 | hrm? |
18:57:36 | GitDisc | <treeform> https://gist.github.com/treeform/01af421530f841affdf7391f4499399a |
18:57:44 | GitDisc | <treeform> how should i remove waitFor there? |
18:58:07 | GitDisc | <treeform> pool is a mysql pool not related to async poo |
18:58:09 | GitDisc | <treeform> pool is a mysql pool not related to async pool |
18:58:09 | dom96 | Can't you simply s/waitFor/await/? |
18:58:16 | GitDisc | <treeform> no |
18:58:23 | dom96 | why? |
18:59:34 | federico3 | when is the next streaming? :) |
18:59:43 | GitDisc | <treeform> it was saying some thing about futures but now it says |
18:59:51 | GitDisc | <treeform> ```testmysql.nim(36, 14) Error: undeclared identifier: 'await'``` |
18:59:52 | dom96 | the rest of your function is wrong |
19:00:02 | dom96 | {.async.} takes care of the Future creation |
19:00:16 | dom96 | You just treat the function as if it returns 'Row' |
19:00:26 | GitDisc | <treeform> hmm |
19:00:38 | dom96 | if rows.len == 1: return rows[0] |
19:00:39 | dom96 | etc. |
19:00:43 | dom96 | and use 'await' |
19:00:47 | dom96 | it should work |
19:00:56 | dom96 | unless pool.getRows doesn't return a Future |
19:02:09 | GitDisc | <treeform> it does |
19:02:11 | GitDisc | <treeform> https://gist.github.com/treeform/fb955cf1b1f3b1daf4e3c18d285c70a2 |
19:02:13 | GitDisc | <treeform> like this? |
19:02:25 | GitDisc | <treeform> ```testmysql.nim(35, 53) template/generic instantiation from here |
19:02:25 | GitDisc | <treeform> lib/pure/asyncmacro.nim(301, 10) Error: Expected return type of 'Future' got 'Row'``` |
19:03:42 | GitDisc | <treeform> Here is what I have, I hope its not too much: https://gist.github.com/treeform/96f048887ffbeb0c2dc0c15286f5fc37 |
19:04:06 | dom96 | The return type still needs to be Future[Row] :) |
19:04:16 | dom96 | I understand why this would be confusing |
19:04:27 | dom96 | and the error message should be better :\ |
19:04:59 | GitDisc | <treeform> ok now it works |
19:05:05 | GitDisc | <treeform> thanks |
19:05:15 | dom96 | Also, I would suggest making your `main` an async proc too |
19:05:21 | dom96 | then just use 'waitFor main' at the bottom |
19:05:36 | GitDisc | <treeform> got it |
19:05:50 | GitDisc | <treeform> waitFor seems to be a bridge between non async code and sync code |
19:06:14 | dom96 | It's mainly just a convenience |
19:06:22 | GitDisc | <treeform> have you ever used gevent from python? |
19:06:26 | dom96 | In node the event loop is executed implicitly (AFAIK) |
19:06:30 | dom96 | In Nim you execute it explicitly |
19:06:51 | dom96 | You can do so in three ways: runForever(), waitFor() and by calling `poll` manually |
19:06:56 | dom96 | runForever and waitFor both call poll |
19:07:03 | GitDisc | <treeform> yeah i saw that from the source code |
19:07:05 | dom96 | runForever calls it forever :) (good for servers) |
19:07:14 | GitDisc | <treeform> yeah |
19:07:20 | dom96 | waitFor does it until the future you passed it finishes (good for short running programs) |
19:07:56 | dom96 | so, it's not a big deal but for beautiful code waitFor should be used only once :) |
19:08:10 | GitDisc | <treeform> await does the waitFor thing when you are in a : Future[...] {.async.} function? |
19:08:18 | GitDisc | <treeform> oh food is here brb |
19:08:28 | dom96 | 'await' does something completely different |
19:08:34 | dom96 | It doesn't affect the event loop at all |
19:08:48 | dom96 | It "yields" |
19:09:01 | dom96 | so it suspends the async procedure until the future completes, and lets other procedures run |
19:12:43 | dom96 | bah, I really need dedicated CPUs for these HTTP benchmarks |
19:14:53 | dom96 | federico3: not sure :) |
19:18:27 | * | JL_ quit (Quit: Page closed) |
19:26:57 | Arrrr | Do you think that the claim "like python but faster" will still be true once you remove the GC? I'm under the impression people using python don't want to give to much thought into memory management. From time to time pythoners have issues with strings/seqs being nil by default. |
19:29:02 | Araq | Arrrr: do you think a RC'ed GC is still a GC? |
19:29:10 | Araq | can you stop the FUD already? |
19:29:16 | * | ibutra quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
19:29:51 | GitDisc | <treeform> GC is getting removed? |
19:30:05 | Araq | now see what you did... |
19:30:49 | GitDisc | <treeform> can you say varargs 1 or more? |
19:31:07 | * | tdc quit (Ping timeout: 260 seconds) |
19:31:39 | GitDisc | <treeform> ```Error: ambiguous call; both mysqlhelper.getRows(pool: AsyncMysqlPool, query: SqlQuery)[declared in mysqlhelper.nim(33, 5)] and mysqlhelper.getRows(pool: AsyncMysqlPool, query: SqlQuery, args: varargs[string])[declared in mysqlhelper.nim(58, 5)] match for: (AsyncMysqlPool, SqlQuery)``` |
19:31:53 | GitDisc | <treeform> I feel like this is not? One when you have varargs and the other one when you dont? |
19:32:08 | dom96 | Don't worry, the GC is not being removed. |
19:36:50 | GitDisc | <treeform> `Error: illegal capture 'args'` |
19:37:04 | GitDisc | <treeform> I hope I don't need a laywer |
19:38:18 | dom96 | hrm, that suggests async doesn't support varargs I'm afraid |
19:38:28 | GitDisc | <treeform> what wait? |
19:38:34 | dom96 | let me check |
19:38:52 | Araq | you need to use a seq here |
19:39:09 | Araq | varargs is just an openarray, the compiler cannot move them to the heap |
19:39:17 | GitDisc | <treeform> i am copying code here: https://github.com/nim-lang/Nim/blob/master/lib/impure/db_mysql.nim#L127 |
19:39:34 | dom96 | yeah, this sucks |
19:40:12 | * | vlad1777d joined #nim |
19:40:13 | FromGitter | <mratsim> @dom96 Thanks for the notification. I guess since it’s flagged I will just leave it alone |
19:42:22 | GitDisc | <treeform> maybe just do the java thing and define 16 verions of the proc? |
19:43:00 | * | tdc joined #nim |
19:43:04 | GitDisc | <treeform> query(arg1).. query(arg1,arg2)...query(arg1,arg2,arg3)... |
19:43:13 | FromGitter | <mratsim> Please don’t do that treeform: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition |
19:43:20 | dom96 | That would be a dirty hack :) |
19:43:32 | GitDisc | <treeform> maybe write a macro to write that for me? |
19:43:37 | dom96 | But just use a seq like Araq said, |
19:43:49 | * | arecaceae quit (Remote host closed the connection) |
19:43:54 | GitDisc | <treeform> ```type mismatch: got (SqlQuery, varargs[string]) |
19:43:55 | GitDisc | <treeform> but expected one of: |
19:43:56 | GitDisc | <treeform> proc dbFormat(formatstr: SqlQuery; args: seq[string]): string``` |
19:44:07 | * | arecaceae joined #nim |
19:45:24 | FromGitter | <mratsim> let s = @varargs |
19:45:42 | FromGitter | <Yardanico> write dbFormat(myquery, @["1", "2", "3"]) |
19:45:45 | FromGitter | <mratsim> convert your varargs to seq with @ |
19:46:09 | FromGitter | <Yardanico> @mratsim he doesn't need that |
19:46:37 | FromGitter | <Yardanico> async procs don't support arguments like varargs or "var arg: type" |
19:46:50 | GitDisc | <treeform> ok |
19:47:04 | dom96 | *'arg: var type' |
19:47:10 | GitDisc | <treeform> Just trying to match the mysqldb API but async |
19:47:17 | GitDisc | <treeform> turns out that is not possible |
19:47:17 | dom96 | They will support that soon (and you can already use FutureVar[T] for that) |
19:48:52 | FromGitter | <Yardanico> dom96: they will? |
19:49:26 | dom96 | Yardanico: just a case of automatically rewriting 'var T' to 'FutureVar[T]' |
19:49:32 | dom96 | (I hope) |
19:50:02 | FromGitter | <Yardanico> well then you'll need to modify the invocation of async proc, no? |
19:50:26 | FromGitter | <Yardanico> e.g. "await myproc(myvarvariable)" needs to be rewritten to support FlowVar, or no? |
19:52:28 | GitDisc | <treeform> oh I think I need future var now |
19:52:40 | GitDisc | <treeform> why is this async stuff so hard... |
19:52:45 | * | GitDisc <treeform> cries in corner |
19:52:50 | FromGitter | <Yardanico> because it's always hard :P |
19:53:00 | FromGitter | <Yardanico> it's even harder in C or C++ :D |
19:53:28 | GitDisc | <treeform> its not hard with gevent ... gevent is the best ... |
19:54:08 | FromGitter | <Yardanico> gevent is python |
19:54:12 | FromGitter | <Yardanico> and python is interpreted :P |
19:54:20 | dom96 | It's easy once you get to know it :) |
19:54:54 | GitDisc | <treeform> it looks like I would need two copies all of functions one with {.async.} and one without |
19:55:00 | FromGitter | <Yardanico> you don't |
19:55:02 | FromGitter | <Yardanico> use multisync |
19:55:33 | FromGitter | <Yardanico> https://nim-lang.org/docs/asyncdispatch.html#multisync.m,untyped |
19:56:51 | GitDisc | <treeform> Maybe I should go back to 3000 thread problem |
19:58:33 | dom96 | why do you need a sync version? |
19:58:36 | FromGitter | <Yardanico> then you'll need to be worried about thread locking/memory sharing |
20:01:19 | * | Mat4 joined #nim |
20:02:06 | GitDisc | <treeform> i think i am just getting angry at this. |
20:02:11 | GitDisc | <treeform> will try another day |
20:02:59 | dom96 | :\ |
20:03:24 | dom96 | What's the problem? |
20:03:52 | FromGitter | <Yardanico> yay, less things in todo.txt :) https://github.com/nim-lang/Nim/commit/d52a1061b35bbd2abfbd062b08023d986dbafb3c |
20:04:40 | FromGitter | <Yardanico> and yeah, as expected we'll have a major backwards compatibility breakage, but this is fine :) |
20:04:43 | FromGitter | <Yardanico> (before 1.0) |
20:05:04 | FromGitter | <Yardanico> I'm actually glad these changes are done |
20:07:19 | miran | there is `..<` now? i've been out of loop, but i know there was some talk about it before |
20:08:13 | FromGitter | <Yardanico> it was there already |
20:08:35 | miran | advantages over `.. <foo`? |
20:09:04 | FromGitter | <Yardanico> it's more consistent |
20:09:06 | FromGitter | <Yardanico> AFAIK :) |
20:09:11 | Araq | miran: .. <foo*3 is error prone |
20:09:26 | Araq | as unary operators bind higher, this is parsed as <foo * 3 |
20:09:59 | Araq | ..< has no such problems and looks better IMO |
20:10:32 | dom96 | I on the other hand don't think it looks better, but oh well. |
20:10:47 | FromGitter | <Yardanico> it's cleaner because of spacing |
20:10:56 | FromGitter | <Yardanico> you immediatly know that it's using ..< operator |
20:11:01 | * | Vladar quit (Remote host closed the connection) |
20:11:18 | Araq | well likewise you know that .. < is 2 operators and it is |
20:11:36 | Araq | the spacing always was clear ;-) |
20:11:58 | miran | Araq: thanks for the clarifivation |
20:12:39 | FromGitter | <Yardanico> well if I use "1..<10" is it using ..< operator or .. and < ? |
20:12:48 | FromGitter | <Yardanico> probably ..< |
20:12:57 | miran | just wanted to ask the same thing Yardanico |
20:13:29 | FromGitter | <stisa> mmh so now `Slice` can be of mixed types? like a `int..float` `1..3.2` |
20:13:47 | FromGitter | <Yardanico> I don't think so |
20:13:53 | FromGitter | <Yardanico> it's for backwards index |
20:14:45 | Araq | yardanico: if you use 1..<10 you get '..<' |
20:14:45 | FromGitter | <Yardanico> e.g. with myObject[1..^1] you'll need to have a [] proc which accepts a Slice[int, int] |
20:14:50 | FromGitter | <Yardanico> ah, ok |
20:14:56 | miran | also, can i do something like `1..<^2`? |
20:14:59 | FromGitter | <Yardanico> @stisa but maybe it is, I don't know, tryit :P |
20:15:07 | FromGitter | <Yardanico> miran: what would it do? |
20:15:07 | Araq | miran: no. |
20:15:32 | Araq | just to be clear: the rules about spacing haven't been touched at all |
20:15:46 | Araq | %&%$%&$%& is a single operator |
20:15:56 | Araq | %& %$%&$ %& is 3 operators |
20:16:54 | miran | Yardanico: go from 1 up to (not including) -2 |
20:17:17 | FromGitter | <Yardanico> minus 2? |
20:17:19 | FromGitter | <Yardanico> wtf |
20:17:24 | FromGitter | <Yardanico> it's not really intuitive |
20:17:35 | miran | 2 "from the right", ^2 |
20:17:43 | FromGitter | <Yardanico> well < does that for you already |
20:18:08 | miran | 1..<^2 == 1..^3 |
20:18:48 | FromGitter | <Yardanico> just write 1..^3 then ? :) |
20:18:57 | miran | to be clear, it looks ugly - i just wanted to check if it is possible |
20:19:10 | FromGitter | <Yardanico> it *would* probably be possible |
20:19:16 | FromGitter | <Yardanico> but you'll need a lot of new operators |
20:19:18 | * | kier quit (Remote host closed the connection) |
20:19:21 | FromGitter | <Yardanico> e.g ..<^ operator |
20:19:59 | jjido | <^> operator |
20:20:18 | FromGitter | <Yardanico> xd |
20:20:47 | * | kier joined #nim |
20:21:23 | miran | "The unary < is now deprecated, for .. < use ..<" - Araq: will current codes with "1 .. <10" be broken? |
20:21:32 | FromGitter | <Yardanico> they wouldn't |
20:21:35 | FromGitter | <Yardanico> they're deprecated |
20:21:36 | dom96 | they'll give a warning |
20:21:56 | FromGitter | <Yardanico> And before 1.0 release all these deprecations will be removed, mwa-ha-ha :) |
20:22:05 | miran | ok, but in 0.19/1.0 that would break? |
20:22:18 | FromGitter | <Yardanico> probably yes |
20:22:37 | Araq | miran: v1 should not change deprecation deadlines IMO |
20:22:49 | Araq | so a couple of versions long unary '<' will exist |
20:22:53 | dom96 | IMO v1 should remove all deprecations |
20:23:04 | miran | +1 |
20:23:04 | FromGitter | <Yardanico> there are A LOT of old deprecations |
20:23:05 | Araq | regardless of whether one version is named 'v1' |
20:23:21 | FromGitter | <Yardanico> Araq: what's the deadline for a deprecation? |
20:23:28 | FromGitter | <Yardanico> in nim stdlib :) |
20:23:47 | Araq | 1 version is "really urgent to remove this" |
20:23:54 | Araq | 3 versions otherwise |
20:24:00 | Araq | *if |
20:24:01 | FromGitter | <Yardanico> for example https://github.com/nim-lang/Nim/blob/5f685bb0e6b2d68b9796e6a7d29469ce3f3b38ec/lib/deprecated/pure/rawsockets.nim :) |
20:24:33 | FromGitter | <Yardanico> or unsigned module |
20:24:38 | Araq | I know this cruft persists because nobody checks for this "3 version rule" |
20:26:05 | * | Arrrr quit (Read error: Connection reset by peer) |
20:26:07 | miran | btw, what about re/nre confusion? which one will be used in v1.0? and why both? :) |
20:26:37 | FromGitter | <stisa> Araq: shouldn't these https://github.com/nim-lang/Nim/commit/d52a1061b35bbd2abfbd062b08023d986dbafb3c#diff-5cfdfeab79c2d2b7bbc78af7060c38c3R3534 be `[]=` ? |
20:26:42 | FromGitter | <Yardanico> and what about TMyObject-like names deprecation? does "3 version rule" still applies for them ? |
20:27:10 | Araq | yardanico: yes, as I said |
20:27:22 | Araq | I know it's full of cruft |
20:27:48 | Araq | but really recently deprecated stuff shouldn't be removed just because we have v1 |
20:28:00 | Araq | but I won't fight too much over this |
20:28:43 | Araq | stisa: ouch, good eyes |
20:29:07 | Araq | I thought the tests would cover these -.- |
20:29:26 | FromGitter | <Yardanico> wtf, they didn't ? |
20:30:04 | FromGitter | <Yardanico> well I though that these []= are used quite extensively in stdlib too |
20:32:20 | Araq | apparently nobody sets a[^1] |
20:32:32 | Araq | all usages are reading a[^1] and that was fine |
20:39:30 | FromGitter | <stisa> btw @Yardanico just tried it, `y[1..2.656] = [5,6]` works, looks like it floors float to int, eg `2.656->2` |
20:42:26 | FromGitter | <Yardanico> lol |
20:43:59 | FromGitter | <Yardanico> @stisa that's probably a bug |
20:45:07 | Araq | yeah :-) |
20:45:21 | Araq | now I remember why we have 'ord' |
20:50:57 | * | tdc quit (Ping timeout: 240 seconds) |
21:00:13 | * | Mat4 quit (Quit: leaving) |
21:05:49 | * | gokr joined #nim |
21:15:13 | * | miran quit (Quit: Leaving) |
21:20:34 | * | jjido quit (Read error: Connection reset by peer) |
21:28:15 | * | yglukhov quit (Read error: Connection reset by peer) |
21:28:48 | * | yglukhov joined #nim |
21:34:45 | * | jjido joined #nim |
21:47:55 | * | slim_jim_jiss quit (Ping timeout: 255 seconds) |
21:50:38 | * | yglukhov quit (Remote host closed the connection) |
21:51:14 | * | yglukhov joined #nim |
21:55:27 | * | yglukhov quit (Ping timeout: 240 seconds) |
21:56:23 | * | JappleAck quit (Quit: Leaving) |
22:13:49 | * | nsf joined #nim |
22:43:08 | FromGitter | <mratsim> This is interesting: https://github.com/minimaxir/big-list-of-naughty-strings |
22:45:45 | * | xet7 joined #nim |
22:53:33 | * | nsf quit (Quit: WeeChat 1.9.1) |
23:00:06 | * | elrood quit (Quit: Leaving) |
23:05:30 | FromGitter | <luka-mikec> hi, is there a way to temporary make subsequent declarations visible to other modules? |
23:08:34 | FromGitter | <mratsim> I’m buying the physical book @dom96, I have $25 for the book and $14 for shipping :/ |
23:09:13 | dom96 | D: |
23:09:19 | dom96 | Maybe Amazon would be cheaper? |
23:10:15 | FromGitter | <mratsim> No, 41.86€ |
23:10:43 | dom96 | Sorry :\ |
23:11:06 | FromGitter | <mratsim> the sad thing is that you get less than the shipping company |
23:12:02 | FromGitter | <mratsim> but don’t worry, it’s just 10 euros :) |
23:21:36 | Araq | luka-mikec: https://forum.nim-lang.org/t/3269/1 |
23:24:25 | FromGitter | <luka-mikec> @Araq thank you! |
23:32:57 | * | jjido quit (Read error: Connection reset by peer) |
23:42:07 | * | zolk3ri quit (Remote host closed the connection) |