<< 28-05-2015 >>

00:01:56ozraAny quick n dirty way to static link in libc, without using mussle etc.? Just, off the bat..
00:06:09gokrhttp://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:50vikatonwell 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:59vikatonany reason for that?
00:22:08vikatonhere's the code
00:22:12vikatonhttps://www.irccloud.com/pastebin/w8xZ6m2r
00:33:24dom96vikaton: I think github does paging.
00:33:34dom96you can't get all results at once
00:33:45vikatonbut that link shows all 522
00:34:27dom96doesn't for me
00:34:39vikatonreally?
00:34:49*gokr quit (Quit: Leaving.)
00:35:06vikatono wait
00:35:08vikatontrue
00:38:17flaviuvikaton, dom96: I'm getting a hundred matches without the ":443".
00:38:26flaviuBut more than 100 doesn't seem to be allowed.
00:38:59vikatonI see
00:39:26vikatonbecause of that, now Im not quite sure how my Crystal version works
00:39:48ozraI'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:35flaviuhttps://stackoverflow.com/questions/13187499/link-glibc-statically-but-some-other-library-dynamically-with-gcc ?
00:41:12ozraThanks. checks it out
00:41:28*Kingsquee joined #nim
00:44:19*gsingh93 joined #nim
00:44:29vikatonhow do I compare the differences between arrays in Nim
00:44:37vikatonIn Ruby I would use Array#-
00:44:55vikatonso, [12,3,4]-[12,2,4] would return 3
00:48:15flaviuvikaton: would it return 3, or [3]?
00:49:05vikatonflaviu: [3] my bad
00:51:36def-vikaton: you mean the difference of a set? echo({12,3,4} - {12,2,4})
00:52:13flaviuvikaton: https://gist.github.com/34d9636bce1581349c63
00:52:15def-(or the same with hashsets)
00:56:38vikatonthat Raafe Qenda guy is still trying to argue over Quora -.-
00:56:51*dtscode quit (Ping timeout: 256 seconds)
00:57:53vikatongod he is a real troll
00:58:10iznogooddozra: https://news.ycombinator.com/item?id=9611829
00:58:13iznogooddnginx ftw
00:58:18flaviuvikaton: Why stress out over it.
00:58:22flaviuJust ignore it.
00:58:39fowl^
00:58:45vikatonI get ticked from people spreading uninformed claims
00:58:48*kumul quit (Ping timeout: 252 seconds)
00:59:36flaviuvikaton: Buy a rubber duck and scream at it for a bit.
01:00:01vikatonim broke :(
01:00:02iznogooddor punch your screen and buy a new one
01:00:14vikatonthats even worse :(
01:00:48flaviuvikaton: Stop arguing on the internet and instead use it to apply for jobs.
01:01:05fowl^
01:01:10vikatonflaviu: Not of legal age yet
01:01:12iznogooddyeh, get a job at quora and ban him
01:04:47flaviuvikaton: Older than 15? You can work.
01:05:17vikatonhow can u be so sure im older than 15
01:07:33*vendethiel joined #nim
01:07:48ozraiznogoodd: ? github?
01:08:18iznogooddjust showin you examples of nginx for static files
01:08:30vikaton
01:09:26iznogooddtheir whole github pages setup was a single server
01:09:42ozraiznogoodd: ah, cool. I'll re-consider it if I do some upscale shit again :)
01:11:04vikatonflaviu: Im about to turn 16
01:11:05iznogooddvikaton: just work on a farm then =)
01:11:13vikatonI live in an urban area !
01:11:36iznogooddnot me ;)
01:12:00*johnsoft quit (Ping timeout: 256 seconds)
01:12:33*johnsoft joined #nim
01:12:41ozrahaha.
01:13:52ozrawell, I'm gonna hit bed "early" today. 'night folks! (or g'day, where ever you are)
01:14:11vikatonhmm
01:14:43vikatonSo the undefined behaviours of Nim are dereferencing null pointers and stack overflows
01:14:50vikatonis that it or is there some more?
01:15:26flaviuSigned integer overflow when --checks:off
01:15:50vikatonso those 3 undefined behaviours
01:16:01vikatonflaviu: which of those still exists when checks are on?
01:16:47flaviunull deref and stack overflow
01:17:46*banister quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:19:54vikatonhmm
01:21:37*huonw joined #nim
01:22:20vikatondereferencing null pointers are in almost all languages that have pointers
01:22:27vikatonC#,Java etc tec
01:22:41vikatonso why do people whine about Nim having it 0.o
01:23:06iznogooddcause its not rust
01:23:23flaviuvikaton: Because the optimizer can take advantage of it to produce unexpected code.
01:23:43fowlvikaton: 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:44vikatonwhat is this "unexpected code" ?
01:24:27vikatonfowl, what does "safe mode" do more than debug mode?
01:24:34flaviuiznogoodd: Lets refrain from ad hominem attacks
01:24:45fowlvikaton: I meant to say debug
01:24:59vikatono
01:30:17*vendethiel quit (Ping timeout: 256 seconds)
01:31:11*endragor joined #nim
01:39:50vikatonI just realized
01:40:01vikatonwe dont have a code of conduct
01:41:16*dtscode joined #nim
01:43:23flaviuvikaton: as long as you adhere to "don't be an ass", you'll be fine.
01:44:08vikatonflaviu: lol ok, back to my orginal question, what is that unexpected code?
01:47:43vikatonAlso 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:04flaviuvikaton: http://blog.llvm.org/2011/05/what-every-c-programmer-should-know_14.html
01:51:19flaviuAlso, see https://github.com/regehr/ub-canaries/tree/blog-post/addr-null
01:53:59vikatonflaviu: and Nim tries to output safe C code that gcc or clang may not screw up?
01:54:28dtscodeyes
01:55:10*kumul joined #nim
01:55:21vikatonI see
01:55:26vikatonp cool stuff
01:56:20dtscodeVery
01:56:24*endragor joined #nim
01:56:45flaviuKeep 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:10vikatonany news on Nim and raspberry pi?
02:38:21*Siecje left #nim (#nim)
02:38:47flaviuI see no reason why it should work
02:38:51flaviu*shouldn't
02:39:08vikatonI see
02:39:45flaviuAlso, http://buildbot.nim-lang.org/waterfall
02:41:41vikatoncool
02:45:24onionhammerNim works fine on rbpi
02:45:39onionhammerI've used it in the past
02:46:35vikatonNice
02:52:32vikatonjust 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:52jrenner1is it possible to change the value of a "field" in an object?
03:16:06jrenner1i.e. I have Vector3 type, I want to do v.x = <some float>
03:16:30filwitshort of a macro with varargs[string,`$`], how can I pass varargs to another proc? eg: https://gist.github.com/PhilipWitte/4fc66ae3df44dc664ae4
03:16:50filwitjrenner1: yes that's easy
03:17:22filwitjrenner1: not sure exactly what you mean, actually. But it sounds easy anyways.
03:17:34fowlfilwit: the only answer, syntactically
03:17:48jrenner1filwit: I think I messed up by passing an immutable object
03:17:48filwitfowl: that doesn't help me
03:18:06fowlfilwit: use a macro
03:18:08filwitjrenner1: okay, i see
03:18:33fowlfilwit: there is no base type expr that exists at runtime
03:18:46filwitfowl: so there's no way short of a macro? A built-in macro would be nice for this type of thing.
03:19:28filwitfowl: 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:22filwitcompile-time construct**
03:27:20*Demon_Fox joined #nim
03:28:46fowlfilwit: you need a macro to do the unpacking
03:32:55filwitfowl: pfft.. i always forget this.. how to turn a varargs[expr] into a array in a macro? just use varargs[string,$]?
03:33:12filwiti'm using this somewhere already.. should just look it up
03:34:17fowlfilwit: you have to escape the operator
03:34:27fowl`$`
03:35:08fowlOh I'm not sure what that would do if you use it on a macro
03:35:57filwityeah the problem is that the param comes through as a NimNode and there's no .arrayVal in macros..
03:36:12filwitneed to look up my code, pretty sure I figured this out already before
03:36:57fowlfilwit: echo dumptree code. Or code.dumptree.echo
03:37:10fowlChildren() to iterate its children nodes
03:38:41filwitright, of course
03:39:09fowlI 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:00Varriountdom96, 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:31avsejmaybe implement recaptcha for first post? https://developers.google.com/recaptcha/docs/start
05:45:08Varriountavsej: I'm guessing that it's more likely to be human spammers.
05:46:11avsejwhy do they think that auditory of such forum is a good target for selling goods? :)
05:46:51Varriountavsej: 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:18Varriountavsej: 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:47avsejmaybe moderation of first post will help?
05:49:01Varriountavsej: That's what I was thinking.
05:49:04*superfunc joined #nim
05:49:19avsejsuch practice works for protecting mail lists
05:49:30VarriountIt'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:06QuoraI have the worst nickname
05:58:40VarriountQuora: Huh? I don't recall discussing any questions today...
06:00:12Quoranot you
06:07:43VarriountQuora: Tell me, does your username pre-date the website?
06:08:59Quorano
06:09:04QuoraI didn't know it existed
06:09:05Quoralol
06:11:46*GOOOBLES quit (Ping timeout: 246 seconds)
06:13:45VarriountQuora: You could change your nick to Quorum
06:15:56*onionhammer joined #nim
06:18:24*zaquest quit (Quit: Leaving)
06:34:37filwitVarriount, avsej: it's probably about Google rankings, or so I've been told
06:35:18*zombiedtscode is now known as dtscode
06:35:23filwitthey'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:46wuehlmaushi, 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:30wuehlmausthat said i have a problem with nimble
08:44:56wuehlmausDownloading package list from https://github.com/nim-lang/packages/raw/master/packages.json
08:44:59wuehlmausError: unhandled exception: 404 Not Found [HttpRequestError]
08:45:15dtscodenimble gives you that?
08:45:16wuehlmausi am using arch linux
08:45:18sepisoadhow to know a remote socket is closed?
08:45:19wuehlmausyes
08:45:40dtscodesepisoad: When it tells you
08:45:50dtscodewuehlmaus: What nimble version?
08:45:57sepisoadhow?
08:46:07wuehlmausnimble v0.6.0 compiled at 2015-01-03 19:05:48
08:46:13dtscoderead the docs for whatever socket lib you're using sepisoad
08:46:32dtscodewuehlmaus: What happens when you do nimble update?
08:46:42wuehlmausthat's what happens :(
08:47:31wuehlmaussorry i wanted to paste "nimble update". this line was missing
08:47:40wuehlmausbut that's when i get the error
08:47:48dtscodeWould you mind pasting all of the output to a pastebin?
08:48:09wuehlmausthat's all, i cannot paste anymore
08:48:22dtscodeOdd
08:48:39dtscodeThe only thing I can think of is that it points to an invalid url
08:48:41dtscodeOne second
08:48:47fowlwuehlmaus: can you nimble install nimble@#head
08:49:20fowlOr if that doesn't work install nimble from github
08:49:26wuehlmausError: unhandled exception: /home/maddi/.nimble/packages.json(1, 0) Error: { expected [JsonParsingError]
08:49:45wuehlmausfowl: yes, i can try that
08:49:59dtscodewuehlmaus: Do you still have the source for your nimble?
08:50:08*banister joined #nim
08:51:16wuehlmausthat works :)
08:51:26wuehlmauswonderful, thank you
08:51:45wuehlmausi used the arch package
08:51:57wuehlmausbut in archlinux there is AUR and it has nimble-git
08:52:11wuehlmausand that throws no error
08:58:45sepisoadi cannot find anything on the doc
08:59:31sepisoadthe 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:59sepisoadrecvLine() will return the last buffered data even if the remore socket is closed
09:23:21sepisoadi 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:00sepisoadi 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:00sepisoad. why is it so?
10:05:14pigmejsepisoad: there is no way to detect if remote socket is closed on client side
10:05:18pigmejthat's by definition
10:05:43sepisoadso how usually people work around this issue?
10:05:54pigmejit's not issue
10:06:01pigmej that's how sockets are working
10:06:44pigmejto be sure if other side closed socket, you have to read/write something to it
10:06:47pigmejthen you can be sure
10:07:41pigmejbut I'm talking about sockets in general, not about nim implementatino
10:08:14pigmejbut 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:08sepisoadthat is what I just found
10:09:35pigmejand thats normal
10:09:36sepisoadthat sounds a little bit crazy, but it seems to be the way
10:17:41kashyap_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:20kashyap_for ABC etc, I can use ord directly .... how do I handle the escape chars?
10:19:25kashyap_I'd like to reuse escape char understanding that compiler already has
10:21:22kashyap_anybody
10:21:24kashyap_?
10:27:23def-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:55kashyap_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:28kashyap_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:46kashyap_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:40def-I'm not sure I even understand. Why can't you use ord on '\t'?
10:33:58kashyap_the input comes from another file in form of "ABC\t"
10:36:21kashyap_This is my program - http://lpaste.net/133491
10:38:20kashyap_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:30def-yes
10:38:48*Jehan_ joined #nim
10:38:52kashyap_ok ... for a moment I thought I was just overthinking it :)
10:39:36*Arrrrr joined #nim
10:42:06def-but I don't see a nice way to do this
10:42:13kashyap_:(
10:43:12def-you wouldn't want a nim vm in your kernel just to parse \t
10:43:20kashyap_some kind of eval function perhaps :)
10:43:35LoneTechso you want something like Python's somestring.decode('string_escape')?
10:44:06gokrkashyap_: How about nicking the string literal lexer code from the compiler?
10:44:40*vadim__ joined #nim
10:45:20kashyap_yeah LoneTech :) gokr ... sure, would you know off hand which function to use?
10:45:23gokrhttps://github.com/Araq/Nim/blob/devel/compiler/lexer.nim#L554
10:45:38gokrJust a wild guess ;)
10:46:15kashyap_gokr ... oh, you mean, plug out the code from lexer.nim ?
10:46:19gokryeah
10:46:28gokrGood old fashion copy paste
10:46:33gokrAnd adapt :)
10:47:09kashyap_:)
10:47:23fowlYou 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:07LoneTechhttp://nim-lang.org/docs/strutils.html#unescape,string,string,string might not process \a, \t, \r \n etc encodings
10:50:35LoneTechnope, it doesn't
10:52:07kashyap_fowl ... in the if block, I'd need to handle various char essentially ... LoneTech - it seems to work for \n and \t
10:54:07LoneTechescape 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:05kashyap_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:36kashyap_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:24vikatonIs the undefined behavior caused by the compiler taking advantage of optimizing the null pointer dereferencing ?
11:38:54fowl What undefined behavior
11:39:38vikatonthe undefined behavior caused by dereferencing null pointers
11:41:09fowlHow is that undefined
11:41:14fowlYou get a segfault
11:43:46*zulmin quit (Ping timeout: 252 seconds)
11:45:54*zulmin joined #nim
11:47:49vikatonhmm
11:49:35*Arrrr joined #nim
11:51:10vikatonfowl, so Nim wouldnt produce/execute unexpected code on null pointer deref, but just crash and segfault?
11:52:21kashyap_Don't octal literals work any more?
11:53:01kashyap_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:31Jehan_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:00Jehan_vikaton: It can produce undefined behavior, but you can configure the compiler to avoid that.
12:24:49fowlHow?
12:24:55Jehan_--passC:-fsanitize=null is the quickest way to do that clang; gcc should not exhibit the problematic behavior in its default configuration.
12:27:20Jehan_fowl: proc main = (var a: ref int; echo a[]); main()
12:27:32Jehan_Prints 0 for me with clang and -d:release
12:27:51fowlJehan_: what if it comes from a function that returns nil
12:28:08Jehan_fowl: what do you mean?
12:28:08fowlIs it still optimized out
12:28:25Jehan_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:32dom96Jehan_: What are your thoughts about this? Is it a serious problem in Nim? Can we (or should we) fix it?
12:30:07Jehan_dom96: It's going to be fixed. Araq already said there'll be a nilchecks option.
12:30:24dom96great
12:30:43Jehan_As far as correctness is concerned, it's a minor problem.
12:31:16Jehan_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:58Jehan_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:29Jehan_In reality, it's not. It helps, but the biggest problems lie elsewhere.
12:34:02Jehan_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:18Jehan_Shift widths should be checked separately, but that's cheap.
12:35:51Jehan_The real interesting correctness issues, anyway, lie with things that are not easy to guarantee.
12:36:17Jehan_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:35dom96That's good to hear.
12:36:46Jehan_Or pretty much anything revolving around cache behavior.
12:37:22fowlJehan_: do you know of a language that let's you do that
12:37:36Jehan_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:52fowl(Arbitrary constraints like seq is sorted)
12:38:21Jehan_fowl: Eiffel, Ada, D. Sort of, i.e. at runtime. SPARK has actual support for formal verification.
12:38:34Arrrrcobra i think
12:38:48Jehan_Runtime support is tricky when predicates become expensive.
12:38:53Arrrrhttp://cobra-language.com/
12:39:12Jehan_E.g. checking predicates that require O(n) time for a constant time operation.
12:39:37Jehan_You can add pre- and postconditions to Nim with fairly little effort (I'm using them, in fact).
12:40:03Jehan_The only thing that this doesn't quite handle is subtyping.
12:40:22Jehan_But still helps a lot. It's easy because they're basically assertions that follow a specific discipline.
12:41:42Jehan_For formal verification, see also Larch and Z. That's a lot of work, though.
12:42:20Jehan_Formal verification is powerful, but ... basically, you get diminishing returns compared to writing good tests combined with a good informal specification.
12:43:05Jehan_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:30Jehan_See e.g. some of the stuff that's being done in Racket w.r.t. contracts.
12:48:39vikatongokr, are you adding this to the unsafety part?
12:49:01gokrJehan_: 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:26gokrvikaton: I just copied it :) Did you start writing that part?
12:49:42vikatonNo I was just wondering :P
12:50:15gokrI 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:43vikatonyeah i agree
12:51:21*endragor quit (Read error: Connection reset by peer)
12:51:22Jehan_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:53Jehan_I.e. haven't done any actual programming in it.
12:51:54gokrI 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:10gokrKinda like Forth + Lisp + Self.
12:52:43gokrThe rebirth of it is this: http://www.red-lang.org
12:52:54Jehan_gokr: The problem is that there are way too many interesting languages out there. :)
12:52:59gokryup
12:53:36gokrThis 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:16gokrJehan_: One interesting part with Red is that it compiles all the way down to machine code all on its own.
13:04:10gokrI compiled the silly fib and... ok, it was "only" 1/3 the speed of Nim -d:release but the binary was 5kb :)
13:04:51Jehan_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:42wuehlmausi 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:25wuehlmausand nim is so fast and short, i bet on it now ;)
13:46:18wuehlmausone question, i saw that i can leave of braces in nim quite often. what is the rule when invoking procs?
13:46:46wuehlmaussorry for a stupid beginners question
13:48:11*BitPuffin joined #nim
13:52:15LoneTechwuehlmaus: it's slightly complicated. http://nim-lang.org/docs/manual.html#procedures documents it, you're probably referring to command invocation syntax
13:52:55gokrwuehlmaus: Rebol2/3 seems... less interesting given that they are "basic" interpreters in C.
13:53:10gokrwuehlmaus: I have a toy idea mulling though.
13:55:24vikatongokr, need any help with the FAQ?
13:56:25wuehlmausLoneTech: 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:51Xaseronis it possible to spawn threads in parallel region aquivalent to the number of cores?
14:34:43vikatonNOt too far from 2,000 stars
14:36:42*Arrrr quit (Quit: WeeChat 1.2)
14:37:13*Arrrr joined #nim
14:42:18vikatonSent an email to the people at tutorialspoint to change Nimrod to Nim in there compile online program
14:42:51ArrrrGood move
14:43:02*strcmp1 joined #nim
14:43:06vikatonand 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:28coffeepothi 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:36coffeepotfrom 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:37coffeepotis 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:37coffeepotthis 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:23coffeepotthe 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:43coffeepotsorry my gist wasn't very clear, this might be better: https://gist.github.com/coffeepots/42733039da57f4f487d6
15:01:35*Jehan_ joined #nim
15:03:31Jehan_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:11coffeepotok, fair enough :) I thought it might be unintended. At least it's easily worked around for now
15:06:11Jehan_Here's how the semantics *should* work: http://nim-lang.org/docs/manual.html#generics-symbol-lookup-in-generics
15:08:44coffeepotJehan_ thanks for that, quite interesting. Mixin is something new for me :)
15:09:19Jehan_Normally, mixin vs. bind is inferred by overloading, but sometimes it can be necessary to be explicit.
15:09:50Jehan_Mixin basically says that this symbol is something that needs to be resolved specifically for each instance of the type parameter.
15:09:53coffeepotI love how much control Nim gives to use when defining such abstract things as generics
15:11:46Jehan_Actually, I think we could use a bit more control, but that's in the works.
15:11:51Jehan_Well, at least some of it.
15:12:02Jehan_I'd still like to see parameterized modules.
15:13:24Jehan_Something like: https://bitbucket.org/behrends/nimmetamod
15:13:49vikatonwow
15:13:56vikaton169 ppl
15:14:42Jehan_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:43ozraJehan_: Parameterized modules? Cool!
15:18:47Jehan_ozra: I'd love to see them, but even assuming we'll get them, it won't be before 1.0.
15:19:14coffeepotJehan_ that is absolutely mad (in a good way)! :)
15:19:23coffeepotreally cool
15:20:40coffeepotShall I attempt a bug report for this generic issue I encountered?
15:23:56*vendethiel joined #nim
15:24:10vikaton170 ppl
15:24:17vikatonmore than usual 4shore
15:24:19Jehan_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:31gmpreussner|workJehan_: what problem does that solve that concepts can't do?
15:25:44coffeepotok I'm making an issue for it, can I do code colouring in my issue?
15:25:57Jehan_gmpreussner|work: What problem does what solve?
15:26:07gmpreussner|workparameterized modules
15:26:25gmpreussner|workis it just a more condensed syntax to do the same thing?
15:26:35coffeepotcode colouring: worked it out :D
15:27:19Jehan_gmpreussner|work: Concepts are constraints on type parameters for types and procedures/templates.
15:27:32Jehan_But I'm talking about parameterizing modules instead of types and procedures.
15:28:07gmpreussner|workbut don't you end up just parameterizing types as well?
15:28:21Jehan_Including parameterizing modules by other modules.
15:29:17*darkf quit (Quit: Leaving)
15:29:25gmpreussner|workwell, i'm looking at the example, and i can't quite see the value yet :)
15:29:34Jehan_gmpreussner|work: In principle, it's more powerful, but also more cumbersome to use (since there's no clear ad-hoc syntax).
15:30:37Jehan_Simple example: You can't parameterize variables.
15:40:42*yglukhov quit (Ping timeout: 246 seconds)
15:42:18pkoreticwin close
15:42:25pkoreticsorry :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:11CryptoToadwhat's the proper way to handle a string containing null characters?
16:27:08fowlDefine handle
16:27:13Jehan_CryptoToad: What's your problem?
16:27:23CryptoToadi want to convert it to hex, it's a memory dump from a process
16:27:29Jehan_Normally, strings should work just fine with null characters.
16:27:29CryptoToadi'm pretty sure my issue is null termination
16:27:32CryptoToadahh ok
16:27:38CryptoToadmay be something else then
16:29:33Jehan_CryptoToad: This works for me: https://gist.github.com/rbehrends/125144ec409d3020c63c
16:30:01CryptoToadthanks, I'll give that a shot.
16:30:09*vendethiel quit (Ping timeout: 240 seconds)
16:35:12CryptoToadGot it working, it was null termination
16:35:15CryptoToadthanks
16:35:32ozracoffeepot: 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:30Jehan_It's really frustrating. Bitbucket does support Nim, except for snippets. So I'm still stuck with using GitHub for Nim gists.
16:43:54strcmp1Jehan_, 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:22Jehan_strcmp1: No idea, I just see that highlighting for Nim sourcefiles works, but not for snippets.
16:44:56strcmp1alright
16:45:26*superfunc quit (Ping timeout: 258 seconds)
16:47:49fowlJehan_, i use it in the wiki on bitbucket in ```nim
16:48:40Jehan_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:48ArrrrIt'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:57BlaXpiritsome language has a switch statement that does thi
17:38:10fowlArrrr, why cant you
17:38:17ArrrrrIt is possible?
17:38:44fowlthe signature is contains(openarray[proc(x:int):bool], int)
17:38:50fowli dont know what you want to do with it though
17:39:07BlaXpiriti assume wants to check if any of predicates are true
17:39:12ArrrrrExactly
17:39:22ArrrrrRather than: let result = a.testA or a.testB or a.testC
17:39:50BlaXpiritwell 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:59BlaXpiritany([test_a, test_b, test_c].map_it(it(a), bool))
17:41:06BlaXpiritexcept `any` doesn't exist
17:43:01*banister joined #nim
17:43:20def-Arrrrr: looks fine: https://gist.github.com/def-/0faee1f7e857c602b251
17:44:21BlaXpirithax alert
17:44:47Arrrrris 'in' an alias for contains?
17:44:50BlaXpirityes
17:45:05def-well, in some contexts
17:45:07ArrrrrThis changes everything
17:45:21def-"for x in foo" calls items, "for x, y in foo" calls pairs
17:45:26BlaXpiritplease don't actually use this.
17:46:20*banister quit (Client Quit)
17:47:31def-BlaXpirit: I added a more functional version
17:47:33def-[testA, testB, testC].mapIt(bool, it(a)).foldl(a or b)
17:49:08BlaXpiritproc any(c) =
17:49:14BlaXpiritc.foldl(a or b)
17:50:59def-right
17:51:14fowlFor..in is the construct
17:51:33*kumul joined #nim
17:52:03BlaXpiritactually, that is a suboptimal `any`
17:54:07def-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:15ArrrrrHow many issues will get solved for 1.0 ?
18:12:35*shodan45 joined #nim
18:12:43strcmp1Arrrrr, all of them!
18:15:23ArrrrrI 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:19BlaXpiritok that lib is basically a toy
18:26:40BlaXpiritit could maybe work in the simplest of cases
18:26:57BlaXpiritwoops, 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:13vikatonAraq, 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:22OnOwhat 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:31Jehan_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:18vikatonJehan_: http://www.reddit.com/r/nim/comments/37l1pd/dereferencing_null_pointers/
19:24:14Jehan_vikaton: That's the full address sanitizer.
19:24:27Jehan_Which checks for a whole lot more stuff.
19:24:51Jehan_Don't trust reddit to actually know anything.
19:25:07*vadim__ quit (Quit: Ex-Chat)
19:25:53vikatonJehan_: so there is more of a performance hit?
19:26:01Jehan_No. Less.
19:26:05Jehan_Like, much less.
19:26:42vikatonO
19:26:50Jehan_Like, the person you were talking to didn't have the slightest clue what they were saying.
19:27:03vikatonShould we enlighten him?
19:27:19Jehan_No. This is reddit.
19:27:36ArrrrrForget it vikaton, this is reddittown.
19:27:49Jehan_Uninformed garbage is what reddit specializes in.
19:28:27*banister joined #nim
19:28:30*banister quit (Max SendQ exceeded)
19:28:30vikatonbut many people use Reddit, we should at least correct him so no one else gets misinformed
19:28:39vikatonlike I was
19:29:01Jehan_Good luck with clearing out these Augean Stables. :)
19:29:15vikatonguess I personally should use nim forums
19:29:24Jehan_The options that are relevant for Nim are -fsanitize=shift or -fsanitize=null.
19:29:28vikatondom96: how is the email validation?
19:29:29*Jesin quit (Quit: Leaving)
19:29:49vikatonJehan_: and that turns null derefencing to segfaults?
19:29:50Jehan_-fsanitize=shift should not normally have any overhead, because practically all shifts are constant.
19:29:59dom96vikaton: It's done. Just need to deploy it
19:30:05Jehan_-fsanitize=null turns null dereferences into traps.
19:30:05dom96vikaton: But first I want to implement another feature
19:30:09*johnsoft quit (Ping timeout: 240 seconds)
19:30:13vikatondom96: what feature?
19:30:14Jehan_Not necessarily segfaults.
19:30:32vikatonJehan_: traps like Java?
19:30:36Jehan_This will incur a slight overhead for pointer dereferences.
19:30:37dom96vikaton: you'll see :P
19:30:40Jehan_No, CPU traps.
19:30:58*johnsoft joined #nim
19:30:59Jehan_Since the check can usually be hoisted out of loops and such, the overhead should be slight.
19:31:06vikatonI see
19:31:10Jehan_Or you can compile with gcc and omit -fsanitize=null.
19:32:11Jehan_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:13vikatonThat'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:05vikatonJehan_: explicit nil checks in future version of Nim by default?
19:39:17Jehan_vikaton: Yes.
19:39:40vikatonThat'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:12ozraAnyone 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:00ozraI mean on a mixed code-base...
20:23:51fowlMixed?
20:27:15Jehan_ozra: I'd expect something like a few percent with -d:release.
20:27:32Jehan_Assuming a reasonable amount of pointer-use.
20:27:48Jehan_Nothing when there isn't, of course.
20:28:21ozraYeah. 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:42ozrafowl: 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:43ozraJehan_: 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:39Jehan_I just tested this: https://gist.github.com/rbehrends/aaf2def5a16bb7034bba
20:38:12Jehan_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:57Jehan_And the volatile prevents the null check from being hoisted.
20:40:04vikatonJehan_: someone replied to that person on reddit about what we said, the person replied back saying hes interested in seeing benchmarks
20:40:14ozraCan I "steal" this conclusion from you, attribution wise, for sake of argument in a follow up comment on quora?
20:40:17vikatoncoincidentally
20:40:31vikatonozra, the one with the Raffe guy?
20:40:59ozraAh, right, Raafe.
20:41:07ozravikaton: ^
20:41:13vikatonI call him RaafeTheTroll
20:41:29Jehan_Oops, forgot echo s, but it's still the same.
20:41:38ozraHehe. I think I troll cornered him ;)
20:42:12vikatonozra, yeah you should use that benchmark, corner him !
20:42:17vikatonofc if Jehan_ allows
20:42:42vikatonJehan_: may I use that too?
20:42:44Jehan_Please don't. Microbenchmarks aren't informative.
20:42:47Jehan_Including this one.
20:43:12vikatonJehan_: he is saying it isnt, if he doesnt accept it then that's his fault
20:43:25Jehan_This is like dealing with a climate change denier by making an argument based on the earth being flat.
20:43:30ozraDid you try it compiling the compiler? Or just a tight pointer loop?
20:44:12Jehan_ozra: I'd expect there to be a measurable performance impact for a larger codebase.
20:44:23Jehan_Not huge, but something that can be measured.
20:44:26ozraWell, 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:01vikaton^
20:45:12ozraJehan_: if you have that testing grounds in front of you - could you test compiler bench? That would be representative somewhat..
20:45:26ozraI mean compiling the compiler :)
20:46:03Jehan_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:20Jehan_ozra: No, I've wasted enough time on this type of flat earther already.
20:46:49ozrahaha. fair enough. I think my reply to him suffice.
20:47:29vikatonozra, you replied to him?
20:47:50dom96Jehan_: Please refrain from calling people stupid in this channel.
20:48:58ozraAh, yes, well, I am interested in the truth you know. So I don't like seeing Nim bashed for no reason.
20:49:32vikatonsame
20:49:44ozraOk, Jehan_ : I will post a comment about the micro-bench anyhow, you don't need to think about it.
20:51:41ozraEven 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:49ozra(with micro-benches)
20:52:00Jehan_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:08iznogooddi 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:23ozraJehan_: exactly. All have their merits.
20:52:37Jehan_People waste time dealing with internet arguments rather than dealing with genuine problems.
20:52:53iznogooddthat way its easier for newbies to get different presets witouth knowing all the flags etc
20:53:19vikatonif people bach any language based on opinions I'll ingore them
20:53:32vikatonbut people who spread misinformation?
20:53:44vikatonI like that iznogoodd
20:53:58Jehan_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:24Jehan_iznogoodd: You're preaching to the choir as far as I'm concerned. :)
20:54:28tmkuvikaton: bach as in the composer?
20:54:57vikatonbash I mean hahah
20:55:44dom96Jehan_: I agree with you. But insulting people will only make things worse.
20:55:57dom96That is not something I want our community to be known for.
20:56:13ozraOk. Don't worry I refrained from my swearing nature. I bashed bad arguments with kindness.
20:56:46dom96Please remember that this channel is logged so it is trivial for people to quote what you have said.
20:57:09vikatondom96: any news on deploy time?
20:57:38dom96vikaton: I suppose I can deploy it now.
20:57:45vikaton:D
20:57:53*Arrrr joined #nim
20:58:48Jehan_dom96: I understand that, but … I stopped when you asked, so I don't see the point in you reiterating it?
20:59:00Jehan_Eh, whatever.
20:59:01*Jehan_ quit (Quit: Leaving)
20:59:19ozraFor 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:48ozra(eh, my _follow up_ comments at least ;-)
21:00:01*jubalh joined #nim
21:00:09vikatonozra, yes, but he will probably reply again and say "You sit on a throne of lies !
21:03:16ozravikaton: 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:34iznogooddimo, 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:22ozraBut 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:30dom96vikaton: It's deployed.
21:04:34dom96Already found two bugs though lol
21:04:44dom96(With password resets)
21:04:59vikatoncool
21:06:00vikatonyeah @ ozra :P
21:06:14vikatonis it just me
21:06:27vikatonor 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:24filwitvikaton: i like the nave bar lower-case, personally
21:07:28filwitnav*
21:07:54vikatonI see
21:07:55*kumool joined #nim
21:08:02ozra(bike-shedding mode) I like it lower case too.
21:08:35dom96vikaton: does it work? :P
21:09:00vikatondom96: frankly, my trial for [email protected] ended for gmail :[
21:09:03vikatonso I couldnt try it
21:09:06*vikaton cries
21:09:32dom96omg
21:09:39dom96So I deployed this for nothing? :p
21:10:16*TEttinger quit (Ping timeout: 252 seconds)
21:10:21vikatonno I will get i back s00n !
21:10:45vikatonthough, I need a more reliable way of getting name @mydomain.com :[
21:10:48vikatonanyone know?
21:11:50strcmp1whats the problem?
21:11:54dom96I just redirect my email to my @gmail.com
21:12:13dom96via namecheap
21:12:26vikatonI just want [email protected]
21:12:36vikatonbut idk how to set up the @stackin.money part :[
21:12:56*kumool quit (Ping timeout: 272 seconds)
21:13:42fowlvikaton: use google apps
21:13:56vikatonfowl, costs $$$
21:14:07fowlIt should be free forever for a limited acct, I think you get 10 email accts
21:14:31strcmp1yeah google apps can be free its just hard to the link to sign up
21:14:34strcmp1i use to have one, for free
21:14:56iznogooddi use google apps
21:15:00iznogooddfor my domains
21:15:05iznogooddeasiest thing ever
21:15:45iznogooddgoogle apps was free until recently, it stays free forever for those who got it for free
21:15:58iznogooddim happy about that =)
21:16:16fowlOh the freeness is over? :(
21:16:21iznogooddpretty sure yes
21:16:35fowlVika
21:16:43iznogooddthere might be a way, but im not sure
21:16:52fowlvikaton: you still have a cooler domain than all of us
21:16:53strcmp1oh thats why :))
21:17:03iznogooddno he doesnt
21:17:06iznogooddi got hugedick.ca
21:17:07iznogoodd=)
21:17:23iznogooddbeat that
21:17:25fowlMehh not quite hugedi.ck tho
21:17:28*filcuc joined #nim
21:17:35vikaton> Connection refused
21:17:45iznogooddi need to use those new .sucks
21:17:51fowlvikaton: maybe you could sell email addresses :p
21:17:52iznogooddnim.sucks
21:17:54iznogoodddang
21:18:15strcmp1ha
21:18:19strcmp1it resolves, http://microsoft.sucks/
21:18:48ArrrrDoes it worth to use nim for android dev?
21:20:15iznogooddive never programmed on android, but i would try nim -> ndk + java gui
21:20:39def-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:57vikatoniznogoodd: isnt it best Nim -> JS ?
21:21:11iznogooddlol js isnt native
21:21:20iznogooddndk is
21:21:21ArrrrStuff that you would program with java in android, for example
21:22:12iznogooddim pretty sure thats what QT does, compiles to ndk with a java top, but im pretty much clueless
21:23:32fowliznogoodd: 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:58ozraA shapeshifer!
21:30:07ArrrrA doppelganger
21:31:19dom96yay, it looks like it works
21:31:29squirtleTM
21:32:19iznogoodd"As of December 6, 2012, Google stopped offering Free edition to new customers"
21:32:25iznogooddhttps://support.google.com/a/answer/2855120?hl=en
21:33:45iznogooddlol 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:31filwitArrrr: take a look at def's Nim NES emulator which runs on Android: https://github.com/def-/nimes
21:45:10ArrrrSeems 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:40def-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:14ArrrrAh, thanks god. I'll read your blog entry then.
21:54:11*squirtle is now known as PaulMaudib
21:56:50vikatondom96: good news I got [email protected] now :P
21:57:33*dom96 loves his email most of all
21:57:59dom96because it's just my first name @ my last name.me :D
21:58:36BlaXpiritarguably better is [email protected]
21:58:54vikatonand it works :P
21:59:03vikatonalso dom96, these are too hard :/ http://prntscr.com/7ajkxy
21:59:52iznogooddvikaton: are you color blind or something?
22:00:00filwiti can read that fine..
22:00:02iznogoodd9+408
22:00:05iznogooddsuper easy
22:00:19dom96vikaton: Are you a bot?
22:00:21dom96:P
22:00:23vikatonim not color blind i just suck at math :[
22:00:35iznogooddcalc.exe
22:00:52vikatonbut thats cheating
22:01:11BlaXpiritbtw colorblindness is really something to consider here
22:01:12*vendethiel quit (Ping timeout: 265 seconds)
22:01:26vikatonyeah was just thinking
22:01:34BlaXpiritFYI this is trivial for a bot and difficult for a human
22:01:57BlaXpiritwell not trivial... easy to make, at least for people in this business
22:02:10dom96BlaXpirit: The idea is that our captcha is uncommon
22:02:18dom96so somebody would need to tailor it to our site
22:02:20dom96which 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:00Araqozra: " 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:48federico3BlaXpirit: that's the point: the captcha let people in only if the give a wrong answer
22:16:04ozraAraq: 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:21ozraOr, I might just have misread something..
22:16:37AraqI won't use my BDFL powers to fight it, but I will surely fight it.
22:17:10Araqthe idea that people develop security critical stuff without knowing their compiler switches makes me cringe
22:17:20vikatonAraq, do you have a quora? :)
22:17:30ozraIn that matter I'm quiet luke warm. I mean I will use explicit switches for everything anyway..
22:17:35PaulMaudibI apparently have a quora and have no idea why
22:17:38ozraIn a release build..
22:17:50vikatonAlso Jehan_ said that Nim will have more explicit Nil checks in the future @ ozra
22:18:17Araqyes, --nilChecks:on|off will be a thing
22:18:27Araqthe compiler accepted this switch at one point btw
22:18:29ozravikaton: maybe I misread something in those conversations then. Well. I'm fine either way :)
22:18:37Araqbut it was never implemented so it got removed
22:18:53*OnO quit (Quit: My iMac has gone to sleep. ZZZzzz…)
22:18:57Araqwe don't need a shitstorm on the net to know about these problems.
22:20:44Araqand I'm the guy who advocates ptr array [ArbitraryNumber, T] over .unchecked arrays to get somewhat more protection...
22:22:45strcmp1vikaton, 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:57strcmp1language wars are just wankery ;)
22:23:01strcmp1not useful to anyone
22:23:22vikatonim not anymore
22:23:26vikatondone with his ignorance
22:23:56dom96you guys are probably really annoying quora right about now.
22:24:29vikatonlol yeah ^
22:24:52federico3someone please mirror the forum into a mailing list :-/
22:25:08strcmp1hi federico3, are you back in dublin?
22:25:11Araqdom96: yeah. can we get that feature?
22:25:42*Matthias247 quit (Read error: Connection reset by peer)
22:26:00dom96Araq: federico3: sure, create an issue on github for it.
22:26:24Araqwill that help you to implement it faster?
22:26:35Araq:P
22:26:49vikatonwait so --nilChecks doesnt exist yet?
22:27:40*vendethiel quit (Ping timeout: 264 seconds)
22:28:15federico3strcmp1: 3 more weeks - I'll be back on the 17th
22:28:37vikaton@ Araq
22:28:56strcmp1federico3, cool - are you on the south or north side?
22:29:02federico3dom96: on which github project
22:29:19dom96federico3: nimforum
22:30:26dom96good night guys
22:30:33vikatonit isnt
22:30:40vikatonhmm
22:30:53gokrThis is so offtopic but... you guys HAVE to see Kung Fury: https://www.youtube.com/watch?v=bS5P_LAqiVg
22:31:31vikatonAraq, so --nilChecks will check for null pointers at compile time?
22:31:42Araqvikaton: no, at runtime.
22:32:03vikatonAraq: and what happens when one is found?
22:32:25Araqyour mother is informed.
22:33:50Araq(a NilError is raised)
22:34:28AraqWhich is like an IndexError btw. if you catch it, your program is implementation defined.
22:34:56Araqthe spec is clear on that.
22:35:13ArrrrSo, you cant ever return nil or how does it work
22:35:23Araqand that's remarkable because we don't have a spec. :P
22:35:30*JehanII quit (Ping timeout: 256 seconds)
22:35:31vikatonSo when nilCheck is on, the Nilerror is nothing more than like an Index Error?
22:35:59Araqyes, you get a stacktrace or you don't and the program quits.
22:36:16federico3#57 opened, dom96
22:37:08vikatonAraq, nice, is nilChecks expensive?
22:37:46Araqjehan already answered that question. not very.
22:38:11*Demon_Fox joined #nim
22:39:28*filcuc_ quit (Quit: Konversation terminated!)
22:40:18vikatonOh okay, frankly at this point I dont see the main difference between -fsanitize and nilChecks
22:40:21vikatonboth are good anyway
22:41:18vikatonWhy do I get the feeling
22:41:26filwitnil-checks can be disabled/enabled on specific portions of code (like disabling it around iterators you know won't hit it).
22:41:32vikatonthat 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:50vikatonfilwit nice
22:41:54Araqvikaton: stop it please. not constructive.
22:42:00vikatonOk, my b
22:42:11vikatonWehn will --nilChecks be implemented?
22:42:38Araqwhen I have nothing better to do or somebody wants to learn about the C codegen.
22:43:02Araqit's a ~5 line patch for the C codegen.
22:43:41Araqthat's the difference between using C directly and generating C.
22:44:31filwitthose 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:55filwitthat said.. nil-checks would probably be really straight forward
22:45:43filwitonly 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:11filwitnot trying to discourage anyone from writing it...
22:47:27filwitactually, i want to take a look at this ATM
22:47:44Araqthe proc is called genDeref
22:47:58filwitk thanks
22:47:59*boopisaway is now known as boop
22:48:24Araqthere are lots of other places that are affected
22:48:47Araqbut 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:42vikatonis -fsanitize an argument or an option?
22:50:49vikatoncant find it in the compiler user guide
22:51:03Araqit's *clang* option.
22:51:20Araqand why do we still talk about this?
22:51:44filwitvikaton: 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:06filwitwhoops, missed the 'f' there, you get the point
22:52:13vikatonmhm, thanks
22:53:42Araqvikaton: 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:17vikatonAraq, nice, will look into it
22:56:55ArrrrBesides 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:25AraqArrrr: I hacked "isolates" into the language but I don't know what its future is.
23:03:34ArrrrWhat does it do
23:04:22Araqone 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:03Araqvar x {.isolated.}: Table[string, string]
23:05:17filwiti really with nimgrep was --ext:nim by default
23:05:41filwitnot an issue at all though..
23:05:55vikatonwelp, time to finish up my school project with Nim
23:06:00*pregressive quit ()
23:06:12Araqand then you can write and read from 'x' via ... hrm a 'remote' construct perhaps
23:06:15filwitwait.. is a memory region allocator similar to a copy-collector?
23:06:22Araqnot sure about the name:
23:06:30*vikaton quit ()
23:06:40Araqremote: x["key"] = "value"
23:06:56*vikaton joined #nim
23:07:30Araqfilwit: not really, but both usually end up using a bump pointer allocator under the hood
23:08:41filwit'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:02vikatonAraq, 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:24vikatonin other words, not nil protects from programmer caused nil types which he formally set to not being nil?
23:16:56Araqvikaton: er ... no. I dont think you have the right idea here.
23:17:11vikatondang flabbit :(
23:18:16*vendethiel quit (Ping timeout: 244 seconds)
23:19:09vikatonAraq, 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:47Araqvikaton: sorry, I'm too busy to explain it properly.
23:20:07vikatonAraq, No problem
23:20:34*kumul joined #nim
23:22:13ozravikaton: (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:31vikatonozra, never? not even run-time variables can change it?
23:24:29ozravikaton: I don't know how advanced, or rather: how strict, the check is. This is beyond my noob knowledge. Checked the man?
23:24:36ozra..ual
23:24:43vikatonlol ^
23:25:02ozrahaha
23:25:14vikatonand yes
23:25:17vikaton>> The details of this analysis are still to be specified here.
23:25:20vikatonnot complete yet
23:26:03ozraAha, that's why I don't know then. So, wait for the man to tell it ;)
23:29:59vikatonI think this guy is purposely trolling
23:30:13vikatonwhoops, wrong irc server :/
23:31:29ozravikaton: You should probably spend more time on your school project, and let the trolls sink them selves in the internet swamp ;)
23:31:48vikatonI just need to screen cast it
23:33:37Arrrrvikaton: you have to learn a lot, nim needs you
23:34:18vikatontell me about it :[, I really like Nim though
23:34:42*vendethiel joined #nim
23:34:47vikatonis TObj == object in http://nim-lang.org/docs/manual.html#types-not-nil-annotation
23:35:53Arrrrprobably
23:36:07*boop is now known as boopisaway
23:36:31vikatonif it is, then not nil is not doing what its supposed to in this example
23:36:42vikatonhttps://www.irccloud.com/pastebin/BMHIZvK3
23:36:47vikatonI dont think
23:38:05Arrrrdoes it echo "not nil" ?
23:39:09Arrrri got this: test.nim(9, 5) Warning: Cannot prove that 'x' is initialized. This will become a
23:39:14Arrrr compile time error in the future. [ProveInit]
23:39:39vikatonit echos not nil
23:39:50ArrrrSeems like, for now, it's just a friendly hint
23:39:51vikatoncant believe i forgot to mention that
23:40:53*kumool joined #nim
23:41:09ArrrrThe warnning dissapears when var is initialized: var x: PObject = PObject()
23:42:01vikatonArrrr: is the compile time error a mismatch then?
23:42:37ArrrrAs the compiler says, it will be an error in the future.
23:43:02ArrrrA mismatch? why?
23:43:30Arrrrfrom my pov is the expected behaviour
23:43:54vikatonbecause 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:53Arrrrmm strange
23:45:10Arrrrin that case it is working as expected
23:45:31ArrrrMaybe, 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:59vikatonyeah it ddoes
23:55:52ArrrrTime 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:17vikatono ok
23:56:20*BlaXpirit quit (Quit: Quit Konversation)
23:57:07*vendethiel quit (Ping timeout: 272 seconds)
23:57:44dtscodeGermans don't play videogames :p
23:58:29*kumool joined #nim