<< 02-04-2016 >>

00:06:54*Trustable quit (Remote host closed the connection)
00:37:37*desophos quit ()
00:53:24*wuehlmaus quit (Quit: Lost terminal)
00:59:28*GangstaCat joined #nim
01:10:56*desophos joined #nim
01:17:01*arnetheduck joined #nim
01:27:29*GangstaCat quit (Quit: Leaving)
01:28:22*ehaliewicz joined #nim
01:32:06*nsf quit (Quit: WeeChat 1.4)
02:15:19*enthus1ast quit (Ping timeout: 260 seconds)
02:34:35*saml_ joined #nim
02:42:16*PMunch quit (Ping timeout: 244 seconds)
02:43:37*fredrik92 quit (Quit: Exiting)
02:52:10*krux02 quit (Remote host closed the connection)
03:00:07*brson quit (Quit: leaving)
03:17:07*darkf quit (Read error: Connection reset by peer)
03:17:35*darkf joined #nim
04:53:55*saml_ quit (Quit: Leaving)
05:10:43*exebook quit (Remote host closed the connection)
06:42:31*ehaliewicz quit (Ping timeout: 244 seconds)
07:22:48*desophos quit (Read error: Connection reset by peer)
07:32:08*Trustable joined #nim
07:37:49*gokr joined #nim
07:41:15*yglukhov joined #nim
07:53:12*wuehlmaus joined #nim
08:04:28*Demon_Fox quit (Quit: Leaving)
08:16:24gorgonzolapastag/
08:40:30*endragor joined #nim
08:53:17*nsf joined #nim
08:59:58*autumnl quit (Quit: My Mac has gone to sleep. ZZZzzz…)
09:59:50gokrThe latest Red release looks ... impressive: http://www.red-lang.org
10:12:27*yglukhov quit (Remote host closed the connection)
10:13:32*yglukhov joined #nim
10:13:43*yglukhov quit (Remote host closed the connection)
10:14:52*yglukhov joined #nim
10:31:41*yglukhov quit (Remote host closed the connection)
10:47:08cheatfategokr, it looks like advertising...
10:47:25gokrHm?
10:48:21cheatfategokr, your message about xxx language
10:49:00gokrIt's not advertising - I was just told about that release and when I read about it it felt relevant since it adds a full IDE/graphical layer.
10:49:39gokrAnd no, I am not involved in Red, but I find it fairly interesting.
10:54:14*enthus1ast joined #nim
10:54:49*kulelu88 joined #nim
11:00:16*darkf quit (Ping timeout: 268 seconds)
11:04:07*PMunch joined #nim
11:09:16*elrood joined #nim
11:10:10*krux02 joined #nim
11:10:20*Trustable quit (Quit: Leaving)
11:22:36gokrBut if you want some advertising I just got my Ni interpreter running in a browser neatly: http://www.krampe.se/ni.html
11:23:04gokrThe Ni interpreter written in 1600 lines of Nim code is 91k minified js, kinda nice.
11:23:23gokrOf course, hard to know what one can do unless one knows a bit of Ni ;)
11:29:13*autumnl joined #nim
11:32:09*yglukhov joined #nim
11:36:54*yglukhov quit (Ping timeout: 276 seconds)
11:40:57*krux02 quit (Remote host closed the connection)
11:44:01kulelu88can Nim code be statically compiled?
11:45:39bblkulelu88: what do you mean?
11:46:22kulelu88bbl: similar to how Go statically compiles a binary, is it possible to do the equivalent in Nim so that my executable can be run without any dependencies?
11:47:08bblIm going to skip this conversation :)
11:47:34kulelu88:d
11:59:09def-kulelu88: yes, it's possible
11:59:48def-kulelu88: by default you have the C library dynamically linked, but that should be available on every platform. Nim libs are statically compiled anyway. C libs can be statically compiled in very much the same way as you would do in C
12:00:08def-and if you really want to statically link a C library, musl works fine for that
12:00:33kulelu88interesting, thanks for the feedback
12:02:40def-an alternative approach is to link dynamically and have a lib/ directory which you add to the search path when linking your binary
12:18:52*sdhuk joined #nim
12:19:13*sdhuk left #nim (#nim)
12:19:15*Kesta joined #nim
12:39:12*gokr2 joined #nim
12:45:37*autumnl quit (Ping timeout: 252 seconds)
12:46:04*gokr2 quit (Ping timeout: 240 seconds)
13:03:38*yglukhov joined #nim
13:07:57*yglukhov quit (Ping timeout: 246 seconds)
13:16:39*Trustable joined #nim
13:29:50*fredrik92 joined #nim
14:51:54*PMunch quit (Ping timeout: 276 seconds)
14:52:41*kulelu88 left #nim ("Leaving")
14:54:43*yglukhov joined #nim
15:00:21*yglukhov quit (Ping timeout: 276 seconds)
15:25:52*arnetheduck quit (Ping timeout: 244 seconds)
15:35:57*Trustable quit (Remote host closed the connection)
15:36:57*Trustable joined #nim
15:37:46*Trustable quit (Remote host closed the connection)
15:40:40*endragor_ joined #nim
15:42:20*Trustable joined #nim
15:44:01*endragor quit (Ping timeout: 250 seconds)
15:45:51*endragor_ quit (Ping timeout: 276 seconds)
15:58:21*yglukhov joined #nim
16:03:29*yglukhov quit (Remote host closed the connection)
16:13:26*yglukhov joined #nim
16:13:41*Arrrr joined #nim
16:24:48cheatfateproc hstrerror*(herrnum: cint): cstring {.importc:"(char *)$1", header: "<netdb.h>".} what does it mean "(char *)$1"?
16:29:06*yglukhov quit (Remote host closed the connection)
16:39:11*yglukhov joined #nim
16:59:34federico3https://github.com/nim-lang/Nim/wiki/Style-Guide-for-Nim-Code "checkHttpHeader instead of checkHTTPHeader" Whaat?
17:01:46Arrrrwhaat?
17:08:31*GangstaCat joined #nim
17:09:35*Jesin quit (Quit: Leaving)
17:16:27*Jesin joined #nim
17:18:24*Matthias247 joined #nim
17:20:33dom96federico3: it's easier to tell where the acronym ends and the next word begins
17:25:33*rgv151 is now known as Guest15998
17:25:33*Guest15998 quit (Killed (orwell.freenode.net (Nickname regained by services)))
17:25:45*rgv151 joined #nim
17:25:47federico3dom96: true, however sometimes it's not an issue; or we can use underscores; also visually recognizing an acronym commonly written in uppercase when written in capitalized can be slower and miselading - however, what got my attention is the claim about the "foolish to pretend"
17:28:11elroodthat's just the usual opinionated style you'll encounter all over with Nim ;)
17:28:59dom96feel free to use whichever style you wish :)
17:29:07fredrik92just to be clear (and I know this is a VERY controversial topic), since Nim originally stems from a C-community, I guess Nim code should mainly use snake_case naming conventions?
17:29:31dom96Nim doesn't stem from a C community.
17:30:10fredrik92ah, just compiles to by accident C? :O ok, my bad! :P
17:30:21*OmlkRoNiXz left #nim ("asd")
17:30:23Arrrrsnake_case? heresy!
17:30:52dom96the style guidelines reflect the code style that the Nim compiler, standard library and related tools adopt.
17:30:59dom96(kind of)
17:31:14federico3fredrik92: I wish!
17:31:28fredrik92so what do we mainly use in Nim? I havent got the manual open right now, what's the convention in stdlib?
17:31:40dom96camelCase
17:31:50federico3again I feel the need for a linter
17:32:02dom96for procedures and variables, PascalCase for types
17:32:29dom96(and for consts too, which I personally dislike)
17:32:40fredrik92let's write one! :D anything on public or non-public (ah, wait that's the asterisk, right...)
17:32:45dom96But the language is style insensitive for a reason ;)
17:33:13elroodactually, whether one prefers snake_case or camelCase or whichever really is question of style, what's a little offputting and not really helping the adoption of Nim along is the undiplomatic wording of which the one right way is and that all others are foolish, and the mindset behind that
17:33:13fredrik92yeah, well, so is C, C#, Python and many other langs I know
17:33:47federico3my point exactly, elrood
17:34:02fredrik92elrood, that's the reason, I tried to phrase dimplomatically and use 'mainly'! :D
17:34:20dom96elrood: agreed.
17:35:04elroodyou'd have to get really deep into Araq's brain and fiddle around a little there to change the basic issue, i guess ;)
17:35:20*elrood ducks and runs
17:35:29fredrik92:D
17:36:33federico3let's just hope this "undiplomatic wording" is not too offputting for newcomers and it's not hurting the project too much :(
17:37:12dom96federico3: feel free to modify the wiki to make it sound more diplomatic
17:37:41*sorakun joined #nim
17:37:57fredrik92ah, well... when working with computer scientist, how often do you not have to put up with someone stating that their way is the only right way to do something and everything else in inferior? :P
17:39:20fredrik92Being a TA, at some point, I have learned, you have to get past that and see it more from a comical perspective instead of being offended!
17:39:43federico3fredrik92: it depends on the environment where you are... in some places it's really not welcome
17:41:06*sorakun quit (Remote host closed the connection)
17:41:29fredrik92yeah, frederico3, yeah that's true, that's why I asked what's mostly used in Nim... Being consistent with the majority helps a lot in many cases... :P
17:43:21*fredrik92 quit (Quit: Exiting)
17:44:17ArrrrDo the majority use snake case?
17:44:56dom96Arrrr: Majority uses camel case I think
17:51:44dom96So I was thinking of creating a survey to get a feeling for what the Nim community thinks about Nim, what areas they think we should be focusing on etc. What do you guys think about that idea?
17:53:20gokrdom96: Sure, why not!
17:53:58dom96Also, I'm happy to hear any suggestions you guys have for what the survey should ask :)
17:54:33*yglukhov quit (Remote host closed the connection)
17:54:43ArrrrYeah, why not?
17:55:53ArrrrI would ask about documentation, core library, support, learning material ...
17:56:46federico3dom96: so you just ran a survey about running a survey?
17:57:05dom96federico3: Maybe :P
17:57:07federico3+1
17:57:25elrooddom96, depends on how many people are actively developing Nim and its basic toolchain and what their main motivation is
17:57:39dom96whew, looks like I *finally* got the damn GTK2 library compiled on Mac OS X correctly.
17:57:54*PMunch joined #nim
17:58:08federico3one suggestion: always offer comparative choices, e.g. "what is more important? A / B / C" instead of "how important is A?"
17:58:40dom96Will do. Might even get the time to do it tonight if I'm lucky.
17:58:57federico3a simple google survey thingy maybe?
17:59:19elroodwhile some kind of feedback loop is a great idea, it could also hurt if the top wishes in the survey and the ones the main developers personally are interested in and want to focus on don't match up
17:59:21Arrrrsurvey monkey
17:59:47federico3elrood: how does it hurt?
17:59:58dom96oh yeah, suggestions on which survey website/software to use also welcome
18:00:07dom96I was thinking of using Google's survey thing
18:00:22dom96unless survey monkey is significantly better?
18:00:42federico3this is getting more meta
18:00:46dom96lol
18:01:06dom96Let me just create a quick survey to determine which survey software to use
18:01:42federico3create a quick survey to determine which survey software to use to create a quick survey ...
18:02:39elroodfederico3, there's a possibility for friction if the community's demands and the developers interests aren't going in the same direction, and that could hurt motivation and speed of development
18:02:50dom96http://strawpoll.me/7259671
18:02:57dom96because why not
18:03:50dom96elrood: hrm, indeed, as Cypher in The Matrix said "ignorance is bliss"
18:03:57ArrrrHow is google survey?
18:04:13federico3elrood: arguably, I'd say could be better to be aware of the misaligned interests?
18:04:14dom96But I think in this case we shouldn't be ignorant :)
18:05:34*anoisz joined #nim
18:06:49dom96hey flyx, you around?
18:07:22elroodsure. let's just hope the community stays humble in what it wishes for. on the other hand, every project gets the community it deserves ;P
18:08:41dom96oh wow, 7 votes
18:08:49dom96and majority wants survey monkey
18:08:58dom96I'm honestly surprised by that
18:09:21dom96why the Google Survey hate?
18:09:53ArrrrMake another poll
18:10:04elroodgoogle are collecting too much data already ;) btw, doesn't the forum provide some kind of poll functionality yet?
18:10:28federico3it doesn't and implementing a good poll is not trivial
18:12:26dom96Arrrr: want me to make another strawpoll? why?
18:14:34*yglukhov joined #nim
18:14:41ArrrrTo know why the hate towards google
18:14:44Arrrrsurvey
18:18:54dom96oh lol
18:19:02*yglukhov quit (Remote host closed the connection)
18:19:14dom96but then I would need to guess people's reasons
18:20:09*anoisz left #nim ("Leaving")
18:21:43federico3slightly related, I feel the need for https://stackoverflow.com/questions/156752/new-open-source-project-ideas/519669#519669
18:25:14dom96Write one in Nim :)
18:25:45*rok joined #nim
18:26:16dom96Also, I really really want an online Nim compiler
18:26:19federico3it's very little coding and a lot of html/js stuff
18:26:22dom96with nimbot integration
18:26:35dom96maybe you'd be interested in developing that?
18:27:08federico3to compile from a form and then run the code remotely?
18:27:15federico3(or in the browser?)
18:28:20dom96remotely
18:28:30dom96like try-ruby or try-haskell or Crystal's playground
18:28:59*chrisheller quit (Remote host closed the connection)
18:30:18ArrrrYes, online nim compiler please
18:30:35ArrrrThe one from ideone is so obsolete
18:31:08federico3I wonder if there's a toolkit to implement that (or just code from other projects to use)
18:32:26dom96ekarlso made a start on this project https://github.com/ekarlso/nim-playpen
18:35:15federico3am I missing something or "nim doc2" cannot create docs in a dedicated directory?
18:35:45dom96that's possible, the compiler was never good with putting generated files where you tell it to
18:38:45*PMunch quit (Ping timeout: 276 seconds)
18:45:25*Demon_Fox joined #nim
18:46:24*ozra joined #nim
18:47:57cheatfatedom96, why you want online compiler?
18:48:04cheatfatemaybe you want interpreter?
18:48:31dom96cheatfate: I want both, but an online compiler will do for now.
18:48:47dom96cheatfate: The Nim compiler is fast enough at compiling to make it worthwhile
18:49:13cheatfatedom96, nim compiler is fast enough but gcc is not
18:49:21elroodtcc?
18:49:35*ozra left #nim (#nim)
18:49:44dom96cheatfate: I disagree, and there are plenty of alternative C compilers out there.
18:50:32cheatfatedom96, clang is slower... vcc is faster but windows only, the only alternative is icc but nobody test it before
18:51:00cheatfatedom96, and you want to make this service public? or just for private use?
18:51:07dom96cheatfate: public
18:51:36cheatfatedom96, its very very unsecure idea...
18:51:49dom96why?
18:51:54ArrrrIs there a way to clear a table? Other than iterating through every key and deleting it
18:52:02dom96there are plenty of public services which do the same
18:52:16cheatfatehave you seen public service with C compiler inside?
18:52:27cheatfatelike online c compiler?
18:52:45cheatfatewhich not gives you executable as download but run it and return results?
18:53:05dom96there is a C++ IRC bot called geordi which does this: http://www.eelis.net/geordi/
18:54:07dom96if it becomes too slow and the demand becomes too high then you can easily implement some logic to rate limit the amount of compilation processes that are activated
18:54:53cheatfatedom96, do you wish to run compiled executable on server or give you as download?
18:55:03dom96cheatfate: on the server
18:55:08dom96it will of course be sandboxed
18:56:26cheatfateso why just not use virtual private server and setup nim there?
18:56:36cheatfatewhy you want to make this as public service?
18:57:37ArrrrCan be attractive for people who have not tried nim yet
18:57:44elroodcheatfate, how about http://webcompiler.cloudapp.net , http://coliru.stacked-crooked.com or the aforementioned http://ideone.com ?
18:59:35elroodprobably there are a few more providing an online c compiler with runnable output as a service, these are just the first few that came to mind
19:00:45cheatfateelrood, ok, but why you need new one compiler if you have already ideone.com?
19:01:48federico3I'm confused.... nim doc foo.nim and nim doc --project foo.nim both produce only one html file (foo.nim imports other local files)
19:01:49dom96we can integrate a nim tutorial into it for example
19:02:01dom96similar to try haskell
19:02:06cheatfateI think most wanted thing we need for nim is powerfull debugger
19:03:17GangstaCatI know Go is evil but their tour is one good example for what we could do: https://tour.golang.org/welcome/1
19:05:19cheatfateif nim to js is stable enough its much better for such tutorials make compilation to js and run it in client's browser
19:05:22GangstaCatread the description here: https://tour.golang.org/welcome/4
19:05:36GangstaCatthey are speaking about the limitations of the playground
19:06:35federico3...and nim doc2 crashes out
19:07:02dom96GangstaCat: indeed, I would love this for Nim.
19:07:14dom96cheatfate: gdb works well enough
19:07:51dom96cheatfate: Also, are you implying that we should write a debugger instead of an online compiler?
19:08:20dom96a debugger is far more challenging than an online compiler.
19:09:15cheatfatei dont think gdb is usable compiler... but ofc you can always use it and what you prefer to use in windows? gdb?
19:09:34cheatfate** gdb is usable debugger
19:10:52cheatfatedom96, to run tutorials you can easily make nim to js compilation and run it through client's browser without any sandboxes
19:11:36dom96cheatfate: no, that wouldn't be easy
19:11:46cheatfatedom96, why?
19:12:04GangstaCatwhere is the interactivity? because the nim sources are already compiled to js
19:12:22dom96well, actually I'm wrong, it would be easy
19:12:25dom96but it would feel limited
19:12:29GangstaCatthe key here is to make an interactive sandbox where one could modify the code from the tutorial
19:12:44dom96the JS backend doesn't support nearly as much as the C backend
19:14:03cheatfateGangstaCat, so what the problem with nim to js backend?
19:14:43GangstaCatcheatfate, if I understand correctly, you can only say: here is the nim code, we already compiled it for you to JS, click on the button to run the JS code
19:15:13GangstaCatbut what if you want to modify the code or propose an exercice where one should write code
19:15:33cheatfateGangstaCat, please enter your nim code, press run (we compile it to js code, transfer it to client's browser and inject it to current window, and show user results)
19:16:26GangstaCatthat could be an idea I guess, I don't really know the limitations of the JS backend but I presume for the basics it is enough?
19:16:48dom96cheatfate: are you proposing to compile the Nim compiler to JS and run that in the browser too?
19:16:57cheatfatei think sandboxed c compiler is near equal to js
19:17:32dom96or do you want to send a request to a Nim compiler on the server and for it to compile the Nim code to JS for us then send it back to the browser?
19:17:44dom96both approaches have problems
19:17:54cheatfatedom96, nope, i propose to send nim code to server run nim2js compilation and then transfer back compiled js code to user, inject and run in user's browser window and capture results
19:18:34dom96cheatfate: yes, and what happens when the user creates a malicious macro which executes some malicious code at compile-time?
19:18:42*BitPuffin joined #nim
19:18:47dom96You will need to sandbox the compiler
19:18:55federico3...at least twice
19:20:02cheatfatedom96, ok, but at least my approach would work much faster and eats much less resources
19:20:22dom96yes, but it would be extremely limited
19:20:23*BitPuffin quit (Disconnected by services)
19:20:30*itPuffinB joined #nim
19:20:56*itPuffinB quit (Read error: Connection reset by peer)
19:21:57*Varriount joined #nim
19:23:10cheatfatedom96, it would be stimulus to improve js backend
19:23:42cheatfatedom96, and i think it would be enough to run tutorials
19:24:05*Varriount_ quit (Ping timeout: 268 seconds)
19:24:22GangstaCat+1
19:27:00federico3:-/ I cannot import walkDir in a nimscript
19:27:32dom96if you're going to be sandboxing the compiler then you may as well implement the extra bit more and run the compiled executable in a sandbox too
19:28:28dom96btw if we can steal Go's or something else's playground then we should
19:29:35dom96federico3: so question is, are you interested in implementing/setting up something like this?
19:29:50federico3not right at the moment, I'm busy with few other things
19:30:42federico3...but thanks for asking
19:31:23dom96np
19:35:07*Kesta quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
19:38:37federico3a nimscript with only #!/usr/bin/env nim \n import os fails with Error: cannot 'importc' variable at compile time
19:43:17dom96federico3: most modules cannot work at compile-time
19:44:05*pregressive joined #nim
19:45:43federico3http://hookrace.net/blog/what-makes-nim-practical/ yet in this example os was imported
19:46:23federico3oh wait, is that thing nimscript or a completely different thing?
19:50:50dom96looks like you're right
19:51:04dom96guessing something new was added to the ``os`` module which uses {.importc.}
19:51:33*rgv151 quit (Ping timeout: 276 seconds)
19:54:05federico3maybe travis CI should run a "self-checking" nimscript
19:55:12*pafmaf joined #nim
19:55:29*pafmaf quit (Client Quit)
19:56:33*kulelu88 joined #nim
19:56:33*kulelu88 quit (Changing host)
19:56:33*kulelu88 joined #nim
19:57:48cheatfatedom96, os module uses posix module which has a lot of {.importc.}
19:59:00dom96hrm, then I'm not sure how def- ever ran that script
20:02:28*yglukhov joined #nim
20:03:47*pregressive quit (Remote host closed the connection)
20:06:13federico3how should I get the version from the nimble file? By parsing it or through nimble?
20:10:05dom96for what purpose are you getting the version from the nimble file?
20:10:19federico3where else should I get it from? :)
20:11:18*chrisheller joined #nim
20:11:21dom96you would have to import it I guess
20:11:41federico33 applications need to know it: nimble, the project itself, the documentation build scripts
20:12:04dom96but it depends on a Nimble module
20:12:54federico3given that we don't want to have multiple copies of the same string
20:18:22dom96yes, that was the reasoning behind the move to nimscript
20:19:36federico3is version going away from the nimble file?
20:20:16dom96no
20:20:25dom96why would it?
20:20:56federico3ok, so someone has to parse it - would that be a nimscript file?
20:23:27dom96you don't need to parse anything
20:23:37dom96a nimscript file can be evaluated by the compiler
20:25:11federico3somebody has to parse the .nimble file to extract the version
20:28:40*thotypous quit (Ping timeout: 264 seconds)
20:29:47dom96I think you should be able to create a `version` module with an exported `pkgVersion` variable, then import that module in your .nimble file
20:30:07dom96well, maybe call that module `info` or something
20:30:59*irrequietus joined #nim
20:31:02dom96then in your .nimble file write `import info; version = info.version`
20:34:13federico3IMO the concept of version should exist in the language so that nimble, nim doc, and others can agree on the application version
20:46:12dom96Perhaps, make a formal RFC and we can discuss it :)
20:46:25*Guest59926 is now known as Guest59926isaway
21:03:17*Arrrr quit (Quit: WeeChat 1.4)
21:04:17*rok quit (Quit: rok)
21:12:04*Trustable quit (Quit: Leaving)
21:14:06*enthus1ast quit (Ping timeout: 276 seconds)
21:17:00*enthus1ast joined #nim
21:21:53enthus1astdom96: maybe we could write a simple jupyter kernel
21:22:36dom96enthus1ast: Never heard of that, looks awesome!
21:23:05enthus1asti think withouth ipython python would not be that well known
21:23:50*pregressive joined #nim
21:32:36*yglukhov quit (Remote host closed the connection)
21:32:50*irrequietus quit ()
21:39:35*MyMind joined #nim
21:41:03*Sembei quit (Ping timeout: 240 seconds)
21:42:05*pregressive quit (Remote host closed the connection)
21:57:53*thotypous joined #nim
22:00:04*elrood quit (Quit: Leaving)
22:06:16*darkf joined #nim
22:09:24*jackkv quit (Ping timeout: 260 seconds)
22:09:44*jackv joined #nim
23:02:23gokr Fiddled with c2nim and managed to wrap http://sophia.systems
23:02:48gokrNow I just need to ... make it more "nice" to use from Nim.
23:21:09*cheatfate quit (Read error: Connection reset by peer)
23:21:27*cheatfate joined #nim
23:23:25*Matthias247 quit (Read error: Connection reset by peer)