<< 24-06-2018 >>

00:03:07FromGitter<kayabaNerve> dom96: I have a thingy for you
00:03:22FromGitter<kayabaNerve> I just submitted my answers to your survey :P
00:03:45FromGitter<kayabaNerve> That's the only thing I can think of to feel more welcome
00:10:31*yglukhov[i] joined #nim
00:15:38*yglukhov[i] quit (Ping timeout: 276 seconds)
00:48:45FromGitter<rayman22201> @dom96 Submitted my survey. I'm long winded and wrote a novel, sorry in advance!
00:56:13*yglukhov[i] joined #nim
01:00:57*yglukhov[i] quit (Ping timeout: 264 seconds)
01:02:16*xet7 quit (Quit: Leaving)
01:46:40shodan45dom96: your name is pronounced like pi-hetta?
01:47:08shodan45(just started watching https://www.youtube.com/watch?v=hzxr9_ZK9uY )
01:48:35*jhorwitz_ joined #nim
02:07:01FromGitter<kaushalmodi> Search for "nim lang" on Twitter returns a lot of foreign (non-English) language stuff
02:07:58FromGitter<kaushalmodi> Maybe everyone should tweet with #NimLang? May be the official Nim twitter account starts setting that as an example? @dom96 ?
02:08:26FromGitter<kaushalmodi> This is what I mean by foreign language stuff: https://twitter.com/search?q=nim%20lang&src=typd
02:21:44FromGitter<bevo009> Filipino
02:24:40FromGitter<bevo009> lang = just, only
02:29:00*smt` quit (Read error: Connection reset by peer)
02:29:15*smt` joined #nim
02:34:20*cspar_ joined #nim
02:36:17*cspar quit (Ping timeout: 248 seconds)
02:43:11*jhorwitz_ quit (Ping timeout: 276 seconds)
02:54:07*jhorwitz_ joined #nim
02:58:32*jhorwitz_ quit (Ping timeout: 245 seconds)
03:04:28*dddddd quit (Remote host closed the connection)
03:20:01*skrylar quit (Remote host closed the connection)
03:44:44*fourouge joined #nim
03:45:10*yglukhov[i] joined #nim
03:49:53*yglukhov[i] quit (Ping timeout: 256 seconds)
04:03:44*xkapastel quit (Quit: Connection closed for inactivity)
04:30:51dyce[m]for distinct types, you have to implement hash and == , would this be considered boilerplate?
05:16:18*lompik joined #nim
05:21:46FromGitter<bevo009> @shashlick A query mate, do the gists created by snip expire?
05:28:28shashlickI don't think so
05:28:48shashlickWill have to check http://ix.io syntax to confirm
05:31:25shashlickNope they should not expire, they are anonymous and cannot be deleted either
05:34:08*ketralnis joined #nim
05:46:40*yglukhov[i] joined #nim
05:51:39*yglukhov[i] quit (Ping timeout: 268 seconds)
06:06:26FromGitter<bevo009> Awesome
06:06:43FromGitter<bevo009> @shashlick Does paste work in snip on your system? I'm trying to load snips via F3, have to type them in manually
06:12:44FromGitter<bevo009> I just set up a one key bash shortcut to code, build and run nim code :) ⏎ Press 's', type code in, F2, ESC...done! ⏎ alias s='touch p.nim && snip p.nim && nim c -r --verbosity:0 --hints:off p.nim'
06:16:22FromGitter<kaushalmodi> In Emacs, you do M-x gist-buffer, and the code's on gist :)
06:18:10FromGitter<bevo009> a simple F8 in snip to create a gist
06:19:57FromGitter<bevo009> you could create a vim-like tutorial for Nim inside snip, if you had the time, money and ability
06:20:43FromGitter<bevo009> I'm surprised it's not bundled with the install
06:22:26FromGitter<bevo009> @kaushalmodi do you have any great resource for learning emacs, or did you just wing it?
06:31:44BevoEmacs is a cult, right?
06:31:51BevoOnce in, I'll spend my days tearing down and rebuilding it, until I achieve perfection
06:31:58BevoAnd when I'm away from it, I'll be sad
06:33:21FromGitter<kaushalmodi> I just learned Emacs, just the basic key bindings many years ago at my first internship
06:34:07FromGitter<kaushalmodi> Then few years passed, somehow got a taste of Emacs Lisp and realized that I can make Emacs do almost anything!
06:34:34BevoYou don't check your email or listen to the radio on your emacs??
06:34:37FromGitter<kaushalmodi> It's real, addictive, powerful
06:35:12FromGitter<kaushalmodi> It's my ultimate programming tool
06:35:14Bevoaddictive sounds about right
06:36:03BevoSo you don't have any resource to point towards to learn it well?
06:36:05FromGitter<kaushalmodi> I'd say, if you are interested, started with doing basic edits, learning going things in Emacs, leaving all prior notions.
06:36:25FromGitter<kaushalmodi> Emacs tutorial is a great starting point
06:37:14FromGitter<kaushalmodi> Means press Ctrl and h keys together, the leave those and press t
06:38:03FromGitter<kaushalmodi> Mastering Emacs is a great book which I recommend buying.
06:38:24FromGitter<kaushalmodi> You read it and "do Emacs" as you read it.
06:39:11FromGitter<kaushalmodi> The Emacs subreddit, it's official help mailing lists, emacs.stackexchange.com, all are really courteous and helpful
06:39:15*jjido joined #nim
06:39:28FromGitter<kaushalmodi> s/it's/its
06:39:50BevoI can't use vs code combined with my linux install (windows sub system), so I might have a go at emacs on that
06:41:23FromGitter<kaushalmodi> Emacd works well on WSL + ConEmu
06:41:44BevoWSL/
06:41:49BevoWSL?
06:41:59FromGitter<kaushalmodi> Windows subsystem for Linux
06:42:15BevoI use con emu for windows
06:42:37BevoI use the built-in console from WSL
06:42:40FromGitter<kaushalmodi> I think it was widely known as WSL few years back, but the Windows started promoting a different marketing name
06:43:20FromGitter<kaushalmodi> Actually installing an X server will give a better experience
06:43:37BevoWhere do you get emacd? or was that a typo?
06:43:43FromGitter<kaushalmodi> Typo
06:44:18Bevoare X servers covered in Mastering Emacs?
06:45:16FromGitter<kaushalmodi> Emacs is widely used in GUI mode
06:45:34FromGitter<kaushalmodi> The X server reference was to use Emacs in GUI mode on Windows too
06:45:52FromGitter<kaushalmodi> See this blog for Emacs WSL setup: https://www.lonecpluspluscoder.com/2017/11/15/emacs-on-the-linux-subsystem-for-windows/
06:46:25Bevoyeah, no guis with my sub system unless I re-install a new windows version and probably the sub system and everything else
06:46:35FromGitter<kaushalmodi> If you follow the comments thread, I had some hiccups getting it set up, but eventually got it working.
06:46:48BevoI could do it on winows-conEmu though
06:46:56FromGitter<kaushalmodi> WSL and Windows X server are different things
06:47:53Bevois X Server a linux dist?
06:48:08FromGitter<kaushalmodi> No
06:48:39FromGitter<kaushalmodi> Look into Xming X server for Windows
06:49:43FromGitter<kaushalmodi> Once you have it installed, check that it's working by launching any GUI application, like PDF viewer from WSL console.
06:50:02FromGitter<kaushalmodi> If that works, Emacs GUI will work too.
06:52:32Bevoyeah I might do a straight windows or linux install first
06:52:54BevoI'd rather learn coding then spend hours/days tweaking a setup
06:53:45BevoI've copied that info though for later, cheers KM
06:58:00*lompik quit (Quit: WeeChat 2.1)
07:04:29Bevo@kaushalmodi how do you install the nim plugin for amacs?
07:04:45Bevois there just one to install?
07:35:00*user1101 joined #nim
07:52:33*yglukhov[i] joined #nim
07:54:12FromGitter<Varriount> @kaushalmodi Just merged in your terminal PR
07:54:23*gigglemoose joined #nim
08:05:08gigglemoosehey guys. i'm denser than concrete and can't figure out how to actually compile nim source code on windows 10. anyone able to help me out?
08:05:32FromGitter<tim-st> what doesnt work?
08:05:52FromGitter<tim-st> can you execute `nim --version` and `gcc --version`?
08:06:26gigglemooseno, i get "'nim' is not recognized as an internal or external command..."
08:06:37gigglemooseprobably i'm missing something in the install process
08:07:15gigglemooseor my brain's dysfunctional. either one is likely
08:08:04FromGitter<tim-st> make sure to get the latest install archive from the main page, and the latest mingw (both should be the same target 32/64) then add both directories where nim.exe and gcc.exe is to path and then you can run `nim.exe c file.nim`
08:08:17Bevodid you run finish.exe to set the path etc
08:08:44Bevoit's in your nim installation directory
08:08:51gigglemoosei did run finish but i don't think gcc is in my path at all
08:09:27FromGitter<tim-st> yes, that's a problem because nim doesnt have an installer, yet, you can set the path variable manually though
08:10:22FromGitter<Varriount> @dom96 Could you help review this? This is the kind of pull request that really requires more than one reviewer: https://github.com/nim-lang/Nim/pull/8094
08:10:29gigglemooseam i supposed to be playing with "User variables for [myname]" or "System variables"
08:10:38gigglemooseeach of those has a unique PATH
08:10:42FromGitter<tim-st> @gigglemoose System is the correct one
08:10:45Bevosystem path
08:10:53Bevothen add
08:11:03Bevo or edit
08:11:06gigglemoosethat's interesting, finish put it in my user
08:11:51FromGitter<tim-st> installing nim is the hardest part, learning nim is easy ;)
08:12:59gigglemoosealright i added ...\nim-0.18.0\bin to my path in system variables but i'm still getting nim not recognized
08:13:17Bevorestart your console?
08:15:14Bevoecho $PATH
08:15:45Bevoexport PATH=/file/path
08:15:56Bevosomething like that
08:17:11gigglemoosealright, restarting the console got nim --version working but i'm having issues compiling still
08:17:27FromGitter<tim-st> does gcc --version works?
08:17:40Bevowhat does typing gcc output?
08:17:49gigglemooseit does not. let me try to add that to path as well
08:24:39gigglemoosecan't get gcc --version working after adding C:\MinGW\bin to path
08:25:08FromGitter<tim-st> console restarted?
08:25:12gigglemooseyeah
08:25:40Bevodid Nim.finish add a new minGW?
08:25:57BevoI mean finish.exe
08:26:08FromGitter<tim-st> ensured that gcc.exe is actually in that path? mingw ships to `bin` directories, one doesnt have `gcc.exe`
08:26:09gigglemoosei'm not sure
08:26:46Bevoit did last laptop install I did, even though I had multiple minGWs already, none were compatible so it downloaded it's own
08:27:07gigglemooseyeah gcc.exe is in MinGW\bin
08:27:48FromGitter<tim-st> lol, that's a good example why nim really needs an installer, especially one that also installs gcc, not only nim
08:29:07gigglemooseany ideas as to why i can't get gcc recognized?
08:29:59FromGitter<tim-st> yes: you have the wrong path in PATH or you have not restarted all consoles; other ways arent in fact
08:31:30FromGitter<tim-st> also gcc is in System-Path?
08:32:44FromGitter<tim-st> for me these two are the important ones in system-path: `C:\Program Files\Nim\bin;C:\Program Files\mingw64\bin;`
08:33:47FromGitter<Varriount> I assume you're on Windows?
08:33:53gigglemoosei redid the gcc path and it works now. i couldn't tell you why, given that i copy pasted the exact same value, but that's working now
08:33:59gigglemooseso i can get gcc version working
08:34:09gigglemoosebut now i get a bizarre error when i attempt to compile
08:34:15gigglemooseyeah i'm on windows 10
08:34:28FromGitter<tim-st> which? do architectures match (both x64)?
08:34:54gigglemoosehttps://i.imgur.com/OlGRbJE.png
08:35:08FromGitter<tim-st> so they dont^^
08:35:42FromGitter<tim-st> please install nim x64 AND mingw64
08:36:20gigglemoosenim's definitely x64 and if mingw isn't x64 then i'm very confused as to how
08:36:53FromGitter<tim-st> https://nim-lang.org/download/mingw64-6.3.0.7z
08:37:41gigglemoosethat's the exact one i downloaded, believe it or not
08:37:54FromGitter<tim-st> you can copy `nim --version` and `gcc --version` to see if both tell you x64
08:37:59gigglemooseprobably i fucked it up. let me nuke my existing install from orbit
08:38:33gigglemoosegcc --version doesn't say anything about 32 or 64 bit
08:38:58FromGitter<tim-st> mine does: `gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0`
08:40:10gigglemoosei think i'm actually using an old version of mingw. i downloaded the mingw from the above link but i think i actually forgot to install it and it's using an old one i had
08:40:37Bevo$ gcc --version gcc.exe (MinGW.org GCC-6.3.0-1) 6.3.0
08:41:04gigglemooseyeah that's what i'm getting
08:41:05Bevothat's a few weeks old at most
08:41:18gigglemooseso i am using the proper mingw, presumably
08:41:20Bevothat's the one nim downloaded for me
08:41:36Bevowhat's the compilation error
08:41:36*dddddd joined #nim
08:41:59FromGitter<tim-st> this is what you want: https://datapacket.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z
08:42:02gigglemoosein the imgur link above ^^
08:43:32gigglemoosei'm so confused as to why this wouldn't be working
08:44:24FromGitter<tim-st> if you take the version I posted, and nim x64, and delete old paths and set new ones it will work
08:44:46FromGitter<bevo009> my system is x64, thate one above is what Nim downloaded to be compatible I assume
08:44:58gigglemoosealright i'll give that version a shot
08:46:33*cspar_ quit (Ping timeout: 264 seconds)
08:48:34FromGitter<bevo009> you can run finish.exe again IIRC and it tells you what's not right
08:48:46gigglemoosefinish.exe just instantly closes itself
08:48:57FromGitter<tim-st> dont run finish.exe that will destroy what I told you to install
08:49:21gigglemoosealright i won't
08:50:20FromGitter<tim-st> make sure to delete old paths and 1) that you are on winx64 2) have nim x64 3) have the sourceforge link gcc 4) after this set new system paths to new folders
08:50:49gigglemoosewill do
08:51:38*yglukhov[i] quit (Remote host closed the connection)
08:52:07FromGitter<tim-st> and delete `nimcache` folder before compiling next time (this is only needed if you change compiler or nim version)
08:52:10*yglukhov[i] joined #nim
08:53:11FromGitter<arnetheduck> speaking of windows.. I wouldn't mind at all if someone would want to look into getting `nlvm` to compile there - that would allow most nim apps to be compiled without mingw / gcc, simplifying distribution
08:55:10gigglemooseit compiles! thanks a ton!
08:55:56FromGitter<tim-st> no problem, I had these issues too on windows
08:56:22gigglemoosea small thing, though - the console automatically exits itself instantly once the program finishes running so i can't view the printed output. how can i change this behaviour?
08:56:27*yglukhov[i] quit (Ping timeout: 256 seconds)
08:57:00FromGitter<tim-st> dont know hat you mean, screenshot?
08:58:20FromGitter<bevo009> don't forget code runner to go with vs code/nim plugin...compile and run with ctrl-alt-N
08:59:05FromGitter<tim-st> and dont forget to set your console to "legacy" (see nim forum) before, otherwise compilation will break randomly
08:59:08gigglemoosei'm running the first program from this tutorial ( https://nim-lang.org/docs/tut1.html#the-first-program ). it prints the first statement, then i enter a string, then the console completely exits, presumably because it's finished running. this makes it so that i can't view the second and final echo
08:59:37FromGitter<tim-st> maybe this is exactly what I wrote above
09:00:54Bevowindows or a bash console
09:01:09FromGitter<tim-st> but dont know, please try other examples where you dont have "reading from console"
09:01:23*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:01:32gigglemoosei'm using windows' default command prompt
09:01:37*rauss quit (Read error: Connection reset by peer)
09:01:41gigglemoosechanging to legacy doesn't seem to have worked
09:01:59Bevoentering this? nim compile --run greetings.nim
09:02:03FromGitter<tim-st> yes, that will make a difference once you use vs code
09:02:46Bevonimc -r greetings.nim
09:02:52Bevoahh
09:03:04Bevonim c -r greetings.nim
09:03:18gigglemooseyeah i haven't used vscode in my life. right now i'm just compiling in a window then going and opening the compiled file it makes
09:03:28*rauss joined #nim
09:03:41FromGitter<tim-st> install vs code, I havent used it before too
09:04:29gigglemoosewill do
09:05:28FromGitter<tim-st> and the plugins "nim", "code runnner", "TODO Highlight" and maybe "IntelliJ Keymaps"
09:05:48gigglemooseit's funny because nim just works perfectly on my linux virtual machine
09:05:59gigglemooseit was the easiest install of my life and i don't even know what i'm doing with linux
09:06:27Bevoyou should just be able to write echo "Hello World" in notepad and save to greetings.nim, then run it in the command prompt to test it
09:06:35*craigger joined #nim
09:06:59FromGitter<tim-st> yes, linux is better for this, but I cannot use it because my battery will go down from six hours to six minutes
09:08:09*craigger_ quit (Ping timeout: 264 seconds)
09:08:29gigglemooseyeah cmd instantly exits if i don't ask for input. not particularly surprised there
09:09:25gigglemoosealright got vs code installed. now for those plugins
09:10:29*nsf joined #nim
09:10:38FromGitter<tim-st> only install intelliJ Keymaps if you used intelliJ before (intellij, pycharm,...)
09:10:52Bevowindows command prompt sucks. get conemu and use a bash
09:11:08Bevovs code has a terminal, but it's a bit tiny
09:11:46Bevobut it hooks into my conemu bash if I don't have the vs code terminal open, pretty cool
09:12:22gigglemoosethat's pretty cool
09:12:26gigglemoosei'll look into conemu
09:12:36Bevohaving said that, the windows command prompt shouldn't be closing
09:12:50Bevocan you do a screenshot before it closes?
09:15:23gigglemoosenot for the version with no input - it really is instant
09:15:54FromGitter<tim-st> when you installed all this, go to settings and set `editor.tabSize` to 2
09:16:11Bevoscreenshot the console with the command you typed in, before entering it
09:16:59FromGitter<ephja> any terminal spawned for a specific application will exit when the application exits. that workflow might be more common on windows though
09:17:08Bevothis works straight away too, and auto-compiles/runs while you type the code in... https://github.com/genotrance/snip
09:18:15Bevonot as good an editor as vs code, but quicker for small tests
09:21:03FromGitter<ephja> I don't think some of the examples using cin or whatever made sense without piping
09:21:57*jjido joined #nim
09:22:46BevoI just pasted the example code into notepad, saved it to ~/ as test.nim, then opened a windows command prompt and ran it
09:22:59BevoC:\Users\bevo>nim c -r test.nim Hint: used config file 'C:\Users\bevo\nim\config\nim.cfg' [Conf] Hint: system [Processing] Hint: test [Processing] CC: test CC: stdlib_system Hint: [Link] Hint: operation successful (11718 lines compiled; 1.467 sec total; 21.461MiB peakmem; Debug Build) [SuccessX] Hint: C:\Users\bevo\test.exe [Exec] What's your name? Bevo Hi, Bevo!
09:23:54Bevoare you doing: windows icon-right click-command prompt? or something else?
09:27:59gigglemooseright now i'm seeing if i can make vscode work so i don't have to worry about the closing command prompt. i'm compiling in one cmd and manually opening the compiled exe which opens in a second cmd, the one that crashes after execution
09:28:11gigglemoosevscode seems to ALMOST be working properly
09:28:31gigglemoosebut it only actually lets me run the code once
09:29:18FromGitter<tim-st> dont use this console read thing, that's not a good start example
09:29:40FromGitter<tim-st> instead try play with `strutils` and echo and write some procs
09:29:53Bevoecho "Hello World" is all you need to test it
09:31:14FromGitter<ephja> ok so you were compiling from a prompt but you were not running the application from the same prompt just by typing the name of the executable
09:31:28Bevopress ctrl-`, it brings up the vs code terminal
09:32:46FromGitter<ephja> @tim-st are you enjoying the automatic indentation of the Nim extension? :D
09:33:32FromGitter<ephja> I know dom does
09:34:08gigglemoosei've got the vs code terminal up (it says it's running powershell). i'm not certain what i'm supposed to be doing with it
09:34:16FromGitter<tim-st> I think if one day all these things work, nim will be the best language
09:34:53FromGitter<tim-st> why do you care about terminal? Just try some code and click "run"
09:35:25gigglemoosei don't have a way to input anything after clicking run
09:35:46Bevoecho "Hello World"
09:35:52Bevotype that in the editor
09:35:56FromGitter<tim-st> lol, do you still have this "read from console" example? skip this sh*t
09:35:59gigglemooseprinting works perfectly
09:36:16FromGitter<tim-st> I literally never read from console the last 8 months nim
09:36:16Bevosave it to hello.nim
09:37:20FromGitter<tim-st> here is some code: https://rosettacode.org/wiki/Category:Nim
09:37:51FromGitter<ephja> `echo stdin.readLine().string` that works for me in the vscode terminal
09:38:18Bevoit works on windows command prompt too
09:38:37FromGitter<ephja> yes
09:39:01*cspar_ joined #nim
09:39:09gigglemoosethe terminal doesn't do anything for me in vscode and obviously i can't input in the output tab
09:39:20Bevonot on the playground, but does work on the TIO pad
09:39:35Bevothe window at the top is the editor window
09:39:52Bevotype it in there, and ctrl-s to save it to a .nim file
09:40:06*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:40:28FromGitter<ephja> it worked for him with cmd didn't it? but then he wouldn't see the output since he didn't run the application from the same terminal, so he got a new, temporary one when he clicked on the executable
09:40:40BevoI always think it's best to start with notepad and a command prompt...simple
09:41:18gigglemooseyeah that's what was happening ephja
09:41:36gigglemoosenim itself is working i think i just don't understand vscode
09:41:59Bevobut yeah, I wouldn't compose it in a terminal when starting, let alone run it in a second terminal
09:43:29FromGitter<ephja> my code is being run from the terminal pane. that's probably why it works for me
09:43:59Bevo@gigglemoose, have you got notepad handy just for a quick test?
09:44:03gigglemoosewhat i'm doing in vscode is writing the code and pressing the run code button in the top right (i think that's from one of the extensions i was told to use)
09:44:06FromGitter<ephja> what does F6 do?
09:44:06gigglemooseyeah i do
09:44:49FromGitter<ephja> I dunno why I don't have a "run" button
09:44:57gigglemoosef6 makes everything work. apparently that's the magic answer. thanks!
09:45:16gigglemoosei didn't have a nim option in my terminal so it was only powershell and obviously that isn't gonna help much
09:46:03Bevoyeah you might have to export your path into vs codes terminal for that to work correctly, IIRC
09:46:19FromGitter<tim-st> @ephja there is vscode "Code Runner" that installs a triangle symbol which is then the run button
09:46:28Bevoif you have code runner installed, you can run it via ctrl-alt-N
09:46:49Bevoyou probably have to restart it
09:47:32gigglemoosei don't know what's going on behind the scenes but when i use code runner i can only get the program's output but everything works like it does in cmd if i just press f6
09:47:59Bevoadd this to your user preferences (ctrl-comma)
09:48:01Bevo"code-runner.clearPreviousOutput": true
09:48:07FromGitter<ephja> I'm not sure what you mean by that, but it should be possible with either cmd or powershell. the difference being that you need to do ".\app" in order to run app.exe, rather than just "app" like with cmd, though ".\app" should work there too. but "nim c -r app" will both compile and run the app for you
09:48:14Bevoclears the output bfore each run
09:49:19FromGitter<tim-st> that's very cool, thanks, I always wanted that^^
09:49:43Bevolol a live video would certainly help here...it's the blind leading the blind
09:50:12Bevo@tim-st yes some googling paid off for me there
09:51:44gigglemoosecode runner doesn't allow me to get input at all but everything works perfectly by pressing the magic f6 button so i guess i'll just use that
09:52:19BevoOne day we might be able to install a combined Nim-mingW-VS Code install, where everything just works automatically
09:52:51Bevocode runner just runs the code in your editor, and displays the output
09:53:40gigglemooseno wonder it doesn't allow input then
09:53:51FromGitter<ephja> well it would be in a child process of the editor regardless :p
09:54:12Bevojust used F6 for the first time...it runs the code in the terminal
09:54:37Bevoyeah, user input code doesn't work in code runner, nim playground, snip
09:54:53Bevoit does work in TIO's pad though
09:55:45BevoF6 is great! Thanks Tim, I always opened a console to test user input code
09:56:01Bevolook how we all learn together , aww
09:56:45gigglemooseturns out that nim's garbage installation is a learning moment for all! <3
09:57:27FromGitter<tim-st> ^^
09:57:35Bevohahaha
09:57:57Bevolinux on windows sub system was surprisingly easy
09:58:10Bevowindows, a little harder
09:58:15gigglemoosenow i just have to learn how to actually use the nim language. should be a trivial task compared to the installation process :P
09:58:41gigglemooseyeah nim just worked for me beautifully on my linux vm but the parent system seems to have been a bit of a nightmare
09:58:44gigglemoosebut it does work now!
09:58:58Bevothat's the main thing
09:59:12Bevoand you have vs code now, which makes all things better
09:59:49gigglemooseit seems like a decent enough editor
10:00:05gigglemooseas good as anything as one would expect from a new language
10:00:59FromGitter<tim-st> yes, learning nim is quite easy, also if the gcc compiler (not nim) exits with an error code in vs code, open an issue on github, that happens sometimes in special cases
10:01:34gigglemoosewill do
10:02:10gigglemoosei'm a (quite mediocre) java dev so a language like nim is a bit out of my alley but it looks pretty great thus far
10:03:23Bevoalternating between F6 and Ctrl-Alt-N, alternates between no verbosity and hints, and the default verbosity/hints...nice
10:03:51Bevohow did I not know about F6? lol
10:04:04FromGitter<tim-st> I also learnt java first because at university oracle has big contracts with the universities that they need to teach only java
10:05:36gigglemoosejava does have its advantages but i really can't stand to look at it right now :P i've done far too much coding in java lately for school and it's starting to make me hate the language
10:06:20*cspar_ quit (Ping timeout: 268 seconds)
10:08:58FromGitter<tim-st> one important point in nim if you pass an object to a proc that you want to change e.g. string you have to write `proc change*(s: var string)` instead of `proc change*(s: string)` that's important to know, other things you'll find out easily
10:10:38BevoThis basics tutorial might be too basic for you, but it's a bit more thorough than the main tutorial: https://narimiran.github.io/nim-basics/
10:10:46gigglemoosethat is very strangely specific but i'll make sure to keep it in mind
10:11:00Bevogood to cross-reference
10:12:34gigglemoosethat looks like a really good reference, thanks
10:14:03gigglemooseas a quick aside, is there any particular (understandable) reason that the syntax is "var a: int" rather than "int a"? i've never seen syntax that looks like that and it strikes me as quite odd
10:14:49FromGitter<tim-st> yes, internally it's the very same like int a; it's a check at compile time
10:15:41FromGitter<tim-st> sometime you accidently shadow a variable, then if you try to change it but declare it using `let` it doesnt work, at this time you understand you accidently accessed the wrong var
10:15:52Bevoyeah it's a bit weird coming from c-tpe syntax
10:16:15FromGitter<tim-st> so there are both `let a = 1` and `var a = 1`
10:16:24Bevoit reads implicitly like javascript also
10:16:49user1101Hi. Sorry for the noobish question, but would anyone be able to outline the difference between the three functions mentioned in this thread? https://www.reddit.com/r/nim/comments/8tggtn/basic_question_regarding_object_creation/
10:17:52Bevobut apparently it pays to declare the types
10:18:30gigglemoosei am definitely slightly reluctant to let it infer the types. maybe that just means i have trust issues lol
10:20:34FromGitter<tim-st> let and var are the very same internally
10:22:20gigglemooseis the difference between '/' and 'div' just that div converts the answer to an int?
10:23:25FromGitter<ephja> it takes two integers and returns two integers. see https://nim-lang.org/docs/system.html#div,int,int
10:24:44FromGitter<ephja> and / takes two floats and returns a float. / is also listed there
10:27:16FromGitter<ephja> "2 / 3" works, but it's not actually "/" that converts the arguments to floats. that's actually a property of the language. "2.0 div 3.0" won't work, because floats can not be implicitly converted to integers because of potential loss of information
10:27:31Bevoand use mod instead of % for remainder
10:27:49*PMunch joined #nim
10:28:22gigglemoosethat's really interesting. thanks
10:29:45Bevouse 'import math' for exponents ^
10:31:10FromGitter<ephja> Bevo: which %? :p
10:33:01FromGitter<ephja> not imported by default: https://nim-lang.org/docs/math.html#mod,T,T
10:35:47BevoI meant % in Python...modulo
10:36:11Bevoours is mod
10:38:52Bevooh yeah, gotcha...I know about the other mod in module math lol
10:47:10*yglukhov[i] joined #nim
10:55:22*zahary joined #nim
11:02:50*opi joined #nim
11:25:45*zahary quit (Quit: Leaving.)
11:25:58*stefantalpalaru joined #nim
11:27:36*gigglemoose quit (Quit: Page closed)
11:28:04Yardanicoyay, new survey
11:28:13Yardanico(for everyone who didn't see it yet - https://nim-lang.org/blog/2018/06/23/community-survey-2018.html )
11:28:28stefantalpalaruHi. The current HEAD fails to build with: "compiler/lookups.nim(233, 35) Error: type mismatch: got <string> [...] expression: getIdent(toLowerAscii(x.s[0]) & substr(x.s, 1))".
11:28:49Yardanicowhat version are you using to build HEAD?
11:29:11stefantalpalaruthe latest C source
11:30:29stefantalpalarufrom https://github.com/nim-lang/csources
11:52:55*elrood joined #nim
11:53:42shashlickFrustrating to see these Nim install issues
11:56:08*nsf quit (Quit: WeeChat 2.1)
12:16:18FromGitter<tim-st> how can I use nimscript or some eval tool to evaluate something like `1+1` at runtime?
12:21:37*leorize joined #nim
12:21:52FromGitter<GULPF> if you only care about math stuff you can use @Yardanico's lib: https://github.com/Yardanico/nim-mathexpr
12:22:21YardanicoYeah, but docs in the readme are a bit old :)
12:22:41Yardanico(but it's generally a one-file lib and can be easily extended with new functions)
12:22:42FromGitter<tim-st> @GULPF and @Yardanico perfect thank you!
12:23:44FromGitter<tim-st> especially the operators are a bit difficult to parse, that's a good help
12:24:59dom96stefantalpalaru: Which instructions are you following?
12:25:07dom96Travis tests are succeeding so there shouldn't be a problem.
12:25:21Yardanico@tim-st if you're wondering, I've based mathexpr on this SO answer: https://stackoverflow.com/a/26227947
12:25:51dom96oooh, 101 responses already
12:25:55Yardanicodom96, wow :)
12:26:23YardanicoI think we may have more than 1k answers in this survey
12:27:02dom96Would be nice :)
12:27:24FromGitter<tim-st> @Yardanico ok, thanks for the info
12:29:31dom96Someone developing on Haiku :)
12:31:26Yardanicodom96, lol
12:31:53Yardanico@tim-st you can also use tinyexpr (C library) with Nim
12:32:04Yardanicoactually mathexpr was just a wrapper for tinyexpr in the past
12:32:24Yardanicohttps://github.com/Yardanico/nim-mathexpr/commit/039f5f07714b675ca51a1ce5d0bf9928c8b9b77d
12:33:15YardanicoBut I didn't do any high-level wrappers to tiynexpr
12:33:32stefantalpalarudom96: this is where it fails, while compiling nimfix - https://github.com/stefantalpalaru/gentoo-overlay/blob/514e2d96de06d553d44b15f70eef31fb3b38e239/dev-lang/nim/nim-9999-r2.ebuild#L62
12:33:52Yardanicowhy are you building nimfix?
12:34:11stefantalpalaruwhy wouldn't I?
12:34:23dom96maybe try `./koch tools -d:release` instead
12:34:30Yardanicodom96, ./koch tools don't build nimfix
12:34:38dom96but yeah, I'm pretty sure nimfix is dead
12:34:43dom96deprecated
12:34:48stefantalpalaruoh, ok
12:35:06dom96so just use ./koch tools to build all the tools that are available
12:35:27YardanicoYeah, "./koch boot -d:release" for the compiler and "./koch tools" for all tools, very easy
12:35:52dom96you can give tools `-d:release` too IIRC
12:36:04FromGitter<tim-st> @Yardanico is there a wrapper already for tinyexpr?
12:36:23Yardanico@tim-st well, I've linked my commit with tinyexpr wrapper
12:36:54Yardanicoyou can easily create yours by using nimgen and then maybe writing some high-level procs for the wrapper
12:37:08FromGitter<tim-st> ok, thanks!
12:37:21dom96Responses are coming in fast. Already at 104
12:37:53FromGitter<ephja> ```code paste, see link```
12:38:00Yardanicodom96, yeah, I've submitted mine a few mins ago
12:44:02FromGitter<kindlychung> How do you pass members of a tuple to a proc?
12:44:19FromGitter<kindlychung> In python you can do this: `func(*list)`
12:44:28Yardanicoyou should specify them all
12:44:33Yardanicofunc(a[0], a[1], a[2])
12:44:41Yardanicobut there's a way to unpack a tuple AFAIK
12:44:50FromGitter<kindlychung> Ok, that's a bit ugly.
12:45:07Yardanicowell, why won't you pass a tuple instead of unpacking it?
12:45:43Yardanicohmm, probably it's time to update my video (https://www.youtube.com/watch?v=rUJ7Bzgv3n0 - visualisation of Nim git repo with gource)
12:46:49dom96kindlychung: You can also just pass the tuple itself, but yeah I agree it's not ideal. I wanted to add this functionality but ran into a problem.
12:47:33Yardanicodom96, what problem?
12:48:39FromGitter<kindlychung> @dom96 Really? I was trying to do something like this: `title:{}, views:{}, size:{}".fmt(mytuple)`
12:49:00FromGitter<kindlychung> the vscode extension shows that this is wrong.
12:49:20FromGitter<kindlychung> `.nimble/pkgs/strfmt-0.9.0/strfmt.nim(1206, 18) Error: Too few arguments for format string`
12:49:51Yardanicofirstly - use "strformat"
12:50:16Yardanicoor % from strutils if you don't need fancy formatting
12:50:36Yardanicoand also, why won't you just echo the tuple?
12:50:52Yardanico!eval let mytuple = (title: "hello", views: 5, size: 500); echo mytuple
12:50:55NimBot(title: "hello", views: 5, size: 500)
12:51:17FromGitter<kindlychung> @Yardanico the tuple is not named.
12:54:59FromGitter<kindlychung> And even if the tuple is named, echoing the tuple wouldn't ideal when you want to do a bit more formatting.
12:57:56Yardanico!eval import strformat; let mytuple = (1, 2, 3); echo &"{mytuple[0]}+{mytuple[1]}={mytuple[0] + mytuple[1]}" just an example
12:57:58NimBotCompile failed: in.nim(1, 104) Error: undeclared identifier: 'just'
12:58:03Yardanicoyou can easily make a "unpack" macro
12:58:21Yardanicohttps://github.com/vk-brain/Nickel/blob/master/src/utils.nim#L55 (ignore the comments, they're in Russian)
12:58:32dom96Yardanico: You cannot spread inside a macro :/
12:58:38Yardanicodom96, spread?
12:58:48dom96so we would have to do it like this: unpack(funcName, tuple1)
12:58:59Yardanicohm
12:59:00dom96which isn't as nice as funcName(*tuple1)
13:02:22FromGitter<ephja> if only argument lists were first class citizens
13:04:00dom96the problem is that a single node cannot be expanded into multiple in a way that's compatible with an argument list
13:04:18dom96I wanted Araq to add a new node kind for this but he refused :)
13:04:51FromGitter<ephja> "foo(if x: a, b, c else: d, e, f)" ;)
13:05:52Yardanicooh wait
13:11:06Yardanico@ephja oh, I realised, this won't work
13:25:18*leorize quit (Quit: WeeChat 2.1)
13:26:49*Perkol joined #nim
13:27:36FromGitter<kaushalmodi> @bevo009 Melpa is the most famous package repository for Emacs. For brevity in this channel, go through https://melpa.org/#/getting-started, and then install `nim-mode` package using the Emacs inbuilt package manager once Melpa is set up. Feel free to ask questions on the Emacs subreddit. For later, once you are comfortable with editing Nim code in Emacs, look into Org mode, Org Babel and `ob-nim` package. That will
13:27:36FromGitter... allow you to have all Nim snippets in a single Org file, with their results auto-calculated and inserted below the respective code blocks.
13:29:34PerkolI'm using ospaths.getEnv to get certain environment variable. Is there a way to convert it's tainted string to string?
13:29:36FromGitter<kaushalmodi> @Varriount Thanks for merging the PR! I'm just curious about how that commit would fare on Windows (not sure if you look at notifications on closed PR's, but I have replied to you in that PR too).
13:31:20*stefantalpalaru quit (Quit: Leaving)
13:38:18FromGitter<arnetheduck> Araq, so coming back to the globals thing ("man, I really wish I had used a global here").. while I'm very happy that there are fewer globals in the compiler now, it's such a bloody PITA to to update `nlvm`, which I guess must be nothing compared to the compiler itself.. makes you wish public exported globals were not part of the language at all.. imagine how much UB that would save - initialization orders,
13:38:18FromGitter... unresolvable cyclic refs, broken attempts at multi-threading etc etc, all gone...
13:49:40FromGitter<Varriount> @kaushalmodi Regarding the globals, that can be done in another PR, along with any fixes for Windows.
13:51:34FromGitter<kaushalmodi> OK, so will you be following up with that in a separate commit/PR? Or should that need an issue to be opened?
13:59:28*dddddd quit (Remote host closed the connection)
14:04:41FromGitter<Varriount> I don't know if I'll have the time until the end of the summer.
14:06:00FromGitter<kaushalmodi> The demo you showed seemed to work. The issues it exposed had nothing to do with the PR.
14:06:24FromGitter<kaushalmodi> I'll open an issue to track this later today if you don't get to it before.
14:09:10FromGitter<Varriount> Sure, thanks!
14:23:16*xet7 joined #nim
14:44:14PerkolHow do I concatenate strings in Nim?
14:45:02shashlick&
14:45:08Perkolstrutils.join
14:46:21YardanicoPerkol, no
14:46:37Yardanicostrutils.join is for concatenating elements from things like seqs
14:46:51Yardanicowith custom separator
14:48:58*PMunch quit (Quit: leaving)
14:49:21FromGitter<kayabaNerve> Don't forget to $ your non-string arguments!
14:50:12Yardanico?
14:50:19Yardanicoyou can't use $ with strutils.join
14:51:01Yardanicowell, you *can* if you will do it like @[$1, $2, $3], but why?
14:52:46FromGitter<kayabaNerve> I'm talking about &
14:53:38FromGitter<kayabaNerve> Don't do str & num. Do str & $num...
14:55:07*cspar_ joined #nim
14:59:42*ephja joined #nim
15:04:37Bevoahh! what does the $ operator do there? learn something every day here
15:04:59YardanicoBevo, ehm?
15:05:11Yardanicook, sorry, $ is used for stringification in Nim
15:05:28Bevohow does that work, the $ operator before num there?
15:06:02YardanicoBevo, it converts a number to string?
15:06:04Bevowhatever it is suffixed to, converts to a string
15:06:12Yardanicoif you want for you type to be able to be echoed/converted to string via $ - you need to define `$` for your type
15:06:23Yardanicoit's already defined for almost all standard types
15:06:33Bevoso I can just tag any number variables with that?
15:06:39Yardanicotag?
15:07:35Bevothat just works on variables?
15:08:09YardanicoBevo, it's an operator, it works everywhere
15:08:20Yardanico!eval echo $1; let a = 5; echo $a
15:08:22NimBot1↵5
15:08:32Bevolike echo str & $num
15:09:09Yardanicowell, you should probably read manual or tutorial, but yes, $ works both on literals and variables
15:09:16FromGitter<kayabaNerve> Whatever it's prefixed to
15:09:19Yardanicoand $ is also used by things like strutils.join or strformat module
15:09:59FromGitter<kayabaNerve> But tbh, the bigger concern is Yardanico assuming I don't know how $ works and judging me :(
15:10:08YardanicoI didn't say that you don't know $
15:10:19YardanicoAnd I didn't assume it :)
15:10:34ephja"proc p(args; result: var T): void" the proposed shortcuts seem similar to the common pattern in D where the input buffer is also returned, or if nil a new buffer created inside the function is returned
15:10:52BevoI am reading them, I've used the $ operator with strutils
15:11:05ephjaAfter it is filled with some data for example
15:13:06Bevo@yardanico i don't get your first example
15:13:16Bevowhy echo $1
15:13:18*xkapastel joined #nim
15:13:22Bevosame output as echo 1
15:13:34YardanicoBevo, echo uses $ implicitly to convert all arguments to string
15:14:00Bevoyeah but you are printing to std.out there
15:14:28Bevoso, why echo $1, when echo 1 is the same?
15:14:41YardanicoI just wanted to show you that you can convert literals to string the same way as variables
15:14:42FromGitter<kayabaNerve> echo $1 ⏎ var myStr: string = $1
15:14:45YardanicoBecause you've asked it
15:14:57Yardanico"that just works on variables?"
15:15:05FromGitter<kayabaNerve> It's proper format and practice
15:16:13BevoI think that $ is a formatb specifier in C
15:16:26YardanicoBevo, well, Nim is not C and $ is an operator in Nim :)
15:17:08Bevoit looks very similar when you use import strutils
15:17:11ephjaExamples in the system module
15:17:21BevoI'll remember that, thanks
15:18:24ephjaOf how `$` is defined, that is
15:19:32Bevoahhh...when I use $ in a formatted string using import strutils...is the $ an operator still?
15:22:00Bevolike echo "$# is a $# year old $#" % ["Ann", "30", "woman"]
15:23:09Yardanicono
15:23:24Yardanicoit's a string which is processed by % proc
15:23:43Yardanicoand % proc expects $# in string for formatting
15:23:50Yardanicobut you would probably use strformat nowadays
15:24:08Bevoor use both
15:26:17Bevoanyway cheers...now I know how to concatenate a string and an int type
15:28:34YardanicoBevo, well, techically you will concatenate string with string, but you'll convert int to string before that ;0
15:28:51FromGitter<bevo009> yes, got it
15:32:19*ephja quit (Ping timeout: 260 seconds)
15:33:26Bevois there a command to find out a variable's type, as in javascript's console.log(x, typeof x)
15:34:33FromGitter<kaushalmodi> @bevo009 https://scripter.co/notes/nim/#typetraits
15:35:01FromGitter<kaushalmodi> Assuming you are Bevo :)
15:37:48Bevoahh that's it
15:38:01Bevogood man, I've been missing that
15:38:25Bevothat's the simplest way? nothing in system?
15:40:02*edcragg quit (Quit: ZNC - http://znc.in)
15:40:19*edcragg joined #nim
15:40:32FromGitter<kaushalmodi> I believe, there's an upcoming commit to devel to fix that.. @dom96 ?
15:40:57YardanicoBevo, well, personally I don't really think that you need to echo types a lot
15:41:11Yardaniconim has a static type system after all
15:41:39Bevowell when you're learning, you want to know what's happening internally
15:41:48FromGitter<kaushalmodi> Yardanico: It's a great learning/code introspection tool
15:41:49Bevoyou already know what's going on
15:42:14FromGitter<kaushalmodi> If you want to do "<foo> is <type>" base case statements, it's useful to know the exact type
15:42:47FromGitter<kaushalmodi> But in general being able to introspect the types gives me more confidence in the code
15:43:01Yardanicowell, I use VSCode and I can easily see all the types :)
15:43:18Yardanicobecause you can get types via nimsuggest and Nim extension uses nimsuggest
15:43:28FromGitter<kaushalmodi> Example: Using typetraits, I could make this commit with confidence: https://github.com/kaushalmodi/nim-emacs-module/commit/2c36e0c754e2b318c6560c49507d6117221c4347
15:44:10*find0x90 joined #nim
15:44:17FromGitter<kaushalmodi> Yardanico: For interactive use, I agree that nimsuggest, etc. are useful. But at times I disable it as it gets too sluggish.
15:44:28Yardanicowell, that can be fixed :P
15:48:56*yglukhov[i] quit ()
15:51:48Bevoecho $x.type
15:51:57Bevothat's what I was after...cheers
15:52:19FromGitter<mratsim> killall nimsuggest and killall nim are your friend
15:54:19Bevo@kaushalmodi is something like that getting included in system?
15:55:20FromGitter<xmonader> Hello guys I'm flattered that my book is mentioned in the nim survey. Hope we get great feedback, I submitted my feedback already :)
16:00:36FromGitter<kaushalmodi> @bevo009 See https://github.com/nim-lang/Nim/pull/7100. Hoping for that to get merged soon.
16:02:49Bevo"I don't want it in system.nim. Nor do I want people to echo types."
16:03:09BevoI don't know if that's going through...
16:03:49BevoI'd like it in system anyway, I'm used to that in javascript
16:06:21*cspar_ quit (Ping timeout: 260 seconds)
16:06:53FromGitter<kaushalmodi> Araq later mentioned somewhere in the IRC that he eventually approved this. Maybe I misunderstood.. he and @dom96 can confirm :)
16:07:37*Perkol quit (Quit: Leaving)
16:08:44BevoCool...does most of the new stuff in the devel version, make it into the next stable release?
16:10:23YardanicoBevo, of course
16:10:56YardanicoBevo, devel doesn't meant "a lot of bad features"
16:11:07Bevoa didn't say that
16:11:24Bevofeatures being tested
16:11:25Yardanicowell, I mean that it's almost impossible that something added to devel will not make it to stable
16:11:33Yardanicoall PRs are reviewed before merging to devel
16:12:01Bevowhen is 1.9 scheduled for release?
16:12:16Bevoor whatever the next version number is
16:12:27FromGitter<kaushalmodi> At least for a non-advanced user like me, devel is *more stable* than stable 'D
16:12:31federico30.19.0 ?
16:12:38*cmk_zzz quit (Ping timeout: 268 seconds)
16:12:49Bevohaha yeah that's what I meant
16:13:01Bevowe're not at 1.0 yest
16:13:15Yardanico@kaushalmodi I think that it's better to always use devel for now
16:13:17Yardanicobefore 1.0 :)
16:13:18federico3Bevo: releases are never really scheduled.
16:13:56Bevois there a usual period, like a few months between?
16:13:59Yardaniconot really
16:14:14Yardanicobugfix releases can happen after a few weeks after a release
16:15:30Bevoso basically almost all new features in devel will get into the next stable release
16:15:43YardanicoBevo, yes
16:16:03YardanicoI don't remember a situation when some feature was added to devel and didn't make it to stable
16:16:18Bevoexcellent
16:17:02Bevoyou need to install choosenim to get the devel release?
16:17:11YardanicoBevo, not really
16:17:20Yardanicoyou can just compile devel with nim 0.18.0
16:17:28Yardanicojust clone nim repo and follow instructions from readme
16:18:06Yardanicothere's a few breaking changes in current devel, biggest one is that you can't access null terminator in strings anymore
16:18:16Yardanico(you can see all big changes in changelog.md)
16:20:20*TheLemonMan joined #nim
16:20:42TheLemonMandear #nim people, do you expect static: blocks to introduce their own scope?
16:21:12FromGitter<kaushalmodi> Bevo: Here's my Nim devel build script (M-x gist-buffer ;-)): https://gist.github.com/93c342b86ce38c6c3d79933b8af0d11d
16:21:31Yardanico@kaushalmodi hmm, seems to be a lot of lines :P
16:21:47Yardanicoah, you're making your own choosenim :D
16:22:47FromGitter<kaushalmodi> Yardanico: Its nim + nimpretty + web docs + whole kitchen sink :P
16:23:29FromGitter<kaushalmodi> I use GNU Stow for my package management, so the script respects that installation structure
16:24:09FromGitter<kaushalmodi> Using this I can install multiple versions of Nim on the same system (choosenim doesn't work on RHEL 6.6... there's an open issue for that)
16:32:56shashlickWhat's the issue on rhel
16:34:52Yardanicowell, it's VERY old
16:35:01Yardanico@kaushalmodi are you using RHEL as your desktop system?
16:35:52dom96TheLemonMan: Sure I guess
16:36:11Yardanicoshashlick, RHEL 6.6 is based on Fedora 12 and Linux 2.6.32-504
16:36:31Yardanicoone solution would be to use musl with choosenim (to statically compile it)
16:41:07FromGitter<kaushalmodi> Yardanico: Not by choice as proprietary work software depends on that OS
16:41:14Yardanicook then :(
16:42:03FromGitter<kaushalmodi> If anyone is knowledgeable musl stuff, the issue I referred to is this: https://github.com/dom96/choosenim/issues/15
16:46:41shashlickSo you are compiling from source right?
16:48:29Yardanico@kaushalmodi ah, yes, why wouldn't you just compile choosenim yourself? :D
16:53:11FromGitter<kaushalmodi> shashlick: Yes
16:53:59FromGitter<kaushalmodi> Yardanico: This script believe it or not is simple for me, than trying to read and understand choosenim, because it's the same bash script template I use for dozens of other software.
16:55:57shashlickWell I think it's more sensible to get choosenim into all the distros
16:56:07shashlickSo you can apt or yum install
16:56:17shashlickNim as well
16:59:28FromGitter<Varriount> Also, is choosenim on the website?
16:59:52FromDiscord<treeform> @dom96, good job on the BelFOSS 2018 presentation, just watched it, its the kind of thing we need to get nim out there.
17:00:02dom96treeform: thanks! :)
17:00:13FromGitter<Varriount> @kaushalmodi Wow, you've been here for over a year?
17:01:16*cspar_ joined #nim
17:06:21FromGitter<kaushalmodi> @Varriount How did you tell?
17:07:02FromGitter<kaushalmodi> nvm, that issue I referred.. got it :) I was here about a year back.. but not active on IRC, and I had very sour experiences with Nim then.
17:07:34FromGitter<kaushalmodi> Then I left my attempts to learn Nim for a long time.. and since a month back, I am back :)
17:07:51shashlickDid you give your feedback on the survey?
17:07:55FromGitter<kaushalmodi> Yep
17:09:51shashlickOk hope you feel more welcome now
17:10:02shashlickWhat's your main goal with learning Nim?
17:10:39FromGitter<kaushalmodi> goal 1 is not too big.. simply to stop using bash scripts
17:10:41shashlickVarriount: choosenim is still not on the http://Nim-Lang.Org website
17:11:06FromGitter<kaushalmodi> goal 2 is to interface Nim compiled .so with SystemVerilog (an ASIC design/verification language)
17:11:08dom96it is, but only for Unix
17:11:14shashlickThere's still several fixes I want to do in the whole installer space
17:12:26shashlickdom96: I didn't notice that
17:14:52dom96I guess you're running Windows?
17:16:03dom96so you never look under the Unix section
17:16:08shashlickPrimarily, but also have a Linux box to dev and test
17:16:27shashlickNever looked at the Unix page
17:17:28shashlickJust built from scratch, also referred to the choosenim repo
17:18:26shashlickI mainly have seen complaints around installing on Windows so that's been my main focus
17:26:33federico3TIL: shared compilation cache tool https://github.com/mozilla/sccache
17:31:30*Vladar joined #nim
17:35:22*nsf joined #nim
17:46:22*Death916 joined #nim
17:47:11FromGitter<kindlychung> is there something similar to python's `__file__`?
17:48:25Yardanico@kindlychung you want to get current filename?
17:48:36Yardaniconame of the source file?
17:48:49FromGitter<kindlychung> yes.
17:49:17Yardanicoyou can use instantiationInfo().filename
17:49:20Yardanicowhat do you need this for?
17:49:26dom96!eval echo(instantiationInfo().filename)
17:49:29NimBot???
17:49:32Yardanico???
17:49:35dom96lol
17:49:47dom96It should work in most cases, here are the docs https://nim-lang.org/docs/system.html#instantiationInfo,
17:49:59Yardanicodom96, wait what
17:50:02FromGitter<kindlychung> I want to get the directory of the source file, especially when `isMainModule` is true.
17:50:05Yardanicoit doesn't work locally too
17:50:25dom96Maybe it doesn't work in a glocal scope
17:50:29FromGitter<kaushalmodi> Yardanico: Works, I used it last week in that Emacs module Nim interface
17:50:39Yardanicodom96, ah, probably
17:51:17FromGitter<kaushalmodi> There, the use was in a var in a template
17:53:52FromGitter<kaushalmodi> .. it was in static: block
17:55:12FromGitter<kindlychung> @dom96 I got a ???
17:55:42dom96Try inside a procedure
17:55:57Yardanicoyeah
17:55:57dom96Pretty sure this is a bug though, someone report :)
17:56:53FromGitter<kindlychung> I just tried putting it in a main() proc, still the same.
18:02:57*cmk_zzz joined #nim
18:08:12*Trustable joined #nim
18:09:26dom96strange
18:09:42dom96hrm, maybe it's only available when an exception is raise
18:09:44dom96d
18:14:15elroodapparently only available in templates. you could try currentSourcePath
18:16:06*wmclt joined #nim
18:16:30*captainbland joined #nim
18:17:11FromGitter<kindlychung> currentSourcePath also gives ???
18:18:42*wmclt quit (Quit: Leaving)
18:19:12FromGitter<kindlychung> Ah, my bad, compiled the wrong file. currentSourcePath works.
18:36:36*TheLemonMan quit (Quit: "It's now safe to turn off your computer.")
18:37:49*dddddd joined #nim
18:51:41*jjido joined #nim
19:05:27FromDiscord<awr> how do you do elif in nim.cfg? is it `@elif x:` or `@else if x:`
19:10:44Araq„provides access to the compiler's instantiation stack line information of a template.“
19:11:28Araqworks as expected
19:11:31*Araq shrugs
19:12:07Yardanico¯\_(ツ)_/¯
19:13:57FromGitter<kaushalmodi> Reminds me of that Reddit bot :)
19:14:20FromGitter<kaushalmodi> Left arm: `\\\`: ¯\\\_(ツ)_/¯
19:14:58FromDiscord<awr> i have some passC stuff i'm adding in my nim.cfg under `@if gcc or clang:` and `@elif vcc:` but the gcc/clang stuff keeps getting added when i set the compiler to vcc
19:28:45captainblandhey, anyone in here familiar with dts2nim?
19:30:38*zahary joined #nim
19:32:59captainblandor to be more specific, does anyone have any idea how to get it to produce something useful for functions which have an 'any' type result? If not, maybe I can just fork it and try and get something to work...
19:35:38Yardanicowell, there's "any" type in Nim too
19:38:21*jjido quit (Ping timeout: 240 seconds)
19:43:00captainblandYeah, I've seen that. I was kind of wondering if anybody was familiar and knew how to force it to map that to nim's any.
19:43:44captainblandbut I think that might require modification. That being said, it seems that there is more type information here, so it might be worth seeing if I can get it to work properly.
19:43:53Yardanicowell, chances are, if TypeScript code uses "any", this code won't work with nim
19:44:11Yardanicois dts2nim is for TS->Nim right?
19:44:16captainblandyeah that's right#
19:45:01captainblandLooking at some of the places it's seeing 'any', it looks like it might be ignoring the actual type information in this case
19:47:56captainblandLike it seems to be reducing a function that returns a type based off of this: export interface Simulation<NodeDatum extends SimulationNodeDatum, LinkDatum extends SimulationLinkDatum<NodeDatum> | undefined>
19:47:58captainblandto 'any'
19:49:10captainblandI guess maybe there's a simplification of that that the tool would look better. I'll play around with that for a bit
19:49:18captainbland*like better
19:55:36captainblandAh, right I see. This was never going to work because the tool doesn't support generics. Heh
20:00:20*PMunch joined #nim
20:22:27Yardanicohmm https://github.com/nim-lang/Nim/issues/8111
20:22:37Yardanico"Neil Hodgson, the head of Scintilla, states that submitting and updating lexers is the sole responsibility of the contributor. So, we can't expect him to update it himself." strange philosophy
20:31:19captainblandI guess they don't think they have the people to maintain all the languages it supports
20:32:31*yglukhov[i] joined #nim
20:33:45*yglukhov[i] quit (Client Quit)
20:37:59FromGitter<alehander42> well it's not strange indeed, it's like expecting sublime authors to maintain all the lang plugins
20:39:10FromGitter<alehander42> @captainbland you can use `js` type for `any` in some cases
20:39:24Yardanicobut by this statement he means that we can't update lexers
20:39:28Yardanicoonly the creator of a lexer can
20:40:20FromGitter<mratsim> yeah his statement is like only the original contributor or himself can update a lexer
20:40:45FromGitter<alehander42> the `js` type, you can also fork it of course and add support
20:43:46*Trustable quit (Remote host closed the connection)
20:44:06captainbland@alehander42 - Thanks, I'll take a look at that
20:49:42*nsf quit (Quit: WeeChat 2.1)
21:01:20*elrood quit (Quit: Leaving)
21:01:48*hutfolk joined #nim
21:07:16FromGitter<kindlychung> what is the state of desktop gui for nim?
21:08:44Yardanicothere's IUP, qml, NiGui, high-level gtk3 bindings, libui bindings, wxwidget bindings
21:11:02*zahary quit (Quit: Leaving.)
21:12:17*hutfolk quit (Quit: Mutter: www.mutterirc.com)
21:14:48*brainproxy quit (Ping timeout: 268 seconds)
21:15:05FromGitter<kindlychung> recommend-ability in that order? :)
21:15:32*brainproxy joined #nim
21:21:38Yardaniconot really
21:22:00Yardanicothey're in "which one is faster to remember" order :P
21:36:20*rockcavera joined #nim
21:46:33*cspar_ quit (Ping timeout: 264 seconds)
21:52:46*Vladar quit (Quit: Leaving)
21:55:06*cspar_ joined #nim
21:55:31*hutfolk joined #nim
21:58:17*hutfolk quit (Client Quit)
21:58:56shashlickPick an app you like, find out which GUI toolkit it uses, use it
21:59:30shashlickEvery single GUI toolkit starts as a simple abstraction and grow from there into a full fledged ecosystem
22:04:39shashlickI don't think GUI making is a fun endeavor
22:04:55*hutfolk joined #nim
22:14:44*hutfolk quit (Quit: Mutter: www.mutterirc.com)
22:19:24*hutfolk joined #nim
22:22:11*hutfolk quit (Client Quit)
22:22:35*hutfolk joined #nim
22:23:44*captainbland_ joined #nim
22:26:05*hutfolk quit (Client Quit)
22:26:35*captainbland quit (Ping timeout: 240 seconds)
22:28:14*PMunch quit (Quit: leaving)
22:58:10*find0x90 quit (Ping timeout: 245 seconds)
22:58:37*find0x90 joined #nim
23:20:03*cspar_ quit (Ping timeout: 256 seconds)
23:23:21FromDiscord<treeform> I am working on a GUI system right now.
23:25:06FromDiscord<treeform> I feel like GUI systems need a drag and drop editor. Everything ART like does, 3d - there are editor, 2d - there are photoshop and stuff, sound, there are sound editors...
23:25:30FromDiscord<treeform> but for UI people opt out to do text stuff? with crappy formats like XML why...
23:26:21FromDiscord<treeform> Also I really like immediate mode programming style for UI. I been using a pseudo immediate mode UI system for about 4 years?
23:26:25FromDiscord<treeform> Also I really like immediate mode programming style for UI. I been using a pseudo immediate mode UI system for about 4 years.
23:26:28FromDiscord<treeform> And I really like it.
23:26:56FromDiscord<treeform> I am trying to figure out how to merge an Editor and immediate mode UI.
23:31:21shashlickNice
23:31:32shashlickDo you have anything posted online?
23:34:32*themagician_k joined #nim
23:35:12FromDiscord<treeform> Not it still kind of sux
23:36:01*themagician quit (Ping timeout: 248 seconds)
23:36:14shashlickI'm going to attempt wrapping xamarin forms when I get a chance
23:37:44FromDiscord<treeform> c#?
23:40:01shashlickYep
23:40:16shashlickYou can generate c headers apparently
23:40:30shashlickhttps://github.com/mono/Embeddinator-4000
23:42:22FromGitter<Varriount> Yay! My Nim shell executed its first command!
23:43:09FromGitter<ephja> was it sl?
23:43:51FromGitter<Varriount> Nope, the first command was `nim --help`
23:52:36FromGitter<kayabaNerve> sl or ls ?
23:53:40FromGitter<Varriount> @kayabaNerve Now I need to implement variable interpolation. That will be interesting.
23:54:48FromGitter<ephja> steam locomotive
23:56:49shashlickWill it work on Windows?
23:57:06FromGitter<Varriount> It should. It only uses standard library components.
23:58:00FromGitter<Varriount> So it's more of a "learn how a shell is put together", rather than "built a bash clone"
23:59:25*NimBot joined #nim