00:00:22 | flaviu | curl https://raw.githubusercontent.com/ekarlso/nimvm/master/install.sh | bash should be curl https://raw.githubusercontent.com/ekarlso/nimvm/master/scripts/install.sh | sh |
00:00:43 | ekarlso | :p |
00:00:57 | ekarlso | flaviu: pm welcome :p |
00:04:19 | * | goobles quit (Ping timeout: 246 seconds) |
00:05:30 | * | reem quit (Remote host closed the connection) |
00:05:57 | BlaXpirit | .eval var a: seq[int]; a.items |
00:06:00 | Mimbus | BlaXpirit: eval.nim(4, 1) Error: expression 'items' cannot be called |
00:06:01 | BlaXpirit | what does this mean? |
00:06:14 | Araq | it's an iterator |
00:06:26 | Araq | you can call it in a for loop context |
00:06:39 | BlaXpirit | how do I pass it to a function then? |
00:06:43 | BlaXpirit | oh.. |
00:06:46 | BlaXpirit | closure, huh |
00:07:37 | * | reem joined #nim |
00:12:52 | OderWat | @flaviu @ekarlso the instructions are not up to date anyway. the path does not exists anymore |
00:13:33 | flaviu | OderWat: https://raw.githubusercontent.com/ekarlso/nim-vm/master/bin/nim-vm |
00:13:50 | OderWat | I wrote a "change" list about nim-vm in the forum: http://forum.nim-lang.org/t/996 ... The readme needs to be fixed and I think there should be some instructions too. But know I am lazy for the remaining evening I guess |
00:14:26 | OderWat | TY @flaviu ;-) |
00:14:46 | OderWat | know = now :) |
00:32:17 | BlaXpirit | how to implement typeclass for random access container? |
00:32:41 | BlaXpirit | c.high is SomeInteger is good |
00:32:46 | BlaXpirit | c[i] is T is not good |
00:45:51 | OderWat | @ekarlso pull request for readme is up :) |
00:57:25 | ekarlso | flaviu: would you have a lumx app or a bootstrap one ? |
00:57:33 | ekarlso | I tested bootstrap just for the feck of it |
00:58:30 | flaviu | lumx looks better |
00:58:30 | flaviu | /me loves the click circles |
00:58:31 | flaviu | Try enabling caching first, see how that improves performance. |
00:58:37 | ekarlso | ok :p |
00:58:40 | flaviu | \me loves the click circles |
00:58:55 | ekarlso | client failure :p |
01:00:26 | flaviu | Looking at the code a bit, can you use flex-item=2 on the version and CC? Seems to fix all the overlapping issues. |
01:00:53 | ekarlso | flaviu: yeah |
01:01:08 | ekarlso | btw, version isnt supported on the backend yet :p |
01:01:17 | ekarlso | i got it here locally running just not upped it |
01:01:36 | Varriount | ekarlso: Responded to your post for nim-vm on the forum. |
01:02:24 | ekarlso | huh ? :p |
01:02:29 | ekarlso | i didnt post anything there :p |
01:02:33 | ekarlso | I think |
01:02:35 | OderWat | @Varriount I guess you mean me :) |
01:02:39 | Varriount | Oh, wait, that was OderWat |
01:02:51 | flaviu | What if I want to choose Nim 0.10.2? The backend won't let me choose between 0.10.2 and 0.10.2! |
01:02:57 | flaviu | ;) |
01:03:14 | ekarlso | between what flaviu ? :p |
01:04:48 | flaviu | It's a joke, I'm presenting an alternative choice identical to the other choice. |
01:06:37 | Varriount | Do I choose hydrogen dioxide, or water. I don't know. :P |
01:06:54 | ekarlso | flaviu: is perf any better ? |
01:07:31 | flaviu | ekarlso: I don't think adding nginx is enough, you probably need to add something to the config. |
01:07:51 | BlaXpirit | OderWat, you wanna make a pull request with this? https://gist.github.com/BlaXpirit/ef63776bbe566be1a93c I'll take it from there |
01:08:27 | BlaXpirit | (talking about random) to the bottom of common.nim |
01:08:32 | * | Jehan_ quit (Quit: Leaving) |
01:09:07 | flaviu | ekarlso: http://www.cruisemaniac.com/nginx-caching-and-compression |
01:11:05 | OderWat | @Varriount I answered on the forum. not sure how helpful that is actually. I have not idea about installing on windows |
01:14:38 | OderWat | @BlaXpirit I make one! Looks cood |
01:16:36 | BlaXpirit | 3 AM though :| |
01:16:47 | OderWat | @BlaXpirit Do you want me to replace the existing iterator or add it as a proc? |
01:17:16 | BlaXpirit | OderWat, you can pretty much append the code to the bottom of src/random/common.nim |
01:17:57 | OderWat | Hmm it looks more it belongs into random.nim as there is a iterator with the same name at the lower part of the source |
01:18:32 | BlaXpirit | random.nim just has aliases. you can make an alias as well if you want |
01:18:59 | OderWat | ah well I just looked into the common.nim makes more sense ! |
01:23:14 | ekarlso | meh flaviu http://185.56.186.94/#/ |
01:23:18 | ekarlso | doesnt seem to help too much :/ |
01:25:27 | * | BlaXpirit quit (Quit: Quit Konversation) |
01:27:50 | * | BlaXpirit joined #nim |
01:27:57 | ekarlso | oh |
01:27:58 | flaviu | ekarlso: It helps *tremendously*. |
01:27:59 | ekarlso | nvm |
01:28:02 | ekarlso | it's caching now :p |
01:28:22 | ekarlso | so yeah, nginx is now serving all content :) |
01:28:34 | flaviu | 320ms page loads are 10x better than 3s page loads. |
01:28:42 | ekarlso | :P |
01:28:54 | ekarlso | doesn't help that you are over tha atlantic also :D |
01:29:00 | ekarlso | the server is located in norway ;) |
01:29:17 | flaviu | Yep, move the server to atlanta! I want 50ms page loads! |
01:29:31 | ekarlso | hah :p |
01:29:42 | ekarlso | I got hpcloud in nevada if that's fine :p |
01:30:53 | flaviu | That's only 2x closer than norway :/ |
01:31:06 | flaviu | but 320 ms is fast enough. |
01:31:06 | ekarlso | hah :p |
01:31:18 | flaviu | If Nim gets bigger, you can get a CDN for the assets. |
01:31:29 | ekarlso | nim gets bigger ? |
01:31:40 | ekarlso | how does that change it :) |
01:32:06 | ekarlso | fixed the width of the select flaviu |
01:32:20 | ekarlso | so then just gotta fix passing of the opts to the api |
01:32:28 | ekarlso | ill get that up tmrw |
01:32:42 | ekarlso | now I gotta go sleep before the kiddo wakes up :/ |
01:33:35 | onionhammer | ekarlso latest output should be at the top\ |
01:33:48 | flaviu | ekarlso: How about cloudflare? |
01:33:52 | * | akiradeveloper quit (Remote host closed the connection) |
01:34:01 | ekarlso | flaviu: probably :) |
01:34:14 | flaviu | They have a free tier that looks pretty useful. |
01:36:26 | flaviu | I'm going to bug dom96 to add cloudflare to the nim site. |
01:37:37 | ekarlso | :p |
01:37:43 | ekarlso | docs from the nim site |
01:37:53 | ekarlso | should have it's own domain ish a'ls docs.nim-lang.org |
01:38:13 | ekarlso | onionhammer: fixed |
01:38:39 | ekarlso | anyways, calling it a night, seeya tmrw |
01:39:06 | onionhammer | god natt |
01:39:29 | * | darkf joined #nim |
01:39:54 | * | akiradeveloper joined #nim |
01:48:39 | * | gsingh93 joined #nim |
01:55:28 | * | BlaXpirit quit (Quit: Bye) |
02:09:12 | * | a5i joined #nim |
02:16:11 | * | TEttinger joined #nim |
02:17:02 | * | fizzbooze joined #nim |
02:36:36 | * | akiradeveloper quit (Remote host closed the connection) |
02:36:38 | * | JusticeFries joined #nim |
02:39:18 | * | a5i quit () |
02:45:09 | * | darkf quit (Quit: Leaving) |
02:48:24 | * | MagusOTB joined #nim |
02:51:11 | MagusOTB | I think I found a typo in opengl.nim |
02:51:14 | MagusOTB | GLarray4f* = GLvectorf4 |
02:51:33 | * | chemist69_ joined #nim |
02:51:38 | MagusOTB | the rest of them are GLarrayTN |
02:54:36 | * | chemist69 quit (Ping timeout: 246 seconds) |
03:00:52 | * | darkf joined #nim |
03:01:15 | * | a5i joined #nim |
03:09:26 | * | JusticeFries quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
03:12:22 | * | JusticeFries joined #nim |
03:18:35 | * | jsudlow__ joined #nim |
03:20:09 | * | jsudlow quit (Ping timeout: 246 seconds) |
03:27:03 | * | akiradeveloper joined #nim |
03:49:12 | * | NimBot joined #nim |
04:07:04 | * | kashyap_ joined #nim |
04:07:37 | kashyap_ | How do I declare a variable "static" as in local variable but program lifetime |
04:14:21 | * | davidhq joined #nim |
04:14:31 | * | davidhq quit (Client Quit) |
04:16:52 | * | davidhq joined #nim |
04:18:59 | * | akiradeveloper quit (Remote host closed the connection) |
04:21:09 | * | akiradeveloper joined #nim |
04:21:37 | * | reem quit (Remote host closed the connection) |
04:29:53 | fowl | kashyap_, proc main = ...; main() |
04:30:18 | fowl | oh nevermind i read that wrong |
04:30:26 | kashyap_ | ok :) |
04:30:41 | fowl | a global variable is defined in the top level of a module |
04:30:58 | kashyap_ | yeah ..that's what I am doing for now |
04:30:59 | fowl | inside a function you can get static variable with {.global.} |
04:32:11 | fowl | var x{.global.} = 0 |
04:34:48 | kashyap_ | oh cool, thanks fowl |
04:35:02 | * | JusticeFries quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
04:52:49 | * | reem joined #nim |
04:54:22 | fowl | ekarlso, the repl looks good. i was going to recommend dyndns for a url but they arent free anymore, found this though http://lifehacker.com/the-best-free-alternatives-to-dyndns-1561556205 |
05:00:34 | * | akiradeveloper quit (Remote host closed the connection) |
05:04:19 | kashyap_ | is there a way to initialize arrays in a way that I assign values to specific indices ... |
05:04:50 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
05:05:15 | * | Menche quit (Quit: going home, brb) |
05:05:25 | fowl | other than arr[n] = value, arr = [0,1,2,3] |
05:12:17 | * | reem quit (Remote host closed the connection) |
05:20:27 | kashyap_ | yes ... in c one can do int x[10] = { [9] 100} |
05:20:35 | kashyap_ | where 9th index has the value 100 |
05:27:21 | fowl | i would write a macro to do it |
05:29:13 | kashyap_ | oh okay |
05:32:13 | * | gsingh93 quit (Ping timeout: 264 seconds) |
05:32:19 | fowl | kashyap_, https://gist.github.com/fowlmouth/faf44627440db3ef70f1 |
05:32:37 | * | reem joined #nim |
05:32:46 | kashyap_ | awesome...thank you so much fowl |
05:33:16 | fowl | oops that should be len(args)-1 |
05:33:38 | kashyap_ | ok |
05:35:35 | * | fizzbooze quit (Ping timeout: 246 seconds) |
05:36:20 | kashyap_ | fowl quick question - cant the macro do the declaration as well? |
05:36:56 | fowl | it could |
05:38:58 | kashyap_ | actually, fowl, could you give me a macro that expands to initialization instead of assignment |
05:39:30 | * | JusticeFries joined #nim |
05:40:49 | fowl | yep 1 sec |
05:41:29 | * | akiradeveloper joined #nim |
05:53:47 | * | JusticeFries quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
05:55:37 | * | johnsoft quit (Ping timeout: 264 seconds) |
05:57:47 | * | johnsoft joined #nim |
05:59:19 | * | JusticeFries joined #nim |
06:00:07 | fowl | kashyap_, i cant make it work right now , found a bug |
06:00:21 | kashyap_ | bug in nim? |
06:00:32 | fowl | yea |
06:01:36 | kashyap_ | good something good came out of it :) |
06:02:31 | fowl | kashyap_, to make it work at initialization i was going to return (; var x: ty; x[index] = value; x) |
06:04:19 | kashyap_ | actually fowl .. what I need is more like - setIndeces(x, 5, 0, 9, 2, 20) -> var x: array[5, int] = [9, 0, 20, 0, 0] |
06:04:46 | fowl | kashyap_, that version works |
06:05:06 | kashyap_ | oh great. ... could you post it please |
06:08:46 | fowl | kashyap_, https://gist.github.com/fowlmouth/faf44627440db3ef70f1#file-gistfile2-nim |
06:10:07 | kashyap_ | super! |
06:10:28 | * | Jesin joined #nim |
06:11:14 | fowl | macros are awesome |
06:11:38 | * | ldlework quit (Ping timeout: 246 seconds) |
06:12:41 | * | saml_ quit (Remote host closed the connection) |
06:13:42 | fowl | oh it wasnt a bug that kept that from working |
06:13:55 | fowl | i needed to change :stmt on the macro to expr |
06:14:55 | * | johnsoft quit (Ping timeout: 256 seconds) |
06:15:23 | * | epichero joined #nim |
06:15:27 | * | johnsoft joined #nim |
06:15:51 | kashyap_ | fowl you bet :) |
06:17:44 | * | Menche joined #nim |
06:24:58 | * | johnsoft quit (Ping timeout: 256 seconds) |
06:30:27 | * | johnsoft joined #nim |
06:47:45 | * | filwit joined #nim |
07:02:05 | * | flaviu quit (Remote host closed the connection) |
07:02:11 | * | flaviu joined #nim |
07:02:59 | * | JusticeFries quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
07:07:10 | * | johnsoft quit (Ping timeout: 255 seconds) |
07:08:57 | * | a5i quit (Quit: Connection closed for inactivity) |
07:18:08 | * | quasinoxen quit (Ping timeout: 246 seconds) |
07:18:51 | * | quasinoxen joined #nim |
07:19:23 | kashyap_ | Hey fowl, you there? |
07:19:43 | fowl | sup |
07:20:11 | kashyap_ | the declArray seems to do the assignment .. which means the values are assigned at run time |
07:20:29 | kashyap_ | It's not doing - setIndeces(x, 5, 0, 9, 2, 20) -> var x: array[5, int] = [9, 0, 20, 0, 0] |
07:23:02 | * | untitaker quit (Ping timeout: 246 seconds) |
07:30:02 | * | untitaker joined #nim |
07:37:09 | fowl | no its not |
07:42:03 | kashyap_ | hey fowl .. could I request you to give me a version that produces the initialization array - I am trying with nnkBracket but its not working |
07:44:33 | * | reem_ joined #nim |
07:44:46 | * | reem quit (Read error: Connection reset by peer) |
07:46:58 | fowl | kashyap_, i updated the gist |
07:47:35 | fowl | kashyap_, i filled the nnkBracket with size 0s then in the loop i replace the 0 with the argument |
07:47:46 | kashyap_ | cool :) |
07:48:06 | * | bcinman quit (Ping timeout: 264 seconds) |
07:48:20 | kashyap_ | thank you so much fowl |
07:49:00 | fowl | kashyap_, i did it the other way so that it could work on any type, you should pass a default value so that it could be an array of something other than int |
07:57:02 | * | epichero quit (Read error: Connection reset by peer) |
07:57:17 | * | epichero joined #nim |
07:58:41 | * | epichero_ joined #nim |
07:58:42 | * | epichero quit (Read error: Connection reset by peer) |
08:01:49 | * | gmpreussner|work quit (Read error: Connection reset by peer) |
08:05:04 | * | reem_ is now known as reem |
08:13:37 | * | kashyap_ quit (Ping timeout: 246 seconds) |
08:29:47 | * | reem quit (Remote host closed the connection) |
08:41:20 | * | reem joined #nim |
08:43:50 | * | reem quit (Remote host closed the connection) |
08:48:55 | * | gokr quit (Quit: Leaving.) |
08:52:53 | * | reem joined #nim |
08:53:09 | * | quasinoxen quit (Ping timeout: 252 seconds) |
08:53:46 | * | arnetheduck joined #nim |
08:56:56 | * | reem quit (Remote host closed the connection) |
09:00:59 | * | xificurC joined #nim |
09:07:23 | * | reem joined #nim |
09:13:17 | * | akiradeveloper quit (Remote host closed the connection) |
09:13:55 | * | reem quit (Remote host closed the connection) |
09:16:55 | * | reem joined #nim |
09:22:28 | * | akiradeveloper joined #nim |
09:30:00 | * | reem quit (Remote host closed the connection) |
09:32:06 | * | reem joined #nim |
09:41:23 | * | arnetheduck quit (Read error: Connection reset by peer) |
09:43:23 | * | BlaXpirit joined #nim |
09:47:00 | * | epichero_ quit (Remote host closed the connection) |
09:51:15 | * | reem quit (Remote host closed the connection) |
09:57:13 | * | reem joined #nim |
09:58:17 | * | arnetheduck joined #nim |
10:11:12 | BlaXpirit | Is there a way to invoke a macro on an include? |
10:14:59 | * | reem quit (Remote host closed the connection) |
10:17:01 | * | akiradeveloper quit (Remote host closed the connection) |
10:20:50 | * | reem joined #nim |
10:22:35 | * | Matthias247 joined #nim |
10:24:16 | * | TEttinger quit (Ping timeout: 255 seconds) |
10:27:36 | * | reem quit (Remote host closed the connection) |
10:27:53 | * | arnetheduck quit (Read error: Connection reset by peer) |
10:31:51 | novist | BlaXpirit: doesnt my_macro include "thing" work? |
10:34:19 | BlaXpirit | wha |
10:35:01 | novist | actually guess not. but i suppose you can make my_include("file.nim") which would make ast of include with whatever else you want |
10:37:55 | ekarlso | morning :p |
10:38:20 | * | goobles joined #nim |
10:41:22 | * | xificurC quit (Ping timeout: 240 seconds) |
10:47:53 | * | epichero joined #nim |
10:52:28 | * | epichero quit (Ping timeout: 252 seconds) |
10:53:02 | * | akiradeveloper joined #nim |
11:08:14 | fowl | BlaXpirit, m: include foo |
11:09:06 | BlaXpirit | i remember doing something like this, it told me include must be at top level |
11:09:31 | fowl | you might be able to emit include at the top level then |
11:10:32 | BlaXpirit | but it seems to work. i probably did something different |
11:10:45 | BlaXpirit | thanks |
11:11:13 | BlaXpirit | what the heck |
11:11:18 | BlaXpirit | importing modules gives me output |
11:11:45 | BlaXpirit | oh including* |
11:12:32 | BlaXpirit | and by output i mean the unit tests run |
11:15:49 | * | reem joined #nim |
11:17:40 | fowl | that makes sense |
11:17:45 | fowl | i meant to say import |
11:20:14 | * | reem quit (Ping timeout: 245 seconds) |
11:26:01 | * | Matthias247 quit (Quit: Matthias247) |
11:33:44 | BlaXpirit | seems like having multiple templates with the same name doesn't work |
11:35:39 | * | Matthias247 joined #nim |
11:56:56 | Araq | BlaXpirit: of course it works. |
11:57:15 | BlaXpirit | well it told me wrong number of arguments |
11:57:18 | Araq | but not with .immediate |
11:57:26 | BlaXpirit | right |
12:00:29 | Araq | def-: why is my.a[0..my.a.high] = my.c[0..my.c.high] still faster than the alternatives? |
12:00:45 | Araq | the my.c[..] produces a fresh substring |
12:04:25 | * | arnetheduck joined #nim |
12:14:26 | arnetheduck | hi, a question about the nim source code: is the T before the types necessary somehow or just convention? if convention, is it intentional, or a leftover from pascal? |
12:14:52 | BlaXpirit | obsolete convention |
12:15:25 | arnetheduck | ok, seems kind of redundant since the types are already uppercased |
12:15:36 | def- | Araq: strange, can't reproduce in microbenchmarks. my bad then I guess |
12:15:39 | arnetheduck | what about P for ref types, also obsolete? |
12:15:42 | BlaXpirit | Nim used to be completely case-insensitive |
12:16:02 | arnetheduck | ah, interesting |
12:16:34 | Araq | arnetheduck: T was for value types, P for reference types, contrary to popular belief case-insensitivity was not the primary reason for this convention |
12:18:20 | Araq | got compile-times of 'niminst' from 10s to 2s :D |
12:18:38 | Araq | with a 2 line fix in the GC |
12:18:41 | def- | Araq: what made it slow? |
12:18:53 | Araq | the compiler hates my GC :P |
12:19:01 | Araq | it's deeply recursive |
12:19:16 | * | Matthias247 quit (Read error: Connection reset by peer) |
12:19:29 | BlaXpirit | I have a type `array[5, int]`. how to get the `int` from it? |
12:19:39 | Araq | type(a[0]) ? |
12:20:14 | BlaXpirit | Error: internal error: cannot generate VM code for type (bytes[0]) |
12:20:30 | Araq | nice :-) |
12:21:27 | Araq | BlaXpirit: in a VM context it's better to use the new types API |
12:21:41 | BlaXpirit | any pointer to it? |
12:22:00 | arnetheduck | so doc/intern.txt is also obsolete/needs-fix? looks like it's still recommending T/P.. |
12:22:28 | Araq | doc/intern.txt is about the compiler, the compiler still uses T/P |
12:23:38 | Araq | BlaXpirit: macros.getType() |
12:29:30 | arnetheduck | I saw some redundant whitespace cleanup in the compiler the other day, could post a quick patch removing the rest if there's interest |
12:30:45 | arnetheduck | s/redundant/trailing |
12:31:09 | def- | arnetheduck: some people tried before, PRs were not accepted |
12:31:33 | Araq | arnetheduck: I prefer to do it incrementally |
12:31:46 | Araq | whenever I touch a file, whitespace is not deleted |
12:31:53 | Araq | *is now |
12:32:26 | Araq | but I don't like huge whitespace cleanup commits |
12:34:24 | arnetheduck | noticed, had to go look for the ignore whitespace option when looking at recent developments ;) |
12:39:57 | arnetheduck | another question - dead code elimination is listed as a feature, and when running nim, it looks like it compiles all deps every time to figure it out.. is there anything planned for incremental / partial compiles? I tried symbolFiles but couldn't get it to work (issue 1031) |
12:41:03 | arnetheduck | also, dce is akin to running whole-program lto in the c/c++ world? |
12:44:01 | * | dyu joined #nim |
12:45:05 | Araq | arnetheduck: well --symbolfiles worked quite well before we broke them. so as a proof of the concept, yes it works. but we'll fix it after 1.0 is out. |
12:49:00 | Araq | and yeah dce==lto |
12:50:05 | * | emilsp-home joined #nim |
12:50:42 | emilsp-home | hello, this might not be a completely related question, but how does one do efficient string searching ? |
12:50:51 | emilsp-home | if it were ascii, I'd just have a tree |
12:52:33 | Araq | depends on lots of aspects |
12:53:00 | Araq | but you can usually treat utf-8 strings like ascii strings for searching |
12:53:40 | Araq | perhaps you need some normalization step before the search |
12:53:52 | emilsp-home | so I can just cast a single character to int and compare it as such to build a balanced tree ? |
12:54:09 | Araq | you don't need to cast anything |
12:54:20 | Araq | you can do someChar < otherChar |
12:54:45 | emilsp-home | that's convenient. Thanks. |
12:54:46 | Araq | but usually hash tables completely outperform trees |
12:55:10 | Araq | you can try if Nim's crit bit trees beat hash tables |
12:55:16 | Araq | but iirc usually they don't |
12:55:42 | Araq | and a critbit tree is MUCH better than a balanced tree for strings |
12:55:56 | emilsp-home | I need it to be promiscuous, or can I actually make a substring's hash match a real string ? |
12:57:11 | Araq | hum? |
12:57:31 | Araq | usually our hashing function is fine |
12:58:29 | emilsp-home | well, what I mean by that is can I find all strings which are a 'superstring' of a substring by using a hashmap ? |
12:58:33 | emilsp-home | if so, how does that work ? |
12:59:40 | * | Zigara joined #nim |
13:05:07 | Araq | ah well it doesn't :P |
13:07:52 | emilsp-home | thus, a crit bit tree would be the best choice. Thanks for the assistance :) |
13:18:33 | * | akiradeveloper quit () |
13:23:58 | ekarlso | OderWat: you around ? |
13:42:54 | OderWat | @ekarlso now.. hey |
13:47:53 | BlaXpirit | .eval echo uint64.high |
13:47:56 | Mimbus | BlaXpirit: eval.nim(3, 11) Error: invalid argument for 'high' |
13:47:57 | BlaXpirit | why |
13:48:38 | Araq | because uint64 is not an ordinal type |
13:48:47 | BlaXpirit | what can be done about this? |
13:49:21 | * | davidhq joined #nim |
13:49:21 | Araq | go through the whole compiler and ensure that it handles uint64 <-> int64 computations everywhere properly |
13:51:44 | BlaXpirit | a kludge it is then |
13:52:15 | Araq | as a bonus you'll learn to appreciate what a mess it is to support C's type zoo. |
13:52:38 | Araq | and you'll learn to hate unsigned as much as I do. |
13:52:58 | BlaXpirit | or i just write when T is uint64: |
13:53:21 | arnetheduck | hm, let's say I'm working on a module (without a main).. what's an easy way to compile just that module to see that it's syntax is ok etc? ie without compiling the main? |
13:54:27 | fowl | arnetheduck, put your "main code" inside when isMainModule: block |
13:54:57 | fowl | many modules have tests at the bottom of them |
13:55:18 | fowl | that code only runs when you compile that module directly, or include it |
13:55:32 | * | JusticeFries joined #nim |
13:56:21 | Araq | arnetheduck: 'nim check module.nim' |
13:59:31 | arnetheduck | Araq, perfect, thanks! not part of nim --help |
14:00:01 | * | JStoker quit (Remote host closed the connection) |
14:00:13 | arnetheduck | fowl, I'm fooling around a little with the compiler, so I want to check my changes without recompiling the entire project |
14:00:58 | fowl | ah |
14:21:12 | * | JStoker joined #nim |
14:31:26 | * | sepisoad joined #nim |
14:32:37 | sepisoad | is it possible to get latest nim compiler version using nimble package manager? |
14:35:57 | BlaXpirit | no, that's not what it does |
14:36:19 | BlaXpirit | there might be a possibility, but i've never heard of this |
14:40:36 | sepisoad | BlaXpirit, i'm trying to install c2nim package via nimble, but unfortunately this package depends on nim (>= 0.10.3) where my nim compiler version is 0.10.2 |
14:40:48 | BlaXpirit | ok |
14:41:49 | BlaXpirit | sepisoad, http://google.com/#q=site%3Anim-lang.org+0.10.3 |
14:45:09 | * | gokr joined #nim |
14:45:38 | * | filwit quit (Quit: Leaving) |
15:03:21 | * | johnsoft joined #nim |
15:18:36 | * | epichero joined #nim |
15:20:13 | * | johnsoft quit (Ping timeout: 264 seconds) |
15:21:02 | * | johnsoft joined #nim |
15:23:11 | * | epichero quit (Ping timeout: 246 seconds) |
15:27:20 | * | darkf quit (Quit: Leaving) |
15:30:16 | sepisoad | I got the latest nim compiler, but unfortunately when I try to install c2nim I get this error: |
15:30:17 | sepisoad | .nimble/pkgs/compiler-0.10.3/compiler/msgs.nim(727, 9) Error: undeclared identifier: 'stackTraceAvailable' |
15:35:59 | OderWat | I found that it is best to not have compiler installed with nimble at all |
15:37:08 | OderWat | and use the current compiler from source.. maybe with the "new" https://github.com/ekarlso/nim-vm which I just updated to handle that easily |
15:39:10 | OderWat | I just tried it. delete compiler from packages and remove it from the nimble file of c2nim .. nimble build .. works |
15:39:51 | * | epichero joined #nim |
15:41:54 | * | dyu quit (Disconnected by services) |
15:42:19 | * | dyu_ joined #nim |
15:45:50 | sepisoad | I dunno, will try it tomorrow, my mind is tired |
15:47:43 | * | JusticeFries quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
15:54:09 | OderWat | @ekarlso :) quick merges! I just tested manual install from "nothing" to "100%" on osx and ubuntu. seems to work fine. I didn't check your bootscript though. |
16:03:24 | * | gokr quit (Ping timeout: 252 seconds) |
16:24:53 | * | arnetheduck quit (Ping timeout: 252 seconds) |
16:45:21 | * | davidhq_ joined #nim |
16:47:49 | * | davidhq quit (Ping timeout: 264 seconds) |
16:55:54 | * | Jehan_ joined #nim |
17:00:05 | * | novist quit (Quit: ZNC - http://znc.in) |
17:03:22 | * | Mimbus quit (Remote host closed the connection) |
17:06:26 | * | flaviu quit (Ping timeout: 246 seconds) |
17:10:49 | * | flaviu joined #nim |
17:13:52 | * | Jesin quit (Quit: Leaving) |
17:15:59 | * | wb joined #nim |
17:18:19 | * | Jesin joined #nim |
17:23:11 | * | Jesin quit (Client Quit) |
17:24:50 | * | Matthias247 joined #nim |
17:26:06 | * | Jesin joined #nim |
17:58:54 | * | quasinoxen joined #nim |
18:00:30 | * | ^aurora^ joined #nim |
18:08:18 | ekarlso | flaviu: u tharr ? |
18:08:26 | flaviu | yep |
18:08:32 | ekarlso | http://185.56.186.94/#/ |
18:08:38 | ekarlso | versions doesnt work but cc does |
18:08:44 | ekarlso | and the switches |
18:10:08 | flaviu | http://i.imgur.com/DsEFgQz.png |
18:11:21 | flaviu | Work for me on gcc |
18:11:35 | flaviu | Looks good though! |
18:19:31 | * | ldlework joined #nim |
18:21:31 | * | perturbation joined #nim |
18:24:11 | perturbation | hey all |
18:25:52 | perturbation | I was looking through the wrapper for Urhonimo (trying to use to figure out better wrapping methods for C++) |
18:26:12 | perturbation | and there's some magic that it does with importcpp for wrapping a template that I'm trying to figure out |
18:26:26 | perturbation | anyone know what this (https://gist.github.com/singularperturbation/98af505d5623712b29fe) does? |
18:26:40 | onionhammer | ekarlso hows it coming |
18:26:47 | onionhammer | its looking good :) |
18:27:13 | onionhammer | ekarlso you should set up CTRL+enter to run w/o unfocusing editor |
18:29:14 | ekarlso | onionhammer: patches are welcome :p |
18:31:10 | * | bcinman joined #nim |
18:31:13 | fowl | perturbation, i will find the docs for it, basically '*0 is a pattern splat the generics |
18:31:18 | * | no_name_ joined #nim |
18:32:55 | no_name_ | any folks with jester experience around? I'm having trouble with c compilation errors whenever I call a function with a variable parameter in a resp |
18:33:25 | perturbation | fowl: gotcha, thanks (I thought so after reading through http://forum.nim-lang.org/t/870#5740) |
18:36:38 | fowl | perturbation, i can't find docs for it, basically @ expands to all arguments, so a static function looks like importcpp:"Foo::X(@)", you can use # for individual arguments "#->foo(#@)" will expand the first param on the left of -> and the rest in the parens (it might be @#) |
18:36:49 | * | no_name_ is now known as devzerp |
18:37:12 | perturbation | thanks fowl |
18:37:58 | fowl | '0 is type param 0, '*0 is 0 .. all type params iirc |
18:38:38 | * | xificurC joined #nim |
18:39:29 | * | novist joined #nim |
18:40:26 | devzerp | oh weird.. the jest problem is caused by running the main webserver look from inside of a proc - why would that be a problem? |
18:40:55 | devzerp | er.. the jester compilation problem is caused by running the main webserver loop from inside of a proc - why would that be a problem? |
18:41:38 | fowl | devzerp, can you paste the errors in a gist |
18:41:50 | fowl | and compile with -d:debug |
18:42:00 | fowl | paste all output from compilation |
18:43:46 | devzerp | fowl: https://gist.github.com/anonymous/15eb423c256704d556db |
18:44:12 | * | UberLambda joined #nim |
18:44:37 | UberLambda | Is there any way to specify an absolute path for the nimcache folder? |
18:44:53 | UberLambda | The --nimcache option seems to always treat a path as relative to the source file |
18:46:09 | devzerp | fowl: here's the compiler output: https://gist.github.com/anonymous/8b5bec6e3054b03464cb |
18:49:20 | devzerp | if I remove the web() proc, it compiles and runs as expected, also if I change the variable to a const (as opposed to a var or let) it also compiles even inside the function |
18:53:00 | fowl | devzerp, probably because you're capturing a string thats local to a function in one thread |
18:53:46 | devzerp | I didn't realize that there are multiple threads in play with this code |
18:54:49 | fowl | asyncdispatch uses futures but thats all hidden from jester |
18:55:29 | devzerp | if you pass it in as an argument to web(), it also fails -- how are you supposed to interact with external procs? |
18:56:11 | devzerp | all state has to be an annotated global variable? |
18:56:44 | fowl | runForever runs forever, it should probably be in the top level of the module? |
18:57:28 | fowl | https://gist.github.com/fowlmouth/5f297fed52ae5fadada5 |
18:57:39 | devzerp | fowl: I wanted to run two parallel threads (one was a webserver, the other a scheduled task background task handler) and wanted to spawn each off as a function |
18:58:56 | devzerp | is that a bad idea? |
19:00:26 | fowl | hmm i dont see the purpose |
19:01:21 | devzerp | maybe I just don't understand threading and futures in nim yet - do you have any documentation pointers that might help me? |
19:01:27 | fowl | i bet you could wrap the second thing into a future though to accomplish it |
19:02:38 | devzerp | yeah, that sounds like I might want to do that |
19:03:11 | * | johnsoft quit (Read error: Connection reset by peer) |
19:03:32 | fowl | stick around for someone who actually knows though |
19:03:57 | * | johnsoft joined #nim |
19:05:18 | * | johnsoft quit (Read error: Connection reset by peer) |
19:05:52 | * | johnsoft joined #nim |
19:07:35 | fowl | documentation on asyncdispatch is sparse |
19:07:38 | ekarlso | OderWat: I think ill revert your change about "nimvm install / update" executes use as well |
19:07:41 | fowl | http://nim-lang.org/asyncdispatch.html |
19:08:03 | * | ^aurora^ quit (Quit: Leaving.) |
19:18:25 | * | milosn quit (Read error: Connection reset by peer) |
19:23:25 | * | perturbation quit (Quit: Leaving) |
19:24:49 | * | milosn joined #nim |
19:28:01 | dom96 | devzerp: 'routes' should be at the top level. |
19:28:10 | dom96 | You shouldn't be putting them inside a function. |
19:38:02 | * | sepisoad quit (Quit: Leaving) |
19:39:40 | * | jsudlow__ is now known as jsudlow |
19:41:57 | * | quasinoxen quit (Ping timeout: 245 seconds) |
19:42:34 | * | quasinoxen joined #nim |
19:49:43 | * | for1096 joined #nim |
19:50:20 | * | for1096 left #nim ("Leaving") |
19:55:36 | OderWat | @ekarlso well I was not sure about them anyway. What about adding an "activate" or "use" as additional parameter for convenience? |
19:56:17 | ekarlso | OderWat: yeah |
19:56:57 | OderWat | @ekarlso I think activate is better than use what do you think? |
19:57:12 | ekarlso | OderWat: :p |
19:57:36 | OderWat | @ekarlso :-P |
20:00:21 | onionhammer | ekarslo I'll make pull requests if I can get it running locally :p |
20:01:00 | onionhammer | dom96 it shouldnt generate C errors imo |
20:01:19 | ekarlso | onionhammer: play ? |
20:01:20 | dom96 | onionhammer: if it's generating C errors then it's a bug |
20:01:32 | onionhammer | ekarlso yeah |
20:01:37 | dom96 | likely already been reported though |
20:01:41 | * | fizzbooze joined #nim |
20:02:02 | Araq | yup |
20:03:21 | * | smodo joined #nim |
20:04:18 | onionhammer | ekarlso instructions for getting it running w/ vagrant :) |
20:05:56 | * | UberLambda quit (Quit: Leaving the Matrix) |
20:10:07 | ekarlso | what you guys think |
20:10:14 | ekarlso | 1 chroot pr version |
20:10:18 | ekarlso | or 1 chroot for all ? |
20:18:25 | ekarlso | no meanings about that ? :p |
20:21:48 | OderWat | chroot-beer for all! (I made PRs for the nim-vm changes) |
20:22:27 | ekarlso | OderWat: meh :p |
20:22:31 | ekarlso | I fixed it I think already :p |
20:22:35 | * | saml_ joined #nim |
20:23:14 | * | flaviu quit (Read error: Connection reset by peer) |
20:23:53 | OderWat | np. it's better than mine I guess. but take the other PR it fixes 0.9 builds |
20:25:34 | ekarlso | done :p |
20:26:32 | * | epichero quit (Remote host closed the connection) |
20:26:55 | BlaXpirit | guys, what do you think about adding likely,unlikely pragmas for `if` conditions? http://stackoverflow.com/questions/109710 |
20:27:46 | Araq | BlaXpirit: system.likely exists |
20:27:59 | Araq | a bit weird it's not a pragma |
20:28:10 | Araq | but understandable when you look at the implementation |
20:28:30 | BlaXpirit | sure is weird because I only looked in manual and didn't find |
20:28:56 | Araq | will you ever use the index? |
20:29:16 | BlaXpirit | why would I look for a pragma in the index? |
20:30:44 | * | JusticeFries joined #nim |
20:30:48 | Araq | nimc.html also lists a couple of pragmas |
20:31:11 | * | flaviu joined #nim |
20:32:06 | * | matkuki joined #nim |
20:32:54 | * | quasinoxen quit (Ping timeout: 252 seconds) |
20:33:16 | * | quasinoxen joined #nim |
20:34:25 | * | TEttinger joined #nim |
20:34:38 | * | a5i joined #nim |
20:37:49 | matkuki | Hi guys, a question. Just noticed that in an 'if' statement with an empty block you put a double comment and nothing else, the compiler accepts it. |
20:37:51 | matkuki | No need for a discard statement. Is this the correct behaviour? |
20:42:47 | Araq | I think so as documentation comments are part of the AST/grammar |
20:43:07 | Araq | this used to be valid for any comment |
20:43:28 | Araq | but now comments are ignored "properly" |
20:43:35 | Araq | and doc comments are not |
20:44:20 | matkuki | Araq: Thanks. |
20:47:09 | emilsp-home | hey, regarding the unicode module, how do I construct a rune and how would I transform a regular string to a sequence of runes ? |
20:47:10 | * | Mat4 joined #nim |
20:47:13 | Mat4 | hello |
20:47:38 | emilsp-home | hello, Mat4 |
20:47:53 | Mat4 | hi emilsp-hole |
20:47:59 | Mat4 | sorry home |
20:48:36 | BlaXpirit | D: Mat4, you gotta try to type em<Tab> |
20:48:36 | Araq | emilsp-home: don't do that. even UTF-32 is a variable length encoding, so you don't gain anything |
20:48:39 | OderWat | @ekarlso well your activate thing does not work at all for me? did you test it actually? |
20:49:19 | BlaXpirit | Araq, this is misleading |
20:50:14 | Mat4 | BlaXpirit: thanks |
20:50:14 | Araq | BlaXpirit: no, it's not. |
20:50:21 | Araq | it's the truth |
20:50:21 | Jehan_ | Assuming `str` is UTF-8, toSeq(str.runes) should do it. `toSeq` is in strutils. |
20:50:41 | Araq | unicode is *hard* ;-) |
20:50:45 | Jehan_ | Whether you really want to do it is a different story. :) |
20:50:58 | OderWat | unicode != UTF-whatever though |
20:51:14 | Mat4 | oh, unicode related discussions, great |
20:51:22 | OderWat | nooooooo |
20:51:26 | Varriount | Mat4: Duck and cover! |
20:52:39 | ekarlso | what error OderWat ? :/ |
20:53:11 | OderWat | @ekarlso see the issue but just looking at the code shows that this can not work :) |
20:54:06 | OderWat | @ekarlso it also does not do anything good with the getopts for me anyway as I just tested :( |
20:54:38 | Mat4 | Varriound: Sorry, what does this mean ? |
20:57:33 | * | epichero joined #nim |
21:01:41 | BlaXpirit | D: Mat4, you gotta try to type va<Tab> |
21:02:32 | Mat4 | well, keyboard and coffee is a bad combination |
21:02:32 | flaviu | "UTF-32 is a variable length encoding" |
21:02:32 | flaviu | Source please? |
21:04:46 | BlaXpirit | flaviu, just FUD about combining characters |
21:04:53 | def- | flaviu: maybe he means that multiple combining marks can belong to a character |
21:05:01 | flaviu | Ah, I see. |
21:06:00 | Jehan_ | Huh, I'm seeing that only now. My mind had somehow read that as UTF-16. |
21:08:24 | OderWat | @ekarlso your new fix won't work either (for me?) I made one which works here |
21:10:44 | OderWat | @ekarlso what shell do you use ? if [ something = 1]; then .. will always execute something as cmd for me. |
21:12:47 | OderWat | @ekarlso it also strips all parameters till "--" such that if you give nim-vm -a arg1 arg2 it will always strip all the arguments and shows usage cause $1 is gone |
21:13:10 | OderWat | ahem.. how to start a private conversation. irc help please :) |
21:13:43 | OderWat | found it :) |
21:16:08 | * | Mat4 quit (Quit: Verlassend) |
21:16:28 | * | dyu_ quit (Quit: Leaving) |
21:16:59 | fowl | ekarlso, can you share yet? i dont see it |
21:19:38 | * | JusticeFries quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
21:21:12 | * | JusticeFries joined #nim |
21:21:16 | * | JusticeFries quit (Client Quit) |
21:23:18 | * | JusticeFries joined #nim |
21:23:23 | * | JusticeFries quit (Client Quit) |
21:24:14 | BlaXpirit | where is ldexp? |
21:25:35 | * | akiradeveloper joined #nim |
21:26:49 | BlaXpirit | {.importc: "ldexp", header: "<math.h>".} i suppose |
21:27:42 | def- | BlaXpirit: and when defined(Posix) and not defined(haiku): {.passl: "-lm".} |
21:28:05 | BlaXpirit | def-, doesn't "import math" guarantee that? |
21:28:10 | def- | sure, it does |
21:28:23 | BlaXpirit | i'd rather do that the |
21:28:24 | BlaXpirit | n |
21:31:00 | Araq | BlaXpirit: well yes, I'm talking about combining characters |
21:32:23 | Varriount | onionhammer: How well does the suggestion part of NimLime work so far? |
21:32:34 | Araq | cause you need to take these into account for most things I can think of |
21:32:52 | emilsp-home | I am guessing nim doesn't have any libraries for reading from id3/vorbis tags ? |
21:33:00 | fowl | def-, are math things in a different lib in haiku |
21:33:31 | fowl | emilsp-home, you can use any c library |
21:33:38 | * | xificurC quit (Ping timeout: 244 seconds) |
21:33:48 | def- | fowl: i guess you just don't need -lm |
21:33:55 | Araq | and when you do, it's of variable length. no FUD here. |
21:34:05 | flaviu | Am I at least guaranteed that concatenating valid unicode strings will produce a valid unicode string? |
21:35:43 | fowl | emilsp-home, btw you asked before what i used the neural networks for, i havent used them yet but i want to point them at stock market data or something see if i can get rich |
21:36:19 | def- | flaviu: i would assume so |
21:37:04 | * | bcinman quit (Quit: My Mac has gone to sleep. ZZZzzz…) |
21:37:41 | Araq | flaviu: yeah, quite sure but this hold for utf-32, utf-16, utf-8. utf-32 has no advantage for concat |
21:39:27 | BlaXpirit | has no advantage for valid strings, yes |
21:41:56 | * | Shoozza quit (Ping timeout: 265 seconds) |
21:42:16 | * | Shoozza joined #nim |
21:42:56 | * | quasinoxen quit (Ping timeout: 252 seconds) |
21:43:00 | * | quasinoxen joined #nim |
21:48:07 | fowl | onionhammer, i want to add inheritance to clibpp, how should it look? class(X, parent: Y)? X of Y could be handled |
21:49:03 | BlaXpirit | what will happen to multiple inheritance? |
21:49:12 | BlaXpirit | fowl, do you think SFML can be wrapped directly now? |
21:49:30 | fowl | i think so BlaXpirit |
21:49:33 | BlaXpirit | :s |
21:49:40 | fowl | i have a workaround for multiple inheritance |
21:49:58 | fowl | type Drawable = CircleShape | RectangleShape #| ... |
21:49:58 | fowl | proc setFillColor* (this:Drawable; color:Color) {.importcpp,header:graphics_h.} |
21:50:50 | BlaXpirit | don't forget inheriting from drawable |
21:51:16 | BlaXpirit | to me it really seems like this should be a typeclass |
21:51:27 | fowl | that is a typeclass |
21:51:38 | BlaXpirit | you can't make your own drawable |
21:51:50 | BlaXpirit | i mean typeclass like = generic stuff |
21:52:58 | fowl | ill have to look at the hierarchy to see how it even works |
21:53:48 | BlaXpirit | drawable is a class that has virtual function draw |
21:54:01 | BlaXpirit | so it's like an interface |
21:54:04 | BlaXpirit | so it's like a typeclass |
21:54:12 | Araq | bzzzt. wrong. |
21:55:02 | fowl | in c would (Drawable)(x).draw(...) invoke the virtual function then? |
21:55:33 | BlaXpirit | I don't understand |
21:55:48 | * | n0x0ff joined #nim |
21:55:52 | BlaXpirit | are you talking about CSFML? |
21:55:57 | fowl | no |
22:00:21 | * | akiradeveloper quit () |
22:02:15 | * | Trustable joined #nim |
22:05:09 | * | milosn quit (Ping timeout: 244 seconds) |
22:05:43 | * | madmalik joined #nim |
22:06:51 | * | milosn joined #nim |
22:07:58 | onionhammer | fowl ill have to think for a bit... |
22:09:36 | onionhammer | Varriount it needs more testing.. sometimes it works sometimes it doesnt |
22:12:39 | * | matkuki quit (Quit: ChatZilla 0.9.91.1 [Firefox 35.0.1/20150122214805]) |
22:13:47 | onionhammer | fowl probably "of" |
22:13:50 | onionhammer | instead of "parent" |
22:14:04 | onionhammer | class(X, of: Y) |
22:14:22 | fowl | thats not possible since of is a keyword |
22:14:28 | onionhammer | u sure? |
22:15:04 | Araq | flaviu's class macro solved that |
22:15:19 | fowl | onionhammer, i was recommending "X of Y" |
22:15:56 | onionhammer | mm? |
22:17:07 | fowl | class(X of Y) |
22:17:27 | onionhammer | ah, if that works thats better |
22:21:06 | fowl | Araq, what was his solution |
22:21:43 | Araq | class Animal of RootObj: |
22:21:44 | Araq | var name: string |
22:21:46 | Araq | method vocalize: string = "..." |
22:22:24 | fowl | Araq, thats what this is except its for c++ |
22:22:59 | fowl | plus i wrote that oop macro lol |
22:23:53 | Araq | sorry I'm not really paying attention. I'm fixing bugs |
22:24:13 | fowl | good dont pay attention |
22:24:40 | fowl | bbl |
22:38:05 | * | vendethiel quit (Ping timeout: 256 seconds) |
22:48:30 | * | banister joined #nim |
23:03:11 | * | Trustable quit (Remote host closed the connection) |
23:05:35 | * | davidhq_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:14:37 | * | gokr joined #nim |
23:18:56 | * | reem joined #nim |
23:21:09 | * | Demon_Fox joined #nim |
23:22:52 | * | Jehan_ quit (Ping timeout: 240 seconds) |
23:25:19 | * | emilsp-home quit (Ping timeout: 264 seconds) |
23:27:41 | * | davidhq joined #nim |
23:41:21 | * | davidhq quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:50:01 | * | JusticeFries joined #nim |
23:50:46 | * | vendethiel joined #nim |
23:54:43 | * | OderWat quit (Ping timeout: 255 seconds) |