00:15:24 | * | couven92 quit (Quit: Client Disconnecting) |
00:17:18 | * | ftsf joined #nim |
00:29:18 | * | Jesin quit (Quit: Leaving) |
00:30:04 | * | vlad1777d quit (Remote host closed the connection) |
00:32:26 | * | Jesin joined #nim |
00:50:09 | * | Tiberium quit (Read error: Connection reset by peer) |
00:50:29 | * | Tiberium joined #nim |
01:02:17 | * | yglukhov joined #nim |
01:06:26 | * | Tiberium quit (Remote host closed the connection) |
01:07:17 | * | yglukhov quit (Ping timeout: 268 seconds) |
01:11:20 | FromGitter | <Varriount> Tiberium: Disabling zoom is usually a sign of bad design. |
01:12:53 | FromGitter | <TiberiumPY> Varriount: optionally maybe? |
01:13:28 | FromGitter | <TiberiumPY> Because in Dom's game it's annoying then page zooms in |
01:13:45 | * | krux02 quit (Remote host closed the connection) |
01:36:09 | FromGitter | <Varriount> Oh, well games are an exception |
01:36:59 | FromGitter | <Varriount> But I've had too many news sites disable zoom because it would break shoddy design |
01:38:32 | * | krux02 joined #nim |
01:40:25 | * | chemist69 quit (Ping timeout: 256 seconds) |
01:55:12 | * | chemist69 joined #nim |
02:02:12 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
02:17:39 | def-pri-pub | /quit |
02:17:41 | def-pri-pub | whoops |
02:17:43 | * | def-pri-pub quit (Quit: leaving) |
02:28:59 | * | krux02 quit (Remote host closed the connection) |
02:38:57 | * | Serenitor joined #nim |
02:40:06 | FromGitter | <TiberiumPY> Lol :) |
03:18:19 | * | user0___ joined #nim |
03:24:43 | * | vendethiel- joined #nim |
03:25:37 | * | vendethiel quit (Ping timeout: 260 seconds) |
03:33:42 | * | user0___ quit (Quit: user0___) |
04:32:50 | * | ftsf quit (Quit: :q!) |
04:34:20 | * | ftsf joined #nim |
05:14:43 | * | Nobabs27 quit (Quit: Leaving) |
05:44:40 | * | Serenitor quit (Quit: Leaving) |
05:45:51 | * | rauss quit (Quit: WeeChat 1.7) |
06:18:15 | * | Tiberium joined #nim |
06:27:50 | * | nsf joined #nim |
06:44:53 | * | user0___ joined #nim |
06:48:26 | * | rokups joined #nim |
06:54:25 | * | sz0 quit (Quit: Connection closed for inactivity) |
06:55:42 | * | user0___ quit (Quit: user0___) |
07:02:01 | * | gokr joined #nim |
07:13:09 | ldlework | If I wanted to generate sound and create some basic oscillators what would I use? |
07:14:03 | ftsf | ldlework, in nim? |
07:14:09 | ldlework | ftsf: heh I just found your IRC logs |
07:14:12 | ldlework | via google |
07:14:15 | ldlework | XD |
07:14:24 | ftsf | =) |
07:14:25 | ldlework | ftsf_ hmm very sleepy ~__~ accidentally was up till 4am writing a synth in nim |
07:14:33 | ldlework | ftsf: how did that go? |
07:14:49 | ftsf | hehe, pretty well, it's now a modular synth studio |
07:14:51 | ldlework | http://static.impbox.net/synth.mp4 nice! |
07:14:56 | ldlework | ftsf: woahh |
07:15:06 | ftsf | https://www.youtube.com/watch?v=sDop4JELAhc latest version |
07:15:16 | ldlework | oh my god |
07:15:21 | ftsf | planning to opensauce it soon |
07:15:28 | ldlework | oh fuck yes |
07:15:37 | ftsf | but if you're interested i can share with you now, but keep in mind it's pretty messy |
07:16:04 | ldlework | ftsf: wow I'm totally interested |
07:16:26 | ldlework | ftsf: it definitely looks like you're rushing towards a dwarf fortress situation here |
07:16:31 | ftsf | haha |
07:16:35 | ldlework | though despite that, everything looks so cool |
07:16:48 | ftsf | well yes, with a modular synth it's never done, can always add more modules |
07:16:59 | ldlework | dude, I was just talking about how shoddy pd is |
07:17:01 | ftsf | but i want to get the base framework solid then open source it so people can add new modules to extend it |
07:17:02 | ldlework | or maam |
07:17:04 | ldlework | w/e |
07:17:40 | ftsf | maam? |
07:17:45 | ldlework | lol |
07:17:52 | ldlework | ftsf: I didn't want to assume your gender |
07:17:57 | ftsf | oh right |
07:18:11 | ftsf | thanks |
07:18:23 | ldlework | ftsf: does Nim have a good web-framework yet? |
07:18:31 | ldlework | What if we let web-tech take care of the UI? |
07:18:32 | ftsf | hmm i've not tried any |
07:18:45 | ftsf | hehe i like my retro pixel UI, but probably not for everyone |
07:18:57 | ldlework | ftsf: no I like it, its probably just tiresome to create new UI |
07:19:10 | ftsf | yeah, trying to cleanup some of the UI stuff now |
07:19:13 | ftsf | it's not so fun |
07:19:14 | gokr | ftsf: Impressive shit. |
07:19:16 | ldlework | if people didn't have to learn a new thing and could make modules and slap some webstuff on it, it might go faster |
07:19:44 | ftsf | mm creating a module doesn't require any UI work for the most part (unless you want to extend the UI) |
07:19:50 | ftsf | anyway, gotta run sorry |
07:19:58 | ftsf | will be back online later |
07:20:03 | ldlework | ftsf: if you made me a collaborator just so I could look around that'd be cool |
07:20:39 | * | ftsf quit (Quit: :q!) |
07:21:15 | * | yglukhov joined #nim |
07:23:46 | ldlework | well that's exciting |
07:45:27 | * | bjz joined #nim |
07:45:40 | Tiberium | can I have a template, so I can call it like echo my_templ(data, ">") so I have an if statement inside this template, and want to set > or < based on value passed in template |
07:49:47 | * | vlad1777d joined #nim |
07:50:19 | Araq | template my_templ(cond): string = if cond: "<" else ">" |
07:51:41 | Tiberium | Araq, and how do I call it? my_templ(">") ? |
07:52:20 | Tiberium | Araq, ah |
07:52:36 | Tiberium | Araq, I mean I have an if statement like "if oneObj <comp> secondObj: do stuff" |
07:54:00 | Tiberium | and I want to call template like my_templ(">") so if statement inside template would be "if oneObj > secondObj: do stuff" |
07:54:26 | Tiberium | it's not dynamic (I mean, I will have two calls to this template with ">" and "<" |
07:55:53 | Araq | template my_templ(a, b): string = if a < b: "<" else ">" |
07:56:09 | Araq | template my_templ(cmp, a, b): string = if cmp(a, b): "<" else ">" |
07:56:19 | Tiberium | Araq, ah, yes! |
07:56:20 | Araq | echo my_templ(`<`, a, b) |
07:56:22 | Tiberium | thanks |
07:57:05 | Araq | sounds more like you're looking for a macro though |
07:57:12 | Araq | to do condition inspection |
07:59:49 | Tiberium | Araq, code like this doesn't work https://glot.io/snippets/eodgwv4v02 |
08:00:18 | Tiberium | get_bars returns seq[Bar], type Bar = tuple[name: string, lat, long: float, seatsCount: int] |
08:00:26 | Tiberium | data is JsonNode |
08:02:31 | Tiberium | just curious if I can do this with template |
08:03:10 | Tiberium | if there's no way to do it with template, I would just add checks in proc like if ">": do greater comp else: do less comp |
08:08:56 | * | Vladar joined #nim |
08:11:05 | * | couven92 joined #nim |
08:14:18 | Tiberium | yglukhov, hi. can you give me the link for your game made in Nim? |
08:14:26 | Tiberium | is there a steam page or something? |
08:15:03 | yglukhov | Tiberium: its not officially released yet, sorry. |
08:16:03 | Tiberium | yglukhov, but is there any page about it? |
08:18:13 | Tiberium | yglukhov, and can you please look at this issue? https://github.com/SSPkrolik/nim-native-dialogs/issues/10 ? |
08:18:49 | yglukhov | Tiberium: well, there's a fb page. https://www.facebook.com/reelvalley |
08:19:13 | yglukhov | Tiberium: youre using linux? |
08:19:17 | Tiberium | yglukhov, yeah |
08:19:36 | * | vlad1777d quit (Quit: Leaving) |
08:20:02 | yglukhov | Tiberium: sorry, don't have linux. the problem is likely somewhere in gtk calls. |
08:20:17 | Tiberium | yglukhov, also I know that you can speak Russian, so on this fb page one label at the bottom of recommended section says "27 человекам" |
08:22:53 | Tiberium | yglukhov, I probably know the issue, let me try.. |
08:23:27 | yglukhov | Tiberium: hrm? i don't see any russian text there. do you happen to use russian locale? |
08:24:00 | Tiberium | yglukhov, I'm russian actually, I mean this is the text from facebook itself, don't worry |
08:24:06 | Tiberium | it's not the issue with this page :) |
08:25:08 | yglukhov | Tiberium: oh ok. |
08:25:19 | ldlework | no screenshots :( |
08:38:17 | Tiberium | dom96, are you on linuX? |
08:40:48 | * | Tiberium quit (Remote host closed the connection) |
08:51:55 | * | Tiberium joined #nim |
08:52:09 | Tiberium | how to compile Nim via visual c++ ? |
08:52:20 | Tiberium | with "cl" |
08:52:24 | Tiberium | it's C/C++ compiler |
08:55:49 | FromGitter | <vegansk> --сс:vcc |
08:58:34 | * | user0___ joined #nim |
08:59:32 | Tiberium | vegansk: it can't find "vccexe.exe" |
09:03:09 | FromGitter | <vegansk> I thought that it must be built by ``koch tools``, try to build it yourself: https://github.com/nim-lang/Nim/blob/devel/tools/vccenv/vccexe.nim |
09:05:39 | Tiberium | vegansk: is there any full instructions on how to build Nim from source on Windows? |
09:05:45 | Tiberium | so I'll 100% need to install mingw? |
09:07:39 | * | scriptum quit (Remote host closed the connection) |
09:07:44 | FromGitter | <vegansk> @Tiberium, I'm always using standard instruction with mingw on Windows. Dunno if you can bootstrap the compiler with vcc |
09:11:44 | * | vlad1777d joined #nim |
09:25:24 | * | Tiberium quit (Ping timeout: 258 seconds) |
09:32:17 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
09:34:10 | * | bjz joined #nim |
09:37:20 | * | Andris_zbx joined #nim |
09:39:48 | * | vlad1777d quit (Quit: Leaving) |
09:53:58 | * | Tiberium joined #nim |
09:58:39 | Tiberium | how can I reverse a sequence? |
09:59:00 | Tiberium | ah, nvm |
10:00:37 | FromGitter | <vegansk> @Tiberium, you can use ``search`` feature from this page: https://nim-lang.org/docs/lib.html |
10:00:50 | Tiberium | xD thanks :0 |
10:00:52 | FromGitter | <vegansk> just type ``reverse`` :-) |
10:02:08 | Tiberium | vegansk: yeah, i found this already |
10:05:15 | Tiberium | ok, another question: how to convert all values from split to int? I have " var rowData: seq[string] = row.split(".") " |
10:05:22 | Tiberium | rowData = rowData.mapIt(int(it)) doesn't work |
10:06:28 | Tiberium | ah |
10:06:58 | FromGitter | <vegansk> @Tiberium, use parseutils or |
10:07:18 | FromGitter | <vegansk> https://github.com/vegansk/nimboost/blob/master/src/boost/parsers.nim which has more features |
10:07:36 | Tiberium | oh my god |
10:07:39 | Tiberium | I just forgot |
10:07:46 | Tiberium | that it's not int() in Nim |
10:10:08 | * | shashlick quit (Ping timeout: 240 seconds) |
10:10:50 | FromGitter | <brechtm> How can I get a quick overview of the procs which work on seqs? |
10:11:18 | * | shashlick joined #nim |
10:11:51 | FromGitter | <brechtm> The system module docs do list them, but they are not grouped for seq |
10:12:36 | * | PMunch joined #nim |
10:12:54 | * | couven92 quit (Quit: Client disconnecting) |
10:14:52 | stisa | brechtm: to the left, groupby->type |
10:15:07 | FromGitter | <brechtm> @stisa: thanks |
10:15:23 | stisa | It's limited to the current module though |
10:15:32 | Tiberium | how can I convert seq to array? |
10:15:51 | FromGitter | <brechtm> And is there something similar to Python's enumerate? |
10:16:01 | Tiberium | yes |
10:16:11 | Tiberium | just instead of "for x in thing" use "for index, x in thing" |
10:16:13 | Tiberium | magic |
10:16:17 | FromGitter | <brechtm> Or should I use a HashSet to store a collection of things for which order is not important. |
10:16:30 | FromGitter | <brechtm> @Tiberium lovely! |
10:16:35 | Tiberium | it works for me |
10:17:28 | Tiberium | if not, use pairs(items) |
10:17:53 | FromGitter | <brechtm> Is it safe to use delete on a seq while iterating over its items? |
10:18:05 | Tiberium | maybe with mitems? |
10:19:17 | FromGitter | <brechtm> It sure would be nice to have a constructor that would automatically be called... |
10:22:56 | FromGitter | <vegansk> @brechtm, do you mean default values? Because there is default constructor that just zeroes fields |
10:23:13 | * | couven92 joined #nim |
10:24:00 | FromGitter | <vegansk> Here is the example: https://glot.io/snippets/eodkvus60o |
10:24:30 | FromGitter | <brechtm> @vegansk Yes... But I'd like to provide other default values. And seqs are nil by default, so those definitely needs to be initialized |
10:25:27 | * | couven92 quit (Read error: Connection reset by peer) |
10:25:33 | FromGitter | <vegansk> @brechtm, see this macro: http://vegansk.github.io/nimboost/docs/0.4.0/boost/typeutils.html |
10:26:41 | * | couven92 joined #nim |
10:26:41 | FromGitter | <brechtm> @vegansk interesting... I'll have a look at that |
10:30:22 | FromGitter | <brechtm> hmm: "Error: cannot open 'typeutils'" |
10:30:27 | * | krux02 joined #nim |
10:30:57 | FromGitter | <brechtm> ah, this isn't part of the stdlib |
10:31:07 | FromGitter | <vegansk> @brechtm , ``nimble install nimboost`` and then ``import boost.typeutils`` |
10:34:04 | * | couven92 quit (Read error: Connection reset by peer) |
10:35:45 | FromGitter | <brechtm> @vegansk Could it be it doesn't work with seqs? |
10:37:14 | FromGitter | <brechtm> @vegansk ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=58d8eb59d7ab15e81723c613] |
10:37:49 | FromGitter | <vegansk> The syntax must be: ⏎ ⏎ ```data Test ref object: ⏎ size = 2 ⏎ let sequence: seq[int] = @[]``` [https://gitter.im/nim-lang/Nim?at=58d8eb7cb52518ed4dafeb4a] |
10:38:03 | FromGitter | <brechtm> oh, I didn't use the init proc |
10:38:25 | FromGitter | <vegansk> But yes, it doesn't work. Finding out what's wrong |
10:38:41 | FromGitter | <brechtm> I was hoping I could just say: var t = Test() |
10:39:49 | * | bjz_ joined #nim |
10:40:45 | FromGitter | <brechtm> initTest doesn't seem to be available |
10:41:38 | * | bjz quit (Ping timeout: 240 seconds) |
10:41:43 | FromGitter | <vegansk> Because it's ref object, use newTest() |
10:42:10 | FromGitter | <brechtm> oops, RTFM, right? =-) |
10:43:15 | FromGitter | <vegansk> Added the test: https://github.com/vegansk/nimboost/blob/master/tests/boost/test_typeutils.nim#L348 |
10:43:22 | FromGitter | <brechtm> @vegansk a seq member always needs to be var? |
10:45:00 | FromGitter | <vegansk> @brechtm, no. It's an immutable field in the test above |
10:45:29 | FromGitter | <brechtm> ah, I think I get it. For an empty seq, specify the type, no default value. For a non-empty seq, don't specify the type but do specify the default value... |
10:47:05 | FromGitter | <vegansk> No, you must specify the default value even for empty seq: ⏎ ⏎ ``` data RefTypeWithSeq ref object, show: ⏎ let a: seq[int] = @[] ⏎ b = @["a"]``` [https://gitter.im/nim-lang/Nim?at=58d8eda88e4b63533d6a0faf] |
10:48:20 | FromGitter | <vegansk> Updated the example one more time |
10:48:31 | FromGitter | <brechtm> I see. But it makes little sense for a to be immutable of course... |
10:49:20 | FromGitter | <vegansk> a and b are immutable here. Use var if you need mutable fields |
10:50:16 | FromGitter | <brechtm> I have the feeling OOP is a bit of a second-class citizen in Nim. |
10:51:46 | * | vivus joined #nim |
10:53:06 | FromGitter | <vegansk> @brechtm, why do you think so? https://github.com/pragmagic/nimue4 is a wrapper for an Unreal Engine. And it's 100% of OOP :-) https://github.com/pragmagic/nimue4/wiki/Defining-Unreal-Types |
10:53:51 | Tiberium | hmm |
10:53:52 | Tiberium | Error: type mismatch: got (FlowVar[streams.Stream]) but expected 'Stream = ref StreamObj' |
10:53:58 | Tiberium | trying parallel |
10:54:53 | FromGitter | <brechtm> It was suggested to me several times to avoid using methods. |
10:56:40 | FromGitter | <vegansk> @brechtm, you need methods only if you are using inheritance and dynamic dispatching. I don't need inheritance in 99% cases :-) |
10:58:17 | FromGitter | <brechtm> So ue4 offers macro's for more advanced OOP? |
10:58:18 | FromGitter | <vegansk> PS: But I don't write GUI |
10:58:56 | FromGitter | <vegansk> Not ue4, but nimue4. |
10:59:16 | FromGitter | <brechtm> The ue4 module, I mean |
10:59:31 | vivus | hey Araq , as the only person familiar with 're', can you explain why this doesn't work: https://www.zerobin.net/?86b6663e232d00d6#sWf1+nd0B9pXFdrjm1xeTIQMSxbDIyz0Zbr3/g44K48= |
10:59:38 | FromGitter | <brechtm> I use OOP as a way of structuring programs. |
11:02:55 | FromGitter | <vegansk> Then the only thing that you don't have in Nim out of the box is interfaces I guess. |
11:03:18 | Araq | apparently I'm the only person who can read :P |
11:03:20 | Araq | https://nim-lang.org/docs/re.html |
11:03:26 | Araq | Note: The 're' proc defaults to the extended regular expression syntax which lets you use whitespace freely to make your regexes readable. However, this means to match whitespace \s or something similar has to be used. |
11:28:59 | vivus | Araq: so for " " you use "\s" once? what if I have 6 whitespaces? then: "\s\s\s\s\s\s" ? |
11:31:57 | * | elrood joined #nim |
11:32:08 | * | dexterk quit (Read error: Connection reset by peer) |
11:32:34 | Araq | \s+ |
11:32:44 | * | dexterk joined #nim |
11:32:51 | cheatfate | vivus: "\s+", or "\s{6}" |
11:33:11 | vivus | Araq: you know we hate reading and prefer the sweetness of your replies ;) |
11:45:06 | vivus | what is the URL for the online nim code playground? |
11:45:20 | elrood | what if you want to match only spaces, not tabs? '\ ' ? |
11:45:28 | Tiberium | vivus, simplest one - glot.io |
11:45:33 | Tiberium | but it doesn't support many things |
11:45:53 | Tiberium | vivus, if you really want to have full Nim compiler, use c9.io or codeanywhere |
11:48:59 | vivus | thanks Tiberium . Araq I created a reproducible environment here: https://glot.io/snippets/eodn7sd4ib . I did exactly as you said and it still returns incorrectly |
11:55:31 | vivus | I will love you forever if you help me Araq :P |
12:02:50 | FromGitter | <dom96> Vivus: didn't I already help you out with this? |
12:03:18 | FromGitter | <dom96> https://gist.github.com/dom96/091bc3e8526844e7f6bdcc4bb1aa3083 |
12:04:22 | vivus | @dom96 I ran it a couple of times and it isn't giving the correct output |
12:05:28 | vivus | @dom96 see the link here: https://glot.io/snippets/eodn7sd4ib . I adjusted my code to your gist + araqs \s and it returns an empty sequence |
12:08:09 | Vladar | hm, is there a convenient way to convert an openarray to an array (or get the array pointer from an openarray)? |
12:09:13 | vivus | Vladar: the docs specify it: https://nim-lang.org/docs/tut1.html |
12:11:09 | * | user0___ quit (Ping timeout: 240 seconds) |
12:11:35 | Vladar | vivus: where exactly? |
12:12:03 | vivus | Vladar: https://nim-lang.org/docs/tut1.html#advanced-types-open-arrays |
12:13:11 | Vladar | vivus: I can't see any instructions of openarray->array conversion there |
12:13:28 | Tiberium | Vladar, ah, you've got same question as me |
12:13:41 | Tiberium | openarrays are for proc definition if I remember correctly |
12:13:53 | Vladar | well, yes, they are |
12:13:57 | vivus | you cant use openarrays outside proc definitions |
12:14:27 | Tiberium | Vladar, so you can use openarray just like an array inside of proc? |
12:15:01 | Vladar | it has no address, so i can't addr it |
12:15:37 | vivus | you can't IIRC |
12:15:43 | FromGitter | <dom96> vivus: that's because you have no regex subgroups. Try putting your regex pattern in parenthesis. |
12:16:05 | Vladar | well, that sucks… |
12:17:48 | Vladar | though docs says: "Open arrays are implemented as a pointer to the array data and a length field." and I thought there's a way to get the pointer |
12:19:18 | vivus | @dom96 done and still returns empty |
12:28:54 | * | user0___ joined #nim |
12:29:16 | Araq | Vladar: getting the pointer is easy, unsafeAddr ftw. the problem is that a pointer is not an array |
12:29:48 | Araq | but you can cast it to a ptr to an unchecked array. |
12:32:40 | Vladar | Araq: oh, thanks! It might be helpful |
12:42:05 | * | mjanssen joined #nim |
12:42:09 | * | user0___ quit (Quit: user0___) |
12:42:23 | * | user0___ joined #nim |
13:06:12 | * | zachcarter_ joined #nim |
13:08:58 | * | zachcarter quit (Ping timeout: 240 seconds) |
13:08:58 | * | zachcarter_ is now known as zachcarter |
13:08:59 | * | PMunch quit (Remote host closed the connection) |
13:10:27 | * | PMunch joined #nim |
13:11:27 | * | couven92 joined #nim |
13:22:01 | * | bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
13:25:26 | * | dmi0 joined #nim |
13:34:31 | * | smt quit (Ping timeout: 260 seconds) |
13:40:15 | * | vlad1777d joined #nim |
13:44:22 | krux02 | Araq, don't you have to cast the pointer to a pointer to an unchecked array? |
13:45:03 | krux02 | zachcarter, hi, good morning to you, or whatever time you have there |
13:45:09 | * | Serenitor joined #nim |
13:45:59 | zachcarter | Hey Krux02: one sec, work call |
13:49:14 | zachcarter | alright I’m here krux02 :) |
13:49:30 | zachcarter | good afternoon to you |
13:49:40 | krux02 | thank you |
13:49:55 | zachcarter | morning here :) just getting started |
13:50:05 | krux02 | I see you did a lot of progress in your game library |
13:50:22 | zachcarter | ah yeah I read your post last night |
13:51:22 | krux02 | yea, in the beginning I wrote a whole section about my library, because I was triggered to do so, and then I realized, that is not the right place to do it and deleted it again :P |
13:51:36 | zachcarter | ahaha, well that’s okay I wouldn’t mind :P |
13:51:49 | zachcarter | your library is very good |
13:52:00 | zachcarter | I was going to use it originally haha |
13:52:21 | krux02 | I know, but sadly I can't support mac, nor openglES 2 |
13:52:58 | krux02 | ok to say I do not have access to a mac would be a lie, I sit right in between two unused imacs right now |
13:53:07 | zachcarter | ahaha |
13:53:24 | krux02 | but I do not own them and at the time of writing the library I did work on several different linux machines |
13:53:31 | * | rauss joined #nim |
13:54:15 | krux02 | I thought of adding a mac layer to the library |
13:54:24 | krux02 | but I don't know how well that works |
13:54:34 | zachcarter | hrm |
13:55:00 | zachcarter | this is one reason bgfx comes in handy |
13:55:10 | krux02 | yea I know |
13:55:16 | krux02 | bgfx is cool no question |
13:55:21 | zachcarter | lots of overhead for bgfx |
13:55:23 | zachcarter | but imo worth it |
13:55:27 | krux02 | and I kind of do a lot of the stuff bgfx does |
13:55:32 | zachcarter | yeah |
13:55:39 | krux02 | but I also do things differently, and I do not want a lot of layers |
13:55:46 | zachcarter | yeah your lib is def a lot thinner |
13:56:07 | zachcarter | I think we have some great game dev options emerging for Nim |
13:56:38 | krux02 | I like this trend of modern c++ libraries to support a C API |
13:56:40 | vivus | Araq: any assistance? XD |
13:57:02 | zachcarter | me too |
13:57:10 | krux02 | C API = possible to wrap in a lot of languages |
13:57:25 | zachcarter | I’m always sad when no C API exists for something |
13:57:45 | krux02 | at least you found chipmunk |
13:57:51 | zachcarter | like right now I’m working on a Nim port for http://dragonbones.com/ |
13:58:00 | zachcarter | which is down atm apparently |
13:58:14 | zachcarter | https://github.com/DragonBones |
13:58:17 | krux02 | github pages down |
13:58:28 | zachcarter | yeah |
13:59:23 | krux02 | what does it do? |
13:59:30 | zachcarter | the same thing that library Spine does I showed you last night |
13:59:33 | zachcarter | except this one is open source |
13:59:42 | krux02 | cool |
14:00:00 | krux02 | It definitively opens a lot of possibilities for artists |
14:00:02 | zachcarter | lotta code to port though "/ |
14:00:03 | zachcarter | :/ |
14:00:04 | zachcarter | yeah |
14:00:06 | zachcarter | defnitely |
14:00:07 | Araq | vivus: as dom96 already told you, use reges captures |
14:00:55 | Araq | and parsing html via regexes is stupid, use parsehtml module |
14:01:00 | vivus | like this: re"(<a\s href=.*\s style=.*>.*<\/a>)" |
14:01:05 | krux02 | I try to get nim into a state of easy game concept prototyping, something that blitz basic was to me for 2D games |
14:01:29 | krux02 | And that means to me, do the rendering manually, but don't require tedious work |
14:01:46 | zachcarter | right |
14:02:24 | krux02 | I think it is important, that the game desigener can freely choose the datastructure they build their levels in |
14:02:51 | krux02 | and the rendering system should be flexible to adjust to everything |
14:03:10 | krux02 | I mean everything is impossible, but everything thas has arrays |
14:03:16 | zachcarter | right |
14:03:49 | krux02 | I always hate it, when game engines push me in these predefined tracks to develop games |
14:03:53 | Araq | vivus: I'm not gonna tell you how to abuse regexes for href extraction. |
14:04:31 | krux02 | I think I already mentioned it, but I don't like when the game engine tells me "Hey this is how meshes look like, this is how animatios look like, this is how scenes look like, etc" |
14:04:33 | cheatfate | vivus: please use https://regex101.com and find your own way in capture html via regexes |
14:05:26 | * | gokr quit (Ping timeout: 260 seconds) |
14:05:31 | vivus | yeah no worries, I'll keep at it or otherwise try python instead |
14:05:38 | krux02 | The idea is, when I want to make a chess game, I should be able to make the bare bone terminal version, and then based on that I just put in a 3D renderer and I have a 3D game |
14:05:55 | zachcarter | that would be very nice to be able to do |
14:06:14 | * | nsf quit (Quit: WeeChat 1.7) |
14:06:57 | krux02 | well that version would have a 3D renderer, it would still interact from the command line, but it should not be far off to implement a 3D interface |
14:07:33 | krux02 | a click on screen is easyly reversible into the original grid |
14:07:47 | Araq | sure python can magically inject () capturing for you. |
14:08:30 | * | rauss quit (Quit: WeeChat 1.7) |
14:09:01 | krux02 | Araq: just an idea question, do you think it could be possible to make autocompletion for nim in DSLs programmable? |
14:09:07 | * | rauss joined #nim |
14:09:29 | Araq | it mostly works in macros already. |
14:09:53 | Araq | there are tests for it. |
14:10:10 | * | samuell joined #nim |
14:10:29 | krux02 | I am not talking about default completion, I mean I can execute code that provides the alternative completions? |
14:10:56 | krux02 | or do you mean that, too? |
14:11:18 | * | rauss quit (Client Quit) |
14:11:38 | * | rauss joined #nim |
14:12:06 | * | vendethiel joined #nim |
14:13:01 | * | vendethiel- quit (Ping timeout: 260 seconds) |
14:14:22 | * | rauss quit (Client Quit) |
14:17:12 | * | rauss joined #nim |
14:17:15 | Vladar | aww, yes, finally https://github.com/Vladar4/nimgame2/tree/master/demos/demo18 |
14:17:20 | vivus | Araq: well I thought I would try Nim first to support the language in production, but obviously I first have to overcome people being condescending first |
14:19:30 | Araq | https://nim-lang.org/docs/htmlparser.html#example-transforming-hyperlinks |
14:20:10 | Araq | https://nim-lang.org/docs/parsexml.html#example-2-retrieve-all-html-links |
14:22:12 | * | rauss quit (Quit: WeeChat 1.7) |
14:22:30 | * | rauss joined #nim |
14:22:47 | Araq | krux02: yeah well, I have no plans for that. |
14:31:14 | * | Tiberium quit (Remote host closed the connection) |
14:31:28 | * | Tiberium joined #nim |
14:31:38 | Araq | condescending is just an effect of your questions. |
14:31:50 | Araq | Mitleid gibt's umsonst, Neid muss man sich verdienen. |
14:34:17 | * | byte512 quit (Quit: Bye.) |
14:34:57 | vivus | condescending is a reflection of your handling of people who don't have a mastery of the language you have written. It will be easier to just say "I can't help you" instead of using words like "stupid" to deal with people |
14:35:27 | vivus | but of course, I can't teach/enlighten you (or anyone else) how to behave |
14:36:39 | * | smt joined #nim |
14:38:03 | * | rauss quit (Quit: WeeChat 1.7) |
14:38:21 | * | rauss joined #nim |
14:39:01 | * | rauss quit (Client Quit) |
14:39:17 | * | rauss joined #nim |
14:40:31 | * | rauss quit (Client Quit) |
14:44:41 | * | Tiberium quit (Remote host closed the connection) |
14:44:55 | * | Tiberium joined #nim |
14:49:15 | Araq | no, it's a reflection of your particular behaviour. Don't you worry, I'm friendlier to people who are not as barefaced. |
14:49:33 | cheatfate | vivus, why you blame Nim for your knowledge of Regular Expressions? |
14:49:47 | vivus | cheatfate: my regular expression is fine |
14:50:11 | vivus | Araq: I am not worried. small-language syndrome seems like a thing now. |
14:51:07 | krux02 | The biggest problem in any language is: humans |
14:51:27 | cheatfate | vivus, do you really think this is fine "(<a\s href=.*\s style=.*>.*<\/a>)"? this string will not capture anything by design... |
14:52:01 | cheatfate | and it will not capture anything in python, php, perl and many others |
14:52:39 | vivus | cheatfate: this was the original and tested on regexr.com: <a href=.* style=.*>.*<\/a>) . it was actually highly refined previously and trimmed down to see if the problem was the regex, not the language, but everything was/is blamed except the language |
14:53:36 | vivus | I was even prepared to contribute to the shitty documentation, but I'm too "barefaced" or "stupid" to do so |
14:53:50 | euantor | That apttern doesn't capture anything on regexr... |
14:54:00 | euantor | It matches the string, but doesn't __capture__ anything |
14:54:17 | * | rauss joined #nim |
14:54:29 | euantor | https://usercontent.irccloud-cdn.com/file/ScZ8XnNw/Capture.PNG |
14:55:04 | euantor | If Python magically captures non-capture groups, that's a bug in Python's regex implementation |
14:55:11 | Araq | I already gave 2 links that solve his problem. |
14:55:23 | Araq | but he chose to go into troll mode instead. |
14:57:03 | cheatfate | vivus, your regexr.com (which uses javascript version of regular expressions) with your crafted regular expression also capture this string "<a href="Asdasd" and here i'm also dont care style="asdasd" i dont care about anything>asdasd</a>" |
14:58:03 | vivus | Araq: firstly, nobody is trolling here. you don't call people "stupid" and "barefaced" and then say they're trolling you. |
14:59:23 | * | vlad1777d quit (Quit: Leaving) |
15:00:05 | vivus | euantor: I used this and it captured 2 outputs: https://www.zerobin.net/?5331415485a832e4#+au/u72GuUiDxGs2i8in/eeUNuu0t9MDPv4LOFl11fg= |
15:00:31 | euantor | In Python? |
15:00:37 | vivus | in regexr.com |
15:00:43 | cheatfate | vivus, show your code please |
15:00:44 | * | yglukhov quit (Remote host closed the connection) |
15:01:02 | cheatfate | i mean nim code which uses your regular expression to capture |
15:01:09 | euantor | In regexr it __matches__ two strings, but doesn't __capture__ anything |
15:01:26 | * | vlad1777d joined #nim |
15:01:35 | FromGitter | <dom96> And in Nim the variables which stores the "captures" is called "matches" |
15:01:52 | FromGitter | <dom96> I can see why this would be confusing. |
15:02:49 | FromGitter | <dom96> That said, the documentation does help out: https://nim-lang.org/docs/re.html#match,string,Regex,openArray[string],int |
15:02:59 | FromGitter | <dom96> "and the captured substrings in the array matches" |
15:03:06 | euantor | THis is how it should look if you're capturing something: |
15:03:15 | euantor | https://usercontent.irccloud-cdn.com/file/bkvxgf32/Capture.PNG |
15:04:12 | euantor | Regexr's user interface isn't particularly helpful here either. I usually prefer regexhero, but it requires silvershite *ahem*, I mean silverlight |
15:08:17 | vivus | euantor: so in nim I cannot "capture" something that "matches" ? |
15:09:05 | euantor | The naming in Nim is different. A "match" in Nim is a "Group" in regexr |
15:10:40 | vivus | and what is a "match" from regexr = in nim ? |
15:12:48 | FromGitter | <dom96> vivus: I think what you want is ``findAll`` |
15:12:49 | euantor | The result of the "match" procedure |
15:13:09 | FromGitter | <dom96> It will return all substrings matched in the string |
15:13:17 | FromGitter | <dom96> ``match`` only returns a boolean |
15:13:27 | FromGitter | <dom96> and ``find`` only returns the start index |
15:14:31 | vivus | cheatfate: regex101.com even generated the code for me in python: https://www.zerobin.net/?cb5c989cd58cd9fb#KT8DWUox2DU5TBadpPJIuim1rAO4/Ts4huJx0dGQpH4= |
15:14:44 | cheatfate | i know |
15:17:16 | euantor | Either way, matching HTML with regex is bad and extremely error prone. Use the htmlparser as Araq said |
15:19:39 | vivus | euantor: I am not only matching HTML. I am building a PoC where there will be multiple other different entries and need to stick to 1 pattern, and parseHTML will not support other patterns |
15:20:56 | vivus | but thank you @dom96 euantor and cheatfate for showing some decency and helping me. It is much appreciated (in all sincerity) |
15:22:21 | euantor | No problem. For future reference if all that you wanted was the HTML, this would work: https://glot.io/snippets/eodt3smvsq |
15:22:35 | euantor | In case the missing link was how to actually parse the string as HTML |
15:39:22 | * | Trustable joined #nim |
15:45:09 | * | PMunch quit (Quit: leaving) |
15:48:28 | * | libman joined #nim |
15:49:03 | * | couven92 quit (Quit: Client disconnecting) |
15:51:42 | * | Andris_zbx quit (Remote host closed the connection) |
15:51:52 | * | yglukhov joined #nim |
15:54:42 | * | sz0 joined #nim |
15:56:08 | * | yglukhov quit (Ping timeout: 240 seconds) |
15:58:17 | * | samuell quit (Remote host closed the connection) |
16:05:15 | * | Jesin quit (Quit: Leaving) |
16:06:36 | * | yglukhov joined #nim |
16:07:19 | * | nsf joined #nim |
16:11:48 | * | Jesin joined #nim |
16:33:01 | * | yglukhov quit (Remote host closed the connection) |
16:35:39 | * | yglukhov joined #nim |
16:36:13 | * | yglukhov quit (Remote host closed the connection) |
16:37:54 | * | yglukhov joined #nim |
16:41:37 | dom96 | Araq: Any ideas how to improve errors such as this: https://gist.github.com/dom96/5e3dc61e071db4c269b42f8b338fa89a ? |
16:42:02 | dom96 | In particular, things like "asyncmacro.nim processClientIter" aren't really helpful |
16:42:08 | * | yglukhov quit (Remote host closed the connection) |
16:45:26 | * | yglukhov joined #nim |
16:48:23 | * | yglukhov quit (Remote host closed the connection) |
16:53:34 | * | yglukhov joined #nim |
17:13:14 | * | ggVGc quit (Ping timeout: 246 seconds) |
17:14:22 | * | brson joined #nim |
17:25:08 | * | gokr joined #nim |
17:30:36 | * | krux02 quit (Quit: Leaving) |
17:30:37 | * | yglukhov quit (Remote host closed the connection) |
17:33:02 | * | nsf quit (Quit: WeeChat 1.7) |
17:34:38 | * | byte512 joined #nim |
17:41:35 | * | yglukhov joined #nim |
17:42:44 | Tiberium | sorry for my noob question again, but why this code produces 0 everytime? |
17:42:44 | Tiberium | https://glot.io/snippets/eodwz18goc |
17:42:55 | Tiberium | If I pass different parameters to binary, nothing happens |
17:42:59 | Tiberium | it just prints zeros |
17:45:34 | cheatfate | var data: int = 0 |
17:45:39 | cheatfate | data = n * data |
17:45:45 | cheatfate | n is starting from 0 |
17:45:58 | cheatfate | so in first iteration data becomes 0 |
17:46:12 | Tiberium | cheatfate, oh, thanks. shiet |
17:46:13 | cheatfate | all other iterations made data equal to 0 |
17:46:44 | SusWombat | are nims macros more similiar to rust or lisp? |
17:46:52 | SusWombat | theyre macros i mean |
17:47:01 | Tiberium | list I think |
17:47:28 | cheatfate | Tiberium, also you dont need to have 2 times `if paramCount() < 1: quit()` |
17:47:39 | cheatfate | one under `when isMainModule` is enough |
17:47:54 | SusWombat | dom96, you seem to know about that stuff a lot maybe you could answer? |
17:48:20 | SusWombat | Tiberium, thanks |
17:49:10 | dom96 | Hrm, not sure what they're more similar to. They're definitely more powerful than Rust's :) |
17:52:18 | SusWombat | dom96, ok thanks |
17:55:15 | * | Matthias247 joined #nim |
17:57:33 | * | yglukhov quit (Remote host closed the connection) |
18:04:25 | * | sz0 quit (Quit: Connection closed for inactivity) |
18:07:08 | * | yglukhov joined #nim |
18:07:15 | * | yglukhov quit (Remote host closed the connection) |
18:07:28 | * | yglukhov joined #nim |
18:15:08 | ldlework | Anyone have a sense of how often ftsf is around? |
18:16:48 | * | gangstacat quit (Quit: Ĝis!) |
18:21:26 | dom96 | I would guess after work hours Australia time zone |
18:22:26 | * | gangstacat joined #nim |
18:23:01 | ldlework | OK so still a while I guess |
18:23:31 | vivus | dom96: you mentioned about "\s", but in regex101.com , all generated code from the example uses the raw regex, with no need for "\s". is this a quirk in the nim 're' lib? |
18:30:07 | * | vivus quit (Quit: Leaving) |
18:31:58 | * | Serenitor quit (Ping timeout: 240 seconds) |
18:37:18 | * | xet7 joined #nim |
18:38:59 | * | Trustable quit (Remote host closed the connection) |
18:48:22 | * | user0___ quit (Quit: user0___) |
18:48:30 | * | user0___ joined #nim |
19:05:47 | * | nightmared quit (Ping timeout: 264 seconds) |
19:08:03 | dom96 | This is why writing a Snake game pays off. I just found a pretty bad bug in the async macro :) |
19:08:10 | dom96 | (And fixed it!) |
19:08:29 | ldlework | dom96, :) |
19:08:47 | dom96 | But man, that sure was a subtle bug. |
19:10:02 | * | Serenitor joined #nim |
19:20:33 | Tiberium | oh, I will release first *develop* version of my bot to GitHub. Sorry, but it's written with Russian comments and README (because vk.com is a Russian social network) |
19:22:10 | Tiberium | lol, not now :) I'll need to make some plugins for it |
19:22:29 | * | couven92 joined #nim |
19:24:23 | * | RushPL quit (Ping timeout: 255 seconds) |
19:24:59 | demi- | Tiberium: how do you plan on doing that? |
19:25:14 | Tiberium | demi-, they're compiled with bot itself now |
19:25:29 | Tiberium | I plan to make them as separate libs maybe? |
19:25:38 | * | RushPL joined #nim |
19:26:03 | demi- | yeah, i'd be curious as to how you handle plugin management like that because i was looking at doing something similar recently and stopped because i wasn't sure how to properly implement it with nim |
19:26:19 | Tiberium | demi-, I don't know how to do it properly too |
19:26:38 | demi- | right, so when you do, i would like to know how you approached the problem :) |
19:26:56 | Tiberium | Now I have plugins with one function - call, and call this function from main bot file xD |
19:28:52 | * | couven92 quit (Quit: Client Disconnecting) |
19:29:44 | cheatfate | demi-, what the problem you have with plugins? if you consider about declarations it can be achieved with simple dlload/dlsym |
19:30:06 | euantor | Yeah, that's how other projects like Apache handle it |
19:30:55 | * | couven92 joined #nim |
19:31:12 | demi- | cheatfate: yeah in theory but it doesn't seem so clean to architect around (unlike platforms i'm use to working on) |
19:31:19 | cheatfate | I see only one problem, currently all nim's so/dlls need to be initialized with call to `NimMainModule()` |
19:32:16 | * | rokups quit (Quit: Connection closed for inactivity) |
19:32:52 | cheatfate | demi-, is your platforms support dlsym/dlload? |
19:33:25 | demi- | yeah, but Cocoa also has some built-in plugin architecture support to handle this very well |
19:34:42 | demi- | you say, load this plugin at this path, and it will do that and it has metadata for the default class/code to initialize and run once it gets loaded into process you can get the plugin's code cleanly integrated into the main application |
19:35:37 | cheatfate | demi-, i understand, but nim is not OOP |
19:35:47 | demi- | i know |
19:36:04 | cheatfate | and i think all this ^^^ happen via dlsym/dlload |
19:36:33 | demi- | indeed, but that work is wrapped and i don't want to do that wrapping myself |
19:37:15 | cheatfate | you can export `proc initalize(vtable: objectwhichconsistofprocs)` |
19:37:18 | demi- | and stuff like resolving nim type names at runtime isn't possible i believe so it makes it hard to write delegate based code |
19:37:58 | cheatfate | or you want to make plugins to be in different languages? |
19:38:34 | * | brson quit (Quit: leaving) |
19:38:41 | demi- | yeah that is the other possibility i considered but that is also significant amounts of work |
19:38:47 | * | brson joined #nim |
19:39:16 | cheatfate | demi-, not so many because nim types are not so runtime specific... |
19:39:27 | Araq | I disagree, it's not much work. |
19:39:39 | cheatfate | its like one hour to make workable POC |
19:39:56 | demi- | cheatfate: the runtime names aren't deterministic afaict |
19:39:59 | Araq | it's essentially how Python's internals work and Python is written in C... |
19:40:34 | cheatfate | demi-, everything will be done with function calls... |
19:40:35 | Araq | demi-: I told you before. the name mangling is not important. |
19:40:45 | Araq | .exportc overrides the name mangling |
19:41:09 | Araq | but since the procs end up in an object you pass to the registerPlugin proc it doesn't matter anyway. |
19:41:37 | * | Nobabs27 joined #nim |
19:45:33 | * | cyraxjoe quit (Ping timeout: 255 seconds) |
19:47:35 | * | bjz joined #nim |
19:48:39 | demi- | i'm not sure i understand how that would work; since the libraries (plugins) wouldn't be able to call into the main application on their own, so the application would have to get something from the library (plugin) first to register it |
19:49:00 | * | cyraxjoe joined #nim |
19:51:07 | cheatfate | demi-, application create dispatch table (object) with function addresses it wants to export to plugins... loads plugin via dlload(), calls `NimMainModule` if it present (to initialize GC and others), after calls `PluginInitalize()` and passes to it address of dispatch table... |
19:51:46 | Vladar | tried to build 64-bit windows app under wine for the first time, anyone have a minute to check if it runs under a real OS? https://github.com/Vladar4/ng2gggrotto/releases/download/v1.2/gggrotto-1.2-win64.zip |
19:52:19 | cheatfate | demi-, after this steps loaded plugins can easily invoke functions in dispatch table |
19:53:12 | dom96 | huh, does a for loop inside a closure iterator yield the closure iterator? |
19:53:28 | FromGitter | <Varriount> Vladar: It doesn't run on OSX. :P |
19:54:00 | Vladar | Varriount: don't have a mac :( |
19:58:39 | dom96 | oh, nope, it doesn't. |
19:58:47 | dom96 | I have another loop that does yield inside it |
20:05:08 | Tiberium | dom96, quick question about htmlparser (if you know) - how to get random element from page if there's like 10 elements with type "div" and class "text" ? |
20:05:12 | Tiberium | list comprehension? |
20:05:48 | dom96 | generate a random index? |
20:06:19 | Tiberium | dom96, I have code like for elem in html.findAll("div"): if elem.attr("class") == "text": do stuff with element |
20:06:25 | Tiberium | but how do I get only random index here? |
20:06:38 | Tiberium | maybe if elem.attr("class") == "text" and index == randomIndex ? |
20:08:10 | Tiberium | hmm, seems no |
20:08:25 | Tiberium | simplest way - just parse all results and then return one random of them xD |
20:12:09 | * | vendethiel quit (Ping timeout: 240 seconds) |
20:12:40 | * | vendethiel joined #nim |
20:13:30 | * | yglukhov quit (Remote host closed the connection) |
20:20:36 | * | dexterk quit (Ping timeout: 240 seconds) |
20:20:57 | * | dexterk joined #nim |
20:33:34 | * | Tiberium_ joined #nim |
20:34:14 | * | Tiberium quit (Read error: Connection reset by peer) |
20:37:37 | * | nsf joined #nim |
20:37:52 | * | Tiberium_ quit (Remote host closed the connection) |
20:41:05 | * | Ven joined #nim |
20:41:28 | * | Ven is now known as Guest82746 |
20:44:23 | * | Jesin quit (Quit: Leaving) |
20:47:10 | * | Jesin joined #nim |
20:55:50 | dom96 | So I made lots of Snake server-side fixes. Testing appreciated http://picheta.me/snake/ |
20:56:54 | * | Vladar quit (Quit: Leaving) |
21:02:44 | dom96 | That was a nice game :) |
21:04:56 | dom96 | Any feedback? |
21:07:22 | * | Guest82746 quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:11:04 | * | libman quit (Quit: Connection closed for inactivity) |
21:14:03 | ldlework | dom96, yes, the extra pellet should only start dissolving once you are within a certain range |
21:14:14 | ldlework | IE the one where it is actually theoretically possible to get it |
21:14:31 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:14:36 | dom96 | but then you'd always be able to get it |
21:14:42 | ldlework | ... |
21:14:52 | ldlework | if there's no way to get it period, then there's no reason for it to exist |
21:17:17 | dom96 | there is a way to get it... |
21:18:31 | * | Ven_ joined #nim |
21:20:02 | dom96 | Maybe you ran into a bug where you can't get it? I've tested in Firefox and Chrome so far. |
21:26:21 | * | Ven_ quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:26:34 | * | Ven_ joined #nim |
21:27:21 | * | sz0 joined #nim |
21:28:04 | * | Ven_ quit (Client Quit) |
21:29:57 | * | rauss quit (Quit: WeeChat 1.7) |
21:39:25 | subsetpark | Hey y'all, I posted this yesterday: http://blog.zdsmith.com/posts/nim-for-python-programmers.html |
21:40:03 | ldlework | dom96, I beat your score! |
21:40:25 | * | def-pri-pub joined #nim |
21:41:18 | ldlework | dom96, also what I mean is that, sometimes the item spawns too far and decays before you could ever get to it, based on your speed |
21:41:23 | ldlework | I guess the longer you get the faster you get |
21:42:43 | dom96 | ldlework: yes, and you're not meant to always get it |
21:42:48 | dom96 | It's down to luck |
21:42:50 | ldlework | fair enough |
21:42:54 | ldlework | think you'll beat my score? |
21:43:00 | dom96 | Cheat :P |
21:43:05 | ldlework | what?! |
21:43:27 | ldlework | I would never! |
21:43:47 | ldlework | I'm insulted dom96 |
21:44:12 | dom96 | Can you connect to it? |
21:45:00 | ldlework | dom96, no |
21:45:08 | ldlework | the system is down |
21:45:11 | dom96 | Good, so my IP ban works :P |
21:45:20 | ldlework | lame |
21:46:51 | ldlework | dom96, where's the source? |
21:47:20 | dom96 | Isn't it obvious? |
21:47:29 | ldlework | fine I'll go to github myself |
21:48:13 | ldlework | dom96, is the underlying library "gamelight"? |
21:48:26 | dom96 | yes |
21:49:17 | ldlework | dom96, super duper cool |
21:49:31 | ldlework | dom96, is there a small doc explaining how to get a basic gamelight game working? |
21:49:33 | ldlework | like building it and stuff |
21:50:07 | dom96 | nope, the game is... well.. very light |
21:50:17 | dom96 | I pulled out stuff from another project basically |
21:52:38 | ldlework | dom96, I just mean, how would I draw a circle with gamelight and compile it right |
21:52:44 | ldlework | so I could deploy the webstuff |
21:52:50 | ldlework | nothing more |
21:53:02 | dom96 | it doesn't even support drawing circles lol |
21:53:08 | ldlework | hehe |
21:53:24 | ldlework | dom96, instead of something like gamelight |
21:53:39 | ldlework | we should work on a webapi module that contains things like the Canvas API and the WebAudio API |
21:53:42 | ldlework | http://webaudioapi.com/samples/ |
21:53:57 | def-pri-pub | domg96: Not using my Canvas bindings, I'm sadface.jpg now |
21:54:10 | ldlework | Looks like Canvas API is done :) |
21:54:17 | ldlework | def-pri-pub, where are those? |
21:54:26 | def-pri-pub | should be the `html5_canvas` package |
21:54:32 | def-pri-pub | There's also a WebGL one too |
21:54:36 | def-pri-pub | (not mine though) |
21:55:15 | def-pri-pub | Also, check the `sound` package. Someone already got the Web Audio API bound. |
21:55:24 | ldlework | Wow |
21:55:35 | ldlework | I wonder if I could convince ftsf to target the web! |
21:55:46 | ldlework | Wow imagine being able to share your pads |
21:56:06 | def-pri-pub | I'm porting a game I made in SDL & OpenGL for the Linux Game Jam a week ago. |
21:56:21 | ldlework | porting it to your html5_canvas package? |
21:56:42 | def-pri-pub | I had some issues with the `sound` package myself, but that's probably because of the ACLs on my assets in GCS |
21:56:45 | dom96 | def-pri-pub: I was going to but it felt much too complex. |
21:56:56 | def-pri-pub | how was it too complex? |
21:57:03 | ldlework | What does it even mean to create a javascript binding? |
21:57:18 | dom96 | I had a single file implementation already so I decided to use it |
21:57:22 | def-pri-pub | ah |
21:57:50 | dom96 | Also I disliked your use of 'emit' everywhere |
21:58:03 | ldlework | We should hash this out and come up with really good web modules |
21:58:27 | def-pri-pub | What should it be using than emit instead? |
21:59:35 | FromGitter | <stisa> def-pri-pub : importcpp probably |
22:00:35 | def-pri-pub | ah, I see so. I think I did try to use that if I could, but there were some cases I don't think importcpp would have helped. |
22:01:06 | ldlework | am I alone in thinking that efforts should converge to create standard web-modules? |
22:01:41 | def-pri-pub | e.g, look at the 'fillStyle=' and the 'strokeStyle=' procs. IIRC, It tried using importcpp on them, but It didn't go over well. |
22:01:58 | * | dmi0 quit (Ping timeout: 240 seconds) |
22:02:40 | dom96 | def-pri-pub: Take a look at my canvasjs module |
22:04:59 | dom96 | ldlework: There isn't really much to the compilation except 'nim js --out:tests/snake.js snake' |
22:05:03 | * | user0___ quit (Quit: user0___) |
22:05:05 | dom96 | Good night |
22:05:58 | ldlework | huh |
22:07:26 | * | brson quit (Quit: leaving) |
22:07:27 | FromGitter | <stisa> def-pri-pub mmh, why make it a proc though? it's a property, so you can just declare it as a field of the object, no? |
22:08:08 | FromGitter | <stisa> oh sorry, didn't read the comment |
22:12:43 | * | brson joined #nim |
22:14:38 | * | vendethiel quit (Ping timeout: 240 seconds) |
22:15:18 | * | vendethiel joined #nim |
22:19:50 | * | brson quit (Quit: leaving) |
22:29:12 | * | couven92 quit (Quit: Client Disconnecting) |
22:31:24 | zachcarter | anyone know how I can cast characters to a unit? |
22:31:27 | zachcarter | like if I have FF |
22:31:51 | zachcarter | I would want 255 |
22:32:15 | zachcarter | I need to be able to specify the base as well |
22:32:24 | zachcarter | base 16 in this example… |
22:34:14 | zachcarter | parseHexInt |
22:34:15 | zachcarter | woot |
22:34:57 | FromGitter | <brechtm> I run into segmentation faults now and then when I access a nil-object. Is there by any chance a compiler flag that points me to the source code line where this happens? |
22:46:07 | * | nsf quit (Quit: WeeChat 1.7) |
22:50:14 | * | elrood_ joined #nim |
22:52:19 | * | elrood quit (Ping timeout: 258 seconds) |
23:14:19 | * | elrood_ quit (Quit: Leaving) |
23:14:49 | * | gokr quit (Ping timeout: 240 seconds) |
23:26:04 | * | vendethiel- joined #nim |
23:26:26 | * | vendethiel quit (Ping timeout: 258 seconds) |
23:34:26 | * | sz0 quit (Quit: Connection closed for inactivity) |
23:40:57 | * | vlad1777d quit (Quit: Leaving) |
23:41:58 | * | arnetheduck quit (Ping timeout: 240 seconds) |
23:46:51 | * | Matthias247 quit (Read error: Connection reset by peer) |