00:08:31 | * | Demos_ joined #nimrod |
00:35:34 | * | boydgreenfield quit (Quit: boydgreenfield) |
00:39:41 | * | DAddYE_ quit (Remote host closed the connection) |
01:04:06 | BitPuffin | we should have zmq bindings for nimrod if we don't already |
01:08:58 | psquid | http://build.nimrod-lang.org/docs/zmq.html |
01:09:08 | psquid | :P |
01:23:13 | * | DAddYE joined #nimrod |
01:23:27 | * | DAddYE quit (Remote host closed the connection) |
01:23:33 | * | DAddYE joined #nimrod |
01:37:55 | * | DAddYE quit (Remote host closed the connection) |
01:40:43 | * | DAddYE joined #nimrod |
01:41:20 | * | DAddYE quit (Remote host closed the connection) |
01:41:27 | * | DAddYE joined #nimrod |
01:41:50 | * | DAddYE quit (Remote host closed the connection) |
01:42:17 | * | DAddYE joined #nimrod |
01:43:39 | * | DAddYE_ joined #nimrod |
01:46:38 | * | DAddYE quit (Ping timeout: 240 seconds) |
01:46:45 | * | DAddYE_ quit (Remote host closed the connection) |
02:47:53 | * | DAddYE joined #nimrod |
02:53:26 | * | DAddYE quit (Ping timeout: 240 seconds) |
03:11:57 | * | Varriount_ quit (Read error: Connection reset by peer) |
03:12:10 | * | Varriount_ joined #nimrod |
03:35:53 | * | EXetoC quit (Quit: WeeChat 0.4.2) |
03:49:56 | * | DAddYE joined #nimrod |
03:54:00 | * | Demos_ quit (Quit: Leaving) |
03:55:02 | * | DAddYE quit (Ping timeout: 240 seconds) |
03:55:25 | * | brson joined #nimrod |
04:25:02 | * | BitPuffin quit (Read error: Operation timed out) |
04:42:46 | * | brson quit (Quit: leaving) |
04:52:42 | * | BitPuffin joined #nimrod |
04:56:55 | * | BitPuffin quit (Ping timeout: 246 seconds) |
05:06:02 | * | Hat_and_Cloak joined #nimrod |
05:10:11 | * | boydgreenfield joined #nimrod |
05:14:40 | * | Hat_and_Cloak quit (Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/) |
05:21:30 | * | Hat_and_Cloak joined #nimrod |
05:42:39 | * | DAddYE joined #nimrod |
06:44:16 | * | boydgreenfield quit (Quit: boydgreenfield) |
06:47:52 | * | Varriount_ quit (Read error: Connection reset by peer) |
06:48:20 | * | Varriount_ joined #nimrod |
06:55:01 | * | Hat_and_Cloak left #nimrod ("Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is") |
08:05:52 | * | DAddYE quit (Remote host closed the connection) |
08:05:59 | * | DAddYE joined #nimrod |
08:56:30 | * | DAddYE quit (Remote host closed the connection) |
08:56:58 | * | DAddYE joined #nimrod |
09:01:15 | * | DAddYE quit (Ping timeout: 240 seconds) |
09:07:47 | * | DAddYE joined #nimrod |
09:22:55 | * | ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
09:31:57 | * | Varriount_ quit (Read error: Connection reset by peer) |
09:32:20 | * | Varriount_ joined #nimrod |
09:34:05 | * | BitPuffin joined #nimrod |
09:34:58 | Araq | hey BitPuffin, merry christmas |
09:36:25 | * | ics joined #nimrod |
09:39:14 | * | BitPuffin quit (Ping timeout: 264 seconds) |
09:51:10 | * | dom96_and joined #nimrod |
09:51:20 | dom96_and | Ho ho ho |
09:51:26 | dom96_and | Merry christmas |
09:52:38 | * | Mordecai joined #nimrod |
09:52:58 | * | gradha joined #nimrod |
09:54:00 | gradha | I can't quite picture dom96 with a white beard |
09:54:26 | Araq | hey gradha merry christmas |
09:54:41 | gradha | merry christmas Araq |
09:55:03 | dom96_and | Not even a fake one? |
09:55:39 | gradha | fake, sure |
09:55:49 | * | psquid quit (Ping timeout: 248 seconds) |
09:55:54 | * | Mordecai is now known as psquid |
09:59:10 | gradha | oh, right, we had to test devel branch |
10:02:18 | gradha | Araq: are you using now git-flow or is devel just another manual branch? |
10:02:47 | Araq | well I don't know what git-flow is |
10:03:04 | Araq | devel now has all the juice |
10:03:12 | gradha | ok |
10:03:20 | Araq | and I plan to merge devel into master and call it 0.9.4 |
10:05:32 | gradha | git-flow is a set of scripts to add bureaucracy to git, by default creates a devel branch for unstable work, and master is left for stable releases |
10:09:16 | gradha | is appname.nimrod.cfg the standard pattern for configuration files? |
10:12:12 | gradha | it doesn't fit well for splitFile, or other tools to recognise, so you need special cases in file extension loops |
10:12:52 | gradha | might be worth going for nimrod_cfg, nimcfg, nimrodCfg, nimrod_is_superb_cfg, or similar |
10:14:17 | Araq | no |
10:14:25 | Araq | people want the '.' everywhere |
10:14:33 | Araq | it's the very definition of being modern |
10:14:48 | Araq | so it's appname.nimrod.cfg and will stay this way |
10:14:49 | gradha | yeah, xmas.jpeg.exe FTW |
10:14:54 | dom96_and | Hell yeah |
10:15:40 | gradha | can't fight with modern, you could have said it's for the DLL |
10:15:57 | Araq | lol |
10:17:57 | Araq | also aporia and other tools already use .nimrod.cfg to determine the project file |
10:25:28 | gradha | dom96: IIRC you didn't want to add a switch to babel to specify a different installation path, right? |
10:26:24 | gradha | dom96_and: ah, you might not get notified through the other nick |
10:27:10 | dom96_and | It should be set in some config file |
10:34:44 | * | BitPuffin joined #nimrod |
10:36:26 | gradha | dom96_and: you changed babel structure, now the compilation instructions are stale |
10:37:22 | dom96_and | Fix them then :p |
10:37:55 | dom96_and | Araq: I was able to reproduce the "out of order output" problem using my tester in babel |
10:38:22 | dom96_and | (that is the problem related to osproc) |
10:39:26 | * | BitPuffin quit (Ping timeout: 240 seconds) |
10:39:44 | Araq | dom96_and: looks like a job for zielmicha-cloud |
10:39:55 | Araq | he is working on osproc |
10:40:20 | dom96_and | Awesome. He's probably busy with Christmas. |
10:45:48 | * | ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
10:55:40 | * | DAddYE quit (Remote host closed the connection) |
10:56:08 | * | DAddYE joined #nimrod |
11:00:05 | * | BitPuffin joined #nimrod |
11:00:21 | * | DAddYE quit (Ping timeout: 248 seconds) |
11:05:26 | * | BitPuffin quit (Ping timeout: 272 seconds) |
11:06:03 | * | dom96_and quit (Quit: Bye) |
11:27:25 | * | DAddYE joined #nimrod |
12:00:51 | * | BitPuffin joined #nimrod |
12:01:10 | * | DAddYE quit (Ping timeout: 272 seconds) |
12:05:22 | * | BitPuffin quit (Ping timeout: 252 seconds) |
12:14:48 | * | Varriount_ quit (Read error: Connection reset by peer) |
12:15:04 | * | Varriount_ joined #nimrod |
12:30:06 | * | DAddYE joined #nimrod |
12:41:44 | * | psquid quit (Quit: Christmas dinner) |
13:01:33 | * | BitPuffin joined #nimrod |
13:03:26 | * | DAddYE quit (Ping timeout: 240 seconds) |
13:06:13 | * | BitPuffin quit (Ping timeout: 248 seconds) |
13:24:13 | * | EXetoC joined #nimrod |
13:31:46 | * | darkf quit (Quit: Leaving) |
13:53:16 | NimBot | Araq/Nimrod devel 7911b26 Araq [+2 ±4 -0]: templates can access hidden fields |
14:00:46 | * | DAddYE joined #nimrod |
14:34:05 | * | DAddYE quit (Ping timeout: 240 seconds) |
15:31:31 | * | DAddYE joined #nimrod |
15:35:50 | * | DAddYE quit (Ping timeout: 240 seconds) |
15:36:57 | * | Endy joined #nimrod |
15:40:43 | * | [1]Endy joined #nimrod |
15:44:38 | * | Endy quit (Ping timeout: 264 seconds) |
15:44:39 | * | [1]Endy is now known as Endy |
16:22:23 | * | Varriount_ quit (Read error: Connection reset by peer) |
16:22:47 | * | Varriount_ joined #nimrod |
16:33:00 | * | DAddYE joined #nimrod |
16:37:25 | * | DAddYE quit (Ping timeout: 248 seconds) |
17:00:08 | * | DAddYE joined #nimrod |
17:10:19 | * | ics joined #nimrod |
17:14:22 | * | ics quit (Ping timeout: 246 seconds) |
17:15:43 | * | ics joined #nimrod |
17:21:48 | * | ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
17:27:29 | gradha | stuff on devel seems to compile |
17:39:32 | dom96 | Any feature/bug fix requests before I release babel 0.1? |
17:39:45 | gradha | how about versioning? |
17:40:07 | gradha | I've had 0.1 for ages, yet you are still to release it |
17:40:22 | dom96 | I blame the matrix. |
17:40:52 | dom96 | Not only do I need to make babel work in the matrix I also must patch any glitches in the matrix. It's a never ending battle. |
17:42:41 | gradha | interesting, aporia doesn't compile with devel, but it fails somewhere else |
17:42:50 | gradha | processes.nim(329, 30) Info: instantiation from here |
17:42:50 | gradha | processes.nim(300, 6) Error: identifier expected, but found '(event|event)' |
17:43:01 | gradha | another matrix glitch? |
17:43:21 | dom96 | yes, report it to the architect. |
17:44:35 | gradha | I've looked up the "spawn multiple processes + read their output" and the accepted unix solution is to not use pipes but named pipes |
17:45:12 | * | q66_ joined #nimrod |
17:45:12 | gradha | also, you can't use select if you expect to reuse identifiers, so you can't select on a pool of workers |
17:45:32 | gradha | looks like select has different behaviour when a child file descriptor is closed, which involves you detecting the platform and working around it |
17:45:46 | gradha | presumably still possible, but people resort to polling |
17:47:21 | gradha | ok, that's weird, my aporia checkout still crashes, but babel using aporia#head doesn't |
17:47:49 | dom96 | babel compiles with -d:release by default |
17:47:57 | dom96 | perhaps that is the reason |
17:48:09 | gradha | indeed |
17:48:30 | * | q66 quit (Ping timeout: 246 seconds) |
17:48:56 | gradha | there's nomention of this in the docs, though |
17:49:07 | dom96 | hrm, indeed |
18:01:32 | gradha | so when I compile aporia and get a stack trace, then attempt to compile again, and get a different stack trace, that's all good, right? |
18:01:51 | gradha | also the first attempt crashes on gc.nim(165) asgnRefNoCycle |
18:02:13 | * | q66_ is now known as q66 |
18:02:14 | dom96 | You aren't experiencing deja vu? Perhaps the same cat meowing right in front of you twice. |
18:02:26 | gradha | I can pastebin you the console output |
18:03:00 | dom96 | I bet it's a corruption and they never make sense. |
18:03:35 | gradha | I'm sure Araq will figure out http://pastebin.com/9J4UGcqk |
18:05:55 | gradha | didn't have aporia issues on windows in debug mode? |
18:34:13 | dom96 | yes, but that was fixed. |
18:41:07 | EXetoC | sup dudes |
18:42:07 | dom96 | ooh, hacker news is all christmassy |
18:48:35 | EXetoC | oh yeah look at that |
18:49:42 | EXetoC | and they have announced 0ad a15 there |
18:57:18 | * | BitPuffin joined #nimrod |
19:03:45 | * | psquid joined #nimrod |
19:26:28 | dom96 | hey BitPuffin |
19:44:53 | * | zielmicha joined #nimrod |
19:46:41 | * | brihat quit (Quit: Leaving.) |
19:50:31 | EXetoC | WHAT UP |
19:51:51 | dom96 | doctor who is on |
20:09:21 | * | gcr joined #nimrod |
20:09:45 | OrionPKM | meh doctor who |
20:10:38 | EXetoC | aight |
20:13:28 | * | zielmicha quit (Quit: Leaving.) |
20:13:35 | * | zielmicha1 joined #nimrod |
20:14:01 | * | exhu joined #nimrod |
20:14:19 | exhu | hi guys, is there anyone with access to nimrod-code? |
20:14:21 | exhu | https://github.com/nimrod-code/cairo/issues/1 |
20:14:52 | exhu | i'm too lazy to do clone and pull requests -) |
20:16:10 | exhu | and merry xmas! |
20:18:41 | OrionPKM | best time of the year 4 coding |
20:18:43 | OrionPKM | :P |
20:20:07 | exhu | yes, nice to have a holiday in the middle of the week, but tomorrow three days of work begin... |
20:20:59 | OrionPKM | maybe for you |
20:22:06 | exhu | OrionPKM, do you have long national holidays? |
20:22:11 | OrionPKM | no |
20:22:14 | OrionPKM | i just have a lot of PTO |
20:22:45 | gcr | Hey there, is anyone using the opengl/opengl.nim wrapper? Mine crashes with segmentation fault every time I call 'glViewport' on Arch linux but it works fine with the older opengl/gl wrapper. |
20:23:19 | exhu | OrionPKM, what is PTO? sick list or a vacation? |
20:23:35 | OrionPKM | personal time off |
20:23:49 | OrionPKM | paid time off |
20:23:53 | OrionPKM | sorry |
20:24:07 | OrionPKM | it's sick/vacation |
20:24:19 | OrionPKM | I get 4 weeks a year |
20:24:49 | OrionPKM | sorry gcr, I haven't used it |
20:25:19 | gcr | aha! I fixed my problem: you have to call loadExtensions() before you do anything, or else your functions are just null pointers |
20:25:23 | dom96 | gcr: do you call loadExten-- yeah :P |
20:25:33 | gcr | thanks guys! nimrod is fun :) |
20:26:18 | OrionPKM | cool, glad you figured it out |
20:28:00 | exhu | OrionPKM, i have a 4 weeks vacation per year which can be used as 2 weeks fist then later 1 + 1, and sick leaves are paid but do not affect the vacation. So PTO looks strange. |
20:28:49 | OrionPKM | where are you from? |
20:29:00 | exhu | belarus (exUSSR) |
20:29:46 | OrionPKM | ah, dont you guys have a dictator? |
20:30:47 | exhu | OrionPKM, yes we have, but it's not the main source of trouble here -) |
20:30:52 | OrionPKM | hehe |
20:32:57 | exhu | OrionPKM, we have laws that work against common people, in favour of the ruling government class only :( |
20:33:35 | OrionPKM | man |
20:33:41 | OrionPKM | harsh |
20:35:57 | exhu | OrionPKM, and where are you from? |
20:36:37 | OrionPKM | US |
20:38:08 | exhu | OrionPKM, im suprised you've heard of the dictator and belarus -) |
20:38:18 | OrionPKM | lol |
20:38:22 | OrionPKM | because im american? |
20:38:34 | OrionPKM | we have maps here too |
20:40:56 | exhu | OrionPKM, not all europeans know about the smaller countries around, and america is so far away. i personally can't remember neither the united states nor the south america countries. |
20:41:22 | OrionPKM | ah, thats okay |
20:41:22 | exhu | OrionPKM, US names i mean |
20:41:28 | OrionPKM | the states, yeah |
20:43:46 | * | Varriount_ quit (Read error: Connection reset by peer) |
20:44:05 | * | Varriount_ joined #nimrod |
20:49:57 | exhu | experimenting with cairo bindings for nimrod today, studying cairo and it's so easy to use, just like it is in python |
20:51:24 | exhu | and with babel nimrod is very easy to start and be efficient |
20:53:26 | dom96 | that's good to hear :) |
20:57:16 | exhu | dom96, the only thing i don't like about babel is the hidden directory naming ".babel" -) |
20:58:06 | Araq | hi exhu welcome back |
20:58:14 | Araq | hi gcr welcome |
20:58:28 | gcr | Hey there |
20:58:30 | exhu | dom96, and that the name "babel" is already used for a linux package |
20:58:40 | Araq | exhu: the 'devel' branch supports that a template refers to a hidden field |
20:58:49 | Araq | implemented it today |
20:59:08 | dom96 | hrm, that could be a problem. |
20:59:19 | dom96 | we can always call it babelpkg or something |
20:59:44 | Araq | gradha: on mac you bootstrap with --gc:markAndSweep and then it compiles aporia, so yeah there is some nice corruption going on |
21:00:00 | exhu | dom96, The program 'babel' can be found in the following packages: |
21:00:01 | exhu | * babel-1.4.0 |
21:00:01 | exhu | * openbabel |
21:00:22 | dom96 | then there is going to be 3 packages which clash heh |
21:00:53 | exhu | Araq, hi. i dont remember where i needed a hidden field access for a template -))) |
21:03:09 | dom96 | BitPuffin: pinggg |
21:03:17 | exhu | Araq, so there's still problem with the default garbage collecteur? |
21:03:49 | Araq | apparently |
21:04:08 | * | Endy quit (Ping timeout: 260 seconds) |
21:04:16 | Araq | but it's only on mac :P |
21:05:15 | exhu | Araq, macbooks are becoming popular in my country and company i work for... :-/ |
21:06:11 | Araq | I did run some extensive checks recently with a special debug GC |
21:06:50 | Araq | didn't find anything |
21:10:00 | exhu | Araq, how to debug memory leaks when using markAndSweep? is there smth like a dump function? |
21:11:50 | Araq | no |
21:18:40 | gcr | noob question: is a float the same thing as a cfloat? |
21:18:54 | gcr | or do nimrod floats like dedicate a few bits for GC collection info? |
21:19:21 | gcr | i ask because i'm not sure how glBufferData would work; i have to pass it a void pointer to an area of contiguous memory that contains several floats |
21:19:36 | * | brihat joined #nimrod |
21:19:54 | gcr | which i'm guessing would be the addr() of an array of float |
21:20:32 | Araq | nimrod's float is C's double, nim's float32 is C's float |
21:20:44 | * | OrionPKM quit (Remote host closed the connection) |
21:21:43 | gcr | ah, ok |
21:21:56 | gcr | are arrays guaranteed to be contiguous blocks of memory that begin at addr(arr[0]) ? |
21:22:04 | Araq | yes |
21:22:13 | gcr | awesome! thanks |
21:22:44 | gcr | wait, then is a sequence like a...linked list? or an array that's realloc()'d when added to? |
21:23:13 | Araq | a seq is a growable array |
21:23:35 | Araq | use addr(s[0]) to get a pointer to the block of memory |
21:25:29 | * | brson joined #nimrod |
21:25:34 | * | OrionPKM joined #nimrod |
21:27:35 | gcr | oh, sweet |
21:29:52 | * | exhu quit (Quit: Leaving) |
21:32:21 | dom96 | Araq: Why can't I override --babelPath by passing --babelPath:"" ? |
21:32:53 | Araq | babelPath is additive I think |
21:33:32 | * | BitPuffin quit (Ping timeout: 260 seconds) |
21:33:57 | dom96 | could you change that? |
21:34:10 | Araq | sure |
21:34:23 | dom96 | Make it split by whatever the path seperator is perhaps. |
21:35:07 | Araq | nah, there can only be 1 babelpath then |
21:35:59 | dom96 | no. |
21:36:10 | dom96 | We will have a global and a local path. |
21:36:14 | dom96 | So there will be multiple. |
21:36:44 | Araq | ok so --babelpath does something completely different than --path. yay |
21:37:17 | dom96 | It's already a highly babel specific thing anyway. |
21:37:35 | dom96 | Users don't need to care about it. |
21:37:37 | gradha | Araq: I'm not using markAndSweep |
21:37:50 | Araq | gradha: I know |
21:37:55 | gradha | should I? |
21:38:09 | Araq | yeah, bootstrap with --gc:markAndSweep |
21:38:11 | gradha | oh, zahary says so |
21:41:39 | Araq | dom96: compiler/babelcmd contains these things, you can change it yourself |
21:46:34 | * | BitPuffin joined #nimrod |
21:47:27 | gradha | with markAndSweep the release compiler doesn't corrupt memory, but still shows the same error in processes.nim, dom96, is that new? |
21:51:51 | brihat | hi, how do i iterate over the code points of a string? |
21:51:51 | brihat | for c in runes(ರಾಮ): echo(c) |
21:51:51 | brihat | doesn't work |
21:52:19 | Araq | well it should |
21:52:30 | Araq | saved the input file as utf-8? |
21:52:50 | brihat | Yes, it is utf-8 |
21:52:59 | * | Demos joined #nimrod |
21:53:01 | Demos | hello all |
21:53:03 | brihat | This is the error i get: |
21:53:05 | brihat | unicode_test.nim(20, 7) Error: type mismatch: got (TRune) |
21:53:05 | brihat | but expected one of: |
21:53:05 | brihat | system.$(x: int64): string |
21:53:05 | brihat | system.$(x: string): string |
21:53:05 | brihat | system.$(x: T): string |
21:53:06 | brihat | system.$(x: int): string |
21:53:06 | brihat | system.$(x: uint64): string |
21:53:07 | brihat | system.$(x: T): string |
21:53:07 | brihat | system.$(x: TEnum): string |
21:53:08 | brihat | system.$(x: char): string |
21:53:08 | brihat | system.$(x: bool): string |
21:53:09 | brihat | system.$(x: cstring): string |
21:53:15 | Demos | dude, pastebin |
21:53:40 | brihat | copy-pasted to wrong window, sorry |
21:54:22 | Araq | well there is no $ for a TRune then. *shrug* no big deal |
21:54:34 | Araq | hi Demos |
21:55:38 | brihat | Araq, any other way to do it? |
21:56:00 | gradha | brihat: cast the TRune to an int, that's what they are anyway |
21:56:11 | Araq | for c in runes(...): echo c.int |
21:56:56 | brihat | No, i don't want to print the integer value.. i want the Unicode character to be printed! |
21:57:27 | Araq | echo the string then |
21:57:51 | brihat | of course, i know that :) |
21:58:06 | gradha | ... echo c.toUTF8 |
21:58:24 | brihat | i want to split a unicode string into its corresponding runes and store it in an array of chars |
21:59:05 | Araq | well a char can only hold a byte, so what you want makes no sense |
21:59:11 | brihat | gradha: print works, thanks! |
21:59:36 | brihat | i want to store an array of runes from the unicode string |
21:59:50 | gradha | IIRC multiple codepoints may make up a "char", how do you deal with that? |
22:00:37 | EXetoC | "iterator runes"? |
22:01:31 | EXetoC | also, see sequtils.toSeq |
22:02:04 | NimBot | nimrod-code/babel master a6e2ad6 Grzegorz Adam Hankiewicz [+0 ±1 -0]: Updates first installation instructions. |
22:02:04 | NimBot | nimrod-code/babel master fda6699 Dominik Picheta [+0 ±2 -0]: Override babelPath when building.... 2 more lines |
22:02:04 | NimBot | nimrod-code/babel master c8ded26 Dominik Picheta [+0 ±1 -0]: Merge branch 'pr_fixes_install_docs' of git://github.com/gradha/babel into gradha-pr_fixes_install_docs |
22:02:04 | NimBot | nimrod-code/babel master de39680 Dominik Picheta [+0 ±1 -0]: Updated readme. |
22:02:04 | NimBot | 1 more commits. |
22:02:10 | Demos | I assume you could also widen the string |
22:02:25 | * | brson quit (Quit: leaving) |
22:02:25 | brihat | OK, let me elaborate. Here's a unicode string consisting of 3 runes: rama= "ರಾಮ" I want to get them into an array like {ರ, ಾ , ಮ }. How to do that? |
22:03:05 | Demos | widen the string to something like UTF-32 |
22:03:25 | Demos | I have code to do that in C, but not nimrod. So someone will need to help me out here |
22:03:40 | NimBot | nimrod-code/babel master 240718d Dominik Picheta [+0 ±1 -0]: Fix readme formatting. |
22:05:50 | Araq | you can use sequtils.toSeq on the runes iterator to get what you want, but what you want is completely misguided ;-) |
22:06:40 | dom96 | Araq: It seems the compiler outright rejects a --babelPath: with no path specified. |
22:07:10 | Araq | dom96: perhaps. why do you want --babelPath:"" in the first place? |
22:07:37 | dom96 | Araq: I don't want the compiler to implicitly use packages I haven't specified. |
22:07:39 | brihat | Araq: I want what is in Python 3. rama= "ರಾಮ" Then {rama[0], rama[1], rama[2]} = {ರ, ಾ , ಮ } How hard can that be? |
22:08:11 | Araq | well it helps to read what people wrote |
22:08:20 | Araq | sequtils.toSeq does that |
22:08:40 | Araq | but it's still a completely wrong way to think about unicode |
22:09:11 | brihat | u mean, how it's done in Py 3 is wrong? |
22:09:26 | Araq | yes. |
22:09:48 | Araq | you can't abstract over unicode and expect things to work |
22:09:51 | Demos | there is no such thing as a "character", there are many things lkike chrarcters that are all different in slightly different ways |
22:10:07 | Araq | unicode has grown too complex |
22:10:20 | Demos | do you want bytes? code points? somehting that takes up a space on the page... |
22:10:37 | Demos | unicode tackles a complex problem |
22:11:01 | Araq | you can have something like a` that is *2* utf-32 chars but should be handled like one |
22:11:43 | Araq | because it's rendered like á |
22:11:59 | Araq | so the human being expects an edit distance of 1, not 2 |
22:12:47 | Araq | nimrod's utf-8 way simply makes these things way more obvious instead of failing for edge cases |
22:13:15 | brihat | Well I get your point, I'm not concerned about display (i.e. graphemes) |
22:13:31 | Demos | what /are/ you concerned about |
22:13:37 | brihat | to me, unicode string = sequence of codepoints |
22:13:56 | brihat | and i want to get those codepoints to an array for further manipulation |
22:14:20 | Demos | I would say widen it to UTF-32, apperently with sequtils.toSeq |
22:14:24 | dom96 | Araq: Can I add a --noBabelPath or something? |
22:14:38 | brihat | but nimrod thinks unicode string = UTF-8 representation of codepoint |
22:15:14 | gradha | brihat: actually nimrod doesn't know about unicode strings, there are strings, and there are TRunes |
22:15:21 | Araq | dom96: if you don't like --babelPath, then we can just as well get rid of it |
22:15:35 | dom96 | Araq: What? I never said that. |
22:15:49 | gradha | if you use len(string) it returns the amount of bytes, not the amount of "characters", because character means different things to different people |
22:15:52 | dom96 | Araq: I like it. I just need a way to disable it. |
22:16:11 | Araq | alright then add that *sigh* |
22:17:12 | brihat | gradha: exactly, I want len(str) to print number of runes, but it actually prints number of bytes taken by the UTF-8 representation of str |
22:17:42 | brihat | Basically, Nimrod does Unicode as in Python 2, while I find Python 3's way to be more correct and natural |
22:17:57 | * | gradha he used the word natural, oh god |
22:18:15 | brihat | lol |
22:18:22 | brihat | what's wrong with that |
22:18:44 | Demos | unicode is HARD. makeing it more natural only makes wrong code work |
22:18:51 | Demos | it does not make writing correct code eaiser |
22:18:52 | gradha | natural is like "string", it means so many things to different people |
22:19:26 | Araq | len returning the number of bytes is the right thing to do for things like newStringOfCap(s.len) |
22:19:59 | Araq | it's much more often the correct answer than what runeLen returns |
22:20:00 | gradha | brihat: you are also presuming nimrod strings store utf8 characters, but that's convention, they could store anything else |
22:20:15 | Araq | gradha: that's not entirely correct |
22:20:29 | gradha | then we need to update the documentation part where that is said |
22:20:40 | Araq | on windows we go through some pain and use win's unicode API |
22:20:42 | EXetoC | unicode in python 2 is a real pain |
22:21:00 | Araq | we assume utf-8 on all other OSes though |
22:21:22 | Araq | and if you want input utf-8 validation, use the taint mode and do it for yourself |
22:21:24 | Demos | are strings in windows stored in UTF-8 and widened or stored in UTF-16? |
22:21:39 | Araq | Demos: utf-16 |
22:21:40 | gradha | Araq: ok, that's what I meant, a string is just a buffer, you can put anything there, and things can go wrong |
22:21:55 | brihat | Back to my question, |
22:21:55 | brihat | for c in toSeq(runes(ರಾಮ)): echo(c) |
22:21:55 | brihat | still gives same compilation error. Am I missing something? |
22:22:06 | brihat | toSeq( ) didn't help |
22:22:13 | Araq | yes, 'echo' calls $ |
22:22:25 | Araq | there is no $ for TRune because we don't know what it should do |
22:22:44 | Araq | it can convert to its integer representation or do toUTF8 |
22:23:03 | Araq | so you need to decide on your own what you want |
22:23:10 | brihat | Well, then how does $ work for seq[TRune] |
22:23:24 | Araq | it doesn't work either |
22:23:33 | Araq | or does it? ;-) |
22:23:42 | brihat | There is a $ operator here: http://nimrod-lang.org/unicode.html |
22:24:02 | Araq | oh alright |
22:24:15 | Araq | then that converts it back to a string :P |
22:24:41 | Araq | which makes sense |
22:24:43 | Araq | lol |
22:24:53 | brihat | so natural :) |
22:25:10 | EXetoC | yay consistency |
22:25:45 | Araq | well I guess you could argue $ for TRune should call toUTF8 |
22:26:30 | brihat | That would be consistent |
22:31:47 | EXetoC | whenever it's added you mean? |
22:32:25 | EXetoC | in addition to `$`(seq[TRune]) |
22:32:38 | brihat | I can make a bug report or submit a pull request |
22:32:43 | * | brihat left #nimrod (#nimrod) |
22:32:51 | * | brihat joined #nimrod |
22:33:06 | brihat | for `$`(TRune) |
22:33:12 | Araq | fine ... I'm not sure it's a good idea |
22:33:45 | EXetoC | you did say TRune rather than seq[TRune] so that's why I asked |
22:33:46 | Araq | but fine |
22:35:20 | dom96 | Araq: https://gist.github.com/dom96/d99255b11a9f6fcb93a4 Happy? |
22:36:23 | Araq | not happy at all, but I accept it |
22:38:15 | NimBot | Araq/Nimrod master a2a5395 Dominik Picheta [+0 ±2 -0]: Added --noBabelPath override. |
22:40:27 | * | zielmicha1 quit (Read error: Operation timed out) |
22:42:28 | NimBot | nimrod-code/babel master 4d8d3cb Dominik Picheta [+0 ±1 -0]: Added --noBabelPath to list of arguments when building. |
22:42:57 | gradha | dom96: isn't noBabelPath essentially a module level patch over the problem people face importing unicode from a source named unicode.nim? |
22:43:37 | dom96 | oh yeah. But it also works for other problems. Like, try compiling Aporia with it now. It essentially magically fixes every single problem. |
22:45:24 | gradha | ios and android have solved the collision problem, it's just dns reverse notation with 5 nested levels |
22:46:07 | dom96 | Well, I was just kidding lol |
22:46:27 | dom96 | It's not a fix for that. |
22:47:36 | gradha | what a shame, I was just going to test compiling |
22:50:41 | gcr | brihat: did you use quotes? for c in toSeq(runes("ರಾಮ")): echo(c) |
22:51:22 | Araq | of course he did |
22:51:22 | brihat | oh well, i have defined var ರಾಮ = "ರಾಮ" so it's correct |
22:51:50 | gradha | fear no more, ruby 2.1.0 is released |
22:52:04 | gcr | for c in toSeq(runes("ರಾಮ")): echo c.toUTF8 <-- this outputs a UTF8 representation of each codepoint in the string |
22:52:13 | gcr | works for me, just tried it |
22:52:47 | gcr | or you could treat them as ints, as discussed, since that's what they are |
22:53:00 | gcr | but there shouldn't be a compilation error, I hope :) |
22:53:09 | dom96 | gradha: "Ruby 2.1 has many improvements including speed up without severe incompatibilities" |
22:53:14 | dom96 | TIME TO SWITCH |
22:53:33 | brihat | gcr: yes, i just made a PR so that: for c in toSeq(runes("ರಾಮ")): echo c also works |
22:53:42 | dom96 | It's bound to be orders of magnitude faster than asm.js by now, surely... |
22:54:28 | Demos | hm ruby looks OK for small apps |
22:58:17 | * | darkf joined #nimrod |
22:59:12 | OrionPKM | araq is there a way to determine which imports are unused in a file w/ idetools |
22:59:26 | Araq | no |
23:00:11 | OrionPKM | that might be nice, if it's feasible |
23:01:45 | Araq | there is a feature request already for it |
23:03:43 | OrionPKM | coo |
23:04:18 | OrionPKM | I'll have to add a "sort and clean up imports" option in the ST plugin if it ever gets in ;) |
23:04:46 | OrionPKM | group imports by source as well; whether stdlib / babel or local |
23:06:38 | Araq | yeah. |
23:06:48 | Araq | I'm panning a new PL btw |
23:07:07 | Araq | I call it "maxredundancy" |
23:07:23 | Araq | it makes you type in the proc headers at callsite |
23:08:16 | Araq | standardlibrary.no.abbreviations.foo(4: int, 5: int) |
23:08:27 | Araq | and that everywhere |
23:08:40 | Araq | because it's good for maintainability |
23:09:03 | Araq | when all you wanna use is notepad and you never write any code anyway |
23:11:19 | Araq | the type system is revolutionary too: it ensures your type descriptions grow longer than your actual programs |
23:18:33 | EXetoC | cool |
23:25:00 | fowl | i was just thinking about creaitng << and >> procs for string reading/writing lol |
23:28:05 | gradha | good night, honey badgers |
23:28:08 | * | gradha quit (Quit: bbl, need to watch http://www.youtube.com/watch?v=dEf4PJZXBxA again) |
23:46:00 | OrionPKM | :p |
23:46:37 | OrionPKM | you don't like the idea of removing unused libraries araq? |
23:46:52 | Araq | I like the idea |
23:47:22 | Araq | but I seriously wonder why Ada is not incredibly popular |
23:47:48 | OrionPKM | what does that have to do with anything |
23:48:12 | OrionPKM | its an ide feature not anything more |
23:48:37 | Araq | yeah well |
23:50:31 | Araq | as I said, I like the idea |
23:50:51 | * | Mordecai joined #nimrod |
23:51:58 | * | psquid quit (Ping timeout: 246 seconds) |
23:54:01 | OrionPKM | you're the cattiest language developer I know araq |