<< 20-08-2017 >>

00:05:37dom96mahmudov: it will. It supports package names and URLs just like the `install` command
00:05:48dom96Yes, names can conflict.
00:06:19dom96But Nimble can't help with that
00:15:33arnaud1echo accepts a vararg with many values of different types of which all support the `$` proc, how can I do that with my procs?
00:16:44dom96Use the varargs[string, `$`] type
00:17:25arnaud1Specifically I have a variant object type Item and two procs, one takes Type and returns an Item, and the other takes a Function and also returns an Item, I just need the Item result, I don't care what the original type was
00:17:44arnaud1dom96: What does that syntac mean?
00:17:50arnaud1*syntax
00:18:29dom96Take a variable number of parameters and convert them to a string using the `$` operator
00:31:17*PMunch quit (Quit: leaving)
00:42:54*nattefrost quit (Remote host closed the connection)
00:43:05*def-pri-pub quit (Quit: leaving)
00:47:02*Nobabs27 joined #nim
01:10:25*chemist69 quit (Ping timeout: 255 seconds)
01:11:04*Nobabs27 quit (Quit: Leaving)
01:23:58*chemist69 joined #nim
01:28:24*endragor joined #nim
01:32:27*endragor quit (Ping timeout: 240 seconds)
01:41:19*arnetheduck joined #nim
02:54:08*mahsav joined #nim
03:07:18*dddddd quit (Remote host closed the connection)
03:26:57*arnetheduck quit (Ping timeout: 248 seconds)
03:38:36*mahmudov quit (Quit: Leaving)
03:40:04*mahmudov joined #nim
04:00:25*xInferno joined #nim
04:00:30*xInferno left #nim ("WeeChat 1.9")
04:25:40*pilne quit (Quit: Quitting!)
04:46:54*vlad1777d joined #nim
05:02:25*arnaud1 quit (Ping timeout: 248 seconds)
05:04:37*mahmudov quit (Remote host closed the connection)
05:32:14*haha_ joined #nim
05:51:48FromGitter<dandevelop> has anyone here used "nimble develop" ?
05:57:14FromGitter<adandersen> was Nim in Action recently re-released? On the Manning and Amazon page it shows the book as having an August 2017 release date, wasn't it released back in 2016?
06:01:52FromGitter<adandersen> It looks like a reprinting
06:13:53FromGitter<dandevelop> @adandersen it looks like the final version of the book. I bought it a few months ago but I am not sure what the changes are in the final version. Maybe @dom96 can help with this.
06:15:03FromGitter<adandersen> ah, thanks, i was just curious. I was going to buy it anyway, which I just did. It doesn't mention any updates is why i was wondering, just a has a date change
06:17:17*haha_ quit (Quit: haha_)
06:17:47*gmpreussner quit (Ping timeout: 260 seconds)
06:18:36FromGitter<adandersen> im excited to learn nim better :)
06:19:44FromGitter<dandevelop> Yep, the book is good and helps with this :)
06:20:16*yglukhov joined #nim
06:20:47FromGitter<dandevelop> If anyone is using nimble develop I would really appreciate any input on this: https://github.com/nim-lang/nimble/issues/395
06:24:31*yglukhov quit (Ping timeout: 248 seconds)
06:32:11*ShalokShalom_ joined #nim
06:35:41*ShalokShalom quit (Ping timeout: 240 seconds)
06:37:12*ShalokShalom_ is now known as ShalokShalom
06:50:24*vlad1777d quit (Ping timeout: 240 seconds)
07:09:56*couven92 joined #nim
07:26:35*nsf joined #nim
07:38:38*Yardanico joined #nim
07:53:35*Yardanico quit (Ping timeout: 248 seconds)
08:03:21*endragor joined #nim
08:19:40*Vladar joined #nim
08:23:02*yglukhov joined #nim
08:27:43*yglukhov quit (Ping timeout: 248 seconds)
08:29:01*chemist69 quit (Ping timeout: 246 seconds)
08:33:20*Yardanico joined #nim
08:43:37*chemist69 joined #nim
08:53:53*haha_ joined #nim
08:58:00*Yardanico quit (Ping timeout: 255 seconds)
09:00:20*Yardanico joined #nim
09:05:18*haha_ quit (Quit: haha_)
09:12:29*haha_ joined #nim
09:16:34*xet7 joined #nim
09:17:32*arnetheduck joined #nim
09:17:59couven92just out of interest, is there any particular reason why niminst hardcodes --cc:gcc when generating csources?
09:18:37couven92Araq? ^
09:40:53*Yardanico_ joined #nim
09:48:48*gmpreussner joined #nim
09:54:37*Yardanico_ quit (Quit: Leaving)
09:54:43*Yardanico quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org)
09:54:59*Yardanico joined #nim
10:16:00*yglukhov joined #nim
10:19:33*BitPuffin|osx quit (Remote host closed the connection)
10:19:51*BitPuffin|osx joined #nim
10:23:10*yglukhov quit (Remote host closed the connection)
10:26:50YardanicoI didn't knew that you can do things like while (let newPos = data.parseUntil(token, ',', curPos+1); newPos != 0): do stuff
10:55:02*nsf quit (Quit: WeeChat 1.9)
11:04:47*PMunch joined #nim
11:06:17dom96adandersen: The printed edition was recently released together with a final ebook.
11:09:51dom96couven92: https://github.com/nim-lang/nimble/issues/392#issuecomment-322278024
11:10:04dom96dandevelop: see my answer to your issue :)
11:13:13federico3dom96: https://nimble.directory/pkg/jester looks so much better :)
11:14:27dom96:D
11:14:57Yardanicohmm
11:15:09Yardanicoit seems to sometimes make broken links
11:15:10Yardanicofor example
11:15:15Yardanicoon the main page - https://nimble.directory/pkg/serial.nim
11:15:23Yardanicobut valid url is https://nimble.directory/pkg/serial
11:15:36Yardanicothe same - https://nimble.directory/pkg/qex
11:15:59dom96There is much work to be done :)
11:16:14dom96You also need to badly cache the github trends
11:16:20dom96The front page takes far too long to load
11:16:27dom96oh and just got a 502
11:16:50Yardanicowell it looks very good
11:16:57Yardanicomaybe in the future we may have a proper package index?
11:17:02Yardanicobased on this website :)
11:17:20Yardanicobecause packages.json will be bigger and bigger
11:17:31dom96yep, that's the plan
11:18:04YardanicoI like this website
11:19:23dom96Glad you think it looks good :)
11:19:39dom96Wouldn't be possible without federico3's hard work on the backend of course.
11:22:59dom96federico3: Shall we create issues on GitHub for the things we find?
11:30:34federico3dom96: yup, go ahead. Did you remove the "new packages" list?
11:31:43dom96federico3: Yeah, but you just copy and paste what I have for the "most queried" list
11:31:44*dddddd joined #nim
11:32:01dom96federico3: Are you going to be working on this today?
11:33:33federico3dom96: yes - ping me to get a lock on any file :)
11:34:13dom96federico3: okay, cool. I'll be working on other things today, but let me know when you make progress :D
11:37:11*arnetheduck quit (Ping timeout: 255 seconds)
11:42:38watzonWhat's the site that allows you to search Nimble?
11:44:29*gangstacat joined #nim
11:46:51Yardanicowatzon, nimble.directory and another website.. forgot it's link, one sec
11:49:10watzonYardanico: that works! Thanks :)
11:54:46*arnetheduck joined #nim
11:57:00*PMunch quit (Quit: leaving)
12:05:21*couven92 quit (Ping timeout: 240 seconds)
12:05:21Yardanicowatzon, you can also search on github
12:05:28Yardanicolanguage:nim your query
12:13:31*cspar_ joined #nim
12:15:05*cspar quit (Ping timeout: 240 seconds)
12:15:33Yardanicowatzon, ah! found it! http://nimism.co/
12:15:37Yardanicobut it's not maintained AFAIK
12:15:41Yardanicobut works
12:16:03watzonYeah that's the one that I remember finding before
12:16:14watzonnimble.directory is definitely better
12:16:24Yardanicowell nimble.directory is more official :)
12:17:04FromGitter<zacharycarter> I dunno I like nimism's minimal design
12:17:07FromGitter<zacharycarter> but apparently it doesn't work?
12:17:39Yardanicoit works
12:17:41Yardanicojust start typing
12:17:52Yardanicofor example "pyt"
12:17:58YardanicoI think it works after 3 letters typed
12:18:39Yardanicoalso this search works by tags
12:20:54YardanicoBTW guys, we have two unofficial async libraries based on libuv
12:21:25Yardanicohttps://github.com/zielmicha/reactor.nim and https://github.com/tulayang/nimnode
12:21:50*RelaxBox joined #nim
12:34:25*nsf joined #nim
12:38:33Yardanicowat? https://gist.github.com/zacharycarter/7d000d264ff01461199b43c451b4816f
12:38:43YardanicoLOL
12:38:52YardanicoI forgot march :)
12:38:58Yardanicoomgf
12:41:18*arnaud1 joined #nim
12:41:25*gokr joined #nim
12:43:27FromGitter<zacharycarter> ugh I really need to fix the playground so it stops posting gists as me lol
12:43:33FromGitter<zacharycarter> I think I'll work on that today
12:51:44dom96lol, yeah
13:01:06Yardanicoalso guys, did you heard of NectarJS? it's a (!) a SAAS compiler ( a CAAS, Compiler As A Service)
13:01:26Yardanicoso you send your code to their server, their compiler compile it to native (from JS), and sends you binay
13:01:29Yardanico*binary
13:02:22Yardanicoit seems a bit strange anyways
13:04:34Yardanicohttps://ksr-ugc.imgix.net/assets/015/514/151/2387a093023507c7de29f534b8dade90_original.gif
13:04:57Yardanicohttps://www.kickstarter.com/projects/adrien-thierry/nectarjs-compile-javascript-for-and-from-any-devic they cancelled kickstarter because they want to build a community first
13:05:16Yardanicobut one of this terminal examples shows that nectarjs compiled js code is FASTER than C
13:06:08Yardanicooh wait, they compile C version with -O7
13:06:09Yardanicolol
13:06:29*couven92 joined #nim
13:06:55federico3javascript? meh
13:07:34Yardanicothey have a server-based JS to (any target) compiler
13:07:44Yardanicoany target - I mean windows/linux/wasm/some arduino
13:08:11Yardanicois there any popular server-based compilers? hmm
13:13:42*mahmudov joined #nim
13:30:57*arnaud1 quit (Ping timeout: 240 seconds)
13:33:45*arnaud1 joined #nim
13:37:05RelaxBoxcompiler-as-a-service seems like a pretty awful idea
13:38:26RelaxBoxand I can't imagine how they'd handle non-pure javascript (i.e., ffi)
13:39:30*handlex joined #nim
13:42:49YardanicoRelaxBox, they don't handle it
13:42:57Yardanicothey don't support big libraries I think
13:43:17Yardanicobut I don't know
13:43:21Yardanicoalso it wouldn't be free
13:44:00*PMunch joined #nim
13:50:36*handlex quit (Quit: handlex)
13:58:50*yglukhov joined #nim
14:02:32RelaxBoxno ffi seems like a dealbreaker for any compiler meant for the backend
14:02:54RelaxBoxe.g. no zmq, lots of compression libraries, ssl
14:05:29FromGitter<zacharycarter> https://gist.github.com/anonymous/1ec64277b05703723575c5bd60d71e80
14:05:30FromGitter<zacharycarter> yay!
14:05:31FromGitter<zacharycarter> anonymous gists now
14:06:40Yardanicozacharycarter: with your token? yay!
14:06:44YardanicoI mean good
14:06:52Yardanicoso no one would exploit your account
14:06:56*John__ joined #nim
14:07:29*BitPuffin|osx quit (Ping timeout: 248 seconds)
14:08:58arnaud1Is there a general syntax for generics of types that can be converted to other types with a function like with varargs?
14:09:33arnaud1for example, echo uses varargs[string, `$`], and I managed to use varargs[Item, toItem]
14:09:54*RelaxBox quit (Ping timeout: 240 seconds)
14:10:11arnaud1but can I use something like table[string, [string, `$]] ?
14:10:26Yardanicoarnaud1, table doesn't support that
14:11:34FromGitter<zacharycarter> Yardanico it was using my token before
14:11:42Yardanicowell I know
14:11:42FromGitter<zacharycarter> now I've created an actual oauth app
14:11:45Yardanicoah
14:11:47Yardanicook then
14:13:01arnaud1Yardanico: How can I achieve the same effect with tables?
14:14:33arnaud1Maybe i could use generics, but that limits me to use the same type for all elements
14:16:47arnaud1and i want to use mixed types, all of which can be converted to a common type
14:17:20YardanicoI don't know honestly
14:17:50Yardanicoalso you can't use mixed types in a table AFAIK, e.g. {"1": 1, "2": "hello|}.toTable() wouldn't work
14:18:08Yardanico{"1": 1, "2": "hello"}.toTable()
14:20:23arnaud1I know i cant use mixed types, I want a table of one single type Item, but I want to accept many entries of different types, and at some point convert all of them with a proc toItem
14:20:53Yardanicoyou can create converters, but I doubt this is the best way
14:21:15Yardanicoconverters allow to make implicit type conversions
14:22:23*RelaxBox joined #nim
14:22:24*John__ quit (Ping timeout: 240 seconds)
14:27:15Yardanicoarnaud1, maybe someone would answer here, but you can also make a post on forum
14:27:21Yardanicohttps://forum.nim-lang.org/
14:29:52dom96arnaud1: you might be able to create a converter for this
14:30:21dom96https://nim-lang.org/docs/manual.html#converters
14:30:25Yardanicoyeah, a couple of converters
14:30:58*couven92 quit (Ping timeout: 255 seconds)
14:32:01Yardanicohmm, maybe no
14:33:13*gokr quit (Ping timeout: 255 seconds)
14:42:41*arnaud1 quit (Ping timeout: 248 seconds)
14:48:58*RelaxBox quit (Ping timeout: 255 seconds)
14:55:52*PMunch quit (Quit: leaving)
15:12:36federico3shouldn't we check if n belongs to L? https://github.com/nim-lang/Nim/blob/master/lib/pure/collections/lists.nim#L262
15:18:46*couven92 joined #nim
15:29:01*arnetheduck quit (Ping timeout: 240 seconds)
15:40:08GertmCan I marshal an object to json easily?
15:40:35FromGitter<zacharycarter> yes
15:40:50FromGitter<zacharycarter> https://nim-lang.org/docs/json.html
15:40:56GertmI'm trying the %* operator, but it's giving me errors.
15:41:40*gokr joined #nim
15:42:02FromGitter<zacharycarter> https://play.nim-lang.org/?gist=8f974d521f7a8e466f8c420eec415373
15:46:06GertmOk I see what I did wrong, thanks.
15:46:09FromGitter<zacharycarter> np
15:47:03YardanicoGertm, but be aware that marshal can change json to something else in the future
15:47:13GertmGood to know!
15:47:24FromGitter<zacharycarter> erm not the %* macro
15:47:27FromGitter<zacharycarter> that's from the json module
15:47:36FromGitter<zacharycarter> if you're using the marshall module that's true
15:47:47FromGitter<zacharycarter> but if you're not using the marshall module you don't need to worry about that
15:55:50Gertmhttps://play.nim-lang.org/?gist=ecb28d40813d56368982a993ad9a8e92 <- this doesn't compile. Am I doing something wrong? Expecting too much?
15:56:05Gertm(playing with Nim for the first time, getting a feel for the language)
15:57:24FromGitter<zacharycarter> https://play.nim-lang.org/?gist=0aabfa2231bef51d8a21aa0125f90729
15:57:34FromGitter<zacharycarter> Gertm ^
15:57:54FromGitter<zacharycarter> you had the fields mixed up on the MyObj2 creation line
15:58:19GertmThat'll teach me to name stuff clearly!
15:58:20GertmThanks.
15:58:31FromGitter<zacharycarter> no problem
16:12:49*arnaud1 joined #nim
16:21:03*endragor quit (Remote host closed the connection)
16:22:40*ludocode quit (Disconnected by services)
16:22:41*ludocode_ joined #nim
16:26:11*BitPuffin|osx joined #nim
16:28:47*yglukhov quit (Remote host closed the connection)
16:29:49*mahtob joined #nim
16:30:13*gokr quit (Ping timeout: 255 seconds)
16:31:44*yglukhov joined #nim
16:32:01*mahmudov quit (Ping timeout: 246 seconds)
16:33:51*sz0 joined #nim
16:34:17*yglukhov quit (Remote host closed the connection)
16:41:15*yglukhov joined #nim
16:43:35*arnaud1 quit (Ping timeout: 240 seconds)
16:45:13*pilne joined #nim
16:46:32*yglukhov quit (Remote host closed the connection)
16:58:07*kunev quit (Ping timeout: 248 seconds)
17:00:26*kunev joined #nim
17:01:19*yglukhov joined #nim
17:07:45*Matthias247 joined #nim
17:09:53*yglukhov quit (Remote host closed the connection)
17:12:10*endragor joined #nim
17:22:33FromGitter<zacharycarter> I need to figure out how to read a file w/ webassembly
17:22:36FromGitter<zacharycarter> I'm thinking sdl?
17:27:45FromGitter<zacharycarter> Anyone interested in joining a slack related to gamedev, with a channle for nim game dev, please PM me
17:27:48FromGitter<zacharycarter> channel*
17:27:54*Trustable joined #nim
17:29:08dom96how many users does this Slack have?
17:30:28FromGitter<zacharycarter> it's pretty new so not that many
17:30:32FromGitter<zacharycarter> a lot of Common Lispers atm
17:30:43FromGitter<zacharycarter> but I've been asked to invite Nim users so I'm just putting it out there
17:37:00*endragor quit (Remote host closed the connection)
17:41:34*endragor joined #nim
17:46:18*endragor quit (Ping timeout: 255 seconds)
17:52:38FromGitter<dandevelop> Hey @dom96 thanks for replying here: https://github.com/nim-lang/nimble/issues/395
17:55:48*haha_ quit (Quit: haha_)
17:57:48*def-pri-pub joined #nim
17:58:23*Yardanico quit (Remote host closed the connection)
17:58:26*kafke joined #nim
17:59:08FromGitter<zacharycarter> bleh can't figure out a good way to read text files with sdl2 / rwops
18:00:38*bee123 joined #nim
18:02:08*haha_ joined #nim
18:03:44def-pri-pubzacharycarter: hiya, I just posted a response regarding throwing errors
18:04:04bee123Could anybody help me with this? I am trying to get a ref type from an instance of the base type. Code here: https://pastebin.com/4LG7Qc3b
18:04:11def-pri-pubI'd also skill the SDL2 rwops and stick to Nim's `system` module for reading a text file.
18:06:30def-pri-pubskip* (not skill)
18:07:24FromGitter<zacharycarter> def-pri-pub: cool will take a look, also this rwops is only for webassembly
18:08:59FromGitter<zacharycarter> bee123: something like
18:09:07FromGitter<zacharycarter> ```proc box[T](x: T): ref T = ⏎ new(result); result[] = x``` [https://gitter.im/nim-lang/Nim?at=5999d043bc46472974a4096d]
18:09:09FromGitter<zacharycarter> ?
18:10:00FromGitter<zacharycarter> def-pri-pub I don't think system module can work for webassembly :/
18:10:25*yglukhov joined #nim
18:11:37FromGitter<zacharycarter> @yglukhov are you currently handling this situation?
18:11:45*def-pri-pub quit (Ping timeout: 248 seconds)
18:14:11bee123zacharycarter: thanks I'll give it a go!
18:14:29FromGitter<zacharycarter> bee123: np I think that's what you're after
18:14:46FromGitter<zacharycarter> get a ref object from a normal object
18:14:54*yglukhov quit (Ping timeout: 240 seconds)
18:16:43ShalokShalomhi there
18:16:47FromGitter<zacharycarter> o/
18:16:57ShalokShalomit might be usable to add nimqml to this list: https://nim-lang.org/docs/lib.html#wrappers-gui-libraries
18:17:08ShalokShalomand is somebody here from the core team?
18:17:39ShalokShalomi want to get, how is nim`s implementation about the different compiler so bond to the core?
18:18:33ShalokShalomi mean, in Haxe is it compareable easy, to hack an additional language to it
18:18:40ShalokShalomwhy is this so hard in Nim?
18:18:58*def-pri-pub joined #nim
18:18:58*def-pri-pub quit (Changing host)
18:18:58*def-pri-pub joined #nim
18:19:05ShalokShalomNim use a nice syntax, by the way :D
18:19:11FromGitter<zacharycarter> I don't really understand your question
18:19:22FromGitter<zacharycarter> what do you mean by "Hack an additional language to it"
18:19:26FromGitter<zacharycarter> ?
18:19:33FromGitter<zacharycarter> I'm not a core team member btw, just a user
18:19:50dom96Haxe has been developed as a "compile to any language" language
18:19:54dom96so that's probably why
18:20:11dom96That's not Nim's aim
18:20:23dom96What language do you want to "hack" into Nim?
18:27:05*def-pri-pub quit (Ping timeout: 240 seconds)
18:29:27*def-pri-pub joined #nim
18:29:27*def-pri-pub quit (Changing host)
18:29:27*def-pri-pub joined #nim
18:31:21*def-pri-pub quit (Client Quit)
18:32:36FromGitter<zacharycarter> welp I'm stuck
18:32:39ShalokShalomdom96: Into the ErlangVM
18:32:50ShalokShalomSo either Erlang itself or Elixir
18:33:01ShalokShalomor LFE, something like that
18:34:43*PMunch joined #nim
18:37:38FromGitter<zacharycarter> nm I'm stupid def-pri-pub: I just can't use os module
18:53:05subsetparkha, only nim does someone come into channel and say, 'nim is pretty cool, but why can't i compile it to erlang?'
18:53:34*bee123 quit (Ping timeout: 260 seconds)
18:56:23ShalokShalomsubsetpark: I am a perfectionist
18:56:38ShalokShalomAnd German tutorials are lacking too :D
18:56:43ShalokShalom;)
19:00:20FromGitter<dandevelop> I have a task in a nimble file that builds my executable. Is there any way to run the executable only if the previous exec (the build process) did not fail?
19:04:02*haha_ quit (Quit: haha_)
19:04:02*xet7 quit (Ping timeout: 255 seconds)
19:05:59*yglukhov joined #nim
19:06:53*haha_ joined #nim
19:14:50*endragor joined #nim
19:15:00dom96dandevelop: apparently not :\ please submit this as an issue on the Nim repo (it's Nim's domain)
19:15:43dom96ShalokShalom: What's your motivation for that? What feature does the Erlang VM have that you want?
19:16:25dom96dandevelop: hrm, that said, looking at the code: https://github.com/nim-lang/Nim/blob/master/lib/system/nimscript.nim#L202
19:16:32dom96It seems like it throws an exception when the process fails.
19:16:55FromGitter<dandevelop> Yes, that's also what I noticed. Not sure how to catch that exception though
19:17:05dom96For your use case you shouldn't need to
19:17:15dom96But you can just as you would in ordinary Nim code
19:17:17dom96With a try statement
19:17:34dom96Remember: the code in .nimble files is valid Nim code.
19:17:50dom96(Except that it cannot access the FFI and is mostly limited to https://nim-lang.org/docs/nimscript.html)
19:18:53*endragor quit (Ping timeout: 240 seconds)
19:24:35FromGitter<dandevelop> @dom96 so that means I can not use getCurrentExceptionMsg() in .nimble files, right?
19:24:59dom96No, you should be able to.
19:25:25dom96You can do: try: ... except foo as Exception: echo foo.msg
19:25:27dom96Nowadays btw
19:27:21FromGitter<dandevelop> Do I need to declare foo somwhere? I tried this:
19:27:25FromGitter<dandevelop> except foo as Exception: ⏎ ⏎ ```echo("Build failed. Can not run executable" & foo.msg)``` [https://gitter.im/nim-lang/Nim?at=5999e29d76a757f808c6112f]
19:27:39FromGitter<dandevelop> and I get:
19:27:40FromGitter<dandevelop> Error: undeclared identifier: 'foo'.
19:32:24*haha_ quit (Quit: haha_)
19:33:07*haha_ joined #nim
19:38:01*yglukhov quit (Remote host closed the connection)
19:39:43dom96paste your code
19:42:42FromGitter<dandevelop> try: ⏎ ⏎ ```echo("Build failed. Can not run executable: " & foo.msg)``` [https://gitter.im/nim-lang/Nim?at=5999e631ee5c9a4c5fdfd32f]
19:44:28FromGitter<zacharycarter> grr can't get wasm / emscripten to work with sdl2
19:50:47FromGitter<zacharycarter> got it working I think
19:52:44*Vladar quit (Quit: Leaving)
19:53:34*gokr joined #nim
19:55:11FromGitter<zacharycarter> browser seems to freeze :/
19:57:24*haha_ quit (Quit: haha_)
20:00:05*xet7 joined #nim
20:00:11dom96dandevelop: I assume you're indenting things correctly?
20:00:35FromGitter<dandevelop> Yep, this is just displayed differently by Gitter
20:00:59dom96oh well, I guess nimscript doesn't support this :/
20:01:32dom96use the old fashioned way
20:02:04dom96oh wait, try "Exception as foo"
20:02:04ShalokShalomdom96: concurrency of course
20:02:09*BitPuffin|osx quit (Ping timeout: 248 seconds)
20:02:42FromGitter<dandevelop> @dom96 maybe the syntax should be like this? https://github.com/nim-lang/Nim/blob/c245cfc1fd4143553bcce99669a85f093e4b88a7/tests/js/ttryexceptnewsyntax.nim#L12
20:03:02FromGitter<dandevelop> So except Exception as foo: instead of except foo as Exception:
20:03:59dom96yes
20:04:35FromGitter<dandevelop> @dom96 now I get a template/generic instantiation from here ⏎ SIGSEGV: Illegal storage access. (Attempt to read from nil?)
20:05:25FromGitter<dandevelop> It seems related to the Exception as foo: part. If I remove that then it doesn't complain
20:10:11FromGitter<dandevelop> I opened an issue here: https://github.com/nim-lang/Nim/issues/6262
20:11:21*arnaud1 joined #nim
20:11:47Jipok[m]I did a job that turned out to be useless
20:11:52Jipok[m]https://github.com/Jipok/Nim-SDL2-and-Emscripten
20:11:57Jipok[m]Do I need to add a post on the forum?
20:13:17FromGitter<Yardanico> forum/twitter/reddit
20:13:19FromGitter<Yardanico> would do it :)
20:14:19FromGitter<Yardanico> Jipok: you also left some russian comments in sdl.nim :)
20:14:46Jipok[m]ops
20:15:36Jipok[m]fixed
20:15:48FromGitter<Yardanico> Jipok: what's the size of files?
20:16:01FromGitter<Yardanico> because you said in readme that it was too high
20:16:25Jipok[m]Check the examples
20:16:55Jipok[m]An average of 3 mb
20:17:03FromGitter<Yardanico> it's actually very low if you didn't knew :)
20:18:02FromGitter<zacharycarter> I'm about to start adding a webassembly backend to zengine
20:18:11Jipok[m]It is not productive. Really there should not be more than 300 kb
20:18:16FromGitter<Yardanico> wat?
20:18:19FromGitter<Yardanico> are you sure?
20:18:20FromGitter<Yardanico> lol
20:18:27FromGitter<Yardanico> sdl2 libraries + libpng + some other things
20:18:37FromGitter<Yardanico> check the size of sdl2 dlls on windows
20:19:08Jipok[m]I'm going to add an example with sdl1. You will see the difference
20:19:25FromGitter<Yardanico> well SDL1 is older
20:19:32FromGitter<Yardanico> and that's why it has less size
20:19:32Jipok[m]but this shouldn't use libpng
20:19:46FromGitter<Yardanico> it should
20:20:28Jipok[m]no
20:20:33dom96dandevelop: yeah, definitely a bug, thanks for reporting.
20:20:43FromGitter<Yardanico> Jipok: why not?
20:20:52Jipok[m]look at sdl1 for emscripten
20:20:53Jipok[m]https://github.com/kripken/emscripten/blob/1.37.18/src/library_sdl.js
20:21:25FromGitter<Yardanico> look at sdl image dependencies (for example on arch) - https://www.archlinux.org/packages/extra/i686/sdl_image/
20:21:40FromGitter<Yardanico> SDL image depends on libjpeg, libpng, libtiff
20:21:45FromGitter<Yardanico> also on zlibv
20:21:46FromGitter<Yardanico> *zlib
20:22:11FromGitter<Yardanico> ah sorry wrong link
20:22:11FromGitter<Yardanico> https://www.archlinux.org/packages/extra/i686/sdl2_image/
20:22:23FromGitter<Yardanico> Dependencies (6) ⏎ libjpeg (libjpeg-turbo ) ⏎ libpng ⏎ libtiff ⏎ libwebp [https://gitter.im/nim-lang/Nim?at=5999ef7f578b44a046cdf20b]
20:22:40FromGitter<Yardanico> even SDL2 itself is more than 300kb
20:22:40Jipok[m]Hey, but browsers already use it all. And through simple js functions one can do all the same.
20:22:46FromGitter<Yardanico> no
20:22:53FromGitter<Yardanico> you can't use libpng from the browser
20:23:13FromGitter<Yardanico> it would be considered as a security vulnerability if you could do it
20:24:15Jipok[m]But in the end you just need to load the png picture, and you can do it without 3 mb code.
20:24:43FromGitter<Yardanico> Well code doesn't know if you will load only png pictures
20:25:12FromGitter<Yardanico> Really, make a SDL2 Windows build with all sdl libraries
20:25:19FromGitter<Yardanico> And you'll see how much it is
20:25:44FromGitter<Yardanico> 3mb is almost nothing for a game in the browser nowadays
20:25:59*Yardanico joined #nim
20:26:11Jipok[m]ok
20:26:45FromGitter<Yardanico> Mobile games are even 30-50 mb :)
20:26:46FromGitter<zacharycarter> this is with sdl2
20:26:49FromGitter<zacharycarter> ^
20:26:52FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/FUWF/Screen-Shot-2017-08-20-at-4.26.33-PM.png)
20:27:07FromGitter<zacharycarter> preeety tiny
20:27:13FromGitter<Yardanico> 600kb?
20:27:19FromGitter<Yardanico> Nice
20:27:34FromGitter<Yardanico> Are you porting zengine?
20:27:40FromGitter<zacharycarter> adding a webassembly backend yeah
20:27:41FromGitter<zacharycarter> that's the plan
20:27:49FromGitter<zacharycarter> just at the beginning stages thus far
20:27:54Yardanicowow, nice
20:28:22Yardanicoit's always good to have a game engine written mostly in Nim :)
20:29:33Jipok[m]zacharycarter: How much information from my repository can be useful?
20:29:38Jipok[m]Is it worth adding to the forum?
20:30:18Jipok[m]I just did not find almost anything on this topic and decided to lay out at least something
20:31:05Yardanicowell it's always good to share projects on the forum
20:35:05FromGitter<zacharycarter> Jipok[m] - I'm going to run to the store and then I'll have a look
20:35:25FromGitter<zacharycarter> I wish I had found this 30 mins ago :P but it looks like it'd be worth sharing! I just think that webassembly and straight up emscripten are a bit different
20:35:36FromGitter<zacharycarter> I think webassembly is a newer binary format that emscripten supports
20:37:51*Yardanico quit (Ping timeout: 248 seconds)
20:38:31*yglukhov joined #nim
20:43:36*yglukhov quit (Ping timeout: 240 seconds)
20:51:39FromGitter<zacharycarter> Jipok[m]: I imagine you're compiling to asm.js in your examples?
20:52:47*gangstacat quit (Quit: Leaving)
20:52:59Jipok[m]yes
20:53:20FromGitter<zacharycarter> it'd be interesting to see how it compares when compiling to wasm
20:53:22FromGitter<zacharycarter> in terms of size
20:53:41FromGitter<zacharycarter> if my naive example is any indication, there could be quite a few gainz
20:54:42Jipok[m]wasm_ex208_framerate: 2,3 mb
20:54:55Jipok[m]ex208_framerate: 3,3 mb
20:55:28*Yardanico joined #nim
20:56:23FromGitter<zacharycarter> pretty good
20:56:46Jipok[m]https://github.com/Jipok/Nim-SDL2-and-Emscripten/blob/master/nim.cfg#L3
20:57:02Jipok[m]Not just examples. This is the default setting
20:57:22FromGitter<zacharycarter> gotcha
20:57:27*mahtob quit (Ping timeout: 240 seconds)
21:02:21*ofelas quit (Quit: shutdown -h now)
21:11:39*ShalokShalom quit (Remote host closed the connection)
21:25:49*nsf quit (Quit: WeeChat 1.9)
21:33:20*Trustable quit (Remote host closed the connection)
21:37:54*PMunch quit (Quit: leaving)
21:50:52*rauss joined #nim
21:59:29*rauss quit (Quit: WeeChat 1.9)
21:59:51*rauss joined #nim
22:08:37*vivus joined #nim
22:18:46*Matthias247 quit (Read error: Connection reset by peer)
22:25:37*Yardanico quit (Read error: Connection reset by peer)
22:34:07*Jesin joined #nim
22:41:27*yglukhov joined #nim
22:45:53*yglukhov quit (Ping timeout: 248 seconds)
22:46:12*mahtob joined #nim
23:19:16*Jesin quit (Quit: Leaving)
23:24:57*xaxisx joined #nim
23:25:26*couven92 quit (Quit: Client Disconnecting)
23:37:38*jinshil joined #nim
23:45:04*cspar__ joined #nim
23:48:15*cspar_ quit (Ping timeout: 248 seconds)
23:55:44FromGitter<zacharycarter> getting there with wasm
23:55:48FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/O48j/Screen-Shot-2017-08-20-at-7.55.25-PM.png)
23:56:02FromGitter<zacharycarter> and gles