| 01:56:26 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 02:14:59 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
| 02:18:53 | * | chemist69 quit (Ping timeout: 260 seconds) |
| 02:23:08 | * | bjz joined #nim |
| 02:32:05 | * | chemist69 joined #nim |
| 03:04:13 | * | pie_ joined #nim |
| 03:11:44 | * | pie_ quit (Remote host closed the connection) |
| 03:19:37 | * | brechtm joined #nim |
| 03:24:08 | * | brechtm quit (Ping timeout: 244 seconds) |
| 04:40:58 | * | dddddd quit (Remote host closed the connection) |
| 04:43:21 | * | yglukhov joined #nim |
| 04:47:40 | * | yglukhov quit (Ping timeout: 250 seconds) |
| 05:13:13 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 05:19:26 | * | bjz joined #nim |
| 05:41:17 | * | vl409 joined #nim |
| 05:42:31 | vl409 | dom,salewski:Hi, I'v been reading yesterday's irclog |
| 05:43:06 | vl409 | I don't have the book, but I'd wrote something like: |
| 05:44:15 | vl409 | Based on complexity of the algorithm, requirements on executable size and user-friendliness, |
| 05:44:26 | vl409 | you can also run your algorithm to compute only first few values in compiletime, so that |
| 05:44:33 | vl409 | user can be served them immediately after startup and compute the rest on demand in run-time. |
| 05:44:41 | vl409 | static: |
| 05:44:57 | vl409 | const bootstraped_index = blabla(4096) # some meaningful example ??? |
| 05:45:10 | vl409 | # discaimer: I don't understand nim, I just hope this can be done. I could be wrong. |
| 05:46:12 | vl409 | disclaimer2: And I'm also not native English speaker/writer... |
| 05:46:27 | * | vl409 quit (Quit: Leaving) |
| 06:05:02 | * | nsf joined #nim |
| 06:21:32 | * | chemist69 quit (Ping timeout: 250 seconds) |
| 06:23:41 | * | chemist69 joined #nim |
| 06:45:25 | * | yglukhov joined #nim |
| 06:47:33 | * | rtr_ joined #nim |
| 06:50:12 | * | yglukhov quit (Ping timeout: 260 seconds) |
| 07:49:54 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5815a622482c168b22cebef8] |
| 07:50:08 | * | rtr__ joined #nim |
| 07:52:42 | * | rtr_ quit (Ping timeout: 250 seconds) |
| 08:03:30 | * | bug2000 quit (Remote host closed the connection) |
| 08:31:41 | * | yglukhov joined #nim |
| 08:36:08 | * | yglukhov quit (Ping timeout: 260 seconds) |
| 08:43:14 | * | gangstacat quit (Ping timeout: 250 seconds) |
| 09:00:47 | * | gokr joined #nim |
| 09:03:55 | * | Matthias247 joined #nim |
| 09:12:36 | * | nsf quit (Quit: WeeChat 1.6) |
| 09:24:48 | * | stisa joined #nim |
| 09:36:02 | * | djellemah quit (Quit: Leaving) |
| 09:40:52 | * | xet7 quit (Quit: Leaving) |
| 09:42:23 | * | yglukhov joined #nim |
| 09:46:54 | * | xet7 joined #nim |
| 10:42:15 | * | ARCADIVS quit (Quit: ARCADIVS) |
| 10:46:44 | * | gokr quit (Ping timeout: 250 seconds) |
| 10:48:13 | * | pafmaf joined #nim |
| 11:02:14 | * | Snircle joined #nim |
| 11:08:20 | * | nsf joined #nim |
| 11:15:02 | * | gangstacat joined #nim |
| 11:17:19 | * | Gonzih quit (Read error: Connection reset by peer) |
| 12:06:04 | * | Gonzih joined #nim |
| 12:08:19 | * | Matthias247 quit (Read error: Connection reset by peer) |
| 12:10:21 | * | xet7 quit (Ping timeout: 252 seconds) |
| 12:12:40 | * | stisa quit (Ping timeout: 268 seconds) |
| 12:15:35 | * | djellemah joined #nim |
| 12:20:47 | * | yglukhov quit (Remote host closed the connection) |
| 12:40:13 | * | MonsterAbyss joined #nim |
| 13:21:16 | * | yglukhov joined #nim |
| 13:22:39 | * | gokr joined #nim |
| 13:23:16 | * | stisa joined #nim |
| 13:25:56 | * | yglukhov quit (Ping timeout: 260 seconds) |
| 13:36:01 | * | pafmaf quit (Ping timeout: 260 seconds) |
| 13:57:52 | chemist69 | Hi, I hope there is s.o. around at this sunday afternoon.. |
| 14:00:36 | dom96 | "s.o"? |
| 14:02:09 | chemist69 | Is there a way to call the instance of an object directly (explained in this example: https://glot.io/snippets/ejukeg8vps)? |
| 14:02:09 | chemist69 | The example is minimal and has not much to do with what I want to actually do. |
| 14:02:32 | chemist69 | someone? |
| 14:02:54 | chemist69 | though it was common abbr. ;) |
| 14:03:00 | chemist69 | *thought |
| 14:05:26 | rtr__ | How do I raise an exception in a method like this --> ```proc decode(e: seq[byte]):``` |
| 14:06:05 | rtr__ | Error: 'Only ref object can be raised' |
| 14:12:33 | stisa | chemist69: `items` and `pairs` iterators are called implicitly, so maybe rename `count` to `items`? Also have a look at http://nim-lang.org/docs/manual.html#iterators-and-the-for-statement-implict-items-pairs-invocations |
| 14:16:00 | chemist69 | stisa: THAT WORKS!!! Very cool, thanks a lot! |
| 14:20:47 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 14:37:03 | * | nsf quit (Quit: WeeChat 1.6) |
| 14:51:16 | * | xet7 joined #nim |
| 14:57:56 | * | xet7 quit (Quit: Leaving) |
| 15:05:06 | * | irrequietus joined #nim |
| 15:08:56 | * | EastByte quit (Read error: Connection reset by peer) |
| 15:10:00 | * | EastByte joined #nim |
| 15:10:58 | chemist69 | rtr__: use newException()? |
| 15:11:30 | * | stisa quit (Ping timeout: 268 seconds) |
| 15:16:51 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
| 15:23:23 | * | yglukhov joined #nim |
| 15:28:12 | * | yglukhov quit (Ping timeout: 260 seconds) |
| 15:42:00 | * | irrequietus quit (Ping timeout: 250 seconds) |
| 15:45:07 | * | pafmaf joined #nim |
| 15:45:43 | * | PMunch joined #nim |
| 15:47:24 | * | stisa joined #nim |
| 16:06:03 | rtr__ | chemist69: Thanks |
| 16:06:18 | rtr__ | How do I convert a string to seq[byte] |
| 16:06:20 | rtr__ | ? |
| 16:07:46 | * | xet7 joined #nim |
| 16:11:02 | dom96 | Half off code for Nim in Action pBook in case anyone is interested: wm103016lt https://www.manning.com/books/nim-in-action?a_aid=niminaction&a_bid=78a27e81 |
| 16:26:44 | * | stisa quit (Ping timeout: 268 seconds) |
| 16:30:16 | * | planhths joined #nim |
| 16:31:07 | planhths | there are no fraction packages for nim right? |
| 16:31:57 | enthus1ast | dom96 shipping to germany is nearly the same as the book itself : ) |
| 16:33:07 | dom96 | enthus1ast: perhaps you would prefer to purchase from Amazon then? https://www.amazon.de/Nim-Action-Dominik-Picheta/dp/1617293431/ref=sr_1_1?ie=UTF8&qid=1477845165&sr=8-1&keywords=nim+in+action |
| 16:33:13 | dom96 | No discount code for that though |
| 16:33:58 | enthus1ast | no amazon... was just mentioning |
| 16:40:17 | dom96 | planhths: http://nim-lang.org/docs/rationals.html |
| 16:40:51 | planhths | thank you dom |
| 17:06:38 | * | gangstacat quit (Quit: Ĝis) |
| 17:07:01 | * | stisa joined #nim |
| 17:08:18 | * | gangstacat joined #nim |
| 17:16:15 | * | irrequietus joined #nim |
| 17:16:48 | * | Salewski joined #nim |
| 17:18:57 | Salewski | Dom, I still wonder how true this sentence from chapter 2 is: "In Nim every statement can be an expression." |
| 17:19:50 | Salewski | I think in Ruby it is true. But in Nim, how can an assignment be an expression? |
| 17:21:02 | Salewski | At least "discard x = 0" does not work. |
| 17:21:08 | * | arnetheduck quit (Ping timeout: 260 seconds) |
| 17:22:31 | Salewski | Or do we not call an assignment a statement in Nim. Indeed I am a bit confused now. |
| 17:25:06 | Salewski | Araq: In The manual: "However, some expressions are statements." # That makes it not really more clear for me. It can be the other way round, some statements can be expressions too. |
| 17:25:24 | * | yglukhov joined #nim |
| 17:26:26 | Salewski | So I have currently no idea for an expression which is a statement. Can someone give example? |
| 17:28:11 | dom96 | Salewski: echo((var x = 0; x)) |
| 17:28:20 | dom96 | that works |
| 17:28:41 | Salewski | Ah interesting, thanks. |
| 17:29:38 | * | yglukhov quit (Ping timeout: 245 seconds) |
| 17:31:13 | * | nsf joined #nim |
| 17:38:47 | * | libman joined #nim |
| 17:49:38 | * | vxn left #nim (#nim) |
| 17:50:04 | * | irrequietus quit (Ping timeout: 244 seconds) |
| 17:55:34 | * | irrequietus joined #nim |
| 17:55:37 | * | irrequietus quit (Changing host) |
| 17:55:37 | * | irrequietus joined #nim |
| 18:13:41 | * | qwertfisch quit (Ping timeout: 260 seconds) |
| 18:16:58 | * | aaasad joined #nim |
| 18:18:08 | * | qwertfisch joined #nim |
| 18:20:31 | * | yglukhov joined #nim |
| 18:20:55 | rtr__ | Hi. How do I convert a `string` into `seq[byte]`? |
| 18:21:20 | dom96 | rtr__: why do you want to do that? |
| 18:21:52 | dom96 | You will need to iterate over the string and copy it into a sequency, converting each character into a `byte`. |
| 18:21:56 | dom96 | *sequence |
| 18:23:07 | rtr__ | dom96: Kind of make things easy while implementing mqtt protocol. Need to convert "MQTT" into seq[byte] and place it in variable header |
| 18:23:31 | rtr__ | Ohh. Ok. Thanks |
| 18:25:31 | dom96 | Why not just use `string`? |
| 18:25:38 | dom96 | How does seq[byte] make it easier? |
| 18:25:46 | planhths | how to write this ccode to nim: (double)0x7FFFFFFF ? |
| 18:27:00 | Salewski | float(0x7FFFFFFF) ? |
| 18:27:09 | chemist69 | or 0x7FFFFFFF.toFloat |
| 18:27:18 | planhths | thx |
| 18:29:28 | rtr__ | dom96: A mqtt variable header contains other data as well which requires bit manipulation. Thought seq[byte] is way to go for returning encoded frames |
| 18:29:50 | planhths | not really working though... |
| 18:30:40 | dom96 | rtr__: I see. In that case, sure, use `byte`. |
| 18:32:07 | Salewski | echo float(0x7FFFFFFF) # 2147483647.0 # is that not what you desire? |
| 18:33:55 | planhths | yes ehm no, I don't understand the code I am trying to port |
| 18:33:59 | planhths | ...yet |
| 18:42:44 | * | Sentreen quit (Read error: Connection reset by peer) |
| 18:43:19 | * | Sentreen joined #nim |
| 18:47:43 | planhths | I can't catch OverflowError ? |
| 18:51:28 | Salewski | For float, int or uint? I would guess for int try/except may work. |
| 18:51:47 | planhths | I have: var ai: int64; var y: float = ...; ai = y.int64; |
| 18:53:48 | Salewski | My guess would be that an exeption is raised, but I never tried. |
| 18:55:15 | * | nsf quit (Quit: WeeChat 1.6) |
| 18:55:24 | planhths | It seems that y = 4.305870196488207 before the exception but this line > ai = y.int64 raises OverflowError. What's happening? |
| 18:55:33 | planhths | I am confused |
| 19:04:33 | Salewski | var ai: int32 = int32(1.0e300); echo ai # 0, no exeption |
| 19:04:47 | Salewski | Yes, confused too. |
| 19:05:19 | * | aaasad quit (Read error: Connection reset by peer) |
| 19:06:07 | * | aasad joined #nim |
| 19:10:37 | * | gangstacat quit (Ping timeout: 260 seconds) |
| 19:15:33 | * | gangstacat joined #nim |
| 19:17:01 | * | aasad quit (Read error: Connection reset by peer) |
| 19:19:15 | dom96 | planhths: can you gist your code? |
| 19:19:26 | planhths | sure |
| 19:22:00 | planhths | https://gist.github.com/konqoro/15a49e7bc95675e0480feafd0435ce2f |
| 19:24:13 | dom96 | interesting |
| 19:24:19 | dom96 | Might be worth a bug report |
| 19:28:30 | planhths | ok will do |
| 19:29:11 | Salewski | var b: int |
| 19:29:16 | Salewski | b = toInt(1.0e300) |
| 19:29:24 | Salewski | echo b # -9223372036854775808 # but should raise exeption from manual |
| 19:29:36 | Salewski | May be indeed a bug |
| 19:31:02 | rtr__ | what is the easiest way to convert uint16 to array of 2 bytes? |
| 19:32:12 | Salewski | You may try cast when you know what you do. |
| 19:32:34 | * | brechtm joined #nim |
| 19:35:45 | rtr__ | Salewski: shift right it is then. Thanks :) |
| 19:39:32 | Salewski | Of course cast copies only the bit pattern, you have to know and check what you really want as the result. |
| 19:57:24 | rtr__ | Does nim have any official online compiler like rust? |
| 19:58:16 | planhths | I think the problem is with the while loop condition... |
| 20:01:40 | * | brechtm quit (Remote host closed the connection) |
| 20:04:11 | chemist69 | rtr__: I don't know about `official`, but you can use glot.io |
| 20:09:07 | * | beatmox quit (Remote host closed the connection) |
| 20:09:20 | * | beatmox joined #nim |
| 20:09:26 | * | beatmox quit (Remote host closed the connection) |
| 20:09:40 | * | beatmox joined #nim |
| 20:09:52 | rtr__ | chemist69: Thanks |
| 20:13:37 | jh32 | hi |
| 20:14:41 | jh32 | is anyone using the linalg package? |
| 20:15:29 | * | brechtm joined #nim |
| 20:16:19 | jh32 | i did an experimental rewrite of mnielson's deep learning example code in nim with linalg |
| 20:16:59 | jh32 | it works but is rather slow compared to the python/numpy reference implementation |
| 20:18:16 | * | beatmox quit (Remote host closed the connection) |
| 20:18:29 | * | beatmox joined #nim |
| 20:18:34 | * | beatmox quit (Client Quit) |
| 20:18:39 | * | yglukhov quit (Remote host closed the connection) |
| 20:19:36 | * | beatmox joined #nim |
| 20:19:44 | * | beatmox quit (Client Quit) |
| 20:20:15 | * | beatmox joined #nim |
| 20:21:59 | * | beatmox quit (Client Quit) |
| 20:22:29 | * | beatmox joined #nim |
| 20:22:41 | rtr__ | How do I return a sub sequence --> https://glot.io/snippets/ejuv0l49e0 |
| 20:22:44 | rtr__ | ? |
| 20:25:20 | * | Matthias247 joined #nim |
| 20:35:41 | * | fredrik92 joined #nim |
| 20:36:11 | * | fredrik92 is now known as couven92 |
| 20:36:41 | * | bjz joined #nim |
| 20:37:05 | * | subsetpark joined #nim |
| 20:41:52 | * | brechtm quit (Remote host closed the connection) |
| 20:54:05 | * | libman quit (Quit: Leaving.) |
| 21:02:40 | * | bjz_ joined #nim |
| 21:03:16 | * | bjz quit (Ping timeout: 260 seconds) |
| 21:03:43 | * | nsf joined #nim |
| 21:05:15 | * | nonlinear joined #nim |
| 21:05:30 | * | nonlinear left #nim ("http://quassel-irc.org - Chat comfortably. Anywhere.") |
| 21:08:19 | Salewski | rth, newSeq(1..10) in invalid. I think. |
| 21:09:53 | * | fredrik92 joined #nim |
| 21:10:12 | * | desophos quit (Ping timeout: 260 seconds) |
| 21:10:42 | * | couven92 quit (Disconnected by services) |
| 21:10:43 | * | fredrik92 is now known as couven92 |
| 21:11:28 | Salewski | You may use @[1,2,3,4,5,6,7,8,9,10] for initial seq. Or see manual for other notations. |
| 21:19:09 | * | yglukhov joined #nim |
| 21:21:12 | stisa | an alternative is `lc[x | (x <- 1..10), int]` if you use http://nim-lang.org/docs/future.html |
| 21:23:28 | * | yglukhov quit (Ping timeout: 256 seconds) |
| 21:23:51 | * | Pommersche92 joined #nim |
| 21:23:54 | * | pie_ joined #nim |
| 21:26:42 | * | Pommersche92 left #nim (#nim) |
| 21:35:52 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
| 21:49:35 | * | irrequietus quit () |
| 21:55:05 | * | pie_ left #nim ("Leaving") |
| 21:57:26 | * | Snircle joined #nim |
| 21:58:23 | * | Salewski left #nim (#nim) |
| 22:02:09 | * | bjz joined #nim |
| 22:10:13 | * | stisa quit (Quit: Leaving) |
| 22:13:34 | * | couven92 quit (Ping timeout: 244 seconds) |
| 22:16:10 | * | desophos joined #nim |
| 22:17:43 | * | bjz quit (Read error: Connection reset by peer) |
| 22:24:24 | * | Matthias247 quit (Read error: Connection reset by peer) |
| 22:25:49 | * | Trustable joined #nim |
| 22:27:12 | * | couven92 joined #nim |
| 22:33:59 | * | vlad1777d joined #nim |
| 22:43:22 | vlad1777d | Hello to all. I can import module in parent directory - another subfolder so: import ../subfolder2/module2 |
| 22:44:09 | vlad1777d | Are there another ways to make this (maybe with points only, or with slashes only, or with another symbols) ? |
| 22:44:21 | * | brechtm joined #nim |
| 22:46:13 | * | pafmaf quit (Ping timeout: 260 seconds) |
| 22:53:25 | * | xet7 quit (Quit: Leaving) |
| 23:05:53 | * | nsf quit (Quit: WeeChat 1.6) |
| 23:08:54 | * | cheatfate quit (Read error: Connection reset by peer) |
| 23:09:00 | * | cheatfate_ joined #nim |
| 23:21:22 | * | yglukhov joined #nim |
| 23:23:01 | * | mcc joined #nim |
| 23:23:14 | mcc | Hello, so |
| 23:23:32 | mcc | I found a situation where x = x * y works but x *= y results in the error "for a 'var' type a variable needs to be passed, but 'x(actor.at)' is immutable" |
| 23:23:35 | mcc | do you think this is likely to be a compiler bug? |
| 23:23:38 | mcc | also hi |
| 23:24:05 | * | Trustable quit (Remote host closed the connection) |
| 23:25:08 | * | planhths quit (Quit: Konversation terminated!) |
| 23:26:04 | * | yglukhov quit (Ping timeout: 260 seconds) |
| 23:31:34 | * | couven92 quit (Ping timeout: 250 seconds) |
| 23:34:49 | * | perturbation joined #nim |
| 23:37:45 | * | fredrik92 joined #nim |
| 23:38:06 | * | fredrik92 is now known as couven92 |
| 23:38:10 | * | brechtm quit (Remote host closed the connection) |
| 23:38:30 | perturbation | weird issue with setControlCHook (latest compiler from devel) https://gist.github.com/singularperturbation/3beddef7fca799dc7ea6107eb04f401c |
| 23:41:10 | perturbation | if using a closure, works (compiles) with capturing global variables but not local |
| 23:41:26 | perturbation | although, that may just be that it's able to write it as not a closure |
| 23:42:27 | perturbation | is this because a proc(){.closure.} cannot be used as a proc(){.noconv.} ? (so not really an error)? |
| 23:44:47 | * | vlad1777d quit (Quit: Leaving) |
| 23:50:48 | * | vlad1777d joined #nim |