<< 31-05-2017 >>

00:04:11*Jesin joined #nim
00:10:38*BitPuffin quit (Read error: Connection reset by peer)
00:16:36ehmryephja: turns out the better way to for me to get a string from a buffer pointer was to wrap the source in a streams interface
00:26:05*rauss joined #nim
00:32:10*benny__ joined #nim
00:32:10*benny_ quit (Read error: Connection reset by peer)
00:32:12*skrylar joined #nim
00:52:58*benny__ quit (Read error: Connection reset by peer)
01:01:47*yingjun_ joined #nim
01:02:40*yingjun_ quit (Remote host closed the connection)
01:03:22*yingjun_ joined #nim
01:05:28*skrylar quit (Quit: Leaving)
01:12:08*chemist69 quit (Ping timeout: 246 seconds)
01:26:11*chemist69 joined #nim
01:35:31ftsflibman, pretty sure everyone here is willing to help noobs, seems silly to make another channel for it?
01:54:39*rauss quit (Quit: WeeChat 1.8)
02:01:03*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
02:49:26*skrylar joined #nim
02:49:28skrylarme wobbles on in
02:49:31*skrylar fails to emote
02:57:13*libman quit (Quit: Connection closed for inactivity)
02:58:39*vlad1777d joined #nim
03:13:43*chemist69 quit (Ping timeout: 260 seconds)
03:14:38*skrylar quit (Ping timeout: 246 seconds)
03:17:30*def-pri-pub quit (Quit: leaving)
03:17:50*chemist69 joined #nim
03:27:18yingjun_hello
03:32:51*daaf quit (Ping timeout: 260 seconds)
03:36:30ftsfo/
03:37:34*yingjun_ quit (Remote host closed the connection)
03:37:49*yingjun_ joined #nim
03:39:11*yingjun_ quit (Remote host closed the connection)
03:41:42*yingjun_ joined #nim
04:08:43*pilne quit (Quit: Quitting!)
04:23:34*skrylar joined #nim
04:50:12*yingjun_ quit (Remote host closed the connection)
04:50:22*yingjun_ joined #nim
04:51:46*yingjun_ quit (Remote host closed the connection)
05:08:15*yingjun_ joined #nim
05:30:35*skrylar quit (Quit: Leaving)
06:00:08*byte512_ joined #nim
06:01:48*yingjun_ quit (Remote host closed the connection)
06:01:58*yingjun_ joined #nim
06:02:55*yingjun_ quit (Remote host closed the connection)
06:03:05*byte512 quit (Ping timeout: 240 seconds)
06:31:32*xet7_ is now known as xet7
06:32:04*Arrrr joined #nim
06:32:04*Arrrr quit (Changing host)
06:32:04*Arrrr joined #nim
06:33:17*yingjun_ joined #nim
06:36:45*nsf joined #nim
06:38:38*rokups joined #nim
06:40:17*vlad1777d quit (Remote host closed the connection)
07:11:13*gokr joined #nim
07:14:43*yglukhov joined #nim
07:19:13*xet7 quit (Ping timeout: 260 seconds)
07:21:02*chemist69 quit (Ping timeout: 246 seconds)
07:26:06*chemist69 joined #nim
07:41:46*Andris_zbx joined #nim
07:54:04*Vladar joined #nim
07:58:42FromGitter<mratsim> @dandevelop I think you should try doing your code the Nim way instead of the OO way, you can use procedures instead of OO get and set
07:59:25FromGitter<mratsim> for a get the input is `proc field (o: object, v: value) = ….`
08:00:01FromGitter<mratsim> for a setter the proc is `proc field(o: var object, v: value) = o.field = value
08:11:38*yglukhov quit (Remote host closed the connection)
08:13:39*yglukhov joined #nim
08:13:41*yglukhov quit (Remote host closed the connection)
08:24:14ArrrrIs there a less hacky way to convert to string template arguments? https://glot.io/snippets/eqd5j79nem
08:29:54*lenstr quit (Ping timeout: 240 seconds)
08:37:35*yglukhov joined #nim
08:39:18*yingjun_ quit (Remote host closed the connection)
08:39:28*yingjun_ joined #nim
08:40:51*yingjun_ quit (Remote host closed the connection)
08:43:16*benny_ joined #nim
08:45:46*yingjun_ joined #nim
08:50:45FromGitter<zacharycarter> is it possible to make a member of an object static? IE shared amongst all instances?
08:51:44FromGitter<zacharycarter> I see the answer is no
08:54:30*BlaXpirit joined #nim
08:57:55*krux02 joined #nim
08:59:59*Lord_Nightmare2 joined #nim
09:00:02*abruanese_ joined #nim
09:01:04*Lord_Nightmare quit (*.net *.split)
09:01:04*oprypin quit (*.net *.split)
09:01:06*abruanese quit (*.net *.split)
09:01:08*BlaXpirit is now known as oprypin
09:01:08*Lord_Nightmare2 is now known as Lord_Nightmare
09:01:11FromGitter<mratsim> @zacharycarter You can maybe use (hack?) the type signature for that ⏎ ⏎ ```type Foo[Bar: static[Baz]] = object ⏎ …``` [https://gitter.im/nim-lang/Nim?at=592e8657fcbbe1891c60d5a2]
09:01:27ArrrrThere are easy workarounds https://glot.io/snippets/eqd6ke5sfw
09:01:28*abruanese_ is now known as abruanese
09:01:51FromGitter<zacharycarter> thanks
09:26:29*benny_ quit (Remote host closed the connection)
09:29:28*chemist69 quit (Ping timeout: 272 seconds)
09:33:11Araqhttps://github.com/nim-lang/Nim/issues/5917 is embarrassing, any takers?
09:33:21Araqin fact, please rewrite OrderedTable
09:33:32Araqit's sluggish and json depends on it
09:33:59*chemist69 joined #nim
10:02:45*vlad1777d joined #nim
10:08:41*Etheco joined #nim
10:21:04*kunev quit (Ping timeout: 246 seconds)
10:38:01*arnetheduck joined #nim
10:40:25*yingjun_ quit (Remote host closed the connection)
10:44:30*yingjun joined #nim
10:50:29gangstacatdom96, what is the difference between `something` and ``something`` on the website? that seems to produce the same effect (the one used to inline code or technical terms), which one should be used?
10:52:21FromGitter<dom96> There isn't a difference
10:56:55gangstacatdo we apply an unification on the whole website or don't we care (like `` instead of ` and * instead of - for lists)?
11:02:31*Snircle joined #nim
11:05:10*yingjun quit (Remote host closed the connection)
11:11:49*Jesin quit (Ping timeout: 246 seconds)
11:22:41*benny_ joined #nim
11:43:21*kunev joined #nim
11:47:40*benny_ quit (Remote host closed the connection)
12:05:54*yingjun joined #nim
12:10:16*yingjun quit (Ping timeout: 246 seconds)
12:12:26*yglukhov quit (Remote host closed the connection)
12:21:44*Parashurama joined #nim
12:23:18*yglukhov joined #nim
12:23:57*yglukhov quit (Remote host closed the connection)
12:26:47Parashurama@Araq: about OrderedTable. The PyPy & Python guys now uses a dict (hashtable) implementation that supposedly keep insertion order.
12:26:48ParashuramaIt doesn't mean , it's perfect for our use case, since python has different performance than Nim, but it serve as a base.
12:26:49Parashuramasee: https://morepypy.blogspot.fr/2015/01/faster-more-memory-efficient-and-more.html
12:26:51Parashuramahttps://github.com/python/cpython/blob/master/Objects/dictobject.c
12:27:04AraqI know
12:27:24Araqthat's why I'd like to rewrite it and use the same algorithm
12:28:15*krux02 quit (Remote host closed the connection)
12:35:55ParashuramaYou meant you'd rewrite it, or someone else can do the job?
12:35:57Parashurama
12:36:46Araqsomebody else can do it, I'm sure.
12:37:26ParashuramaAraq: btw, did the 'mix' function in 'colors' module ever work?
12:38:16ParashuramaThere are apparently some problem with nested templates in current devel.
12:39:29*yglukhov joined #nim
12:39:30*nsf quit (Quit: WeeChat 1.7.1)
12:39:40ParashuramaI think i will take a closer look at dictobject.c to see how it's implemented in CPython, and see how it compares in nim.
12:51:16*pilne joined #nim
12:54:25dom96gangstacat: it doesn't matter, it's the same thing.
13:04:49*benny_ joined #nim
13:06:45*Jesin joined #nim
13:19:11arnetheduckAraq, https://github.com/nim-lang/Nim/pull/5818? once that is done, I'll push debug support for nlvm, pretty cool
13:19:49arnetheduckgives native-like debugging support in gdb
13:36:38FromGitter<dandevelop> @mratsim the setter`proc field(o: var object, v: value) = o.field = value` does not give the option to write `object.field=value` and run additional code when setting the value
13:38:35*nsf joined #nim
13:40:29*chemist69 quit (Ping timeout: 255 seconds)
13:40:51shmupwhat'd be a nice/quick way to test that nim is infact reading from a config. on windows, put it in %APPDATA%, nim c is still trying to use gcc.exe (I configured it to use cl.exe via config)
13:41:13shmuphttps://nim-lang.org/docs/nimc.html#compiler-usage-configuration-files
13:45:12*chemist69 joined #nim
13:46:46*xet7 joined #nim
13:51:22*benny_ quit (Remote host closed the connection)
13:59:09*Jesin quit (Quit: Leaving)
14:00:39shmupftsf: hm. ok. compiling a minimal nico example using cl.exe and it does compile! although.. => could not import: SDL_CaptureMouse
14:02:18*abruanese quit (Remote host closed the connection)
14:02:45shmupi'm using SDL 2.0.5 which should def be fine, so, hm.
14:02:56ftsfhmm yeah, that sounds fine
14:03:11ftsfit's failing during linking?
14:04:55shmupwell it's not explicitely yelling at me
14:05:19ftsfbut that import error, where's that happening?
14:05:29shmupoh, run time
14:06:19ftsfoh that's very strange
14:06:22shmupi'm just trying to solve this windows stuff since with work, I am on windows often, heh. this is def more of a pain in the ass. will be nice to solve it tho
14:07:16ftsfmaybe the windows import library
14:07:22ftsfi'm not sure how those work
14:07:37dom96Make sure that the DLL and EXE have the same CPU architecture.
14:07:46*yingjun joined #nim
14:07:49shmupwell that might explain it dom96 because i'm using x86 SDL however...
14:07:50dom9664 bit DLLs won't work with a 32 bit EXE
14:08:06shmupignoring unknown option '--platform:x86'
14:08:32shmupif I use --cpu:i386 it does that ^ if I leave it off, it does same thing but :amd64
14:09:14shmupit's possible I need to do some more configuration in nim.cfg for this windows stuff?
14:09:30*Jesin joined #nim
14:11:54*yingjun quit (Ping timeout: 240 seconds)
14:15:04*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
14:20:37*gokr quit (Ping timeout: 255 seconds)
14:21:48*rauss joined #nim
14:24:33FromGitter<dandevelop> Does anyone know a Dash docset for Nim?
14:25:29FromGitter<andreaferretti> you can generate it with https://github.com/wicast/nim-docset
14:25:59*yglukhov quit (Remote host closed the connection)
14:27:28ehmryis there a paste service with nim highlighting support?
14:34:31dom96gist
14:34:58*mosORadi joined #nim
14:35:22euantorThe Nim playground could really do with a share link, like glot.io
14:35:35euantorI believe that was a planned feature
14:44:12FromGitter<dandevelop> Thanks @andreaferretti , worked great!
14:44:22shmupehmry: ix.io should work too
14:44:34shmuphttp://ix.io/client for a helpful script
14:55:05*gokr joined #nim
14:56:51*smt_ joined #nim
15:00:40*smt quit (Ping timeout: 255 seconds)
15:01:00ehmryNim support for the Genode OS is official now https://genode.org/documentation/release-notes/17.05#Nim_programming_language
15:04:12ehmryit works, but no nimble support yet
15:05:05dom96awesome. First time i'm hearing of Genode OS.
15:06:01ehmryI snuck support into the 0.17 release, and now this is integration in the gnode build system
15:06:25ftsfshmup, can you try the latest nico?
15:06:37dom96ehmry: nice! :)
15:06:37ftsfhopefully it should JustWorkTM now
15:08:22*yglukhov joined #nim
15:11:23*yglukhov quit (Remote host closed the connection)
15:11:39shmupftsf: sdl2.nim(182, 10) Error: undeclared identifier: 'STBIException'
15:12:46shmupI re-nimble installed nico and tried compiling the usual successful way, with gcc/msys
15:13:02ftsfhmm
15:13:13ftsfnimble install stb_image ?
15:13:29shmupI have your 1.2 one installed but I'll do it again
15:13:34ftsfahh it needs 1.3
15:13:38ftsfi'll update the dep
15:13:49euantorehmry: Cool. I hadn't heard of Genode before now either. I like the integration of the compiler into the standard toolchain
15:17:26ftsfhttp://static.impbox.net/nico/examples/platformer.html \o/
15:17:37ftsfcompiling to JS is so cool
15:18:00ehmryI'm in the process of making wrappers for writing native components
15:18:28shmupcompiles fine now ftsf
15:18:36ftsfshmup, awesome \o/
15:18:45ftsfswitched over to sdl2_nim you suggested
15:18:50ftsfseems to be more updated
15:19:23ehmrythere is some potential optimizations if the libc were bypassed, but not a huge priority now
15:20:11shmupftsf: nice, nice. glad it wasn't a pain in the ass
15:20:19shmupSDL_CaptureMouse is a thing I'm gonna tackle later
15:20:48ftsfSDL_CaptureMouse: This function is available since SDL 2.0.4
15:20:49ftsfhmm
15:20:56ftsfcould be an old SDL2.dll somewhere?
15:22:23shmup2, 0, 3, 0 C:\Windows\System32\SDL2.dll
15:22:24shmuplol
15:22:26shmupwoops :)
15:22:30*yglukhov joined #nim
15:22:38shmupwell I can fix this later pr easily then. good to know.
15:22:55shmupSwear .. my .. SDL zip here says 2.0.5 so I don't know what the heck I did.
15:26:13*gokr quit (Ping timeout: 240 seconds)
15:26:25*rauss quit (Ping timeout: 268 seconds)
15:26:57*Trustable joined #nim
15:27:04*smt_ is now known as smt
15:27:10*rauss joined #nim
15:27:44*yglukhov quit (Remote host closed the connection)
15:33:19shmupall resolved.
15:35:50shmuphm ftsf did you change paintout? it doesn't show the hello_world anymore, just paint flyin
15:37:03*smt_ joined #nim
15:40:27*smt quit (Ping timeout: 240 seconds)
15:41:07ftsfshmup, hmm might not be loading the font
15:41:21ftsfany message on console about the font?
15:42:02shmupman. no message but you're totally right.
15:42:32shmupi thought i copied paintout.nim before and compiled, without those assets. surely I am mistaken.
15:44:42ftsfdoes examples/assets/font.png exist?
15:45:09ftsfdid you create the examples with `nimble examples` ?
15:46:07shmupit does, it's fine. you were right and all, I just was mistaken that I ever compiled it outside of nico/examples. all good
15:46:27ftsfcool =)
15:46:34ftsfglad it's all working now
15:47:15shmup:) do you have anything on itch.io ?
15:47:34ftsfhttps://impbox.itch.io/ yep!
15:47:38shmupoh, I see. you're impbox, not just nico
15:47:45ftsfsorry, too many handles =(
15:47:56shmuper unless nico.itch.io is not you :P
15:48:06shmupyeah, lol, I saw you have another github as well
15:48:06ftsfit's not
15:48:11shmup(I believe using your real name)
15:48:21ftsfi'm just ftsf and impbox
15:48:24ftsfnico is the project name
15:48:35*yglukhov joined #nim
15:55:57*arnetheduck quit (Ping timeout: 240 seconds)
15:58:47shmupneat mechanics youre toyin with in this platformer
16:00:10ftsfit's basically a clone of another game called Downwell
16:00:22ftsfwell, start of a clone
16:01:46*yglukhov quit (Remote host closed the connection)
16:08:49*PMunch joined #nim
16:12:44*Neomex joined #nim
16:13:42*ofelas joined #nim
16:24:33*Andris_zbx quit (Remote host closed the connection)
16:26:38*yglukhov joined #nim
16:29:24shmupoh indeed it is
16:30:57*yglukhov quit (Ping timeout: 258 seconds)
16:36:57*Trustable quit (Remote host closed the connection)
16:39:53FromGitter<andreaferretti> is there a constant to check whether debug is enabled?
16:40:07FromGitter<andreaferretti> something like `when debugEnabled: ...`
16:40:35FromGitter<andreaferretti> I would like something like `assert` but with customized exceptions
16:42:39FromGitter<andreaferretti> ah ok I found how to do in the source for assert
16:44:48*mosORadi quit (Quit: Connection closed for inactivity)
16:44:54FromGitter<andreaferretti> by the way it is `when compileOption("assertions")`
16:46:21dom96when not defined(release)?
16:47:35*rokups quit (Quit: Connection closed for inactivity)
16:51:06FromGitter<andreaferretti> well, the former is more precise
16:51:25FromGitter<andreaferretti> one may have a not release build without assertions enabled
17:03:03dom96yes, I should have read further before replying :)
17:05:43*benny_ joined #nim
17:10:06*yingjun joined #nim
17:11:45*yglukhov joined #nim
17:14:57*yingjun quit (Ping timeout: 268 seconds)
17:16:31*yglukhov quit (Ping timeout: 260 seconds)
17:45:43*rauss quit (Ping timeout: 260 seconds)
17:47:34*rauss joined #nim
17:52:19*yglukhov joined #nim
18:05:41*nsf quit (Quit: WeeChat 1.7.1)
18:15:09*gokr joined #nim
18:22:34*rosshadden joined #nim
18:24:54*rauss quit (Ping timeout: 240 seconds)
18:32:25FromGitter<dandevelop> Would it be possible to use the nim macros/ast stuff to convert nim statements to a custom language? Just for the sake of an example, something that would convert some Nim code (loops, if statements) to Go code (replace Go with any other language here)
18:33:10FromGitter<dandevelop> So you would have Nim code as input and the ast functions would interpret that code and allow you to export a string with code in another language
18:33:54FromGitter<dandevelop> Is this something that would be doable with Nim or just a crazy idea in my head?
18:35:51ArrrrThat's what nim does, convert the nim syntax to c/js
18:36:47FromGitter<Varriount> I don't think there's anything stopping you from creating a macro that mimics the compiler, and uses the {.emit.} pragma
18:41:41FromGitter<dandevelop> @Arrrr that's right. I am wondering how hard would be to add another output language. Sounds complex in my head when I put it this way but maybe macros/ast parsing in nim would make it not that hard
18:42:55FromGitter<dandevelop> @Varriount any idea on where to start on that path?
18:43:54*murych quit (Ping timeout: 240 seconds)
18:47:33FromGitter<dandevelop> Just took a look at jsgen.nim and it looks scary
18:55:26Araqdandevelop: look at compiler/jsgen.nim, macros are Nim AST to AST transformations, they are not supposed to produce different languages (though I've been using them for that too ;-) )
18:56:53FromGitter<dandevelop> You believe that file would be a good start, @Araq?
18:57:29Araqyup
18:58:31FromGitter<dandevelop> Is there another resource like doc that I could read in order to understand that code or I should just try to read the code?
18:59:43Araqit's the simplest code generator we have
19:01:17FromGitter<dandevelop> Thanks Araq, I think I will get "dirty" and try to understand that one
19:02:55FromGitter<dandevelop> Just kidding, I just found out about Nim these days and I find it great so far!
19:03:55Araqdon't kid around, read it, it's a good start and you don't have to understand every detail to get the ideas
19:06:00FromGitter<dandevelop> Yep, that's the plan :) I was now looking for the function that gets the actual nim code as an input so that I could start from that one
19:07:42*Neomex quit (Read error: Connection reset by peer)
19:10:04*libman joined #nim
19:11:15FromGitter<dandevelop> Do you have any pointers on what functions I should start with in jsgen.nim?
19:14:22*ritchie_ joined #nim
19:18:32*mcc joined #nim
19:19:03*yglukhov_ joined #nim
19:22:31*yglukhov quit (Ping timeout: 260 seconds)
19:22:52*SusWombat quit (Remote host closed the connection)
19:24:42*SusWombat joined #nim
19:35:32*Snircle joined #nim
19:40:27Araqline 2095
19:41:55FromGitter<dandevelop> Thank you Araq! Appreciate it.
19:42:28PMuncheuantor, thanks for the comment on #5885. Added the newStringOfCap thing
19:45:52euantorNice one, thanks
19:47:56*Matthias247 joined #nim
20:06:24*gokr quit (Quit: Leaving.)
20:16:28*flyx quit (Excess Flood)
20:16:53*flyx joined #nim
20:23:39*adeohluwa joined #nim
20:27:16*Arrrr quit (Read error: Connection reset by peer)
20:36:56*rosshadden quit (Quit: WeeChat 1.8)
20:40:18*nsf joined #nim
20:44:10*Tiberium joined #nim
20:47:00chrishellershmup: If you're having problems between 32 and 64 bit imports, there is some forum discussion about how name mangling may be affecting things.
20:47:12chrishellerLet me dig that up
20:49:58chrishellerForum discussion I was referring to https://forum.nim-lang.org/t/1721#10920
20:57:07*Tiberium quit (Remote host closed the connection)
21:18:22*Parashurama quit (Ping timeout: 246 seconds)
21:24:37*Vladar quit (Quit: Leaving)
21:34:41*couven92 joined #nim
21:55:40*yglukhov_ quit (Read error: Connection reset by peer)
21:56:12*yglukhov joined #nim
22:07:19*daaf joined #nim
22:07:52*daaf quit (Remote host closed the connection)
22:08:04FromGitter<Varriount> Araq: is it officially supported to raise exception types instantiated without the `newException` template?
22:11:16*ofelas quit (Ping timeout: 245 seconds)
22:11:34*daaf joined #nim
22:11:38*ofelas joined #nim
22:22:46*BlaXpirit joined #nim
22:22:46*FromGitter quit (Read error: Connection reset by peer)
22:23:04*nsf quit (Quit: WeeChat 1.7.1)
22:23:14*oprypin quit (Read error: Connection reset by peer)
22:23:14*BlaXpirit is now known as oprypin
22:23:34*FromGitter joined #nim
22:23:36Araqsure
22:25:37*yglukhov quit (Remote host closed the connection)
22:38:56*daaf quit (Remote host closed the connection)
22:45:40*rauss joined #nim
22:49:29*adeohluwa quit (Quit: Connection closed for inactivity)
23:05:20*Nobabs27 joined #nim
23:06:02Nobabs27wants the equiv of a like "const var foo" or "static var foo", or does this matter?
23:06:42Araqvar foo ?
23:08:00*Nobabs25 joined #nim
23:10:20*vlad1777d quit (Remote host closed the connection)
23:10:46*Nobabs27 quit (Ping timeout: 268 seconds)
23:15:41*Matthias247 quit (Read error: Connection reset by peer)
23:23:47FromGitter<dandevelop> Anyone knows how to make this code (2 years old) work with Nim today? https://stackoverflow.com/questions/32487507/nim-code-parser/32490051
23:26:05*daaf joined #nim
23:38:45Araqdandevelop just like that?
23:39:01*arnetheduck joined #nim
23:39:36FromGitter<dandevelop> Sorry, thought I wrote the second line as well
23:40:35FromGitter<dandevelop> This is the line I am currently struggling with: `var m = makeStdinModule()`
23:41:06FromGitter<dandevelop> It looks like this doesn't work anymore and it expects a ModuleGraph
23:41:25*Nobabs25 quit (Quit: Leaving)
23:42:19FromGitter<dandevelop> Ah, I think I don't need it anymore. Just found out the nimeval.nim file
23:42:34FromGitter<dandevelop> And it looks like it might do exactly that
23:58:01*PMunch quit (Quit: leaving)