<< 23-11-2017 >>

00:00:04AraqI think the creators of ML weren't aware that 'fun' is already an english word
00:00:11FromGitter<mratsim> I think I’m in for a whole new batch of bugs: ⏎ with generic destroy on newruntime ⏎ ⏎ ```code paste, see link``` ⏎ ... [https://gitter.im/nim-lang/Nim?at=5a160f8bba39a53f1ad34d45]
00:00:36noonienML=matlab?
00:01:10FromGitter<mratsim> Ocaml, etc
00:01:13*mr_yogurt joined #nim
00:02:08vivusnoonien: and become absolutely unusable when the language itself becomes a barrier to usage
00:02:43noonieninteresting
00:04:52noonienbtw, hello guys
00:05:13noonieni'm pretty new to Nim, and have never really written anything
00:05:41noonieni was thinking of using it for some hobby embedded projects
00:05:55vivusnoonien: feel free to jump right in. Nim is quite Pythonic (in many situations)
00:06:04noonieni mostly chose it because the build system doesn't appear to be a mess, and the language seems rather decent on first glance
00:06:40FromGitter<mratsim> Oh and @Araq `=move` and `=sink` takes precedence over assignment operator even if overloaded right?
00:07:10noonieni don't like python as much as I used to
00:07:22noonienhowever, i'm really enjoying go for a few years now
00:07:32FromGitter<mratsim> Welcome noonien :). Hope you'll like it there.
00:07:42noonienand i've discovered a library to that enables go-like interfaces in Nim, which is awesome!
00:08:01Araqmratsim: no, firstly there is no '=move'
00:08:27Araqsecondly '=sink' is called if possible, read my blog post
00:09:14FromGitter<mratsim> You should post it on the forum, so many people request interfaces there is a specific wiki entry for it. It's like the Graal for some.
00:09:55FromGitter<mratsim> Yes I read the blog post several times already, it was in an overloading context
00:11:44noonien@mratsim: the forum is where I found it: https://forum.nim-lang.org/t/2422
00:11:59noonienhere it is on github: https://github.com/andreaferretti/interfaced
00:12:28FromGitter<mratsim> Oh right
00:16:24federico3any hint on https://travis-ci.org/nim-lang/Nim/jobs/301687323 ? I can't replicate it
00:16:50Araqmratsim: what is an overloading context?
00:17:26FromGitter<mratsim> I overload `=`
00:18:07FromGitter<mratsim> The blog post says "The key insight here is that assignments are resolved into several distinct semantics that do "the right thing". Containers should thus be written to leverage the builtin assignment!"
00:18:23FromGitter<mratsim> Note the built-in.
00:23:38Araqwell that's badly phrased
00:23:54Araqhere builtin assignment means "="
00:28:32FromGitter<mratsim> Cool :)
00:29:44*mr_yogurt quit (Ping timeout: 260 seconds)
00:32:26*mr_yogurt joined #nim
00:33:27mr_yogurtWhat's the convention for writing docstrings in nim?
00:37:05Araq## doc string?
00:39:26mr_yogurtAraq: is there a convention for docstring layout beyond that?
00:40:26Araqwell the repo is full of stdlib modules that practice the conventions
00:45:14Araqthere are two ways to write docs, one is to assume that the user of your library cannot program in Nim and hardly can write down his own name. The other is to assume there is no need to write out the types in prosa.
00:46:37Araqoption A is less common but if you don't do it your "attitude" is bad.
00:46:49Araqboy, this never gets old XD
00:48:29nooniendoes nim have compile-time "defines"?
00:48:50noonienhmm, actually, nvm
00:51:33Araqwhen declared(x)
00:51:37Araqwhen defined(y)
00:59:29noonienthe difference between macros and templates it that in macros you have to return a nim AST and in templates you just write the code that's "replaces" the template call?
01:03:31*Jesin joined #nim
01:15:00Araqyes
01:15:15noonienawesome, thanks!
01:22:40*voidspacexyz joined #nim
01:28:39*mr_yogurt quit (Ping timeout: 260 seconds)
01:33:41*mr_yogurt joined #nim
01:41:53*Jesin quit (Quit: Leaving)
01:45:36*Jesin joined #nim
01:51:57*vlad1777d quit (Ping timeout: 240 seconds)
02:00:08noonienhow
02:00:17noonienhow can i set the extern pragma on variables?
02:08:25Araqvar v {.extern.}: int
02:10:08noonien```var vectorTable* {.extern "vector_table".}: ptr VectorTable``` seems to result in: vector.nim(19, 20) Error: string literal expected
02:12:57*chemist69 quit (Ping timeout: 246 seconds)
02:19:14Araqvar vectorTable* {.extern: "vector_table".}: ptr VectorTable
02:19:41noonienuuh, awesome!
02:21:12Araqok, 'not nil' is in a good shape now
02:21:31Araqone feature less we have to mark as .experimental
02:21:50Araqgood night
02:24:04nooniengood night
02:24:49*voidspace_xyz joined #nim
02:25:15*vivus quit (Quit: Leaving)
02:25:19*rbrt quit (Quit: Slán agat)
02:25:30*chemist69 joined #nim
02:26:39*voidspacexyz quit (Ping timeout: 248 seconds)
02:29:54*mr_yogurt quit (Ping timeout: 260 seconds)
02:41:04*MJCaley joined #nim
02:43:57*marenz quit (Ping timeout: 240 seconds)
02:59:03*arecaceae quit (Remote host closed the connection)
02:59:21*arecaceae joined #nim
03:13:21*skrylar joined #nim
03:21:27*endragor quit (Ping timeout: 260 seconds)
03:24:49*MJCaley quit (Quit: MJCaley)
03:28:51FromGitter<Varriount> Hm. Is there any standard on where to log to in *nix if you can't open the configuration file that contains the path to log to?
03:31:46*skrylar quit (Remote host closed the connection)
03:31:59*skrylar joined #nim
03:37:49*endragor joined #nim
03:42:27*dddddd quit (Remote host closed the connection)
03:46:57*voidspace_xyz quit (Ping timeout: 250 seconds)
03:55:22*yglukhov joined #nim
03:58:19*yglukhov quit (Remote host closed the connection)
03:58:52*yglukhov joined #nim
04:03:01*yglukhov quit (Ping timeout: 240 seconds)
04:43:39*sz0 quit (Quit: Connection closed for inactivity)
05:00:49*yglukhov joined #nim
05:01:45*xkapastel quit (Quit: Connection closed for inactivity)
05:05:17*yglukhov quit (Ping timeout: 260 seconds)
05:11:00*voidspacexyz joined #nim
05:11:18*voidspacexyz quit (Remote host closed the connection)
05:11:45*voidspacexyz joined #nim
05:17:33*voidspacexyz quit (Read error: Connection reset by peer)
05:21:25*yglukhov joined #nim
05:25:21*yglukhov quit (Ping timeout: 240 seconds)
05:27:08*mr_yogurt joined #nim
05:28:25mr_yogurtis there a way to get the contents of a module in AST form? (perhaps with include?)
05:34:57*SenasOzys quit (Ping timeout: 248 seconds)
05:40:56skrylarmr_yogurt, theres a parsestmt and staticread
05:43:12mr_yogurtskrylar: can you point me at the documentation for those? i can't find it
05:45:53mr_yogurtnvm, found it
05:46:27*SenasOzys joined #nim
05:50:24*JappleAck joined #nim
06:02:41*yglukhov joined #nim
06:07:06*yglukhov quit (Ping timeout: 258 seconds)
06:15:56*miran joined #nim
06:36:58*nsf joined #nim
06:38:07*yglukhov joined #nim
06:45:24*mr_yogurt quit (Ping timeout: 260 seconds)
07:22:01*miran quit (Ping timeout: 240 seconds)
07:42:49*xet7 quit (Quit: Leaving)
07:47:40*SenasOzys quit (Remote host closed the connection)
07:48:12*SenasOzys joined #nim
07:48:55*xet7 joined #nim
07:51:53*Arrrr joined #nim
07:51:53*Arrrr quit (Changing host)
07:51:53*Arrrr joined #nim
07:52:22*yglukhov quit (Remote host closed the connection)
08:02:15FromGitter<mratsim> You can use getAST to get result of proc in AST form as well @mr_yogurt
08:03:24FromGitter<mratsim> Well more correctly it embedded the AST of the proc/temllate/macro in the macro.
08:04:01FromGitter<mratsim> Don't forget to use treerepr to understand how Nim AST is represented
08:04:09FromGitter<Varriount> mr_yogurt: I'll try to fix the console output fot Nimlime a bit tomorrow and over the weekend.
08:04:48FromGitter<Varriount> I don't know how much time I'll have - finals are coming up and I have several projects that need to be completed. Bleh
08:08:52skrylari tried that earlier, mratsim. i just got an error
08:08:58skrylarusing it to get the ast from a template
08:09:04skrylarit wouldn't take parametric templates
08:13:20*yglukhov joined #nim
08:17:27*yglukhov quit (Ping timeout: 240 seconds)
08:22:40FromGitter<mratsim> ah, maybe result `quote` do would then
08:23:41*Vladar joined #nim
08:25:40*claudiuinberlin joined #nim
08:26:39*skrylar quit (Ping timeout: 248 seconds)
08:31:02FromGitter<alehander42> ```dumpTree: ⏎ # example ⏎ if e > 2: ⏎ s.x``` ⏎ ⏎ is also useful if you want to check how the ast looks for something [https://gitter.im/nim-lang/Nim?at=5a168746540c78242d3b4cc7]
08:33:55*yglukhov joined #nim
08:38:09*yglukhov quit (Ping timeout: 250 seconds)
08:39:34*floppydh joined #nim
08:51:44*sendell joined #nim
09:10:06*Lord_Nightmare2 joined #nim
09:11:56*Lord_Nightmare quit (Ping timeout: 268 seconds)
09:11:58*Lord_Nightmare2 is now known as Lord_Nightmare
09:16:31*Serenitor joined #nim
09:18:54*SenasOzys quit (Ping timeout: 246 seconds)
09:31:12*SenasOzys joined #nim
10:08:03*marenz joined #nim
10:17:06*yglukhov joined #nim
10:20:34*couven92 joined #nim
10:21:01*yglukhov quit (Ping timeout: 240 seconds)
10:29:53*endragor quit (Ping timeout: 248 seconds)
10:31:33*endragor joined #nim
10:36:33cremOh no, it's again that time of the year when I buy lots of steam games and never start them..
10:37:42*yglukhov joined #nim
10:37:49cremHad < 10 hours of playtime this year.
10:42:09*yglukhov quit (Ping timeout: 248 seconds)
10:48:03couven92crem, maybe programming in Nim is just as much fun?! :P
10:49:43cremIt is indeed more fun. Not necessary nim, programming in general. Except web frontend programming.
10:49:59couven92yeah, I feel you! Same here :)
10:51:39*gangstacat joined #nim
11:23:17*PMunch joined #nim
11:24:44*PMunch quit (Remote host closed the connection)
11:24:56*PMunch joined #nim
11:28:38couven92Hmm... I am writing an environment variable differ for vccexe. Should I add a diff proc to strtabs? What do people think?
12:11:35*kobi7 joined #nim
12:12:10kobi7hi guys, is the admin for the nim forum by any chance here?
12:14:32Araqkobi7, here
12:15:01*dddddd joined #nim
12:19:21couven92Araq, https://github.com/nim-lang/Nim/pull/6301 is now ready (unicode-PR), but we have a non-related test in vm/tcomponent failing? https://ci.appveyor.com/project/Araq/nim/build/2394/tests
12:20:00couven92> request to generate code for .compileTime proc: initTable
12:20:01Araqcouven92, rebase
12:20:06couven92Ah, okay
12:22:24*PMunch quit (Read error: Connection reset by peer)
12:22:27*PMunch_ joined #nim
12:40:08*kobi7 quit (Remote host closed the connection)
12:57:25*chemist69 quit (Quit: WeeChat 1.9.1)
12:58:25*SenasOzys quit (Remote host closed the connection)
12:58:55*chemist69 joined #nim
13:07:52*Elronnd quit (Ping timeout: 276 seconds)
13:11:52*Elronnd joined #nim
13:17:03couven92Araq, now I get failures in closure/tflatmaps and macros/tnimnode_for_runtime instead: https://ci.appveyor.com/project/dom96/nim/build/1042/tests
13:17:34couven92after i merged origin/devel I mean
13:17:57Araqah the old whack a mole game
13:18:07Araq-.-
13:20:16couven92it's not my fault, right? As far as I can tell none of these tests does anything with unicode
13:26:07Araqof course not
13:38:06Araqcouven92, hope this fixes it
14:08:33*Serenitor quit (Ping timeout: 268 seconds)
14:23:33couven92Araq, looks like it did, thanks... AppVeyor is still queued, but TravisCI was happy...
14:26:50*JappleAck quit (Quit: Leaving)
14:45:42*MJCaley joined #nim
14:56:22*gmpreussner quit (Read error: Connection reset by peer)
14:57:13*sz0 joined #nim
14:58:05*gmpreussner joined #nim
14:58:15*nsf quit (Quit: WeeChat 1.9.1)
15:08:32*riberoni joined #nim
15:10:40riberoniHello, I'm starting to learn Nim, and I'm looking into reading a binary file structure into memory properly. For this, I'm using tuples, with the proper types assigned to each element. I'm looking to answer a few questions. How do I properly read a file structure into memory? I know I can just fread() a file into a proper struct in C. Is this also possible in Nim?
15:11:37FromGitter<andreaferretti> you may want to have a look at https://github.com/andreaferretti/spills
15:11:51FromGitter<andreaferretti> It is a small library I made exactly for this task
15:13:01riberoniThe file is small enough to fit into memory, and I need quick access to it.
15:13:07riberoniMy goal was optimizing a python program.
15:16:26riberoniI'm not sure this spills thing is what I should be using to interpret binary data from a file stream, and store it in memory, really.
15:16:43FromGitter<andreaferretti> Well, it is just an option
15:16:52FromGitter<andreaferretti> It maps a file into memory
15:17:07FromGitter<andreaferretti> and treats it as a contiguous chunk of structs
15:17:59FromGitter<andreaferretti> you can do the same using just the stdlib memory mapping module
15:18:56FromGitter<andreaferretti> you get a pointer and you cast it to a MyStruct or an array of MyStruct
15:18:59FromGitter<andreaferretti> done
15:19:11riberoniOoh, that sounds like what I want.
15:19:21FromGitter<andreaferretti> it is what spills does :-)
15:20:10*enthus1ast joined #nim
15:20:40enthus1asthey is somebody doing #GitHubGameOff ?
15:20:48FromGitter<andreaferretti> have a look at https://nim-lang.org/docs/memfiles.html
15:22:23enthus1astthere are still 8 days left :)
15:22:52riberoniRight, I never knew posix supported mapping files to memory. I've always just read the appropriate amount of bytes into a struct and interpreted from there, allocating memory as required.
15:23:48riberoniThis looks pretty great aside from the fact this file contains 0-terminated strings of variable sizes I need to skip over at times.
15:28:52riberoniIs there any example of memfiles usage I can look at to judge it's usability in this case better?
15:34:43Araqriberoni: the compiler's "symbol files" feature uses memfiles but I doubt it makes for a good example
15:35:20Araqit's used in a stream-like fashion, nothing is mapped directly into an array of objects or such
15:35:56riberoniAh.
15:35:57GitDisc<treeform> Can some one help me with the type system around arrays[N, char], I think the N is special some how or I don't get some thing? https://forum.nim-lang.org/t/3363
15:39:39Araqtreeform, you're looking for 'static[int]'
15:39:59Araqtype PackedString[N: static[int]] = array[N, char]
15:40:13Araqwhich should be renamed I think...
15:40:20FromGitter<andreaferretti> @riberoni of course there is an example - read the source of spills :-)
15:40:55GitDisc<treeform> interesting let me test
15:42:15GitDisc<treeform> nice yeah that works 100%, thanks!
15:49:01FromGitter<mratsim> @treeform if you have issues with static you should look into the old linalg library from andrea.
16:02:37*floppydh quit (Quit: WeeChat 1.9.1)
16:09:10couven92Araq, okay the unicode PR https://github.com/nim-lang/Nim/pull/6301 is now ready for review and merging
16:09:17couven92all tests ran green
16:09:19riberoniCan I convert an array of char to string?
16:10:14couven92riberoni, `toSeq(myMagicString.items)`
16:10:40couven92ah, wait... char-array to string, ehrm...
16:14:19couven92riberoni, https://play.nim-lang.org/?gist=c15f1a550264196d3ab2d0e8d8d0826f
16:14:58riberoniah, thanks!
16:15:27*nsf joined #nim
16:18:14riberoniApparently, if properly 0-terminated, the `$` operator can also be used.
16:19:53FromGitter<mratsim> string(yourarray) should work since string are just `distinct seq[char]`
16:23:18*xkapastel joined #nim
16:25:13*couven92 quit (Quit: Client disconnecting)
16:28:43riberoniIs it possible to declare anonymous tuples through the indentation syntax?
16:29:20riberoniAs in, "var thing = tuple[x: int, y: int]" but with that nice syntax.
16:30:22Araqvar thing = (x: 3, y: 8)
16:30:35Araqtypes are not values but there is no problem
16:32:13riberoniI mean, something like what you can do with the `type` keyword: https://play.nim-lang.org/?gist=749cdf60aa7f6c517914a90878d9d7d3
16:32:49Arrrrwhy
16:32:55riberoniDunno, just wondering.
16:44:48Araqthat's not supported even if you use ':' instead of '='
16:45:11Araq(seriously, get this into your head please)
16:45:33Araq(types are not values, type aliases are completely different from giving a variable a type)
16:46:02riberoniSorry, yes, I meant to use ':'
16:49:04federico3t
16:56:55*Trustable joined #nim
16:59:45*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
17:03:30*rauss quit (Read error: Connection reset by peer)
17:04:47*rauss joined #nim
17:05:24Arrrrmaybe with macros ...
17:08:36*miran joined #nim
17:08:43*PMunch_ quit (Quit: Leaving)
17:13:05*sendell quit (Remote host closed the connection)
17:13:21*Arrrr quit (Read error: Connection reset by peer)
17:22:28*MJCaley quit (Quit: MJCaley)
17:23:19dom96riberoni: the playground gist you posted with a ':' is not possible because it's redundant, you can just use the tuple[x, y:int] syntax.
17:24:55*MJCaley joined #nim
17:28:53*endragor quit (Remote host closed the connection)
17:34:09*endragor joined #nim
17:36:19*endragor quit (Remote host closed the connection)
17:51:25*claudiuinberlin joined #nim
18:04:58*MJCaley quit (Quit: MJCaley)
18:18:06*riberoni quit ()
18:26:18*couven92 joined #nim
18:33:44*Sentreen quit (Quit: WeeChat 1.6)
18:41:08*Sentreen joined #nim
18:42:48*Sentreen quit (Read error: Connection reset by peer)
18:44:17*Jesin quit (Quit: Leaving)
18:44:22*sendell joined #nim
18:48:04*Sentreen joined #nim
18:48:50*Sentreen quit (Client Quit)
18:59:18*elrood joined #nim
19:05:18*nsf quit (Quit: WeeChat 1.9.1)
19:06:27*Sentreen joined #nim
19:08:34*Sentreen quit (Read error: Connection reset by peer)
19:10:54*Sentreen joined #nim
19:19:40*gangstacat quit (Quit: Ĝis!)
19:22:19*chemist69 quit (Ping timeout: 252 seconds)
19:34:55*chemist69 joined #nim
19:51:39FromGitter<nanortemis> Hi, I'm trying to compile examples from https://github.com/def-/nim-binary-size
19:51:49FromGitter<nanortemis> Unfortunately they don't work with the latest compiler, I'm getting "Error: system module needs 'echoBinSafe'"
19:51:54FromGitter<nanortemis> Is there any simple fix for it?
19:55:26FromGitter<nanortemis> it's related with --os:standalone
19:56:33miranAraq: is this intended or a bug? https://play.nim-lang.org/?gist=eebfc40aa78257291e2fd47e551d106d
19:57:15miran(the difference is just the position of `and` - at the end or at the beginning of the line
20:01:03*vlad1777d joined #nim
20:05:36dom96nanortemis: hrm, seems like a possible bug.
20:05:50dom96In Nim that is.
20:06:21dom96Unfortunately AFAIK standalone mode isn't documented well so there is no reference that specifies what should and shouldn't be defined in the `panicoverride.nim` file.
20:08:02dom96nanortemis: could you submit a bug report for this?
20:09:10*vivus joined #nim
20:09:40FromGitter<nanortemis> @dom96 yes sure, thanks
20:12:16Araqmiran, that's intended
20:12:57Araqdom96, well you can also just read the example panicoverride.nim
20:13:13miranto me both versions are the same.... how come this is intended as different?
20:13:27dom96Araq: I just found one in the tests
20:13:41dom96https://github.com/nim-lang/Nim/blob/devel/tests/manyloc/standalone/panicoverride.nim
20:13:48dom96Doesn't mention echoBinSafe
20:13:49Araqmiran, binary operators at line endings are line continuations
20:14:26Araqat the beginning of the line they don't do anything :P
20:15:15Araqdom96, yes, why would it? 'echo' is not supported to work when you write your own OS
20:15:28miranAraq: ok, thanks for the clarification
20:15:57dom96Araq: Okay, well do you know what the problem is?
20:16:03vivusHello folks
20:16:09dom96The code presumably used to work so this is a regression
20:16:11dom96hey vivus!
20:16:18vivusHi dom96 . how are you mate?
20:16:31dom96Not bad, neck deep in Uni assignments
20:16:51Araqdom96, *shrug* the implementation of 'echo' changed
20:16:58vivusI thought you wrapped up your education? Probably doing your masters :P
20:17:25vivusAraq decided that echo("") is better than echo "" :P
20:17:25AraqI don't think we ever said "echo works when you don't have an IO subsystem for your OS yet"
20:17:32dom96vivus: heh, nope. I'm not that old :P
20:17:40*dom96 gets sad about getting old
20:17:55dom96Araq: So def-'s code was wrong this whole time?
20:18:06Araqnever looked at it
20:18:17vivusdom96: as long as you become a greybeard, it's fine to grow old
20:19:00dom96Araq: https://github.com/def-/nim-binary-size
20:19:03federico3sometimes I wish for a "bytestring" type to handle raw bytes
20:19:24Araqfederico3, use 'string'?
20:19:42AraqI use it to handle raw bytes, I think you can do the same
20:20:13Araqdom96, that contains multiple examples and only the first one uses 'echo'
20:20:46federico3Araq: unittest and some other modules assume that printing `$` on screen is safe but on a raw byte string it messes up the terminal
20:21:09dom96nanortemis: how are you compiling these?
20:21:45federico3and a distinct type with the right procedures to handle raw data also prevents some bugs
20:21:45Araqfederico3, so ... don't use unittest?
20:22:14FromGitter<nanortemis> @dom96 ./run.sh
20:22:16FromGitter<nanortemis> or manually
20:23:06FromGitter<nanortemis> all examples with --os:standalone don't work
20:27:01Araqnanortemis: nim c --os:standalone -r tests\manyloc\standalone\barebone.nim
20:27:27Araqworks.
20:28:08Araqas far as I can tell everything in def-'s repo works except the very first example which worked by accident
20:28:38Araqif you strip Nim's IO out, why would 'echo' continue to work? I don't think we have to support that.
20:38:58FromGitter<nanortemis> @Araq hmm ok, should examples hello2-5 (no "echo") work?
20:39:49Araqyes
20:42:10FromGitter<nanortemis> @Aray maybe I'm doing something wrong but I'm getting the same error also for hello2-5
20:42:40*nsf joined #nim
20:48:04elrooddoesn't look like nanortemis is doing anything wrong, seems like a bug to me too. def-'s code doesn't use echo, the compiler complains about the system module requiring echoBinSafe
20:49:14elroodadditionally, if you remove the -d:release compiler switch, suddenly compilation fails with system module needs 'nimFrame'
20:49:20elrooddoesn't look sane to me
20:54:08*Jesin joined #nim
21:12:10*sz0 quit (Quit: Connection closed for inactivity)
21:12:20elroodshould it be possible to compile v0.17.2 with git head, or isn't that supposed to work even for the latest release?
21:26:49dom96elrood: I don't think so.
21:29:51Araqas I said, the test still works
21:29:54Araqit uses
21:29:58Araq--os:standalone
21:30:06Araq--deadCodeElim:on
21:30:07Araq--gc:none
21:37:28elroodshould omitting --gc:none result in system module needs 'echoBinSafe' ? that's, well, somewhat unintuitive and not necessarily leading in the right direction, don't you think?
21:37:37*bkerin joined #nim
21:38:14bkerincan anyone tell me what the {.inject.} pragma in the Identifier construction section of the language manual does, or where it is documented?
21:38:17FromGitter<nanortemis> I've just fixed the problem by adding --gc:none
21:41:25FromGitter<nanortemis> for examples without "echo"
21:43:43elroodos:standalone kinda implies gc:none, doesn't it? why does the gc flag have to be set explicitly in that case?
21:48:39FromGitter<nanortemis> "--os:standalone (this implies --gc:none)" this is from the blog post, but I cannot find it in the doc, maybe this has changed
21:50:15*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
21:52:52*Vladar quit (Quit: Leaving)
21:53:41*miran quit (Ping timeout: 240 seconds)
21:55:24bkerinahhhh then get described under Hygiene in templates... but sadly without the surrounding {..} making them unfindable
22:04:00*kunev quit (Ping timeout: 268 seconds)
22:06:22*kunev joined #nim
22:13:12*Trustable quit (Remote host closed the connection)
22:16:06Araq--os:standalone means "no OS", the GC can still be used (I suppose we have no test for that though)
22:17:06Araqyou can always get a heap via a global var myHeap: array[SomeSize, byte]
22:18:31Araqso ... yeah, a GC doesn't require an operating system :-)
22:19:34FromGitter<nanortemis> thanks for the help and explanation
22:21:46bkerinAraq: What do you think of including {..} in references to pragmas?
22:22:06FromGitter<nanortemis> Has someone tried to make a simple linux kernel module in Nim?
22:22:18FromGitter<nanortemis> I think this would be possible and interesting, but I cannot find any example on the net
22:22:50bkerinit's noisy but for some (e.g. inject) the description of the pragma isn't findable without
22:23:08bkerinor it could be done just for those unfindable cases I guess
22:23:46Araqhttps://nim-lang.org/docs/theindex.html search for "inject" and you find it
22:23:57Araqthat said, this section of the manual is really weak
22:24:06Araqand needs to be improved
22:24:25Araqbut i don't want to write ``{.pragma.}`` everywhere
22:24:38bkerinAraq: the templates section?
22:24:50bkerinAraq: yep everywhere is indeed too ugly
22:25:02Araqthe section that merely mentions it that theindex points to
22:25:06dom96nanortemis: IIRC somebody has tried creating a linux kernel module, could it have been you federico3?
22:25:58Araqelrood, --os:standalone used to imply --gc:none but this was changed
22:28:32bkerinAraq: index does show it easily. Its just search in lang manual itself has many inject words but it does get found... I dunno for whatever reason took me a while. Maybe the right answer is that .inject. and .gensym. should appear in Pragmas section as I did look there
22:29:56Araqpeople requested a "list of all pragmas" before but I think that's a bit misguided, many pragmas are not officially part of the spec
22:30:19bkerinAraq: i'll make pull request if you agree. I'm interesting in trying to help with templates docs as well though I'm still in the process or sorting out how they work myself
22:30:34Araqand many are very rarely used
22:30:46Araqbkerin, that would be really nice, thanks!
22:31:18federico3 dom96 it was an experiment but yes
22:31:23bkerinAraq: I understand you want to avoid/reduce/turn-into-syntax pragmas and agree that's a good idea... they make the lang look somewhat scary
22:32:34bkerinAraq: are .inject./.gensym. likely to go away though? if they turn into syntax or something the lang doc would need corresponding edits anyway
22:33:44Araqno, they are here to stay
22:33:46FromGitter<nanortemis> federico3: could you provide a simple example, tips, a single "Hello World" print would be great
22:35:06bkerinAraq: add to big Pragmas list in lang manual ok then?
22:35:41dom96Araq: Even for v2? :)
22:37:29Araqdom96, yeah, I have no ideas about this
22:38:02dom96Just to give bkerin some hope
22:38:11dom96v1 is too close in our future for such a chance though ;)
22:38:15dom96*change
22:38:16Araqintroducing more keywords seems not a good way to do it either. we can have more system.x magics
22:38:54FromGitter<mratsim> "part of the spec" uh? Is this nim-lang? 
22:38:58dom96A nicer pragma syntax would be neough
22:39:38*Jesin quit (Quit: Leaving)
22:39:43Araqmratsim: for me "spec" and "manual" are the same :P
22:40:59FromGitter<mratsim> They are as scary as Haskell compiler directives or Rust [#derive(Clone)] but maybe I use too much pragmas for my own good.
22:41:07*nsf quit (Quit: WeeChat 1.9.1)
22:41:19bkerinyeah just turning into keywords is not an honest approach, and nim currently scores high on honesty
22:43:06sendellas a newcomer the two things that looked "unfriendly" regarding the rest of the syntax were pragma syntax and dereferencing operator []
22:43:52AraqI agree about the deref [] but it's somewhat logical
22:43:58sendellnot sure why this last was chosen, besides the semantic proximity with C arrays
22:44:24Araqthe pragmas can even look sexy with some Unicode overlays
22:44:40bkerinwell its sort of like perl too, I like that :)
22:45:15sendelldidnt know that
22:45:35Araqsendell, a[] derefs a pointer, accessing its single element, a[0] accesses the 0th element of an array
22:45:38bkerinah maybe i'm not clear what operator your're talking about
22:45:43Araqseemed logical to me to use this syntax
22:45:43bkerin^
22:46:04sendellyeah that's what i supposed (or read somewhere, cant remember haha)
22:46:08sendellbut still
22:46:28Araqoriginally I used Pascal's x^ postfix operator
22:46:29sendella two char operator for this sounds weird haha
22:46:35sendellyeah?
22:46:56Araqbut then some guy came along and told me he needs ^ for exp()
22:47:28sendell!eval echo 2^10
22:47:29NimBotCompile failed: in.nim(1, 7) Error: type mismatch: got (int literal(2), int literal(10))
22:47:50Araq!eval import math; echo 2^10
22:47:52NimBot1024
22:48:01sendellhehe nice didnt know that
22:48:13sendellprobably a good idea to keep that for pow
22:48:34Araqbut more convincingly Nim had no other postfix operators and so p[] made even more sense
22:48:35sendelland on french keyboards ^ is a dead key
22:48:44sendellso one more reason ahah
22:49:04Araqtemplate `*`(x: untyped): untyped = x[]
22:49:14Araq*x # now like in C, yay
22:49:28bkerin*warm feeling*
22:49:31sendellhehe
22:49:45sendellsuch a customizable language :)
22:50:43sendellremembers me of : template `++`*(x:typed)= inc x i did last night
22:50:58bkerinits like in C, if you don't like braces, you #define end } or so and have a friend check it in
22:51:12bkerin*warm feelilng*
22:51:28Araqlol yeah, won't be accepted in Nim's stdlib though
22:51:53Araqmaybe we could use ^x
22:52:09*SenasOzys joined #nim
22:52:50Araqlooks better than [] but it might annoy Pascal programmers that are so used to the postfix ^
22:53:48Araqwell [] is so rarely used in Nim that it's not worth thinking about it
22:54:02sendellwhat was the problem about prefix * ?
22:54:40Araqno problem but I always found it weird in C.
22:55:01Araq"what do all these strange crippled multiplications do here?"
22:55:18sendellyeah, probably deserves its own symbol
22:55:27sendellgood argument
22:55:46Araqplus with Nim's export marker which is also * things can look weird
22:56:31sendellyeah but in separate space, as you wont put dereferencing aside a proc name
22:56:47sendell(where the export marker belongs)
22:59:10Araqmaybe, maybe not. prefix ^ seems the best solution except that [] is so uncommon
22:59:44sendellprobably a silly question, but why can't ptr auto dereference as with refs?
23:00:05sendelland maybe have a special operator when you want to access the address itself, which is less common
23:02:08Araqptrs and refs are the same for auto derefs
23:07:47sendellhmm yeah just tried some stuff i got wrong
23:07:54sendellgood then, i guess its even less a problem :)
23:10:31*Serenitor joined #nim
23:13:21*bkerin quit (Quit: Confucius say: that man with four balls cannot walk!)
23:29:16sendelli just found why i got this wrong: the module where i experimented with ptrs previously was not enabling {.experimental.}, and I just discovered auto-deref was part of it :)
23:34:54*MJCaley joined #nim