00:00:59 | * | desophos joined #nim |
00:05:49 | * | byte512 joined #nim |
00:09:05 | * | gokr quit (Quit: Leaving.) |
00:09:12 | * | gokr joined #nim |
00:09:59 | * | krux02 quit (Quit: Leaving) |
00:13:47 | * | gokr quit (Ping timeout: 265 seconds) |
00:16:18 | * | dmi0 quit (Ping timeout: 256 seconds) |
00:16:26 | * | dmi00 joined #nim |
00:20:43 | * | dhalinar joined #nim |
00:24:26 | * | PMunch joined #nim |
00:27:19 | * | dmi00 quit (Ping timeout: 265 seconds) |
00:33:15 | * | dmi00 joined #nim |
00:39:36 | * | PMunch quit (Quit: leaving) |
00:39:56 | * | PMunch joined #nim |
00:41:45 | * | shodan45 quit (Quit: Konversation terminated!) |
00:49:50 | * | fredrik92 joined #nim |
00:51:06 | * | fredrik92 quit (Client Quit) |
00:52:11 | * | PMunch quit (Quit: leaving) |
00:52:20 | * | vlad1777d quit (Remote host closed the connection) |
00:52:28 | * | PMunch joined #nim |
00:56:48 | * | dmi00 quit (Ping timeout: 250 seconds) |
01:02:32 | FromGitter | <ephja> "Error: unhandled exception: unknown file(1, 9) Error: '{' expected for an object expected [JsonParsingError]" where on earth did that come from :p |
01:05:05 | FromGitter | <ephja> from ⏎ ⏎ ```match input, pos: ⏎ of "\"[^\"]*\"":``` ⏎ ⏎ interesting.. [https://gitter.im/nim-lang/Nim?at=582d0241e097df7575bfa501] |
01:38:01 | * | gangstacat quit (Quit: Ĝis) |
01:57:55 | * | ibk joined #nim |
02:00:10 | PMunch | Hmm |
02:01:01 | PMunch | I have a weird issue with creating a type and using it in a different file |
02:01:50 | * | gangstacat joined #nim |
02:02:19 | PMunch | It's marked with * like I have done with many other types. The import statement is 'import "../game"' but when I try to create a function that takes the type I get an undeclared identifier error |
02:12:37 | * | byte512 quit (Quit: WeeChat 1.6) |
02:12:58 | * | byte512 joined #nim |
02:19:42 | * | gangstacat quit (Quit: Ĝis) |
02:23:39 | * | chemist69 quit (Ping timeout: 246 seconds) |
02:37:07 | * | chemist69 joined #nim |
02:40:48 | * | gangstacat joined #nim |
02:51:48 | PMunch | Hmm, another thing. When two types from different places don't match you get quite a cryptic error message |
02:52:01 | * | brechtm joined #nim |
02:52:06 | PMunch | type mismatch: got (<variable name>) |
02:52:12 | PMunch | but expected one of: |
02:52:32 | PMunch | proc procedure(name: <variable name<) |
02:52:44 | PMunch | It looks like it just doesn't understand what's going on |
02:53:07 | PMunch | Maybe it should somehow specify that the types are different even though they share the same name |
02:53:46 | cheatfate | looks like you have procedure with name equal to type name |
02:54:53 | PMunch | For my first or second issue? |
02:56:40 | * | brechtm quit (Ping timeout: 265 seconds) |
02:57:44 | PMunch | cheatfate? |
03:14:27 | * | PMunch quit (Quit: leaving) |
03:45:07 | * | brson quit (Ping timeout: 252 seconds) |
04:24:37 | * | chemist69 quit (Ping timeout: 256 seconds) |
04:51:25 | * | chemist69 joined #nim |
05:09:43 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
05:11:35 | * | space-wizard joined #nim |
05:39:35 | * | nsf joined #nim |
05:41:53 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
06:02:42 | * | hcorion joined #nim |
06:03:31 | hcorion | Hi all! Does anybody know of some good async tutorials/examples for nim? |
06:22:33 | * | hcorion quit (Remote host closed the connection) |
06:55:35 | * | kunev quit (Ping timeout: 258 seconds) |
06:57:58 | * | kunev joined #nim |
07:21:38 | * | zaquest joined #nim |
07:48:27 | * | chemist69 quit (Ping timeout: 246 seconds) |
07:53:00 | * | chemist69 joined #nim |
07:57:10 | * | Trustable joined #nim |
08:01:28 | * | chemist69 quit (Quit: WeeChat 1.6) |
08:03:29 | * | space-wizard joined #nim |
08:25:30 | * | gokr joined #nim |
08:25:50 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
08:29:18 | * | Andris_zbx joined #nim |
08:33:30 | * | couven92 quit (Quit: Client disconnecting) |
08:34:10 | * | Arrrr joined #nim |
08:41:00 | * | chemist69 joined #nim |
08:52:46 | * | yglukhov joined #nim |
08:53:04 | jh32 | hi |
08:54:08 | jh32 | is there a way to create a seq and skip the memset() that initializes the data? |
09:02:17 | flyx | jh32: none you want to use |
09:04:00 | * | brechtm joined #nim |
09:11:07 | jh32 | flyx: ok :-) i tried by modifying the generated c code and it gives me around 5% performance improvement |
09:12:21 | flyx | jh32: https://gist.github.com/flyx/7f1639d1fc21d82fdb32efbabb8021f9 use at own risk |
09:13:06 | jh32 | flyx: haha, nice |
09:35:59 | * | brechtm_ joined #nim |
09:39:24 | * | brechtm quit (Ping timeout: 246 seconds) |
09:54:57 | * | chemist69 quit (Ping timeout: 240 seconds) |
09:57:22 | * | xet7 joined #nim |
10:07:06 | * | brechtm_ quit (Remote host closed the connection) |
10:07:44 | * | brechtm joined #nim |
10:13:40 | * | chemist69 joined #nim |
11:12:38 | * | kulelu88 joined #nim |
11:19:21 | * | Sembei joined #nim |
11:21:30 | * | dmi00 joined #nim |
11:21:43 | * | chemist69 quit (Ping timeout: 245 seconds) |
11:35:53 | * | heinrich5991 quit (Quit: quit.) |
11:40:08 | * | chemist69 joined #nim |
11:44:05 | * | Sembei quit (Ping timeout: 260 seconds) |
11:44:11 | * | couven92 joined #nim |
11:44:16 | * | elrood joined #nim |
11:50:49 | * | arnetheduck joined #nim |
11:52:12 | cheatfate | Araq, i have a question about `symbol files` |
11:52:27 | cheatfate | What they will have inside? |
11:53:32 | Araq | an index so that module.sym can be accessed without loading the full file |
11:54:20 | cheatfate | but is it possible to use it for debugging too? like `nim type/variable` = `c type/variable`? |
11:56:01 | cheatfate | because if for local stack variable its easy to find corresponding nim variable, for global variables which named like DEADBEAF its almost impossible |
11:56:33 | * | heinrich5991 joined #nim |
11:56:45 | cheatfate | so such .sym file will be very useful for debuggers |
11:57:36 | Araq | that's a different thing and already implemented |
11:58:07 | cheatfate | in current version? |
11:58:13 | * | lyro quit (Ping timeout: 268 seconds) |
12:00:25 | Araq | yes, a project.ndb file is produced for you |
12:00:40 | Araq | you can read this via compiler/debuginfo.nim |
12:02:47 | cheatfate | lol, sometime ago i have asked you about ndb file and got an answer this is some kind of visual studio compiler artefacts :) |
12:03:35 | Araq | maybe I am confused about the file endings |
12:05:09 | * | lyro joined #nim |
12:20:56 | * | Sembei joined #nim |
12:30:46 | arnetheduck | Araq, https://github.com/nim-lang/Nim/pull/5018? |
12:36:33 | * | chemist69 quit (Ping timeout: 260 seconds) |
12:41:19 | Araq | arnetheduck: oh yeah, wanted to ask you |
12:41:28 | Araq | what combinations did you test? |
12:41:38 | Araq | (OS, CPU, etc) |
12:41:38 | arnetheduck | combinations? |
12:42:28 | arnetheduck | just linux and whatever the build server does.. |
12:42:41 | FromGitter | <ephja> good to know that the compilation speed can be improved. not that it's anything like C++ now, but lower is always better :p |
12:45:50 | arnetheduck | part of the reason I put some of it in when blocks, though ultimately it shouldn't matter for nim right now - the types from the headers are still used |
12:46:25 | arnetheduck | don't have any osx/windowses to test on |
12:50:13 | * | chemist69 joined #nim |
12:51:31 | FromGitter | <Almynic> hi can't compiled nimble on ubuntu, this step `src/nimble install` fails, I get the following error src/nimble install ⏎ Traceback (most recent call last) ⏎ nimble.nim(1005) nimble ⏎ nimble.nim(937) doAction ⏎ nimble.nim(564) install ... [https://gitter.im/nim-lang/Nim?at=582da7d369eb65323c43f829] |
12:51:51 | * | brechtm_ joined #nim |
12:52:05 | FromGitter | <Almynic> What is the problem there? Can someone help? |
12:52:16 | * | enthus1ast joined #nim |
12:55:01 | * | brechtm quit (Ping timeout: 260 seconds) |
12:58:04 | FromGitter | <Araq> is this even "nimble compilation"? "nimble install" sounds like it fails on installation |
12:59:52 | FromGitter | <Almynic> @Araq I followed the instruction to install nimble as nimble package |
13:00:54 | * | Sembei quit (Ping timeout: 258 seconds) |
13:00:59 | FromGitter | <Araq> I never did that. |
13:01:12 | FromGitter | <Araq> nim ships with nimble these days. |
13:01:54 | * | PMunch joined #nim |
13:09:44 | * | dhalinar quit (Ping timeout: 250 seconds) |
13:14:27 | Arrrr | It is possible to make a ptr collectable? |
13:15:08 | arnetheduck | oh, and Araq, do you remember why 4-byte aligned pointers are checked in the setjmp buffer, when doing gc? looks odd - everywhere else it's assumed that pointers will be 8-byte aligned, and boehm for example doesn't do that |
13:15:36 | arnetheduck | I also looked at the struct itself on glibc & musl - both align all regs at 8 bytes |
13:18:34 | Araq | because some stupid version of GCC uses 4 byte alignment for this, iirc |
13:24:02 | arnetheduck | oh? that's.. odd. the buffer is an array of longs and as such should be aligned like that too |
13:28:04 | FromGitter | <ephja> Arrrr: wrap it in a ref? |
13:30:23 | FromGitter | <ephja> and define a finalizer? and not a destructor for now, unless maybe you want to allocate the wrapper on the stack IIRC |
13:31:25 | * | chemist69 quit (Ping timeout: 260 seconds) |
13:32:01 | * | Arrrr quit (Ping timeout: 256 seconds) |
13:33:07 | * | AckZ joined #nim |
13:38:09 | * | dhalinar joined #nim |
13:38:24 | * | zevlg joined #nim |
13:41:27 | FromGitter | <ephja> are you wrapping a C library? |
13:42:56 | * | arnetheduck quit (Ping timeout: 250 seconds) |
13:44:27 | * | Varriount|Mobile joined #nim |
13:44:50 | * | arnetheduck joined #nim |
13:50:02 | * | arnetheduck quit (Ping timeout: 250 seconds) |
13:50:18 | * | chemist69 joined #nim |
13:50:44 | * | brechtm joined #nim |
13:54:24 | * | brechtm_ quit (Ping timeout: 260 seconds) |
13:55:16 | * | arnetheduck joined #nim |
13:58:37 | * | djiin joined #nim |
13:59:46 | * | dhalinar quit (Remote host closed the connection) |
14:06:02 | * | Snircle joined #nim |
14:08:20 | * | Sembei joined #nim |
14:09:38 | * | pregressive joined #nim |
14:14:14 | * | Arrrr joined #nim |
14:14:37 | Arrrr | ephja what do you mean by wrapping it in a ref? |
14:15:47 | * | couven92 quit (Read error: Connection reset by peer) |
14:15:54 | cheatfate | ephja wrapping c library to `ref` is a bad idea |
14:16:31 | * | couven92 joined #nim |
14:17:27 | FromGitter | <ephja> it seems like a small price to pay, but you can allocate on the stack and use a destructor if you want |
14:18:42 | * | enthus1ast quit (Ping timeout: 246 seconds) |
14:19:34 | * | enthus1ast joined #nim |
14:19:34 | FromGitter | <ephja> but the necessity to de-allocate explicitly depends on the library design |
14:20:05 | cheatfate | ephja destructors are experimental... |
14:22:33 | FromGitter | <ephja> I know, but it depends on how important it is. A finalizer might do, or a `defer` statement (try/finally) |
14:22:57 | Araq | anybody tried my nawabs yet? :-) |
14:23:49 | FromGitter | <ephja> I've only checked out the repo and cloned it so far |
14:24:31 | FromGitter | <ephja> I'll play with it soon |
14:24:31 | Araq | I'm curious if it will be useful for somebody else :P |
14:24:46 | Araq | I recently restructured it |
14:25:09 | FromGitter | <ephja> any idea what's going on here? https://github.com/Araq/lexim/issues/1 |
14:25:58 | FromGitter | <ephja> if you have time to look at it. I already have a working parseutils solution |
14:26:00 | Araq | ephja: lexim uses marshal.nim at compile-time to get better compiletimes |
14:26:00 | * | cnu- quit (Ping timeout: 258 seconds) |
14:26:25 | FromGitter | <ephja> oh ok. I only searched for "json" |
14:26:52 | Araq | yeah, interesting issue |
14:26:54 | Araq | bbl |
14:28:41 | * | cnu- joined #nim |
14:28:45 | * | cnu- quit (Excess Flood) |
14:29:14 | * | cnu- joined #nim |
14:29:15 | Arrrr | So, i how i wrap stuff in refs |
14:32:17 | * | Varriount|Phone joined #nim |
14:33:15 | FromGitter | <ephja> Arrrr: by defining an object type that has a field of the pointer type in question, and then you can allocate instances of this object type with the overload of 'new' that takes a finalizer http://nim-lang.org/docs/system.html#new,ref.T,proc(ref.T) |
14:34:20 | Arrrr | ooh |
14:34:25 | Arrrr | I'll check out that, thank you. |
14:34:30 | FromGitter | <ephja> or use any of the other methods that I mentioned if you require more deterministic de-allocations, but destructors are considered experimental |
14:34:40 | * | Varriount|Mobile quit (Ping timeout: 250 seconds) |
14:35:29 | Arrrr | but it expects a ref type |
14:37:03 | Arrrr | Actually i want to serialize objects with inheritance. I don't know if it will work, i can look the header for the size, but i don't if it is possible to allocate x amount of memory and then tell the garbage collector to watch out for it |
14:38:18 | * | chemist69 quit (Ping timeout: 246 seconds) |
14:39:15 | FromGitter | <ephja> "type T = ref object: wrappedPointer: CLibPointerType". what you do then is define a finalizer that de-allocates the memory pointed to by that field, according to the protocol of the C library in question |
14:39:51 | FromGitter | <ephja> I don't follow. should the C object not be allocated using one of the functions defined in that library? |
14:42:18 | Arrrr | No, i'm not using any library, i'm just experimenting for the shake of it. |
14:44:08 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
14:47:39 | * | Varriount|Phone quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )) |
14:48:25 | FromGitter | <ephja> I don't think it makes a difference, if indeed you need to use pointers |
14:49:35 | Arrrr | But i want to use multimethods |
14:50:32 | FromGitter | <ephja> is dynamic dispatch limited to references? |
14:52:03 | Arrrr | I'm not sure, but i'd rather work with them |
14:52:35 | Arrrr | I want to allocate by hand only in this limited section, and only if this hack works |
14:58:48 | * | arnetheduck quit (Ping timeout: 245 seconds) |
15:00:50 | * | chemist69 joined #nim |
15:04:08 | * | pregressive quit (Remote host closed the connection) |
15:04:41 | * | pregressive joined #nim |
15:09:13 | * | pregressive quit (Ping timeout: 245 seconds) |
15:09:15 | * | djiin quit (Read error: Connection reset by peer) |
15:13:10 | enthus1ast | is there an module to handle ip addresses / netmask? Or some module that let me type in addresses similar to nmap syntax? (10.0.0.1,2,3-10) ? |
15:13:53 | cheatfate | enthus1ast, nope |
15:27:30 | * | gokr quit (Ping timeout: 256 seconds) |
15:30:29 | * | brechtm quit (Read error: Connection reset by peer) |
15:30:47 | * | brechtm joined #nim |
15:35:11 | * | pregressive joined #nim |
15:35:16 | * | pregressive quit (Remote host closed the connection) |
15:35:28 | * | pregressive joined #nim |
15:37:08 | * | PMunch quit (Quit: leaving) |
15:49:35 | Araq | enthus1ast: there is parseIp in some sockets or net module |
15:51:40 | * | Calinou quit (Read error: Connection reset by peer) |
15:53:39 | * | Calinou joined #nim |
15:59:53 | Araq | Calinou: any progress on the website? |
16:00:21 | enthus1ast | Araq its in net.nim parseIPv{4,6}Address but it not provide nmap syntax. |
16:00:23 | * | byte512 quit (Quit: WeeChat 1.6) |
16:01:20 | cheatfate | enthus1ast, nmap syntax represents bunch of addresses with case for one address |
16:02:21 | enthus1ast | yep i'm just writeing it |
16:07:01 | * | byte512 joined #nim |
16:17:16 | * | nsf quit (Quit: WeeChat 1.6) |
16:24:44 | * | enthus1ast quit (Ping timeout: 256 seconds) |
16:25:11 | * | enthus1ast joined #nim |
16:27:05 | * | couven92 quit (Read error: Connection reset by peer) |
16:29:25 | * | couven92 joined #nim |
16:38:20 | * | Andris_zbx quit (Remote host closed the connection) |
16:39:03 | * | atweiden joined #nim |
16:39:32 | * | brson joined #nim |
16:57:15 | * | yglukhov_ joined #nim |
17:00:26 | * | yglukhov quit (Ping timeout: 256 seconds) |
17:01:27 | * | yglukhov_ quit (Ping timeout: 246 seconds) |
17:01:38 | * | libman joined #nim |
17:02:16 | * | yglukhov joined #nim |
17:02:27 | * | pregressive quit (Read error: Connection reset by peer) |
17:02:56 | * | pregressive joined #nim |
17:03:48 | * | yglukhov quit (Read error: Connection reset by peer) |
17:03:51 | * | yglukhov_ joined #nim |
17:08:08 | * | yglukhov_ quit (Ping timeout: 260 seconds) |
17:10:52 | * | enthus1ast quit (Ping timeout: 268 seconds) |
17:16:46 | * | krux02 joined #nim |
17:22:35 | * | brechtm_ joined #nim |
17:23:09 | * | byte512 quit (Ping timeout: 246 seconds) |
17:26:09 | * | brechtm quit (Ping timeout: 260 seconds) |
17:26:26 | * | brechtm_ quit (Remote host closed the connection) |
17:28:20 | * | space-wizard joined #nim |
17:28:52 | krux02 | is it possible to run an external tool on a compile time generated string at compile time? |
17:31:49 | * | brson quit (Ping timeout: 248 seconds) |
17:32:02 | * | brechtm joined #nim |
17:32:49 | krux02 | I would like to run glslangValidator on my shader files that are generated at compile time, and forward the error messages |
17:33:40 | FromGitter | <ephja> there's nothing in 'net' for retrieving the address associated with a socket, right? only in nativesockets |
17:34:19 | * | brechtm quit (Remote host closed the connection) |
17:37:35 | * | djiin joined #nim |
17:38:12 | djiin | What is nawabs? |
17:45:33 | FromGitter | <ephja> https://github.com/Araq/nawabs. let's see what the new readme says |
17:47:42 | * | brechtm joined #nim |
17:49:56 | krux02 | is there an exec, where I get the output of an external program invocation? |
17:51:16 | FromGitter | <ephja> krux02: http://nim-lang.org/docs/system.html#gorge,string,string,string |
17:51:34 | Calinou | hi Araq, sorry, not much progress lately, I have tons of work at uni |
17:51:44 | FromGitter | <ephja> what website? |
17:51:58 | Calinou | ephja: I started working on a (functional) new website template using Jekyll for Nim |
17:52:40 | FromGitter | <ephja> neat |
17:54:04 | * | yglukhov joined #nim |
17:54:32 | * | Sembei quit (Ping timeout: 258 seconds) |
17:54:42 | FromGitter | <ephja> @Araq is there anything to test other than "nawabs init"? |
17:54:45 | Calinou | @ephja it looks like this so far: https://lut.im/Rjv2NCBTL1/JGqA7NQivtxc8PmT.png |
17:58:21 | * | yglukhov quit (Ping timeout: 256 seconds) |
18:00:14 | * | gangstacat quit (Quit: Ĝis) |
18:00:39 | * | brson joined #nim |
18:01:40 | * | vlad1777d joined #nim |
18:02:01 | * | Varriount|Mobile joined #nim |
18:02:17 | * | gangstacat joined #nim |
18:02:55 | * | brechtm quit (Remote host closed the connection) |
18:02:59 | corecode | how do i define a ptr {.volatile.} uint32? |
18:03:05 | Varriount|Mobile | Araq, dom96: Have you decided what to do about Unicode output to the Windows command prompt? |
18:03:31 | FromGitter | <ephja> @Calinou it looks alright. I can't read text on backgrounds close to #000000 very well though. |
18:03:42 | FromGitter | <ephja> but many people don't seem to have a problem with it |
18:03:56 | krux02 | @ephja: thanks so far, now I need to write a string into a temp file at comile time, because my tool only accepts filenames, not input |
18:04:22 | dom96 | Varriount|Mobile: is there a relevant issue for this? |
18:04:42 | Varriount|Mobile | Somewhere on github, yes |
18:04:50 | Varriount|Mobile | I don't know the exact number |
18:05:53 | dom96 | I can't remember the details of this unfortunately. |
18:09:25 | corecode | any suggestions about the volatile access? |
18:12:36 | dom96 | corecode: can you elaborate? Is this what you want? var x {.volatile.}: ptr uint32 |
18:13:05 | corecode | right now my line reads: |
18:13:11 | corecode | reg = cast[ptr size](base + offset) |
18:13:12 | corecode | |
18:13:23 | corecode | size is a template parameter |
18:13:39 | corecode | but that makes reg not volatile |
18:13:53 | dom96 | can you define `reg` as volatile? |
18:13:59 | corecode | yes |
18:14:08 | corecode | but then it becomes a volatile pointer |
18:14:12 | corecode | not a pointer to volatile :) |
18:14:56 | dom96 | ahh |
18:15:07 | dom96 | No idea I'm afraid :) |
18:15:25 | * | corecode looks for Araq |
18:17:20 | FromGitter | <ephja> who isn't :D |
18:17:21 | dom96 | maybe putting it on a type definition also works? |
18:17:25 | atweiden | Calinou: mockup looks really good |
18:17:39 | dom96 | type Foo {.volatile.} = size |
18:17:42 | dom96 | ptr Foo |
18:18:10 | corecode | i wonder why "shl" takes integer shift arguments, and only the same type for rhs and lhs |
18:18:18 | corecode | what does it mean to do 5 shl -2? |
18:18:19 | FromGitter | <ephja> size as in integer type? |
18:18:26 | Calinou | atweiden: thanks |
18:18:30 | FromGitter | <ephja> shr 2? |
18:18:32 | corecode | like int8, int8, etc. |
18:18:33 | FromGitter | <ephja> *shrug* |
18:21:26 | corecode | ok i'll work around it in a different way |
18:23:13 | * | djiin quit (Ping timeout: 265 seconds) |
18:44:16 | * | Jesin quit (Quit: Leaving) |
18:46:09 | * | Jesin joined #nim |
18:52:39 | * | nsf joined #nim |
18:53:31 | cheatfate | corecode, its a known issue old issue and every time its appears there become dispute on unsigned vs signed :) |
18:54:40 | * | yglukhov joined #nim |
18:55:11 | Araq | actually I fixed the shifting ops but it needs to be merged and in the same branch I got carried away ... |
19:00:09 | Araq | corecode: volatile is a stupid concept and should have been volatileRead/volatileWrite ops instead |
19:01:57 | * | xet7 quit (Ping timeout: 240 seconds) |
19:13:08 | * | xet7 joined #nim |
19:14:11 | * | gokr joined #nim |
19:18:03 | corecode | heh okay |
19:18:27 | * | ibk quit (Quit: Connection closed for inactivity) |
19:18:33 | corecode | Araq: yea having explicit ops is good |
19:19:02 | corecode | but if you compile to C you need to convince the compiler with volatile to actually perform an access |
19:24:25 | Araq | proc volatileRead(x: ptr int): int {.importcpp: "(*(volatile long*)(#))", nodecl.} |
19:31:41 | * | Varriount|Mobile quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )) |
19:31:50 | * | atweiden quit (Quit: Leaving) |
19:38:58 | * | space-wizard quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:39:09 | * | Matthias247 joined #nim |
19:40:14 | * | space-wizard joined #nim |
19:40:31 | * | space-wizard quit (Client Quit) |
19:41:01 | * | space-wizard joined #nim |
19:41:19 | * | space-wizard quit (Client Quit) |
19:41:51 | * | space-wizard joined #nim |
19:42:07 | * | space-wizard quit (Client Quit) |
19:42:35 | * | space-wizard joined #nim |
19:42:55 | * | space-wizard quit (Client Quit) |
19:43:23 | * | space-wizard joined #nim |
19:43:43 | * | space-wizard quit (Client Quit) |
19:44:11 | * | space-wizard joined #nim |
19:44:31 | * | space-wizard quit (Client Quit) |
19:51:54 | * | dmi00 quit (Ping timeout: 246 seconds) |
19:54:17 | FromGitter | <Almynic> I installed nim from c sources on ubuntu. The installation was successful but how do I make nimble work? |
19:59:55 | dom96 | Almynic: Did you run nim e install_tools.nims? |
20:01:33 | FromGitter | <Almynic> no nimble gets installed no with nim installation needed to add nimble to path but thanks |
20:03:58 | dom96 | I'm not sure I understand |
20:05:31 | FromGitter | <Almynic> @dom96 solved it already, needed to add nimble to path to execute nimble from console |
20:05:51 | dom96 | okay, good. |
20:06:00 | dom96 | Glad you got it working :) |
20:06:24 | * | brson quit (Ping timeout: 260 seconds) |
20:08:02 | * | zaquest quit (Quit: Leaving) |
20:11:07 | * | djiin joined #nim |
20:17:09 | corecode | i guess i can't create a macro which takes arguments like a template? |
20:26:16 | dom96 | you can AFAIK |
20:33:37 | * | Trustable quit (Ping timeout: 258 seconds) |
20:38:54 | * | dmi00 joined #nim |
20:40:49 | * | Arrrr quit (Quit: WeeChat 1.5) |
20:43:24 | * | Trustable joined #nim |
20:50:56 | * | couven92 quit (Read error: Connection reset by peer) |
20:57:53 | * | brson joined #nim |
21:06:06 | * | Sembei joined #nim |
21:09:00 | * | Matthias247 quit (Quit: Matthias247) |
21:14:13 | * | themagician joined #nim |
21:16:02 | * | space-wizard joined #nim |
21:31:28 | corecode | hum why do i get a chckRange call |
21:35:37 | * | nsf quit (Quit: WeeChat 1.6) |
21:36:48 | corecode | https://gist.github.com/92b01acb9f05453da6908ff46dfa642d |
21:36:50 | * | Matthias247 joined #nim |
21:37:06 | corecode | why do i get "value of type 'uint32' has to be discarded |
21:37:08 | corecode | in line 2? |
21:37:17 | corecode | (instantiation from line 12) |
21:37:27 | corecode | i may not understand how templates work |
21:41:21 | corecode | how come %% takes int, not unsigned? |
21:42:09 | * | couven92 joined #nim |
21:44:31 | Araq | corecode: make the template return something |
21:44:46 | Araq | template bitmask(...): uint32 = ... |
21:44:53 | corecode | ah, give it a type |
21:44:55 | corecode | thanks |
21:46:50 | corecode | integer types and not being allowed to cast in VM makes me unhappy :/ |
21:50:38 | * | irrequietus joined #nim |
21:52:12 | corecode | how do i prevent a chckRange call? |
21:52:25 | corecode | somehow mod or and don't seem to be sufficient to prevent it |
21:58:31 | * | brechtm joined #nim |
21:59:47 | Araq | convert the 'mod' result to the integer type you thought it would have |
22:00:05 | Araq | I intend to remove the "smart typing" rule for 0.16 |
22:02:07 | corecode | you mean cast? |
22:03:04 | Araq | no, T(x) is a type conversion |
22:03:14 | corecode | oh! |
22:03:18 | Araq | you likely use 'cast' where you should use type conversions |
22:03:25 | Araq | which are fully supported by the VM |
22:03:31 | corecode | derp |
22:08:35 | corecode | test.nim(15, 48) Error: type mismatch: got (range 0..1(uint32)) but expected 'range 0..1(int)' |
22:08:36 | corecode | |
22:08:42 | corecode | does that make any sense? |
22:08:52 | corecode | how can these ranges be different? |
22:13:42 | def- | corecode: sure, one uses a uint32 type underlying the range, the other an int type |
22:13:48 | FromGitter | <ephja> if the types differ then they are not the same. implicit conversion in cases where the source range always fits seems reasonable though |
22:15:21 | FromGitter | <ephja> after all, an int is quite similar to range[int.low .. int.high] |
22:17:58 | corecode | Error: internal error: unknown type kind tyFieldAccessor |
22:18:00 | corecode | heh |
22:19:27 | FromGitter | <ephja> I left outsome information there. What I meant was, the rules could be similar to that of plain integers, where implicit conversions are allowed provided that there's no risk of data loss |
22:24:08 | * | pregressive quit (Remote host closed the connection) |
22:24:40 | * | pregressive joined #nim |
22:25:32 | * | dmi00 quit (Ping timeout: 250 seconds) |
22:29:08 | * | pregressive quit (Ping timeout: 260 seconds) |
22:29:18 | * | kulelu88 quit (Quit: Leaving) |
22:36:53 | * | Sembei quit (Ping timeout: 248 seconds) |
22:38:17 | * | vlad1777d quit (Remote host closed the connection) |
22:46:46 | * | djiin quit (Ping timeout: 250 seconds) |
22:55:40 | FromGitter | <Almynic> which ide should I use for nim development? |
22:56:05 | FromGitter | <Almynic> I would like to have autocomplete |
23:00:03 | Araq | vscode is widely regarded the best |
23:00:14 | Araq | and no, you don't need Windows to run it. |
23:00:55 | * | elrood quit (Quit: Leaving) |
23:15:40 | * | djiin joined #nim |
23:20:43 | * | PMunch joined #nim |
23:20:44 | * | abeaumont joined #nim |
23:21:55 | * | Trustable quit (Remote host closed the connection) |
23:22:43 | * | themagician quit () |
23:45:21 | * | yglukhov quit (Remote host closed the connection) |
23:51:22 | * | yglukhov joined #nim |
23:55:30 | * | yglukhov quit (Ping timeout: 246 seconds) |