00:01:56 | ozra | Any quick n dirty way to static link in libc, without using mussle etc.? Just, off the bat.. |
00:06:09 | gokr | http://www.schipplock.software/2015/02/static-linking-with-nim.html |
00:19:53 | * | TEttinger quit (Ping timeout: 250 seconds) |
00:20:12 | * | sdw left #nim (#nim) |
00:21:50 | vikaton | well apparently the length of "items" in https://api.github.com/search/repositories?q=language:nimrod&per_page=100:443 is 30, but it should be 522 |
00:21:59 | vikaton | any reason for that? |
00:22:08 | vikaton | here's the code |
00:22:12 | vikaton | https://www.irccloud.com/pastebin/w8xZ6m2r |
00:33:24 | dom96 | vikaton: I think github does paging. |
00:33:34 | dom96 | you can't get all results at once |
00:33:45 | vikaton | but that link shows all 522 |
00:34:27 | dom96 | doesn't for me |
00:34:39 | vikaton | really? |
00:34:49 | * | gokr quit (Quit: Leaving.) |
00:35:06 | vikaton | o wait |
00:35:08 | vikaton | true |
00:38:17 | flaviu | vikaton, dom96: I'm getting a hundred matches without the ":443". |
00:38:26 | flaviu | But more than 100 doesn't seem to be allowed. |
00:38:59 | vikaton | I see |
00:39:26 | vikaton | because of that, now Im not quite sure how my Crystal version works |
00:39:48 | ozra | I'm gonna be bad, and repose a question, if anyone of you know: Any quick n dirty way to static link in libc, without using mussle etc.? Just, off the bat.. |
00:40:35 | flaviu | https://stackoverflow.com/questions/13187499/link-glibc-statically-but-some-other-library-dynamically-with-gcc ? |
00:41:12 | ozra | Thanks. checks it out |
00:41:28 | * | Kingsquee joined #nim |
00:44:19 | * | gsingh93 joined #nim |
00:44:29 | vikaton | how do I compare the differences between arrays in Nim |
00:44:37 | vikaton | In Ruby I would use Array#- |
00:44:55 | vikaton | so, [12,3,4]-[12,2,4] would return 3 |
00:48:15 | flaviu | vikaton: would it return 3, or [3]? |
00:49:05 | vikaton | flaviu: [3] my bad |
00:51:36 | def- | vikaton: you mean the difference of a set? echo({12,3,4} - {12,2,4}) |
00:52:13 | flaviu | vikaton: https://gist.github.com/34d9636bce1581349c63 |
00:52:15 | def- | (or the same with hashsets) |
00:56:38 | vikaton | that Raafe Qenda guy is still trying to argue over Quora -.- |
00:56:51 | * | dtscode quit (Ping timeout: 256 seconds) |
00:57:53 | vikaton | god he is a real troll |
00:58:10 | iznogoodd | ozra: https://news.ycombinator.com/item?id=9611829 |
00:58:13 | iznogoodd | nginx ftw |
00:58:18 | flaviu | vikaton: Why stress out over it. |
00:58:22 | flaviu | Just ignore it. |
00:58:39 | fowl | ^ |
00:58:45 | vikaton | I get ticked from people spreading uninformed claims |
00:58:48 | * | kumul quit (Ping timeout: 252 seconds) |
00:59:36 | flaviu | vikaton: Buy a rubber duck and scream at it for a bit. |
01:00:01 | vikaton | im broke :( |
01:00:02 | iznogoodd | or punch your screen and buy a new one |
01:00:14 | vikaton | thats even worse :( |
01:00:48 | flaviu | vikaton: Stop arguing on the internet and instead use it to apply for jobs. |
01:01:05 | fowl | ^ |
01:01:10 | vikaton | flaviu: Not of legal age yet |
01:01:12 | iznogoodd | yeh, get a job at quora and ban him |
01:04:47 | flaviu | vikaton: Older than 15? You can work. |
01:05:17 | vikaton | how can u be so sure im older than 15 |
01:07:33 | * | vendethiel joined #nim |
01:07:48 | ozra | iznogoodd: ? github? |
01:08:18 | iznogoodd | just showin you examples of nginx for static files |
01:08:30 | vikaton | |
01:09:26 | iznogoodd | their whole github pages setup was a single server |
01:09:42 | ozra | iznogoodd: ah, cool. I'll re-consider it if I do some upscale shit again :) |
01:11:04 | vikaton | flaviu: Im about to turn 16 |
01:11:05 | iznogoodd | vikaton: just work on a farm then =) |
01:11:13 | vikaton | I live in an urban area ! |
01:11:36 | iznogoodd | not me ;) |
01:12:00 | * | johnsoft quit (Ping timeout: 256 seconds) |
01:12:33 | * | johnsoft joined #nim |
01:12:41 | ozra | haha. |
01:13:52 | ozra | well, I'm gonna hit bed "early" today. 'night folks! (or g'day, where ever you are) |
01:14:11 | vikaton | hmm |
01:14:43 | vikaton | So the undefined behaviours of Nim are dereferencing null pointers and stack overflows |
01:14:50 | vikaton | is that it or is there some more? |
01:15:26 | flaviu | Signed integer overflow when --checks:off |
01:15:50 | vikaton | so those 3 undefined behaviours |
01:16:01 | vikaton | flaviu: which of those still exists when checks are on? |
01:16:47 | flaviu | null deref and stack overflow |
01:17:46 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
01:19:54 | vikaton | hmm |
01:21:37 | * | huonw joined #nim |
01:22:20 | vikaton | dereferencing null pointers are in almost all languages that have pointers |
01:22:27 | vikaton | C#,Java etc tec |
01:22:41 | vikaton | so why do people whine about Nim having it 0.o |
01:23:06 | iznogoodd | cause its not rust |
01:23:23 | flaviu | vikaton: Because the optimizer can take advantage of it to produce unexpected code. |
01:23:43 | fowl | vikaton: yea but for ex java has nullDerefException, meaning any pointer deref is wrapped by a check, nim doesn't have that even in safe mode, instead we can get a stacktrace on a segfault |
01:23:44 | vikaton | what is this "unexpected code" ? |
01:24:27 | vikaton | fowl, what does "safe mode" do more than debug mode? |
01:24:34 | flaviu | iznogoodd: Lets refrain from ad hominem attacks |
01:24:45 | fowl | vikaton: I meant to say debug |
01:24:59 | vikaton | o |
01:30:17 | * | vendethiel quit (Ping timeout: 256 seconds) |
01:31:11 | * | endragor joined #nim |
01:39:50 | vikaton | I just realized |
01:40:01 | vikaton | we dont have a code of conduct |
01:41:16 | * | dtscode joined #nim |
01:43:23 | flaviu | vikaton: as long as you adhere to "don't be an ass", you'll be fine. |
01:44:08 | vikaton | flaviu: lol ok, back to my orginal question, what is that unexpected code? |
01:47:43 | vikaton | Also isnt the 0.11.2 update when Nim got its http speed-up ? |
01:48:39 | * | endragor quit (Remote host closed the connection) |
01:49:04 | flaviu | vikaton: http://blog.llvm.org/2011/05/what-every-c-programmer-should-know_14.html |
01:51:19 | flaviu | Also, see https://github.com/regehr/ub-canaries/tree/blog-post/addr-null |
01:53:59 | vikaton | flaviu: and Nim tries to output safe C code that gcc or clang may not screw up? |
01:54:28 | dtscode | yes |
01:55:10 | * | kumul joined #nim |
01:55:21 | vikaton | I see |
01:55:26 | vikaton | p cool stuff |
01:56:20 | dtscode | Very |
01:56:24 | * | endragor joined #nim |
01:56:45 | flaviu | Keep in mind that `if(foo == NULL) formatHarddrive();` is a complaint implementation of a null derefrence |
01:59:49 | * | kumul quit (Ping timeout: 245 seconds) |
02:01:20 | * | dtscode is now known as dtscode- |
02:01:37 | * | endragor quit (Remote host closed the connection) |
02:01:57 | * | dtscode- is now known as dtscode |
02:07:00 | * | gsingh93 quit (Ping timeout: 252 seconds) |
02:10:00 | * | Demon_Fox quit (Quit: Leaving) |
02:11:18 | * | endragor joined #nim |
02:11:26 | * | superfunc joined #nim |
02:16:01 | * | superfunc quit (Ping timeout: 264 seconds) |
02:16:28 | * | kumul joined #nim |
02:21:20 | * | egrep quit (Read error: Connection reset by peer) |
02:22:26 | * | egrepnix joined #nim |
02:23:36 | * | egrepnix is now known as egrep |
02:24:20 | * | darkf joined #nim |
02:29:58 | * | BitPuffin|osx joined #nim |
02:30:10 | * | johnsoft quit (Ping timeout: 272 seconds) |
02:30:12 | * | endragor quit (Remote host closed the connection) |
02:31:20 | * | johnsoft joined #nim |
02:38:10 | vikaton | any news on Nim and raspberry pi? |
02:38:21 | * | Siecje left #nim (#nim) |
02:38:47 | flaviu | I see no reason why it should work |
02:38:51 | flaviu | *shouldn't |
02:39:08 | vikaton | I see |
02:39:45 | flaviu | Also, http://buildbot.nim-lang.org/waterfall |
02:41:41 | vikaton | cool |
02:45:24 | onionhammer | Nim works fine on rbpi |
02:45:39 | onionhammer | I've used it in the past |
02:46:35 | vikaton | Nice |
02:52:32 | vikaton | just realized Rust also has stack overflows |
02:54:20 | * | endragor joined #nim |
02:54:27 | * | endragor quit (Remote host closed the connection) |
02:54:56 | * | endragor joined #nim |
03:08:00 | * | pregressive joined #nim |
03:15:42 | * | jrenner1 joined #nim |
03:15:52 | jrenner1 | is it possible to change the value of a "field" in an object? |
03:16:06 | jrenner1 | i.e. I have Vector3 type, I want to do v.x = <some float> |
03:16:30 | filwit | short of a macro with varargs[string,`$`], how can I pass varargs to another proc? eg: https://gist.github.com/PhilipWitte/4fc66ae3df44dc664ae4 |
03:16:50 | filwit | jrenner1: yes that's easy |
03:17:22 | filwit | jrenner1: not sure exactly what you mean, actually. But it sounds easy anyways. |
03:17:34 | fowl | filwit: the only answer, syntactically |
03:17:48 | jrenner1 | filwit: I think I messed up by passing an immutable object |
03:17:48 | filwit | fowl: that doesn't help me |
03:18:06 | fowl | filwit: use a macro |
03:18:08 | filwit | jrenner1: okay, i see |
03:18:33 | fowl | filwit: there is no base type expr that exists at runtime |
03:18:46 | filwit | fowl: so there's no way short of a macro? A built-in macro would be nice for this type of thing. |
03:19:28 | filwit | fowl: i know that varargs[expr] is a compiler construct, i just wanted to know if there was sugar built-in for this type of thing already |
03:20:22 | filwit | compile-time construct** |
03:27:20 | * | Demon_Fox joined #nim |
03:28:46 | fowl | filwit: you need a macro to do the unpacking |
03:32:55 | filwit | fowl: pfft.. i always forget this.. how to turn a varargs[expr] into a array in a macro? just use varargs[string,$]? |
03:33:12 | filwit | i'm using this somewhere already.. should just look it up |
03:34:17 | fowl | filwit: you have to escape the operator |
03:34:27 | fowl | `$` |
03:35:08 | fowl | Oh I'm not sure what that would do if you use it on a macro |
03:35:57 | filwit | yeah the problem is that the param comes through as a NimNode and there's no .arrayVal in macros.. |
03:36:12 | filwit | need to look up my code, pretty sure I figured this out already before |
03:36:57 | fowl | filwit: echo dumptree code. Or code.dumptree.echo |
03:37:10 | fowl | Children() to iterate its children nodes |
03:38:41 | filwit | right, of course |
03:39:09 | fowl | I wish ekarlsos web repl thing was up |
03:39:49 | * | ddl_smurf quit (Quit: ddl_smurf) |
03:49:12 | * | jrenner1 quit (Quit: WeeChat 0.4.2) |
03:53:12 | * | BitPuffin|osx quit (Ping timeout: 265 seconds) |
04:01:50 | * | kumul quit (Quit: Leaving) |
04:02:43 | * | endragor_ joined #nim |
04:03:45 | * | TEttinger joined #nim |
04:05:14 | * | endragor quit (Ping timeout: 245 seconds) |
04:05:14 | * | zaquest quit (Ping timeout: 245 seconds) |
04:05:40 | * | zaquest joined #nim |
04:16:34 | * | intra joined #nim |
04:17:42 | * | pregressive quit (Remote host closed the connection) |
04:18:09 | * | Kingsquee quit (Ping timeout: 245 seconds) |
04:24:49 | * | ryKe joined #nim |
04:28:11 | * | kokozedman joined #nim |
04:30:23 | * | johnsoft quit (Ping timeout: 244 seconds) |
04:30:57 | * | johnsoft joined #nim |
04:31:46 | * | gsingh93 joined #nim |
04:38:44 | * | johnsoft quit (Ping timeout: 272 seconds) |
04:38:52 | * | johnsoft joined #nim |
04:39:47 | * | ryKe quit (Quit: Page closed) |
04:50:03 | * | dtscode is now known as zombiedtscode |
05:07:30 | * | gsingh93 quit (Ping timeout: 276 seconds) |
05:13:54 | * | onionhammer quit (Ping timeout: 258 seconds) |
05:20:59 | * | dddddd joined #nim |
05:24:00 | Varriount | dom96, Araq: More spam posts on the forum. |
05:27:34 | * | vendethiel joined #nim |
05:28:34 | * | johnsoft quit (Ping timeout: 245 seconds) |
05:29:38 | * | johnsoft joined #nim |
05:43:31 | avsej | maybe implement recaptcha for first post? https://developers.google.com/recaptcha/docs/start |
05:45:08 | Varriount | avsej: I'm guessing that it's more likely to be human spammers. |
05:46:11 | avsej | why do they think that auditory of such forum is a good target for selling goods? :) |
05:46:51 | Varriount | avsej: Perhaps they don't care. It may be that they are working for an advertising firm, and get paid per link they post on a forum. |
05:47:18 | Varriount | avsej: For one thing, we're running forum software that's completely different from that of PHPBB and friends. That's going to cause at least some of the regular spam-bots to break. |
05:48:47 | avsej | maybe moderation of first post will help? |
05:49:01 | Varriount | avsej: That's what I was thinking. |
05:49:04 | * | superfunc joined #nim |
05:49:19 | avsej | such practice works for protecting mail lists |
05:49:30 | Varriount | It's a bird! It's a plane! No, it's *superfunc*! |
05:50:32 | * | wuehlmaus quit (Quit: Lost terminal) |
05:50:56 | * | Kingsquee joined #nim |
05:53:47 | * | superfunc quit (Ping timeout: 256 seconds) |
05:55:29 | * | Kingsquee quit (Ping timeout: 256 seconds) |
05:58:06 | Quora | I have the worst nickname |
05:58:40 | Varriount | Quora: Huh? I don't recall discussing any questions today... |
06:00:12 | Quora | not you |
06:07:43 | Varriount | Quora: Tell me, does your username pre-date the website? |
06:08:59 | Quora | no |
06:09:04 | Quora | I didn't know it existed |
06:09:05 | Quora | lol |
06:11:46 | * | GOOOBLES quit (Ping timeout: 246 seconds) |
06:13:45 | Varriount | Quora: You could change your nick to Quorum |
06:15:56 | * | onionhammer joined #nim |
06:18:24 | * | zaquest quit (Quit: Leaving) |
06:34:37 | filwit | Varriount, avsej: it's probably about Google rankings, or so I've been told |
06:35:18 | * | zombiedtscode is now known as dtscode |
06:35:23 | filwit | they're trying to boost the search engine rankings by having a bunch of random sites link to their stuff when search crawlers rate stuff |
06:50:26 | * | gokr joined #nim |
07:12:31 | * | endragor joined #nim |
07:15:25 | * | endragor_ quit (Ping timeout: 264 seconds) |
07:27:29 | * | endragor quit (Remote host closed the connection) |
07:37:37 | * | BlaXpirit joined #nim |
07:42:51 | * | vendethiel quit (Ping timeout: 276 seconds) |
07:47:19 | * | rgv151 joined #nim |
07:50:20 | * | vendethiel joined #nim |
07:59:48 | * | ddl_smurf joined #nim |
08:13:45 | * | vendethiel quit (Ping timeout: 240 seconds) |
08:26:27 | * | Jehan_ quit (Ping timeout: 264 seconds) |
08:27:41 | * | endragor joined #nim |
08:27:59 | * | sepisoad joined #nim |
08:35:56 | * | wuehlmaus joined #nim |
08:42:30 | * | Jehan_ joined #nim |
08:43:46 | wuehlmaus | hi, all, first, i am totally excited about nim. it has been a long time that i searched for a simple beautiful language that should also be fast, 3 days ago i found nim reading a Heise commentary about rust and nim. i am blown away in how simple programming can be in nim. i love it! |
08:44:30 | wuehlmaus | that said i have a problem with nimble |
08:44:56 | wuehlmaus | Downloading package list from https://github.com/nim-lang/packages/raw/master/packages.json |
08:44:59 | wuehlmaus | Error: unhandled exception: 404 Not Found [HttpRequestError] |
08:45:15 | dtscode | nimble gives you that? |
08:45:16 | wuehlmaus | i am using arch linux |
08:45:18 | sepisoad | how to know a remote socket is closed? |
08:45:19 | wuehlmaus | yes |
08:45:40 | dtscode | sepisoad: When it tells you |
08:45:50 | dtscode | wuehlmaus: What nimble version? |
08:45:57 | sepisoad | how? |
08:46:07 | wuehlmaus | nimble v0.6.0 compiled at 2015-01-03 19:05:48 |
08:46:13 | dtscode | read the docs for whatever socket lib you're using sepisoad |
08:46:32 | dtscode | wuehlmaus: What happens when you do nimble update? |
08:46:42 | wuehlmaus | that's what happens :( |
08:47:31 | wuehlmaus | sorry i wanted to paste "nimble update". this line was missing |
08:47:40 | wuehlmaus | but that's when i get the error |
08:47:48 | dtscode | Would you mind pasting all of the output to a pastebin? |
08:48:09 | wuehlmaus | that's all, i cannot paste anymore |
08:48:22 | dtscode | Odd |
08:48:39 | dtscode | The only thing I can think of is that it points to an invalid url |
08:48:41 | dtscode | One second |
08:48:47 | fowl | wuehlmaus: can you nimble install nimble@#head |
08:49:20 | fowl | Or if that doesn't work install nimble from github |
08:49:26 | wuehlmaus | Error: unhandled exception: /home/maddi/.nimble/packages.json(1, 0) Error: { expected [JsonParsingError] |
08:49:45 | wuehlmaus | fowl: yes, i can try that |
08:49:59 | dtscode | wuehlmaus: Do you still have the source for your nimble? |
08:50:08 | * | banister joined #nim |
08:51:16 | wuehlmaus | that works :) |
08:51:26 | wuehlmaus | wonderful, thank you |
08:51:45 | wuehlmaus | i used the arch package |
08:51:57 | wuehlmaus | but in archlinux there is AUR and it has nimble-git |
08:52:11 | wuehlmaus | and that throws no error |
08:58:45 | sepisoad | i cannot find anything on the doc |
08:59:31 | sepisoad | the isClosed() function would not tell if the remote sock is closed |
09:06:07 | * | Demon_Fox quit (Quit: Leaving) |
09:12:13 | * | Trustable joined #nim |
09:14:59 | sepisoad | recvLine() will return the last buffered data even if the remore socket is closed |
09:23:21 | sepisoad | i noticed that recvLine() wont return "" if the remote socket is closed using close() function, how is that possible |
09:26:30 | * | zaquest joined #nim |
09:26:39 | * | superfunc joined #nim |
09:31:12 | * | superfunc quit (Ping timeout: 272 seconds) |
09:41:58 | * | TEttinger quit (Ping timeout: 272 seconds) |
09:42:58 | * | ingsoc joined #nim |
09:43:39 | * | filwit quit (Quit: Leaving) |
09:47:53 | * | Jehan_ quit (Quit: Leaving) |
10:04:00 | sepisoad | i found a workaround for the issue, if i call send() then the next call to recvLine() will return "" on a closed socket, but isConnected still returns false |
10:04:00 | sepisoad | . why is it so? |
10:05:14 | pigmej | sepisoad: there is no way to detect if remote socket is closed on client side |
10:05:18 | pigmej | that's by definition |
10:05:43 | sepisoad | so how usually people work around this issue? |
10:05:54 | pigmej | it's not issue |
10:06:01 | pigmej | that's how sockets are working |
10:06:44 | pigmej | to be sure if other side closed socket, you have to read/write something to it |
10:06:47 | pigmej | then you can be sure |
10:07:41 | pigmej | but I'm talking about sockets in general, not about nim implementatino |
10:08:14 | pigmej | but if you send something to socket, then client closes connection, you can read ALL that was sent and buffered on your side |
10:08:16 | * | kashyap_ joined #nim |
10:09:08 | sepisoad | that is what I just found |
10:09:35 | pigmej | and thats normal |
10:09:36 | sepisoad | that sounds a little bit crazy, but it seems to be the way |
10:17:41 | kashyap_ | I need to write a program that takes a text file as input and replace escape characters with their ascii values .... for example for input = "ABC\nD\t", output = "65 66 67 10 68 08" ... |
10:18:20 | kashyap_ | for ABC etc, I can use ord directly .... how do I handle the escape chars? |
10:19:25 | kashyap_ | I'd like to reuse escape char understanding that compiler already has |
10:21:22 | kashyap_ | anybody |
10:21:24 | kashyap_ | ? |
10:27:23 | def- | kashyap_: there aren't that many escape characters the nim compiler knows, are you sure you don't want to hard code them? also, \n is system dependent and will be 2 chars on Windows |
10:28:55 | kashyap_ | not really, I could just handle them myself....I was hoping to use this as an opportunity to explore the macro magic |
10:29:39 | * | Ven joined #nim |
10:30:28 | kashyap_ | What I am doing is converting https://github.com/ckkashyap/nimxv6/blob/master/include/kbd.h#L73 into nim .... c2nim does not work for indexed initialization |
10:30:46 | kashyap_ | ofcourse the really right way would be to figure out how to extend c2nim :) |
10:31:16 | * | vendethiel joined #nim |
10:31:39 | * | Ven_ joined #nim |
10:31:52 | * | Ven quit (Read error: Connection reset by peer) |
10:32:40 | def- | I'm not sure I even understand. Why can't you use ord on '\t'? |
10:33:58 | kashyap_ | the input comes from another file in form of "ABC\t" |
10:36:21 | kashyap_ | This is my program - http://lpaste.net/133491 |
10:38:20 | kashyap_ | def- at runtime, \t will not be available to me as a char ... it would be a string ..... do you see the problem? |
10:38:30 | def- | yes |
10:38:48 | * | Jehan_ joined #nim |
10:38:52 | kashyap_ | ok ... for a moment I thought I was just overthinking it :) |
10:39:36 | * | Arrrrr joined #nim |
10:42:06 | def- | but I don't see a nice way to do this |
10:42:13 | kashyap_ | :( |
10:43:12 | def- | you wouldn't want a nim vm in your kernel just to parse \t |
10:43:20 | kashyap_ | some kind of eval function perhaps :) |
10:43:35 | LoneTech | so you want something like Python's somestring.decode('string_escape')? |
10:44:06 | gokr | kashyap_: How about nicking the string literal lexer code from the compiler? |
10:44:40 | * | vadim__ joined #nim |
10:45:20 | kashyap_ | yeah LoneTech :) gokr ... sure, would you know off hand which function to use? |
10:45:23 | gokr | https://github.com/Araq/Nim/blob/devel/compiler/lexer.nim#L554 |
10:45:38 | gokr | Just a wild guess ;) |
10:46:15 | kashyap_ | gokr ... oh, you mean, plug out the code from lexer.nim ? |
10:46:19 | gokr | yeah |
10:46:28 | gokr | Good old fashion copy paste |
10:46:33 | gokr | And adapt :) |
10:47:09 | kashyap_ | :) |
10:47:23 | fowl | You are over thinking it: while idx < str.Len: if str[idx] == '\\': ... Else: newstr.add str[idx] |
10:47:54 | * | mal`` quit (Ping timeout: 265 seconds) |
10:48:07 | LoneTech | http://nim-lang.org/docs/strutils.html#unescape,string,string,string might not process \a, \t, \r \n etc encodings |
10:50:35 | LoneTech | nope, it doesn't |
10:52:07 | kashyap_ | fowl ... in the if block, I'd need to handle various char essentially ... LoneTech - it seems to work for \n and \t |
10:54:07 | LoneTech | escape converts them to \x0A and \x09, and unescape back. it doesn't know about the letter variants |
10:54:32 | * | mal`` joined #nim |
10:54:36 | * | vendethiel quit (Ping timeout: 276 seconds) |
10:55:05 | kashyap_ | for my case I just need unescape ... and that seems to work just right |
11:15:05 | * | vendethiel joined #nim |
11:15:24 | * | jbomo quit (Ping timeout: 276 seconds) |
11:22:36 | kashyap_ | LoneTech ... I jumped the gun ... unescape does not work for me :( |
11:26:54 | * | sepisoad_ joined #nim |
11:29:06 | * | sepisoad quit (Ping timeout: 252 seconds) |
11:29:49 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:29:56 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:34:21 | * | Arrrrr quit (Quit: WeeChat 1.2) |
11:37:37 | * | vendethiel quit (Ping timeout: 255 seconds) |
11:38:24 | vikaton | Is the undefined behavior caused by the compiler taking advantage of optimizing the null pointer dereferencing ? |
11:38:54 | fowl | What undefined behavior |
11:39:38 | vikaton | the undefined behavior caused by dereferencing null pointers |
11:41:09 | fowl | How is that undefined |
11:41:14 | fowl | You get a segfault |
11:43:46 | * | zulmin quit (Ping timeout: 252 seconds) |
11:45:54 | * | zulmin joined #nim |
11:47:49 | vikaton | hmm |
11:49:35 | * | Arrrr joined #nim |
11:51:10 | vikaton | fowl, so Nim wouldnt produce/execute unexpected code on null pointer deref, but just crash and segfault? |
11:52:21 | kashyap_ | Don't octal literals work any more? |
11:53:01 | kashyap_ | sorry ... my mistake |
11:59:44 | * | banister joined #nim |
11:59:49 | * | banister quit (Max SendQ exceeded) |
12:01:34 | * | banister joined #nim |
12:07:43 | * | kashyap_ quit (Ping timeout: 246 seconds) |
12:23:31 | Jehan_ | fowl: Per the C standard, the behavior of dereferencing a null pointer is undefined and a C compiler can assume pretty much whatever. Including it being a no-op. That means that it can be removed and no segfault occurs. |
12:24:00 | Jehan_ | vikaton: It can produce undefined behavior, but you can configure the compiler to avoid that. |
12:24:49 | fowl | How? |
12:24:55 | Jehan_ | --passC:-fsanitize=null is the quickest way to do that clang; gcc should not exhibit the problematic behavior in its default configuration. |
12:27:20 | Jehan_ | fowl: proc main = (var a: ref int; echo a[]); main() |
12:27:32 | Jehan_ | Prints 0 for me with clang and -d:release |
12:27:51 | fowl | Jehan_: what if it comes from a function that returns nil |
12:28:08 | Jehan_ | fowl: what do you mean? |
12:28:08 | fowl | Is it still optimized out |
12:28:25 | Jehan_ | fowl: It depends on what the compiler can figure out, which is difficult to predict. |
12:28:49 | * | banister is now known as banisterfiend |
12:29:32 | dom96 | Jehan_: What are your thoughts about this? Is it a serious problem in Nim? Can we (or should we) fix it? |
12:30:07 | Jehan_ | dom96: It's going to be fixed. Araq already said there'll be a nilchecks option. |
12:30:24 | dom96 | great |
12:30:43 | Jehan_ | As far as correctness is concerned, it's a minor problem. |
12:31:16 | Jehan_ | It can only happen if there's a software defect ("bug" in the common vernacular) and there are plenty more things that can cause bugs. |
12:31:58 | Jehan_ | It's something that people home in on right now because there's this movement that believes that type safety is a major step towards correctness. |
12:32:29 | Jehan_ | In reality, it's not. It helps, but the biggest problems lie elsewhere. |
12:34:02 | Jehan_ | For Nim in particular, -fsanitize=null (for clang) and -fno-strict-overflow (for gcc and clang) will fix pretty much all the concerns you may have with respect to undefined behavior. |
12:34:18 | Jehan_ | Shift widths should be checked separately, but that's cheap. |
12:35:51 | Jehan_ | The real interesting correctness issues, anyway, lie with things that are not easy to guarantee. |
12:36:17 | Jehan_ | For example, assume that a procedure has a precondition that a seq being passed as an argument is sorted with respect to a given condition. |
12:36:35 | dom96 | That's good to hear. |
12:36:46 | Jehan_ | Or pretty much anything revolving around cache behavior. |
12:37:22 | fowl | Jehan_: do you know of a language that let's you do that |
12:37:36 | Jehan_ | I'd be far more concerned about off-by-one errors not being caught with -d:release than null pointer dereferences screwing things up. |
12:37:52 | fowl | (Arbitrary constraints like seq is sorted) |
12:38:21 | Jehan_ | fowl: Eiffel, Ada, D. Sort of, i.e. at runtime. SPARK has actual support for formal verification. |
12:38:34 | Arrrr | cobra i think |
12:38:48 | Jehan_ | Runtime support is tricky when predicates become expensive. |
12:38:53 | Arrrr | http://cobra-language.com/ |
12:39:12 | Jehan_ | E.g. checking predicates that require O(n) time for a constant time operation. |
12:39:37 | Jehan_ | You can add pre- and postconditions to Nim with fairly little effort (I'm using them, in fact). |
12:40:03 | Jehan_ | The only thing that this doesn't quite handle is subtyping. |
12:40:22 | Jehan_ | But still helps a lot. It's easy because they're basically assertions that follow a specific discipline. |
12:41:42 | Jehan_ | For formal verification, see also Larch and Z. That's a lot of work, though. |
12:42:20 | Jehan_ | Formal verification is powerful, but ... basically, you get diminishing returns compared to writing good tests combined with a good informal specification. |
12:43:05 | Jehan_ | There's a lot of research opportunities in the area of software verification right now. |
12:44:40 | * | banisterfiend quit (Ping timeout: 255 seconds) |
12:46:28 | * | gokr copied all the above for that FAQ we thought of... |
12:47:00 | * | Ven joined #nim |
12:47:30 | Jehan_ | See e.g. some of the stuff that's being done in Racket w.r.t. contracts. |
12:48:39 | vikaton | gokr, are you adding this to the unsafety part? |
12:49:01 | gokr | Jehan_: I know its not your "ball of mud" - but do you know Rebol? (not related to the above) I recently (oddly) discovered it and... I find it quite interesting. |
12:49:26 | gokr | vikaton: I just copied it :) Did you start writing that part? |
12:49:42 | vikaton | No I was just wondering :P |
12:50:15 | gokr | I haven't done anything - except mentioning we should do it. It was Araq's idea btw, that the FAQ should cover these things. |
12:50:43 | vikaton | yeah i agree |
12:51:21 | * | endragor quit (Read error: Connection reset by peer) |
12:51:22 | Jehan_ | gokr: I know Rebol, but only really in passing. |
12:51:33 | * | Ven quit (Ping timeout: 244 seconds) |
12:51:38 | * | endragor joined #nim |
12:51:53 | Jehan_ | I.e. haven't done any actual programming in it. |
12:51:54 | gokr | I had always thought it was a ... toy kinda. But realize now that it has a pretty interesting "kernel" in there. |
12:51:58 | * | saml_ joined #nim |
12:52:10 | gokr | Kinda like Forth + Lisp + Self. |
12:52:43 | gokr | The rebirth of it is this: http://www.red-lang.org |
12:52:54 | Jehan_ | gokr: The problem is that there are way too many interesting languages out there. :) |
12:52:59 | gokr | yup |
12:53:36 | gokr | This article is an example of "neat stuff" with Rebol/Red: http://www.red-lang.org/search/label/parse |
12:53:37 | * | superfunc joined #nim |
13:00:38 | * | banister joined #nim |
13:03:16 | gokr | Jehan_: One interesting part with Red is that it compiles all the way down to machine code all on its own. |
13:04:10 | gokr | I compiled the silly fib and... ok, it was "only" 1/3 the speed of Nim -d:release but the binary was 5kb :) |
13:04:51 | Jehan_ | Here's an interesting paper on Racket and contracts: http://www.ccs.neu.edu/racket/pubs/oopsla13-dff.pdf |
13:08:05 | * | superfunc quit (Ping timeout: 246 seconds) |
13:15:50 | * | banister is now known as banisterfiend |
13:20:55 | * | saml_ quit (Quit: Leaving) |
13:40:17 | * | BlaXpirit quit (Read error: Connection reset by peer) |
13:41:14 | * | BlaXpirit joined #nim |
13:42:08 | * | Jehan_ quit (Quit: Leaving) |
13:43:42 | wuehlmaus | i stumbled over red myself. rebol has nice ideas but last time i tried many things in rebol2 do not work in rebol3 or red |
13:44:25 | wuehlmaus | and nim is so fast and short, i bet on it now ;) |
13:46:18 | wuehlmaus | one question, i saw that i can leave of braces in nim quite often. what is the rule when invoking procs? |
13:46:46 | wuehlmaus | sorry for a stupid beginners question |
13:48:11 | * | BitPuffin joined #nim |
13:52:15 | LoneTech | wuehlmaus: it's slightly complicated. http://nim-lang.org/docs/manual.html#procedures documents it, you're probably referring to command invocation syntax |
13:52:55 | gokr | wuehlmaus: Rebol2/3 seems... less interesting given that they are "basic" interpreters in C. |
13:53:10 | gokr | wuehlmaus: I have a toy idea mulling though. |
13:55:24 | vikaton | gokr, need any help with the FAQ? |
13:56:25 | wuehlmaus | LoneTech: thanks for pointers! |
14:08:15 | * | sepisoad_ quit (Quit: Leaving) |
14:09:28 | * | pregressive joined #nim |
14:12:28 | * | Ven joined #nim |
14:26:52 | * | NimBot joined #nim |
14:27:42 | * | yglukhov joined #nim |
14:29:51 | Xaseron | is it possible to spawn threads in parallel region aquivalent to the number of cores? |
14:34:43 | vikaton | NOt too far from 2,000 stars |
14:36:42 | * | Arrrr quit (Quit: WeeChat 1.2) |
14:37:13 | * | Arrrr joined #nim |
14:42:18 | vikaton | Sent an email to the people at tutorialspoint to change Nimrod to Nim in there compile online program |
14:42:51 | Arrrr | Good move |
14:43:02 | * | strcmp1 joined #nim |
14:43:06 | vikaton | and they said they'll fix it soon |
14:50:51 | * | pregressive quit (Read error: Connection reset by peer) |
14:51:52 | * | pregressive joined #nim |
14:51:53 | * | coffeepot joined #nim |
14:52:12 | * | kumul joined #nim |
14:52:28 | coffeepot | hi guys, I don't know if this is a known thing, but I encountered this: https://gist.github.com/coffeepots/10c5474c62f181ee661d |
14:52:35 | * | superfunc joined #nim |
14:52:36 | coffeepot | from what I can tell, using a generic proc from another module requires importing any features the generic proc might need in the module that's using it? |
14:52:37 | coffeepot | is this because generic procs are kind of inlined into the module that uses them (I notice they don't really get parsed until they are instantiated, which makes sense) |
14:52:37 | coffeepot | this was really confusing for me, as all the code compiled fine and worked from within one module, but using it from another module caused the type mismatch error! |
14:56:23 | coffeepot | the type mismatch error is raised in the "useTable" proc itself, in module test. If you used "useTable" from within module test it would of course work fine though |
14:56:57 | * | superfunc quit (Ping timeout: 250 seconds) |
15:00:43 | coffeepot | sorry my gist wasn't very clear, this might be better: https://gist.github.com/coffeepots/42733039da57f4f487d6 |
15:01:35 | * | Jehan_ joined #nim |
15:03:31 | Jehan_ | coffeepot: I think that may be a bug. If you use `[]=`(t, a, data) instead, it works. |
15:04:00 | * | gsingh93 joined #nim |
15:05:11 | coffeepot | ok, fair enough :) I thought it might be unintended. At least it's easily worked around for now |
15:06:11 | Jehan_ | Here's how the semantics *should* work: http://nim-lang.org/docs/manual.html#generics-symbol-lookup-in-generics |
15:08:44 | coffeepot | Jehan_ thanks for that, quite interesting. Mixin is something new for me :) |
15:09:19 | Jehan_ | Normally, mixin vs. bind is inferred by overloading, but sometimes it can be necessary to be explicit. |
15:09:50 | Jehan_ | Mixin basically says that this symbol is something that needs to be resolved specifically for each instance of the type parameter. |
15:09:53 | coffeepot | I love how much control Nim gives to use when defining such abstract things as generics |
15:11:46 | Jehan_ | Actually, I think we could use a bit more control, but that's in the works. |
15:11:51 | Jehan_ | Well, at least some of it. |
15:12:02 | Jehan_ | I'd still like to see parameterized modules. |
15:13:24 | Jehan_ | Something like: https://bitbucket.org/behrends/nimmetamod |
15:13:49 | vikaton | wow |
15:13:56 | vikaton | 169 ppl |
15:14:42 | Jehan_ | Just a warning, don't use it in practice (at least not without knowing what you're doing), it is very hackish (out of necessity). |
15:17:43 | ozra | Jehan_: Parameterized modules? Cool! |
15:18:47 | Jehan_ | ozra: I'd love to see them, but even assuming we'll get them, it won't be before 1.0. |
15:19:14 | coffeepot | Jehan_ that is absolutely mad (in a good way)! :) |
15:19:23 | coffeepot | really cool |
15:20:40 | coffeepot | Shall I attempt a bug report for this generic issue I encountered? |
15:23:56 | * | vendethiel joined #nim |
15:24:10 | vikaton | 170 ppl |
15:24:17 | vikaton | more than usual 4shore |
15:24:19 | Jehan_ | coffeepot: Probably. If for some obscure reason it isn't an error, it needs to be documented. |
15:24:50 | * | Arrrr quit (Quit: WeeChat 1.2) |
15:25:08 | * | Arrrr joined #nim |
15:25:31 | gmpreussner|work | Jehan_: what problem does that solve that concepts can't do? |
15:25:44 | coffeepot | ok I'm making an issue for it, can I do code colouring in my issue? |
15:25:57 | Jehan_ | gmpreussner|work: What problem does what solve? |
15:26:07 | gmpreussner|work | parameterized modules |
15:26:25 | gmpreussner|work | is it just a more condensed syntax to do the same thing? |
15:26:35 | coffeepot | code colouring: worked it out :D |
15:27:19 | Jehan_ | gmpreussner|work: Concepts are constraints on type parameters for types and procedures/templates. |
15:27:32 | Jehan_ | But I'm talking about parameterizing modules instead of types and procedures. |
15:28:07 | gmpreussner|work | but don't you end up just parameterizing types as well? |
15:28:21 | Jehan_ | Including parameterizing modules by other modules. |
15:29:17 | * | darkf quit (Quit: Leaving) |
15:29:25 | gmpreussner|work | well, i'm looking at the example, and i can't quite see the value yet :) |
15:29:34 | Jehan_ | gmpreussner|work: In principle, it's more powerful, but also more cumbersome to use (since there's no clear ad-hoc syntax). |
15:30:37 | Jehan_ | Simple example: You can't parameterize variables. |
15:40:42 | * | yglukhov quit (Ping timeout: 246 seconds) |
15:42:18 | pkoretic | win close |
15:42:25 | pkoretic | sorry :D |
15:42:30 | * | pkoretic left #nim (#nim) |
15:43:36 | * | endragor quit (Ping timeout: 272 seconds) |
15:46:41 | * | brson joined #nim |
15:46:54 | * | vendethiel quit (Ping timeout: 245 seconds) |
15:59:24 | * | Ven quit (Ping timeout: 256 seconds) |
16:00:25 | * | pregressive quit (Remote host closed the connection) |
16:00:42 | * | pregressive joined #nim |
16:06:06 | * | coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client) |
16:09:02 | * | vendethiel joined #nim |
16:19:01 | * | pregressive quit (Remote host closed the connection) |
16:20:42 | * | CryptoToad joined #nim |
16:22:11 | CryptoToad | what's the proper way to handle a string containing null characters? |
16:27:08 | fowl | Define handle |
16:27:13 | Jehan_ | CryptoToad: What's your problem? |
16:27:23 | CryptoToad | i want to convert it to hex, it's a memory dump from a process |
16:27:29 | Jehan_ | Normally, strings should work just fine with null characters. |
16:27:29 | CryptoToad | i'm pretty sure my issue is null termination |
16:27:32 | CryptoToad | ahh ok |
16:27:38 | CryptoToad | may be something else then |
16:29:33 | Jehan_ | CryptoToad: This works for me: https://gist.github.com/rbehrends/125144ec409d3020c63c |
16:30:01 | CryptoToad | thanks, I'll give that a shot. |
16:30:09 | * | vendethiel quit (Ping timeout: 240 seconds) |
16:35:12 | CryptoToad | Got it working, it was null termination |
16:35:15 | CryptoToad | thanks |
16:35:32 | ozra | coffeepot: Use ```nim ... ``` works fine in github markdown.. I've just made a fix to the highlighting, but it's probably not rolled out by github yet. But most syntax highlights correctly. |
16:37:45 | * | wb_ quit (Ping timeout: 240 seconds) |
16:38:26 | * | vendethiel joined #nim |
16:40:09 | * | pregressive joined #nim |
16:40:46 | * | superfunc joined #nim |
16:42:27 | * | wb_ joined #nim |
16:42:30 | Jehan_ | It's really frustrating. Bitbucket does support Nim, except for snippets. So I'm still stuck with using GitHub for Nim gists. |
16:43:54 | strcmp1 | Jehan_, is it seen as 'Nim' or 'nimrod', though? |
16:44:08 | * | BitPuffin quit (Read error: Connection reset by peer) |
16:44:21 | * | Tennis quit (Read error: Connection reset by peer) |
16:44:22 | Jehan_ | strcmp1: No idea, I just see that highlighting for Nim sourcefiles works, but not for snippets. |
16:44:56 | strcmp1 | alright |
16:45:26 | * | superfunc quit (Ping timeout: 258 seconds) |
16:47:49 | fowl | Jehan_, i use it in the wiki on bitbucket in ```nim |
16:48:40 | Jehan_ | fowl: Hmm, hadn't thought about that. |
16:49:16 | * | yglukhov joined #nim |
17:03:57 | * | Jesin quit (Quit: Leaving) |
17:04:02 | * | kumul quit (Ping timeout: 272 seconds) |
17:10:28 | * | bluenote quit (Ping timeout: 246 seconds) |
17:12:05 | * | brson quit (Remote host closed the connection) |
17:12:55 | * | Jesin joined #nim |
17:19:01 | * | Jesin quit (Quit: Leaving) |
17:19:44 | * | gokr quit (Quit: Leaving.) |
17:24:03 | * | rgv151_ joined #nim |
17:24:28 | * | Jesin joined #nim |
17:27:34 | * | boopisaway is now known as boop |
17:29:31 | * | OnO joined #nim |
17:34:48 | Arrrr | It's silly, but i'd like to be able to write something like this: http://pastebin.com/Td4500w9 |
17:37:40 | * | Arrrrr joined #nim |
17:37:57 | BlaXpirit | some language has a switch statement that does thi |
17:38:10 | fowl | Arrrr, why cant you |
17:38:17 | Arrrrr | It is possible? |
17:38:44 | fowl | the signature is contains(openarray[proc(x:int):bool], int) |
17:38:50 | fowl | i dont know what you want to do with it though |
17:39:07 | BlaXpirit | i assume wants to check if any of predicates are true |
17:39:12 | Arrrrr | Exactly |
17:39:22 | Arrrrr | Rather than: let result = a.testA or a.testB or a.testC |
17:39:50 | BlaXpirit | well i'm not aware of an 'any' proc |
17:40:39 | * | TEttinger joined #nim |
17:40:51 | * | Arrrr quit (Ping timeout: 276 seconds) |
17:40:59 | BlaXpirit | any([test_a, test_b, test_c].map_it(it(a), bool)) |
17:41:06 | BlaXpirit | except `any` doesn't exist |
17:43:01 | * | banister joined #nim |
17:43:20 | def- | Arrrrr: looks fine: https://gist.github.com/def-/0faee1f7e857c602b251 |
17:44:21 | BlaXpirit | hax alert |
17:44:47 | Arrrrr | is 'in' an alias for contains? |
17:44:50 | BlaXpirit | yes |
17:45:05 | def- | well, in some contexts |
17:45:07 | Arrrrr | This changes everything |
17:45:21 | def- | "for x in foo" calls items, "for x, y in foo" calls pairs |
17:45:26 | BlaXpirit | please don't actually use this. |
17:46:20 | * | banister quit (Client Quit) |
17:47:31 | def- | BlaXpirit: I added a more functional version |
17:47:33 | def- | [testA, testB, testC].mapIt(bool, it(a)).foldl(a or b) |
17:49:08 | BlaXpirit | proc any(c) = |
17:49:14 | BlaXpirit | c.foldl(a or b) |
17:50:59 | def- | right |
17:51:14 | fowl | For..in is the construct |
17:51:33 | * | kumul joined #nim |
17:52:03 | BlaXpirit | actually, that is a suboptimal `any` |
17:54:07 | def- | right, should stop once a true is found |
17:58:30 | * | gsingh93 quit (Ping timeout: 272 seconds) |
18:01:36 | * | shodan45 quit (Quit: Konversation terminated!) |
18:02:56 | * | banister joined #nim |
18:11:15 | Arrrrr | How many issues will get solved for 1.0 ? |
18:12:35 | * | shodan45 joined #nim |
18:12:43 | strcmp1 | Arrrrr, all of them! |
18:15:23 | Arrrrr | I dont believe your lies! |
18:15:27 | * | rgv151_ quit (Remote host closed the connection) |
18:20:36 | * | CryptoToad quit (Read error: Connection reset by peer) |
18:26:03 | * | allan0 quit (Quit: WeeChat 1.1.1) |
18:26:19 | BlaXpirit | ok that lib is basically a toy |
18:26:40 | BlaXpirit | it could maybe work in the simplest of cases |
18:26:57 | BlaXpirit | woops, wrong chat |
18:30:11 | * | superfunc joined #nim |
18:31:31 | * | brson joined #nim |
18:34:41 | * | superfunc quit (Ping timeout: 258 seconds) |
18:40:51 | * | kumool joined #nim |
18:44:49 | * | kumul quit (Ping timeout: 264 seconds) |
18:45:13 | vikaton | Araq, any plans on making the expensive performance hit from passing -fsanitize flags to the compiler not be as expensive, or is that out of your hands? |
18:51:02 | * | Senketsu quit (Quit: Leaving) |
18:51:22 | OnO | what is benign pragma? |
18:54:05 | * | gsingh93 joined #nim |
18:54:38 | * | Senketsu joined #nim |
18:55:09 | * | brson quit (Quit: leaving) |
19:03:53 | * | JehanII joined #nim |
19:08:43 | * | JehanII quit (Ping timeout: 265 seconds) |
19:09:18 | * | JehanII joined #nim |
19:20:20 | * | banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:20:34 | * | pregressive quit () |
19:21:31 | Jehan_ | vikaton: What expensive performance hit? |
19:21:51 | * | pregressive joined #nim |
19:22:04 | * | kokozedman quit (Quit: Leaving) |
19:22:42 | * | gokr joined #nim |
19:22:43 | * | gokr quit (Client Quit) |
19:22:54 | * | gokr joined #nim |
19:23:18 | vikaton | Jehan_: http://www.reddit.com/r/nim/comments/37l1pd/dereferencing_null_pointers/ |
19:24:14 | Jehan_ | vikaton: That's the full address sanitizer. |
19:24:27 | Jehan_ | Which checks for a whole lot more stuff. |
19:24:51 | Jehan_ | Don't trust reddit to actually know anything. |
19:25:07 | * | vadim__ quit (Quit: Ex-Chat) |
19:25:53 | vikaton | Jehan_: so there is more of a performance hit? |
19:26:01 | Jehan_ | No. Less. |
19:26:05 | Jehan_ | Like, much less. |
19:26:42 | vikaton | O |
19:26:50 | Jehan_ | Like, the person you were talking to didn't have the slightest clue what they were saying. |
19:27:03 | vikaton | Should we enlighten him? |
19:27:19 | Jehan_ | No. This is reddit. |
19:27:36 | Arrrrr | Forget it vikaton, this is reddittown. |
19:27:49 | Jehan_ | Uninformed garbage is what reddit specializes in. |
19:28:27 | * | banister joined #nim |
19:28:30 | * | banister quit (Max SendQ exceeded) |
19:28:30 | vikaton | but many people use Reddit, we should at least correct him so no one else gets misinformed |
19:28:39 | vikaton | like I was |
19:29:01 | Jehan_ | Good luck with clearing out these Augean Stables. :) |
19:29:15 | vikaton | guess I personally should use nim forums |
19:29:24 | Jehan_ | The options that are relevant for Nim are -fsanitize=shift or -fsanitize=null. |
19:29:28 | vikaton | dom96: how is the email validation? |
19:29:29 | * | Jesin quit (Quit: Leaving) |
19:29:49 | vikaton | Jehan_: and that turns null derefencing to segfaults? |
19:29:50 | Jehan_ | -fsanitize=shift should not normally have any overhead, because practically all shifts are constant. |
19:29:59 | dom96 | vikaton: It's done. Just need to deploy it |
19:30:05 | Jehan_ | -fsanitize=null turns null dereferences into traps. |
19:30:05 | dom96 | vikaton: But first I want to implement another feature |
19:30:09 | * | johnsoft quit (Ping timeout: 240 seconds) |
19:30:13 | vikaton | dom96: what feature? |
19:30:14 | Jehan_ | Not necessarily segfaults. |
19:30:32 | vikaton | Jehan_: traps like Java? |
19:30:36 | Jehan_ | This will incur a slight overhead for pointer dereferences. |
19:30:37 | dom96 | vikaton: you'll see :P |
19:30:40 | Jehan_ | No, CPU traps. |
19:30:58 | * | johnsoft joined #nim |
19:30:59 | Jehan_ | Since the check can usually be hoisted out of loops and such, the overhead should be slight. |
19:31:06 | vikaton | I see |
19:31:10 | Jehan_ | Or you can compile with gcc and omit -fsanitize=null. |
19:32:11 | Jehan_ | In any event, there will be explicit nil checks in the future, so the problem goes away, anyway. |
19:33:21 | * | UberLambda joined #nim |
19:38:13 | vikaton | That's the last time im replying to him -.- http://www.quora.com/Is-Nim-really-that-unsafe/answer/Adam-Helps/comment/10801722?__snids__=1179835228&__nsrc__=2#comment10819818 |
19:39:05 | vikaton | Jehan_: explicit nil checks in future version of Nim by default? |
19:39:17 | Jehan_ | vikaton: Yes. |
19:39:40 | vikaton | That's cool, thanks for the information Jehan_ :) |
19:41:46 | * | dhasenan quit (Ping timeout: 276 seconds) |
19:42:59 | * | banister joined #nim |
19:45:05 | * | Arrrrr quit (Ping timeout: 256 seconds) |
19:48:15 | * | dhasenan joined #nim |
20:00:35 | * | Matthias247 joined #nim |
20:01:15 | * | dhasenan quit (Ping timeout: 276 seconds) |
20:05:39 | * | dhasenan joined #nim |
20:05:48 | * | jubalh joined #nim |
20:06:07 | * | intra quit (Ping timeout: 255 seconds) |
20:12:04 | * | kumool quit (Ping timeout: 264 seconds) |
20:18:04 | * | zaquest quit (Ping timeout: 264 seconds) |
20:18:26 | * | superfunc joined #nim |
20:19:38 | * | filwit joined #nim |
20:20:44 | * | dhasenan quit (Remote host closed the connection) |
20:21:00 | * | dhasenan joined #nim |
20:21:12 | ozra | Anyone have any benchmarks ready of 'no-null-checks' vs 'safe-null-checks' on in nim? What is the overhead? I'm guessing minimal? |
20:22:36 | * | superfunc quit (Ping timeout: 244 seconds) |
20:23:00 | ozra | I mean on a mixed code-base... |
20:23:51 | fowl | Mixed? |
20:27:15 | Jehan_ | ozra: I'd expect something like a few percent with -d:release. |
20:27:32 | Jehan_ | Assuming a reasonable amount of pointer-use. |
20:27:48 | Jehan_ | Nothing when there isn't, of course. |
20:28:21 | ozra | Yeah. Well, there was that quora dude, I read about above. I just replied. But, I changed it to not include numbers ;) |
20:32:23 | * | yglukhov quit (Quit: Be back later ...) |
20:32:42 | ozra | fowl: sorry, missed, I was finishing my comment. I meant source with a variety of constructs, not matrix calculations or virtual fn dispatch trees only scenarios.. |
20:34:43 | ozra | Jehan_: vikaton: I think "safety on" could be good default. _I_'d hate it, but don't find it hard to add my preferred release settings in a build file. I guess it's better to cater to 'please keep me safe from harm and programming, mama' folks by default. |
20:37:39 | Jehan_ | I just tested this: https://gist.github.com/rbehrends/aaf2def5a16bb7034bba |
20:38:12 | Jehan_ | Identical performance with and without -fsanitize=null, which is not surprising, because the branch prediction is pretty much guaranteed to succeed every time. |
20:38:57 | Jehan_ | And the volatile prevents the null check from being hoisted. |
20:40:04 | vikaton | Jehan_: someone replied to that person on reddit about what we said, the person replied back saying hes interested in seeing benchmarks |
20:40:14 | ozra | Can I "steal" this conclusion from you, attribution wise, for sake of argument in a follow up comment on quora? |
20:40:17 | vikaton | coincidentally |
20:40:31 | vikaton | ozra, the one with the Raffe guy? |
20:40:59 | ozra | Ah, right, Raafe. |
20:41:07 | ozra | vikaton: ^ |
20:41:13 | vikaton | I call him RaafeTheTroll |
20:41:29 | Jehan_ | Oops, forgot echo s, but it's still the same. |
20:41:38 | ozra | Hehe. I think I troll cornered him ;) |
20:42:12 | vikaton | ozra, yeah you should use that benchmark, corner him ! |
20:42:17 | vikaton | ofc if Jehan_ allows |
20:42:42 | vikaton | Jehan_: may I use that too? |
20:42:44 | Jehan_ | Please don't. Microbenchmarks aren't informative. |
20:42:47 | Jehan_ | Including this one. |
20:43:12 | vikaton | Jehan_: he is saying it isnt, if he doesnt accept it then that's his fault |
20:43:25 | Jehan_ | This is like dealing with a climate change denier by making an argument based on the earth being flat. |
20:43:30 | ozra | Did you try it compiling the compiler? Or just a tight pointer loop? |
20:44:12 | Jehan_ | ozra: I'd expect there to be a measurable performance impact for a larger codebase. |
20:44:23 | Jehan_ | Not huge, but something that can be measured. |
20:44:26 | ozra | Well, if someone says it reduce performance 2X, any bench saying its 0% degradation is at least punching whole in that argument at large.. |
20:45:01 | vikaton | ^ |
20:45:12 | ozra | Jehan_: if you have that testing grounds in front of you - could you test compiler bench? That would be representative somewhat.. |
20:45:26 | ozra | I mean compiling the compiler :) |
20:46:03 | Jehan_ | The guy is an idiot because he doesn't understand that the address sanitizer's overhead is due to (e.g.) handling buffer overflows without being able to access the length associated with a pointer directly. |
20:46:20 | Jehan_ | ozra: No, I've wasted enough time on this type of flat earther already. |
20:46:49 | ozra | haha. fair enough. I think my reply to him suffice. |
20:47:29 | vikaton | ozra, you replied to him? |
20:47:50 | dom96 | Jehan_: Please refrain from calling people stupid in this channel. |
20:48:58 | ozra | Ah, yes, well, I am interested in the truth you know. So I don't like seeing Nim bashed for no reason. |
20:49:32 | vikaton | same |
20:49:44 | ozra | Ok, Jehan_ : I will post a comment about the micro-bench anyhow, you don't need to think about it. |
20:51:41 | ozra | Even if we all know it's un informative in the real world - this is a different scenario - and it puts the numbers in to light, should anyone stumble upon that discussion. |
20:51:49 | ozra | (with micro-benches) |
20:52:00 | Jehan_ | ozra: Doesn't matter if it's Nim or not. I'm also not particularly found of people bashing Rust, or D, or whatever out of ignorance. There's way too much tribalism in the various language communities right now which hurts rather than helps development. |
20:52:08 | iznogoodd | i think all that is needed, is more presets in config, aka release-safe, release-speed... where release would be release-safe alias or something |
20:52:23 | ozra | Jehan_: exactly. All have their merits. |
20:52:37 | Jehan_ | People waste time dealing with internet arguments rather than dealing with genuine problems. |
20:52:53 | iznogoodd | that way its easier for newbies to get different presets witouth knowing all the flags etc |
20:53:19 | vikaton | if people bach any language based on opinions I'll ingore them |
20:53:32 | vikaton | but people who spread misinformation? |
20:53:44 | vikaton | I like that iznogoodd |
20:53:58 | Jehan_ | For example, this is an issue that has actual practical implications and that I'd like to see addressed: https://github.com/Araq/Nim/issues/2819 |
20:54:24 | Jehan_ | iznogoodd: You're preaching to the choir as far as I'm concerned. :) |
20:54:28 | tmku | vikaton: bach as in the composer? |
20:54:57 | vikaton | bash I mean hahah |
20:55:44 | dom96 | Jehan_: I agree with you. But insulting people will only make things worse. |
20:55:57 | dom96 | That is not something I want our community to be known for. |
20:56:13 | ozra | Ok. Don't worry I refrained from my swearing nature. I bashed bad arguments with kindness. |
20:56:46 | dom96 | Please remember that this channel is logged so it is trivial for people to quote what you have said. |
20:57:09 | vikaton | dom96: any news on deploy time? |
20:57:38 | dom96 | vikaton: I suppose I can deploy it now. |
20:57:45 | vikaton | :D |
20:57:53 | * | Arrrr joined #nim |
20:58:48 | Jehan_ | dom96: I understand that, but … I stopped when you asked, so I don't see the point in you reiterating it? |
20:59:00 | Jehan_ | Eh, whatever. |
20:59:01 | * | Jehan_ quit (Quit: Leaving) |
20:59:19 | ozra | For those who do care - I think this was rather helpful mostly?: http://www.quora.com/Is-Nim-really-that-unsafe/answer/Adam-Helps/comment/10821598?__snids__=1179987613&__nsrc__=2#comment10821666 |
20:59:39 | * | jubalh quit (Read error: Connection timed out) |
20:59:48 | ozra | (eh, my _follow up_ comments at least ;-) |
21:00:01 | * | jubalh joined #nim |
21:00:09 | vikaton | ozra, yes, but he will probably reply again and say "You sit on a throne of lies ! |
21:03:16 | ozra | vikaton: Haha, well that's my first _and_ last commenting there. The information needed _for other people seeing the conversation_ is only what I'm concerned about - not letting falsities be left un-met. I don't care about changing his opinions - couldn't give less shit about that. Everyone is entitled to their own - but they shouldn't have to be based on lies spread. |
21:03:34 | iznogoodd | imo, the best solution is to not waste our time with those critics (keep them in mind if they are valid), and fix what needs to be fixed before 1.0 |
21:04:22 | ozra | But all in all it led to one advancement: checks are now gonna be default in release. So, he did achieve something - gotta give him that ;) |
21:04:30 | dom96 | vikaton: It's deployed. |
21:04:34 | dom96 | Already found two bugs though lol |
21:04:44 | dom96 | (With password resets) |
21:04:59 | vikaton | cool |
21:06:00 | vikaton | yeah @ ozra :P |
21:06:14 | vikaton | is it just me |
21:06:27 | vikaton | or should the nav bar of nim-lang.org be capitalized? |
21:06:31 | * | thotypous quit (Ping timeout: 244 seconds) |
21:06:46 | * | jubalh quit (Quit: Leaving) |
21:07:24 | filwit | vikaton: i like the nave bar lower-case, personally |
21:07:28 | filwit | nav* |
21:07:54 | vikaton | I see |
21:07:55 | * | kumool joined #nim |
21:08:02 | ozra | (bike-shedding mode) I like it lower case too. |
21:08:35 | dom96 | vikaton: does it work? :P |
21:09:00 | vikaton | dom96: frankly, my trial for [email protected] ended for gmail :[ |
21:09:03 | vikaton | so I couldnt try it |
21:09:06 | * | vikaton cries |
21:09:32 | dom96 | omg |
21:09:39 | dom96 | So I deployed this for nothing? :p |
21:10:16 | * | TEttinger quit (Ping timeout: 252 seconds) |
21:10:21 | vikaton | no I will get i back s00n ! |
21:10:45 | vikaton | though, I need a more reliable way of getting name @mydomain.com :[ |
21:10:48 | vikaton | anyone know? |
21:11:50 | strcmp1 | whats the problem? |
21:11:54 | dom96 | I just redirect my email to my @gmail.com |
21:12:13 | dom96 | via namecheap |
21:12:26 | vikaton | I just want [email protected] |
21:12:36 | vikaton | but idk how to set up the @stackin.money part :[ |
21:12:56 | * | kumool quit (Ping timeout: 272 seconds) |
21:13:42 | fowl | vikaton: use google apps |
21:13:56 | vikaton | fowl, costs $$$ |
21:14:07 | fowl | It should be free forever for a limited acct, I think you get 10 email accts |
21:14:31 | strcmp1 | yeah google apps can be free its just hard to the link to sign up |
21:14:34 | strcmp1 | i use to have one, for free |
21:14:56 | iznogoodd | i use google apps |
21:15:00 | iznogoodd | for my domains |
21:15:05 | iznogoodd | easiest thing ever |
21:15:45 | iznogoodd | google apps was free until recently, it stays free forever for those who got it for free |
21:15:58 | iznogoodd | im happy about that =) |
21:16:16 | fowl | Oh the freeness is over? :( |
21:16:21 | iznogoodd | pretty sure yes |
21:16:35 | fowl | Vika |
21:16:43 | iznogoodd | there might be a way, but im not sure |
21:16:52 | fowl | vikaton: you still have a cooler domain than all of us |
21:16:53 | strcmp1 | oh thats why :)) |
21:17:03 | iznogoodd | no he doesnt |
21:17:06 | iznogoodd | i got hugedick.ca |
21:17:07 | iznogoodd | =) |
21:17:23 | iznogoodd | beat that |
21:17:25 | fowl | Mehh not quite hugedi.ck tho |
21:17:28 | * | filcuc joined #nim |
21:17:35 | vikaton | > Connection refused |
21:17:45 | iznogoodd | i need to use those new .sucks |
21:17:51 | fowl | vikaton: maybe you could sell email addresses :p |
21:17:52 | iznogoodd | nim.sucks |
21:17:54 | iznogoodd | dang |
21:18:15 | strcmp1 | ha |
21:18:19 | strcmp1 | it resolves, http://microsoft.sucks/ |
21:18:48 | Arrrr | Does it worth to use nim for android dev? |
21:20:15 | iznogoodd | ive never programmed on android, but i would try nim -> ndk + java gui |
21:20:39 | def- | Arrrr: depends on what you want to do. sdl2 games with android should work pretty well |
21:20:48 | * | UberLambda quit (Quit: Leaving) |
21:20:57 | vikaton | iznogoodd: isnt it best Nim -> JS ? |
21:21:11 | iznogoodd | lol js isnt native |
21:21:20 | iznogoodd | ndk is |
21:21:21 | Arrrr | Stuff that you would program with java in android, for example |
21:22:12 | iznogoodd | im pretty sure thats what QT does, compiles to ndk with a java top, but im pretty much clueless |
21:23:32 | fowl | iznogoodd: see yglukhov's work for compiling to android/iOS |
21:23:43 | * | dtscode_ joined #nim |
21:24:05 | * | dtscode_ quit (Client Quit) |
21:26:19 | * | dtscode is now known as charmander |
21:26:47 | * | charmander is now known as bulbasaur |
21:26:54 | * | bulbasaur is now known as squirtle |
21:27:58 | ozra | A shapeshifer! |
21:30:07 | Arrrr | A doppelganger |
21:31:19 | dom96 | yay, it looks like it works |
21:31:29 | squirtle | TM |
21:32:19 | iznogoodd | "As of December 6, 2012, Google stopped offering Free edition to new customers" |
21:32:25 | iznogoodd | https://support.google.com/a/answer/2855120?hl=en |
21:33:45 | iznogoodd | lol that stuff reminds me when gmail was beta, and needed a beta key to register, good times |
21:37:06 | * | ingsoc quit (Ping timeout: 265 seconds) |
21:43:31 | filwit | Arrrr: take a look at def's Nim NES emulator which runs on Android: https://github.com/def-/nimes |
21:45:10 | Arrrr | Seems like you cant scape from java https://github.com/def-/nimes/blob/master/android/src/org/libsdl/app/SDLActivity.java |
21:45:49 | * | jbomo joined #nim |
21:46:40 | def- | Arrrr: i didn't write that, that comes from SDL2, my blog has some instructions for how i did it, i didn't write a single line of non-nim code |
21:47:14 | Arrrr | Ah, thanks god. I'll read your blog entry then. |
21:54:11 | * | squirtle is now known as PaulMaudib |
21:56:50 | vikaton | dom96: good news I got [email protected] now :P |
21:57:33 | * | dom96 loves his email most of all |
21:57:59 | dom96 | because it's just my first name @ my last name.me :D |
21:58:36 | BlaXpirit | arguably better is [email protected] |
21:58:54 | vikaton | and it works :P |
21:59:03 | vikaton | also dom96, these are too hard :/ http://prntscr.com/7ajkxy |
21:59:52 | iznogoodd | vikaton: are you color blind or something? |
22:00:00 | filwit | i can read that fine.. |
22:00:02 | iznogoodd | 9+408 |
22:00:05 | iznogoodd | super easy |
22:00:19 | dom96 | vikaton: Are you a bot? |
22:00:21 | dom96 | :P |
22:00:23 | vikaton | im not color blind i just suck at math :[ |
22:00:35 | iznogoodd | calc.exe |
22:00:52 | vikaton | but thats cheating |
22:01:11 | BlaXpirit | btw colorblindness is really something to consider here |
22:01:12 | * | vendethiel quit (Ping timeout: 265 seconds) |
22:01:26 | vikaton | yeah was just thinking |
22:01:34 | BlaXpirit | FYI this is trivial for a bot and difficult for a human |
22:01:57 | BlaXpirit | well not trivial... easy to make, at least for people in this business |
22:02:10 | dom96 | BlaXpirit: The idea is that our captcha is uncommon |
22:02:18 | dom96 | so somebody would need to tailor it to our site |
22:02:20 | dom96 | which is unlikely |
22:02:59 | * | pregressive quit () |
22:03:51 | * | vendethiel joined #nim |
22:05:13 | * | pregressive joined #nim |
22:07:46 | * | superfunc joined #nim |
22:08:08 | * | dhasenan_ joined #nim |
22:08:11 | * | dhasenan_ quit (Read error: Connection reset by peer) |
22:12:25 | * | superfunc quit (Ping timeout: 258 seconds) |
22:15:00 | Araq | ozra: " checks are now gonna be default in release" ... er ... that's news to me |
22:15:17 | * | filcuc_ joined #nim |
22:15:34 | * | filcuc quit (Read error: Connection reset by peer) |
22:15:48 | federico3 | BlaXpirit: that's the point: the captcha let people in only if the give a wrong answer |
22:16:04 | ozra | Araq: Haha, ok. Someone said that, and unfortunately I took it at face value. Well, I didn't write that in any comment to that Quora dude. And I prefer the opposite. So no harm. Thanks for clearing up. |
22:16:21 | ozra | Or, I might just have misread something.. |
22:16:37 | Araq | I won't use my BDFL powers to fight it, but I will surely fight it. |
22:17:10 | Araq | the idea that people develop security critical stuff without knowing their compiler switches makes me cringe |
22:17:20 | vikaton | Araq, do you have a quora? :) |
22:17:30 | ozra | In that matter I'm quiet luke warm. I mean I will use explicit switches for everything anyway.. |
22:17:35 | PaulMaudib | I apparently have a quora and have no idea why |
22:17:38 | ozra | In a release build.. |
22:17:50 | vikaton | Also Jehan_ said that Nim will have more explicit Nil checks in the future @ ozra |
22:18:17 | Araq | yes, --nilChecks:on|off will be a thing |
22:18:27 | Araq | the compiler accepted this switch at one point btw |
22:18:29 | ozra | vikaton: maybe I misread something in those conversations then. Well. I'm fine either way :) |
22:18:37 | Araq | but it was never implemented so it got removed |
22:18:53 | * | OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…) |
22:18:57 | Araq | we don't need a shitstorm on the net to know about these problems. |
22:20:44 | Araq | and I'm the guy who advocates ptr array [ArbitraryNumber, T] over .unchecked arrays to get somewhat more protection... |
22:22:45 | strcmp1 | vikaton, i've been following that quora thread as you update it and link to it here, tbh i think you'd be better off not replying at all |
22:22:57 | strcmp1 | language wars are just wankery ;) |
22:23:01 | strcmp1 | not useful to anyone |
22:23:22 | vikaton | im not anymore |
22:23:26 | vikaton | done with his ignorance |
22:23:56 | dom96 | you guys are probably really annoying quora right about now. |
22:24:29 | vikaton | lol yeah ^ |
22:24:52 | federico3 | someone please mirror the forum into a mailing list :-/ |
22:25:08 | strcmp1 | hi federico3, are you back in dublin? |
22:25:11 | Araq | dom96: yeah. can we get that feature? |
22:25:42 | * | Matthias247 quit (Read error: Connection reset by peer) |
22:26:00 | dom96 | Araq: federico3: sure, create an issue on github for it. |
22:26:24 | Araq | will that help you to implement it faster? |
22:26:35 | Araq | :P |
22:26:49 | vikaton | wait so --nilChecks doesnt exist yet? |
22:27:40 | * | vendethiel quit (Ping timeout: 264 seconds) |
22:28:15 | federico3 | strcmp1: 3 more weeks - I'll be back on the 17th |
22:28:37 | vikaton | @ Araq |
22:28:56 | strcmp1 | federico3, cool - are you on the south or north side? |
22:29:02 | federico3 | dom96: on which github project |
22:29:19 | dom96 | federico3: nimforum |
22:30:26 | dom96 | good night guys |
22:30:33 | vikaton | it isnt |
22:30:40 | vikaton | hmm |
22:30:53 | gokr | This is so offtopic but... you guys HAVE to see Kung Fury: https://www.youtube.com/watch?v=bS5P_LAqiVg |
22:31:31 | vikaton | Araq, so --nilChecks will check for null pointers at compile time? |
22:31:42 | Araq | vikaton: no, at runtime. |
22:32:03 | vikaton | Araq: and what happens when one is found? |
22:32:25 | Araq | your mother is informed. |
22:33:50 | Araq | (a NilError is raised) |
22:34:28 | Araq | Which is like an IndexError btw. if you catch it, your program is implementation defined. |
22:34:56 | Araq | the spec is clear on that. |
22:35:13 | Arrrr | So, you cant ever return nil or how does it work |
22:35:23 | Araq | and that's remarkable because we don't have a spec. :P |
22:35:30 | * | JehanII quit (Ping timeout: 256 seconds) |
22:35:31 | vikaton | So when nilCheck is on, the Nilerror is nothing more than like an Index Error? |
22:35:59 | Araq | yes, you get a stacktrace or you don't and the program quits. |
22:36:16 | federico3 | #57 opened, dom96 |
22:37:08 | vikaton | Araq, nice, is nilChecks expensive? |
22:37:46 | Araq | jehan already answered that question. not very. |
22:38:11 | * | Demon_Fox joined #nim |
22:39:28 | * | filcuc_ quit (Quit: Konversation terminated!) |
22:40:18 | vikaton | Oh okay, frankly at this point I dont see the main difference between -fsanitize and nilChecks |
22:40:21 | vikaton | both are good anyway |
22:41:18 | vikaton | Why do I get the feeling |
22:41:26 | filwit | nil-checks can be disabled/enabled on specific portions of code (like disabling it around iterators you know won't hit it). |
22:41:32 | vikaton | that Raafe Qenda and http://www.reddit.com/user/poolseiden are the same people o.o |
22:41:37 | * | boop is now known as boopisaway |
22:41:50 | vikaton | filwit nice |
22:41:54 | Araq | vikaton: stop it please. not constructive. |
22:42:00 | vikaton | Ok, my b |
22:42:11 | vikaton | Wehn will --nilChecks be implemented? |
22:42:38 | Araq | when I have nothing better to do or somebody wants to learn about the C codegen. |
22:43:02 | Araq | it's a ~5 line patch for the C codegen. |
22:43:41 | Araq | that's the difference between using C directly and generating C. |
22:44:31 | filwit | those 5 lines are hard a shit to write when you don't know anything about the rest of the software you're attempting to modify.. and a language isn't a small project |
22:44:55 | filwit | that said.. nil-checks would probably be really straight forward |
22:45:43 | filwit | only problem I see is how to do it based on the pragma push/pop system... i'm not familiar with how info is available to the cgen |
22:47:11 | filwit | not trying to discourage anyone from writing it... |
22:47:27 | filwit | actually, i want to take a look at this ATM |
22:47:44 | Araq | the proc is called genDeref |
22:47:58 | filwit | k thanks |
22:47:59 | * | boopisaway is now known as boop |
22:48:24 | Araq | there are lots of other places that are affected |
22:48:47 | Araq | but when you do it genDeref you can declare the other missing places as "minor bugs" and move on |
22:49:21 | * | PaulMaudib is now known as dtscode |
22:50:42 | vikaton | is -fsanitize an argument or an option? |
22:50:49 | vikaton | cant find it in the compiler user guide |
22:51:03 | Araq | it's *clang* option. |
22:51:20 | Araq | and why do we still talk about this? |
22:51:44 | filwit | vikaton: command should look something like: nim c --cc:clang --passC:-sanitize app.nim |
22:51:59 | * | Trustable quit (Remote host closed the connection) |
22:52:06 | filwit | whoops, missed the 'f' there, you get the point |
22:52:13 | vikaton | mhm, thanks |
22:53:42 | Araq | vikaton: btw we also have a 'not nil' annotation in the language and the compiler tries to prove it's not nil at compile-time. Afaict it works rather well these days. |
22:53:58 | * | no_name quit (Remote host closed the connection) |
22:53:58 | * | devzerp quit (Remote host closed the connection) |
22:55:25 | * | vendethiel joined #nim |
22:56:17 | vikaton | Araq, nice, will look into it |
22:56:55 | Arrrr | Besides bug fixing, is it planned to introduce anything new for 1.0? |
22:57:17 | * | Jesin joined #nim |
23:00:13 | * | devzerp joined #nim |
23:00:13 | * | no_name joined #nim |
23:02:25 | Araq | Arrrr: I hacked "isolates" into the language but I don't know what its future is. |
23:03:34 | Arrrr | What does it do |
23:04:22 | Araq | one thing that will likely be in version 1 cause it's so easy to do is to have an option to turn the GC into a memory region allocator |
23:05:03 | Araq | var x {.isolated.}: Table[string, string] |
23:05:17 | filwit | i really with nimgrep was --ext:nim by default |
23:05:41 | filwit | not an issue at all though.. |
23:05:55 | vikaton | welp, time to finish up my school project with Nim |
23:06:00 | * | pregressive quit () |
23:06:12 | Araq | and then you can write and read from 'x' via ... hrm a 'remote' construct perhaps |
23:06:15 | filwit | wait.. is a memory region allocator similar to a copy-collector? |
23:06:22 | Araq | not sure about the name: |
23:06:30 | * | vikaton quit () |
23:06:40 | Araq | remote: x["key"] = "value" |
23:06:56 | * | vikaton joined #nim |
23:07:30 | Araq | filwit: not really, but both usually end up using a bump pointer allocator under the hood |
23:08:41 | filwit | 'bump pointer' is above my knowledge level about GCs.. so I'll leave you to your musings and get back to figuring out nil-checks |
23:09:45 | * | jbomo quit (Ping timeout: 240 seconds) |
23:14:56 | * | jbomo joined #nim |
23:15:53 | * | jbomo left #nim (#nim) |
23:16:02 | vikaton | Araq, so the not nil annotation checks for the value of the type so its not nil at compile time, but runtime values kind of "bypasses" the not nil annotation? |
23:16:24 | vikaton | in other words, not nil protects from programmer caused nil types which he formally set to not being nil? |
23:16:56 | Araq | vikaton: er ... no. I dont think you have the right idea here. |
23:17:11 | vikaton | dang flabbit :( |
23:18:16 | * | vendethiel quit (Ping timeout: 244 seconds) |
23:19:09 | vikaton | Araq, maybe this is better? not nil annotations will only check if the value of the type is nil at compile time, but not run-time correct? |
23:19:47 | Araq | vikaton: sorry, I'm too busy to explain it properly. |
23:20:07 | vikaton | Araq, No problem |
23:20:34 | * | kumul joined #nim |
23:22:13 | ozra | vikaton: (disclaimer: I'm a noob on Nim) basically nim will make static analysis flow checks on the code to ensure that the pointer can never be undefined. |
23:23:31 | vikaton | ozra, never? not even run-time variables can change it? |
23:24:29 | ozra | vikaton: I don't know how advanced, or rather: how strict, the check is. This is beyond my noob knowledge. Checked the man? |
23:24:36 | ozra | ..ual |
23:24:43 | vikaton | lol ^ |
23:25:02 | ozra | haha |
23:25:14 | vikaton | and yes |
23:25:17 | vikaton | >> The details of this analysis are still to be specified here. |
23:25:20 | vikaton | not complete yet |
23:26:03 | ozra | Aha, that's why I don't know then. So, wait for the man to tell it ;) |
23:29:59 | vikaton | I think this guy is purposely trolling |
23:30:13 | vikaton | whoops, wrong irc server :/ |
23:31:29 | ozra | vikaton: You should probably spend more time on your school project, and let the trolls sink them selves in the internet swamp ;) |
23:31:48 | vikaton | I just need to screen cast it |
23:33:37 | Arrrr | vikaton: you have to learn a lot, nim needs you |
23:34:18 | vikaton | tell me about it :[, I really like Nim though |
23:34:42 | * | vendethiel joined #nim |
23:34:47 | vikaton | is TObj == object in http://nim-lang.org/docs/manual.html#types-not-nil-annotation |
23:35:53 | Arrrr | probably |
23:36:07 | * | boop is now known as boopisaway |
23:36:31 | vikaton | if it is, then not nil is not doing what its supposed to in this example |
23:36:42 | vikaton | https://www.irccloud.com/pastebin/BMHIZvK3 |
23:36:47 | vikaton | I dont think |
23:38:05 | Arrrr | does it echo "not nil" ? |
23:39:09 | Arrrr | i got this: test.nim(9, 5) Warning: Cannot prove that 'x' is initialized. This will become a |
23:39:14 | Arrrr | compile time error in the future. [ProveInit] |
23:39:39 | vikaton | it echos not nil |
23:39:50 | Arrrr | Seems like, for now, it's just a friendly hint |
23:39:51 | vikaton | cant believe i forgot to mention that |
23:40:53 | * | kumool joined #nim |
23:41:09 | Arrrr | The warnning dissapears when var is initialized: var x: PObject = PObject() |
23:42:01 | vikaton | Arrrr: is the compile time error a mismatch then? |
23:42:37 | Arrrr | As the compiler says, it will be an error in the future. |
23:43:02 | Arrrr | A mismatch? why? |
23:43:30 | Arrrr | from my pov is the expected behaviour |
23:43:54 | vikaton | because if I do var x: PObject = nil gives me a type mismatch with proc p |
23:44:23 | * | kumul quit (Ping timeout: 246 seconds) |
23:44:53 | Arrrr | mm strange |
23:45:10 | Arrrr | in that case it is working as expected |
23:45:31 | Arrrr | Maybe, for some reason, it is harder to detect when you dont explicitly initialize it |
23:47:20 | * | superfunc joined #nim |
23:51:53 | * | kumool quit (Ping timeout: 265 seconds) |
23:51:59 | vikaton | yeah it ddoes |
23:55:52 | Arrrr | Time to sleep. vikaton make sure Arq is actually programming and not playing videogames. Good night |
23:55:55 | * | Arrrr quit (Quit: WeeChat 1.2) |
23:56:17 | vikaton | o ok |
23:56:20 | * | BlaXpirit quit (Quit: Quit Konversation) |
23:57:07 | * | vendethiel quit (Ping timeout: 272 seconds) |
23:57:44 | dtscode | Germans don't play videogames :p |
23:58:29 | * | kumool joined #nim |